@schukai/monster 3.100.7 → 3.100.9
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.
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,22 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [3.100.9] - 2025-01-19
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
- **datatable:** button-bar layout
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [3.100.8] - 2025-01-19
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
- **button:** wrong css class
|
18
|
+
|
19
|
+
|
20
|
+
|
5
21
|
## [3.100.7] - 2025-01-19
|
6
22
|
|
7
23
|
### Bug Fixes
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.9"}
|
@@ -342,6 +342,18 @@ class DataTable extends CustomElement {
|
|
342
342
|
initControlReferences.call(this);
|
343
343
|
initEventHandler.call(this);
|
344
344
|
|
345
|
+
getSlottedElements.call(this,"[data-monster-role=row-action-button]","bar").forEach((i,e) => {
|
346
|
+
if (e instanceof HTMLElement) {
|
347
|
+
e.style.visibility = "hidden";
|
348
|
+
e.style.width= "max-content";
|
349
|
+
|
350
|
+
const pN = e.parentNode;
|
351
|
+
if (pN instanceof HTMLElement) {
|
352
|
+
pN.style.flexGrow = "10";
|
353
|
+
}
|
354
|
+
}
|
355
|
+
})
|
356
|
+
|
345
357
|
getHostConfig
|
346
358
|
.call(this, getColumnVisibilityConfigKey)
|
347
359
|
.then((config) => {
|
@@ -869,13 +881,19 @@ function initEventHandler() {
|
|
869
881
|
"select-row",
|
870
882
|
);
|
871
883
|
|
872
|
-
if (!element) {
|
884
|
+
if (!(element instanceof HTMLInputElement)) {
|
885
|
+
return;
|
886
|
+
}
|
887
|
+
|
888
|
+
const parentNode= element.parentNode
|
889
|
+
if (!(parentNode instanceof HTMLDivElement)) {
|
873
890
|
return;
|
874
891
|
}
|
875
892
|
|
876
893
|
const key = element.parentNode.getAttribute(
|
877
894
|
"data-monster-insert-reference",
|
878
895
|
);
|
896
|
+
|
879
897
|
const row = self.getGridElements(
|
880
898
|
`[data-monster-insert-reference="${key}"]`,
|
881
899
|
);
|
@@ -909,6 +927,14 @@ function initEventHandler() {
|
|
909
927
|
`[data-monster-role="select-all"]`,
|
910
928
|
);
|
911
929
|
|
930
|
+
getSlottedElements.call(this,"[data-monster-role=row-action-button]","bar").forEach((i,e) => {
|
931
|
+
const selected = self.getSelectedRows();
|
932
|
+
const mode = (selected.length === 0) ? "hidden" : "visible";
|
933
|
+
if (e instanceof HTMLElement) {
|
934
|
+
e.style.visibility = mode;
|
935
|
+
}
|
936
|
+
})
|
937
|
+
|
912
938
|
if (selectAll) {
|
913
939
|
selectAll.checked = allSelected;
|
914
940
|
}
|
@@ -937,6 +963,13 @@ function initEventHandler() {
|
|
937
963
|
fireCustomEvent(this, "monster-datatable-all-rows-deselected", {});
|
938
964
|
}
|
939
965
|
|
966
|
+
getSlottedElements.call(this,"[data-monster-role=row-action-button]","bar").forEach((i,e) => {
|
967
|
+
if (e instanceof HTMLElement) {
|
968
|
+
e.style.visibility = mode ? "visible" : "hidden";
|
969
|
+
}
|
970
|
+
})
|
971
|
+
|
972
|
+
|
940
973
|
fireCustomEvent(this, "monster-datatable-selection-changed", {});
|
941
974
|
}
|
942
975
|
};
|