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