@hybridcore/ui 1.5.40 → 1.5.42
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.
|
@@ -1,48 +1,51 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { ActionButtons as
|
|
1
|
+
import { jsxs as r, jsx as o, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { Box as t, AppBar as c, Toolbar as l } from "@mui/material";
|
|
3
|
+
import { ActionButtons as d } from "./components/action-buttons/index.js";
|
|
4
4
|
import m from "./components/viewer/index.js";
|
|
5
5
|
import { useDocumentViewerLogic as g } from "./logic.js";
|
|
6
|
-
import { SidePanelToggleButton as s, SidePanel as
|
|
7
|
-
import { DoubleArrow as
|
|
8
|
-
const S = (
|
|
9
|
-
const { refs: a, state:
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */ o(
|
|
12
|
-
/* @__PURE__ */ o(
|
|
13
|
-
/* @__PURE__ */ o(
|
|
14
|
-
/* @__PURE__ */ o(
|
|
15
|
-
|
|
6
|
+
import { SidePanelToggleButton as s, SidePanel as u } from "./styled.js";
|
|
7
|
+
import { DoubleArrow as f } from "@mui/icons-material";
|
|
8
|
+
const S = (e) => {
|
|
9
|
+
const { refs: a, state: n, action: i } = g(e);
|
|
10
|
+
return /* @__PURE__ */ r(t, { bgcolor: "#ededed", children: [
|
|
11
|
+
/* @__PURE__ */ o(c, { color: "inherit", children: /* @__PURE__ */ r(l, { sx: { justifyContent: "space-between" }, children: [
|
|
12
|
+
/* @__PURE__ */ o(t, { children: e.logo }),
|
|
13
|
+
/* @__PURE__ */ o(t, {}),
|
|
14
|
+
/* @__PURE__ */ o(t, { children: /* @__PURE__ */ o(
|
|
15
|
+
d,
|
|
16
16
|
{
|
|
17
|
-
onBookmark:
|
|
18
|
-
onDownload:
|
|
19
|
-
onFullScreen:
|
|
20
|
-
onPrint:
|
|
17
|
+
onBookmark: e.onBookmark,
|
|
18
|
+
onDownload: i.onDownload,
|
|
19
|
+
onFullScreen: i.onFullScreen,
|
|
20
|
+
onPrint: i.onPrint
|
|
21
21
|
}
|
|
22
22
|
) })
|
|
23
23
|
] }) }),
|
|
24
24
|
/* @__PURE__ */ o(l, {}),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
25
|
+
/* @__PURE__ */ r(t, { mr: `${n.rightPanelWidth}px`, sx: { transition: "all .3s" }, children: [
|
|
26
|
+
n.blob ? /* @__PURE__ */ o(m, { ref: a.viewer, data: n.blob }) : null,
|
|
27
|
+
e.customContent
|
|
28
|
+
] }),
|
|
29
|
+
e.rightPanel ? /* @__PURE__ */ r(h, { children: [
|
|
27
30
|
/* @__PURE__ */ o(
|
|
28
31
|
s,
|
|
29
32
|
{
|
|
30
|
-
sx: { right:
|
|
31
|
-
onClick:
|
|
33
|
+
sx: { right: n.rightPanelWidth },
|
|
34
|
+
onClick: i.toggleRightPanel,
|
|
32
35
|
children: /* @__PURE__ */ o(
|
|
33
|
-
|
|
36
|
+
f,
|
|
34
37
|
{
|
|
35
38
|
sx: {
|
|
36
39
|
fontSize: 14,
|
|
37
|
-
transform: `rotate(${
|
|
40
|
+
transform: `rotate(${n.rightPanelWidth ? 0 : 180}deg)`
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
)
|
|
41
44
|
}
|
|
42
45
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ r(u, { width: n.rightPanelWidth, right: 0, children: [
|
|
44
47
|
/* @__PURE__ */ o(l, {}),
|
|
45
|
-
|
|
48
|
+
e.rightPanel
|
|
46
49
|
] })
|
|
47
50
|
] }) : null
|
|
48
51
|
] });
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { jsx as i, jsxs as o, Fragment as xe } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import v, { useRef as Te } from "react";
|
|
3
3
|
import Ie from "lodash";
|
|
4
|
-
import { useForm as we, Controller as
|
|
5
|
-
import { getNestedChildrenFromMap as
|
|
6
|
-
import { i as
|
|
7
|
-
import { ConditionalWrapper as
|
|
8
|
-
import { Container as
|
|
9
|
-
import { Box as l, Typography as
|
|
10
|
-
import { TreeSelect as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { DisseminationList as
|
|
14
|
-
import { SecurityLevel as
|
|
15
|
-
const
|
|
4
|
+
import { useForm as we, Controller as u } from "react-hook-form";
|
|
5
|
+
import { getNestedChildrenFromMap as Ce } from "../../utils/ontology.js";
|
|
6
|
+
import { i as Le, d as Oe } from "../../utils-Bq0ye5vf.js";
|
|
7
|
+
import { ConditionalWrapper as h } from "../conditional-wrapper/index.js";
|
|
8
|
+
import { Container as Ve } from "../container/index.js";
|
|
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";
|
|
13
|
+
import { DisseminationList as Ee } from "../data-security-selectors/dissemination-list/index.js";
|
|
14
|
+
import { SecurityLevel as Pe } from "../data-security-selectors/security-level/index.js";
|
|
15
|
+
const Be = {
|
|
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:
|
|
27
|
-
control:
|
|
28
|
-
formState: { errors:
|
|
29
|
-
getValues:
|
|
22
|
+
function De(e, se) {
|
|
23
|
+
var R, E, P, B, D, A, N, _, W, q, $, K, M, U, j, G, H, J, Q, Y, z, X, Z, ee, te, ie, ne, le, ae;
|
|
24
|
+
const L = Te(null), {
|
|
25
|
+
register: O,
|
|
26
|
+
handleSubmit: me,
|
|
27
|
+
control: m,
|
|
28
|
+
formState: { errors: fe, isDirty: V },
|
|
29
|
+
getValues: S,
|
|
30
30
|
setValue: T,
|
|
31
|
-
reset:
|
|
32
|
-
watch:
|
|
31
|
+
reset: ue,
|
|
32
|
+
watch: F
|
|
33
33
|
} = we({
|
|
34
34
|
defaultValues: e.defaultValues
|
|
35
|
-
}), [
|
|
35
|
+
}), c = (e == null ? void 0 : e.labelPosition) ?? "default", [he, ve] = v.useState([]), [I, k] = v.useState(), [Ae, ge] = v.useState(0), ye = v.useMemo(() => {
|
|
36
36
|
const t = [];
|
|
37
37
|
return e.mappedTemplates.forEach((n) => {
|
|
38
38
|
n.creatable || t.push(String(n.id));
|
|
39
39
|
}), t;
|
|
40
40
|
}, [e.mappedTemplates]);
|
|
41
|
-
|
|
41
|
+
v.useEffect(() => {
|
|
42
42
|
(async () => {
|
|
43
43
|
const t = { ...e.defaultValues }, n = e.mappedTemplates.get(t.templateId);
|
|
44
44
|
if (n) {
|
|
@@ -47,69 +47,69 @@ function Be(e, ce) {
|
|
|
47
47
|
);
|
|
48
48
|
if (d.length > 0)
|
|
49
49
|
for (let r = 0; r < d.length; r++) {
|
|
50
|
-
const a = d[r],
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
|
|
50
|
+
const a = d[r], s = Ie.get(t, `variables.${a.propertyId}`);
|
|
51
|
+
if (s && e.keyAuth) {
|
|
52
|
+
const f = await Le(Be), b = await Oe(f, String(s));
|
|
53
|
+
b.data && (T(`variables.${a.propertyId}`, b.data), ge((p) => p + 1));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
})();
|
|
58
58
|
}, [e.defaultValues, e.mappedTemplates, e.keyAuth]);
|
|
59
|
-
const
|
|
60
|
-
const t =
|
|
61
|
-
I &&
|
|
62
|
-
const n =
|
|
63
|
-
|
|
59
|
+
const C = () => {
|
|
60
|
+
const t = S("templateId");
|
|
61
|
+
I && k(void 0);
|
|
62
|
+
const n = Ce(e.mappedTemplates);
|
|
63
|
+
ve(n);
|
|
64
64
|
for (const d of e.mappedTemplates.values())
|
|
65
65
|
if (d.id === t) {
|
|
66
|
-
|
|
66
|
+
k(d);
|
|
67
67
|
break;
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
v.useImperativeHandle(se, () => ({
|
|
71
71
|
requestSubmit() {
|
|
72
72
|
var t;
|
|
73
|
-
(t =
|
|
73
|
+
(t = L.current) == null || t.requestSubmit();
|
|
74
74
|
},
|
|
75
75
|
resetForm() {
|
|
76
|
-
|
|
76
|
+
ue({
|
|
77
77
|
title: "",
|
|
78
78
|
description: "",
|
|
79
79
|
templateId: 0,
|
|
80
80
|
variables: {}
|
|
81
|
-
}),
|
|
81
|
+
}), C();
|
|
82
82
|
},
|
|
83
83
|
setFormValue(t, n) {
|
|
84
84
|
T(t, n);
|
|
85
85
|
},
|
|
86
86
|
getFormValue(t) {
|
|
87
|
-
return
|
|
87
|
+
return S(t);
|
|
88
88
|
},
|
|
89
89
|
isDirty() {
|
|
90
|
-
return
|
|
90
|
+
return V;
|
|
91
91
|
}
|
|
92
|
-
})),
|
|
93
|
-
}), [e.mappedTemplates]),
|
|
92
|
+
})), v.useEffect(() => (C(), () => {
|
|
93
|
+
}), [e.mappedTemplates]), v.useEffect(() => {
|
|
94
94
|
e.onSelectedTemplateChange && e.onSelectedTemplateChange(I);
|
|
95
95
|
}, [I]);
|
|
96
|
-
const
|
|
96
|
+
const be = () => {
|
|
97
97
|
if (e.onCancel) {
|
|
98
|
-
e.onCancel(
|
|
98
|
+
e.onCancel(V);
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, g = (t) => {
|
|
102
102
|
var r, a;
|
|
103
103
|
if (!t) return;
|
|
104
104
|
const n = (a = (r = e == null ? void 0 : e.fieldOptions) == null ? void 0 : r[t]) == null ? void 0 : a.maxChar;
|
|
105
105
|
return n != null && !Number.isNaN(Number(n)) ? Number(n) : void 0;
|
|
106
106
|
};
|
|
107
107
|
return /* @__PURE__ */ i(
|
|
108
|
-
|
|
108
|
+
h,
|
|
109
109
|
{
|
|
110
110
|
condition: e.variant === void 0 || e.variant === "inline",
|
|
111
111
|
wrapper: (t) => /* @__PURE__ */ i(
|
|
112
|
-
|
|
112
|
+
Ve,
|
|
113
113
|
{
|
|
114
114
|
disableHeader: !0,
|
|
115
115
|
sx: { position: "relative", overflow: "visible" },
|
|
@@ -119,80 +119,80 @@ function Be(e, ce) {
|
|
|
119
119
|
children: /* @__PURE__ */ o(
|
|
120
120
|
"form",
|
|
121
121
|
{
|
|
122
|
-
ref:
|
|
123
|
-
onSubmit:
|
|
122
|
+
ref: L,
|
|
123
|
+
onSubmit: me(e.onSubmit),
|
|
124
124
|
style: { display: "flex", flexDirection: "column" },
|
|
125
125
|
children: [
|
|
126
|
-
!((
|
|
127
|
-
|
|
126
|
+
!((E = (R = e.fieldOptions) == null ? void 0 : R.title) != null && E.hidden) && /* @__PURE__ */ i(
|
|
127
|
+
h,
|
|
128
128
|
{
|
|
129
|
-
condition:
|
|
129
|
+
condition: c === "left",
|
|
130
130
|
wrapper: (t) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
131
|
-
/* @__PURE__ */ i(
|
|
131
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Title *" }),
|
|
132
132
|
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
133
133
|
] }),
|
|
134
134
|
children: /* @__PURE__ */ o(l, { mb: 2, children: [
|
|
135
135
|
/* @__PURE__ */ i(
|
|
136
136
|
x,
|
|
137
137
|
{
|
|
138
|
-
label:
|
|
138
|
+
label: c === "default" ? "Title *" : void 0,
|
|
139
139
|
variant: e.inputVariant,
|
|
140
|
-
inputProps:
|
|
140
|
+
inputProps: g("title") ? { maxLength: g("title") } : void 0,
|
|
141
141
|
fullWidth: !0,
|
|
142
|
-
...
|
|
143
|
-
...
|
|
142
|
+
...O("title", { required: !0 }),
|
|
143
|
+
...fe.title && {
|
|
144
144
|
helperText: "This field is required!",
|
|
145
145
|
error: !0
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
|
|
150
|
-
e.fieldOptions && ((
|
|
149
|
+
g("title") && /* @__PURE__ */ i(re, { sx: { textAlign: "right", mt: 0.5 }, children: `${(P = F("title")) == null ? void 0 : P.length}/${g("title")}` }),
|
|
150
|
+
e.fieldOptions && ((B = e.fieldOptions.title) == null ? void 0 : B.helperText)
|
|
151
151
|
] })
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
!((
|
|
155
|
-
|
|
154
|
+
!((A = (D = e.fieldOptions) == null ? void 0 : D.description) != null && A.hidden) && /* @__PURE__ */ i(
|
|
155
|
+
h,
|
|
156
156
|
{
|
|
157
|
-
condition:
|
|
157
|
+
condition: c === "left",
|
|
158
158
|
wrapper: (t) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
159
|
-
/* @__PURE__ */ i(
|
|
159
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Description" }),
|
|
160
160
|
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
161
161
|
] }),
|
|
162
162
|
children: /* @__PURE__ */ o(l, { mb: 2, children: [
|
|
163
163
|
/* @__PURE__ */ i(
|
|
164
164
|
x,
|
|
165
165
|
{
|
|
166
|
-
label:
|
|
167
|
-
inputProps:
|
|
166
|
+
label: c === "default" ? "Description" : void 0,
|
|
167
|
+
inputProps: g("description") ? { maxLength: g("description") } : void 0,
|
|
168
168
|
variant: e.inputVariant,
|
|
169
169
|
fullWidth: !0,
|
|
170
170
|
multiline: !0,
|
|
171
|
-
minRows: (
|
|
172
|
-
...
|
|
171
|
+
minRows: (_ = (N = e.fieldOptions) == null ? void 0 : N.description) == null ? void 0 : _.minRows,
|
|
172
|
+
...O("description")
|
|
173
173
|
}
|
|
174
174
|
),
|
|
175
|
-
|
|
175
|
+
g("description") && /* @__PURE__ */ i(re, { sx: { textAlign: "right", mt: 0.5 }, children: `${(W = F("description")) == null ? void 0 : W.length}/${g(
|
|
176
176
|
"description"
|
|
177
177
|
)}` }),
|
|
178
|
-
e.fieldOptions && ((
|
|
178
|
+
e.fieldOptions && ((q = e.fieldOptions.description) == null ? void 0 : q.helperText)
|
|
179
179
|
] })
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
|
-
!((
|
|
183
|
-
|
|
182
|
+
!((K = ($ = e.fieldOptions) == null ? void 0 : $.templateId) != null && K.hidden) && /* @__PURE__ */ i(
|
|
183
|
+
h,
|
|
184
184
|
{
|
|
185
|
-
condition:
|
|
185
|
+
condition: c === "left",
|
|
186
186
|
wrapper: (t) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
187
|
-
/* @__PURE__ */ i(
|
|
187
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Template" }),
|
|
188
188
|
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
189
189
|
] }),
|
|
190
|
-
children: /* @__PURE__ */ o(
|
|
190
|
+
children: /* @__PURE__ */ o(Se, { sx: { mb: 2 }, children: [
|
|
191
191
|
/* @__PURE__ */ i(
|
|
192
|
-
|
|
192
|
+
u,
|
|
193
193
|
{
|
|
194
194
|
name: "templateId",
|
|
195
|
-
control:
|
|
195
|
+
control: m,
|
|
196
196
|
render: ({ field: { value: t, onChange: n } }) => {
|
|
197
197
|
var d, r;
|
|
198
198
|
if ((r = (d = e.fieldOptions) == null ? void 0 : d.templateId) != null && r.disabled) {
|
|
@@ -210,58 +210,58 @@ function Be(e, ce) {
|
|
|
210
210
|
);
|
|
211
211
|
}
|
|
212
212
|
return /* @__PURE__ */ i(
|
|
213
|
-
|
|
213
|
+
Fe,
|
|
214
214
|
{
|
|
215
|
-
label:
|
|
216
|
-
data:
|
|
215
|
+
label: c === "default" ? "Template" : void 0,
|
|
216
|
+
data: he,
|
|
217
217
|
selected: t === 0 ? "" : [String(t)],
|
|
218
|
-
disabled:
|
|
218
|
+
disabled: ye,
|
|
219
219
|
variant: e.inputVariant,
|
|
220
|
-
onChange: (a,
|
|
221
|
-
const
|
|
220
|
+
onChange: (a, s) => {
|
|
221
|
+
const f = {
|
|
222
222
|
target: {
|
|
223
|
-
value:
|
|
223
|
+
value: s ? Number(a) : 0
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
n(
|
|
226
|
+
n(f), C();
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
e.fieldOptions && ((
|
|
233
|
+
e.fieldOptions && ((M = e.fieldOptions.templateId) == null ? void 0 : M.helperText)
|
|
234
234
|
] })
|
|
235
235
|
}
|
|
236
236
|
),
|
|
237
|
-
"aliasList" in e.defaultValues && !((
|
|
238
|
-
|
|
237
|
+
"aliasList" in e.defaultValues && !((j = (U = e.fieldOptions) == null ? void 0 : U.aliasList) != null && j.hidden) && /* @__PURE__ */ i(
|
|
238
|
+
u,
|
|
239
239
|
{
|
|
240
240
|
name: "aliasList",
|
|
241
|
-
control:
|
|
241
|
+
control: m,
|
|
242
242
|
render: ({ field: { value: t, onChange: n, ...d } }) => {
|
|
243
243
|
var a;
|
|
244
|
-
const r = (
|
|
245
|
-
const
|
|
244
|
+
const r = (s) => {
|
|
245
|
+
const p = {
|
|
246
246
|
target: {
|
|
247
|
-
value:
|
|
247
|
+
value: s.target.value.split(",").map((de) => de.trimStart())
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
n(
|
|
250
|
+
n(p);
|
|
251
251
|
};
|
|
252
252
|
return /* @__PURE__ */ i(
|
|
253
|
-
|
|
253
|
+
h,
|
|
254
254
|
{
|
|
255
|
-
condition:
|
|
256
|
-
wrapper: (
|
|
257
|
-
/* @__PURE__ */ i(
|
|
258
|
-
/* @__PURE__ */ i(l, { width: "68%", children:
|
|
255
|
+
condition: c === "left",
|
|
256
|
+
wrapper: (s) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
257
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Alias List" }),
|
|
258
|
+
/* @__PURE__ */ i(l, { width: "68%", children: s })
|
|
259
259
|
] }),
|
|
260
260
|
children: /* @__PURE__ */ o(l, { mb: 2, children: [
|
|
261
261
|
/* @__PURE__ */ i(
|
|
262
262
|
x,
|
|
263
263
|
{
|
|
264
|
-
label:
|
|
264
|
+
label: c === "default" ? "Alias List" : void 0,
|
|
265
265
|
variant: e.inputVariant,
|
|
266
266
|
fullWidth: !0,
|
|
267
267
|
value: t,
|
|
@@ -277,27 +277,27 @@ function Be(e, ce) {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
),
|
|
280
|
-
"appliedPolicies" in e.defaultValues && !((
|
|
281
|
-
|
|
280
|
+
"appliedPolicies" in e.defaultValues && !((H = (G = e.fieldOptions) == null ? void 0 : G.appliedPolicies) != null && H.hidden) && /* @__PURE__ */ i(
|
|
281
|
+
u,
|
|
282
282
|
{
|
|
283
283
|
name: "appliedPolicies",
|
|
284
|
-
control:
|
|
284
|
+
control: m,
|
|
285
285
|
render: ({ field: { value: t, onChange: n } }) => {
|
|
286
286
|
var d;
|
|
287
287
|
return /* @__PURE__ */ i(
|
|
288
|
-
|
|
288
|
+
h,
|
|
289
289
|
{
|
|
290
|
-
condition:
|
|
290
|
+
condition: c === "left",
|
|
291
291
|
wrapper: (r) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
292
|
-
/* @__PURE__ */ i(
|
|
292
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Policy List" }),
|
|
293
293
|
/* @__PURE__ */ i(l, { width: "68%", children: r })
|
|
294
294
|
] }),
|
|
295
295
|
children: /* @__PURE__ */ o(l, { mb: 2, children: [
|
|
296
296
|
/* @__PURE__ */ i(
|
|
297
|
-
|
|
297
|
+
ke,
|
|
298
298
|
{
|
|
299
299
|
policyList: e.policyList,
|
|
300
|
-
labelPosition:
|
|
300
|
+
labelPosition: c,
|
|
301
301
|
value: t || void 0,
|
|
302
302
|
onChange: n
|
|
303
303
|
}
|
|
@@ -310,57 +310,57 @@ function Be(e, ce) {
|
|
|
310
310
|
}
|
|
311
311
|
),
|
|
312
312
|
/* @__PURE__ */ i(
|
|
313
|
-
|
|
313
|
+
u,
|
|
314
314
|
{
|
|
315
315
|
name: "variables",
|
|
316
|
-
control:
|
|
316
|
+
control: m,
|
|
317
317
|
render: ({ field: { value: t, onChange: n } }) => /* @__PURE__ */ i(
|
|
318
|
-
|
|
318
|
+
Re,
|
|
319
319
|
{
|
|
320
320
|
template: I,
|
|
321
321
|
value: t,
|
|
322
322
|
mapboxAccessToken: e.mapboxAccessToken,
|
|
323
323
|
variant: e.inputVariant,
|
|
324
|
-
labelPosition:
|
|
324
|
+
labelPosition: c,
|
|
325
325
|
fieldOptions: e.fieldOptions,
|
|
326
326
|
onChange: n
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
}
|
|
330
330
|
),
|
|
331
|
-
"fileInBase64" in e.defaultValues && !((
|
|
331
|
+
"fileInBase64" in e.defaultValues && !((Q = (J = e.fieldOptions) == null ? void 0 : J.fileInBase64) != null && Q.hidden) && /* @__PURE__ */ o(xe, { children: [
|
|
332
332
|
/* @__PURE__ */ i(
|
|
333
|
-
|
|
333
|
+
u,
|
|
334
334
|
{
|
|
335
335
|
name: "fileInBase64",
|
|
336
|
-
control:
|
|
336
|
+
control: m,
|
|
337
337
|
render: ({ field: { onChange: t, value: n, ...d } }) => {
|
|
338
338
|
var a;
|
|
339
|
-
const r = (
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
const
|
|
344
|
-
t(
|
|
339
|
+
const r = (s) => {
|
|
340
|
+
if (s.target.files) {
|
|
341
|
+
const f = new FileReader();
|
|
342
|
+
f.onload = async (p) => {
|
|
343
|
+
const pe = p.target.result.split("base64,")[1];
|
|
344
|
+
t(pe);
|
|
345
345
|
};
|
|
346
|
-
const
|
|
347
|
-
T("originalFileName",
|
|
346
|
+
const b = s.target.files[0];
|
|
347
|
+
T("originalFileName", b.name), T("contentType", b.type), f.readAsDataURL(b);
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
350
|
return /* @__PURE__ */ i(
|
|
351
|
-
|
|
351
|
+
h,
|
|
352
352
|
{
|
|
353
|
-
condition:
|
|
354
|
-
wrapper: (
|
|
355
|
-
/* @__PURE__ */ i(
|
|
356
|
-
/* @__PURE__ */ i(l, { width: "68%", children:
|
|
353
|
+
condition: c === "left",
|
|
354
|
+
wrapper: (s) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
355
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "File to Upload" }),
|
|
356
|
+
/* @__PURE__ */ i(l, { width: "68%", children: s })
|
|
357
357
|
] }),
|
|
358
358
|
children: /* @__PURE__ */ o(l, { mb: 2, children: [
|
|
359
359
|
/* @__PURE__ */ i(
|
|
360
360
|
x,
|
|
361
361
|
{
|
|
362
362
|
type: "file",
|
|
363
|
-
label:
|
|
363
|
+
label: c === "default" ? "File to Upload" : void 0,
|
|
364
364
|
variant: e.inputVariant,
|
|
365
365
|
fullWidth: !0,
|
|
366
366
|
helperText: "Select a file to upload",
|
|
@@ -376,102 +376,102 @@ function Be(e, ce) {
|
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
!((
|
|
380
|
-
|
|
379
|
+
!((z = (Y = e.fieldOptions) == null ? void 0 : Y.redacted) != null && z.hidden) && /* @__PURE__ */ i(
|
|
380
|
+
h,
|
|
381
381
|
{
|
|
382
|
-
condition:
|
|
382
|
+
condition: c === "left",
|
|
383
383
|
wrapper: (t) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
384
|
-
/* @__PURE__ */ i(
|
|
384
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Redacted" }),
|
|
385
385
|
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
386
386
|
] }),
|
|
387
387
|
children: /* @__PURE__ */ o(l, { mb: 2, children: [
|
|
388
388
|
/* @__PURE__ */ i(
|
|
389
|
-
|
|
389
|
+
oe,
|
|
390
390
|
{
|
|
391
391
|
control: /* @__PURE__ */ i(
|
|
392
|
-
|
|
392
|
+
u,
|
|
393
393
|
{
|
|
394
394
|
name: "redacted",
|
|
395
|
-
control:
|
|
396
|
-
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(
|
|
395
|
+
control: m,
|
|
396
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(ce, { checked: !!t, ...n })
|
|
397
397
|
}
|
|
398
398
|
),
|
|
399
|
-
label:
|
|
399
|
+
label: c === "default" ? "Redacted" : void 0
|
|
400
400
|
}
|
|
401
401
|
),
|
|
402
|
-
e.fieldOptions && ((
|
|
402
|
+
e.fieldOptions && ((X = e.fieldOptions.redacted) == null ? void 0 : X.helperText)
|
|
403
403
|
] })
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
|
-
!((
|
|
407
|
-
|
|
406
|
+
!((ee = (Z = e.fieldOptions) == null ? void 0 : Z.contentEncrypted) != null && ee.hidden) && /* @__PURE__ */ i(
|
|
407
|
+
h,
|
|
408
408
|
{
|
|
409
|
-
condition:
|
|
409
|
+
condition: c === "left",
|
|
410
410
|
wrapper: (t) => /* @__PURE__ */ o(l, { display: "flex", alignItems: "center", children: [
|
|
411
|
-
/* @__PURE__ */ i(
|
|
411
|
+
/* @__PURE__ */ i(y, { width: "32%", children: "Content Encrypted" }),
|
|
412
412
|
/* @__PURE__ */ i(l, { width: "68%", children: t })
|
|
413
413
|
] }),
|
|
414
414
|
children: /* @__PURE__ */ o(l, { mb: 2, children: [
|
|
415
415
|
/* @__PURE__ */ i(
|
|
416
|
-
|
|
416
|
+
oe,
|
|
417
417
|
{
|
|
418
418
|
control: /* @__PURE__ */ i(
|
|
419
|
-
|
|
419
|
+
u,
|
|
420
420
|
{
|
|
421
421
|
name: "contentEncrypted",
|
|
422
|
-
control:
|
|
423
|
-
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(
|
|
422
|
+
control: m,
|
|
423
|
+
render: ({ field: { value: t, ...n } }) => /* @__PURE__ */ i(ce, { checked: !!t, ...n })
|
|
424
424
|
}
|
|
425
425
|
),
|
|
426
|
-
label:
|
|
426
|
+
label: c === "default" ? "Content Encrypted" : void 0
|
|
427
427
|
}
|
|
428
428
|
),
|
|
429
|
-
e.fieldOptions && ((
|
|
429
|
+
e.fieldOptions && ((te = e.fieldOptions.contentEncrypted) == null ? void 0 : te.helperText)
|
|
430
430
|
] })
|
|
431
431
|
}
|
|
432
432
|
)
|
|
433
433
|
] }),
|
|
434
|
-
!((
|
|
435
|
-
|
|
434
|
+
!((ne = (ie = e.fieldOptions) == null ? void 0 : ie.disseminationList) != null && ne.hidden) && /* @__PURE__ */ i(
|
|
435
|
+
u,
|
|
436
436
|
{
|
|
437
437
|
name: "disseminationList",
|
|
438
438
|
rules: {
|
|
439
439
|
required: !0
|
|
440
440
|
},
|
|
441
|
-
control:
|
|
441
|
+
control: m,
|
|
442
442
|
render: ({ field: { value: t, onChange: n }, fieldState: d }) => {
|
|
443
|
-
const r = t || [], a = (
|
|
444
|
-
n(
|
|
443
|
+
const r = t || [], a = (s) => {
|
|
444
|
+
n(s);
|
|
445
445
|
};
|
|
446
446
|
return /* @__PURE__ */ i(
|
|
447
|
-
|
|
447
|
+
Ee,
|
|
448
448
|
{
|
|
449
449
|
selectedIds: r,
|
|
450
450
|
memberedGroups: e.memberedGroups,
|
|
451
451
|
showError: !!d.error,
|
|
452
452
|
variant: e.inputVariant,
|
|
453
|
-
labelPosition:
|
|
453
|
+
labelPosition: c,
|
|
454
454
|
onChange: a
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
),
|
|
460
|
-
!((
|
|
461
|
-
|
|
460
|
+
!((ae = (le = e.fieldOptions) == null ? void 0 : le.securityLevelId) != null && ae.hidden) && /* @__PURE__ */ i(l, { mt: 2, children: /* @__PURE__ */ i(
|
|
461
|
+
u,
|
|
462
462
|
{
|
|
463
463
|
name: "securityLevelId",
|
|
464
464
|
rules: {
|
|
465
465
|
required: !0
|
|
466
466
|
},
|
|
467
|
-
control:
|
|
467
|
+
control: m,
|
|
468
468
|
render: ({ field: { value: t, onChange: n }, fieldState: d }) => {
|
|
469
|
-
var a,
|
|
470
|
-
const r = (
|
|
471
|
-
n(
|
|
469
|
+
var a, s;
|
|
470
|
+
const r = (f) => {
|
|
471
|
+
n(f);
|
|
472
472
|
};
|
|
473
473
|
return /* @__PURE__ */ i(
|
|
474
|
-
|
|
474
|
+
Pe,
|
|
475
475
|
{
|
|
476
476
|
value: t || 0,
|
|
477
477
|
ontologyId: e.ontologyId,
|
|
@@ -479,10 +479,10 @@ function Be(e, ce) {
|
|
|
479
479
|
securityLevels: e.securityLevels,
|
|
480
480
|
minLevelId: e.minSecurityLevel,
|
|
481
481
|
templateKeys: (a = e.securityLevelConfig) == null ? void 0 : a.templateKeys,
|
|
482
|
-
templateType: (
|
|
482
|
+
templateType: (s = e.securityLevelConfig) == null ? void 0 : s.templateType,
|
|
483
483
|
showError: !!d.error,
|
|
484
484
|
variant: e.inputVariant,
|
|
485
|
-
labelPosition:
|
|
485
|
+
labelPosition: c,
|
|
486
486
|
onChange: r
|
|
487
487
|
}
|
|
488
488
|
);
|
|
@@ -497,7 +497,7 @@ function Be(e, ce) {
|
|
|
497
497
|
variant: "text",
|
|
498
498
|
disabled: e.loading,
|
|
499
499
|
sx: { textTransform: "none" },
|
|
500
|
-
onClick:
|
|
500
|
+
onClick: be,
|
|
501
501
|
children: "Cancel"
|
|
502
502
|
}
|
|
503
503
|
),
|
|
@@ -546,7 +546,7 @@ function Be(e, ce) {
|
|
|
546
546
|
}
|
|
547
547
|
);
|
|
548
548
|
}
|
|
549
|
-
const
|
|
549
|
+
const ze = v.forwardRef(De);
|
|
550
550
|
export {
|
|
551
|
-
|
|
551
|
+
ze as InstanceForm
|
|
552
552
|
};
|
package/dist/main.d.ts
CHANGED