@evergis/react 2.0.151 → 2.0.152

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.
@@ -1,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+ import { ClassificationParameterExtended } from "../../core";
2
3
  export declare const MapLegendDescription: FC<{
3
- isSize?: boolean;
4
+ parameter: ClassificationParameterExtended;
4
5
  }>;
@@ -2,12 +2,15 @@ export declare const MapLegendControl: import("styled-components").StyledCompone
2
2
  export declare const MapLegendContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const MapLegendHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const MapLegendDescriptionContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const MinimizedLegendContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
6
  export declare const MapLegendValueDescr: import("styled-components").StyledComponent<"div", any, {}, never>;
6
7
  export declare const MapLegendItem: import("styled-components").StyledComponent<"div", any, {
7
8
  value?: string | number | undefined;
9
+ parameter?: "symbol" | "height" | "width" | "strokeWidth" | "size" | "fill.color" | "fill.hatchColor" | "stroke.width" | "stroke.color" | "background.fillColor" | "background.strokeColor" | "background.strokeWidth" | "figure.fillColor" | "fillColor" | "strokeColor" | "angle" | "maskedColor" | undefined;
8
10
  }, never>;
9
11
  export declare const MapLegendOther: import("styled-components").StyledComponent<"div", any, {
10
12
  value?: string | number | undefined;
13
+ parameter?: "symbol" | "height" | "width" | "strokeWidth" | "size" | "fill.color" | "fill.hatchColor" | "stroke.width" | "stroke.color" | "background.fillColor" | "background.strokeColor" | "background.strokeWidth" | "figure.fillColor" | "fillColor" | "strokeColor" | "angle" | "maskedColor" | undefined;
11
14
  }, never>;
12
15
  export declare const SizeMinimizedLegend: import("styled-components").StyledComponent<"div", any, {}, never>;
13
16
  export declare const SizeMinimizedLegendSymbol: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -15,11 +18,13 @@ export declare const SizeMinimizedLegendLabel: import("styled-components").Style
15
18
  export declare const SizeMinimizedLegendDown: import("styled-components").StyledComponent<"div", any, {}, never>;
16
19
  export declare const SizeMinimizedLegendUp: import("styled-components").StyledComponent<"div", any, {}, never>;
17
20
  export declare const MapLegendItems: import("styled-components").StyledComponent<"div", any, {
18
- overlay?: boolean | undefined;
21
+ isSize?: boolean | undefined;
22
+ isStrokeWidth?: boolean | undefined;
19
23
  }, never>;
20
24
  export declare const MapLegendValues: import("styled-components").StyledComponent<"div", any, {}, never>;
21
25
  export declare const MapLegendValuesRange: import("styled-components").StyledComponent<"div", any, {}, never>;
22
26
  export declare const MapLegendValuesOther: import("styled-components").StyledComponent<"div", any, {
23
27
  value?: string | number | undefined;
28
+ parameter?: "symbol" | "height" | "width" | "strokeWidth" | "size" | "fill.color" | "fill.hatchColor" | "stroke.width" | "stroke.color" | "background.fillColor" | "background.strokeColor" | "background.strokeWidth" | "figure.fillColor" | "fillColor" | "strokeColor" | "angle" | "maskedColor" | undefined;
24
29
  }, never>;
25
30
  export declare const MapLegendExpandButton: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
  import { LegendProps } from "../Legend";
