From 12d2bd198c9ff5cb197e50da2d024a2418b8ee36 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 2 Jun 2018 00:47:15 +0200 Subject: Upgrade to 0.0.13 --- .../-date-form-control/get-value-as-string.html | 16 -- .../-date-form-control/get-value.html | 18 --- .../-date-form-control/index.html | 165 --------------------- .../-date-form-control/set-value.html | 19 --- .../-date-form-control/value.html | 15 -- .../-field-label/-init-.html | 2 +- .../-files-form-control/get-value-as-string.html | 16 -- .../-files-form-control/get-value.html | 18 --- .../-files-form-control/index.html | 165 --------------------- .../-files-form-control/set-value.html | 19 --- .../-files-form-control/value.html | 15 -- .../-form-control/index.html | 8 +- .../-form-panel/-init-.html | 8 +- api/pl.treksoft.kvision.form/-form-panel/add.html | 8 +- .../-form-panel/create.html | 14 ++ .../-form-panel/form-panel.html | 4 +- .../-form-panel/get-content.html | 22 +++ .../-form-panel/index.html | 26 +++- api/pl.treksoft.kvision.form/-form/-init-.html | 8 +- api/pl.treksoft.kvision.form/-form/add.html | 8 +- api/pl.treksoft.kvision.form/-form/create.html | 14 ++ .../-form/get-content.html | 22 +++ api/pl.treksoft.kvision.form/-form/index.html | 29 +++- .../-help-block/-init-.html | 2 +- .../-k-date-form-control/get-value-as-string.html | 16 ++ .../-k-date-form-control/get-value.html | 18 +++ .../-k-date-form-control/index.html | 165 +++++++++++++++++++++ .../-k-date-form-control/set-value.html | 19 +++ .../-k-date-form-control/value.html | 15 ++ .../-k-files-form-control/get-value-as-string.html | 16 ++ .../-k-files-form-control/get-value.html | 18 +++ .../-k-files-form-control/index.html | 165 +++++++++++++++++++++ .../-k-files-form-control/set-value.html | 19 +++ .../-k-files-form-control/value.html | 15 ++ api/pl.treksoft.kvision.form/index.html | 40 ++--- .../kotlin.collections.-map/bool.html | 15 -- .../kotlin.collections.-map/date.html | 15 -- .../kotlin.collections.-map/index.html | 36 ----- .../kotlin.collections.-map/number.html | 15 -- .../kotlin.collections.-map/string.html | 15 -- 40 files changed, 628 insertions(+), 615 deletions(-) delete mode 100644 api/pl.treksoft.kvision.form/-date-form-control/get-value-as-string.html delete mode 100644 api/pl.treksoft.kvision.form/-date-form-control/get-value.html delete mode 100644 api/pl.treksoft.kvision.form/-date-form-control/index.html delete mode 100644 api/pl.treksoft.kvision.form/-date-form-control/set-value.html delete mode 100644 api/pl.treksoft.kvision.form/-date-form-control/value.html delete mode 100644 api/pl.treksoft.kvision.form/-files-form-control/get-value-as-string.html delete mode 100644 api/pl.treksoft.kvision.form/-files-form-control/get-value.html delete mode 100644 api/pl.treksoft.kvision.form/-files-form-control/index.html delete mode 100644 api/pl.treksoft.kvision.form/-files-form-control/set-value.html delete mode 100644 api/pl.treksoft.kvision.form/-files-form-control/value.html create mode 100644 api/pl.treksoft.kvision.form/-form-panel/create.html create mode 100644 api/pl.treksoft.kvision.form/-form-panel/get-content.html create mode 100644 api/pl.treksoft.kvision.form/-form/create.html create mode 100644 api/pl.treksoft.kvision.form/-form/get-content.html create mode 100644 api/pl.treksoft.kvision.form/-k-date-form-control/get-value-as-string.html create mode 100644 api/pl.treksoft.kvision.form/-k-date-form-control/get-value.html create mode 100644 api/pl.treksoft.kvision.form/-k-date-form-control/index.html create mode 100644 api/pl.treksoft.kvision.form/-k-date-form-control/set-value.html create mode 100644 api/pl.treksoft.kvision.form/-k-date-form-control/value.html create mode 100644 api/pl.treksoft.kvision.form/-k-files-form-control/get-value-as-string.html create mode 100644 api/pl.treksoft.kvision.form/-k-files-form-control/get-value.html create mode 100644 api/pl.treksoft.kvision.form/-k-files-form-control/index.html create mode 100644 api/pl.treksoft.kvision.form/-k-files-form-control/set-value.html create mode 100644 api/pl.treksoft.kvision.form/-k-files-form-control/value.html delete mode 100644 api/pl.treksoft.kvision.form/kotlin.collections.-map/bool.html delete mode 100644 api/pl.treksoft.kvision.form/kotlin.collections.-map/date.html delete mode 100644 api/pl.treksoft.kvision.form/kotlin.collections.-map/number.html delete mode 100644 api/pl.treksoft.kvision.form/kotlin.collections.-map/string.html (limited to 'api/pl.treksoft.kvision.form') diff --git a/api/pl.treksoft.kvision.form/-date-form-control/get-value-as-string.html b/api/pl.treksoft.kvision.form/-date-form-control/get-value-as-string.html deleted file mode 100644 index 8ec76a28..00000000 --- a/api/pl.treksoft.kvision.form/-date-form-control/get-value-as-string.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -DateFormControl.getValueAsString - kvision - - - -kvision / pl.treksoft.kvision.form / DateFormControl / getValueAsString
-
-

