@evergis/react 4.0.51 → 4.0.52

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
@@ -10,6 +10,7 @@ import { isValid, format, parseJSON, parseISO, toDate } from 'date-fns';
10
10
  import { isNil, isEmpty, isEqual, uniqueId, unescape } from 'lodash';
11
11
  import { ru, enUS } from 'date-fns/locale';
12
12
  import { changeProps, returnFound } from 'find-and';
13
+ import isNil$1 from 'lodash/isNil';
13
14
  import { HubConnectionBuilder, HttpTransportType, LogLevel } from '@microsoft/signalr';
14
15
  import MapboxDraw from '@mapbox/mapbox-gl-draw';
15
16
  import { bbox } from '@turf/turf';
@@ -5857,7 +5858,7 @@ const formatElementValue = ({ t, value, elementConfig, attributes, wrap, }) => {
5857
5858
  const getAttributeValue = (element, attributes) => {
5858
5859
  const attribute = getAttributeByName(element?.attributeName, attributes);
5859
5860
  const { maxLength, separator, expandable, lineBreak } = element.options || {};
5860
- let value = "";
5861
+ let value;
5861
5862
  if (attribute?.type === AttributeType.Boolean && typeof attribute.value === "boolean") {
5862
5863
  return jsx(DashboardCheckbox, { title: attribute.alias || attribute.attributeName, checked: attribute.value });
5863
5864
  }
@@ -5866,9 +5867,9 @@ const getAttributeValue = (element, attributes) => {
5866
5867
  value = concatAttributes.join(separator || ", ");
5867
5868
  }
5868
5869
  else {
5869
- value = attribute?.value?.toString() || "";
5870
+ value = !isNil$1(attribute?.value) ? attribute?.value : "";
5870
5871
  }
5871
- return maxLength && maxLength < value.length ? (jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
5872
+ return typeof value === "string" && maxLength && maxLength < value.length ? (jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
5872
5873
  };
5873
5874
 
5874
5875
  const getChartAxes = (chartElement) => chartElement?.options?.relatedDataSources?.filter(({ chartAxis }) => chartAxis === "y");