@evergis/react 2.0.140 → 2.0.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/EvergisCard/styled.d.ts +7 -6
- package/dist/components/MapControls/styled.d.ts +5 -5
- package/dist/components/SearchInput/styled.d.ts +0 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/react.cjs.development.js +48 -56
- package/dist/react.cjs.development.js.map +1 -1
- package/dist/react.cjs.production.min.js +1 -1
- package/dist/react.cjs.production.min.js.map +1 -1
- package/dist/react.esm.js +39 -49
- package/dist/react.esm.js.map +1 -1
- package/dist/utils/isNumeric.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconProps } from '@evergis/icons';
|
|
2
2
|
export declare const EvergisCardContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const StickyHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const CardHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -16,11 +16,12 @@ export declare const AttributeValueContainer: import("styled-components").Styled
|
|
|
16
16
|
export declare const SimpleAttribute: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
17
|
export declare const ValueLink: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
18
18
|
declare type CardIconProps = {
|
|
19
|
+
kind?: string;
|
|
19
20
|
onClick?: () => void;
|
|
20
21
|
};
|
|
21
|
-
export declare const StatIcon: import("styled-components").StyledComponent<"
|
|
22
|
-
export declare const ZoomIcon: import("styled-components").StyledComponent<"
|
|
23
|
-
export declare const CloseIcon: import("styled-components").StyledComponent<"
|
|
24
|
-
export declare const PrevIcon: import("styled-components").StyledComponent<"
|
|
25
|
-
export declare const NextIcon: import("styled-components").StyledComponent<"
|
|
22
|
+
export declare const StatIcon: import("styled-components").StyledComponent<"i", any, IconProps & CardIconProps, never>;
|
|
23
|
+
export declare const ZoomIcon: import("styled-components").StyledComponent<"i", any, IconProps & CardIconProps, never>;
|
|
24
|
+
export declare const CloseIcon: import("styled-components").StyledComponent<"i", any, IconProps & CardIconProps, never>;
|
|
25
|
+
export declare const PrevIcon: import("styled-components").StyledComponent<"i", any, IconProps & CardIconProps, never>;
|
|
26
|
+
export declare const NextIcon: import("styled-components").StyledComponent<"i", any, IconProps & CardIconProps, never>;
|
|
26
27
|
export {};
|
|
@@ -6,11 +6,11 @@ export declare type MapControlsProps = {
|
|
|
6
6
|
declare type MapControlBtnProps = {
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
};
|
|
9
|
-
export declare const ZoomInBtn: import("styled-components").StyledComponent<"
|
|
10
|
-
export declare const ZoomOutBtn: import("styled-components").StyledComponent<"
|
|
11
|
-
export declare const SearchBtn: import("styled-components").StyledComponent<"
|
|
12
|
-
export declare const FullscreenBtn: import("styled-components").StyledComponent<"
|
|
13
|
-
export declare const MeasureBtn: import("styled-components").StyledComponent<"
|
|
9
|
+
export declare const ZoomInBtn: import("styled-components").StyledComponent<"i", any, import("@evergis/icons").IconProps & MapControlBtnProps, never>;
|
|
10
|
+
export declare const ZoomOutBtn: import("styled-components").StyledComponent<"i", any, import("@evergis/icons").IconProps & MapControlBtnProps, never>;
|
|
11
|
+
export declare const SearchBtn: import("styled-components").StyledComponent<"i", any, import("@evergis/icons").IconProps & MapControlBtnProps, never>;
|
|
12
|
+
export declare const FullscreenBtn: import("styled-components").StyledComponent<"i", any, import("@evergis/icons").IconProps & MapControlBtnProps, never>;
|
|
13
|
+
export declare const MeasureBtn: import("styled-components").StyledComponent<"i", any, import("@evergis/icons").IconProps & MapControlBtnProps, never>;
|
|
14
14
|
export declare const MapControl: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
15
|
export declare const MapControls: import("styled-components").StyledComponent<"div", any, MapControlsProps, never>;
|
|
16
16
|
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export declare const InputContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const InputField: import("styled-components").StyledComponent<"input", any, {}, never>;
|
|
3
|
-
export declare const SearchPrefix: import("styled-components").StyledComponent<"span", any, import("@evergis/ui").IIconProps, never>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useToggle: (initial?: boolean | undefined) => [boolean, VoidFunction, (value: boolean) => void];
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ var api = require('@evergis/api');
|
|
|
12
12
|
var _Map = require('@evergis/sgis/es/Map');
|
|
13
13
|
var DomPainter = require('@evergis/sgis/es/painters/DomPainter/DomPainter');
|
|
14
14
|
var FeatureLayer$1 = require('@evergis/sgis/es/layers/FeatureLayer');
|
|
15
|
+
var icons = require('@evergis/icons');
|
|
15
16
|
var condition = require('@evergis/condition');
|
|
16
17
|
var MultiPoint = require('@evergis/sgis/es/features/MultiPoint');
|
|
17
18
|
var Polyline = require('@evergis/sgis/es/features/Polyline');
|
|
@@ -50,7 +51,6 @@ var PointEditor = require('@evergis/sgis/es/controls/PointEditor');
|
|
|
50
51
|
var utils = require('@evergis/sgis/es/utils/utils');
|
|
51
52
|
var styled = require('styled-components');
|
|
52
53
|
var styled__default = _interopDefault(styled);
|
|
53
|
-
var ui = require('@evergis/ui');
|
|
54
54
|
var punycode = _interopDefault(require('punycode'));
|
|
55
55
|
var TileLayer$1 = require('@evergis/sgis/es/layers/TileLayer');
|
|
56
56
|
|
|
@@ -1945,6 +1945,8 @@ const polygonCircleFromPoint = (center, diameter) => {
|
|
|
1945
1945
|
return [coordinates];
|
|
1946
1946
|
};
|
|
1947
1947
|
|
|
1948
|
+
const isNumeric = number => !isNaN(parseFloat(number)) && isFinite(number);
|
|
1949
|
+
|
|
1948
1950
|
let CircleLineMiterRender = /*#__PURE__*/function (_LineMiterRender) {
|
|
1949
1951
|
_inherits(CircleLineMiterRender, _LineMiterRender);
|
|
1950
1952
|
|
|
@@ -4378,6 +4380,12 @@ const useDebouncedCallback = interval => {
|
|
|
4378
4380
|
}, interval), [interval]);
|
|
4379
4381
|
};
|
|
4380
4382
|
|
|
4383
|
+
const useToggle = initial => {
|
|
4384
|
+
const [state, setState] = React.useState(initial !== undefined ? initial : false);
|
|
4385
|
+
const toggle = React.useCallback(() => setState(!state), [state]);
|
|
4386
|
+
return [state, toggle, setState];
|
|
4387
|
+
};
|
|
4388
|
+
|
|
4381
4389
|
const Symbol = _ref => {
|
|
4382
4390
|
let {
|
|
4383
4391
|
symbol,
|
|
@@ -4429,12 +4437,12 @@ const StyleSymbol = _ref => {
|
|
|
4429
4437
|
}) : null));
|
|
4430
4438
|
};
|
|
4431
4439
|
|
|
4432
|
-
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17,
|
|
4433
|
-
const EvergisCardContainer = /*#__PURE__*/styled__default.div(_templateObject$1 || (_templateObject$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 2.25rem;\n right: 0.5rem;\n width: 22.5rem;\n margin-bottom: 1rem;\n max-height: 90%;\n min-height: 1rem;\n background: #fff;\n border-radius: 4px;\n z-index: 1;\n\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n overflow: initial;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n\n ", " {\n color: rgba(0, 0, 0, 0.65);\n cursor: pointer;\n user-select: none;\n\n &:hover {\n color: #1fb3aa;\n }\n }\n"])),
|
|
4440
|
+
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
|
4441
|
+
const EvergisCardContainer = /*#__PURE__*/styled__default.div(_templateObject$1 || (_templateObject$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 2.25rem;\n right: 0.5rem;\n width: 22.5rem;\n margin-bottom: 1rem;\n max-height: 90%;\n min-height: 1rem;\n background: #fff;\n border-radius: 4px;\n z-index: 1;\n\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n overflow: initial;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n\n ", " {\n color: rgba(0, 0, 0, 0.65);\n cursor: pointer;\n user-select: none;\n\n &:hover {\n color: #1fb3aa;\n }\n }\n"])), icons.Icon);
|
|
4434
4442
|
const StickyHeader = /*#__PURE__*/styled__default.div(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n position: sticky;\n top: 0;\n flex-direction: column;\n background: #fff;\n"])));
|
|
4435
4443
|
const CardHeader = /*#__PURE__*/styled__default.div(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 1.5rem 1.5rem 1rem;\n align-items: center;\n"])));
|
|
4436
4444
|
const CardTitle = /*#__PURE__*/styled__default.div(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin: 0 0.5rem;\n width: 13.5rem;\n flex-grow: 1;\n"])));
|
|
4437
|
-
const CardControls = /*#__PURE__*/styled__default.div(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n\n ", " {\n margin: 0 0.5rem;\n }\n"])),
|
|
4445
|
+
const CardControls = /*#__PURE__*/styled__default.div(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n\n ", " {\n margin: 0 0.5rem;\n }\n"])), icons.Icon);
|
|
4438
4446
|
const FeatureName = /*#__PURE__*/styled__default.div(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.25rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
4439
4447
|
const LayerName = /*#__PURE__*/styled__default.div(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #30454f;\n font-size: 0.75rem;\n"])));
|
|
4440
4448
|
const CardPagination = /*#__PURE__*/styled__default.div(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 2.5rem;\n padding: 0 1.5rem;\n align-items: center;\n font-size: 0.75rem;\n justify-content: space-between;\n background: linear-gradient(\n 0deg,\n rgba(161, 186, 208, 0.12),\n rgba(161, 186, 208, 0.12)\n );\n"])));
|
|
@@ -4442,16 +4450,15 @@ const PaginationDescription = /*#__PURE__*/styled__default.div(_templateObject9
|
|
|
4442
4450
|
const CurrentFeatureIndex = /*#__PURE__*/styled__default.div(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n padding: 0 0.25rem;\n color: #1fb3aa;\n"])));
|
|
4443
4451
|
const CardAttributes = /*#__PURE__*/styled__default.div(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 1rem 1.5rem;\n overflow-y: scroll;\n"])));
|
|
4444
4452
|
const AttributeContainer = /*#__PURE__*/styled__default.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-bottom: 0.5rem;\n"])));
|
|
4445
|
-
const AttributeTitle = /*#__PURE__*/styled__default.div(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #30454f;\n font-size: 0.75rem;\n
|
|
4453
|
+
const AttributeTitle = /*#__PURE__*/styled__default.div(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0.25rem 0;\n color: #30454f;\n font-size: 0.75rem;\n"])));
|
|
4446
4454
|
const AttributeValueContainer = /*#__PURE__*/styled__default.div(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-wrap: wrap;\n display: flex;\n"])));
|
|
4447
4455
|
const SimpleAttribute = /*#__PURE__*/styled__default.div(_templateObject15 || (_templateObject15 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
4448
4456
|
const ValueLink = /*#__PURE__*/styled__default.a(_templateObject16 || (_templateObject16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 0.25rem;\n color: #1fb3aa;\n text-decoration: none;\n"])));
|
|
4449
4457
|
const featureCardIconMixin = /*#__PURE__*/styled.css(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #30454f;\n"])));
|
|
4450
|
-
const
|
|
4451
|
-
const
|
|
4452
|
-
const
|
|
4453
|
-
const
|
|
4454
|
-
const NextIcon = /*#__PURE__*/styled__default(ui.Icon)(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4458
|
+
const ZoomIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4459
|
+
const CloseIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4460
|
+
const PrevIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4461
|
+
const NextIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4455
4462
|
|
|
4456
4463
|
const MailValue = _ref => {
|
|
4457
4464
|
let {
|
|
@@ -4575,16 +4582,13 @@ const StyledCard = _ref => {
|
|
|
4575
4582
|
symbol: feature.symbol || {}
|
|
4576
4583
|
}), React__default.createElement(CardTitle, null, React__default.createElement(FeatureName, {
|
|
4577
4584
|
title: feature.displayName || ''
|
|
4578
|
-
}, feature.displayName), React__default.createElement(LayerName, null, feature.layerAlias)), React__default.createElement(CardControls, null, onStatistics && React__default.createElement(
|
|
4579
|
-
kind: "statistics",
|
|
4585
|
+
}, feature.displayName), React__default.createElement(LayerName, null, feature.layerAlias)), React__default.createElement(CardControls, null, onStatistics && React__default.createElement(icons.IconButton, {
|
|
4580
4586
|
onClick: () => onStatistics(feature)
|
|
4581
|
-
}), !hideZoom && React__default.createElement(
|
|
4582
|
-
kind: "zoom_to",
|
|
4587
|
+
}, React__default.createElement(icons.EverCloudStatisticsIcon, null)), !hideZoom && React__default.createElement(icons.IconButton, {
|
|
4583
4588
|
onClick: zoom
|
|
4584
|
-
}), React__default.createElement(
|
|
4585
|
-
kind: "close",
|
|
4589
|
+
}, React__default.createElement(icons.EverCloudZoomtoIcon, null)), React__default.createElement(icons.IconButton, {
|
|
4586
4590
|
onClick: reset
|
|
4587
|
-
}))), features.length > 1 ? React__default.createElement(CardPagination, null, React__default.createElement(PrevIcon, {
|
|
4591
|
+
}, React__default.createElement(icons.EverCloudCloseIcon, null)))), features.length > 1 ? React__default.createElement(CardPagination, null, React__default.createElement(PrevIcon, {
|
|
4588
4592
|
kind: "prev",
|
|
4589
4593
|
onClick: prev
|
|
4590
4594
|
}), React__default.createElement(PaginationDescription, null, React__default.createElement(CurrentFeatureIndex, {
|
|
@@ -4743,19 +4747,15 @@ const LegendSection = _ref => {
|
|
|
4743
4747
|
return React__default.createElement(LegendSectionContainer, null, !hideTitle && React__default.createElement(LegendSectionHeader, null, renderLegendTitle ? renderLegendTitle(item) : item.title), item.values.map(children));
|
|
4744
4748
|
};
|
|
4745
4749
|
|
|
4746
|
-
var _templateObject$3, _templateObject2$2
|
|
4747
|
-
const InputContainer = /*#__PURE__*/styled__default.div(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n border-radius: 0.125rem;\n box-sizing: border-box;\n border: 0.0625rem solid rgba(48, 69, 79, 0.12);\n margin-bottom: 0.5rem;\n"])));
|
|
4750
|
+
var _templateObject$3, _templateObject2$2;
|
|
4751
|
+
const InputContainer = /*#__PURE__*/styled__default.div(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n border-radius: 0.125rem;\n box-sizing: border-box;\n border: 0.0625rem solid rgba(48, 69, 79, 0.12);\n margin-bottom: 0.5rem;\n \n i {\n color: rgba(48, 69, 79, 0.54);\n padding: 0.25rem;\n\n &:hover {\n cursor: pointer;\n color: rgba(48, 69, 79, 0.87);\n }\n }\n"])));
|
|
4748
4752
|
const InputField = /*#__PURE__*/styled__default.input(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n border: none;\n outline: none;\n font-size: 1rem;\n line-height: 1.1875rem;\n padding: 0 0.5rem;\n background-color: transparent;\n color: rgba(48, 69, 79, 0.87);\n"])));
|
|
4749
|
-
const SearchPrefix = /*#__PURE__*/styled__default(ui.Icon)(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: rgba(48, 69, 79, 0.54);\n padding: 0.25rem;\n\n &:hover {\n cursor: pointer;\n color: rgba(48, 69, 79, 0.87);\n }\n"])));
|
|
4750
|
-
SearchPrefix.defaultProps = {
|
|
4751
|
-
kind: "search"
|
|
4752
|
-
};
|
|
4753
4753
|
|
|
4754
4754
|
const SearchInput = _ref => {
|
|
4755
4755
|
let {
|
|
4756
4756
|
onChange
|
|
4757
4757
|
} = _ref;
|
|
4758
|
-
return React__default.createElement(InputContainer, null, React__default.createElement(
|
|
4758
|
+
return React__default.createElement(InputContainer, null, React__default.createElement(icons.EverCloudSearchIcon, null), React__default.createElement(InputField, {
|
|
4759
4759
|
onChange: onChange
|
|
4760
4760
|
}));
|
|
4761
4761
|
};
|
|
@@ -4905,13 +4905,13 @@ const Map = _ref => {
|
|
|
4905
4905
|
}, children);
|
|
4906
4906
|
};
|
|
4907
4907
|
|
|
4908
|
-
var _templateObject$4, _templateObject2$3, _templateObject3$
|
|
4908
|
+
var _templateObject$4, _templateObject2$3, _templateObject3$2, _templateObject4$2, _templateObject5$2;
|
|
4909
4909
|
|
|
4910
4910
|
const topLeft = distance => styled.css(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n top: ", ";\n left: ", ";\n"])), distance, distance);
|
|
4911
4911
|
|
|
4912
4912
|
const topRight = distance => styled.css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n top: ", ";\n right: ", ";\n"])), distance, distance);
|
|
4913
4913
|
|
|
4914
|
-
const bottomLeft = distance => styled.css(_templateObject3$
|
|
4914
|
+
const bottomLeft = distance => styled.css(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n left: ", ";\n"])), distance, distance);
|
|
4915
4915
|
|
|
4916
4916
|
const bottomRight = distance => styled.css(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n right: ", ";\n"])), distance, distance);
|
|
4917
4917
|
|
|
@@ -4927,29 +4927,19 @@ const placementMixin = function placementMixin(placement, distance) {
|
|
|
4927
4927
|
return styled.css(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n ", "\n ", "\n"])), placement === 'top-left' && topLeft(distance), placement === 'top-right' && topRight(distance), placement === 'bottom-left' && bottomLeft(distance), placement === 'bottom-right' && bottomRight(distance));
|
|
4928
4928
|
};
|
|
4929
4929
|
|
|
4930
|
-
var _templateObject$5, _templateObject2$4, _templateObject3$
|
|
4930
|
+
var _templateObject$5, _templateObject2$4, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$1, _templateObject7$1, _templateObject8$1;
|
|
4931
4931
|
const mapControlBtnMixin = /*#__PURE__*/styled.css(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 2rem;\n height: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: #fff;\n"])));
|
|
4932
|
-
const ZoomInBtn = /*#__PURE__*/styled__default(
|
|
4933
|
-
|
|
4934
|
-
kind: "
|
|
4935
|
-
|
|
4936
|
-
const
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
};
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
}; // TODO not exists in fonts
|
|
4944
|
-
|
|
4945
|
-
const FullscreenBtn = /*#__PURE__*/styled__default(ui.Icon)(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin);
|
|
4946
|
-
FullscreenBtn.defaultProps = {
|
|
4947
|
-
kind: "maximize"
|
|
4948
|
-
};
|
|
4949
|
-
const MeasureBtn = /*#__PURE__*/styled__default(ui.Icon)(_templateObject6$1 || (_templateObject6$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin);
|
|
4950
|
-
MeasureBtn.defaultProps = {
|
|
4951
|
-
kind: "measure_length"
|
|
4952
|
-
};
|
|
4932
|
+
const ZoomInBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomInBtn.defaultProps = { kind: "plus" };
|
|
4933
|
+
|
|
4934
|
+
const ZoomOutBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomOutBtn.defaultProps = { kind: "minus" };
|
|
4935
|
+
|
|
4936
|
+
const SearchBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // SearchBtn.defaultProps = { kind: "search" };
|
|
4937
|
+
// TODO not exists in fonts
|
|
4938
|
+
|
|
4939
|
+
const FullscreenBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // FullscreenBtn.defaultProps = { kind: "maximize" };
|
|
4940
|
+
|
|
4941
|
+
const MeasureBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject6$1 || (_templateObject6$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // MeasureBtn.defaultProps = { kind: "measure_length" };
|
|
4942
|
+
|
|
4953
4943
|
const MapControl = /*#__PURE__*/styled__default.div(_templateObject7$1 || (_templateObject7$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 0.15rem;\n background: rgba(28, 33, 48, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n font-size: 1.5rem;\n cursor: pointer;\n height: auto;\n width: auto;\n padding: 0.25rem;\n"])));
|
|
4954
4944
|
const MapControls = /*#__PURE__*/styled__default.div(_templateObject8$1 || (_templateObject8$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n display: flex;\n flex-direction: ", ";\n\n ", "\n\n ", " {\n margin-bottom: ", ";\n margin-right: ", ";\n flex-direction: ", ";\n }\n"])), _ref => {
|
|
4955
4945
|
let {
|
|
@@ -4996,10 +4986,10 @@ const Fullscreen = () => {
|
|
|
4996
4986
|
}));
|
|
4997
4987
|
};
|
|
4998
4988
|
|
|
4999
|
-
var _templateObject$6, _templateObject2$5, _templateObject3$
|
|
4989
|
+
var _templateObject$6, _templateObject2$5, _templateObject3$4, _templateObject4$4, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1;
|
|
5000
4990
|
const MapLegendControl = /*#__PURE__*/styled__default(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
|
|
5001
4991
|
const MapLegendContainer = /*#__PURE__*/styled__default.div(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 12.5rem;\n box-sizing: border-box;\n\n canvas {\n height: 1.625rem;\n width: 1.625rem;\n }\n"])));
|
|
5002
|
-
const MapLegendHeader = /*#__PURE__*/styled__default(LegendSectionHeader)(_templateObject3$
|
|
4992
|
+
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"])));
|
|
5003
4993
|
const MapLegendValueDescr = /*#__PURE__*/styled__default.div(_templateObject4$4 || (_templateObject4$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 0.25rem;\n font-size: 0.75rem;\n font-weight: 600;\n line-height: 1rem;\n"])));
|
|
5004
4994
|
const MapLegendItem = /*#__PURE__*/styled__default.div(_templateObject5$4 || (_templateObject5$4 = /*#__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 => {
|
|
5005
4995
|
let {
|
|
@@ -5042,7 +5032,7 @@ const getValueFromLegendTitle = (title, minOrMax) => {
|
|
|
5042
5032
|
return minOrMax === "min" ? result == null ? void 0 : result[0] : result == null ? void 0 : result[1];
|
|
5043
5033
|
}
|
|
5044
5034
|
|
|
5045
|
-
return (title == null ? void 0 : (_title$split = title.split(" ")) == null ? void 0 : _title$split.find(
|
|
5035
|
+
return (title == null ? void 0 : (_title$split = title.split(" ")) == null ? void 0 : _title$split.find(isNumeric)) || "";
|
|
5046
5036
|
};
|
|
5047
5037
|
|
|
5048
5038
|
const MinimizedLegend = _ref => {
|
|
@@ -5074,7 +5064,7 @@ const MapLegend = _ref => {
|
|
|
5074
5064
|
className
|
|
5075
5065
|
} = _ref;
|
|
5076
5066
|
const legend = useMapLegend(layer, config);
|
|
5077
|
-
const [isExpanded, toggleExpanded] =
|
|
5067
|
+
const [isExpanded, toggleExpanded] = useToggle();
|
|
5078
5068
|
|
|
5079
5069
|
if (!legend) {
|
|
5080
5070
|
return null;
|
|
@@ -5331,7 +5321,7 @@ const Measurer = _ref => {
|
|
|
5331
5321
|
}, props)) : null;
|
|
5332
5322
|
};
|
|
5333
5323
|
|
|
5334
|
-
var _templateObject$7, _templateObject2$6, _templateObject3$
|
|
5324
|
+
var _templateObject$7, _templateObject2$6, _templateObject3$5;
|
|
5335
5325
|
const ScaleRulerContainer = /*#__PURE__*/styled__default.div(_templateObject$7 || (_templateObject$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 2rem;\n cursor: default;\n display: flex;\n align-items: flex-end;\n padding: 0 0.5rem 0.5rem;\n box-sizing: border-box;\n"])));
|
|
5336
5326
|
const ScaleRulerBlock = /*#__PURE__*/styled__default.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n justify-content: center;\n width: ", ";\n height: 0.25rem;\n border: 0.0625rem solid white;\n border-top: 0;\n"])), _ref => {
|
|
5337
5327
|
let {
|
|
@@ -5339,7 +5329,7 @@ const ScaleRulerBlock = /*#__PURE__*/styled__default.div(_templateObject2$6 || (
|
|
|
5339
5329
|
} = _ref;
|
|
5340
5330
|
return width + "px";
|
|
5341
5331
|
});
|
|
5342
|
-
const TextContainer = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
5332
|
+
const TextContainer = /*#__PURE__*/styled__default.div(_templateObject3$5 || (_templateObject3$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 2rem;\n display: flex;\n justify-content: center;\n align-items: ", ";\n width: ", ";\n color: #fff;\n font-size: 1rem;\n cursor: default;\n padding: 0 0.5rem;\n"])), _ref2 => {
|
|
5343
5333
|
let {
|
|
5344
5334
|
alignEnd
|
|
5345
5335
|
} = _ref2;
|
|
@@ -5392,13 +5382,13 @@ const ZoomLevel = () => {
|
|
|
5392
5382
|
}, level || 0);
|
|
5393
5383
|
};
|
|
5394
5384
|
|
|
5395
|
-
var _templateObject$8, _templateObject2$7, _templateObject3$
|
|
5385
|
+
var _templateObject$8, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$5, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$2, _templateObject10$2, _templateObject11$2;
|
|
5396
5386
|
|
|
5397
5387
|
const cornerBottom = cornerSize => styled.css(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["\n &:before {\n left: 50%;\n transform: translate(-50%, 100%);\n bottom: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-top: ", " solid rgba(28, 33, 48, 0.8);\n }\n"])), cornerSize, cornerSize, cornerSize);
|
|
5398
5388
|
|
|
5399
5389
|
const cornerLeft = cornerSize => styled.css(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(-100%, -50%);\n left: 0;\n top: 50%;\n border-top: ", " solid transparent;\n border-right: ", " solid rgba(28, 33, 48, 0.8);\n border-bottom: ", " solid transparent;\n }\n"])), cornerSize, cornerSize, cornerSize);
|
|
5400
5390
|
|
|
5401
|
-
const cornerRight = cornerSize => styled.css(_templateObject3$
|
|
5391
|
+
const cornerRight = cornerSize => styled.css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(100%, -50%);\n right: 0;\n top: 50%;\n border-top: ", " solid transparent;\n border-left: ", " solid rgba(28, 33, 48, 0.8);\n border-bottom: ", " solid transparent;\n }\n"])), cornerSize, cornerSize, cornerSize);
|
|
5402
5392
|
|
|
5403
5393
|
const cornerTop = cornerSize => styled.css(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n &:before {\n transform: translate(-50%, -100%);\n left: 50%;\n top: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-bottom: ", " solid rgba(28, 33, 48, 0.8);\n }\n"])), cornerSize, cornerSize, cornerSize);
|
|
5404
5394
|
|
|
@@ -5631,6 +5621,7 @@ exports.isImageSymbol = isImageSymbol;
|
|
|
5631
5621
|
exports.isLabelSymbol = isLabelSymbol;
|
|
5632
5622
|
exports.isMaskedImageSymbol = isMaskedImageSymbol;
|
|
5633
5623
|
exports.isMiterExist = isMiterExist;
|
|
5624
|
+
exports.isNumeric = isNumeric;
|
|
5634
5625
|
exports.isParameterByAttribute = isParameterByAttribute;
|
|
5635
5626
|
exports.isParameterValueSimple = isParameterValueSimple;
|
|
5636
5627
|
exports.isParameterValueSymbol = isParameterValueSymbol;
|
|
@@ -5726,6 +5717,7 @@ exports.useMount = useMount;
|
|
|
5726
5717
|
exports.useProperty = useProperty;
|
|
5727
5718
|
exports.useScale = useScale;
|
|
5728
5719
|
exports.useSymbol = useSymbol;
|
|
5720
|
+
exports.useToggle = useToggle;
|
|
5729
5721
|
exports.useTooltip = useTooltip;
|
|
5730
5722
|
exports.useTooltipContext = useTooltipContext;
|
|
5731
5723
|
exports.useUpdate = useUpdate;
|