getValueAsString

- -open fun getValueAsString(): String? -

Overrides FormControl.getValueAsString

-

Returns the value of the control as a String.

- - diff --git a/api/pl.treksoft.kvision.form/-date-form-control/get-value.html b/api/pl.treksoft.kvision.form/-date-form-control/get-value.html deleted file mode 100644 index 9f2ce3e6..00000000 --- a/api/pl.treksoft.kvision.form/-date-form-control/get-value.html +++ /dev/null @@ -1,18 +0,0 @@ - - - -DateFormControl.getValue - kvision - - - -kvision / pl.treksoft.kvision.form / DateFormControl / getValue
-
-

getValue

- -open fun getValue(): Date? -

Overrides FormControl.getValue

-

Returns the value of the control.

-

Return
-the value

- - diff --git a/api/pl.treksoft.kvision.form/-date-form-control/index.html b/api/pl.treksoft.kvision.form/-date-form-control/index.html deleted file mode 100644 index 50ea07c0..00000000 --- a/api/pl.treksoft.kvision.form/-date-form-control/index.html +++ /dev/null @@ -1,165 +0,0 @@ - - - -DateFormControl - kvision - - - -kvision / pl.treksoft.kvision.form / DateFormControl
-
-

DateFormControl

-interface DateFormControl : FormControl -

Base interface of a form control with a date value.

-

Properties

- - - - - - - -
-

value

-
-abstract var value: Date? -

Date value.

-
-

Inherited Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

disabled

-
-open var disabled: Boolean -

Determines if the field is disabled.

-
-

flabel

-
-abstract val flabel: FieldLabel -

Form field label.

-
-

input

-
-abstract val input: FormInput -

The actual input component.

-
-

name

-
-open var name: String? -

The name attribute of the generated HTML input element.

-
-

size

-
-open var size: InputSize? -

Input control field size.

-
-

validationInfo

-
-abstract val validationInfo: HelpBlock -

Validation info component.

-
-

validatorError

-
-open var validatorError: String? -

Validator error message.

-
-

Functions

- - - - - - - - - - - - - - - -
-

getValue

-
-open fun getValue(): Date? -

Returns the value of the control.

-
-

getValueAsString

-
-open fun getValueAsString(): String? -

Returns the value of the control as a String.

-
-

setValue

-
-open fun setValue(v: Any?): Unit -

Sets the value of the control.

-
-

Inherited Functions

- - - - - - - - - - - -
-

blur

-
-abstract fun blur(): Unit -

Makes the input element blur.

-
-

focus

-
-abstract fun focus(): Unit -

Makes the input element focused.

-
-

Inheritors

- - - - - - - -
-

DateTime

-
-open class DateTime : SimplePanel, DateFormControl -

Form field date/time chooser component.

-
- - diff --git a/api/pl.treksoft.kvision.form/-date-form-control/set-value.html b/api/pl.treksoft.kvision.form/-date-form-control/set-value.html deleted file mode 100644 index 7dd2477e..00000000 --- a/api/pl.treksoft.kvision.form/-date-form-control/set-value.html +++ /dev/null @@ -1,19 +0,0 @@ - - - -DateFormControl.setValue - kvision - - - -kvision / pl.treksoft.kvision.form / DateFormControl / setValue
-
-

setValue

- -open fun setValue(v: Any?): Unit -

Overrides FormControl.setValue

-

Sets the value of the control.

-

Parameters

-

-v - the value

