diff options
| author | Robert Jaros <rjaros@users.noreply.github.com> | 2019-06-21 20:37:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-21 20:37:15 +0200 |
| commit | 4ebc65f3914b9e803bf488977ed4bf40fc04bb84 (patch) | |
| tree | c084fdac69591e2da49f15c9c1a49e3871c2c080 | |
| parent | 075280076d373dad01666397f7b857aad8450b7c (diff) | |
| parent | 97d136f14f086cf457453f1c94da1ecdae835234 (diff) | |
| download | kvision-4ebc65f3914b9e803bf488977ed4bf40fc04bb84.tar.gz kvision-4ebc65f3914b9e803bf488977ed4bf40fc04bb84.tar.bz2 kvision-4ebc65f3914b9e803bf488977ed4bf40fc04bb84.zip | |
Merge pull request #59 from robert-cronin/master
Add KVision Pace module
7 files changed, 534 insertions, 384 deletions
diff --git a/kvision-modules/kvision-pace/build.gradle b/kvision-modules/kvision-pace/build.gradle new file mode 100644 index 00000000..d577df20 --- /dev/null +++ b/kvision-modules/kvision-pace/build.gradle @@ -0,0 +1,9 @@ +apply from: "../shared.gradle" + +kotlinFrontend { + + npm { + dependency("pace-progressbar", "1.0.8") + } + +}
\ No newline at end of file diff --git a/kvision-modules/kvision-pace/package.json.d/project.info b/kvision-modules/kvision-pace/package.json.d/project.info new file mode 100644 index 00000000..98d48a0f --- /dev/null +++ b/kvision-modules/kvision-pace/package.json.d/project.info @@ -0,0 +1,3 @@ +{ + "description": "KVision Pace module" +} diff --git a/kvision-modules/kvision-pace/src/main/kotlin/pl/treksoft/kvision/KVManagerPace.kt b/kvision-modules/kvision-pace/src/main/kotlin/pl/treksoft/kvision/KVManagerPace.kt new file mode 100644 index 00000000..38a83fb5 --- /dev/null +++ b/kvision-modules/kvision-pace/src/main/kotlin/pl/treksoft/kvision/KVManagerPace.kt @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package pl.treksoft.kvision + +internal val kVManagerPaceInit = KVManagerPace.init() + +/** + * Internal singleton object which initializes and configures KVision Moment module. + */ +internal object KVManagerPace { + fun init() {} + + private val pace = try { + require("pace-progressbar").default + } catch (e: Throwable) {} +} diff --git a/kvision-modules/kvision-pace/src/main/kotlin/pl/treksoft/kvision/pace/Pace.kt b/kvision-modules/kvision-pace/src/main/kotlin/pl/treksoft/kvision/pace/Pace.kt new file mode 100644 index 00000000..a5d80908 --- /dev/null +++ b/kvision-modules/kvision-pace/src/main/kotlin/pl/treksoft/kvision/pace/Pace.kt @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2017-present Robert Jaros + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package pl.treksoft.kvision.pace + +import pl.treksoft.kvision.require +import pl.treksoft.kvision.utils.obj +import org.w3c.dom.events.Event +import org.w3c.dom.get +import kotlin.browser.window + +class PaceAjaxOptions(trackMethods:Array<dynamic>? = null, + trackWebSockets:Boolean? = null, + ignoreURLs:Array<dynamic>? = null) { + internal var paceAjaxOptionsJs: dynamic = obj { + if (trackMethods != null) { this.trackMethods = trackMethods } + if (trackWebSockets != null) { this.trackWebSockets = trackWebSockets } + if (ignoreURLs != null) { this.ignoreURLs = ignoreURLs } + } +} + +class PaceElementsOptions(minSamples:Int? = null, + selectors:Array<dynamic>? = null) { + internal var paceElementsOptionsJs: dynamic = obj { + if (minSamples != null) { this.minSamples = minSamples } + if (selectors != null) { this.selectors = selectors } + } +} + +class PaceEventLagOptions(minSamples:Int? = null, + sampleCount:Int? = null, + lagThreshold:Int? = null) { + internal var paceEventLagOptionsJs: dynamic = obj { + if (minSamples != null) { this.minSamples = minSamples } + if (sampleCount != null) { this.sampleCount = sampleCount } + if (lagThreshold != null) { this.lagThreshold = lagThreshold } + } +} + +class PaceOptions( + ajax:PaceAjaxOptions? = null, + catchupTime:Int? = null, + easeFactor:Double? = null, + elements:PaceElementsOptions? = null, + eventLag:PaceEventLagOptions? = null, + ghostTime:Int? = null, + initialRate:Double? = null, + maxProgressPerFrame:Int? = null, + minTime:Int? = null, + restartOnPushState:Boolean? = null, + restartOnRequestAfter:Double? = null, + startOnPageLoad:Boolean? = null, + target:String? = null +) { + internal var paceOptionsJs: dynamic = obj { + if (ajax != null) { this.ajax = ajax.paceAjaxOptionsJs } + if (catchupTime != null) { this.catchupTime = catchupTime } + if (easeFactor != null) { this.easeFactor = easeFactor } + if (elements != null) { this.elements = elements.paceElementsOptionsJs } + if (eventLag != null) { this.eventLag = eventLag.paceEventLagOptionsJs } + if (ghostTime != null) { this.ghostTime = ghostTime } + if (initialRate != null) { this.initialRate = initialRate } + if (maxProgressPerFrame != null) { this.maxProgressPerFrame = maxProgressPerFrame } + if (minTime != null) { this.minTime = minTime } + if (restartOnPushState != null) { this.restartOnPushState = restartOnPushState } + if (restartOnRequestAfter != null) { this.restartOnRequestAfter = restartOnRequestAfter } + if (startOnPageLoad != null) { this.startOnPageLoad = startOnPageLoad } + if (target != null) { this.target = target } + } +} + +enum class PaceColor(var paceColorString: String) { + Black("black"), + Blue("blue"), + Green("green"), + Orange("orange"), + Pink("pink"), + Purple("purple"), + Red("red"), + Silver("silver"), + White("white"), + Yellow("yellow") +} + +enum class PaceTheme(var paceThemeString: String) { + BarberShop("barber-shop"), + BigCounter("big-counter"), + Bounce("bounce"), + CenterAtom("center-atom"), + CenterCircle("center-circle"), + CenterRadar("center-radar"), + CenterSimple("center-simple"), + CornerIndicator("corner-indicator"), + FillLeft("fill-left"), + Flash("flash"), + FlatTop("flat-top"), + LoadingBar("loading-bar"), + MacOSX("mac-osx"), + Material("material"), + Minimal("minimal") +} + +class Pace { + companion object { + fun setNewTheme(color: PaceColor, theme: PaceTheme) { + require("pace-progressbar/themes/${color.paceColorString}/pace-theme-${theme.paceThemeString}.css") + } + fun setOptions(options: PaceOptions) { + window["Pace"].options = options.paceOptionsJs + } + + fun on(event: Event, handler: (() -> Unit)? = null, context: List<dynamic>? = null): dynamic { + return window["Pace"].on(event, handler, context) + } + + fun start() { + window["Pace"].start() + } + + fun stop() { + window["Pace"].stop() + } + } +}
\ No newline at end of file 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 08f2603b..906b0c82 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 @@ -22,7 +22,6 @@ package pl.treksoft.kvision.tabulator -import kotlinx.serialization.KSerializer import org.w3c.dom.HTMLElement import pl.treksoft.kvision.core.Component import pl.treksoft.kvision.form.FormControl @@ -239,9 +238,9 @@ enum class AddRowMode(internal val mode: String) { * Download config options. */ data class DownloadConfig( - val columnGroups: Boolean? = null, - val rowGroups: Boolean? = null, - val columnCalcs: Boolean? = null + val columnGroups: Boolean? = null, + val rowGroups: Boolean? = null, + val columnCalcs: Boolean? = null ) /** @@ -260,98 +259,98 @@ fun DownloadConfig.toJs(): Tabulator.DownloadConfig { * Column definition options. */ data class ColumnDefinition<T : Any>( - val title: String, - val field: String? = null, - val visible: Boolean? = null, - val align: Align? = null, - val width: String? = null, - val minWidth: Int? = null, - val widthGrow: Int? = null, - val widthShrink: Int? = null, - val resizable: Boolean? = null, - val frozen: Boolean? = null, - val responsive: Int? = null, - val tooltip: ((cell: Tabulator.CellComponent) -> String)? = null, - val cssClass: String? = null, - val rowHandle: Boolean? = null, - val hideInHtml: Boolean? = null, - val sorter: Sorter? = null, - val sorterFunction: (( - a: dynamic, b: dynamic, aRow: Tabulator.RowComponent, bRow: Tabulator.RowComponent, - column: Tabulator.ColumnComponent, dir: SortingDir, sorterParams: dynamic - ) -> Number)? = null, - val sorterParams: dynamic = null, - val formatter: Formatter? = null, - val formatterFunction: (( - cell: Tabulator.CellComponent, formatterParams: dynamic, - onRendered: (callback: () -> Unit) -> Unit - ) -> dynamic)? = null, - val formatterComponentFunction: (( - cell: Tabulator.CellComponent, onRendered: (callback: () -> Unit) -> Unit, data: T - ) -> Component)? = null, - val formatterParams: dynamic = null, - val variableHeight: Boolean? = null, - val editable: ((cell: Tabulator.CellComponent) -> Boolean)? = null, - val editor: Editor? = null, - val editorFunction: (( - cell: Tabulator.CellComponent, - onRendered: (callback: () -> Unit) -> Unit, - success: (value: dynamic) -> Unit, cancel: (value: dynamic) -> Unit, editorParams: dynamic - ) -> dynamic)? = null, - val editorComponentFunction: (( - cell: Tabulator.CellComponent, - onRendered: (callback: () -> Unit) -> Unit, - success: (value: dynamic) -> Unit, cancel: (value: dynamic) -> Unit, data: T - ) -> Component)? = null, - val editorParams: dynamic = null, - val validator: Validator? = null, - val validatorFunction: dynamic = null, - val validatorParams: String? = null, - val download: Boolean? = null, - val downloadTitle: String? = null, - val topCalc: Calc? = null, - val topCalcParams: dynamic = null, - val topCalcFormatter: Formatter? = null, - val topCalcFormatterParams: dynamic = null, - val bottomCalc: Calc? = null, - val bottomCalcParams: dynamic = null, - val bottomCalcFormatter: Formatter? = null, - val bottomCalcFormatterParams: dynamic = null, - val headerSort: Boolean? = null, - val headerSortStartingDir: SortingDir? = null, - val headerSortTristate: Boolean? = null, - val headerClick: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, - val headerDblClick: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, - val headerContext: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, - val headerTap: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, - val headerDblTap: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, - val headerTapHold: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, - val headerTooltip: ((column: Tabulator.ColumnComponent) -> String)? = null, - val headerVertical: Boolean? = null, - val editableTitle: Boolean? = null, - val titleFormatter: Formatter? = null, - val titleFormatterParams: dynamic = null, - val headerFilter: Editor? = null, - val headerFilterParams: dynamic = null, - val headerFilterPlaceholder: String? = null, - val headerFilterEmptyCheck: ((value: Any) -> Boolean)? = null, - val headerFilterFunc: Filter? = null, - val headerFilterFuncParams: dynamic = null, - val headerFilterLiveFilter: Boolean? = null, - val cellClick: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellDblClick: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellContext: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellTap: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellDblTap: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellTapHold: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellMouseEnter: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellMouseLeave: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellMouseOver: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - val cellMouseOut: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, - 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 title: String, + val field: String? = null, + val visible: Boolean? = null, + val align: Align? = null, + val width: String? = null, + val minWidth: Int? = null, + val widthGrow: Int? = null, + val widthShrink: Int? = null, + val resizable: Boolean? = null, + val frozen: Boolean? = null, + val responsive: Int? = null, + val tooltip: ((cell: Tabulator.CellComponent) -> String)? = null, + val cssClass: String? = null, + val rowHandle: Boolean? = null, + val hideInHtml: Boolean? = null, + val sorter: Sorter? = null, + val sorterFunction: (( + a: dynamic, b: dynamic, aRow: Tabulator.RowComponent, bRow: Tabulator.RowComponent, + column: Tabulator.ColumnComponent, dir: SortingDir, sorterParams: dynamic + ) -> Number)? = null, + val sorterParams: dynamic = null, + val formatter: Formatter? = null, + val formatterFunction: (( + cell: Tabulator.CellComponent, formatterParams: dynamic, + onRendered: (callback: () -> Unit) -> Unit + ) -> dynamic)? = null, + val formatterComponentFunction: (( + cell: Tabulator.CellComponent, onRendered: (callback: () -> Unit) -> Unit, data: T + ) -> Component)? = null, + val formatterParams: dynamic = null, + val variableHeight: Boolean? = null, + val editable: ((cell: Tabulator.CellComponent) -> Boolean)? = null, + val editor: Editor? = null, + val editorFunction: (( + cell: Tabulator.CellComponent, + onRendered: (callback: () -> Unit) -> Unit, + success: (value: dynamic) -> Unit, cancel: (value: dynamic) -> Unit, editorParams: dynamic + ) -> dynamic)? = null, + val editorComponentFunction: (( + cell: Tabulator.CellComponent, + onRendered: (callback: () -> Unit) -> Unit, + success: (value: dynamic) -> Unit, cancel: (value: dynamic) -> Unit, data: T + ) -> Component)? = null, + val editorParams: dynamic = null, + val validator: Validator? = null, + val validatorFunction: dynamic = null, + val validatorParams: String? = null, + val download: Boolean? = null, + val downloadTitle: String? = null, + val topCalc: Calc? = null, + val topCalcParams: dynamic = null, + val topCalcFormatter: Formatter? = null, + val topCalcFormatterParams: dynamic = null, + val bottomCalc: Calc? = null, + val bottomCalcParams: dynamic = null, + val bottomCalcFormatter: Formatter? = null, + val bottomCalcFormatterParams: dynamic = null, + val headerSort: Boolean? = null, + val headerSortStartingDir: SortingDir? = null, + val headerSortTristate: Boolean? = null, + val headerClick: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, + val headerDblClick: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, + val headerContext: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, + val headerTap: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, + val headerDblTap: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, + val headerTapHold: ((e: dynamic, column: Tabulator.ColumnComponent) -> Unit)? = null, + val headerTooltip: ((column: Tabulator.ColumnComponent) -> String)? = null, + val headerVertical: Boolean? = null, + val editableTitle: Boolean? = null, + val titleFormatter: Formatter? = null, + val titleFormatterParams: dynamic = null, + val headerFilter: Editor? = null, + val headerFilterParams: dynamic = null, + val headerFilterPlaceholder: String? = null, + val headerFilterEmptyCheck: ((value: Any) -> Boolean)? = null, + val headerFilterFunc: Filter? = null, + val headerFilterFuncParams: dynamic = null, + val headerFilterLiveFilter: Boolean? = null, + val cellClick: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellDblClick: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellContext: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellTap: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellDblTap: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellTapHold: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellMouseEnter: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellMouseLeave: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellMouseOver: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + val cellMouseOut: ((e: dynamic, cell: Tabulator.CellComponent) -> Unit)? = null, + 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 ) internal object EditorRoot { @@ -364,18 +363,14 @@ internal object EditorRoot { */ @Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE", "ComplexMethod", "MagicNumber") fun <T : Any> ColumnDefinition<T>.toJs( - i18nTranslator: (String) -> (String), - dataSerializer: KSerializer<T>? = null + i18nTranslator: (String) -> (String) ): Tabulator.ColumnDefinition { val tmpEditorFunction = editorComponentFunction?.let { { cell: Tabulator.CellComponent, onRendered: (callback: () -> Unit) -> Unit, success: (value: dynamic) -> Unit, cancel: (value: dynamic) -> Unit, _: dynamic -> var onRenderedCallback: (() -> Unit)? = null - val str = kotlin.js.JSON.stringify(cell.getData()) - @Suppress("UNCHECKED_CAST") val data = dataSerializer?.let { - JSON.plain.parse(it, str) - } ?: cell.getData() as T + @Suppress("UNCHECKED_CAST") val data = cell.getData() as T val component = it(cell, { callback -> onRenderedCallback = callback }, { value -> @@ -408,9 +403,7 @@ fun <T : Any> ColumnDefinition<T>.toJs( { cell: Tabulator.CellComponent, _: dynamic, onRendered: (callback: () -> Unit) -> Unit -> var onRenderedCallback: (() -> Unit)? = null - val str = kotlin.js.JSON.stringify(cell.getData()) - @Suppress("UNCHECKED_CAST") val data = - dataSerializer?.let { JSON.plain.parse(it, str) } ?: cell.getData() as T + @Suppress("UNCHECKED_CAST") val data = cell.getData() as T val component = it(cell, { callback -> onRenderedCallback = callback }, data) @@ -522,160 +515,160 @@ fun <T : Any> ColumnDefinition<T>.toJs( * Tabulator options. */ data class TabulatorOptions<T : Any>( - val height: String? = null, - val virtualDom: Boolean? = null, - val virtualDomBuffer: Int? = null, - val placeholder: String? = null, - val footerElement: String? = null, - val tooltips: ((cell: Tabulator.CellComponent) -> String)? = null, - val tooltipGenerationMode: TooltipGenerationMode? = null, - val history: Boolean? = null, - val keybindings: dynamic = null, - val downloadDataFormatter: dynamic = null, - val downloadConfig: DownloadConfig? = null, - val reactiveData: Boolean? = null, - val autoResize: Boolean? = null, - val columns: List<ColumnDefinition<T>>? = null, - val autoColumns: Boolean? = null, - val layout: Layout? = null, - val layoutColumnsOnNewData: Boolean? = null, - val responsiveLayout: ResponsiveLayout? = null, - val responsiveLayoutCollapseStartOpen: Boolean? = null, - val responsiveLayoutCollapseUseFormatters: Boolean? = null, - val columnMinWidth: Int? = null, - val resizableColumns: Boolean? = null, - val movableColumns: Boolean? = null, - val tooltipsHeader: Boolean? = null, - val headerFilterPlaceholder: String? = null, - val scrollToColumnPosition: ColumnPosition? = null, - val scrollToColumnIfVisible: Boolean? = null, - val rowFormatter: ((row: Tabulator.RowComponent) -> Unit)? = null, - val addRowPos: RowPos? = null, - val selectable: dynamic = null, - val selectableRangeMode: RangeMode? = null, - val selectableRollingSelection: Boolean? = null, - val selectablePersistence: Boolean? = null, - val selectableCheck: ((row: Tabulator.RowComponent) -> Boolean)? = null, - val movableRows: Boolean? = null, - val movableRowsConnectedTables: dynamic = null, - val movableRowsSender: dynamic = null, - val movableRowsReceiver: dynamic = null, - val resizableRows: Boolean? = null, - val scrollToRowPosition: RowPosition? = null, - val scrollToRowIfVisible: Boolean? = null, - val index: String? = null, - @Suppress("ArrayInDataClass") var data: Array<dynamic>? = null, - val ajaxURL: String? = null, - val ajaxParams: dynamic = null, - val ajaxConfig: dynamic = null, - val ajaxContentType: dynamic = null, - val ajaxURLGenerator: ((url: String, config: dynamic, params: dynamic) -> String)? = null, - val ajaxRequestFunc: ((url: String, config: dynamic, params: dynamic) -> Promise<Any>)? = null, - val ajaxFiltering: Boolean? = null, - val ajaxSorting: Boolean? = null, - val ajaxProgressiveLoad: ProgressiveMode? = null, - val ajaxProgressiveLoadDelay: Int? = null, - val ajaxProgressiveLoadScrollMargin: Int? = null, - val ajaxLoader: Boolean? = null, - val ajaxLoaderLoading: String? = null, - val ajaxLoaderError: String? = null, - val initialSort: List<Tabulator.Sorter>? = null, - val sortOrderReverse: Boolean? = null, - val initialFilter: List<Tabulator.Filter>? = null, - val initialHeaderFilter: List<Any?>? = null, - val pagination: PaginationMode? = null, - val paginationSize: Int? = null, - val paginationSizeSelector: Boolean? = null, - val paginationElement: dynamic = null, - val paginationDataReceived: dynamic = null, - 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 locale: String? = null, - var langs: dynamic = null, - val localized: ((locale: String, lang: dynamic) -> Unit)? = null, - val dataTreeRowExpanded: ((row: Tabulator.RowComponent, level: Number) -> Unit)? = null, - val dataTreeRowCollapsed: ((row: Tabulator.RowComponent, level: Number) -> Unit)? = null, - val movableRowsSendingStart: ((toTables: Array<Any>) -> Unit)? = null, - val movableRowsSent: (( - fromRow: Tabulator.RowComponent, - toRow: Tabulator.RowComponent, toTable: Tabulator - ) -> Unit)? = null, - val movableRowsSentFailed: (( - fromRow: Tabulator.RowComponent, - toRow: Tabulator.RowComponent, toTable: Tabulator - ) -> Unit)? = null, - val movableRowsSendingStop: ((toTables: Array<Any>) -> Unit)? = null, - val movableRowsReceivingStart: ((fromRow: Tabulator.RowComponent, toTable: Tabulator) -> Unit)? = null, - val movableRowsReceived: (( - fromRow: Tabulator.RowComponent, - toRow: Tabulator.RowComponent, fromTable: Tabulator - ) -> Unit)? = null, - val movableRowsReceivedFailed: (( - fromRow: Tabulator.RowComponent, - toRow: Tabulator.RowComponent, fromTable: Tabulator - ) -> Unit)? = null, - val movableRowsReceivingStop: ((fromTable: Tabulator) -> Unit)? = null, - var rowClick: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowDblClick: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowContext: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowTap: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowDblTap: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowTapHold: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowMouseEnter: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowMouseLeave: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowMouseOver: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowMouseOut: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowMouseMove: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, - var rowAdded: ((row: Tabulator.RowComponent) -> Unit)? = null, - var rowUpdated: ((row: Tabulator.RowComponent) -> Unit)? = null, - var rowDeleted: ((row: Tabulator.RowComponent) -> Unit)? = null, - var rowMoved: ((row: Tabulator.RowComponent) -> Unit)? = null, - var rowResized: ((row: Tabulator.RowComponent) -> Unit)? = null, - var rowSelectionChanged: ((data: Array<Any>, rows: Array<Tabulator.RowComponent>) -> Unit)? = null, - var rowSelected: ((row: Tabulator.RowComponent) -> Unit)? = null, - var rowDeselected: ((row: Tabulator.RowComponent) -> Unit)? = null, - var cellClick: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellDblClick: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellContext: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellTap: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellDblTap: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellTapHold: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellMouseEnter: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellMouseLeave: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellMouseOver: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellMouseOut: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellMouseMove: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, - var cellEditing: ((cell: Tabulator.CellComponent) -> Unit)? = null, - var cellEdited: ((cell: Tabulator.CellComponent) -> Unit)? = null, - var cellEditCancelled: ((cell: Tabulator.CellComponent) -> Unit)? = null, - var columnMoved: ((column: Tabulator.ColumnComponent, columns: Array<dynamic>) -> Unit)? = null, - var columnResized: ((column: Tabulator.ColumnComponent) -> Unit)? = null, - var columnVisibilityChanged: ((column: Tabulator.ColumnComponent, visible: Boolean) -> Unit)? = null, - var columnTitleChanged: ((column: Tabulator.ColumnComponent) -> Unit)? = null, - var tableBuilding: (() -> Unit)? = null, - var tableBuilt: (() -> Unit)? = null, - var renderStarted: (() -> Unit)? = null, - var renderComplete: (() -> Unit)? = null, - var htmlImporting: (() -> Unit)? = null, - var htmlImported: (() -> Unit)? = null, - var dataLoading: ((data: Any) -> Unit)? = null, - var dataLoaded: ((data: Any) -> Unit)? = null, - var dataEdited: ((data: Any) -> Unit)? = null, - var pageLoaded: ((pageno: Int) -> Unit)? = null, - var dataSorting: ((sorters: Array<Tabulator.Sorter>) -> Unit)? = null, - var dataSorted: ((sorters: Array<Tabulator.Sorter>, rows: Array<Tabulator.RowComponent>) -> Unit)? = null, - var dataFiltering: ((filters: Array<Tabulator.Filter>) -> Unit)? = null, - var dataFiltered: ((filters: Array<Tabulator.Filter>, rows: Array<Tabulator.RowComponent>) -> Unit)? = null, - 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 + val height: String? = null, + val virtualDom: Boolean? = null, + val virtualDomBuffer: Int? = null, + val placeholder: String? = null, + val footerElement: String? = null, + val tooltips: ((cell: Tabulator.CellComponent) -> String)? = null, + val tooltipGenerationMode: TooltipGenerationMode? = null, + val history: Boolean? = null, + val keybindings: dynamic = null, + val downloadDataFormatter: dynamic = null, + val downloadConfig: DownloadConfig? = null, + val reactiveData: Boolean? = null, + val autoResize: Boolean? = null, + val columns: List<ColumnDefinition<T>>? = null, + val autoColumns: Boolean? = null, + val layout: Layout? = null, + val layoutColumnsOnNewData: Boolean? = null, + val responsiveLayout: ResponsiveLayout? = null, + val responsiveLayoutCollapseStartOpen: Boolean? = null, + val responsiveLayoutCollapseUseFormatters: Boolean? = null, + val columnMinWidth: Int? = null, + val resizableColumns: Boolean? = null, + val movableColumns: Boolean? = null, + val tooltipsHeader: Boolean? = null, + val headerFilterPlaceholder: String? = null, + val scrollToColumnPosition: ColumnPosition? = null, + val scrollToColumnIfVisible: Boolean? = null, + val rowFormatter: ((row: Tabulator.RowComponent) -> Unit)? = null, + val addRowPos: RowPos? = null, + val selectable: dynamic = null, + val selectableRangeMode: RangeMode? = null, + val selectableRollingSelection: Boolean? = null, + val selectablePersistence: Boolean? = null, + val selectableCheck: ((row: Tabulator.RowComponent) -> Boolean)? = null, + val movableRows: Boolean? = null, + val movableRowsConnectedTables: dynamic = null, + val movableRowsSender: dynamic = null, + val movableRowsReceiver: dynamic = null, + val resizableRows: Boolean? = null, + val scrollToRowPosition: RowPosition? = null, + val scrollToRowIfVisible: Boolean? = null, + val index: String? = null, + @Suppress("ArrayInDataClass") var data: Array<T>? = null, + val ajaxURL: String? = null, + val ajaxParams: dynamic = null, + val ajaxConfig: dynamic = null, + val ajaxContentType: dynamic = null, + val ajaxURLGenerator: ((url: String, config: dynamic, params: dynamic) -> String)? = null, + val ajaxRequestFunc: ((url: String, config: dynamic, params: dynamic) -> Promise<Any>)? = null, + val ajaxFiltering: Boolean? = null, + val ajaxSorting: Boolean? = null, + val ajaxProgressiveLoad: ProgressiveMode? = null, + val ajaxProgressiveLoadDelay: Int? = null, + val ajaxProgressiveLoadScrollMargin: Int? = null, + val ajaxLoader: Boolean? = null, + val ajaxLoaderLoading: String? = null, + val ajaxLoaderError: String? = null, + val initialSort: List<Tabulator.Sorter>? = null, + val sortOrderReverse: Boolean? = null, + val initialFilter: List<Tabulator.Filter>? = null, + val initialHeaderFilter: List<Any?>? = null, + val pagination: PaginationMode? = null, + val paginationSize: Int? = null, + val paginationSizeSelector: Boolean? = null, + val paginationElement: dynamic = null, + val paginationDataReceived: dynamic = null, + 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 locale: String? = null, + var langs: dynamic = null, + val localized: ((locale: String, lang: dynamic) -> Unit)? = null, + val dataTreeRowExpanded: ((row: Tabulator.RowComponent, level: Number) -> Unit)? = null, + val dataTreeRowCollapsed: ((row: Tabulator.RowComponent, level: Number) -> Unit)? = null, + val movableRowsSendingStart: ((toTables: Array<Any>) -> Unit)? = null, + val movableRowsSent: (( + fromRow: Tabulator.RowComponent, + toRow: Tabulator.RowComponent, toTable: Tabulator + ) -> Unit)? = null, + val movableRowsSentFailed: (( + fromRow: Tabulator.RowComponent, + toRow: Tabulator.RowComponent, toTable: Tabulator + ) -> Unit)? = null, + val movableRowsSendingStop: ((toTables: Array<Any>) -> Unit)? = null, + val movableRowsReceivingStart: ((fromRow: Tabulator.RowComponent, toTable: Tabulator) -> Unit)? = null, + val movableRowsReceived: (( + fromRow: Tabulator.RowComponent, + toRow: Tabulator.RowComponent, fromTable: Tabulator + ) -> Unit)? = null, + val movableRowsReceivedFailed: (( + fromRow: Tabulator.RowComponent, + toRow: Tabulator.RowComponent, fromTable: Tabulator + ) -> Unit)? = null, + val movableRowsReceivingStop: ((fromTable: Tabulator) -> Unit)? = null, + var rowClick: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowDblClick: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowContext: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowTap: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowDblTap: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowTapHold: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowMouseEnter: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowMouseLeave: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowMouseOver: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowMouseOut: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowMouseMove: ((e: dynamic, row: Tabulator.RowComponent) -> Unit)? = null, + var rowAdded: ((row: Tabulator.RowComponent) -> Unit)? = null, + var rowUpdated: ((row: Tabulator.RowComponent) -> Unit)? = null, + var rowDeleted: ((row: Tabulator.RowComponent) -> Unit)? = null, + var rowMoved: ((row: Tabulator.RowComponent) -> Unit)? = null, + var rowResized: ((row: Tabulator.RowComponent) -> Unit)? = null, + var rowSelectionChanged: ((data: Array<Any>, rows: Array<Tabulator.RowComponent>) -> Unit)? = null, + var rowSelected: ((row: Tabulator.RowComponent) -> Unit)? = null, + var rowDeselected: ((row: Tabulator.RowComponent) -> Unit)? = null, + var cellClick: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, + var cellDblClick: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, + var cellContext: ((e: Any, cell: Tabulator.CellComponent) -> Unit)? = null, + var |
