@hybridcore/ui 1.3.7 → 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 +1 -1
- package/dist/components/data-security-selectors/security-level/index.js +42 -40
- package/dist/components/date-time-picker/index.js +18 -19
- 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 +3 -3
- 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/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/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 +106 -100
- 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 +16 -15
- 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-CJVcedWy.js → index-DPf5olog.js} +29 -27
- 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 +561 -78
- 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 -41
- package/dist/createSvgIcon-B2WT0K4k.js +0 -87
- package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +0 -0
- 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
|
@@ -2,7 +2,7 @@ import { jsxs as $t, jsx as ye } from "react/jsx-runtime";
|
|
|
2
2
|
import * as V from "react";
|
|
3
3
|
import { useLayoutEffect as _t, useContext as Kt, useRef as j, useState as te, createContext as qt, useMemo as ee, useCallback as P, Component as en, Fragment as Ne, useEffect as bt, forwardRef as tn } from "react";
|
|
4
4
|
import { Box as nn, FormLabel as un, FormHelperText as on } from "@mui/material";
|
|
5
|
-
import { a as an, _ as A } from "../../../
|
|
5
|
+
import { a as an, _ as A } from "../../../objectWithoutPropertiesLoose-BK36oJDi.js";
|
|
6
6
|
import { _ as rn, a as ln } from "../../../assertThisInitialized-BUtkG-md.js";
|
|
7
7
|
import { keyframes as sn, jsx as C, css as pt } from "@emotion/react";
|
|
8
8
|
import { createPortal as cn } from "react-dom";
|
|
@@ -1,80 +1,82 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, Fragment as A, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as C } from "react";
|
|
3
|
-
import { FormControl as D, InputLabel as F, Select as
|
|
4
|
-
import { hasDataAccess as
|
|
5
|
-
const
|
|
6
|
-
ontologyId:
|
|
7
|
-
appRoles:
|
|
3
|
+
import { FormControl as D, InputLabel as F, Select as $, MenuItem as j, FormHelperText as I } from "@mui/material";
|
|
4
|
+
import { hasDataAccess as g } from "../../access/helpers.js";
|
|
5
|
+
const q = ({
|
|
6
|
+
ontologyId: h,
|
|
7
|
+
appRoles: o,
|
|
8
8
|
templateKeys: e,
|
|
9
|
-
templateType:
|
|
10
|
-
securityLevels:
|
|
11
|
-
value:
|
|
9
|
+
templateType: c,
|
|
10
|
+
securityLevels: i,
|
|
11
|
+
value: s,
|
|
12
12
|
minLevel: t = 99,
|
|
13
|
-
minLevelId:
|
|
14
|
-
minLevelRoles:
|
|
13
|
+
minLevelId: u,
|
|
14
|
+
minLevelRoles: n,
|
|
15
15
|
showError: d,
|
|
16
|
-
variant:
|
|
17
|
-
onChange:
|
|
16
|
+
variant: m = "outlined",
|
|
17
|
+
onChange: S
|
|
18
18
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
for (
|
|
22
|
-
if (
|
|
19
|
+
const b = C(() => {
|
|
20
|
+
if (n && n.length > 0) {
|
|
21
|
+
for (const r of n)
|
|
22
|
+
if (g(r, "SUPER_ADMIN", o))
|
|
23
23
|
return t;
|
|
24
24
|
}
|
|
25
|
-
if (e && e.length > 0 &&
|
|
26
|
-
for (
|
|
27
|
-
if (
|
|
28
|
-
`${
|
|
25
|
+
if (e && e.length > 0 && c) {
|
|
26
|
+
for (const r of e)
|
|
27
|
+
if (g(
|
|
28
|
+
`${h}.${c}.${r}`,
|
|
29
29
|
"SUPER_ADMIN",
|
|
30
|
-
|
|
30
|
+
o
|
|
31
31
|
))
|
|
32
32
|
return t;
|
|
33
33
|
}
|
|
34
|
-
if (
|
|
35
|
-
const r =
|
|
36
|
-
(
|
|
34
|
+
if (u && i.length > 0) {
|
|
35
|
+
const r = i.find(
|
|
36
|
+
(f) => f.id === u
|
|
37
37
|
);
|
|
38
38
|
if (r) return r.level;
|
|
39
39
|
}
|
|
40
40
|
return t;
|
|
41
41
|
}, [
|
|
42
42
|
t,
|
|
43
|
-
|
|
44
|
-
l,
|
|
43
|
+
u,
|
|
45
44
|
i,
|
|
45
|
+
n,
|
|
46
46
|
e,
|
|
47
|
-
|
|
47
|
+
c,
|
|
48
|
+
o,
|
|
49
|
+
h
|
|
48
50
|
]), x = (r) => {
|
|
49
|
-
|
|
51
|
+
S(r.target.value);
|
|
50
52
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ a(A, { children: [
|
|
54
|
+
/* @__PURE__ */ a(
|
|
53
55
|
D,
|
|
54
56
|
{
|
|
55
57
|
fullWidth: !0,
|
|
56
|
-
variant:
|
|
58
|
+
variant: m,
|
|
57
59
|
error: d,
|
|
58
|
-
sx: { ...
|
|
60
|
+
sx: { ...m === "outlined" && { mt: 1 } },
|
|
59
61
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
62
|
+
/* @__PURE__ */ l(F, { id: "security-level-label", children: "Security Level *" }),
|
|
63
|
+
/* @__PURE__ */ l(
|
|
64
|
+
$,
|
|
63
65
|
{
|
|
64
66
|
label: "Security Level *",
|
|
65
67
|
labelId: "security-level-label",
|
|
66
68
|
id: "demo-simple-select",
|
|
67
|
-
value:
|
|
69
|
+
value: s,
|
|
68
70
|
onChange: x,
|
|
69
|
-
children:
|
|
71
|
+
children: i.filter((r) => r.level <= b).map((r, f) => /* @__PURE__ */ l(j, { value: r.id, children: r.name }, f))
|
|
70
72
|
}
|
|
71
73
|
)
|
|
72
74
|
]
|
|
73
75
|
}
|
|
74
76
|
),
|
|
75
|
-
d && /* @__PURE__ */
|
|
77
|
+
d && /* @__PURE__ */ l(I, { error: !0, children: "This field is required!" })
|
|
76
78
|
] });
|
|
77
79
|
};
|
|
78
80
|
export {
|
|
79
|
-
|
|
81
|
+
q as SecurityLevel
|
|
80
82
|
};
|
|
@@ -18,28 +18,27 @@ const Q = ({
|
|
|
18
18
|
pattern: C = "##:##:##",
|
|
19
19
|
onChange: p
|
|
20
20
|
}) => {
|
|
21
|
-
const n = z(), [
|
|
22
|
-
|
|
23
|
-
for (let
|
|
24
|
-
for (let
|
|
25
|
-
const l = Y.padStart(
|
|
26
|
-
(
|
|
21
|
+
const n = z(), [t, u] = y(c ? g(c) : null), h = P(), H = F(() => {
|
|
22
|
+
const o = [];
|
|
23
|
+
for (let s = 0; s < 24; s++)
|
|
24
|
+
for (let i = 0; i < 60 / a; i++) {
|
|
25
|
+
const l = Y.padStart(s.toString(), 2, "0"), m = Y.padStart(
|
|
26
|
+
(i * a).toString(),
|
|
27
27
|
2,
|
|
28
28
|
"0"
|
|
29
29
|
), k = `${l}:${m}`;
|
|
30
|
-
|
|
30
|
+
o.push(k);
|
|
31
31
|
}
|
|
32
|
-
return
|
|
33
|
-
}, [a]), S = (
|
|
34
|
-
|
|
35
|
-
}, f = (
|
|
36
|
-
const [
|
|
37
|
-
let m = g(o).set("hour", i ?? 0).set("m", s ?? 0).set("s", l ?? 0);
|
|
32
|
+
return o;
|
|
33
|
+
}, [a]), S = (o) => {
|
|
34
|
+
o && (u(o), p(o.format("YYYY-MM-DDTHH:mm:ssZ")));
|
|
35
|
+
}, f = (o) => {
|
|
36
|
+
const [s, i, l] = o.target.value.split(":"), m = g(t).set("hour", s ?? 0).set("m", i ?? 0).set("s", l ?? 0);
|
|
38
37
|
u(m), p(m.format("YYYY-MM-DDTHH:mm:ssZ"));
|
|
39
|
-
}, T = (
|
|
38
|
+
}, T = (o) => () => {
|
|
40
39
|
f({
|
|
41
40
|
target: {
|
|
42
|
-
value:
|
|
41
|
+
value: o
|
|
43
42
|
}
|
|
44
43
|
}), n.action.close();
|
|
45
44
|
};
|
|
@@ -49,7 +48,7 @@ const Q = ({
|
|
|
49
48
|
$,
|
|
50
49
|
{
|
|
51
50
|
label: x,
|
|
52
|
-
value:
|
|
51
|
+
value: t,
|
|
53
52
|
format: "DD/MM/YYYY",
|
|
54
53
|
minDate: M,
|
|
55
54
|
onChange: S,
|
|
@@ -67,7 +66,7 @@ const Q = ({
|
|
|
67
66
|
{
|
|
68
67
|
format: C,
|
|
69
68
|
allowEmptyFormatting: !0,
|
|
70
|
-
value:
|
|
69
|
+
value: t == null ? void 0 : t.format("HH:mm:ss"),
|
|
71
70
|
onChange: f,
|
|
72
71
|
style: {
|
|
73
72
|
fontSize: 16,
|
|
@@ -114,10 +113,10 @@ const Q = ({
|
|
|
114
113
|
anchorEl: n.state.anchorEl,
|
|
115
114
|
open: n.state.isOpen,
|
|
116
115
|
onClose: n.action.close,
|
|
117
|
-
children: H.map((
|
|
116
|
+
children: H.map((o) => /* @__PURE__ */ e(Z, { onClick: T(o), children: o }, o))
|
|
118
117
|
}
|
|
119
118
|
),
|
|
120
|
-
/* @__PURE__ */ e("input", { type: "hidden", name: D, value: (
|
|
119
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: D, value: (t == null ? void 0 : t.format()) ?? "" })
|
|
121
120
|
] });
|
|
122
121
|
};
|
|
123
122
|
export {
|
|
@@ -2,7 +2,7 @@ import { jsxs as l, Fragment as p, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button as a, Box as f } from "@mui/material";
|
|
3
3
|
import u from "../map/index.js";
|
|
4
4
|
import C from "../parser/index.js";
|
|
5
|
-
import { g as y, c as g } from "../../../ol-
|
|
5
|
+
import { g as y, c as g } from "../../../ol-CHaVTXvL.js";
|
|
6
6
|
import { useState as h } from "react";
|
|
7
7
|
import { Add as P } from "@mui/icons-material";
|
|
8
8
|
import { parse as v, convert as x } from "../../map/helpers/wkt.js";
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as x } from "react/jsx-runtime";
|
|
2
2
|
import E, { useState as F, useEffect as T } from "react";
|
|
3
3
|
import { Dialog as w, DialogContent as K, DialogActions as j, Button as c, Box as O } from "@mui/material";
|
|
4
|
-
import
|
|
5
|
-
import { c as P, a as R } from "../../../ol-
|
|
4
|
+
import g from "../map/index.js";
|
|
5
|
+
import { c as P, a as R } from "../../../ol-CHaVTXvL.js";
|
|
6
6
|
import { parse as S } from "../../map/helpers/wkt.js";
|
|
7
7
|
import _ from "lodash";
|
|
8
8
|
import { t as B } from "../../../Source-Hf_SiWEW.js";
|
|
9
9
|
function z({
|
|
10
|
-
value:
|
|
11
|
-
disableActions:
|
|
10
|
+
value: y,
|
|
11
|
+
disableActions: D,
|
|
12
12
|
mapboxAccessToken: s,
|
|
13
|
-
variant:
|
|
13
|
+
variant: W = "inline",
|
|
14
14
|
mapId: f,
|
|
15
15
|
onCancel: l,
|
|
16
16
|
onSubmit: u,
|
|
17
17
|
onChange: d
|
|
18
18
|
}) {
|
|
19
|
-
const r = E.useRef(null), [t,
|
|
19
|
+
const r = E.useRef(null), [t, k] = F(y), m = () => {
|
|
20
20
|
u && u(t);
|
|
21
21
|
}, p = (n) => {
|
|
22
22
|
const o = P({ features: n });
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
var o,
|
|
23
|
+
k(o), d && d(o);
|
|
24
|
+
}, h = () => {
|
|
25
|
+
var o, v, C;
|
|
26
26
|
const n = S(t);
|
|
27
27
|
if (!_.isArray(n))
|
|
28
28
|
if (n.type === "Point") {
|
|
29
29
|
const i = B(n.coordinates, "EPSG:4326", "EPSG:3857");
|
|
30
|
-
(o = r.current) == null || o.setCenter(i), (
|
|
30
|
+
(o = r.current) == null || o.setCenter(i), (v = r.current) == null || v.setZoomLevel(10);
|
|
31
31
|
} else {
|
|
32
32
|
const i = R(t);
|
|
33
|
-
i && ((
|
|
33
|
+
i && ((C = r.current) == null || C.centerToFeature(i[0], [100, 100, 100, 100]));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
return T(() => (
|
|
37
|
-
}), []),
|
|
36
|
+
return T(() => (h(), () => {
|
|
37
|
+
}), [h]), W === "dialog" ? /* @__PURE__ */ a(w, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: l, children: [
|
|
38
38
|
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(
|
|
39
|
-
|
|
39
|
+
g,
|
|
40
40
|
{
|
|
41
41
|
id: f,
|
|
42
42
|
ref: r,
|
|
@@ -51,7 +51,7 @@ function z({
|
|
|
51
51
|
] })
|
|
52
52
|
] }) : /* @__PURE__ */ a(x, { children: [
|
|
53
53
|
/* @__PURE__ */ e(
|
|
54
|
-
|
|
54
|
+
g,
|
|
55
55
|
{
|
|
56
56
|
id: f,
|
|
57
57
|
ref: r,
|
|
@@ -60,7 +60,7 @@ function z({
|
|
|
60
60
|
onDrawEnd: p
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
|
-
!
|
|
63
|
+
!D && /* @__PURE__ */ a(O, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
64
64
|
/* @__PURE__ */ e(c, { color: "primary", onClick: l, children: "Cancel" }),
|
|
65
65
|
/* @__PURE__ */ e(c, { color: "primary", variant: "contained", onClick: m, children: "Ok" })
|
|
66
66
|
] })
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import D, { useState as k } from "react";
|
|
3
|
-
import { Dialog as R, DialogContent as K, Box as
|
|
3
|
+
import { Dialog as R, DialogContent as K, Box as o, Typography as x, DialogActions as F, Button as d } from "@mui/material";
|
|
4
4
|
import P from "../map/index.js";
|
|
5
5
|
import b from "../parser/index.js";
|
|
6
|
-
import { c as _ } from "../../../ol-
|
|
6
|
+
import { c as _ } from "../../../ol-CHaVTXvL.js";
|
|
7
7
|
import { Button as l } from "../styled.js";
|
|
8
8
|
import { HorizontalRule as j, ShowChart as O, CircleOutlined as I } from "@mui/icons-material";
|
|
9
9
|
import L from "./map-overlay.js";
|
|
10
10
|
function N({
|
|
11
|
-
mapId:
|
|
12
|
-
mapboxAccessToken:
|
|
11
|
+
mapId: p,
|
|
12
|
+
mapboxAccessToken: C,
|
|
13
13
|
value: S,
|
|
14
14
|
disableActions: T = !1,
|
|
15
15
|
variant: W = "inline",
|
|
16
|
-
defaultExtent:
|
|
16
|
+
defaultExtent: m,
|
|
17
17
|
onCancel: s,
|
|
18
|
-
onSubmit:
|
|
19
|
-
onChange:
|
|
18
|
+
onSubmit: v,
|
|
19
|
+
onChange: h
|
|
20
20
|
}) {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
}, g = (
|
|
24
|
-
if (
|
|
25
|
-
const c = _({ features:
|
|
26
|
-
|
|
27
|
-
} else
|
|
28
|
-
}, w = (
|
|
29
|
-
|
|
30
|
-
}, a = (
|
|
21
|
+
const f = D.useRef(null), [i, u] = k(S), [e, B] = k(), y = () => {
|
|
22
|
+
v && i && v(i);
|
|
23
|
+
}, g = (t) => {
|
|
24
|
+
if (t.length > 0) {
|
|
25
|
+
const c = _({ features: t });
|
|
26
|
+
u(c);
|
|
27
|
+
} else u(void 0);
|
|
28
|
+
}, w = (t) => {
|
|
29
|
+
u(t);
|
|
30
|
+
}, a = (t) => () => {
|
|
31
31
|
var c;
|
|
32
|
-
B(
|
|
32
|
+
B(t), (c = f.current) == null || c.addInteractions(t);
|
|
33
33
|
};
|
|
34
|
-
return D.useEffect(() => (i !== void 0 &&
|
|
35
|
-
}), [i]), W === "dialog" ? /* @__PURE__ */ r(R, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: s, children: [
|
|
34
|
+
return D.useEffect(() => (i !== void 0 && h !== void 0 && h(i), () => {
|
|
35
|
+
}), [i, h]), W === "dialog" ? /* @__PURE__ */ r(R, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: s, children: [
|
|
36
36
|
/* @__PURE__ */ r(K, { children: [
|
|
37
|
-
/* @__PURE__ */ r(
|
|
37
|
+
/* @__PURE__ */ r(o, { display: "flex", justifyContent: "space-between", children: [
|
|
38
38
|
/* @__PURE__ */ n(x, { variant: "subtitle2", children: "Draw On Map" }),
|
|
39
|
-
/* @__PURE__ */ r(
|
|
39
|
+
/* @__PURE__ */ r(o, { display: "flex", justifyContent: "flex-end", mb: 1, children: [
|
|
40
40
|
/* @__PURE__ */ n(
|
|
41
41
|
l,
|
|
42
42
|
{
|
|
@@ -69,15 +69,15 @@ function N({
|
|
|
69
69
|
)
|
|
70
70
|
] })
|
|
71
71
|
] }),
|
|
72
|
-
/* @__PURE__ */ r(
|
|
72
|
+
/* @__PURE__ */ r(o, { position: "relative", children: [
|
|
73
73
|
/* @__PURE__ */ n(
|
|
74
74
|
P,
|
|
75
75
|
{
|
|
76
|
-
id:
|
|
77
|
-
ref:
|
|
78
|
-
mapboxAccessToken:
|
|
76
|
+
id: p,
|
|
77
|
+
ref: f,
|
|
78
|
+
mapboxAccessToken: C,
|
|
79
79
|
drawingWKTData: i,
|
|
80
|
-
defaultExtent:
|
|
80
|
+
defaultExtent: m,
|
|
81
81
|
onDrawEnd: g
|
|
82
82
|
}
|
|
83
83
|
),
|
|
@@ -90,9 +90,9 @@ function N({
|
|
|
90
90
|
/* @__PURE__ */ n(d, { variant: "contained", onClick: y, children: "Ok" })
|
|
91
91
|
] })
|
|
92
92
|
] }) : /* @__PURE__ */ r(M, { children: [
|
|
93
|
-
/* @__PURE__ */ r(
|
|
93
|
+
/* @__PURE__ */ r(o, { display: "flex", justifyContent: "space-between", children: [
|
|
94
94
|
/* @__PURE__ */ n(x, { variant: "subtitle2", children: "Draw On Map" }),
|
|
95
|
-
/* @__PURE__ */ r(
|
|
95
|
+
/* @__PURE__ */ r(o, { display: "flex", justifyContent: "flex-end", mb: 1, children: [
|
|
96
96
|
/* @__PURE__ */ n(
|
|
97
97
|
l,
|
|
98
98
|
{
|
|
@@ -125,22 +125,22 @@ function N({
|
|
|
125
125
|
)
|
|
126
126
|
] })
|
|
127
127
|
] }),
|
|
128
|
-
/* @__PURE__ */ r(
|
|
128
|
+
/* @__PURE__ */ r(o, { position: "relative", children: [
|
|
129
129
|
/* @__PURE__ */ n(
|
|
130
130
|
P,
|
|
131
131
|
{
|
|
132
|
-
id:
|
|
133
|
-
ref:
|
|
134
|
-
mapboxAccessToken:
|
|
132
|
+
id: p,
|
|
133
|
+
ref: f,
|
|
134
|
+
mapboxAccessToken: C,
|
|
135
135
|
drawingWKTData: i,
|
|
136
|
-
defaultExtent:
|
|
136
|
+
defaultExtent: m,
|
|
137
137
|
onDrawEnd: g
|
|
138
138
|
}
|
|
139
139
|
),
|
|
140
140
|
/* @__PURE__ */ n(L, { show: e === void 0 })
|
|
141
141
|
] }),
|
|
142
142
|
i !== void 0 && /* @__PURE__ */ n(b, { value: i, onChange: w }),
|
|
143
|
-
!T && /* @__PURE__ */ r(
|
|
143
|
+
!T && /* @__PURE__ */ r(o, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
144
144
|
/* @__PURE__ */ n(d, { color: "primary", onClick: s, children: "Cancel" }),
|
|
145
145
|
/* @__PURE__ */ n(
|
|
146
146
|
d,
|
|
@@ -8,9 +8,9 @@ import b from "./geometry/index.js";
|
|
|
8
8
|
import g from "./kml/index.js";
|
|
9
9
|
import W from "./wkt/index.js";
|
|
10
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-
|
|
12
|
-
import { F as B, I as M } from "../../
|
|
13
|
-
import { I as T } from "../../Input-
|
|
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
14
|
const Z = ({
|
|
15
15
|
label: c,
|
|
16
16
|
mapboxAccessToken: l,
|
|
@@ -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";
|