@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.
Files changed (60) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +1 -1
  3. package/source/components/content/copy.mjs +475 -0
  4. package/source/components/content/style/copy.pcss +33 -0
  5. package/source/components/content/stylesheet/copy.mjs +31 -0
  6. package/source/components/datatable/change-button.mjs +1 -1
  7. package/source/components/datatable/columnbar.mjs +1 -1
  8. package/source/components/datatable/dataset.mjs +1 -1
  9. package/source/components/datatable/datasource/dom.mjs +1 -1
  10. package/source/components/datatable/datasource/rest.mjs +1 -1
  11. package/source/components/datatable/datasource.mjs +1 -1
  12. package/source/components/datatable/datatable.mjs +1 -1
  13. package/source/components/datatable/filter/date-range.mjs +1 -1
  14. package/source/components/datatable/filter/input.mjs +1 -1
  15. package/source/components/datatable/filter/range.mjs +1 -1
  16. package/source/components/datatable/filter/select.mjs +1 -1
  17. package/source/components/datatable/filter-button.mjs +1 -1
  18. package/source/components/datatable/filter.mjs +1 -1
  19. package/source/components/datatable/pagination.mjs +1 -1
  20. package/source/components/datatable/save-button.mjs +1 -1
  21. package/source/components/datatable/status.mjs +1 -1
  22. package/source/components/form/action-button.mjs +1 -1
  23. package/source/components/form/api-button.mjs +1 -1
  24. package/source/components/form/button-bar.mjs +1 -1
  25. package/source/components/form/button.mjs +1 -1
  26. package/source/components/form/confirm-button.mjs +1 -1
  27. package/source/components/form/context-error.mjs +2 -2
  28. package/source/components/form/context-help.mjs +1 -37
  29. package/source/components/form/field-set.mjs +31 -44
  30. package/source/components/form/message-state-button.mjs +1 -1
  31. package/source/components/form/popper-button.mjs +1 -1
  32. package/source/components/form/reload.mjs +1 -1
  33. package/source/components/form/select.mjs +1 -1
  34. package/source/components/form/shadow-reload.mjs +1 -1
  35. package/source/components/form/state-button.mjs +1 -1
  36. package/source/components/form/style/field-set.pcss +164 -70
  37. package/source/components/form/stylesheet/field-set.mjs +7 -14
  38. package/source/components/form/template.mjs +1 -1
  39. package/source/components/form/toggle-switch.mjs +321 -340
  40. package/source/components/form/tree-select.mjs +1 -1
  41. package/source/components/host/call-button.mjs +1 -1
  42. package/source/components/host/collapse.mjs +1 -1
  43. package/source/components/host/config-manager.mjs +1 -1
  44. package/source/components/host/host.mjs +1 -1
  45. package/source/components/host/overlay.mjs +1 -1
  46. package/source/components/host/toggle-button.mjs +1 -1
  47. package/source/components/host/viewer.mjs +1 -1
  48. package/source/components/layout/collapse.mjs +21 -21
  49. package/source/components/layout/details.mjs +11 -11
  50. package/source/components/layout/iframe.mjs +1 -1
  51. package/source/components/layout/panel.mjs +1 -1
  52. package/source/components/layout/popper.mjs +1 -1
  53. package/source/components/layout/slider.mjs +1 -1
  54. package/source/components/layout/split-panel.mjs +1 -1
  55. package/source/components/layout/tabs.mjs +1 -1
  56. package/source/components/layout/width-toggle.mjs +17 -9
  57. package/source/components/navigation/table-of-content.mjs +1 -1
  58. package/source/components/state/log.mjs +167 -153
  59. package/source/components/state/state.mjs +9 -33
  60. package/source/components/stylesheet/form.mjs +6 -13
@@ -78,7 +78,7 @@ class TreeSelect extends Select {
78
78
  }
79
79
 
80
80
  /**
81
- * To set the options via the html tag the attribute `data-monster-options` must be used.
81
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
82
82
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
83
83
  *
84
84
  * The individual configuration values can be found in the table.
@@ -95,7 +95,7 @@ class CallButton extends CustomElement {
95
95
  }
96
96
 
97
97
  /**
98
- * To set the options via the html tag the attribute `data-monster-options` must be used.
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.
@@ -19,6 +19,6 @@ export { Collapse };
19
19
  * @since 1.10.0
20
20
  * @copyright schukai GmbH
21
21
  * @memberOf Monster.Components.Form
22
- * @deprecated since 3.64.0 use {@link Monster.Components.Layout.Collapse}
22
+ * @deprecated since 3.64.0 use Layout.Collapse instead
23
23
  */
24
24
  class Collapse extends NewCollapse {}
