@schukai/monster 4.58.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,22 @@
|
|
|
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
|
+
|
|
13
|
+
## [4.59.0] - 2025-12-29
|
|
14
|
+
|
|
15
|
+
### Add Features
|
|
16
|
+
|
|
17
|
+
- Add API Contract Checklist to documentation and update version
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
5
21
|
## [4.58.0] - 2025-12-29
|
|
6
22
|
|
|
7
23
|
### 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.
|
|
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
|
});
|
package/source/dom/updater.mjs
CHANGED
|
@@ -1050,6 +1050,18 @@ function handleInputControlAttributeUpdate(element, name, value) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
break;
|
|
1052
1052
|
|
|
1053
|
+
case "color":
|
|
1054
|
+
if (name === "value") {
|
|
1055
|
+
// Setting an empty string on a color input is invalid (#rrggbb required)
|
|
1056
|
+
if (value === undefined || value === "") {
|
|
1057
|
+
break;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
element.value = value;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
break;
|
|
1064
|
+
|
|
1053
1065
|
case "text":
|
|
1054
1066
|
default:
|
|
1055
1067
|
if (name === "value") {
|
package/test/web/tests.js
CHANGED
|
@@ -19300,6 +19300,14 @@ ${key.data.toString("base64")}
|
|
|
19300
19300
|
element.checked = value !== void 0;
|
|
19301
19301
|
}
|
|
19302
19302
|
break;
|
|
19303
|
+
case "color":
|
|
19304
|
+
if (name === "value") {
|
|
19305
|
+
if (value === void 0 || value === "") {
|
|
19306
|
+
break;
|
|
19307
|
+
}
|
|
19308
|
+
element.value = value;
|
|
19309
|
+
}
|
|
19310
|
+
break;
|
|
19303
19311
|
case "text":
|
|
19304
19312
|
default:
|
|
19305
19313
|
if (name === "value") {
|