@hybridcore/ui 1.4.17 → 1.4.19
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 +105 -105
- package/dist/main.d.ts +9 -0
- package/dist/main.js +34 -31
- package/package.json +1 -1
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as Z } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { getNestedChildrenFromMap as
|
|
6
|
-
import { i as
|
|
7
|
-
import { ConditionalWrapper as
|
|
8
|
-
import { Container as
|
|
9
|
-
import { TextField as v, FormGroup as
|
|
10
|
-
import { TreeSelect as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { DisseminationList as
|
|
14
|
-
import { SecurityLevel as
|
|
15
|
-
const
|
|
3
|
+
import ee from "lodash";
|
|
4
|
+
import { useForm as te, Controller as s } from "react-hook-form";
|
|
5
|
+
import { getNestedChildrenFromMap as ne } from "../../utils/ontology.js";
|
|
6
|
+
import { i as ae, d as ie } from "../../utils-Bq0ye5vf.js";
|
|
7
|
+
import { ConditionalWrapper as le } from "../conditional-wrapper/index.js";
|
|
8
|
+
import { Container as re } from "../container/index.js";
|
|
9
|
+
import { TextField as v, FormGroup as de, FormControl as oe, InputLabel as se, Select as me, MenuItem as ce, FormControlLabel as K, Checkbox as U, Box as p, Button as g } from "@mui/material";
|
|
10
|
+
import { TreeSelect as ue } from "../tree-select/index.js";
|
|
11
|
+
import fe from "./components/policy-list/index.js";
|
|
12
|
+
import he from "./components/variables/index.js";
|
|
13
|
+
import { DisseminationList as ve } from "../data-security-selectors/dissemination-list/index.js";
|
|
14
|
+
import { SecurityLevel as be } from "../data-security-selectors/security-level/index.js";
|
|
15
|
+
const ye = {
|
|
16
16
|
alg: "A256GCM",
|
|
17
17
|
ext: !0,
|
|
18
18
|
k: "_El6rHQxC5E7NdO5DiMDITjF7f65wrlaJmFVagVE9Ic",
|
|
19
19
|
key_ops: ["encrypt", "decrypt"],
|
|
20
20
|
kty: "oct"
|
|
21
|
-
},
|
|
21
|
+
}, ge = [
|
|
22
22
|
"IMAGE",
|
|
23
23
|
"VIDEO",
|
|
24
24
|
"TEXT",
|
|
25
25
|
"BINARY",
|
|
26
26
|
"OTHER"
|
|
27
27
|
];
|
|
28
|
-
function
|
|
29
|
-
var L, V, S, E, F, k,
|
|
28
|
+
function Te(e, j) {
|
|
29
|
+
var L, V, S, E, F, k, O, R, w, B, _, A, D, P, W, M, N, G;
|
|
30
30
|
const {
|
|
31
31
|
register: C,
|
|
32
|
-
handleSubmit:
|
|
32
|
+
handleSubmit: q,
|
|
33
33
|
control: o,
|
|
34
|
-
formState: { errors:
|
|
34
|
+
formState: { errors: H },
|
|
35
35
|
getValues: I,
|
|
36
36
|
setValue: b,
|
|
37
|
-
reset:
|
|
38
|
-
} =
|
|
37
|
+
reset: Y
|
|
38
|
+
} = te({
|
|
39
39
|
defaultValues: e.defaultValues
|
|
40
|
-
}), [
|
|
40
|
+
}), [J, $] = m.useState([]), [y, x] = m.useState(), [pe, Q] = m.useState(0), X = m.useMemo(() => {
|
|
41
41
|
const t = [];
|
|
42
|
-
return e.mappedTemplates.forEach((
|
|
43
|
-
|
|
42
|
+
return e.mappedTemplates.forEach((a) => {
|
|
43
|
+
a.creatable || t.push(String(a.id));
|
|
44
44
|
}), t;
|
|
45
45
|
}, [e.mappedTemplates]);
|
|
46
46
|
m.useEffect(() => {
|
|
47
47
|
(async () => {
|
|
48
|
-
const t = { ...e.defaultValues },
|
|
49
|
-
if (
|
|
50
|
-
const r =
|
|
48
|
+
const t = { ...e.defaultValues }, a = e.mappedTemplates.get(t.templateId);
|
|
49
|
+
if (a) {
|
|
50
|
+
const r = a.properties.filter(
|
|
51
51
|
(i) => i.privacyPreservationMethod === "ENCRYPTION"
|
|
52
52
|
);
|
|
53
53
|
if (r.length > 0)
|
|
54
54
|
for (let i = 0; i < r.length; i++) {
|
|
55
|
-
const l = r[i], d =
|
|
55
|
+
const l = r[i], d = ee.get(t, `variables.${l.propertyId}`);
|
|
56
56
|
if (d && e.keyAuth) {
|
|
57
|
-
const c = await
|
|
58
|
-
u.data && (b(`variables.${l.propertyId}`, u.data),
|
|
57
|
+
const c = await ae(ye), u = await ie(c, d);
|
|
58
|
+
u.data && (b(`variables.${l.propertyId}`, u.data), Q((f) => f + 1));
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -64,25 +64,25 @@ function ve(e, N) {
|
|
|
64
64
|
const T = () => {
|
|
65
65
|
const t = I("templateId");
|
|
66
66
|
y && x(void 0);
|
|
67
|
-
const
|
|
68
|
-
|
|
67
|
+
const a = ne(e.mappedTemplates);
|
|
68
|
+
$(a);
|
|
69
69
|
for (const r of e.mappedTemplates.values())
|
|
70
70
|
if (r.id === t) {
|
|
71
71
|
x(r);
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
m.useImperativeHandle(
|
|
75
|
+
m.useImperativeHandle(j, () => ({
|
|
76
76
|
resetForm() {
|
|
77
|
-
|
|
77
|
+
Y({
|
|
78
78
|
title: "",
|
|
79
79
|
description: "",
|
|
80
80
|
templateId: 0,
|
|
81
81
|
variables: {}
|
|
82
82
|
}), T();
|
|
83
83
|
},
|
|
84
|
-
setFormValue(t,
|
|
85
|
-
b(t,
|
|
84
|
+
setFormValue(t, a) {
|
|
85
|
+
b(t, a);
|
|
86
86
|
},
|
|
87
87
|
getFormValue(t) {
|
|
88
88
|
return I(t);
|
|
@@ -91,18 +91,18 @@ function ve(e, N) {
|
|
|
91
91
|
}), [e.mappedTemplates]), m.useEffect(() => {
|
|
92
92
|
e.onSelectedTemplateChange && e.onSelectedTemplateChange(y);
|
|
93
93
|
}, [y]);
|
|
94
|
-
const
|
|
94
|
+
const z = () => {
|
|
95
95
|
if (e.onCancel) {
|
|
96
96
|
e.onCancel();
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
|
|
100
|
+
return /* @__PURE__ */ n(
|
|
101
|
+
le,
|
|
102
102
|
{
|
|
103
103
|
condition: e.variant === void 0 || e.variant === "inline",
|
|
104
|
-
wrapper: (t) => /* @__PURE__ */
|
|
105
|
-
|
|
104
|
+
wrapper: (t) => /* @__PURE__ */ n(
|
|
105
|
+
re,
|
|
106
106
|
{
|
|
107
107
|
disableHeader: !0,
|
|
108
108
|
sx: { position: "relative", overflow: "visible" },
|
|
@@ -112,10 +112,10 @@ function ve(e, N) {
|
|
|
112
112
|
children: /* @__PURE__ */ h(
|
|
113
113
|
"form",
|
|
114
114
|
{
|
|
115
|
-
onSubmit:
|
|
115
|
+
onSubmit: q(e.onSubmit),
|
|
116
116
|
style: { display: "flex", flexDirection: "column" },
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
!((V = (L = e.fieldOptions) == null ? void 0 : L.title) != null && V.hidden) && /* @__PURE__ */ n(
|
|
119
119
|
v,
|
|
120
120
|
{
|
|
121
121
|
label: "Title *",
|
|
@@ -123,13 +123,13 @@ function ve(e, N) {
|
|
|
123
123
|
fullWidth: !0,
|
|
124
124
|
sx: { mb: 2 },
|
|
125
125
|
...C("title", { required: !0 }),
|
|
126
|
-
...
|
|
126
|
+
...H.title && {
|
|
127
127
|
helperText: "This field is required!",
|
|
128
128
|
error: !0
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
!((E = (S = e.fieldOptions) == null ? void 0 : S.description) != null && E.hidden) && /* @__PURE__ */ n(
|
|
133
133
|
v,
|
|
134
134
|
{
|
|
135
135
|
label: "Description",
|
|
@@ -137,20 +137,20 @@ function ve(e, N) {
|
|
|
137
137
|
fullWidth: !0,
|
|
138
138
|
multiline: !0,
|
|
139
139
|
sx: { mb: 2 },
|
|
140
|
-
minRows: (
|
|
140
|
+
minRows: (k = (F = e.fieldOptions) == null ? void 0 : F.description) == null ? void 0 : k.minRows,
|
|
141
141
|
...C("description")
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
!((
|
|
144
|
+
!((R = (O = e.fieldOptions) == null ? void 0 : O.templateId) != null && R.hidden) && /* @__PURE__ */ n(de, { sx: { mb: 2 }, children: /* @__PURE__ */ n(
|
|
145
145
|
s,
|
|
146
146
|
{
|
|
147
147
|
name: "templateId",
|
|
148
148
|
control: o,
|
|
149
|
-
render: ({ field: { value: t, onChange:
|
|
149
|
+
render: ({ field: { value: t, onChange: a } }) => {
|
|
150
150
|
var r, i;
|
|
151
151
|
if ((i = (r = e.fieldOptions) == null ? void 0 : r.templateId) != null && i.disabled) {
|
|
152
152
|
const l = t ? e.mappedTemplates.get(t) : void 0;
|
|
153
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ n(
|
|
154
154
|
v,
|
|
155
155
|
{
|
|
156
156
|
label: "Template",
|
|
@@ -162,13 +162,13 @@ function ve(e, N) {
|
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
|
-
return /* @__PURE__ */
|
|
166
|
-
|
|
165
|
+
return /* @__PURE__ */ n(
|
|
166
|
+
ue,
|
|
167
167
|
{
|
|
168
168
|
label: "Template",
|
|
169
|
-
data:
|
|
169
|
+
data: J,
|
|
170
170
|
selected: t === 0 ? "" : [String(t)],
|
|
171
|
-
disabled:
|
|
171
|
+
disabled: X,
|
|
172
172
|
variant: e.inputVariant,
|
|
173
173
|
onChange: (l, d) => {
|
|
174
174
|
const c = {
|
|
@@ -176,28 +176,28 @@ function ve(e, N) {
|
|
|
176
176
|
value: d ? Number(l) : 0
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
|
|
179
|
+
a(c), T();
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
) }),
|
|
186
|
-
"aliasList" in e.defaultValues && !((
|
|
186
|
+
"aliasList" in e.defaultValues && !((B = (w = e.fieldOptions) == null ? void 0 : w.aliasList) != null && B.hidden) && /* @__PURE__ */ n(
|
|
187
187
|
s,
|
|
188
188
|
{
|
|
189
189
|
name: "aliasList",
|
|
190
190
|
control: o,
|
|
191
|
-
render: ({ field: { value: t, onChange:
|
|
191
|
+
render: ({ field: { value: t, onChange: a, ...r } }) => {
|
|
192
192
|
const i = (l) => {
|
|
193
193
|
const u = {
|
|
194
194
|
target: {
|
|
195
195
|
value: l.target.value.split(",").map((f) => f.trimStart())
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
|
|
198
|
+
a(u);
|
|
199
199
|
};
|
|
200
|
-
return /* @__PURE__ */
|
|
200
|
+
return /* @__PURE__ */ n(
|
|
201
201
|
v,
|
|
202
202
|
{
|
|
203
203
|
label: "Alias List",
|
|
@@ -213,46 +213,46 @@ function ve(e, N) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
),
|
|
216
|
-
"appliedPolicies" in e.defaultValues && !((
|
|
216
|
+
"appliedPolicies" in e.defaultValues && !((A = (_ = e.fieldOptions) == null ? void 0 : _.appliedPolicies) != null && A.hidden) && /* @__PURE__ */ n(
|
|
217
217
|
s,
|
|
218
218
|
{
|
|
219
219
|
name: "appliedPolicies",
|
|
220
220
|
control: o,
|
|
221
|
-
render: ({ field: { value: t, onChange:
|
|
222
|
-
|
|
221
|
+
render: ({ field: { value: t, onChange: a } }) => /* @__PURE__ */ n(
|
|
222
|
+
fe,
|
|
223
223
|
{
|
|
224
224
|
policyList: e.policyList,
|
|
225
225
|
value: t || void 0,
|
|
226
|
-
onChange:
|
|
226
|
+
onChange: a
|
|
227
227
|
}
|
|
228
228
|
)
|
|
229
229
|
}
|
|
230
230
|
),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ n(
|
|
232
232
|
s,
|
|
233
233
|
{
|
|
234
234
|
name: "variables",
|
|
235
235
|
control: o,
|
|
236
|
-
render: ({ field: { value: t, onChange:
|
|
237
|
-
|
|
236
|
+
render: ({ field: { value: t, onChange: a } }) => /* @__PURE__ */ n(
|
|
237
|
+
he,
|
|
238
238
|
{
|
|
239
239
|
template: y,
|
|
240
240
|
value: t,
|
|
241
241
|
mapboxAccessToken: e.mapboxAccessToken,
|
|
242
242
|
variant: e.inputVariant,
|
|
243
243
|
fieldOptions: e.fieldOptions,
|
|
244
|
-
onChange:
|
|
244
|
+
onChange: a
|
|
245
245
|
}
|
|
246
246
|
)
|
|
247
247
|
}
|
|
248
248
|
),
|
|
249
|
-
"fileInBase64" in e.defaultValues && !((
|
|
250
|
-
/* @__PURE__ */
|
|
249
|
+
"fileInBase64" in e.defaultValues && !((P = (D = e.fieldOptions) == null ? void 0 : D.fileInBase64) != null && P.hidden) && /* @__PURE__ */ h(Z, { children: [
|
|
250
|
+
/* @__PURE__ */ n(
|
|
251
251
|
s,
|
|
252
252
|
{
|
|
253
253
|
name: "fileInBase64",
|
|
254
254
|
control: o,
|
|
255
|
-
render: ({ field: { onChange: t, ...
|
|
255
|
+
render: ({ field: { onChange: t, ...a } }) => {
|
|
256
256
|
const r = (i) => {
|
|
257
257
|
if (i.target.files) {
|
|
258
258
|
const l = new FileReader();
|
|
@@ -264,7 +264,7 @@ function ve(e, N) {
|
|
|
264
264
|
b("originalFileName", d.name), b("contentType", d.type), l.readAsDataURL(d);
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
|
-
return /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ n(
|
|
268
268
|
v,
|
|
269
269
|
{
|
|
270
270
|
type: "file",
|
|
@@ -275,26 +275,26 @@ function ve(e, N) {
|
|
|
275
275
|
helperText: "Select a file to upload",
|
|
276
276
|
InputLabelProps: { shrink: !0 },
|
|
277
277
|
onChange: r,
|
|
278
|
-
...
|
|
278
|
+
...a
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
),
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ n(
|
|
285
285
|
s,
|
|
286
286
|
{
|
|
287
287
|
name: "type",
|
|
288
288
|
control: o,
|
|
289
|
-
render: ({ field: { value: t, onChange:
|
|
289
|
+
render: ({ field: { value: t, onChange: a } }) => {
|
|
290
290
|
const r = (i) => {
|
|
291
291
|
const {
|
|
292
292
|
target: { value: l }
|
|
293
293
|
} = i;
|
|
294
|
-
|
|
294
|
+
a(l);
|
|
295
295
|
};
|
|
296
296
|
return /* @__PURE__ */ h(
|
|
297
|
-
|
|
297
|
+
oe,
|
|
298
298
|
{
|
|
299
299
|
fullWidth: !0,
|
|
300
300
|
sx: {
|
|
@@ -302,13 +302,13 @@ function ve(e, N) {
|
|
|
302
302
|
},
|
|
303
303
|
variant: e.inputVariant,
|
|
304
304
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
|
|
305
|
+
/* @__PURE__ */ n(se, { children: "Type" }),
|
|
306
|
+
/* @__PURE__ */ n(
|
|
307
|
+
me,
|
|
308
308
|
{
|
|
309
309
|
value: t ? [t] : "",
|
|
310
310
|
onChange: r,
|
|
311
|
-
children:
|
|
311
|
+
children: ge.map((i) => /* @__PURE__ */ n(ce, { value: i, children: i }, i))
|
|
312
312
|
}
|
|
313
313
|
)
|
|
314
314
|
]
|
|
@@ -317,30 +317,30 @@ function ve(e, N) {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
|
|
320
|
+
/* @__PURE__ */ n(
|
|
321
|
+
K,
|
|
322
322
|
{
|
|
323
|
-
control: /* @__PURE__ */
|
|
323
|
+
control: /* @__PURE__ */ n(
|
|
324
324
|
s,
|
|
325
325
|
{
|
|
326
326
|
name: "redacted",
|
|
327
327
|
control: o,
|
|
328
|
-
render: ({ field: { value: t, ...
|
|
328
|
+
render: ({ field: { value: t, ...a } }) => /* @__PURE__ */ n(U, { checked: !!t, ...a })
|
|
329
329
|
}
|
|
330
330
|
),
|
|
331
331
|
label: "Redacted",
|
|
332
332
|
sx: { mb: 2 }
|
|
333
333
|
}
|
|
334
334
|
),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
|
|
335
|
+
/* @__PURE__ */ n(
|
|
336
|
+
K,
|
|
337
337
|
{
|
|
338
|
-
control: /* @__PURE__ */
|
|
338
|
+
control: /* @__PURE__ */ n(
|
|
339
339
|
s,
|
|
340
340
|
{
|
|
341
341
|
name: "contentEncrypted",
|
|
342
342
|
control: o,
|
|
343
|
-
render: ({ field: { value: t, ...
|
|
343
|
+
render: ({ field: { value: t, ...a } }) => /* @__PURE__ */ n(U, { checked: !!t, ...a })
|
|
344
344
|
}
|
|
345
345
|
),
|
|
346
346
|
label: "Content Encrypted",
|
|
@@ -348,7 +348,7 @@ function ve(e, N) {
|
|
|
348
348
|
}
|
|
349
349
|
)
|
|
350
350
|
] }),
|
|
351
|
-
!((
|
|
351
|
+
!((M = (W = e.fieldOptions) == null ? void 0 : W.disseminationList) != null && M.hidden) && /* @__PURE__ */ n(
|
|
352
352
|
s,
|
|
353
353
|
{
|
|
354
354
|
name: "disseminationList",
|
|
@@ -356,12 +356,12 @@ function ve(e, N) {
|
|
|
356
356
|
required: !0
|
|
357
357
|
},
|
|
358
358
|
control: o,
|
|
359
|
-
render: ({ field: { value: t, onChange:
|
|
359
|
+
render: ({ field: { value: t, onChange: a }, fieldState: r }) => {
|
|
360
360
|
const i = t || [], l = (d) => {
|
|
361
|
-
|
|
361
|
+
a(d);
|
|
362
362
|
};
|
|
363
|
-
return /* @__PURE__ */
|
|
364
|
-
|
|
363
|
+
return /* @__PURE__ */ n(
|
|
364
|
+
ve,
|
|
365
365
|
{
|
|
366
366
|
selectedIds: i,
|
|
367
367
|
memberedGroups: e.memberedGroups,
|
|
@@ -373,7 +373,7 @@ function ve(e, N) {
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
),
|
|
376
|
-
!((
|
|
376
|
+
!((G = (N = e.fieldOptions) == null ? void 0 : N.securityLevelId) != null && G.hidden) && /* @__PURE__ */ n(p, { mt: 2, children: /* @__PURE__ */ n(
|
|
377
377
|
s,
|
|
378
378
|
{
|
|
379
379
|
name: "securityLevelId",
|
|
@@ -381,13 +381,13 @@ function ve(e, N) {
|
|
|
381
381
|
required: !0
|
|
382
382
|
},
|
|
383
383
|
control: o,
|
|
384
|
-
render: ({ field: { value: t, onChange:
|
|
384
|
+
render: ({ field: { value: t, onChange: a }, fieldState: r }) => {
|
|
385
385
|
var l, d;
|
|
386
386
|
const i = (c) => {
|
|
387
|
-
|
|
387
|
+
a(c);
|
|
388
388
|
};
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
-
|
|
389
|
+
return /* @__PURE__ */ n(
|
|
390
|
+
be,
|
|
391
391
|
{
|
|
392
392
|
value: t || 0,
|
|
393
393
|
ontologyId: e.ontologyId,
|
|
@@ -405,19 +405,19 @@ function ve(e, N) {
|
|
|
405
405
|
}
|
|
406
406
|
) }),
|
|
407
407
|
/* @__PURE__ */ h(p, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
408
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ n(
|
|
409
409
|
g,
|
|
410
410
|
{
|
|
411
411
|
color: "primary",
|
|
412
412
|
variant: "text",
|
|
413
413
|
disabled: e.loading,
|
|
414
414
|
sx: { textTransform: "none" },
|
|
415
|
-
onClick:
|
|
415
|
+
onClick: z,
|
|
416
416
|
children: "Cancel"
|
|
417
417
|
}
|
|
418
418
|
),
|
|
419
419
|
/* @__PURE__ */ h(p, { children: [
|
|
420
|
-
e.onRemove !== void 0 && /* @__PURE__ */
|
|
420
|
+
e.onRemove !== void 0 && /* @__PURE__ */ n(
|
|
421
421
|
g,
|
|
422
422
|
{
|
|
423
423
|
type: "button",
|
|
@@ -429,7 +429,7 @@ function ve(e, N) {
|
|
|
429
429
|
children: e.removeLoading ? "Deleting..." : "Delete"
|
|
430
430
|
}
|
|
431
431
|
),
|
|
432
|
-
e.saveButtons ? e.saveButtons.map((t,
|
|
432
|
+
e.saveButtons ? e.saveButtons.map((t, a) => /* @__PURE__ */ n(
|
|
433
433
|
g,
|
|
434
434
|
{
|
|
435
435
|
type: "submit",
|
|
@@ -441,8 +441,8 @@ function ve(e, N) {
|
|
|
441
441
|
onClick: t.onClick,
|
|
442
442
|
children: t.label
|
|
443
443
|
},
|
|
444
|
-
|
|
445
|
-
)) : /* @__PURE__ */
|
|
444
|
+
a
|
|
445
|
+
)) : /* @__PURE__ */ n(
|
|
446
446
|
g,
|
|
447
447
|
{
|
|
448
448
|
type: "submit",
|
|
@@ -461,7 +461,7 @@ function ve(e, N) {
|
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const Ae = m.forwardRef(Te);
|
|
465
465
|
export {
|
|
466
|
-
|
|
466
|
+
Ae as InstanceForm
|
|
467
467
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
|
2
2
|
import { BoxProps } from '@mui/material';
|
|
3
3
|
import { Collection } from 'ol';
|
|
4
4
|
import { Coordinate } from 'ol/coordinate';
|
|
5
|
+
import { createTheme } from '@mui/material';
|
|
5
6
|
import { Dayjs } from 'dayjs';
|
|
6
7
|
import { default as default_2 } from 'react';
|
|
7
8
|
import { default as default_3 } from 'ol/layer/Layer';
|
|
@@ -23,6 +24,8 @@ import { Size } from 'ol/size';
|
|
|
23
24
|
import { SxProps } from '@mui/material';
|
|
24
25
|
import { SxProps as SxProps_2 } from '@mui/material/styles';
|
|
25
26
|
import { Theme } from '@mui/material/styles';
|
|
27
|
+
import { ThemeOptions } from '@mui/material';
|
|
28
|
+
import { ThemeProvider } from '@mui/material';
|
|
26
29
|
import { View } from 'ol';
|
|
27
30
|
|
|
28
31
|
export declare function Access<T extends string>({ pagePath, feature, appRoles, fallback, loading, children, }: Props<T>): string | number | true | Iterable<ReactNode> | JSX_2.Element | null;
|
|
@@ -144,6 +147,8 @@ declare interface ContainerProps {
|
|
|
144
147
|
|
|
145
148
|
export declare const ContextMenu: React.FC<Props_3>;
|
|
146
149
|
|
|
150
|
+
export { createTheme }
|
|
151
|
+
|
|
147
152
|
declare interface DataType extends ItemProps {
|
|
148
153
|
idKey?: string;
|
|
149
154
|
children?: DataType[];
|
|
@@ -837,6 +842,10 @@ K extends
|
|
|
837
842
|
|
|
838
843
|
export declare const TemplatePropertyFilters: FC<Props_10>;
|
|
839
844
|
|
|
845
|
+
export { ThemeOptions }
|
|
846
|
+
|
|
847
|
+
export { ThemeProvider }
|
|
848
|
+
|
|
840
849
|
export declare const TreeSelect: FC<TreeSelectProps>;
|
|
841
850
|
|
|
842
851
|
declare interface TreeSelectProps {
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Access as Ht } from "./components/access/index.js";
|
|
2
2
|
import { alert as Ft, confirm as Ct } from "./components/confirm/index.js";
|
|
3
3
|
import { Card as jt } from "./components/card/index.js";
|
|
4
|
-
import { CollapsibleCard as
|
|
4
|
+
import { CollapsibleCard as $t } from "./components/collapsible-card/index.js";
|
|
5
5
|
import { ConditionalWrapper as Et } from "./components/conditional-wrapper/index.js";
|
|
6
6
|
import { Container as zt } from "./components/container/index.js";
|
|
7
7
|
import { ContextMenu as Nt } from "./components/context-menu/index.js";
|
|
@@ -20,11 +20,12 @@ import { SearchInput as le } from "./components/search-input/index.js";
|
|
|
20
20
|
import { SecurityLevel as ye } from "./components/data-security-selectors/security-level/index.js";
|
|
21
21
|
import { TemplateForm as De } from "./components/template-form/index.js";
|
|
22
22
|
import { TemplatePropertyFilters as xe } from "./components/template-property-filters/index.js";
|
|
23
|
-
import { TreeSelect as
|
|
24
|
-
import { TreeViewFilter as
|
|
23
|
+
import { TreeSelect as Te } from "./components/tree-select/index.js";
|
|
24
|
+
import { TreeViewFilter as we } from "./components/treeview-filter/index.js";
|
|
25
25
|
import { S as ve } from "./utils-Bq0ye5vf.js";
|
|
26
26
|
import { i as Se } from "./index-DlnzUkwe.js";
|
|
27
27
|
import { h as be } from "./helpers-B4UL9NMD.js";
|
|
28
|
+
import { ThemeProvider as Be, createTheme as Fe } from "@mui/material";
|
|
28
29
|
import { _ as dt } from "./objectWithoutPropertiesLoose-BK36oJDi.js";
|
|
29
30
|
import C from "dayjs";
|
|
30
31
|
import { c as U, g as z } from "./createStyled-BzvgQjjR.js";
|
|
@@ -114,56 +115,56 @@ var et = { exports: {} };
|
|
|
114
115
|
function B(r) {
|
|
115
116
|
var h, d;
|
|
116
117
|
h = r, d = n && n.formats;
|
|
117
|
-
for (var u = (r = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S,
|
|
118
|
+
for (var u = (r = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, w, M) {
|
|
118
119
|
var y = M && M.toUpperCase();
|
|
119
|
-
return
|
|
120
|
+
return w || d[M] || f[M] || d[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, v, A) {
|
|
120
121
|
return v || A.slice(1);
|
|
121
122
|
});
|
|
122
123
|
})).match(c), x = u.length, Y = 0; Y < x; Y += 1) {
|
|
123
|
-
var I = u[Y], O = Z[I],
|
|
124
|
-
u[Y] =
|
|
124
|
+
var I = u[Y], O = Z[I], T = O && O[0], L = O && O[1];
|
|
125
|
+
u[Y] = L ? { regex: T, parser: L } : I.replace(/^\[|\]$/g, "");
|
|
125
126
|
}
|
|
126
127
|
return function(S) {
|
|
127
|
-
for (var
|
|
128
|
+
for (var w = {}, M = 0, y = 0; M < x; M += 1) {
|
|
128
129
|
var k = u[M];
|
|
129
130
|
if (typeof k == "string") y += k.length;
|
|
130
131
|
else {
|
|
131
132
|
var v = k.regex, A = k.parser, j = S.slice(y), F = v.exec(j)[0];
|
|
132
|
-
A.call(
|
|
133
|
+
A.call(w, F), S = S.replace(F, "");
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
return function(b) {
|
|
136
|
-
var
|
|
137
|
-
if (
|
|
137
|
+
var P = b.afternoon;
|
|
138
|
+
if (P !== void 0) {
|
|
138
139
|
var m = b.hours;
|
|
139
|
-
|
|
140
|
+
P ? m < 12 && (b.hours += 12) : m === 12 && (b.hours = 0), delete b.afternoon;
|
|
140
141
|
}
|
|
141
|
-
}(
|
|
142
|
+
}(w), w;
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
145
|
return function(r, h, d) {
|
|
145
146
|
d.p.customParseFormat = !0, r && r.parseTwoDigitYear && (i = r.parseTwoDigitYear);
|
|
146
147
|
var u = h.prototype, x = u.parse;
|
|
147
148
|
u.parse = function(Y) {
|
|
148
|
-
var I = Y.date, O = Y.utc,
|
|
149
|
+
var I = Y.date, O = Y.utc, T = Y.args;
|
|
149
150
|
this.$u = O;
|
|
150
|
-
var
|
|
151
|
-
if (typeof
|
|
152
|
-
var S =
|
|
153
|
-
|
|
151
|
+
var L = T[1];
|
|
152
|
+
if (typeof L == "string") {
|
|
153
|
+
var S = T[2] === !0, w = T[3] === !0, M = S || w, y = T[2];
|
|
154
|
+
w && (y = T[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(j, F, b, P) {
|
|
154
155
|
try {
|
|
155
156
|
if (["x", "X"].indexOf(F) > -1) return new Date((F === "X" ? 1e3 : 1) * j);
|
|
156
|
-
var m = B(F)(j), N = m.year,
|
|
157
|
-
N &&
|
|
157
|
+
var m = B(F)(j), N = m.year, $ = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), _ = nt || (N || $ ? 1 : J.getDate()), V = N || J.getFullYear(), W = 0;
|
|
158
|
+
N && !$ || (W = $ > 0 ? $ - 1 : J.getMonth());
|
|
158
159
|
var E, q = ot || 0, G = at || 0, K = it || 0, Q = ht || 0;
|
|
159
|
-
return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E =
|
|
160
|
+
return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E = P(E).week(X).toDate()), E);
|
|
160
161
|
} catch {
|
|
161
162
|
return /* @__PURE__ */ new Date("");
|
|
162
163
|
}
|
|
163
|
-
}(I,
|
|
164
|
-
} else if (
|
|
165
|
-
|
|
166
|
-
var A = d.apply(this,
|
|
164
|
+
}(I, L, O, d), this.init(), y && y !== !0 && (this.$L = this.locale(y).$L), M && I != this.format(L) && (this.$d = /* @__PURE__ */ new Date("")), n = {};
|
|
165
|
+
} else if (L instanceof Array) for (var k = L.length, v = 1; v <= k; v += 1) {
|
|
166
|
+
T[1] = L[v - 1];
|
|
167
|
+
var A = d.apply(this, T);
|
|
167
168
|
if (A.isValid()) {
|
|
168
169
|
this.$d = A.$d, this.$L = A.$L, this.init();
|
|
169
170
|
break;
|
|
@@ -330,7 +331,7 @@ const gt = ut(["Your locale has not been found.", "Either the locale key is not
|
|
|
330
331
|
keyboardDateTime: "L LT",
|
|
331
332
|
keyboardDateTime12h: "L hh:mm A",
|
|
332
333
|
keyboardDateTime24h: "L HH:mm"
|
|
333
|
-
},
|
|
334
|
+
}, Tt = (l, D) => D ? (...f) => l(...f).locale(D) : l;
|
|
334
335
|
class St {
|
|
335
336
|
constructor({
|
|
336
337
|
locale: D,
|
|
@@ -376,7 +377,7 @@ class St {
|
|
|
376
377
|
for (; i.isBefore(o); )
|
|
377
378
|
n.push(i), i = i.add(1, "year");
|
|
378
379
|
return n;
|
|
379
|
-
}, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || C, this.dayjs =
|
|
380
|
+
}, this.getMeridiemText = (t) => t === "am" ? "AM" : "PM", this.rawDayJsInstance = c || C, this.dayjs = Tt(this.rawDayJsInstance, D), this.locale = D, this.formats = dt({}, Yt, f), C.extend(ft);
|
|
380
381
|
}
|
|
381
382
|
}
|
|
382
383
|
export {
|
|
@@ -384,7 +385,7 @@ export {
|
|
|
384
385
|
be as AccessUtils,
|
|
385
386
|
St as AdapterDayjs,
|
|
386
387
|
jt as Card,
|
|
387
|
-
|
|
388
|
+
$t as CollapsibleCard,
|
|
388
389
|
Et as ConditionalWrapper,
|
|
389
390
|
zt as Container,
|
|
390
391
|
Nt as ContextMenu,
|
|
@@ -405,8 +406,10 @@ export {
|
|
|
405
406
|
ye as SecurityLevel,
|
|
406
407
|
De as TemplateForm,
|
|
407
408
|
xe as TemplatePropertyFilters,
|
|
408
|
-
|
|
409
|
-
Te as
|
|
409
|
+
Be as ThemeProvider,
|
|
410
|
+
Te as TreeSelect,
|
|
411
|
+
we as TreeViewFilter,
|
|
410
412
|
Ft as alert,
|
|
411
|
-
Ct as confirm
|
|
413
|
+
Ct as confirm,
|
|
414
|
+
Fe as createTheme
|
|
412
415
|
};
|