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 --- .../-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 +++++++++++++++++----- 6 files changed, 67 insertions(+), 15 deletions(-) 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 (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 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): <