@schukai/monster 3.75.0 → 3.77.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +33 -8
- package/package.json +1 -1
- package/source/components/datatable/change-button.mjs +1 -1
- package/source/components/datatable/columnbar.mjs +1 -1
- package/source/components/datatable/dataset.mjs +1 -1
- package/source/components/datatable/datasource/dom.mjs +1 -1
- package/source/components/datatable/datasource/rest.mjs +1 -1
- package/source/components/datatable/datasource.mjs +1 -1
- package/source/components/datatable/datatable.mjs +1 -1
- package/source/components/datatable/filter/date-range.mjs +1 -1
- package/source/components/datatable/filter/input.mjs +1 -1
- package/source/components/datatable/filter/range.mjs +1 -1
- package/source/components/datatable/filter/select.mjs +1 -1
- package/source/components/datatable/filter-button.mjs +1 -1
- package/source/components/datatable/filter.mjs +1 -1
- package/source/components/datatable/pagination.mjs +1 -1
- package/source/components/datatable/save-button.mjs +1 -1
- package/source/components/datatable/status.mjs +1 -1
- package/source/components/form/action-button.mjs +1 -1
- package/source/components/form/api-button.mjs +1 -1
- package/source/components/form/button-bar.mjs +1 -1
- package/source/components/form/button.mjs +1 -1
- package/source/components/form/confirm-button.mjs +1 -1
- package/source/components/form/context-error.mjs +2 -2
- package/source/components/form/context-help.mjs +1 -1
- package/source/components/form/field-set.mjs +31 -44
- package/source/components/form/message-state-button.mjs +1 -1
- package/source/components/form/popper-button.mjs +1 -1
- package/source/components/form/reload.mjs +1 -1
- package/source/components/form/select.mjs +1 -1
- package/source/components/form/shadow-reload.mjs +1 -1
- package/source/components/form/state-button.mjs +1 -1
- package/source/components/form/style/field-set.pcss +164 -70
- package/source/components/form/stylesheet/field-set.mjs +7 -14
- package/source/components/form/template.mjs +1 -1
- package/source/components/form/toggle-switch.mjs +321 -340
- package/source/components/form/tree-select.mjs +1 -1
- package/source/components/host/call-button.mjs +1 -1
- package/source/components/host/collapse.mjs +1 -1
- package/source/components/host/config-manager.mjs +1 -1
- package/source/components/host/host.mjs +1 -1
- package/source/components/host/overlay.mjs +1 -1
- package/source/components/host/toggle-button.mjs +1 -1
- package/source/components/host/viewer.mjs +1 -1
- package/source/components/layout/collapse.mjs +361 -395
- package/source/components/layout/details.mjs +20 -50
- package/source/components/layout/iframe.mjs +358 -0
- package/source/components/layout/panel.mjs +11 -26
- package/source/components/layout/popper.mjs +1 -1
- package/source/components/layout/slider.mjs +12 -12
- package/source/components/layout/split-panel.mjs +8 -40
- package/source/components/layout/style/iframe.pcss +39 -0
- package/source/components/layout/style/panel.pcss +10 -3
- package/source/components/layout/style/split-panel.pcss +2 -0
- package/source/components/layout/stylesheet/iframe.mjs +38 -0
- package/source/components/layout/stylesheet/panel.mjs +1 -1
- package/source/components/layout/tabs.mjs +7 -36
- package/source/components/layout/width-toggle.mjs +26 -39
- package/source/components/navigation/table-of-content.mjs +1 -1
- package/source/components/state/log.mjs +167 -153
- package/source/components/state/state.mjs +9 -33
- package/source/components/stylesheet/form.mjs +6 -13
- package/source/components/tree-menu/tree-menu.mjs +16 -12
- package/source/math/random.mjs +2 -3
- package/source/monster.mjs +2 -1
- package/test/cases/components/form/button.mjs +2 -1
- package/test/cases/components/form/confirm-button.mjs +1 -1
- package/test/cases/components/form/form.mjs +1 -1
- package/test/cases/components/form/reload.mjs +1 -1
- package/test/cases/components/form/select.mjs +1 -1
- package/test/cases/components/form/state-button.mjs +1 -1
- package/test/cases/components/form/template.mjs +1 -1
- package/test/cases/components/form/toggle-switch.mjs +1 -1
- package/test/cases/components/form/tree-select.mjs +1 -1
- package/test/cases/components/host/details.mjs +1 -1
- package/test/cases/components/host/host.mjs +1 -1
- package/test/cases/components/host/overlay.mjs +1 -1
- package/test/cases/components/layout/panel.mjs +1 -1
- package/test/cases/components/layout/slit-panel.mjs +1 -1
- package/test/cases/components/layout/tabs.mjs +1 -1
- package/test/cases/components/notify/message.mjs +1 -1
- package/test/cases/components/notify/notify.mjs +1 -1
- package/test/cases/dom/customcontrol.mjs +1 -1
- package/test/cases/dom/customelement-initfromscripthost.mjs +1 -1
- package/test/cases/dom/customelement.mjs +1 -1
- package/test/cases/dom/resource/data.mjs +1 -1
- package/test/cases/dom/resource/link/stylesheet.mjs +1 -1
- package/test/cases/dom/resource/link.mjs +1 -1
- package/test/cases/dom/resource/script.mjs +1 -1
- package/test/cases/dom/updater.mjs +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,33 +2,59 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [3.77.0] - 2024-10-03
|
6
|
+
|
7
|
+
### Add Features
|
8
|
+
|
9
|
+
- multipleColumns [#242](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/242)
|
10
|
+
### Changes
|
11
|
+
|
12
|
+
- doc and code tidy
|
13
|
+
- update documentaion
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [3.76.0] - 2024-10-01
|
18
|
+
|
19
|
+
### Add Features
|
20
|
+
|
21
|
+
- new iframe control [#243](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/243)
|
22
|
+
### Bug Fixes
|
23
|
+
|
24
|
+
- chai import
|
25
|
+
- change order and fix detail-label [#245](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/245)
|
26
|
+
### Changes
|
27
|
+
|
28
|
+
- update nix and node
|
29
|
+
|
30
|
+
|
31
|
+
|
5
32
|
## [3.75.0] - 2024-09-23
|
6
33
|
|
7
34
|
### Add Features
|
8
35
|
|
9
36
|
- marker for select filter [#240](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/240)
|
37
|
+
|
10
38
|
### Changes
|
11
39
|
|
12
40
|
- remove unused files
|
13
41
|
- run webtests
|
14
42
|
- new development cert
|
43
|
+
|
15
44
|
### Documentation
|
16
45
|
|
17
46
|
- fix some small issues
|
18
47
|
|
19
|
-
|
20
|
-
|
21
48
|
## [3.74.0] - 2024-09-18
|
22
49
|
|
23
50
|
### Add Features
|
24
51
|
|
25
52
|
- new slider [#237](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/237)
|
53
|
+
|
26
54
|
### Bug Fixes
|
27
55
|
|
28
56
|
- performance tweak [#235](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/235)
|
29
57
|
|
30
|
-
|
31
|
-
|
32
58
|
## [3.73.9] - 2024-09-15
|
33
59
|
|
34
60
|
### Bug Fixes
|
@@ -36,32 +62,31 @@
|
|
36
62
|
- error handling [#234](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/234)
|
37
63
|
- build css
|
38
64
|
- Replace `sleep` with `requestAnimationFrame` for smoother UI [#234](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/234)
|
65
|
+
|
39
66
|
### Changes
|
40
67
|
|
41
68
|
- some small code tweaks
|
42
69
|
- code format
|
43
70
|
- update versions
|
44
71
|
- add issue example [#233](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/233)
|
72
|
+
|
45
73
|
### Documentation
|
46
74
|
|
47
75
|
- wip update document for new monsterjs.org site
|
48
76
|
|
49
|
-
|
50
|
-
|
51
77
|
## [3.73.8] - 2024-08-01
|
52
78
|
|
53
79
|
### Bug Fixes
|
54
80
|
|
55
81
|
- test pipeline
|
56
82
|
|
57
|
-
|
58
|
-
|
59
83
|
## [3.73.7] - 2024-08-01
|
60
84
|
|
61
85
|
### Bug Fixes
|
62
86
|
|
63
87
|
- update layout for filter and datatable [#232](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/232)
|
64
88
|
- new algorithm for calculating the position of the toc control. [#231](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/231)
|
89
|
+
|
65
90
|
### Changes
|
66
91
|
|
67
92
|
- check tests [#232](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/232)
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.11","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.11","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.77.0"}
|
@@ -97,7 +97,7 @@ class ChangeButton extends CustomElement {
|
|
97
97
|
}
|
98
98
|
|
99
99
|
/**
|
100
|
-
* To set the options via the
|
100
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
101
101
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
102
102
|
*
|
103
103
|
* The individual configuration values can be found in the table.
|
@@ -103,7 +103,7 @@ class ColumnBar extends CustomElement {
|
|
103
103
|
}
|
104
104
|
|
105
105
|
/**
|
106
|
-
* To set the options via the
|
106
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
107
107
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
108
108
|
*
|
109
109
|
* The individual configuration values can be found in the table.
|
@@ -100,7 +100,7 @@ class DataSet extends CustomElement {
|
|
100
100
|
}
|
101
101
|
|
102
102
|
/**
|
103
|
-
* To set the options via the
|
103
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
104
104
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
105
105
|
*
|
106
106
|
* The individual configuration values can be found in the table.
|
@@ -59,7 +59,7 @@ class Dom extends Datasource {
|
|
59
59
|
}
|
60
60
|
|
61
61
|
/**
|
62
|
-
* To set the options via the
|
62
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
63
63
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
64
64
|
*
|
65
65
|
* The individual configuration values can be found in the table.
|
@@ -100,7 +100,7 @@ class Rest extends Datasource {
|
|
100
100
|
}
|
101
101
|
|
102
102
|
/**
|
103
|
-
* To set the options via the
|
103
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
104
104
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
105
105
|
*
|
106
106
|
* The individual configuration values can be found in the table.
|
@@ -65,7 +65,7 @@ class Datasource extends CustomElement {
|
|
65
65
|
}
|
66
66
|
|
67
67
|
/**
|
68
|
-
* To set the options via the
|
68
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
69
69
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
70
70
|
*
|
71
71
|
* The individual configuration values can be found in the table.
|
@@ -153,7 +153,7 @@ class DataTable extends CustomElement {
|
|
153
153
|
}
|
154
154
|
|
155
155
|
/**
|
156
|
-
* To set the options via the
|
156
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
157
157
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
158
158
|
*
|
159
159
|
* The individual configuration values can be found in the table.
|
@@ -185,7 +185,7 @@ class DateRange extends AbstractBase {
|
|
185
185
|
}
|
186
186
|
|
187
187
|
/**
|
188
|
-
* To set the options via the
|
188
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
189
189
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
190
190
|
*
|
191
191
|
* The individual configuration values can be found in the table.
|
@@ -82,7 +82,7 @@ class Input extends AbstractBase {
|
|
82
82
|
}
|
83
83
|
|
84
84
|
/**
|
85
|
-
* To set the options via the
|
85
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
86
86
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
87
87
|
*
|
88
88
|
* The individual configuration values can be found in the table.
|
@@ -155,7 +155,7 @@ class Range extends AbstractBase {
|
|
155
155
|
}
|
156
156
|
|
157
157
|
/**
|
158
|
-
* To set the options via the
|
158
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
159
159
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
160
160
|
*
|
161
161
|
* The individual configuration values can be found in the table.
|
@@ -38,7 +38,7 @@ import { FilterSelectStyleSheet } from "../stylesheet/filter-select.mjs";
|
|
38
38
|
*/
|
39
39
|
class FilterSelect extends Select {
|
40
40
|
/**
|
41
|
-
* To set the options via the
|
41
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
42
42
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
43
43
|
*
|
44
44
|
* The individual configuration values can be found in the table.
|
@@ -70,7 +70,7 @@ class FilterButton extends ToggleButton {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
/**
|
73
|
-
* To set the options via the
|
73
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
74
74
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
75
75
|
*
|
76
76
|
* The individual configuration values can be found in the table.
|
@@ -207,7 +207,7 @@ class Filter extends CustomElement {
|
|
207
207
|
}
|
208
208
|
|
209
209
|
/**
|
210
|
-
* To set the options via the
|
210
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
211
211
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
212
212
|
*
|
213
213
|
* The individual configuration values can be found in the table.
|
@@ -100,7 +100,7 @@ class Pagination extends CustomElement {
|
|
100
100
|
}
|
101
101
|
|
102
102
|
/**
|
103
|
-
* To set the options via the
|
103
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
104
104
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
105
105
|
*
|
106
106
|
* The individual configuration values can be found in the table.
|
@@ -70,7 +70,7 @@ class SaveButton extends CustomElement {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
/**
|
73
|
-
* To set the options via the
|
73
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
74
74
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
75
75
|
*
|
76
76
|
* The individual configuration values can be found in the table.
|
@@ -95,7 +95,7 @@ class DatasourceStatus extends CustomElement {
|
|
95
95
|
}
|
96
96
|
|
97
97
|
/**
|
98
|
-
* To set the options via the
|
98
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
99
99
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
100
100
|
*
|
101
101
|
* The individual configuration values can be found in the table.
|
@@ -97,7 +97,7 @@ class ActionButton extends PopperButton {
|
|
97
97
|
}
|
98
98
|
|
99
99
|
/**
|
100
|
-
* To set the options via the
|
100
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
101
101
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
102
102
|
*
|
103
103
|
* The individual configuration values can be found in the table.
|
@@ -108,7 +108,7 @@ class ApiButton extends ActionButton {
|
|
108
108
|
}
|
109
109
|
|
110
110
|
/**
|
111
|
-
* To set the options via the
|
111
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
112
112
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
113
113
|
*
|
114
114
|
* The individual configuration values can be found in the table.
|
@@ -180,7 +180,7 @@ class ButtonBar extends CustomElement {
|
|
180
180
|
}
|
181
181
|
|
182
182
|
/**
|
183
|
-
* To set the options via the
|
183
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
184
184
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
185
185
|
*
|
186
186
|
* The individual configuration values can be found in the table.
|
@@ -179,7 +179,7 @@ class Button extends CustomControl {
|
|
179
179
|
}
|
180
180
|
|
181
181
|
/**
|
182
|
-
* To set the options via the
|
182
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
183
183
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
184
184
|
*
|
185
185
|
* The individual configuration values can be found in the table.
|
@@ -114,7 +114,7 @@ class ConfirmButton extends PopperButton {
|
|
114
114
|
}
|
115
115
|
|
116
116
|
/**
|
117
|
-
* To set the options via the
|
117
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
118
118
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
119
119
|
*
|
120
120
|
* The individual configuration values can be found in the table.
|
@@ -104,7 +104,7 @@ class ContextError extends Popper {
|
|
104
104
|
}
|
105
105
|
|
106
106
|
/**
|
107
|
-
* To set the options via the
|
107
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
108
108
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
109
109
|
*
|
110
110
|
* The individual configuration values can be found in the table.
|
@@ -228,7 +228,7 @@ class ContextError extends Popper {
|
|
228
228
|
}
|
229
229
|
|
230
230
|
/**
|
231
|
-
* Returns the
|
231
|
+
* Returns the HTML Tag of the control.
|
232
232
|
*
|
233
233
|
* @return {string}
|
234
234
|
*/
|
@@ -79,7 +79,7 @@ class ContextHelp extends Popper {
|
|
79
79
|
}
|
80
80
|
|
81
81
|
/**
|
82
|
-
* To set the options via the
|
82
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
83
83
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
84
84
|
*
|
85
85
|
* The individual configuration values can be found in the table.
|
@@ -67,39 +67,6 @@ const toggleSwitchElementSymbol = Symbol("toggleSwitchElement");
|
|
67
67
|
*/
|
68
68
|
const extendedSwitchElementSymbol = Symbol("extendedSwitchElement");
|
69
69
|
|
70
|
-
/**
|
71
|
-
* This CustomControl creates a FieldSet element with a variety of options.
|
72
|
-
*
|
73
|
-
* <img src="./images/field-set.png">
|
74
|
-
*
|
75
|
-
* You can create this control either by specifying the HTML tag <monster-field-set />` directly in the HTML or using
|
76
|
-
* Javascript via the `document.createElement('monster-field-set');` method.
|
77
|
-
*
|
78
|
-
* ```html
|
79
|
-
* <monster-field-set></monster-field-set>
|
80
|
-
* ```
|
81
|
-
*
|
82
|
-
* Or you can create this CustomControl directly in Javascript:
|
83
|
-
*
|
84
|
-
* ```js
|
85
|
-
* import {FieldSet} from '@schukai/monster/source/components/form/field-set.mjs';
|
86
|
-
* document.createElement('monster-field-set');
|
87
|
-
* ```
|
88
|
-
*
|
89
|
-
* @externalExample ../..../example/components/form/field-set.mjs
|
90
|
-
* @startuml field-set.png
|
91
|
-
* skinparam monochrome true
|
92
|
-
* skinparam shadowing false
|
93
|
-
* HTMLElement <|-- CustomElement
|
94
|
-
* CustomElement <|-- CustomControl
|
95
|
-
* CustomControl <|-- FieldSet
|
96
|
-
* @enduml
|
97
|
-
*
|
98
|
-
* @copyright schukai GmbH
|
99
|
-
* @memberOf Monster.Components.Form
|
100
|
-
* @summary A simple FieldSet
|
101
|
-
*/
|
102
|
-
|
103
70
|
/**
|
104
71
|
* A field set control that can be used to group form elements.
|
105
72
|
*
|
@@ -128,11 +95,12 @@ class FieldSet extends CustomControl {
|
|
128
95
|
initControlReferences.call(this);
|
129
96
|
initEventHandler.call(this);
|
130
97
|
updateExtendedFields.call(this);
|
98
|
+
updateColumns.call(this);
|
131
99
|
return this;
|
132
100
|
}
|
133
101
|
|
134
102
|
/**
|
135
|
-
* To set the options via the
|
103
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
136
104
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
137
105
|
*
|
138
106
|
* The individual configuration values can be found in the table.
|
@@ -143,6 +111,7 @@ class FieldSet extends CustomControl {
|
|
143
111
|
* @property {Object} actions Callbacks
|
144
112
|
* @property {string} actions.click="throw Error" Callback when clicked
|
145
113
|
* @property {Object} features Features
|
114
|
+
* @property {boolean} features.multipleColumns=true Multiple columns
|
146
115
|
* @property {Object} classes CSS classes
|
147
116
|
* @property {boolean} disabled=false Disabled state
|
148
117
|
*/
|
@@ -152,14 +121,16 @@ class FieldSet extends CustomControl {
|
|
152
121
|
main: getTemplate(),
|
153
122
|
},
|
154
123
|
labels: {
|
155
|
-
|
156
|
-
|
157
|
-
|
124
|
+
toggleSwitchOn: "✔",
|
125
|
+
toggleSwitchOff: "✖",
|
126
|
+
toggleSwitchLabel: "Expand",
|
158
127
|
title: "",
|
159
128
|
},
|
160
129
|
classes: {},
|
161
130
|
disabled: false,
|
162
|
-
features: {
|
131
|
+
features: {
|
132
|
+
multipleColumns: true,
|
133
|
+
},
|
163
134
|
actions: {
|
164
135
|
click: () => {
|
165
136
|
throw new Error("the click action is not defined");
|
@@ -257,7 +228,7 @@ class FieldSet extends CustomControl {
|
|
257
228
|
}
|
258
229
|
|
259
230
|
/**
|
260
|
-
* Set value of the form control.
|
231
|
+
* Set the value of the form control.
|
261
232
|
*
|
262
233
|
* ```
|
263
234
|
* e = document.querySelector('monster-field-set');
|
@@ -277,6 +248,9 @@ class FieldSet extends CustomControl {
|
|
277
248
|
}
|
278
249
|
}
|
279
250
|
|
251
|
+
/**
|
252
|
+
* @private
|
253
|
+
*/
|
280
254
|
function updateExtendedFields() {
|
281
255
|
const nodes = getSlottedElements.call(this, "", "extended");
|
282
256
|
if (nodes.size > 0) {
|
@@ -286,19 +260,32 @@ function updateExtendedFields() {
|
|
286
260
|
}
|
287
261
|
}
|
288
262
|
|
263
|
+
/**
|
264
|
+
* @private
|
265
|
+
*/
|
266
|
+
function updateColumns() {
|
267
|
+
if (this.getOption("features.multipleColumns") !== true) {
|
268
|
+
this[fieldSetElementSymbol].classList.remove("multiple-columns");
|
269
|
+
return;
|
270
|
+
}
|
271
|
+
|
272
|
+
this[fieldSetElementSymbol].classList.add("multiple-columns");
|
273
|
+
|
274
|
+
}
|
275
|
+
|
289
276
|
/**
|
290
277
|
* @private
|
291
278
|
* @return {initEventHandler}
|
292
|
-
* @fires
|
279
|
+
* @fires event:monster-field-set-clicked
|
293
280
|
*/
|
294
281
|
function initEventHandler() {
|
295
282
|
this[toggleSwitchElementSymbol].setOption(
|
296
|
-
"labels.
|
297
|
-
this.getOption("labels.
|
283
|
+
"labels.toggleSwitchOn",
|
284
|
+
this.getOption("labels.toggleSwitchOn"),
|
298
285
|
);
|
299
286
|
this[toggleSwitchElementSymbol].setOption(
|
300
|
-
"labels.
|
301
|
-
this.getOption("labels.
|
287
|
+
"labels.toggleSwitchOff",
|
288
|
+
this.getOption("labels.toggleSwitchOff"),
|
302
289
|
);
|
303
290
|
|
304
291
|
this[toggleSwitchElementSymbol].setOption("actions.on", () => {
|
@@ -123,7 +123,7 @@ class MessageStateButton extends Popper {
|
|
123
123
|
}
|
124
124
|
|
125
125
|
/**
|
126
|
-
* To set the options via the
|
126
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
127
127
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
128
128
|
*
|
129
129
|
* The individual configuration values can be found in the table.
|
@@ -154,7 +154,7 @@ class PopperButton extends Popper {
|
|
154
154
|
}
|
155
155
|
|
156
156
|
/**
|
157
|
-
* To set the options via the
|
157
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
158
158
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
159
159
|
*
|
160
160
|
* The individual configuration values can be found in the table.
|
@@ -128,7 +128,7 @@ class Reload extends CustomElement {
|
|
128
128
|
}
|
129
129
|
|
130
130
|
/**
|
131
|
-
* To set the options via the
|
131
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
132
132
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
133
133
|
*
|
134
134
|
* The individual configuration values can be found in the table.
|
@@ -347,7 +347,7 @@ class Select extends CustomControl {
|
|
347
347
|
}
|
348
348
|
|
349
349
|
/**
|
350
|
-
* To set the options via the
|
350
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
351
351
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
352
352
|
*
|
353
353
|
* The individual configuration values can be found in the table.
|
@@ -40,7 +40,7 @@ class ShadowReload extends Reload {
|
|
40
40
|
}
|
41
41
|
|
42
42
|
/**
|
43
|
-
* To set the options via the
|
43
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
44
44
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
45
45
|
*
|
46
46
|
* The individual configuration values can be found in the table.
|
@@ -46,7 +46,7 @@ class StateButton extends Button {
|
|
46
46
|
}
|
47
47
|
|
48
48
|
/**
|
49
|
-
* To set the options via the
|
49
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
50
50
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
51
51
|
*
|
52
52
|
* The individual configuration values can be found in the table.
|