@evergis/react 3.1.29 → 3.1.31
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 +9 -3
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +9 -3
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4166,6 +4166,12 @@ const applyQueryFilters = ({ parameters: configParameters, filters: configFilter
|
|
|
4166
4166
|
return {};
|
|
4167
4167
|
}
|
|
4168
4168
|
return Object.keys(configParameters).reduce((result, key) => {
|
|
4169
|
+
if (typeof configParameters[key] !== "string" || !configParameters[key].startsWith("%")) {
|
|
4170
|
+
return {
|
|
4171
|
+
...result,
|
|
4172
|
+
[key]: configParameters[key]
|
|
4173
|
+
};
|
|
4174
|
+
}
|
|
4169
4175
|
const filterFullName = configParameters[key].replace("%", "");
|
|
4170
4176
|
const [filterName, filterProp] = filterFullName.includes(".") ? filterFullName.split(".") : [filterFullName, null];
|
|
4171
4177
|
const { defaultValue, relatedDataSource, attributeAlias } = getConfigFilter(filterName, configFilters) || {};
|
|
@@ -6502,7 +6508,7 @@ const RoundedBackgroundContainer = React.memo(({ type, elementConfig, feature, r
|
|
|
6502
6508
|
const unitsElement = children?.find(({ id }) => id === "units");
|
|
6503
6509
|
const valueElement = children?.find(({ id }) => id === "value");
|
|
6504
6510
|
const attribute = React.useMemo(() => attributes.find(({ name }) => name === valueElement.attributeName), [attributes, valueElement.attributeName]);
|
|
6505
|
-
const value = React.useMemo(() => formatAttributeValue({
|
|
6511
|
+
const value = React.useMemo(() => !attribute ? null : formatAttributeValue({
|
|
6506
6512
|
t,
|
|
6507
6513
|
type: attribute.type,
|
|
6508
6514
|
value: attribute.value,
|
|
@@ -6516,8 +6522,8 @@ const RoundedBackgroundContainer = React.memo(({ type, elementConfig, feature, r
|
|
|
6516
6522
|
return (jsxRuntime.jsx(uilibGl.FlexSpan, { width: iconElement.options?.width || "1rem", alignItems: "center", mr: "0.5rem", children: renderElement({ id: "icon", wrap: false }) }));
|
|
6517
6523
|
}, [iconElement, renderElement]);
|
|
6518
6524
|
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 (
|
|
6525
|
+
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]);
|
|
6526
|
+
if (lodash.isNil(value) && hideEmpty)
|
|
6521
6527
|
return null;
|
|
6522
6528
|
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
6529
|
});
|