@schukai/monster 3.71.3 → 3.72.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/package.json +1 -1
  3. package/source/components/datatable/dataset.mjs +272 -272
  4. package/source/components/datatable/datasource/dom.mjs +2 -2
  5. package/source/components/datatable/datasource/rest.mjs +408 -410
  6. package/source/components/datatable/filter.mjs +0 -1
  7. package/source/components/datatable/style/datatable.pcss +7 -5
  8. package/source/components/datatable/style/embedded-pagination.pcss +1 -1
  9. package/source/components/datatable/style/pagination.pcss +1 -1
  10. package/source/components/datatable/stylesheet/change-button.mjs +2 -4
  11. package/source/components/datatable/stylesheet/column-bar.mjs +2 -4
  12. package/source/components/datatable/stylesheet/dataset.mjs +2 -4
  13. package/source/components/datatable/stylesheet/datasource.mjs +1 -3
  14. package/source/components/datatable/stylesheet/datatable.mjs +2 -4
  15. package/source/components/datatable/stylesheet/embedded-pagination.mjs +1 -1
  16. package/source/components/datatable/stylesheet/filter-button.mjs +1 -3
  17. package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +14 -7
  18. package/source/components/datatable/stylesheet/filter-date-range.mjs +1 -3
  19. package/source/components/datatable/stylesheet/filter-range.mjs +1 -3
  20. package/source/components/datatable/stylesheet/filter.mjs +2 -4
  21. package/source/components/datatable/stylesheet/pagination.mjs +2 -4
  22. package/source/components/datatable/stylesheet/save-button.mjs +2 -4
  23. package/source/components/datatable/stylesheet/select-filter.mjs +2 -4
  24. package/source/components/datatable/stylesheet/status.mjs +2 -4
  25. package/source/components/form/field-set.mjs +219 -219
  26. package/source/components/form/form.mjs +137 -187
  27. package/source/components/form/reload.mjs +211 -211
  28. package/source/components/form/select.mjs +12 -13
  29. package/source/components/form/style/field-set.pcss +2 -2
  30. package/source/components/form/style/form.pcss +8 -0
  31. package/source/components/form/stylesheet/action-button.mjs +2 -4
  32. package/source/components/form/stylesheet/api-button.mjs +1 -3
  33. package/source/components/form/stylesheet/button-bar.mjs +2 -4
  34. package/source/components/form/stylesheet/button.mjs +2 -4
  35. package/source/components/form/stylesheet/confirm-button.mjs +2 -4
  36. package/source/components/form/stylesheet/context-error.mjs +2 -4
  37. package/source/components/form/stylesheet/context-help.mjs +2 -4
  38. package/source/components/form/stylesheet/field-set.mjs +14 -7
  39. package/source/components/form/stylesheet/form.mjs +1 -1
  40. package/source/components/form/stylesheet/message-state-button.mjs +1 -3
  41. package/source/components/form/stylesheet/popper-button.mjs +2 -4
  42. package/source/components/form/stylesheet/select.mjs +14 -7
  43. package/source/components/form/stylesheet/state-button.mjs +2 -4
  44. package/source/components/form/stylesheet/tree-select.mjs +1 -3
  45. package/source/components/host/stylesheet/call-button.mjs +2 -4
  46. package/source/components/host/stylesheet/config-manager.mjs +1 -3
  47. package/source/components/host/stylesheet/host.mjs +2 -4
  48. package/source/components/host/stylesheet/overlay.mjs +2 -4
  49. package/source/components/host/stylesheet/toggle-button.mjs +2 -4
  50. package/source/components/host/stylesheet/viewer.mjs +2 -4
  51. package/source/components/layout/style/collapse.pcss +2 -2
  52. package/source/components/layout/style/details.pcss +2 -2
  53. package/source/components/layout/stylesheet/collapse.mjs +14 -7
  54. package/source/components/layout/stylesheet/details.mjs +2 -4
  55. package/source/components/layout/stylesheet/panel.mjs +2 -4
  56. package/source/components/layout/stylesheet/popper.mjs +2 -4
  57. package/source/components/layout/stylesheet/split-panel.mjs +1 -3
  58. package/source/components/layout/stylesheet/tabs.mjs +2 -4
  59. package/source/components/layout/stylesheet/width-toggle.mjs +1 -3
  60. package/source/components/navigation/stylesheet/table-of-content.mjs +2 -4
  61. package/source/components/notify/stylesheet/message.mjs +2 -4
  62. package/source/components/notify/stylesheet/notify.mjs +2 -4
  63. package/source/components/state/stylesheet/log.mjs +2 -4
  64. package/source/components/state/stylesheet/state.mjs +2 -4
  65. package/source/components/style/control.pcss +5 -0
  66. package/source/components/style/data-grid.pcss +2 -2
  67. package/source/components/style/mixin/typography.pcss +7 -1
  68. package/source/components/style/normalize.pcss +1 -1
  69. package/source/components/stylesheet/badge.mjs +1 -3
  70. package/source/components/stylesheet/border.mjs +1 -3
  71. package/source/components/stylesheet/button.mjs +1 -3
  72. package/source/components/stylesheet/card.mjs +1 -3
  73. package/source/components/stylesheet/color.mjs +1 -3
  74. package/source/components/stylesheet/common.mjs +1 -3
  75. package/source/components/stylesheet/control.mjs +2 -4
  76. package/source/components/stylesheet/data-grid.mjs +2 -4
  77. package/source/components/stylesheet/display.mjs +1 -3
  78. package/source/components/stylesheet/floating-ui.mjs +1 -3
  79. package/source/components/stylesheet/form.mjs +13 -6
  80. package/source/components/stylesheet/host.mjs +1 -3
  81. package/source/components/stylesheet/icons.mjs +1 -3
  82. package/source/components/stylesheet/mixin/badge.mjs +1 -3
  83. package/source/components/stylesheet/mixin/button.mjs +1 -3
  84. package/source/components/stylesheet/mixin/form.mjs +13 -6
  85. package/source/components/stylesheet/mixin/hover.mjs +1 -3
  86. package/source/components/stylesheet/mixin/icon.mjs +1 -3
  87. package/source/components/stylesheet/mixin/media.mjs +1 -3
  88. package/source/components/stylesheet/mixin/property.mjs +13 -6
  89. package/source/components/stylesheet/mixin/skeleton.mjs +1 -3
  90. package/source/components/stylesheet/mixin/spinner.mjs +1 -3
  91. package/source/components/stylesheet/mixin/typography.mjs +1 -3
  92. package/source/components/stylesheet/normalize.mjs +1 -3
  93. package/source/components/stylesheet/popper.mjs +1 -3
  94. package/source/components/stylesheet/property.mjs +2 -4
  95. package/source/components/stylesheet/ripple.mjs +1 -3
  96. package/source/components/stylesheet/skeleton.mjs +1 -3
  97. package/source/components/stylesheet/space.mjs +1 -3
  98. package/source/components/stylesheet/spinner.mjs +1 -3
  99. package/source/components/stylesheet/table.mjs +1 -3
  100. package/source/components/stylesheet/theme.mjs +1 -3
  101. package/source/components/stylesheet/typography.mjs +13 -6
  102. package/source/components/tree-menu/dragable-tree-menu.mjs +693 -0
  103. package/source/components/tree-menu/style/tree-menu.pcss +69 -42
  104. package/source/components/tree-menu/stylesheet/tree-menu.mjs +8 -17
  105. package/source/components/tree-menu/tree-menu.mjs +468 -532
  106. package/source/data/datasource/server/restapi.mjs +194 -191
  107. package/source/data/datasource/server.mjs +107 -105
  108. package/source/data/diff.mjs +1 -1
  109. package/source/dom/customelement.mjs +2 -6
  110. package/source/dom/slotted.mjs +89 -85
  111. package/test/cases/components/host/details.mjs +1 -1
  112. package/test/cases/components/host/host.mjs +1 -1
  113. package/test/cases/components/host/overlay.mjs +1 -1
  114. package/test/cases/dom/customcontrol.mjs +1 -1
  115. package/test/cases/dom/customelement.mjs +2 -2
