@websolutespa/bom-mixer-ui 1.10.8 → 1.10.9
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 +6 -0
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/fields/field-error.js +7 -4
- package/dist/esm/fields/field-error.js.map +1 -1
- package/dist/types/fields/field-error.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/fields/field-error.tsx +7 -4
package/CHANGELOG.md
CHANGED
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
|
|
13039
|
+
const keyLabel = `error.${error.key}.label`;
|
|
13040
|
+
const key = `error.${error.key}`;
|
|
13041
|
+
const errorKeyLabel = label && errorLabel(keyLabel, {
|
|
13040
13042
|
label
|
|
13041
|
-
})
|
|
13043
|
+
});
|
|
13044
|
+
const errorKey = label ? errorKeyLabel === keyLabel ? errorLabel(key, {
|
|
13042
13045
|
label
|
|
13043
|
-
}) : errorLabel(
|
|
13044
|
-
return
|
|
13046
|
+
}) : undefined : errorLabel(key);
|
|
13047
|
+
return errorKey;
|
|
13045
13048
|
};
|
|
13046
13049
|
const classNames = bomCore.getClassNames('field-error', className, variant);
|
|
13047
13050
|
const globalVariants = useVariants('fieldError', fieldErrorVariants);
|