@hybridcore/ui 1.3.5 → 1.3.7
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/data-management/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/data-management/instance-form/components/composite-list/styled.js +15 -6
- package/dist/components/data-management/instance-form/components/variable/index.js +1 -1
- package/dist/components/data-management/instance-form/components/variables/index.js +16 -14
- package/dist/components/data-management/instance-form/index.js +117 -104
- package/dist/components/data-security-selectors/dissemination-list/index.js +11 -5
- package/dist/components/data-security-selectors/security-level/index.js +23 -24
- package/dist/components/date-time-picker/index.js +80 -58
- package/dist/components/geometry-picker/index.js +59 -55
- package/dist/components/geometry-picker/styled.js +22 -14
- package/dist/components/template-property-filters/property.js +47 -47
- package/dist/components/tree-select/index.js +46 -45
- package/dist/{index-B3Oj04nl.js → index-CJVcedWy.js} +109 -110
- package/dist/main.d.ts +8 -3
- package/package.json +1 -1
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as C, Fragment as P, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import T from "lodash";
|
|
3
|
-
import
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { Container as
|
|
6
|
-
import { Add as
|
|
7
|
-
import
|
|
8
|
-
import { GeometryPicker as
|
|
9
|
-
import { PhoneInput as
|
|
10
|
-
import { DateTimePicker as
|
|
11
|
-
import { T as D, F as
|
|
12
|
-
import { B as
|
|
13
|
-
import { F as
|
|
14
|
-
import { S as
|
|
15
|
-
import { M
|
|
16
|
-
import { useState as
|
|
17
|
-
function
|
|
3
|
+
import F from "dayjs";
|
|
4
|
+
import { Typography as B, Chip as j, Dialog as N, DialogTitle as S, DialogContent as W, DialogActions as Y, Button as w, InputAdornment as v, Tooltip as O } from "@mui/material";
|
|
5
|
+
import { Container as _, Values as y, MiniButton as E } from "./components/data-management/instance-form/components/composite-list/styled.js";
|
|
6
|
+
import { Add as G, LockOutlined as H } from "@mui/icons-material";
|
|
7
|
+
import R from "./hooks/useToggle.js";
|
|
8
|
+
import { GeometryPicker as $ } from "./components/geometry-picker/index.js";
|
|
9
|
+
import { PhoneInput as q } from "./components/phone-input/index.js";
|
|
10
|
+
import { DateTimePicker as J } from "./components/date-time-picker/index.js";
|
|
11
|
+
import { T as D, F as K } from "./FormControlLabel-DENNVXWL.js";
|
|
12
|
+
import { B as b, C as Q } from "./Checkbox-BFWhj3s-.js";
|
|
13
|
+
import { F as U, I as X } from "./FormControl-BMRUQKHh.js";
|
|
14
|
+
import { S as Z } from "./Select-NDq3WyLt.js";
|
|
15
|
+
import { M } from "./MenuItem-DstAFfik.js";
|
|
16
|
+
import { useState as z } from "react";
|
|
17
|
+
function ee({
|
|
18
18
|
property: m,
|
|
19
19
|
mapboxAccessToken: e,
|
|
20
20
|
value: l,
|
|
21
|
-
variant:
|
|
22
|
-
size:
|
|
21
|
+
variant: c = "outlined",
|
|
22
|
+
size: i = "medium",
|
|
23
23
|
onChange: a
|
|
24
24
|
}) {
|
|
25
|
-
var
|
|
26
|
-
const s =
|
|
27
|
-
|
|
25
|
+
var x;
|
|
26
|
+
const s = R(!1), [d, g] = z(), V = (u) => {
|
|
27
|
+
g(T.get(u, m.propertyId));
|
|
28
28
|
}, k = () => {
|
|
29
|
-
a([...l || [], d]),
|
|
30
|
-
}, A = (
|
|
29
|
+
a([...l || [], d]), g(""), s.action.close();
|
|
30
|
+
}, A = (u) => () => {
|
|
31
31
|
if (l) {
|
|
32
|
-
let
|
|
33
|
-
|
|
32
|
+
let h = [...l];
|
|
33
|
+
h.splice(u, 1), a(h);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */ n(
|
|
39
|
-
/* @__PURE__ */ n(
|
|
40
|
-
var
|
|
36
|
+
return /* @__PURE__ */ C(P, { children: [
|
|
37
|
+
/* @__PURE__ */ C(_, { variant: c, children: [
|
|
38
|
+
/* @__PURE__ */ n(B, { children: m.name }),
|
|
39
|
+
/* @__PURE__ */ n(y, { children: T.isArray(l) && l.map((u, h) => {
|
|
40
|
+
var r, t;
|
|
41
41
|
return /* @__PURE__ */ n(
|
|
42
|
-
|
|
42
|
+
j,
|
|
43
43
|
{
|
|
44
|
-
label: ((t = (
|
|
45
|
-
size:
|
|
46
|
-
onDelete: A(
|
|
44
|
+
label: ((t = (r = m.dataTypeInfo) == null ? void 0 : r.innerType) == null ? void 0 : t.type) === "date" ? F(u).format("DD/MM/YYYY HH:mm:ss") : u,
|
|
45
|
+
size: i,
|
|
46
|
+
onDelete: A(h)
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
h
|
|
49
49
|
);
|
|
50
50
|
}) }),
|
|
51
51
|
/* @__PURE__ */ n(
|
|
52
|
-
|
|
52
|
+
E,
|
|
53
53
|
{
|
|
54
|
-
startIcon: /* @__PURE__ */ n(
|
|
54
|
+
startIcon: /* @__PURE__ */ n(G, {}),
|
|
55
55
|
variant: "text",
|
|
56
56
|
onClick: s.action.open,
|
|
57
57
|
children: "Add"
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] }),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
61
|
+
/* @__PURE__ */ C(
|
|
62
|
+
N,
|
|
63
63
|
{
|
|
64
64
|
open: s.state.isOpen,
|
|
65
65
|
onClose: s.action.close,
|
|
66
66
|
maxWidth: "sm",
|
|
67
67
|
fullWidth: !0,
|
|
68
68
|
children: [
|
|
69
|
-
/* @__PURE__ */ n(
|
|
70
|
-
/* @__PURE__ */ n(
|
|
71
|
-
|
|
69
|
+
/* @__PURE__ */ n(S, { children: "Add List Value" }),
|
|
70
|
+
/* @__PURE__ */ n(W, { children: (x = m.dataTypeInfo) != null && x.innerType ? /* @__PURE__ */ n(
|
|
71
|
+
ne,
|
|
72
72
|
{
|
|
73
73
|
mapboxAccessToken: e,
|
|
74
74
|
property: {
|
|
@@ -77,10 +77,10 @@ function ne({
|
|
|
77
77
|
type: m.dataTypeInfo.innerType.type
|
|
78
78
|
},
|
|
79
79
|
value: d,
|
|
80
|
-
onChange:
|
|
80
|
+
onChange: V
|
|
81
81
|
}
|
|
82
82
|
) : null }),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ C(Y, { children: [
|
|
84
84
|
/* @__PURE__ */ n(
|
|
85
85
|
w,
|
|
86
86
|
{
|
|
@@ -97,28 +97,28 @@ function ne({
|
|
|
97
97
|
)
|
|
98
98
|
] });
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ne({
|
|
101
101
|
mapboxAccessToken: m,
|
|
102
102
|
property: e,
|
|
103
103
|
value: l,
|
|
104
|
-
variant:
|
|
105
|
-
size:
|
|
104
|
+
variant: c = "standard",
|
|
105
|
+
size: i = "medium",
|
|
106
106
|
disableMargin: a = !1,
|
|
107
107
|
defaultExtent: s,
|
|
108
108
|
// keyAuth,
|
|
109
109
|
onChange: d
|
|
110
110
|
}) {
|
|
111
|
-
var
|
|
112
|
-
const
|
|
113
|
-
const
|
|
111
|
+
var r;
|
|
112
|
+
const g = (t) => {
|
|
113
|
+
const f = t.target.value.split(",").map((p) => p.trimStart());
|
|
114
114
|
d({
|
|
115
|
-
[e.propertyId]:
|
|
115
|
+
[e.propertyId]: f
|
|
116
116
|
});
|
|
117
|
-
},
|
|
118
|
-
const { name:
|
|
119
|
-
let
|
|
120
|
-
e.type === "double" && (
|
|
121
|
-
[
|
|
117
|
+
}, V = (t) => {
|
|
118
|
+
const { name: o, type: f, checked: p, value: L } = t.target;
|
|
119
|
+
let I = L;
|
|
120
|
+
e.type === "double" && (I = I.replace(",", "."), I = I.replace(/[^\d.-]+/g, "")), d({
|
|
121
|
+
[o]: f === "checkbox" ? p : I
|
|
122
122
|
});
|
|
123
123
|
}, k = (t) => {
|
|
124
124
|
d({
|
|
@@ -128,17 +128,17 @@ function te({
|
|
|
128
128
|
d({
|
|
129
129
|
[e.propertyId]: t.target.value
|
|
130
130
|
});
|
|
131
|
-
},
|
|
131
|
+
}, x = (t) => (o) => {
|
|
132
132
|
d({
|
|
133
|
-
[t]:
|
|
133
|
+
[t]: o
|
|
134
134
|
});
|
|
135
|
-
},
|
|
135
|
+
}, u = (t) => (o) => {
|
|
136
136
|
d({
|
|
137
|
-
[t]:
|
|
137
|
+
[t]: o
|
|
138
138
|
});
|
|
139
|
-
},
|
|
139
|
+
}, h = (t) => (o) => {
|
|
140
140
|
d({
|
|
141
|
-
[t]:
|
|
141
|
+
[t]: o
|
|
142
142
|
});
|
|
143
143
|
};
|
|
144
144
|
if ([
|
|
@@ -157,36 +157,34 @@ function te({
|
|
|
157
157
|
name: e.propertyId,
|
|
158
158
|
value: l ?? e.defaultValue ?? "",
|
|
159
159
|
defaultValue: l,
|
|
160
|
-
onChange:
|
|
161
|
-
variant:
|
|
160
|
+
onChange: V,
|
|
161
|
+
variant: c,
|
|
162
162
|
type: "text",
|
|
163
163
|
multiline: e.type === "text",
|
|
164
164
|
disabled: !e.editable,
|
|
165
165
|
fullWidth: !0,
|
|
166
166
|
sx: { mb: a ? 0 : 2 },
|
|
167
167
|
InputProps: {
|
|
168
|
-
size:
|
|
168
|
+
size: i,
|
|
169
169
|
...e.privacyPreservationMethod === "ENCRYPTION" ? {
|
|
170
|
-
endAdornment: /* @__PURE__ */ n(
|
|
170
|
+
endAdornment: /* @__PURE__ */ n(v, { position: "end", children: /* @__PURE__ */ n(O, { title: "Encrypted Field", children: /* @__PURE__ */ n(H, {}) }) })
|
|
171
171
|
} : {}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
);
|
|
175
175
|
if (e.type === "date") {
|
|
176
|
-
const t = l !== void 0 ?
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
)
|
|
189
|
-
] });
|
|
176
|
+
const t = l !== void 0 ? F(l).format() : l;
|
|
177
|
+
return /* @__PURE__ */ n(b, { mb: a ? 0 : 2, children: /* @__PURE__ */ n(
|
|
178
|
+
J,
|
|
179
|
+
{
|
|
180
|
+
label: e.name,
|
|
181
|
+
value: t,
|
|
182
|
+
variant: c,
|
|
183
|
+
size: i,
|
|
184
|
+
name: e.propertyId,
|
|
185
|
+
onChange: k
|
|
186
|
+
}
|
|
187
|
+
) });
|
|
190
188
|
}
|
|
191
189
|
if (e.type === "list") {
|
|
192
190
|
let t = "";
|
|
@@ -196,30 +194,30 @@ function te({
|
|
|
196
194
|
label: e.name,
|
|
197
195
|
name: e.propertyId,
|
|
198
196
|
value: t,
|
|
199
|
-
onChange:
|
|
200
|
-
variant:
|
|
197
|
+
onChange: g,
|
|
198
|
+
variant: c,
|
|
201
199
|
disabled: !e.editable,
|
|
202
200
|
fullWidth: !0,
|
|
203
|
-
helperText:
|
|
201
|
+
helperText: i === "small" ? null : "Add list values with the comma (,) separated string",
|
|
204
202
|
sx: { mb: a ? 0 : 2 },
|
|
205
203
|
InputProps: {
|
|
206
|
-
size:
|
|
207
|
-
placeholder:
|
|
204
|
+
size: i,
|
|
205
|
+
placeholder: i === "small" ? "Add list values with the comma (,) separated string" : ""
|
|
208
206
|
}
|
|
209
207
|
}
|
|
210
208
|
);
|
|
211
209
|
}
|
|
212
210
|
if (e.type === "boolean")
|
|
213
|
-
return /* @__PURE__ */ n(
|
|
214
|
-
|
|
211
|
+
return /* @__PURE__ */ n(b, { mb: a ? 0 : 2, children: /* @__PURE__ */ n(
|
|
212
|
+
K,
|
|
215
213
|
{
|
|
216
214
|
control: /* @__PURE__ */ n(
|
|
217
|
-
|
|
215
|
+
Q,
|
|
218
216
|
{
|
|
219
217
|
name: e.propertyId,
|
|
220
218
|
checked: !!l,
|
|
221
|
-
onChange:
|
|
222
|
-
size:
|
|
219
|
+
onChange: V,
|
|
220
|
+
size: i
|
|
223
221
|
}
|
|
224
222
|
),
|
|
225
223
|
label: e.name
|
|
@@ -227,17 +225,17 @@ function te({
|
|
|
227
225
|
) });
|
|
228
226
|
if (e.type === "enum") {
|
|
229
227
|
let t = [];
|
|
230
|
-
return (
|
|
231
|
-
|
|
228
|
+
return (r = e.dataTypeInfo) != null && r.enumValues && (t = e.dataTypeInfo.enumValues), /* @__PURE__ */ C(
|
|
229
|
+
U,
|
|
232
230
|
{
|
|
233
231
|
fullWidth: !0,
|
|
234
|
-
variant:
|
|
232
|
+
variant: c,
|
|
235
233
|
sx: { mb: a ? 0 : 2 },
|
|
236
|
-
size:
|
|
234
|
+
size: i,
|
|
237
235
|
children: [
|
|
238
|
-
/* @__PURE__ */ n(
|
|
236
|
+
/* @__PURE__ */ n(X, { id: `${e.propertyId}-label`, children: e.name }),
|
|
239
237
|
/* @__PURE__ */ n(
|
|
240
|
-
|
|
238
|
+
Z,
|
|
241
239
|
{
|
|
242
240
|
label: e.name,
|
|
243
241
|
name: e.name,
|
|
@@ -245,43 +243,44 @@ function te({
|
|
|
245
243
|
id: e.propertyId,
|
|
246
244
|
value: l ?? "",
|
|
247
245
|
onChange: A,
|
|
248
|
-
children: t.map((
|
|
246
|
+
children: t.map((o, f) => /* @__PURE__ */ n(M, { value: o, children: o }, f))
|
|
249
247
|
}
|
|
250
248
|
)
|
|
251
249
|
]
|
|
252
250
|
}
|
|
253
251
|
);
|
|
254
252
|
}
|
|
255
|
-
return e.type === "geometry" ? /* @__PURE__ */ n(
|
|
256
|
-
|
|
253
|
+
return e.type === "geometry" ? /* @__PURE__ */ n(b, { sx: { mb: a ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ n(
|
|
254
|
+
$,
|
|
257
255
|
{
|
|
258
256
|
mapboxAccessToken: m,
|
|
259
257
|
label: e.name,
|
|
260
258
|
value: l ?? e.defaultValue ?? "",
|
|
261
259
|
defaultExtent: s,
|
|
262
|
-
|
|
260
|
+
variant: c,
|
|
261
|
+
onChange: x(e.propertyId)
|
|
263
262
|
}
|
|
264
|
-
) }) : e.type === "phone-number" ? /* @__PURE__ */ n(
|
|
265
|
-
|
|
263
|
+
) }) : e.type === "phone-number" ? /* @__PURE__ */ n(b, { sx: { mb: a ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ n(
|
|
264
|
+
q,
|
|
266
265
|
{
|
|
267
266
|
label: e.name,
|
|
268
267
|
placeholder: "Enter phone number",
|
|
269
268
|
value: l ?? e.defaultValue ?? "",
|
|
270
|
-
onChange:
|
|
269
|
+
onChange: u(e.propertyId)
|
|
271
270
|
}
|
|
272
|
-
) }) : e.type === "composite-list" ? /* @__PURE__ */ n(
|
|
273
|
-
|
|
271
|
+
) }) : e.type === "composite-list" ? /* @__PURE__ */ n(b, { sx: { mb: a ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ n(
|
|
272
|
+
ee,
|
|
274
273
|
{
|
|
275
274
|
property: e,
|
|
276
275
|
value: l ?? e.defaultValue ?? "",
|
|
277
|
-
variant:
|
|
278
|
-
size:
|
|
276
|
+
variant: c,
|
|
277
|
+
size: i,
|
|
279
278
|
mapboxAccessToken: m,
|
|
280
|
-
onChange:
|
|
279
|
+
onChange: h(e.propertyId)
|
|
281
280
|
}
|
|
282
281
|
) }) : /* @__PURE__ */ n(P, {});
|
|
283
282
|
}
|
|
284
283
|
export {
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
ee as C,
|
|
285
|
+
ne as V
|
|
287
286
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -166,7 +166,7 @@ declare interface DisseminationListProps {
|
|
|
166
166
|
/**
|
|
167
167
|
*
|
|
168
168
|
*/
|
|
169
|
-
variant?: "
|
|
169
|
+
variant?: "standard" | "outlined" | "filled";
|
|
170
170
|
/**
|
|
171
171
|
*
|
|
172
172
|
*/
|
|
@@ -235,6 +235,7 @@ K extends
|
|
|
235
235
|
*
|
|
236
236
|
*/
|
|
237
237
|
variant?: "inline" | "dialog";
|
|
238
|
+
inputVariant?: "standard" | "outlined" | "filled";
|
|
238
239
|
/**
|
|
239
240
|
*
|
|
240
241
|
*/
|
|
@@ -501,7 +502,7 @@ declare interface Props_3 {
|
|
|
501
502
|
/**
|
|
502
503
|
*
|
|
503
504
|
*/
|
|
504
|
-
value
|
|
505
|
+
value?: string;
|
|
505
506
|
/**
|
|
506
507
|
*
|
|
507
508
|
*/
|
|
@@ -509,6 +510,8 @@ declare interface Props_3 {
|
|
|
509
510
|
/**
|
|
510
511
|
*
|
|
511
512
|
*/
|
|
513
|
+
label?: string;
|
|
514
|
+
|
|
512
515
|
name?: string;
|
|
513
516
|
/**
|
|
514
517
|
*
|
|
@@ -553,6 +556,7 @@ declare interface Props_4 {
|
|
|
553
556
|
*
|
|
554
557
|
*/
|
|
555
558
|
defaultExtent?: Extent;
|
|
559
|
+
variant?: "standard" | "outlined" | "filled";
|
|
556
560
|
/**
|
|
557
561
|
*
|
|
558
562
|
*/
|
|
@@ -671,7 +675,7 @@ declare interface SecurityLevelProps {
|
|
|
671
675
|
/**
|
|
672
676
|
*
|
|
673
677
|
*/
|
|
674
|
-
variant?: "standard" | "outlined";
|
|
678
|
+
variant?: "standard" | "outlined" | "filled";
|
|
675
679
|
/**
|
|
676
680
|
*
|
|
677
681
|
*/
|
|
@@ -719,6 +723,7 @@ declare interface TreeSelectProps {
|
|
|
719
723
|
*
|
|
720
724
|
*/
|
|
721
725
|
selected: "" | string[] | undefined;
|
|
726
|
+
variant?: "standard" | "outlined" | "filled";
|
|
722
727
|
disabled?: string[];
|
|
723
728
|
label?: string;
|
|
724
729
|
idKey?: string;
|