@@ -12,24 +12,24 @@
12
12
  * SPDX-License-Identifier: AGPL-3.0
13
13
  */
14
14
 
15
- import {instanceSymbol} from "../../constants.mjs";
16
- import {addAttributeToken} from "../../dom/attributes.mjs";
15
+ import { instanceSymbol } from "../../constants.mjs";
16
+ import { addAttributeToken } from "../../dom/attributes.mjs";
17
17
  import {
18
- ATTRIBUTE_ERRORMESSAGE,
19
- ATTRIBUTE_ROLE,
18
+ ATTRIBUTE_ERRORMESSAGE,
19
+ ATTRIBUTE_ROLE,
20
20
  } from "../../dom/constants.mjs";
21
21
  import {
22
- assembleMethodSymbol,
23
- attributeObserverSymbol,
24
- CustomElement,
25
- initMethodSymbol,
26
- registerCustomElement,
22
+ assembleMethodSymbol,
23
+ attributeObserverSymbol,
24
+ CustomElement,
25
+ initMethodSymbol,
26
+ registerCustomElement,
27
27
  } from "../../dom/customelement.mjs";
28
- import {isString} from "../../types/is.mjs";
29
- import {ATTRIBUTE_FORM_RELOAD, ATTRIBUTE_FORM_URL} from "./constants.mjs";
30
- import {loadAndAssignContent} from "./util/fetch.mjs";
28
+ import { isString } from "../../types/is.mjs";
29
+ import { ATTRIBUTE_FORM_RELOAD, ATTRIBUTE_FORM_URL } from "./constants.mjs";
30
+ import { loadAndAssignContent } from "./util/fetch.mjs";
31
31
 
