@hybridcore/ui 1.5.1 → 1.5.3
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/confirm/dialog.js +1 -1
- package/dist/components/confirm/index.js +1 -1
- 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/components/template-form/components/property-list/index.js +1 -1
- package/dist/components/template-form/components/recognition-property-list/index.js +1 -1
- package/dist/{dialog-DrVArHYg.js → dialog-BDt1r9fh.js} +5 -4
- package/dist/{index-D2tF2-ya.js → index-JgBxaIU2.js} +55 -52
- package/dist/main.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import "react-confirm";
|
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@mui/icons-material";
|
|
5
5
|
import "../../DialogContent-CtA2aNum.js";
|
|
6
|
-
import { a as f } from "../../dialog-
|
|
6
|
+
import { a as f } from "../../dialog-BDt1r9fh.js";
|
|
7
7
|
import "../../Button-jy67CcTH.js";
|
|
8
8
|
export {
|
|
9
9
|
f as default
|
|
@@ -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-JgBxaIU2.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-JgBxaIU2.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-JgBxaIU2.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-9hySGI6D.js";
|
|
8
|
-
import { V as he } from "../../index-
|
|
8
|
+
import { V as he } from "../../index-JgBxaIU2.js";
|
|
9
9
|
import { RangeSelector as me } from "../range-selector/index.js";
|
|
10
10
|
const $e = ({
|
|
11
11
|
open: F,
|
|
@@ -8,7 +8,7 @@ import { B as f } from "../../../../Box-SSMZuKnS.js";
|
|
|
8
8
|
import { T as y } from "../../../../Typography-CLq43OVQ.js";
|
|
9
9
|
import { B as h } from "../../../../Button-jy67CcTH.js";
|
|
10
10
|
import { D as g, a as b } from "../../../../DialogContent-CtA2aNum.js";
|
|
11
|
-
import { D } from "../../../../dialog-
|
|
11
|
+
import { D } from "../../../../dialog-BDt1r9fh.js";
|
|
12
12
|
function v(t) {
|
|
13
13
|
var a;
|
|
14
14
|
const { state: o, action: r } = u(t);
|
|
@@ -8,7 +8,7 @@ import { B as g } from "../../../../Box-SSMZuKnS.js";
|
|
|
8
8
|
import { T as u } from "../../../../Typography-CLq43OVQ.js";
|
|
9
9
|
import { B as h } from "../../../../Button-jy67CcTH.js";
|
|
10
10
|
import { D as f, a as y } from "../../../../DialogContent-CtA2aNum.js";
|
|
11
|
-
import { D as b } from "../../../../dialog-
|
|
11
|
+
import { D as b } from "../../../../dialog-BDt1r9fh.js";
|
|
12
12
|
function L(i) {
|
|
13
13
|
const { state: l, action: t } = p(i);
|
|
14
14
|
return /* @__PURE__ */ r(g, { children: [
|
|
@@ -69,11 +69,11 @@ process.env.NODE_ENV !== "production" && (u.propTypes = {
|
|
|
69
69
|
*/
|
|
70
70
|
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
71
71
|
});
|
|
72
|
-
const
|
|
72
|
+
const I = {
|
|
73
73
|
confirmButtonText: "OK",
|
|
74
74
|
cancelButtonText: "Cancel",
|
|
75
75
|
disableCancelButton: !1
|
|
76
|
-
},
|
|
76
|
+
}, A = ({
|
|
77
77
|
show: a = !0,
|
|
78
78
|
proceed: t = () => {
|
|
79
79
|
},
|
|
@@ -81,7 +81,7 @@ const A = {
|
|
|
81
81
|
description: i,
|
|
82
82
|
options: e
|
|
83
83
|
}) => {
|
|
84
|
-
e = { ...
|
|
84
|
+
e = { ...I, ...e };
|
|
85
85
|
const n = () => {
|
|
86
86
|
t(!1);
|
|
87
87
|
}, l = () => {
|
|
@@ -97,6 +97,7 @@ const A = {
|
|
|
97
97
|
"aria-labelledby": "dialog-title",
|
|
98
98
|
"aria-describedby": "dialog-description",
|
|
99
99
|
sx: {
|
|
100
|
+
zIndex: 9999,
|
|
100
101
|
"& .MuiDialog-paper": {
|
|
101
102
|
borderRadius: 3
|
|
102
103
|
},
|
|
@@ -146,7 +147,7 @@ const A = {
|
|
|
146
147
|
]
|
|
147
148
|
}
|
|
148
149
|
);
|
|
149
|
-
}, G = x(
|
|
150
|
+
}, G = x(A);
|
|
150
151
|
export {
|
|
151
152
|
u as D,
|
|
152
153
|
G as a
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as h, Fragment as
|
|
1
|
+
import { jsxs as h, Fragment as p, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import I from "lodash";
|
|
3
3
|
import N from "dayjs";
|
|
4
|
-
import { FormControl as W, FormLabel as j, FormGroup as Y, FormControlLabel as $, Checkbox as v, Typography as S, Button as
|
|
4
|
+
import { FormControl as W, FormLabel as j, FormGroup as Y, FormControlLabel as $, Checkbox as v, Typography as S, Button as P, Chip as _, Dialog as E, DialogTitle as G, DialogContent as M, DialogActions as H, InputAdornment as K, Tooltip as R } from "@mui/material";
|
|
5
5
|
import { Container as U, Values as J, MiniButton as Q } from "./components/instance-form/components/composite-list/styled.js";
|
|
6
|
-
import { KeyboardArrowUp as X, KeyboardArrowDown as Z, Add as
|
|
6
|
+
import { KeyboardArrowUp as X, KeyboardArrowDown as Z, Add as z, LockOutlined as O } from "@mui/icons-material";
|
|
7
7
|
import ee from "./hooks/useToggle.js";
|
|
8
8
|
import { GeometryPicker as ne } from "./components/geometry-picker/index.js";
|
|
9
9
|
import { PhoneInput as ae } from "./components/phone-input/index.js";
|
|
@@ -17,33 +17,33 @@ import { S as me } from "./Select-ush_fSWy.js";
|
|
|
17
17
|
import { M as re } from "./MenuItem-Lcjh1XlV.js";
|
|
18
18
|
import { useState as B } from "react";
|
|
19
19
|
function ce({
|
|
20
|
-
property:
|
|
20
|
+
property: d,
|
|
21
21
|
mapboxAccessToken: e,
|
|
22
22
|
value: l,
|
|
23
23
|
variant: s = "outlined",
|
|
24
24
|
size: c = "medium",
|
|
25
|
-
onChange:
|
|
25
|
+
onChange: i
|
|
26
26
|
}) {
|
|
27
27
|
var C, g, V;
|
|
28
|
-
const f = ee(!1), [
|
|
29
|
-
u(I.get(n,
|
|
28
|
+
const f = ee(!1), [o, u] = B(), [b, k] = B(!1), w = 10, A = (n) => {
|
|
29
|
+
u(I.get(n, d.propertyId));
|
|
30
30
|
}, y = () => {
|
|
31
|
-
|
|
32
|
-
},
|
|
31
|
+
i([...l || [], o]), u(""), f.action.close();
|
|
32
|
+
}, D = (n) => () => {
|
|
33
33
|
if (l) {
|
|
34
34
|
const t = [...l];
|
|
35
|
-
t.splice(n, 1),
|
|
35
|
+
t.splice(n, 1), i(t);
|
|
36
36
|
}
|
|
37
37
|
}, F = (n) => {
|
|
38
38
|
const { value: t, checked: m } = n.target;
|
|
39
39
|
let r = I.isArray(l) ? l : [];
|
|
40
|
-
m ? r.push(t) : r = r.filter((L) => L !== t),
|
|
40
|
+
m ? r.push(t) : r = r.filter((L) => L !== t), i(r);
|
|
41
41
|
};
|
|
42
|
-
if (((g = (C =
|
|
43
|
-
const { enumValues: n } =
|
|
44
|
-
return /* @__PURE__ */ h(
|
|
42
|
+
if (((g = (C = d.dataTypeInfo) == null ? void 0 : C.innerType) == null ? void 0 : g.type) === "enum") {
|
|
43
|
+
const { enumValues: n } = d.dataTypeInfo.innerType;
|
|
44
|
+
return /* @__PURE__ */ h(p, { children: [
|
|
45
45
|
/* @__PURE__ */ h(W, { fullWidth: !0, component: "fieldset", variant: s, children: [
|
|
46
|
-
/* @__PURE__ */ a(j, { component: "legend", sx: { mb: 1 }, children:
|
|
46
|
+
/* @__PURE__ */ a(j, { component: "legend", sx: { mb: 1 }, children: d.name }),
|
|
47
47
|
/* @__PURE__ */ a(Y, { children: n && n.length > 0 ? n.slice(0, b ? 9999 : w).map((t, m) => /* @__PURE__ */ a(
|
|
48
48
|
$,
|
|
49
49
|
{
|
|
@@ -51,7 +51,7 @@ function ce({
|
|
|
51
51
|
control: /* @__PURE__ */ a(
|
|
52
52
|
v,
|
|
53
53
|
{
|
|
54
|
-
name:
|
|
54
|
+
name: d.propertyId,
|
|
55
55
|
value: t,
|
|
56
56
|
size: "small",
|
|
57
57
|
checked: I.isArray(l) ? l.includes(t) : !1,
|
|
@@ -68,7 +68,7 @@ function ce({
|
|
|
68
68
|
)) : /* @__PURE__ */ a(S, { variant: "caption", mb: 1, children: "No enum values!" }) })
|
|
69
69
|
] }),
|
|
70
70
|
I.isArray(n) && n.length > w && /* @__PURE__ */ h(
|
|
71
|
-
|
|
71
|
+
P,
|
|
72
72
|
{
|
|
73
73
|
size: "small",
|
|
74
74
|
sx: { p: 0, textTransform: "none" },
|
|
@@ -82,17 +82,17 @@ function ce({
|
|
|
82
82
|
)
|
|
83
83
|
] });
|
|
84
84
|
}
|
|
85
|
-
return /* @__PURE__ */ h(
|
|
85
|
+
return /* @__PURE__ */ h(p, { children: [
|
|
86
86
|
/* @__PURE__ */ h(U, { variant: s, children: [
|
|
87
|
-
/* @__PURE__ */ a(S, { children:
|
|
87
|
+
/* @__PURE__ */ a(S, { children: d.name }),
|
|
88
88
|
/* @__PURE__ */ a(J, { children: I.isArray(l) && l.map((n, t) => {
|
|
89
89
|
var m, r;
|
|
90
90
|
return /* @__PURE__ */ a(
|
|
91
91
|
_,
|
|
92
92
|
{
|
|
93
|
-
label: ((r = (m =
|
|
93
|
+
label: ((r = (m = d.dataTypeInfo) == null ? void 0 : m.innerType) == null ? void 0 : r.type) === "date" ? N(n).format("DD/MM/YYYY HH:mm:ss") : n,
|
|
94
94
|
size: c,
|
|
95
|
-
onDelete:
|
|
95
|
+
onDelete: D(t)
|
|
96
96
|
},
|
|
97
97
|
t
|
|
98
98
|
);
|
|
@@ -100,7 +100,7 @@ function ce({
|
|
|
100
100
|
/* @__PURE__ */ a(
|
|
101
101
|
Q,
|
|
102
102
|
{
|
|
103
|
-
startIcon: /* @__PURE__ */ a(
|
|
103
|
+
startIcon: /* @__PURE__ */ a(z, {}),
|
|
104
104
|
variant: "text",
|
|
105
105
|
onClick: f.action.open,
|
|
106
106
|
children: "Add"
|
|
@@ -116,22 +116,22 @@ function ce({
|
|
|
116
116
|
fullWidth: !0,
|
|
117
117
|
children: [
|
|
118
118
|
/* @__PURE__ */ a(G, { children: "Add List Value" }),
|
|
119
|
-
/* @__PURE__ */ a(M, { children: (V =
|
|
119
|
+
/* @__PURE__ */ a(M, { children: (V = d.dataTypeInfo) != null && V.innerType ? /* @__PURE__ */ a(
|
|
120
120
|
ue,
|
|
121
121
|
{
|
|
122
122
|
mapboxAccessToken: e,
|
|
123
123
|
property: {
|
|
124
|
-
...
|
|
124
|
+
...d,
|
|
125
125
|
name: "Value",
|
|
126
|
-
type:
|
|
126
|
+
type: d.dataTypeInfo.innerType.type
|
|
127
127
|
},
|
|
128
|
-
value:
|
|
128
|
+
value: o,
|
|
129
129
|
onChange: A
|
|
130
130
|
}
|
|
131
131
|
) : null }),
|
|
132
132
|
/* @__PURE__ */ h(H, { children: [
|
|
133
133
|
/* @__PURE__ */ a(
|
|
134
|
-
|
|
134
|
+
P,
|
|
135
135
|
{
|
|
136
136
|
variant: "contained",
|
|
137
137
|
color: "inherit",
|
|
@@ -139,7 +139,7 @@ function ce({
|
|
|
139
139
|
children: "Cancel"
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
/* @__PURE__ */ a(
|
|
142
|
+
/* @__PURE__ */ a(P, { variant: "contained", color: "primary", onClick: y, children: "Ok" })
|
|
143
143
|
] })
|
|
144
144
|
]
|
|
145
145
|
}
|
|
@@ -147,14 +147,14 @@ function ce({
|
|
|
147
147
|
] });
|
|
148
148
|
}
|
|
149
149
|
function ue({
|
|
150
|
-
mapboxAccessToken:
|
|
150
|
+
mapboxAccessToken: d,
|
|
151
151
|
property: e,
|
|
152
152
|
value: l,
|
|
153
153
|
variant: s = "standard",
|
|
154
154
|
size: c = "medium",
|
|
155
|
-
disableMargin:
|
|
155
|
+
disableMargin: i = !1,
|
|
156
156
|
defaultExtent: f,
|
|
157
|
-
fieldOptions:
|
|
157
|
+
fieldOptions: o,
|
|
158
158
|
// keyAuth,
|
|
159
159
|
onChange: u
|
|
160
160
|
}) {
|
|
@@ -182,7 +182,7 @@ function ue({
|
|
|
182
182
|
u({
|
|
183
183
|
[n]: t
|
|
184
184
|
});
|
|
185
|
-
},
|
|
185
|
+
}, D = (n) => (t) => {
|
|
186
186
|
u({
|
|
187
187
|
[n]: t
|
|
188
188
|
});
|
|
@@ -214,21 +214,21 @@ function ue({
|
|
|
214
214
|
multiline: e.type === "text",
|
|
215
215
|
disabled: !e.editable,
|
|
216
216
|
fullWidth: !0,
|
|
217
|
-
sx: { mb:
|
|
217
|
+
sx: { mb: i ? 0 : 2 },
|
|
218
218
|
InputProps: {
|
|
219
219
|
size: c,
|
|
220
|
-
...
|
|
221
|
-
tabIndex:
|
|
220
|
+
...o && o[e.propertyId] && {
|
|
221
|
+
tabIndex: o[e.propertyId].order
|
|
222
222
|
},
|
|
223
223
|
...e.privacyPreservationMethod === "ENCRYPTION" ? {
|
|
224
|
-
endAdornment: /* @__PURE__ */ a(K, { position: "end", children: /* @__PURE__ */ a(R, { title: "Encrypted Field", children: /* @__PURE__ */ a(
|
|
224
|
+
endAdornment: /* @__PURE__ */ a(K, { position: "end", children: /* @__PURE__ */ a(R, { title: "Encrypted Field", children: /* @__PURE__ */ a(O, {}) }) })
|
|
225
225
|
} : {}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
229
|
if (e.type === "date") {
|
|
230
230
|
const n = l !== void 0 ? N(l).format() : l;
|
|
231
|
-
return /* @__PURE__ */ a(x, { mb:
|
|
231
|
+
return /* @__PURE__ */ a(x, { mb: i ? 0 : 2, children: /* @__PURE__ */ a(
|
|
232
232
|
le,
|
|
233
233
|
{
|
|
234
234
|
label: e.name,
|
|
@@ -236,7 +236,10 @@ function ue({
|
|
|
236
236
|
variant: s,
|
|
237
237
|
size: c,
|
|
238
238
|
name: e.propertyId,
|
|
239
|
-
onChange: w
|
|
239
|
+
onChange: w,
|
|
240
|
+
...o && o[e.propertyId] && {
|
|
241
|
+
minDate: o[e.propertyId].minDate
|
|
242
|
+
}
|
|
240
243
|
}
|
|
241
244
|
) });
|
|
242
245
|
}
|
|
@@ -254,19 +257,19 @@ function ue({
|
|
|
254
257
|
required: e.required,
|
|
255
258
|
fullWidth: !0,
|
|
256
259
|
helperText: c === "small" ? null : "Add list values with the comma (,) separated string",
|
|
257
|
-
sx: { mb:
|
|
260
|
+
sx: { mb: i ? 0 : 2 },
|
|
258
261
|
InputProps: {
|
|
259
262
|
size: c,
|
|
260
263
|
placeholder: c === "small" ? "Add list values with the comma (,) separated string" : "",
|
|
261
|
-
...
|
|
262
|
-
tabIndex:
|
|
264
|
+
...o && o[e.propertyId] && {
|
|
265
|
+
tabIndex: o[e.propertyId].order
|
|
263
266
|
}
|
|
264
267
|
}
|
|
265
268
|
}
|
|
266
269
|
);
|
|
267
270
|
}
|
|
268
271
|
if (e.type === "boolean")
|
|
269
|
-
return /* @__PURE__ */ a(x, { mb:
|
|
272
|
+
return /* @__PURE__ */ a(x, { mb: i ? 0 : 2, children: /* @__PURE__ */ a(
|
|
270
273
|
te,
|
|
271
274
|
{
|
|
272
275
|
control: /* @__PURE__ */ a(
|
|
@@ -288,7 +291,7 @@ function ue({
|
|
|
288
291
|
{
|
|
289
292
|
fullWidth: !0,
|
|
290
293
|
variant: s,
|
|
291
|
-
sx: { mb:
|
|
294
|
+
sx: { mb: i ? 0 : 2 },
|
|
292
295
|
size: c,
|
|
293
296
|
required: e.required,
|
|
294
297
|
children: [
|
|
@@ -303,8 +306,8 @@ function ue({
|
|
|
303
306
|
value: l ?? "",
|
|
304
307
|
onChange: A,
|
|
305
308
|
inputProps: {
|
|
306
|
-
...
|
|
307
|
-
tabIndex:
|
|
309
|
+
...o && o[e.propertyId] && {
|
|
310
|
+
tabIndex: o[e.propertyId].order
|
|
308
311
|
}
|
|
309
312
|
},
|
|
310
313
|
children: n.map((t, m) => /* @__PURE__ */ a(re, { value: t, children: t }, m))
|
|
@@ -314,35 +317,35 @@ function ue({
|
|
|
314
317
|
}
|
|
315
318
|
);
|
|
316
319
|
}
|
|
317
|
-
return e.type === "geometry" ? /* @__PURE__ */ a(x, { sx: { mb:
|
|
320
|
+
return e.type === "geometry" ? /* @__PURE__ */ a(x, { sx: { mb: i ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ a(
|
|
318
321
|
ne,
|
|
319
322
|
{
|
|
320
|
-
mapboxAccessToken:
|
|
323
|
+
mapboxAccessToken: d,
|
|
321
324
|
label: e.name,
|
|
322
325
|
value: l ?? e.defaultValue ?? "",
|
|
323
326
|
defaultExtent: f,
|
|
324
327
|
variant: s,
|
|
325
328
|
onChange: y(e.propertyId)
|
|
326
329
|
}
|
|
327
|
-
) }) : e.type === "phone-number" ? /* @__PURE__ */ a(x, { sx: { mb:
|
|
330
|
+
) }) : e.type === "phone-number" ? /* @__PURE__ */ a(x, { sx: { mb: i ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ a(
|
|
328
331
|
ae,
|
|
329
332
|
{
|
|
330
333
|
label: e.name,
|
|
331
334
|
placeholder: "Enter phone number",
|
|
332
335
|
value: l ?? e.defaultValue ?? "",
|
|
333
|
-
onChange:
|
|
336
|
+
onChange: D(e.propertyId)
|
|
334
337
|
}
|
|
335
|
-
) }) : e.type === "composite-list" ? /* @__PURE__ */ a(x, { sx: { mb:
|
|
338
|
+
) }) : e.type === "composite-list" ? /* @__PURE__ */ a(x, { sx: { mb: i ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ a(
|
|
336
339
|
ce,
|
|
337
340
|
{
|
|
338
341
|
property: e,
|
|
339
342
|
value: l ?? e.defaultValue ?? "",
|
|
340
343
|
variant: s,
|
|
341
344
|
size: c,
|
|
342
|
-
mapboxAccessToken:
|
|
345
|
+
mapboxAccessToken: d,
|
|
343
346
|
onChange: F(e.propertyId)
|
|
344
347
|
}
|
|
345
|
-
) }) : /* @__PURE__ */ a(
|
|
348
|
+
) }) : /* @__PURE__ */ a(p, {});
|
|
346
349
|
}
|
|
347
350
|
export {
|
|
348
351
|
ce as C,
|
package/dist/main.d.ts
CHANGED