3
- import { LegendValueType } from "../../core";
3
+ import { ClassificationParameterExtended, LegendValueType } from "../../core";
4
4
  export declare type MapLegendProps = LegendProps & {
5
5
  fromToTitle?: [string, string];
6
6
  isExpanded?: boolean;
@@ -11,5 +11,5 @@ export declare type MinimizedLegendProps = {
11
11
  title?: string | ReactNode;
12
12
  defaultValue: string;
13
13
  values: LegendValueType[];
14
- isSize?: boolean;
14
+ parameter: ClassificationParameterExtended;
15
15
  };
@@ -1947,10 +1947,14 @@ const polygonCircleFromPoint = (center, diameter) => {
1947
1947
 
1948
1948
  const isNumeric = number => !isNaN(parseFloat(number)) && isFinite(number);
1949
1949
 
1950
- const isParameterType = (parameter, type) => {
1950
+ const isParameterType = (types, parameter) => {
1951
1951
  var _parameter$toLowerCas;
1952
1952
 
1953
- return (_parameter$toLowerCas = parameter.toLowerCase()) == null ? void 0 : _parameter$toLowerCas.includes(type);
1953
+ return (typeof types === "string" ? parameter == null ? void 0 : (_parameter$toLowerCas = parameter.toLowerCase()) == null ? void 0 : _parameter$toLowerCas.includes(types.toLowerCase()) : types.some(type => {
1954
+ var _parameter$toLowerCas2;
1955
+
1956
+ return parameter == null ? void 0 : (_parameter$toLowerCas2 = parameter.toLowerCase()) == null ? void 0 : _parameter$toLowerCas2.includes(type.toLowerCase());
1957
+ })) || false;
1954
1958
  };
1955
1959
 
1956
1960
  let CircleLineMiterRender = /*#__PURE__*/function (_LineMiterRender) {
@@ -4891,13 +4895,13 @@ const Legend = _ref => {
4891
4895
  className: className
4892
4896
  }, searchable && searchLayer && React__default.createElement(SearchInput, {
4893
4897
  onChange: searchLayer
4894
- }), renderCustomLegend && layer ? renderCustomLegend(layer) : children ? legend && children(legend) : legend && legend.items.map(legendItem => React__default.createElement(LegendSection, {
4898
+ }), renderCustomLegend && layer ? renderCustomLegend(layer) : children ? legend && children(legend) : legend && legend.items.map((legendItem, index) => React__default.createElement(LegendSection, {
4895
4899
  key: legendItem.attribute + "-" + legendItem.parameter,
4896
4900
  item: legendItem,
4897
4901
  hideTitle: (layer == null ? void 0 : layer.alias) === legendItem.title,
4898
4902
  renderLegendTitle: config && config.renderLegendTitle
4899
4903
  }, legendValue => React__default.createElement(LegendValue, {
4900
- key: legendValue.title,
4904
+ key: legendValue.title + "-" + index,
4901
4905
  value: legendValue,
4902
4906
  parameter: legendItem.parameter,
4903
4907
  maxSize: getSymbolSize({
@@ -5024,55 +5028,86 @@ const Fullscreen = () => {
5024
5028
  }));
5025
5029
  };
5026
5030
 
5027
- 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;
5031
+ 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
5032
  const MapLegendControl = /*#__PURE__*/styled__default(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
5029
5033
  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"])));
5030
5034
  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"])));
5031
5035
  const MapLegendDescriptionContainer = /*#__PURE__*/styled__default.div(_templateObject4$4 || (_templateObject4$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 0.5rem;\n font-weight: 400;\n font-size: 0.625rem;\n color: rgba(255, 255, 255, 0.65);\n"])));
5032
- const MapLegendValueDescr = /*#__PURE__*/styled__default.div(_templateObject5$4 || (_templateObject5$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n min-height: 1rem;\n margin-bottom: 0.5rem;\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1rem;\n"])));
5033
- const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n height: 1rem;\n background: ", ";\n border: 1px rgba(48, 69, 79, 0.1) solid;\n margin-right: -1px;\n \n ", "\n"])), _ref => {
5036
+ const MinimizedLegendContainer = /*#__PURE__*/styled__default.div(_templateObject5$4 || (_templateObject5$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n :not(:first-child) {\n margin-top: 1rem;\n }\n"])));
5037
+ const MapLegendValueDescr = /*#__PURE__*/styled__default.div(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n min-height: 1rem;\n margin-bottom: 0.25rem;\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1rem;\n"])));
5038
+
5039
+ const SizeLegendItemMixin = function SizeLegendItemMixin(value) {
5040
+ if (value === void 0) {
5041
+ value = 0;
5042
+ }
5043
+
5044
+ 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 0 0 -1rem;\n background: none;\n border: none;\n\n :after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 50%;\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);
5045
+ };
5046
+
5047
+ const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
5048
+ if (value === void 0) {
5049
+ value = 0;
5050
+ }
5051
+
5052
+ 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));
5053
+ };
5054
+
5055
+ const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject9$1 || (_templateObject9$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 => {
5034
5056
  let {
5035
- value
5057
+ parameter
5036
5058
  } = _ref;
5037
- return typeof value === "number" ? "none" : value;
5059
+ return isParameterType(["strokeColor", "stroke.color"], parameter) ? 0.25 : 1;
5038
5060
  }, _ref2 => {
5039
5061
  let {
5040
5062
  value
5041
5063
  } = _ref2;
5042
- return !!value && typeof value === "number" && SizeLegendMixin(value);
5043
- });
5044
- const MapLegendOther = /*#__PURE__*/styled__default(MapLegendItem)(_templateObject7$2 || (_templateObject7$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: none;\n width: 1rem;\n margin-left: 0.25rem;\n border-radius: 0.125rem;\n"])));
5045
- const SizeOverlayLegendMixin = /*#__PURE__*/styled.css(_templateObject8$2 || (_templateObject8$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n width: 2rem;\n height: 2rem;\n margin: 0 auto;\n \n ", ", ", " {\n flex: none;\n position: absolute;\n top: 0;\n left: 50%;\n width: inherit;\n height: inherit;\n margin-left: -1rem;\n \n :after {\n top: 0;\n margin-top: 0;\n }\n }\n"])), MapLegendItem, MapLegendOther);
5046
- const SizeMinimizedLegend = /*#__PURE__*/styled__default.div(_templateObject9$1 || (_templateObject9$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n margin-top: 0.5rem;\n \n ", " {\n margin: 0 auto;\n }\n"])), MapLegendItem);
5047
- const SizeMinimizedLegendSymbol = /*#__PURE__*/styled__default.div(_templateObject10$1 || (_templateObject10$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5048
- const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject11$1 || (_templateObject11$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
5049
- const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n opacity: 0.28;\n"])));
5050
- const SizeMinimizedLegendUp = /*#__PURE__*/styled__default.div(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n opacity: 0.65;\n"])));
5051
- const MapLegendItems = /*#__PURE__*/styled__default.div(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n"])), _ref3 => {
5064
+ return typeof value === "number" ? "none" : value;
5065
+ }, _ref3 => {
5052
5066
  let {
5053
- overlay
5067
+ value,
5068
+ parameter
5054
5069
  } = _ref3;
5055
- return overlay && SizeOverlayLegendMixin;
5070
+ return isParameterType("size", parameter) && SizeLegendItemMixin(value);
5071
+ }, _ref4 => {
5072
+ let {
5073
+ value,
5074
+ parameter
5075
+ } = _ref4;
5076
+ return isParameterType(["strokeWidth", "stroke.width"], parameter) && StrokeWidthLegendItemMixin(value);
5056
5077
  });
5057
-
5058
- const SizeLegendMixin = function SizeLegendMixin(value) {
5059
- if (value === void 0) {
5060
- value = 0;
5061
- }
5062
-
5063
- return styled.css(_templateObject15$1 || (_templateObject15$1 = _taggedTemplateLiteralLoose(["\n position: relative;\n height: 2rem;\n background: none;\n border: none;\n margin-right: 0;\n \n :after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n border: 1px rgba(48, 69, 79, 0.28) solid;\n border-radius: 50%;\n margin: -", "px 0 0 -", "px;\n width: ", "px;\n height: ", "px;\n }\n"])), value / 2, value / 2, value, value);
5064
- };
5065
-
5066
- const MapLegendValues = /*#__PURE__*/styled__default.div(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
5067
- const MapLegendValuesRange = /*#__PURE__*/styled__default.div(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
5068
- const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject18 || (_templateObject18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 0;\n text-align: center;\n overflow: visible;\n"])));
5069
- const MapLegendExpandButton = /*#__PURE__*/styled__default.div(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin: 0.1rem 0 0.5rem;\n font-size: 0.625rem;\n color: #1FB3AA;\n"])));
5078
+ const MapLegendOther = /*#__PURE__*/styled__default(MapLegendItem)(_templateObject10$1 || (_templateObject10$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(_templateObject11$1 || (_templateObject11$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(_templateObject12$1 || (_templateObject12$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n flex-direction: column;\n\n ", " {\n width: calc(100% - 2rem);\n margin-left: 0;\n }\n"])), MapLegendOther);
5081
+ const SizeMinimizedLegend = /*#__PURE__*/styled__default.div(_templateObject13$1 || (_templateObject13$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(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5083
+ const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
5084
+ const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n opacity: 0.28;\n"])));
5085
+ const SizeMinimizedLegendUp = /*#__PURE__*/styled__default.div(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n opacity: 0.65;\n"])));
5086
+ const MapLegendItems = /*#__PURE__*/styled__default.div(_templateObject18 || (_templateObject18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n ", ";\n"])), _ref5 => {
5087
+ let {
5088
+ isSize
5089
+ } = _ref5;
5090
+ return isSize && SizeLegendItemsMixin;
5091
+ }, _ref6 => {
5092
+ let {
5093
+ isStrokeWidth
5094
+ } = _ref6;
5095
+ return isStrokeWidth && StrokeWidthLegendItemsMixin;
5096
+ });
5097
+ const MapLegendValues = /*#__PURE__*/styled__default.div(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
5098
+ const MapLegendValuesRange = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
5099
+ const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 0;\n text-align: center;\n overflow: visible;\n"])));
5100
+ const MapLegendExpandButton = /*#__PURE__*/styled__default.div(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin: 0.1rem 0 0.5rem;\n font-size: 0.625rem;\n color: #1FB3AA;\n"])));
5070
5101
 
5071
5102
  const MapLegendDescription = _ref => {
5072
5103
  let {
5073
- isSize
5104
+ parameter
5074
5105
  } = _ref;
5075
- return React__default.createElement(MapLegendDescriptionContainer, null, isSize ? "Размер знака" : "Цвет символа");
5106
+ const isSize = isParameterType("size", parameter);
5107
+ const isStrokeWidth = isParameterType(["strokeWidth", "stroke.width"], parameter);
5108
+ const isStrokeColor = isParameterType(["strokeColor", "stroke.color"], parameter);
5109
+ console.info("MapLegendDescription", parameter, isSize, isStrokeWidth, isStrokeColor);
5110
+ return React__default.createElement(MapLegendDescriptionContainer, null, isStrokeWidth || isStrokeColor ? isStrokeWidth ? "Толщина обводки" : "Цвет обводки" : isSize ? "Размер знака" : "Цвет символа");
5076
5111
  };
5077
5112
 
5078
5113
  const getValueFromLegendTitle = (title, minOrMax) => {
@@ -5092,31 +5127,50 @@ const MinimizedLegend = _ref => {
5092
5127
  let {
5093
5128
  values,
5094
5129
  title,
5095
- isSize
5130
+ parameter
5096
5131
  } = _ref;
5097
5132
  const currentValues = [...values];
5098
5133
  const other = currentValues.pop();
5099
- return React__default.createElement(React__default.Fragment, null, !!title && React__default.createElement(MapLegendValueDescr, null, title), React__default.createElement(MapLegendDescription, {
5100
- isSize: isSize
5134
+ const isSize = isParameterType("size", parameter);
5135
+ const isStrokeWidth = isParameterType(["strokeWidth", "stroke.width"], parameter);
5136
+ const titleMax = getValueFromLegendTitle((_currentValues$ = currentValues[0]) == null ? void 0 : _currentValues$.title, "max");
5137
+ const titleMin = getValueFromLegendTitle((_currentValues = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues.title, "min");
5138
+ return React__default.createElement(MinimizedLegendContainer, null, !!title && React__default.createElement(MapLegendValueDescr, null, title), React__default.createElement(MapLegendDescription, {
5139
+ parameter: parameter
5101
5140
  }), isSize ? React__default.createElement(React__default.Fragment, null, React__default.createElement(SizeMinimizedLegend, null, React__default.createElement(SizeMinimizedLegendSymbol, null, React__default.createElement(MapLegendItems, {
5102
- overlay: true
5103
- }, currentValues.map(value => React__default.createElement(MapLegendItem, {
5104
- key: value.title,
5141
+ isSize: true
5142
+ }, currentValues.map((value, index) => React__default.createElement(MapLegendItem, {
5143
+ key: "" + value.title + index,
5105
5144
  title: value.title,
5106
- value: value.parameterValue
5107
- })))), React__default.createElement(SizeMinimizedLegendLabel, null, React__default.createElement(SizeMinimizedLegendDown, null, (_currentValues$ = currentValues[0]) == null ? void 0 : _currentValues$.title), React__default.createElement(SizeMinimizedLegendUp, null, (_currentValues = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues.title))), React__default.createElement(SizeMinimizedLegend, null, React__default.createElement(SizeMinimizedLegendSymbol, null, React__default.createElement(MapLegendOther, {
5145
+ value: value.parameterValue,
5146
+ parameter: parameter
5147
+ })))), 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, {
5148
+ isSize: true
5149
+ }, React__default.createElement(MapLegendOther, {
5108
5150
  title: "\u0414\u0440\u0443\u0433\u043E\u0435",
5109
- value: other == null ? void 0 : other.parameterValue
5110
- })), React__default.createElement(SizeMinimizedLegendLabel, null, React__default.createElement(SizeMinimizedLegendUp, null, "\u0414\u0440\u0443\u0433\u043E\u0435")))) : React__default.createElement(MapLegendItems, {
5111
- overlay: isSize
5112
- }, currentValues.map(value => React__default.createElement(MapLegendItem, {
5113
- key: value.title,
5151
+ value: other == null ? void 0 : other.parameterValue,
5152
+ parameter: parameter
5153
+ }))), React__default.createElement(SizeMinimizedLegendLabel, null, React__default.createElement(SizeMinimizedLegendUp, null, "\u0414\u0440\u0443\u0433\u043E\u0435")))) : isStrokeWidth ? React__default.createElement(MapLegendItems, {
5154
+ isStrokeWidth: true
5155
+ }, currentValues.map((value, index) => React__default.createElement(MapLegendItem, {
5156
+ key: "" + value.title + index,
5157
+ title: value.title,
5158
+ value: value.parameterValue,
5159
+ parameter: parameter
5160
+ }, (!index || index === currentValues.length - 1) && value.title)), React__default.createElement(MapLegendOther, {
5161
+ title: "\u0414\u0440\u0443\u0433\u043E\u0435",
5162
+ value: other == null ? void 0 : other.parameterValue,
5163
+ parameter: parameter
5164
+ }, "\u0414\u0440\u0443\u0433\u043E\u0435")) : React__default.createElement(MapLegendItems, null, currentValues.map((value, index) => React__default.createElement(MapLegendItem, {
5165
+ key: "" + value.title + index,
5114
5166
  title: value.title,
5115
- value: value.parameterValue
5167
+ value: value.parameterValue,
5168
+ parameter: parameter
5116
5169
  })), React__default.createElement(MapLegendOther, {
5117
5170
  title: "\u0414\u0440\u0443\u0433\u043E\u0435",
5118
- value: other == null ? void 0 : other.parameterValue
5119
- })), typeof (other == null ? void 0 : other.parameterValue) === "string" && React__default.createElement(MapLegendValues, null, React__default.createElement(MapLegendValuesRange, null, React__default.createElement("div", null, getValueFromLegendTitle((_currentValues$2 = currentValues[0]) == null ? void 0 : _currentValues$2.title, "max")), React__default.createElement("div", null, getValueFromLegendTitle((_currentValues2 = currentValues[currentValues.length - 1]) == null ? void 0 : _currentValues2.title, "min"))), React__default.createElement(MapLegendValuesOther, null, "-")));
5171
+ value: other == null ? void 0 : other.parameterValue,
5172
+ parameter: parameter
5173
+ })), 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, "-")));
5120
5174
  };
5121
5175
 
5122
5176
  const MapLegend = _ref => {
@@ -5153,7 +5207,7 @@ const MapLegend = _ref => {
5153
5207
  values: item.values,
5154
5208
  defaultValue: (_symbol$fill = symbol.fill) == null ? void 0 : _symbol$fill.color,
5155
5209
  title: item.title !== (layer == null ? void 0 : layer.alias) ? item.title : "",
5156
- isSize: isParameterType(item.parameter, "size")
5210
+ parameter: item.parameter
5157
5211
  }));
5158
5212
  })), React__default.createElement(MapLegendExpandButton, {
5159
5213
  onClick: toggleExpanded