@schukai/monster 3.76.0 → 3.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/package.json +1 -1
- package/source/components/content/copy.mjs +475 -0
- package/source/components/content/style/copy.pcss +33 -0
- package/source/components/content/stylesheet/copy.mjs +31 -0
- 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 -37
- 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 +21 -21
- package/source/components/layout/details.mjs +11 -11
- package/source/components/layout/iframe.mjs +1 -1
- package/source/components/layout/panel.mjs +1 -1
- package/source/components/layout/popper.mjs +1 -1
- package/source/components/layout/slider.mjs +1 -1
- package/source/components/layout/split-panel.mjs +1 -1
- package/source/components/layout/tabs.mjs +1 -1
- package/source/components/layout/width-toggle.mjs +17 -9
- 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
|
@@ -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
|
*/
|
|
@@ -20,42 +20,6 @@ import { Popper } from "./popper.mjs";
|
|
|
20
20
|
|
|
21
21
|
export { ContextHelp };
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* The ContextHelp ist an element that can be used to display a tooltip or a popover.
|
|
25
|
-
*
|
|
26
|
-
* <img src="./images/context-help.png">
|
|
27
|
-
*
|
|
28
|
-
* Dependencies: the system uses functions of the [monsterjs](https://monsterjs.org/) library
|
|
29
|
-
* as well as [pooperjs](https://popper.js.org/docs/v2/).
|
|
30
|
-
*
|
|
31
|
-
* You can create this control either by specifying the HTML tag <monster-context-help-button />` directly in the HTML or using
|
|
32
|
-
* Javascript via the `document.createElement('monster-context-help');` method.
|
|
33
|
-
*
|
|
34
|
-
* ```html
|
|
35
|
-
* <monster-context-help></monster-context-help>
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* Or you can create this CustomControl directly in Javascript:
|
|
39
|
-
*
|
|
40
|
-
* ```js
|
|
41
|
-
* import {Popper} from '@schukai/monster/components/form/context-help.mjs';
|
|
42
|
-
* document.createElement('monster-context-help');
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @startuml context-help.png
|
|
46
|
-
* skinparam monochrome true
|
|
47
|
-
* skinparam shadowing false
|
|
48
|
-
* HTMLElement <|-- CustomElement
|
|
49
|
-
* CustomElement <|-- CustomControl
|
|
50
|
-
* CustomControl <|-- Popper
|
|
51
|
-
* Popper <|-- ContextHelp
|
|
52
|
-
* @enduml
|
|
53
|
-
*
|
|
54
|
-
* @copyright schukai GmbH
|
|
55
|
-
* @memberOf Monster.Components.Form
|
|
56
|
-
* @summary A control that can be used to display a tooltip or a popover.
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
23
|
/**
|
|
60
24
|
* A context help control.
|
|
61
25
|
*
|
|
@@ -79,7 +43,7 @@ class ContextHelp extends Popper {
|
|
|
79
43
|
}
|
|
80
44
|
|
|
81
45
|
/**
|
|
82
|
-
* To set the options via the
|
|
46
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
|
83
47
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
|
84
48
|
*
|
|
85
49
|
* 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.
|