@schukai/monster 4.59.0 → 4.60.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,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## [4.60.0] - 2025-12-29
6
+
7
+ ### Add Features
8
+
9
+ - Add handling for pending save reset in SaveButton component
10
+
11
+
12
+
5
13
  ## [4.59.0] - 2025-12-29
6
14
 
7
15
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.4","@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.59.0"}
1
+ {"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.4","@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.60.0"}
@@ -60,6 +60,7 @@ const originValuesSymbol = Symbol("originValues");
60
60
  */
61
61
  const badgeElementSymbol = Symbol("badgeElement");
62
62
  const saveInFlightSymbol = Symbol("saveInFlight");
63
+ const pendingResetSymbol = Symbol("pendingReset");
63
64
 
64
65
  /**
65
66
  * A save button component
@@ -182,6 +183,7 @@ class SaveButton extends CustomElement {
182
183
  if (element instanceof RestDatasource) {
183
184
  element.addEventListener("monster-datasource-fetch", (event) => {
184
185
  if (self[saveInFlightSymbol]) {
186
+ self[pendingResetSymbol] = true;
185
187
  return;
186
188
  }
187
189
  self[originValuesSymbol] = null;
@@ -429,6 +431,10 @@ function initEventHandler() {
429
431
  })
430
432
  .finally(() => {
431
433
  this[saveInFlightSymbol] = false;
434
+ if (this[pendingResetSymbol]) {
435
+ this[pendingResetSymbol] = false;
436
+ this[originValuesSymbol] = null;
437
+ }
432
438
  });
433
439
  });
434
440
  });