aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/form
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-11-07 22:16:46 +0100
committerRobert Jaros <rjaros@finn.pl>2018-11-07 22:16:46 +0100
commit40b9cc1f785eaae352267757ac9e091c25ed0744 (patch)
tree1c7dec688121c471c2ada361ca407a41ce1c7646 /src/main/kotlin/pl/treksoft/kvision/form
parentdec46533acbfa4751337149dcf7b1a67f9bb42fd (diff)
downloadkvision-40b9cc1f785eaae352267757ac9e091c25ed0744.tar.gz
kvision-40b9cc1f785eaae352267757ac9e091c25ed0744.tar.bz2
kvision-40b9cc1f785eaae352267757ac9e091c25ed0744.zip
Upgrade to Kotlin 1.3.0 final.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/form')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/Form.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt
index 8f93c7ea..e2f5d730 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt
@@ -21,6 +21,7 @@
*/
package pl.treksoft.kvision.form
+import kotlinx.serialization.ImplicitReflectionSerializer
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Mapper
import kotlinx.serialization.context.MutableSerialContextImpl
@@ -106,7 +107,7 @@ class Form<K : Any>(private val panel: FormPanel<K>? = null, private val seriali
else -> listOf(entry.key to entry.value)
}
}.toMap()
- val mapper = Mapper.InNullableMapper(FormMapWrapper(map))
+ val mapper = Mapper().InNullableMapper(FormMapWrapper(map))
mapper.context = MutableSerialContextImpl().apply { registerSerializer(Date::class, DateSerializer) }
mapper.decode(serializer)
}
@@ -320,6 +321,7 @@ class Form<K : Any>(private val panel: FormPanel<K>? = null, private val seriali
}
companion object {
+ @UseExperimental(ImplicitReflectionSerializer::class)
inline fun <reified K : Any> create(
panel: FormPanel<K>? = null,
noinline init: (Form<K>.() -> Unit)? = null
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt b/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt
index 3533dee5..c9b33572 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt
@@ -22,6 +22,7 @@
package pl.treksoft.kvision.form
import com.github.snabbdom.VNode
+import kotlinx.serialization.ImplicitReflectionSerializer
import kotlinx.serialization.KSerializer
import kotlinx.serialization.serializer
import pl.treksoft.kvision.core.Container
@@ -407,6 +408,7 @@ open class FormPanel<K : Any>(
return formPanel
}
+ @UseExperimental(ImplicitReflectionSerializer::class)
inline fun <reified K : Any> create(
method: FormMethod? = null, action: String? = null, enctype: FormEnctype? = null,
type: FormType? = null, classes: Set<String> = setOf(),