aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt6
-rw-r--r--kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt6
-rw-r--r--kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadInputSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadInputSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt4
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt12
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt4
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt8
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt2
-rw-r--r--kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartCanvasSpec.kt4
-rw-r--r--kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartSpec.kt4
-rw-r--r--kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt2
-rw-r--r--kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt2
-rw-r--r--kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt2
-rw-r--r--kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt2
-rw-r--r--kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt2
-rw-r--r--kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/Root.kt158
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt10
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt6
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/BoldSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/CanvasSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/CustomTagSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/FooterSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/H1Spec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/H2Spec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/H3Spec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/H4Spec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/H5Spec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/H6Spec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/HeaderSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/IframeSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/PSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/SectionSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/SpanSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt8
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/FieldsetPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt8
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/state/StateBindingSpec.kt6
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt2
109 files changed, 280 insertions, 158 deletions
diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt
index 5cdb68c9..c6610a59 100644
--- a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt
+++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeInputSpec.kt
@@ -35,7 +35,7 @@ class DateTimeInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val data = Date()
val dti = DateTimeInput(value = data).apply {
placeholder = "place"
diff --git a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
index ce5426a9..34d48978 100644
--- a/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
+++ b/kvision-modules/kvision-bootstrap-datetime/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
@@ -34,7 +34,7 @@ class DateTimeSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val data = Date()
val ti = DateTime(value = data, label = "Label").apply {
placeholder = "place"
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
index 0e759896..679b1529 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
@@ -34,7 +34,7 @@ class SelectInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val selectInput = SelectInput(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", true).apply {
liveSearch = true
placeholder = "Choose ..."
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
index 33ccc843..e171eeac 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
@@ -33,7 +33,7 @@ class SelectOptGroupSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val selectOptGroup = SelectOptGroup("Group", listOf("test1" to "Test 1", "test2" to "Test 2"), 2)
root.add(selectOptGroup)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
index d711301a..1fc90e2d 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
@@ -32,7 +32,7 @@ class SelectOptionSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val selectOption = SelectOption("testValue", "testLabel")
root.add(selectOption)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
index 9ed44f82..fcbf7d62 100644
--- a/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
+++ b/kvision-modules/kvision-bootstrap-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
@@ -34,7 +34,7 @@ class SelectSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val select = Select(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", null, true, null, "Label").apply {
liveSearch = true
placeholder = "Choose ..."
diff --git a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt
index 467e48db..df6cf915 100644
--- a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt
+++ b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerInputSpec.kt
@@ -32,7 +32,7 @@ class SpinnerInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val si = SpinnerInput(value = 13).apply {
placeholder = "place"
id = "idti"
@@ -46,7 +46,7 @@ class SpinnerInputSpec : DomSpec {
@Test
fun spinUp() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val si = SpinnerInput(value = 13).apply {
placeholder = "place"
id = "idti"
@@ -61,7 +61,7 @@ class SpinnerInputSpec : DomSpec {
@Test
fun spinDown() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val si = SpinnerInput(value = 13).apply {
placeholder = "place"
id = "idti"
diff --git a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
index bb090b61..a29431d3 100644
--- a/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
+++ b/kvision-modules/kvision-bootstrap-spinner/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
@@ -33,7 +33,7 @@ class SpinnerSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ti = Spinner(value = 13, label = "Label").apply {
placeholder = "place"
name = "name"
@@ -59,7 +59,7 @@ class SpinnerSpec : DomSpec {
@Test
fun spinUp() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val si = Spinner(value = 13)
root.add(si)
assertEquals(13, si.value, "Should return initial value before spinUp")
@@ -71,7 +71,7 @@ class SpinnerSpec : DomSpec {
@Test
fun spinDown() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val si = Spinner(value = 13)
root.add(si)
assertEquals(13, si.value, "Should return initial value before spinDown")
diff --git a/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadInputSpec.kt b/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadInputSpec.kt
index 5690747a..536d088e 100644
--- a/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadInputSpec.kt
+++ b/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadInputSpec.kt
@@ -33,7 +33,7 @@ class TypeaheadInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val si = TypeaheadInput(listOf("test1", "test2"), value = "test").apply {
placeholder = "place"
id = "idti"
diff --git a/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadSpec.kt b/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadSpec.kt
index 2fc9cad5..25f86a91 100644
--- a/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadSpec.kt
+++ b/kvision-modules/kvision-bootstrap-typeahead/src/test/kotlin/test/pl/treksoft/kvision/form/text/TypeaheadSpec.kt
@@ -32,7 +32,7 @@ class TypeaheadSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ti = Typeahead(listOf("test1", "test2"), value = "test", label = "Label").apply {
placeholder = "place"
name = "name"
diff --git a/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadInputSpec.kt b/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadInputSpec.kt
index de7a9315..4441540f 100644
--- a/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadInputSpec.kt
+++ b/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadInputSpec.kt
@@ -33,7 +33,7 @@ class UploadInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val upi = UploadInput(multiple = true).apply {
id = "idti"
}
diff --git a/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadSpec.kt b/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadSpec.kt
index 92078153..e89a9eb9 100644
--- a/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadSpec.kt
+++ b/kvision-modules/kvision-bootstrap-upload/src/test/kotlin/test/pl/treksoft/kvision/form/upload/UploadSpec.kt
@@ -33,7 +33,7 @@ class UploadSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val upi = Upload(multiple = true)
val id = upi.input.id
root.add(upi)
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index d0b05cce..7224a895 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -88,7 +88,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt
index 5a2cb31b..17956fa7 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt
@@ -35,7 +35,7 @@ class ContextMenuSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val m = ContextMenu {
link("a", "b")
link("c", "d")
@@ -55,7 +55,7 @@ class ContextMenuSpec : DomSpec {
@Test
fun positionMenu() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val m = ContextMenu {
link("a", "b")
link("c", "d")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt
index 5efdeb20..f5dd8c9f 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt
@@ -35,7 +35,7 @@ class DropDownSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag")
root.add(dd)
dd.list.getElementJQueryD()?.dropdown("toggle")
@@ -52,7 +52,7 @@ class DropDownSpec : DomSpec {
@Test
fun renderDropUp() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag").apply { direction = Direction.DROPUP }
root.add(dd)
dd.list.getElementJQueryD()?.dropdown("toggle")
@@ -69,7 +69,7 @@ class DropDownSpec : DomSpec {
@Test
fun renderHeaderElement() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val dd = DropDown("Dropdown", listOf("abc" to DD.HEADER.option), "flag")
root.add(dd)
dd.list.getElementJQueryD()?.dropdown("toggle")
@@ -86,7 +86,7 @@ class DropDownSpec : DomSpec {
@Test
fun renderSeparatorElement() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val dd = DropDown("Dropdown", listOf("abc" to DD.SEPARATOR.option), "flag")
root.add(dd)
dd.list.getElementJQueryD()?.dropdown("toggle")
@@ -103,7 +103,7 @@ class DropDownSpec : DomSpec {
@Test
fun renderDisabledElement() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val dd = DropDown("Dropdown", listOf("abc" to DD.DISABLED.option), "flag")
root.add(dd)
dd.list.getElementJQueryD()?.dropdown("toggle")
@@ -120,7 +120,7 @@ class DropDownSpec : DomSpec {
@Test
fun toggle() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag")
root.add(dd)
val visible = dd.getElementJQuery()?.hasClass("show") ?: false
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt
index 25ca7a7d..64a01f64 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt
@@ -32,7 +32,7 @@ class HeaderSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val h = Header("Test")
root.add(h)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt
index 36c22a74..6e568c80 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt
@@ -32,7 +32,7 @@ class SeparatorSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val s = Separator()
root.add(s)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
index 48a8b5a0..b6e09783 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
@@ -36,7 +36,7 @@ class AlertSpec : DomSpec {
@Test
fun render() {
run {
- Root("test", fixed = true)
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
Alert.show("Alert caption", "Alert content", animation = false)
val alert = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal")[0] }
assertNotNull(alert, "Should show alert window")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt
index 1893ce81..10d11b2d 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt
@@ -32,7 +32,7 @@ class CloseIconSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ci = CloseIcon()
root.add(ci)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
index 875bf9e2..1459b8b5 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
@@ -36,7 +36,7 @@ class ConfirmSpec : DomSpec {
@Test
fun render() {
run {
- Root("test", fixed = true)
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
Confirm.show("Confirm caption", "Confirm content")
val confirm = document.getElementById("test")?.let { jQuery(it).find(".modal")[0] }
assertNotNull(confirm, "Should show confirm window")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt
index 7149b163..33d16fb1 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt
@@ -35,7 +35,7 @@ class ModalSpec : DomSpec {
@Test
fun render() {
run {
- Root("test", fixed = true)
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val modal = Modal("Modal")
modal.show()
val content = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() }
@@ -47,7 +47,7 @@ class ModalSpec : DomSpec {
@Test
fun toggle() {
run {
- Root("test", fixed = true)
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val modal = Modal("Modal")
modal.toggle()
val content = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() }
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt
index 8eb7bd5b..1330446e 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt
@@ -32,7 +32,7 @@ class NavFormSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val navf = NavForm()
root.add(navf)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt
index 2e52557f..c6b82ced 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt
@@ -32,7 +32,7 @@ class NavSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val nav = Nav()
root.add(nav)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt
index e7fd6e40..7ec1b33e 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt
@@ -38,7 +38,7 @@ class NavbarSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val navbar = Navbar("TEST", "#", NavbarType.FIXEDTOP)
root.add(navbar)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt
index 1ebac202..b176650d 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt
@@ -33,7 +33,7 @@ class ResponsiveGridPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val rgPanel = ResponsiveGridPanel()
root.add(rgPanel)
rgPanel.add(Span("abc"), 1, 1)
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt
index 7a76cde9..97dba32e 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt
@@ -34,7 +34,7 @@ class TabPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tabs = TabPanel()
root.add(tabs)
val label1 = Span("abc")
@@ -53,7 +53,7 @@ class TabPanelSpec : DomSpec {
@Test
fun setActiveIndex() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tabs = TabPanel()
root.add(tabs)
val label1 = Span("abc")
@@ -73,7 +73,7 @@ class TabPanelSpec : DomSpec {
@Test
fun removeTab() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tabs = TabPanel()
root.add(tabs)
val label1 = Span("abc")
@@ -95,7 +95,7 @@ class TabPanelSpec : DomSpec {
@Test
fun tabClick() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tabs = TabPanel()
root.add(tabs)
val label1 = Span("abc")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt
index 2f044987..5f829da2 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt
@@ -33,7 +33,7 @@ class ProgressBarSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val progressBar =
ProgressBar(50, style = ProgressBarStyle.SUCCESS, striped = true, content = "Processing ...")
root.add(progressBar)
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt
index 4aa14230..fb0dd6c7 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt
@@ -33,7 +33,7 @@ class ProgressIndicatorSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ind = ProgressIndicator(50, style = ProgressBarStyle.SUCCESS, striped = true)
root.add(ind)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt
index b3ddbe40..64e0a707 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt
@@ -33,7 +33,7 @@ class ButtonGroupSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val group = ButtonGroup()
root.add(group)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt
index d41ef05e..42cc719b 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt
@@ -32,7 +32,7 @@ class ToolbarSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val toolbar = Toolbar()
root.add(toolbar)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
index a65ff7c3..b6e49107 100644
--- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
+++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt
@@ -32,7 +32,7 @@ class WindowSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val window = Window("Window title", isResizable = false)
root.add(window)
window.show()
diff --git a/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartCanvasSpec.kt b/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartCanvasSpec.kt
index da83b989..9990aee2 100644
--- a/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartCanvasSpec.kt
+++ b/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartCanvasSpec.kt
@@ -36,7 +36,7 @@ class ChartCanvasSpec : DomSpec {
@Test
fun renderResponsive() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val chart = ChartCanvas(
configuration = Configuration(
ChartType.SCATTER,
@@ -56,7 +56,7 @@ class ChartCanvasSpec : DomSpec {
@Test
fun renderNotResponsive() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val chart = ChartCanvas(
300, 600,
configuration = Configuration(
diff --git a/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartSpec.kt b/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartSpec.kt
index 1fe73608..ce03fdb2 100644
--- a/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartSpec.kt
+++ b/kvision-modules/kvision-chart/src/test/kotlin/test/pl/treksoft/kvision/chart/ChartSpec.kt
@@ -37,7 +37,7 @@ class ChartSpec : DomSpec {
@Test
fun renderResponsive() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val chart = Chart(
Configuration(
ChartType.SCATTER,
@@ -60,7 +60,7 @@ class ChartSpec : DomSpec {
@Test
fun renderNotResponsive() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val chart = Chart(
Configuration(
ChartType.SCATTER,
diff --git a/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt b/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt
index 92661203..e53914fb 100644
--- a/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt
+++ b/kvision-modules/kvision-datacontainer/src/test/kotlin/test/pl/treksoft/kvision/data/DataContainerSpec.kt
@@ -36,7 +36,7 @@ class DataContainerSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
class Model(value: String) : BaseDataComponent() {
var value: String by obs(value)
diff --git a/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt b/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt
index cdb8821a..f8b9e87b 100644
--- a/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt
+++ b/kvision-modules/kvision-redux-kotlin/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt
@@ -53,7 +53,7 @@ class StateBindingSpec : DomSpec {
@Test
fun stateBinding() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val store = createReduxStore(::stateReducer, State(10))
val container = SimplePanel()
diff --git a/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt b/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt
index b4415fcb..5106236f 100644
--- a/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt
+++ b/kvision-modules/kvision-redux/src/test/kotlin/test/pl/treksoft/kvision/redux/StateBindingSpec.kt
@@ -52,7 +52,7 @@ class StateBindingSpec : DomSpec {
@Test
fun stateBinding() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val store = createReduxStore(::stateReducer, State(10))
val container = SimplePanel()
diff --git a/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt b/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt
index 4ebf7b45..c88a7ab3 100644
--- a/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt
+++ b/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextInputSpec.kt
@@ -34,7 +34,7 @@ class RichTextInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val hai = RichTextInput(value = "abc").apply {
placeholder = "place"
id = "idti"
diff --git a/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt b/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt
index 1ea79790..7afb95a5 100644
--- a/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt
+++ b/kvision-modules/kvision-richtext/src/test/kotlin/test/pl/treksoft/kvision/form/text/RichTextSpec.kt
@@ -34,7 +34,7 @@ class RichTextSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val hai = RichText(value = "abc", label = "Field").apply {
placeholder = "place"
id = "idti"
diff --git a/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..76c3b6ee 100644
--- a/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt b/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt
index fd1f8ac1..2e86c87f 100644
--- a/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt
+++ b/kvision-modules/kvision-tabulator/src/test/kotlin/test/pl/treksoft/kvision/tabulator/TabulatorSpec.kt
@@ -34,7 +34,7 @@ class TabulatorSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tabulator = Tabulator<Any>(options = TabulatorOptions(data = arrayOf(obj {
id = 1
name = "Name"
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
index b1bb36a8..b6f8ad0c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt
@@ -34,6 +34,19 @@ import pl.treksoft.kvision.utils.snOpt
import kotlin.browser.document
/**
+ * Root container types.
+ */
+enum class ContainerType(internal val type: String) {
+ NONE(""),
+ FIXED("container"),
+ FLUID("container-fluid"),
+ SM("container-sm"),
+ MD("container-md"),
+ LG("container-lg"),
+ XL("container-xl")
+}
+
+/**
* Root container.
*
* This container is bound to the specific element in the main HTML file of the project.
@@ -43,7 +56,8 @@ import kotlin.browser.document
@Suppress("TooManyFunctions")
class Root : SimplePanel {
- private val fixed: Boolean
+ private val containerType: ContainerType
+ private val addRow: Boolean
private val contextMenus: MutableList<Widget> = mutableListOf()
private var rootVnode: VNode? = null
@@ -54,12 +68,19 @@ class Root : SimplePanel {
/**
* @constructor
* @param id ID attribute of element in the main HTML file
- * @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
- * otherwise it's rendered with "container" class (default is false)
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root
+ * container (default is based on container type)
* @param init an initializer extension function
*/
- constructor(id: String, fixed: Boolean = false, init: (Root.() -> Unit)? = null) : super() {
- this.fixed = fixed
+ constructor(
+ id: String,
+ containerType: ContainerType = ContainerType.FLUID,
+ addRow: Boolean = containerType != ContainerType.FIXED,
+ init: (Root.() -> Unit)? = null
+ ) : super() {
+ this.containerType = containerType
+ this.addRow = addRow
if (document.getElementById(id) != null) {
rootVnode = KVManager.patch(id, this.renderVNode())
}
@@ -71,18 +92,61 @@ class Root : SimplePanel {
/**
* @constructor
* @param element HTML element in the DOM tree
- * @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
- * otherwise it's rendered with "container" class (default is false)
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root
+ * container (default is based on container type)
* @param init an initializer extension function
*/
- constructor(element: HTMLElement, fixed: Boolean = false, init: (Root.() -> Unit)? = null) : super() {
- this.fixed = fixed
+ constructor(
+ element: HTMLElement,
+ containerType: ContainerType = ContainerType.FLUID,
+ addRow: Boolean = containerType != ContainerType.FIXED,
+ init: (Root.() -> Unit)? = null
+ ) : super() {
+ this.containerType = containerType
+ this.addRow = addRow
rootVnode = KVManager.patch(element, this.renderVNode())
this.id = "kv_root_${counter++}"
@Suppress("LeakingThis")
init?.invoke(this)
}
+ /**
+ * @constructor
+ * @param id ID attribute of element in the main HTML file
+ * @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
+ * otherwise it's rendered with "container" class (default is false)
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root container
+ * @param init an initializer extension function
+ */
+ @Deprecated("Use constructor without fixed parameter")
+ constructor(
+ id: String,
+ fixed: Boolean = false,
+ containerType: ContainerType = if (fixed) ContainerType.FIXED else ContainerType.FLUID,
+ addRow: Boolean = !fixed,
+ init: (Root.() -> Unit)? = null
+ ) : this(id, containerType, addRow, init)
+
+ /**
+ * @constructor
+ * @param element HTML element in the DOM tree
+ * @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
+ * otherwise it's rendered with "container" class (default is false)
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root container
+ * @param init an initializer extension function
+ */
+ @Deprecated("Use constructor without fixed parameter")
+ constructor(
+ element: HTMLElement,
+ fixed: Boolean = false,
+ containerType: ContainerType = if (fixed) ContainerType.FIXED else ContainerType.FLUID,
+ addRow: Boolean = !fixed,
+ init: (Root.() -> Unit)? = null
+ ) : this(element, containerType, addRow, init)
+
init {
roots.add(this)
if (isFirstRoot) {
@@ -91,7 +155,7 @@ class Root : SimplePanel {
}
override fun render(): VNode {
- return if (!fixed) {
+ return if (addRow) {
render("div#$id", arrayOf(h("div", snOpt {
`class` = snClasses(listOf("row" to true))
}, stylesVNodes() + childrenVNodes() + modalsVNodes() + contextMenusVNodes())))
@@ -138,8 +202,12 @@ class Root : SimplePanel {
}
override fun getSnClass(): List<StringBoolPair> {
- val css = if (!fixed) "container-fluid" else "container"
- return super.getSnClass() + (css to true)
+ return if (containerType == ContainerType.NONE) {
+ super.getSnClass()
+ } else {
+ super.getSnClass() + (containerType.type to true)
+ }
+
}
internal fun reRender(): Root {
@@ -222,14 +290,59 @@ class Root : SimplePanel {
/**
* Create new Root container based on ID
* @param id ID attribute of element in the main HTML file
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root
+ * container (default is based on container type)
+ * @param init an initializer extension function
+ * @return the created Root container
+ */
+fun Application.root(
+ id: String,
+ containerType: ContainerType = ContainerType.FLUID,
+ addRow: Boolean = containerType != ContainerType.FIXED,
+ init: Root.() -> Unit
+): Root {
+ return Root(id, containerType, addRow, init)
+}
+
+/**
+ * Create new Root container based on HTML element
+ * @param element HTML element in the DOM tree
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root
+ * container (default is based on container type)
+ * @param init an initializer extension function
+ * @return the created Root container
+ */
+fun Application.root(
+ element: HTMLElement,
+ containerType: ContainerType = ContainerType.FLUID,
+ addRow: Boolean = containerType != ContainerType.FIXED,
+ init: Root.() -> Unit
+): Root {
+ return Root(element, containerType, addRow, init)
+}
+
+/**
+ * Create new Root container based on ID
+ * @param id ID attribute of element in the main HTML file
* @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
* otherwise it's rendered with "container" class (default is false)
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root container
* @param init an initializer extension function
* @return the created Root container
*/
-@Suppress("unused")
-fun Application.root(id: String, fixed: Boolean = false, init: Root.() -> Unit): Root {
- return Root(id, fixed, init)
+@Suppress("DEPRECATION")
+@Deprecated("Use builder function without fixed parameter")
+fun Application.root(
+ id: String,
+ fixed: Boolean = false,
+ containerType: ContainerType = if (fixed) ContainerType.FIXED else ContainerType.FLUID,
+ addRow: Boolean = !fixed,
+ init: Root.() -> Unit
+): Root {
+ return Root(id, fixed, containerType, addRow, init)
}
/**
@@ -237,10 +350,19 @@ fun Application.root(id: String, fixed: Boolean = false, init: Root.() -> Unit):
* @param element HTML element in the DOM tree
* @param fixed if false, the container is rendered with Bootstrap "container-fluid" class,
* otherwise it's rendered with "container" class (default is false)
+ * @param containerType Bootstrap container type
+ * @param addRow if true, a <div class="row"> element is rendered inside the root container
* @param init an initializer extension function
* @return the created Root container
*/
-@Suppress("unused")
-fun Application.root(element: HTMLElement, fixed: Boolean = false, init: Root.() -> Unit): Root {
- return Root(element, fixed, init)
+@Suppress("DEPRECATION")
+@Deprecated("Use builder function without fixed parameter")
+fun Application.root(
+ element: HTMLElement,
+ fixed: Boolean = false,
+ containerType: ContainerType = if (fixed) ContainerType.FIXED else ContainerType.FLUID,
+ addRow: Boolean = !fixed,
+ init: Root.() -> Unit
+): Root {
+ return Root(element, fixed, containerType, addRow, init)
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 9da4dfb4..b975acfe 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test")
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
index 960a18b6..39f8f04c 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/ContainerSpec.kt
@@ -34,7 +34,7 @@ class ContainerSpec : DomSpec {
@Test
fun add() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -52,7 +52,7 @@ class ContainerSpec : DomSpec {
@Test
fun addAll() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -69,7 +69,7 @@ class ContainerSpec : DomSpec {
@Test
fun remove() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -88,7 +88,7 @@ class ContainerSpec : DomSpec {
@Test
fun removeAll() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
@@ -107,7 +107,7 @@ class ContainerSpec : DomSpec {
@Test
fun getChildren() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val child1 = Widget()
child1.id = "child1"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt
index 33e08c1e..b069d1df 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/StyleSpec.kt
@@ -37,7 +37,7 @@ class StyleSpec : DomSpec {
@Test
fun render() {
run {
- Root("test", fixed = true) {
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) {
widget {
style {
margin = 2.px
@@ -59,7 +59,7 @@ class StyleSpec : DomSpec {
@Test
fun renderCustomClass() {
run {
- Root("test", fixed = true) {
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) {
widget {
style("customclass") {
margin = 2.px
@@ -80,7 +80,7 @@ class StyleSpec : DomSpec {
@Test
fun renderSubclass() {
run {
- Root("test", fixed = true) {
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) {
widget {
style("customclass") {
margin = 2.px
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
index 159df178..3eb84f4f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetSpec.kt
@@ -143,7 +143,7 @@ class WidgetSpec : WSpec {
@Test
fun getRoot() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
root.add(widget)
val r = widget.getRoot()
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
index 0c28c327..40ecbaa7 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/WidgetWrapperSpec.kt
@@ -35,7 +35,7 @@ class WidgetWrapperSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val widget = Widget()
val wrapper = WidgetWrapper(widget)
wrapper.width = 100 to UNIT.em
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt
index 5319d4bc..583fb2a3 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/FieldLabelSpec.kt
@@ -32,7 +32,7 @@ class FieldLabelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val fl = FieldLabel("input", "Label")
root.add(fl)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt
index 785f9a2c..c89532fa 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/HelpTextSpec.kt
@@ -32,7 +32,7 @@ class HelpTextSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val fl = HelpText("Form Error")
root.add(fl)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxInputSpec.kt
index 677a2b8e..eb24fcdc 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxInputSpec.kt
@@ -32,7 +32,7 @@ class CheckBoxInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ci = CheckBoxInput(value = true).apply {
name = "name"
id = "idti"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
index 2c329ffa..35413723 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
@@ -33,7 +33,7 @@ class CheckBoxSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ci = CheckBox(value = true, label = "Label").apply {
name = "name"
style = CheckBoxStyle.DANGER
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt
index 020ad529..e97bcc54 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupInputSpec.kt
@@ -33,7 +33,7 @@ class RadioGroupInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ci = RadioGroupInput(options = listOf("a" to "A", "b" to "B"), value = "a").apply {
disabled = true
inline = true
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
index 77547977..ddf5eb3a 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
@@ -33,7 +33,7 @@ class RadioGroupSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ci = RadioGroup(options = listOf("a" to "A", "b" to "B"), value = "a", label = "Label").apply {
disabled = true
inline = true
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioInputSpec.kt
index 5b4fe836..e137e312 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioInputSpec.kt
@@ -32,7 +32,7 @@ class RadioInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ci = RadioInput(value = true).apply {
name = "name"
id = "idti"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
index c709b548..90576e4e 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
@@ -33,7 +33,7 @@ class RadioSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ci = Radio(value = true, label = "Label", extraValue = "abc").apply {
name = "name"
style = RadioStyle.DANGER
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeInputSpec.kt
index c7ea7f0b..bb91c350 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeInputSpec.kt
@@ -32,7 +32,7 @@ class RangeInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ri = RangeInput(12, 10, 20, 2).apply {
name = "name"
id = "idri"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeSpec.kt
index aaae7a12..1ec3dbf0 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/range/RangeSpec.kt
@@ -32,7 +32,7 @@ class RangeSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val range = Range(12, "name", 10, 20, 2, "Label").apply {
id = "idri"
disabled = true
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectInputSpec.kt
index b2c77d10..e24431c0 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectInputSpec.kt
@@ -32,7 +32,7 @@ class SimpleSelectInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val si = SimpleSelectInput(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", true).apply {
name = "name"
id = "idti"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectSpec.kt
index db1c36f0..2959f080 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SimpleSelectSpec.kt
@@ -32,7 +32,7 @@ class SimpleSelectSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val select =
SimpleSelect(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", true, "select", "Label").apply {
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
index 5d6c2738..85652fb9 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
@@ -32,7 +32,7 @@ class PasswordSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ti = Password(value = "abc", label = "Label").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
index 815f12e7..be960556 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
@@ -32,7 +32,7 @@ class TextAreaInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ti = TextAreaInput(cols = 5, rows = 2, value = "abc").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
index 31b4baf2..ebd1580f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
@@ -32,7 +32,7 @@ class TextAreaSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ti = TextArea(cols = 5, rows = 2, value = "abc", label = "Label").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
index 6d21ab14..879c0d11 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
@@ -33,7 +33,7 @@ class TextInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ti = TextInput(type = TextInputType.PASSWORD, value = "abc").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
index 02ba7643..c2f9986f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
@@ -32,7 +32,7 @@ class TextSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val ti = Text(value = "abc", label = "Label").apply {
placeholder = "place"
name = "name"
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/BoldSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/BoldSpec.kt
index f37d68d5..f73b58f3 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/BoldSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/BoldSpec.kt
@@ -32,7 +32,7 @@ class BoldSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val bold = Bold("Bold text")
root.add(bold)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt
index e807bfd5..b29a33e1 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ButtonSpec.kt
@@ -34,7 +34,7 @@ class ButtonSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val button = Button("Cancel", "fas fa-bars", ButtonStyle.PRIMARY)
button.size = ButtonSize.LARGE
button.block = true
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/CanvasSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/CanvasSpec.kt
index f30872ca..f897ceba 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/CanvasSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/CanvasSpec.kt
@@ -32,7 +32,7 @@ class CanvasSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val canvas = Canvas(800, 600)
root.add(canvas)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/CustomTagSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/CustomTagSpec.kt
index d1261fa6..a7d16c1c 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/CustomTagSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/CustomTagSpec.kt
@@ -33,7 +33,7 @@ class CustomTagSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tag = CustomTag("custom-element", "This is <b>custom element</b>", rich = false, align = Align.CENTER)
root.add(tag)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt
index 528fc0ae..499d8f4e 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/DivSpec.kt
@@ -32,7 +32,7 @@ class DivSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val div = Div("This is a div")
root.add(div)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/FooterSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/FooterSpec.kt
index 69819203..92730f77 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/FooterSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/FooterSpec.kt
@@ -32,7 +32,7 @@ class FooterSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val footer = Footer("This is a footer")
root.add(footer)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/H1Spec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/H1Spec.kt
index bd0c69b6..4034bf3b 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/H1Spec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/H1Spec.kt
@@ -32,7 +32,7 @@ class H1Spec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val h1 = H1("This is h1 header")
root.add(h1)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/H2Spec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/H2Spec.kt
index 5ec2a666..5d430a18 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/H2Spec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/H2Spec.kt
@@ -32,7 +32,7 @@ class H2Spec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val h2 = H2("This is h2 header")
root.add(h2)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/H3Spec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/H3Spec.kt
index f85ede34..393861d8 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/H3Spec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/H3Spec.kt
@@ -32,7 +32,7 @@ class H3Spec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val h3 = H3("This is h3 header")
root.add(h3)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/H4Spec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/H4Spec.kt
index ce52282b..b475cbbd 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/H4Spec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/H4Spec.kt
@@ -32,7 +32,7 @@ class H4Spec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val h4 = H4("This is h4 header")
root.add(h4)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/H5Spec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/H5Spec.kt
index 029a692f..96ad5922 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/H5Spec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/H5Spec.kt
@@ -32,7 +32,7 @@ class H5Spec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val h5 = H5("This is h5 header")
root.add(h5)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/H6Spec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/H6Spec.kt
index 06a851e0..4624c6ac 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/H6Spec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/H6Spec.kt
@@ -32,7 +32,7 @@ class H6Spec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val div = H1("This is h1 header")
root.add(div)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/HeaderSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/HeaderSpec.kt
index 1b33adcc..f67d2738 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/HeaderSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/HeaderSpec.kt
@@ -32,7 +32,7 @@ class HeaderSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val header = Header("This is a header")
root.add(header)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt
index 9a63c68e..d158d9f8 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/IconSpec.kt
@@ -32,7 +32,7 @@ class IconSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val icon = Icon("fas fa-check")
root.add(icon)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/IframeSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/IframeSpec.kt
index 69051f92..7cb00a34 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/IframeSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/IframeSpec.kt
@@ -33,7 +33,7 @@ class IframeSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val iframe = Iframe("https://www.google.com", null, "test", 800, 600, setOf(Sandbox.ALLOWSAMEORIGIN))
root.add(iframe)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
index a3ac9d66..c2037b64 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
@@ -34,7 +34,7 @@ class ImageSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val res = require("img/placeholder.png")
@Suppress("UnsafeCastFromDynamic")
val image = Image(res, "Image", true, ImageShape.ROUNDED, true)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt
index 88869cf4..b28f0617 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/LinkSpec.kt
@@ -32,7 +32,7 @@ class LinkSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val link = Link("Google", "http://www.google.com")
root.add(link)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt
index bf52f1dc..622b11e5 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ListSpec.kt
@@ -35,7 +35,7 @@ class ListSpec : DomSpec {
@Test
fun renderElements() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val list = ListTag(ListType.DL_HORIZ, listOf("a1", "a2", "b1", "b2"))
root.add(list)
val element = document.getElementById("test")
@@ -50,7 +50,7 @@ class ListSpec : DomSpec {
@Test
fun renderAsContainer() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val list = ListTag(ListType.UL)
list.add(Tag(TAG.PRE, "pre"))
list.add(Tag(TAG.DEL, "del"))
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/PSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/PSpec.kt
index 0ab9c5bc..3ff8b115 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/PSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/PSpec.kt
@@ -32,7 +32,7 @@ class PSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val par = P("This is a paragraph")
root.add(par)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/SectionSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/SectionSpec.kt
index fa987d05..d5b28d41 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/SectionSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/SectionSpec.kt
@@ -32,7 +32,7 @@ class SectionSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val section = Section("This is a section")
root.add(section)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/SpanSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/SpanSpec.kt
index 88604b5e..e63e1041 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/SpanSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/SpanSpec.kt
@@ -32,7 +32,7 @@ class SpanSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val span = Span("This is a label")
root.add(span)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt
index b6017804..2d9c8c48 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/TagSpec.kt
@@ -35,7 +35,7 @@ class TagSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tag = Tag(TAG.H1, "This is <b>h1</b>", rich = false, align = Align.CENTER)
root.add(tag)
val element = document.getElementById("test")
@@ -50,7 +50,7 @@ class TagSpec : DomSpec {
@Test
fun renderRich() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tag = Tag(TAG.H1, "This is <b>h1</b>", rich = true, align = Align.RIGHT)
root.add(tag)
val element = document.getElementById("test")
@@ -65,7 +65,7 @@ class TagSpec : DomSpec {
@Test
fun renderAsContainer() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tag = Tag(TAG.P, align = Align.RIGHT)
tag.add(Tag(TAG.DEL, "This is test"))
tag.add(Link("abc", "/x"))
@@ -82,7 +82,7 @@ class TagSpec : DomSpec {
@Test
fun renderUnaryPlus() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val tag = Tag(TAG.H1, rich = true) {
+"This is <b>h1</b>"
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt
index 5684120d..86fb2c8c 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/DockPanelSpec.kt
@@ -34,7 +34,7 @@ class DockPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val dockPanel = DockPanel()
root.add(dockPanel)
dockPanel.add(Span("abc"), Side.UP)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/FieldsetPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/FieldsetPanelSpec.kt
index 4e802add..d46f3e96 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/FieldsetPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/FieldsetPanelSpec.kt
@@ -33,7 +33,7 @@ class FieldsetPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val fieldSet = FieldsetPanel("Legend") {
div("Lorem ipsum")
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt
index b897fef2..9ef5f6a4 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/FlexPanelSpec.kt
@@ -35,7 +35,7 @@ class FlexPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val flexPanel = FlexPanel(FlexDir.ROWREV, justify = FlexJustify.SPACEEVENLY)
root.add(flexPanel)
flexPanel.add(Span("abc"), 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt
index d7d9beb7..87090479 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/GridPanelSpec.kt
@@ -33,7 +33,7 @@ class GridPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val gridPanel = GridPanel()
root.add(gridPanel)
gridPanel.add(Span("abc"), 1, 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt
index c53b2e57..025a0598 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/HPanelSpec.kt
@@ -34,7 +34,7 @@ class HPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val hPanel = HPanel(justify = FlexJustify.SPACEBETWEEN)
root.add(hPanel)
hPanel.add(Span("abc"), 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt
index 474b1d6a..14743ee2 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/RootSpec.kt
@@ -41,7 +41,7 @@ class RootSpec : DomSpec {
@Test
fun getSnClassFluid() {
run {
- Root("test", fixed = true)
+ Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val rootElem = document.getElementById("test")
assertTrue("Fluid root child has correct css class") { rootElem?.className == "container" }
}
@@ -50,7 +50,7 @@ class RootSpec : DomSpec {
@Test
fun getRoot() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val r = root.getRoot()
assertTrue("Should return self") { r == root }
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt
index 94ed165a..dd282d85 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/SplitPanelSpec.kt
@@ -34,7 +34,7 @@ class SplitPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val splitPanel = SplitPanel(Direction.VERTICAL)
root.add(splitPanel)
val label1 = Span("abc")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt
index 8a1ce795..4675164f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/StackPanelSpec.kt
@@ -33,7 +33,7 @@ class StackPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val stackPanel = StackPanel()
root.add(stackPanel)
val label1 = Span("abc")
@@ -48,7 +48,7 @@ class StackPanelSpec : DomSpec {
@Test
fun renderNotActivateLast() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val stackPanel = StackPanel(activateLast = false)
root.add(stackPanel)
val label1 = Span("abc")
@@ -67,7 +67,7 @@ class StackPanelSpec : DomSpec {
@Test
fun remove() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val stackPanel = StackPanel(activateLast = false)
root.add(stackPanel)
val label1 = Span("abc")
@@ -83,7 +83,7 @@ class StackPanelSpec : DomSpec {
@Test
fun removeAll() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val stackPanel = StackPanel(activateLast = false)
root.add(stackPanel)
val label1 = Span("abc")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt
index 5bed89f1..22d6b768 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/panel/VPanelSpec.kt
@@ -34,7 +34,7 @@ class VPanelSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val vPanel = VPanel(justify = FlexJustify.SPACEBETWEEN)
root.add(vPanel)
vPanel.add(Span("abc"), 1)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/state/StateBindingSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/state/StateBindingSpec.kt
index 940fd2cd..9975110f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/state/StateBindingSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/state/StateBindingSpec.kt
@@ -37,7 +37,7 @@ class StateBindingSpec : DomSpec {
@Test
fun bind() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val observableList = observableListOf(1, 2, 3)
container.bind(observableList) { state ->
@@ -66,7 +66,7 @@ class StateBindingSpec : DomSpec {
@Test
fun stateBinding() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val observableList = observableListOf(1, 2, 3)
container.stateBinding(observableList) { state ->
@@ -94,7 +94,7 @@ class StateBindingSpec : DomSpec {
@Test
fun stateUpdate() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val container = SimplePanel()
val observableList = observableListOf(1)
container.stateUpdate(observableList) { state ->
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt
index 582212bd..b670228f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/CellSpec.kt
@@ -32,7 +32,7 @@ class CellSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val cell = Cell("This is a cell")
root.add(cell)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt
index 40f25a66..5b8eb75d 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/HeaderCellSpec.kt
@@ -32,7 +32,7 @@ class HeaderCellSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val cell = HeaderCell("This is a header cell")
root.add(cell)
val element = document.getElementById("test")
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt
index 8f80f465..0a10ff98 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/RowSpec.kt
@@ -33,7 +33,7 @@ class RowSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val row = Row {
cell("A")
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt
index e81e539d..3e8c788e 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/table/TableSpec.kt
@@ -36,7 +36,7 @@ class TableSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", fixed = true)
+ val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED)
val table = Table(listOf("a", "b")) {
row {
cell("A")