From eb930482e9972a21d39f2aea8b813acf58ff5b64 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 22 Oct 2018 00:01:39 +0200 Subject: API documentation for KVision 0.0.19 --- api/pl.treksoft.kvision.form/-form/-init-.html | 24 ++++ api/pl.treksoft.kvision.form/-form/add.html | 102 +++++++++++++++ api/pl.treksoft.kvision.form/-form/clear-data.html | 15 +++ api/pl.treksoft.kvision.form/-form/create.html | 14 ++ .../-form/get-control.html | 20 +++ .../-form/get-data-json.html | 17 +++ api/pl.treksoft.kvision.form/-form/get-data.html | 17 +++ api/pl.treksoft.kvision.form/-form/get.html | 20 +++ api/pl.treksoft.kvision.form/-form/index.html | 143 +++++++++++++++++++++ api/pl.treksoft.kvision.form/-form/remove-all.html | 17 +++ api/pl.treksoft.kvision.form/-form/remove.html | 20 +++ api/pl.treksoft.kvision.form/-form/set-data.html | 18 +++ api/pl.treksoft.kvision.form/-form/validate.html | 17 +++ 13 files changed, 444 insertions(+) create mode 100644 api/pl.treksoft.kvision.form/-form/-init-.html create mode 100644 api/pl.treksoft.kvision.form/-form/add.html create mode 100644 api/pl.treksoft.kvision.form/-form/clear-data.html create mode 100644 api/pl.treksoft.kvision.form/-form/create.html create mode 100644 api/pl.treksoft.kvision.form/-form/get-control.html create mode 100644 api/pl.treksoft.kvision.form/-form/get-data-json.html create mode 100644 api/pl.treksoft.kvision.form/-form/get-data.html create mode 100644 api/pl.treksoft.kvision.form/-form/get.html create mode 100644 api/pl.treksoft.kvision.form/-form/index.html create mode 100644 api/pl.treksoft.kvision.form/-form/remove-all.html create mode 100644 api/pl.treksoft.kvision.form/-form/remove.html create mode 100644 api/pl.treksoft.kvision.form/-form/set-data.html create mode 100644 api/pl.treksoft.kvision.form/-form/validate.html (limited to 'api/pl.treksoft.kvision.form/-form') diff --git a/api/pl.treksoft.kvision.form/-form/-init-.html b/api/pl.treksoft.kvision.form/-form/-init-.html new file mode 100644 index 00000000..d2e40cfd --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/-init-.html @@ -0,0 +1,24 @@ + + + +Form.<init> - kvision + + + +kvision / pl.treksoft.kvision.form / Form / <init>
+
+

<init>

+ +Form(panel: FormPanel<K>? = null, serializer: KSerializer<K>) +

Creates a form with a given modelFactory function

+

Parameters

+

+K - model class type

+

+panel - optional instance of FormPanel

+

+serializer - a serializer for model type

+

Constructor
+Creates a form with a given modelFactory function

+ + diff --git a/api/pl.treksoft.kvision.form/-form/add.html b/api/pl.treksoft.kvision.form/-form/add.html new file mode 100644 index 00000000..d1322272 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/add.html @@ -0,0 +1,102 @@ + + + +Form.add - kvision + + + +kvision / pl.treksoft.kvision.form / Form / add
+
+

add

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

Adds a string control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the string form control

+

+required - determines if the control is required

+

+requiredMessage - optional required validation message

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form

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

Adds a boolean control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the boolean form control

+

+required - determines if the control is required

+

+requiredMessage - optional required validation message

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form

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

Adds a number control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the number form control

+

+required - determines if the control is required

+

+requiredMessage - optional required validation message

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form

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

Adds a date control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the date form control

+

+required - determines if the control is required

+

+requiredMessage - optional required validation message

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form

+ +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): Form<K> +

Adds a files control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the files form control

+

+required - determines if the control is required

+

+requiredMessage - optional required validation message

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form

+ + diff --git a/api/pl.treksoft.kvision.form/-form/clear-data.html b/api/pl.treksoft.kvision.form/-form/clear-data.html new file mode 100644 index 00000000..cc02df05 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/clear-data.html @@ -0,0 +1,15 @@ + + + +Form.clearData - kvision + + + +kvision / pl.treksoft.kvision.form / Form / clearData
+
+

clearData

+ +fun clearData(): Unit +

Sets the values of all controls to null.

+ + diff --git a/api/pl.treksoft.kvision.form/-form/create.html b/api/pl.treksoft.kvision.form/-form/create.html new file mode 100644 index 00000000..6db5df89 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/create.html @@ -0,0 +1,14 @@ + + + +Form.create - kvision + + + +kvision / pl.treksoft.kvision.form / Form / create
+
+

create

+ +inline fun <reified K : Any> create(panel: FormPanel<K>? = null, noinline init: Form<K>.() -> Unit = null): Form<K> + + diff --git a/api/pl.treksoft.kvision.form/-form/get-control.html b/api/pl.treksoft.kvision.form/-form/get-control.html new file mode 100644 index 00000000..83ad285f --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/get-control.html @@ -0,0 +1,20 @@ + + + +Form.getControl - kvision + + + +kvision / pl.treksoft.kvision.form / Form / getControl
+
+

getControl

+ +fun getControl(key: KProperty1<K, *>): FormControl? +

Returns a control of given key.

+

Parameters

+

+key - key identifier of the control

+

Return
+selected control

