@evergis/react 2.0.197 → 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;
@@ -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;
@@ -5850,7 +5850,7 @@ const Fullscreen = () => {
5850
5850
  }));
5851
5851
  };
5852
5852
 
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;
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;
5854
5854
  const MapLegendDescription = /*#__PURE__*/styled__default.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
5855
5855
  const ItemText = /*#__PURE__*/styled__default.div(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: calc(100% - 2rem);\n font: ", ";\n"])), _ref => {
5856
5856
  let {
@@ -5862,7 +5862,7 @@ const ItemText = /*#__PURE__*/styled__default.div(_templateObject2$4 || (_templa
5862
5862
  });
5863
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"])));
5864
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"])));
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"])), _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 => {
5866
5866
  let {
5867
5867
  isClusterFillColor
5868
5868
  } = _ref2;
@@ -5882,7 +5882,7 @@ const ClassifiedItem = /*#__PURE__*/styled__default.div(_templateObject5$3 || (_
5882
5882
  isHidden
5883
5883
  } = _ref5;
5884
5884
  return isHidden ? 0.28 : 1;
5885
- }, ItemText, SymbolContainer);
5885
+ }, ItemText, SymbolContainer, icons.IconButton);
5886
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 => {
5887
5887
  let {
5888
5888
  theme: {
@@ -5918,28 +5918,36 @@ const MaximizedLegendContainer = /*#__PURE__*/styled__default.div(_templateObjec
5918
5918
  return isShown ? 'visible' : 'hidden';
5919
5919
  });
5920
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"])));
5921
- 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"])));
5922
- 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 => {
5923
5931
  let {
5924
5932
  minHeight,
5925
5933
  maxHeight,
5926
5934
  isExpanded
5927
- } = _ref11;
5935
+ } = _ref12;
5928
5936
  return isExpanded ? (maxHeight || 0) + 4 : minHeight;
5929
- }, _ref12 => {
5937
+ }, _ref13 => {
5930
5938
  let {
5931
5939
  isExpanded
5932
- } = _ref12;
5940
+ } = _ref13;
5933
5941
  return isExpanded ? 'none' : 'hidden';
5934
5942
  });
5935
- 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"])));
5936
5944
 
5937
5945
  const SizeLegendItemMixin = function SizeLegendItemMixin(value) {
5938
5946
  if (value === void 0) {
5939
5947
  value = 0;
5940
5948
  }
5941
5949
 
5942
- 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);
5943
5951
  };
5944
5952
 
5945
5953
  const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
@@ -5947,80 +5955,80 @@ const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
5947
5955
  value = 0;
5948
5956
  }
5949
5957
 
5950
- 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));
5951
5959
  };
5952
5960
 
5953
- const StrokeColorLegendItemMixin = /*#__PURE__*/styled.css(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
5954
- 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 => {
5955
5963
  let {
5956
5964
  parameter
5957
- } = _ref13;
5965
+ } = _ref14;
5958
5966
  return isParameterType(['strokeColor', 'stroke.color'], parameter) ? 0.25 : 1;
5959
- }, _ref14 => {
5967
+ }, _ref15 => {
5960
5968
  let {
5961
5969
  value
5962
- } = _ref14;
5970
+ } = _ref15;
5963
5971
  return typeof value === 'number' ? 'none' : value;
5964
- }, _ref15 => {
5972
+ }, _ref16 => {
5965
5973
  let {
5966
5974
  isHidden
5967
- } = _ref15;
5975
+ } = _ref16;
5968
5976
  return isHidden ? 0.28 : 1;
5969
- }, _ref16 => {
5977
+ }, _ref17 => {
5970
5978
  let {
5971
5979
  value,
5972
5980
  parameter
5973
- } = _ref16;
5981
+ } = _ref17;
5974
5982
  return isParameterType('size', parameter) && SizeLegendItemMixin(value);
5975
- }, _ref17 => {
5983
+ }, _ref18 => {
5976
5984
  let {
5977
5985
  value,
5978
5986
  parameter
5979
- } = _ref17;
5987
+ } = _ref18;
5980
5988
  return isParameterType(['strokeWidth', 'stroke.width'], parameter) && StrokeWidthLegendItemMixin(value);