@@ -116,7 +116,7 @@ class ConfigManager extends CustomElement {
116
116
  }
117
117
 
118
118
  /**
119
- * To set the options via the html tag the attribute `data-monster-options` must be used.
119
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
120
120
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
121
121
  *
122
122
  * The individual configuration values can be found in the table.
@@ -120,7 +120,7 @@ class Host extends CustomElement {
120
120
  }
121
121
 
122
122
  /**
123
- * To set the options via the html tag the attribute `data-monster-options` must be used.
123
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
124
124
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
125
125
  *
126
126
  * The individual configuration values can be found in the table.
@@ -119,7 +119,7 @@ class Overlay extends CustomElement {
119
119
  }
120
120
 
121
121
  /**
122
- * To set the options via the html tag the attribute `data-monster-options` must be used.
122
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
123
123
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
124
124
  *
125
125
  * The individual configuration values can be found in the table.
@@ -69,7 +69,7 @@ class ToggleButton extends CallButton {
69
69
  }
70
70
 
71
71
  /**
72
- * To set the options via the html tag the attribute `data-monster-options` must be used.
72
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
73
73
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
74
74
  *
75
75
  * The individual configuration values can be found in the table.
@@ -74,7 +74,7 @@ class Viewer extends CustomElement {
74
74
  }
75
75
 
76
76
  /**
77
- * To set the options via the html tag the attribute `data-monster-options` must be used.
77
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
78
78
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
79
79
  *
80
80
  * The individual configuration values can be found in the table.
@@ -109,7 +109,7 @@ class Collapse extends CustomElement {
109
109
  }
110
110
 
111
111
  /**
112
- * To set the options via the html tag the attribute `data-monster-options` must be used.
112
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
113
113
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
114
114
  *
115
115
  * The individual configuration values can be found in the table.
@@ -143,7 +143,7 @@ class Collapse extends CustomElement {
143
143
 
144
144
  /**
145
145
  *
146
- * @returns {Monster.Components.Host.Collapse}
146
+ * @returns {void}
147
147
  */
