@schukai/monster 3.58.2 → 3.58.4
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 +0 -1
- package/source/components/datatable/datatable.mjs +0 -1
- package/source/components/datatable/filter.mjs +32 -28
- package/source/components/datatable/style/datatable.pcss +3 -0
- package/source/components/datatable/style/filter.pcss +2 -3
- package/source/components/datatable/stylesheet/datatable.mjs +1 -1
- package/source/components/datatable/stylesheet/filter.mjs +1 -1
- package/source/components/form/button-bar.mjs +462 -460
- package/source/components/form/toggle-switch.mjs +3 -3
- package/source/dom/events.mjs +0 -1
- package/source/monster.mjs +0 -1
- package/source/types/version.mjs +1 -1
- package/source/util/freeze.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,9 +1,27 @@
|
|
1
1
|
|
2
|
+
## [3.58.4] - 2024-03-18
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
- store lists [#139](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/139)
|
7
|
+
|
8
|
+
## [3.58.3] - 2024-03-18
|
9
|
+
|
10
|
+
### Bug Fixes
|
11
|
+
|
12
|
+
- datatable colum with [#143](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/143)
|
13
|
+
### Changes
|
14
|
+
|
15
|
+
- release and publish to npm new version 3.58.3
|
16
|
+
|
2
17
|
## [3.58.2] - 2024-03-17
|
3
18
|
|
4
19
|
### Bug Fixes
|
5
20
|
|
6
21
|
- playground missing js and remove flex [#144](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/144)
|
22
|
+
### Changes
|
23
|
+
|
24
|
+
- release and publish to npm new version 3.58.2
|
7
25
|
|
8
26
|
## [3.58.1] - 2024-03-17
|
9
27
|
|
package/package.json
CHANGED
@@ -366,12 +366,23 @@ function initControlReferences() {
|
|
366
366
|
return this;
|
367
367
|
}
|
368
368
|
|
369
|
+
function updateFilterSelections() {
|
370
|
+
setTimeout(() => {
|
371
|
+
const options = this[settingsSymbol].getOptions();
|
372
|
+
this[filterSelectElementSymbol].setOption("options", options);
|
373
|
+
setTimeout(() => {
|
374
|
+
this[filterSelectElementSymbol].value =
|
375
|
+
this[settingsSymbol].getSelected();
|
376
|
+
}, 10);
|
377
|
+
}, 10);
|
378
|
+
}
|
379
|
+
|
369
380
|
/**
|
370
381
|
* @private
|
371
382
|
* @throws {Error} no filter label is defined
|
372
383
|
*/
|
373
384
|
function initFilter() {
|
374
|
-
const
|
385
|
+
const storedSetting = this[settingsSymbol];
|
375
386
|
this[settingsSymbol] = new Settings();
|
376
387
|
|
377
388
|
const result = parseBracketedKeyValueHash(getGlobal().location.hash);
|
@@ -397,7 +408,7 @@ function initFilter() {
|
|
397
408
|
element.id = value;
|
398
409
|
}
|
399
410
|
|
400
|
-
let setting =
|
411
|
+
let setting = storedSetting.get(value);
|
401
412
|
|
402
413
|
if (setting) {
|
403
414
|
this[settingsSymbol].set(setting);
|
@@ -407,31 +418,22 @@ function initFilter() {
|
|
407
418
|
const v = escapeAttributeValue(valuesFromHash[element.id]);
|
408
419
|
const searchInput = element.firstElementChild;
|
409
420
|
try {
|
410
|
-
|
411
|
-
searchInput.value = v; //valuesFromHash[element.id];
|
421
|
+
searchInput.value = v;
|
412
422
|
} catch (error) {}
|
413
423
|
}
|
414
424
|
|
415
425
|
setting = this[settingsSymbol].get(value);
|
426
|
+
let visible = false;
|
416
427
|
if (setting) {
|
417
428
|
setSlotAttribute(element, setting.visible);
|
418
|
-
|
429
|
+
visible = setting.visible;
|
430
|
+
} else {
|
431
|
+
visible = getVisibilityFromSlotAttribute(element);
|
419
432
|
}
|
420
433
|
|
421
|
-
//const visible = window.getComputedStyle(element).display !== "none";
|
422
|
-
const visible = getVisibilityFromSlotAttribute(element);
|
423
|
-
|
424
434
|
this[settingsSymbol].set({ value, label, visible });
|
425
435
|
});
|
426
|
-
|
427
|
-
this[filterSelectElementSymbol].setOption(
|
428
|
-
"options",
|
429
|
-
this[settingsSymbol].getOptions(),
|
430
|
-
);
|
431
|
-
|
432
|
-
setTimeout(() => {
|
433
|
-
this[filterSelectElementSymbol].value = this[settingsSymbol].getSelected();
|
434
|
-
}, 10);
|
436
|
+
updateFilterSelections.call(this);
|
435
437
|
}
|
436
438
|
|
437
439
|
/**
|
@@ -512,7 +514,6 @@ function initEventHandler() {
|
|
512
514
|
event.detail.value,
|
513
515
|
);
|
514
516
|
if (filterElement) {
|
515
|
-
//filterElement.style.display = event.detail.checked ? "block" : "none";
|
516
517
|
setSlotAttribute(filterElement, event.detail.checked);
|
517
518
|
}
|
518
519
|
|
@@ -651,15 +652,18 @@ function initEventHandler() {
|
|
651
652
|
}
|
652
653
|
});
|
653
654
|
|
654
|
-
doSearch
|
655
|
+
doSearch
|
656
|
+
.call(self, { showEffect: false })
|
657
|
+
.then(() => {})
|
658
|
+
.catch((e) => addAttributeToken(self, ATTRIBUTE_ERRORMESSAGE, e.message));
|
655
659
|
});
|
656
660
|
|
657
661
|
self[locationChangeHandlerSymbol] = (event) => {
|
658
|
-
if (event instanceof HashChangeEvent) {
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
}
|
662
|
+
// if (event instanceof HashChangeEvent) {
|
663
|
+
// if (event.oldURL === event.newURL) {
|
664
|
+
// return;
|
665
|
+
// }
|
666
|
+
// }
|
663
667
|
};
|
664
668
|
|
665
669
|
self.addEventListener("keyup", (event) => {
|
@@ -788,8 +792,7 @@ function updateFilterTabs() {
|
|
788
792
|
|
789
793
|
element.insertAdjacentHTML(
|
790
794
|
"beforeend",
|
791
|
-
|
792
|
-
<div data-monster-button-label="${name}"
|
795
|
+
`<div data-monster-button-label="${name}"
|
793
796
|
data-monster-removable="true"
|
794
797
|
data-monster-query="${escapedQuery}" data-monster-role="filter-tab" >
|
795
798
|
</div>`,
|
@@ -1054,7 +1057,8 @@ function getControlValuesFromLabel(label) {
|
|
1054
1057
|
* @private
|
1055
1058
|
* @returns {Promise<unknown>}
|
1056
1059
|
*/
|
1057
|
-
function initFromConfig() {
|
1060
|
+
function initFromConfig() {;
|
1061
|
+
|
1058
1062
|
const document = getDocument();
|
1059
1063
|
const host = document.querySelector("monster-host");
|
1060
1064
|
|
@@ -1068,7 +1072,7 @@ function initFromConfig() {
|
|
1068
1072
|
host
|
1069
1073
|
.getConfig(configKey)
|
1070
1074
|
.then((config) => {
|
1071
|
-
if (config && isObject(config)) {
|
1075
|
+
if ((config && isObject(config)) || isArray(config)) {
|
1072
1076
|
this[settingsSymbol].setOptions(config);
|
1073
1077
|
}
|
1074
1078
|
resolve();
|
@@ -13,7 +13,6 @@
|
|
13
13
|
width: 100%;
|
14
14
|
}
|
15
15
|
|
16
|
-
|
17
16
|
[data-monster-role=control] {
|
18
17
|
|
19
18
|
& .hidden {
|
@@ -33,7 +32,7 @@
|
|
33
32
|
|
34
33
|
align-items: flex-end;
|
35
34
|
display: flex;
|
36
|
-
justify-content:
|
35
|
+
justify-content: flex-start;
|
37
36
|
width: 100%;
|
38
37
|
flex-direction: column;
|
39
38
|
|
@@ -44,7 +43,7 @@
|
|
44
43
|
width: 100%;
|
45
44
|
column-gap: 1rem;
|
46
45
|
row-gap: 0.5rem;
|
47
|
-
justify-content:
|
46
|
+
justify-content: flex-start;
|
48
47
|
|
49
48
|
|
50
49
|
& ::slotted(label) {
|