32
- export {Reload};
32
+ export { Reload };
33
33
 
34
34
  /**
35
35
  * @private
@@ -106,128 +106,128 @@ const intersectionObserverWasInitialized = Symbol("wasInitialized");
106
106
  * @fires Monster.Components.event:monster-fetched
107
107
  */
108
108
  class Reload extends CustomElement {
109
- /**
110
- * This method is called by the `instanceof` operator.
111
- * @returns {symbol}
112
- * @since 2.1.0
113
- */
114
- static get [instanceSymbol]() {
115
- return Symbol.for("@schukai/monster/components/form/reload");
116
- }
117
-
118
- /**
119
- * To set the options via the html tag the attribute `data-monster-options` must be used.
120
- * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
121
- *
122
- * The individual configuration values can be found in the table.
123
- *
124
- * @property {Object} templates Template definitions
125
- * @property {string} templates.main Main template
126
- * @property {string} url=undefined
127
- * @property {string} reload=undefined currently the values defined are `onshow` and `always`. The default `onshow` removes the IntersectionObserver. This means that the content is only loaded once. reloading of the content does not occur.
128
- * @property {string} filter=undefined dom selectors to search for elements, if undefined then everything is taken
129
- * @property {Monster.Components.Form.Processor[]} processors
130
- * @property {Object} fetch Fetch [see Using Fetch mozilla.org](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
131
- * @property {String} fetch.redirect=error
132
- * @property {String} fetch.method=GET
133
- * @property {String} fetch.mode=same-origin
134
- * @property {String} fetch.credentials=same-origin
135
- * @property {Object} fetch.headers={"accept":"text/html"}}
136
- */
137
- get defaults() {
138
- return Object.assign(
139
- {},
140
- super.defaults,
141
- {
142
- templates: {
143
- main: getTemplate.call(this),
144
- },
145
- shadowMode: null,
146
- url: null,
147
- reload: "onshow",
148
- filter: null,
149
- fetch: {
150
- redirect: "error",
151
- method: "GET",
152
- mode: "same-origin",
153
- credentials: "same-origin",
154
- headers: {
155
- accept: "text/html",
156
- },
157
- },
158
- },
159
- initOptionsFromArguments.call(this),
160
- );
161
- }
162
-
163
- /**
164
- * This method determines which attributes are to be monitored by `attributeChangedCallback()`.
165
- *
166
- * @return {string[]}
167
- */
168
- static get observedAttributes() {
169
- const list = super.observedAttributes;
170
- list.push(ATTRIBUTE_FORM_URL);
171
- return list;
172
- }
173
-
174
- /**
175
- * @return {void}
176
- */
177
- [initMethodSymbol]() {
178
- super[initMethodSymbol]();
179
-
180
- // data-monster-options
181
- this[attributeObserverSymbol][ATTRIBUTE_FORM_URL] = (url) => {
182
- if (this.hasAttribute(ATTRIBUTE_FORM_URL)) {
183
- this.setOption("url", new URL(url, document.location).toString());
184
- } else {
185
- this.setOption("url", undefined);
186
- }
187
- };
188
- }
189
-
190
- /**
191
- * This method is called internal and should not be called directly.
192
- * @throws {Error} missing default slot
193
- * @throws {Error} no shadow-root is defined
194
- * @throws {Error} missing url
195
- * @throws {Error} we won't be able to read the data
196
- * @throws {Error} request failed
197
- * @throws {Error} not found
198
- * @throws {Error} undefined status or type
199
- * @fires Monster.Components.event:monster-fetched
200
- * @return {Monster.Components.Form.Form}
201
- */
202
- [assembleMethodSymbol]() {
203
- super[assembleMethodSymbol]();
204
- initIntersectionObserver.call(this);
205
- }
206
-
207
- /**
208
- * This method is called internal and should not be called directly.
209
- *
210
- * @return {string}
211
- */
212
- static getTag() {
213
- return "monster-reload";
214
- }
215
-
216
- /**
217
- * load content from url
218
- *
219
- * It is important to know that with this function the loading is executed
220
- * directly. it is loaded as well when the element is not visible.
221
- *
222
- * @param {string|undefined} url
223
- */
224
- fetch(url) {
225
- if (isString(url) || url instanceof URL) {
226
- this.setAttribute(ATTRIBUTE_FORM_URL, `${url}`);
227
- }
228
-
229
- return loadContent.call(this);
230
- }
109
+ /**
110
+ * This method is called by the `instanceof` operator.
111
+ * @returns {symbol}
112
+ * @since 2.1.0
113
+ */
114
+ static get [instanceSymbol]() {
115
+ return Symbol.for("@schukai/monster/components/form/reload");
116
+ }
117
+
118
+ /**
119
+ * To set the options via the html tag the attribute `data-monster-options` must be used.
120
+ * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
121
+ *
122
+ * The individual configuration values can be found in the table.
123
+ *
124
+ * @property {Object} templates Template definitions
125
+ * @property {string} templates.main Main template
126
+ * @property {string} url=undefined
127
+ * @property {string} reload=undefined currently the values defined are `onshow` and `always`. The default `onshow` removes the IntersectionObserver. This means that the content is only loaded once. reloading of the content does not occur.
128
+ * @property {string} filter=undefined dom selectors to search for elements, if undefined then everything is taken
129
+ * @property {Monster.Components.Form.Processor[]} processors
130
+ * @property {Object} fetch Fetch [see Using Fetch mozilla.org](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
131
+ * @property {String} fetch.redirect=error
132
+ * @property {String} fetch.method=GET
133
+ * @property {String} fetch.mode=same-origin
134
+ * @property {String} fetch.credentials=same-origin
135
+ * @property {Object} fetch.headers={"accept":"text/html"}}
136
+ */
137
+ get defaults() {
138
+ return Object.assign(
139
+ {},
140
+ super.defaults,
141
+ {
142
+ templates: {
143
+ main: getTemplate.call(this),
144
+ },
145
+ shadowMode: null,
146
+ url: null,
147
+ reload: "onshow",
148
+ filter: null,
149
+ fetch: {
150
+ redirect: "error",
151
+ method: "GET",
152
+ mode: "same-origin",
153
+ credentials: "same-origin",
154
+ headers: {
155
+ accept: "text/html",
156
+ },
157
+ },
158
+ },
159
+ initOptionsFromArguments.call(this),
160
+ );
161
+ }
162
+
163
+ /**
164
+ * This method determines which attributes are to be monitored by `attributeChangedCallback()`.
165
+ *
166
+ * @return {string[]}
167
+ */
168
+ static get observedAttributes() {
169
+ const list = super.observedAttributes;
170
+ list.push(ATTRIBUTE_FORM_URL);
171
+ return list;
172
+ }
173
+
174
+ /**
175
+ * @return {void}
176
+ */
177
+ [initMethodSymbol]() {
178
+ super[initMethodSymbol]();
179
+
180
+ // data-monster-options
181
+ this[attributeObserverSymbol][ATTRIBUTE_FORM_URL] = (url) => {
182
+ if (this.hasAttribute(ATTRIBUTE_FORM_URL)) {
183
+ this.setOption("url", new URL(url, document.location).toString());
184
+ } else {
185
+ this.setOption("url", undefined);
186
+ }
187
+ };
188
+ }
189
+
190
+ /**
191
+ * This method is called internal and should not be called directly.
192
+ * @throws {Error} missing default slot
193
+ * @throws {Error} no shadow-root is defined
194
+ * @throws {Error} missing url
195
+ * @throws {Error} we won't be able to read the data
196
+ * @throws {Error} request failed
197
+ * @throws {Error} not found
198
+ * @throws {Error} undefined status or type
199
+ * @fires Monster.Components.event:monster-fetched
200
+ * @return {Monster.Components.Form.Form}
201
+ */
202
+ [assembleMethodSymbol]() {
203
+ super[assembleMethodSymbol]();
204
+ initIntersectionObserver.call(this);
205
+ }
206
+
207
+ /**
208
+ * This method is called internal and should not be called directly.
209
+ *
210
+ * @return {string}
211
+ */
212
+ static getTag() {
213
+ return "monster-reload";
214
+ }
215
+
216
+ /**
217
+ * load content from url
218
+ *
219
+ * It is important to know that with this function the loading is executed
220
+ * directly. it is loaded as well when the element is not visible.
221
+ *
222
+ * @param {string|undefined} url
223
+ */
224
+ fetch(url) {
225
+ if (isString(url) || url instanceof URL) {
226
+ this.setAttribute(ATTRIBUTE_FORM_URL, `${url}`);
227
+ }
228
+
229
+ return loadContent.call(this);
230
+ }
231
231
  }
