@schukai/monster 4.30.1 → 4.32.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
 
4
4
 
5
+ ## [4.32.0] - 2025-07-08
6
+
7
+ ### Add Features
8
+
9
+ - Add reset functionality to Select component
10
+
11
+
12
+
13
+ ## [4.31.0] - 2025-07-08
14
+
15
+ ### Add Features
16
+
17
+ - Disable monster issue 280 and update handling for attribute
18
+
19
+
20
+
5
21
  ## [4.30.1] - 2025-07-08
6
22
 
7
23
  ### Bug Fixes
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.2","@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":"4.30.1"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.2","@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":"4.32.0"}
@@ -557,6 +557,41 @@ class Select extends CustomControl {
557
557
  );
558
558
  }
559
559
 
560
+ /**
561
+ * Resets the select control: clears selection, resets options, removes status/errors.
562
+ */
563
+ reset() {
564
+ try {
565
+
566
+ setSelection.call(this, null).then(() => {
567
+ const lazyLoadFlag = this.getOption("features.lazyLoad");
568
+ const remoteFilterFlag = getFilterMode.call(this) === FILTER_MODE_REMOTE;
569
+
570
+ if (lazyLoadFlag || remoteFilterFlag) {
571
+ this.setOption("options", []);
572
+ }
573
+
574
+ this.setOption("messages.selected", "");
575
+ this.setOption("messages.total", "");
576
+ this.setOption("messages.summary", "");
577
+
578
+ removeErrorAttribute(this);
579
+
580
+ this[lazyLoadDoneSymbol] = false;
581
+ this[runLookupOnceSymbol] = false;
582
+
583
+ checkOptionState.call(this);
584
+ calcAndSetOptionsDimension.call(this);
585
+ updatePopper.call(this);
586
+ }).catch((e) => {
587
+ addErrorAttribute(this, e);
588
+ });
589
+ } catch (e) {
590
+ addErrorAttribute(this, e);
591
+ }
592
+ }
593
+
594
+
560
595
  /**
561
596
  * @return {Select}
562
597
  */
@@ -1031,6 +1031,13 @@ function getOptionsFromScriptTag() {
1031
1031
  * @return {object}
1032
1032
  */
1033
1033
  function getOptionsFromAttributes() {
1034
+
1035
+ if(this.hasAttribute(ATTRIBUTE_DISABLED) && this.getAttribute(ATTRIBUTE_DISABLED) !== null) {
1036
+ this.setOption(ATTRIBUTE_DISABLED, true);
1037
+ } else {
1038
+ this.setOption(ATTRIBUTE_DISABLED, undefined);
1039
+ }
1040
+
1034
1041
  if (this.hasAttribute(ATTRIBUTE_OPTIONS)) {
1035
1042
  try {
1036
1043
  return parseOptionsJSON.call(this, this.getAttribute(ATTRIBUTE_OPTIONS));