@hybridcore/ui 1.5.87 → 1.5.88
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/README.md +52 -2
- package/dist/{FormControlLabel-DzNokgFD.js → FormControlLabel-BrdX4R71.js} +1 -1
- package/dist/{Input-B7ry6o4t.js → Input-CoIrGZAh.js} +1 -1
- package/dist/{InputLabel-rrSJo8M_.js → InputLabel-CBuAYyuT.js} +163 -162
- package/dist/{OutlinedInput-BDK6qOwW.js → OutlinedInput-B-iZoc9l.js} +1 -1
- package/dist/{Select-jjAc5JX1.js → Select-t3ewnSdf.js} +3 -3
- package/dist/{TextField-Bf46COnQ.js → TextField-BQ8a50fA.js} +4 -4
- package/dist/components/data-security-selectors/dissemination-list/index.js +652 -742
- package/dist/components/data-security-selectors/dissemination-list/logic.js +62 -0
- package/dist/components/data-security-selectors/dissemination-list/styled.js +88 -0
- package/dist/components/date-time-picker/index.js +57 -94
- package/dist/components/date-time-picker/logic.js +70 -0
- package/dist/components/date-time-picker/styled.js +83 -0
- package/dist/components/geometry-picker/index.js +45 -43
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/variable/index.js +5 -5
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
- package/dist/components/range-selector/components/date-range/index.js +1 -1
- package/dist/components/range-selector/components/number-range/index.js +38 -35
- package/dist/components/range-selector/components/string-range/index.js +15 -14
- package/dist/components/range-selector/index.js +1 -1
- package/dist/components/search-input/index.js +2 -2
- package/dist/components/template-form/components/property-list/index.js +1 -1
- package/dist/components/template-form/components/property-list/property-list-form.js +5 -5
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +3 -3
- package/dist/components/template-form/index.js +3 -3
- package/dist/components/template-property-filters/property.js +4 -4
- package/dist/components/tree-select/index.js +52 -50
- package/dist/{index-MMaYBAn0.js → index-CGNxsLVm.js} +6 -6
- package/dist/{index-NNOChRJ7.js → index-SpeaLUQD.js} +2 -2
- package/dist/main.d.ts +279 -84
- package/dist/main.js +1 -1
- package/dist/{property-list-form-BvnaooEW.js → property-list-form-C5hcK2y2.js} +4 -4
- package/package.json +2 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useThemeProps as k } from "@mui/material";
|
|
2
|
+
import { useMemo as L, useState as S } from "react";
|
|
3
|
+
const y = (c) => {
|
|
4
|
+
const u = k({ props: c, name: "HCDisseminationList" }), {
|
|
5
|
+
memberedGroups: n,
|
|
6
|
+
selectedIds: o,
|
|
7
|
+
showError: l = !1,
|
|
8
|
+
variant: m = "outlined",
|
|
9
|
+
labelPosition: a = "default",
|
|
10
|
+
onChange: f,
|
|
11
|
+
sx: h,
|
|
12
|
+
...v
|
|
13
|
+
} = u, x = L(
|
|
14
|
+
() => (o == null ? void 0 : o.map((s) => {
|
|
15
|
+
const e = n.find((r) => r.id === s);
|
|
16
|
+
return e || {
|
|
17
|
+
id: s,
|
|
18
|
+
name: "Other User/Group",
|
|
19
|
+
isFixed: !0
|
|
20
|
+
};
|
|
21
|
+
})) ?? [],
|
|
22
|
+
[n, o]
|
|
23
|
+
), [i, C] = S(x), p = (s, e) => {
|
|
24
|
+
var d;
|
|
25
|
+
let r = s;
|
|
26
|
+
switch (e == null ? void 0 : e.action) {
|
|
27
|
+
case "remove-value":
|
|
28
|
+
case "pop-value":
|
|
29
|
+
if ((d = e == null ? void 0 : e.removedValue) != null && d.isFixed) return;
|
|
30
|
+
break;
|
|
31
|
+
case "clear":
|
|
32
|
+
r = i.filter((t) => t.isFixed);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
C(r), f(r.map((t) => t.id));
|
|
36
|
+
}, g = (s) => {
|
|
37
|
+
p([...i, { id: s, name: s }]);
|
|
38
|
+
}, b = {
|
|
39
|
+
multiValueRemove: (s, e) => e.data.isFixed ? { ...s, display: "none" } : s
|
|
40
|
+
}, F = {
|
|
41
|
+
...u,
|
|
42
|
+
variant: m,
|
|
43
|
+
labelPosition: a,
|
|
44
|
+
showError: l
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
value: i,
|
|
48
|
+
memberedGroups: n,
|
|
49
|
+
showError: l,
|
|
50
|
+
variant: m,
|
|
51
|
+
labelPosition: a,
|
|
52
|
+
onChange: p,
|
|
53
|
+
onCreate: g,
|
|
54
|
+
selectStyles: b,
|
|
55
|
+
ownerState: F,
|
|
56
|
+
sx: h,
|
|
57
|
+
other: v
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
y as useDisseminationListLogic
|
|
62
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { styled as n, FormLabel as t, Typography as s, Box as r, alpha as e, FormHelperText as l } from "@mui/material";
|
|
2
|
+
const d = n("div", {
|
|
3
|
+
name: "HCDisseminationList",
|
|
4
|
+
slot: "Root"
|
|
5
|
+
})(
|
|
6
|
+
({ ownerState: i }) => i.labelPosition === "left" ? {
|
|
7
|
+
display: "flex",
|
|
8
|
+
alignItems: "center"
|
|
9
|
+
} : {
|
|
10
|
+
display: "block"
|
|
11
|
+
}
|
|
12
|
+
), c = n(t, {
|
|
13
|
+
name: "HCDisseminationList",
|
|
14
|
+
slot: "Label"
|
|
15
|
+
})(({ theme: i, ownerState: o }) => {
|
|
16
|
+
const a = {
|
|
17
|
+
display: "block",
|
|
18
|
+
marginBottom: i.spacing(0.5),
|
|
19
|
+
...o.showError && {
|
|
20
|
+
color: i.palette.error.main
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return o.labelPosition === "default" && o.variant === "outlined" ? {
|
|
24
|
+
...a,
|
|
25
|
+
position: "absolute",
|
|
26
|
+
fontSize: i.typography.caption.fontSize,
|
|
27
|
+
zIndex: 1,
|
|
28
|
+
backgroundColor: i.palette.background.paper,
|
|
29
|
+
marginLeft: i.spacing(1.5),
|
|
30
|
+
marginTop: -9,
|
|
31
|
+
paddingLeft: i.spacing(0.5),
|
|
32
|
+
paddingRight: i.spacing(0.5)
|
|
33
|
+
} : a;
|
|
34
|
+
}), g = n(s, {
|
|
35
|
+
name: "HCDisseminationList",
|
|
36
|
+
slot: "SideLabel"
|
|
37
|
+
})(() => ({
|
|
38
|
+
width: "32%"
|
|
39
|
+
})), m = n(r, {
|
|
40
|
+
name: "HCDisseminationList",
|
|
41
|
+
slot: "SelectWrapper"
|
|
42
|
+
})(({ theme: i, ownerState: o }) => ({
|
|
43
|
+
...o.variant === "outlined" && {
|
|
44
|
+
position: "relative",
|
|
45
|
+
marginTop: i.spacing(1.5),
|
|
46
|
+
zIndex: 9
|
|
47
|
+
},
|
|
48
|
+
...o.labelPosition === "left" && {
|
|
49
|
+
width: "68%"
|
|
50
|
+
},
|
|
51
|
+
// Mirror the standard-variant underline color used by MUI inputs so the
|
|
52
|
+
// select matches HCDateTimePicker and DatePicker side by side.
|
|
53
|
+
"& .hc-dissemination-list__control": {
|
|
54
|
+
boxShadow: "none",
|
|
55
|
+
...o.variant === "standard" && {
|
|
56
|
+
border: "none",
|
|
57
|
+
borderBottom: `1px solid ${e(i.palette.text.primary, 0.42)}`,
|
|
58
|
+
borderRadius: 0
|
|
59
|
+
},
|
|
60
|
+
...o.showError && {
|
|
61
|
+
color: i.palette.error.main,
|
|
62
|
+
borderColor: i.palette.error.main
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"& .hc-dissemination-list__value-container": {
|
|
66
|
+
fontSize: i.typography.body1.fontSize,
|
|
67
|
+
...o.variant === "standard" ? { paddingLeft: 0 } : {
|
|
68
|
+
padding: i.spacing(1.125, 1.75),
|
|
69
|
+
minHeight: 55
|
|
70
|
+
},
|
|
71
|
+
...o.showError && {
|
|
72
|
+
color: i.palette.error.main
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"& .hc-dissemination-list__multi-value": {
|
|
76
|
+
padding: i.spacing(0.625)
|
|
77
|
+
}
|
|
78
|
+
})), b = n(l, {
|
|
79
|
+
name: "HCDisseminationList",
|
|
80
|
+
slot: "HelperText"
|
|
81
|
+
})(() => ({}));
|
|
82
|
+
export {
|
|
83
|
+
b as DisseminationListHelperText,
|
|
84
|
+
c as DisseminationListLabel,
|
|
85
|
+
d as DisseminationListRoot,
|
|
86
|
+
m as DisseminationListSelectWrapper,
|
|
87
|
+
g as DisseminationListSideLabel
|
|
88
|
+
};
|
|
@@ -1,126 +1,89 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DatePicker as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"0"
|
|
31
|
-
), w = `${l}:${k}`;
|
|
32
|
-
o.push(w);
|
|
33
|
-
}
|
|
34
|
-
return o;
|
|
35
|
-
}, [d, t]), C = (o) => {
|
|
36
|
-
o && (h(o), u(o.format("YYYY-MM-DDTHH:mm:ssZ")));
|
|
37
|
-
}, Y = (o) => {
|
|
38
|
-
const [a, s, i] = o.target.value.split(":"), l = g(t).set("hour", a ?? 0).set("m", s ?? 0).set("s", i ?? 0);
|
|
39
|
-
h(l), u(l.format("YYYY-MM-DDTHH:mm:ssZ"));
|
|
40
|
-
}, T = (o) => () => {
|
|
41
|
-
Y({
|
|
42
|
-
target: {
|
|
43
|
-
value: o
|
|
44
|
-
}
|
|
45
|
-
}), n.action.close();
|
|
46
|
-
};
|
|
47
|
-
return /* @__PURE__ */ c(y, { children: [
|
|
48
|
-
/* @__PURE__ */ c(E, { direction: "row", spacing: 2, mb: 1, alignItems: "flex-end", children: [
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Schedule as v } from "@mui/icons-material";
|
|
3
|
+
import { Menu as g, MenuItem as b } from "@mui/material";
|
|
4
|
+
import { DatePicker as x } from "@mui/x-date-pickers";
|
|
5
|
+
import * as M from "react";
|
|
6
|
+
import { useDateTimePickerLogic as S } from "./logic.js";
|
|
7
|
+
import { DateTimePickerRoot as Y, DateTimePickerLabel as w, DateTimePickerContainer as z, DateTimePickerTimeInputContainer as E, DateTimePickerTimeInput as I, DateTimePickerTimeButton as L } from "./styled.js";
|
|
8
|
+
const B = M.forwardRef((l, c) => {
|
|
9
|
+
const {
|
|
10
|
+
name: s,
|
|
11
|
+
minDate: p,
|
|
12
|
+
variant: d,
|
|
13
|
+
label: o,
|
|
14
|
+
labelPosition: a,
|
|
15
|
+
size: h,
|
|
16
|
+
pattern: u,
|
|
17
|
+
date: i,
|
|
18
|
+
timeOptions: f,
|
|
19
|
+
menu: n,
|
|
20
|
+
handleDateChange: D,
|
|
21
|
+
handleTimeChange: T,
|
|
22
|
+
handleTimeSelect: k,
|
|
23
|
+
ownerState: t,
|
|
24
|
+
sx: P,
|
|
25
|
+
other: C
|
|
26
|
+
} = S(l);
|
|
27
|
+
return /* @__PURE__ */ m(Y, { ref: c, ownerState: t, sx: P, ...C, children: [
|
|
28
|
+
a === "top" && o !== void 0 && /* @__PURE__ */ e(w, { ownerState: t, children: o }),
|
|
29
|
+
/* @__PURE__ */ m(z, { ownerState: t, children: [
|
|
49
30
|
/* @__PURE__ */ e(
|
|
50
|
-
|
|
31
|
+
x,
|
|
51
32
|
{
|
|
52
|
-
label:
|
|
53
|
-
value:
|
|
33
|
+
label: a === "default" ? o : void 0,
|
|
34
|
+
value: i,
|
|
54
35
|
format: "DD/MM/YYYY",
|
|
55
|
-
minDate:
|
|
56
|
-
onChange:
|
|
36
|
+
minDate: p,
|
|
37
|
+
onChange: D,
|
|
57
38
|
slotProps: {
|
|
58
39
|
textField: {
|
|
59
|
-
variant:
|
|
60
|
-
size:
|
|
40
|
+
variant: d,
|
|
41
|
+
size: h,
|
|
42
|
+
// When we render our own label above (labelPosition === "top")
|
|
43
|
+
// or there's no label at all, tell the TextField to skip
|
|
44
|
+
// reserving space for its internal floating label — otherwise
|
|
45
|
+
// the filled variant in particular renders taller than the
|
|
46
|
+
// time input next to it.
|
|
47
|
+
hiddenLabel: a !== "default" || o === void 0
|
|
61
48
|
}
|
|
62
49
|
}
|
|
63
50
|
}
|
|
64
51
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ m(E, { ownerState: t, children: [
|
|
66
53
|
/* @__PURE__ */ e(
|
|
67
|
-
|
|
54
|
+
I,
|
|
68
55
|
{
|
|
69
|
-
|
|
56
|
+
ownerState: t,
|
|
57
|
+
format: u,
|
|
70
58
|
allowEmptyFormatting: !0,
|
|
71
|
-
value:
|
|
72
|
-
onChange:
|
|
73
|
-
style: {
|
|
74
|
-
fontSize: 16,
|
|
75
|
-
width: 120,
|
|
76
|
-
...r === "standard" && {
|
|
77
|
-
height: 32,
|
|
78
|
-
border: 0,
|
|
79
|
-
borderBottom: "1px solid",
|
|
80
|
-
padding: "0"
|
|
81
|
-
},
|
|
82
|
-
...r === "outlined" && {
|
|
83
|
-
height: 54,
|
|
84
|
-
border: "1px solid",
|
|
85
|
-
borderRadius: f.shape.borderRadius,
|
|
86
|
-
padding: "0 10px"
|
|
87
|
-
},
|
|
88
|
-
borderColor: f.palette.action.disabled
|
|
89
|
-
}
|
|
59
|
+
value: i == null ? void 0 : i.format("HH:mm:ss"),
|
|
60
|
+
onChange: T
|
|
90
61
|
}
|
|
91
62
|
),
|
|
92
63
|
/* @__PURE__ */ e(
|
|
93
|
-
|
|
64
|
+
L,
|
|
94
65
|
{
|
|
66
|
+
ownerState: t,
|
|
95
67
|
onClick: n.action.open,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
right: 0,
|
|
99
|
-
...r === "standard" && {
|
|
100
|
-
top: -4
|
|
101
|
-
},
|
|
102
|
-
...r === "outlined" && {
|
|
103
|
-
top: 8
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
children: /* @__PURE__ */ e(z, {})
|
|
68
|
+
size: "small",
|
|
69
|
+
children: /* @__PURE__ */ e(v, { fontSize: "small" })
|
|
107
70
|
}
|
|
108
71
|
)
|
|
109
72
|
] })
|
|
110
73
|
] }),
|
|
111
74
|
/* @__PURE__ */ e(
|
|
112
|
-
|
|
75
|
+
g,
|
|
113
76
|
{
|
|
114
77
|
id: "time-menu",
|
|
115
78
|
anchorEl: n.state.anchorEl,
|
|
116
79
|
open: n.state.isOpen,
|
|
117
80
|
onClose: n.action.close,
|
|
118
|
-
children:
|
|
81
|
+
children: f.map((r) => /* @__PURE__ */ e(b, { onClick: k(r), children: r }, r))
|
|
119
82
|
}
|
|
120
83
|
),
|
|
121
|
-
/* @__PURE__ */ e("input", { type: "hidden", name:
|
|
84
|
+
/* @__PURE__ */ e("input", { type: "hidden", name: s, value: (i == null ? void 0 : i.format()) ?? "" })
|
|
122
85
|
] });
|
|
123
|
-
};
|
|
86
|
+
});
|
|
124
87
|
export {
|
|
125
|
-
|
|
88
|
+
B as DateTimePicker
|
|
126
89
|
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useThemeProps as x } from "@mui/material";
|
|
2
|
+
import M from "dayjs";
|
|
3
|
+
import g from "lodash";
|
|
4
|
+
import { useState as L, useMemo as Z } from "react";
|
|
5
|
+
import $ from "../../hooks/useMenuLogic.js";
|
|
6
|
+
const B = (S) => {
|
|
7
|
+
const i = x({ props: S, name: "HCDateTimePicker" }), {
|
|
8
|
+
value: u,
|
|
9
|
+
name: H,
|
|
10
|
+
minDate: e,
|
|
11
|
+
variant: c = "outlined",
|
|
12
|
+
label: T,
|
|
13
|
+
labelPosition: l = "top",
|
|
14
|
+
size: p = "small",
|
|
15
|
+
minuteStep: s = 30,
|
|
16
|
+
pattern: Y = "##:##:##",
|
|
17
|
+
onChange: f,
|
|
18
|
+
sx: b,
|
|
19
|
+
...v
|
|
20
|
+
} = i, D = $(), [o, d] = L(u ? M(u) : null), C = Z(() => {
|
|
21
|
+
const t = [];
|
|
22
|
+
let a = 0;
|
|
23
|
+
e && o && e.format("YYYY-MM-DD") === o.format("YYYY-MM-DD") && (a = Number(e.format("HH")));
|
|
24
|
+
for (let r = a; r < 24; r++)
|
|
25
|
+
for (let n = 0; n < 60 / s; n++) {
|
|
26
|
+
const m = g.padStart(r.toString(), 2, "0"), w = g.padStart(
|
|
27
|
+
(n * s).toString(),
|
|
28
|
+
2,
|
|
29
|
+
"0"
|
|
30
|
+
);
|
|
31
|
+
t.push(`${m}:${w}`);
|
|
32
|
+
}
|
|
33
|
+
return t;
|
|
34
|
+
}, [s, e, o]), N = (t) => {
|
|
35
|
+
t && (d(t), f(t.format("YYYY-MM-DDTHH:mm:ssZ")));
|
|
36
|
+
}, h = (t) => {
|
|
37
|
+
const [a, r, n] = t.target.value.split(":"), m = M(o).set("hour", Number(a ?? 0)).set("m", Number(r ?? 0)).set("s", Number(n ?? 0));
|
|
38
|
+
d(m), f(m.format("YYYY-MM-DDTHH:mm:ssZ"));
|
|
39
|
+
}, P = (t) => () => {
|
|
40
|
+
h({ target: { value: t } }), D.action.close();
|
|
41
|
+
}, k = {
|
|
42
|
+
...i,
|
|
43
|
+
variant: c,
|
|
44
|
+
labelPosition: l,
|
|
45
|
+
size: p,
|
|
46
|
+
minuteStep: s,
|
|
47
|
+
pattern: Y
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
name: H,
|
|
51
|
+
minDate: e,
|
|
52
|
+
variant: c,
|
|
53
|
+
label: T,
|
|
54
|
+
labelPosition: l,
|
|
55
|
+
size: p,
|
|
56
|
+
pattern: Y,
|
|
57
|
+
date: o,
|
|
58
|
+
timeOptions: C,
|
|
59
|
+
menu: D,
|
|
60
|
+
handleDateChange: N,
|
|
61
|
+
handleTimeChange: h,
|
|
62
|
+
handleTimeSelect: P,
|
|
63
|
+
ownerState: k,
|
|
64
|
+
sx: b,
|
|
65
|
+
other: v
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
B as useDateTimePickerLogic
|
|
70
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { styled as i, FormLabel as d, Stack as l, Box as p, alpha as r, IconButton as m } from "@mui/material";
|
|
2
|
+
import { PatternFormat as c } from "react-number-format";
|
|
3
|
+
const g = i("div", {
|
|
4
|
+
name: "HCDateTimePicker",
|
|
5
|
+
slot: "Root"
|
|
6
|
+
})(() => ({
|
|
7
|
+
display: "block"
|
|
8
|
+
})), T = i(d, {
|
|
9
|
+
name: "HCDateTimePicker",
|
|
10
|
+
slot: "Label"
|
|
11
|
+
})(({ theme: o }) => ({
|
|
12
|
+
display: "block",
|
|
13
|
+
marginBottom: o.spacing(0.5)
|
|
14
|
+
})), y = i(l, {
|
|
15
|
+
name: "HCDateTimePicker",
|
|
16
|
+
slot: "Container"
|
|
17
|
+
})(({ theme: o }) => ({
|
|
18
|
+
flexDirection: "row",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
gap: o.spacing(2),
|
|
21
|
+
marginBottom: o.spacing(1)
|
|
22
|
+
})), k = i(p, {
|
|
23
|
+
name: "HCDateTimePicker",
|
|
24
|
+
slot: "TimeInputContainer"
|
|
25
|
+
})(() => ({
|
|
26
|
+
position: "relative",
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center"
|
|
29
|
+
})), C = i(c, {
|
|
30
|
+
name: "HCDateTimePicker",
|
|
31
|
+
slot: "TimeInput"
|
|
32
|
+
})(({ theme: o, ownerState: t }) => {
|
|
33
|
+
const e = r(o.palette.text.primary, 0.42), a = r(o.palette.text.primary, 0.23), n = t.variant === "standard" ? {
|
|
34
|
+
border: 0,
|
|
35
|
+
borderBottom: `1px solid ${e}`,
|
|
36
|
+
padding: 0
|
|
37
|
+
} : t.variant === "filled" ? {
|
|
38
|
+
// Mirror MUI's FilledInput shape: rounded top corners only, with a
|
|
39
|
+
// 1px underline at the bottom (matches the DatePicker's TextField
|
|
40
|
+
// when its variant is "filled").
|
|
41
|
+
border: 0,
|
|
42
|
+
borderBottom: `1px solid ${e}`,
|
|
43
|
+
backgroundColor: o.palette.action.hover,
|
|
44
|
+
borderTopLeftRadius: o.shape.borderRadius,
|
|
45
|
+
borderTopRightRadius: o.shape.borderRadius,
|
|
46
|
+
borderBottomLeftRadius: 0,
|
|
47
|
+
borderBottomRightRadius: 0,
|
|
48
|
+
padding: o.spacing(0, 4.5, 0, 1)
|
|
49
|
+
} : {
|
|
50
|
+
border: `1px solid ${a}`,
|
|
51
|
+
borderRadius: o.shape.borderRadius,
|
|
52
|
+
padding: o.spacing(0, 4.5, 0, 1)
|
|
53
|
+
}, s = t.variant === "standard" ? t.size === "medium" ? 48 : 32 : t.size === "medium" ? 56 : 40;
|
|
54
|
+
return {
|
|
55
|
+
fontSize: o.typography.body1.fontSize,
|
|
56
|
+
fontFamily: o.typography.body1.fontFamily,
|
|
57
|
+
color: o.palette.text.primary,
|
|
58
|
+
width: 120,
|
|
59
|
+
height: s,
|
|
60
|
+
boxSizing: "border-box",
|
|
61
|
+
outline: "none",
|
|
62
|
+
"&:focus": {
|
|
63
|
+
borderColor: o.palette.primary.main
|
|
64
|
+
},
|
|
65
|
+
...n
|
|
66
|
+
};
|
|
67
|
+
}), f = i(m, {
|
|
68
|
+
name: "HCDateTimePicker",
|
|
69
|
+
slot: "TimeButton"
|
|
70
|
+
})(() => ({
|
|
71
|
+
position: "absolute",
|
|
72
|
+
right: 0,
|
|
73
|
+
top: "50%",
|
|
74
|
+
transform: "translateY(-50%)"
|
|
75
|
+
}));
|
|
76
|
+
export {
|
|
77
|
+
y as DateTimePickerContainer,
|
|
78
|
+
T as DateTimePickerLabel,
|
|
79
|
+
g as DateTimePickerRoot,
|
|
80
|
+
f as DateTimePickerTimeButton,
|
|
81
|
+
C as DateTimePickerTimeInput,
|
|
82
|
+
k as DateTimePickerTimeInputContainer
|
|
83
|
+
};
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { jsx as o, jsxs as i, Fragment as
|
|
2
|
-
import { EditOutlined as
|
|
3
|
-
import { Container as O, Actions as
|
|
1
|
+
import { jsx as o, jsxs as i, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { EditOutlined as D, DeleteOutline as I, AddLocationOutlined as A, DrawOutlined as k, LayersOutlined as u } from "@mui/icons-material";
|
|
3
|
+
import { Container as O, Actions as y, Button as l } from "./styled.js";
|
|
4
4
|
import S from "./logic.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import b from "./coordinate/index.js";
|
|
6
|
+
import E from "./edit/index.js";
|
|
7
|
+
import g from "./geometry/index.js";
|
|
8
|
+
import L from "./kml/index.js";
|
|
9
9
|
import W from "./wkt/index.js";
|
|
10
|
-
import { IconButton as
|
|
11
|
-
import { I as
|
|
12
|
-
import { F as
|
|
13
|
-
import { I as
|
|
14
|
-
const
|
|
15
|
-
label:
|
|
10
|
+
import { IconButton as h, OutlinedInput as K, FilledInput as F, Dialog as z, DialogTitle as B, DialogContent as G } from "@mui/material";
|
|
11
|
+
import { I as T } from "../../InputAdornment-B7qEA4kN.js";
|
|
12
|
+
import { a as w, F as M, I as j } from "../../InputLabel-CBuAYyuT.js";
|
|
13
|
+
import { I as x } from "../../Input-CoIrGZAh.js";
|
|
14
|
+
const $ = ({
|
|
15
|
+
label: r,
|
|
16
16
|
mapboxAccessToken: c,
|
|
17
17
|
value: e = "",
|
|
18
|
-
disableAddCoordinate:
|
|
19
|
-
defaultExtent:
|
|
20
|
-
variant:
|
|
18
|
+
disableAddCoordinate: f = !1,
|
|
19
|
+
defaultExtent: s,
|
|
20
|
+
variant: d = "outlined",
|
|
21
|
+
labelPosition: m = "top",
|
|
21
22
|
onChange: C
|
|
22
23
|
}) => {
|
|
23
24
|
const { state: t, action: n } = S({
|
|
24
|
-
label:
|
|
25
|
+
label: r,
|
|
25
26
|
value: e,
|
|
26
27
|
onChange: C
|
|
27
|
-
}),
|
|
28
|
-
/* @__PURE__ */ o(
|
|
29
|
-
/* @__PURE__ */ o(
|
|
28
|
+
}), a = /* @__PURE__ */ o(T, { position: "end", children: e !== "" && /* @__PURE__ */ i(p, { children: [
|
|
29
|
+
/* @__PURE__ */ o(h, { size: "small", onClick: n.onEdit, children: /* @__PURE__ */ o(D, { fontSize: "small" }) }),
|
|
30
|
+
/* @__PURE__ */ o(h, { size: "small", onClick: n.onDelete, children: /* @__PURE__ */ o(I, { fontSize: "small" }) })
|
|
30
31
|
] }) });
|
|
31
|
-
return /* @__PURE__ */ i(
|
|
32
|
+
return /* @__PURE__ */ i(p, { children: [
|
|
33
|
+
m === "top" && r !== void 0 && /* @__PURE__ */ o(w, { sx: { display: "block", mb: 0.5 }, children: r }),
|
|
32
34
|
/* @__PURE__ */ i(O, { children: [
|
|
33
|
-
/* @__PURE__ */ i(
|
|
34
|
-
|
|
35
|
+
/* @__PURE__ */ i(y, { variant: d, children: [
|
|
36
|
+
f === !1 && /* @__PURE__ */ o(
|
|
35
37
|
l,
|
|
36
38
|
{
|
|
37
39
|
color: "inherit",
|
|
38
|
-
startIcon: /* @__PURE__ */ o(
|
|
40
|
+
startIcon: /* @__PURE__ */ o(A, {}),
|
|
39
41
|
onClick: n.onAddCoordinate,
|
|
40
42
|
children: "Add Coordinate"
|
|
41
43
|
}
|
|
@@ -44,7 +46,7 @@ const Z = ({
|
|
|
44
46
|
l,
|
|
45
47
|
{
|
|
46
48
|
color: "inherit",
|
|
47
|
-
startIcon: /* @__PURE__ */ o(
|
|
49
|
+
startIcon: /* @__PURE__ */ o(k, {}),
|
|
48
50
|
onClick: n.onDraw,
|
|
49
51
|
children: "Draw"
|
|
50
52
|
}
|
|
@@ -53,7 +55,7 @@ const Z = ({
|
|
|
53
55
|
l,
|
|
54
56
|
{
|
|
55
57
|
color: "inherit",
|
|
56
|
-
startIcon: /* @__PURE__ */ o(
|
|
58
|
+
startIcon: /* @__PURE__ */ o(u, {}),
|
|
57
59
|
onClick: n.onAddKml,
|
|
58
60
|
children: "Add KML"
|
|
59
61
|
}
|
|
@@ -62,32 +64,32 @@ const Z = ({
|
|
|
62
64
|
l,
|
|
63
65
|
{
|
|
64
66
|
color: "inherit",
|
|
65
|
-
startIcon: /* @__PURE__ */ o(
|
|
67
|
+
startIcon: /* @__PURE__ */ o(u, {}),
|
|
66
68
|
onClick: n.onAddWkt,
|
|
67
69
|
children: "Add WKT"
|
|
68
70
|
}
|
|
69
71
|
)
|
|
70
72
|
] }),
|
|
71
73
|
/* @__PURE__ */ i(
|
|
72
|
-
|
|
74
|
+
M,
|
|
73
75
|
{
|
|
74
76
|
fullWidth: !0,
|
|
75
|
-
variant:
|
|
77
|
+
variant: d,
|
|
76
78
|
contentEditable: !1,
|
|
77
79
|
onClick: n.onClick,
|
|
78
80
|
children: [
|
|
79
|
-
/* @__PURE__ */ o(
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
m === "default" && /* @__PURE__ */ o(j, { shrink: !!e, children: r }),
|
|
82
|
+
d === "standard" && /* @__PURE__ */ o(x, { value: e, readOnly: !0, endAdornment: a }),
|
|
83
|
+
d === "outlined" && /* @__PURE__ */ o(
|
|
82
84
|
K,
|
|
83
85
|
{
|
|
84
|
-
label:
|
|
86
|
+
label: m === "default" ? r : void 0,
|
|
85
87
|
value: e,
|
|
86
88
|
readOnly: !0,
|
|
87
|
-
endAdornment:
|
|
89
|
+
endAdornment: a
|
|
88
90
|
}
|
|
89
91
|
),
|
|
90
|
-
|
|
92
|
+
d === "filled" && /* @__PURE__ */ o(F, { value: e, readOnly: !0, endAdornment: a })
|
|
91
93
|
]
|
|
92
94
|
}
|
|
93
95
|
)
|
|
@@ -101,30 +103,30 @@ const Z = ({
|
|
|
101
103
|
maxWidth: "md",
|
|
102
104
|
children: [
|
|
103
105
|
/* @__PURE__ */ o(B, { children: t.content.title }),
|
|
104
|
-
/* @__PURE__ */ i(
|
|
106
|
+
/* @__PURE__ */ i(G, { children: [
|
|
105
107
|
t.content.action === "ADD" && t.content.type === "COORDINATE" && /* @__PURE__ */ o(
|
|
106
|
-
|
|
108
|
+
b,
|
|
107
109
|
{
|
|
108
110
|
mapboxAccessToken: c,
|
|
109
|
-
defaultExtent:
|
|
111
|
+
defaultExtent: s,
|
|
110
112
|
onCancel: n.modal.close,
|
|
111
113
|
onSubmit: n.onSubmit
|
|
112
114
|
}
|
|
113
115
|
),
|
|
114
116
|
t.content.action === "ADD" && t.content.type === "GEOMETRY" && /* @__PURE__ */ o(
|
|
115
|
-
|
|
117
|
+
g,
|
|
116
118
|
{
|
|
117
119
|
mapId: "map-geo-picker-001",
|
|
118
120
|
mapboxAccessToken: c,
|
|
119
|
-
defaultExtent:
|
|
121
|
+
defaultExtent: s,
|
|
120
122
|
onCancel: n.modal.close,
|
|
121
123
|
onSubmit: n.onSubmit
|
|
122
124
|
}
|
|
123
125
|
),
|
|
124
|
-
t.content.action === "ADD" && t.content.type === "KML" && /* @__PURE__ */ o(
|
|
126
|
+
t.content.action === "ADD" && t.content.type === "KML" && /* @__PURE__ */ o(L, { onCancel: n.modal.close, onSubmit: n.onSubmit }),
|
|
125
127
|
t.content.action === "ADD" && t.content.type === "WKT" && /* @__PURE__ */ o(W, { onCancel: n.modal.close, onSubmit: n.onSubmit }),
|
|
126
128
|
t.content.action === "EDIT" && !!e && /* @__PURE__ */ o(
|
|
127
|
-
|
|
129
|
+
E,
|
|
128
130
|
{
|
|
129
131
|
mapId: "map-geo-edit-001",
|
|
130
132
|
value: e,
|
|
@@ -140,5 +142,5 @@ const Z = ({
|
|
|
140
142
|
] });
|
|
141
143
|
};
|
|
142
144
|
export {
|
|
143
|
-
|
|
145
|
+
$ as GeometryPicker
|
|
144
146
|
};
|
|
@@ -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-CGNxsLVm.js";
|
|
10
10
|
import "./styled.js";
|
|
11
11
|
export {
|
|
12
12
|
s as default
|