aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-tabulator
diff options
context:
space:
mode:
authorRobbie Cronin <robert.cronin@uqconnect.edu.au>2019-05-01 09:13:53 +0800
committerRobbie Cronin <robert.cronin@uqconnect.edu.au>2019-05-01 09:13:53 +0800
commit0c6da96f0ce5ddbbfa58d9efed96ac62f2a22221 (patch)
tree8e62f39fcdcf16f65e2f92e5ce13352dc0f2bff8 /kvision-modules/kvision-tabulator
parent736b9e0ab17a2ce655f534659a84a18a37daa87a (diff)
downloadkvision-0c6da96f0ce5ddbbfa58d9efed96ac62f2a22221.tar.gz
kvision-0c6da96f0ce5ddbbfa58d9efed96ac62f2a22221.tar.bz2
kvision-0c6da96f0ce5ddbbfa58d9efed96ac62f2a22221.zip
Fix namespace issue
Rename 2 conflicting Options variables in Charts and Tabulator packages to ChartOptions and TabulatorOptions respectively
Diffstat (limited to 'kvision-modules/kvision-tabulator')
-rw-r--r--kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt2
-rw-r--r--kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Tabulator.kt16
-rw-r--r--kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt4
3 files changed, 11 insertions, 11 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..bb13372d 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,
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
diff --git a/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt b/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt
index f90e1f46..d6b33a78 100644
--- a/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt
+++ b/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt
@@ -22,7 +22,7 @@
package test.pl.treksoft.kvision.tabulator
import pl.treksoft.kvision.panel.Root
-import pl.treksoft.kvision.tabulator.Options
+import pl.treksoft.kvision.tabulator.TabulatorOptions
import pl.treksoft.kvision.tabulator.Tabulator
import pl.treksoft.kvision.utils.obj
import test.pl.treksoft.kvision.DomSpec
@@ -35,7 +35,7 @@ class TabulatorSpec : DomSpec {
fun render() {
run {
val root = Root("test", true)
- val tabulator = Tabulator<Any>(options = Options(data = arrayOf(obj {
+ val tabulator = Tabulator<Any>(options = TabulatorOptions(data = arrayOf(obj {
id = 1
name = "Name"
age = 40