@hybridcore/ui 1.6.11 → 1.6.13
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/{AnimatedTheme-D3VZKKNV.js → AnimatedTheme-ktdO3Bel.js} +6 -6
- package/dist/{AxisRenderer-Doyw-FTI.js → AxisRenderer-BCQoUJw6.js} +6 -6
- package/dist/{AxisRendererY-BylCU67e.js → AxisRendererY-AXWvGU6r.js} +3 -3
- package/dist/{Bullet-C6357hTv.js → Bullet-Djj7Vs9T.js} +1 -1
- package/dist/{Button-DGOT8RcT.js → Button-BLY4PVJC.js} +3 -3
- package/dist/{CategoryAxis-B5uTZjhL.js → CategoryAxis-B6NqW8qd.js} +3 -3
- package/dist/{Circle-DhzVdFBd.js → Circle-BnfBNKBD.js} +1 -1
- package/dist/{ColorSet-DGLMpbL3.js → ColorSet-cyPmWGwh.js} +1 -1
- package/dist/{ColumnSeries-CqJ-563p.js → ColumnSeries-CtRTsn-E.js} +28 -28
- package/dist/{DateAxis-lJZjbAS-.js → DateAxis-DEXKps1S.js} +4 -4
- package/dist/{Entity-4Lr2piVN.js → Entity-BJCuhdq_.js} +14 -14
- package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
- package/dist/{Hierarchy-DPEcTr0v.js → Hierarchy-CEOK8Gzh.js} +4 -4
- package/dist/{Legend-CTb6rZz_.js → Legend-CFvQiIfn.js} +4 -4
- package/dist/{LineSeries-Dg1aytHA.js → LineSeries-D_IL2qGF.js} +4 -4
- package/dist/{LinearGradient-D1hzMjaW.js → LinearGradient-CxQyCSEB.js} +2 -2
- package/dist/{PieSeries-C9YUWMnA.js → PieSeries-CMH0Z7pz.js} +8 -8
- package/dist/{RoundedRectangle-B23Oh_r6.js → RoundedRectangle-BKLX1LKM.js} +2 -2
- package/dist/{Scrollbar-CSoXoZSe.js → Scrollbar-CTI7_8Qw.js} +4 -4
- package/dist/{Slice-CIP7Vmzu.js → Slice-BUncQh1B.js} +11 -11
- package/dist/{Tick-CRu6rQQy.js → Tick--VhF0xlz.js} +2 -2
- package/dist/{Tooltip-RhAldW7s.js → Tooltip-vyZRZWih.js} +1 -1
- package/dist/{XYCursor-Z-Ral42q.js → XYCursor-CVUSpqb9.js} +3 -3
- package/dist/{ZoomableContainer-D1laxHnA.js → ZoomableContainer-Ca_pDVYQ.js} +2 -2
- package/dist/assets/index.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/components/button/styled.js +1 -1
- package/dist/components/charts/_common/format.js +149 -41
- package/dist/components/charts/_common/tooltip.js +2 -2
- package/dist/components/charts/_common/utils.js +16 -11
- package/dist/components/charts/candlestick/logic.js +34 -35
- package/dist/components/charts/column-line-mix/logic.js +40 -41
- package/dist/components/charts/donut-chart/logic.js +4 -4
- package/dist/components/charts/drill-down-treemap/logic.js +5 -5
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
- package/dist/components/charts/forecast-cone/logic.js +134 -120
- package/dist/components/charts/heatmap/logic.js +9 -9
- package/dist/components/charts/highlighting-line-data/logic.js +10 -10
- package/dist/components/charts/line/logic.js +19 -20
- package/dist/components/charts/logaritmic-scale/logic.js +30 -31
- package/dist/components/charts/multiple-value-axes/logic.js +18 -19
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +7 -7
- package/dist/components/charts/pie-chart/logic.js +4 -4
- package/dist/components/charts/stacked-area-radar/logic.js +9 -9
- package/dist/components/charts/stacked-column-chart/logic.js +10 -10
- package/dist/components/charts/xy-chart/logic.js +28 -29
- package/dist/components/collapsible-card/index.js +21 -30
- package/dist/components/collapsible-card/styled.js +16 -14
- package/dist/components/color-picker/index.js +2227 -3357
- package/dist/components/color-picker/styled.js +87 -7
- package/dist/components/confirm/dialog.js +89 -8
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/data-map/index.js +1 -1
- package/dist/components/data-map/logic.js +20 -20
- package/dist/components/data-security-selectors/dissemination-list/index.js +32 -3117
- package/dist/components/date-picker-with-custom-range/index.js +86 -7
- package/dist/components/date-range-picker/index.js +464 -452
- package/dist/components/document-viewer/components/viewer/index.js +1 -1
- package/dist/components/duration-select/index.js +10 -10
- package/dist/components/duration-select/styled.js +1 -1
- package/dist/components/geometry-picker/coordinate/index.js +14 -14
- package/dist/components/geometry-picker/edit/index.js +1 -1
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/kml/index.js +11 -11
- package/dist/components/geometry-picker/map/logic.js +145 -3656
- package/dist/components/geometry-picker/map/style.js +18 -17
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +43 -1255
- package/dist/components/heat-map/index.js +1 -1
- package/dist/components/heat-map/logic.js +77 -1924
- package/dist/components/instance-hierarchy-table/styled.js +18 -16
- package/dist/components/map/helpers/mapbox.js +17 -15
- package/dist/components/map/helpers/ol.js +386 -27
- package/dist/components/map/index.js +11 -10
- package/dist/components/map/logic.js +22 -22
- package/dist/components/map/styled.js +31 -27
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/components/metric-card/logic.js +46 -49
- package/dist/components/phone-input/index.js +10 -9
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/prr-map/index.js +1 -1
- package/dist/components/prr-map/logic.js +27 -26
- package/dist/components/range-selector/styled.js +65 -4228
- package/dist/components/raster-grid-map/index.js +1 -1
- package/dist/components/raster-grid-map/logic.js +60 -57
- package/dist/components/simple-pivot-table/index.js +17 -17
- package/dist/components/simple-pivot-table/logic.js +67 -76
- package/dist/components/sortable-list/index.js +1091 -1264
- package/dist/components/template-form/components/property-list/index.js +36 -33
- package/dist/components/template-form/components/property-list/property-list-columns.js +19 -18
- package/dist/components/template-form/components/property-list/property-list-form.js +137 -601
- package/dist/components/template-form/components/recognition-property-list/index.js +40 -37
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +11 -10
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +55 -63
- package/dist/components/tree-select/index.js +16 -16
- package/dist/index.esm-UfGMjYOL.js +197 -0
- package/dist/main.d.ts +67 -8
- package/dist/main.js +176 -175
- package/package.json +1 -1
- package/dist/AccordionSummary-CJppWeqF.js +0 -781
- package/dist/Add-CqcD1PWb.js +0 -403
- package/dist/Box-DqUMmZjL.js +0 -31
- package/dist/Button-C5yquWAB.js +0 -357
- package/dist/ButtonBase-BEF7oTOe.js +0 -887
- package/dist/DataProcessor-WXzhvIg6.js +0 -83
- package/dist/Delete-BdyYpINH.js +0 -23
- package/dist/DialogContent-BvVjD9z3.js +0 -523
- package/dist/FormGroup-CpBsIyYR.js +0 -89
- package/dist/GaplessDateAxis-DowssQ6y.js +0 -296
- package/dist/IconButton-BoGwbvrP.js +0 -184
- package/dist/InputLabel-Dd8RrneV.js +0 -341
- package/dist/MenuItem-DwqJqzuM.js +0 -233
- package/dist/Modal-MUZygjmQ.js +0 -1158
- package/dist/Paper-BkQLdsCI.js +0 -582
- package/dist/Select-DHUl_uG3.js +0 -3916
- package/dist/Source-BSZST_GH.js +0 -4410
- package/dist/SwitchBase-DTndTqI8.js +0 -235
- package/dist/Text-ChJRuaD8.js +0 -2197
- package/dist/TextField-e2oKaUN1.js +0 -669
- package/dist/TransitionGroupContext-BDAp2T0O.js +0 -96
- package/dist/Typography-DgsSLCFC.js +0 -178
- package/dist/Vector-BmuhQO4p.js +0 -3606
- package/dist/Vector-DfTqQEln.js +0 -1735
- package/dist/WKT-2wsDT-nq.js +0 -2310
- package/dist/assertThisInitialized-C1dAyb4j.js +0 -7
- package/dist/assets/index3.css +0 -1
- package/dist/assets/index4.css +0 -1
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/createChainedFunction-C0nujS3O.js +0 -9
- package/dist/createSvgIcon-Ch_cT8az.js +0 -185
- package/dist/createSvgIcon-DuDuASu1.js +0 -62
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/dialog-BYRnCztH.js +0 -154
- package/dist/formControlState-vgaj2ksH.js +0 -10
- package/dist/generateUtilityClasses-C3ivN9Ie.js +0 -2973
- package/dist/index-DH6qsPBn.js +0 -153
- package/dist/index-e9xTIYWt.js +0 -1934
- package/dist/index.esm-BLLrbTzY.js +0 -318
- package/dist/math-Bvt2Ubuz.js +0 -704
- package/dist/objectWithoutPropertiesLoose-DJteAcBH.js +0 -22
- package/dist/ol-yOE-NV0X.js +0 -7465
- package/dist/ownerWindow-wg6foiOE.js +0 -10
- package/dist/setPrototypeOf-NPgp4cYc.js +0 -8
- package/dist/styled-SoqbyrkW.js +0 -350
- package/dist/unsupportedProp-DuqR2hj9.js +0 -36
- package/dist/useControlled-BYdyS7Pn.js +0 -31
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useMobilePicker-CY8ndYRL.js +0 -8279
- package/dist/useSlot-B_Q4vnX5.js +0 -42
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { styled as a, Box as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { styled as a, Box as r, Typography as o, Chip as n } from "@mui/material";
|
|
2
|
+
import t from "@mui/material/Accordion";
|
|
3
|
+
import i from "@mui/material/AccordionDetails";
|
|
4
|
+
import c from "@mui/material/AccordionSummary";
|
|
5
|
+
const s = (e) => e !== "ownerState", g = a(r, {
|
|
4
6
|
name: "HCInstanceHierarchyTable",
|
|
5
7
|
slot: "root",
|
|
6
8
|
shouldForwardProp: s
|
|
7
|
-
})({}),
|
|
9
|
+
})({}), h = a(t, {
|
|
8
10
|
name: "HCInstanceHierarchyTable",
|
|
9
11
|
slot: "accordion"
|
|
10
12
|
})(({ theme: e }) => ({
|
|
@@ -12,7 +14,7 @@ const s = (e) => e !== "ownerState", l = a(n, {
|
|
|
12
14
|
"&:before": {
|
|
13
15
|
display: "none"
|
|
14
16
|
}
|
|
15
|
-
})),
|
|
17
|
+
})), y = a(c, {
|
|
16
18
|
name: "HCInstanceHierarchyTable",
|
|
17
19
|
slot: "summary"
|
|
18
20
|
})(({ theme: e }) => ({
|
|
@@ -25,7 +27,7 @@ const s = (e) => e !== "ownerState", l = a(n, {
|
|
|
25
27
|
marginLeft: e.spacing(1),
|
|
26
28
|
alignItems: "center"
|
|
27
29
|
}
|
|
28
|
-
})),
|
|
30
|
+
})), H = a(i, {
|
|
29
31
|
name: "HCInstanceHierarchyTable",
|
|
30
32
|
slot: "details"
|
|
31
33
|
})(({ theme: e }) => ({
|
|
@@ -34,19 +36,19 @@ const s = (e) => e !== "ownerState", l = a(n, {
|
|
|
34
36
|
paddingBottom: 0,
|
|
35
37
|
borderTop: "1px solid rgba(0, 0, 0, .125)",
|
|
36
38
|
background: e.palette.grey[100]
|
|
37
|
-
})),
|
|
39
|
+
})), b = a("img", {
|
|
38
40
|
name: "HCInstanceHierarchyTable",
|
|
39
41
|
slot: "templateIcon"
|
|
40
42
|
})({
|
|
41
43
|
height: 22,
|
|
42
44
|
maxWidth: 22
|
|
43
|
-
}),
|
|
45
|
+
}), u = a(o, {
|
|
44
46
|
name: "HCInstanceHierarchyTable",
|
|
45
47
|
slot: "templateName"
|
|
46
48
|
})(({ theme: e }) => ({
|
|
47
49
|
fontWeight: 500,
|
|
48
50
|
marginLeft: e.spacing(2)
|
|
49
|
-
})),
|
|
51
|
+
})), f = a(n, {
|
|
50
52
|
name: "HCInstanceHierarchyTable",
|
|
51
53
|
slot: "countChip"
|
|
52
54
|
})(({ theme: e }) => ({
|
|
@@ -59,12 +61,12 @@ const s = (e) => e !== "ownerState", l = a(n, {
|
|
|
59
61
|
marginLeft: e.spacing(2)
|
|
60
62
|
}));
|
|
61
63
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
h as Accordion,
|
|
65
|
+
H as AccordionDetails,
|
|
66
|
+
y as AccordionSummary,
|
|
67
|
+
f as CountChip,
|
|
66
68
|
T as HierarchyLabel,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
g as HierarchyRoot,
|
|
70
|
+
b as TemplateIcon,
|
|
71
|
+
u as TemplateName
|
|
70
72
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import r from "mapbox-gl";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import b from "ol/layer/Layer";
|
|
3
|
+
import { toLonLat as u } from "ol/proj";
|
|
4
|
+
import y from "ol/source/Source";
|
|
5
|
+
const L = ({ id: n = "map", center: s, style: i, accessToken: c }) => {
|
|
6
|
+
r.accessToken = c;
|
|
5
7
|
const e = new r.Map({
|
|
6
|
-
style:
|
|
8
|
+
style: i,
|
|
7
9
|
attributionControl: !1,
|
|
8
10
|
boxZoom: !1,
|
|
9
11
|
center: s,
|
|
@@ -21,28 +23,28 @@ const v = ({ id: n = "map", center: s, style: c, accessToken: i }) => {
|
|
|
21
23
|
projection: {
|
|
22
24
|
name: "mercator"
|
|
23
25
|
}
|
|
24
|
-
}),
|
|
26
|
+
}), t = new b({
|
|
25
27
|
render: function(l) {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const f =
|
|
29
|
-
|
|
30
|
-
const p =
|
|
28
|
+
const o = e.getCanvas(), a = l.viewState, m = t.getVisible();
|
|
29
|
+
o.style.display = m ? "block" : "none", o.style.position = "absolute";
|
|
30
|
+
const f = t.getOpacity();
|
|
31
|
+
o.style.opacity = String(f);
|
|
32
|
+
const p = a.rotation;
|
|
31
33
|
return e.jumpTo({
|
|
32
34
|
// @ts-ignore
|
|
33
|
-
center: u(
|
|
34
|
-
zoom:
|
|
35
|
+
center: u(a.center),
|
|
36
|
+
zoom: a.zoom - 1,
|
|
35
37
|
bearing: -p * 180 / Math.PI,
|
|
36
38
|
animate: !1
|
|
37
|
-
}), e._frame && (e._frame.cancel(), e._frame = null), e._render(),
|
|
39
|
+
}), e._frame && (e._frame.cancel(), e._frame = null), e._render(), o;
|
|
38
40
|
},
|
|
39
41
|
source: new y({})
|
|
40
42
|
});
|
|
41
43
|
return {
|
|
42
44
|
map: e,
|
|
43
|
-
layer:
|
|
45
|
+
layer: t
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
48
|
export {
|
|
47
|
-
|
|
49
|
+
L as createMapboxLayer
|
|
48
50
|
};
|
|
@@ -1,29 +1,388 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var N = (n, t, e) => t in n ? b(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var m = (n, t, e) => N(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import p from "lodash";
|
|
5
|
+
import { Feature as g } from "ol";
|
|
6
|
+
import { defaults as R } from "ol/control/defaults";
|
|
7
|
+
import { getCenter as T } from "ol/extent";
|
|
8
|
+
import { KML as S, WKT as L } from "ol/format";
|
|
9
|
+
import { Point as P, Circle as I } from "ol/geom";
|
|
10
|
+
import { fromCircle as z } from "ol/geom/Polygon";
|
|
11
|
+
import { defaults as _ } from "ol/interaction/defaults";
|
|
12
|
+
import j from "ol/layer/Tile";
|
|
13
|
+
import v from "ol/layer/Vector";
|
|
14
|
+
import A from "ol/Map";
|
|
15
|
+
import * as w from "ol/proj";
|
|
16
|
+
import E from "ol/source/Cluster";
|
|
17
|
+
import y from "ol/source/Vector";
|
|
18
|
+
import { Style as h, Icon as F, Text as k, Fill as V } from "ol/style";
|
|
19
|
+
import W from "ol/View";
|
|
20
|
+
import { defaultStyle as K, selectStyleFunction as B } from "../styled.js";
|
|
21
|
+
import { getNumberCoordinates as x, validate as M, parse as O, getGeometries as G, findPlacemarkCoordinates as X, build as $ } from "./kml.js";
|
|
22
|
+
import { parse as q, findCoordinate as H } from "./wkt.js";
|
|
23
|
+
const C = {
|
|
24
|
+
featureProjection: "EPSG:3857",
|
|
25
|
+
dataProjection: "EPSG:4326"
|
|
26
|
+
};
|
|
27
|
+
class J extends A {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
m(this, "centerToFeature", (e, r = [0, 0, 0, 0]) => {
|
|
31
|
+
const s = e.getGeometry();
|
|
32
|
+
if (s) {
|
|
33
|
+
const o = s.getExtent();
|
|
34
|
+
this.centerToExtent(o, 12, r);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
m(this, "getBoundingBox", () => {
|
|
38
|
+
let e = this.getView().calculateExtent();
|
|
39
|
+
return e = w.transformExtent(e, "EPSG:3857", "EPSG:4326"), {
|
|
40
|
+
bottomLeft: {
|
|
41
|
+
latitude: e[1],
|
|
42
|
+
longitude: e[0]
|
|
43
|
+
},
|
|
44
|
+
topRight: {
|
|
45
|
+
latitude: e[3],
|
|
46
|
+
longitude: e[2]
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
m(this, "getResolution", () => this.getView().getResolution());
|
|
51
|
+
m(this, "getResolutionForZoom", (e) => this.getView().getResolutionForZoom(e));
|
|
52
|
+
m(this, "getZoomLevel", () => this.getView().getZoom());
|
|
53
|
+
m(this, "insertLayerAt", (e, r) => {
|
|
54
|
+
this.getLayers().insertAt(e, r);
|
|
55
|
+
});
|
|
56
|
+
m(this, "removeOverlayById", (e) => {
|
|
57
|
+
const r = this.getOverlayById(e);
|
|
58
|
+
this.removeOverlay(r);
|
|
59
|
+
});
|
|
60
|
+
m(this, "setCenter", (e) => {
|
|
61
|
+
this.getView().setCenter(e);
|
|
62
|
+
});
|
|
63
|
+
m(this, "setZoomLevel", (e) => this.getView().setZoom(e));
|
|
64
|
+
m(this, "zoomIn", () => {
|
|
65
|
+
this.getView().animate({
|
|
66
|
+
zoom: (this.getView().getZoom() ?? 10) + 1,
|
|
67
|
+
duration: 250
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
m(this, "zoomOut", () => {
|
|
71
|
+
this.getView().animate({
|
|
72
|
+
zoom: (this.getView().getZoom() ?? 10) - 1,
|
|
73
|
+
duration: 250
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
centerToExtent(e, r = 12, s = [0, 0, 0, 0]) {
|
|
78
|
+
this.getView().fit(e, {
|
|
79
|
+
minResolution: r,
|
|
80
|
+
padding: s
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const he = (n, t, e, r = "map", s = {
|
|
85
|
+
doubleClickZoom: !0
|
|
86
|
+
}, o = {
|
|
87
|
+
zoom: !0,
|
|
88
|
+
zoomOptions: {
|
|
89
|
+
zoomInLabel: "+",
|
|
90
|
+
zoomOutLabel: "-",
|
|
91
|
+
zoomInClassName: "",
|
|
92
|
+
zoomOutClassName: ""
|
|
93
|
+
}
|
|
94
|
+
}) => new J({
|
|
95
|
+
target: r,
|
|
96
|
+
layers: n,
|
|
97
|
+
view: new W({
|
|
98
|
+
center: w.fromLonLat([t.longitude, t.latitude]),
|
|
99
|
+
zoom: e,
|
|
100
|
+
extent: w.transformExtent([-178, -88, 178, 88], "EPSG:4326", "EPSG:3857")
|
|
101
|
+
}),
|
|
102
|
+
interactions: _(s),
|
|
103
|
+
controls: R(o)
|
|
104
|
+
}), Fe = (n) => new j({
|
|
105
|
+
source: n
|
|
106
|
+
}), Se = ({
|
|
107
|
+
features: n,
|
|
108
|
+
writeStyles: t = !1,
|
|
109
|
+
projections: e = C
|
|
110
|
+
}) => {
|
|
111
|
+
const r = new S({
|
|
112
|
+
writeStyles: t
|
|
113
|
+
}), s = [];
|
|
114
|
+
return n.forEach((c) => {
|
|
115
|
+
var i;
|
|
116
|
+
if (((i = c.getGeometry()) == null ? void 0 : i.getType()) === "Circle") {
|
|
117
|
+
const u = c.getGeometry(), a = new g({
|
|
118
|
+
geometry: z(u),
|
|
119
|
+
type: "Circle",
|
|
120
|
+
center: u.getCenter().join(","),
|
|
121
|
+
radius: u.getRadius()
|
|
122
|
+
});
|
|
123
|
+
a.setStyle(c.getStyle()), s.push(a);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
s.push(c);
|
|
127
|
+
}), r.writeFeatures(s, {
|
|
128
|
+
...e
|
|
129
|
+
});
|
|
130
|
+
}, Q = ({
|
|
131
|
+
features: n,
|
|
132
|
+
projections: t = C
|
|
133
|
+
}) => {
|
|
134
|
+
const e = new L(), r = [];
|
|
135
|
+
return n.forEach((o) => {
|
|
136
|
+
var c;
|
|
137
|
+
if (((c = o.getGeometry()) == null ? void 0 : c.getType()) === "Circle") {
|
|
138
|
+
const i = o.getGeometry(), u = new g({
|
|
139
|
+
geometry: z(i),
|
|
140
|
+
type: "Circle",
|
|
141
|
+
center: i.getCenter().join(","),
|
|
142
|
+
radius: i.getRadius()
|
|
143
|
+
});
|
|
144
|
+
r.push(u);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
r.push(o);
|
|
148
|
+
}), e.writeFeatures(r, {
|
|
149
|
+
...t
|
|
150
|
+
});
|
|
151
|
+
}, Z = (n, t, e, r = 0.35) => {
|
|
152
|
+
p.isArray(n) && n.forEach((i) => Z(i, t, e));
|
|
153
|
+
const s = x(n.Point.coordinates), o = new g({
|
|
154
|
+
geometry: new P(w.fromLonLat(s)),
|
|
155
|
+
icon: t,
|
|
156
|
+
extraData: e
|
|
157
|
+
}), c = new h({
|
|
158
|
+
image: new F({
|
|
159
|
+
anchor: [0.5, 0.5],
|
|
160
|
+
src: t,
|
|
161
|
+
scale: r
|
|
162
|
+
}),
|
|
163
|
+
zIndex: 1
|
|
164
|
+
});
|
|
165
|
+
return o.setStyle(c), o;
|
|
166
|
+
}, Le = (n, t, e, r = 0.35) => {
|
|
167
|
+
if (M(n) === !0) {
|
|
168
|
+
const o = O(n), c = G(o);
|
|
169
|
+
if (p.has(c, "Placemark"))
|
|
170
|
+
return Z(c.Placemark, t, e, r);
|
|
171
|
+
} else return !1;
|
|
172
|
+
}, U = (n, t, e, r, s = 0.35) => {
|
|
173
|
+
if (M(n) === !0) {
|
|
174
|
+
const c = O(n), i = G(c);
|
|
175
|
+
if (p.has(i, "Placemark")) {
|
|
176
|
+
const u = p.isArray(i.Placemark) ? i.Placemark : [i.Placemark], a = X(u);
|
|
177
|
+
let l = G(c, ["Point"]);
|
|
178
|
+
l !== null && (l = $(l));
|
|
179
|
+
const f = new g({
|
|
180
|
+
geometry: new P(w.fromLonLat(a)),
|
|
181
|
+
icon: t,
|
|
182
|
+
clusterIcon: e,
|
|
183
|
+
extraData: r,
|
|
184
|
+
extraGeometries: l
|
|
185
|
+
}), d = new h({
|
|
186
|
+
image: new F({
|
|
187
|
+
anchor: [0.5, 0.5],
|
|
188
|
+
src: t,
|
|
189
|
+
scale: s
|
|
190
|
+
}),
|
|
191
|
+
zIndex: 1
|
|
192
|
+
});
|
|
193
|
+
return f.setStyle(d), [f];
|
|
194
|
+
}
|
|
195
|
+
return [];
|
|
196
|
+
}
|
|
197
|
+
return [];
|
|
198
|
+
}, Pe = (n, t = "EPSG:4326", e = "EPSG:3857") => {
|
|
199
|
+
var c;
|
|
200
|
+
const r = new S().readFeatures(n, {
|
|
201
|
+
dataProjection: t,
|
|
202
|
+
featureProjection: e
|
|
203
|
+
}), o = (c = new y({
|
|
204
|
+
features: r,
|
|
205
|
+
format: new S()
|
|
206
|
+
}).getFeatures()[0].getGeometry()) == null ? void 0 : c.getExtent();
|
|
207
|
+
return o ? T(o) : !1;
|
|
208
|
+
}, Ce = (n, t, e, r) => {
|
|
209
|
+
let s = [];
|
|
210
|
+
if (r.forEach((o) => {
|
|
211
|
+
o.geometry.forEach((c) => {
|
|
212
|
+
const i = U(c, o.icon, t, o.data);
|
|
213
|
+
i && i.length > 0 && (s = [...s, ...i]);
|
|
214
|
+
});
|
|
215
|
+
}), s.length > 0) {
|
|
216
|
+
const o = new y({
|
|
217
|
+
features: s
|
|
218
|
+
}), c = new E({
|
|
219
|
+
distance: 50,
|
|
220
|
+
source: o,
|
|
221
|
+
createCluster: function(u, a) {
|
|
222
|
+
const l = a.length, f = new g({
|
|
223
|
+
geometry: u,
|
|
224
|
+
features: a
|
|
225
|
+
}), d = new h({
|
|
226
|
+
image: new F({
|
|
227
|
+
anchor: [0.5, 0.5],
|
|
228
|
+
src: l === 1 ? a[0].get("icon") : a[0].get("clusterIcon"),
|
|
229
|
+
scale: e
|
|
230
|
+
}),
|
|
231
|
+
...l > 1 && {
|
|
232
|
+
text: new k({
|
|
233
|
+
text: l.toString(),
|
|
234
|
+
font: "12px sans-serif",
|
|
235
|
+
fill: new V({
|
|
236
|
+
color: "#fff"
|
|
237
|
+
})
|
|
238
|
+
})
|
|
239
|
+
},
|
|
240
|
+
zIndex: 1
|
|
241
|
+
});
|
|
242
|
+
return f.setStyle(d), f;
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
return new v({
|
|
246
|
+
source: c
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
return !1;
|
|
250
|
+
}, Ge = (n, t) => {
|
|
251
|
+
var s;
|
|
252
|
+
const r = (s = new y({
|
|
253
|
+
format: new S({
|
|
254
|
+
writeStyles: t
|
|
255
|
+
}),
|
|
256
|
+
wrapX: !1
|
|
257
|
+
}).getFormat()) == null ? void 0 : s.readFeatures(n, {
|
|
258
|
+
...C
|
|
259
|
+
});
|
|
260
|
+
return r && r.length > 0 ? r.map((c) => {
|
|
261
|
+
const { type: i, center: u, radius: a } = c.getProperties();
|
|
262
|
+
if (i === "Circle") {
|
|
263
|
+
const l = x(u);
|
|
264
|
+
c.setGeometry(new I(l, Number(a)));
|
|
265
|
+
}
|
|
266
|
+
return t || c.setStyle(K), c;
|
|
267
|
+
}) : !1;
|
|
268
|
+
}, Y = (n, t, e, r, s = 0.35) => {
|
|
269
|
+
let o = q(n);
|
|
270
|
+
if (o) {
|
|
271
|
+
p.isArray(o) && (o = o[0]);
|
|
272
|
+
const c = H(o);
|
|
273
|
+
let i = null;
|
|
274
|
+
o.type !== "Point" && (i = n);
|
|
275
|
+
const u = new g({
|
|
276
|
+
type: "INSTANCE",
|
|
277
|
+
geometry: new P(w.fromLonLat(c)),
|
|
278
|
+
icon: t,
|
|
279
|
+
clusterIcon: e,
|
|
280
|
+
extraData: r,
|
|
281
|
+
extraGeometries: i
|
|
282
|
+
});
|
|
283
|
+
r != null && r.id && u.setId(r.id);
|
|
284
|
+
const a = new h({
|
|
285
|
+
image: new F({
|
|
286
|
+
anchor: [0.5, 0.5],
|
|
287
|
+
src: t,
|
|
288
|
+
scale: s,
|
|
289
|
+
crossOrigin: "anonymous"
|
|
290
|
+
}),
|
|
291
|
+
zIndex: 1
|
|
292
|
+
});
|
|
293
|
+
return u.setStyle(a), [u];
|
|
294
|
+
}
|
|
295
|
+
return [];
|
|
296
|
+
}, xe = (n, t, e, r) => {
|
|
297
|
+
let s = [];
|
|
298
|
+
if (r.forEach((o) => {
|
|
299
|
+
o.geometry.forEach((c) => {
|
|
300
|
+
const i = Y(c, o.icon, t, o.data);
|
|
301
|
+
i && i.length > 0 && (s = [...s, ...i]);
|
|
302
|
+
});
|
|
303
|
+
}), s.length > 0) {
|
|
304
|
+
const o = new y({
|
|
305
|
+
features: s
|
|
306
|
+
}), c = new E({
|
|
307
|
+
distance: 50,
|
|
308
|
+
source: o,
|
|
309
|
+
createCluster: function(u, a) {
|
|
310
|
+
const l = a.length, f = new g({
|
|
311
|
+
geometry: u,
|
|
312
|
+
features: a
|
|
313
|
+
}), d = new h({
|
|
314
|
+
image: new F({
|
|
315
|
+
anchor: [0.5, 0.5],
|
|
316
|
+
src: l === 1 ? a[0].get("icon") : a[0].get("clusterIcon"),
|
|
317
|
+
scale: e
|
|
318
|
+
}),
|
|
319
|
+
...l > 1 && {
|
|
320
|
+
text: new k({
|
|
321
|
+
text: l.toString(),
|
|
322
|
+
font: "12px sans-serif",
|
|
323
|
+
fill: new V({
|
|
324
|
+
color: "#fff"
|
|
325
|
+
})
|
|
326
|
+
})
|
|
327
|
+
},
|
|
328
|
+
zIndex: 1
|
|
329
|
+
});
|
|
330
|
+
return f.setStyle(d), f;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
return new v({
|
|
334
|
+
source: c,
|
|
335
|
+
style: B
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
return !1;
|
|
339
|
+
}, Te = (n, t, e = K) => {
|
|
340
|
+
var o;
|
|
341
|
+
const s = (o = new y({
|
|
342
|
+
format: new L(),
|
|
343
|
+
wrapX: !1
|
|
344
|
+
}).getFormat()) == null ? void 0 : o.readFeatures(n, {
|
|
345
|
+
...C
|
|
346
|
+
});
|
|
347
|
+
return s && s.length > 0 ? s.map((i) => {
|
|
348
|
+
const { type: u, center: a, radius: l } = i.getProperties();
|
|
349
|
+
if (u === "Circle") {
|
|
350
|
+
const f = x(a);
|
|
351
|
+
i.setGeometry(new I(f, Number(l)));
|
|
352
|
+
}
|
|
353
|
+
return i.setStyle(e), i.set("extraData", t), t != null && t.id && i.setId(t.id), i;
|
|
354
|
+
}) : !1;
|
|
355
|
+
}, Ie = (n, t = "EPSG:4326", e = "EPSG:3857") => {
|
|
356
|
+
var c;
|
|
357
|
+
const r = new L().readFeatures(n, {
|
|
358
|
+
dataProjection: t,
|
|
359
|
+
featureProjection: e
|
|
360
|
+
});
|
|
361
|
+
return (c = new y({
|
|
362
|
+
features: r,
|
|
363
|
+
format: new L()
|
|
364
|
+
}).getFeatures()[0].getGeometry()) == null ? void 0 : c.getExtent();
|
|
365
|
+
}, ze = (n) => {
|
|
366
|
+
const t = T(n), e = new g({
|
|
367
|
+
geometry: new P(t)
|
|
368
|
+
});
|
|
369
|
+
return Q({ features: [e] });
|
|
370
|
+
};
|
|
12
371
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
372
|
+
J as MyMap,
|
|
373
|
+
Se as convertFeaturesToKML,
|
|
374
|
+
Q as convertFeaturesToWKT,
|
|
375
|
+
Ce as createClusterFromKMLMarkers,
|
|
376
|
+
xe as createClusterFromWKTMarkers,
|
|
377
|
+
Ge as createFeaturesFromKML,
|
|
378
|
+
Te as createFeaturesFromWKT,
|
|
379
|
+
Le as createKMLFeature,
|
|
380
|
+
Z as createKMLPlacemark,
|
|
381
|
+
he as createMap,
|
|
382
|
+
Fe as createTileLayer,
|
|
383
|
+
Pe as findCenterOfKMLPolygon,
|
|
384
|
+
ze as getWKTCenterOfExtent,
|
|
385
|
+
Ie as getWKTExtent,
|
|
386
|
+
U as kmlToIconFeatures,
|
|
387
|
+
Y as wktToIconFeatures
|
|
29
388
|
};
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import t from "react";
|
|
3
3
|
import f from "./logic.js";
|
|
4
4
|
import a from "./styled.js";
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import "ol/ol.css";
|
|
6
|
+
const p = (o, i) => {
|
|
7
|
+
var e, r;
|
|
7
8
|
const { refs: s, action: m } = f(o);
|
|
8
|
-
return
|
|
9
|
+
return t.useImperativeHandle(i, () => m), /* @__PURE__ */ n(
|
|
9
10
|
a.Container,
|
|
10
11
|
{
|
|
11
12
|
sx: {
|
|
12
13
|
// position: 'relative',
|
|
13
|
-
cursor: ((
|
|
14
|
+
cursor: ((e = o.options) == null ? void 0 : e.cursor) || "default"
|
|
14
15
|
},
|
|
15
|
-
children: /* @__PURE__ */
|
|
16
|
+
children: /* @__PURE__ */ n(
|
|
16
17
|
a.Container,
|
|
17
18
|
{
|
|
18
19
|
id: o.id || "map",
|
|
19
20
|
ref: s.mapContainer,
|
|
20
|
-
cssPosition: (
|
|
21
|
+
cssPosition: (r = o.options) == null ? void 0 : r.cssPosition,
|
|
21
22
|
onContextMenu: (c) => c.preventDefault(),
|
|
22
23
|
className: "map"
|
|
23
24
|
}
|
|
24
25
|
)
|
|
25
26
|
}
|
|
26
27
|
);
|
|
27
|
-
},
|
|
28
|
+
}, C = t.memo(t.forwardRef(p));
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
C as Map
|
|
30
31
|
};
|