From 6ce402754e01940fc641f8814eae03599a622b1c Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 9 Feb 2020 14:23:52 +0100 Subject: API documentation for KVision 2.10.0 --- .../-form-panel/-init-.html | 4 +- .../-form-panel/add-custom.html | 32 +++++++ .../-form-panel/add-internal.html | 4 +- api/pl.treksoft.kvision.form/-form-panel/add.html | 30 ++++--- .../-form-panel/create.html | 4 +- .../-form-panel/index.html | 98 +++++++++++++++++++--- 6 files changed, 143 insertions(+), 29 deletions(-) create mode 100644 api/pl.treksoft.kvision.form/-form-panel/add-custom.html (limited to 'api/pl.treksoft.kvision.form/-form-panel') diff --git a/api/pl.treksoft.kvision.form/-form-panel/-init-.html b/api/pl.treksoft.kvision.form/-form-panel/-init-.html index 97ad93ee..3c5645e2 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/-init-.html +++ b/api/pl.treksoft.kvision.form/-form-panel/-init-.html @@ -8,8 +8,8 @@ kvision / pl.treksoft.kvision.form / FormPanel / <init>

<init>

- -FormPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), serializer: KSerializer<K>) + +FormPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), serializer: KSerializer<K>, customSerializers: Map<KClass<*>, KSerializer<*>>? = null)

Parameters

K - model class type

diff --git a/api/pl.treksoft.kvision.form/-form-panel/add-custom.html b/api/pl.treksoft.kvision.form/-form-panel/add-custom.html new file mode 100644 index 00000000..d488e3da --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form-panel/add-custom.html @@ -0,0 +1,32 @@ + + + +FormPanel.addCustom - kvision + + + +kvision / pl.treksoft.kvision.form / FormPanel / addCustom
+
+

addCustom