- - diff --git a/api/pl.treksoft.kvision.form/-date-form-control/value.html b/api/pl.treksoft.kvision.form/-date-form-control/value.html deleted file mode 100644 index 0d6d2079..00000000 --- a/api/pl.treksoft.kvision.form/-date-form-control/value.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -DateFormControl.value - kvision - - - -kvision / pl.treksoft.kvision.form / DateFormControl / value
-
-

value

- -abstract var value: Date? -

Date value.

- - diff --git a/api/pl.treksoft.kvision.form/-field-label/-init-.html b/api/pl.treksoft.kvision.form/-field-label/-init-.html index 3aa53a78..29c65e10 100644 --- a/api/pl.treksoft.kvision.form/-field-label/-init-.html +++ b/api/pl.treksoft.kvision.form/-field-label/-init-.html @@ -16,7 +16,7 @@

content - the text of the label

-rich - determines if content can contain HTML code

+rich - determines if content can contain HTML code

classes - a set of CSS class names

Constructor
diff --git a/api/pl.treksoft.kvision.form/-files-form-control/get-value-as-string.html b/api/pl.treksoft.kvision.form/-files-form-control/get-value-as-string.html deleted file mode 100644 index 42ba9c0f..00000000 --- a/api/pl.treksoft.kvision.form/-files-form-control/get-value-as-string.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -FilesFormControl.getValueAsString - kvision - - - -kvision / pl.treksoft.kvision.form / FilesFormControl / getValueAsString
-
-

getValueAsString

- -open fun getValueAsString(): String? -

Overrides FormControl.getValueAsString

-

Returns the value of the control as a String.

- - diff --git a/api/pl.treksoft.kvision.form/-files-form-control/get-value.html b/api/pl.treksoft.kvision.form/-files-form-control/get-value.html deleted file mode 100644 index c84da632..00000000 --- a/api/pl.treksoft.kvision.form/-files-form-control/get-value.html +++ /dev/null @@ -1,18 +0,0 @@ - - - -FilesFormControl.getValue - kvision - - - -kvision / pl.treksoft.kvision.form / FilesFormControl / getValue
-
-

getValue

- -open fun getValue(): List<File>? -

Overrides FormControl.getValue

-

Returns the value of the control.

-

Return
-the value

- - diff --git a/api/pl.treksoft.kvision.form/-files-form-control/index.html b/api/pl.treksoft.kvision.form/-files-form-control/index.html deleted file mode 100644 index b364e491..00000000 --- a/api/pl.treksoft.kvision.form/-files-form-control/index.html +++ /dev/null @@ -1,165 +0,0 @@ - - - -FilesFormControl - kvision - - - -kvision / pl.treksoft.kvision.form / FilesFormControl
-
-

FilesFormControl

-interface FilesFormControl : FormControl -

Base interface of a form control with a list of files value.

-

Properties

- - - - - - - -
-

value

-
-abstract var value: List<File>? -

List of files value.

-
-

Inherited Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

disabled

-
-open var disabled: Boolean -

Determines if the field is disabled.

-
-

flabel

-
-abstract val flabel: FieldLabel -

Form field label.

-
-

input

-
-abstract val input: FormInput -

The actual input component.

-
-

name

-
-open var name: String? -

The name attribute of the generated HTML input element.

-
-

size

-
-open var size: InputSize? -

Input control field size.

-
-

validationInfo

-
-abstract val validationInfo: HelpBlock -

Validation info component.

-
-

validatorError

-
-open var validatorError: String? -

Validator error message.

-
-

Functions

- - - - - - - - - - - - - - - -
-

getValue

-
-open fun getValue(): List<File>? -

Returns the value of the control.

-
-

getValueAsString

-
-open fun getValueAsString(): String? -

Returns the value of the control as a String.

-
-

setValue

-
-open fun setValue(v: Any?): Unit -

Sets the value of the control.

-
-

Inherited Functions

- - - - - - - - - - - -
-

blur

-
-abstract fun blur(): Unit -

Makes the input element blur.

-
-

focus

-
-abstract fun focus(): Unit -

Makes the input element focused.

-
-

Inheritors

- - - - - - - -
-

Upload

-
-open class Upload : SimplePanel, FilesFormControl -

The form field file upload component.

-
- - diff --git a/api/pl.treksoft.kvision.form/-files-form-control/set-value.html b/api/pl.treksoft.kvision.form/-files-form-control/set-value.html deleted file mode 100644 index ceefa66c..00000000 --- a/api/pl.treksoft.kvision.form/-files-form-control/set-value.html +++ /dev/null @@ -1,19 +0,0 @@ - - - -FilesFormControl.setValue - kvision - - - -kvision / pl.treksoft.kvision.form / FilesFormControl / setValue
-
-

