@evergis/react 2.0.139 → 2.0.142
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/core/legend/index.d.ts +1 -0
- package/dist/core/legend/isValidParameter.d.ts +2 -0
- 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 +56 -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 +45 -48
- 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
|
@@ -50,7 +50,7 @@ var PointEditor = require('@evergis/sgis/es/controls/PointEditor');
|
|
|
50
50
|
var utils = require('@evergis/sgis/es/utils/utils');
|
|
51
51
|
var styled = require('styled-components');
|
|
52
52
|
var styled__default = _interopDefault(styled);
|
|
53
|
-
var
|
|
53
|
+
var icons = require('@evergis/icons');
|
|
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
|
|
|
@@ -3337,6 +3339,10 @@ const createLegendItem = _ref => {
|
|
|
3337
3339
|
};
|
|
3338
3340
|
};
|
|
3339
3341
|
|
|
3342
|
+
function isValidParameter(parameter) {
|
|
3343
|
+
return !(parameter != null && parameter.includes("labelSymbol")) && !(parameter != null && parameter.includes("singleObjectSymbol"));
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3340
3346
|
function createStyleLegend(style, config) {
|
|
3341
3347
|
const {
|
|
3342
3348
|
classificationManager,
|
|
@@ -3346,15 +3352,15 @@ function createStyleLegend(style, config) {
|
|
|
3346
3352
|
let {
|
|
3347
3353
|
parameter
|
|
3348
3354
|
} = _ref;
|
|
3349
|
-
return config.parameters && parameter ? config.parameters.includes(parameter) :
|
|
3355
|
+
return config.parameters && parameter ? config.parameters.includes(parameter) : isValidParameter(parameter);
|
|
3350
3356
|
});
|
|
3351
3357
|
|
|
3352
|
-
if (items.length
|
|
3358
|
+
if (!items.length) {
|
|
3353
3359
|
return null;
|
|
3354
3360
|
}
|
|
3355
3361
|
|
|
3356
3362
|
return {
|
|
3357
|
-
symbol: unClassify(symbol),
|
|
3363
|
+
symbol: unClassify(symbol.singleObjectSymbol || symbol),
|
|
3358
3364
|
items: items.map(createLegendItem(config))
|
|
3359
3365
|
};
|
|
3360
3366
|
}
|
|
@@ -4374,6 +4380,12 @@ const useDebouncedCallback = interval => {
|
|
|
4374
4380
|
}, interval), [interval]);
|
|
4375
4381
|
};
|
|
4376
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
|
+
|
|
4377
4389
|
const Symbol = _ref => {
|
|
4378
4390
|
let {
|
|
4379
4391
|
symbol,
|
|
@@ -4426,11 +4438,11 @@ const StyleSymbol = _ref => {
|
|
|
4426
4438
|
};
|
|
4427
4439
|
|
|
4428
4440
|
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
|
4429
|
-
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"])),
|
|
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);
|
|
4430
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"])));
|
|
4431
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"])));
|
|
4432
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"])));
|
|
4433
|
-
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);
|
|
4434
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"])));
|
|
4435
4447
|
const LayerName = /*#__PURE__*/styled__default.div(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #30454f;\n font-size: 0.75rem;\n"])));
|
|
4436
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"])));
|
|
@@ -4438,16 +4450,16 @@ const PaginationDescription = /*#__PURE__*/styled__default.div(_templateObject9
|
|
|
4438
4450
|
const CurrentFeatureIndex = /*#__PURE__*/styled__default.div(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n padding: 0 0.25rem;\n color: #1fb3aa;\n"])));
|
|
4439
4451
|
const CardAttributes = /*#__PURE__*/styled__default.div(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 1rem 1.5rem;\n overflow-y: scroll;\n"])));
|
|
4440
4452
|
const AttributeContainer = /*#__PURE__*/styled__default.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding-bottom: 0.5rem;\n"])));
|
|
4441
|
-
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"])));
|
|
4442
4454
|
const AttributeValueContainer = /*#__PURE__*/styled__default.div(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-wrap: wrap;\n display: flex;\n"])));
|
|
4443
4455
|
const SimpleAttribute = /*#__PURE__*/styled__default.div(_templateObject15 || (_templateObject15 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
4444
4456
|
const ValueLink = /*#__PURE__*/styled__default.a(_templateObject16 || (_templateObject16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 0.25rem;\n color: #1fb3aa;\n text-decoration: none;\n"])));
|
|
4445
4457
|
const featureCardIconMixin = /*#__PURE__*/styled.css(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #30454f;\n"])));
|
|
4446
|
-
const StatIcon = /*#__PURE__*/styled__default(
|
|
4447
|
-
const ZoomIcon = /*#__PURE__*/styled__default(
|
|
4448
|
-
const CloseIcon = /*#__PURE__*/styled__default(
|
|
4449
|
-
const PrevIcon = /*#__PURE__*/styled__default(
|
|
4450
|
-
const NextIcon = /*#__PURE__*/styled__default(
|
|
4458
|
+
const StatIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject18 || (_templateObject18 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4459
|
+
const ZoomIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4460
|
+
const CloseIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4461
|
+
const PrevIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4462
|
+
const NextIcon = /*#__PURE__*/styled__default(icons.Icon)(_templateObject22 || (_templateObject22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), featureCardIconMixin);
|
|
4451
4463
|
|
|
4452
4464
|
const MailValue = _ref => {
|
|
4453
4465
|
let {
|
|
@@ -4739,19 +4751,15 @@ const LegendSection = _ref => {
|
|
|
4739
4751
|
return React__default.createElement(LegendSectionContainer, null, !hideTitle && React__default.createElement(LegendSectionHeader, null, renderLegendTitle ? renderLegendTitle(item) : item.title), item.values.map(children));
|
|
4740
4752
|
};
|
|
4741
4753
|
|
|
4742
|
-
var _templateObject$3, _templateObject2$2
|
|
4743
|
-
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"])));
|
|
4754
|
+
var _templateObject$3, _templateObject2$2;
|
|
4755
|
+
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"])));
|
|
4744
4756
|
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"])));
|
|
4745
|
-
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"])));
|
|
4746
|
-
SearchPrefix.defaultProps = {
|
|
4747
|
-
kind: "search"
|
|
4748
|
-
};
|
|
4749
4757
|
|
|
4750
4758
|
const SearchInput = _ref => {
|
|
4751
4759
|
let {
|
|
4752
4760
|
onChange
|
|
4753
4761
|
} = _ref;
|
|
4754
|
-
return React__default.createElement(InputContainer, null, React__default.createElement(
|
|
4762
|
+
return React__default.createElement(InputContainer, null, React__default.createElement(icons.EverCloudSearchIcon, null), React__default.createElement(InputField, {
|
|
4755
4763
|
onChange: onChange
|
|
4756
4764
|
}));
|
|
4757
4765
|
};
|
|
@@ -4901,13 +4909,13 @@ const Map = _ref => {
|
|
|
4901
4909
|
}, children);
|
|
4902
4910
|
};
|
|
4903
4911
|
|
|
4904
|
-
var _templateObject$4, _templateObject2$3, _templateObject3$
|
|
4912
|
+
var _templateObject$4, _templateObject2$3, _templateObject3$2, _templateObject4$2, _templateObject5$2;
|
|
4905
4913
|
|
|
4906
4914
|
const topLeft = distance => styled.css(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n top: ", ";\n left: ", ";\n"])), distance, distance);
|
|
4907
4915
|
|
|
4908
4916
|
const topRight = distance => styled.css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n top: ", ";\n right: ", ";\n"])), distance, distance);
|
|
4909
4917
|
|
|
4910
|
-
const bottomLeft = distance => styled.css(_templateObject3$
|
|
4918
|
+
const bottomLeft = distance => styled.css(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n left: ", ";\n"])), distance, distance);
|
|
4911
4919
|
|
|
4912
4920
|
const bottomRight = distance => styled.css(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n right: ", ";\n"])), distance, distance);
|
|
4913
4921
|
|
|
@@ -4923,29 +4931,19 @@ const placementMixin = function placementMixin(placement, distance) {
|
|
|
4923
4931
|
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));
|
|
4924
4932
|
};
|
|
4925
4933
|
|
|
4926
|
-
var _templateObject$5, _templateObject2$4, _templateObject3$
|
|
4934
|
+
var _templateObject$5, _templateObject2$4, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$1, _templateObject7$1, _templateObject8$1;
|
|
4927
4935
|
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"])));
|
|
4928
|
-
const ZoomInBtn = /*#__PURE__*/styled__default(
|
|
4929
|
-
|
|
4930
|
-
kind: "
|
|
4931
|
-
|
|
4932
|
-
const
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
};
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
}; // TODO not exists in fonts
|
|
4940
|
-
|
|
4941
|
-
const FullscreenBtn = /*#__PURE__*/styled__default(ui.Icon)(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin);
|
|
4942
|
-
FullscreenBtn.defaultProps = {
|
|
4943
|
-
kind: "maximize"
|
|
4944
|
-
};
|
|
4945
|
-
const MeasureBtn = /*#__PURE__*/styled__default(ui.Icon)(_templateObject6$1 || (_templateObject6$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin);
|
|
4946
|
-
MeasureBtn.defaultProps = {
|
|
4947
|
-
kind: "measure_length"
|
|
4948
|
-
};
|
|
4936
|
+
const ZoomInBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomInBtn.defaultProps = { kind: "plus" };
|
|
4937
|
+
|
|
4938
|
+
const ZoomOutBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // ZoomOutBtn.defaultProps = { kind: "minus" };
|
|
4939
|
+
|
|
4940
|
+
const SearchBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // SearchBtn.defaultProps = { kind: "search" };
|
|
4941
|
+
// TODO not exists in fonts
|
|
4942
|
+
|
|
4943
|
+
const FullscreenBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // FullscreenBtn.defaultProps = { kind: "maximize" };
|
|
4944
|
+
|
|
4945
|
+
const MeasureBtn = /*#__PURE__*/styled__default(icons.Icon)(_templateObject6$1 || (_templateObject6$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n"])), mapControlBtnMixin); // MeasureBtn.defaultProps = { kind: "measure_length" };
|
|
4946
|
+
|
|
4949
4947
|
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"])));
|
|
4950
4948
|
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 => {
|
|
4951
4949
|
let {
|
|
@@ -4992,10 +4990,10 @@ const Fullscreen = () => {
|
|
|
4992
4990
|
}));
|
|
4993
4991
|
};
|
|
4994
4992
|
|
|
4995
|
-
var _templateObject$6, _templateObject2$5, _templateObject3$
|
|
4993
|
+
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;
|
|
4996
4994
|
const MapLegendControl = /*#__PURE__*/styled__default(MapControl)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: default;\n"])));
|
|
4997
4995
|
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"])));
|
|
4998
|
-
const MapLegendHeader = /*#__PURE__*/styled__default(LegendSectionHeader)(_templateObject3$
|
|
4996
|
+
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"])));
|
|
4999
4997
|
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"])));
|
|
5000
4998
|
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 => {
|
|
5001
4999
|
let {
|
|
@@ -5038,7 +5036,7 @@ const getValueFromLegendTitle = (title, minOrMax) => {
|
|
|
5038
5036
|
return minOrMax === "min" ? result == null ? void 0 : result[0] : result == null ? void 0 : result[1];
|
|
5039
5037
|
}
|
|
5040
5038
|
|
|
5041
|
-
return (title == null ? void 0 : (_title$split = title.split(" ")) == null ? void 0 : _title$split.find(
|
|
5039
|
+
return (title == null ? void 0 : (_title$split = title.split(" ")) == null ? void 0 : _title$split.find(isNumeric)) || "";
|
|
5042
5040
|
};
|
|
5043
5041
|
|
|
5044
5042
|
const MinimizedLegend = _ref => {
|
|
@@ -5064,15 +5062,13 @@ const MinimizedLegend = _ref => {
|
|
|
5064
5062
|
};
|
|
5065
5063
|
|
|
5066
5064
|
const MapLegend = _ref => {
|
|
5067
|
-
var _items$0$parameter;
|
|
5068
|
-
|
|
5069
5065
|
let {
|
|
5070
5066
|
layer,
|
|
5071
5067
|
config,
|
|
5072
5068
|
className
|
|
5073
5069
|
} = _ref;
|
|
5074
5070
|
const legend = useMapLegend(layer, config);
|
|
5075
|
-
const [isExpanded, toggleExpanded] =
|
|
5071
|
+
const [isExpanded, toggleExpanded] = useToggle();
|
|
5076
5072
|
|
|
5077
5073
|
if (!legend) {
|
|
5078
5074
|
return null;
|
|
@@ -5082,18 +5078,19 @@ const MapLegend = _ref => {
|
|
|
5082
5078
|
symbol,
|
|
5083
5079
|
items
|
|
5084
5080
|
} = legend;
|
|
5085
|
-
const isValidClassify = !((_items$0$parameter = items[0].parameter) != null && _items$0$parameter.includes("labelSymbol"));
|
|
5086
5081
|
return React__default.createElement(LegendProvider, {
|
|
5087
5082
|
symbol: symbol
|
|
5088
5083
|
}, React__default.createElement(MapLegendControl, {
|
|
5089
5084
|
className: className
|
|
5090
|
-
}, React__default.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias),
|
|
5085
|
+
}, React__default.createElement(MapLegendHeader, null, layer == null ? void 0 : layer.alias), !!items.length && React__default.createElement(MapLegendContainer, null, isExpanded ? React__default.createElement(Legend, {
|
|
5091
5086
|
layer: layer,
|
|
5092
5087
|
config: config
|
|
5093
5088
|
}) : React__default.createElement(React__default.Fragment, null, items.map(item => {
|
|
5094
5089
|
var _symbol$fill, _item$parameter, _symbol$fill2;
|
|
5095
5090
|
|
|
5096
|
-
return React__default.createElement(
|
|
5091
|
+
return React__default.createElement(React.Fragment, {
|
|
5092
|
+
key: item.title
|
|
5093
|
+
}, React__default.createElement(MinimizedLegend, {
|
|
5097
5094
|
values: item.values,
|
|
5098
5095
|
defaultValue: (_symbol$fill = symbol.fill) == null ? void 0 : _symbol$fill.color,
|
|
5099
5096
|
title: item.title !== (layer == null ? void 0 : layer.alias) ? item.title : ""
|
|
@@ -5328,7 +5325,7 @@ const Measurer = _ref => {
|
|
|
5328
5325
|
}, props)) : null;
|
|
5329
5326
|
};
|
|
5330
5327
|
|
|
5331
|
-
var _templateObject$7, _templateObject2$6, _templateObject3$
|
|
5328
|
+
var _templateObject$7, _templateObject2$6, _templateObject3$5;
|
|
5332
5329
|
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"])));
|
|
5333
5330
|
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 => {
|
|
5334
5331
|
let {
|
|
@@ -5336,7 +5333,7 @@ const ScaleRulerBlock = /*#__PURE__*/styled__default.div(_templateObject2$6 || (
|
|
|
5336
5333
|
} = _ref;
|
|
5337
5334
|
return width + "px";
|
|
5338
5335
|
});
|
|
5339
|
-
const TextContainer = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
5336
|
+
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 => {
|
|
5340
5337
|
let {
|
|
5341
5338
|
alignEnd
|
|
5342
5339
|
} = _ref2;
|
|
@@ -5389,13 +5386,13 @@ const ZoomLevel = () => {
|
|
|
5389
5386
|
}, level || 0);
|
|
5390
5387
|
};
|
|
5391
5388
|
|
|
5392
|
-
var _templateObject$8, _templateObject2$7, _templateObject3$
|
|
5389
|
+
var _templateObject$8, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$5, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$2, _templateObject10$2, _templateObject11$2;
|
|
5393
5390
|
|
|
5394
5391
|
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);
|
|
5395
5392
|
|
|
5396
5393
|
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);
|
|
5397
5394
|
|
|
5398
|
-
const cornerRight = cornerSize => styled.css(_templateObject3$
|
|
5395
|
+
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);
|
|
5399
5396
|
|
|
5400
5397
|
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);
|
|
5401
5398
|
|
|
@@ -5628,6 +5625,7 @@ exports.isImageSymbol = isImageSymbol;
|
|
|
5628
5625
|
exports.isLabelSymbol = isLabelSymbol;
|
|
5629
5626
|
exports.isMaskedImageSymbol = isMaskedImageSymbol;
|
|
5630
5627
|
exports.isMiterExist = isMiterExist;
|
|
5628
|
+
exports.isNumeric = isNumeric;
|
|
5631
5629
|
exports.isParameterByAttribute = isParameterByAttribute;
|
|
5632
5630
|
exports.isParameterValueSimple = isParameterValueSimple;
|
|
5633
5631
|
exports.isParameterValueSymbol = isParameterValueSymbol;
|
|
@@ -5664,6 +5662,7 @@ exports.isStyle = isStyle;
|
|
|
5664
5662
|
exports.isSymbolWithOffset = isSymbolWithOffset;
|
|
5665
5663
|
exports.isTwoDimensionalSymbol = isTwoDimensionalSymbol;
|
|
5666
5664
|
exports.isUniqueClass = isUniqueClass;
|
|
5665
|
+
exports.isValidParameter = isValidParameter;
|
|
5667
5666
|
exports.measureAreaSymbol = measureAreaSymbol;
|
|
5668
5667
|
exports.measureLengthSymbol = measureLengthSymbol;
|
|
5669
5668
|
exports.measurePolygonSnapSymbol = measurePolygonSnapSymbol;
|
|
@@ -5722,6 +5721,7 @@ exports.useMount = useMount;
|
|
|
5722
5721
|
exports.useProperty = useProperty;
|
|
5723
5722
|
exports.useScale = useScale;
|
|
5724
5723
|
exports.useSymbol = useSymbol;
|
|
5724
|
+
exports.useToggle = useToggle;
|
|
5725
5725
|
exports.useTooltip = useTooltip;
|
|
5726
5726
|
exports.useTooltipContext = useTooltipContext;
|
|
5727
5727
|
exports.useUpdate = useUpdate;
|