@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
|
@@ -2582,11 +2582,17 @@ const checkLayerHasLegend = layerInfo => {
|
|
|
2582
2582
|
return (paramValue == null ? void 0 : paramValue.type) === 'byAttribute';
|
|
2583
2583
|
})) || false;
|
|
2584
2584
|
};
|
|
2585
|
-
const getTitleFromCondition =
|
|
2585
|
+
const getTitleFromCondition = _ref2 => {
|
|
2586
2586
|
var _parts$;
|
|
2587
2587
|
|
|
2588
|
+
let {
|
|
2589
|
+
condition,
|
|
2590
|
+
attribute,
|
|
2591
|
+
formatValue
|
|
2592
|
+
} = _ref2;
|
|
2588
2593
|
const parts = condition == null ? void 0 : condition.split(' == ');
|
|
2589
|
-
|
|
2594
|
+
const uniqueValue = (parts == null ? void 0 : (_parts$ = parts[1]) == null ? void 0 : _parts$.slice(1, -1)) || '';
|
|
2595
|
+
return attribute && formatValue ? formatValue(attribute.type, uniqueValue, attribute.stringFormat) : '';
|
|
2590
2596
|
};
|
|
2591
2597
|
function createValueTitleFromCondition(paramValue, attribute, formatValue, index) {
|
|
2592
2598
|
if (!attribute) return '';
|
|
@@ -2905,7 +2911,9 @@ const getMinimizedLegendValues = (attribute, classified, formatValue, index, oth
|
|
|
2905
2911
|
}
|
|
2906
2912
|
|
|
2907
2913
|
result.uniqueValue = formatValue ? formatValue(attribute.type, paramValue.value, attribute.stringFormat) : paramValue.value.toString();
|
|
2908
|
-
result.title = getTitleFromCondition(
|
|
2914
|
+
result.title = getTitleFromCondition({
|
|
2915
|
+
condition: paramValue.condition
|
|
2916
|
+
});
|
|
2909
2917
|
result.hiddenCondition = createHiddenCondition(attribute.name, attribute.type, getClassificationValue(paramValue.value, result.title, new ClassificationCondition(paramValue.condition)));
|
|
2910
2918
|
return result;
|
|
2911
2919
|
});
|
|
@@ -2926,7 +2934,9 @@ const getMaximizedLegendValues = (attribute, param, params, classified, symbol,
|
|
|
2926
2934
|
const result = {
|
|
2927
2935
|
symbol: createLegendSymbol(paramValue.value, param, params, symbol)
|
|
2928
2936
|
};
|
|
2929
|
-
result.title = isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, sectionIndex) : getTitleFromCondition(
|
|
2937
|
+
result.title = isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, sectionIndex) : getTitleFromCondition({
|
|
2938
|
+
condition: paramValue.condition
|
|
2939
|
+
});
|
|
2930
2940
|
result.hiddenCondition = createHiddenCondition(attribute.name, attribute.type, getClassificationValue(paramValue.value, result.title, new ClassificationCondition(classified.values[index].condition)));
|
|
2931
2941
|
return result;
|
|
2932
2942
|
});
|
|
@@ -6488,7 +6498,11 @@ const LegendChildren = _ref => {
|
|
|
6488
6498
|
if (!attribute) return null;
|
|
6489
6499
|
const hiddenCondition = createHiddenCondition(attribute.name, attribute.type, getClassificationValue(paramValue.symbol, paramValue.title, new ClassificationCondition(paramValue.condition)));
|
|
6490
6500
|
const legendText = getLegendText({
|
|
6491
|
-
title: isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, index) : getTitleFromCondition(
|
|
6501
|
+
title: isRangeCondition(paramValue.condition) ? createValueTitleFromCondition(paramValue, attribute, formatValue, index) : getTitleFromCondition({
|
|
6502
|
+
condition: paramValue.condition,
|
|
6503
|
+
attribute,
|
|
6504
|
+
formatValue
|
|
6505
|
+
}),
|
|
6492
6506
|
index,
|
|
6493
6507
|
isDate: ((_getConditionAttribut = getConditionAttribute(attributes, paramValue.condition)) == null ? void 0 : _getConditionAttribut.type) === 'DateTime'
|
|
6494
6508
|
});
|