setValue

- -open fun setValue(v: Any?): Unit -

Overrides FormControl.setValue

-

Sets the value of the control.

-

Parameters

-

-v - the value

- - diff --git a/api/pl.treksoft.kvision.form/-files-form-control/value.html b/api/pl.treksoft.kvision.form/-files-form-control/value.html deleted file mode 100644 index 51770986..00000000 --- a/api/pl.treksoft.kvision.form/-files-form-control/value.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -FilesFormControl.value - kvision - - - -kvision / pl.treksoft.kvision.form / FilesFormControl / value
-
-

value

- -abstract var value: List<File>? -

List of files value.

- - diff --git a/api/pl.treksoft.kvision.form/-form-control/index.html b/api/pl.treksoft.kvision.form/-form-control/index.html index 8fe99e19..2881e185 100644 --- a/api/pl.treksoft.kvision.form/-form-control/index.html +++ b/api/pl.treksoft.kvision.form/-form-control/index.html @@ -233,19 +233,19 @@ -

DateFormControl

+

KDateFormControl

-interface DateFormControl : FormControl +interface KDateFormControl : FormControl

Base interface of a form control with a date value.

-

FilesFormControl

+

KFilesFormControl

-interface FilesFormControl : FormControl +interface KFilesFormControl : FormControl

Base interface of a form control with a list of files value.

diff --git a/api/pl.treksoft.kvision.form/-form-panel/-init-.html b/api/pl.treksoft.kvision.form/-form-panel/-init-.html index e2eb6cf7..fb819c2f 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, classes: Set<String> = setOf(), modelFactory: (Map<String, Any?>) -> K) + +FormPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), serializer: KSerializer<K>)

Parameters

K - model class type

@@ -23,8 +23,8 @@ type - form layout

classes - set of CSS class names

-

-modelFactory - function transforming a Map<String, Any?> to a data model of class K

+

+serializer - a serializer for model type

Constructor

diff --git a/api/pl.treksoft.kvision.form/-form-panel/add.html b/api/pl.treksoft.kvision.form/-form-panel/add.html index 0c9fd3ca..723ce9f7 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/add.html +++ b/api/pl.treksoft.kvision.form/-form-panel/add.html @@ -56,8 +56,8 @@ current form panel

validator - optional validation function

Return
current form panel

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

Adds a date control to the form panel.

Parameters

@@ -72,8 +72,8 @@ current form panel

validator - optional validation function

Return
current form panel

- -open fun <C : FilesFormControl> add(key: KProperty1<K, List<File>?>, control: C, required: Boolean = false, 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, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): FormPanel<K>

Adds a files control to the form panel.

Parameters

diff --git a/api/pl.treksoft.kvision.form/-form-panel/create.html b/api/pl.treksoft.kvision.form/-form-panel/create.html new file mode 100644 index 00000000..67ef73ae --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form-panel/create.html @@ -0,0 +1,14 @@ + + + +FormPanel.create - kvision + + + +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, classes: Set<String> = setOf(), noinline init: FormPanel<K>.() -> Unit = null): FormPanel<K> + + diff --git a/api/pl.treksoft.kvision.form/-form-panel/form-panel.html b/api/pl.treksoft.kvision.form/-form-panel/form-panel.html index 11590ed4..dce70047 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/form-panel.html +++ b/api/pl.treksoft.kvision.form/-form-panel/form-panel.html @@ -8,8 +8,8 @@ kvision / pl.treksoft.kvision.form / FormPanel / formPanel

formPanel

- -fun <K> Container.formPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), modelFactory: (Map<String, Any?>) -> K): FormPanel<K> + +inline fun <reified K : Any> Container.formPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), noinline init: FormPanel<K>.() -> Unit = null): FormPanel<K>

DSL builder extension function.

It takes the same parameters as the constructor of the built component.

diff --git a/api/pl.treksoft.kvision.form/-form-panel/get-content.html b/api/pl.treksoft.kvision.form/-form-panel/get-content.html new file mode 100644 index 00000000..6e97ae04 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form-panel/get-content.html @@ -0,0 +1,22 @@ + + + +FormPanel.getContent - kvision + + + +kvision / pl.treksoft.kvision.form / FormPanel / getContent
+
+

getContent

+ +suspend fun getContent(key: KProperty1<K, List<KFile>?>, kFile: KFile): KFile +

Returns an object with the content of the file.

+

Parameters

+

