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