@hybridcore/ui 1.0.2 → 1.1.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/Button-BZR43NHz.js +2025 -0
- package/dist/ButtonBase-B6WYZgVU.js +967 -0
- package/dist/CardContent-C8PxkJz4.js +73 -0
- package/dist/Checkbox-CxbQ9tJ5.js +673 -0
- package/dist/FormControl-C4PmH1vh.js +1491 -0
- package/dist/IconButton-CKHPuOyh.js +183 -0
- package/dist/Input-CH_JyT5B.js +324 -0
- package/dist/List-BX_5LP1i.js +132 -0
- package/dist/Object-DBPgar-D.js +688 -0
- package/dist/OutlinedInput-gnp48tDo.js +452 -0
- package/dist/Paper-CaiWdndQ.js +162 -0
- package/dist/Select-DOyHt8I_.js +2526 -0
- package/dist/Source-Bo1Eq6y-.js +4374 -0
- package/dist/Text-DVP2PrYM.js +2192 -0
- package/dist/Typography-XIiVCSto.js +178 -0
- package/dist/assertThisInitialized-BUtkG-md.js +13 -0
- package/dist/assets/index.css +1 -0
- package/dist/assets/index2.css +1 -0
- package/dist/chainPropTypes-DtBfUj5o.js +96 -0
- package/dist/components/access/helpers.js +32 -0
- package/dist/components/access/index.js +15 -0
- package/dist/components/card/index.js +159 -469
- package/dist/components/card/styled.js +75 -7
- package/dist/components/conditional-wrapper/index.js +9 -0
- package/dist/components/confirm/dialog.js +151 -0
- package/dist/components/confirm/index.js +23 -0
- package/dist/components/container/index.js +270 -0
- package/dist/components/context-menu/index.js +973 -0
- package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
- package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
- package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
- package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
- package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
- package/dist/components/data-management/instance-form/index.js +437 -0
- package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
- package/dist/components/data-security-selectors/security-level/index.js +81 -0
- package/dist/components/date-time-picker/index.js +103 -0
- package/dist/components/geometry-picker/coordinate/index.js +93 -0
- package/dist/components/geometry-picker/edit/index.js +71 -0
- package/dist/components/geometry-picker/geometry/index.js +160 -0
- package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
- package/dist/components/geometry-picker/index.js +140 -0
- package/dist/components/geometry-picker/kml/index.js +62 -0
- package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
- package/dist/components/geometry-picker/logic.js +69 -0
- package/dist/components/geometry-picker/map/index.js +42 -0
- package/dist/components/geometry-picker/map/logic.js +2360 -0
- package/dist/components/geometry-picker/map/style.js +88 -0
- package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
- package/dist/components/geometry-picker/parser/index.js +179 -0
- package/dist/components/geometry-picker/parser/logic.js +84 -0
- package/dist/components/geometry-picker/parser/styled.js +25 -0
- package/dist/components/geometry-picker/styled.js +48 -0
- package/dist/components/geometry-picker/wkt/index.js +59 -0
- package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
- package/dist/components/icon-button/index.js +18 -0
- package/dist/components/icon-button/styled.js +51 -0
- package/dist/components/key-protection/index.js +4 -0
- package/dist/components/key-protection/menu.js +85 -0
- package/dist/components/key-protection/utils.js +10 -0
- package/dist/components/loading/index.js +7 -0
- package/dist/components/loading/styled.js +16 -0
- package/dist/components/map/helpers/kml.js +45 -0
- package/dist/components/map/helpers/mapbox.js +48 -0
- package/dist/components/map/helpers/ol.js +25 -0
- package/dist/components/map/helpers/wkt.js +29 -0
- package/dist/components/map/index.js +30 -0
- package/dist/components/map/logic.js +140 -0
- package/dist/components/map/styled.js +8 -0
- package/dist/components/phone-input/index.js +25 -0
- package/dist/components/phone-input/styled.js +26 -0
- package/dist/components/search-input/index.js +76 -0
- package/dist/components/tree-select/index.js +70 -0
- package/dist/components/tree-select/styled.js +64 -0
- package/dist/components/treeview-filter/index.js +621 -0
- package/dist/components/treeview-filter/item/index.js +7 -0
- package/dist/components/treeview-filter/item-label/index.js +44 -0
- package/dist/createTheme-agWfFD64.js +2392 -0
- package/dist/exactProp-CI8dagM-.js +36 -0
- package/dist/extends-C3382pL0.js +22 -0
- package/dist/hooks/useMenuLogic.js +21 -0
- package/dist/hooks/useToggle.js +23 -0
- package/dist/index-BQE8B4sc.js +957 -0
- package/dist/index-DHFb1Qpn.js +1105 -0
- package/dist/isHostComponent-kiaBvYVo.js +6 -0
- package/dist/isMuiElement-CxT3_ACP.js +13 -0
- package/dist/main.d.ts +646 -0
- package/dist/ol-CMEkXXLJ.js +15041 -0
- package/dist/ownerDocument-CUrv0DIK.js +6 -0
- package/dist/ownerWindow-niciwP7I.js +7 -0
- package/dist/styled-B22KrhDR.js +229 -0
- package/dist/styled-Iq9jsO4F.js +1033 -0
- package/dist/useFormControl-CatNKXAi.js +10 -0
- package/dist/useId-BHG98T5I.js +26 -0
- package/dist/useTheme-C0Dky5rV.js +17 -0
- package/dist/useTheme-CeyGVuQP.js +10 -0
- package/dist/useThemeProps-CzAjOL6F.js +26 -0
- package/dist/utils/ontology.js +37 -0
- package/dist/utils-Bq0ye5vf.js +115 -0
- package/dist/utils-C13eMoWa.js +365 -0
- package/package.json +26 -5
- package/dist/styled-BG5UIpPU.js +0 -3459
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsx as e, Fragment as y, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { AccordionSummary as c, Box as a, Typography as s, Tooltip as d, IconButton as h, AccordionDetails as p } from "@mui/material";
|
|
3
|
+
import m from "./coordinate-input/index.js";
|
|
4
|
+
import w from "./logic.js";
|
|
5
|
+
import { GridExpandMoreIcon as f } from "@mui/x-data-grid";
|
|
6
|
+
import { Accordion as u } from "./styled.js";
|
|
7
|
+
import { Close as g } from "@mui/icons-material";
|
|
8
|
+
import { ConditionalWrapper as P } from "../../conditional-wrapper/index.js";
|
|
9
|
+
function M(C) {
|
|
10
|
+
const { state: I, action: t } = w(C);
|
|
11
|
+
return /* @__PURE__ */ e(y, { children: I.parsed.map((r, n) => {
|
|
12
|
+
if (r.type === "Point")
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
P,
|
|
15
|
+
{
|
|
16
|
+
condition: !C.disableGrouping,
|
|
17
|
+
wrapper: (i) => /* @__PURE__ */ o(u, { defaultExpanded: !0, children: [
|
|
18
|
+
/* @__PURE__ */ e(c, { expandIcon: /* @__PURE__ */ e(f, {}), children: /* @__PURE__ */ o(
|
|
19
|
+
a,
|
|
20
|
+
{
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
justifyContent: "space-between",
|
|
24
|
+
width: "100%",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ o(s, { sx: { width: 120 }, children: [
|
|
27
|
+
"Coordinate ",
|
|
28
|
+
n + 1
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ e(d, { title: "Delete", children: /* @__PURE__ */ e(
|
|
31
|
+
h,
|
|
32
|
+
{
|
|
33
|
+
size: "small",
|
|
34
|
+
color: "error",
|
|
35
|
+
sx: { ml: 1 },
|
|
36
|
+
onClick: t.onRemoveItem(n),
|
|
37
|
+
children: /* @__PURE__ */ e(g, { fontSize: "small" })
|
|
38
|
+
}
|
|
39
|
+
) })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
43
|
+
/* @__PURE__ */ e(p, { children: i })
|
|
44
|
+
] }, n),
|
|
45
|
+
children: /* @__PURE__ */ e(
|
|
46
|
+
m,
|
|
47
|
+
{
|
|
48
|
+
coordinate: r.coordinates,
|
|
49
|
+
onChange: t.onCoordinateInputChange(n)
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
},
|
|
53
|
+
n
|
|
54
|
+
);
|
|
55
|
+
if (r.type === "Polygon")
|
|
56
|
+
return /* @__PURE__ */ o(u, { children: [
|
|
57
|
+
/* @__PURE__ */ e(c, { expandIcon: /* @__PURE__ */ e(f, {}), children: /* @__PURE__ */ o(
|
|
58
|
+
a,
|
|
59
|
+
{
|
|
60
|
+
display: "flex",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyContent: "space-between",
|
|
63
|
+
width: "100%",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ o(s, { sx: { width: 120 }, children: [
|
|
66
|
+
"Polygon ",
|
|
67
|
+
n + 1
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ e(d, { title: "Delete", children: /* @__PURE__ */ e(
|
|
70
|
+
h,
|
|
71
|
+
{
|
|
72
|
+
size: "small",
|
|
73
|
+
color: "error",
|
|
74
|
+
sx: { ml: 1 },
|
|
75
|
+
onClick: t.onRemoveItem(n),
|
|
76
|
+
children: /* @__PURE__ */ e(g, { fontSize: "small" })
|
|
77
|
+
}
|
|
78
|
+
) })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) }),
|
|
82
|
+
/* @__PURE__ */ e(p, { children: r.coordinates[0].map((i, l) => /* @__PURE__ */ e(
|
|
83
|
+
m,
|
|
84
|
+
{
|
|
85
|
+
coordinate: i,
|
|
86
|
+
onChange: t.onPolygonInputChange(
|
|
87
|
+
r.coordinates,
|
|
88
|
+
n,
|
|
89
|
+
l
|
|
90
|
+
)
|
|
91
|
+
},
|
|
92
|
+
l
|
|
93
|
+
)) })
|
|
94
|
+
] }, n);
|
|
95
|
+
if (r.type === "MultiPoint")
|
|
96
|
+
return /* @__PURE__ */ o(u, { children: [
|
|
97
|
+
/* @__PURE__ */ e(c, { expandIcon: /* @__PURE__ */ e(f, {}), children: /* @__PURE__ */ o(
|
|
98
|
+
a,
|
|
99
|
+
{
|
|
100
|
+
display: "flex",
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
justifyContent: "space-between",
|
|
103
|
+
width: "100%",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ o(s, { sx: { width: 120 }, children: [
|
|
106
|
+
"Multi-Point ",
|
|
107
|
+
n + 1
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ e(d, { title: "Delete", children: /* @__PURE__ */ e(
|
|
110
|
+
h,
|
|
111
|
+
{
|
|
112
|
+
size: "small",
|
|
113
|
+
color: "error",
|
|
114
|
+
sx: { ml: 1 },
|
|
115
|
+
onClick: t.onRemoveItem(n),
|
|
116
|
+
children: /* @__PURE__ */ e(g, { fontSize: "small" })
|
|
117
|
+
}
|
|
118
|
+
) })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
) }),
|
|
122
|
+
/* @__PURE__ */ e(p, { children: r.coordinates.map((i, l) => /* @__PURE__ */ e(
|
|
123
|
+
m,
|
|
124
|
+
{
|
|
125
|
+
coordinate: i,
|
|
126
|
+
onChange: t.onMultiPointInputChange(
|
|
127
|
+
r.coordinates,
|
|
128
|
+
n,
|
|
129
|
+
l
|
|
130
|
+
)
|
|
131
|
+
},
|
|
132
|
+
l
|
|
133
|
+
)) })
|
|
134
|
+
] }, n);
|
|
135
|
+
if (r.type === "LineString")
|
|
136
|
+
return /* @__PURE__ */ o(u, { children: [
|
|
137
|
+
/* @__PURE__ */ e(c, { expandIcon: /* @__PURE__ */ e(f, {}), children: /* @__PURE__ */ o(
|
|
138
|
+
a,
|
|
139
|
+
{
|
|
140
|
+
display: "flex",
|
|
141
|
+
alignItems: "center",
|
|
142
|
+
justifyContent: "space-between",
|
|
143
|
+
width: "100%",
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ o(s, { sx: { width: 120 }, children: [
|
|
146
|
+
"Line ",
|
|
147
|
+
n + 1
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ e(d, { title: "Delete", children: /* @__PURE__ */ e(
|
|
150
|
+
h,
|
|
151
|
+
{
|
|
152
|
+
size: "small",
|
|
153
|
+
color: "error",
|
|
154
|
+
sx: { ml: 1 },
|
|
155
|
+
onClick: t.onRemoveItem(n),
|
|
156
|
+
children: /* @__PURE__ */ e(g, { fontSize: "small" })
|
|
157
|
+
}
|
|
158
|
+
) })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
) }),
|
|
162
|
+
/* @__PURE__ */ e(p, { children: r.coordinates.map((i, l) => /* @__PURE__ */ e(
|
|
163
|
+
m,
|
|
164
|
+
{
|
|
165
|
+
coordinate: i,
|
|
166
|
+
onChange: t.onLineStringInputChange(
|
|
167
|
+
r.coordinates,
|
|
168
|
+
n,
|
|
169
|
+
l
|
|
170
|
+
)
|
|
171
|
+
},
|
|
172
|
+
l
|
|
173
|
+
)) })
|
|
174
|
+
] }, n);
|
|
175
|
+
}) });
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
M as default
|
|
179
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import u from "react";
|
|
2
|
+
import { parse as a, convert as c } from "../../map/helpers/wkt.js";
|
|
3
|
+
import m from "lodash";
|
|
4
|
+
function M({ value: p, onChange: i }) {
|
|
5
|
+
const s = u.useMemo(() => {
|
|
6
|
+
let e = a(p);
|
|
7
|
+
return m.isArray(e) || (e = [e]), e;
|
|
8
|
+
}, [p]);
|
|
9
|
+
return {
|
|
10
|
+
state: {
|
|
11
|
+
parsed: s
|
|
12
|
+
},
|
|
13
|
+
action: {
|
|
14
|
+
onCoordinateInputChange: (e) => (l) => {
|
|
15
|
+
if (i) {
|
|
16
|
+
let o, t = [...s];
|
|
17
|
+
t[e] = {
|
|
18
|
+
type: "Point",
|
|
19
|
+
coordinates: [l.longitude, l.latitude]
|
|
20
|
+
}, t.length > 1 ? o = c({
|
|
21
|
+
type: "GeometryCollection",
|
|
22
|
+
geometries: t
|
|
23
|
+
}) : o = c(t[0]), i(o);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
onPolygonInputChange: (e, l, o) => (t) => {
|
|
27
|
+
if (i) {
|
|
28
|
+
let n = [...s], r = [...e[0]];
|
|
29
|
+
r[o] = [t.longitude, t.latitude], n[l] = {
|
|
30
|
+
type: "Polygon",
|
|
31
|
+
coordinates: [r]
|
|
32
|
+
};
|
|
33
|
+
const g = c({
|
|
34
|
+
type: "GeometryCollection",
|
|
35
|
+
geometries: n
|
|
36
|
+
});
|
|
37
|
+
i(g);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
onMultiPointInputChange: (e, l, o) => (t) => {
|
|
41
|
+
if (i) {
|
|
42
|
+
let n = [...s], r = [...e];
|
|
43
|
+
r[o] = [t.longitude, t.latitude], n[l] = {
|
|
44
|
+
type: "MultiPoint",
|
|
45
|
+
coordinates: r
|
|
46
|
+
};
|
|
47
|
+
const g = c({
|
|
48
|
+
type: "GeometryCollection",
|
|
49
|
+
geometries: n
|
|
50
|
+
});
|
|
51
|
+
i(g);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
onLineStringInputChange: (e, l, o) => (t) => {
|
|
55
|
+
if (i) {
|
|
56
|
+
let n = [...s], r = [...e];
|
|
57
|
+
r[o] = [t.longitude, t.latitude], n[l] = {
|
|
58
|
+
type: "LineString",
|
|
59
|
+
coordinates: r
|
|
60
|
+
};
|
|
61
|
+
const g = c({
|
|
62
|
+
type: "GeometryCollection",
|
|
63
|
+
geometries: n
|
|
64
|
+
});
|
|
65
|
+
i(g);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
onRemoveItem: (e) => (l) => {
|
|
69
|
+
if (l.stopPropagation(), i) {
|
|
70
|
+
let o = [...s];
|
|
71
|
+
o.splice(e, 1);
|
|
72
|
+
const n = c({
|
|
73
|
+
type: "GeometryCollection",
|
|
74
|
+
geometries: o
|
|
75
|
+
});
|
|
76
|
+
i(n);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
M as default
|
|
84
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { styled as i, Accordion as r } from "@mui/material";
|
|
2
|
+
const n = i(r)(({ theme: o }) => ({
|
|
3
|
+
borderRadius: 10,
|
|
4
|
+
margin: "16px 0",
|
|
5
|
+
boxShadow: o.shadows[4],
|
|
6
|
+
"&:before": {
|
|
7
|
+
display: "none"
|
|
8
|
+
},
|
|
9
|
+
".MuiAccordionSummary-root, .MuiAccordionSummary-root.Mui-expanded": {
|
|
10
|
+
minHeight: 42
|
|
11
|
+
},
|
|
12
|
+
"& .MuiAccordionSummary-content, & .MuiAccordionSummary-content.Mui-expanded": { margin: 0 },
|
|
13
|
+
"& .MuiAccordionDetails-root": {
|
|
14
|
+
paddingTop: 0
|
|
15
|
+
},
|
|
16
|
+
"& .MuiGrid-root:first-of-type": {
|
|
17
|
+
marginTop: 0,
|
|
18
|
+
"& .MuiGrid-item": {
|
|
19
|
+
paddingTop: 8
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
export {
|
|
24
|
+
n as Accordion
|
|
25
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { styled as t, Box as n, Button as a } from "@mui/material";
|
|
2
|
+
const e = t(n)(({ theme: o }) => ({
|
|
3
|
+
position: "relative",
|
|
4
|
+
paddingTop: o.spacing(1),
|
|
5
|
+
width: "100%"
|
|
6
|
+
})), r = t(n)({
|
|
7
|
+
position: "absolute",
|
|
8
|
+
top: 0,
|
|
9
|
+
right: 0,
|
|
10
|
+
zIndex: 9
|
|
11
|
+
}), d = t(a)(({ theme: o, variant: i }) => ({
|
|
12
|
+
fontSize: 10,
|
|
13
|
+
padding: "3px 8px",
|
|
14
|
+
minWidth: "auto",
|
|
15
|
+
boxShadow: o.shadows[1],
|
|
16
|
+
textTransform: "none",
|
|
17
|
+
borderRadius: 13,
|
|
18
|
+
marginLeft: o.spacing(0.5),
|
|
19
|
+
"& .MuiButton-startIcon": {
|
|
20
|
+
marginRight: 0.25,
|
|
21
|
+
"& > :nth-of-type(1)": {
|
|
22
|
+
fontSize: 14
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
...i === "contained" && {
|
|
26
|
+
"&:hover": {
|
|
27
|
+
backgroundColor: o.palette.grey[300],
|
|
28
|
+
boxShadow: o.shadows[1]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
})), p = t(n)({
|
|
32
|
+
position: "absolute",
|
|
33
|
+
top: 0,
|
|
34
|
+
left: 0,
|
|
35
|
+
right: 0,
|
|
36
|
+
zIndex: 10,
|
|
37
|
+
display: "flex",
|
|
38
|
+
minHeight: "100%",
|
|
39
|
+
"& .MuiPaper-root": {
|
|
40
|
+
flex: 1
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
r as Actions,
|
|
45
|
+
d as Button,
|
|
46
|
+
e as Container,
|
|
47
|
+
p as Modal
|
|
48
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useState as o, useEffect as x } from "react";
|
|
3
|
+
import k from "./select-input-method.js";
|
|
4
|
+
import { TextField as b, Box as C, Button as c } from "@mui/material";
|
|
5
|
+
import { parse as T } from "../../map/helpers/wkt.js";
|
|
6
|
+
function E({ onCancel: d, onSubmit: n }) {
|
|
7
|
+
const [t, i] = o(), [a, l] = o(), [W, u] = o(), m = (r) => {
|
|
8
|
+
i(r);
|
|
9
|
+
}, p = (r) => {
|
|
10
|
+
i(r.target.value);
|
|
11
|
+
}, f = () => {
|
|
12
|
+
if (t && t.trim().length > 0)
|
|
13
|
+
try {
|
|
14
|
+
T(t), u(t), l(void 0);
|
|
15
|
+
} catch {
|
|
16
|
+
u(void 0), l("Error in WKT data!");
|
|
17
|
+
}
|
|
18
|
+
}, h = () => {
|
|
19
|
+
n && t && n(t);
|
|
20
|
+
};
|
|
21
|
+
return x(() => (f(), () => {
|
|
22
|
+
}), [t]), t === void 0 ? /* @__PURE__ */ e(k, { onSubmit: m }) : /* @__PURE__ */ s(v, { children: [
|
|
23
|
+
/* @__PURE__ */ e(
|
|
24
|
+
b,
|
|
25
|
+
{
|
|
26
|
+
label: "WKT Text",
|
|
27
|
+
multiline: !0,
|
|
28
|
+
maxRows: 15,
|
|
29
|
+
minRows: 8,
|
|
30
|
+
variant: "outlined",
|
|
31
|
+
fullWidth: !0,
|
|
32
|
+
value: t,
|
|
33
|
+
autoFocus: !0,
|
|
34
|
+
InputLabelProps: { shrink: !0 },
|
|
35
|
+
onChange: p,
|
|
36
|
+
...a !== void 0 && {
|
|
37
|
+
error: !0,
|
|
38
|
+
helperText: a
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ s(C, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
43
|
+
/* @__PURE__ */ e(c, { color: "primary", onClick: d, children: "Cancel" }),
|
|
44
|
+
/* @__PURE__ */ e(
|
|
45
|
+
c,
|
|
46
|
+
{
|
|
47
|
+
color: "primary",
|
|
48
|
+
variant: "contained",
|
|
49
|
+
disabled: t === void 0,
|
|
50
|
+
onClick: h,
|
|
51
|
+
children: "Ok"
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
E as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { Box as d, Typography as r } from "@mui/material";
|
|
4
|
+
import { EditNote as f, UploadFile as p } from "@mui/icons-material";
|
|
5
|
+
import { IconButton as o } from "../../icon-button/index.js";
|
|
6
|
+
const P = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='169.604'%20height='151.513'%20viewBox='0%200%20169.604%20151.513'%3e%3cg%20id='gps-navigation'%20transform='translate(-4%20-3.09)'%3e%3cpath%20id='Path_84306'%20data-name='Path%2084306'%20d='M72.706,17A35.735,35.735,0,0,0,37,52.706c0,27.434,31.957,71.323,33.3,73.168a2.991,2.991,0,0,0,4.82,0c1.369-1.845,33.3-45.734,33.3-73.168A35.735,35.735,0,0,0,72.706,17Zm0,101.941c-7.469-10.831-29.755-44.9-29.755-66.235a29.755,29.755,0,0,1,59.51,0C102.461,74.041,80.175,108.14,72.706,118.941Z'%20transform='translate(65.192%2027.479)'%20fill='%23043991'/%3e%3cpath%20id='Path_84307'%20data-name='Path%2084307'%20d='M56.9,25A11.9,11.9,0,1,0,68.8,36.9,11.9,11.9,0,0,0,56.9,25Zm0,17.853A5.951,5.951,0,1,1,62.853,36.9,5.969,5.969,0,0,1,56.9,42.853Z'%20transform='translate(80.996%2043.284)'%20fill='%23043991'/%3e%3cpath%20id='Path_84308'%20data-name='Path%2084308'%20d='M21.853,56.382a2.974,2.974,0,0,0,2.41-1.22c.625-.863,15.443-21.215,15.443-34.218A17.853,17.853,0,0,0,4,20.943c0,13,14.818,33.356,15.443,34.218a2.974,2.974,0,0,0,2.41,1.22Zm0-47.34a11.9,11.9,0,0,1,11.9,11.9c0,7.677-7.2,20.174-11.9,27.256-4.7-7.052-11.9-19.579-11.9-27.256A11.9,11.9,0,0,1,21.853,9.041Z'%20fill='%23043991'/%3e%3cpath%20id='Path_84309'%20data-name='Path%2084309'%20d='M23.117,34.954c-7.171-.446-10.5-1.012-12.051-1.428a2.976,2.976,0,0,0-5.118-2.351A4.724,4.724,0,0,0,4.52,34.448c0,4.553,5.624,5.683,18.24,6.457h.179a2.978,2.978,0,0,0,.179-5.951Z'%20transform='translate(1.027%2053.622)'%20fill='%23043991'/%3e%3cpath%20id='Path_84310'%20data-name='Path%2084310'%20d='M30.095,26.806l-2.529.536c-5.058,1.071-10.3,2.172-15.056,3.362a2.975,2.975,0,0,0,.714,5.862,2.211,2.211,0,0,0,.744-.089c4.642-1.16,9.819-2.261,14.818-3.333l2.529-.536a2.982,2.982,0,0,0-1.25-5.832Z'%20transform='translate(12.349%2046.655)'%20fill='%23043991'/%3e%3cpath%20id='Path_84311'%20data-name='Path%2084311'%20d='M10,25.707a2.983,2.983,0,0,0,2.976,2.737h.238s8.48-.684,17.615-.744a2.976,2.976,0,0,0,0-5.951c-9.4.03-17.734.714-18.091.744a2.969,2.969,0,0,0-2.708,3.214Z'%20transform='translate(11.853%2036.863)'%20fill='%23043991'/%3e%3cpath%20id='Path_84312'%20data-name='Path%2084312'%20d='M58.689,52.158c-5.088,0-11.426-.089-17.823-.238a3.023,3.023,0,0,0-3.035,2.916,2.947,2.947,0,0,0,2.916,3.035c6.427.149,12.824.238,17.972.268a2.976,2.976,0,1,0,0-5.951Z'%20transform='translate(66.831%2096.465)'%20fill='%23043991'/%3e%3cpath%20id='Path_84313'%20data-name='Path%2084313'%20d='M22.1,35.342a2.965,2.965,0,0,0,2.827,2.023,3.715,3.715,0,0,0,.952-.149c4.493-1.488,9.105-3.571,9.105-7.647a5.641,5.641,0,0,0-1.875-4.047c-1.488-1.488-3.9-2.529-7.528-3.3a2.976,2.976,0,1,0-1.19,5.832,12.588,12.588,0,0,1,4.255,1.458A17.992,17.992,0,0,1,24,31.563a2.972,2.972,0,0,0-1.875,3.779Z'%20transform='translate(35.493%2037.673)'%20fill='%23043991'/%3e%3cpath%20id='Path_84314'%20data-name='Path%2084314'%20d='M18.816,32.091a2.985,2.985,0,0,0-3.095,2.856,2.949,2.949,0,0,0,2.856,3.095c5.415.238,11.753.536,17.764.982h.238a2.965,2.965,0,0,0,.238-5.921c-6.1-.476-12.5-.774-17.942-.982Z'%20transform='translate(23.152%2057.289)'%20fill='%23043991'/%3e%3cpath%20id='Path_84315'%20data-name='Path%2084315'%20d='M34.868,52.334c-6.516-.625-12.438-1.309-17.615-2.083a2.962,2.962,0,1,0-.863,5.862c5.3.774,11.307,1.488,17.913,2.113h.3a2.983,2.983,0,0,0,.268-5.951Z'%20transform='translate(19.477%2093.105)'%20fill='%23043991'/%3e%3cpath%20id='Path_84316'%20data-name='Path%2084316'%20d='M46.773,52.345C41,52.107,34.99,51.78,28.979,51.393a2.967,2.967,0,0,0-.387,5.921c6.07.387,12.11.714,17.913.952h.119a2.977,2.977,0,0,0,.119-5.951Z'%20transform='translate(43.101%2095.414)'%20fill='%23043991'/%3e%3cpath%20id='Path_84317'%20data-name='Path%2084317'%20d='M44.447,40.177a2.958,2.958,0,0,0-3.69-2.023c-5.207,1.488-11.337,3.065-17.2,4.523a2.975,2.975,0,0,0,.714,5.862,1.966,1.966,0,0,0,.714-.089c5.892-1.488,12.11-3.035,17.407-4.582a2.958,2.958,0,0,0,2.023-3.69Z'%20transform='translate(34.179%2069.02)'%20fill='%23043991'/%3e%3cpath%20id='Path_84318'%20data-name='Path%2084318'%20d='M32.7,43.258a2.982,2.982,0,0,0-3.63-2.113c-7.231,1.9-12.765,3.541-17.347,5.118a2.984,2.984,0,0,0,.982,5.8,3.741,3.741,0,0,0,.982-.149c4.463-1.547,9.849-3.124,16.96-5a2.982,2.982,0,0,0,2.113-3.63Z'%20transform='translate(11.291%2074.985)'%20fill='%23043991'/%3e%3cpath%20id='Path_84319'%20data-name='Path%2084319'%20d='M19.463,56.08c-9.016-2.589-9.432-4.731-9.432-4.731,0-.03,0-.327.506-.952a2.983,2.983,0,1,0-4.642-3.749,7.477,7.477,0,0,0-1.845,4.7c0,5.862,7.855,8.778,13.747,10.474a2.506,2.506,0,0,0,.8.119,2.956,2.956,0,0,0,2.856-2.172A3.012,3.012,0,0,0,19.4,56.08Z'%20transform='translate(0.099%2083.854)'%20fill='%23043991'/%3e%3cpath%20id='Path_84320'%20data-name='Path%2084320'%20d='M41.569,35.891a61.021,61.021,0,0,0-10.385-2.708,2.965,2.965,0,1,0-1.071,5.832,56.208,56.208,0,0,1,9.373,2.44,12.212,12.212,0,0,1,2.737,1.309,2.965,2.965,0,0,0,5.386,2.321,4.941,4.941,0,0,0,.774-2.589c0-4.017-4.969-5.892-6.814-6.576Z'%20transform='translate(46.787%2059.351)'%20fill='%23043991'/%3e%3c/g%3e%3c/svg%3e";
|
|
7
|
+
function v({ onSubmit: n }) {
|
|
8
|
+
const l = m.useRef(null), i = (a) => {
|
|
9
|
+
n && n(a);
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
|
+
d,
|
|
13
|
+
{
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
pt: 8,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ t("img", { src: P, width: 180, height: 160 }),
|
|
21
|
+
/* @__PURE__ */ t(r, { my: 8, mx: 10, textAlign: "center", children: "You can add WKT data by importing a WKT file from your computer or you can create WKT data" }),
|
|
22
|
+
/* @__PURE__ */ e(d, { display: "flex", justifyContent: "space-between", width: 300, children: [
|
|
23
|
+
/* @__PURE__ */ e(
|
|
24
|
+
o,
|
|
25
|
+
{
|
|
26
|
+
variant: "vertical",
|
|
27
|
+
color: "primary",
|
|
28
|
+
onClick: () => i(""),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ t(f, {}),
|
|
31
|
+
/* @__PURE__ */ t(r, { variant: "body2", mt: 0.5, children: "Create WKT data" })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ e(
|
|
36
|
+
o,
|
|
37
|
+
{
|
|
38
|
+
variant: "vertical",
|
|
39
|
+
color: "primary",
|
|
40
|
+
onClick: () => {
|
|
41
|
+
var a;
|
|
42
|
+
(a = l.current) == null || a.click();
|
|
43
|
+
},
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ t(p, {}),
|
|
46
|
+
/* @__PURE__ */ t(r, { variant: "body2", mt: 0.5, children: "Import WKT file from computer" })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ t(
|
|
52
|
+
"input",
|
|
53
|
+
{
|
|
54
|
+
ref: l,
|
|
55
|
+
type: "file",
|
|
56
|
+
accept: ".wkt",
|
|
57
|
+
style: { display: "none" },
|
|
58
|
+
onChange: (a) => {
|
|
59
|
+
if (a.target.files) {
|
|
60
|
+
const c = new FileReader();
|
|
61
|
+
c.onload = async (h) => {
|
|
62
|
+
const s = h.target.result;
|
|
63
|
+
i(s);
|
|
64
|
+
}, c.readAsText(a.target.files[0]);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
v as default
|
|
75
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { VerticalButton as m, MiniButton as c } from "./styled.js";
|
|
3
|
+
import { I as e } from "../../IconButton-CKHPuOyh.js";
|
|
4
|
+
const a = ({
|
|
5
|
+
variant: i = "default",
|
|
6
|
+
startIcon: f,
|
|
7
|
+
onclick: n,
|
|
8
|
+
children: o,
|
|
9
|
+
...r
|
|
10
|
+
}) => {
|
|
11
|
+
const u = () => {
|
|
12
|
+
n !== void 0 && n();
|
|
13
|
+
};
|
|
14
|
+
return i === "vertical" ? /* @__PURE__ */ t(m, { ...r, children: o }) : i === "mini" ? /* @__PURE__ */ t(c, { color: "inherit", startIcon: f, onClick: u, children: o }) : /* @__PURE__ */ t(e, { onClick: u, ...r, children: o });
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
a as IconButton
|
|
18
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { styled as o, ButtonBase as n, Button as a } from "@mui/material";
|
|
2
|
+
const r = o(n)(({ theme: t, color: i }) => ({
|
|
3
|
+
position: "relative",
|
|
4
|
+
display: "flex",
|
|
5
|
+
flexDirection: "column",
|
|
6
|
+
width: 130,
|
|
7
|
+
height: 140,
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
color: i ? t.palette.text.primary : "inherit",
|
|
10
|
+
borderRadius: 10,
|
|
11
|
+
transition: "all .3s",
|
|
12
|
+
"&:after": {
|
|
13
|
+
content: '""',
|
|
14
|
+
position: "absolute",
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 30,
|
|
17
|
+
right: 30,
|
|
18
|
+
height: 2,
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
backgroundColor: i ? t.palette[i].dark : "inherit",
|
|
21
|
+
borderRadius: 2,
|
|
22
|
+
opacity: 0,
|
|
23
|
+
transition: "all .3s"
|
|
24
|
+
},
|
|
25
|
+
"&:hover": {
|
|
26
|
+
boxShadow: t.shadows[4],
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
color: i ? t.palette.text.primary : "inherit",
|
|
29
|
+
"&:after": {
|
|
30
|
+
opacity: 1
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"& .MuiSvgIcon-root": {
|
|
34
|
+
fontSize: 50
|
|
35
|
+
}
|
|
36
|
+
})), s = o(a)(({ theme: t }) => ({
|
|
37
|
+
fontSize: 10,
|
|
38
|
+
padding: "2px 6px",
|
|
39
|
+
minWidth: "auto",
|
|
40
|
+
boxShadow: t.shadows[1],
|
|
41
|
+
"& .MuiButton-startIcon": {
|
|
42
|
+
marginRight: 0.25,
|
|
43
|
+
"& > :nth-of-type(1)": {
|
|
44
|
+
fontSize: 14
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
export {
|
|
49
|
+
s as MiniButton,
|
|
50
|
+
r as VerticalButton
|
|
51
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import h from "lodash";
|
|
3
|
+
import m from "../../hooks/useMenuLogic.js";
|
|
4
|
+
import { Key as c, Add as g } from "@mui/icons-material";
|
|
5
|
+
import { IconButton as f, Menu as y, MenuItem as l, ListItemIcon as s } from "@mui/material";
|
|
6
|
+
import { r as b, a as k } from "../../utils-Bq0ye5vf.js";
|
|
7
|
+
import { alert as i } from "../confirm/index.js";
|
|
8
|
+
let a;
|
|
9
|
+
const M = () => {
|
|
10
|
+
const { state: r, action: t } = m(), d = async () => {
|
|
11
|
+
t.close();
|
|
12
|
+
const o = await b();
|
|
13
|
+
o ? (a = h.get(o, "rawId"), new Uint8Array(a).toString(), i("Successfull", "Key successfully registered")) : i("Error!", "The key couldn't be registered!");
|
|
14
|
+
}, u = async () => {
|
|
15
|
+
t.close();
|
|
16
|
+
try {
|
|
17
|
+
await k(a), i("Successfull", "Successfully authenticated");
|
|
18
|
+
} catch (o) {
|
|
19
|
+
i("Error!", "Couldn't be authenticated!"), console.log(o);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ n(p, { children: [
|
|
23
|
+
/* @__PURE__ */ e(
|
|
24
|
+
f,
|
|
25
|
+
{
|
|
26
|
+
size: "large",
|
|
27
|
+
"aria-label": "account of current user",
|
|
28
|
+
onClick: t.open,
|
|
29
|
+
color: "inherit",
|
|
30
|
+
"aria-controls": r.isOpen ? "key-protection-menu" : void 0,
|
|
31
|
+
"aria-haspopup": "true",
|
|
32
|
+
"aria-expanded": r.isOpen ? "true" : void 0,
|
|
33
|
+
children: /* @__PURE__ */ e(c, {})
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ n(
|
|
37
|
+
y,
|
|
38
|
+
{
|
|
39
|
+
id: "key-protection-menu",
|
|
40
|
+
anchorEl: r.anchorEl,
|
|
41
|
+
keepMounted: !0,
|
|
42
|
+
anchorOrigin: {
|
|
43
|
+
vertical: "bottom",
|
|
44
|
+
horizontal: "right"
|
|
45
|
+
},
|
|
46
|
+
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
47
|
+
open: r.isOpen,
|
|
48
|
+
onClose: t.close,
|
|
49
|
+
PaperProps: {
|
|
50
|
+
elevation: 0,
|
|
51
|
+
sx: {
|
|
52
|
+
overflow: "visible",
|
|
53
|
+
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
|
54
|
+
mt: 1.5,
|
|
55
|
+
"&:before": {
|
|
56
|
+
content: '""',
|
|
57
|
+
display: "block",
|
|
58
|
+
position: "absolute",
|
|
59
|
+
top: 0,
|
|
60
|
+
right: 14,
|
|
61
|
+
width: 10,
|
|
62
|
+
height: 10,
|
|
63
|
+
bgcolor: "background.paper",
|
|
64
|
+
transform: "translateY(-50%) rotate(45deg)",
|
|
65
|
+
zIndex: 0
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ n(l, { onClick: d, children: [
|
|
71
|
+
/* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(g, { fontSize: "small" }) }),
|
|
72
|
+
"Register Key"
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ n(l, { onClick: u, children: [
|
|
75
|
+
/* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(c, { fontSize: "small" }) }),
|
|
76
|
+
"Authenticate"
|
|
77
|
+
] })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] });
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
M as KeyProtectionMenu
|
|
85
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as r, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
import { CircularProgress as n } from "@mui/material";
|
|
3
|
+
import { Container as e } from "./styled.js";
|
|
4
|
+
const p = ({ show: o, ...t }) => o ? /* @__PURE__ */ r(e, { ...t, children: /* @__PURE__ */ r(n, {}) }) : /* @__PURE__ */ r(i, {});
|
|
5
|
+
export {
|
|
6
|
+
p as Loading
|
|
7
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { styled as r, Box as i } from "@mui/material";
|
|
2
|
+
const d = r(i, {
|
|
3
|
+
shouldForwardProp: (e) => e !== "overlay" && e !== "overlayColor"
|
|
4
|
+
})(({ overlay: e, overlayColor: o, position: t }) => ({
|
|
5
|
+
position: t === "fixed" ? "fixed" : "absolute",
|
|
6
|
+
width: "100%",
|
|
7
|
+
height: "100%",
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
backgroundColor: o || "rgba(255,255,255,0.15)",
|
|
12
|
+
...e ? { top: 0, left: 0, zIndex: 9 } : {}
|
|
13
|
+
}));
|
|
14
|
+
export {
|
|
15
|
+
d as Container
|
|
16
|
+
};
|