+key - key identifier of the control

+

+kFile - object identifying the file

+

Return
+KFile object

+ + diff --git a/api/pl.treksoft.kvision.form/-form-panel/index.html b/api/pl.treksoft.kvision.form/-form-panel/index.html index 8268f58f..fb2e65dd 100644 --- a/api/pl.treksoft.kvision.form/-form-panel/index.html +++ b/api/pl.treksoft.kvision.form/-form-panel/index.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form / FormPanel

FormPanel

-open class FormPanel<K> : SimplePanel +open class FormPanel<K : Any> : SimplePanel

Bootstrap form component.

Constructors

@@ -18,7 +18,7 @@

<init>

+FormPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), serializer: KSerializer<K>)
-FormPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), modelFactory: (Map<String, Any?>) -> K)
@@ -122,9 +122,9 @@

Adds a boolean control to the form panel.

open fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, 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, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): FormPanel<K> +open fun <C : KDateFormControl> add(key: KProperty1<K, KDate?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): FormPanel<K>

Adds a date control to the form panel.

-open fun <C : FilesFormControl> add(key: KProperty1<K, List<File>?>, control: C, required: Boolean = false, 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, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): FormPanel<K>

Adds a files control to the form panel.

@@ -155,6 +155,15 @@ +

getContent

+ + +suspend fun getContent(key: KProperty1<K, List<KFile>?>, kFile: KFile): KFile +

Returns an object with the content of the file.

+ + + +

getControl

@@ -309,10 +318,17 @@ +

create

+ + +fun <K : Any> create(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), init: FormPanel<K>.() -> Unit = null): FormPanel<K> + + +

formPanel

-fun <K> Container.formPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), modelFactory: (Map<String, Any?>) -> K): FormPanel<K> +fun <K : Any> Container.formPanel(method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null, type: FormType? = null, classes: Set<String> = setOf(), init: FormPanel<K>.() -> Unit = null): FormPanel<K>

DSL builder extension function.

diff --git a/api/pl.treksoft.kvision.form/-form/-init-.html b/api/pl.treksoft.kvision.form/-form/-init-.html index b703eeca..d2e40cfd 100644 --- a/api/pl.treksoft.kvision.form/-form/-init-.html +++ b/api/pl.treksoft.kvision.form/-form/-init-.html @@ -8,16 +8,16 @@ kvision / pl.treksoft.kvision.form / Form / <init>

<init>

- -Form(panel: FormPanel<K>? = null, modelFactory: (Map<String, Any?>) -> K) + +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

-

-modelFactory - function transforming a Map<String, Any?> to a data model of class K

+

+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 index 2980cadf..ee324f93 100644 --- a/api/pl.treksoft.kvision.form/-form/add.html +++ b/api/pl.treksoft.kvision.form/-form/add.html @@ -56,8 +56,8 @@ current form

validator - optional validation function

Return
current form

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

Adds a date control to the form.

Parameters

@@ -72,8 +72,8 @@ current form

validator - optional validation function

Return
current form

