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