5981
5989
  });
5982
- 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"])));
5983
- 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);
5984
- 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);
5985
- 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"])));
5986
- const SizeMinimizedLegendSymbol = /*#__PURE__*/styled__default.div(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5987
- const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 9.75rem;\n font-size: 0.75rem;\n"])));
5988
- const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(_templateObject27 || (_templateObject27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: rgba(48, 69, 79, 0.65);\n"])));
5989
- const SizeMinimizedLegendUp = /*#__PURE__*/styled__default(SizeMinimizedLegendDown)(_templateObject28 || (_templateObject28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
5990
- 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);
5991
- 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 => {
5992
6000
  let {
5993
6001
  isSize
5994
- } = _ref18;
6002
+ } = _ref19;
5995
6003
  return isSize && SingleSizeLegendItemsMixin;
5996
- }, MapLegendItem, _ref19 => {
6004
+ }, MapLegendItem, _ref20 => {
5997
6005
  let {
5998
6006
  parameter
5999
- } = _ref19;
6007
+ } = _ref20;
6000
6008
  return isParameterType(['strokeColor', 'stroke.color'], parameter) && StrokeColorLegendItemMixin;
6001
6009
  });
6002
- 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 => {
6003
6011
  let {
6004
6012
  isSize
6005
- } = _ref20;
6013
+ } = _ref21;
6006
6014
  return isSize && SizeLegendItemsMixin;
6007
- }, _ref21 => {
6015
+ }, _ref22 => {
6008
6016
  let {
6009
6017
  isStrokeWidth
6010
- } = _ref21;
6018
+ } = _ref22;
6011
6019
  return isStrokeWidth && StrokeWidthLegendItemsMixin;
6012
- }, _ref22 => {
6020
+ }, _ref23 => {
6013
6021
  let {
6014
6022
  isSingle
6015
- } = _ref22;
6023
+ } = _ref23;
6016
6024
  return isSingle && SingleLegendItemsMixin;
6017
6025
  });
6018
- 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);
6019
- 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"])));
6020
- 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"])));
6021
- const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject35 || (_templateObject35 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n border: 0;\n overflow: visible;\n"])));
6022
- 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"])));
6023
- 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"])));
6024
6032
 
6025
6033
  const useSvgSymbol = (symbol, skipOffset, isClassifiedValue) => {
6026
6034
  const SVGWrapperRefElement = React.useRef(null);
@@ -6267,6 +6275,21 @@ const LegendSymbolRenderer = /*#__PURE__*/React.memo(_ref => {
6267
6275
  });
6268
6276
  });
6269
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
+
6270
6293
  const getConditionAttribute = (attributes, condition) => {
6271
6294
  if (!condition) return null;
6272
6295
  const attributeName = getAttributeNameFromCondition(condition);
@@ -6339,6 +6362,7 @@ const LegendChildren = _ref => {
6339
6362
  layerInfo,
6340
6363
  hiddenLegends,
6341
6364
  toggleHiddenLegend,
6365
+ clearHiddenLegends,
6342
6366
  formatValue
6343
6367
  } = _ref;
6344
6368
  if (!((_layerInfo$style = layerInfo.style) != null && (_layerInfo$style$chil = _layerInfo$style.children) != null && _layerInfo$style$chil.length)) return null;
@@ -6364,7 +6388,10 @@ const LegendChildren = _ref => {
6364
6388
  onClick: () => toggleHiddenLegend == null ? void 0 : toggleHiddenLegend(layerInfo.name, hiddenCondition)
6365
6389
  }, React__default.createElement(SymbolContainer, null, React__default.createElement(LegendSymbolRenderer, {
6366
6390
  symbol: paramValue.symbol
6367
- })), legendText);
6391
+ })), legendText, React__default.createElement(LegendHeaderButtons, {
6392
+ layerName: layerInfo.name,
6393
+ clearHiddenLegends: clearHiddenLegends
6394
+ }));
6368
6395
  }));
6369
6396
  };
