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