@evergis/react 3.1.29 → 3.1.30
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/dist/index.js +3 -3
- package/dist/react.esm.js +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6502,7 +6502,7 @@ const RoundedBackgroundContainer = React.memo(({ type, elementConfig, feature, r
|
|
|
6502
6502
|
const unitsElement = children?.find(({ id }) => id === "units");
|
|
6503
6503
|
const valueElement = children?.find(({ id }) => id === "value");
|
|
6504
6504
|
const attribute = React.useMemo(() => attributes.find(({ name }) => name === valueElement.attributeName), [attributes, valueElement.attributeName]);
|
|
6505
|
-
const value = React.useMemo(() => formatAttributeValue({
|
|
6505
|
+
const value = React.useMemo(() => !attribute ? null : formatAttributeValue({
|
|
6506
6506
|
t,
|
|
6507
6507
|
type: attribute.type,
|
|
6508
6508
|
value: attribute.value,
|
|
@@ -6516,8 +6516,8 @@ const RoundedBackgroundContainer = React.memo(({ type, elementConfig, feature, r
|
|
|
6516
6516
|
return (jsxRuntime.jsx(uilibGl.FlexSpan, { width: iconElement.options?.width || "1rem", alignItems: "center", mr: "0.5rem", children: renderElement({ id: "icon", wrap: false }) }));
|
|
6517
6517
|
}, [iconElement, renderElement]);
|
|
6518
6518
|
const renderAlias = React.useMemo(() => (jsxRuntime.jsx(ContainerAlias, { style: aliasElement?.style, children: jsxRuntime.jsx(TextTrim, { maxLength: maxLength || ALIAS_DEFAULT_MAX_LENGTH, children: renderElement({ id: "alias", wrap: false }) }) })), [aliasElement?.style, maxLength, renderElement]);
|
|
6519
|
-
const renderValue = React.useMemo(() => (jsxRuntime.jsxs(ContainerValue, { style: valueElement?.style, big: true, children: [value, !!unitsElement && (jsxRuntime.jsx(ContainerUnits, { style: unitsElement?.style, children: renderElement({ id: "units" }) }))] })), [valueElement?.style, value, unitsElement, renderElement]);
|
|
6520
|
-
if (
|
|
6519
|
+
const renderValue = React.useMemo(() => lodash.isNil(value) ? null : (jsxRuntime.jsxs(ContainerValue, { style: valueElement?.style, big: true, children: [value, !!unitsElement && (jsxRuntime.jsx(ContainerUnits, { style: unitsElement?.style, children: renderElement({ id: "units" }) }))] })), [valueElement?.style, value, unitsElement, renderElement]);
|
|
6520
|
+
if (lodash.isNil(value) && hideEmpty)
|
|
6521
6521
|
return null;
|
|
6522
6522
|
return (jsxRuntime.jsxs(RoundedBackgroundContainerWrapper, { style: innerTemplateStyle || style, "$center": center, "$color": color, "$inlineUnits": inlineUnits, "$big": big, "$bigIcon": bigIcon, children: [jsxRuntime.jsxs(ContainerIconValue, { children: [renderIcon, big ? renderAlias : renderValue] }), big ? renderValue : renderAlias] }));
|
|
6523
6523
|
});
|
package/dist/react.esm.js
CHANGED
|
@@ -6500,7 +6500,7 @@ const RoundedBackgroundContainer = memo(({ type, elementConfig, feature, renderE
|
|
|
6500
6500
|
const unitsElement = children?.find(({ id }) => id === "units");
|
|
6501
6501
|
const valueElement = children?.find(({ id }) => id === "value");
|
|
6502
6502
|
const attribute = useMemo(() => attributes.find(({ name }) => name === valueElement.attributeName), [attributes, valueElement.attributeName]);
|
|
6503
|
-
const value = useMemo(() => formatAttributeValue({
|
|
6503
|
+
const value = useMemo(() => !attribute ? null : formatAttributeValue({
|
|
6504
6504
|
t,
|
|
6505
6505
|
type: attribute.type,
|
|
6506
6506
|
value: attribute.value,
|
|
@@ -6514,8 +6514,8 @@ const RoundedBackgroundContainer = memo(({ type, elementConfig, feature, renderE
|
|
|
6514
6514
|
return (jsx(FlexSpan, { width: iconElement.options?.width || "1rem", alignItems: "center", mr: "0.5rem", children: renderElement({ id: "icon", wrap: false }) }));
|
|
6515
6515
|
}, [iconElement, renderElement]);
|
|
6516
6516
|
const renderAlias = useMemo(() => (jsx(ContainerAlias, { style: aliasElement?.style, children: jsx(TextTrim, { maxLength: maxLength || ALIAS_DEFAULT_MAX_LENGTH, children: renderElement({ id: "alias", wrap: false }) }) })), [aliasElement?.style, maxLength, renderElement]);
|
|
6517
|
-
const renderValue = useMemo(() => (jsxs(ContainerValue, { style: valueElement?.style, big: true, children: [value, !!unitsElement && (jsx(ContainerUnits, { style: unitsElement?.style, children: renderElement({ id: "units" }) }))] })), [valueElement?.style, value, unitsElement, renderElement]);
|
|
6518
|
-
if (
|
|
6517
|
+
const renderValue = useMemo(() => isNil(value) ? null : (jsxs(ContainerValue, { style: valueElement?.style, big: true, children: [value, !!unitsElement && (jsx(ContainerUnits, { style: unitsElement?.style, children: renderElement({ id: "units" }) }))] })), [valueElement?.style, value, unitsElement, renderElement]);
|
|
6518
|
+
if (isNil(value) && hideEmpty)
|
|
6519
6519
|
return null;
|
|
6520
6520
|
return (jsxs(RoundedBackgroundContainerWrapper, { style: innerTemplateStyle || style, "$center": center, "$color": color, "$inlineUnits": inlineUnits, "$big": big, "$bigIcon": bigIcon, children: [jsxs(ContainerIconValue, { children: [renderIcon, big ? renderAlias : renderValue] }), big ? renderValue : renderAlias] }));
|
|
6521
6521
|
});
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.1.
|
|
2
|
+
"version": "3.1.30",
|
|
3
3
|
"name": "@evergis/react",
|
|
4
4
|
"author": "Everpoint",
|
|
5
5
|
"license": "MIT",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"swiper": "^8.3.2",
|
|
76
76
|
"wkt": "^0.1.1"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "eada2b89f40f352e5fe8c45fce5e09f884fe6e15"
|
|
79
79
|
}
|