@hybridcore/ui 1.3.6 → 1.4.0
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/AccordionDetails-CGs6GZQK.js +454 -0
- package/dist/Add-eepk2WTM.js +379 -0
- package/dist/Box-BPyg-Ybm.js +70 -0
- package/dist/Button-DLwB_sKd.js +354 -0
- package/dist/{ButtonBase-D6qhsxB0.js → ButtonBase-D0qccOVb.js} +6 -5
- package/dist/{CardContent-B8hqgH-I.js → CardContent-DFsCCOWk.js} +4 -4
- package/dist/{Checkbox-BFWhj3s-.js → Checkbox-qy3cjvnb.js} +134 -195
- package/dist/{Collapse-D_TjnyE5.js → Collapse-CL6LGGZw.js} +68 -75
- package/dist/Delete-OHEw9lDi.js +22 -0
- package/dist/DialogContent-CxOSq6h9.js +519 -0
- package/dist/FormControlLabel-D9KFjcIx.js +193 -0
- package/dist/{IconButton-D8bwME9t.js → IconButton-BaiyAtmS.js} +5 -5
- package/dist/{Input-Dxzguyp5.js → Input-CmCkXczh.js} +6 -6
- package/dist/{InputAdornment-B8ERE7Zv.js → InputAdornment-CZUPEeia.js} +5 -5
- package/dist/{FormControl-BMRUQKHh.js → InputLabel-CWkW8NtU.js} +316 -316
- package/dist/{List-DEWyK9IO.js → List-PpNAWJ_I.js} +4 -4
- package/dist/ListItem-CZbZ91vp.js +428 -0
- package/dist/{MenuItem-DstAFfik.js → MenuItem-D-INSvZa.js} +7 -7
- package/dist/{Modal-DNGEQJ1M.js → Modal-KrI5qFIq.js} +61 -57
- package/dist/{OutlinedInput-w2Cj9STF.js → OutlinedInput-DkIUD30e.js} +6 -6
- package/dist/{Paper-BseeergJ.js → Paper-btu3j72o.js} +5 -5
- package/dist/{Select-NDq3WyLt.js → Select-ClaBvSqf.js} +20 -18
- package/dist/Tabs-BzelDJKy.js +787 -0
- package/dist/TextField-D87qTh1k.js +457 -0
- package/dist/Typography-Bm7PFqUT.js +176 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/components/card/index.js +6 -6
- package/dist/components/card/styled.js +1 -1
- package/dist/components/collapsible-card/style.js +20 -466
- package/dist/components/confirm/dialog.js +8 -149
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +7 -7
- package/dist/components/context-menu/index.js +191 -604
- package/dist/components/data-security-selectors/dissemination-list/index.js +12 -6
- package/dist/components/data-security-selectors/security-level/index.js +46 -45
- package/dist/components/date-time-picker/index.js +85 -64
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +16 -16
- package/dist/components/geometry-picker/geometry/index.js +35 -35
- package/dist/components/geometry-picker/index.js +60 -56
- package/dist/components/geometry-picker/kml/index.js +14 -14
- package/dist/components/geometry-picker/map/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +38 -37
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +63 -59
- package/dist/components/geometry-picker/parser/logic.js +33 -32
- package/dist/components/geometry-picker/styled.js +22 -14
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button/styled.js +0 -2
- package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/index.js +2 -2
- package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +15 -6
- package/dist/components/instance-form/components/variable/index.js +19 -0
- package/dist/components/instance-form/components/variables/index.js +40 -0
- package/dist/components/{data-management/instance-form → instance-form}/index.js +174 -155
- package/dist/components/instance-hierarchy-table/index.js +58 -0
- package/dist/components/instance-hierarchy-table/styled.js +29 -0
- package/dist/components/instance-table/index.js +125 -0
- package/dist/components/instance-table/styled.js +13 -0
- package/dist/components/map/helpers/ol.js +1 -1
- package/dist/components/map/index.js +1 -1
- package/dist/components/map/logic.js +1 -1
- package/dist/components/map/styled.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/property-mapping/index.js +558 -0
- package/dist/components/range-selector/components/composite-list-range/index.js +81 -0
- package/dist/components/range-selector/components/date-range/index.js +9 -0
- package/dist/components/range-selector/components/geometry-range/index.js +26 -0
- package/dist/components/range-selector/components/number-range/index.js +86 -0
- package/dist/components/range-selector/components/string-range/index.js +31 -0
- package/dist/components/range-selector/index.js +59 -0
- package/dist/components/search-input/index.js +4 -4
- package/dist/components/tabs/appleTabs.style.js +55 -0
- package/dist/components/tabs/index.js +93 -0
- package/dist/components/tabs/tab-panel.js +18 -0
- package/dist/components/template-form/components/catalogue-instance-selector/index.js +158 -0
- package/dist/components/template-form/components/property-list/index.js +72 -0
- package/dist/components/template-form/components/property-list/property-list-columns.js +125 -0
- package/dist/components/template-form/components/property-list/property-list-form.js +16 -0
- package/dist/components/template-form/components/property-list/property-list-logic.js +66 -0
- package/dist/components/template-form/components/property-list/types.js +8 -0
- package/dist/components/template-form/components/recognition-property-list/index.js +69 -0
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +50 -0
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +174 -0
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-logic.js +64 -0
- package/dist/components/template-form/components/recognition-property-list/types.js +8 -0
- package/dist/components/template-form/components/select-icon/index.js +186 -0
- package/dist/components/template-form/components/select-icon/styled.js +76 -0
- package/dist/components/template-form/index.js +338 -0
- package/dist/components/template-property-filters/property.js +48 -46
- package/dist/components/tree-select/index.js +51 -49
- package/dist/components/tree-select/styled.js +2 -2
- package/dist/components/treeview-filter/index.js +8 -8
- package/dist/components/treeview-filter/item/index.js +1 -1
- package/dist/components/treeview-filter/item-label/index.js +18 -17
- package/dist/constants/index.js +41 -0
- package/dist/{createStyled-B96gjom1.js → createStyled-BzvgQjjR.js} +487 -464
- package/dist/createSvgIcon-Cfm1LkEe.js +73 -0
- package/dist/{createSvgIcon-BNrb7rDY.js → createSvgIcon-DEXLbMwp.js} +62 -90
- package/dist/dialog-v5-nL5yy.js +153 -0
- package/dist/{exactProp-CI_rjX83.js → exactProp-DkmnwNVS.js} +3 -3
- package/dist/extendSxProp-qqdkfHzS.js +30 -0
- package/dist/{index-CSfSVkKj.js → index-B0JPwFI9.js} +6 -5
- package/dist/index-C1fczHEW.js +11042 -0
- package/dist/index-DPf5olog.js +288 -0
- package/dist/{index-JrtqxUdI.js → index-DlnzUkwe.js} +1 -1
- package/dist/{listItemTextClasses-CFiI_U7B.js → listItemTextClasses-DsHGzpPM.js} +2 -2
- package/dist/main.d.ts +569 -81
- package/dist/main.js +157 -157
- package/dist/{ol-BUKJ1urU.js → ol-CHaVTXvL.js} +24 -24
- package/dist/property-list-form-BfP9gzSo.js +391 -0
- package/dist/requirePropFactory-BjhhI-AW.js +18 -0
- package/dist/{styled-cPJbqF0E.js → styled-LNCprp4n.js} +24 -22
- package/dist/unsupportedProp-BuVD30Gh.js +9 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/{useTheme-C-T6Qisa.js → useTheme-DBiahn6p.js} +2 -2
- package/dist/{useThemeProps-DeftUmqJ.js → useThemeProps-uYx_RkOH.js} +16 -14
- package/dist/utils/ontology.js +52 -30
- package/dist/{utils-CCkxV0lZ.js → utils-DNe_YYjm.js} +16 -16
- package/package.json +2 -1
- package/dist/DialogContent-BCYm_d1s.js +0 -864
- package/dist/FormControlLabel-DENNVXWL.js +0 -639
- package/dist/Typography-Dg-ROiTA.js +0 -201
- package/dist/components/data-management/instance-form/components/variable/index.js +0 -17
- package/dist/components/data-management/instance-form/components/variables/index.js +0 -39
- package/dist/createSvgIcon-B2WT0K4k.js +0 -87
- package/dist/index-B3Oj04nl.js +0 -287
- package/dist/components/{data-management/instance-form → instance-form}/components/policy-list/index.js +0 -0
- package/dist/{extends-Cyw62AD_.js → objectWithoutPropertiesLoose-BK36oJDi.js} +9 -9
|
@@ -1,131 +1,135 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Container as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as i, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { EditOutlined as f, DeleteOutline as D, AddLocationOutlined as I, DrawOutlined as A, LayersOutlined as p } from "@mui/icons-material";
|
|
3
|
+
import { Container as O, Actions as S, Button as d } from "./styled.js";
|
|
4
|
+
import y from "./logic.js";
|
|
5
5
|
import k from "./coordinate/index.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { IconButton as
|
|
11
|
-
import {
|
|
12
|
-
import { I as
|
|
13
|
-
import { I as
|
|
14
|
-
const
|
|
6
|
+
import E from "./edit/index.js";
|
|
7
|
+
import b from "./geometry/index.js";
|
|
8
|
+
import g from "./kml/index.js";
|
|
9
|
+
import W from "./wkt/index.js";
|
|
10
|
+
import { IconButton as u, OutlinedInput as K, FilledInput as L, Dialog as z, DialogTitle as F, DialogContent as G } from "@mui/material";
|
|
11
|
+
import { I as w } from "../../InputAdornment-CZUPEeia.js";
|
|
12
|
+
import { F as B, I as M } from "../../InputLabel-CWkW8NtU.js";
|
|
13
|
+
import { I as T } from "../../Input-CmCkXczh.js";
|
|
14
|
+
const Z = ({
|
|
15
15
|
label: c,
|
|
16
|
-
mapboxAccessToken:
|
|
16
|
+
mapboxAccessToken: l,
|
|
17
17
|
value: e = "",
|
|
18
|
-
disableAddCoordinate:
|
|
19
|
-
defaultExtent:
|
|
20
|
-
|
|
18
|
+
disableAddCoordinate: h = !1,
|
|
19
|
+
defaultExtent: a,
|
|
20
|
+
variant: r = "outlined",
|
|
21
|
+
onChange: C
|
|
21
22
|
}) => {
|
|
22
|
-
const { state: t, action: n } =
|
|
23
|
+
const { state: t, action: n } = y({
|
|
23
24
|
label: c,
|
|
24
25
|
value: e,
|
|
25
|
-
mapboxAccessToken:
|
|
26
|
-
onChange:
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
mapboxAccessToken: l,
|
|
27
|
+
onChange: C
|
|
28
|
+
}), m = /* @__PURE__ */ o(w, { position: "end", children: e !== "" && /* @__PURE__ */ i(s, { children: [
|
|
29
|
+
/* @__PURE__ */ o(u, { size: "small", onClick: n.onEdit, children: /* @__PURE__ */ o(f, { fontSize: "small" }) }),
|
|
30
|
+
/* @__PURE__ */ o(u, { size: "small", onClick: n.onDelete, children: /* @__PURE__ */ o(D, { fontSize: "small" }) })
|
|
31
|
+
] }) });
|
|
32
|
+
return /* @__PURE__ */ i(s, { children: [
|
|
33
|
+
/* @__PURE__ */ i(O, { children: [
|
|
34
|
+
/* @__PURE__ */ i(S, { variant: r, children: [
|
|
35
|
+
h === !1 && /* @__PURE__ */ o(
|
|
36
|
+
d,
|
|
33
37
|
{
|
|
34
38
|
color: "inherit",
|
|
35
|
-
startIcon: /* @__PURE__ */ o(
|
|
39
|
+
startIcon: /* @__PURE__ */ o(I, {}),
|
|
36
40
|
onClick: n.onAddCoordinate,
|
|
37
41
|
children: "Add Coordinate"
|
|
38
42
|
}
|
|
39
43
|
),
|
|
40
44
|
/* @__PURE__ */ o(
|
|
41
|
-
|
|
45
|
+
d,
|
|
42
46
|
{
|
|
43
47
|
color: "inherit",
|
|
44
|
-
startIcon: /* @__PURE__ */ o(
|
|
48
|
+
startIcon: /* @__PURE__ */ o(A, {}),
|
|
45
49
|
onClick: n.onDraw,
|
|
46
50
|
children: "Draw"
|
|
47
51
|
}
|
|
48
52
|
),
|
|
49
53
|
/* @__PURE__ */ o(
|
|
50
|
-
|
|
54
|
+
d,
|
|
51
55
|
{
|
|
52
56
|
color: "inherit",
|
|
53
|
-
startIcon: /* @__PURE__ */ o(
|
|
57
|
+
startIcon: /* @__PURE__ */ o(p, {}),
|
|
54
58
|
onClick: n.onAddKml,
|
|
55
59
|
children: "Add KML"
|
|
56
60
|
}
|
|
57
61
|
),
|
|
58
62
|
/* @__PURE__ */ o(
|
|
59
|
-
|
|
63
|
+
d,
|
|
60
64
|
{
|
|
61
65
|
color: "inherit",
|
|
62
|
-
startIcon: /* @__PURE__ */ o(
|
|
66
|
+
startIcon: /* @__PURE__ */ o(p, {}),
|
|
63
67
|
onClick: n.onAddWkt,
|
|
64
68
|
children: "Add WKT"
|
|
65
69
|
}
|
|
66
70
|
)
|
|
67
71
|
] }),
|
|
68
72
|
/* @__PURE__ */ i(
|
|
69
|
-
|
|
73
|
+
B,
|
|
70
74
|
{
|
|
71
75
|
fullWidth: !0,
|
|
72
|
-
variant:
|
|
76
|
+
variant: r,
|
|
73
77
|
contentEditable: !1,
|
|
74
78
|
onClick: n.onClick,
|
|
75
79
|
children: [
|
|
76
|
-
/* @__PURE__ */ o(
|
|
77
|
-
/* @__PURE__ */ o(
|
|
78
|
-
|
|
80
|
+
/* @__PURE__ */ o(M, { children: c }),
|
|
81
|
+
r === "standard" && /* @__PURE__ */ o(T, { value: e, readOnly: !0, endAdornment: m }),
|
|
82
|
+
r === "outlined" && /* @__PURE__ */ o(
|
|
83
|
+
K,
|
|
79
84
|
{
|
|
85
|
+
label: c,
|
|
80
86
|
value: e,
|
|
81
87
|
readOnly: !0,
|
|
82
|
-
endAdornment:
|
|
83
|
-
/* @__PURE__ */ o(s, { size: "small", onClick: n.onEdit, children: /* @__PURE__ */ o(f, { fontSize: "small" }) }),
|
|
84
|
-
/* @__PURE__ */ o(s, { size: "small", onClick: n.onDelete, children: /* @__PURE__ */ o(D, { fontSize: "small" }) })
|
|
85
|
-
] }) })
|
|
88
|
+
endAdornment: m
|
|
86
89
|
}
|
|
87
|
-
)
|
|
90
|
+
),
|
|
91
|
+
r === "filled" && /* @__PURE__ */ o(L, { value: e, readOnly: !0, endAdornment: m })
|
|
88
92
|
]
|
|
89
93
|
}
|
|
90
94
|
)
|
|
91
95
|
] }),
|
|
92
96
|
/* @__PURE__ */ i(
|
|
93
|
-
|
|
97
|
+
z,
|
|
94
98
|
{
|
|
95
99
|
open: t.modal.isOpen,
|
|
96
100
|
onClose: n.modal.close,
|
|
97
101
|
fullWidth: !0,
|
|
98
102
|
maxWidth: "md",
|
|
99
103
|
children: [
|
|
100
|
-
/* @__PURE__ */ o(
|
|
101
|
-
/* @__PURE__ */ i(
|
|
104
|
+
/* @__PURE__ */ o(F, { children: t.content.title }),
|
|
105
|
+
/* @__PURE__ */ i(G, { children: [
|
|
102
106
|
t.content.action === "ADD" && t.content.type === "COORDINATE" && /* @__PURE__ */ o(
|
|
103
107
|
k,
|
|
104
108
|
{
|
|
105
|
-
mapboxAccessToken:
|
|
106
|
-
defaultExtent:
|
|
109
|
+
mapboxAccessToken: l,
|
|
110
|
+
defaultExtent: a,
|
|
107
111
|
onCancel: n.modal.close,
|
|
108
112
|
onSubmit: n.onSubmit
|
|
109
113
|
}
|
|
110
114
|
),
|
|
111
115
|
t.content.action === "ADD" && t.content.type === "GEOMETRY" && /* @__PURE__ */ o(
|
|
112
|
-
|
|
116
|
+
b,
|
|
113
117
|
{
|
|
114
118
|
mapId: "map-geo-picker-001",
|
|
115
|
-
mapboxAccessToken:
|
|
116
|
-
defaultExtent:
|
|
119
|
+
mapboxAccessToken: l,
|
|
120
|
+
defaultExtent: a,
|
|
117
121
|
onCancel: n.modal.close,
|
|
118
122
|
onSubmit: n.onSubmit
|
|
119
123
|
}
|
|
120
124
|
),
|
|
121
|
-
t.content.action === "ADD" && t.content.type === "KML" && /* @__PURE__ */ o(
|
|
122
|
-
t.content.action === "ADD" && t.content.type === "WKT" && /* @__PURE__ */ o(
|
|
125
|
+
t.content.action === "ADD" && t.content.type === "KML" && /* @__PURE__ */ o(g, { onCancel: n.modal.close, onSubmit: n.onSubmit }),
|
|
126
|
+
t.content.action === "ADD" && t.content.type === "WKT" && /* @__PURE__ */ o(W, { onCancel: n.modal.close, onSubmit: n.onSubmit }),
|
|
123
127
|
t.content.action === "EDIT" && !!e && /* @__PURE__ */ o(
|
|
124
|
-
|
|
128
|
+
E,
|
|
125
129
|
{
|
|
126
130
|
mapId: "map-geo-edit-001",
|
|
127
131
|
value: e,
|
|
128
|
-
mapboxAccessToken:
|
|
132
|
+
mapboxAccessToken: l,
|
|
129
133
|
onCancel: n.modal.close,
|
|
130
134
|
onSubmit: n.onSubmit
|
|
131
135
|
}
|
|
@@ -137,5 +141,5 @@ const Q = ({
|
|
|
137
141
|
] });
|
|
138
142
|
};
|
|
139
143
|
export {
|
|
140
|
-
|
|
144
|
+
Z as GeometryPicker
|
|
141
145
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useState as i, useEffect as b } from "react";
|
|
3
3
|
import k from "./select-input-method.js";
|
|
4
|
-
import { Box as
|
|
4
|
+
import { Box as d, TextField as M, Button as m } from "@mui/material";
|
|
5
5
|
import { validate as C } from "../../map/helpers/kml.js";
|
|
6
|
-
import { b as L, c as T } from "../../../ol-
|
|
7
|
-
function W({ onCancel:
|
|
8
|
-
const [t, l] = i(), [o,
|
|
6
|
+
import { b as L, c as T } from "../../../ol-CHaVTXvL.js";
|
|
7
|
+
function W({ onCancel: f, onSubmit: a }) {
|
|
8
|
+
const [t, l] = i(), [o, p] = i(), [s, n] = i(), h = (e) => {
|
|
9
9
|
l(e);
|
|
10
|
-
},
|
|
10
|
+
}, v = (e) => {
|
|
11
11
|
l(e.target.value);
|
|
12
|
-
},
|
|
12
|
+
}, u = () => {
|
|
13
13
|
if (t && t.trim().length > 0)
|
|
14
14
|
if (C(t)) {
|
|
15
15
|
const e = L(t);
|
|
16
16
|
if (e) {
|
|
17
17
|
const K = T({ features: e });
|
|
18
|
-
|
|
18
|
+
p(K), n(void 0);
|
|
19
19
|
} else n("Error in KML data!");
|
|
20
20
|
} else n("Error in KML data!");
|
|
21
21
|
}, x = () => {
|
|
22
22
|
a && o && a(o);
|
|
23
23
|
};
|
|
24
|
-
return b(() => (
|
|
25
|
-
}), [t]), t === void 0 ? /* @__PURE__ */ r(k, { onSubmit:
|
|
24
|
+
return b(() => (u(), () => {
|
|
25
|
+
}), [t, u]), t === void 0 ? /* @__PURE__ */ r(k, { onSubmit: h }) : /* @__PURE__ */ c(d, { pt: 1, children: [
|
|
26
26
|
/* @__PURE__ */ r(
|
|
27
27
|
M,
|
|
28
28
|
{
|
|
@@ -35,17 +35,17 @@ function W({ onCancel: m, onSubmit: a }) {
|
|
|
35
35
|
value: t,
|
|
36
36
|
autoFocus: !0,
|
|
37
37
|
InputLabelProps: { shrink: !0 },
|
|
38
|
-
onChange:
|
|
38
|
+
onChange: v,
|
|
39
39
|
...s !== void 0 && {
|
|
40
40
|
error: !0,
|
|
41
41
|
helperText: s
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ r(
|
|
45
|
+
/* @__PURE__ */ c(d, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
46
|
+
/* @__PURE__ */ r(m, { color: "primary", onClick: f, children: "Cancel" }),
|
|
47
47
|
/* @__PURE__ */ r(
|
|
48
|
-
|
|
48
|
+
m,
|
|
49
49
|
{
|
|
50
50
|
color: "primary",
|
|
51
51
|
variant: "contained",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
|
-
import { O as u } from "../../../index-
|
|
3
|
+
import { O as u } from "../../../index-DlnzUkwe.js";
|
|
4
4
|
import d from "./logic.js";
|
|
5
5
|
import { Box as m } from "@mui/material";
|
|
6
6
|
import { ContextMenu as p } from "../../context-menu/index.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import k from "react";
|
|
2
2
|
import { createMapboxLayer as Xe } from "../../map/helpers/mapbox.js";
|
|
3
|
-
import { I as $e, s as ke, n as ge,
|
|
3
|
+
import { I as $e, s as ke, n as ge, f as ve, C as fe, h as v, V as se, F as L, P as me, p as Ze, i as Je, j as _e, R as Ge, k as ye, l as Q, M as D, m as Qe, o as ze, q as et, r as tt, L as J, t as it, u as Ie, v as Re, G as st, w as nt, b as Fe, a as rt } from "../../../ol-CHaVTXvL.js";
|
|
4
4
|
import { T as z, g as F, d as ot, q as Te, a as ne, E as ee, f as at, F as Ae, x as ht, r as be, i as ct, l as q, u as oe } from "../../../has-CjQtZJa9.js";
|
|
5
5
|
import { O as xe } from "../../../Text-D6oGbCdi.js";
|
|
6
6
|
import { defaultStyle as lt, selectStyleFunction as dt, markerStyle as ut } from "./style.js";
|
|
7
|
-
import { G as
|
|
7
|
+
import { G as w, ax as ae, ac as U, aL as te, k as C, aM as I, h as ie, T as gt, aI as Oe, ay as Ne, aN as R, aO as Ve, aP as ft, aQ as Se, P as je, J as _t, aR as mt, aK as yt } from "../../../Source-Hf_SiWEW.js";
|
|
8
8
|
import { alert as xt } from "../../confirm/index.js";
|
|
9
9
|
const pt = {
|
|
10
10
|
/**
|
|
@@ -244,7 +244,7 @@ function Ft() {
|
|
|
244
244
|
return e.getGeometry() ? l[e.getGeometry().getType()] : null;
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
|
-
const Pe = 0, K = 1,
|
|
247
|
+
const Pe = 0, K = 1, we = [0, 0, 0, 0], N = [], he = {
|
|
248
248
|
/**
|
|
249
249
|
* Triggered upon feature modification start
|
|
250
250
|
* @event ModifyEvent#modifystart
|
|
@@ -499,7 +499,7 @@ class Tt extends me {
|
|
|
499
499
|
index: i,
|
|
500
500
|
segment: r
|
|
501
501
|
};
|
|
502
|
-
this.rBush_.insert(
|
|
502
|
+
this.rBush_.insert(w(r), o);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
/**
|
|
@@ -519,7 +519,7 @@ class Tt extends me {
|
|
|
519
519
|
index: o,
|
|
520
520
|
segment: h
|
|
521
521
|
};
|
|
522
|
-
this.rBush_.insert(
|
|
522
|
+
this.rBush_.insert(w(h), c);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
}
|
|
@@ -540,7 +540,7 @@ class Tt extends me {
|
|
|
540
540
|
index: o,
|
|
541
541
|
segment: h
|
|
542
542
|
};
|
|
543
|
-
this.rBush_.insert(
|
|
543
|
+
this.rBush_.insert(w(h), c);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
}
|
|
@@ -563,7 +563,7 @@ class Tt extends me {
|
|
|
563
563
|
index: c,
|
|
564
564
|
segment: g
|
|
565
565
|
};
|
|
566
|
-
this.rBush_.insert(
|
|
566
|
+
this.rBush_.insert(w(g), u);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
}
|
|
@@ -702,7 +702,7 @@ class Tt extends me {
|
|
|
702
702
|
const s = this.vertexFeature_;
|
|
703
703
|
if (s) {
|
|
704
704
|
e.map.getView().getProjection();
|
|
705
|
-
const i = [], n = s.getGeometry().getCoordinates(), r =
|
|
705
|
+
const i = [], n = s.getGeometry().getCoordinates(), r = w([n]), o = this.rBush_.getInExtent(r), a = {};
|
|
706
706
|
o.sort(St);
|
|
707
707
|
for (let h = 0, c = o.length; h < c; ++h) {
|
|
708
708
|
const d = o[h], g = d.segment;
|
|
@@ -763,7 +763,7 @@ class Tt extends me {
|
|
|
763
763
|
o
|
|
764
764
|
);
|
|
765
765
|
} else
|
|
766
|
-
this.rBush_.update(
|
|
766
|
+
this.rBush_.update(w(s.segment), s);
|
|
767
767
|
}
|
|
768
768
|
return this.featuresBeingModified_ && (this.dispatchEvent(
|
|
769
769
|
new ce(
|
|
@@ -790,7 +790,7 @@ class Tt extends me {
|
|
|
790
790
|
const i = s || t.getCoordinateFromPixel(e);
|
|
791
791
|
t.getView().getProjection();
|
|
792
792
|
const n = function(a, h) {
|
|
793
|
-
return
|
|
793
|
+
return Ee(i, a) - Ee(i, h);
|
|
794
794
|
};
|
|
795
795
|
let r, o;
|
|
796
796
|
if (this.hitDetection_) {
|
|
@@ -824,9 +824,9 @@ class Tt extends me {
|
|
|
824
824
|
}
|
|
825
825
|
if (!r) {
|
|
826
826
|
const a = gt(
|
|
827
|
-
ae(i,
|
|
827
|
+
ae(i, we)
|
|
828
828
|
), h = t.getView().getResolution() * this.pixelTolerance_, c = Oe(
|
|
829
|
-
Ne(a, h,
|
|
829
|
+
Ne(a, h, we)
|
|
830
830
|
);
|
|
831
831
|
r = this.rBush_.getInExtent(c);
|
|
832
832
|
}
|
|
@@ -903,7 +903,7 @@ class Tt extends me {
|
|
|
903
903
|
depth: r,
|
|
904
904
|
index: o
|
|
905
905
|
};
|
|
906
|
-
h.insert(
|
|
906
|
+
h.insert(w(c.segment), c), this.dragSegments_.push([c, 1]);
|
|
907
907
|
const d = {
|
|
908
908
|
segment: [t, s[1]],
|
|
909
909
|
feature: i,
|
|
@@ -911,7 +911,7 @@ class Tt extends me {
|
|
|
911
911
|
depth: r,
|
|
912
912
|
index: o + 1
|
|
913
913
|
};
|
|
914
|
-
h.insert(
|
|
914
|
+
h.insert(w(d.segment), d), this.dragSegments_.push([d, 0]), this.ignoreNextSingleClick_ = !0;
|
|
915
915
|
}
|
|
916
916
|
/**
|
|
917
917
|
* Removes the vertex currently being pointed.
|
|
@@ -969,7 +969,7 @@ class Tt extends me {
|
|
|
969
969
|
segment: _
|
|
970
970
|
};
|
|
971
971
|
this.rBush_.insert(
|
|
972
|
-
|
|
972
|
+
w(x.segment),
|
|
973
973
|
x
|
|
974
974
|
);
|
|
975
975
|
}
|
|
@@ -1005,7 +1005,7 @@ class Tt extends me {
|
|
|
1005
1005
|
function St(l, e) {
|
|
1006
1006
|
return l.index - e.index;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function Ee(l, e, t) {
|
|
1009
1009
|
const s = e.geometry;
|
|
1010
1010
|
if (s.getType() === "Circle") {
|
|
1011
1011
|
let n = (
|
|
@@ -1072,7 +1072,7 @@ class Y extends ne {
|
|
|
1072
1072
|
super(e), this.feature = t;
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function wt(l, e) {
|
|
1076
1076
|
const t = [];
|
|
1077
1077
|
for (let s = 0; s < e.length; ++s) {
|
|
1078
1078
|
const n = e[s].getGeometry();
|
|
@@ -1144,7 +1144,7 @@ function Be(l, e, t) {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
const le = { index: -1, endIndex: NaN };
|
|
1147
|
-
function
|
|
1147
|
+
function Et(l, e, t, s) {
|
|
1148
1148
|
const i = l[0], n = l[1];
|
|
1149
1149
|
let r = 1 / 0, o = -1, a = NaN;
|
|
1150
1150
|
for (let d = 0; d < e.targets.length; ++d) {
|
|
@@ -1350,10 +1350,10 @@ class Dt extends me {
|
|
|
1350
1350
|
]), i = t.getCoordinateFromPixel([
|
|
1351
1351
|
e.pixel[0] + this.snapTolerance_,
|
|
1352
1352
|
e.pixel[1] - this.snapTolerance_
|
|
1353
|
-
]), n =
|
|
1353
|
+
]), n = w([s, i]), r = this.traceSource_.getFeaturesInExtent(n);
|
|
1354
1354
|
if (r.length === 0)
|
|
1355
1355
|
return;
|
|
1356
|
-
const o =
|
|
1356
|
+
const o = wt(e.coordinate, r);
|
|
1357
1357
|
o.length && (this.traceState_ = {
|
|
1358
1358
|
active: !0,
|
|
1359
1359
|
startPx: e.pixel.slice(),
|
|
@@ -1424,7 +1424,7 @@ class Dt extends me {
|
|
|
1424
1424
|
const t = this.traceState_;
|
|
1425
1425
|
if (!t.active || t.targetIndex === -1 && te(t.startPx, e.pixel) < this.snapTolerance_)
|
|
1426
1426
|
return;
|
|
1427
|
-
const s =
|
|
1427
|
+
const s = Et(
|
|
1428
1428
|
e.coordinate,
|
|
1429
1429
|
t,
|
|
1430
1430
|
this.getMap(),
|
|
@@ -1869,12 +1869,12 @@ class Gt extends me {
|
|
|
1869
1869
|
[]
|
|
1870
1870
|
);
|
|
1871
1871
|
if (n(r, i), r.length === 1)
|
|
1872
|
-
this.rBush_.insert(
|
|
1872
|
+
this.rBush_.insert(w(r[0]), {
|
|
1873
1873
|
feature: e,
|
|
1874
1874
|
segment: r[0]
|
|
1875
1875
|
});
|
|
1876
1876
|
else if (r.length > 1) {
|
|
1877
|
-
const o = r.map((h) =>
|
|
1877
|
+
const o = r.map((h) => w(h)), a = r.map((h) => ({
|
|
1878
1878
|
feature: e,
|
|
1879
1879
|
segment: h
|
|
1880
1880
|
}));
|
|
@@ -2020,7 +2020,7 @@ class Gt extends me {
|
|
|
2020
2020
|
s.getView().getProjection();
|
|
2021
2021
|
const i = C(t), n = Oe(
|
|
2022
2022
|
Ne(
|
|
2023
|
-
|
|
2023
|
+
w([i]),
|
|
2024
2024
|
s.getView().getResolution() * this.pixelTolerance_
|
|
2025
2025
|
)
|
|
2026
2026
|
), r = this.rBush_.getInExtent(n), o = r.length;
|
|
@@ -2181,12 +2181,13 @@ class Gt extends me {
|
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
2183
|
}
|
|
2184
|
-
let Le = null
|
|
2184
|
+
let Le = null;
|
|
2185
|
+
const E = new ye(), P = {
|
|
2185
2186
|
layer: new se({
|
|
2186
|
-
source:
|
|
2187
|
+
source: E,
|
|
2187
2188
|
style: lt
|
|
2188
2189
|
}),
|
|
2189
|
-
modify: new Tt({ source:
|
|
2190
|
+
modify: new Tt({ source: E }),
|
|
2190
2191
|
draw: null,
|
|
2191
2192
|
snap: null,
|
|
2192
2193
|
select: new pe({
|
|
@@ -2239,7 +2240,7 @@ function qt(l) {
|
|
|
2239
2240
|
var m;
|
|
2240
2241
|
(m = e.current) == null || m.addInteraction(P.modify), P.modify.on("modifyend", () => {
|
|
2241
2242
|
setTimeout(() => {
|
|
2242
|
-
l.onDrawEnd && l.onDrawEnd(
|
|
2243
|
+
l.onDrawEnd && l.onDrawEnd(E.getFeatures());
|
|
2243
2244
|
}, 250), p();
|
|
2244
2245
|
});
|
|
2245
2246
|
}, _ = async () => {
|
|
@@ -2262,7 +2263,7 @@ function qt(l) {
|
|
|
2262
2263
|
A.forEach(
|
|
2263
2264
|
(Ye) => G(Ye)
|
|
2264
2265
|
), j(), setTimeout(() => {
|
|
2265
|
-
l.onDrawEnd && l.onDrawEnd(
|
|
2266
|
+
l.onDrawEnd && l.onDrawEnd(E.getFeatures());
|
|
2266
2267
|
}, 250);
|
|
2267
2268
|
}
|
|
2268
2269
|
}
|
|
@@ -2282,12 +2283,12 @@ function qt(l) {
|
|
|
2282
2283
|
var B, A;
|
|
2283
2284
|
p();
|
|
2284
2285
|
const y = new Dt({
|
|
2285
|
-
source:
|
|
2286
|
+
source: E,
|
|
2286
2287
|
type: m
|
|
2287
|
-
}), S = new Gt({ source:
|
|
2288
|
+
}), S = new Gt({ source: E });
|
|
2288
2289
|
y.on("drawend", () => {
|
|
2289
2290
|
setTimeout(() => {
|
|
2290
|
-
l.onDrawEnd && l.onDrawEnd(
|
|
2291
|
+
l.onDrawEnd && l.onDrawEnd(E.getFeatures());
|
|
2291
2292
|
}, 250), p(), s("Pointer");
|
|
2292
2293
|
}), P.draw = y, P.snap = S, (B = e.current) == null || B.addInteraction(y), (A = e.current) == null || A.addInteraction(S);
|
|
2293
2294
|
}, p = () => {
|
|
@@ -2295,14 +2296,14 @@ function qt(l) {
|
|
|
2295
2296
|
P.draw && ((m = e.current) == null || m.removeInteraction(P.draw)), P.snap && ((y = e.current) == null || y.removeInteraction(P.snap));
|
|
2296
2297
|
}, T = (m) => {
|
|
2297
2298
|
const y = Fe(m);
|
|
2298
|
-
y &&
|
|
2299
|
+
y && E.addFeatures(y);
|
|
2299
2300
|
}, M = (m) => {
|
|
2300
2301
|
const y = rt(m, ut);
|
|
2301
|
-
y &&
|
|
2302
|
+
y && E.addFeatures(y);
|
|
2302
2303
|
}, V = () => {
|
|
2303
|
-
|
|
2304
|
+
E.clear();
|
|
2304
2305
|
}, G = (m) => {
|
|
2305
|
-
|
|
2306
|
+
E.removeFeature(m);
|
|
2306
2307
|
}, j = () => {
|
|
2307
2308
|
o({
|
|
2308
2309
|
open: !1,
|
|
@@ -2313,7 +2314,7 @@ function qt(l) {
|
|
|
2313
2314
|
}, Ue = (m) => {
|
|
2314
2315
|
var S;
|
|
2315
2316
|
const y = Fe(m);
|
|
2316
|
-
y ? (re(),
|
|
2317
|
+
y ? (re(), E.addFeatures(y), (S = e.current) == null || S.centerToFeature(y[0]), l.onDrawEnd && l.onDrawEnd(y)) : xt("Error!", "Feature(s) could not be loaded! Check your KML data!");
|
|
2317
2318
|
}, Ke = (m) => {
|
|
2318
2319
|
var y;
|
|
2319
2320
|
(y = e.current) == null || y.setCenter(m);
|