@websolutespa/bom-mixer-ui 1.10.8 → 1.10.10

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @websolutespa/bom-mixer-ui
2
2
 
3
+ ## 1.10.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified: FieldError getErrorLabel
8
+
9
+ ## 1.10.9
10
+
11
+ ### Patch Changes
12
+
13
+ - Modified: FieldError getErrorLabel
14
+
3
15
  ## 1.10.8
4
16
 
5
17
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -13036,12 +13036,15 @@ function FieldError(_a) {
13036
13036
  props = __rest(_a, ["state", "label", "className", "variant", "variants"]);
13037
13037
  const errorLabel = bomMixerHooks.useLabel();
13038
13038
  const getErrorLabel = error => {
13039
- const text = label ? errorLabel(`error.${error.key}.label`, {
13039
+ const keyLabel = `error.${error.key}.label`;
13040
+ const key = `error.${error.key}`;
13041
+ const errorKeyLabel = label && errorLabel(keyLabel, {
13040
13042
  label
13041
- }) || errorLabel(`error.${error.key}`, {
13043
+ });
13044
+ const errorKey = label ? errorKeyLabel !== keyLabel ? errorKeyLabel : errorLabel(key, {
13042
13045
  label
13043
- }) : errorLabel(`error.${error.key}`);
13044
- return text;
13046
+ }) : errorLabel(key);
13047
+ return errorKey;
13045
13048
  };
13046
13049
  const classNames = bomCore.getClassNames('field-error', className, variant);
13047
13050
  const globalVariants = useVariants('fieldError', fieldErrorVariants);