6370
6397
 
@@ -6520,6 +6547,8 @@ const MaximizedLegend = _ref => {
6520
6547
  };
6521
6548
 
6522
6549
  const LegendSection = _ref => {
6550
+ var _hiddenLegends$layerN, _hiddenLegends$layerN2;
6551
+
6523
6552
  let {
6524
6553
  layerName,
6525
6554
  symbol,
@@ -6528,6 +6557,8 @@ const LegendSection = _ref => {
6528
6557
  classified,
6529
6558
  hiddenLegends,
6530
6559
  toggleHiddenLegend,
6560
+ clearHiddenLegends,
6561
+ goToClassification,
6531
6562
  attribute,
6532
6563
  formatValue,
6533
6564
  index
@@ -6535,8 +6566,15 @@ const LegendSection = _ref => {
6535
6566
  const [isExpanded, toggleExpanded] = useToggle();
6536
6567
  const [maxRef, maxNode] = useNode();
6537
6568
  const [minRef, minNode] = useNode();
6538
- if (!attribute) return null;
6539
- 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, {
6540
6578
  parameter: parameter
6541
6579
  }), React__default.createElement(MapLegendSectionItems, {
6542
6580
  minHeight: minNode == null ? void 0 : minNode.offsetHeight,
@@ -6564,7 +6602,7 @@ const LegendSection = _ref => {
6564
6602
  }, isExpanded ? 'Свернуть' : 'Развернуть'));
6565
6603
  };
6566
6604
 
6567
- const _excluded$3 = ["layerInfo", "formatValue", "hiddenLegends", "toggleHiddenLegend"];
6605
+ const _excluded$3 = ["layerInfo", "formatValue", "hiddenLegends", "toggleHiddenLegend", "clearHiddenLegends", "goToClassification"];
6568
6606
  const Legend = /*#__PURE__*/React.memo(_ref => {
6569
6607
  var _layerInfo$style, _layerInfo$style$chil;
6570
6608
 
@@ -6572,7 +6610,9 @@ const Legend = /*#__PURE__*/React.memo(_ref => {
6572
6610
  layerInfo,
6573
6611
  formatValue,
6574
6612
  hiddenLegends,
6575
- toggleHiddenLegend
6613
+ toggleHiddenLegend,
6614
+ clearHiddenLegends,
6615
+ goToClassification
6576
6616
  } = _ref,
6577
6617
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
6578
6618
 
@@ -6581,7 +6621,9 @@ const Legend = /*#__PURE__*/React.memo(_ref => {
6581
6621
  layerInfo: layerInfo,
6582
6622
  formatValue: formatValue,
6583
6623
  hiddenLegends: hiddenLegends,
6584
- toggleHiddenLegend: toggleHiddenLegend
6624
+ toggleHiddenLegend: toggleHiddenLegend,
6625
+ clearHiddenLegends: clearHiddenLegends,
6626
+ goToClassification: goToClassification
6585
6627
  });
6586
6628
  }
6587
6629
 
@@ -6603,7 +6645,9 @@ const Legend = /*#__PURE__*/React.memo(_ref => {
6603
6645
  index: index,
6604
6646
  formatValue: formatValue,
6605
6647
  hiddenLegends: hiddenLegends,
6606
- toggleHiddenLegend: toggleHiddenLegend
6648
+ toggleHiddenLegend: toggleHiddenLegend,
6649
+ clearHiddenLegends: clearHiddenLegends,
6650
+ goToClassification: goToClassification
6607
6651
  }, rest));
6608
6652
  }));
6609
6653
  });
@@ -7078,6 +7122,7 @@ exports.ItemText = ItemText;
7078
7122
  exports.LabelSymbol = LabelSymbol;
7079
7123
  exports.Legend = Legend;
7080
7124
  exports.LegendChildren = LegendChildren;
7125
+ exports.LegendHeaderButton = LegendHeaderButton;
7081
7126
  exports.LegendParameterDescription = LegendParameterDescription;
7082
7127
  exports.LegendProvider = LegendProvider;
7083
7128
  exports.LegendSection = LegendSection;