232
232
 
233
233
  /**
@@ -241,19 +241,19 @@ class Reload extends CustomElement {
241
241
  * @return {object}
242
242
  */
243
243
  function initOptionsFromArguments() {
244
- const options = {};
244
+ const options = {};
245
245
 
246
- const url = this.getAttribute(ATTRIBUTE_FORM_URL);
246
+ const url = this.getAttribute(ATTRIBUTE_FORM_URL);
247
247
 
248
- if (isString(url)) {
249
- options["url"] = new URL(url, document.location).toString();
250
- }
248
+ if (isString(url)) {
249
+ options["url"] = new URL(url, document.location).toString();
250
+ }
251
251
 
252
- if (this.hasAttribute(ATTRIBUTE_FORM_RELOAD)) {
253
- options["reload"] = this.getAttribute(ATTRIBUTE_FORM_RELOAD).toLowerCase();
254
- }
252
+ if (this.hasAttribute(ATTRIBUTE_FORM_RELOAD)) {
253
+ options["reload"] = this.getAttribute(ATTRIBUTE_FORM_RELOAD).toLowerCase();
254
+ }
255
255
 
256
- return options;
256
+ return options;
257
257
  }
258
258
 
259
259
  /**
@@ -268,37 +268,37 @@ function initOptionsFromArguments() {
268
268
  * @fires Monster.Components.event:monster-fetched
269
269
  */
