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