@hybridcore/ui 1.5.10 → 1.5.12
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/components/instance-form/index.js +138 -138
- package/package.json +1 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsx as i, jsxs as o, Fragment as
|
|
1
|
+
import { jsx as i, jsxs as o, Fragment as fe } from "react/jsx-runtime";
|
|
2
2
|
import f 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 { Box as s, TextField as
|
|
10
|
-
import { TreeSelect as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { DisseminationList as
|
|
14
|
-
import { SecurityLevel as
|
|
15
|
-
const
|
|
3
|
+
import he from "lodash";
|
|
4
|
+
import { useForm as ve, Controller as m } from "react-hook-form";
|
|
5
|
+
import { getNestedChildrenFromMap as ye } from "../../utils/ontology.js";
|
|
6
|
+
import { i as be, d as Te } from "../../utils-Bq0ye5vf.js";
|
|
7
|
+
import { ConditionalWrapper as ge } from "../conditional-wrapper/index.js";
|
|
8
|
+
import { Container as Oe } from "../container/index.js";
|
|
9
|
+
import { Box as s, TextField as y, FormGroup as Ie, FormControl as pe, InputLabel as xe, Select as Ce, MenuItem as Le, FormControlLabel as ee, Checkbox as te, Button as g } from "@mui/material";
|
|
10
|
+
import { TreeSelect as Ve } from "../tree-select/index.js";
|
|
11
|
+
import Se from "./components/policy-list/index.js";
|
|
12
|
+
import Ee from "./components/variables/index.js";
|
|
13
|
+
import { DisseminationList as Fe } from "../data-security-selectors/dissemination-list/index.js";
|
|
14
|
+
import { SecurityLevel as ke } from "../data-security-selectors/security-level/index.js";
|
|
15
|
+
const Re = {
|
|
16
16
|
alg: "A256GCM",
|
|
17
17
|
ext: !0,
|
|
18
18
|
k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
|
|
19
19
|
key_ops: ["encrypt", "decrypt"],
|
|
20
20
|
kty: "oct"
|
|
21
|
-
},
|
|
21
|
+
}, we = [
|
|
22
22
|
"IMAGE",
|
|
23
23
|
"VIDEO",
|
|
24
24
|
"TEXT",
|
|
25
25
|
"BINARY",
|
|
26
26
|
"OTHER"
|
|
27
27
|
];
|
|
28
|
-
function
|
|
29
|
-
var L, V, S, E, F, k, R, w, B, _, A, D, P, W, M, N, G, K, U, j, q, H, Y;
|
|
28
|
+
function Be(e, ie) {
|
|
29
|
+
var C, L, V, S, E, F, k, R, w, B, _, A, D, P, W, M, N, G, K, U, j, q, H, Y, J, $, Q, X, z;
|
|
30
30
|
const {
|
|
31
|
-
register:
|
|
32
|
-
handleSubmit:
|
|
31
|
+
register: I,
|
|
32
|
+
handleSubmit: ne,
|
|
33
33
|
control: c,
|
|
34
|
-
formState: { errors:
|
|
35
|
-
getValues:
|
|
34
|
+
formState: { errors: le, isDirty: ae },
|
|
35
|
+
getValues: p,
|
|
36
36
|
setValue: b,
|
|
37
|
-
reset:
|
|
38
|
-
} =
|
|
37
|
+
reset: de
|
|
38
|
+
} = ve({
|
|
39
39
|
defaultValues: e.defaultValues
|
|
40
|
-
}), [
|
|
40
|
+
}), [re, oe] = f.useState([]), [T, x] = f.useState(), [_e, se] = f.useState(0), ce = f.useMemo(() => {
|
|
41
41
|
const t = [];
|
|
42
42
|
return e.mappedTemplates.forEach((n) => {
|
|
43
43
|
n.creatable || t.push(String(n.id));
|
|
@@ -48,61 +48,61 @@ function Ve(e, Q) {
|
|
|
48
48
|
const t = { ...e.defaultValues }, n = e.mappedTemplates.get(t.templateId);
|
|
49
49
|
if (n) {
|
|
50
50
|
const a = n.properties.filter(
|
|
51
|
-
(
|
|
51
|
+
(d) => d.privacyPreservationMethod === "ENCRYPTION"
|
|
52
52
|
);
|
|
53
53
|
if (a.length > 0)
|
|
54
|
-
for (let
|
|
55
|
-
const l = a[
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
h.data && (b(`variables.${l.propertyId}`, h.data),
|
|
54
|
+
for (let d = 0; d < a.length; d++) {
|
|
55
|
+
const l = a[d], r = he.get(t, `variables.${l.propertyId}`);
|
|
56
|
+
if (r && e.keyAuth) {
|
|
57
|
+
const u = await be(Re), h = await Te(u, String(r));
|
|
58
|
+
h.data && (b(`variables.${l.propertyId}`, h.data), se((v) => v + 1));
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
})();
|
|
63
63
|
}, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
|
|
64
|
-
const
|
|
65
|
-
const t =
|
|
66
|
-
|
|
67
|
-
const n =
|
|
68
|
-
|
|
64
|
+
const O = () => {
|
|
65
|
+
const t = p("templateId");
|
|
66
|
+
T && x(void 0);
|
|
67
|
+
const n = ye(e.mappedTemplates);
|
|
68
|
+
oe(n);
|
|
69
69
|
for (const a of e.mappedTemplates.values())
|
|
70
70
|
if (a.id === t) {
|
|
71
|
-
|
|
71
|
+
x(a);
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
f.useImperativeHandle(
|
|
75
|
+
f.useImperativeHandle(ie, () => ({
|
|
76
76
|
resetForm() {
|
|
77
|
-
|
|
77
|
+
de({
|
|
78
78
|
title: "",
|
|
79
79
|
description: "",
|
|
80
80
|
templateId: 0,
|
|
81
81
|
variables: {}
|
|
82
|
-
}),
|
|
82
|
+
}), O();
|
|
83
83
|
},
|
|
84
84
|
setFormValue(t, n) {
|
|
85
85
|
b(t, n);
|
|
86
86
|
},
|
|
87
87
|
getFormValue(t) {
|
|
88
|
-
return
|
|
88
|
+
return p(t);
|
|
89
89
|
}
|
|
90
|
-
})), f.useEffect(() => (
|
|
90
|
+
})), f.useEffect(() => (O(), () => {
|
|
91
91
|
}), [e.mappedTemplates]), f.useEffect(() => {
|
|
92
|
-
e.onSelectedTemplateChange && e.onSelectedTemplateChange(
|
|
93
|
-
}, [
|
|
94
|
-
const
|
|
92
|
+
e.onSelectedTemplateChange && e.onSelectedTemplateChange(T);
|
|
93
|
+
}, [T]);
|
|
94
|
+
const me = () => {
|
|
95
95
|
if (e.onCancel) {
|
|
96
|
-
e.onCancel(
|
|
96
|
+
e.onCancel(ae);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
return /* @__PURE__ */ i(
|
|
101
|
-
|
|
101
|
+
ge,
|
|
102
102
|
{
|
|
103
103
|
condition: e.variant === void 0 || e.variant === "inline",
|
|
104
104
|
wrapper: (t) => /* @__PURE__ */ i(
|
|
105
|
-
|
|
105
|
+
Oe,
|
|
106
106
|
{
|
|
107
107
|
disableHeader: !0,
|
|
108
108
|
sx: { position: "relative", overflow: "visible" },
|
|
@@ -112,51 +112,51 @@ function Ve(e, Q) {
|
|
|
112
112
|
children: /* @__PURE__ */ o(
|
|
113
113
|
"form",
|
|
114
114
|
{
|
|
115
|
-
onSubmit:
|
|
115
|
+
onSubmit: ne(e.onSubmit),
|
|
116
116
|
style: { display: "flex", flexDirection: "column" },
|
|
117
117
|
children: [
|
|
118
|
-
!((
|
|
118
|
+
!((L = (C = e.fieldOptions) == null ? void 0 : C.title) != null && L.hidden) && /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
119
119
|
/* @__PURE__ */ i(
|
|
120
|
-
|
|
120
|
+
y,
|
|
121
121
|
{
|
|
122
122
|
label: "Title *",
|
|
123
123
|
variant: e.inputVariant,
|
|
124
124
|
fullWidth: !0,
|
|
125
|
-
...
|
|
126
|
-
...
|
|
125
|
+
...I("title", { required: !0 }),
|
|
126
|
+
...le.title && {
|
|
127
127
|
helperText: "This field is required!",
|
|
128
128
|
error: !0
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
e.fieldOptions && ((
|
|
132
|
+
e.fieldOptions && ((V = e.fieldOptions.title) == null ? void 0 : V.helperText)
|
|
133
133
|
] }),
|
|
134
|
-
!((
|
|
134
|
+
!((E = (S = e.fieldOptions) == null ? void 0 : S.description) != null && E.hidden) && /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
135
135
|
/* @__PURE__ */ i(
|
|
136
|
-
|
|
136
|
+
y,
|
|
137
137
|
{
|
|
138
138
|
label: "Description",
|
|
139
139
|
variant: e.inputVariant,
|
|
140
140
|
fullWidth: !0,
|
|
141
141
|
multiline: !0,
|
|
142
|
-
minRows: (
|
|
143
|
-
...
|
|
142
|
+
minRows: (k = (F = e.fieldOptions) == null ? void 0 : F.description) == null ? void 0 : k.minRows,
|
|
143
|
+
...I("description")
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
|
-
e.fieldOptions && ((
|
|
146
|
+
e.fieldOptions && ((R = e.fieldOptions.description) == null ? void 0 : R.helperText)
|
|
147
147
|
] }),
|
|
148
|
-
!((
|
|
148
|
+
!((B = (w = e.fieldOptions) == null ? void 0 : w.templateId) != null && B.hidden) && /* @__PURE__ */ o(Ie, { sx: { mb: 2 }, children: [
|
|
149
149
|
/* @__PURE__ */ i(
|
|
150
|
-
|
|
150
|
+
m,
|
|
151
151
|
{
|
|
152
152
|
name: "templateId",
|
|
153
153
|
control: c,
|
|
154
154
|
render: ({ field: { value: t, onChange: n } }) => {
|
|
155
|
-
var a,
|
|
156
|
-
if ((
|
|
155
|
+
var a, d;
|
|
156
|
+
if ((d = (a = e.fieldOptions) == null ? void 0 : a.templateId) != null && d.disabled) {
|
|
157
157
|
const l = t ? e.mappedTemplates.get(t) : void 0;
|
|
158
158
|
return /* @__PURE__ */ i(
|
|
159
|
-
|
|
159
|
+
y,
|
|
160
160
|
{
|
|
161
161
|
label: "Template",
|
|
162
162
|
variant: e.inputVariant,
|
|
@@ -168,53 +168,53 @@ function Ve(e, Q) {
|
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
170
|
return /* @__PURE__ */ i(
|
|
171
|
-
|
|
171
|
+
Ve,
|
|
172
172
|
{
|
|
173
173
|
label: "Template",
|
|
174
|
-
data:
|
|
174
|
+
data: re,
|
|
175
175
|
selected: t === 0 ? "" : [String(t)],
|
|
176
|
-
disabled:
|
|
176
|
+
disabled: ce,
|
|
177
177
|
variant: e.inputVariant,
|
|
178
|
-
onChange: (l,
|
|
179
|
-
const
|
|
178
|
+
onChange: (l, r) => {
|
|
179
|
+
const u = {
|
|
180
180
|
target: {
|
|
181
|
-
value:
|
|
181
|
+
value: r ? Number(l) : 0
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
-
n(
|
|
184
|
+
n(u), O();
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
),
|
|
191
|
-
e.fieldOptions && ((
|
|
191
|
+
e.fieldOptions && ((_ = e.fieldOptions.templateId) == null ? void 0 : _.helperText)
|
|
192
192
|
] }),
|
|
193
|
-
"aliasList" in e.defaultValues && !((
|
|
194
|
-
|
|
193
|
+
"aliasList" in e.defaultValues && !((D = (A = e.fieldOptions) == null ? void 0 : A.aliasList) != null && D.hidden) && /* @__PURE__ */ i(
|
|
194
|
+
m,
|
|
195
195
|
{
|
|
196
196
|
name: "aliasList",
|
|
197
197
|
control: c,
|
|
198
198
|
render: ({ field: { value: t, onChange: n, ...a } }) => {
|
|
199
199
|
var l;
|
|
200
|
-
const
|
|
201
|
-
const
|
|
200
|
+
const d = (r) => {
|
|
201
|
+
const v = {
|
|
202
202
|
target: {
|
|
203
|
-
value:
|
|
203
|
+
value: r.target.value.split(",").map((Z) => Z.trimStart())
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
|
-
n(
|
|
206
|
+
n(v);
|
|
207
207
|
};
|
|
208
208
|
return /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
209
209
|
/* @__PURE__ */ i(
|
|
210
|
-
|
|
210
|
+
y,
|
|
211
211
|
{
|
|
212
212
|
label: "Alias List",
|
|
213
213
|
variant: e.inputVariant,
|
|
214
214
|
fullWidth: !0,
|
|
215
215
|
value: t,
|
|
216
216
|
helperText: "Add list values with the comma (,) separated string",
|
|
217
|
-
onChange:
|
|
217
|
+
onChange: d,
|
|
218
218
|
...a
|
|
219
219
|
}
|
|
220
220
|
),
|
|
@@ -223,8 +223,8 @@ function Ve(e, Q) {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
),
|
|
226
|
-
"appliedPolicies" in e.defaultValues && !((
|
|
227
|
-
|
|
226
|
+
"appliedPolicies" in e.defaultValues && !((W = (P = e.fieldOptions) == null ? void 0 : P.appliedPolicies) != null && W.hidden) && /* @__PURE__ */ i(
|
|
227
|
+
m,
|
|
228
228
|
{
|
|
229
229
|
name: "appliedPolicies",
|
|
230
230
|
control: c,
|
|
@@ -232,7 +232,7 @@ function Ve(e, Q) {
|
|
|
232
232
|
var a;
|
|
233
233
|
return /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
234
234
|
/* @__PURE__ */ i(
|
|
235
|
-
|
|
235
|
+
Se,
|
|
236
236
|
{
|
|
237
237
|
policyList: e.policyList,
|
|
238
238
|
value: t || void 0,
|
|
@@ -245,14 +245,14 @@ function Ve(e, Q) {
|
|
|
245
245
|
}
|
|
246
246
|
),
|
|
247
247
|
/* @__PURE__ */ i(
|
|
248
|
-
|
|
248
|
+
m,
|
|
249
249
|
{
|
|
250
250
|
name: "variables",
|
|
251
251
|
control: c,
|
|
252
252
|
render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ i(
|
|
253
|
-
|
|
253
|
+
Ee,
|
|
254
254
|
{
|
|
255
|
-
template:
|
|
255
|
+
template: T,
|
|
256
256
|
value: t,
|
|
257
257
|
mapboxAccessToken: e.mapboxAccessToken,
|
|
258
258
|
variant: e.inputVariant,
|
|
@@ -262,28 +262,28 @@ function Ve(e, Q) {
|
|
|
262
262
|
)
|
|
263
263
|
}
|
|
264
264
|
),
|
|
265
|
-
"fileInBase64" in e.defaultValues && !((
|
|
265
|
+
"fileInBase64" in e.defaultValues && !((N = (M = e.fieldOptions) == null ? void 0 : M.fileInBase64) != null && N.hidden) && /* @__PURE__ */ o(fe, { children: [
|
|
266
266
|
/* @__PURE__ */ i(
|
|
267
|
-
|
|
267
|
+
m,
|
|
268
268
|
{
|
|
269
269
|
name: "fileInBase64",
|
|
270
270
|
control: c,
|
|
271
|
-
render: ({ field: { onChange: t,
|
|
272
|
-
var
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
const
|
|
278
|
-
t(
|
|
271
|
+
render: ({ field: { onChange: t, value: n, ...a } }) => {
|
|
272
|
+
var l;
|
|
273
|
+
const d = (r) => {
|
|
274
|
+
if (r.target.files) {
|
|
275
|
+
const u = new FileReader();
|
|
276
|
+
u.onload = async (v) => {
|
|
277
|
+
const ue = v.target.result.split("base64,")[1];
|
|
278
|
+
t(ue);
|
|
279
279
|
};
|
|
280
|
-
const
|
|
281
|
-
b("originalFileName",
|
|
280
|
+
const h = r.target.files[0];
|
|
281
|
+
b("originalFileName", h.name), b("contentType", h.type), u.readAsDataURL(h);
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
284
|
return /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
285
285
|
/* @__PURE__ */ i(
|
|
286
|
-
|
|
286
|
+
y,
|
|
287
287
|
{
|
|
288
288
|
type: "file",
|
|
289
289
|
label: "File to Upload",
|
|
@@ -291,82 +291,82 @@ function Ve(e, Q) {
|
|
|
291
291
|
fullWidth: !0,
|
|
292
292
|
helperText: "Select a file to upload",
|
|
293
293
|
InputLabelProps: { shrink: !0 },
|
|
294
|
-
onChange:
|
|
295
|
-
...
|
|
294
|
+
onChange: d,
|
|
295
|
+
...a
|
|
296
296
|
}
|
|
297
297
|
),
|
|
298
|
-
e.fieldOptions && ((
|
|
298
|
+
e.fieldOptions && ((l = e.fieldOptions.fileInBase64) == null ? void 0 : l.helperText)
|
|
299
299
|
] });
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
),
|
|
303
|
-
/* @__PURE__ */ i(
|
|
304
|
-
|
|
303
|
+
!((K = (G = e.fieldOptions) == null ? void 0 : G.type) != null && K.hidden) && /* @__PURE__ */ i(
|
|
304
|
+
m,
|
|
305
305
|
{
|
|
306
306
|
name: "type",
|
|
307
307
|
control: c,
|
|
308
308
|
render: ({ field: { value: t, onChange: n } }) => {
|
|
309
|
-
var
|
|
309
|
+
var d;
|
|
310
310
|
const a = (l) => {
|
|
311
311
|
const {
|
|
312
|
-
target: { value:
|
|
312
|
+
target: { value: r }
|
|
313
313
|
} = l;
|
|
314
|
-
n(
|
|
314
|
+
n(r);
|
|
315
315
|
};
|
|
316
316
|
return /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
317
|
-
/* @__PURE__ */ o(
|
|
318
|
-
/* @__PURE__ */ i(
|
|
317
|
+
/* @__PURE__ */ o(pe, { fullWidth: !0, variant: e.inputVariant, children: [
|
|
318
|
+
/* @__PURE__ */ i(xe, { children: "Type" }),
|
|
319
319
|
/* @__PURE__ */ i(
|
|
320
|
-
|
|
320
|
+
Ce,
|
|
321
321
|
{
|
|
322
322
|
value: t ? [t] : "",
|
|
323
323
|
onChange: a,
|
|
324
|
-
children:
|
|
324
|
+
children: we.map((l) => /* @__PURE__ */ i(Le, { value: l, children: l }, l))
|
|
325
325
|
}
|
|
326
326
|
)
|
|
327
327
|
] }),
|
|
328
|
-
e.fieldOptions && ((
|
|
328
|
+
e.fieldOptions && ((d = e.fieldOptions.type) == null ? void 0 : d.helperText)
|
|
329
329
|
] });
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
),
|
|
333
|
-
/* @__PURE__ */ o(s, { mb: 2, children: [
|
|
333
|
+
!((j = (U = e.fieldOptions) == null ? void 0 : U.redacted) != null && j.hidden) && /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
334
334
|
/* @__PURE__ */ i(
|
|
335
|
-
|
|
335
|
+
ee,
|
|
336
336
|
{
|
|
337
337
|
control: /* @__PURE__ */ i(
|
|
338
|
-
|
|
338
|
+
m,
|
|
339
339
|
{
|
|
340
340
|
name: "redacted",
|
|
341
341
|
control: c,
|
|
342
|
-
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(
|
|
342
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(te, { checked: !!t, ...n })
|
|
343
343
|
}
|
|
344
344
|
),
|
|
345
345
|
label: "Redacted"
|
|
346
346
|
}
|
|
347
347
|
),
|
|
348
|
-
e.fieldOptions && ((
|
|
348
|
+
e.fieldOptions && ((q = e.fieldOptions.redacted) == null ? void 0 : q.helperText)
|
|
349
349
|
] }),
|
|
350
|
-
/* @__PURE__ */ o(s, { mb: 2, children: [
|
|
350
|
+
!((Y = (H = e.fieldOptions) == null ? void 0 : H.contentEncrypted) != null && Y.hidden) && /* @__PURE__ */ o(s, { mb: 2, children: [
|
|
351
351
|
/* @__PURE__ */ i(
|
|
352
|
-
|
|
352
|
+
ee,
|
|
353
353
|
{
|
|
354
354
|
control: /* @__PURE__ */ i(
|
|
355
|
-
|
|
355
|
+
m,
|
|
356
356
|
{
|
|
357
357
|
name: "contentEncrypted",
|
|
358
358
|
control: c,
|
|
359
|
-
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(
|
|
359
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(te, { checked: !!t, ...n })
|
|
360
360
|
}
|
|
361
361
|
),
|
|
362
362
|
label: "Content Encrypted"
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
|
-
e.fieldOptions && ((
|
|
365
|
+
e.fieldOptions && ((J = e.fieldOptions.contentEncrypted) == null ? void 0 : J.helperText)
|
|
366
366
|
] })
|
|
367
367
|
] }),
|
|
368
|
-
!((
|
|
369
|
-
|
|
368
|
+
!((Q = ($ = e.fieldOptions) == null ? void 0 : $.disseminationList) != null && Q.hidden) && /* @__PURE__ */ i(
|
|
369
|
+
m,
|
|
370
370
|
{
|
|
371
371
|
name: "disseminationList",
|
|
372
372
|
rules: {
|
|
@@ -374,13 +374,13 @@ function Ve(e, Q) {
|
|
|
374
374
|
},
|
|
375
375
|
control: c,
|
|
376
376
|
render: ({ field: { value: t, onChange: n }, fieldState: a }) => {
|
|
377
|
-
const
|
|
378
|
-
n(
|
|
377
|
+
const d = t || [], l = (r) => {
|
|
378
|
+
n(r);
|
|
379
379
|
};
|
|
380
380
|
return /* @__PURE__ */ i(
|
|
381
|
-
|
|
381
|
+
Fe,
|
|
382
382
|
{
|
|
383
|
-
selectedIds:
|
|
383
|
+
selectedIds: d,
|
|
384
384
|
memberedGroups: e.memberedGroups,
|
|
385
385
|
showError: !!a.error,
|
|
386
386
|
variant: e.inputVariant,
|
|
@@ -390,8 +390,8 @@ function Ve(e, Q) {
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
|
-
!((
|
|
394
|
-
|
|
393
|
+
!((z = (X = e.fieldOptions) == null ? void 0 : X.securityLevelId) != null && z.hidden) && /* @__PURE__ */ i(s, { mt: 2, children: /* @__PURE__ */ i(
|
|
394
|
+
m,
|
|
395
395
|
{
|
|
396
396
|
name: "securityLevelId",
|
|
397
397
|
rules: {
|
|
@@ -399,12 +399,12 @@ function Ve(e, Q) {
|
|
|
399
399
|
},
|
|
400
400
|
control: c,
|
|
401
401
|
render: ({ field: { value: t, onChange: n }, fieldState: a }) => {
|
|
402
|
-
var l,
|
|
403
|
-
const
|
|
404
|
-
n(
|
|
402
|
+
var l, r;
|
|
403
|
+
const d = (u) => {
|
|
404
|
+
n(u);
|
|
405
405
|
};
|
|
406
406
|
return /* @__PURE__ */ i(
|
|
407
|
-
|
|
407
|
+
ke,
|
|
408
408
|
{
|
|
409
409
|
value: t || 0,
|
|
410
410
|
ontologyId: e.ontologyId,
|
|
@@ -412,10 +412,10 @@ function Ve(e, Q) {
|
|
|
412
412
|
securityLevels: e.securityLevels,
|
|
413
413
|
minLevelId: e.minSecurityLevel,
|
|
414
414
|
templateKeys: (l = e.securityLevelConfig) == null ? void 0 : l.templateKeys,
|
|
415
|
-
templateType: (
|
|
415
|
+
templateType: (r = e.securityLevelConfig) == null ? void 0 : r.templateType,
|
|
416
416
|
showError: !!a.error,
|
|
417
417
|
variant: e.inputVariant,
|
|
418
|
-
onChange:
|
|
418
|
+
onChange: d
|
|
419
419
|
}
|
|
420
420
|
);
|
|
421
421
|
}
|
|
@@ -429,7 +429,7 @@ function Ve(e, Q) {
|
|
|
429
429
|
variant: "text",
|
|
430
430
|
disabled: e.loading,
|
|
431
431
|
sx: { textTransform: "none" },
|
|
432
|
-
onClick:
|
|
432
|
+
onClick: me,
|
|
433
433
|
children: "Cancel"
|
|
434
434
|
}
|
|
435
435
|
),
|
|
@@ -478,7 +478,7 @@ function Ve(e, Q) {
|
|
|
478
478
|
}
|
|
479
479
|
);
|
|
480
480
|
}
|
|
481
|
-
const
|
|
481
|
+
const $e = f.forwardRef(Be);
|
|
482
482
|
export {
|
|
483
|
-
|
|
483
|
+
$e as InstanceForm
|
|
484
484
|
};
|