270
270
  function initIntersectionObserver() {
271
- if (this[intersectionObserverWasInitialized] === true) {
272
- return;
273
- }
274
-
275
- this[intersectionObserverWasInitialized] = true;
276
-
277
- const options = {
278
- threshold: [0.5],
279
- };
280
-
281
- const callback = (entries, observer) => {
282
- for (const [, entry] of entries.entries()) {
283
- if (entry.isIntersecting === true) {
284
- // undefined or always do the same
285
- if (this.getOption("reload") === "onshow") {
286
- observer.disconnect();
287
- }
288
-
289
- try {
290
- loadContent.call(this).catch((e) => {
291
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.toString());
292
- });
293
- } catch (e) {
294
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.toString());
295
- }
296
- }
297
- }
298
- };
299
-
300
- const observer = new IntersectionObserver(callback, options);
301
- observer.observe(this);
271
+ if (this[intersectionObserverWasInitialized] === true) {
272
+ return;
273
+ }
274
+
275
+ this[intersectionObserverWasInitialized] = true;
276
+
277
+ const options = {
278
+ threshold: [0.5],
279
+ };
280
+
281
+ const callback = (entries, observer) => {
282
+ for (const [, entry] of entries.entries()) {
283
+ if (entry.isIntersecting === true) {
284
+ // undefined or always do the same
285
+ if (this.getOption("reload") === "onshow") {
286
+ observer.disconnect();
287
+ }
288
+
289
+ try {
290
+ loadContent.call(this).catch((e) => {
291
+ addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.toString());
292
+ });
293
+ } catch (e) {
294
+ addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.toString());
295
+ }
296
+ }
297
+ }
298
+ };
299
+
300
+ const observer = new IntersectionObserver(callback, options);
301
+ observer.observe(this);
302
302
  }