+ +open fun <C : StringFormControl> addCustom(key: KProperty1<K, Any?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +

Adds a string control to the form panel bound to custom field type.

+

Parameters

+

+key - key identifier of the control

+

+control - the string form control

+

+required - determines if the control is required

+

+requiredMessage - optional required validation message

+

+legend - put this control inside a fieldset with given legend

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form panel

+ + diff --git a/api/pl.treksoft.kvision.form/-form-panel/add-internal.html b/api/pl.treksoft.kvision.form/-form-panel/add-internal.html index 63e84fa2..7c25cc8a 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/add-internal.html +++ b/api/pl.treksoft.kvision.form/-form-panel/add-internal.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form / FormPanel / addInternal

addInternal

- -protected fun <C : FormControl> addInternal(key: KProperty1<K, *>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> + +protected fun <C : FormControl> addInternal(key: KProperty1<K, *>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> diff --git a/api/pl.treksoft.kvision.form/-form-panel/add.html b/api/pl.treksoft.kvision.form/-form-panel/add.html index cac9e4ea..37123c44 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/add.html +++ b/api/pl.treksoft.kvision.form/-form-panel/add.html @@ -8,8 +8,8 @@ kvision / pl.treksoft.kvision.form / FormPanel / add

add

- -open fun <C : StringFormControl> add(key: KProperty1<K, String?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> + +open fun <C : StringFormControl> add(key: KProperty1<K, String?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a string control to the form panel.

Parameters

@@ -20,14 +20,16 @@ required - determines if the control is required

requiredMessage - optional required validation message

+

+legend - put this control inside a fieldset with given legend

validatorMessage - optional function returning validation message

validator - optional validation function

Return
current form panel

- -open fun <C : BoolFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> + +open fun <C : BoolFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a boolean control to the form panel.

Parameters

@@ -38,14 +40,16 @@ current form panel

required - determines if the control is required

requiredMessage - optional required validation message

+

+legend - put this control inside a fieldset with given legend

validatorMessage - optional function returning validation message

validator - optional validation function

Return
current form panel

- -open fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> + +open fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a number control to the form panel.

Parameters

@@ -56,14 +60,16 @@ current form panel

required - determines if the control is required

requiredMessage - optional required validation message

+

+legend - put this control inside a fieldset with given legend

validatorMessage - optional function returning validation message

validator - optional validation function

Return
current form panel

- -open fun <C : DateFormControl> add(key: KProperty1<K, Date?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> + +open fun <C : DateFormControl> add(key: KProperty1<K, Date?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a date control to the form panel.

Parameters

@@ -74,14 +80,16 @@ current form panel

required - determines if the control is required

requiredMessage - optional required validation message

+

+legend - put this control inside a fieldset with given legend

validatorMessage - optional function returning validation message

validator - optional validation function

Return
current form panel

- -open fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> + +open fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a files control to the form panel.

Parameters

@@ -92,6 +100,8 @@ current form panel

required - determines if the control is required

requiredMessage - optional required validation message

+

+legend - put this control inside a fieldset with given legend

validatorMessage - optional function returning validation message

diff --git a/api/pl.treksoft.kvision.form/-form-panel/create.html b/api/pl.treksoft.kvision.form/-form-panel/create.html index f1fba628..00589da1 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/create.html +++ b/api/pl.treksoft.kvision.form/-form-panel/create.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form / FormPanel / create

create

- -inline fun <reified K : Any> create(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), noinline init: (FormPanel<K>.() -> Unit)? = null): FormPanel<K> + +inline fun <reified K : Any> create(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), customSerializers: Map<KClass<*>, KSerializer<*>>? = null, noinline init: (FormPanel<K>.() -> Unit)? = null): FormPanel<K> diff --git a/api/pl.treksoft.kvision.form/-form-panel/index.html b/api/pl.treksoft.kvision.form/-form-panel/index.html index 197ff1ba..6a643433 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/index.html +++ b/api/pl.treksoft.kvision.form/-form-panel/index.html @@ -18,7 +18,7 @@

<init>

-FormPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), serializer: KSerializer<K>) +FormPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), serializer: KSerializer<K>, customSerializers: Map<KClass<*>, KSerializer<*>>? = null) @@ -146,24 +146,33 @@

add

-open fun <C : StringFormControl> add(key: KProperty1<K, String?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +open fun <C : StringFormControl> add(key: KProperty1<K, String?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a string control to the form panel.

-open fun <C : BoolFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +open fun <C : BoolFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a boolean control to the form panel.

-open fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +open fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a number control to the form panel.

-open fun <C : DateFormControl> add(key: KProperty1<K, Date?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +open fun <C : DateFormControl> add(key: KProperty1<K, Date?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a date control to the form panel.

-open fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +open fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K>

Adds a files control to the form panel.

+

addCustom

+ + +open fun <C : StringFormControl> addCustom(key: KProperty1<K, Any?>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +

Adds a string control to the form panel bound to custom field type.

+ + + +

addInternal

-fun <C : FormControl> addInternal(key: KProperty1<K, *>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> +fun <C : FormControl> addInternal(key: KProperty1<K, *>, control: C, required: Boolean = false, requiredMessage: String? = null, legend: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): FormPanel<K> @@ -342,7 +351,7 @@

create

-fun <K : Any> create(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), init: (FormPanel<K>.() -> Unit)? = null): FormPanel<K> +fun <K : Any> create(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), customSerializers: Map<KClass<*>, KSerializer<*>>? = null, init: (FormPanel<K>.() -> Unit)? = null): FormPanel<K> @@ -532,6 +541,15 @@ +

fieldsetPanel

+ + +fun Container.fieldsetPanel(legend: String? = null, classes: Set<String> = setOf(), init: (FieldsetPanel.() -> Unit)? = null): FieldsetPanel +

DSL builder extension function.

+ + + +

flexPanel

@@ -553,7 +571,7 @@

formPanel

-fun <K : Any> Container.formPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), init: (FormPanel<K>.() -> Unit)? = null): FormPanel<K> +fun <K : Any> Container.formPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, condensed: Boolean = false, horizRatio: FormHorizontalRatio = FormHorizontalRatio.RATIO_2, classes: Set<String> = setOf(), customSerializers: Map<KClass<*>, KSerializer<*>>? = null, init: (FormPanel<K>.() -> Unit)? = null): FormPanel<K>

DSL builder extension function.

@@ -791,6 +809,24 @@ +

range

+ + +fun Container.range(value: Number? = null, name: String? = null, min: Number = 0, max: Number = 100, step: Number = DEFAULT_STEP, label: String? = null, rich: Boolean = false, init: (Range.() -> Unit)? = null): Range +

DSL builder extension function.

+ + + + +

rangeInput

+ + +fun Container.rangeInput(value: Number? = null, min: Number = 0, max: Number = 100, step: Number = DEFAULT_STEP, classes: Set<String> = setOf(), init: (RangeInput.() -> Unit)? = null): RangeInput +

DSL builder extension function.

+ + + +

removeBsBgColor

@@ -883,7 +919,7 @@

selectRemote

-fun <T : Any> Container.selectRemote(value: String? = null, serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?, String?) -> List<<ERROR CLASS>>, stateFunction: (() -> String)? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, preload: Boolean = false, label: String? = null, rich: Boolean = false, init: (SelectRemote<T>.() -> Unit)? = null): SelectRemote<T> +fun <T : Any> Container.selectRemote(serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?, String?) -> List<<ERROR CLASS>>, stateFunction: (() -> String)? = null, value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, preload: Boolean = false, label: String? = null, rich: Boolean = false, init: (SelectRemote<T>.() -> Unit)? = null): SelectRemote<T>

