@evergis/react 2.0.189 → 2.0.190

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.
@@ -24,7 +24,9 @@ export declare const MinimizedLegendContainer: import("styled-components").Style
24
24
  }, never>;
25
25
  export declare const MapLegendSectionContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
26
26
  export declare const MapLegendSectionItems: import("styled-components").StyledComponent<"div", any, {
27
- height?: number | undefined;
27
+ minHeight?: number | undefined;
28
+ maxHeight?: number | undefined;
29
+ isExpanded?: boolean | undefined;
28
30
  }, never>;
29
31
  export declare const MapLegendValueDescr: import("styled-components").StyledComponent<"div", any, {}, never>;
30
32
  export declare const MapLegendItem: import("styled-components").StyledComponent<"div", any, MapLegendItemProps, never>;
@@ -5858,12 +5858,19 @@ const MaximizedLegendContainer = /*#__PURE__*/styled__default.div(_templateObjec
5858
5858
  return isShown ? "visible" : "hidden";
5859
5859
  });
5860
5860
  const MinimizedLegendContainer = /*#__PURE__*/styled__default(MaximizedLegendContainer)(_templateObject13$1 || (_templateObject13$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: calc(100% - 1.5rem);\n padding-right: 1.5rem;\n"])));
5861
- 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"])));
5862
- const MapLegendSectionItems = /*#__PURE__*/styled__default.div(_templateObject15$1 || (_templateObject15$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n height: ", "px;\n overflow: hidden;\n transition: height 0.5s;\n"])), _ref11 => {
5861
+ 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"])));
5862
+ 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 => {
5863
5863
  let {
5864
- height
5864
+ minHeight,
5865
+ maxHeight,
5866
+ isExpanded
5865
5867
  } = _ref11;
5866
- return height;
5868
+ return isExpanded ? (maxHeight || 0) + 4 : minHeight;
5869
+ }, _ref12 => {
5870
+ let {
5871
+ isExpanded
5872
+ } = _ref12;
5873
+ return isExpanded ? "none" : "hidden";
5867
5874
  });
5868
5875
  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"])));
5869
5876
 
@@ -5880,36 +5887,36 @@ const StrokeWidthLegendItemMixin = function StrokeWidthLegendItemMixin(value) {
5880
5887
  value = 0;
5881
5888
  }
5882
5889
 
5883
- 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, :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));
5890
+ 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, :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));
5884
5891
  };
5885
5892
 
5886
5893
  const StrokeColorLegendItemMixin = /*#__PURE__*/styled.css(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-right: 0.5rem;\n width: 1.5rem;\n"])));
5887
- 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"])), _ref12 => {
5894
+ 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 => {
5888
5895
  let {
5889
5896
  parameter
5890
- } = _ref12;
5897
+ } = _ref13;
5891
5898
  return isParameterType(["strokeColor", "stroke.color"], parameter) ? 0.25 : 1;
5892
- }, _ref13 => {
5899
+ }, _ref14 => {
5893
5900
  let {
5894
5901
  value
5895
- } = _ref13;
5902
+ } = _ref14;
5896
5903
  return typeof value === "number" ? "none" : value;
5897
- }, _ref14 => {
5904
+ }, _ref15 => {
5898
5905
  let {
5899
5906
  isHidden
5900
- } = _ref14;
5907
+ } = _ref15;
5901
5908
  return isHidden ? 0.28 : 1;
5902
- }, _ref15 => {
5909
+ }, _ref16 => {
5903
5910
  let {
5904
5911
  value,
5905
5912
  parameter
5906
- } = _ref15;
5913
+ } = _ref16;
5907
5914
  return isParameterType("size", parameter) && SizeLegendItemMixin(value);
5908
- }, _ref16 => {
5915
+ }, _ref17 => {
5909
5916
  let {
5910
5917
  value,
5911
5918
  parameter
5912
- } = _ref16;
5919
+ } = _ref17;
5913
5920
  return isParameterType(["strokeWidth", "stroke.width"], parameter) && StrokeWidthLegendItemMixin(value);
