Package-level declarations

Classes supporting the observer pattern, including the implementation of the observable list.

Types

Link copied to clipboard

An interface for mutable observable state.

Link copied to clipboard

Observable list interface.

Link copied to clipboard
class ObservableListWrapper<T>(val mutableList: MutableList<T> = mutableListOf()) : MutableList<T> , ObservableList<T> , ObservableState<List<T>>

Simple observable list implementation.

Link copied to clipboard

Observable set interface.

Link copied to clipboard
class ObservableSetWrapper<T>(val mutableSet: MutableSet<T> = mutableSetOf()) : MutableSet<T> , ObservableSet<T> , ObservableState<Set<T>>

Simple observable set implementation.

Link copied to clipboard
interface ObservableState<S>

An interface for observable state.

Link copied to clipboard
open class ObservableValue<T>(value: T) : MutableState<T>

The observable value class.

Properties

Link copied to clipboard
val <S> <Error class: unknown class><S>.mutableState: MutableState<S>

Extension property returning a MutableState for a MutableStateFlow.

Link copied to clipboard
val <S> MutableState<S>.mutableStateFlow: <Error class: unknown class><S>

Extension property returning a MutableStateFlow for a MutableState.

Link copied to clipboard
val <S> <Error class: unknown class><S>.observableState: ObservableState<S?>

Extension property returning an ObservableState for a Flow.

val <S> <Error class: unknown class><S>.observableState: ObservableState<S>

Extension property returning an ObservableState for a StateFlow.

Link copied to clipboard
val <S> ObservableState<S>.stateFlow: <Error class: unknown class><S>

Extension property returning a StateFlow for an ObservableState.

Functions

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : Component> W.bind(viewModel: <Error class: unknown class><Inputs, Events, State>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(State) -> Unit): W

An extension function which binds the widget to the given ballast view model.

fun <S, W : Component> W.bind(stateFlow: <Error class: unknown class><S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(S) -> Unit): W

An extension function which binds the widget to the given state flow.

fun <S, W : Component> W.bind(observableState: ObservableState<S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(S) -> Unit): W

An extension function which binds the widget to the observable state.

