@schukai/monster 4.66.2 → 4.68.0

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.
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright © Volker Schukai and all contributing authors, 2025. All rights reserved.
3
+ * Node module: @schukai/monster
4
+ *
5
+ * This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
6
+ * The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
7
+ *
8
+ * For those who do not wish to adhere to the AGPLv3, a commercial license is available.
9
+ * Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
10
+ * For more information about purchasing a commercial license, please contact Volker Schukai.
11
+ */
12
+
13
+ import { addAttributeToken } from "../../../dom/attributes.mjs";
14
+ import { ATTRIBUTE_ERRORMESSAGE } from "../../../dom/constants.mjs";
15
+
16
+ export { FileManagerStyleSheet };
17
+
18
+ /**
19
+ * @private
20
+ * @type {CSSStyleSheet}
21
+ */
22
+ const FileManagerStyleSheet = new CSSStyleSheet();
23
+
24
+ try {
25
+ FileManagerStyleSheet.insertRule(
26
+ `
27
+ @layer filemanager {
28
+ :host{box-sizing:border-box;display:block;height:100%;height:-webkit-fill-available;height:fill-available;height:-moz-available;height:stretch;min-height:320px}
29
+ [data-monster-role=control]{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--monster-space-4);height:100%}
30
+ [data-monster-role=toolbar]{align-items:center;display:flex;gap:var(--monster-space-4);justify-content:space-between}
31
+ [data-monster-role=actions]{display:flex;gap:var(--monster-space-3);justify-content:flex-end}
32
+ [data-monster-role=title]{font-weight:700}
33
+ monster-split-panel{flex:1;min-height:300px}
34
+ monster-split-panel::part(control){height:100%}
35
+ monster-split-panel::part(endPanel){overflow:hidden}
36
+ [data-monster-role=nav-panel],[data-monster-role=editor-panel]{height:100%}
37
+ [data-monster-role=nav-panel]{display:flex;flex-direction:column;min-height:0}
38
+ [data-monster-role=editor-panel]{display:flex;flex-direction:column;gap:var(--monster-space-3);min-height:0;overflow:hidden;position:relative}
39
+ [data-monster-role=tabs-container]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
40
+ monster-tabs{flex:1;min-height:0;height:100%}
41
+ [data-monster-role=empty]{align-items:center;display:flex;inset:0;justify-content:center;padding:var(--monster-space-4);position:absolute;text-align:center}
42
+ [data-monster-role=tab-content]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
43
+ [data-monster-role=tab-content]:not(.active){display:none}
44
+ [data-monster-role=editor]{flex:1;font-family:var(--monster-font-family-monospace);height:100%;min-height:0;overflow:auto;resize:none;width:100%}
45
+ }
46
+ `,
47
+ 0,
48
+ );
49
+ } catch (e) {
50
+ addAttributeToken(
51
+ document.getRootNode().querySelector("html"),
52
+ ATTRIBUTE_ERRORMESSAGE,
53
+ e + "",
54
+ );
55
+ }
@@ -162,11 +162,19 @@ function calculateMaximumHeight(element) {
162
162
  let totalBoxShadowHeight = 0;
163
163
  let currentElement = element;
164
164
 
165
+ if (!(element instanceof Element)) {
166
+ return -1;
167
+ }
168
+
165
169
  // Get the distance from the top of the element to the top of the viewport
166
170
  const distanceFromTop = element.getBoundingClientRect().top;
167
171
 
168
172
  // Loop through the elements up to the body to sum up the bottom borders, padding, and margin
169
173
  while (currentElement && currentElement !== document.body) {
174
+ if (!(currentElement instanceof Element)) {
175
+ currentElement = currentElement.parentNode || currentElement.host;
176
+ continue;
177
+ }
170
178
  const style = window.getComputedStyle(currentElement);
171
179
 
172
180
  // Box sizing
@@ -182,6 +182,14 @@ class SplitPanel extends CustomElement {
182
182
  }
183
183
 
184
184
  this[internalSymbol].getSubject().currentDimension = dimension;
185
+ if (
186
+ this[startPanelElementSymbol] &&
187
+ this[endPanelElementSymbol] &&
188
+ this[draggerElementSymbol] &&
189
+ this[splitScreenElementSymbol]
190
+ ) {
191
+ applyPanelDimensions.call(this);
192
+ }
185
193
  return this;
186
194
  }
187
195
 
@@ -181,8 +181,8 @@ class Tabs extends CustomElement {
181
181
  * @property {string} labels.new-tab-label="New Tab"
182
182
  * @property {Object} features
183
183
  * @property {number} features.openDelay=500 Open delay in milliseconds
184
- * @property {string} features.removeBehavior="auto" Remove behavior, auto (default), next, previous and none
185
- * @property {boolean} features.openFirst=true Open the first tab
184
+ * @property {string} features.removeBehavior Remove behavior, auto, next, previous and none
185
+ * @property {boolean} features.openFirst Open the first tab when no active tab is set
186
186
  * @property {Object} fetch Fetch [see Using Fetch mozilla.org](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
187
187
  * @property {String} fetch.redirect=error
188
188
  * @property {String} fetch.method=GET
@@ -216,7 +216,7 @@ class Tabs extends CustomElement {
216
216
  features: {
217
217
  openDelay: null,
218
218
  removeBehavior: "auto",
219
- openFirst: true,
219
+ openFirst: false,
220
220
  },
221
221
 
222
222
  classes: {
@@ -845,55 +845,85 @@ function initEventHandler() {
845
845
  let doChange = false;
846
846
  let nextName = null;
847
847
  let previousName = null;
848
+ let targetReference = null;
849
+ let activeReference = null;
850
+ let restoreOpenFirst = null;
848
851
 
849
852
  const btn = this.getOption("buttons");
850
- for (let i = 0; i < btn.standard.length; i++) {
851
- if (btn.standard[i].reference === reference) {
852
- if (btn.standard[i].state === "active") {
853
- doChange = i;
854
- if (i < btn.standard.length - 1) {
855
- nextName = btn.standard[i + 1]?.reference;
856
- }
857
- if (i > 0) {
858
- previousName = btn.standard[i - 1]?.reference;
859
- }
853
+ if (btn?.standard) {
854
+ const activeButton = btn.standard.find(
855
+ (item) => item.state === "active",
856
+ );
857
+ activeReference = activeButton?.reference || null;
858
+ }
859
+
860
+ const nodes = getSlottedElements.call(this);
861
+ const orderedTabs = [];
862
+ for (const node of nodes) {
863
+ if (node instanceof HTMLElement) {
864
+ orderedTabs.push(node);
865
+ }
866
+ }
867
+
868
+ for (let i = 0; i < orderedTabs.length; i++) {
869
+ const node = orderedTabs[i];
870
+ if (node.getAttribute("id") === reference) {
871
+ if (reference === activeReference) {
872
+ doChange = true;
873
+ nextName = orderedTabs[i + 1]?.getAttribute?.("id") || null;
874
+ previousName = orderedTabs[i - 1]?.getAttribute?.("id") || null;
860
875
  }
861
876
  break;
862
877
  }
863
878
  }
864
879
 
865
880
  if (reference) {
866
- const container = this.querySelector(`[id=${reference}]`);
881
+ const escapedReference =
882
+ typeof CSS !== "undefined" && CSS.escape
883
+ ? CSS.escape(reference)
884
+ : reference;
885
+ const container = this.querySelector(`[id=${escapedReference}]`);
867
886
  if (container instanceof HTMLElement) {
868
887
  if (doChange) {
869
888
  switch (this.getOption("features.removeBehavior")) {
870
889
  case "auto":
871
890
  if (nextName !== null) {
872
- self.activeTab(nextName);
891
+ targetReference = nextName;
873
892
  } else {
874
893
  if (previousName !== null) {
875
- self.activeTab(previousName);
894
+ targetReference = previousName;
876
895
  }
877
896
  }
878
897
  break;
879
898
  case "next":
880
899
  if (nextName !== null) {
881
- self.activeTab(nextName);
900
+ targetReference = nextName;
882
901
  }
883
902
  break;
884
903
  case "previous":
885
904
  if (previousName !== null) {
886
- self.activeTab(previousName);
905
+ targetReference = previousName;
887
906
  }
888
907
  break;
889
908
 
890
909
  default: // and "none"
891
910
  break;
892
911
  }
912
+ if (targetReference) {
913
+ self.activeTab(targetReference);
914
+ restoreOpenFirst = this.getOption("features.openFirst");
915
+ this.setOption("features.openFirst", false);
916
+ }
893
917
  }
894
918
 
895
919
  container.remove();
896
920
  initTabButtons.call(this);
921
+ if (targetReference) {
922
+ if (restoreOpenFirst !== null) {
923
+ this.setOption("features.openFirst", restoreOpenFirst);
924
+ }
925
+ self.activeTab(targetReference);
926
+ }
897
927
  fireCustomEvent(this, "monster-tab-remove", {
898
928
  reference,
899
929
  });
@@ -1053,7 +1083,6 @@ function initTabButtons() {
1053
1083
  }
1054
1084
 
1055
1085
  if (node.matches(".active") === true && disabled !== true) {
1056
- node.classList.remove("active");
1057
1086
  activeReference = reference;
1058
1087
  }
1059
1088
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright © Volker Schukai and all contributing authors, 2025. All rights reserved.
2
+ * Copyright © Volker Schukai and all contributing authors, 2026. All rights reserved.
3
3
  * Node module: @schukai/monster
4
4
  *
5
5
  * This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
@@ -36,10 +36,12 @@ export * from "./components/content/camera-capture.mjs";
36
36
  export * from "./components/content/copy.mjs";
37
37
  export * from "./components/content/viewer/html.mjs";
38
38
  export * from "./components/content/viewer/message.mjs";
39
+ export * from "./components/files/file-manager.mjs";
39
40
  export * from "./components/time/timeline/appointment.mjs";
40
41
  export * from "./components/time/timeline/segment.mjs";
41
42
  export * from "./components/time/day.mjs";
42
43
  export * from "./components/time/month-calendar.mjs";
44
+ export * from "./components/form/buy-box.mjs";
43
45
  export * from "./components/form/message-state-button.mjs";
44
46
  export * from "./components/form/password.mjs";
45
47
  export * from "./components/form/dropzone.mjs";
@@ -53,10 +55,13 @@ export * from "./components/form/api-bar.mjs";
53
55
  export * from "./components/form/tabs.mjs";
54
56
  export * from "./components/form/state-button.mjs";
55
57
  export * from "./components/form/popper.mjs";
58
+ export * from "./components/form/cart-control.mjs";
56
59
  export * from "./components/form/select.mjs";
57
60
  export * from "./components/form/login.mjs";
58
61
  export * from "./components/form/confirm-button.mjs";
59
62
  export * from "./components/form/context-error.mjs";
63
+ export * from "./components/form/variant-select.mjs";
64
+ export * from "./components/form/register-wizard.mjs";
60
65
  export * from "./components/form/action-button.mjs";
61
66
  export * from "./components/form/form.mjs";
62
67
  export * from "./components/form/api-button.mjs";
@@ -88,10 +93,15 @@ export * from "./components/host/util.mjs";
88
93
  export * from "./components/host/call-button.mjs";
89
94
  export * from "./components/host/details.mjs";
90
95
  export * from "./components/host/constants.mjs";
96
+ export * from "./components/datatable/filter/text-operator.mjs";
97
+ export * from "./components/datatable/filter/time.mjs";
91
98
  export * from "./components/datatable/filter/input.mjs";
99
+ export * from "./components/datatable/filter/date-presets.mjs";
100
+ export * from "./components/datatable/filter/date.mjs";
92
101
  export * from "./components/datatable/filter/date-range.mjs";
93
102
  export * from "./components/datatable/filter/abstract-base.mjs";
94
103
  export * from "./components/datatable/filter/settings.mjs";
104
+ export * from "./components/datatable/filter/date-time.mjs";
95
105
  export * from "./components/datatable/filter/range.mjs";
96
106
  export * from "./components/datatable/datasource/dom.mjs";
97
107
  export * from "./components/datatable/datasource/rest.mjs";
@@ -156,7 +156,7 @@ function getMonsterVersion() {
156
156
  }
157
157
 
158
158
  /** don't touch, replaced by make with package.json version */
159
- monsterVersion = new Version("4.66.0");
159
+ monsterVersion = new Version("4.67.0");
160
160
 
161
161
  return monsterVersion;
162
162
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("4.66.0")
10
+ monsterVersion = new Version("4.67.0")
11
11
 
12
12
  let m = getMonsterVersion();
13
13
 
@@ -9,8 +9,8 @@
9
9
  </head>
10
10
  <body>
11
11
  <div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
12
- <h1 style='margin-bottom: 0.1em;'>Monster 4.66.0</h1>
13
- <div id="lastupdate" style='font-size:0.7em'>last update Mi 31. Dez 02:19:45 CET 2025</div>
12
+ <h1 style='margin-bottom: 0.1em;'>Monster 4.67.0</h1>
13
+ <div id="lastupdate" style='font-size:0.7em'>last update Do 1. Jan 21:29:16 CET 2026</div>
14
14
  </div>
15
15
  <div id="mocha-errors"
16
16
  style="color: red;font-weight: bold;display: flex;align-items: center;justify-content: center;flex-direction: column;margin:20px;"></div>