+ + diff --git a/api/pl.treksoft.kvision.form/-form/get-data-json.html b/api/pl.treksoft.kvision.form/-form/get-data-json.html new file mode 100644 index 00000000..4c327ae8 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/get-data-json.html @@ -0,0 +1,17 @@ + + + +Form.getDataJson - kvision + + + +kvision / pl.treksoft.kvision.form / Form / getDataJson
+
+

getDataJson

+ +fun getDataJson(): Json +

Returns current data model as JSON.

+

Return
+data model as JSON

+ + diff --git a/api/pl.treksoft.kvision.form/-form/get-data.html b/api/pl.treksoft.kvision.form/-form/get-data.html new file mode 100644 index 00000000..bc3e0f12 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/get-data.html @@ -0,0 +1,17 @@ + + + +Form.getData - kvision + + + +kvision / pl.treksoft.kvision.form / Form / getData
+
+

getData

+ +fun getData(): K +

Returns current data model.

+

Return
+data model

+ + diff --git a/api/pl.treksoft.kvision.form/-form/get.html b/api/pl.treksoft.kvision.form/-form/get.html new file mode 100644 index 00000000..e03bdc45 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/get.html @@ -0,0 +1,20 @@ + + + +Form.get - kvision + + + +kvision / pl.treksoft.kvision.form / Form / get
+
+

get

+ +operator fun get(key: KProperty1<K, *>): Any? +

Returns a value of the control of given key.

+

Parameters

+

+key - key identifier of the control

+

Return
+value of the control

+ + diff --git a/api/pl.treksoft.kvision.form/-form/index.html b/api/pl.treksoft.kvision.form/-form/index.html new file mode 100644 index 00000000..693f2c30 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/index.html @@ -0,0 +1,143 @@ + + + +Form - kvision + + + +kvision / pl.treksoft.kvision.form / Form
+
+

Form

+class Form<K : Any> +

The form definition class. Can be used directly or indirectly inside a FormPanel.

+

Constructors

+ + + + + + + +
+

<init>

+
+Form(panel: FormPanel<K>? = null, serializer: KSerializer<K>) +

Creates a form with a given modelFactory function

+
+

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

add

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

Adds a string control to the form.

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

Adds a boolean control to the form.

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

Adds a number control to the form.

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

Adds a date control to the form.

+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): Form<K> +

Adds a files control to the form.

+
+

clearData

+
+fun clearData(): Unit +

Sets the values of all controls to null.

+
+

get

+
+operator fun get(key: KProperty1<K, *>): Any? +

Returns a value of the control of given key.

+
+

getControl

+
+fun getControl(key: KProperty1<K, *>): FormControl? +

Returns a control of given key.

+
+

getData

+
+fun getData(): K +

Returns current data model.

+
+

getDataJson

+
+fun getDataJson(): Json +

Returns current data model as JSON.

+
+

remove

+
+fun remove(key: KProperty1<K, *>): Form<K> +

Removes a control from the form.

+
+

removeAll

+
+fun removeAll(): Form<K> +

Removes all controls from the form.

+
+

setData

+
+fun setData(model: K): Unit +

Sets the values of all the controls from the model.

+
+

validate

+
+fun validate(): Boolean +

Invokes validator function and validates the form.

+
+

Companion Object Functions

+ + + + + + + +
+

create

+
+fun <K : Any> create(panel: FormPanel<K>? = null, init: Form<K>.() -> Unit = null): Form<K>
+ + diff --git a/api/pl.treksoft.kvision.form/-form/remove-all.html b/api/pl.treksoft.kvision.form/-form/remove-all.html new file mode 100644 index 00000000..1b454ea5 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/remove-all.html @@ -0,0 +1,17 @@ + + + +Form.removeAll - kvision + + + +kvision / pl.treksoft.kvision.form / Form / removeAll
+
+

removeAll

+ +fun removeAll(): Form<K> +

Removes all controls from the form.

+

Return
+current form

+ + diff --git a/api/pl.treksoft.kvision.form/-form/remove.html b/api/pl.treksoft.kvision.form/-form/remove.html new file mode 100644 index 00000000..8fa37f2c --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/remove.html @@ -0,0 +1,20 @@ + + + +Form.remove - kvision + + + +kvision / pl.treksoft.kvision.form / Form / remove
+
+

remove

+ +fun remove(key: KProperty1<K, *>): Form<K> +

Removes a control from the form.

+

Parameters

+

+key - key identifier of the control

+

Return
+current form

+ + diff --git a/api/pl.treksoft.kvision.form/-form/set-data.html b/api/pl.treksoft.kvision.form/-form/set-data.html new file mode 100644 index 00000000..c4c01463 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/set-data.html @@ -0,0 +1,18 @@ + + + +Form.setData - kvision + + + +kvision / pl.treksoft.kvision.form / Form / setData
+
+

setData

+ +fun setData(model: K): Unit +

Sets the values of all the controls from the model.

+

Parameters

+

+model - data model

+ + diff --git a/api/pl.treksoft.kvision.form/-form/validate.html b/api/pl.treksoft.kvision.form/-form/validate.html new file mode 100644 index 00000000..7bfbbd87 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/validate.html @@ -0,0 +1,17 @@ + + + +Form.validate - kvision + + + +kvision / pl.treksoft.kvision.form / Form / validate
+
+

validate

+ +fun validate(): Boolean +

Invokes validator function and validates the form.

+

Return
+validation result

+ + -- cgit