@evergis/react 2.0.156 → 2.0.158
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/components/MapLegend/index.d.ts +2 -1
- package/dist/components/MapLegend/styled.d.ts +9 -12
- package/dist/components/MapLegend/types.d.ts +6 -0
- package/dist/core/legend/types.d.ts +1 -0
- package/dist/react.cjs.development.js +123 -97
- 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 +121 -98
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/react.esm.js
CHANGED
|
@@ -4883,7 +4883,7 @@ const Legend = _ref => {
|
|
|
4883
4883
|
} = legend || {};
|
|
4884
4884
|
|
|
4885
4885
|
if (!legend && !renderCustomLegend) {
|
|
4886
|
-
return
|
|
4886
|
+
return null;
|
|
4887
4887
|
}
|
|
4888
4888
|
|
|
4889
4889
|
return React.createElement(LegendProvider, {
|
|
@@ -5025,7 +5025,7 @@ const Fullscreen = () => {
|
|
|
5025
5025
|
}));
|
|
5026
5026
|
};
|
|
5027
5027
|
|
|
5028
|
-
var _templateObject$6, _templateObject2$6, _templateObject3$4, _templateObject4$4, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
|
5028
|
+
var _templateObject$6, _templateObject2$6, _templateObject3$4, _templateObject4$4, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
|
|
5029
5029
|
const MapLegendControl = /*#__PURE__*/styled(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
|
|
5030
5030
|
const MapLegendContainer = /*#__PURE__*/styled.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 12.5rem;\n padding-bottom: 1rem;\n box-sizing: border-box;\n\n canvas {\n height: 1.625rem;\n width: 1.625rem;\n }\n"])));
|
|
5031
5031
|
const MapLegendHeader = /*#__PURE__*/styled(LegendSectionHeader)(_templateObject3$4 || (_templateObject3$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 15rem;\n margin-bottom: 0.25rem;\n font-weight: 500;\n"])));
|
|
@@ -5038,7 +5038,7 @@ const SizeLegendItemMixin = function SizeLegendItemMixin(value) {
|
|
|
5038
5038
|
value = 0;
|
|
5039
5039
|
}
|
|
5040
5040
|
|
|
5041
|
-
return css(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 50%;\n flex: none;\n height: inherit;\n width: inherit;\n margin: 0
|
|
5041
|
+
return css(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 50%;\n flex: none;\n height: inherit;\n width: inherit;\n margin: 0 auto;\n background: none;\n border: none;\n\n :after {\n content: \"\";\n display: flex;\n border: 1px rgba(48, 69, 79, 0.28) solid;\n border-radius: 50%;\n margin: 0 0 0 -", "px;\n width: ", "px;\n height: ", "px;\n }\n"])), value / 2, value, value);
|
|
5042
5042
|
};
|
|
5043
5043
|
|
|
5044
5044
|
const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
|
|
@@ -5046,10 +5046,11 @@ const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
|
|
|
5046
5046
|
value = 0;
|
|
5047
5047
|
}
|
|
5048
5048
|
|
|
5049
|
-
return css(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n position: relative;\n background: none;\n border: none;\n display: flex;\n align-items: center;\n flex: none;\n
|
|
5049
|
+
return css(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n position: relative;\n background: none;\n border: none;\n display: flex;\n align-items: center;\n flex: none;\n width: calc(100% - 2rem);\n height: ", "px;\n margin: 0 0 0.25rem 0;\n padding-left: 2rem;\n font-size: 0.75rem;\n \n :first-child, :last-child {\n height: auto;\n }\n \n :after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 0;\n width: 1.5rem;\n height: ", "px;\n margin-top: -", "px;\n background: rgb(224, 224, 224);\n }\n"])), value, value, Math.round(value / 2));
|
|
5050
5050
|
};
|
|
5051
5051
|
|
|
5052
|
-
const
|
|
5052
|
+
const StrokeColorLegendItemMixin = /*#__PURE__*/css(_templateObject9$1 || (_templateObject9$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
|
|
5053
|
+
const MapLegendItem = /*#__PURE__*/styled.div(_templateObject10$1 || (_templateObject10$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: ", "rem;\n background: ", ";\n border: 1px rgba(48, 69, 79, 0.1) solid;\n margin-right: -1px;\n opacity: ", ";\n\n ", "\n\n ", "\n"])), _ref => {
|
|
5053
5054
|
let {
|
|
5054
5055
|
parameter
|
|
5055
5056
|
} = _ref;
|
|
@@ -5061,40 +5062,107 @@ const MapLegendItem = /*#__PURE__*/styled.div(_templateObject9$1 || (_templateOb
|
|
|
5061
5062
|
return typeof value === "number" ? "none" : value;
|
|
5062
5063
|
}, _ref3 => {
|
|
5063
5064
|
let {
|
|
5064
|
-
|
|
5065
|
-
parameter
|
|
5065
|
+
isHidden
|
|
5066
5066
|
} = _ref3;
|
|
5067
|
-
return
|
|
5067
|
+
return isHidden ? 0.28 : 1;
|
|
5068
5068
|
}, _ref4 => {
|
|
5069
5069
|
let {
|
|
5070
5070
|
value,
|
|
5071
5071
|
parameter
|
|
5072
5072
|
} = _ref4;
|
|
5073
|
+
return isParameterType("size", parameter) && SizeLegendItemMixin(value);
|
|
5074
|
+
}, _ref5 => {
|
|
5075
|
+
let {
|
|
5076
|
+
value,
|
|
5077
|
+
parameter
|
|
5078
|
+
} = _ref5;
|
|
5073
5079
|
return isParameterType(["strokeWidth", "stroke.width"], parameter) && StrokeWidthLegendItemMixin(value);
|
|
5074
5080
|
});
|
|
5075
|
-
const MapLegendOther = /*#__PURE__*/styled(MapLegendItem)(
|
|
5076
|
-
const SizeLegendItemsMixin = /*#__PURE__*/css(
|
|
5077
|
-
const StrokeWidthLegendItemsMixin = /*#__PURE__*/css(
|
|
5078
|
-
const SizeMinimizedLegend = /*#__PURE__*/styled.div(
|
|
5079
|
-
const SizeMinimizedLegendSymbol = /*#__PURE__*/styled.div(
|
|
5080
|
-
const SizeMinimizedLegendLabel = /*#__PURE__*/styled.div(
|
|
5081
|
-
const SizeMinimizedLegendDown = /*#__PURE__*/styled.div(
|
|
5082
|
-
const SizeMinimizedLegendUp = /*#__PURE__*/styled
|
|
5083
|
-
const
|
|
5081
|
+
const MapLegendOther = /*#__PURE__*/styled(MapLegendItem)(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: none;\n position: relative;\n width: 1rem;\n margin-left: 0.25rem;\n border-radius: 0.125rem;\n"])));
|
|
5082
|
+
const SizeLegendItemsMixin = /*#__PURE__*/css(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 2rem;\n height: 2rem;\n margin: 0 auto;\n\n ", " {\n width: auto;\n margin-left: 0;\n }\n"])), MapLegendOther);
|
|
5083
|
+
const StrokeWidthLegendItemsMixin = /*#__PURE__*/css(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n flex-direction: column;\n width: auto;\n\n ", " {\n width: calc(100% - 2rem);\n margin-left: 0;\n }\n"])), MapLegendOther);
|
|
5084
|
+
const SizeMinimizedLegend = /*#__PURE__*/styled.div(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n margin-top: 0.5rem;\n"])));
|
|
5085
|
+
const SizeMinimizedLegendSymbol = /*#__PURE__*/styled.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
|
|
5086
|
+
const SizeMinimizedLegendLabel = /*#__PURE__*/styled.div(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
|
|
5087
|
+
const SizeMinimizedLegendDown = /*#__PURE__*/styled.div(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n opacity: 0.65;\n"])));
|
|
5088
|
+
const SizeMinimizedLegendUp = /*#__PURE__*/styled(SizeMinimizedLegendDown)(_templateObject18 || (_templateObject18 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
5089
|
+
const SingleSizeLegendItemsMixin = /*#__PURE__*/css(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n\n ", ":after {\n margin: 0 auto;\n }\n"])), MapLegendItem);
|
|
5090
|
+
const SingleLegendItemsMixin = /*#__PURE__*/css(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n width: 2rem;\n margin: 0;\n ", "\n \n ", " {\n position: relative;\n top: 0;\n left: 0;\n display: flex;\n align-content: center;\n justify-content: center;\n margin: 0;\n height: auto;\n width: auto;\n\n ", "\n }\n"])), _ref6 => {
|
|
5084
5091
|
let {
|
|
5085
5092
|
isSize
|
|
5086
|
-
} =
|
|
5093
|
+
} = _ref6;
|
|
5094
|
+
return isSize && SingleSizeLegendItemsMixin;
|
|
5095
|
+
}, MapLegendItem, _ref7 => {
|
|
5096
|
+
let {
|
|
5097
|
+
parameter
|
|
5098
|
+
} = _ref7;
|
|
5099
|
+
return isParameterType(["strokeColor", "stroke.color"], parameter) && StrokeColorLegendItemMixin;
|
|
5100
|
+
});
|
|
5101
|
+
const MapLegendItems = /*#__PURE__*/styled.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n ", ";\n ", ";\n"])), _ref8 => {
|
|
5102
|
+
let {
|
|
5103
|
+
isSize
|
|
5104
|
+
} = _ref8;
|
|
5087
5105
|
return isSize && SizeLegendItemsMixin;
|
|
5088
|
-
},
|
|
5106
|
+
}, _ref9 => {
|
|
5089
5107
|
let {
|
|
5090
5108
|
isStrokeWidth
|
|
5091
|
-
} =
|
|
5109
|
+
} = _ref9;
|
|
5092
5110
|
return isStrokeWidth && StrokeWidthLegendItemsMixin;
|
|
5111
|
+
}, _ref10 => {
|
|
5112
|
+
let {
|
|
5113
|
+
isSingle
|
|
5114
|
+
} = _ref10;
|
|
5115
|
+
return isSingle && SingleLegendItemsMixin;
|
|
5093
5116
|
});
|
|
5094
|
-
const
|
|
5095
|
-
const
|
|
5096
|
-
const
|
|
5097
|
-
const
|
|
5117
|
+
const MapLegendItemsContainer = /*#__PURE__*/styled.div(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n \n ", " {\n :first-child {\n border-top-left-radius: 0.125rem;\n border-bottom-left-radius: 0.125rem;\n }\n\n :last-child {\n border-top-right-radius: 0.125rem;\n border-bottom-right-radius: 0.125rem;\n }\n }\n"])), MapLegendItem);
|
|
5118
|
+
const MapLegendValues = /*#__PURE__*/styled.div(_templateObject23 || (_templateObject23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
|
|
5119
|
+
const MapLegendValuesRange = /*#__PURE__*/styled.div(_templateObject24 || (_templateObject24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: calc(100% - 1.25rem);\n \n div {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n\n :first-child {\n margin-right: 0.5rem;\n }\n\n :last-child {\n margin-left: 0.5rem;\n }\n }\n"])));
|
|
5120
|
+
const MapLegendValuesOther = /*#__PURE__*/styled(MapLegendOther)(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 0;\n text-align: center;\n overflow: visible;\n"])));
|
|
5121
|
+
const MapLegendExpandButton = /*#__PURE__*/styled.div(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin: 0.1rem 0 0.5rem;\n font-size: 0.625rem;\n color: #1FB3AA;\n"])));
|
|
5122
|
+
|
|
5123
|
+
const MapLegend = _ref => {
|
|
5124
|
+
let {
|
|
5125
|
+
layer,
|
|
5126
|
+
config,
|
|
5127
|
+
className,
|
|
5128
|
+
hideTitle
|
|
5129
|
+
} = _ref;
|
|
5130
|
+
const legend = useMapLegend(layer, config);
|
|
5131
|
+
|
|
5132
|
+
if (!legend) {
|
|
5133
|
+
return null;
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
const {
|
|
5137
|
+
symbol,
|
|
5138
|
+
items
|
|
5139
|
+
} = legend;
|
|
5140
|
+
return React.createElement(LegendProvider, {
|
|
5141
|
+
symbol: symbol
|
|
5142
|
+
}, React.createElement(MapLegendControl, {
|
|
5143
|
+
className: className
|
|
5144
|
+
}, !hideTitle && React.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), !!items.length && React.createElement(MapLegendContainer, null, React.createElement(Legend, {
|
|
5145
|
+
layer: layer,
|
|
5146
|
+
config: config
|
|
5147
|
+
}))));
|
|
5148
|
+
};
|
|
5149
|
+
|
|
5150
|
+
const MAX_SIZE$2 = 100;
|
|
5151
|
+
const MapLegendSymbol = _ref => {
|
|
5152
|
+
let {
|
|
5153
|
+
value,
|
|
5154
|
+
parameter
|
|
5155
|
+
} = _ref;
|
|
5156
|
+
return React.createElement(LegendSymbol, {
|
|
5157
|
+
key: value.title,
|
|
5158
|
+
parameter: parameter,
|
|
5159
|
+
parameterValue: value.parameterValue
|
|
5160
|
+
}, symbol => React.createElement(Symbol, {
|
|
5161
|
+
render: getMapLegendSymbolRenders,
|
|
5162
|
+
symbol: symbol,
|
|
5163
|
+
size: MAX_SIZE$2
|
|
5164
|
+
}));
|
|
5165
|
+
};
|
|
5098
5166
|
|
|
5099
5167
|
const MapLegendDescription = _ref => {
|
|
5100
5168
|
let {
|
|
@@ -5107,14 +5175,17 @@ const MapLegendDescription = _ref => {
|
|
|
5107
5175
|
};
|
|
5108
5176
|
|
|
5109
5177
|
const getValueFromLegendTitle = (title, minOrMax) => {
|
|
5110
|
-
var _title$split;
|
|
5111
|
-
|
|
5112
5178
|
if (title.includes(" - ")) {
|
|
5113
5179
|
const result = title == null ? void 0 : title.split(" - ");
|
|
5114
5180
|
return minOrMax === "min" ? result == null ? void 0 : result[0] : result == null ? void 0 : result[1];
|
|
5115
5181
|
}
|
|
5116
5182
|
|
|
5117
|
-
|
|
5183
|
+
if (title.includes(",")) {
|
|
5184
|
+
const result = title == null ? void 0 : title.split(",");
|
|
5185
|
+
return result.join(", ");
|
|
5186
|
+
}
|
|
5187
|
+
|
|
5188
|
+
return title.split(" ").find(isNumeric) || title || "";
|
|
5118
5189
|
};
|
|
5119
5190
|
|
|
5120
5191
|
const MinimizedLegend = _ref => {
|
|
@@ -5123,7 +5194,8 @@ const MinimizedLegend = _ref => {
|
|
|
5123
5194
|
let {
|
|
5124
5195
|
values,
|
|
5125
5196
|
title,
|
|
5126
|
-
parameter
|
|
5197
|
+
parameter,
|
|
5198
|
+
hiddenLegends
|
|
5127
5199
|
} = _ref;
|
|
5128
5200
|
const currentValues = [...values];
|
|
5129
5201
|
const other = currentValues.pop();
|
|
@@ -5131,101 +5203,52 @@ const MinimizedLegend = _ref => {
|
|
|
5131
5203
|
const isStrokeWidth = isParameterType(["strokeWidth", "stroke.width"], parameter);
|
|
5132
5204
|
const titleMax = getValueFromLegendTitle((_currentValues$ = currentValues[0]) == null ? void 0 : _currentValues$.title, "max");
|
|
5133
5205
|
const titleMin = getValueFromLegendTitle((_currentValues = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues.title, "min");
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5206
|
+
const checkIsHidden = useCallback(hiddenCondition => hiddenCondition ? hiddenLegends == null ? void 0 : hiddenLegends.some(condition => hiddenCondition.includes(condition)) : false, [hiddenLegends]);
|
|
5207
|
+
return React.createElement(MinimizedLegendContainer, null, !!title && React.createElement(MapLegendValueDescr, null, title), isSize ? React.createElement(React.Fragment, null, React.createElement(SizeMinimizedLegend, null, React.createElement(SizeMinimizedLegendSymbol, null, React.createElement(MapLegendItems, {
|
|
5208
|
+
parameter: parameter,
|
|
5137
5209
|
isSize: true
|
|
5138
5210
|
}, currentValues.map((value, index) => React.createElement(MapLegendItem, {
|
|
5139
5211
|
key: "" + value.title + index,
|
|
5140
5212
|
title: value.title,
|
|
5141
5213
|
value: value.parameterValue,
|
|
5142
|
-
parameter: parameter
|
|
5214
|
+
parameter: parameter,
|
|
5215
|
+
isHidden: checkIsHidden(value.hiddenCondition)
|
|
5143
5216
|
})))), React.createElement(SizeMinimizedLegendLabel, null, React.createElement(SizeMinimizedLegendDown, null, (_currentValues$2 = currentValues[0]) == null ? void 0 : _currentValues$2.title), React.createElement(SizeMinimizedLegendUp, null, (_currentValues2 = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues2.title))), React.createElement(SizeMinimizedLegend, null, React.createElement(SizeMinimizedLegendSymbol, null, React.createElement(MapLegendItems, {
|
|
5217
|
+
parameter: parameter,
|
|
5144
5218
|
isSize: true
|
|
5145
5219
|
}, React.createElement(MapLegendOther, {
|
|
5146
5220
|
title: "\u0414\u0440\u0443\u0433\u043E\u0435",
|
|
5147
5221
|
value: other == null ? void 0 : other.parameterValue,
|
|
5148
|
-
parameter: parameter
|
|
5222
|
+
parameter: parameter,
|
|
5223
|
+
isHidden: checkIsHidden(other == null ? void 0 : other.hiddenCondition)
|
|
5149
5224
|
}))), React.createElement(SizeMinimizedLegendLabel, null, React.createElement(SizeMinimizedLegendUp, null, "\u0414\u0440\u0443\u0433\u043E\u0435")))) : isStrokeWidth ? React.createElement(MapLegendItems, {
|
|
5225
|
+
parameter: parameter,
|
|
5150
5226
|
isStrokeWidth: true
|
|
5151
5227
|
}, currentValues.map((value, index) => React.createElement(MapLegendItem, {
|
|
5152
5228
|
key: "" + value.title + index,
|
|
5153
5229
|
title: value.title,
|
|
5154
5230
|
value: value.parameterValue,
|
|
5155
|
-
parameter: parameter
|
|
5231
|
+
parameter: parameter,
|
|
5232
|
+
isHidden: checkIsHidden(value.hiddenCondition)
|
|
5156
5233
|
}, (!index || index === currentValues.length - 1) && value.title)), React.createElement(MapLegendOther, {
|
|
5157
5234
|
title: "\u0414\u0440\u0443\u0433\u043E\u0435",
|
|
5158
5235
|
value: other == null ? void 0 : other.parameterValue,
|
|
5236
|
+
parameter: parameter,
|
|
5237
|
+
isHidden: checkIsHidden(other == null ? void 0 : other.hiddenCondition)
|
|
5238
|
+
}, "\u0414\u0440\u0443\u0433\u043E\u0435")) : React.createElement(MapLegendItems, {
|
|
5159
5239
|
parameter: parameter
|
|
5160
|
-
},
|
|
5240
|
+
}, React.createElement(MapLegendItemsContainer, null, currentValues.map((value, index) => React.createElement(MapLegendItem, {
|
|
5161
5241
|
key: "" + value.title + index,
|
|
5162
5242
|
title: value.title,
|
|
5163
5243
|
value: value.parameterValue,
|
|
5164
|
-
parameter: parameter
|
|
5165
|
-
|
|
5244
|
+
parameter: parameter,
|
|
5245
|
+
isHidden: checkIsHidden(value.hiddenCondition)
|
|
5246
|
+
}))), React.createElement(MapLegendOther, {
|
|
5166
5247
|
title: "\u0414\u0440\u0443\u0433\u043E\u0435",
|
|
5167
5248
|
value: other == null ? void 0 : other.parameterValue,
|
|
5168
|
-
parameter: parameter
|
|
5169
|
-
})), typeof (other == null ? void 0 : other.parameterValue) === "string" && (titleMax || titleMin) && React.createElement(MapLegendValues, null, React.createElement(MapLegendValuesRange, null, React.createElement("div", null, titleMax), React.createElement("div", null, titleMin)), React.createElement(MapLegendValuesOther, null, "-")));
|
|
5170
|
-
};
|
|
5171
|
-
|
|
5172
|
-
const MapLegend = _ref => {
|
|
5173
|
-
let {
|
|
5174
|
-
layer,
|
|
5175
|
-
config,
|
|
5176
|
-
className,
|
|
5177
|
-
hideTitle
|
|
5178
|
-
} = _ref;
|
|
5179
|
-
const legend = useMapLegend(layer, config);
|
|
5180
|
-
const [isExpanded, toggleExpanded] = useToggle();
|
|
5181
|
-
|
|
5182
|
-
if (!legend) {
|
|
5183
|
-
return null;
|
|
5184
|
-
}
|
|
5185
|
-
|
|
5186
|
-
const {
|
|
5187
|
-
symbol,
|
|
5188
|
-
items
|
|
5189
|
-
} = legend;
|
|
5190
|
-
return React.createElement(LegendProvider, {
|
|
5191
|
-
symbol: symbol
|
|
5192
|
-
}, React.createElement(MapLegendControl, {
|
|
5193
|
-
className: className
|
|
5194
|
-
}, !hideTitle && React.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), !!items.length && React.createElement(MapLegendContainer, null, isExpanded ? React.createElement(Legend, {
|
|
5195
|
-
layer: layer,
|
|
5196
|
-
config: config
|
|
5197
|
-
}) : React.createElement(React.Fragment, null, items.map(item => {
|
|
5198
|
-
var _symbol$fill;
|
|
5199
|
-
|
|
5200
|
-
return React.createElement(Fragment, {
|
|
5201
|
-
key: [layer == null ? void 0 : layer.name, item.title, item.parameter].join("-")
|
|
5202
|
-
}, React.createElement(MinimizedLegend, {
|
|
5203
|
-
values: item.values,
|
|
5204
|
-
defaultValue: (_symbol$fill = symbol.fill) == null ? void 0 : _symbol$fill.color,
|
|
5205
|
-
title: item.title !== (layer == null ? void 0 : layer.alias) ? item.title : "",
|
|
5206
|
-
parameter: item.parameter
|
|
5207
|
-
}));
|
|
5208
|
-
})), React.createElement(MapLegendExpandButton, {
|
|
5209
|
-
onClick: toggleExpanded,
|
|
5210
|
-
"data-html2canvas-ignore": true
|
|
5211
|
-
}, isExpanded ? "Свернуть" : "Развернуть"))));
|
|
5212
|
-
};
|
|
5213
|
-
|
|
5214
|
-
const MAX_SIZE$2 = 100;
|
|
5215
|
-
const MapLegendSymbol = _ref => {
|
|
5216
|
-
let {
|
|
5217
|
-
value,
|
|
5218
|
-
parameter
|
|
5219
|
-
} = _ref;
|
|
5220
|
-
return React.createElement(LegendSymbol, {
|
|
5221
|
-
key: value.title,
|
|
5222
5249
|
parameter: parameter,
|
|
5223
|
-
|
|
5224
|
-
},
|
|
5225
|
-
render: getMapLegendSymbolRenders,
|
|
5226
|
-
symbol: symbol,
|
|
5227
|
-
size: MAX_SIZE$2
|
|
5228
|
-
}));
|
|
5250
|
+
isHidden: checkIsHidden(other == null ? void 0 : other.hiddenCondition)
|
|
5251
|
+
})), typeof (other == null ? void 0 : other.parameterValue) === "string" && (titleMax || titleMin) && React.createElement(MapLegendValues, null, React.createElement(MapLegendValuesRange, null, React.createElement("div", null, titleMax), React.createElement("div", null, titleMin)), React.createElement(MapLegendValuesOther, null, "-")));
|
|
5229
5252
|
};
|
|
5230
5253
|
|
|
5231
5254
|
let MeasureTool = /*#__PURE__*/function (_React$Component) {
|
|
@@ -5594,5 +5617,5 @@ const DraggableMarker = _ref => {
|
|
|
5594
5617
|
return React.createElement(Fragment, null);
|
|
5595
5618
|
};
|
|
5596
5619
|
|
|
5597
|
-
export { ArrowLineMiterRender, BaseMeasureToolCreator, BaseMeasureToolEditor, CRS_MAP, CardAttributes, CardHeader, CircleLineMiterRender, ClassificationCondition, ClassificationManager, ClusterLayer, ClusterSymbol, CompoundIcon, DEFAULT_CRS, DEFAULT_SRID, DEFAULT_SYMBOL_SIZE, DraggableMarker, EvergisCard, EvergisCardAttribute, AttributeContainer as EvergisCardAttributeContainer, AttributeTitle as EvergisCardAttributeTitle, AttributeValueContainer as EvergisCardAttributeValueContainer, CardControls as EvergisCardCardControls, CardTitle as EvergisCardCardTitle, EvergisCardContainer, CurrentFeatureIndex as EvergisCardCurrentFeatureIndex, FeatureName as EvergisCardFeatureName, LayerName as EvergisCardLayerName, CardPagination as EvergisCardPagination, PaginationDescription as EvergisCardPaginationDescription, SimpleAttribute as EvergisCardSimpleValue, StickyHeader as EvergisCardStickyHeader, ValueLink as EvergisCardValueLink, EvergisDynamicLayer, EvergisFeature, EvergisLayer, EvergisProvider, EvergisSelect, EvergisSelectLayer, EvergisSelectProvider, EvergisStyle, EvergisTileLayer, FeatureLayer, Fullscreen, LabelSymbol, Legend, LegendContainer, LegendProvider, LegendSection, LegendSectionContainer, LegendSymbol, LegendValue, LegendValueContainer, LineMiterKind, LineMiterRender, Map, MapControl, MapControls, MapLegend, MapLegendContainer, MapLegendDescription, MapLegendDescriptionContainer, MapLegendExpandButton, MapLegendHeader, MapLegendItem, MapLegendSymbol, MapLegendValueDescr, MapLegendValues, MapProvider, Measure, MeasureTool, Measurer, NO_CONTENT_VALUE, Noop, PREVIEW_LIMITS, SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol, SOLID_INTERVALS, SVGPoly, ScaleRuler, ScaleRulerBlock, ScaleRulerContainer, Search, SelectedPointSymbol, SelectedPolySymbol, ShadowedPointSymbol, ShadowedPolySymbol, SizeMinimizedLegendDown, SizeMinimizedLegendUp, SquareLineMiterRender, SrId, StyleSymbol, Symbol, TextContainer, TileLayer, Tooltip, TooltipComponent, TooltipProvider, Zoom, ZoomLevel, adjustSymbol, applyParameterValue, clamp, copyRings, createCompositeSymbol, createLabelSymbol, createStyleLegend, createValueTitle, defaultOffset, defineStrokeStylePreset, deserializeSymbol, evaluateFeature, extractStyle, extractSymbol, findChildFeatureStyle, findChildFeatureSymbol, formatArea, formatAttributeValue, formatLength, formatPolygonMeasure, getAttributeNameFromClassified, getAttributeNameFromCondition, getChildSymbols, getCrs, getDashStylePreset, getFeatureSymbol, getLegendSymbolRenders, getLineDash, getMapLegendSymbolRenders, getMapState, getParameterValue, getScale, getSymbolRenders, isArrowLineMiter, isCalculatedParameter, isCircleLineMiter, isCompositeSymbol, isDashedBrush, isFilledLineMitter, isHatchBrush, isImageSymbol, isLabelSymbol, isMaskedImageSymbol, isMiterExist, isNumeric, isParameterByAttribute, isParameterType, isParameterValueSimple, isParameterValueSymbol, isPatternBrush, isPointLabelSymbol, isPointSymbol, isPolygonHasHatchBrush, isPolygonHasPatternBrush, isPolygonLabelSymbol, isPolygonSymbol, isPolylineLabelSymbol, isPolylineLikePolygon, isPolylineSymbol, isPolylineSymbols, isRangeClass, isRasterSymbol, isSGisClusterSymbol, isSGisH3Symbol, isSGisImageSymbol, isSGisPointSymbol, isSGisPolygonSymbol, isSGisPolylineSymbol, isScalablePolylineSymbol, isSimpleOffset, isSimplePolylineSymbol, isSimpleSymbol, isSizableSymbol, isSolidBrush, isSquareLineMiter, isSquareSymbol, isStaticImageSymbol, isStringParameterValue, isStrokeStyledSymbol, isStyle, isSymbolWithOffset, isTwoDimensionalSymbol, isUniqueClass, isValidParameter, measureAreaSymbol, measureLengthSymbol, measurePolygonSnapSymbol, metersToPixels, numberWithSpaces, packStyle, polygonCircleFromPoint, printRangeClass, renderSymbolToCanvas, selectedPoint, selectedPolygon, selectedPolyline, setDefaultParameterValue, setParameterValue, shouldUpdateMapState, solidStrokeStylePreset, strokeStylePresets, symbolParameterWalker, symbolTypeGuard, toIntervals, toLineDash, unClassify, updateMapResolution, useCanvas, useClusterLayer, useCrs, useDebouncedCallback, useDraggableMarker, useEventPoint, useEvergisContext, useEvergisDynamicLayer, useEvergisSelect, useEvergisSelectContext, useEvergisTileLayer, useFeatureLayer, useLayerLegend, useLayerOrder, useLayerVisibility, useLegend, useLegendContext, useLegendValueSymbol, useMapBboxChange, useMapContext, useMapLegend, useMapLevel, useMapPick, useMapResize, useMapState, useMapView, useMapViewActions, useMapWrapper, useMaxMinScale, useMetersToPixels, useMetersToPixelsCb, useMount, useProperty, useScale, useSymbol, useToggle, useTooltip, useTooltipContext, useUpdate, useUpdateMapView };
|
|
5620
|
+
export { ArrowLineMiterRender, BaseMeasureToolCreator, BaseMeasureToolEditor, CRS_MAP, CardAttributes, CardHeader, CircleLineMiterRender, ClassificationCondition, ClassificationManager, ClusterLayer, ClusterSymbol, CompoundIcon, DEFAULT_CRS, DEFAULT_SRID, DEFAULT_SYMBOL_SIZE, DraggableMarker, EvergisCard, EvergisCardAttribute, AttributeContainer as EvergisCardAttributeContainer, AttributeTitle as EvergisCardAttributeTitle, AttributeValueContainer as EvergisCardAttributeValueContainer, CardControls as EvergisCardCardControls, CardTitle as EvergisCardCardTitle, EvergisCardContainer, CurrentFeatureIndex as EvergisCardCurrentFeatureIndex, FeatureName as EvergisCardFeatureName, LayerName as EvergisCardLayerName, CardPagination as EvergisCardPagination, PaginationDescription as EvergisCardPaginationDescription, SimpleAttribute as EvergisCardSimpleValue, StickyHeader as EvergisCardStickyHeader, ValueLink as EvergisCardValueLink, EvergisDynamicLayer, EvergisFeature, EvergisLayer, EvergisProvider, EvergisSelect, EvergisSelectLayer, EvergisSelectProvider, EvergisStyle, EvergisTileLayer, FeatureLayer, Fullscreen, LabelSymbol, Legend, LegendContainer, LegendProvider, LegendSection, LegendSectionContainer, LegendSymbol, LegendValue, LegendValueContainer, LineMiterKind, LineMiterRender, Map, MapControl, MapControls, MapLegend, MapLegendContainer, MapLegendDescription, MapLegendDescriptionContainer, MapLegendExpandButton, MapLegendHeader, MapLegendItem, MapLegendItems, MapLegendOther, MapLegendSymbol, MapLegendValueDescr, MapLegendValues, MapProvider, Measure, MeasureTool, Measurer, MinimizedLegend, NO_CONTENT_VALUE, Noop, PREVIEW_LIMITS, SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol, SOLID_INTERVALS, SVGPoly, ScaleRuler, ScaleRulerBlock, ScaleRulerContainer, Search, SelectedPointSymbol, SelectedPolySymbol, ShadowedPointSymbol, ShadowedPolySymbol, SizeMinimizedLegendDown, SizeMinimizedLegendUp, SquareLineMiterRender, SrId, StyleSymbol, Symbol, TextContainer, TileLayer, Tooltip, TooltipComponent, TooltipProvider, Zoom, ZoomLevel, adjustSymbol, applyParameterValue, clamp, copyRings, createCompositeSymbol, createLabelSymbol, createStyleLegend, createValueTitle, defaultOffset, defineStrokeStylePreset, deserializeSymbol, evaluateFeature, extractStyle, extractSymbol, findChildFeatureStyle, findChildFeatureSymbol, formatArea, formatAttributeValue, formatLength, formatPolygonMeasure, getAttributeNameFromClassified, getAttributeNameFromCondition, getChildSymbols, getCrs, getDashStylePreset, getFeatureSymbol, getLegendSymbolRenders, getLineDash, getMapLegendSymbolRenders, getMapState, getParameterValue, getScale, getSymbolRenders, isArrowLineMiter, isCalculatedParameter, isCircleLineMiter, isCompositeSymbol, isDashedBrush, isFilledLineMitter, isHatchBrush, isImageSymbol, isLabelSymbol, isMaskedImageSymbol, isMiterExist, isNumeric, isParameterByAttribute, isParameterType, isParameterValueSimple, isParameterValueSymbol, isPatternBrush, isPointLabelSymbol, isPointSymbol, isPolygonHasHatchBrush, isPolygonHasPatternBrush, isPolygonLabelSymbol, isPolygonSymbol, isPolylineLabelSymbol, isPolylineLikePolygon, isPolylineSymbol, isPolylineSymbols, isRangeClass, isRasterSymbol, isSGisClusterSymbol, isSGisH3Symbol, isSGisImageSymbol, isSGisPointSymbol, isSGisPolygonSymbol, isSGisPolylineSymbol, isScalablePolylineSymbol, isSimpleOffset, isSimplePolylineSymbol, isSimpleSymbol, isSizableSymbol, isSolidBrush, isSquareLineMiter, isSquareSymbol, isStaticImageSymbol, isStringParameterValue, isStrokeStyledSymbol, isStyle, isSymbolWithOffset, isTwoDimensionalSymbol, isUniqueClass, isValidParameter, measureAreaSymbol, measureLengthSymbol, measurePolygonSnapSymbol, metersToPixels, numberWithSpaces, packStyle, polygonCircleFromPoint, printRangeClass, renderSymbolToCanvas, selectedPoint, selectedPolygon, selectedPolyline, setDefaultParameterValue, setParameterValue, shouldUpdateMapState, solidStrokeStylePreset, strokeStylePresets, symbolParameterWalker, symbolTypeGuard, toIntervals, toLineDash, unClassify, updateMapResolution, useCanvas, useClusterLayer, useCrs, useDebouncedCallback, useDraggableMarker, useEventPoint, useEvergisContext, useEvergisDynamicLayer, useEvergisSelect, useEvergisSelectContext, useEvergisTileLayer, useFeatureLayer, useLayerLegend, useLayerOrder, useLayerVisibility, useLegend, useLegendContext, useLegendValueSymbol, useMapBboxChange, useMapContext, useMapLegend, useMapLevel, useMapPick, useMapResize, useMapState, useMapView, useMapViewActions, useMapWrapper, useMaxMinScale, useMetersToPixels, useMetersToPixelsCb, useMount, useProperty, useScale, useSymbol, useToggle, useTooltip, useTooltipContext, useUpdate, useUpdateMapView };
|
|
5598
5621
|
//# sourceMappingURL=react.esm.js.map
|