@schukai/monster 4.43.1 → 4.43.3
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 +16 -0
- package/package.json +1 -1
- package/source/components/accessibility/locale-picker.mjs +538 -538
- package/source/components/accessibility/locale-select.mjs +172 -172
- package/source/components/content/viewer.mjs +823 -823
- package/source/components/datatable/constants.mjs +15 -15
- package/source/components/datatable/datatable/header.mjs +253 -253
- package/source/components/datatable/datatable.mjs +1284 -1284
- package/source/components/datatable/filter.mjs +1339 -1342
- package/source/components/datatable/pagination.mjs +502 -502
- package/source/components/datatable/stylesheet/datatable.mjs +13 -6
- package/source/components/form/quantity.mjs +229 -229
- package/source/components/form/select.mjs +2963 -2963
- package/source/components/form/stylesheet/quantity.mjs +13 -6
- package/source/components/form/stylesheet/select.mjs +13 -6
- package/source/components/navigation/site-navigation.mjs +383 -210
- package/source/components/navigation/style/site-navigation.pcss +103 -15
- package/source/components/navigation/stylesheet/site-navigation.mjs +14 -7
- package/source/components/style/typography.css +4 -2
- package/source/dom/customelement.mjs +959 -963
- package/source/dom/slotted.mjs +87 -87
- package/source/i18n/util.mjs +149 -149
- package/source/monster.mjs +3 -0
- package/source/types/is.mjs +64 -64
- package/source/types/typeof.mjs +16 -16
- 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 +2724 -1287
package/source/types/is.mjs
CHANGED
@@ -15,18 +15,18 @@
|
|
15
15
|
import { proxyInstanceMarker } from "../constants.mjs";
|
16
16
|
|
17
17
|
export {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
18
|
+
isIterable,
|
19
|
+
isPrimitive,
|
20
|
+
isSymbol,
|
21
|
+
isBoolean,
|
22
|
+
isString,
|
23
|
+
isObject,
|
24
|
+
isInstance,
|
25
|
+
isArray,
|
26
|
+
isFunction,
|
27
|
+
isInteger,
|
28
|
+
isProxy,
|
29
|
+
isElement,
|
30
30
|
};
|
31
31
|
|
32
32
|
/**
|
@@ -35,7 +35,7 @@ export {
|
|
35
35
|
* @returns {boolean}
|
36
36
|
*/
|
37
37
|
function isElement(value) {
|
38
|
-
|
38
|
+
return value instanceof Element;
|
39
39
|
}
|
40
40
|
|
41
41
|
/**
|
@@ -45,7 +45,7 @@ function isElement(value) {
|
|
45
45
|
* @returns {boolean}
|
46
46
|
*/
|
47
47
|
function isProxy(value) {
|
48
|
-
|
48
|
+
return value?.[proxyInstanceMarker] === proxyInstanceMarker;
|
49
49
|
}
|
50
50
|
|
51
51
|
/**
|
@@ -63,9 +63,9 @@ function isProxy(value) {
|
|
63
63
|
* @copyright schukai GmbH
|
64
64
|
*/
|
65
65
|
function isIterable(value) {
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
if (value === undefined) return false;
|
67
|
+
if (value === null) return false;
|
68
|
+
return typeof value?.[Symbol.iterator] === "function";
|
69
69
|
}
|
70
70
|
|
71
71
|
/**
|
@@ -81,24 +81,24 @@ function isIterable(value) {
|
|
81
81
|
* @copyright schukai GmbH
|
82
82
|
*/
|
83
83
|
function isPrimitive(value) {
|
84
|
-
|
84
|
+
var type;
|
85
85
|
|
86
|
-
|
87
|
-
|
88
|
-
|
86
|
+
if (value === undefined || value === null) {
|
87
|
+
return true;
|
88
|
+
}
|
89
89
|
|
90
|
-
|
90
|
+
type = typeof value;
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
92
|
+
if (
|
93
|
+
type === "string" ||
|
94
|
+
type === "number" ||
|
95
|
+
type === "boolean" ||
|
96
|
+
type === "symbol"
|
97
|
+
) {
|
98
|
+
return true;
|
99
|
+
}
|
100
100
|
|
101
|
-
|
101
|
+
return false;
|
102
102
|
}
|
103
103
|
|
104
104
|
/**
|
@@ -114,7 +114,7 @@ function isPrimitive(value) {
|
|
114
114
|
* @copyright schukai GmbH
|
115
115
|
*/
|
116
116
|
function isSymbol(value) {
|
117
|
-
|
117
|
+
return "symbol" === typeof value ? true : false;
|
118
118
|
}
|
119
119
|
|
120
120
|
/**
|
@@ -130,11 +130,11 @@ function isSymbol(value) {
|
|
130
130
|
* @copyright schukai GmbH
|
131
131
|
*/
|
132
132
|
function isBoolean(value) {
|
133
|
-
|
134
|
-
|
135
|
-
|
133
|
+
if (value === true || value === false) {
|
134
|
+
return true;
|
135
|
+
}
|
136
136
|
|
137
|
-
|
137
|
+
return false;
|
138
138
|
}
|
139
139
|
|
140
140
|
/**
|
@@ -150,10 +150,10 @@ function isBoolean(value) {
|
|
150
150
|
* @copyright schukai GmbH
|
151
151
|
*/
|
152
152
|
function isString(value) {
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
153
|
+
if (value === undefined || typeof value !== "string") {
|
154
|
+
return false;
|
155
|
+
}
|
156
|
+
return true;
|
157
157
|
}
|
158
158
|
|
159
159
|
/**
|
@@ -169,14 +169,14 @@ function isString(value) {
|
|
169
169
|
* @copyright schukai GmbH
|
170
170
|
*/
|
171
171
|
function isObject(value) {
|
172
|
-
|
173
|
-
|
172
|
+
if (isArray(value)) return false;
|
173
|
+
if (isPrimitive(value)) return false;
|
174
174
|
|
175
|
-
|
176
|
-
|
177
|
-
|
175
|
+
if (typeof value === "object") {
|
176
|
+
return true;
|
177
|
+
}
|
178
178
|
|
179
|
-
|
179
|
+
return false;
|
180
180
|
}
|
181
181
|
|
182
182
|
/**
|
@@ -193,18 +193,18 @@ function isObject(value) {
|
|
193
193
|
* @copyright schukai GmbH
|
194
194
|
*/
|
195
195
|
function isInstance(value, instance) {
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
196
|
+
if (!isObject(value)) return false;
|
197
|
+
if (!isFunction(instance)) return false;
|
198
|
+
if (!instance.hasOwnProperty("prototype")) return false;
|
199
|
+
if (value instanceof instance) return true;
|
200
200
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
201
|
+
let proto = Object.getPrototypeOf(value);
|
202
|
+
while (proto != null) {
|
203
|
+
if (proto === instance.prototype) return true;
|
204
|
+
proto = Object.getPrototypeOf(proto);
|
205
|
+
}
|
206
206
|
|
207
|
-
|
207
|
+
return false;
|
208
208
|
}
|
209
209
|
|
210
210
|
/**
|
@@ -221,7 +221,7 @@ function isInstance(value, instance) {
|
|
221
221
|
* @see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
|
222
222
|
*/
|
223
223
|
function isArray(value) {
|
224
|
-
|
224
|
+
return Array.isArray(value);
|
225
225
|
}
|
226
226
|
|
227
227
|
/**
|
@@ -237,14 +237,14 @@ function isArray(value) {
|
|
237
237
|
* @copyright schukai GmbH
|
238
238
|
*/
|
239
239
|
function isFunction(value) {
|
240
|
-
|
241
|
-
|
240
|
+
if (isArray(value)) return false;
|
241
|
+
if (isPrimitive(value)) return false;
|
242
242
|
|
243
|
-
|
244
|
-
|
245
|
-
|
243
|
+
if (typeof value === "function") {
|
244
|
+
return true;
|
245
|
+
}
|
246
246
|
|
247
|
-
|
247
|
+
return false;
|
248
248
|
}
|
249
249
|
|
250
250
|
/**
|
@@ -260,5 +260,5 @@ function isFunction(value) {
|
|
260
260
|
* @copyright schukai GmbH
|
261
261
|
*/
|
262
262
|
function isInteger(value) {
|
263
|
-
|
263
|
+
return Number.isInteger(value);
|
264
264
|
}
|
package/source/types/typeof.mjs
CHANGED
@@ -26,26 +26,26 @@ export { typeOf };
|
|
26
26
|
* @throws {TypeError} value is not a primitive
|
27
27
|
*/
|
28
28
|
function typeOf(value) {
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
if (value === null) {
|
30
|
+
return "null";
|
31
|
+
}
|
32
32
|
|
33
|
-
|
33
|
+
const baseType = typeof value;
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
if (baseType !== "object" && baseType !== "function") {
|
36
|
+
return baseType;
|
37
|
+
}
|
38
38
|
|
39
|
-
|
39
|
+
const internalType = {}.toString.call(value).slice(8, -1);
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
if (internalType !== "Object") {
|
42
|
+
return internalType.toLowerCase();
|
43
|
+
}
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
45
|
+
const constructorName = value.constructor?.name;
|
46
|
+
if (constructorName && constructorName !== "Object") {
|
47
|
+
return constructorName.toLowerCase();
|
48
|
+
}
|
49
49
|
|
50
|
-
|
50
|
+
return "object";
|
51
51
|
}
|
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.43.2</h1>
|
13
|
+
<div id="lastupdate" style='font-size:0.7em'>last update Fr 3. Okt 19:55:23 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>
|