@hybridcore/ui 1.4.19 → 1.4.20
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/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/property-mapping/index.js +1 -1
- package/dist/{index-V39OBeR0.js → index-BGS3q6sP.js} +53 -50
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import "@mui/material";
|
|
|
3
3
|
import "./styled.js";
|
|
4
4
|
import "@mui/icons-material";
|
|
5
5
|
import "../../../../hooks/useToggle.js";
|
|
6
|
-
import { C as l } from "../../../../index-
|
|
6
|
+
import { C as l } from "../../../../index-BGS3q6sP.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "lodash";
|
|
9
9
|
import "dayjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "lodash";
|
|
3
3
|
import "dayjs";
|
|
4
|
-
import { V as g } from "../../../../index-
|
|
4
|
+
import { V as g } from "../../../../index-BGS3q6sP.js";
|
|
5
5
|
import "@mui/material";
|
|
6
6
|
import "@mui/icons-material";
|
|
7
7
|
import "../../../geometry-picker/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, Fragment as h } from "react/jsx-runtime";
|
|
2
2
|
import p from "react";
|
|
3
|
-
import { V as x } from "../../../../index-
|
|
3
|
+
import { V as x } from "../../../../index-BGS3q6sP.js";
|
|
4
4
|
import _ from "lodash";
|
|
5
5
|
import { Box as d } from "@mui/material";
|
|
6
6
|
function V({
|
|
@@ -5,7 +5,7 @@ import { DataGrid as fe } from "@mui/x-data-grid";
|
|
|
5
5
|
import { useState as H, useEffect as ue } from "react";
|
|
6
6
|
import h from "lodash";
|
|
7
7
|
import { e as ye } from "../../ol-CHaVTXvL.js";
|
|
8
|
-
import { V as he } from "../../index-
|
|
8
|
+
import { V as he } from "../../index-BGS3q6sP.js";
|
|
9
9
|
import { RangeSelector as me } from "../range-selector/index.js";
|
|
10
10
|
const $e = ({
|
|
11
11
|
open: F,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as h, Fragment as D, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import I from "lodash";
|
|
3
|
-
import
|
|
4
|
-
import { FormControl as
|
|
5
|
-
import { Container as
|
|
3
|
+
import B from "dayjs";
|
|
4
|
+
import { FormControl as N, FormLabel as W, FormGroup as j, FormControlLabel as Y, Checkbox as $, Typography as P, Button as L, Chip as v, Dialog as O, DialogTitle as _, DialogContent as E, DialogActions as G, InputAdornment as M, Tooltip as H } from "@mui/material";
|
|
5
|
+
import { Container as K, Values as R, MiniButton as U } from "./components/instance-form/components/composite-list/styled.js";
|
|
6
6
|
import { KeyboardArrowUp as J, KeyboardArrowDown as Q, Add as X, LockOutlined as Z } from "@mui/icons-material";
|
|
7
7
|
import z from "./hooks/useToggle.js";
|
|
8
8
|
import { GeometryPicker as ee } from "./components/geometry-picker/index.js";
|
|
@@ -15,47 +15,47 @@ import { C as ae } from "./Checkbox-qy3cjvnb.js";
|
|
|
15
15
|
import { F as oe, I as ie } from "./InputLabel-CWkW8NtU.js";
|
|
16
16
|
import { S as de } from "./Select-ClaBvSqf.js";
|
|
17
17
|
import { M as me } from "./MenuItem-D-INSvZa.js";
|
|
18
|
-
import { useState as
|
|
18
|
+
import { useState as q } from "react";
|
|
19
19
|
function ce({
|
|
20
20
|
property: i,
|
|
21
21
|
mapboxAccessToken: e,
|
|
22
22
|
value: l,
|
|
23
|
-
variant:
|
|
23
|
+
variant: s = "outlined",
|
|
24
24
|
size: m = "medium",
|
|
25
25
|
onChange: d
|
|
26
26
|
}) {
|
|
27
27
|
var g, V, t;
|
|
28
|
-
const f = z(!1), [c,
|
|
29
|
-
|
|
28
|
+
const f = z(!1), [c, x] = q(), [C, w] = q(!1), k = 10, A = (a) => {
|
|
29
|
+
x(I.get(a, i.propertyId));
|
|
30
30
|
}, y = () => {
|
|
31
|
-
d([...l || [], c]),
|
|
31
|
+
d([...l || [], c]), x(""), f.action.close();
|
|
32
32
|
}, F = (a) => () => {
|
|
33
33
|
if (l) {
|
|
34
34
|
const o = [...l];
|
|
35
35
|
o.splice(a, 1), d(o);
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
const { value: o, checked:
|
|
37
|
+
}, p = (a) => {
|
|
38
|
+
const { value: o, checked: r } = a.target;
|
|
39
39
|
let u = I.isArray(l) ? l : [];
|
|
40
|
-
|
|
40
|
+
r ? u.push(o) : u = u.filter((b) => b !== o), d(u);
|
|
41
41
|
};
|
|
42
42
|
if (((V = (g = i.dataTypeInfo) == null ? void 0 : g.innerType) == null ? void 0 : V.type) === "enum") {
|
|
43
43
|
const { enumValues: a } = i.dataTypeInfo.innerType;
|
|
44
44
|
return /* @__PURE__ */ h(D, { children: [
|
|
45
|
-
/* @__PURE__ */ h(
|
|
46
|
-
/* @__PURE__ */ n(
|
|
47
|
-
/* @__PURE__ */ n(
|
|
48
|
-
|
|
45
|
+
/* @__PURE__ */ h(N, { fullWidth: !0, component: "fieldset", variant: s, children: [
|
|
46
|
+
/* @__PURE__ */ n(W, { component: "legend", sx: { mb: 1 }, children: i.name }),
|
|
47
|
+
/* @__PURE__ */ n(j, { children: a && a.length > 0 ? a.slice(0, C ? 9999 : k).map((o, r) => /* @__PURE__ */ n(
|
|
48
|
+
Y,
|
|
49
49
|
{
|
|
50
50
|
label: o,
|
|
51
51
|
control: /* @__PURE__ */ n(
|
|
52
|
-
|
|
52
|
+
$,
|
|
53
53
|
{
|
|
54
54
|
name: i.propertyId,
|
|
55
55
|
value: o,
|
|
56
56
|
size: "small",
|
|
57
57
|
checked: I.isArray(l) ? l.includes(o) : !1,
|
|
58
|
-
onChange:
|
|
58
|
+
onChange: p
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
componentsProps: {
|
|
@@ -64,10 +64,10 @@ function ce({
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
r
|
|
68
68
|
)) : /* @__PURE__ */ n(P, { variant: "caption", mb: 1, children: "No enum values!" }) })
|
|
69
69
|
] }),
|
|
70
|
-
I.isArray(a) && a.length >
|
|
70
|
+
I.isArray(a) && a.length > k && /* @__PURE__ */ h(
|
|
71
71
|
L,
|
|
72
72
|
{
|
|
73
73
|
size: "small",
|
|
@@ -83,14 +83,14 @@ function ce({
|
|
|
83
83
|
] });
|
|
84
84
|
}
|
|
85
85
|
return /* @__PURE__ */ h(D, { children: [
|
|
86
|
-
/* @__PURE__ */ h(
|
|
86
|
+
/* @__PURE__ */ h(K, { variant: s, children: [
|
|
87
87
|
/* @__PURE__ */ n(P, { children: i.name }),
|
|
88
|
-
/* @__PURE__ */ n(
|
|
89
|
-
var
|
|
88
|
+
/* @__PURE__ */ n(R, { children: I.isArray(l) && l.map((a, o) => {
|
|
89
|
+
var r, u;
|
|
90
90
|
return /* @__PURE__ */ n(
|
|
91
|
-
|
|
91
|
+
v,
|
|
92
92
|
{
|
|
93
|
-
label: ((u = (
|
|
93
|
+
label: ((u = (r = i.dataTypeInfo) == null ? void 0 : r.innerType) == null ? void 0 : u.type) === "date" ? B(a).format("DD/MM/YYYY HH:mm:ss") : a,
|
|
94
94
|
size: m,
|
|
95
95
|
onDelete: F(o)
|
|
96
96
|
},
|
|
@@ -98,7 +98,7 @@ function ce({
|
|
|
98
98
|
);
|
|
99
99
|
}) }),
|
|
100
100
|
/* @__PURE__ */ n(
|
|
101
|
-
|
|
101
|
+
U,
|
|
102
102
|
{
|
|
103
103
|
startIcon: /* @__PURE__ */ n(X, {}),
|
|
104
104
|
variant: "text",
|
|
@@ -108,16 +108,16 @@ function ce({
|
|
|
108
108
|
)
|
|
109
109
|
] }),
|
|
110
110
|
/* @__PURE__ */ h(
|
|
111
|
-
|
|
111
|
+
O,
|
|
112
112
|
{
|
|
113
113
|
open: f.state.isOpen,
|
|
114
114
|
onClose: f.action.close,
|
|
115
115
|
maxWidth: "sm",
|
|
116
116
|
fullWidth: !0,
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */ n(
|
|
119
|
-
/* @__PURE__ */ n(
|
|
120
|
-
|
|
118
|
+
/* @__PURE__ */ n(_, { children: "Add List Value" }),
|
|
119
|
+
/* @__PURE__ */ n(E, { children: (t = i.dataTypeInfo) != null && t.innerType ? /* @__PURE__ */ n(
|
|
120
|
+
re,
|
|
121
121
|
{
|
|
122
122
|
mapboxAccessToken: e,
|
|
123
123
|
property: {
|
|
@@ -129,7 +129,7 @@ function ce({
|
|
|
129
129
|
onChange: A
|
|
130
130
|
}
|
|
131
131
|
) : null }),
|
|
132
|
-
/* @__PURE__ */ h(
|
|
132
|
+
/* @__PURE__ */ h(G, { children: [
|
|
133
133
|
/* @__PURE__ */ n(
|
|
134
134
|
L,
|
|
135
135
|
{
|
|
@@ -146,34 +146,34 @@ function ce({
|
|
|
146
146
|
)
|
|
147
147
|
] });
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function re({
|
|
150
150
|
mapboxAccessToken: i,
|
|
151
151
|
property: e,
|
|
152
152
|
value: l,
|
|
153
|
-
variant:
|
|
153
|
+
variant: s = "standard",
|
|
154
154
|
size: m = "medium",
|
|
155
155
|
disableMargin: d = !1,
|
|
156
156
|
defaultExtent: f,
|
|
157
157
|
// keyAuth,
|
|
158
158
|
onChange: c
|
|
159
159
|
}) {
|
|
160
|
-
var
|
|
161
|
-
const
|
|
162
|
-
const o = t.target.value.split(",").map((
|
|
160
|
+
var p, g, V;
|
|
161
|
+
const x = (t) => {
|
|
162
|
+
const o = t.target.value.split(",").map((r) => r.trimStart());
|
|
163
163
|
c({
|
|
164
164
|
[e.propertyId]: o
|
|
165
165
|
});
|
|
166
166
|
}, C = (t) => {
|
|
167
|
-
const { name: a, type: o, checked:
|
|
167
|
+
const { name: a, type: o, checked: r, value: u } = t.target;
|
|
168
168
|
let b = u;
|
|
169
169
|
e.type === "double" && (b = b.replace(",", "."), b = b.replace(/[^\d.-]+/g, "")), c({
|
|
170
|
-
[a]: o === "checkbox" ?
|
|
170
|
+
[a]: o === "checkbox" ? r : b
|
|
171
171
|
});
|
|
172
172
|
}, w = (t) => {
|
|
173
173
|
c({
|
|
174
174
|
[e.propertyId]: t
|
|
175
175
|
});
|
|
176
|
-
},
|
|
176
|
+
}, k = (t) => {
|
|
177
177
|
c({
|
|
178
178
|
[e.propertyId]: t.target.value
|
|
179
179
|
});
|
|
@@ -204,10 +204,11 @@ function se({
|
|
|
204
204
|
{
|
|
205
205
|
label: e.name,
|
|
206
206
|
name: e.propertyId,
|
|
207
|
+
required: e.required,
|
|
207
208
|
value: l ?? e.defaultValue ?? "",
|
|
208
209
|
defaultValue: l,
|
|
209
210
|
onChange: C,
|
|
210
|
-
variant:
|
|
211
|
+
variant: s,
|
|
211
212
|
type: "text",
|
|
212
213
|
multiline: e.type === "text",
|
|
213
214
|
disabled: !e.editable,
|
|
@@ -216,19 +217,19 @@ function se({
|
|
|
216
217
|
InputProps: {
|
|
217
218
|
size: m,
|
|
218
219
|
...e.privacyPreservationMethod === "ENCRYPTION" ? {
|
|
219
|
-
endAdornment: /* @__PURE__ */ n(
|
|
220
|
+
endAdornment: /* @__PURE__ */ n(M, { position: "end", children: /* @__PURE__ */ n(H, { title: "Encrypted Field", children: /* @__PURE__ */ n(Z, {}) }) })
|
|
220
221
|
} : {}
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
);
|
|
224
225
|
if (e.type === "date") {
|
|
225
|
-
const t = l !== void 0 ?
|
|
226
|
+
const t = l !== void 0 ? B(l).format() : l;
|
|
226
227
|
return /* @__PURE__ */ n(T, { mb: d ? 0 : 2, children: /* @__PURE__ */ n(
|
|
227
228
|
le,
|
|
228
229
|
{
|
|
229
230
|
label: e.name,
|
|
230
231
|
value: t,
|
|
231
|
-
variant:
|
|
232
|
+
variant: s,
|
|
232
233
|
size: m,
|
|
233
234
|
name: e.propertyId,
|
|
234
235
|
onChange: w
|
|
@@ -243,9 +244,10 @@ function se({
|
|
|
243
244
|
label: e.name,
|
|
244
245
|
name: e.propertyId,
|
|
245
246
|
value: t,
|
|
246
|
-
onChange:
|
|
247
|
-
variant:
|
|
247
|
+
onChange: x,
|
|
248
|
+
variant: s,
|
|
248
249
|
disabled: !e.editable,
|
|
250
|
+
required: e.required,
|
|
249
251
|
fullWidth: !0,
|
|
250
252
|
helperText: m === "small" ? null : "Add list values with the comma (,) separated string",
|
|
251
253
|
sx: { mb: d ? 0 : 2 },
|
|
@@ -274,13 +276,14 @@ function se({
|
|
|
274
276
|
) });
|
|
275
277
|
if (e.type === "enum") {
|
|
276
278
|
let t = [];
|
|
277
|
-
return (
|
|
279
|
+
return (p = e.dataTypeInfo) != null && p.enumValues && (t = e.dataTypeInfo.enumValues), (V = (g = e.dataTypeInfo) == null ? void 0 : g.innerType) != null && V.enumValues && (t = e.dataTypeInfo.innerType.enumValues), /* @__PURE__ */ h(
|
|
278
280
|
oe,
|
|
279
281
|
{
|
|
280
282
|
fullWidth: !0,
|
|
281
|
-
variant:
|
|
283
|
+
variant: s,
|
|
282
284
|
sx: { mb: d ? 0 : 2 },
|
|
283
285
|
size: m,
|
|
286
|
+
required: e.required,
|
|
284
287
|
children: [
|
|
285
288
|
/* @__PURE__ */ n(ie, { id: `${e.propertyId}-label`, children: e.name }),
|
|
286
289
|
/* @__PURE__ */ n(
|
|
@@ -291,7 +294,7 @@ function se({
|
|
|
291
294
|
labelId: `${e.propertyId}-label`,
|
|
292
295
|
id: e.propertyId,
|
|
293
296
|
value: l ?? "",
|
|
294
|
-
onChange:
|
|
297
|
+
onChange: k,
|
|
295
298
|
children: t.map((a, o) => /* @__PURE__ */ n(me, { value: a, children: a }, o))
|
|
296
299
|
}
|
|
297
300
|
)
|
|
@@ -306,7 +309,7 @@ function se({
|
|
|
306
309
|
label: e.name,
|
|
307
310
|
value: l ?? e.defaultValue ?? "",
|
|
308
311
|
defaultExtent: f,
|
|
309
|
-
variant:
|
|
312
|
+
variant: s,
|
|
310
313
|
onChange: A(e.propertyId)
|
|
311
314
|
}
|
|
312
315
|
) }) : e.type === "phone-number" ? /* @__PURE__ */ n(T, { sx: { mb: d ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ n(
|
|
@@ -322,7 +325,7 @@ function se({
|
|
|
322
325
|
{
|
|
323
326
|
property: e,
|
|
324
327
|
value: l ?? e.defaultValue ?? "",
|
|
325
|
-
variant:
|
|
328
|
+
variant: s,
|
|
326
329
|
size: m,
|
|
327
330
|
mapboxAccessToken: i,
|
|
328
331
|
onChange: F(e.propertyId)
|
|
@@ -331,5 +334,5 @@ function se({
|
|
|
331
334
|
}
|
|
332
335
|
export {
|
|
333
336
|
ce as C,
|
|
334
|
-
|
|
337
|
+
re as V
|
|
335
338
|
};
|