@hybridcore/ui 1.5.52 → 1.5.54
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 +99 -99
- package/dist/main.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, jsxs as c, Fragment as Oe } from "react/jsx-runtime";
|
|
2
2
|
import Le from "lodash";
|
|
3
3
|
import p, { useRef as Ve } from "react";
|
|
4
4
|
import { useForm as Se, Controller as h } from "react-hook-form";
|
|
@@ -34,21 +34,21 @@ function qe(e, pe) {
|
|
|
34
34
|
} = Se({
|
|
35
35
|
defaultValues: e.defaultValues
|
|
36
36
|
}), a = (e == null ? void 0 : e.labelPosition) ?? "default", [be, xe] = p.useState([]), [w, E] = p.useState(), [$e, Te] = p.useState(0), we = p.useMemo(() => {
|
|
37
|
-
const
|
|
37
|
+
const t = [];
|
|
38
38
|
return e.mappedTemplates.forEach((n) => {
|
|
39
|
-
n.creatable ||
|
|
40
|
-
}),
|
|
39
|
+
n.creatable || t.push(String(n.id));
|
|
40
|
+
}), t;
|
|
41
41
|
}, [e.mappedTemplates]);
|
|
42
42
|
p.useEffect(() => {
|
|
43
43
|
(async () => {
|
|
44
|
-
const
|
|
44
|
+
const t = { ...e.defaultValues }, n = e.mappedTemplates.get(t.templateId);
|
|
45
45
|
if (n) {
|
|
46
46
|
const r = n.properties.filter(
|
|
47
47
|
(o) => o.privacyPreservationMethod === "ENCRYPTION"
|
|
48
48
|
);
|
|
49
49
|
if (r.length > 0)
|
|
50
50
|
for (let o = 0; o < r.length; o++) {
|
|
51
|
-
const d = r[o], s = Le.get(
|
|
51
|
+
const d = r[o], s = Le.get(t, `variables.${d.propertyId}`);
|
|
52
52
|
if (s && e.keyAuth) {
|
|
53
53
|
const u = await Be(We), g = await Ae(u, String(s));
|
|
54
54
|
g.data && (T(`variables.${d.propertyId}`, g.data), Te((b) => b + 1));
|
|
@@ -58,20 +58,20 @@ function qe(e, pe) {
|
|
|
58
58
|
})();
|
|
59
59
|
}, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
|
|
60
60
|
const C = () => {
|
|
61
|
-
const
|
|
61
|
+
const t = k("templateId");
|
|
62
62
|
w && E(void 0);
|
|
63
63
|
const n = ke(e.mappedTemplates);
|
|
64
64
|
xe(n);
|
|
65
65
|
for (const r of e.mappedTemplates.values())
|
|
66
|
-
if (r.id ===
|
|
66
|
+
if (r.id === t) {
|
|
67
67
|
E(r);
|
|
68
68
|
break;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
p.useImperativeHandle(pe, () => ({
|
|
72
72
|
requestSubmit() {
|
|
73
|
-
var
|
|
74
|
-
(
|
|
73
|
+
var t;
|
|
74
|
+
(t = V.current) == null || t.requestSubmit();
|
|
75
75
|
},
|
|
76
76
|
resetForm() {
|
|
77
77
|
ge({
|
|
@@ -81,17 +81,17 @@ function qe(e, pe) {
|
|
|
81
81
|
variables: {}
|
|
82
82
|
}), C();
|
|
83
83
|
},
|
|
84
|
-
setFormValue(
|
|
85
|
-
T(
|
|
84
|
+
setFormValue(t, n) {
|
|
85
|
+
T(t, n);
|
|
86
86
|
},
|
|
87
|
-
getFormValue(
|
|
88
|
-
return k(
|
|
87
|
+
getFormValue(t) {
|
|
88
|
+
return k(t);
|
|
89
89
|
},
|
|
90
90
|
isDirty() {
|
|
91
91
|
return F;
|
|
92
92
|
},
|
|
93
|
-
|
|
94
|
-
return I;
|
|
93
|
+
getWatchedValue(t) {
|
|
94
|
+
return I(t);
|
|
95
95
|
}
|
|
96
96
|
})), p.useEffect(() => (C(), () => {
|
|
97
97
|
}), [e.mappedTemplates]), p.useEffect(() => {
|
|
@@ -102,22 +102,22 @@ function qe(e, pe) {
|
|
|
102
102
|
e.onCancel(F);
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
}, v = (
|
|
105
|
+
}, v = (t) => {
|
|
106
106
|
var o, d;
|
|
107
|
-
if (!
|
|
108
|
-
const n = (d = (o = e == null ? void 0 : e.fieldOptions) == null ? void 0 : o[
|
|
107
|
+
if (!t) return;
|
|
108
|
+
const n = (d = (o = e == null ? void 0 : e.fieldOptions) == null ? void 0 : o[t]) == null ? void 0 : d.maxChar;
|
|
109
109
|
return n != null && !Number.isNaN(Number(n)) ? Number(n) : void 0;
|
|
110
110
|
};
|
|
111
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ i(
|
|
112
112
|
m,
|
|
113
113
|
{
|
|
114
114
|
condition: e.variant === void 0 || e.variant === "inline",
|
|
115
|
-
wrapper: (
|
|
115
|
+
wrapper: (t) => /* @__PURE__ */ i(
|
|
116
116
|
Ee,
|
|
117
117
|
{
|
|
118
118
|
disableHeader: !0,
|
|
119
119
|
sx: { position: "relative", overflow: "visible" },
|
|
120
|
-
children:
|
|
120
|
+
children: t
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
children: /* @__PURE__ */ c(
|
|
@@ -127,21 +127,21 @@ function qe(e, pe) {
|
|
|
127
127
|
onSubmit: ve(e.onSubmit),
|
|
128
128
|
style: { display: "flex", flexDirection: "column" },
|
|
129
129
|
children: [
|
|
130
|
-
!((R = (P = e.fieldOptions) == null ? void 0 : P.title) != null && R.hidden) && /* @__PURE__ */
|
|
130
|
+
!((R = (P = e.fieldOptions) == null ? void 0 : P.title) != null && R.hidden) && /* @__PURE__ */ i(
|
|
131
131
|
m,
|
|
132
132
|
{
|
|
133
133
|
condition: a === "left",
|
|
134
|
-
wrapper: (
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
134
|
+
wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
135
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Title *" }),
|
|
136
|
+
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
137
137
|
] }),
|
|
138
138
|
children: /* @__PURE__ */ c(l, { mb: 2, children: [
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ i(
|
|
140
140
|
m,
|
|
141
141
|
{
|
|
142
142
|
condition: a === "top",
|
|
143
143
|
wrapper: L("Title", !0),
|
|
144
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ i(
|
|
145
145
|
x,
|
|
146
146
|
{
|
|
147
147
|
label: a === "default" ? "Title *" : void 0,
|
|
@@ -158,26 +158,26 @@ function qe(e, pe) {
|
|
|
158
158
|
)
|
|
159
159
|
}
|
|
160
160
|
),
|
|
161
|
-
v("title") && /* @__PURE__ */
|
|
161
|
+
v("title") && /* @__PURE__ */ i(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(D = I("title")) == null ? void 0 : D.length}/${v("title")}` }),
|
|
162
162
|
e.fieldOptions && ((N = e.fieldOptions.title) == null ? void 0 : N.helperText)
|
|
163
163
|
] })
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
|
-
!((W = (_ = e.fieldOptions) == null ? void 0 : _.description) != null && W.hidden) && /* @__PURE__ */
|
|
166
|
+
!((W = (_ = e.fieldOptions) == null ? void 0 : _.description) != null && W.hidden) && /* @__PURE__ */ i(
|
|
167
167
|
m,
|
|
168
168
|
{
|
|
169
169
|
condition: a === "left",
|
|
170
|
-
wrapper: (
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
170
|
+
wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
171
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Description" }),
|
|
172
|
+
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
173
173
|
] }),
|
|
174
174
|
children: /* @__PURE__ */ c(l, { mb: 2, children: [
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ i(
|
|
176
176
|
m,
|
|
177
177
|
{
|
|
178
178
|
condition: a === "top",
|
|
179
179
|
wrapper: L("Description", !1),
|
|
180
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ i(
|
|
181
181
|
x,
|
|
182
182
|
{
|
|
183
183
|
label: a === "default" ? "Description" : void 0,
|
|
@@ -192,37 +192,37 @@ function qe(e, pe) {
|
|
|
192
192
|
)
|
|
193
193
|
}
|
|
194
194
|
),
|
|
195
|
-
v("description") && /* @__PURE__ */
|
|
195
|
+
v("description") && /* @__PURE__ */ i(fe, { sx: { textAlign: "right", mt: 0.5 }, children: `${(U = I("description")) == null ? void 0 : U.length}/${v(
|
|
196
196
|
"description"
|
|
197
197
|
)}` }),
|
|
198
198
|
e.fieldOptions && ((j = e.fieldOptions.description) == null ? void 0 : j.helperText)
|
|
199
199
|
] })
|
|
200
200
|
}
|
|
201
201
|
),
|
|
202
|
-
!((H = (G = e.fieldOptions) == null ? void 0 : G.templateId) != null && H.hidden) && /* @__PURE__ */
|
|
202
|
+
!((H = (G = e.fieldOptions) == null ? void 0 : G.templateId) != null && H.hidden) && /* @__PURE__ */ i(
|
|
203
203
|
m,
|
|
204
204
|
{
|
|
205
205
|
condition: a === "left",
|
|
206
|
-
wrapper: (
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
206
|
+
wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
207
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Template" }),
|
|
208
|
+
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
209
209
|
] }),
|
|
210
210
|
children: /* @__PURE__ */ c(Fe, { sx: { mb: 2 }, children: [
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ i(
|
|
212
212
|
m,
|
|
213
213
|
{
|
|
214
214
|
condition: a === "top",
|
|
215
215
|
wrapper: L("Template", !1),
|
|
216
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ i(
|
|
217
217
|
h,
|
|
218
218
|
{
|
|
219
219
|
name: "templateId",
|
|
220
220
|
control: f,
|
|
221
|
-
render: ({ field: { value:
|
|
221
|
+
render: ({ field: { value: t, onChange: n } }) => {
|
|
222
222
|
var r, o;
|
|
223
223
|
if ((o = (r = e.fieldOptions) == null ? void 0 : r.templateId) != null && o.disabled) {
|
|
224
|
-
const d =
|
|
225
|
-
return /* @__PURE__ */
|
|
224
|
+
const d = t ? e.mappedTemplates.get(t) : void 0;
|
|
225
|
+
return /* @__PURE__ */ i(
|
|
226
226
|
x,
|
|
227
227
|
{
|
|
228
228
|
label: a === "default" ? "Template" : void 0,
|
|
@@ -236,12 +236,12 @@ function qe(e, pe) {
|
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
|
-
return /* @__PURE__ */
|
|
239
|
+
return /* @__PURE__ */ i(
|
|
240
240
|
De,
|
|
241
241
|
{
|
|
242
242
|
label: a === "default" ? "Template" : void 0,
|
|
243
243
|
data: be,
|
|
244
|
-
selected:
|
|
244
|
+
selected: t === 0 ? "" : [String(t)],
|
|
245
245
|
disabled: we,
|
|
246
246
|
variant: e.inputVariant,
|
|
247
247
|
onChange: (d, s) => {
|
|
@@ -263,12 +263,12 @@ function qe(e, pe) {
|
|
|
263
263
|
] })
|
|
264
264
|
}
|
|
265
265
|
),
|
|
266
|
-
"aliasList" in e.defaultValues && !((Y = (Q = e.fieldOptions) == null ? void 0 : Q.aliasList) != null && Y.hidden) && /* @__PURE__ */
|
|
266
|
+
"aliasList" in e.defaultValues && !((Y = (Q = e.fieldOptions) == null ? void 0 : Q.aliasList) != null && Y.hidden) && /* @__PURE__ */ i(
|
|
267
267
|
h,
|
|
268
268
|
{
|
|
269
269
|
name: "aliasList",
|
|
270
270
|
control: f,
|
|
271
|
-
render: ({ field: { value:
|
|
271
|
+
render: ({ field: { value: t, onChange: n, ...r } }) => {
|
|
272
272
|
var d;
|
|
273
273
|
const o = (s) => {
|
|
274
274
|
const b = {
|
|
@@ -278,22 +278,22 @@ function qe(e, pe) {
|
|
|
278
278
|
};
|
|
279
279
|
n(b);
|
|
280
280
|
};
|
|
281
|
-
return /* @__PURE__ */
|
|
281
|
+
return /* @__PURE__ */ i(
|
|
282
282
|
m,
|
|
283
283
|
{
|
|
284
284
|
condition: a === "left",
|
|
285
285
|
wrapper: (s) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Alias List" }),
|
|
287
|
+
/* @__PURE__ */ i(l, { width: "68%", children: s })
|
|
288
288
|
] }),
|
|
289
289
|
children: /* @__PURE__ */ c(l, { mb: 2, children: [
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ i(
|
|
291
291
|
x,
|
|
292
292
|
{
|
|
293
293
|
label: a === "default" ? "Alias List" : void 0,
|
|
294
294
|
variant: e.inputVariant,
|
|
295
295
|
fullWidth: !0,
|
|
296
|
-
value:
|
|
296
|
+
value: t,
|
|
297
297
|
helperText: "Add list values with the comma (,) separated string",
|
|
298
298
|
onChange: o,
|
|
299
299
|
...r
|
|
@@ -306,28 +306,28 @@ function qe(e, pe) {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
),
|
|
309
|
-
"appliedPolicies" in e.defaultValues && !((X = (z = e.fieldOptions) == null ? void 0 : z.appliedPolicies) != null && X.hidden) && /* @__PURE__ */
|
|
309
|
+
"appliedPolicies" in e.defaultValues && !((X = (z = e.fieldOptions) == null ? void 0 : z.appliedPolicies) != null && X.hidden) && /* @__PURE__ */ i(
|
|
310
310
|
h,
|
|
311
311
|
{
|
|
312
312
|
name: "appliedPolicies",
|
|
313
313
|
control: f,
|
|
314
|
-
render: ({ field: { value:
|
|
314
|
+
render: ({ field: { value: t, onChange: n } }) => {
|
|
315
315
|
var r;
|
|
316
|
-
return /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ i(
|
|
317
317
|
m,
|
|
318
318
|
{
|
|
319
319
|
condition: a === "left",
|
|
320
320
|
wrapper: (o) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Policy List" }),
|
|
322
|
+
/* @__PURE__ */ i(l, { width: "68%", children: o })
|
|
323
323
|
] }),
|
|
324
324
|
children: /* @__PURE__ */ c(l, { mb: 2, children: [
|
|
325
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ i(
|
|
326
326
|
Ne,
|
|
327
327
|
{
|
|
328
328
|
policyList: e.policyList,
|
|
329
329
|
labelPosition: a,
|
|
330
|
-
value:
|
|
330
|
+
value: t || void 0,
|
|
331
331
|
onChange: n
|
|
332
332
|
}
|
|
333
333
|
),
|
|
@@ -338,16 +338,16 @@ function qe(e, pe) {
|
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
),
|
|
341
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ i(
|
|
342
342
|
h,
|
|
343
343
|
{
|
|
344
344
|
name: "variables",
|
|
345
345
|
control: f,
|
|
346
|
-
render: ({ field: { value:
|
|
346
|
+
render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ i(
|
|
347
347
|
_e,
|
|
348
348
|
{
|
|
349
349
|
template: w,
|
|
350
|
-
value:
|
|
350
|
+
value: t,
|
|
351
351
|
mapboxAccessToken: e.mapboxAccessToken,
|
|
352
352
|
variant: e.inputVariant,
|
|
353
353
|
labelPosition: a,
|
|
@@ -358,34 +358,34 @@ function qe(e, pe) {
|
|
|
358
358
|
}
|
|
359
359
|
),
|
|
360
360
|
"fileInBase64" in e.defaultValues && !((ee = (Z = e.fieldOptions) == null ? void 0 : Z.fileInBase64) != null && ee.hidden) && /* @__PURE__ */ c(Oe, { children: [
|
|
361
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ i(
|
|
362
362
|
h,
|
|
363
363
|
{
|
|
364
364
|
name: "fileInBase64",
|
|
365
365
|
control: f,
|
|
366
|
-
render: ({ field: { onChange:
|
|
366
|
+
render: ({ field: { onChange: t, value: n, ...r } }) => {
|
|
367
367
|
var d;
|
|
368
368
|
const o = (s) => {
|
|
369
369
|
if (s.target.files) {
|
|
370
370
|
const u = new FileReader();
|
|
371
371
|
u.onload = async (b) => {
|
|
372
372
|
const Ce = b.target.result.split("base64,")[1];
|
|
373
|
-
|
|
373
|
+
t(Ce);
|
|
374
374
|
};
|
|
375
375
|
const g = s.target.files[0];
|
|
376
376
|
T("originalFileName", g.name), T("contentType", g.type), u.readAsDataURL(g);
|
|
377
377
|
}
|
|
378
378
|
};
|
|
379
|
-
return /* @__PURE__ */
|
|
379
|
+
return /* @__PURE__ */ i(
|
|
380
380
|
m,
|
|
381
381
|
{
|
|
382
382
|
condition: a === "left",
|
|
383
383
|
wrapper: (s) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "File to Upload" }),
|
|
385
|
+
/* @__PURE__ */ i(l, { width: "68%", children: s })
|
|
386
386
|
] }),
|
|
387
387
|
children: /* @__PURE__ */ c(l, { mb: 2, children: [
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ i(
|
|
389
389
|
x,
|
|
390
390
|
{
|
|
391
391
|
type: "file",
|
|
@@ -405,24 +405,24 @@ function qe(e, pe) {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
),
|
|
408
|
-
!((ie = (te = e.fieldOptions) == null ? void 0 : te.redacted) != null && ie.hidden) && /* @__PURE__ */
|
|
408
|
+
!((ie = (te = e.fieldOptions) == null ? void 0 : te.redacted) != null && ie.hidden) && /* @__PURE__ */ i(
|
|
409
409
|
m,
|
|
410
410
|
{
|
|
411
411
|
condition: a === "left",
|
|
412
|
-
wrapper: (
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
412
|
+
wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
413
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Redacted" }),
|
|
414
|
+
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
415
415
|
] }),
|
|
416
416
|
children: /* @__PURE__ */ c(l, { mb: 2, children: [
|
|
417
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ i(
|
|
418
418
|
ue,
|
|
419
419
|
{
|
|
420
|
-
control: /* @__PURE__ */
|
|
420
|
+
control: /* @__PURE__ */ i(
|
|
421
421
|
h,
|
|
422
422
|
{
|
|
423
423
|
name: "redacted",
|
|
424
424
|
control: f,
|
|
425
|
-
render: ({ field: { value:
|
|
425
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(he, { checked: !!t, ...n })
|
|
426
426
|
}
|
|
427
427
|
),
|
|
428
428
|
label: a === "default" ? "Redacted" : void 0
|
|
@@ -432,24 +432,24 @@ function qe(e, pe) {
|
|
|
432
432
|
] })
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
|
-
!((ae = (le = e.fieldOptions) == null ? void 0 : le.contentEncrypted) != null && ae.hidden) && /* @__PURE__ */
|
|
435
|
+
!((ae = (le = e.fieldOptions) == null ? void 0 : le.contentEncrypted) != null && ae.hidden) && /* @__PURE__ */ i(
|
|
436
436
|
m,
|
|
437
437
|
{
|
|
438
438
|
condition: a === "left",
|
|
439
|
-
wrapper: (
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
439
|
+
wrapper: (t) => /* @__PURE__ */ c(l, { display: "flex", alignItems: "center", children: [
|
|
440
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Content Encrypted" }),
|
|
441
|
+
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
442
442
|
] }),
|
|
443
443
|
children: /* @__PURE__ */ c(l, { mb: 2, children: [
|
|
444
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ i(
|
|
445
445
|
ue,
|
|
446
446
|
{
|
|
447
|
-
control: /* @__PURE__ */
|
|
447
|
+
control: /* @__PURE__ */ i(
|
|
448
448
|
h,
|
|
449
449
|
{
|
|
450
450
|
name: "contentEncrypted",
|
|
451
451
|
control: f,
|
|
452
|
-
render: ({ field: { value:
|
|
452
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(he, { checked: !!t, ...n })
|
|
453
453
|
}
|
|
454
454
|
),
|
|
455
455
|
label: a === "default" ? "Content Encrypted" : void 0
|
|
@@ -460,7 +460,7 @@ function qe(e, pe) {
|
|
|
460
460
|
}
|
|
461
461
|
)
|
|
462
462
|
] }),
|
|
463
|
-
!((oe = (re = e.fieldOptions) == null ? void 0 : re.disseminationList) != null && oe.hidden) && /* @__PURE__ */
|
|
463
|
+
!((oe = (re = e.fieldOptions) == null ? void 0 : re.disseminationList) != null && oe.hidden) && /* @__PURE__ */ i(
|
|
464
464
|
h,
|
|
465
465
|
{
|
|
466
466
|
name: "disseminationList",
|
|
@@ -468,11 +468,11 @@ function qe(e, pe) {
|
|
|
468
468
|
required: !0
|
|
469
469
|
},
|
|
470
470
|
control: f,
|
|
471
|
-
render: ({ field: { value:
|
|
472
|
-
const o =
|
|
471
|
+
render: ({ field: { value: t, onChange: n }, fieldState: r }) => {
|
|
472
|
+
const o = t || [], d = (s) => {
|
|
473
473
|
n(s);
|
|
474
474
|
};
|
|
475
|
-
return /* @__PURE__ */
|
|
475
|
+
return /* @__PURE__ */ i(
|
|
476
476
|
Pe,
|
|
477
477
|
{
|
|
478
478
|
selectedIds: o,
|
|
@@ -486,7 +486,7 @@ function qe(e, pe) {
|
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
),
|
|
489
|
-
!((se = (ce = e.fieldOptions) == null ? void 0 : ce.securityLevelId) != null && se.hidden) && /* @__PURE__ */
|
|
489
|
+
!((se = (ce = e.fieldOptions) == null ? void 0 : ce.securityLevelId) != null && se.hidden) && /* @__PURE__ */ i(l, { mt: 2, children: /* @__PURE__ */ i(
|
|
490
490
|
h,
|
|
491
491
|
{
|
|
492
492
|
name: "securityLevelId",
|
|
@@ -494,15 +494,15 @@ function qe(e, pe) {
|
|
|
494
494
|
required: !0
|
|
495
495
|
},
|
|
496
496
|
control: f,
|
|
497
|
-
render: ({ field: { value:
|
|
497
|
+
render: ({ field: { value: t, onChange: n }, fieldState: r }) => {
|
|
498
498
|
var d, s;
|
|
499
499
|
const o = (u) => {
|
|
500
500
|
n(u);
|
|
501
501
|
};
|
|
502
|
-
return /* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ i(
|
|
503
503
|
Re,
|
|
504
504
|
{
|
|
505
|
-
value:
|
|
505
|
+
value: t || 0,
|
|
506
506
|
ontologyId: e.ontologyId,
|
|
507
507
|
appRoles: e.appRoles,
|
|
508
508
|
securityLevels: e.securityLevels,
|
|
@@ -526,7 +526,7 @@ function qe(e, pe) {
|
|
|
526
526
|
mt: 3,
|
|
527
527
|
width: "100%",
|
|
528
528
|
children: [
|
|
529
|
-
e.onCancel && /* @__PURE__ */
|
|
529
|
+
e.onCancel && /* @__PURE__ */ i(
|
|
530
530
|
O,
|
|
531
531
|
{
|
|
532
532
|
color: "primary",
|
|
@@ -537,20 +537,20 @@ function qe(e, pe) {
|
|
|
537
537
|
children: "Cancel"
|
|
538
538
|
}
|
|
539
539
|
),
|
|
540
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ i(l, { sx: { flex: e.onCancel ? "none" : 1 }, children: e.customSaveButtons ? e.customSaveButtons : e.saveButtons ? e.saveButtons.map((t, n) => /* @__PURE__ */ i(
|
|
541
541
|
O,
|
|
542
542
|
{
|
|
543
543
|
type: "submit",
|
|
544
544
|
color: "primary",
|
|
545
545
|
variant: "contained",
|
|
546
546
|
disabled: e.loading,
|
|
547
|
-
startIcon:
|
|
547
|
+
startIcon: t.icon,
|
|
548
548
|
sx: { ml: 1, textTransform: "none" },
|
|
549
|
-
onClick:
|
|
550
|
-
children:
|
|
549
|
+
onClick: t.onClick,
|
|
550
|
+
children: t.label
|
|
551
551
|
},
|
|
552
552
|
n
|
|
553
|
-
)) : /* @__PURE__ */
|
|
553
|
+
)) : /* @__PURE__ */ i(
|
|
554
554
|
O,
|
|
555
555
|
{
|
|
556
556
|
type: "submit",
|
package/dist/main.d.ts
CHANGED