5914
5921
  });
5915
5922
  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"])));
@@ -5917,40 +5924,40 @@ const SizeLegendItemsMixin = /*#__PURE__*/styled.css(_templateObject22 || (_temp
5917
5924
  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);
5918
5925
  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"])));
5919
5926
  const SizeMinimizedLegendSymbol = /*#__PURE__*/styled__default.div(_templateObject25 || (_templateObject25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 4rem;\n margin-right: 0.75rem;\n"])));
5920
- const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.75rem;\n"])));
5927
+ const SizeMinimizedLegendLabel = /*#__PURE__*/styled__default.div(_templateObject26 || (_templateObject26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-width: 9.75rem;\n font-size: 0.75rem;\n"])));
5921
5928
  const SizeMinimizedLegendDown = /*#__PURE__*/styled__default.div(_templateObject27 || (_templateObject27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: rgba(48, 69, 79, 0.65);\n"])));
5922
5929
  const SizeMinimizedLegendUp = /*#__PURE__*/styled__default(SizeMinimizedLegendDown)(_templateObject28 || (_templateObject28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
5923
5930
  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);
5924
- 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"])), _ref17 => {
5931
+ 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 => {
5925
5932
  let {
5926
5933
  isSize
5927
- } = _ref17;
5934
+ } = _ref18;
5928
5935
  return isSize && SingleSizeLegendItemsMixin;
5929
- }, MapLegendItem, _ref18 => {
5936
+ }, MapLegendItem, _ref19 => {
5930
5937
  let {
5931
5938
  parameter
5932
- } = _ref18;
5939
+ } = _ref19;
5933
5940
  return isParameterType(["strokeColor", "stroke.color"], parameter) && StrokeColorLegendItemMixin;
5934
5941
  });
5935
- 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"])), _ref19 => {
5942
+ 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 => {
5936
5943
  let {
5937
5944
  isSize
5938
- } = _ref19;
5945
+ } = _ref20;
5939
5946
  return isSize && SizeLegendItemsMixin;
5940
- }, _ref20 => {
5947
+ }, _ref21 => {
5941
5948
  let {
5942
5949
  isStrokeWidth
5943
- } = _ref20;
5950
+ } = _ref21;
5944
5951
  return isStrokeWidth && StrokeWidthLegendItemsMixin;
5945
- }, _ref21 => {
5952
+ }, _ref22 => {
5946
5953
  let {
5947
5954
  isSingle
5948
- } = _ref21;
5955
+ } = _ref22;
5949
5956
  return isSingle && SingleLegendItemsMixin;
5950
5957
  });
5951
- 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);
5958
+ 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);
5952
5959
  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"])));
5953
- 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"])));
5960
+ 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"])));
5954
5961
  const MapLegendValuesOther = /*#__PURE__*/styled__default(MapLegendOther)(_templateObject35 || (_templateObject35 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n justify-content: center;\n border: 0;\n overflow: visible;\n"])));
5955
5962
  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"])));
5956
5963
 
@@ -6359,7 +6366,9 @@ const LegendSection = _ref => {
6359
6366
  return React__default.createElement(MapLegendSectionContainer, null, React__default.createElement(MapLegendHeader, null, attribute.alias || attribute.name), React__default.createElement(LegendParameterDescription, {
6360
6367
  parameter: parameter
6361
6368
  }), React__default.createElement(MapLegendSectionItems, {
6362
- height: isExpanded ? ((maxNode == null ? void 0 : maxNode.offsetHeight) || 0) + 4 : minNode == null ? void 0 : minNode.offsetHeight
6369
+ minHeight: minNode == null ? void 0 : minNode.offsetHeight,
6370
+ maxHeight: maxNode == null ? void 0 : maxNode.offsetHeight,
6371
+ isExpanded: isExpanded
6363
6372
  }, React__default.createElement(MaximizedLegend, {
6364
6373
  innerRef: maxRef,
6365
6374
  isShown: isExpanded,