@evergis/react 2.0.196 → 2.0.198

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.
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { LegendProps } from "../types";
3
+ declare type LegendHeaderButtonsProps = Pick<LegendProps, 'clearHiddenLegends' | 'goToClassification'> & {
4
+ layerName: string;
5
+ hasHiddenLegends?: boolean;
6
+ };
7
+ export declare const LegendHeaderButtons: FC<LegendHeaderButtonsProps>;
8
+ export {};
@@ -22,7 +22,10 @@ export declare const MaximizedLegendContainer: import("styled-components").Style
22
22
  export declare const MinimizedLegendContainer: import("styled-components").StyledComponent<"div", any, {
23
23
  isShown?: boolean | undefined;
24
24
  }, never>;
25
- export declare const MapLegendSectionContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
25
+ export declare const LegendHeaderButton: import("styled-components").StyledComponent<"span", any, {}, never>;
26
+ export declare const MapLegendSectionContainer: import("styled-components").StyledComponent<"div", any, {
27
+ hasHiddenLegends?: boolean | undefined;
28
+ }, never>;
26
29
  export declare const MapLegendSectionItems: import("styled-components").StyledComponent<"div", any, {
27
30
  minHeight?: number | undefined;
28
31
  maxHeight?: number | undefined;
@@ -5,7 +5,7 @@ import { H3Symbol } from '@evergis/sgis/es/symbols/H3Symbol';
5
5
  import { Coordinates } from '@evergis/sgis/es/baseTypes';
6
6
  import { ClassificationParameterExtended, LayerAttribute, LegendValueType, ParameterByAttribute, ParameterValueWithSymbol, StyleSymbolType, SvgPointSymbol } from '../../core';
7
7
  import { SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol } from '../../symbols';
8
- export declare type ClassifyParameter = 'fill.color' | 'fill.hatchColor' | 'fillColor' | 'stroke.width' | 'stroke.color' | 'strokeWidth' | 'strokeColor' | 'textBackground.fill.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor' | 'fontColor' | 'haloColor' | 'size' | 'symbol' | 'angle' | 'maskedColor' | 'endingSize' | 'beginningSize' | 'maxObjectCount' | 'gridSize' | 'selectionObjectsLimit' | 'singleObjectSymbol.figure.fillColor' | 'singleObjectSymbol.background.fillColor';
8
+ export declare type ClassifyParameter = 'fill.color' | 'fill.hatchColor' | 'fillColor' | 'stroke.width' | 'stroke.color' | 'strokeWidth' | 'strokeColor' | 'textBackground.fill.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor' | 'figure.strokeColor' | 'figure.strokeWidth' | 'fontColor' | 'haloColor' | 'size' | 'symbol' | 'angle' | 'maskedColor' | 'endingSize' | 'beginningSize' | 'maxObjectCount' | 'gridSize' | 'selectionObjectsLimit' | 'singleObjectSymbol.figure.fillColor' | 'singleObjectSymbol.background.fillColor';
9
9
  export interface ParameterInfo {
10
10
  min: number;
11
11
  max: number;
@@ -29,11 +29,13 @@ export declare type LegendProps = {
29
29
  formatValue?: (type: AttributeType, value: string | number | Date | FeaturedDcExtendedGeometry, stringFormat?: AttributeFormatDc) => string;
30
30
  hiddenLegends?: Record<string, string[]>;
31
31
  toggleHiddenLegend?: (layerName: string, hiddenCondition: string) => void;
32
+ clearHiddenLegends?: (layerName: string) => void;
33
+ goToClassification?: VoidFunction;
32
34
  };
33
- export declare type LegendChildrenProps = Pick<LegendProps, 'hiddenLegends' | 'toggleHiddenLegend' | 'formatValue'> & {
35
+ export declare type LegendChildrenProps = Pick<LegendProps, 'hiddenLegends' | 'toggleHiddenLegend' | 'formatValue' | 'clearHiddenLegends' | 'goToClassification'> & {
34
36
  layerInfo: FeatureLayerServiceInfoDc;
35
37
  };
36
- export declare type LegendSectionProps = Pick<LegendProps, 'hiddenLegends' | 'toggleHiddenLegend' | 'formatValue'> & {
38
+ export declare type LegendSectionProps = Pick<LegendProps, 'hiddenLegends' | 'toggleHiddenLegend' | 'formatValue' | 'clearHiddenLegends' | 'goToClassification'> & {
37
39
  layerName: string;
38
40
  symbol: StyleDc['symbol'];
39
41
  parameter: ClassificationParameterExtended;
@@ -82,6 +84,8 @@ export declare type SvgEditorField = Pick<SvgPointSymbol, 'size' | 'offset' | 'a
82
84
  'background.fillColor': string;
83
85
  'background.strokeColor': string;
84
86
  'background.strokeWidth': string;
87
+ 'figure.strokeColor': string;
88
+ 'figure.strokeWidth': string;
85
89
  'figure.fillColor': string;
86
90
  };
87
91
  export declare type MinimizedLegendProps = {
@@ -1,6 +1,6 @@
1
1
  import { ClassifyAble, ParameterValue, ParameterValueWithSymbol } from '../style';
2
2
  import { ClassificationAttribute } from '../attributes';
3
- export declare type NestedClassificationParameters = 'fill.color' | 'fill.hatchColor' | 'stroke.width' | 'stroke.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor';
3
+ export declare type NestedClassificationParameters = 'fill.color' | 'fill.hatchColor' | 'stroke.width' | 'stroke.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor' | 'figure.strokeColor' | 'figure.strokeWidth';
4
4
  export declare type SimpleClassificationParameters = 'fillColor' | 'strokeColor' | 'strokeWidth' | 'size' | 'symbol' | 'angle' | 'maskedColor';
5
5
  export declare type ClassificationParameter = NestedClassificationParameters | SimpleClassificationParameters;
6
6
  export declare type ClassificationParameterExtended = ClassificationParameter | 'width' | 'height';
@@ -3012,7 +3012,7 @@ const getLegendSymbolSize = symbol => {
3012
3012
  return Math.max(DEFAULT_LEGEND_SYMBOL_SIZE, size);
3013
3013
  };
3014
3014
  const serializeSvgPointSymbol = symbol => {
3015
- var _symbol$figure, _symbol$background2, _symbol$background3, _symbol$background4, _symbol$background5;
3015
+ var _symbol$figure, _symbol$background2, _symbol$background3, _symbol$background4, _symbol$background5, _symbol$figure2, _symbol$figure3;
3016
3016
 
3017
3017
  if (!symbol) return null;
3018
3018
  const figureFillColor = ((_symbol$figure = symbol.figure) == null ? void 0 : _symbol$figure.fillColor) || null;
@@ -3033,7 +3033,9 @@ const serializeSvgPointSymbol = symbol => {
3033
3033
  } : {}, figureFillColor ? {
3034
3034
  figure: {
3035
3035
  id: 'symbol-figure',
3036
- fillColor: figureFillColor
3036
+ fillColor: figureFillColor,
3037
+ strokeColor: ((_symbol$figure2 = symbol.figure) == null ? void 0 : _symbol$figure2.strokeColor) || null,
3038
+ strokeWidth: ((_symbol$figure3 = symbol.figure) == null ? void 0 : _symbol$figure3.strokeWidth) || null
3037
3039
  }
3038
3040
  } : {});
3039
3041
  };
@@ -3145,7 +3147,7 @@ const DEFAULT_CLUSTER_SVG = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox
3145
3147
  const SYMBOL_CLASSIFICATION = {
3146
3148
  [api.GeometryType.Polygon]: ['fill.color', 'stroke.color', 'stroke.width'],
3147
3149
  [api.GeometryType.Polyline]: ['stroke.color', 'stroke.width'],
3148
- [api.GeometryType.Point]: ['angle', 'size', 'fill.color', 'fillColor', 'background.fillColor', 'background.strokeColor', 'background.strokeWidth', 'figure.fillColor', 'singleObjectSymbol.figure.fillColor', 'singleObjectSymbol.background.fillColor']
3150
+ [api.GeometryType.Point]: ['angle', 'size', 'fill.color', 'fillColor', 'background.fillColor', 'background.strokeColor', 'background.strokeWidth', 'figure.fillColor', 'figure.strokeColor', 'figure.strokeWidth', 'singleObjectSymbol.figure.fillColor', 'singleObjectSymbol.background.fillColor']
3149
3151
  };
3150
3152
  const SYMBOL_LIMITS = {
3151
3153
  SIZE_MIN: 1,
@@ -3314,11 +3316,16 @@ const manipulateSvgSymbol = _ref2 => {
3314
3316
  SVGContainer.svg(innerSvg);
3315
3317
  }
3316
3318
  } else {
3319
+ const strokeColor = getParameterValue(figure == null ? void 0 : figure.strokeColor);
3320
+ const strokeWidth = getParameterValue(figure == null ? void 0 : figure.strokeWidth) || (typeof (figure == null ? void 0 : figure.strokeColor) === 'object' ? 1 : 0);
3317
3321
  const fillColor = getParameterValue(figure == null ? void 0 : figure.fillColor);
3318
3322
  SVGContainer.size(currentSize + "px", currentSize + "px").viewbox(viewBox.join(' '));
3319
3323
  SVGContainer.svg(innerSvg);
3320
3324
  SVGContainer.find('#symbol-figure').each(item => {
3321
- item.center(DEFAULT_SYMBOL_SIZE / 2, DEFAULT_SYMBOL_SIZE / 2).fill(fillColor || DEFAULT_SYMBOL_FILL_COLOR);
3325
+ item.center(DEFAULT_SYMBOL_SIZE / 2, DEFAULT_SYMBOL_SIZE / 2).fill(fillColor || DEFAULT_SYMBOL_FILL_COLOR).stroke({
3326
+ color: strokeColor,
3327
+ width: strokeWidth
3328
+ });
3322
3329
  });
3323
3330
  }
3324
3331
  }
@@ -5843,7 +5850,7 @@ const Fullscreen = () => {
5843
5850
  }));
5844
5851
  };