303
303
 
304
304
  /**
@@ -318,41 +318,41 @@ function initIntersectionObserver() {
318
318
  * @return {Promise}
319
319
  */
320
320
  function loadContent() {
321
- const url = this.getOption("url", undefined);
322
- if (!isString(url) || url === "") {
323
- throw new Error("missing url");
324
- }
325
-
326
- const options = this.getOption("fetch", {});
327
-
328
- let parentNode = this;
329
- if (this.shadowRoot) {
330
- parentNode = this.shadowRoot;
331
- }
332
-
333
- let container = parentNode.querySelector(`[${ATTRIBUTE_ROLE}=container]`);
334
- let currentDisplayMode = container?.style?.display;
335
-
336
- if (currentDisplayMode === undefined) {
337
- currentDisplayMode = "inherit";
338
- }
339
-
340
- if (!(container instanceof HTMLElement)) {
341
- container = document.createElement("div");
342
- container.style.display = "none";
343
- container.setAttribute(ATTRIBUTE_ROLE, "container");
344
- parentNode.appendChild(container);
345
- }
346
-
347
- return loadAndAssignContent(container, url, options, this.getOption("filter"))
348
- .then(() => {
349
- if (currentDisplayMode !== undefined) {
350
- container.style.display = currentDisplayMode;
351
- }
352
- })
353
- .catch((e) => {
354
- throw e;
355
- });
321
+ const url = this.getOption("url", undefined);
322
+ if (!isString(url) || url === "") {
323
+ throw new Error("missing url");
324
+ }
325
+
326
+ const options = this.getOption("fetch", {});
327
+
328
+ let parentNode = this;
329
+ if (this.shadowRoot) {
330
+ parentNode = this.shadowRoot;
331
+ }
332
+
333
+ let container = parentNode.querySelector(`[${ATTRIBUTE_ROLE}=container]`);
334
+ let currentDisplayMode = container?.style?.display;
335
+
336
+ if (currentDisplayMode === undefined) {
337
+ currentDisplayMode = "inherit";
338
+ }
339
+
340
+ if (!(container instanceof HTMLElement)) {
341
+ container = document.createElement("div");
342
+ container.style.display = "none";
343
+ container.setAttribute(ATTRIBUTE_ROLE, "container");
344
+ parentNode.appendChild(container);
345
+ }
346
+
347
+ return loadAndAssignContent(container, url, options, this.getOption("filter"))
348
+ .then(() => {
349
+ if (currentDisplayMode !== undefined) {
350
+ container.style.display = currentDisplayMode;
351
+ }
352
+ })
353
+ .catch((e) => {
354
+ throw e;
355
+ });
356
356
  }
