@schukai/monster 4.37.2 → 4.38.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/content/viewer/html.mjs +131 -131
- package/source/components/content/viewer/message.mjs +739 -740
- package/source/components/content/viewer/stylesheet/html.mjs +13 -6
- package/source/components/content/viewer/stylesheet/message.mjs +13 -6
- package/source/components/data/kpi-tile.mjs +111 -0
- package/source/components/data/style/kpi-tile.pcss +161 -0
- package/source/components/data/stylesheet/kpi-tile.mjs +38 -0
- package/source/components/form/select.mjs +2850 -2850
- package/source/components/layout/tabs.mjs +1024 -1024
- package/source/components/layout/utils/attach-tabs-hash-sync.mjs +158 -152
- package/source/components/notify/stylesheet/message.mjs +13 -6
- package/source/components/state/log.mjs +1 -1
- package/source/components/tree-menu/tree-menu.mjs +446 -438
- package/source/dom/customelement.mjs +4 -2
- package/source/dom/error.mjs +47 -47
- 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 +13 -6
@@ -1031,8 +1031,10 @@ function getOptionsFromScriptTag() {
|
|
1031
1031
|
* @return {object}
|
1032
1032
|
*/
|
1033
1033
|
function getOptionsFromAttributes() {
|
1034
|
-
|
1035
|
-
|
1034
|
+
if (
|
1035
|
+
this.hasAttribute(ATTRIBUTE_DISABLED) &&
|
1036
|
+
this.getAttribute(ATTRIBUTE_DISABLED) !== null
|
1037
|
+
) {
|
1036
1038
|
this.setOption(ATTRIBUTE_DISABLED, true);
|
1037
1039
|
} else {
|
1038
1040
|
this.setOption(ATTRIBUTE_DISABLED, undefined);
|
package/source/dom/error.mjs
CHANGED
@@ -25,11 +25,11 @@ export { resetErrorAttribute, addErrorAttribute, removeErrorAttribute };
|
|
25
25
|
* @return {HTMLElement}
|
26
26
|
*/
|
27
27
|
function resetErrorAttribute(element) {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
validateInstance(element, HTMLElement);
|
29
|
+
if (element.hasAttribute(ATTRIBUTE_ERRORMESSAGE)) {
|
30
|
+
element.removeAttribute(ATTRIBUTE_ERRORMESSAGE);
|
31
|
+
}
|
32
|
+
return element;
|
33
33
|
}
|
34
34
|
|
35
35
|
/**
|
@@ -43,45 +43,45 @@ function resetErrorAttribute(element) {
|
|
43
43
|
* @return {HTMLElement}
|
44
44
|
*/
|
45
45
|
function addErrorAttribute(element, message) {
|
46
|
-
|
46
|
+
validateInstance(element, HTMLElement);
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
if (message instanceof Error) {
|
49
|
+
message = message.message;
|
50
|
+
}
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
52
|
+
if (typeof message !== "string") {
|
53
|
+
if (typeof message === "object" && message !== null) {
|
54
|
+
if (typeof message.toString === "function") {
|
55
|
+
message = message.toString();
|
56
|
+
} else {
|
57
|
+
message = JSON.stringify(message);
|
58
|
+
}
|
59
|
+
} else {
|
60
|
+
message = String(message);
|
61
|
+
}
|
62
|
+
}
|
63
63
|
|
64
|
-
|
64
|
+
validateString(message);
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
if (!element.hasAttribute(ATTRIBUTE_ERRORMESSAGE)) {
|
67
|
+
element.setAttribute(ATTRIBUTE_ERRORMESSAGE, message);
|
68
|
+
return element;
|
69
|
+
}
|
70
70
|
|
71
|
-
|
72
|
-
|
71
|
+
const current = element.getAttribute(ATTRIBUTE_ERRORMESSAGE);
|
72
|
+
const list = current.split("::");
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
for (let i = 0; i < list.length; i++) {
|
75
|
+
if (list[i] === message) {
|
76
|
+
return element;
|
77
|
+
}
|
78
|
+
}
|
79
79
|
|
80
|
-
|
80
|
+
list.push(message);
|
81
81
|
|
82
|
-
|
82
|
+
element.setAttribute(ATTRIBUTE_ERRORMESSAGE, list.join("::"));
|
83
83
|
|
84
|
-
|
84
|
+
return element;
|
85
85
|
}
|
86
86
|
|
87
87
|
/**
|
@@ -95,20 +95,20 @@ function addErrorAttribute(element, message) {
|
|
95
95
|
* @return {HTMLElement}
|
96
96
|
*/
|
97
97
|
function removeErrorAttribute(element, message) {
|
98
|
-
|
99
|
-
|
98
|
+
validateInstance(element, HTMLElement);
|
99
|
+
validateString(message);
|
100
100
|
|
101
|
-
|
102
|
-
|
103
|
-
|
101
|
+
if (!element.hasAttribute(ATTRIBUTE_ERRORMESSAGE)) {
|
102
|
+
return element;
|
103
|
+
}
|
104
104
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
105
|
+
const current = element.getAttribute(ATTRIBUTE_ERRORMESSAGE);
|
106
|
+
const list = current.split("::");
|
107
|
+
const newList = list.filter(function (token) {
|
108
|
+
return token !== message;
|
109
|
+
});
|
110
110
|
|
111
|
-
|
111
|
+
element.setAttribute(ATTRIBUTE_ERRORMESSAGE, newList.join("::"));
|
112
112
|
|
113
|
-
|
113
|
+
return element;
|
114
114
|
}
|
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.38.0</h1>
|
13
|
+
<div id="lastupdate" style='font-size:0.7em'>last update Mi 23. Jul 15:15:52 CEST 2025</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>
|