@schukai/monster 4.57.0 → 4.58.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 +12 -0
- package/package.json +1 -1
- package/source/components/data/stylesheet/metric-graph.mjs +1 -1
- package/source/components/data/stylesheet/metric.mjs +1 -1
- package/source/components/datatable/datasource/rest.mjs +141 -14
- package/source/components/datatable/datatable.mjs +3 -7
- package/source/components/datatable/save-button.mjs +348 -334
- package/source/components/datatable/status.mjs +7 -0
- package/source/components/datatable/util.mjs +7 -0
- package/source/components/form/button-bar.mjs +193 -95
- package/source/components/form/field-set.mjs +283 -283
- package/source/components/form/form.mjs +407 -169
- package/source/components/form/login.mjs +1571 -1571
- package/source/components/form/quantity.mjs +233 -233
- package/source/components/form/select.mjs +3106 -3101
- package/source/components/form/style/field-set.pcss +6 -2
- package/source/components/form/style/form.pcss +8 -0
- package/source/components/form/stylesheet/field-set.mjs +1 -1
- package/source/components/form/stylesheet/form.mjs +1 -1
- package/source/components/form/stylesheet/select.mjs +13 -6
- package/source/components/style/typography.css +2 -2
- package/source/components/tree-menu/stylesheet/tree-menu.mjs +1 -1
- package/source/constraints/abstract.mjs +17 -17
- package/source/dom/customelement.mjs +962 -963
- package/source/dom/updater.mjs +874 -863
- package/source/dom/util/init-options-from-attributes.mjs +56 -56
- package/source/monster.mjs +0 -1
- package/source/net/webconnect.mjs +325 -325
- package/source/types/is.mjs +66 -66
package/source/types/is.mjs
CHANGED
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
import { proxyInstanceMarker } from "../constants.mjs";
|
|
16
16
|
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
isIterable,
|
|
19
|
+
isPrimitive,
|
|
20
|
+
isSymbol,
|
|
21
|
+
isBoolean,
|
|
22
|
+
isString,
|
|
23
|
+
isObject,
|
|
24
|
+
isInstance,
|
|
25
|
+
isArray,
|
|
26
|
+
isFunction,
|
|
27
|
+
isInteger,
|
|
28
|
+
isNumber,
|
|
29
|
+
isProxy,
|
|
30
|
+
isElement,
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -36,7 +36,7 @@ export {
|
|
|
36
36
|
* @returns {boolean}
|
|
37
37
|
*/
|
|
38
38
|
function isElement(value) {
|
|
39
|
-
|
|
39
|
+
return value instanceof Element;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -46,7 +46,7 @@ function isElement(value) {
|
|
|
46
46
|
* @returns {boolean}
|
|
47
47
|
*/
|
|
48
48
|
function isProxy(value) {
|
|
49
|
-
|
|
49
|
+
return value?.[proxyInstanceMarker] === proxyInstanceMarker;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
@@ -64,9 +64,9 @@ function isProxy(value) {
|
|
|
64
64
|
* @copyright Volker Schukai
|
|
65
65
|
*/
|
|
66
66
|
function isIterable(value) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
if (value === undefined) return false;
|
|
68
|
+
if (value === null) return false;
|
|
69
|
+
return typeof value?.[Symbol.iterator] === "function";
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
@@ -82,24 +82,24 @@ function isIterable(value) {
|
|
|
82
82
|
* @copyright Volker Schukai
|
|
83
83
|
*/
|
|
84
84
|
function isPrimitive(value) {
|
|
85
|
-
|
|
85
|
+
var type;
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
if (value === undefined || value === null) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
type = typeof value;
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
if (
|
|
94
|
+
type === "string" ||
|
|
95
|
+
type === "number" ||
|
|
96
|
+
type === "boolean" ||
|
|
97
|
+
type === "symbol"
|
|
98
|
+
) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
return false;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/**
|
|
@@ -115,7 +115,7 @@ function isPrimitive(value) {
|
|
|
115
115
|
* @copyright Volker Schukai
|
|
116
116
|
*/
|
|
117
117
|
function isSymbol(value) {
|
|
118
|
-
|
|
118
|
+
return "symbol" === typeof value ? true : false;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/**
|
|
@@ -131,11 +131,11 @@ function isSymbol(value) {
|
|
|
131
131
|
* @copyright Volker Schukai
|
|
132
132
|
*/
|
|
133
133
|
function isBoolean(value) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
if (value === true || value === false) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
return false;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/**
|
|
@@ -151,10 +151,10 @@ function isBoolean(value) {
|
|
|
151
151
|
* @copyright Volker Schukai
|
|
152
152
|
*/
|
|
153
153
|
function isString(value) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
if (value === undefined || typeof value !== "string") {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/**
|
|
@@ -170,14 +170,14 @@ function isString(value) {
|
|
|
170
170
|
* @copyright Volker Schukai
|
|
171
171
|
*/
|
|
172
172
|
function isObject(value) {
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
if (isArray(value)) return false;
|
|
174
|
+
if (isPrimitive(value)) return false;
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
if (typeof value === "object") {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
return false;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
/**
|
|
@@ -194,18 +194,18 @@ function isObject(value) {
|
|
|
194
194
|
* @copyright Volker Schukai
|
|
195
195
|
*/
|
|
196
196
|
function isInstance(value, instance) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
if (!isObject(value)) return false;
|
|
198
|
+
if (!isFunction(instance)) return false;
|
|
199
|
+
if (!instance.hasOwnProperty("prototype")) return false;
|
|
200
|
+
if (value instanceof instance) return true;
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
let proto = Object.getPrototypeOf(value);
|
|
203
|
+
while (proto != null) {
|
|
204
|
+
if (proto === instance.prototype) return true;
|
|
205
|
+
proto = Object.getPrototypeOf(proto);
|
|
206
|
+
}
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
return false;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
/**
|
|
@@ -222,7 +222,7 @@ function isInstance(value, instance) {
|
|
|
222
222
|
* @see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
|
|
223
223
|
*/
|
|
224
224
|
function isArray(value) {
|
|
225
|
-
|
|
225
|
+
return Array.isArray(value);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
/**
|
|
@@ -238,14 +238,14 @@ function isArray(value) {
|
|
|
238
238
|
* @copyright Volker Schukai
|
|
239
239
|
*/
|
|
240
240
|
function isFunction(value) {
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
if (isArray(value)) return false;
|
|
242
|
+
if (isPrimitive(value)) return false;
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
if (typeof value === "function") {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
247
|
|
|
248
|
-
|
|
248
|
+
return false;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
/**
|
|
@@ -262,7 +262,7 @@ function isFunction(value) {
|
|
|
262
262
|
* @since 4.47.0
|
|
263
263
|
*/
|
|
264
264
|
function isNumber(value) {
|
|
265
|
-
|
|
265
|
+
return typeof value === "number" && !isNaN(value);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
/**
|
|
@@ -278,5 +278,5 @@ function isNumber(value) {
|
|
|
278
278
|
* @copyright Volker Schukai
|
|
279
279
|
*/
|
|
280
280
|
function isInteger(value) {
|
|
281
|
-
|
|
281
|
+
return Number.isInteger(value);
|
|
282
282
|
}
|