aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules')
-rw-r--r--kvision-modules/kvision-bootstrap-spinner/build.gradle.kts2
-rw-r--r--kvision-modules/kvision-fontawesome/build.gradle.kts2
-rw-r--r--kvision-modules/kvision-handlebars/build.gradle.kts2
-rw-r--r--kvision-modules/kvision-maps/build.gradle.kts1
-rw-r--r--kvision-modules/kvision-richtext/build.gradle.kts2
-rw-r--r--kvision-modules/kvision-tabulator/build.gradle.kts2
-rw-r--r--kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt62
7 files changed, 59 insertions, 14 deletions
diff --git a/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts b/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts
index 3a4629bf..a1d33a85 100644
--- a/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts
+++ b/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts
@@ -16,7 +16,7 @@ kotlin {
dependencies {
implementation(kotlin("stdlib-js"))
api(rootProject)
- implementation(npm("bootstrap-touchspin", "4.2.5"))
+ implementation(npm("bootstrap-touchspin", "4.3.0"))
testImplementation(kotlin("test-js"))
}
diff --git a/kvision-modules/kvision-fontawesome/build.gradle.kts b/kvision-modules/kvision-fontawesome/build.gradle.kts
index a75ccca7..ddfd90a5 100644
--- a/kvision-modules/kvision-fontawesome/build.gradle.kts
+++ b/kvision-modules/kvision-fontawesome/build.gradle.kts
@@ -16,7 +16,7 @@ kotlin {
dependencies {
implementation(kotlin("stdlib-js"))
api(rootProject)
- implementation(npm("@fortawesome/fontawesome-free", "5.12.0"))
+ implementation(npm("@fortawesome/fontawesome-free", "5.13.0"))
testImplementation(kotlin("test-js"))
}
diff --git a/kvision-modules/kvision-handlebars/build.gradle.kts b/kvision-modules/kvision-handlebars/build.gradle.kts
index abfbf17f..f8742f9f 100644
--- a/kvision-modules/kvision-handlebars/build.gradle.kts
+++ b/kvision-modules/kvision-handlebars/build.gradle.kts
@@ -16,7 +16,7 @@ kotlin {
dependencies {
implementation(kotlin("stdlib-js"))
api(rootProject)
- implementation(npm("handlebars", "4.7.2"))
+ implementation(npm("handlebars", "4.7.6"))
implementation(npm("handlebars-loader", "1.7.1"))
testImplementation(kotlin("test-js"))
}
diff --git a/kvision-modules/kvision-maps/build.gradle.kts b/kvision-modules/kvision-maps/build.gradle.kts
index a5a1cba2..46acbbba 100644
--- a/kvision-modules/kvision-maps/build.gradle.kts
+++ b/kvision-modules/kvision-maps/build.gradle.kts
@@ -18,7 +18,6 @@ kotlin {
dependencies {
implementation(kotlin("stdlib-js"))
api(rootProject)
- api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutinesVersion")
implementation(npm("leaflet", "1.6.0"))
testImplementation(kotlin("test-js"))
}
diff --git a/kvision-modules/kvision-richtext/build.gradle.kts b/kvision-modules/kvision-richtext/build.gradle.kts
index f9aea3e7..6a8ba5f0 100644
--- a/kvision-modules/kvision-richtext/build.gradle.kts
+++ b/kvision-modules/kvision-richtext/build.gradle.kts
@@ -16,7 +16,7 @@ kotlin {
dependencies {
implementation(kotlin("stdlib-js"))
api(rootProject)
- implementation(npm("trix", "1.2.2"))
+ implementation(npm("trix", "1.2.3"))
testImplementation(kotlin("test-js"))
}
diff --git a/kvision-modules/kvision-tabulator/build.gradle.kts b/kvision-modules/kvision-tabulator/build.gradle.kts
index e6e60bd2..ec2e44f0 100644
--- a/kvision-modules/kvision-tabulator/build.gradle.kts
+++ b/kvision-modules/kvision-tabulator/build.gradle.kts
@@ -16,7 +16,7 @@ kotlin {
dependencies {
implementation(kotlin("stdlib-js"))
api(rootProject)
- implementation(npm("tabulator-tables", "4.5.3"))
+ implementation(npm("tabulator-tables", "4.6.2"))
testImplementation(kotlin("test-js"))
}
diff --git a/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt b/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt
index 77b09810..44e7a871 100644
--- a/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt
+++ b/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt
@@ -53,6 +53,15 @@ enum class Align(internal val align: String) {
}
/**
+ * Column align.
+ */
+enum class VAlign(internal val valign: String) {
+ TOP("top"),
+ MIDDLE("middle"),
+ BOTTOM("bottom")
+}
+
+/**
* Built-in sorters.
*/
enum class Sorter(internal val sorter: String) {
@@ -165,7 +174,8 @@ enum class Filter(internal val filter: String) {
enum class Layout(internal val layout: String) {
FITDATA("fitData"),
FITDATAFILL("fitDataFill"),
- FITCOLUMNS("fitColumns")
+ FITCOLUMNS("fitColumns"),
+ FITDATASTRETCH("fitDataStretch")
}
/**
@@ -353,7 +363,12 @@ data class ColumnDefinition<T : Any>(
val cellMouseMove: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null,
val cellEditing: ((cell: Tabulator.CellComponent) -> Unit)? = null,
val cellEdited: ((cell: Tabulator.CellComponent) -> Unit)? = null,
- val cellEditCancelled: ((cell: Tabulator.CellComponent) -> Unit)? = null
+ val cellEditCancelled: ((cell: Tabulator.CellComponent) -> Unit)? = null,
+ val headerMenu: dynamic = null,
+ val headerContextMenu: dynamic = null,
+ val contextMenu: dynamic = null,
+ val hozAlign: Align? = null,
+ val vertAlign: VAlign? = null
)
internal object EditorRoot {
@@ -519,6 +534,11 @@ fun <T : Any> ColumnDefinition<T>.toJs(
cell.checkHeight()
}
}
+ if (headerMenu != null) this.headerMenu = headerMenu
+ if (headerContextMenu != null) this.headerContextMenu = headerContextMenu
+ if (contextMenu != null) this.contextMenu = contextMenu
+ if (hozAlign != null) this.hozAlign = hozAlign.align
+ if (vertAlign != null) this.vertAlign = vertAlign.valign
} as Tabulator.ColumnDefinition
}
@@ -595,11 +615,11 @@ data class TabulatorOptions<T : Any>(
val paginationDataSent: dynamic = null,
val paginationAddRow: AddRowMode? = null,
val paginationButtonCount: Int? = null,
- var persistenceID: String? = null,
- var persistenceMode: Boolean? = null,
- var persistentLayout: Boolean? = null,
- var persistentSort: Boolean? = null,
- var persistentFilter: Boolean? = null,
+ val persistenceID: String? = null,
+ val persistenceMode: Boolean? = null,
+ val persistentLayout: Boolean? = null,
+ val persistentSort: Boolean? = null,
+ val persistentFilter: Boolean? = null,
val locale: String? = null,
var langs: dynamic = null,
val localized: ((locale: String, lang: dynamic) -> Unit)? = null,
@@ -700,7 +720,20 @@ data class TabulatorOptions<T : Any>(
var validationFailed: ((cell: Tabulator.CellComponent, value: Any, validators: dynamic) -> Unit)? = null,
var ajaxRequesting: ((url: String, params: dynamic) -> Boolean)? = null,
var ajaxResponse: ((url: String, params: dynamic, response: dynamic) -> Any)? = null,
- var ajaxError: ((xhr: dynamic, textStatus: String, errorThrown: dynamic) -> Unit)? = null
+ var ajaxError: ((xhr: dynamic, textStatus: String, errorThrown: dynamic) -> Unit)? = null,
+ val persistence: dynamic = null,
+ val persistenceReaderFunc: dynamic = null,
+ val persistenceWriterFunc: dynamic = null,
+ val paginationInitialPage: Int? = null,
+ val columnHeaderVertAlign: VAlign? = null,
+ val maxHeight: String? = null,
+ val minHeight: String? = null,
+ val rowContextMenu: dynamic = null,
+ val dataTreeChildColumnCalcs: Boolean? = null,
+ val dataTreeSelectPropagate: Boolean? = null,
+ val cellHozAlign: Align? = null,
+ val cellVertAlign: VAlign? = null,
+ val headerFilterLiveFilterDelay: Int? = null
)
/**
@@ -906,5 +939,18 @@ fun <T : Any> TabulatorOptions<T>.toJs(
if (ajaxRequesting != null) this.ajaxRequesting = ajaxRequesting
if (ajaxResponse != null) this.ajaxResponse = ajaxResponse
if (ajaxError != null) this.ajaxError = ajaxError
+ if (persistence != null) this.persistence = persistence
+ if (persistenceReaderFunc != null) this.persistenceReaderFunc = persistenceReaderFunc
+ if (persistenceWriterFunc != null) this.persistenceWriterFunc = persistenceWriterFunc
+ if (paginationInitialPage != null) this.paginationInitialPage = paginationInitialPage
+ if (columnHeaderVertAlign != null) this.columnHeaderVertAlign = columnHeaderVertAlign.valign
+ if (maxHeight != null) this.maxHeight = maxHeight
+ if (minHeight != null) this.minHeight = minHeight
+ if (rowContextMenu != null) this.rowContextMenu = rowContextMenu
+ if (dataTreeChildColumnCalcs != null) this.dataTreeChildColumnCalcs = dataTreeChildColumnCalcs
+ if (dataTreeSelectPropagate != null) this.dataTreeSelectPropagate = dataTreeSelectPropagate
+ if (cellHozAlign != null) this.cellHozAlign = cellHozAlign.align
+ if (cellVertAlign != null) this.cellVertAlign = cellVertAlign.valign
+ if (headerFilterLiveFilterDelay != null) this.headerFilterLiveFilterDelay = headerFilterLiveFilterDelay
} as Tabulator.Options
}