@schukai/monster 3.98.3 → 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.
@@ -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
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message);
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
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, "empty label template");
192
+ addErrorAttribute(this, "empty label template");
193
193
  flag = true;
194
194
  }
195
195
 
196
196
  if (apiTemplate === "") {
197
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, "empty api template");
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
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message);
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
- addAttributeToken(
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
 
@@ -24,6 +24,7 @@ import {
24
24
  ATTRIBUTE_ERRORMESSAGE,
25
25
  ATTRIBUTE_ROLE,
26
26
  } from "../../dom/constants.mjs";
27
+ import {addErrorAttribute} from "../../dom/error.mjs";
27
28
 
28
29
  export { ContextError };
29
30
 
@@ -29,6 +29,7 @@ import { FieldSetStyleSheet } from "./stylesheet/field-set.mjs";
29
29
  import "../layout/collapse.mjs";
30
30
  import "./toggle-switch.mjs";
31
31
  import { getLocaleOfDocument } from "../../dom/locale.mjs";
32
+ import {addErrorAttribute} from "../../dom/error.mjs";
32
33
 
33
34
  export { FieldSet };
34
35