@schukai/monster 3.52.1 → 3.53.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/source/components/datatable/columnbar.mjs +2 -3
- package/source/components/datatable/dataset.mjs +3 -5
- package/source/components/datatable/datasource/dom.mjs +5 -8
- package/source/components/datatable/datasource/rest.mjs +12 -18
- package/source/components/datatable/datasource.mjs +1 -1
- package/source/components/datatable/datatable/header.mjs +3 -5
- package/source/components/datatable/datatable.mjs +13 -18
- package/source/components/datatable/filter/date-range.mjs +15 -27
- package/source/components/datatable/filter/input.mjs +3 -5
- package/source/components/datatable/filter/range.mjs +10 -17
- package/source/components/datatable/filter/settings.mjs +6 -7
- package/source/components/datatable/filter.mjs +14 -21
- package/source/components/datatable/pagination.mjs +5 -7
- package/source/components/datatable/util.mjs +1 -2
- package/source/components/form/action-button.mjs +2 -3
- package/source/components/form/api-button.mjs +5 -9
- package/source/components/form/button-bar.mjs +15 -27
- package/source/components/form/button.mjs +2 -2
- package/source/components/form/confirm-button.mjs +9 -12
- package/source/components/form/form.mjs +8 -14
- package/source/components/form/message-state-button.mjs +4 -5
- package/source/components/form/popper-button.mjs +7 -11
- package/source/components/form/popper.mjs +7 -11
- package/source/components/form/reload.mjs +5 -7
- package/source/components/form/select.mjs +42 -74
- package/source/components/form/tabs.mjs +41 -45
- package/source/components/form/template.mjs +6 -9
- package/source/components/form/tree-select.mjs +7 -10
- package/source/components/form/util/popper.mjs +1 -2
- package/source/components/host/call-button.mjs +4 -6
- package/source/components/host/collapse.mjs +14 -22
- package/source/components/host/config-manager.mjs +7 -9
- package/source/components/host/details.mjs +5 -8
- package/source/components/host/host.mjs +7 -12
- package/source/components/host/overlay.mjs +4 -6
- package/source/components/host/viewer.mjs +2 -3
- package/source/components/notify/message.mjs +10 -13
- package/source/components/notify/notify.mjs +4 -6
- package/source/components/state/log/entry.mjs +1 -1
- package/source/components/state/log.mjs +6 -11
- package/source/components/style/icons.pcss +110 -0
- package/source/components/style/mixin/icon.pcss +43 -0
- package/source/components/stylesheet/icons.mjs +27 -0
- package/source/components/tree-menu/tree-menu.mjs +9 -14
- package/source/data/transformer.mjs +9 -4
- package/source/dom/customelement.mjs +1 -1
- package/source/dom/util.mjs +4 -5
- package/source/monster.mjs +0 -1
- package/source/types/observer.mjs +4 -4
- package/source/types/version.mjs +1 -1
- package/source/util/clone.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +1 -1
@@ -142,8 +142,7 @@ class PopperButton extends Popper {
|
|
142
142
|
* @property {object} popper - The popper options.
|
143
143
|
* @extends {Button.defaults}
|
144
144
|
*/
|
145
|
-
get defaults() {
|
146
|
-
|
145
|
+
get defaults() {
|
147
146
|
return Object.assign({}, super.defaults, {
|
148
147
|
templates: {
|
149
148
|
main: getTemplate(),
|
@@ -169,7 +168,7 @@ class PopperButton extends Popper {
|
|
169
168
|
* @return {Monster.Components.Form.PopperButton}
|
170
169
|
*/
|
171
170
|
[assembleMethodSymbol]() {
|
172
|
-
super[assembleMethodSymbol]()
|
171
|
+
super[assembleMethodSymbol]();
|
173
172
|
initControlReferences.call(this);
|
174
173
|
initEventhandler.call(this);
|
175
174
|
|
@@ -198,7 +197,7 @@ class PopperButton extends Popper {
|
|
198
197
|
connectedCallback() {
|
199
198
|
super.connectedCallback();
|
200
199
|
|
201
|
-
const document = getDocument()
|
200
|
+
const document = getDocument();
|
202
201
|
|
203
202
|
for (const [, type] of Object.entries(["click", "touch"])) {
|
204
203
|
// close on outside ui-events
|
@@ -324,8 +323,7 @@ class PopperButton extends Popper {
|
|
324
323
|
* @private
|
325
324
|
* @return {initEventhandler}
|
326
325
|
*/
|
327
|
-
function initEventhandler() {
|
328
|
-
|
326
|
+
function initEventhandler() {
|
329
327
|
this[closeEventHandler] = (event) => {
|
330
328
|
const path = event.composedPath();
|
331
329
|
|
@@ -343,8 +341,7 @@ function initEventhandler() {;
|
|
343
341
|
/**
|
344
342
|
* @private
|
345
343
|
*/
|
346
|
-
function attachResizeObserver() {
|
347
|
-
|
344
|
+
function attachResizeObserver() {
|
348
345
|
// against flickering
|
349
346
|
this[resizeObserverSymbol] = new ResizeObserver(() => {
|
350
347
|
if (this[timerCallbackSymbol] instanceof DeadMansSwitch) {
|
@@ -364,7 +361,7 @@ function attachResizeObserver() {;
|
|
364
361
|
this[resizeObserverSymbol].observe(this.parentElement);
|
365
362
|
}
|
366
363
|
|
367
|
-
function disconnectResizeObserver() {
|
364
|
+
function disconnectResizeObserver() {
|
368
365
|
if (this[resizeObserverSymbol] instanceof ResizeObserver) {
|
369
366
|
this[resizeObserverSymbol].disconnect();
|
370
367
|
}
|
@@ -373,8 +370,7 @@ function disconnectResizeObserver() {;
|
|
373
370
|
/**
|
374
371
|
* @private
|
375
372
|
*/
|
376
|
-
function updatePopper() {
|
377
|
-
|
373
|
+
function updatePopper() {
|
378
374
|
if (this[popperElementSymbol].style.display !== STYLE_DISPLAY_MODE_BLOCK) {
|
379
375
|
return;
|
380
376
|
}
|
@@ -164,7 +164,7 @@ class Popper extends CustomControl {
|
|
164
164
|
* @return {Monster.Components.Form.Popper}
|
165
165
|
*/
|
166
166
|
[assembleMethodSymbol]() {
|
167
|
-
super[assembleMethodSymbol]()
|
167
|
+
super[assembleMethodSymbol]();
|
168
168
|
initControlReferences.call(this);
|
169
169
|
initEventhandler.call(this);
|
170
170
|
|
@@ -191,7 +191,7 @@ class Popper extends CustomControl {
|
|
191
191
|
connectedCallback() {
|
192
192
|
super.connectedCallback();
|
193
193
|
|
194
|
-
const document = getDocument()
|
194
|
+
const document = getDocument();
|
195
195
|
|
196
196
|
for (const [, type] of Object.entries(["click", "touch"])) {
|
197
197
|
// close on outside ui-events
|
@@ -252,8 +252,7 @@ class Popper extends CustomControl {
|
|
252
252
|
* @private
|
253
253
|
* @return {Monster.Components.Form.Popper}
|
254
254
|
*/
|
255
|
-
function initEventhandler() {
|
256
|
-
|
255
|
+
function initEventhandler() {
|
257
256
|
this[closeEventHandler] = (event) => {
|
258
257
|
const path = event.composedPath();
|
259
258
|
|
@@ -287,8 +286,7 @@ function initEventhandler() {;
|
|
287
286
|
return this;
|
288
287
|
}
|
289
288
|
|
290
|
-
function initEventHandlerByMode(mode) {
|
291
|
-
|
289
|
+
function initEventHandlerByMode(mode) {
|
292
290
|
switch (mode) {
|
293
291
|
case "manual":
|
294
292
|
break;
|
@@ -345,8 +343,7 @@ function initEventHandlerByMode(mode) {;
|
|
345
343
|
/**
|
346
344
|
* @private
|
347
345
|
*/
|
348
|
-
function attachResizeObserver() {
|
349
|
-
|
346
|
+
function attachResizeObserver() {
|
350
347
|
// against flickering
|
351
348
|
this[resizeObserverSymbol] = new ResizeObserver((entries) => {
|
352
349
|
if (this[timerCallbackSymbol] instanceof DeadMansSwitch) {
|
@@ -366,7 +363,7 @@ function attachResizeObserver() {;
|
|
366
363
|
this[resizeObserverSymbol].observe(this.parentElement);
|
367
364
|
}
|
368
365
|
|
369
|
-
function disconnectResizeObserver() {
|
366
|
+
function disconnectResizeObserver() {
|
370
367
|
if (this[resizeObserverSymbol] instanceof ResizeObserver) {
|
371
368
|
this[resizeObserverSymbol].disconnect();
|
372
369
|
}
|
@@ -427,8 +424,7 @@ function show() {
|
|
427
424
|
/**
|
428
425
|
* @private
|
429
426
|
*/
|
430
|
-
function updatePopper() {
|
431
|
-
|
427
|
+
function updatePopper() {
|
432
428
|
if (this[popperElementSymbol].style.display !== STYLE_DISPLAY_MODE_BLOCK) {
|
433
429
|
return;
|
434
430
|
}
|
@@ -166,7 +166,7 @@ class Reload extends CustomElement {
|
|
166
166
|
/**
|
167
167
|
*
|
168
168
|
*/
|
169
|
-
[initMethodSymbol]() {
|
169
|
+
[initMethodSymbol]() {
|
170
170
|
super[initMethodSymbol]();
|
171
171
|
|
172
172
|
// data-monster-options
|
@@ -191,7 +191,7 @@ class Reload extends CustomElement {
|
|
191
191
|
* @fires Monster.Components.Form.event:monster-fetched
|
192
192
|
* @return {Monster.Components.Form.Form}
|
193
193
|
*/
|
194
|
-
[assembleMethodSymbol]() {
|
194
|
+
[assembleMethodSymbol]() {
|
195
195
|
super[assembleMethodSymbol]();
|
196
196
|
initIntersectionObserver.call(this);
|
197
197
|
}
|
@@ -232,7 +232,7 @@ class Reload extends CustomElement {
|
|
232
232
|
* @private
|
233
233
|
* @return {object}
|
234
234
|
*/
|
235
|
-
function initOptionsFromArguments() {
|
235
|
+
function initOptionsFromArguments() {
|
236
236
|
const options = {};
|
237
237
|
|
238
238
|
const url = this.getAttribute(ATTRIBUTE_FORM_URL);
|
@@ -259,8 +259,7 @@ function initOptionsFromArguments() {;
|
|
259
259
|
* @throws {Error} undefined status or type
|
260
260
|
* @fires Monster.Components.Form.event:monster-fetched
|
261
261
|
*/
|
262
|
-
function initIntersectionObserver() {
|
263
|
-
|
262
|
+
function initIntersectionObserver() {
|
264
263
|
if (this[intersectionObserverWasInitialized] === true) {
|
265
264
|
return;
|
266
265
|
}
|
@@ -310,8 +309,7 @@ function initIntersectionObserver() {;
|
|
310
309
|
* @fires Monster.Components.Form.event:monster-fetched
|
311
310
|
* @return {Promise}
|
312
311
|
*/
|
313
|
-
function loadContent() {
|
314
|
-
|
312
|
+
function loadContent() {
|
315
313
|
const url = this.getOption("url", undefined);
|
316
314
|
if (!isString(url) || url === "") {
|
317
315
|
throw new Error("missing url");
|
@@ -349,8 +349,7 @@ class Select extends CustomControl {
|
|
349
349
|
* @since 1.2.0
|
350
350
|
* @throws {Error} unsupported type
|
351
351
|
*/
|
352
|
-
set value(value) {
|
353
|
-
|
352
|
+
set value(value) {
|
354
353
|
const result = convertValueToSelection.call(this, value);
|
355
354
|
setSelection
|
356
355
|
.call(this, result.selection)
|
@@ -558,7 +557,7 @@ class Select extends CustomControl {
|
|
558
557
|
* @since 3.27.0
|
559
558
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click}
|
560
559
|
*/
|
561
|
-
click() {
|
560
|
+
click() {
|
562
561
|
if (this.getOption("disabled") === true) {
|
563
562
|
return;
|
564
563
|
}
|
@@ -572,7 +571,7 @@ class Select extends CustomControl {
|
|
572
571
|
* @since 3.27.0
|
573
572
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus}
|
574
573
|
*/
|
575
|
-
focus(options) {
|
574
|
+
focus(options) {
|
576
575
|
if (this.getOption("disabled") === true) {
|
577
576
|
return;
|
578
577
|
}
|
@@ -591,7 +590,7 @@ class Select extends CustomControl {
|
|
591
590
|
* The Button.blur() method removes focus from the internal button element.
|
592
591
|
* @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur
|
593
592
|
*/
|
594
|
-
blur() {
|
593
|
+
blur() {
|
595
594
|
new Processing(() => {
|
596
595
|
gatherState.call(this);
|
597
596
|
blurFilter.call(this);
|
@@ -608,8 +607,7 @@ class Select extends CustomControl {
|
|
608
607
|
* @param {string|URL} url URL to fetch the options
|
609
608
|
* @return {Promise}
|
610
609
|
*/
|
611
|
-
fetch(url) {
|
612
|
-
|
610
|
+
fetch(url) {
|
613
611
|
if (url instanceof URL) {
|
614
612
|
url = url.toString();
|
615
613
|
}
|
@@ -634,7 +632,7 @@ class Select extends CustomControl {
|
|
634
632
|
*/
|
635
633
|
connectedCallback() {
|
636
634
|
super.connectedCallback();
|
637
|
-
const document = getDocument()
|
635
|
+
const document = getDocument();
|
638
636
|
|
639
637
|
for (const [, type] of Object.entries(["click", "touch"])) {
|
640
638
|
// close on outside ui-events
|
@@ -656,7 +654,7 @@ class Select extends CustomControl {
|
|
656
654
|
*/
|
657
655
|
disconnectedCallback() {
|
658
656
|
super.disconnectedCallback();
|
659
|
-
const document = getDocument()
|
657
|
+
const document = getDocument();
|
660
658
|
|
661
659
|
// close on outside ui-events
|
662
660
|
for (const [, type] of Object.entries(["click", "touch"])) {
|
@@ -676,8 +674,7 @@ class Select extends CustomControl {
|
|
676
674
|
* @throws {Error} map is not iterable
|
677
675
|
* @throws {Error} missing label configuration
|
678
676
|
*/
|
679
|
-
importOptions(data) {
|
680
|
-
|
677
|
+
importOptions(data) {
|
681
678
|
const mappingOptions = this.getOption("mapping", {});
|
682
679
|
const selector = mappingOptions?.["selector"];
|
683
680
|
const labelTemplate = mappingOptions?.["labelTemplate"];
|
@@ -762,7 +759,7 @@ class Select extends CustomControl {
|
|
762
759
|
* @private
|
763
760
|
* @return {object}
|
764
761
|
*/
|
765
|
-
function initOptionsFromArguments() {
|
762
|
+
function initOptionsFromArguments() {
|
766
763
|
const options = {};
|
767
764
|
|
768
765
|
const template = this.getAttribute("data-monster-selected-template");
|
@@ -792,8 +789,7 @@ function initOptionsFromArguments() {;
|
|
792
789
|
/**
|
793
790
|
* @private
|
794
791
|
*/
|
795
|
-
function attachResizeObserver() {
|
796
|
-
|
792
|
+
function attachResizeObserver() {
|
797
793
|
// against flickering
|
798
794
|
this[resizeObserverSymbol] = new ResizeObserver((entries) => {
|
799
795
|
if (this[timerCallbackSymbol] instanceof DeadMansSwitch) {
|
@@ -814,7 +810,7 @@ function attachResizeObserver() {;
|
|
814
810
|
this[resizeObserverSymbol].observe(this.parentElement);
|
815
811
|
}
|
816
812
|
|
817
|
-
function disconnectResizeObserver() {
|
813
|
+
function disconnectResizeObserver() {
|
818
814
|
if (this[resizeObserverSymbol] instanceof ResizeObserver) {
|
819
815
|
this[resizeObserverSymbol].disconnect();
|
820
816
|
}
|
@@ -848,8 +844,7 @@ function getSummaryTemplate() {
|
|
848
844
|
* @return {void}
|
849
845
|
* @private
|
850
846
|
*/
|
851
|
-
function parseSlotsToOptions() {
|
852
|
-
|
847
|
+
function parseSlotsToOptions() {
|
853
848
|
let options = this.getOption("options");
|
854
849
|
if (!isIterable(options)) {
|
855
850
|
options = [];
|
@@ -928,7 +923,7 @@ function runAsOptionLengthChanged(targetLength) {
|
|
928
923
|
* @param {*} value
|
929
924
|
* @return {*}
|
930
925
|
*/
|
931
|
-
function buildSelectionLabel(value) {
|
926
|
+
function buildSelectionLabel(value) {
|
932
927
|
const options = this.getOption("options");
|
933
928
|
|
934
929
|
for (let i = 0; i < options.length; i++) {
|
@@ -949,8 +944,7 @@ function buildSelectionLabel(value) {;
|
|
949
944
|
* @return {string}
|
950
945
|
* @throws {Error} no value found
|
951
946
|
*/
|
952
|
-
function getSelectionLabel(value) {
|
953
|
-
|
947
|
+
function getSelectionLabel(value) {
|
954
948
|
const callback = this.getOption("formatter.selection");
|
955
949
|
if (isFunction(callback)) {
|
956
950
|
const label = callback.call(this, value);
|
@@ -968,8 +962,7 @@ function getSelectionLabel(value) {;
|
|
968
962
|
* @private
|
969
963
|
* @param {Event} event
|
970
964
|
*/
|
971
|
-
function handleToggleKeyboardEvents(event) {
|
972
|
-
|
965
|
+
function handleToggleKeyboardEvents(event) {
|
973
966
|
switch (event?.["code"]) {
|
974
967
|
case "Escape":
|
975
968
|
toggle.call(this);
|
@@ -1007,8 +1000,7 @@ function initOptionObserver() {
|
|
1007
1000
|
);
|
1008
1001
|
}
|
1009
1002
|
|
1010
|
-
function getDefaultTranslation() {
|
1011
|
-
|
1003
|
+
function getDefaultTranslation() {
|
1012
1004
|
const translation = new Translations("en").assignTranslations(
|
1013
1005
|
this.getOption("labels", {}),
|
1014
1006
|
);
|
@@ -1025,8 +1017,7 @@ function getDefaultTranslation() {;
|
|
1025
1017
|
* @private
|
1026
1018
|
* @returns {string|*}
|
1027
1019
|
*/
|
1028
|
-
function setSummaryAndControlText() {
|
1029
|
-
|
1020
|
+
function setSummaryAndControlText() {
|
1030
1021
|
const translations = getDefaultTranslation.call(this);
|
1031
1022
|
const selections = this.getOption("selection");
|
1032
1023
|
|
@@ -1091,8 +1082,7 @@ function getOptionElements() {
|
|
1091
1082
|
/**
|
1092
1083
|
* @private
|
1093
1084
|
*/
|
1094
|
-
function calcAndSetOptionsDimension() {
|
1095
|
-
|
1085
|
+
function calcAndSetOptionsDimension() {
|
1096
1086
|
const options = getOptionElements.call(this);
|
1097
1087
|
const container = this[optionsElementSymbol];
|
1098
1088
|
if (!(container instanceof HTMLElement && options instanceof NodeList)) {
|
@@ -1168,8 +1158,7 @@ function calcAndSetOptionsDimension() {;
|
|
1168
1158
|
* @param {number} direction
|
1169
1159
|
* @throws {Error} no shadow-root is defined
|
1170
1160
|
*/
|
1171
|
-
function activateCurrentOption(direction) {
|
1172
|
-
|
1161
|
+
function activateCurrentOption(direction) {
|
1173
1162
|
if (!this.shadowRoot) {
|
1174
1163
|
throw new Error("no shadow-root is defined");
|
1175
1164
|
}
|
@@ -1237,8 +1226,7 @@ function activateCurrentOption(direction) {;
|
|
1237
1226
|
/**
|
1238
1227
|
* @private
|
1239
1228
|
*/
|
1240
|
-
function filterOptions() {
|
1241
|
-
|
1229
|
+
function filterOptions() {
|
1242
1230
|
new Processing(() => {
|
1243
1231
|
let filterValue;
|
1244
1232
|
|
@@ -1285,8 +1273,7 @@ function filterOptions() {;
|
|
1285
1273
|
* @private
|
1286
1274
|
* @param {Event} event
|
1287
1275
|
*/
|
1288
|
-
function handleFilterKeyboardEvents(event) {
|
1289
|
-
|
1276
|
+
function handleFilterKeyboardEvents(event) {
|
1290
1277
|
const shiftKey = event?.["shiftKey"];
|
1291
1278
|
|
1292
1279
|
switch (event?.["code"]) {
|
@@ -1322,8 +1309,7 @@ function handleFilterKeyboardEvents(event) {;
|
|
1322
1309
|
/**
|
1323
1310
|
* @private
|
1324
1311
|
*/
|
1325
|
-
function filterFromRemote() {
|
1326
|
-
|
1312
|
+
function filterFromRemote() {
|
1327
1313
|
if (!(this[inlineFilterElementSymbol] instanceof HTMLElement)) {
|
1328
1314
|
return;
|
1329
1315
|
}
|
@@ -1347,8 +1333,7 @@ function filterFromRemote() {;
|
|
1347
1333
|
url = new Formatter({ filter: filterValue }).format(optionUrl);
|
1348
1334
|
}
|
1349
1335
|
|
1350
|
-
this
|
1351
|
-
.fetch(url)
|
1336
|
+
this.fetch(url)
|
1352
1337
|
.then(() => {
|
1353
1338
|
checkOptionState.call(this);
|
1354
1339
|
})
|
@@ -1363,8 +1348,7 @@ function filterFromRemote() {;
|
|
1363
1348
|
* @param {Event} event
|
1364
1349
|
* @private
|
1365
1350
|
*/
|
1366
|
-
function handleOptionKeyboardEvents(event) {
|
1367
|
-
|
1351
|
+
function handleOptionKeyboardEvents(event) {
|
1368
1352
|
const shiftKey = event?.["shiftKey"];
|
1369
1353
|
|
1370
1354
|
switch (event?.["code"]) {
|
@@ -1410,8 +1394,7 @@ function handleOptionKeyboardEvents(event) {;
|
|
1410
1394
|
* @private
|
1411
1395
|
* @returns {string}
|
1412
1396
|
*/
|
1413
|
-
function getFilterMode() {
|
1414
|
-
|
1397
|
+
function getFilterMode() {
|
1415
1398
|
switch (this.getOption("filter.mode")) {
|
1416
1399
|
case FILTER_MODE_OPTIONS:
|
1417
1400
|
return FILTER_MODE_OPTIONS;
|
@@ -1425,8 +1408,7 @@ function getFilterMode() {;
|
|
1425
1408
|
/**
|
1426
1409
|
* @private
|
1427
1410
|
*/
|
1428
|
-
function blurFilter() {
|
1429
|
-
|
1411
|
+
function blurFilter() {
|
1430
1412
|
if (!(this[inlineFilterElementSymbol] instanceof HTMLElement)) {
|
1431
1413
|
return;
|
1432
1414
|
}
|
@@ -1446,8 +1428,7 @@ function blurFilter() {;
|
|
1446
1428
|
* @private
|
1447
1429
|
* @param focusOptions
|
1448
1430
|
*/
|
1449
|
-
function focusPopperFilter(focusOptions) {
|
1450
|
-
|
1431
|
+
function focusPopperFilter(focusOptions) {
|
1451
1432
|
this[popperFilterContainerElementSymbol].classList.remove("d-none");
|
1452
1433
|
this[popperFilterElementSymbol].classList.add("active");
|
1453
1434
|
this[inlineFilterElementSymbol].classList.remove("active");
|
@@ -1477,8 +1458,7 @@ function focusPopperFilter(focusOptions) {;
|
|
1477
1458
|
* @private
|
1478
1459
|
* @param focusOptions
|
1479
1460
|
*/
|
1480
|
-
function focusInlineFilter(focusOptions) {
|
1481
|
-
|
1461
|
+
function focusInlineFilter(focusOptions) {
|
1482
1462
|
const options = this.getOption("options");
|
1483
1463
|
if (
|
1484
1464
|
(!isArray(options) || options.length === 0) &&
|
@@ -1505,8 +1485,7 @@ function focusInlineFilter(focusOptions) {;
|
|
1505
1485
|
/**
|
1506
1486
|
* @private
|
1507
1487
|
*/
|
1508
|
-
function focusFilter(focusOptions) {
|
1509
|
-
|
1488
|
+
function focusFilter(focusOptions) {
|
1510
1489
|
if (getFilterMode.call(this) === FILTER_MODE_DISABLED) {
|
1511
1490
|
this[popperFilterContainerElementSymbol].classList.add("d-none");
|
1512
1491
|
this[inlineFilterElementSymbol].classList.add("d-none");
|
@@ -1526,8 +1505,7 @@ function focusFilter(focusOptions) {;
|
|
1526
1505
|
* @throws {Error} no shadow-root is defined
|
1527
1506
|
* @throws {Error} unsupported type
|
1528
1507
|
*/
|
1529
|
-
function gatherState() {
|
1530
|
-
|
1508
|
+
function gatherState() {
|
1531
1509
|
const type = this.getOption("type");
|
1532
1510
|
if (["radio", "checkbox"].indexOf(type) === -1) {
|
1533
1511
|
throw new Error("unsupported type");
|
@@ -1563,8 +1541,7 @@ function gatherState() {;
|
|
1563
1541
|
* @throws {Error} no shadow-root is defined
|
1564
1542
|
* @throws {Error} unsupported type
|
1565
1543
|
*/
|
1566
|
-
function clearSelection() {
|
1567
|
-
|
1544
|
+
function clearSelection() {
|
1568
1545
|
const type = this.getOption("type");
|
1569
1546
|
if (["radio", "checkbox"].indexOf(type) === -1) {
|
1570
1547
|
throw new Error("unsupported type");
|
@@ -1585,8 +1562,7 @@ function clearSelection() {;
|
|
1585
1562
|
/**
|
1586
1563
|
* @private
|
1587
1564
|
*/
|
1588
|
-
function areOptionsAvailableAndInit() {
|
1589
|
-
|
1565
|
+
function areOptionsAvailableAndInit() {
|
1590
1566
|
// prevent multiple calls
|
1591
1567
|
if (this[areOptionsAvailableAndInitSymbol] === undefined) {
|
1592
1568
|
this[areOptionsAvailableAndInitSymbol] = 0;
|
@@ -1676,8 +1652,7 @@ function areOptionsAvailableAndInit() {;
|
|
1676
1652
|
* @private
|
1677
1653
|
* @throws {Error} no shadow-root is defined
|
1678
1654
|
*/
|
1679
|
-
function checkOptionState() {
|
1680
|
-
|
1655
|
+
function checkOptionState() {
|
1681
1656
|
if (!this.shadowRoot) {
|
1682
1657
|
throw new Error("no shadow-root is defined");
|
1683
1658
|
}
|
@@ -1709,7 +1684,7 @@ function checkOptionState() {;
|
|
1709
1684
|
* @param {*} value
|
1710
1685
|
* @return {Object}
|
1711
1686
|
*/
|
1712
|
-
function convertValueToSelection(value) {
|
1687
|
+
function convertValueToSelection(value) {
|
1713
1688
|
const selection = [];
|
1714
1689
|
|
1715
1690
|
if (isString(value)) {
|
@@ -1752,8 +1727,7 @@ function convertValueToSelection(value) {;
|
|
1752
1727
|
* @param {array} selection
|
1753
1728
|
* @return {string}
|
1754
1729
|
*/
|
1755
|
-
function convertSelectionToValue(selection) {
|
1756
|
-
|
1730
|
+
function convertSelectionToValue(selection) {
|
1757
1731
|
const value = [];
|
1758
1732
|
|
1759
1733
|
if (isArray(selection)) {
|
@@ -1778,8 +1752,7 @@ function convertSelectionToValue(selection) {;
|
|
1778
1752
|
* @return {Promise}
|
1779
1753
|
* @throws {Error} no shadow-root is defined
|
1780
1754
|
*/
|
1781
|
-
function setSelection(selection) {
|
1782
|
-
|
1755
|
+
function setSelection(selection) {
|
1783
1756
|
if (isString(selection)) {
|
1784
1757
|
const result = convertValueToSelection.call(this, selection);
|
1785
1758
|
selection = result?.selection;
|
@@ -1837,8 +1810,7 @@ function setSelection(selection) {;
|
|
1837
1810
|
* @throws {TypeError} the result cannot be parsed
|
1838
1811
|
* @throws {TypeError} unsupported response
|
1839
1812
|
*/
|
1840
|
-
function fetchData(url) {
|
1841
|
-
|
1813
|
+
function fetchData(url) {
|
1842
1814
|
if (!url) url = this.getOption("url");
|
1843
1815
|
if (!url) return Promise.resolve();
|
1844
1816
|
|
@@ -1872,8 +1844,7 @@ function fetchData(url) {;
|
|
1872
1844
|
/**
|
1873
1845
|
* @private
|
1874
1846
|
*/
|
1875
|
-
function hide() {
|
1876
|
-
|
1847
|
+
function hide() {
|
1877
1848
|
this[popperElementSymbol].style.display = "none";
|
1878
1849
|
setStatusOrRemoveBadges.call(this, "status");
|
1879
1850
|
removeAttributeToken(this[controlElementSymbol], "class", "open");
|
@@ -1882,8 +1853,7 @@ function hide() {;
|
|
1882
1853
|
/**
|
1883
1854
|
* @private
|
1884
1855
|
*/
|
1885
|
-
function show() {
|
1886
|
-
|
1856
|
+
function show() {
|
1887
1857
|
if (this.getOption("disabled", undefined) === true) {
|
1888
1858
|
return;
|
1889
1859
|
}
|
@@ -2131,7 +2101,7 @@ function initEventhandler() {
|
|
2131
2101
|
* @private
|
2132
2102
|
* @return {Select}
|
2133
2103
|
*/
|
2134
|
-
function setStatusOrRemoveBadges(suggestion) {
|
2104
|
+
function setStatusOrRemoveBadges(suggestion) {
|
2135
2105
|
setTimeout(() => {
|
2136
2106
|
const selection = this.getOption("selection");
|
2137
2107
|
const clearAllFlag =
|
@@ -2178,8 +2148,7 @@ function setStatusOrRemoveBadges(suggestion) {;
|
|
2178
2148
|
* @return {Select}
|
2179
2149
|
* @throws {Error} no shadow-root is defined
|
2180
2150
|
*/
|
2181
|
-
function initControlReferences() {
|
2182
|
-
|
2151
|
+
function initControlReferences() {
|
2183
2152
|
if (!this.shadowRoot) {
|
2184
2153
|
throw new Error("no shadow-root is defined");
|
2185
2154
|
}
|
@@ -2218,8 +2187,7 @@ function initControlReferences() {;
|
|
2218
2187
|
/**
|
2219
2188
|
* @private
|
2220
2189
|
*/
|
2221
|
-
function updatePopper() {
|
2222
|
-
|
2190
|
+
function updatePopper() {
|
2223
2191
|
if (this[popperElementSymbol].style.display !== STYLE_DISPLAY_MODE_BLOCK) {
|
2224
2192
|
return;
|
2225
2193
|
}
|