DSL builder extension function.

@@ -892,7 +928,7 @@

selectRemoteInput

-fun <T : Any> Container.selectRemoteInput(value: String? = null, serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?, String?) -> List<<ERROR CLASS>>, stateFunction: (() -> String)? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, preload: Boolean = false, classes: Set<String> = setOf(), init: (SelectRemoteInput<T>.() -> Unit)? = null): SelectRemoteInput<T> +fun <T : Any> Container.selectRemoteInput(serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?, String?) -> List<<ERROR CLASS>>, stateFunction: (() -> String)? = null, value: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, preload: Boolean = false, classes: Set<String> = setOf(), init: (SelectRemoteInput<T>.() -> Unit)? = null): SelectRemoteInput<T>

DSL builder extension function.

@@ -946,7 +982,7 @@

spinner

-fun Container.spinner(value: Number? = null, name: String? = null, min: Int? = null, max: Int? = null, step: Double = DEFAULT_STEP, decimals: Int = 0, buttonsType: ButtonsType = ButtonsType.VERTICAL, forceType: ForceType = ForceType.NONE, buttonStyle: ButtonStyle? = null, label: String? = null, rich: Boolean = false, init: (Spinner.() -> Unit)? = null): Spinner +fun Container.spinner(value: Number? = null, name: String? = null, min: Number? = null, max: Number? = null, step: Number = DEFAULT_STEP, decimals: Int = 0, buttonsType: ButtonsType = ButtonsType.VERTICAL, forceType: ForceType = ForceType.NONE, buttonStyle: ButtonStyle? = null, label: String? = null, rich: Boolean = false, init: (Spinner.() -> Unit)? = null): Spinner

DSL builder extension function.

@@ -955,7 +991,7 @@

spinnerInput

-fun Container.spinnerInput(value: Number? = null, min: Int? = null, max: Int? = null, step: Double = DEFAULT_STEP, decimals: Int = 0, buttonsType: ButtonsType = ButtonsType.VERTICAL, forceType: ForceType = ForceType.NONE, buttonStyle: ButtonStyle? = null, classes: Set<String> = setOf(), init: (SpinnerInput.() -> Unit)? = null): SpinnerInput +fun Container.spinnerInput(value: Number? = null, min: Number? = null, max: Number? = null, step: Number = DEFAULT_STEP, decimals: Int = 0, buttonsType: ButtonsType = ButtonsType.VERTICAL, forceType: ForceType = ForceType.NONE, buttonStyle: ButtonStyle? = null, classes: Set<String> = setOf(), init: (SpinnerInput.() -> Unit)? = null): SpinnerInput

DSL builder extension function.

@@ -1100,6 +1136,42 @@ +

typeahead

+ + +fun Container.typeahead(options: List<String>? = null, taAjaxOptions: TaAjaxOptions? = null, items: Int? = 8, minLength: Int = 1, delay: Int = 0, type: TextInputType = TextInputType.TEXT, value: String? = null, name: String? = null, label: String? = null, rich: Boolean = false, init: (Typeahead.() -> Unit)? = null): Typeahead +

DSL builder extension function.

+ + + + +

typeaheadInput

+ + +fun Container.typeaheadInput(options: List<String>? = null, taAjaxOptions: TaAjaxOptions? = null, items: Int? = 8, minLength: Int = 1, delay: Int = 0, type: TextInputType = TextInputType.TEXT, value: String? = null, classes: Set<String> = setOf(), init: (TypeaheadInput.() -> Unit)? = null): TypeaheadInput +

DSL builder extension function.

+ + + + +

typeaheadRemote

+ + +fun <T : Any> Container.typeaheadRemote(serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?) -> List<String>, stateFunction: (() -> String)? = null, items: Int? = 8, minLength: Int = 1, delay: Int = 0, type: TextInputType = TextInputType.TEXT, value: String? = null, name: String? = null, label: String? = null, rich: Boolean = false, init: (TypeaheadRemote<T>.() -> Unit)? = null): TypeaheadRemote<T> +

DSL builder extension function.

+ + + + +

typeaheadRemoteInput

+ + +fun <T : Any> Container.typeaheadRemoteInput(serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?) -> List<String>, stateFunction: (() -> String)? = null, items: Int? = 8, minLength: Int = 1, delay: Int = 0, type: TextInputType = TextInputType.TEXT, value: String? = null, classes: Set<String> = setOf(), init: (TypeaheadRemoteInput<T>.() -> Unit)? = null): TypeaheadRemoteInput<T> +

DSL builder extension function.

+ + + +

upload

-- cgit