fun <Inputs : Any, Events : Any, State : Any, T, W : Component> W.bind(viewModel: <Error class: unknown class><Inputs, Events, State>, sub: (State) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the given ballast view model using the sub extractor function.

fun <S, T, W : Component> W.bind(stateFlow: <Error class: unknown class><S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the given state flow using the sub flow extractor.

fun <S, T, W : Component> W.bind(observableState: ObservableState<S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the observable state using the sub state extractor.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State, W : SimplePanel> W.bindEach(viewModel: <Error class: unknown class><Inputs, Events, List<State>>, equalizer: (State, State) -> Boolean? = null, factory: SimplePanel.(State) -> Unit): W

An extension function which binds the container to the given ballast view model of a list of items.

fun <S, W : SimplePanel> W.bindEach(stateFlow: <Error class: unknown class><List<S>>, equalizer: (S, S) -> Boolean? = null, factory: SimplePanel.(S) -> Unit): W

An extension function which binds the container to the given state flow of a list of items.

fun <S, W : SimplePanel> W.bindEach(observableState: ObservableState<List<S>>, equalizer: (S, S) -> Boolean? = null, factory: W.(S) -> Unit): W

An extension function which binds the container to the observable state with a list of items.

fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.bindEach(viewModel: <Error class: unknown class><Inputs, Events, State>, sub: (State) -> List<T>, equalizer: (T, T) -> Boolean? = null, factory: SimplePanel.(T) -> Unit): W

An extension function which binds the container to the given ballast view model using the sub extractor function to get a list of items.

fun <S, T, W : SimplePanel> W.bindEach(stateFlow: <Error class: unknown class><S>, sub: (S) -> List<T>, equalizer: (T, T) -> Boolean? = null, factory: SimplePanel.(T) -> Unit): W

An extension function which binds the container to the given state flow using the sub flow extractor to get a list of items.

fun <S, T, W : SimplePanel> W.bindEach(observableState: ObservableState<S>, sub: (S) -> List<T>, equalizer: (T, T) -> Boolean? = null, factory: SimplePanel.(T) -> Unit): W

An extension function which binds the container to the observable state with a list of items using the sub state extractor.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : Component> W.bindSync(viewModel: <Error class: unknown class><Inputs, Events, State>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(State) -> Unit): W

An extension function which binds the widget to the given ballast view model synchronously. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

fun <S, W : Component> W.bindSync(stateFlow: <Error class: unknown class><S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(S) -> Unit): W

An extension function which binds the widget to the given state flow synchronously. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

fun <S, W : Component> W.bindSync(observableState: ObservableState<S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(S) -> Unit): W

An extension function which binds the widget to the observable state synchronously. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

fun <Inputs : Any, Events : Any, State : Any, T, W : Component> W.bindSync(viewModel: <Error class: unknown class><Inputs, Events, State>, sub: (State) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the given ballast view model synchronously using the sub extractor function. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

fun <S, T, W : Component> W.bindSync(stateFlow: <Error class: unknown class><S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the given state flow synchronously using the sub flow extractor. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

fun <S, T, W : Component> W.bindSync(observableState: ObservableState<S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the observable state synchronously using the sub state extractor. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

Link copied to clipboard
fun <S, T : GenericFormComponent<S>> T.bindTo(mutableStateFlow: <Error class: unknown class><S>): T
fun <T : GenericFormComponent<<Error class: unknown class>?>> T.bindTo(mutableStateFlow: <Error class: unknown class><<Error class: unknown class>>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(mutableStateFlow: <Error class: unknown class><Double>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(mutableStateFlow: <Error class: unknown class><Double?>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(mutableStateFlow: <Error class: unknown class><Int>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(mutableStateFlow: <Error class: unknown class><Int?>): T
fun <T : GenericFormComponent<String?>> T.bindTo(mutableStateFlow: <Error class: unknown class><String>): T

Bidirectional data binding to the MutableStateFlow instance.

fun <T : GenericFormComponent<<Error class: unknown class>?>> T.bindTo(state: MutableState<<Error class: unknown class>>): T

Bidirectional data binding to the MutableState instance.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : SimplePanel> W.insert(viewModel: <Error class: unknown class><Inputs, Events, State>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(State) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given ballast view model.

fun <S, W : SimplePanel> W.insert(stateFlow: <Error class: unknown class><S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given state flow.

fun <S, W : SimplePanel> W.insert(observableState: ObservableState<S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the observable state.

fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.insert(viewModel: <Error class: unknown class><Inputs, Events, State>, sub: (State) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given ballast view model using the sub extractor function.

fun <S, T, W : SimplePanel> W.insert(stateFlow: <Error class: unknown class><S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given state flow using the sub flow extractor.

fun <S, T, W : SimplePanel> W.insert(observableState: ObservableState<S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the observable state using the sub state extractor.

Link copied to clipboard
fun <S, W : SimplePanel> W.insertNotNull(stateFlow: <Error class: unknown class><S?>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given state flow when the state value is not null.

fun <S, W : SimplePanel> W.insertNotNull(observableState: ObservableState<S?>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the observable state when the state value is not null.

fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.insertNotNull(viewModel: <Error class: unknown class><Inputs, Events, State>, sub: (State) -> T?, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given ballast view model using the sub extractor function when the sub state value is not null.

fun <S, T, W : SimplePanel> W.insertNotNull(stateFlow: <Error class: unknown class><S>, sub: (S) -> T?, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given state flow using the sub flow extractor when the state value is not null.

fun <S, T, W : SimplePanel> W.insertNotNull(observableState: ObservableState<S>, sub: (S) -> T?, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the observable state using the sub state extractor when the state value is not null.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : SimplePanel> W.insertWhen(viewModel: <Error class: unknown class><Inputs, Events, State>, condition: (State) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(State) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given ballast view model when the given condition is true.

fun <S, W : SimplePanel> W.insertWhen(stateFlow: <Error class: unknown class><S>, condition: (S) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given state flow when the given condition is true.

fun <S, W : SimplePanel> W.insertWhen(observableState: ObservableState<S>, condition: (S) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the observable state when the given condition is true.

fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.insertWhen(viewModel: <Error class: unknown class><Inputs, Events, State>, sub: (State) -> T, condition: (T) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given ballast view model using the sub extractor function when the given condition is true.

fun <S, T, W : SimplePanel> W.insertWhen(stateFlow: <Error class: unknown class><S>, sub: (S) -> T, condition: (T) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given state flow using the sub flow extractor when the given condition is true.

fun <S, T, W : SimplePanel> W.insertWhen(observableState: ObservableState<S>, sub: (S) -> T, condition: (T) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the observable state using the sub state extractor when the given condition is true.

Link copied to clipboard
fun <T> observableListOf(vararg items: T): ObservableList<T>

Creates an instance of ObservableList

Link copied to clipboard
fun <T> observableSetOf(vararg items: T): ObservableSet<T>

Creates an instance of ObservableSet

Link copied to clipboard
fun <S, T> ObservableState<S>.sub(contextWidget: Widget? = null, extractor: (S) -> T): ObservableState<T>

Returns a sub-store of the original ObservableState

Link copied to clipboard
fun <T, S> <Error class: unknown class><S>.subFlow(contextScope: <Error class: unknown class> = KVScope, sub: (S) -> T): <Error class: unknown class><T>

Extension function returning a sub state flow.