5845
5852
 
5846
- var _templateObject$4, _templateObject2$4, _templateObject3$3, _templateObject4$3, _templateObject5$3, _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, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
5853
+ var _templateObject$4, _templateObject2$4, _templateObject3$3, _templateObject4$3, _templateObject5$3, _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, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38;
5847
5854
  const MapLegendDescription = /*#__PURE__*/styled__default.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
5848
5855
  const ItemText = /*#__PURE__*/styled__default.div(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: calc(100% - 2rem);\n font: ", ";\n"])), _ref => {
5849
5856
  let {
@@ -5855,7 +5862,7 @@ const ItemText = /*#__PURE__*/styled__default.div(_templateObject2$4 || (_templa
5855
5862
  });
5856
5863
  const ItemSeparator = /*#__PURE__*/styled__default.div(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n :after {\n content: '-';\n margin: 0 0.5rem;\n font-size: 0.75rem;\n }\n"])));
5857
5864
  const SymbolContainer = /*#__PURE__*/styled__default('span')(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n min-width: 16px;\n margin-right: 0.5rem;\n"])));
5858
- const ClassifiedItem = /*#__PURE__*/styled__default.div(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n cursor: ", ";\n pointer-events: ", ";\n\n :not(:last-of-type) {\n margin-bottom: 0.25rem;\n }\n\n ", ", ", " {\n transition: opacity 150ms;\n }\n\n ", " {\n opacity: ", ";\n }\n\n ", " {\n opacity: ", ";\n }\n\n :hover {\n ", ", ", " {\n opacity: 1;\n }\n }\n"])), _ref2 => {
5865
+ const ClassifiedItem = /*#__PURE__*/styled__default.div(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n cursor: ", ";\n pointer-events: ", ";\n\n :not(:last-of-type) {\n margin-bottom: 0.25rem;\n }\n\n ", ", ", " {\n transition: opacity 150ms;\n }\n\n ", " {\n opacity: ", ";\n }\n\n ", " {\n opacity: ", ";\n }\n\n :hover {\n ", ", ", " {\n opacity: 1;\n }\n }\n\n ", " {\n margin-left: 0.5rem;\n }\n"])), _ref2 => {
5859
5866
  let {
5860
5867
  isClusterFillColor
5861
5868
  } = _ref2;
@@ -5875,7 +5882,7 @@ const ClassifiedItem = /*#__PURE__*/styled__default.div(_templateObject5$3 || (_
5875
5882
  isHidden
5876
5883
  } = _ref5;
5877
5884
  return isHidden ? 0.28 : 1;
5878
- }, ItemText, SymbolContainer);
5885
+ }, ItemText, SymbolContainer, icons.IconButton);
5879
5886
  const SymbolButtonWithClick = /*#__PURE__*/styled.css(_templateObject6$2 || (_templateObject6$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 3.875rem;\n height: 3.875rem;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), _ref6 => {
5880
5887
  let {
5881
5888
  theme: {
@@ -5911,28 +5918,36 @@ const MaximizedLegendContainer = /*#__PURE__*/styled__default.div(_templateObjec
5911
5918
  return isShown ? 'visible' : 'hidden';
5912
5919
  });
5913
5920
  const MinimizedLegendContainer = /*#__PURE__*/styled__default(MaximizedLegendContainer)(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: calc(100% - 1.5rem);\n padding-right: 1.5rem;\n"])));
5914
- const MapLegendSectionContainer = /*#__PURE__*/styled__default.div(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n\n :not(:last-child) {\n margin-bottom: 1rem;\n }\n"])));
5915
- const MapLegendSectionItems = /*#__PURE__*/styled__default.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n height: ", "px;\n overflow: ", ";\n transition: height 0.5s;\n"])), _ref11 => {
5921
+ const LegendHeaderButton = /*#__PURE__*/styled__default.span(_templateObject14$1 || (_templateObject14$1 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
5922
+ const MapLegendSectionContainer = /*#__PURE__*/styled__default.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n\n :not(:last-child) {\n margin-bottom: 1rem;\n }\n\n ", " {\n padding-left: 0.75rem;\n visibility: hidden;\n\n :first-child {\n padding-left: 1rem;\n }\n\n :last-child {\n margin-left: 0.75rem;\n border-left: 1px ", " solid;\n }\n }\n \n :hover {\n ", " {\n visibility: visible;\n }\n }\n"])), LegendHeaderButton, _ref11 => {
5923
+ let {
5924
+ theme: {
5925
+ palette
5926
+ }
5927
+ } = _ref11;
5928
+ return palette.elementDeep;
5929
+ }, LegendHeaderButton);
5930
+ const MapLegendSectionItems = /*#__PURE__*/styled__default.div(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n height: ", "px;\n overflow: ", ";\n transition: height 0.5s;\n"])), _ref12 => {
5916
5931
  let {
5917
5932
  minHeight,
5918
5933
  maxHeight,
5919
5934
  isExpanded
5920
- } = _ref11;
5935
+ } = _ref12;
5921
5936
  return isExpanded ? (maxHeight || 0) + 4 : minHeight;
5922
- }, _ref12 => {
5937
+ }, _ref13 => {
5923
5938
  let {
5924
5939
  isExpanded
5925
- } = _ref12;
5940
+ } = _ref13;
5926
5941
  return isExpanded ? 'none' : 'hidden';
5927
5942
  });
5928
- const MapLegendValueDescr = /*#__PURE__*/styled__default.div(_templateObject16$1 || (_templateObject16$1 = /*#__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"])));
5943
+ const MapLegendValueDescr = /*#__PURE__*/styled__default.div(_templateObject17 || (_templateObject17 = /*#__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"])));
5929
5944
 
5930
5945
  const SizeLegendItemMixin = function SizeLegendItemMixin(value) {
5931
5946
  if (value === void 0) {
5932
5947
  value = 0;
5933
5948
  }
5934
5949
 
5935
- return styled.css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 0;\n left: 50%;\n display: flex;\n align-items: flex-end;\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);
5950
+ return styled.css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 0;\n left: 50%;\n display: flex;\n align-items: flex-end;\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);
5936
5951
  };
5937
5952
 
5938
5953
  const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
@@ -5940,80 +5955,80 @@ const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
5940
5955
  value = 0;
5941
5956
  }
5942
5957
 
5943
- return styled.css(_templateObject18 || (_templateObject18 = _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,\n :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));
5958
+ return styled.css(_templateObject19 || (_templateObject19 = _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,\n :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));
5944
5959
  };
5945
5960
 
5946
- const StrokeColorLegendItemMixin = /*#__PURE__*/styled.css(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
5947
- const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__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 color: rgba(48, 69, 79, 0.65);\n opacity: ", ";\n\n ", "\n\n ", "\n"])), _ref13 => {
5961
+ const StrokeColorLegendItemMixin = /*#__PURE__*/styled.css(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
5962
+ const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject21 || (_templateObject21 = /*#__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 color: rgba(48, 69, 79, 0.65);\n opacity: ", ";\n\n ", "\n\n ", "\n"])), _ref14 => {
5948
5963
  let {
5949
5964
  parameter
5950
- } = _ref13;
5965
+ } = _ref14;
5951
5966
  return isParameterType(['strokeColor', 'stroke.color'], parameter) ? 0.25 : 1;
5952
- }, _ref14 => {
5967
+ }, _ref15 => {
5953
5968
  let {
5954
5969
  value
5955
- } = _ref14;
5970
+ } = _ref15;
5956
5971
  return typeof value === 'number' ? 'none' : value;
5957
- }, _ref15 => {
5972
+ }, _ref16 => {
5958
5973
  let {
5959
5974
  isHidden
5960
- } = _ref15;
5975
+ } = _ref16;
5961
5976
  return isHidden ? 0.28 : 1;
5962
- }, _ref16 => {
5977
+ }, _ref17 => {
5963
5978
  let {
5964
5979
  value,
5965
5980
  parameter
5966
- } = _ref16;
5981
+ } = _ref17;
5967
5982
  return isParameterType('size', parameter) && SizeLegendItemMixin(value);
5968
- }, _ref17 => {
5983
+ }, _ref18 => {
5969
5984
  let {
5970
5985
  value,
5971
5986
  parameter
5972
- } = _ref17;
5987
+ } = _ref18;
5973
5988
  return isParameterType(['strokeWidth', 'stroke.width'], parameter) && StrokeWidthLegendItemMixin(value);
5974
5989
  });
5975
- const MapLegendOther = /*#__PURE__*/styled__default(MapLegendItem)(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex: none;\n position: relative;\n width: 1rem;\n margin-left: 0.25rem;\n border-radius: 0.125rem;\n"])));
5976
- const SizeLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject22 || (_templateObject22 = /*#__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);
5977
- const StrokeWidthLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject23 || (_templateObject23 = /*#__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);
5978
- const SizeMinimizedLegend = /*#__PURE__*/styled__default.div(_templateObject24 || (_templateObject24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n margin: 0.5rem 0 0.25rem;\n"])));
5979
- const SizeMinimizedLegendSymbol = /*#__PURE__*/styled__default.div(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5980
- const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 9.75rem;\n font-size: 0.75rem;\n"])));
5981
- const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(_templateObject27 || (_templateObject27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: rgba(48, 69, 79, 0.65);\n"])));
5982
- const SizeMinimizedLegendUp = /*#__PURE__*/styled__default(SizeMinimizedLegendDown)(_templateObject28 || (_templateObject28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
5983
- const SingleSizeLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject29 || (_templateObject29 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n\n ", ":after {\n margin: 0 auto;\n }\n"])), MapLegendItem);
5984
- const SingleLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject30 || (_templateObject30 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n width: 2rem;\n height: auto;\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"])), _ref18 => {
5990
+ const MapLegendOther = /*#__PURE__*/styled__default(MapLegendItem)(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex: none;\n position: relative;\n width: 1rem;\n margin-left: 0.25rem;\n border-radius: 0.125rem;\n"])));
5991
+ const SizeLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject23 || (_templateObject23 = /*#__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);
5992
+ const StrokeWidthLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject24 || (_templateObject24 = /*#__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);
5993
+ const SizeMinimizedLegend = /*#__PURE__*/styled__default.div(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n margin: 0.5rem 0 0.25rem;\n"])));
5994
+ const SizeMinimizedLegendSymbol = /*#__PURE__*/styled__default.div(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5995
+ const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject27 || (_templateObject27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 9.75rem;\n font-size: 0.75rem;\n"])));
5996
+ const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(_templateObject28 || (_templateObject28 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: rgba(48, 69, 79, 0.65);\n"])));
5997
+ const SizeMinimizedLegendUp = /*#__PURE__*/styled__default(SizeMinimizedLegendDown)(_templateObject29 || (_templateObject29 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
5998
+ const SingleSizeLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject30 || (_templateObject30 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n\n ", ":after {\n margin: 0 auto;\n }\n"])), MapLegendItem);
5999
+ const SingleLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject31 || (_templateObject31 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n width: 2rem;\n height: auto;\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"])), _ref19 => {
5985
6000
  let {
5986
6001
  isSize
5987
- } = _ref18;
6002
+ } = _ref19;
5988
6003
  return isSize && SingleSizeLegendItemsMixin;
5989
- }, MapLegendItem, _ref19 => {
6004
+ }, MapLegendItem, _ref20 => {
5990
6005
  let {
5991
6006
  parameter
5992
- } = _ref19;
6007
+ } = _ref20;
5993
6008
  return isParameterType(['strokeColor', 'stroke.color'], parameter) && StrokeColorLegendItemMixin;
5994
6009
  });
5995
- const MapLegendItems = /*#__PURE__*/styled__default.div(_templateObject31 || (_templateObject31 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n ", ";\n ", ";\n"])), _ref20 => {
6010
+ const MapLegendItems = /*#__PURE__*/styled__default.div(_templateObject32 || (_templateObject32 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 0.125rem;\n\n ", ";\n ", ";\n ", ";\n"])), _ref21 => {
5996
6011
  let {
5997
6012
  isSize
5998
- } = _ref20;
6013
+ } = _ref21;
5999
6014
  return isSize && SizeLegendItemsMixin;
6000
- }, _ref21 => {
6015
+ }, _ref22 => {
6001
6016
  let {
6002
6017
  isStrokeWidth
6003
- } = _ref21;
6018
+ } = _ref22;
6004
6019
  return isStrokeWidth && StrokeWidthLegendItemsMixin;
6005
- }, _ref22 => {
6020
+ }, _ref23 => {
6006
6021
  let {
6007
6022
  isSingle
6008
- } = _ref22;
6023
+ } = _ref23;
6009
6024
  return isSingle && SingleLegendItemsMixin;
6010
6025
  });
6011
- const MapLegendItemsContainer = /*#__PURE__*/styled__default.div(_templateObject32 || (_templateObject32 = /*#__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);
6012
- const MapLegendValues = /*#__PURE__*/styled__default.div(_templateObject33 || (_templateObject33 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n margin-top: 0.5rem;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
6013
- const MapLegendValuesRange = /*#__PURE__*/styled__default.div(_templateObject34 || (_templateObject34 = /*#__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 text-align: right;\n }\n }\n"])));
6014
- const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject35 || (_templateObject35 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n border: 0;\n overflow: visible;\n"])));
6015
- const MapLegendExpandButton = /*#__PURE__*/styled__default.div(_templateObject36 || (_templateObject36 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin-top: 0.1rem;\n font-size: 0.625rem;\n color: #1fb3aa;\n"])));
6016
- const ClusterLegendContainer = /*#__PURE__*/styled__default.div(_templateObject37 || (_templateObject37 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: -0.9rem;\n transform: scale(0.5);\n"])));
6026
+ const MapLegendItemsContainer = /*#__PURE__*/styled__default.div(_templateObject33 || (_templateObject33 = /*#__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);
6027
+ const MapLegendValues = /*#__PURE__*/styled__default.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n margin-top: 0.5rem;\n font-size: 0.75rem;\n color: rgba(48, 69, 79, 0.65);\n"])));
6028
+ const MapLegendValuesRange = /*#__PURE__*/styled__default.div(_templateObject35 || (_templateObject35 = /*#__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 text-align: right;\n }\n }\n"])));
6029
+ const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject36 || (_templateObject36 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n border: 0;\n overflow: visible;\n"])));
6030
+ const MapLegendExpandButton = /*#__PURE__*/styled__default.div(_templateObject37 || (_templateObject37 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n margin-top: 0.1rem;\n font-size: 0.625rem;\n color: #1fb3aa;\n"])));
6031
+ const ClusterLegendContainer = /*#__PURE__*/styled__default.div(_templateObject38 || (_templateObject38 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: -0.9rem;\n transform: scale(0.5);\n"])));
6017
6032
 
6018
6033
  const useSvgSymbol = (symbol, skipOffset, isClassifiedValue) => {
6019
6034
  const SVGWrapperRefElement = React.useRef(null);
@@ -6260,6 +6275,21 @@ const LegendSymbolRenderer = /*#__PURE__*/React.memo(_ref => {
6260
6275
  });
6261
6276
  });
6262
6277
 
6278
+ const LegendHeaderButtons = _ref => {
6279
+ let {
6280
+ layerName,
6281
+ hasHiddenLegends,
6282
+ clearHiddenLegends,
6283
+ goToClassification
6284
+ } = _ref;
6285
+ return React__default.createElement(React__default.Fragment, null, !!goToClassification && React__default.createElement(LegendHeaderButton, null, React__default.createElement(icons.IconButton, {
6286
+ onClick: goToClassification
6287
+ }, React__default.createElement(icons.EverCloudClassificationIcon, null))), !!clearHiddenLegends && React__default.createElement(LegendHeaderButton, null, React__default.createElement(icons.IconButton, {
6288
+ disabled: !hasHiddenLegends,
6289
+ onClick: () => clearHiddenLegends == null ? void 0 : clearHiddenLegends(layerName)
6290
+ }, React__default.createElement(icons.EverCloudRefreshIcon, null))));
6291
+ };
6292
+
6263
6293
  const getConditionAttribute = (attributes, condition) => {
6264
6294
  if (!condition) return null;
6265
6295
  const attributeName = getAttributeNameFromCondition(condition);
@@ -6332,6 +6362,7 @@ const LegendChildren = _ref => {
6332
6362
  layerInfo,
6333
6363
  hiddenLegends,
6334
6364
  toggleHiddenLegend,
6365
+ clearHiddenLegends,
6335
6366
  formatValue
6336
6367
  } = _ref;
6337
6368
  if (!((_layerInfo$style = layerInfo.style) != null && (_layerInfo$style$chil = _layerInfo$style.children) != null && _layerInfo$style$chil.length)) return null;
@@ -6357,7 +6388,10 @@ const LegendChildren = _ref => {
6357
6388
  onClick: () => toggleHiddenLegend == null ? void 0 : toggleHiddenLegend(layerInfo.name, hiddenCondition)
6358
6389
  }, React__default.createElement(SymbolContainer, null, React__default.createElement(LegendSymbolRenderer, {
6359
6390
  symbol: paramValue.symbol
6360
- })), legendText);
6391
+ })), legendText, React__default.createElement(LegendHeaderButtons, {
6392
+ layerName: layerInfo.name,
6393
+ clearHiddenLegends: clearHiddenLegends
6394
+ }));
6361
6395
  }));
6362
6396
  };
6363
6397
 
@@ -6513,6 +6547,8 @@ const MaximizedLegend = _ref => {
6513
6547
  };
6514
6548
 
6515
6549
  const LegendSection = _ref => {
6550
+ var _hiddenLegends$layerN, _hiddenLegends$layerN2;
6551
+
6516
6552
  let {
6517
6553
  layerName,
6518
6554
  symbol,
@@ -6521,6 +6557,8 @@ const LegendSection = _ref => {
6521
6557
  classified,
6522
6558
  hiddenLegends,
6523
6559
  toggleHiddenLegend,
6560
+ clearHiddenLegends,
6561
+ goToClassification,
6524
6562
  attribute,
6525
6563
  formatValue,
6526
6564
  index
@@ -6528,8 +6566,15 @@ const LegendSection = _ref => {
6528
6566
  const [isExpanded, toggleExpanded] = useToggle();
6529
6567
  const [maxRef, maxNode] = useNode();
6530
6568
  const [minRef, minNode] = useNode();
6531
- if (!attribute) return null;
6532
- return React__default.createElement(MapLegendSectionContainer, null, React__default.createElement(MapLegendHeader, null, attribute.alias || attribute.name), React__default.createElement(LegendParameterDescription, {
6569
+ if (!layerName || !attribute) return null;
6570
+ return React__default.createElement(MapLegendSectionContainer, {
6571
+ hasHiddenLegends: !!(hiddenLegends != null && (_hiddenLegends$layerN = hiddenLegends[layerName]) != null && _hiddenLegends$layerN.length)
6572
+ }, React__default.createElement(MapLegendHeader, null, attribute.alias || attribute.name, React__default.createElement(LegendHeaderButtons, {
6573
+ layerName: layerName,
6574
+ hasHiddenLegends: !!(hiddenLegends != null && (_hiddenLegends$layerN2 = hiddenLegends[layerName]) != null && _hiddenLegends$layerN2.length),
6575
+ clearHiddenLegends: clearHiddenLegends,
6576
+ goToClassification: goToClassification
6577
+ })), React__default.createElement(LegendParameterDescription, {
6533
6578
  parameter: parameter
6534
6579
  }), React__default.createElement(MapLegendSectionItems, {
6535
6580
  minHeight: minNode == null ? void 0 : minNode.offsetHeight,
@@ -6557,7 +6602,7 @@ const LegendSection = _ref => {
6557
6602
  }, isExpanded ? 'Свернуть' : 'Развернуть'));
6558
6603
  };
6559
6604
 
6560
- const _excluded$3 = ["layerInfo", "formatValue", "hiddenLegends", "toggleHiddenLegend"];
6605
+ const _excluded$3 = ["layerInfo", "formatValue", "hiddenLegends", "toggleHiddenLegend", "clearHiddenLegends", "goToClassification"];
6561
6606
  const Legend = /*#__PURE__*/React.memo(_ref => {
6562
6607
  var _layerInfo$style, _layerInfo$style$chil;
6563
6608
 
@@ -6565,7 +6610,9 @@ const Legend = /*#__PURE__*/React.memo(_ref => {
6565
6610
  layerInfo,
6566
6611
  formatValue,
6567
6612
  hiddenLegends,
6568
- toggleHiddenLegend
6613
+ toggleHiddenLegend,
6614
+ clearHiddenLegends,
6615
+ goToClassification
6569
6616
  } = _ref,
6570
6617
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
6571
6618
 
@@ -6574,7 +6621,9 @@ const Legend = /*#__PURE__*/React.memo(_ref => {
6574
6621
  layerInfo: layerInfo,
6575
6622
  formatValue: formatValue,
6576
6623
  hiddenLegends: hiddenLegends,
6577
- toggleHiddenLegend: toggleHiddenLegend
6624
+ toggleHiddenLegend: toggleHiddenLegend,
6625
+ clearHiddenLegends: clearHiddenLegends,
6626
+ goToClassification: goToClassification
6578
6627
  });
6579
6628
  }
6580
6629
 
@@ -6596,7 +6645,9 @@ const Legend = /*#__PURE__*/React.memo(_ref => {
6596
6645
  index: index,
6597
6646
  formatValue: formatValue,
6598
6647
  hiddenLegends: hiddenLegends,
6599
- toggleHiddenLegend: toggleHiddenLegend
6648
+ toggleHiddenLegend: toggleHiddenLegend,
6649
+ clearHiddenLegends: clearHiddenLegends,
6650
+ goToClassification: goToClassification
6600
6651
  }, rest));
6601
6652
  }));
6602
6653
  });
@@ -7071,6 +7122,7 @@ exports.ItemText = ItemText;
7071
7122
  exports.LabelSymbol = LabelSymbol;
7072
7123
  exports.Legend = Legend;
7073
7124
  exports.LegendChildren = LegendChildren;
7125
+ exports.LegendHeaderButton = LegendHeaderButton;
7074
7126
  exports.LegendParameterDescription = LegendParameterDescription;
7075
7127
  exports.LegendProvider = LegendProvider;
7076
7128
  exports.LegendSection = LegendSection;