@schukai/monster 3.98.2 → 3.99.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 +22 -0
- package/package.json +1 -1
- package/source/components/datatable/columnbar.mjs +19 -20
- package/source/components/datatable/datatable.mjs +94 -80
- package/source/components/datatable/filter/date-range.mjs +19 -20
- package/source/components/datatable/filter/input.mjs +19 -20
- package/source/components/datatable/filter/range.mjs +19 -19
- package/source/components/datatable/filter-button.mjs +19 -20
- package/source/components/datatable/filter.mjs +48 -31
- package/source/components/datatable/pagination.mjs +19 -20
- package/source/components/datatable/save-button.mjs +19 -20
- package/source/components/datatable/stylesheet/datatable.mjs +13 -6
- package/source/components/form/action-button.mjs +2 -1
- package/source/components/form/api-button.mjs +4 -4
- package/source/components/form/button-bar.mjs +2 -3
- package/source/components/form/button.mjs +1 -0
- package/source/components/form/context-error.mjs +1 -0
- package/source/components/form/field-set.mjs +21 -21
- package/source/components/form/popper-button.mjs +274 -273
- package/source/components/form/reload.mjs +1 -0
- package/source/components/form/select.mjs +56 -34
- package/source/components/form/toggle-switch.mjs +2 -2
- package/source/components/layout/details.mjs +19 -20
- package/source/components/layout/tabs.mjs +19 -20
- package/source/components/notify/monitor-attribute-errors.mjs +184 -179
- package/source/data/buildtree.mjs +1 -1
- package/source/dom/customelement.mjs +944 -945
- package/source/dom/error.mjs +106 -0
- package/source/monster.mjs +1 -0
- package/source/types/version.mjs +1 -1
- package/test/cases/dom/customcontrol.mjs +1 -1
- package/test/cases/dom/customelement.mjs +3 -3
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +334 -63
@@ -31,6 +31,7 @@ import {
|
|
31
31
|
ATTRIBUTE_ERRORMESSAGE,
|
32
32
|
ATTRIBUTE_ROLE,
|
33
33
|
} from "../../dom/constants.mjs";
|
34
|
+
import {addErrorAttribute} from "../../dom/error.mjs";
|
34
35
|
|
35
36
|
export { ActionButton };
|
36
37
|
|
@@ -163,7 +164,7 @@ function initEventHandler() {
|
|
163
164
|
try {
|
164
165
|
updateButtonsI18n.call(this);
|
165
166
|
} catch (e) {
|
166
|
-
|
167
|
+
addErrorAttribute(this, e.message);
|
167
168
|
}
|
168
169
|
|
169
170
|
memButtons = JSON.stringify(this.getOption("buttons"));
|
@@ -35,7 +35,7 @@ import { ApiButtonStyleSheet } from "./stylesheet/api-button.mjs";
|
|
35
35
|
import { isObject, isFunction } from "../../types/is.mjs";
|
36
36
|
import { getGlobal } from "../../types/global.mjs";
|
37
37
|
import { Formatter } from "../../text/formatter.mjs";
|
38
|
-
|
38
|
+
import {addErrorAttribute} from "../../dom/error.mjs";
|
39
39
|
export { ApiButton };
|
40
40
|
|
41
41
|
/**
|
@@ -189,12 +189,12 @@ class ApiButton extends ActionButton {
|
|
189
189
|
let flag = false;
|
190
190
|
let apiEqualUrl = false;
|
191
191
|
if (labelTemplate === "") {
|
192
|
-
|
192
|
+
addErrorAttribute(this, "empty label template");
|
193
193
|
flag = true;
|
194
194
|
}
|
195
195
|
|
196
196
|
if (apiTemplate === "") {
|
197
|
-
|
197
|
+
addErrorAttribute(this, "empty api template");
|
198
198
|
flag = true;
|
199
199
|
}
|
200
200
|
|
@@ -242,7 +242,7 @@ class ApiButton extends ActionButton {
|
|
242
242
|
try {
|
243
243
|
this.updateI18n();
|
244
244
|
} catch (e) {
|
245
|
-
|
245
|
+
addErrorAttribute(this, e.message);
|
246
246
|
}
|
247
247
|
|
248
248
|
this.setOption("buttons", buttons);
|
@@ -41,7 +41,7 @@ import { STYLE_DISPLAY_MODE_BLOCK } from "./constants.mjs";
|
|
41
41
|
import { ButtonBarStyleSheet } from "./stylesheet/button-bar.mjs";
|
42
42
|
import { positionPopper } from "./util/floating-ui.mjs";
|
43
43
|
import { convertToPixels } from "../../dom/dimension.mjs";
|
44
|
-
|
44
|
+
import {addErrorAttribute} from "../../dom/error.mjs";
|
45
45
|
export { ButtonBar };
|
46
46
|
|
47
47
|
/**
|
@@ -358,9 +358,8 @@ function initEventHandler() {
|
|
358
358
|
try {
|
359
359
|
checkAndRearrangeButtons.call(self);
|
360
360
|
} catch (error) {
|
361
|
-
|
361
|
+
addErrorAttribute(
|
362
362
|
this,
|
363
|
-
ATTRIBUTE_ERRORMESSAGE,
|
364
363
|
error?.message || "An error occurred while rearranging the buttons",
|
365
364
|
);
|
366
365
|
}
|
@@ -30,6 +30,7 @@ import { ATTRIBUTE_BUTTON_CLASS } from "./constants.mjs";
|
|
30
30
|
import { ButtonStyleSheet } from "./stylesheet/button.mjs";
|
31
31
|
import { RippleStyleSheet } from "../stylesheet/ripple.mjs";
|
32
32
|
import { fireCustomEvent } from "../../dom/events.mjs";
|
33
|
+
import {addErrorAttribute} from "../../dom/error.mjs";
|
33
34
|
|
34
35
|
export { Button };
|
35
36
|
|
@@ -28,7 +28,8 @@ import { isFunction } from "../../types/is.mjs";
|
|
28
28
|
import { FieldSetStyleSheet } from "./stylesheet/field-set.mjs";
|
29
29
|
import "../layout/collapse.mjs";
|
30
30
|
import "./toggle-switch.mjs";
|
31
|
-
import {getLocaleOfDocument} from "../../dom/locale.mjs";
|
31
|
+
import { getLocaleOfDocument } from "../../dom/locale.mjs";
|
32
|
+
import {addErrorAttribute} from "../../dom/error.mjs";
|
32
33
|
|
33
34
|
export { FieldSet };
|
34
35
|
|
@@ -121,7 +122,7 @@ class FieldSet extends CustomControl {
|
|
121
122
|
templates: {
|
122
123
|
main: getTemplate(),
|
123
124
|
},
|
124
|
-
labels:getTranslations(),
|
125
|
+
labels: getTranslations(),
|
125
126
|
classes: {},
|
126
127
|
disabled: false,
|
127
128
|
features: {
|
@@ -249,74 +250,73 @@ class FieldSet extends CustomControl {
|
|
249
250
|
function getTranslations() {
|
250
251
|
const locale = getLocaleOfDocument();
|
251
252
|
switch (locale.language) {
|
252
|
-
case
|
253
|
+
case "de":
|
253
254
|
return {
|
254
255
|
toggleSwitchOn: "✔",
|
255
256
|
toggleSwitchOff: "✖",
|
256
257
|
toggleSwitchLabel: "Erweitern",
|
257
|
-
title: ""
|
258
|
+
title: "",
|
258
259
|
};
|
259
|
-
case
|
260
|
+
case "fr":
|
260
261
|
return {
|
261
262
|
toggleSwitchOn: "✔",
|
262
263
|
toggleSwitchOff: "✖",
|
263
264
|
toggleSwitchLabel: "Développer",
|
264
|
-
title: ""
|
265
|
+
title: "",
|
265
266
|
};
|
266
|
-
case
|
267
|
+
case "sp":
|
267
268
|
return {
|
268
269
|
toggleSwitchOn: "✔",
|
269
270
|
toggleSwitchOff: "✖",
|
270
271
|
toggleSwitchLabel: "Expandir",
|
271
|
-
title: ""
|
272
|
+
title: "",
|
272
273
|
};
|
273
|
-
case
|
274
|
+
case "it":
|
274
275
|
return {
|
275
276
|
toggleSwitchOn: "✔",
|
276
277
|
toggleSwitchOff: "✖",
|
277
278
|
toggleSwitchLabel: "Espandi",
|
278
|
-
title: ""
|
279
|
+
title: "",
|
279
280
|
};
|
280
|
-
case
|
281
|
+
case "pl":
|
281
282
|
return {
|
282
283
|
toggleSwitchOn: "✔",
|
283
284
|
toggleSwitchOff: "✖",
|
284
285
|
toggleSwitchLabel: "Rozwiń",
|
285
|
-
title: ""
|
286
|
+
title: "",
|
286
287
|
};
|
287
|
-
case
|
288
|
+
case "no":
|
288
289
|
return {
|
289
290
|
toggleSwitchOn: "✔",
|
290
291
|
toggleSwitchOff: "✖",
|
291
292
|
toggleSwitchLabel: "Utvid",
|
292
|
-
title: ""
|
293
|
+
title: "",
|
293
294
|
};
|
294
|
-
case
|
295
|
+
case "dk":
|
295
296
|
return {
|
296
297
|
toggleSwitchOn: "✔",
|
297
298
|
toggleSwitchOff: "✖",
|
298
299
|
toggleSwitchLabel: "Udvid",
|
299
|
-
title: ""
|
300
|
+
title: "",
|
300
301
|
};
|
301
|
-
case
|
302
|
+
case "sw":
|
302
303
|
return {
|
303
304
|
toggleSwitchOn: "✔",
|
304
305
|
toggleSwitchOff: "✖",
|
305
306
|
toggleSwitchLabel: "Expandera",
|
306
|
-
title: ""
|
307
|
+
title: "",
|
307
308
|
};
|
308
309
|
default:
|
309
|
-
case
|
310
|
+
case "en":
|
310
311
|
return {
|
311
312
|
toggleSwitchOn: "✔",
|
312
313
|
toggleSwitchOff: "✖",
|
313
314
|
toggleSwitchLabel: "Expand",
|
314
|
-
title: ""
|
315
|
+
title: "",
|
315
316
|
};
|
316
317
|
}
|
317
318
|
}
|
318
319
|
|
319
|
-
|
320
320
|
/**
|
321
321
|
* @private
|
322
322
|
*/
|