@schukai/monster 4.69.1 → 4.70.1
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 +19 -0
- package/package.json +1 -1
- package/source/components/datatable/dataset.mjs +1 -2
- package/source/components/datatable/save-button.mjs +103 -80
- package/source/components/datatable/util.mjs +12 -6
- package/source/components/form/select.mjs +116 -22
- package/source/components/layout/slider.mjs +3 -3
- package/source/dom/customelement.mjs +76 -0
- package/source/dom/updater.mjs +4 -0
- package/source/dom/util/set-option-from-attribute.mjs +26 -6
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +181 -30
|
@@ -13,7 +13,15 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { Pathfinder } from "../../data/pathfinder.mjs";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
isFunction,
|
|
18
|
+
isBoolean,
|
|
19
|
+
isString,
|
|
20
|
+
isObject,
|
|
21
|
+
isNumber,
|
|
22
|
+
isArray,
|
|
23
|
+
isInteger,
|
|
24
|
+
} from "../../types/is.mjs";
|
|
17
25
|
import { attributeObserverSymbol } from "../customelement.mjs";
|
|
18
26
|
import { extractKeys } from "./extract-keys.mjs";
|
|
19
27
|
|
|
@@ -77,15 +85,27 @@ function setOptionFromAttribute(
|
|
|
77
85
|
value = mapping[optionName](value);
|
|
78
86
|
}
|
|
79
87
|
|
|
80
|
-
|
|
81
|
-
if (
|
|
88
|
+
let optionValue = finder.getVia(optionName);
|
|
89
|
+
if (optionValue === null || optionValue === undefined) {
|
|
90
|
+
optionValue = value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (optionValue === null || optionValue === undefined) {
|
|
94
|
+
value = null;
|
|
95
|
+
} else if (isBoolean(optionValue)) {
|
|
82
96
|
value = value === "true";
|
|
83
|
-
} else if (
|
|
97
|
+
} else if (isInteger(optionValue)) {
|
|
98
|
+
value = Number(value);
|
|
99
|
+
} else if (isNumber(optionValue)) {
|
|
84
100
|
value = Number(value);
|
|
85
|
-
} else if (
|
|
101
|
+
} else if (isString(optionValue)) {
|
|
86
102
|
value = String(value);
|
|
87
|
-
} else if (
|
|
103
|
+
} else if (isObject(optionValue)) {
|
|
88
104
|
value = JSON.parse(value);
|
|
105
|
+
} else if (isArray(optionValue)) {
|
|
106
|
+
value = value.split("::");
|
|
107
|
+
} else {
|
|
108
|
+
value = optionValue;
|
|
89
109
|
}
|
|
90
110
|
|
|
91
111
|
finder.setVia(optionName, value);
|
package/source/types/version.mjs
CHANGED
package/test/cases/monster.mjs
CHANGED
package/test/web/test.html
CHANGED
|
@@ -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.
|
|
13
|
-
<div id="lastupdate" style='font-size:0.7em'>last update
|
|
12
|
+
<h1 style='margin-bottom: 0.1em;'>Monster 4.70.0</h1>
|
|
13
|
+
<div id="lastupdate" style='font-size:0.7em'>last update Sa 3. Jan 03:58: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>
|