diff options
author | Robert Jaros <rjaros@finn.pl> | 2020-01-20 13:32:07 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2020-01-20 13:32:07 +0100 |
commit | 07cbe6495aa66470d56030a6d430808f927176e7 (patch) | |
tree | 6408aab717e300544d6adf0878c55d7c1564c565 /kvision-modules | |
parent | 2118dc75207d80eec33de8dc6241b962416c608e (diff) | |
download | kvision-07cbe6495aa66470d56030a6d430808f927176e7.tar.gz kvision-07cbe6495aa66470d56030a6d430808f927176e7.tar.bz2 kvision-07cbe6495aa66470d56030a6d430808f927176e7.zip |
Fix tabulator module dependencies
Diffstat (limited to 'kvision-modules')
4 files changed, 11 insertions, 16 deletions
diff --git a/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt b/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt index 7625ed7a..45f743f3 100644 --- a/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt +++ b/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt @@ -76,7 +76,7 @@ class ReduxStore<S : Any, A : RAction>( } }, initialState, applyMiddleware(createThunkMiddleware(), *middlewares)) - fun getState(): S { + override fun getState(): S { return store.getState() } diff --git a/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt b/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt index 2fd0b744..474206fc 100644 --- a/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt +++ b/kvision-modules/kvision-redux/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt @@ -84,7 +84,7 @@ class ReduxStore<S : Any, A : RAction>( ) } - fun getState(): S { + override fun getState(): S { return store.getState() } diff --git a/kvision-modules/kvision-tabulator/build.gradle b/kvision-modules/kvision-tabulator/build.gradle index 980b44a3..ef9b50c3 100644 --- a/kvision-modules/kvision-tabulator/build.gradle +++ b/kvision-modules/kvision-tabulator/build.gradle @@ -1,9 +1,5 @@ apply from: "../shared.gradle" -dependencies { - compile project(":kvision-modules:kvision-redux") -} - kotlinFrontend { npm { 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 9d9b7ae8..ac7ff533 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 @@ -28,13 +28,12 @@ import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.StringBoolPair import pl.treksoft.kvision.core.Widget import pl.treksoft.kvision.i18n.I18n -import pl.treksoft.kvision.redux.ReduxStore import pl.treksoft.kvision.state.ObservableList +import pl.treksoft.kvision.state.ObservableState import pl.treksoft.kvision.table.TableType import pl.treksoft.kvision.utils.createInstance import pl.treksoft.kvision.utils.obj import pl.treksoft.kvision.utils.syncWithList -import redux.RAction import kotlin.browser.window import pl.treksoft.kvision.tabulator.js.Tabulator as JsTabulator @@ -711,8 +710,8 @@ open class Tabulator<T : Any>( /** * A helper function to create a Tabulator object with correct serializer and general redux store. */ - fun <T : Any, S : Any, A : RAction> create( - store: ReduxStore<S, A>, + fun <T : Any, S : Any> create( + store: ObservableState<S>, dataFactory: (S) -> List<T>, options: TabulatorOptions<T> = TabulatorOptions(), types: Set<TableType> = setOf(), @@ -731,8 +730,8 @@ open class Tabulator<T : Any>( /** * A helper function to create a Tabulator object with correct serializer and dedicated redux store. */ - fun <T : Any, A : RAction> create( - store: ReduxStore<List<T>, A>, + fun <T : Any> create( + store: ObservableState<List<T>>, options: TabulatorOptions<T> = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), @@ -771,8 +770,8 @@ fun <T : Any> Container.tabulator( /** * DSL builder extension function for general redux store. */ -fun <T : Any, S : Any, A : RAction> Container.tabulator( - store: ReduxStore<S, A>, +fun <T : Any, S : Any> Container.tabulator( + store: ObservableState<S>, dataFactory: (S) -> List<T>, options: TabulatorOptions<T> = TabulatorOptions(), types: Set<TableType> = setOf(), @@ -788,8 +787,8 @@ fun <T : Any, S : Any, A : RAction> Container.tabulator( /** * DSL builder extension function for dedicated redux store (backed with a list). */ -fun <T : Any, A : RAction> Container.tabulator( - store: ReduxStore<List<T>, A>, +fun <T : Any> Container.tabulator( + store: ObservableState<List<T>>, options: TabulatorOptions<T> = TabulatorOptions(), types: Set<TableType> = setOf(), classes: Set<String> = setOf(), |