@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,12 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "@mui/material";
|
|
3
|
+
import "./styled.js";
|
|
4
|
+
import "@mui/icons-material";
|
|
5
|
+
import "../../../../../hooks/useToggle.js";
|
|
6
|
+
import { C as l } from "../../../../../index-DHFb1Qpn.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "lodash";
|
|
9
|
+
import "dayjs";
|
|
10
|
+
export {
|
|
11
|
+
l as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { styled as i, Box as n, Button as r } from "@mui/material";
|
|
2
|
+
const p = i(n)(({ theme: o, variant: t }) => ({
|
|
3
|
+
position: "relative",
|
|
4
|
+
width: "100%",
|
|
5
|
+
...t === "outlined" ? {
|
|
6
|
+
border: "1px solid",
|
|
7
|
+
padding: "2.5px 60px 2.5px 2.5px",
|
|
8
|
+
borderRadius: o.spacing(0.5),
|
|
9
|
+
"& .MuiButton-root": {
|
|
10
|
+
margin: "7px 8px"
|
|
11
|
+
}
|
|
12
|
+
} : {
|
|
13
|
+
borderBottom: "1px solid",
|
|
14
|
+
paddingBottom: o.spacing(0.5)
|
|
15
|
+
},
|
|
16
|
+
borderColor: o.palette.action.disabled,
|
|
17
|
+
"&:hover": {
|
|
18
|
+
borderColor: o.palette.action.active
|
|
19
|
+
}
|
|
20
|
+
})), d = i(n)(({ theme: o }) => ({
|
|
21
|
+
minHeight: 33,
|
|
22
|
+
whiteSpace: "normal",
|
|
23
|
+
"& .MuiChip-root": {
|
|
24
|
+
marginRight: o.spacing(0.5),
|
|
25
|
+
marginTop: o.spacing(0.5)
|
|
26
|
+
},
|
|
27
|
+
"& .MuiChip-root:first-of-type": {
|
|
28
|
+
marginLeft: 0
|
|
29
|
+
}
|
|
30
|
+
})), e = i(r)(({ theme: o, variant: t }) => ({
|
|
31
|
+
position: "absolute",
|
|
32
|
+
top: 0,
|
|
33
|
+
right: 0,
|
|
34
|
+
fontSize: 10,
|
|
35
|
+
padding: "3px 8px",
|
|
36
|
+
minWidth: "auto",
|
|
37
|
+
boxShadow: o.shadows[1],
|
|
38
|
+
textTransform: "none",
|
|
39
|
+
borderRadius: 13,
|
|
40
|
+
marginLeft: o.spacing(0.5),
|
|
41
|
+
"& .MuiButton-startIcon": {
|
|
42
|
+
marginRight: 0.25,
|
|
43
|
+
"& > :nth-of-type(1)": {
|
|
44
|
+
fontSize: 14
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
...t === "contained" && {
|
|
48
|
+
"&:hover": {
|
|
49
|
+
backgroundColor: o.palette.grey[300],
|
|
50
|
+
boxShadow: o.shadows[1]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
...t === "text" && {
|
|
54
|
+
backgroundColor: o.palette.common.white,
|
|
55
|
+
"&:hover": {
|
|
56
|
+
backgroundColor: o.palette.grey[300]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
export {
|
|
61
|
+
p as Container,
|
|
62
|
+
e as MiniButton,
|
|
63
|
+
d as Values
|
|
64
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Box as p, FormLabel as c } from "@mui/material";
|
|
3
|
+
import m from "react-select";
|
|
4
|
+
const f = ({
|
|
5
|
+
policyList: n,
|
|
6
|
+
value: l = [],
|
|
7
|
+
showError: t = !1,
|
|
8
|
+
variant: e = "standart",
|
|
9
|
+
onChange: r
|
|
10
|
+
}) => {
|
|
11
|
+
const d = (o) => {
|
|
12
|
+
r(o.map((a) => a.id));
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ s(
|
|
15
|
+
p,
|
|
16
|
+
{
|
|
17
|
+
sx: {
|
|
18
|
+
mb: 2,
|
|
19
|
+
...e === "outlined" && {
|
|
20
|
+
position: "relative",
|
|
21
|
+
mt: 1.5,
|
|
22
|
+
zIndex: 9
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ i(
|
|
27
|
+
c,
|
|
28
|
+
{
|
|
29
|
+
sx: {
|
|
30
|
+
display: "block",
|
|
31
|
+
...t && {
|
|
32
|
+
color: (o) => o.palette.error.main
|
|
33
|
+
},
|
|
34
|
+
...e === "outlined" && {
|
|
35
|
+
position: "absolute",
|
|
36
|
+
fontSize: "small",
|
|
37
|
+
zIndex: 1,
|
|
38
|
+
bgcolor: (o) => o.palette.background.paper,
|
|
39
|
+
ml: 1.5,
|
|
40
|
+
mt: "-9px",
|
|
41
|
+
px: 0.5
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
children: "Policy List"
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ i(
|
|
48
|
+
m,
|
|
49
|
+
{
|
|
50
|
+
value: n.filter((o) => l.includes(o.id)),
|
|
51
|
+
options: n,
|
|
52
|
+
isMulti: !0,
|
|
53
|
+
onChange: d,
|
|
54
|
+
menuPosition: "fixed",
|
|
55
|
+
getOptionLabel: (o) => o.name ?? o.key,
|
|
56
|
+
getOptionValue: (o) => String(o.id),
|
|
57
|
+
styles: {
|
|
58
|
+
control: (o) => ({
|
|
59
|
+
...o,
|
|
60
|
+
boxShadow: "none",
|
|
61
|
+
...e === "standart" && {
|
|
62
|
+
border: "none",
|
|
63
|
+
borderBottom: "1px solid",
|
|
64
|
+
borderRadius: 0,
|
|
65
|
+
borderColor: "rgba(0, 0, 0, 0.42)"
|
|
66
|
+
},
|
|
67
|
+
...t && { color: "#c00", borderColor: "#c00" }
|
|
68
|
+
}),
|
|
69
|
+
valueContainer: (o) => ({
|
|
70
|
+
...o,
|
|
71
|
+
fontSize: "1rem",
|
|
72
|
+
...e === "standart" ? { paddingLeft: 0 } : {
|
|
73
|
+
padding: "6px 0px 3px 8px"
|
|
74
|
+
},
|
|
75
|
+
...t && { color: "#c00" }
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
f as default
|
|
86
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "lodash";
|
|
3
|
+
import "dayjs";
|
|
4
|
+
import { V as x } from "../../../../../index-DHFb1Qpn.js";
|
|
5
|
+
import "@mui/material";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
import "../../../../geometry-picker/index.js";
|
|
8
|
+
import "../../../../phone-input/index.js";
|
|
9
|
+
import "../../../../date-time-picker/index.js";
|
|
10
|
+
import "../../../../../Checkbox-CxbQ9tJ5.js";
|
|
11
|
+
import "../../../../../FormControl-C4PmH1vh.js";
|
|
12
|
+
import "../../../../../Select-DOyHt8I_.js";
|
|
13
|
+
export {
|
|
14
|
+
x as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as t, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { V as m } from "../../../../../index-DHFb1Qpn.js";
|
|
4
|
+
import d from "lodash";
|
|
5
|
+
function h({
|
|
6
|
+
template: o,
|
|
7
|
+
value: n,
|
|
8
|
+
mapboxAccessToken: a,
|
|
9
|
+
onChange: s
|
|
10
|
+
}) {
|
|
11
|
+
if (o === void 0) return /* @__PURE__ */ t(i, {});
|
|
12
|
+
const p = l.useMemo(() => {
|
|
13
|
+
let r = o.properties.filter((e) => e.visible);
|
|
14
|
+
return r = d.orderBy(r, "id"), r;
|
|
15
|
+
}, [o]), u = (r) => {
|
|
16
|
+
const e = {
|
|
17
|
+
target: {
|
|
18
|
+
value: { ...n, ...r }
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
s(e);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ t(i, { children: p.map((r, e) => {
|
|
24
|
+
const f = n[r.propertyId];
|
|
25
|
+
return /* @__PURE__ */ t(
|
|
26
|
+
m,
|
|
27
|
+
{
|
|
28
|
+
property: r,
|
|
29
|
+
value: f,
|
|
30
|
+
mapboxAccessToken: a,
|
|
31
|
+
onChange: u
|
|
32
|
+
},
|
|
33
|
+
e
|
|
34
|
+
);
|
|
35
|
+
}) });
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
h as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { jsx as a, jsxs as f, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import W from "lodash";
|
|
4
|
+
import { useForm as M, Controller as s } from "react-hook-form";
|
|
5
|
+
import { getNestedChildrenFromMap as N } from "../../../utils/ontology.js";
|
|
6
|
+
import { i as G, d as K } from "../../../utils-Bq0ye5vf.js";
|
|
7
|
+
import { ConditionalWrapper as O } from "../../conditional-wrapper/index.js";
|
|
8
|
+
import { Container as U } from "../../container/index.js";
|
|
9
|
+
import { TextField as h, FormGroup as j, FormControl as q, InputLabel as H, Select as Y, MenuItem as J, FormControlLabel as L, Checkbox as S, Box as T, Button as g } from "@mui/material";
|
|
10
|
+
import { TreeSelect as $ } from "../../tree-select/index.js";
|
|
11
|
+
import Q from "./components/policy-list/index.js";
|
|
12
|
+
import X from "./components/variables/index.js";
|
|
13
|
+
import { DisseminationList as z } from "../../data-security-selectors/dissemination-list/index.js";
|
|
14
|
+
import { SecurityLevel as Z } from "../../data-security-selectors/security-level/index.js";
|
|
15
|
+
const ee = {
|
|
16
|
+
alg: "A256GCM",
|
|
17
|
+
ext: !0,
|
|
18
|
+
k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
|
|
19
|
+
key_ops: ["encrypt", "decrypt"],
|
|
20
|
+
kty: "oct"
|
|
21
|
+
}, te = [
|
|
22
|
+
"IMAGE",
|
|
23
|
+
"VIDEO",
|
|
24
|
+
"TEXT",
|
|
25
|
+
"BINARY",
|
|
26
|
+
"OTHER"
|
|
27
|
+
];
|
|
28
|
+
function ae(e, F) {
|
|
29
|
+
const {
|
|
30
|
+
register: C,
|
|
31
|
+
handleSubmit: E,
|
|
32
|
+
control: d,
|
|
33
|
+
formState: { errors: V },
|
|
34
|
+
getValues: x,
|
|
35
|
+
setValue: p,
|
|
36
|
+
reset: k
|
|
37
|
+
} = M({
|
|
38
|
+
defaultValues: e.defaultValues
|
|
39
|
+
}), [R, _] = m.useState([]), [v, I] = m.useState(), [ne, w] = m.useState(0), B = m.useMemo(() => {
|
|
40
|
+
const t = [];
|
|
41
|
+
return e.mappedTemplates.forEach((n) => {
|
|
42
|
+
n.creatable || t.push(String(n.id));
|
|
43
|
+
}), t;
|
|
44
|
+
}, [e.mappedTemplates]);
|
|
45
|
+
m.useEffect(() => {
|
|
46
|
+
(async () => {
|
|
47
|
+
let t = { ...e.defaultValues };
|
|
48
|
+
const n = e.mappedTemplates.get(t.templateId);
|
|
49
|
+
if (n) {
|
|
50
|
+
const l = n.properties.filter(
|
|
51
|
+
(r) => r.privacyPreservationMethod === "ENCRYPTION"
|
|
52
|
+
);
|
|
53
|
+
if (l.length > 0)
|
|
54
|
+
for (let r = 0; r < l.length; r++) {
|
|
55
|
+
const i = l[r], o = W.get(t, `variables.${i.propertyId}`);
|
|
56
|
+
if (o && e.keyAuth) {
|
|
57
|
+
const c = await G(ee), u = await K(c, o);
|
|
58
|
+
u.data && (p(`variables.${i.propertyId}`, u.data), w((b) => b + 1));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
})();
|
|
63
|
+
}, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
|
|
64
|
+
const y = () => {
|
|
65
|
+
const t = x("templateId");
|
|
66
|
+
v && I(void 0);
|
|
67
|
+
const n = N(e.mappedTemplates);
|
|
68
|
+
_(n);
|
|
69
|
+
for (let l of e.mappedTemplates.values())
|
|
70
|
+
if (l.id === t) {
|
|
71
|
+
I(l);
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
m.useImperativeHandle(F, () => ({
|
|
76
|
+
resetForm() {
|
|
77
|
+
k({
|
|
78
|
+
title: "",
|
|
79
|
+
description: "",
|
|
80
|
+
templateId: 0,
|
|
81
|
+
variables: {}
|
|
82
|
+
}), y();
|
|
83
|
+
},
|
|
84
|
+
setFormValue(t, n) {
|
|
85
|
+
p(t, n);
|
|
86
|
+
},
|
|
87
|
+
getFormValue(t) {
|
|
88
|
+
return x(t);
|
|
89
|
+
}
|
|
90
|
+
})), m.useEffect(() => (y(), () => {
|
|
91
|
+
}), [e.mappedTemplates]), m.useEffect(() => {
|
|
92
|
+
e.onSelectedTemplateChange && e.onSelectedTemplateChange(v);
|
|
93
|
+
}, [v]);
|
|
94
|
+
const A = () => {
|
|
95
|
+
if (e.onCancel) {
|
|
96
|
+
e.onCancel();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
return /* @__PURE__ */ a(
|
|
101
|
+
O,
|
|
102
|
+
{
|
|
103
|
+
condition: e.variant === void 0 || e.variant === "inline",
|
|
104
|
+
wrapper: (t) => /* @__PURE__ */ a(
|
|
105
|
+
U,
|
|
106
|
+
{
|
|
107
|
+
disableHeader: !0,
|
|
108
|
+
sx: { position: "relative", overflow: "visible" },
|
|
109
|
+
children: t
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
children: /* @__PURE__ */ f("form", { onSubmit: E(e.onSubmit), children: [
|
|
113
|
+
/* @__PURE__ */ a(
|
|
114
|
+
h,
|
|
115
|
+
{
|
|
116
|
+
label: "Title *",
|
|
117
|
+
variant: "standard",
|
|
118
|
+
fullWidth: !0,
|
|
119
|
+
sx: { mb: 2 },
|
|
120
|
+
...C("title", { required: !0 }),
|
|
121
|
+
...V.title && {
|
|
122
|
+
helperText: "This field is required!",
|
|
123
|
+
error: !0
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ a(
|
|
128
|
+
h,
|
|
129
|
+
{
|
|
130
|
+
label: "Description",
|
|
131
|
+
variant: "standard",
|
|
132
|
+
fullWidth: !0,
|
|
133
|
+
multiline: !0,
|
|
134
|
+
sx: { mb: 2 },
|
|
135
|
+
...C("description")
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ a(j, { sx: { mb: 2 }, children: /* @__PURE__ */ a(
|
|
139
|
+
s,
|
|
140
|
+
{
|
|
141
|
+
name: "templateId",
|
|
142
|
+
control: d,
|
|
143
|
+
render: ({ field: { value: t, onChange: n } }) => {
|
|
144
|
+
if (e.disableTemplateChange) {
|
|
145
|
+
const l = e.mappedTemplates.get(t);
|
|
146
|
+
return /* @__PURE__ */ a(
|
|
147
|
+
h,
|
|
148
|
+
{
|
|
149
|
+
label: "Template",
|
|
150
|
+
variant: "standard",
|
|
151
|
+
fullWidth: !0,
|
|
152
|
+
disabled: !0,
|
|
153
|
+
value: l == null ? void 0 : l.name,
|
|
154
|
+
InputLabelProps: { shrink: !0 }
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
return /* @__PURE__ */ a(
|
|
159
|
+
$,
|
|
160
|
+
{
|
|
161
|
+
label: "Template",
|
|
162
|
+
data: R,
|
|
163
|
+
selected: t === 0 ? "" : [String(t)],
|
|
164
|
+
disabled: B,
|
|
165
|
+
onChange: (l, r) => {
|
|
166
|
+
const i = {
|
|
167
|
+
target: {
|
|
168
|
+
value: r ? Number(l) : 0
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
n(i), y();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
) }),
|
|
178
|
+
"aliasList" in e.defaultValues && /* @__PURE__ */ a(
|
|
179
|
+
s,
|
|
180
|
+
{
|
|
181
|
+
name: "aliasList",
|
|
182
|
+
control: d,
|
|
183
|
+
render: ({ field: { value: t, onChange: n, ...l } }) => /* @__PURE__ */ a(
|
|
184
|
+
h,
|
|
185
|
+
{
|
|
186
|
+
label: "Alias List",
|
|
187
|
+
variant: "standard",
|
|
188
|
+
fullWidth: !0,
|
|
189
|
+
value: t,
|
|
190
|
+
sx: { mb: 2 },
|
|
191
|
+
helperText: "Add list values with the comma (,) separated string",
|
|
192
|
+
onChange: (i) => {
|
|
193
|
+
const u = {
|
|
194
|
+
target: {
|
|
195
|
+
value: i.target.value.split(",").map((b) => b.trimStart())
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
n(u);
|
|
199
|
+
},
|
|
200
|
+
...l
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
"appliedPolicies" in e.defaultValues && /* @__PURE__ */ a(
|
|
206
|
+
s,
|
|
207
|
+
{
|
|
208
|
+
name: "appliedPolicies",
|
|
209
|
+
control: d,
|
|
210
|
+
render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
|
|
211
|
+
Q,
|
|
212
|
+
{
|
|
213
|
+
policyList: e.policyList,
|
|
214
|
+
value: t,
|
|
215
|
+
onChange: n
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
/* @__PURE__ */ a(
|
|
221
|
+
s,
|
|
222
|
+
{
|
|
223
|
+
name: "variables",
|
|
224
|
+
control: d,
|
|
225
|
+
render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ a(
|
|
226
|
+
X,
|
|
227
|
+
{
|
|
228
|
+
template: v,
|
|
229
|
+
value: t,
|
|
230
|
+
mapboxAccessToken: "",
|
|
231
|
+
onChange: n
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
"fileInBase64" in e.defaultValues && /* @__PURE__ */ f(P, { children: [
|
|
237
|
+
/* @__PURE__ */ a(
|
|
238
|
+
s,
|
|
239
|
+
{
|
|
240
|
+
name: "fileInBase64",
|
|
241
|
+
control: d,
|
|
242
|
+
render: ({ field: { value: t, onChange: n, ...l } }) => /* @__PURE__ */ a(
|
|
243
|
+
h,
|
|
244
|
+
{
|
|
245
|
+
type: "file",
|
|
246
|
+
label: "File to Upload",
|
|
247
|
+
variant: "standard",
|
|
248
|
+
fullWidth: !0,
|
|
249
|
+
sx: { mb: 2 },
|
|
250
|
+
helperText: "Select a file to upload",
|
|
251
|
+
InputLabelProps: { shrink: !0 },
|
|
252
|
+
onChange: (i) => {
|
|
253
|
+
if (i.target.files) {
|
|
254
|
+
const o = new FileReader();
|
|
255
|
+
o.onload = async (u) => {
|
|
256
|
+
const D = u.target.result.split("base64,")[1];
|
|
257
|
+
n(D);
|
|
258
|
+
};
|
|
259
|
+
const c = i.target.files[0];
|
|
260
|
+
p("originalFileName", c.name), p("contentType", c.type), o.readAsDataURL(c);
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
...l
|
|
264
|
+
}
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ a(
|
|
269
|
+
s,
|
|
270
|
+
{
|
|
271
|
+
name: "type",
|
|
272
|
+
control: d,
|
|
273
|
+
render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ f(
|
|
274
|
+
q,
|
|
275
|
+
{
|
|
276
|
+
fullWidth: !0,
|
|
277
|
+
sx: {
|
|
278
|
+
mb: 2
|
|
279
|
+
},
|
|
280
|
+
variant: "standard",
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ a(H, { children: "Type" }),
|
|
283
|
+
/* @__PURE__ */ a(Y, { value: t, onChange: (r) => {
|
|
284
|
+
const {
|
|
285
|
+
target: { value: i }
|
|
286
|
+
} = r;
|
|
287
|
+
n(i);
|
|
288
|
+
}, children: te.map((r) => /* @__PURE__ */ a(J, { value: r, children: r }, r)) })
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
}
|
|
293
|
+
),
|
|
294
|
+
/* @__PURE__ */ a(
|
|
295
|
+
L,
|
|
296
|
+
{
|
|
297
|
+
control: /* @__PURE__ */ a(
|
|
298
|
+
s,
|
|
299
|
+
{
|
|
300
|
+
name: "redacted",
|
|
301
|
+
control: d,
|
|
302
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(S, { checked: !!t, ...n })
|
|
303
|
+
}
|
|
304
|
+
),
|
|
305
|
+
label: "Redacted",
|
|
306
|
+
sx: { mb: 2 }
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
/* @__PURE__ */ a(
|
|
310
|
+
L,
|
|
311
|
+
{
|
|
312
|
+
control: /* @__PURE__ */ a(
|
|
313
|
+
s,
|
|
314
|
+
{
|
|
315
|
+
name: "contentEncrypted",
|
|
316
|
+
control: d,
|
|
317
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ a(S, { checked: !!t, ...n })
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
label: "Content Encrypted",
|
|
321
|
+
sx: { mb: 2 }
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
] }),
|
|
325
|
+
/* @__PURE__ */ a(
|
|
326
|
+
s,
|
|
327
|
+
{
|
|
328
|
+
name: "disseminationList",
|
|
329
|
+
rules: {
|
|
330
|
+
required: !0
|
|
331
|
+
},
|
|
332
|
+
control: d,
|
|
333
|
+
render: ({ field: { value: t, onChange: n }, fieldState: l }) => {
|
|
334
|
+
const r = t || [], i = (o) => {
|
|
335
|
+
n(o);
|
|
336
|
+
};
|
|
337
|
+
return /* @__PURE__ */ a(
|
|
338
|
+
z,
|
|
339
|
+
{
|
|
340
|
+
selectedIds: r,
|
|
341
|
+
memberedGroups: e.memberedGroups,
|
|
342
|
+
showError: !!l.error,
|
|
343
|
+
onChange: i
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
),
|
|
349
|
+
/* @__PURE__ */ a(T, { mt: 2, children: /* @__PURE__ */ a(
|
|
350
|
+
s,
|
|
351
|
+
{
|
|
352
|
+
name: "securityLevelId",
|
|
353
|
+
rules: {
|
|
354
|
+
required: !0
|
|
355
|
+
},
|
|
356
|
+
control: d,
|
|
357
|
+
render: ({ field: { value: t, onChange: n }, fieldState: l }) => {
|
|
358
|
+
var i, o;
|
|
359
|
+
const r = (c) => {
|
|
360
|
+
n(c);
|
|
361
|
+
};
|
|
362
|
+
return /* @__PURE__ */ a(
|
|
363
|
+
Z,
|
|
364
|
+
{
|
|
365
|
+
value: t,
|
|
366
|
+
ontologyId: e.ontologyId,
|
|
367
|
+
appRoles: e.appRoles,
|
|
368
|
+
securityLevels: e.securityLevels,
|
|
369
|
+
minLevelId: e.minSecurityLevel,
|
|
370
|
+
templateKeys: (i = e.securityLevelConfig) == null ? void 0 : i.templateKeys,
|
|
371
|
+
templateType: (o = e.securityLevelConfig) == null ? void 0 : o.templateType,
|
|
372
|
+
showError: !!l.error,
|
|
373
|
+
onChange: r
|
|
374
|
+
}
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
) }),
|
|
379
|
+
/* @__PURE__ */ f(T, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
380
|
+
/* @__PURE__ */ a(
|
|
381
|
+
g,
|
|
382
|
+
{
|
|
383
|
+
color: "primary",
|
|
384
|
+
variant: "text",
|
|
385
|
+
disabled: e.loading,
|
|
386
|
+
sx: { textTransform: "none" },
|
|
387
|
+
onClick: A,
|
|
388
|
+
children: "Cancel"
|
|
389
|
+
}
|
|
390
|
+
),
|
|
391
|
+
/* @__PURE__ */ f(T, { children: [
|
|
392
|
+
e.onRemove !== void 0 && /* @__PURE__ */ a(
|
|
393
|
+
g,
|
|
394
|
+
{
|
|
395
|
+
type: "button",
|
|
396
|
+
color: "error",
|
|
397
|
+
variant: "contained",
|
|
398
|
+
disabled: e.removeLoading || e.loading,
|
|
399
|
+
sx: { mr: 2, textTransform: "none" },
|
|
400
|
+
onClick: e.onRemove,
|
|
401
|
+
children: e.removeLoading ? "Deleting..." : "Delete"
|
|
402
|
+
}
|
|
403
|
+
),
|
|
404
|
+
e.saveButtons ? e.saveButtons.map((t, n) => /* @__PURE__ */ a(
|
|
405
|
+
g,
|
|
406
|
+
{
|
|
407
|
+
type: "submit",
|
|
408
|
+
color: "primary",
|
|
409
|
+
variant: "contained",
|
|
410
|
+
disabled: e.loading,
|
|
411
|
+
startIcon: t.icon,
|
|
412
|
+
sx: { ml: 1, textTransform: "none" },
|
|
413
|
+
onClick: t.onClick,
|
|
414
|
+
children: t.label
|
|
415
|
+
},
|
|
416
|
+
n
|
|
417
|
+
)) : /* @__PURE__ */ a(
|
|
418
|
+
g,
|
|
419
|
+
{
|
|
420
|
+
type: "submit",
|
|
421
|
+
color: "primary",
|
|
422
|
+
variant: "contained",
|
|
423
|
+
disabled: e.loading,
|
|
424
|
+
sx: { textTransform: "none" },
|
|
425
|
+
children: e.loading ? "Saving..." : "Save"
|
|
426
|
+
}
|
|
427
|
+
)
|
|
428
|
+
] })
|
|
429
|
+
] })
|
|
430
|
+
] })
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
const ge = m.forwardRef(ae);
|
|
435
|
+
export {
|
|
436
|
+
ge as InstanceForm
|
|
437
|
+
};
|