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