357
357
 
358
358
  /**
@@ -360,7 +360,7 @@ function loadContent() {
360
360
  * @return {string}
361
361
  */
362
362
  function getTemplate() {
363
- return this.innerHTML;
363
+ return this.innerHTML;
364
364
  }
365
365
 
366
366
  registerCustomElement(Reload);
@@ -698,7 +698,7 @@ class Select extends CustomControl {
698
698
  const selection = this.getOption("selection");
699
699
  let newValue = [];
700
700
  if (selection) {
701
- newValue = selection
701
+ newValue = selection;
702
702
  } else if (this.hasAttribute("value")) {
703
703
  newValue = this.getAttribute("value");
704
704
  }
@@ -710,7 +710,7 @@ class Select extends CustomControl {
710
710
  resolve(result);
711
711
  }, 10);
712
712
 
713
- return
713
+ return;
714
714
  }
715
715
 
716
716
  setStatusOrRemoveBadges.call(this, "error");
@@ -1866,7 +1866,6 @@ function areOptionsAvailableAndInit() {
1866
1866
  * @throws {Error} no shadow-root is defined
1867
1867
  */
1868
1868
  function checkOptionState() {
1869
-
1870
1869
  if (!this.shadowRoot) {
1871
1870
  throw new Error("no shadow-root is defined");
1872
1871
  }
@@ -1891,8 +1890,6 @@ function checkOptionState() {
1891
1890
  if (e.checked !== false) e.checked = false;
1892
1891
  }
1893
1892
  }
1894
-
1895
-
1896
1893
  }
1897
1894
 
1898
1895
  /**
@@ -1976,8 +1973,8 @@ function setSelection(selection) {
1976
1973
  selection = [];
1977
1974
  }
1978
1975
 
1979
- validateArray(selection)
1980
-
1976
+ validateArray(selection);
1977
+
1981
1978
  for (let i = 0; i < selection.length; i++) {
1982
1979
  selection[i] = {
1983
1980
  label: getSelectionLabel.call(this, selection[i].value),
@@ -2112,14 +2109,16 @@ function show() {
2112
2109
  if (lazyLoadFlag === true) {
2113
2110
  this[lazyLoadDoneSymbol] = true;
2114
2111
  setStatusOrRemoveBadges.call(this, "loading");
2115
-
2112
+
2116
2113
  new Processing(200, () => {
2117
- this.fetch().then(() => {
2114
+ this.fetch()
2115
+ .then(() => {
2118
2116
  checkOptionState.call(this);
2119
- }).catch((e) => {
2120
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message);
2121
- setStatusOrRemoveBadges.call(this, "error");
2122
- });
2117
+ })
2118
+ .catch((e) => {
2119
+ addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message);
2120
+ setStatusOrRemoveBadges.call(this, "error");
2121
+ });
2123
2122
  })
2124
2123
  .run()
2125
2124
  .catch((e) => {
@@ -13,7 +13,7 @@
13
13
  container-type: inline-size;
14
14
  container-name: form-set;
15
15
  margin-bottom: 1rem;
16
- @mixin paragraph;
16
+ @mixin text;
17
17
  }
18
18
 
19
19
  .collapse-alignment {
@@ -30,7 +30,7 @@
30
30
 
31
31
  & label {
32
32
  padding-right: 0.3rem;
33
- @mixin paragraph;
33
+ @mixin text;
34
34
  }
35
35
 
36
36
  & [data-monster-role=extended-switch] {
@@ -9,4 +9,12 @@
9
9
  background-color: red;
10
10
  }
11
11
 
12
+ :host {
13
+ display: block;
14
+ box-sizing: border-box;
15
+ width: 100%;
16
+ margin: 0;
17
+ padding: 0;
18
+ outline: none;
19
+ }
12
20