Package io.kvision.tabulator

Full-featured grid/table component based on the Tabulator library.

Types

Link copied to clipboard
enum AddRowMode : Enum<AddRowMode>

Add row modes.

Link copied to clipboard
enum Align : Enum<Align>

Column align.

Link copied to clipboard
enum Calc : Enum<Calc>

Built-in calc functions.

Link copied to clipboard
data class ColumnDefinition<T : Any>(    val title: String,     val field: String? = null,     val columns: List<ColumnDefinition<T>>? = 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: (dynamic, dynamic, aRow: Tabulator.RowComponent, bRow: Tabulator.RowComponent, column: Tabulator.ColumnComponent, dir: SortingDir, dynamic) -> Number? = null,     val sorterParams: dynamic = null,     val formatter: Formatter? = null,     val formatterFunction: (cell: Tabulator.CellComponent, dynamic, onRendered: (callback: () -> Unit) -> Unit) -> dynamic? = null,     val formatterComponentFunction: (cell: Tabulator.CellComponent, onRendered: (callback: () -> Unit) -> Unit, data: T) -> <Error class: unknown class>? = 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: (dynamic) -> Unit, cancel: (dynamic) -> Unit, dynamic) -> dynamic? = null,     val editorComponentFunction: (cell: Tabulator.CellComponent, onRendered: (callback: () -> Unit) -> Unit, success: (dynamic) -> Unit, cancel: (dynamic) -> Unit, data: T) -> <Error class: unknown class>? = 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: (dynamic, column: Tabulator.ColumnComponent) -> Unit? = null,     val headerDblClick: (dynamic, column: Tabulator.ColumnComponent) -> Unit? = null,     val headerContext: (dynamic, column: Tabulator.ColumnComponent) -> Unit? = null,     val headerTap: (dynamic, column: Tabulator.ColumnComponent) -> Unit? = null,     val headerDblTap: (dynamic, column: Tabulator.ColumnComponent) -> Unit? = null,     val headerTapHold: (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 headerFilterFuncCustom: (dynamic, dynamic, dynamic, dynamic) -> Boolean? = null,     val headerFilterFuncParams: dynamic = null,     val headerFilterLiveFilter: Boolean? = null,     val htmlOutput: Boolean? = null,     val print: Boolean? = null,     val cellClick: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellDblClick: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellContext: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellTap: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellDblTap: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellTapHold: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseEnter: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseLeave: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseOver: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseOut: (dynamic, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseMove: (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 headerMenu: dynamic = null,     val headerContextMenu: dynamic = null,     val contextMenu: dynamic = null,     val hozAlign: Align? = null,     val vertAlign: VAlign? = null,     val clickMenu: dynamic = null,     val headerHozAlign: Align? = null,     val accessor: dynamic = null,     val accessorParams: dynamic = null,     val maxWidth: Int? = null,     val mutatorData: (dynamic, dynamic, type: String, dynamic, cell: Tabulator.CellComponent) -> Any? = null,     val mutatorDataParams: dynamic = null,     val mutatorEdit: (dynamic, dynamic, type: String, dynamic, cell: Tabulator.CellComponent) -> Any? = null,     val mutatorEditParams: dynamic = null,     val mutatorClipboard: (dynamic, dynamic, type: String, dynamic, cell: Tabulator.CellComponent) -> Any? = null,     val mutatorClipboardParams: dynamic = null,     val mutator: (dynamic, dynamic, type: String, dynamic, cell: Tabulator.CellComponent) -> Any? = null,     val mutatorParams: dynamic = null)

Column definition options.

Link copied to clipboard
enum ColumnPosition : Enum<ColumnPosition>

Column positions.

Link copied to clipboard
data class DownloadConfig(    val columnGroups: Boolean? = null,     val rowGroups: Boolean? = null,     val columnCalcs: Boolean? = null)

Download config options.

Link copied to clipboard
enum Editor : Enum<Editor>

Built-in editors.

Link copied to clipboard
enum Filter : Enum<Filter>

Filters.

Link copied to clipboard
enum Formatter : Enum<Formatter>

Built-in formatters.

Link copied to clipboard
enum Layout : Enum<Layout>

Table layouts.

Link copied to clipboard
enum PaginationMode : Enum<PaginationMode>

Pagination modes.

Link copied to clipboard
enum ProgressiveMode : Enum<ProgressiveMode>

Progressive modes.

Link copied to clipboard
enum RangeMode : Enum<RangeMode>

Range select modes.

Link copied to clipboard
enum ResponsiveLayout : Enum<ResponsiveLayout>

Responsive layout modes.

Link copied to clipboard
enum RowPos : Enum<RowPos>

Row positions.

Link copied to clipboard
enum RowPosition : Enum<RowPosition>

Row scroll positions .

Link copied to clipboard
enum RowRangeLookup : Enum<RowRangeLookup>

Tabulator row range lookup set option.

Link copied to clipboard
enum Sorter : Enum<Sorter>

Built-in sorters.

Link copied to clipboard
enum SortingDir : Enum<SortingDir>

Sorting directions.

Link copied to clipboard
enum TableType : Enum<TableType>

Tabulator table types.

Link copied to clipboard
open class Tabulator<T : Any>(    data: List<T>? = null,     dataUpdateOnEdit: Boolean = true,     val options: TabulatorOptions<T> = TabulatorOptions(),     types: Set<TableType> = setOf(),     className: String? = null,     kClass: KClass<T>? = null,     serializer: <Error class: unknown class><T>? = null,     module: <Error class: unknown class>? = null)

Tabulator component.

Link copied to clipboard
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,     var data: Array<T>? = null,     var ajaxURL: String? = null,     val ajaxParams: dynamic = null,     val ajaxConfig: dynamic = null,     val ajaxContentType: dynamic = null,     val ajaxURLGenerator: (url: String, dynamic, dynamic) -> String? = null,     var ajaxRequestFunc: (url: String, dynamic, dynamic) -> <Error class: unknown class><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: dynamic = null,     val paginationElement: dynamic = null,     val paginationDataReceived: dynamic = null,     val paginationDataSent: dynamic = null,     val paginationAddRow: AddRowMode? = null,     val paginationButtonCount: Int? = 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, dynamic) -> Unit? = null,     val headerVisible: Boolean? = null,     val htmlOutputConfig: dynamic = null,     val printAsHtml: Boolean? = null,     val printConfig: dynamic = null,     val printCopyStyle: Boolean? = null,     val printVisibleRows: Boolean? = null,     val printHeader: String? = null,     val printFooter: String? = null,     val printFormatter: (dynamic, dynamic) -> Unit? = null,     val tabEndNewRow: dynamic = null,     val headerSort: Boolean? = null,     val headerSortTristate: Boolean? = null,     val invalidOptionWarnings: Boolean? = null,     val dataTree: Boolean? = null,     val dataTreeChildField: String? = null,     val dataTreeCollapseElement: dynamic = null,     val dataTreeExpandElement: dynamic = null,     val dataTreeElementColumn: String? = null,     val dataTreeBranchElement: dynamic = null,     val dataTreeChildIndent: Number? = null,     val dataTreeStartExpanded: (row: Tabulator.RowComponent, level: Number) -> Boolean? = 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: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     var rowDblClick: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowContext: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowTap: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowDblTap: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowTapHold: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowMouseEnter: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowMouseLeave: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowMouseOver: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowMouseOut: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowMouseMove: (dynamic, row: Tabulator.RowComponent) -> Unit? = null,     val rowAdded: (row: Tabulator.RowComponent) -> Unit? = null,     val rowUpdated: (row: Tabulator.RowComponent) -> Unit? = null,     val rowDeleted: (row: Tabulator.RowComponent) -> Unit? = null,     val rowMoved: (row: Tabulator.RowComponent) -> Unit? = null,     val 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,     val cellContext: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val cellTap: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val cellDblTap: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val cellTapHold: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseEnter: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseLeave: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseOver: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val cellMouseOut: (e: Any, cell: Tabulator.CellComponent) -> Unit? = null,     val 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,     val columnMoved: (column: Tabulator.ColumnComponent, columns: Array<dynamic>) -> Unit? = null,     val columnResized: (column: Tabulator.ColumnComponent) -> Unit? = null,     val columnVisibilityChanged: (column: Tabulator.ColumnComponent, visible: Boolean) -> Unit? = null,     val columnTitleChanged: (column: Tabulator.ColumnComponent) -> Unit? = null,     val tableBuilding: () -> Unit? = null,     val tableBuilt: () -> Unit? = null,     val renderStarted: () -> Unit? = null,     val renderComplete: () -> Unit? = null,     val htmlImporting: () -> Unit? = null,     val htmlImported: () -> Unit? = null,     var dataLoading: (data: List<T>) -> Unit? = null,     var dataLoaded: (data: List<T>) -> Unit? = null,     var dataChanged: (data: List<T>) -> Unit? = null,     val pageLoaded: (pageno: Int) -> Unit? = null,     val dataSorting: (sorters: Array<Tabulator.Sorter>) -> Unit? = null,     val dataSorted: (sorters: Array<Tabulator.Sorter>, rows: Array<Tabulator.RowComponent>) -> Unit? = null,     val dataFiltering: (filters: Array<Tabulator.Filter>) -> Unit? = null,     val dataFiltered: (filters: Array<Tabulator.Filter>, rows: Array<Tabulator.RowComponent>) -> Unit? = null,     val validationFailed: (cell: Tabulator.CellComponent, value: Any, dynamic) -> Unit? = null,     val ajaxRequesting: (url: String, dynamic) -> Boolean? = null,     val ajaxResponse: (url: String, dynamic, dynamic) -> Any? = null,     val ajaxError: (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,     val textDirection: TextDirection? = null,     val virtualDomHoz: Boolean? = null,     val autoColumnsDefinitions: dynamic = null,     val rowClickMenu: dynamic = null,     val headerHozAlign: Align? = null,     val headerSortElement: String? = null,     val dataTreeFilter: Boolean? = null,     val dataTreeSort: Boolean? = null,     val columnMaxWidth: Int? = null)

Tabulator options.

Link copied to clipboard
enum TextDirection : Enum<TextDirection>

Text direction.

Link copied to clipboard
enum TooltipGenerationMode : Enum<TooltipGenerationMode>

Tooltip generation mode.

Link copied to clipboard
enum Validator : Enum<Validator>

Built-in validators.

Link copied to clipboard
enum VAlign : Enum<VAlign>

Column align.

Functions

Link copied to clipboard
inline fun <T : Any> <Error class: unknown class>.tabulator(    options: TabulatorOptions<T> = TabulatorOptions(),     types: Set<TableType> = setOf(),     className: String? = null,     noinline init: Tabulator<T>.() -> Unit? = null): Tabulator<T>

DSL builder extension function for dynamic data (send within options parameter).

inline fun <T : Any, S : Any> <Error class: unknown class>.tabulator(    store: <Error class: unknown class><S>,     noinline dataFactory: (S) -> List<T>,     options: TabulatorOptions<T> = TabulatorOptions(),     types: Set<TableType> = setOf(),     className: String? = null,     serializer: <Error class: unknown class><T>? = null,     serializersModule: <Error class: unknown class>? = null,     noinline init: Tabulator<T>.() -> Unit? = null): Tabulator<T>

DSL builder extension function for a general observable store.

inline fun <T : Any> <Error class: unknown class>.tabulator(    data: List<T>? = null,     dataUpdateOnEdit: Boolean = true,     options: TabulatorOptions<T> = TabulatorOptions(),     types: Set<TableType> = setOf(),     className: String? = null,     serializer: <Error class: unknown class><T>? = null,     serializersModule: <Error class: unknown class>? = null,     noinline init: Tabulator<T>.() -> Unit? = null): Tabulator<T>

DSL builder extension function.

Link copied to clipboard
fun DownloadConfig.toJs(): Tabulator.AddditionalExportOptions

An extension function to convert download config class to JS object.

fun <T : Any> ColumnDefinition<T>.toJs(    tabulator: Tabulator<T>,     i18nTranslator: (String) -> String,     kClass: KClass<T>?): Tabulator.ColumnDefinition

An extension function to convert column definition class to JS object.

fun <T : Any> TabulatorOptions<T>.toJs(    tabulator: Tabulator<T>,     i18nTranslator: (String) -> String,     kClass: KClass<T>?): Tabulator.Options

An extension function to convert tabulator options class to JS object.