diff options
author | Robert Jaros <rjaros@users.noreply.github.com> | 2019-05-07 13:18:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-07 13:18:42 +0200 |
commit | 3b898f573950c09bc20ef26c8109157295f4e6ec (patch) | |
tree | 100087c8db8e89f4b5de2bbdb976fc576ae5c98b /kvision-modules/kvision-tabulator/src/main | |
parent | 736b9e0ab17a2ce655f534659a84a18a37daa87a (diff) | |
parent | 63767fec9660bdcbfd041ec28fb76ba95b322f2a (diff) | |
download | kvision-3b898f573950c09bc20ef26c8109157295f4e6ec.tar.gz kvision-3b898f573950c09bc20ef26c8109157295f4e6ec.tar.bz2 kvision-3b898f573950c09bc20ef26c8109157295f4e6ec.zip |
Merge pull request #38 from robert-cronin/master
Fix namespace issue
Diffstat (limited to 'kvision-modules/kvision-tabulator/src/main')
2 files changed, 10 insertions, 10 deletions
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 c00af9cb..dac29ab9 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 @@ -411,7 +411,7 @@ fun ColumnDefinition.toJs(i18nTranslator: (String) -> (String)): Tabulator.Colum /** * Tabulator options. */ -data class Options( +data class TabulatorOptions( val height: String? = null, val virtualDom: Boolean? = null, val virtualDomBuffer: Int? = null, @@ -572,7 +572,7 @@ data class Options( * An extension function to convert tabulator options class to JS object. */ @Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE", "ComplexMethod") -fun Options.toJs(i18nTranslator: (String) -> (String)): Tabulator.Options { +fun TabulatorOptions.toJs(i18nTranslator: (String) -> (String)): Tabulator.Options { return obj { if (height != null) this.height = height if (virtualDom != null) this.virtualDom = virtualDom diff --git a/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Tabulator.kt b/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Tabulator.kt index 1b8becff..249c578f 100644 --- a/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Tabulator.kt +++ b/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Tabulator.kt @@ -54,7 +54,7 @@ import pl.treksoft.kvision.tabulator.js.Tabulator as JsTabulator @Suppress("LargeClass", "TooManyFunctions") open class Tabulator<T : Any>( protected val data: List<T>? = null, - val options: Options = Options(), + val options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), protected val dataSerializer: KSerializer<T>? = null @@ -561,7 +561,7 @@ open class Tabulator<T : Any>( */ inline fun <reified T : Any> Container.tabulator( data: List<T>? = null, - options: Options = Options(), + options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), noinline init: (Tabulator<T>.() -> Unit)? = null @@ -578,7 +578,7 @@ open class Tabulator<T : Any>( inline fun <reified T : Any, S : Any, A : RAction> Container.tabulator( store: ReduxStore<S, A>, noinline dataFactory: (S) -> List<T>, - options: Options = Options(), + options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), noinline init: (Tabulator<T>.() -> Unit)? = null @@ -594,7 +594,7 @@ open class Tabulator<T : Any>( */ inline fun <reified T : Any, A : RAction> Container.tabulator( store: ReduxStore<List<T>, A>, - options: Options = Options(), + options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), noinline init: (Tabulator<T>.() -> Unit)? = null @@ -609,7 +609,7 @@ open class Tabulator<T : Any>( * DSL builder extension function for dynamic data (send within options parameter). */ fun <T : Any> Container.tabulator( - options: Options = Options(), + options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), init: (Tabulator<T>.() -> Unit)? = null @@ -625,7 +625,7 @@ open class Tabulator<T : Any>( */ @UseExperimental(ImplicitReflectionSerializer::class) inline fun <reified T : Any> create( - data: List<T>? = null, options: Options = Options(), + data: List<T>? = null, options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), noinline init: (Tabulator<T>.() -> Unit)? = null @@ -642,7 +642,7 @@ open class Tabulator<T : Any>( inline fun <reified T : Any, S : Any, A : RAction> create( store: ReduxStore<S, A>, noinline dataFactory: (S) -> List<T>, - options: Options = Options(), + options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), noinline init: (Tabulator<T>.() -> Unit)? = null @@ -662,7 +662,7 @@ open class Tabulator<T : Any>( @UseExperimental(ImplicitReflectionSerializer::class) inline fun <reified T : Any, A : RAction> create( store: ReduxStore<List<T>, A>, - options: Options = Options(), + options: TabulatorOptions = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), noinline init: (Tabulator<T>.() -> Unit)? = null |