@schukai/monster 3.99.0 → 3.99.1
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
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.99.
|
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.99.1"}
|
@@ -881,43 +881,51 @@ function initEventHandler() {
|
|
881
881
|
"data-monster-role",
|
882
882
|
"select-row",
|
883
883
|
);
|
884
|
-
if (element) {
|
885
|
-
const key = element.parentNode.getAttribute(
|
886
|
-
"data-monster-insert-reference",
|
887
|
-
);
|
888
|
-
const row = self.getGridElements(
|
889
|
-
`[data-monster-insert-reference="${key}"]`,
|
890
|
-
);
|
891
|
-
|
892
|
-
const index = key.split("-").pop();
|
893
|
-
|
894
|
-
if (element.checked) {
|
895
|
-
row.forEach((col) => {
|
896
|
-
col.classList.add("selected");
|
897
|
-
});
|
898
|
-
|
899
|
-
fireCustomEvent(self, "monster-datatable-row-selected", {
|
900
|
-
index: index,
|
901
|
-
});
|
902
|
-
} else {
|
903
|
-
row.forEach((col) => {
|
904
|
-
col.classList.remove("selected");
|
905
|
-
});
|
906
884
|
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
885
|
+
if (!element) {
|
886
|
+
return;
|
887
|
+
}
|
888
|
+
|
889
|
+
const key = element.parentNode.getAttribute(
|
890
|
+
"data-monster-insert-reference",
|
891
|
+
);
|
892
|
+
const row = self.getGridElements(
|
893
|
+
`[data-monster-insert-reference="${key}"]`,
|
894
|
+
);
|
911
895
|
|
912
|
-
|
896
|
+
const index = key.split("-").pop();
|
897
|
+
|
898
|
+
if (element.checked) {
|
899
|
+
row.forEach((col) => {
|
900
|
+
col.classList.add("selected");
|
901
|
+
});
|
902
|
+
|
903
|
+
fireCustomEvent(self, "monster-datatable-row-selected", {
|
904
|
+
index: index,
|
905
|
+
});
|
906
|
+
} else {
|
907
|
+
row.forEach((col) => {
|
908
|
+
col.classList.remove("selected");
|
909
|
+
});
|
910
|
+
|
911
|
+
fireCustomEvent(self, "monster-datatable-row-deselected", {
|
912
|
+
index: index,
|
913
|
+
});
|
913
914
|
}
|
914
915
|
|
916
|
+
fireCustomEvent(this, "monster-datatable-selection-changed", {});
|
917
|
+
|
915
918
|
const rows = self.getGridElements(`[data-monster-role="select-row"]`);
|
916
919
|
const allSelected = Array.from(rows).every((row) => row.checked);
|
920
|
+
|
917
921
|
const selectAll = this[gridHeadersElementSymbol].querySelector(
|
918
922
|
`[data-monster-role="select-all"]`,
|
919
923
|
);
|
920
|
-
|
924
|
+
|
925
|
+
if (selectAll) {
|
926
|
+
selectAll.checked = allSelected;
|
927
|
+
}
|
928
|
+
|
921
929
|
};
|
922
930
|
|
923
931
|
this[gridElementSymbol].addEventListener("click", selectRowCallback);
|