@schukai/monster 3.73.8 → 3.73.9
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/source/components/datatable/filter/input.mjs +2 -2
- package/source/components/datatable/filter/select.mjs +6 -2
- package/source/components/datatable/stylesheet/change-button.mjs +1 -1
- package/source/components/datatable/stylesheet/column-bar.mjs +1 -1
- package/source/components/datatable/stylesheet/dataset.mjs +1 -1
- package/source/components/datatable/stylesheet/datatable.mjs +13 -6
- package/source/components/datatable/stylesheet/embedded-pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/filter-select.mjs +13 -6
- package/source/components/datatable/stylesheet/filter.mjs +13 -6
- package/source/components/datatable/stylesheet/pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/save-button.mjs +1 -1
- package/source/components/datatable/stylesheet/status.mjs +1 -1
- package/source/components/form/action-button.mjs +12 -1
- package/source/components/form/api-button.mjs +16 -5
- package/source/components/form/button-bar.mjs +13 -1
- package/source/components/form/confirm-button.mjs +12 -1
- package/source/components/form/context-error.mjs +12 -1
- package/source/components/form/context-help.mjs +12 -1
- package/source/components/form/field-set.mjs +12 -1
- package/source/components/form/form.mjs +15 -0
- package/source/components/form/message-state-button.mjs +16 -1
- package/source/components/form/popper-button.mjs +16 -1
- package/source/components/form/reload.mjs +14 -2
- package/source/components/form/shadow-reload.mjs +5 -62
- package/source/components/form/state-button.mjs +4 -30
- package/source/components/form/stylesheet/action-button.mjs +1 -1
- package/source/components/form/stylesheet/field-set.mjs +1 -1
- package/source/components/form/stylesheet/state-button.mjs +1 -1
- package/source/components/form/stylesheet/toggle-switch.mjs +1 -1
- package/source/components/form/tabs.mjs +1 -37
- package/source/components/form/template.mjs +4 -29
- package/source/components/form/toggle-switch.mjs +16 -1
- package/source/components/form/tree-select.mjs +8 -36
- package/source/components/host/stylesheet/call-button.mjs +1 -1
- package/source/components/host/stylesheet/host.mjs +1 -1
- package/source/components/host/stylesheet/overlay.mjs +1 -1
- package/source/components/host/stylesheet/toggle-button.mjs +1 -1
- package/source/components/host/stylesheet/viewer.mjs +1 -1
- package/source/components/layout/popper.mjs +317 -317
- package/source/components/layout/stylesheet/collapse.mjs +1 -1
- package/source/components/layout/stylesheet/details.mjs +1 -1
- package/source/components/layout/stylesheet/panel.mjs +1 -1
- package/source/components/layout/stylesheet/tabs.mjs +1 -1
- package/source/components/navigation/stylesheet/table-of-content.mjs +14 -7
- package/source/components/navigation/table-of-content.mjs +22 -17
- package/source/components/notify/stylesheet/message.mjs +1 -1
- package/source/components/stylesheet/color.mjs +13 -6
- package/source/components/stylesheet/mixin/property.mjs +13 -6
- package/source/components/stylesheet/property.mjs +1 -1
- package/source/components/tree-menu/stylesheet/tree-menu.mjs +1 -1
- package/source/components/tree-menu/tree-menu.mjs +21 -3
- package/source/data/buildtree.mjs +63 -63
- package/source/data/pathfinder.mjs +22 -19
- package/source/dom/updater.mjs +772 -759
- package/source/text/generate-range-comparison-expression.mjs +1 -1
- package/source/types/base.mjs +1 -1
- package/source/types/id.mjs +1 -1
- package/source/types/node.mjs +141 -142
- package/test/cases/data/buildmap.mjs +0 -1
- package/test/cases/data/pathfinder.mjs +2 -1
@@ -223,14 +223,13 @@ function iterate(subject, path, check) {
|
|
223
223
|
|
224
224
|
/**
|
225
225
|
*
|
226
|
-
* @param
|
227
|
-
* @param
|
228
|
-
* @param
|
229
|
-
* @returns {
|
226
|
+
* @param subject
|
227
|
+
* @param path
|
228
|
+
* @param check
|
229
|
+
* @returns {V|*|Map}
|
230
230
|
* @throws {TypeError} unsupported type
|
231
231
|
* @throws {Error} the journey is not at its end
|
232
232
|
* @throws {Error} unsupported action for this data type
|
233
|
-
* @private
|
234
233
|
*/
|
235
234
|
function getValueViaPath(subject, path, check) {
|
236
235
|
if (check === undefined) {
|
@@ -239,7 +238,9 @@ function getValueViaPath(subject, path, check) {
|
|
239
238
|
validateBoolean(check);
|
240
239
|
|
241
240
|
if (!(isArray(path) || isString(path))) {
|
242
|
-
throw new Error(
|
241
|
+
throw new Error(
|
242
|
+
"type error: a path must be a string or an array in getValueViaPath",
|
243
|
+
);
|
243
244
|
}
|
244
245
|
|
245
246
|
let parts;
|
@@ -266,7 +267,7 @@ function getValueViaPath(subject, path, check) {
|
|
266
267
|
validateInteger(current);
|
267
268
|
anchor = [...subject]?.[current];
|
268
269
|
} else if (typeof WeakRef === "function" && subject instanceof WeakRef) {
|
269
|
-
throw Error("unsupported action for this data type");
|
270
|
+
throw Error("unsupported action for this data type (WeakRef)");
|
270
271
|
} else if (isArray(subject)) {
|
271
272
|
current = parseInt(current);
|
272
273
|
validateInteger(current);
|
@@ -290,14 +291,14 @@ function getValueViaPath(subject, path, check) {
|
|
290
291
|
);
|
291
292
|
|
292
293
|
if (!subject.hasOwnProperty(current) && descriptor === undefined) {
|
293
|
-
throw Error("unknown value");
|
294
|
+
throw Error("unknown value " + current);
|
294
295
|
}
|
295
296
|
}
|
296
297
|
|
297
298
|
return anchor;
|
298
299
|
}
|
299
300
|
|
300
|
-
throw TypeError(`unsupported type ${typeof subject}`);
|
301
|
+
throw TypeError(`unsupported type ${typeof subject} for path ${path}`);
|
301
302
|
}
|
302
303
|
|
303
304
|
/**
|
@@ -314,13 +315,13 @@ function getValueViaPath(subject, path, check) {
|
|
314
315
|
*/
|
315
316
|
function setValueViaPath(subject, path, value) {
|
316
317
|
if (!(isArray(path) || isString(path))) {
|
317
|
-
throw new Error("type error: path must be a string or an array");
|
318
|
+
throw new Error("type error: a path must be a string or an array");
|
318
319
|
}
|
319
320
|
|
320
321
|
let parts;
|
321
322
|
if (isArray(path)) {
|
322
323
|
if (path.length === 0) {
|
323
|
-
return
|
324
|
+
return;
|
324
325
|
}
|
325
326
|
|
326
327
|
parts = path;
|
@@ -363,7 +364,7 @@ function setValueViaPath(subject, path, value) {
|
|
363
364
|
const anchor = getValueViaPath.call(this, subject, subpath);
|
364
365
|
|
365
366
|
if (!(isObject(subject) || isArray(subject))) {
|
366
|
-
throw TypeError(`unsupported type: ${typeof subject}`);
|
367
|
+
throw TypeError(`unsupported type: ${typeof subject} in setValueViaPath`);
|
367
368
|
}
|
368
369
|
|
369
370
|
if (anchor instanceof Map || anchor instanceof WeakMap) {
|
@@ -371,11 +372,11 @@ function setValueViaPath(subject, path, value) {
|
|
371
372
|
} else if (anchor instanceof Set || anchor instanceof WeakSet) {
|
372
373
|
anchor.append(value);
|
373
374
|
} else if (typeof WeakRef === "function" && anchor instanceof WeakRef) {
|
374
|
-
throw Error("unsupported action for this data type");
|
375
|
+
throw Error("unsupported action for this data type in setValueViaPath");
|
375
376
|
} else if (isArray(anchor)) {
|
376
377
|
last = parseInt(last);
|
377
378
|
validateInteger(last);
|
378
|
-
assignProperty(anchor, last, value);
|
379
|
+
assignProperty(anchor, "" + last, value);
|
379
380
|
} else {
|
380
381
|
assignProperty(anchor, last, value);
|
381
382
|
}
|
@@ -415,13 +416,15 @@ function assignProperty(object, key, value) {
|
|
415
416
|
*/
|
416
417
|
function deleteValueViaPath(subject, path) {
|
417
418
|
if (!(isArray(path) || isString(path))) {
|
418
|
-
throw new Error(
|
419
|
+
throw new Error(
|
420
|
+
"type error: a path must be a string or an array in deleteValueViaPath",
|
421
|
+
);
|
419
422
|
}
|
420
423
|
|
421
424
|
let parts;
|
422
425
|
if (isArray(path)) {
|
423
426
|
if (path.length === 0) {
|
424
|
-
return
|
427
|
+
return;
|
425
428
|
}
|
426
429
|
|
427
430
|
parts = path;
|
@@ -430,9 +433,9 @@ function deleteValueViaPath(subject, path) {
|
|
430
433
|
}
|
431
434
|
|
432
435
|
let last = parts.pop();
|
433
|
-
const
|
436
|
+
const subPath = parts.join(DELIMITER);
|
434
437
|
|
435
|
-
const anchor = getValueViaPath.call(this, subject,
|
438
|
+
const anchor = getValueViaPath.call(this, subject, subPath);
|
436
439
|
|
437
440
|
if (anchor instanceof Map) {
|
438
441
|
anchor.delete(last);
|
@@ -442,7 +445,7 @@ function deleteValueViaPath(subject, path) {
|
|
442
445
|
anchor instanceof WeakSet ||
|
443
446
|
(typeof WeakRef === "function" && anchor instanceof WeakRef)
|
444
447
|
) {
|
445
|
-
throw Error("unsupported action for this data type");
|
448
|
+
throw Error("unsupported action for this data type in deleteValueViaPath");
|
446
449
|
} else if (isArray(anchor)) {
|
447
450
|
last = parseInt(last);
|
448
451
|
validateInteger(last);
|