@evergis/react 4.0.50 → 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/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +4 -3
- package/dist/react.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var dateFns = require('date-fns');
|
|
|
12
12
|
var lodash = require('lodash');
|
|
13
13
|
var locale = require('date-fns/locale');
|
|
14
14
|
var findAnd = require('find-and');
|
|
15
|
+
var isNil = require('lodash/isNil');
|
|
15
16
|
var signalr = require('@microsoft/signalr');
|
|
16
17
|
var MapboxDraw = require('@mapbox/mapbox-gl-draw');
|
|
17
18
|
var turf = require('@turf/turf');
|
|
@@ -5859,7 +5860,7 @@ const formatElementValue = ({ t, value, elementConfig, attributes, wrap, }) => {
|
|
|
5859
5860
|
const getAttributeValue = (element, attributes) => {
|
|
5860
5861
|
const attribute = getAttributeByName(element?.attributeName, attributes);
|
|
5861
5862
|
const { maxLength, separator, expandable, lineBreak } = element.options || {};
|
|
5862
|
-
let value
|
|
5863
|
+
let value;
|
|
5863
5864
|
if (attribute?.type === api.AttributeType.Boolean && typeof attribute.value === "boolean") {
|
|
5864
5865
|
return jsxRuntime.jsx(DashboardCheckbox, { title: attribute.alias || attribute.attributeName, checked: attribute.value });
|
|
5865
5866
|
}
|
|
@@ -5868,9 +5869,9 @@ const getAttributeValue = (element, attributes) => {
|
|
|
5868
5869
|
value = concatAttributes.join(separator || ", ");
|
|
5869
5870
|
}
|
|
5870
5871
|
else {
|
|
5871
|
-
value = attribute?.value
|
|
5872
|
+
value = !isNil(attribute?.value) ? attribute?.value : "";
|
|
5872
5873
|
}
|
|
5873
|
-
return maxLength && maxLength < value.length ? (jsxRuntime.jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
|
|
5874
|
+
return typeof value === "string" && maxLength && maxLength < value.length ? (jsxRuntime.jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
|
|
5874
5875
|
};
|
|
5875
5876
|
|
|
5876
5877
|
const getChartAxes = (chartElement) => chartElement?.options?.relatedDataSources?.filter(({ chartAxis }) => chartAxis === "y");
|