148
148
  [assembleMethodSymbol]() {
149
149
  super[assembleMethodSymbol]();
@@ -158,25 +158,22 @@ class Collapse extends CustomElement {
158
158
  }
159
159
 
160
160
  /**
161
- *
161
+ * @returns {void}
162
162
  */
163
163
  connectedCallback() {
164
164
  super.connectedCallback();
165
165
  updateResizeObserverObservation.call(this);
166
- // this[resizeObserverSymbol].observe(getDocument().body);
167
166
  }
168
167
 
169
168
  /**
170
- *
169
+ * @returns {void}
171
170
  */
172
171
  disconnectedCallback() {
173
172
  super.disconnectedCallback();
174
- //this[resizeObserverSymbol].disconnect();
175
173
  }
176
174
 
177
175
  /**
178
- *
179
- * @returns {Monster.Components.Host.Collapse}
176
+ * @returns {Collapse}
180
177
  */
181
178
  toggle() {
182
179
  if (this[detailsElementSymbol].classList.contains("active")) {
@@ -188,7 +185,6 @@ class Collapse extends CustomElement {
188
185
  }
189
186
 
190
187
  /**
191
- *
192
188
  * @returns {boolean}
193
189
  */
194
190
  isClosed() {
@@ -196,7 +192,6 @@ class Collapse extends CustomElement {
196
192
  }
197
193
 
198
194
  /**
199
- *
200
195
  * @returns {boolean}
201
196
  */
202
197
  isOpen() {
@@ -204,10 +199,10 @@ class Collapse extends CustomElement {
204
199
  }
205
200
 
206
201
  /**
207
- *
208
- * @returns {Monster.Components.Host.Collapse}
209
- * @fires Monster.Components.Host.Collapse.event:monster-collapse-before-open
210
- * @fires Monster.Components.Host.Collapse.event:monster-collapse-open
202
+ * Open the collapse
203
+ * @returns {Collapse}
204
+ * @fires event:monster-collapse-before-open
205
+ * @fires event:monster-collapse-open
211
206
  */
212
207
  open() {
213
208
  let node;
@@ -248,10 +243,10 @@ class Collapse extends CustomElement {
248
243
  }
249
244
 
250
245
  /**
251
- *
252
- * @returns {Monster.Components.Host.Collapse}
253
- * @fires Monster.Components.Host.Collapse.event:monster-collapse-before-close
254
- * @fires Monster.Components.Host.Collapse.event:monster-collapse-closed
246
+ * Close the collapse
247
+ * @returns {Collapse}
248
+ * @fires event:monster-collapse-before-close
249
+ * @fires event:monster-collapse-closed
255
250
  */
256
251
  close() {
257
252
  if (!this[detailsElementSymbol].classList.contains("active")) {
@@ -273,7 +268,6 @@ class Collapse extends CustomElement {
273
268
  }
274
269
 
275
270
  /**
276
- *
277
271
  * @return {string}
278
272
  */
279
273
  static getTag() {
@@ -289,8 +283,8 @@ class Collapse extends CustomElement {
289
283
 
290
284
  /**
291
285
  * This method is called when the element is inserted into a document, including into a shadow tree.
292
- * @return {Monster.Components.Host.Collapse}
293
- * @fires Monster.Components.Host.Collapse.event:monster-collapse-adjust-height
286
+ * @return {Collapse}
287
+ * @fires event:monster-collapse-adjust-height
294
288
  */
295
289
  adjustHeight() {
296
290
  adjustHeight.call(this);
@@ -298,6 +292,11 @@ class Collapse extends CustomElement {
298
292
  }
299
293
  }
300
294
 
295
+ /**
296
+ * @private
297
+ * @returns {void}
298
+ * @fires event:monster-collapse-adjust-height
299
+ */
301
300
  function adjustHeight() {
302
301
  let height = 0;
303
302
 
@@ -336,6 +335,7 @@ function adjustHeight() {
336
335
  height,
337
336
  "important",
338
337
  );
338
+
339
339
  fireCustomEvent(this, "monster-" + this[nameSymbol] + "-adjust-height", {});
340
340
  }
341
341
 
@@ -43,10 +43,14 @@ const buttonEventHandlerSymbol = Symbol("buttonEventHandler");
43
43
  * @fragments /fragments/components/layout/details/
44
44
  *
45
45
  * @example /examples/components/layout/details-simple
46
+ * @example /examples/components/layout/details-with-label
47
+ * @example /examples/components/layout/details-as-accordion
48
+ * @example /examples/components/layout/details-with-your-own-design
46
49
  *
47
50
  * @since 3.74.0
48
51
  * @copyright schukai GmbH
49
- * @summary A simple but cool Details component
52
+ * @summary A simple but cool detail component. This is based on the collapse component and extends it with a button.
53
+ * @summary You can also easily build an accordion from the component.
50
54
  */
51
55
  class Details extends Collapse {
52
56
  /**
@@ -67,20 +71,15 @@ class Details extends Collapse {
67
71
  }
68
72
 
69
73
  /**
70
- * To set the options via the html tag the attribute `data-monster-options` must be used.
74
+ * To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
71
75
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
72
76
  *
73
77
  * The individual configuration values can be found in the table.
74
78
  *
75
79
  * @property {Object} templates Template definitions
76
80
  * @property {string} templates.main Main template
77
- * @property {Object} classes CSS classes
78
- * @property {string} classes.button CSS class for the button
79
81
  * @property {Object} button Button configuration
80
82
  * @property {string} button.label Button label
81
- * @property {Object} features Feature configuration
82
- * @property {boolean} features.accordion Enable accordion mode
83
- * @property {boolean} features.persistState Persist the state in the host configuration
84
83
  */
85
84
  get defaults() {
86
85
  return Object.assign({}, super.defaults, {
@@ -94,8 +93,7 @@ class Details extends Collapse {
94
93
  }
95
94
 
96
95
  /**
97
- *
98
- * @returns {Monster.Components.Layout.Details}
96
+ * @returns {void}
99
97
  */
100
98
  [assembleMethodSymbol]() {
101
99
  super[assembleMethodSymbol]();
@@ -105,6 +103,9 @@ class Details extends Collapse {
105
103
  initEventHandler.call(this);
106
104
  }
107
105
 
106
+ /**
107
+ * @returns {void}
108
+ */
108
109
  connectedCallback() {
109
110
  super.connectedCallback();
110
111
 
@@ -119,7 +120,6 @@ class Details extends Collapse {
119
120
  }
120
121
 
121
122
  /**
122
- *
123
123
  * @return {string}
124
124
  */
125
125
  static getTag() {
@@ -127,7 +127,7 @@ class Details extends Collapse {
127
127
  }
128
128
 
129
129
  /**
130
- * @return {Array<CSSStyleSheet>}
130
+ * @returns {Array<CSSStyleSheet>}
131
131
  */
132
132
  static getCSSStyleSheet() {
133
133
  const css = super.getCSSStyleSheet();
@@ -113,7 +113,7 @@ class Iframe extends CustomElement {
113
113
  }
114
114
 
115
115
  /**
116
- * To set the options via the HTML Tag the attribute `data-monster-options` must be used.
116
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
117
117
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
118
118
  *
119
119
  * The individual configuration values can be found in the table.
@@ -64,7 +64,7 @@ class Panel extends CustomElement {
64
64
  }
65
65
 
66
66
  /**
67
- * To set the options via the html tag the attribute `data-monster-options` must be used.
67
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
68
68
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
69
69
  *
70
70
  * The individual configuration values can be found in the table.
@@ -105,7 +105,7 @@ class Popper extends CustomElement {
105
105
  }
106
106
 
107
107
  /**
108
- * To set the options via the html tag the attribute `data-monster-options` must be used.
108
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
109
109
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
110
110
  *
111
111
  * The individual configuration values can be found in the table.
@@ -104,7 +104,7 @@ class Slider extends CustomElement {
104
104
  }
105
105
 
106
106
  /**
107
- * To set the options via the html tag the attribute `data-monster-options` must be used.
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.
@@ -87,7 +87,7 @@ class SplitPanel extends CustomElement {
87
87
  }
88
88
 
89
89
  /**
90
- * To set the options via the html tag the attribute `data-monster-options` must be used.
90
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
91
91
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
92
92
  *
93
93
  * The individual configuration values can be found in the table.
@@ -162,7 +162,7 @@ class Tabs extends CustomElement {
162
162
  }
163
163
 
164
164
  /**
165
- * To set the options via the html tag the attribute `data-monster-options` must be used.
165
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
166
166
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
167
167
  *
168
168
  * The individual configuration values can be found in the table.
@@ -45,12 +45,11 @@ const toggleElementSymbol = Symbol("toggleElement");
45
45
  const insideElementSymbol = Symbol("insideElement");
46
46
 
47
47
  /**
48
- *
49
48
  * @type {string}
50
49
  */
51
50
  const MODE_SMALL = "small";
51
+
52
52
  /**
53
- *
54
53
  * @type {string}
55
54
  */
56
55
  const MODE_WIDE = "wide";
@@ -64,7 +63,9 @@ const MODE_WIDE = "wide";
64
63
  *
65
64
  * @since 3.57.0
66
65
  * @copyright schukai GmbH
67
- * @summary The WidthToggle component is used to change the width of a panel by clicking on a button.
66
+ * @summary The WidthToggle component allows users to dynamically change the width of a panel by clicking a button.
67
+ * @summary This feature improves readability and space utilization by allowing the panel width to be adjusted
68
+ * @summary according to user preferences.
68
69
  */
69
70
  class WidthToggle extends CustomElement {
70
71
  /**
@@ -78,7 +79,7 @@ class WidthToggle extends CustomElement {
78
79
  }
79
80
 
80
81
  /**
81
- * To set the options via the html tag the attribute `data-monster-options` must be used.
82
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
82
83
  * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
83
84
  *
84
85
  * The individual configuration values can be found in the table.
@@ -105,8 +106,7 @@ class WidthToggle extends CustomElement {
105
106
  }
106
107
 
107
108
  /**
108
- *
109
- * @returns {Monster.Components.Host.Viewer}
109
+ * @returns {void}
110
110
  */
111
111
  [assembleMethodSymbol]() {
112
112
  super[assembleMethodSymbol]();
@@ -123,6 +123,13 @@ class WidthToggle extends CustomElement {
123
123
  * @return {Object} - Returns the current object instance for chaining.
124
124
  * @throws {Error} - If the mode is not supported.
125
125
  */
126
+
127
+
128
+ /**
129
+ * @param {string} mode
130
+ * @returns {WidthToggle}
131
+ * @throws {Error} no shadow-root is defined
132
+ */
126
133
  setWidth(mode) {
127
134
  applyContainerWidth.call(this, mode);
128
135
  return this;
@@ -137,7 +144,7 @@ class WidthToggle extends CustomElement {
137
144
  }
138
145
 
139
146
  /**
140
- * @return {CSSStyleSheet[]}
147
+ * @returns {CSSStyleSheet[]}
141
148
  */
142
149
  static getCSSStyleSheet() {
143
150
  return [WidthToggleStyleSheet];
@@ -146,8 +153,9 @@ class WidthToggle extends CustomElement {
146
153
 
147
154
  /**
148
155
  * Set the dimensions of the panel based on the split type.
149
- * @param {string} mode - The mode of the panel. Possible values are "wide" or "small".
150
- * @fires Monster.Components.Layout.event:monster-dimension-changed
156
+ * @param {string} mode
157
+ * @throws {Error} no shadow-root is defined
158
+ * @private
151
159
  */
152
160
  function applyContainerWidth(mode) {
153
161
  const width = this.getOption("width." + mode);
@@ -103,7 +103,7 @@ class TableOfContent extends CustomElement {
103
103
  }
104
104
 
105
105
  /**
106
- * To set the options via the html tag the attribute `data-monster-options` must be used.
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.