@evergis/react 2.0.155 → 2.0.157
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 +4 -0
- package/dist/react.cjs.development.js +92 -83
- 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 +90 -84
- package/dist/react.esm.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './MapLegend';
|
|
2
2
|
export * from './MapLegendSymbol';
|
|
3
3
|
export * from './MapLegendDescription';
|
|
4
|
-
export
|
|
4
|
+
export * from './MinimizedLegend';
|
|
5
|
+
export { MapLegendContainer, MapLegendHeader, MapLegendValueDescr, MapLegendExpandButton, MapLegendValues, MapLegendItems, MapLegendItem, MapLegendOther, SizeMinimizedLegendDown, SizeMinimizedLegendUp, MapLegendDescriptionContainer, } from './styled';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ClassificationParameterExtended } from "../../core";
|
|
1
2
|
export declare const MapLegendControl: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
3
|
export declare const MapLegendContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
4
|
export declare const MapLegendHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -18,8 +19,11 @@ export declare const SizeMinimizedLegendLabel: import("styled-components").Style
|
|
|
18
19
|
export declare const SizeMinimizedLegendDown: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
20
|
export declare const SizeMinimizedLegendUp: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
20
21
|
export declare const MapLegendItems: import("styled-components").StyledComponent<"div", any, {
|
|
22
|
+
parameter: ClassificationParameterExtended;
|
|
21
23
|
isSize?: boolean | undefined;
|
|
22
24
|
isStrokeWidth?: boolean | undefined;
|
|
25
|
+
isStrokeColor?: boolean | undefined;
|
|
26
|
+
isSingle?: boolean | undefined;
|
|
23
27
|
}, never>;
|
|
24
28
|
export declare const MapLegendValues: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
25
29
|
export declare const MapLegendValuesRange: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -4885,7 +4885,7 @@ const Legend = _ref => {
|
|
|
4885
4885
|
} = legend || {};
|
|
4886
4886
|
|
|
4887
4887
|
if (!legend && !renderCustomLegend) {
|
|
4888
|
-
return
|
|
4888
|
+
return null;
|
|
4889
4889
|
}
|
|
4890
4890
|
|
|
4891
4891
|
return React__default.createElement(LegendProvider, {
|
|
@@ -5027,7 +5027,7 @@ const Fullscreen = () => {
|
|
|
5027
5027
|
}));
|
|
5028
5028
|
};
|
|
5029
5029
|
|
|
5030
|
-
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;
|
|
5030
|
+
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;
|
|
5031
5031
|
const MapLegendControl = /*#__PURE__*/styled__default(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
|
|
5032
5032
|
const MapLegendContainer = /*#__PURE__*/styled__default.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"])));
|
|
5033
5033
|
const MapLegendHeader = /*#__PURE__*/styled__default(LegendSectionHeader)(_templateObject3$4 || (_templateObject3$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 15rem;\n margin-bottom: 0.25rem;\n font-weight: 500;\n"])));
|
|
@@ -5040,7 +5040,7 @@ const SizeLegendItemMixin = function SizeLegendItemMixin(value) {
|
|
|
5040
5040
|
value = 0;
|
|
5041
5041
|
}
|
|
5042
5042
|
|
|
5043
|
-
return styled.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
|
|
5043
|
+
return styled.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);
|
|
5044
5044
|
};
|
|
5045
5045
|
|
|
5046
5046
|
const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
|
|
@@ -5048,10 +5048,11 @@ const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
|
|
|
5048
5048
|
value = 0;
|
|
5049
5049
|
}
|
|
5050
5050
|
|
|
5051
|
-
return styled.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 min-height: 1rem;\n height: auto;\n width: calc(100% - 2rem);\n margin: 0 0 0.25rem 0;\n padding-left: 2rem;\n font-size: 0.75rem;\n \n :after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 0;\n width: 1.5rem;\n height: ", "px;\n margin-top: -", ";\n background: rgb(224, 224, 224);\n }\n"])), value, Math.round(value / 2));
|
|
5051
|
+
return styled.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 min-height: 1rem;\n height: auto;\n width: calc(100% - 2rem);\n margin: 0 0 0.25rem 0;\n padding-left: 2rem;\n font-size: 0.75rem;\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, Math.round(value / 2));
|
|
5052
5052
|
};
|
|
5053
5053
|
|
|
5054
|
-
const
|
|
5054
|
+
const StrokeColorLegendItemMixin = /*#__PURE__*/styled.css(_templateObject9$1 || (_templateObject9$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
|
|
5055
|
+
const MapLegendItem = /*#__PURE__*/styled__default.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\n ", "\n\n ", "\n"])), _ref => {
|
|
5055
5056
|
let {
|
|
5056
5057
|
parameter
|
|
5057
5058
|
} = _ref;
|
|
@@ -5074,29 +5075,90 @@ const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject9$1 || (_t
|
|
|
5074
5075
|
} = _ref4;
|
|
5075
5076
|
return isParameterType(["strokeWidth", "stroke.width"], parameter) && StrokeWidthLegendItemMixin(value);
|
|
5076
5077
|
});
|
|
5077
|
-
const MapLegendOther = /*#__PURE__*/styled__default(MapLegendItem)(
|
|
5078
|
-
const SizeLegendItemsMixin = /*#__PURE__*/styled.css(
|
|
5079
|
-
const StrokeWidthLegendItemsMixin = /*#__PURE__*/styled.css(
|
|
5080
|
-
const SizeMinimizedLegend = /*#__PURE__*/styled__default.div(
|
|
5081
|
-
const SizeMinimizedLegendSymbol = /*#__PURE__*/styled__default.div(
|
|
5082
|
-
const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(
|
|
5083
|
-
const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(
|
|
5084
|
-
const SizeMinimizedLegendUp = /*#__PURE__*/styled__default.div(
|
|
5085
|
-
const
|
|
5078
|
+
const MapLegendOther = /*#__PURE__*/styled__default(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"])));
|
|
5079
|
+
const SizeLegendItemsMixin = /*#__PURE__*/styled.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);
|
|
5080
|
+
const StrokeWidthLegendItemsMixin = /*#__PURE__*/styled.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);
|
|
5081
|
+
const SizeMinimizedLegend = /*#__PURE__*/styled__default.div(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n margin-top: 0.5rem;\n"])));
|
|
5082
|
+
const SizeMinimizedLegendSymbol = /*#__PURE__*/styled__default.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
|
|
5083
|
+
const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
|
|
5084
|
+
const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n opacity: 0.28;\n"])));
|
|
5085
|
+
const SizeMinimizedLegendUp = /*#__PURE__*/styled__default.div(_templateObject18 || (_templateObject18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n opacity: 0.65;\n"])));
|
|
5086
|
+
const SingleSizeLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n\n ", ":after {\n margin: 0 auto;\n }\n"])), MapLegendItem);
|
|
5087
|
+
const SingleLegendItemsMixin = /*#__PURE__*/styled.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"])), _ref5 => {
|
|
5086
5088
|
let {
|
|
5087
5089
|
isSize
|
|
5088
5090
|
} = _ref5;
|
|
5091
|
+
return isSize && SingleSizeLegendItemsMixin;
|
|
5092
|
+
}, MapLegendItem, _ref6 => {
|
|
5093
|
+
let {
|
|
5094
|
+
parameter
|
|
5095
|
+
} = _ref6;
|
|
5096
|
+
return isParameterType(["strokeColor", "stroke.color"], parameter) && StrokeColorLegendItemMixin;
|
|
5097
|
+
});
|
|
5098
|
+
const MapLegendItems = /*#__PURE__*/styled__default.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"])), _ref7 => {
|
|
5099
|
+
let {
|
|
5100
|
+
isSize
|
|
5101
|
+
} = _ref7;
|
|
5089
5102
|
return isSize && SizeLegendItemsMixin;
|
|
5090
|
-
},
|
|
5103
|
+
}, _ref8 => {
|
|
5091
5104
|
let {
|
|
5092
5105
|
isStrokeWidth
|
|
5093
|
-
} =
|
|
5106
|
+
} = _ref8;
|
|
5094
5107
|
return isStrokeWidth && StrokeWidthLegendItemsMixin;
|
|
5108
|
+
}, _ref9 => {
|
|
5109
|
+
let {
|
|
5110
|
+
isSingle
|
|
5111
|
+
} = _ref9;
|
|
5112
|
+
return isSingle && SingleLegendItemsMixin;
|
|
5095
5113
|
});
|
|
5096
|
-
const MapLegendValues = /*#__PURE__*/styled__default.div(
|
|
5097
|
-
const MapLegendValuesRange = /*#__PURE__*/styled__default.div(
|
|
5098
|
-
const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(
|
|
5099
|
-
const MapLegendExpandButton = /*#__PURE__*/styled__default.div(
|
|
5114
|
+
const MapLegendValues = /*#__PURE__*/styled__default.div(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
|
|
5115
|
+
const MapLegendValuesRange = /*#__PURE__*/styled__default.div(_templateObject23 || (_templateObject23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
5116
|
+
const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject24 || (_templateObject24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 0;\n text-align: center;\n overflow: visible;\n"])));
|
|
5117
|
+
const MapLegendExpandButton = /*#__PURE__*/styled__default.div(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin: 0.1rem 0 0.5rem;\n font-size: 0.625rem;\n color: #1FB3AA;\n"])));
|
|
5118
|
+
|
|
5119
|
+
const MapLegend = _ref => {
|
|
5120
|
+
let {
|
|
5121
|
+
layer,
|
|
5122
|
+
config,
|
|
5123
|
+
className,
|
|
5124
|
+
hideTitle
|
|
5125
|
+
} = _ref;
|
|
5126
|
+
const legend = useMapLegend(layer, config);
|
|
5127
|
+
|
|
5128
|
+
if (!legend) {
|
|
5129
|
+
return null;
|
|
5130
|
+
}
|
|
5131
|
+
|
|
5132
|
+
const {
|
|
5133
|
+
symbol,
|
|
5134
|
+
items
|
|
5135
|
+
} = legend;
|
|
5136
|
+
return React__default.createElement(LegendProvider, {
|
|
5137
|
+
symbol: symbol
|
|
5138
|
+
}, React__default.createElement(MapLegendControl, {
|
|
5139
|
+
className: className
|
|
5140
|
+
}, !hideTitle && React__default.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), !!items.length && React__default.createElement(MapLegendContainer, null, React__default.createElement(Legend, {
|
|
5141
|
+
layer: layer,
|
|
5142
|
+
config: config
|
|
5143
|
+
}))));
|
|
5144
|
+
};
|
|
5145
|
+
|
|
5146
|
+
const MAX_SIZE$2 = 100;
|
|
5147
|
+
const MapLegendSymbol = _ref => {
|
|
5148
|
+
let {
|
|
5149
|
+
value,
|
|
5150
|
+
parameter
|
|
5151
|
+
} = _ref;
|
|
5152
|
+
return React__default.createElement(LegendSymbol, {
|
|
5153
|
+
key: value.title,
|
|
5154
|
+
parameter: parameter,
|
|
5155
|
+
parameterValue: value.parameterValue
|
|
5156
|
+
}, symbol => React__default.createElement(Symbol, {
|
|
5157
|
+
render: getMapLegendSymbolRenders,
|
|
5158
|
+
symbol: symbol,
|
|
5159
|
+
size: MAX_SIZE$2
|
|
5160
|
+
}));
|
|
5161
|
+
};
|
|
5100
5162
|
|
|
5101
5163
|
const MapLegendDescription = _ref => {
|
|
5102
5164
|
let {
|
|
@@ -5133,9 +5195,8 @@ const MinimizedLegend = _ref => {
|
|
|
5133
5195
|
const isStrokeWidth = isParameterType(["strokeWidth", "stroke.width"], parameter);
|
|
5134
5196
|
const titleMax = getValueFromLegendTitle((_currentValues$ = currentValues[0]) == null ? void 0 : _currentValues$.title, "max");
|
|
5135
5197
|
const titleMin = getValueFromLegendTitle((_currentValues = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues.title, "min");
|
|
5136
|
-
return React__default.createElement(MinimizedLegendContainer, null, !!title && React__default.createElement(MapLegendValueDescr, null, title), React__default.createElement(
|
|
5137
|
-
parameter: parameter
|
|
5138
|
-
}), isSize ? React__default.createElement(React__default.Fragment, null, React__default.createElement(SizeMinimizedLegend, null, React__default.createElement(SizeMinimizedLegendSymbol, null, React__default.createElement(MapLegendItems, {
|
|
5198
|
+
return React__default.createElement(MinimizedLegendContainer, null, !!title && React__default.createElement(MapLegendValueDescr, null, title), isSize ? React__default.createElement(React__default.Fragment, null, React__default.createElement(SizeMinimizedLegend, null, React__default.createElement(SizeMinimizedLegendSymbol, null, React__default.createElement(MapLegendItems, {
|
|
5199
|
+
parameter: parameter,
|
|
5139
5200
|
isSize: true
|
|
5140
5201
|
}, currentValues.map((value, index) => React__default.createElement(MapLegendItem, {
|
|
5141
5202
|
key: "" + value.title + index,
|
|
@@ -5143,12 +5204,14 @@ const MinimizedLegend = _ref => {
|
|
|
5143
5204
|
value: value.parameterValue,
|
|
5144
5205
|
parameter: parameter
|
|
5145
5206
|
})))), React__default.createElement(SizeMinimizedLegendLabel, null, React__default.createElement(SizeMinimizedLegendDown, null, (_currentValues$2 = currentValues[0]) == null ? void 0 : _currentValues$2.title), React__default.createElement(SizeMinimizedLegendUp, null, (_currentValues2 = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues2.title))), React__default.createElement(SizeMinimizedLegend, null, React__default.createElement(SizeMinimizedLegendSymbol, null, React__default.createElement(MapLegendItems, {
|
|
5207
|
+
parameter: parameter,
|
|
5146
5208
|
isSize: true
|
|
5147
5209
|
}, React__default.createElement(MapLegendOther, {
|
|
5148
5210
|
title: "\u0414\u0440\u0443\u0433\u043E\u0435",
|
|
5149
5211
|
value: other == null ? void 0 : other.parameterValue,
|
|
5150
5212
|
parameter: parameter
|
|
5151
5213
|
}))), React__default.createElement(SizeMinimizedLegendLabel, null, React__default.createElement(SizeMinimizedLegendUp, null, "\u0414\u0440\u0443\u0433\u043E\u0435")))) : isStrokeWidth ? React__default.createElement(MapLegendItems, {
|
|
5214
|
+
parameter: parameter,
|
|
5152
5215
|
isStrokeWidth: true
|
|
5153
5216
|
}, currentValues.map((value, index) => React__default.createElement(MapLegendItem, {
|
|
5154
5217
|
key: "" + value.title + index,
|
|
@@ -5159,7 +5222,9 @@ const MinimizedLegend = _ref => {
|
|
|
5159
5222
|
title: "\u0414\u0440\u0443\u0433\u043E\u0435",
|
|
5160
5223
|
value: other == null ? void 0 : other.parameterValue,
|
|
5161
5224
|
parameter: parameter
|
|
5162
|
-
}, "\u0414\u0440\u0443\u0433\u043E\u0435")) : React__default.createElement(MapLegendItems,
|
|
5225
|
+
}, "\u0414\u0440\u0443\u0433\u043E\u0435")) : React__default.createElement(MapLegendItems, {
|
|
5226
|
+
parameter: parameter
|
|
5227
|
+
}, currentValues.map((value, index) => React__default.createElement(MapLegendItem, {
|
|
5163
5228
|
key: "" + value.title + index,
|
|
5164
5229
|
title: value.title,
|
|
5165
5230
|
value: value.parameterValue,
|
|
@@ -5171,65 +5236,6 @@ const MinimizedLegend = _ref => {
|
|
|
5171
5236
|
})), typeof (other == null ? void 0 : other.parameterValue) === "string" && (titleMax || titleMin) && React__default.createElement(MapLegendValues, null, React__default.createElement(MapLegendValuesRange, null, React__default.createElement("div", null, titleMax), React__default.createElement("div", null, titleMin)), React__default.createElement(MapLegendValuesOther, null, "-")));
|
|
5172
5237
|
};
|
|
5173
5238
|
|
|
5174
|
-
const MapLegend = _ref => {
|
|
5175
|
-
let {
|
|
5176
|
-
layer,
|
|
5177
|
-
config,
|
|
5178
|
-
className,
|
|
5179
|
-
hideTitle
|
|
5180
|
-
} = _ref;
|
|
5181
|
-
const legend = useMapLegend(layer, config);
|
|
5182
|
-
const [isExpanded, toggleExpanded] = useToggle();
|
|
5183
|
-
|
|
5184
|
-
if (!legend) {
|
|
5185
|
-
return null;
|
|
5186
|
-
}
|
|
5187
|
-
|
|
5188
|
-
const {
|
|
5189
|
-
symbol,
|
|
5190
|
-
items
|
|
5191
|
-
} = legend;
|
|
5192
|
-
return React__default.createElement(LegendProvider, {
|
|
5193
|
-
symbol: symbol
|
|
5194
|
-
}, React__default.createElement(MapLegendControl, {
|
|
5195
|
-
className: className
|
|
5196
|
-
}, !hideTitle && React__default.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), !!items.length && React__default.createElement(MapLegendContainer, null, isExpanded ? React__default.createElement(Legend, {
|
|
5197
|
-
layer: layer,
|
|
5198
|
-
config: config
|
|
5199
|
-
}) : React__default.createElement(React__default.Fragment, null, items.map(item => {
|
|
5200
|
-
var _symbol$fill;
|
|
5201
|
-
|
|
5202
|
-
return React__default.createElement(React.Fragment, {
|
|
5203
|
-
key: [layer == null ? void 0 : layer.name, item.title, item.parameter].join("-")
|
|
5204
|
-
}, React__default.createElement(MinimizedLegend, {
|
|
5205
|
-
values: item.values,
|
|
5206
|
-
defaultValue: (_symbol$fill = symbol.fill) == null ? void 0 : _symbol$fill.color,
|
|
5207
|
-
title: item.title !== (layer == null ? void 0 : layer.alias) ? item.title : "",
|
|
5208
|
-
parameter: item.parameter
|
|
5209
|
-
}));
|
|
5210
|
-
})), React__default.createElement(MapLegendExpandButton, {
|
|
5211
|
-
onClick: toggleExpanded,
|
|
5212
|
-
"data-html2canvas-ignore": true
|
|
5213
|
-
}, isExpanded ? "Свернуть" : "Развернуть"))));
|
|
5214
|
-
};
|
|
5215
|
-
|
|
5216
|
-
const MAX_SIZE$2 = 100;
|
|
5217
|
-
const MapLegendSymbol = _ref => {
|
|
5218
|
-
let {
|
|
5219
|
-
value,
|
|
5220
|
-
parameter
|
|
5221
|
-
} = _ref;
|
|
5222
|
-
return React__default.createElement(LegendSymbol, {
|
|
5223
|
-
key: value.title,
|
|
5224
|
-
parameter: parameter,
|
|
5225
|
-
parameterValue: value.parameterValue
|
|
5226
|
-
}, symbol => React__default.createElement(Symbol, {
|
|
5227
|
-
render: getMapLegendSymbolRenders,
|
|
5228
|
-
symbol: symbol,
|
|
5229
|
-
size: MAX_SIZE$2
|
|
5230
|
-
}));
|
|
5231
|
-
};
|
|
5232
|
-
|
|
5233
5239
|
let MeasureTool = /*#__PURE__*/function (_React$Component) {
|
|
5234
5240
|
_inherits(MeasureTool, _React$Component);
|
|
5235
5241
|
|
|
@@ -5659,6 +5665,8 @@ exports.MapLegendDescriptionContainer = MapLegendDescriptionContainer;
|
|
|
5659
5665
|
exports.MapLegendExpandButton = MapLegendExpandButton;
|
|
5660
5666
|
exports.MapLegendHeader = MapLegendHeader;
|
|
5661
5667
|
exports.MapLegendItem = MapLegendItem;
|
|
5668
|
+
exports.MapLegendItems = MapLegendItems;
|
|
5669
|
+
exports.MapLegendOther = MapLegendOther;
|
|
5662
5670
|
exports.MapLegendSymbol = MapLegendSymbol;
|
|
5663
5671
|
exports.MapLegendValueDescr = MapLegendValueDescr;
|
|
5664
5672
|
exports.MapLegendValues = MapLegendValues;
|
|
@@ -5666,6 +5674,7 @@ exports.MapProvider = MapProvider;
|
|
|
5666
5674
|
exports.Measure = Measure;
|
|
5667
5675
|
exports.MeasureTool = MeasureTool;
|
|
5668
5676
|
exports.Measurer = Measurer;
|
|
5677
|
+
exports.MinimizedLegend = MinimizedLegend;
|
|
5669
5678
|
exports.NO_CONTENT_VALUE = NO_CONTENT_VALUE;
|
|
5670
5679
|
exports.Noop = Noop;
|
|
5671
5680
|
exports.PREVIEW_LIMITS = PREVIEW_LIMITS;
|