- -fun <C : FilesFormControl> add(key: KProperty1<K, List<File>?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> + +fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>

Adds a files control to the form.

Parameters

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-content.html b/api/pl.treksoft.kvision.form/-form/get-content.html new file mode 100644 index 00000000..90b6feeb --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/get-content.html @@ -0,0 +1,22 @@ + + + +Form.getContent - kvision + + + +kvision / pl.treksoft.kvision.form / Form / getContent
+
+

getContent

+ +suspend fun getContent(key: KProperty1<K, List<KFile>?>, kFile: KFile): KFile +

Returns file with the content read.

+

Parameters

+

+key - key identifier of the control

+

+kFile - object identifying the file

+

Return
+KFile object

+ + diff --git a/api/pl.treksoft.kvision.form/-form/index.html b/api/pl.treksoft.kvision.form/-form/index.html index 47af0804..f34e7aea 100644 --- a/api/pl.treksoft.kvision.form/-form/index.html +++ b/api/pl.treksoft.kvision.form/-form/index.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form / Form

Form

-class Form<K> +class Form<K : Any>

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

Constructors

@@ -18,7 +18,7 @@

<init>

@@ -38,9 +38,9 @@

Adds a boolean control to the form.

fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, 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, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +fun <C : KDateFormControl> add(key: KProperty1<K, KDate?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>

Adds a date control to the form.

-fun <C : FilesFormControl> add(key: KProperty1<K, List<File>?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>

Adds a files control to the form.

@@ -64,6 +64,15 @@ + + + +
-Form(panel: FormPanel<K>? = null, modelFactory: (Map<String, Any?>) -> K) +Form(panel: FormPanel<K>? = null, serializer: KSerializer<K>)

Creates a form with a given modelFactory function

+

getContent

+
+suspend fun getContent(key: KProperty1<K, List<KFile>?>, kFile: KFile): KFile +

Returns file with the content read.

+

getControl

@@ -127,5 +136,17 @@
+

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/-help-block/-init-.html b/api/pl.treksoft.kvision.form/-help-block/-init-.html index 104d8fd8..acedfd03 100644 --- a/api/pl.treksoft.kvision.form/-help-block/-init-.html +++ b/api/pl.treksoft.kvision.form/-help-block/-init-.html @@ -14,7 +14,7 @@

content - the text of the label

-rich - determines if content can contain HTML code

+rich - determines if content can contain HTML code

Constructor

diff --git a/api/pl.treksoft.kvision.form/-k-date-form-control/get-value-as-string.html b/api/pl.treksoft.kvision.form/-k-date-form-control/get-value-as-string.html new file mode 100644 index 00000000..677bcda1 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-date-form-control/get-value-as-string.html @@ -0,0 +1,16 @@ + + + +KDateFormControl.getValueAsString - kvision + + + +kvision / pl.treksoft.kvision.form / KDateFormControl / getValueAsString
+
+

getValueAsString

+ +open fun getValueAsString(): String? +

Overrides FormControl.getValueAsString

+

Returns the value of the control as a String.

+ + diff --git a/api/pl.treksoft.kvision.form/-k-date-form-control/get-value.html b/api/pl.treksoft.kvision.form/-k-date-form-control/get-value.html new file mode 100644 index 00000000..80fe5c8b --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-date-form-control/get-value.html @@ -0,0 +1,18 @@ + + + +KDateFormControl.getValue - kvision + + + +kvision / pl.treksoft.kvision.form / KDateFormControl / getValue
+
+

getValue

+ +open fun getValue(): KDate? +

Overrides FormControl.getValue

+

Returns the value of the control.

+

Return
+the value

+ + diff --git a/api/pl.treksoft.kvision.form/-k-date-form-control/index.html b/api/pl.treksoft.kvision.form/-k-date-form-control/index.html new file mode 100644 index 00000000..a14754e7 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-date-form-control/index.html @@ -0,0 +1,165 @@ + + + +KDateFormControl - kvision + + + +kvision / pl.treksoft.kvision.form / KDateFormControl
+
+

KDateFormControl

+interface KDateFormControl : FormControl +

Base interface of a form control with a date value.

+

Properties

+ + + + + + + +
+

value

+
+abstract var value: KDate? +

Date value.

+
+

Inherited Properties

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

disabled

+
+open var disabled: Boolean +

Determines if the field is disabled.

+
+

flabel

+
+abstract val flabel: FieldLabel +

Form field label.

+
+

input

+
+abstract val input: FormInput +

The actual input component.

+
+

name

+
+open var name: String? +

The name attribute of the generated HTML input element.

+
+

size

+
+open var size: InputSize? +

Input control field size.

+
+

validationInfo

+
+abstract val validationInfo: HelpBlock +

Validation info component.

+
+

validatorError

+
+open var validatorError: String? +

Validator error message.

+
+

Functions

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

getValue

+
+open fun getValue(): KDate? +

Returns the value of the control.

+
+

getValueAsString

+
+open fun getValueAsString(): String? +

Returns the value of the control as a String.

+
+

setValue

+
+open fun setValue(v: Any?): Unit +

Sets the value of the control.

+
+

Inherited Functions

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

blur

+
+abstract fun blur(): Unit +

Makes the input element blur.

+
+

focus

+
+abstract fun focus(): Unit +

Makes the input element focused.

+
+

Inheritors

+ + + + + + + +
+

DateTime

+
+open class DateTime : SimplePanel, KDateFormControl +

Form field date/time chooser component.

+
+ + diff --git a/api/pl.treksoft.kvision.form/-k-date-form-control/set-value.html b/api/pl.treksoft.kvision.form/-k-date-form-control/set-value.html new file mode 100644 index 00000000..3e102567 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-date-form-control/set-value.html @@ -0,0 +1,19 @@ + + + +KDateFormControl.setValue - kvision + + + +kvision / pl.treksoft.kvision.form / KDateFormControl / setValue
+
+

setValue

+ +open fun setValue(v: Any?): Unit +

Overrides FormControl.setValue

+

Sets the value of the control.

+

Parameters

+

+v - the value

+ + diff --git a/api/pl.treksoft.kvision.form/-k-date-form-control/value.html b/api/pl.treksoft.kvision.form/-k-date-form-control/value.html new file mode 100644 index 00000000..252a1296 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-date-form-control/value.html @@ -0,0 +1,15 @@ + + + +KDateFormControl.value - kvision + + + +kvision / pl.treksoft.kvision.form / KDateFormControl / value
+
+

value

+ +abstract var value: KDate? +

Date value.

+ + diff --git a/api/pl.treksoft.kvision.form/-k-files-form-control/get-value-as-string.html b/api/pl.treksoft.kvision.form/-k-files-form-control/get-value-as-string.html new file mode 100644 index 00000000..6e890d6f --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-files-form-control/get-value-as-string.html @@ -0,0 +1,16 @@ + + + +KFilesFormControl.getValueAsString - kvision + + + +kvision / pl.treksoft.kvision.form / KFilesFormControl / getValueAsString
+
+

getValueAsString

+ +open fun getValueAsString(): String? +

Overrides FormControl.getValueAsString

+

Returns the value of the control as a String.

+ + diff --git a/api/pl.treksoft.kvision.form/-k-files-form-control/get-value.html b/api/pl.treksoft.kvision.form/-k-files-form-control/get-value.html new file mode 100644 index 00000000..83d54534 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-files-form-control/get-value.html @@ -0,0 +1,18 @@ + + + +KFilesFormControl.getValue - kvision + + + +kvision / pl.treksoft.kvision.form / KFilesFormControl / getValue
+
+

getValue

+ +open fun getValue(): List<KFile>? +

Overrides FormControl.getValue

+

Returns the value of the control.

+

Return
+the value

+ + diff --git a/api/pl.treksoft.kvision.form/-k-files-form-control/index.html b/api/pl.treksoft.kvision.form/-k-files-form-control/index.html new file mode 100644 index 00000000..410e07c5 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-files-form-control/index.html @@ -0,0 +1,165 @@ + + + +KFilesFormControl - kvision + + + +kvision / pl.treksoft.kvision.form / KFilesFormControl
+
+

KFilesFormControl

+interface KFilesFormControl : FormControl +

Base interface of a form control with a list of files value.

+

Properties

+ + + + + + + +
+

value

+
+abstract var value: List<KFile>? +

List of files value.

+
+

Inherited Properties

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

disabled

+
+open var disabled: Boolean +

Determines if the field is disabled.

+
+

flabel

+
+abstract val flabel: FieldLabel +

Form field label.

+
+

input

+
+abstract val input: FormInput +

The actual input component.

+
+

name

+
+open var name: String? +

The name attribute of the generated HTML input element.

+
+

size

+
+open var size: InputSize? +

Input control field size.

+
+

validationInfo

+
+abstract val validationInfo: HelpBlock +

Validation info component.

+
+

validatorError

+
+open var validatorError: String? +

Validator error message.

+
+

Functions

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

getValue

+
+open fun getValue(): List<KFile>? +

Returns the value of the control.

+
+

getValueAsString

+
+open fun getValueAsString(): String? +

Returns the value of the control as a String.

+
+

setValue

+
+open fun setValue(v: Any?): Unit +

Sets the value of the control.

+
+

Inherited Functions

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

blur

+
+abstract fun blur(): Unit +

Makes the input element blur.

+
+

focus

+
+abstract fun focus(): Unit +

Makes the input element focused.

+
+

Inheritors

+ + + + + + + +
+

Upload

+
+open class Upload : SimplePanel, KFilesFormControl +

The form field file upload component.

+
+ + diff --git a/api/pl.treksoft.kvision.form/-k-files-form-control/set-value.html b/api/pl.treksoft.kvision.form/-k-files-form-control/set-value.html new file mode 100644 index 00000000..6bb16a8d --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-files-form-control/set-value.html @@ -0,0 +1,19 @@ + + + +KFilesFormControl.setValue - kvision + + + +kvision / pl.treksoft.kvision.form / KFilesFormControl / setValue
+
+

setValue

+ +open fun setValue(v: Any?): Unit +

Overrides FormControl.setValue

+

Sets the value of the control.

+

Parameters

+

+v - the value

+ + diff --git a/api/pl.treksoft.kvision.form/-k-files-form-control/value.html b/api/pl.treksoft.kvision.form/-k-files-form-control/value.html new file mode 100644 index 00000000..4b62a422 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-k-files-form-control/value.html @@ -0,0 +1,15 @@ + + + +KFilesFormControl.value - kvision + + + +kvision / pl.treksoft.kvision.form / KFilesFormControl / value
+
+

value

+ +abstract var value: List<KFile>? +

List of files value.

+ + diff --git a/api/pl.treksoft.kvision.form/index.html b/api/pl.treksoft.kvision.form/index.html index 697f5400..a63807cd 100644 --- a/api/pl.treksoft.kvision.form/index.html +++ b/api/pl.treksoft.kvision.form/index.html @@ -24,15 +24,6 @@ validation.

-

DateFormControl

- - -interface DateFormControl : FormControl -

Base interface of a form control with a date value.

- - - -

FieldLabel

@@ -42,19 +33,10 @@ validation.

-

FilesFormControl

- - -interface FilesFormControl : FormControl -

Base interface of a form control with a list of files value.

- - - -

Form

-class Form<K> +class Form<K : Any>

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

@@ -97,7 +79,7 @@ validation.

FormPanel

-open class FormPanel<K> : SimplePanel +open class FormPanel<K : Any> : SimplePanel

Bootstrap form component.

@@ -139,6 +121,24 @@ validation.

+

KDateFormControl

+ + +interface KDateFormControl : FormControl +

Base interface of a form control with a date value.

+ + + + +

KFilesFormControl

+ + +interface KFilesFormControl : FormControl +

Base interface of a form control with a list of files value.

+ + + +

NumberFormControl

diff --git a/api/pl.treksoft.kvision.form/kotlin.collections.-map/bool.html b/api/pl.treksoft.kvision.form/kotlin.collections.-map/bool.html deleted file mode 100644 index 2d14417e..00000000 --- a/api/pl.treksoft.kvision.form/kotlin.collections.-map/bool.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -bool - kvision - - - -kvision / pl.treksoft.kvision.form / kotlin.collections.Map / bool
-
-

bool

- -fun Map<String, Any?>.bool(key: String): Boolean? -

Returns given value from the map as a Boolean.

- - diff --git a/api/pl.treksoft.kvision.form/kotlin.collections.-map/date.html b/api/pl.treksoft.kvision.form/kotlin.collections.-map/date.html deleted file mode 100644 index 05ac67b9..00000000 --- a/api/pl.treksoft.kvision.form/kotlin.collections.-map/date.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -date - kvision - - - -kvision / pl.treksoft.kvision.form / kotlin.collections.Map / date
-
-

date

- -fun Map<String, Any?>.date(key: String): Date? -

Returns given value from the map as a Date.

- - diff --git a/api/pl.treksoft.kvision.form/kotlin.collections.-map/index.html b/api/pl.treksoft.kvision.form/kotlin.collections.-map/index.html index 0ad5ebe9..bbafa6ba 100644 --- a/api/pl.treksoft.kvision.form/kotlin.collections.-map/index.html +++ b/api/pl.treksoft.kvision.form/kotlin.collections.-map/index.html @@ -19,42 +19,6 @@

Extension function to convert Map to JSON.

- - -

bool

- - -fun Map<String, Any?>.bool(key: String): Boolean? -

Returns given value from the map as a Boolean.

- - - - -

date

- - -fun Map<String, Any?>.date(key: String): Date? -

Returns given value from the map as a Date.

- - - - -

number

- - -fun Map<String, Any?>.number(key: String): Number? -

Returns given value from the map as a Number.

- - - - -

string

- - -fun Map<String, Any?>.string(key: String): String? -

Returns given value from the map as a String.

- - diff --git a/api/pl.treksoft.kvision.form/kotlin.collections.-map/number.html b/api/pl.treksoft.kvision.form/kotlin.collections.-map/number.html deleted file mode 100644 index 6f898d7f..00000000 --- a/api/pl.treksoft.kvision.form/kotlin.collections.-map/number.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -number - kvision - - - -kvision / pl.treksoft.kvision.form / kotlin.collections.Map / number
-
-

number

- -fun Map<String, Any?>.number(key: String): Number? -

Returns given value from the map as a Number.

- - diff --git a/api/pl.treksoft.kvision.form/kotlin.collections.-map/string.html b/api/pl.treksoft.kvision.form/kotlin.collections.-map/string.html deleted file mode 100644 index 33bc31c6..00000000 --- a/api/pl.treksoft.kvision.form/kotlin.collections.-map/string.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -string - kvision - - - -kvision / pl.treksoft.kvision.form / kotlin.collections.Map / string
-
-

string

- -fun Map<String, Any?>.string(key: String): String? -

Returns given value from the map as a String.

- - -- cgit