@schukai/monster 3.100.8 → 3.100.10

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.10] - 2025-01-19
6
+
7
+ ### Bug Fixes
8
+
9
+ - datatable css glitches
10
+
11
+
12
+
13
+ ## [3.100.9] - 2025-01-19
14
+
15
+ ### Bug Fixes
16
+
17
+ - **datatable:** button-bar layout
18
+
19
+
20
+
5
21
  ## [3.100.8] - 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.8"}
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.10"}
@@ -342,6 +342,20 @@ 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
+ pN.style.display = "flex";
354
+ pN.style.justifyContent = "flex-start";
355
+ }
356
+ }
357
+ })
358
+
345
359
  getHostConfig
346
360
  .call(this, getColumnVisibilityConfigKey)
347
361
  .then((config) => {
@@ -869,13 +883,19 @@ function initEventHandler() {
869
883
  "select-row",
870
884
  );
871
885
 
872
- if (!element) {
886
+ if (!(element instanceof HTMLInputElement)) {
887
+ return;
888
+ }
889
+
890
+ const parentNode= element.parentNode
891
+ if (!(parentNode instanceof HTMLDivElement)) {
873
892
  return;
874
893
  }
875
894
 
876
895
  const key = element.parentNode.getAttribute(
877
896
  "data-monster-insert-reference",
878
897
  );
898
+
879
899
  const row = self.getGridElements(
880
900
  `[data-monster-insert-reference="${key}"]`,
881
901
  );
@@ -909,6 +929,14 @@ function initEventHandler() {
909
929
  `[data-monster-role="select-all"]`,
910
930
  );
911
931
 
932
+ getSlottedElements.call(this,"[data-monster-role=row-action-button]","bar").forEach((i,e) => {
933
+ const selected = self.getSelectedRows();
934
+ const mode = (selected.length === 0) ? "hidden" : "visible";
935
+ if (e instanceof HTMLElement) {
936
+ e.style.visibility = mode;
937
+ }
938
+ })
939
+
912
940
  if (selectAll) {
913
941
  selectAll.checked = allSelected;
914
942
  }
@@ -937,6 +965,13 @@ function initEventHandler() {
937
965
  fireCustomEvent(this, "monster-datatable-all-rows-deselected", {});
938
966
  }
939
967
 
968
+ getSlottedElements.call(this,"[data-monster-role=row-action-button]","bar").forEach((i,e) => {
969
+ if (e instanceof HTMLElement) {
970
+ e.style.visibility = mode ? "visible" : "hidden";
971
+ }
972
+ })
973
+
974
+
940
975
  fireCustomEvent(this, "monster-datatable-selection-changed", {});
941
976
  }
942
977
  };
@@ -61,12 +61,10 @@
61
61
  ::slotted(.monster-button-group) {
62
62
  margin: 0 !important;
63
63
  flex-grow: 2;
64
- }
65
-
66
- ::slotted(.monster-button-group) {
67
64
  display: flex;
68
65
  flex-direction: row !important;
69
- align-items: flex-end;
66
+ align-items: center;
67
+ justify-content: flex-end;
70
68
  }
71
69
 
72
70
  [data-monster-role=datatable] {