aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Component.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/StyledComponent.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Widget.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/html/List.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt3
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/table/Table.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/window/Window.kt1
10 files changed, 11 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Component.kt b/src/main/kotlin/pl/treksoft/kvision/core/Component.kt
index 659f8e1a..766d9f9c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Component.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Component.kt
@@ -29,6 +29,7 @@ import pl.treksoft.kvision.panel.Root
/**
* Base interface for all components.
*/
+@Suppress("TooManyFunctions")
interface Component {
/**
* Parent of the current component.
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/StyledComponent.kt b/src/main/kotlin/pl/treksoft/kvision/core/StyledComponent.kt
index 9b759f79..c4ac8295 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/StyledComponent.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/StyledComponent.kt
@@ -27,6 +27,7 @@ import kotlin.reflect.KProperty
/**
* Base class for components supporting CSS styling.
*/
+@Suppress("LargeClass")
abstract class StyledComponent : Component {
private val propertyValues: MutableMap<String, Any?> = mutableMapOf()
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
index 61e9ba4e..30271cd0 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
@@ -219,6 +219,7 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent() {
* Returns list of event handlers in the form of a Snabbdom *On* object.
* @return list of event handlers
*/
+ @Suppress("ComplexMethod")
protected open fun getSnOn(): com.github.snabbdom.On? {
return if (internalListeners.size > 0 || listeners.size > 0) {
val internalHandlers = on(this)
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt b/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt
index 8900437b..b4ed127a 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt
@@ -45,6 +45,7 @@ import pl.treksoft.kvision.panel.SimplePanel
* @param label label text of the options group
* @param rich determines if [label] can contain HTML code
*/
+@Suppress("TooManyFunctions")
open class RadioGroup(
options: List<StringPair>? = null, value: String? = null, name: String? = null, inline: Boolean = false,
label: String? = null,
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
index e318db35..d0bde3fe 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
@@ -169,6 +169,7 @@ open class SpinnerInput(
return cl
}
+ @Suppress("ComplexMethod")
override fun getSnAttrs(): List<StringPair> {
val sn = super.getSnAttrs().toMutableList()
sn.add("type" to "text")
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
index 35418534..43e522d8 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
@@ -62,7 +62,7 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf())
return sn
}
- @Suppress("UnsafeCastFromDynamic")
+ @Suppress("UnsafeCastFromDynamic", "ComplexMethod")
override fun afterInsert(node: VNode) {
if (this.disabled || this.readonly == true) {
this.getElementJQuery()?.removeAttr("contenteditable")
diff --git a/src/main/kotlin/pl/treksoft/kvision/html/List.kt b/src/main/kotlin/pl/treksoft/kvision/html/List.kt
index 020806ce..377b805f 100644
--- a/src/main/kotlin/pl/treksoft/kvision/html/List.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/html/List.kt
@@ -93,6 +93,7 @@ open class ListTag(
}
}
+ @Suppress("ComplexCondition")
override fun childrenVNodes(): Array<VNode> {
val childrenElements = children.filter { it.visible }
val res = when (type) {
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt
index 3a5f25f2..7f1226af 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/DockPanel.kt
@@ -97,7 +97,7 @@ open class DockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit
* @param position position in the dock
* @return current container
*/
- @Suppress("MagicNumber")
+ @Suppress("MagicNumber", "ComplexMethod")
open fun add(child: Component, position: Side): DockPanel {
when (position) {
Side.UP -> {
@@ -152,6 +152,7 @@ open class DockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit
* @param position position in the dock
* @return current container
*/
+ @Suppress("ComplexMethod")
open fun removeAt(position: Side): DockPanel {
when (position) {
Side.UP -> {
diff --git a/src/main/kotlin/pl/treksoft/kvision/table/Table.kt b/src/main/kotlin/pl/treksoft/kvision/table/Table.kt
index 31a0913a..73fda1d2 100644
--- a/src/main/kotlin/pl/treksoft/kvision/table/Table.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/table/Table.kt
@@ -35,6 +35,7 @@ enum class TableType(internal val type: String) {
* @param classes a set of CSS class names
* @param init an initializer extension function
*/
+@Suppress("TooManyFunctions")
open class Table(
headerNames: List<String>? = null,
types: Set<TableType> = setOf(), caption: String? = null, responsive: Boolean = false,
diff --git a/src/main/kotlin/pl/treksoft/kvision/window/Window.kt b/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
index 728eff38..9607b01d 100644
--- a/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
@@ -55,6 +55,7 @@ internal const val WINDOW_CONTENT_MARGIN_BOTTOM = 11
* @param classes a set of CSS class names
* @param init an initializer extension function
*/
+@Suppress("TooManyFunctions")
open class Window(
caption: String? = null,
contentWidth: CssSize? = CssSize(0, UNIT.auto),