@evergis/react 2.0.192 → 2.0.193
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.cjs.development.js +19 -5
- package/dist/react.cjs.development.js.map +1 -1
- package/dist/react.cjs.production.min.js +1 -1
- package/dist/react.cjs.production.min.js.map +1 -1
- package/dist/react.esm.js +19 -5
- package/dist/react.esm.js.map +1 -1
- package/dist/utils/legend.d.ts +5 -1
- package/package.json +2 -2
package/dist/react.esm.js
CHANGED
|
@@ -2583,11 +2583,17 @@ const checkLayerHasLegend = layerInfo => {
|
|
|
2583
2583
|
return (paramValue == null ? void 0 : paramValue.type) === 'byAttribute';
|
|
2584
2584
|
})) || false;
|
|
2585
2585
|
};
|
|
2586
|
-
const getTitleFromCondition =
|
|
2586
|
+
const getTitleFromCondition = _ref2 => {
|
|
2587
2587
|
var _parts$;
|
|
2588
2588
|
|
|
2589
|
+
let {
|
|
2590
|
+
condition,
|
|
2591
|
+
attribute,
|
|
2592
|
+
formatValue
|
|
2593
|
+
} = _ref2;
|
|
2589
2594
|
const parts = condition == null ? void 0 : condition.split(' == ');
|
|
2590
|
-
|
|
2595
|
+
const uniqueValue = (parts == null ? void 0 : (_parts$ = parts[1]) == null ? void 0 : _parts$.slice(1, -1)) || '';
|
|
2596
|
+
return attribute && formatValue ? formatValue(attribute.type, uniqueValue, attribute.stringFormat) : '';
|
|
2591
2597
|
};
|
|
2592
2598
|
function createValueTitleFromCondition(paramValue, attribute, formatValue, index) {
|
|
2593
2599
|
if (!attribute) return '';
|
|
@@ -2906,7 +2912,9 @@ const getMinimizedLegendValues = (attribute, classified, formatValue, index, oth
|
|
|
2906
2912
|
}
|
|
2907
2913
|
|
|
2908
2914
|
result.uniqueValue = formatValue ? formatValue(attribute.type, paramValue.value, attribute.stringFormat) : paramValue.value.toString();
|
|
2909
|
-
result.title = getTitleFromCondition(
|
|
2915
|
+
result.title = getTitleFromCondition({
|
|
2916
|
+
condition: paramValue.condition
|
|
2917
|
+
});
|
|
2910
2918
|
result.hiddenCondition = createHiddenCondition(attribute.name, attribute.type, getClassificationValue(paramValue.value, result.title, new ClassificationCondition(paramValue.condition)));
|
|
2911
2919
|
return result;
|
|
2912
2920
|
});
|
|
@@ -2927,7 +2935,9 @@ const getMaximizedLegendValues = (attribute, param, params, classified, symbol,
|
|
|
2927
2935
|
const result = {
|
|
2928
2936
|
symbol: createLegendSymbol(paramValue.value, param, params, symbol)
|
|
2929
2937
|
};
|
|
2930
|
-
result.title = isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, sectionIndex) : getTitleFromCondition(
|
|
2938
|
+
result.title = isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, sectionIndex) : getTitleFromCondition({
|
|
2939
|
+
condition: paramValue.condition
|
|
2940
|
+
});
|
|
2931
2941
|
result.hiddenCondition = createHiddenCondition(attribute.name, attribute.type, getClassificationValue(paramValue.value, result.title, new ClassificationCondition(classified.values[index].condition)));
|
|
2932
2942
|
return result;
|
|
2933
2943
|
});
|
|
@@ -6491,7 +6501,11 @@ const LegendChildren = _ref => {
|
|
|
6491
6501
|
if (!attribute) return null;
|
|
6492
6502
|
const hiddenCondition = createHiddenCondition(attribute.name, attribute.type, getClassificationValue(paramValue.symbol, paramValue.title, new ClassificationCondition(paramValue.condition)));
|
|
6493
6503
|
const legendText = getLegendText({
|
|
6494
|
-
title: isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, index) : getTitleFromCondition(
|
|
6504
|
+
title: isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, index) : getTitleFromCondition({
|
|
6505
|
+
condition: paramValue.condition,
|
|
6506
|
+
attribute,
|
|
6507
|
+
formatValue
|
|
6508
|
+
}),
|
|
6495
6509
|
index,
|
|
6496
6510
|
isDate: ((_getConditionAttribut = getConditionAttribute(attributes, paramValue.condition)) == null ? void 0 : _getConditionAttribut.type) === 'DateTime'
|
|
6497
6511
|
});
|