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 --- 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 +++++++++++++++++++--- 5 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 api/pl.treksoft.kvision.form/-form/create.html create mode 100644 api/pl.treksoft.kvision.form/-form/get-content.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 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>
-- cgit