@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.
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/source/components/datatable/dataset.mjs +272 -272
- package/source/components/datatable/datasource/dom.mjs +2 -2
- package/source/components/datatable/datasource/rest.mjs +408 -410
- package/source/components/datatable/filter.mjs +0 -1
- package/source/components/datatable/style/datatable.pcss +7 -5
- package/source/components/datatable/style/embedded-pagination.pcss +1 -1
- package/source/components/datatable/style/pagination.pcss +1 -1
- package/source/components/datatable/stylesheet/change-button.mjs +2 -4
- package/source/components/datatable/stylesheet/column-bar.mjs +2 -4
- package/source/components/datatable/stylesheet/dataset.mjs +2 -4
- package/source/components/datatable/stylesheet/datasource.mjs +1 -3
- package/source/components/datatable/stylesheet/datatable.mjs +2 -4
- package/source/components/datatable/stylesheet/embedded-pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/filter-button.mjs +1 -3
- package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +14 -7
- package/source/components/datatable/stylesheet/filter-date-range.mjs +1 -3
- package/source/components/datatable/stylesheet/filter-range.mjs +1 -3
- package/source/components/datatable/stylesheet/filter.mjs +2 -4
- package/source/components/datatable/stylesheet/pagination.mjs +2 -4
- package/source/components/datatable/stylesheet/save-button.mjs +2 -4
- package/source/components/datatable/stylesheet/select-filter.mjs +2 -4
- package/source/components/datatable/stylesheet/status.mjs +2 -4
- package/source/components/form/field-set.mjs +219 -219
- package/source/components/form/form.mjs +137 -187
- package/source/components/form/reload.mjs +211 -211
- package/source/components/form/select.mjs +12 -13
- package/source/components/form/style/field-set.pcss +2 -2
- package/source/components/form/style/form.pcss +8 -0
- package/source/components/form/stylesheet/action-button.mjs +2 -4
- package/source/components/form/stylesheet/api-button.mjs +1 -3
- package/source/components/form/stylesheet/button-bar.mjs +2 -4
- package/source/components/form/stylesheet/button.mjs +2 -4
- package/source/components/form/stylesheet/confirm-button.mjs +2 -4
- package/source/components/form/stylesheet/context-error.mjs +2 -4
- package/source/components/form/stylesheet/context-help.mjs +2 -4
- package/source/components/form/stylesheet/field-set.mjs +14 -7
- package/source/components/form/stylesheet/form.mjs +1 -1
- package/source/components/form/stylesheet/message-state-button.mjs +1 -3
- package/source/components/form/stylesheet/popper-button.mjs +2 -4
- package/source/components/form/stylesheet/select.mjs +14 -7
- package/source/components/form/stylesheet/state-button.mjs +2 -4
- package/source/components/form/stylesheet/tree-select.mjs +1 -3
- package/source/components/host/stylesheet/call-button.mjs +2 -4
- package/source/components/host/stylesheet/config-manager.mjs +1 -3
- package/source/components/host/stylesheet/host.mjs +2 -4
- package/source/components/host/stylesheet/overlay.mjs +2 -4
- package/source/components/host/stylesheet/toggle-button.mjs +2 -4
- package/source/components/host/stylesheet/viewer.mjs +2 -4
- package/source/components/layout/style/collapse.pcss +2 -2
- package/source/components/layout/style/details.pcss +2 -2
- package/source/components/layout/stylesheet/collapse.mjs +14 -7
- package/source/components/layout/stylesheet/details.mjs +2 -4
- package/source/components/layout/stylesheet/panel.mjs +2 -4
- package/source/components/layout/stylesheet/popper.mjs +2 -4
- package/source/components/layout/stylesheet/split-panel.mjs +1 -3
- package/source/components/layout/stylesheet/tabs.mjs +2 -4
- package/source/components/layout/stylesheet/width-toggle.mjs +1 -3
- package/source/components/navigation/stylesheet/table-of-content.mjs +2 -4
- package/source/components/notify/stylesheet/message.mjs +2 -4
- package/source/components/notify/stylesheet/notify.mjs +2 -4
- package/source/components/state/stylesheet/log.mjs +2 -4
- package/source/components/state/stylesheet/state.mjs +2 -4
- package/source/components/style/control.pcss +5 -0
- package/source/components/style/data-grid.pcss +2 -2
- package/source/components/style/mixin/typography.pcss +7 -1
- package/source/components/style/normalize.pcss +1 -1
- package/source/components/stylesheet/badge.mjs +1 -3
- package/source/components/stylesheet/border.mjs +1 -3
- package/source/components/stylesheet/button.mjs +1 -3
- package/source/components/stylesheet/card.mjs +1 -3
- package/source/components/stylesheet/color.mjs +1 -3
- package/source/components/stylesheet/common.mjs +1 -3
- package/source/components/stylesheet/control.mjs +2 -4
- package/source/components/stylesheet/data-grid.mjs +2 -4
- package/source/components/stylesheet/display.mjs +1 -3
- package/source/components/stylesheet/floating-ui.mjs +1 -3
- package/source/components/stylesheet/form.mjs +13 -6
- package/source/components/stylesheet/host.mjs +1 -3
- package/source/components/stylesheet/icons.mjs +1 -3
- package/source/components/stylesheet/mixin/badge.mjs +1 -3
- package/source/components/stylesheet/mixin/button.mjs +1 -3
- package/source/components/stylesheet/mixin/form.mjs +13 -6
- package/source/components/stylesheet/mixin/hover.mjs +1 -3
- package/source/components/stylesheet/mixin/icon.mjs +1 -3
- package/source/components/stylesheet/mixin/media.mjs +1 -3
- package/source/components/stylesheet/mixin/property.mjs +13 -6
- package/source/components/stylesheet/mixin/skeleton.mjs +1 -3
- package/source/components/stylesheet/mixin/spinner.mjs +1 -3
- package/source/components/stylesheet/mixin/typography.mjs +1 -3
- package/source/components/stylesheet/normalize.mjs +1 -3
- package/source/components/stylesheet/popper.mjs +1 -3
- package/source/components/stylesheet/property.mjs +2 -4
- package/source/components/stylesheet/ripple.mjs +1 -3
- package/source/components/stylesheet/skeleton.mjs +1 -3
- package/source/components/stylesheet/space.mjs +1 -3
- package/source/components/stylesheet/spinner.mjs +1 -3
- package/source/components/stylesheet/table.mjs +1 -3
- package/source/components/stylesheet/theme.mjs +1 -3
- package/source/components/stylesheet/typography.mjs +13 -6
- package/source/components/tree-menu/dragable-tree-menu.mjs +693 -0
- package/source/components/tree-menu/style/tree-menu.pcss +69 -42
- package/source/components/tree-menu/stylesheet/tree-menu.mjs +8 -17
- package/source/components/tree-menu/tree-menu.mjs +468 -532
- package/source/data/datasource/server/restapi.mjs +194 -191
- package/source/data/datasource/server.mjs +107 -105
- package/source/data/diff.mjs +1 -1
- package/source/dom/customelement.mjs +2 -6
- package/source/dom/slotted.mjs +89 -85
- 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/dom/customcontrol.mjs +1 -1
- 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
|
-
|
19
|
-
|
18
|
+
ATTRIBUTE_ERRORMESSAGE,
|
19
|
+
ATTRIBUTE_ROLE,
|
20
20
|
} from "../../dom/constants.mjs";
|
21
21
|
import {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
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
|
-
|
244
|
+
const options = {};
|
245
245
|
|
246
|
-
|
246
|
+
const url = this.getAttribute(ATTRIBUTE_FORM_URL);
|
247
247
|
|
248
|
-
|
249
|
-
|
250
|
-
|
248
|
+
if (isString(url)) {
|
249
|
+
options["url"] = new URL(url, document.location).toString();
|
250
|
+
}
|
251
251
|
|
252
|
-
|
253
|
-
|
254
|
-
|
252
|
+
if (this.hasAttribute(ATTRIBUTE_FORM_RELOAD)) {
|
253
|
+
options["reload"] = this.getAttribute(ATTRIBUTE_FORM_RELOAD).toLowerCase();
|
254
|
+
}
|
255
255
|
|
256
|
-
|
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
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
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
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
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
|
-
|
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()
|
2114
|
+
this.fetch()
|
2115
|
+
.then(() => {
|
2118
2116
|
checkOptionState.call(this);
|
2119
|
-
})
|
2120
|
-
|
2121
|
-
|
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
|
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
|
33
|
+
@mixin text;
|
34
34
|
}
|
35
35
|
|
36
36
|
& [data-monster-role=extended-switch] {
|