@hybridcore/ui 1.5.35 → 1.5.36
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 +140 -138
- package/dist/main.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,134 +1,136 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import h from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { getNestedChildrenFromMap as
|
|
6
|
-
import { i as
|
|
1
|
+
import { jsx as i, jsxs as d, Fragment as he } from "react/jsx-runtime";
|
|
2
|
+
import h, { useRef as be } from "react";
|
|
3
|
+
import ve from "lodash";
|
|
4
|
+
import { useForm as ye, Controller as f } from "react-hook-form";
|
|
5
|
+
import { getNestedChildrenFromMap as ge } from "../../utils/ontology.js";
|
|
6
|
+
import { i as Te, d as xe } from "../../utils-Bq0ye5vf.js";
|
|
7
7
|
import { ConditionalWrapper as u } from "../conditional-wrapper/index.js";
|
|
8
|
-
import { Container as
|
|
9
|
-
import { Box as n, Typography as b, TextField as g, FormGroup as
|
|
10
|
-
import { TreeSelect as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { DisseminationList as
|
|
14
|
-
import { SecurityLevel as
|
|
15
|
-
const
|
|
8
|
+
import { Container as Ie } from "../container/index.js";
|
|
9
|
+
import { Box as n, Typography as b, TextField as g, FormGroup as we, FormControlLabel as te, Checkbox as ie, Button as I } from "@mui/material";
|
|
10
|
+
import { TreeSelect as Pe } from "../tree-select/index.js";
|
|
11
|
+
import Ce from "./components/policy-list/index.js";
|
|
12
|
+
import Le from "./components/variables/index.js";
|
|
13
|
+
import { DisseminationList as Oe } from "../data-security-selectors/dissemination-list/index.js";
|
|
14
|
+
import { SecurityLevel as pe } from "../data-security-selectors/security-level/index.js";
|
|
15
|
+
const Ve = {
|
|
16
16
|
alg: "A256GCM",
|
|
17
17
|
ext: !0,
|
|
18
18
|
k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
|
|
19
19
|
key_ops: ["encrypt", "decrypt"],
|
|
20
20
|
kty: "oct"
|
|
21
21
|
};
|
|
22
|
-
function
|
|
23
|
-
var
|
|
24
|
-
const {
|
|
25
|
-
register:
|
|
26
|
-
handleSubmit:
|
|
22
|
+
function Se(e, le) {
|
|
23
|
+
var p, V, S, F, k, R, E, B, D, _, A, W, q, N, K, M, U, j, G, H, J, $, Q, Y, z, X, Z;
|
|
24
|
+
const P = be(null), {
|
|
25
|
+
register: C,
|
|
26
|
+
handleSubmit: ne,
|
|
27
27
|
control: s,
|
|
28
|
-
formState: { errors:
|
|
28
|
+
formState: { errors: ae, isDirty: de },
|
|
29
29
|
getValues: L,
|
|
30
30
|
setValue: T,
|
|
31
|
-
reset:
|
|
32
|
-
} =
|
|
31
|
+
reset: re
|
|
32
|
+
} = ye({
|
|
33
33
|
defaultValues: e.defaultValues
|
|
34
|
-
}), [
|
|
35
|
-
const
|
|
34
|
+
}), [oe, ce] = h.useState([]), [x, O] = h.useState(), [Fe, se] = h.useState(0), me = h.useMemo(() => {
|
|
35
|
+
const t = [];
|
|
36
36
|
return e.mappedTemplates.forEach((l) => {
|
|
37
|
-
l.creatable ||
|
|
38
|
-
}),
|
|
37
|
+
l.creatable || t.push(String(l.id));
|
|
38
|
+
}), t;
|
|
39
39
|
}, [e.mappedTemplates]);
|
|
40
40
|
h.useEffect(() => {
|
|
41
41
|
(async () => {
|
|
42
|
-
const
|
|
42
|
+
const t = { ...e.defaultValues }, l = e.mappedTemplates.get(t.templateId);
|
|
43
43
|
if (l) {
|
|
44
44
|
const a = l.properties.filter(
|
|
45
45
|
(o) => o.privacyPreservationMethod === "ENCRYPTION"
|
|
46
46
|
);
|
|
47
47
|
if (a.length > 0)
|
|
48
48
|
for (let o = 0; o < a.length; o++) {
|
|
49
|
-
const r = a[o], c =
|
|
49
|
+
const r = a[o], c = ve.get(t, `variables.${r.propertyId}`);
|
|
50
50
|
if (c && e.keyAuth) {
|
|
51
|
-
const m = await
|
|
52
|
-
v.data && (T(`variables.${r.propertyId}`, v.data),
|
|
51
|
+
const m = await Te(Ve), v = await xe(m, String(c));
|
|
52
|
+
v.data && (T(`variables.${r.propertyId}`, v.data), se((y) => y + 1));
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
})();
|
|
57
57
|
}, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
|
|
58
58
|
const w = () => {
|
|
59
|
-
const
|
|
59
|
+
const t = L("templateId");
|
|
60
60
|
x && O(void 0);
|
|
61
|
-
const l =
|
|
62
|
-
|
|
61
|
+
const l = ge(e.mappedTemplates);
|
|
62
|
+
ce(l);
|
|
63
63
|
for (const a of e.mappedTemplates.values())
|
|
64
|
-
if (a.id ===
|
|
64
|
+
if (a.id === t) {
|
|
65
65
|
O(a);
|
|
66
66
|
break;
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
h.useImperativeHandle(le, () => ({
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
requestSubmit() {
|
|
71
|
+
var t;
|
|
72
|
+
(t = P.current) == null || t.requestSubmit();
|
|
72
73
|
},
|
|
73
74
|
resetForm() {
|
|
74
|
-
|
|
75
|
+
re({
|
|
75
76
|
title: "",
|
|
76
77
|
description: "",
|
|
77
78
|
templateId: 0,
|
|
78
79
|
variables: {}
|
|
79
80
|
}), w();
|
|
80
81
|
},
|
|
81
|
-
setFormValue(
|
|
82
|
-
T(
|
|
82
|
+
setFormValue(t, l) {
|
|
83
|
+
T(t, l);
|
|
83
84
|
},
|
|
84
|
-
getFormValue(
|
|
85
|
-
return L(
|
|
85
|
+
getFormValue(t) {
|
|
86
|
+
return L(t);
|
|
86
87
|
}
|
|
87
88
|
})), h.useEffect(() => (w(), () => {
|
|
88
89
|
}), [e.mappedTemplates]), h.useEffect(() => {
|
|
89
90
|
e.onSelectedTemplateChange && e.onSelectedTemplateChange(x);
|
|
90
91
|
}, [x]);
|
|
91
|
-
const
|
|
92
|
+
const fe = () => {
|
|
92
93
|
if (e.onCancel) {
|
|
93
|
-
e.onCancel(
|
|
94
|
+
e.onCancel(de);
|
|
94
95
|
return;
|
|
95
96
|
}
|
|
96
97
|
};
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ i(
|
|
98
99
|
u,
|
|
99
100
|
{
|
|
100
101
|
condition: e.variant === void 0 || e.variant === "inline",
|
|
101
|
-
wrapper: (
|
|
102
|
-
|
|
102
|
+
wrapper: (t) => /* @__PURE__ */ i(
|
|
103
|
+
Ie,
|
|
103
104
|
{
|
|
104
105
|
disableHeader: !0,
|
|
105
106
|
sx: { position: "relative", overflow: "visible" },
|
|
106
|
-
children:
|
|
107
|
+
children: t
|
|
107
108
|
}
|
|
108
109
|
),
|
|
109
110
|
children: /* @__PURE__ */ d(
|
|
110
111
|
"form",
|
|
111
112
|
{
|
|
112
|
-
|
|
113
|
+
ref: P,
|
|
114
|
+
onSubmit: ne(e.onSubmit),
|
|
113
115
|
style: { display: "flex", flexDirection: "column" },
|
|
114
116
|
children: [
|
|
115
|
-
!((
|
|
117
|
+
!((V = (p = e.fieldOptions) == null ? void 0 : p.title) != null && V.hidden) && /* @__PURE__ */ i(
|
|
116
118
|
u,
|
|
117
119
|
{
|
|
118
120
|
condition: e.labelPosition === "left",
|
|
119
|
-
wrapper: (
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
122
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "Title *" }),
|
|
123
|
+
/* @__PURE__ */ i(n, { width: "68%", children: t })
|
|
122
124
|
] }),
|
|
123
125
|
children: /* @__PURE__ */ d(n, { mb: 2, children: [
|
|
124
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ i(
|
|
125
127
|
g,
|
|
126
128
|
{
|
|
127
129
|
label: e.labelPosition === "default" ? "Title *" : void 0,
|
|
128
130
|
variant: e.inputVariant,
|
|
129
131
|
fullWidth: !0,
|
|
130
|
-
...
|
|
131
|
-
...
|
|
132
|
+
...C("title", { required: !0 }),
|
|
133
|
+
...ae.title && {
|
|
132
134
|
helperText: "This field is required!",
|
|
133
135
|
error: !0
|
|
134
136
|
}
|
|
@@ -138,49 +140,49 @@ function Ve(e, le) {
|
|
|
138
140
|
] })
|
|
139
141
|
}
|
|
140
142
|
),
|
|
141
|
-
!((k = (F = e.fieldOptions) == null ? void 0 : F.description) != null && k.hidden) && /* @__PURE__ */
|
|
143
|
+
!((k = (F = e.fieldOptions) == null ? void 0 : F.description) != null && k.hidden) && /* @__PURE__ */ i(
|
|
142
144
|
u,
|
|
143
145
|
{
|
|
144
146
|
condition: e.labelPosition === "left",
|
|
145
|
-
wrapper: (
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
148
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "Description" }),
|
|
149
|
+
/* @__PURE__ */ i(n, { width: "68%", children: t })
|
|
148
150
|
] }),
|
|
149
151
|
children: /* @__PURE__ */ d(n, { mb: 2, children: [
|
|
150
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ i(
|
|
151
153
|
g,
|
|
152
154
|
{
|
|
153
155
|
label: e.labelPosition === "default" ? "Description" : void 0,
|
|
154
156
|
variant: e.inputVariant,
|
|
155
157
|
fullWidth: !0,
|
|
156
158
|
multiline: !0,
|
|
157
|
-
minRows: (
|
|
158
|
-
...
|
|
159
|
+
minRows: (E = (R = e.fieldOptions) == null ? void 0 : R.description) == null ? void 0 : E.minRows,
|
|
160
|
+
...C("description")
|
|
159
161
|
}
|
|
160
162
|
),
|
|
161
163
|
e.fieldOptions && ((B = e.fieldOptions.description) == null ? void 0 : B.helperText)
|
|
162
164
|
] })
|
|
163
165
|
}
|
|
164
166
|
),
|
|
165
|
-
!((_ = (D = e.fieldOptions) == null ? void 0 : D.templateId) != null && _.hidden) && /* @__PURE__ */
|
|
167
|
+
!((_ = (D = e.fieldOptions) == null ? void 0 : D.templateId) != null && _.hidden) && /* @__PURE__ */ i(
|
|
166
168
|
u,
|
|
167
169
|
{
|
|
168
170
|
condition: e.labelPosition === "left",
|
|
169
|
-
wrapper: (
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
171
|
+
wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
172
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "Template" }),
|
|
173
|
+
/* @__PURE__ */ i(n, { width: "68%", children: t })
|
|
172
174
|
] }),
|
|
173
|
-
children: /* @__PURE__ */ d(
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ d(we, { sx: { mb: 2 }, children: [
|
|
176
|
+
/* @__PURE__ */ i(
|
|
175
177
|
f,
|
|
176
178
|
{
|
|
177
179
|
name: "templateId",
|
|
178
180
|
control: s,
|
|
179
|
-
render: ({ field: { value:
|
|
181
|
+
render: ({ field: { value: t, onChange: l } }) => {
|
|
180
182
|
var a, o;
|
|
181
183
|
if ((o = (a = e.fieldOptions) == null ? void 0 : a.templateId) != null && o.disabled) {
|
|
182
|
-
const r =
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
+
const r = t ? e.mappedTemplates.get(t) : void 0;
|
|
185
|
+
return /* @__PURE__ */ i(
|
|
184
186
|
g,
|
|
185
187
|
{
|
|
186
188
|
label: "Template",
|
|
@@ -192,13 +194,13 @@ function Ve(e, le) {
|
|
|
192
194
|
}
|
|
193
195
|
);
|
|
194
196
|
}
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
|
|
197
|
+
return /* @__PURE__ */ i(
|
|
198
|
+
Pe,
|
|
197
199
|
{
|
|
198
200
|
label: e.labelPosition === "default" ? "Template" : void 0,
|
|
199
|
-
data:
|
|
200
|
-
selected:
|
|
201
|
-
disabled:
|
|
201
|
+
data: oe,
|
|
202
|
+
selected: t === 0 ? "" : [String(t)],
|
|
203
|
+
disabled: me,
|
|
202
204
|
variant: e.inputVariant,
|
|
203
205
|
onChange: (r, c) => {
|
|
204
206
|
const m = {
|
|
@@ -217,12 +219,12 @@ function Ve(e, le) {
|
|
|
217
219
|
] })
|
|
218
220
|
}
|
|
219
221
|
),
|
|
220
|
-
"aliasList" in e.defaultValues && !((
|
|
222
|
+
"aliasList" in e.defaultValues && !((q = (W = e.fieldOptions) == null ? void 0 : W.aliasList) != null && q.hidden) && /* @__PURE__ */ i(
|
|
221
223
|
f,
|
|
222
224
|
{
|
|
223
225
|
name: "aliasList",
|
|
224
226
|
control: s,
|
|
225
|
-
render: ({ field: { value:
|
|
227
|
+
render: ({ field: { value: t, onChange: l, ...a } }) => {
|
|
226
228
|
var r;
|
|
227
229
|
const o = (c) => {
|
|
228
230
|
const y = {
|
|
@@ -232,22 +234,22 @@ function Ve(e, le) {
|
|
|
232
234
|
};
|
|
233
235
|
l(y);
|
|
234
236
|
};
|
|
235
|
-
return /* @__PURE__ */
|
|
237
|
+
return /* @__PURE__ */ i(
|
|
236
238
|
u,
|
|
237
239
|
{
|
|
238
240
|
condition: e.labelPosition === "left",
|
|
239
241
|
wrapper: (c) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "Alias List" }),
|
|
243
|
+
/* @__PURE__ */ i(n, { width: "68%", children: c })
|
|
242
244
|
] }),
|
|
243
245
|
children: /* @__PURE__ */ d(n, { mb: 2, children: [
|
|
244
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ i(
|
|
245
247
|
g,
|
|
246
248
|
{
|
|
247
249
|
label: e.labelPosition === "default" ? "Alias List" : void 0,
|
|
248
250
|
variant: e.inputVariant,
|
|
249
251
|
fullWidth: !0,
|
|
250
|
-
value:
|
|
252
|
+
value: t,
|
|
251
253
|
helperText: "Add list values with the comma (,) separated string",
|
|
252
254
|
onChange: o,
|
|
253
255
|
...a
|
|
@@ -260,28 +262,28 @@ function Ve(e, le) {
|
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
264
|
),
|
|
263
|
-
"appliedPolicies" in e.defaultValues && !((
|
|
265
|
+
"appliedPolicies" in e.defaultValues && !((K = (N = e.fieldOptions) == null ? void 0 : N.appliedPolicies) != null && K.hidden) && /* @__PURE__ */ i(
|
|
264
266
|
f,
|
|
265
267
|
{
|
|
266
268
|
name: "appliedPolicies",
|
|
267
269
|
control: s,
|
|
268
|
-
render: ({ field: { value:
|
|
270
|
+
render: ({ field: { value: t, onChange: l } }) => {
|
|
269
271
|
var a;
|
|
270
|
-
return /* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */ i(
|
|
271
273
|
u,
|
|
272
274
|
{
|
|
273
275
|
condition: e.labelPosition === "left",
|
|
274
276
|
wrapper: (o) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "Policy List" }),
|
|
278
|
+
/* @__PURE__ */ i(n, { width: "68%", children: o })
|
|
277
279
|
] }),
|
|
278
280
|
children: /* @__PURE__ */ d(n, { mb: 2, children: [
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
|
|
281
|
+
/* @__PURE__ */ i(
|
|
282
|
+
Ce,
|
|
281
283
|
{
|
|
282
284
|
policyList: e.policyList,
|
|
283
285
|
labelPosition: e.labelPosition,
|
|
284
|
-
value:
|
|
286
|
+
value: t || void 0,
|
|
285
287
|
onChange: l
|
|
286
288
|
}
|
|
287
289
|
),
|
|
@@ -292,16 +294,16 @@ function Ve(e, le) {
|
|
|
292
294
|
}
|
|
293
295
|
}
|
|
294
296
|
),
|
|
295
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ i(
|
|
296
298
|
f,
|
|
297
299
|
{
|
|
298
300
|
name: "variables",
|
|
299
301
|
control: s,
|
|
300
|
-
render: ({ field: { value:
|
|
301
|
-
|
|
302
|
+
render: ({ field: { value: t, onChange: l } }) => /* @__PURE__ */ i(
|
|
303
|
+
Le,
|
|
302
304
|
{
|
|
303
305
|
template: x,
|
|
304
|
-
value:
|
|
306
|
+
value: t,
|
|
305
307
|
mapboxAccessToken: e.mapboxAccessToken,
|
|
306
308
|
variant: e.inputVariant,
|
|
307
309
|
labelPosition: e.labelPosition,
|
|
@@ -311,35 +313,35 @@ function Ve(e, le) {
|
|
|
311
313
|
)
|
|
312
314
|
}
|
|
313
315
|
),
|
|
314
|
-
"fileInBase64" in e.defaultValues && !((
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
+
"fileInBase64" in e.defaultValues && !((U = (M = e.fieldOptions) == null ? void 0 : M.fileInBase64) != null && U.hidden) && /* @__PURE__ */ d(he, { children: [
|
|
317
|
+
/* @__PURE__ */ i(
|
|
316
318
|
f,
|
|
317
319
|
{
|
|
318
320
|
name: "fileInBase64",
|
|
319
321
|
control: s,
|
|
320
|
-
render: ({ field: { onChange:
|
|
322
|
+
render: ({ field: { onChange: t, value: l, ...a } }) => {
|
|
321
323
|
var r;
|
|
322
324
|
const o = (c) => {
|
|
323
325
|
if (c.target.files) {
|
|
324
326
|
const m = new FileReader();
|
|
325
327
|
m.onload = async (y) => {
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
+
const ue = y.target.result.split("base64,")[1];
|
|
329
|
+
t(ue);
|
|
328
330
|
};
|
|
329
331
|
const v = c.target.files[0];
|
|
330
332
|
T("originalFileName", v.name), T("contentType", v.type), m.readAsDataURL(v);
|
|
331
333
|
}
|
|
332
334
|
};
|
|
333
|
-
return /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ i(
|
|
334
336
|
u,
|
|
335
337
|
{
|
|
336
338
|
condition: e.labelPosition === "left",
|
|
337
339
|
wrapper: (c) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "File to Upload" }),
|
|
341
|
+
/* @__PURE__ */ i(n, { width: "68%", children: c })
|
|
340
342
|
] }),
|
|
341
343
|
children: /* @__PURE__ */ d(n, { mb: 2, children: [
|
|
342
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ i(
|
|
343
345
|
g,
|
|
344
346
|
{
|
|
345
347
|
type: "file",
|
|
@@ -359,24 +361,24 @@ function Ve(e, le) {
|
|
|
359
361
|
}
|
|
360
362
|
}
|
|
361
363
|
),
|
|
362
|
-
!((G = (
|
|
364
|
+
!((G = (j = e.fieldOptions) == null ? void 0 : j.redacted) != null && G.hidden) && /* @__PURE__ */ i(
|
|
363
365
|
u,
|
|
364
366
|
{
|
|
365
367
|
condition: e.labelPosition === "left",
|
|
366
|
-
wrapper: (
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
369
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "Redacted" }),
|
|
370
|
+
/* @__PURE__ */ i(n, { width: "68%", children: t })
|
|
369
371
|
] }),
|
|
370
372
|
children: /* @__PURE__ */ d(n, { mb: 2, children: [
|
|
371
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ i(
|
|
372
374
|
te,
|
|
373
375
|
{
|
|
374
|
-
control: /* @__PURE__ */
|
|
376
|
+
control: /* @__PURE__ */ i(
|
|
375
377
|
f,
|
|
376
378
|
{
|
|
377
379
|
name: "redacted",
|
|
378
380
|
control: s,
|
|
379
|
-
render: ({ field: { value:
|
|
381
|
+
render: ({ field: { value: t, ...l } }) => /* @__PURE__ */ i(ie, { checked: !!t, ...l })
|
|
380
382
|
}
|
|
381
383
|
),
|
|
382
384
|
label: e.labelPosition === "default" ? "Redacted" : void 0
|
|
@@ -386,24 +388,24 @@ function Ve(e, le) {
|
|
|
386
388
|
] })
|
|
387
389
|
}
|
|
388
390
|
),
|
|
389
|
-
!(($ = (J = e.fieldOptions) == null ? void 0 : J.contentEncrypted) != null && $.hidden) && /* @__PURE__ */
|
|
391
|
+
!(($ = (J = e.fieldOptions) == null ? void 0 : J.contentEncrypted) != null && $.hidden) && /* @__PURE__ */ i(
|
|
390
392
|
u,
|
|
391
393
|
{
|
|
392
394
|
condition: e.labelPosition === "left",
|
|
393
|
-
wrapper: (
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
395
|
+
wrapper: (t) => /* @__PURE__ */ d(n, { display: "flex", alignItems: "center", children: [
|
|
396
|
+
/* @__PURE__ */ i(b, { width: "32%", children: "Content Encrypted" }),
|
|
397
|
+
/* @__PURE__ */ i(n, { width: "68%", children: t })
|
|
396
398
|
] }),
|
|
397
399
|
children: /* @__PURE__ */ d(n, { mb: 2, children: [
|
|
398
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ i(
|
|
399
401
|
te,
|
|
400
402
|
{
|
|
401
|
-
control: /* @__PURE__ */
|
|
403
|
+
control: /* @__PURE__ */ i(
|
|
402
404
|
f,
|
|
403
405
|
{
|
|
404
406
|
name: "contentEncrypted",
|
|
405
407
|
control: s,
|
|
406
|
-
render: ({ field: { value:
|
|
408
|
+
render: ({ field: { value: t, ...l } }) => /* @__PURE__ */ i(ie, { checked: !!t, ...l })
|
|
407
409
|
}
|
|
408
410
|
),
|
|
409
411
|
label: e.labelPosition === "default" ? "Content Encrypted" : void 0
|
|
@@ -414,7 +416,7 @@ function Ve(e, le) {
|
|
|
414
416
|
}
|
|
415
417
|
)
|
|
416
418
|
] }),
|
|
417
|
-
!((z = (Y = e.fieldOptions) == null ? void 0 : Y.disseminationList) != null && z.hidden) && /* @__PURE__ */
|
|
419
|
+
!((z = (Y = e.fieldOptions) == null ? void 0 : Y.disseminationList) != null && z.hidden) && /* @__PURE__ */ i(
|
|
418
420
|
f,
|
|
419
421
|
{
|
|
420
422
|
name: "disseminationList",
|
|
@@ -422,12 +424,12 @@ function Ve(e, le) {
|
|
|
422
424
|
required: !0
|
|
423
425
|
},
|
|
424
426
|
control: s,
|
|
425
|
-
render: ({ field: { value:
|
|
426
|
-
const o =
|
|
427
|
+
render: ({ field: { value: t, onChange: l }, fieldState: a }) => {
|
|
428
|
+
const o = t || [], r = (c) => {
|
|
427
429
|
l(c);
|
|
428
430
|
};
|
|
429
|
-
return /* @__PURE__ */
|
|
430
|
-
|
|
431
|
+
return /* @__PURE__ */ i(
|
|
432
|
+
Oe,
|
|
431
433
|
{
|
|
432
434
|
selectedIds: o,
|
|
433
435
|
memberedGroups: e.memberedGroups,
|
|
@@ -440,7 +442,7 @@ function Ve(e, le) {
|
|
|
440
442
|
}
|
|
441
443
|
}
|
|
442
444
|
),
|
|
443
|
-
!((Z = (X = e.fieldOptions) == null ? void 0 : X.securityLevelId) != null && Z.hidden) && /* @__PURE__ */
|
|
445
|
+
!((Z = (X = e.fieldOptions) == null ? void 0 : X.securityLevelId) != null && Z.hidden) && /* @__PURE__ */ i(n, { mt: 2, children: /* @__PURE__ */ i(
|
|
444
446
|
f,
|
|
445
447
|
{
|
|
446
448
|
name: "securityLevelId",
|
|
@@ -448,15 +450,15 @@ function Ve(e, le) {
|
|
|
448
450
|
required: !0
|
|
449
451
|
},
|
|
450
452
|
control: s,
|
|
451
|
-
render: ({ field: { value:
|
|
453
|
+
render: ({ field: { value: t, onChange: l }, fieldState: a }) => {
|
|
452
454
|
var r, c;
|
|
453
455
|
const o = (m) => {
|
|
454
456
|
l(m);
|
|
455
457
|
};
|
|
456
|
-
return /* @__PURE__ */
|
|
457
|
-
|
|
458
|
+
return /* @__PURE__ */ i(
|
|
459
|
+
pe,
|
|
458
460
|
{
|
|
459
|
-
value:
|
|
461
|
+
value: t || 0,
|
|
460
462
|
ontologyId: e.ontologyId,
|
|
461
463
|
appRoles: e.appRoles,
|
|
462
464
|
securityLevels: e.securityLevels,
|
|
@@ -473,19 +475,19 @@ function Ve(e, le) {
|
|
|
473
475
|
}
|
|
474
476
|
) }),
|
|
475
477
|
/* @__PURE__ */ d(n, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
476
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ i(
|
|
477
479
|
I,
|
|
478
480
|
{
|
|
479
481
|
color: "primary",
|
|
480
482
|
variant: "text",
|
|
481
483
|
disabled: e.loading,
|
|
482
484
|
sx: { textTransform: "none" },
|
|
483
|
-
onClick:
|
|
485
|
+
onClick: fe,
|
|
484
486
|
children: "Cancel"
|
|
485
487
|
}
|
|
486
488
|
),
|
|
487
489
|
/* @__PURE__ */ d(n, { children: [
|
|
488
|
-
e.onRemove !== void 0 && /* @__PURE__ */
|
|
490
|
+
e.onRemove !== void 0 && /* @__PURE__ */ i(
|
|
489
491
|
I,
|
|
490
492
|
{
|
|
491
493
|
type: "button",
|
|
@@ -497,20 +499,20 @@ function Ve(e, le) {
|
|
|
497
499
|
children: e.removeLoading ? "Deleting..." : "Delete"
|
|
498
500
|
}
|
|
499
501
|
),
|
|
500
|
-
e.saveButtons ? e.saveButtons.map((
|
|
502
|
+
e.saveButtons ? e.saveButtons.map((t, l) => /* @__PURE__ */ i(
|
|
501
503
|
I,
|
|
502
504
|
{
|
|
503
505
|
type: "submit",
|
|
504
506
|
color: "primary",
|
|
505
507
|
variant: "contained",
|
|
506
508
|
disabled: e.loading,
|
|
507
|
-
startIcon:
|
|
509
|
+
startIcon: t.icon,
|
|
508
510
|
sx: { ml: 1, textTransform: "none" },
|
|
509
|
-
onClick:
|
|
510
|
-
children:
|
|
511
|
+
onClick: t.onClick,
|
|
512
|
+
children: t.label
|
|
511
513
|
},
|
|
512
514
|
l
|
|
513
|
-
)) : /* @__PURE__ */
|
|
515
|
+
)) : /* @__PURE__ */ i(
|
|
514
516
|
I,
|
|
515
517
|
{
|
|
516
518
|
type: "submit",
|
|
@@ -529,7 +531,7 @@ function Ve(e, le) {
|
|
|
529
531
|
}
|
|
530
532
|
);
|
|
531
533
|
}
|
|
532
|
-
const
|
|
534
|
+
const Ge = h.forwardRef(Se);
|
|
533
535
|
export {
|
|
534
|
-
|
|
536
|
+
Ge as InstanceForm
|
|
535
537
|
};
|
package/dist/main.d.ts
CHANGED