@hybridcore/ui 1.5.87 → 1.5.89
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 +65 -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/charts/candlestick/logic.js +6 -6
- package/dist/components/charts/candlestick/styled.js +1 -1
- package/dist/components/charts/highlighting-line-data/logic.js +1 -1
- package/dist/components/charts/highlighting-line-data/styled.js +1 -1
- 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/metric-card/MetricChart.js +210 -192
- package/dist/components/metric-card/index.js +101 -76
- package/dist/components/metric-card/logic.js +142 -65
- package/dist/components/metric-card/styled.js +69 -46
- package/dist/components/paginated-list/logic.js +13 -13
- package/dist/components/paginated-list/styled.js +12 -12
- package/dist/components/profile-card/logic.js +5 -5
- package/dist/components/profile-card/styled.js +4 -4
- 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/components/widget/index.js +4 -0
- package/dist/components/widget/styled.js +38 -0
- 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 +397 -122
- package/dist/main.js +14 -12
- package/dist/{property-list-form-BvnaooEW.js → property-list-form-C5hcK2y2.js} +4 -4
- package/package.json +4 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { useThemeProps as
|
|
1
|
+
import { useThemeProps as E } from "@mui/material";
|
|
2
2
|
import { useState as g } from "react";
|
|
3
|
-
const
|
|
4
|
-
const i =
|
|
5
|
-
title:
|
|
3
|
+
const T = (l) => {
|
|
4
|
+
const i = E({ props: l, name: "HCPaginatedList" }), {
|
|
5
|
+
title: m,
|
|
6
6
|
data: a = [],
|
|
7
7
|
payload: e,
|
|
8
|
-
totalCount:
|
|
8
|
+
totalCount: u,
|
|
9
9
|
onChange: t,
|
|
10
10
|
onItemClick: w,
|
|
11
11
|
sx: d,
|
|
12
12
|
...h
|
|
13
|
-
} = i, [
|
|
13
|
+
} = i, [C, p] = g(0), [L, f] = g(5), [b, P] = g([]), r = (e == null ? void 0 : e.pageNumber) !== void 0 ? e.pageNumber : C, n = (e == null ? void 0 : e.rows) !== void 0 ? e.rows : L, v = (s, o) => {
|
|
14
14
|
p(o), t && t({ ...e, pageNumber: o, rows: n });
|
|
15
15
|
}, x = (s) => {
|
|
16
16
|
const o = parseInt(s.target.value, 10);
|
|
17
|
-
|
|
17
|
+
f(o), p(0), t && t({ ...e, pageNumber: 0, rows: o });
|
|
18
18
|
}, N = (s) => (o) => {
|
|
19
19
|
o.stopPropagation(), P((c) => [...c, s]);
|
|
20
20
|
}, R = (s) => (o) => {
|
|
21
|
-
o.stopPropagation(), P((c) => c.filter((
|
|
22
|
-
}, I = t ?
|
|
21
|
+
o.stopPropagation(), P((c) => c.filter((D) => D !== s));
|
|
22
|
+
}, I = t ? u || 0 : a.length, S = t ? a : a.slice(r * n, (r + 1) * n), k = {
|
|
23
23
|
...i
|
|
24
24
|
};
|
|
25
25
|
return {
|
|
26
|
-
title:
|
|
26
|
+
title: m,
|
|
27
27
|
data: a,
|
|
28
|
-
displayData:
|
|
28
|
+
displayData: S,
|
|
29
29
|
count: I,
|
|
30
30
|
page: r,
|
|
31
31
|
rowsPerPage: n,
|
|
@@ -35,11 +35,11 @@ const _ = (l) => {
|
|
|
35
35
|
readMore: N,
|
|
36
36
|
showLess: R,
|
|
37
37
|
onItemClick: w,
|
|
38
|
-
ownerState:
|
|
38
|
+
ownerState: k,
|
|
39
39
|
sx: d,
|
|
40
40
|
other: h
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
T as usePaginatedListLogic
|
|
45
45
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { styled as t, Card as
|
|
2
|
-
const s = t(
|
|
3
|
-
name: "
|
|
1
|
+
import { styled as t, Card as i, CardHeader as a, CardContent as n, List as o } from "@mui/material";
|
|
2
|
+
const s = t(i, {
|
|
3
|
+
name: "HCPaginatedList",
|
|
4
4
|
slot: "Root"
|
|
5
5
|
})(() => ({
|
|
6
6
|
display: "flex",
|
|
7
7
|
flexDirection: "column",
|
|
8
8
|
height: "100%"
|
|
9
9
|
})), r = t(a, {
|
|
10
|
-
name: "
|
|
10
|
+
name: "HCPaginatedList",
|
|
11
11
|
slot: "Header"
|
|
12
|
-
})(({ theme:
|
|
13
|
-
padding:
|
|
14
|
-
paddingBottom:
|
|
12
|
+
})(({ theme: e }) => ({
|
|
13
|
+
padding: e.spacing(3),
|
|
14
|
+
paddingBottom: e.spacing(2),
|
|
15
15
|
"& .MuiCardHeader-title": {
|
|
16
16
|
fontSize: "1rem",
|
|
17
17
|
fontWeight: 500
|
|
@@ -20,7 +20,7 @@ const s = t(e, {
|
|
|
20
20
|
fontSize: ".875rem"
|
|
21
21
|
}
|
|
22
22
|
})), l = t(n, {
|
|
23
|
-
name: "
|
|
23
|
+
name: "HCPaginatedList",
|
|
24
24
|
slot: "Content"
|
|
25
25
|
})(() => ({
|
|
26
26
|
padding: "0px !important",
|
|
@@ -29,16 +29,16 @@ const s = t(e, {
|
|
|
29
29
|
flex: 1,
|
|
30
30
|
overflow: "hidden"
|
|
31
31
|
})), g = t(o, {
|
|
32
|
-
name: "
|
|
32
|
+
name: "HCPaginatedList",
|
|
33
33
|
slot: "List"
|
|
34
34
|
})(() => ({
|
|
35
35
|
flex: 1,
|
|
36
36
|
overflowY: "auto"
|
|
37
37
|
})), p = t("div", {
|
|
38
|
-
name: "
|
|
38
|
+
name: "HCPaginatedList",
|
|
39
39
|
slot: "Pagination"
|
|
40
|
-
})(({ theme:
|
|
41
|
-
borderTop: `1px solid ${
|
|
40
|
+
})(({ theme: e }) => ({
|
|
41
|
+
borderTop: `1px solid ${e.palette.divider}`
|
|
42
42
|
}));
|
|
43
43
|
export {
|
|
44
44
|
l as PaginatedListContent,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useThemeProps as g } from "@mui/material";
|
|
2
2
|
import { useMemo as n } from "react";
|
|
3
|
-
import { getTemplateHierarchy as
|
|
4
|
-
const
|
|
5
|
-
const a = g({ props: c, name: "
|
|
3
|
+
import { getTemplateHierarchy as C } from "../../utils/ontology.js";
|
|
4
|
+
const P = (c) => {
|
|
5
|
+
const a = g({ props: c, name: "HCProfileCard" }), { instance: t, templates: e, sx: m, ...i } = a, l = t.profileImageUrl, o = e.get(t.template.id), f = o == null ? void 0 : o.icon, h = n(() => {
|
|
6
6
|
const r = e.get(t.template.id);
|
|
7
|
-
return r ?
|
|
7
|
+
return r ? C(e, r) : [];
|
|
8
8
|
}, [e, t.template.id]), u = n(() => {
|
|
9
9
|
const r = /* @__PURE__ */ new Map();
|
|
10
10
|
return e && e.forEach((s) => {
|
|
@@ -29,5 +29,5 @@ const $ = (c) => {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
P as useProfileCardLogic
|
|
33
33
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styled as e, Container as i, Box as a } from "@mui/material";
|
|
2
2
|
const d = e(i, {
|
|
3
|
-
name: "
|
|
3
|
+
name: "HCProfileCard",
|
|
4
4
|
slot: "Root",
|
|
5
5
|
overridesResolver: (r, o) => o.root
|
|
6
6
|
})(({ theme: r }) => ({
|
|
@@ -12,7 +12,7 @@ const d = e(i, {
|
|
|
12
12
|
boxShadow: r.shadows[1],
|
|
13
13
|
backgroundColor: r.palette.background.paper
|
|
14
14
|
})), l = e("img", {
|
|
15
|
-
name: "
|
|
15
|
+
name: "HCProfileCard",
|
|
16
16
|
slot: "Image",
|
|
17
17
|
overridesResolver: (r, o) => o.image
|
|
18
18
|
})(({ theme: r }) => ({
|
|
@@ -21,7 +21,7 @@ const d = e(i, {
|
|
|
21
21
|
height: 200,
|
|
22
22
|
marginBottom: r.spacing(2)
|
|
23
23
|
})), t = e(a, {
|
|
24
|
-
name: "
|
|
24
|
+
name: "HCProfileCard",
|
|
25
25
|
slot: "Hierarchy",
|
|
26
26
|
overridesResolver: (r, o) => o.hierarchy
|
|
27
27
|
})(({ theme: r }) => ({
|
|
@@ -29,7 +29,7 @@ const d = e(i, {
|
|
|
29
29
|
marginBottom: r.spacing(2),
|
|
30
30
|
textAlign: "left"
|
|
31
31
|
})), n = e(a, {
|
|
32
|
-
name: "
|
|
32
|
+
name: "HCProfileCard",
|
|
33
33
|
slot: "Variables",
|
|
34
34
|
overridesResolver: (r, o) => o.variables
|
|
35
35
|
})(({ theme: r }) => ({
|
|
@@ -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-CGNxsLVm.js";
|
|
9
9
|
import { RangeSelector as me } from "../range-selector/index.js";
|
|
10
10
|
const $e = ({
|
|
11
11
|
open: F,
|
|
@@ -3,7 +3,7 @@ import { Box as f, TextField as u } from "@mui/material";
|
|
|
3
3
|
import x from "../number-range/index.js";
|
|
4
4
|
import I from "../string-range/index.js";
|
|
5
5
|
import C from "../geometry-range/index.js";
|
|
6
|
-
import { D as c } from "../../../../index-
|
|
6
|
+
import { D as c } from "../../../../index-SpeaLUQD.js";
|
|
7
7
|
function j({
|
|
8
8
|
value: n,
|
|
9
9
|
innerType: e,
|
|
@@ -1,80 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
const [
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Box as r, TextField as u, FormControl as V, InputLabel as y, Select as C, MenuItem as h } from "@mui/material";
|
|
3
|
+
import { useState as p } from "react";
|
|
4
|
+
import I from "lodash";
|
|
5
|
+
function j({ value: t, onChange: i, variant: s = "outlined" }) {
|
|
6
|
+
const [o, x] = p(
|
|
7
7
|
"discreteList" in t && t.discreteList.length > 0 ? "list" : "range"
|
|
8
|
-
), [
|
|
8
|
+
), [f, b] = p(
|
|
9
9
|
"discreteList" in t ? t.discreteList.join(",") : ""
|
|
10
|
-
),
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
const a = l.target.value,
|
|
14
|
-
|
|
15
|
-
discreteList:
|
|
10
|
+
), g = (l) => {
|
|
11
|
+
x(l.target.value), l.target.value === "list" ? i({ discreteList: [] }) : i({ minValue: "", maxValue: "" });
|
|
12
|
+
}, L = (l) => {
|
|
13
|
+
const a = l.target.value, d = I.trimEnd(a, ",").split(",").filter((m) => m).map((m) => Number(m.trimStart()));
|
|
14
|
+
b(a), i({
|
|
15
|
+
discreteList: d
|
|
16
16
|
});
|
|
17
|
-
},
|
|
18
|
-
const { name: a, value:
|
|
17
|
+
}, c = (l) => {
|
|
18
|
+
const { name: a, value: d } = l.target;
|
|
19
19
|
i({
|
|
20
20
|
...t,
|
|
21
|
-
[a]: Number(
|
|
21
|
+
[a]: Number(d)
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
|
|
24
|
+
return /* @__PURE__ */ n(r, { display: "flex", width: "100%", children: [
|
|
25
|
+
/* @__PURE__ */ e(r, { flex: 2, children: o === "list" ? /* @__PURE__ */ e(
|
|
26
|
+
u,
|
|
27
27
|
{
|
|
28
28
|
size: "small",
|
|
29
29
|
fullWidth: !0,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
variant: s,
|
|
31
|
+
value: f,
|
|
32
|
+
onChange: L,
|
|
32
33
|
inputProps: {
|
|
33
34
|
placeholder: "Comma separated number list"
|
|
34
35
|
},
|
|
35
36
|
title: "Add list values with the comma (,) separated numbers"
|
|
36
37
|
}
|
|
37
|
-
) : /* @__PURE__ */
|
|
38
|
+
) : /* @__PURE__ */ n(r, { display: "flex", width: "100%", children: [
|
|
38
39
|
/* @__PURE__ */ e(
|
|
39
|
-
|
|
40
|
+
u,
|
|
40
41
|
{
|
|
41
42
|
name: "minValue",
|
|
42
43
|
label: "Min",
|
|
43
44
|
type: "number",
|
|
44
45
|
size: "small",
|
|
46
|
+
variant: s,
|
|
45
47
|
fullWidth: !0,
|
|
46
48
|
sx: { mr: 0.25 },
|
|
47
49
|
value: t.minValue,
|
|
48
|
-
onChange:
|
|
50
|
+
onChange: c
|
|
49
51
|
}
|
|
50
52
|
),
|
|
51
53
|
/* @__PURE__ */ e(
|
|
52
|
-
|
|
54
|
+
u,
|
|
53
55
|
{
|
|
54
56
|
name: "maxValue",
|
|
55
57
|
label: "Max",
|
|
56
58
|
type: "number",
|
|
57
59
|
size: "small",
|
|
60
|
+
variant: s,
|
|
58
61
|
fullWidth: !0,
|
|
59
62
|
sx: { ml: 0.25 },
|
|
60
63
|
value: t.maxValue,
|
|
61
|
-
onChange:
|
|
64
|
+
onChange: c
|
|
62
65
|
}
|
|
63
66
|
)
|
|
64
67
|
] }) }),
|
|
65
|
-
/* @__PURE__ */ e(
|
|
66
|
-
/* @__PURE__ */ e(
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
68
|
+
/* @__PURE__ */ e(r, { flex: 1, ml: 0.5, children: /* @__PURE__ */ n(V, { fullWidth: !0, size: "small", variant: s, children: [
|
|
69
|
+
/* @__PURE__ */ e(y, { id: "mode-label", children: "Input Type" }),
|
|
70
|
+
/* @__PURE__ */ n(
|
|
71
|
+
C,
|
|
69
72
|
{
|
|
70
73
|
labelId: "mode-label",
|
|
71
74
|
id: "mode",
|
|
72
|
-
value:
|
|
75
|
+
value: o,
|
|
73
76
|
label: "Input Type",
|
|
74
|
-
onChange:
|
|
77
|
+
onChange: g,
|
|
75
78
|
children: [
|
|
76
|
-
/* @__PURE__ */ e(
|
|
77
|
-
/* @__PURE__ */ e(
|
|
79
|
+
/* @__PURE__ */ e(h, { value: "range", children: "Range" }),
|
|
80
|
+
/* @__PURE__ */ e(h, { value: "list", children: "Discrete List" })
|
|
78
81
|
]
|
|
79
82
|
}
|
|
80
83
|
)
|
|
@@ -82,5 +85,5 @@ function z({ value: t, onChange: i }) {
|
|
|
82
85
|
] });
|
|
83
86
|
}
|
|
84
87
|
export {
|
|
85
|
-
|
|
88
|
+
j as default
|
|
86
89
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { TextField as
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
function
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { TextField as d } from "@mui/material";
|
|
3
|
+
import { useState as p } from "react";
|
|
4
|
+
import h from "lodash";
|
|
5
|
+
function C({ value: i, onChange: l, variant: a = "outlined" }) {
|
|
6
6
|
var e;
|
|
7
|
-
const [
|
|
7
|
+
const [r, o] = p(
|
|
8
8
|
((e = i.listOfPossibleValues) == null ? void 0 : e.join(",")) || ""
|
|
9
9
|
);
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
10
|
+
return /* @__PURE__ */ u(
|
|
11
|
+
d,
|
|
12
12
|
{
|
|
13
13
|
size: "small",
|
|
14
14
|
fullWidth: !0,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
variant: a,
|
|
16
|
+
value: r,
|
|
17
|
+
onChange: (n) => {
|
|
18
|
+
const s = n.target.value, m = h.trimEnd(s, ",").split(",").filter((t) => t).map((t) => t.trimStart());
|
|
19
|
+
o(s), l({
|
|
20
|
+
listOfPossibleValues: m
|
|
20
21
|
});
|
|
21
22
|
},
|
|
22
23
|
inputProps: {
|
|
@@ -27,5 +28,5 @@ function x({ value: i, onChange: a }) {
|
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
C as default
|
|
31
32
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, Fragment as a } from "react/jsx-runtime";
|
|
2
2
|
import n from "lodash";
|
|
3
3
|
import f from "./components/composite-list-range/index.js";
|
|
4
|
-
import { D as g } from "../../index-
|
|
4
|
+
import { D as g } from "../../index-SpeaLUQD.js";
|
|
5
5
|
import u from "./components/geometry-range/index.js";
|
|
6
6
|
import l from "./components/number-range/index.js";
|
|
7
7
|
import s from "./components/string-range/index.js";
|
|
@@ -2,8 +2,8 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import k, { useState as O } from "react";
|
|
3
3
|
import { Close as m, Search as u } from "@mui/icons-material";
|
|
4
4
|
import { FilledInput as b, Input as R } from "@mui/material";
|
|
5
|
-
import { F as _, I as j } from "../../InputLabel-
|
|
6
|
-
import { O as v } from "../../OutlinedInput-
|
|
5
|
+
import { F as _, I as j } from "../../InputLabel-CBuAYyuT.js";
|
|
6
|
+
import { O as v } from "../../OutlinedInput-B-iZoc9l.js";
|
|
7
7
|
import { I as g } from "../../InputAdornment-B7qEA4kN.js";
|
|
8
8
|
import { I as t } from "../../IconButton-DJ-31-Fd.js";
|
|
9
9
|
const z = ({
|
|
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { DataGrid as d } from "@mui/x-data-grid";
|
|
3
3
|
import { A as n, a as m, d as s } from "../../../../Add-CMz4N2zT.js";
|
|
4
4
|
import p from "./property-list-columns.js";
|
|
5
|
-
import { a as c } from "../../../../property-list-form-
|
|
5
|
+
import { a as c } from "../../../../property-list-form-C5hcK2y2.js";
|
|
6
6
|
import u from "./property-list-logic.js";
|
|
7
7
|
import { B as f } from "../../../../Box-B1AVyJ_s.js";
|
|
8
8
|
import { T as y } from "../../../../Typography-D1t7XuLN.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "lodash";
|
|
4
|
-
import { a as b } from "../../../../property-list-form-
|
|
4
|
+
import { a as b } from "../../../../property-list-form-C5hcK2y2.js";
|
|
5
5
|
import "../../../../constants/index.js";
|
|
6
|
-
import "../../../../TextField-
|
|
7
|
-
import "../../../../InputLabel-
|
|
8
|
-
import "../../../../Select-
|
|
6
|
+
import "../../../../TextField-BQ8a50fA.js";
|
|
7
|
+
import "../../../../InputLabel-CBuAYyuT.js";
|
|
8
|
+
import "../../../../Select-t3ewnSdf.js";
|
|
9
9
|
import "../../../../MenuItem-C6qlUyV3.js";
|
|
10
|
-
import "../../../../FormControlLabel-
|
|
10
|
+
import "../../../../FormControlLabel-BrdX4R71.js";
|
|
11
11
|
import "../../../../Checkbox-CrU2hpWB.js";
|
|
12
12
|
import "../../../../Box-B1AVyJ_s.js";
|
|
13
13
|
import "../../../../Button-eqWvpDuh.js";
|
|
@@ -2,10 +2,10 @@ import V, { jsxs as i, Fragment as S, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "react";
|
|
3
3
|
import { r as C, i as g } from "../../../../createSvgIcon-DLPYMuH1.js";
|
|
4
4
|
import { RECOGNITION_PROPERTY_OWNER_TYPE as h, RECOGNITION_PROPERTY_TYPE as T, RECOGNITION_PROPERTY_TERM_MATCH as v } from "../../../../constants/index.js";
|
|
5
|
-
import { F as c, I as u } from "../../../../InputLabel-
|
|
6
|
-
import { S as d } from "../../../../Select-
|
|
5
|
+
import { F as c, I as u } from "../../../../InputLabel-CBuAYyuT.js";
|
|
6
|
+
import { S as d } from "../../../../Select-t3ewnSdf.js";
|
|
7
7
|
import { M as m } from "../../../../MenuItem-C6qlUyV3.js";
|
|
8
|
-
import { T as b } from "../../../../TextField-
|
|
8
|
+
import { T as b } from "../../../../TextField-BQ8a50fA.js";
|
|
9
9
|
import { B as M } from "../../../../Box-B1AVyJ_s.js";
|
|
10
10
|
import { B as y } from "../../../../Button-eqWvpDuh.js";
|
|
11
11
|
var p = {}, q = g;
|
|
@@ -9,9 +9,9 @@ import { FormLabel as L, Button as g } from "@mui/material";
|
|
|
9
9
|
import { getNestedChildrenFromMap as _ } from "../../utils/ontology.js";
|
|
10
10
|
import { TreeSelect as w } from "../tree-select/index.js";
|
|
11
11
|
import A from "./components/select-icon/index.js";
|
|
12
|
-
import { T as m } from "../../TextField-
|
|
13
|
-
import { F as h } from "../../property-list-form-
|
|
14
|
-
import { F as d } from "../../FormControlLabel-
|
|
12
|
+
import { T as m } from "../../TextField-BQ8a50fA.js";
|
|
13
|
+
import { F as h } from "../../property-list-form-C5hcK2y2.js";
|
|
14
|
+
import { F as d } from "../../FormControlLabel-BrdX4R71.js";
|
|
15
15
|
import { C as c } from "../../Checkbox-CrU2hpWB.js";
|
|
16
16
|
import { B as p } from "../../Box-B1AVyJ_s.js";
|
|
17
17
|
function B(e, x) {
|
|
@@ -5,15 +5,15 @@ import { Typography as c, FormLabel as Y, FormGroup as D, Button as W } from "@m
|
|
|
5
5
|
import { DatePicker as C } from "@mui/x-date-pickers";
|
|
6
6
|
import f from "dayjs";
|
|
7
7
|
import { B as r } from "../../Box-B1AVyJ_s.js";
|
|
8
|
-
import { T as b } from "../../TextField-
|
|
9
|
-
import { F as O } from "../../FormControlLabel-
|
|
8
|
+
import { T as b } from "../../TextField-BQ8a50fA.js";
|
|
9
|
+
import { F as O } from "../../FormControlLabel-BrdX4R71.js";
|
|
10
10
|
import { C as z } from "../../Checkbox-CrU2hpWB.js";
|
|
11
|
-
import { F as B } from "../../InputLabel-
|
|
11
|
+
import { F as B } from "../../InputLabel-CBuAYyuT.js";
|
|
12
12
|
const R = ({
|
|
13
13
|
property: e,
|
|
14
14
|
value: a,
|
|
15
15
|
size: d = "medium",
|
|
16
|
-
variant: u,
|
|
16
|
+
variant: u = "outlined",
|
|
17
17
|
onChange: p
|
|
18
18
|
}) => {
|
|
19
19
|
var I, S, y, V, M;
|
|
@@ -1,76 +1,78 @@
|
|
|
1
|
-
import { jsxs as h, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { TreeViewFilter as
|
|
4
|
-
import
|
|
5
|
-
import { flattenNestedTemplates as
|
|
6
|
-
import { F as
|
|
7
|
-
import { S as
|
|
8
|
-
import { M as
|
|
9
|
-
import { D as
|
|
10
|
-
import { B as
|
|
11
|
-
const
|
|
12
|
-
data:
|
|
13
|
-
label:
|
|
1
|
+
import { jsxs as h, Fragment as _, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { TreeViewFilter as b } from "../treeview-filter/index.js";
|
|
4
|
+
import i from "lodash";
|
|
5
|
+
import { flattenNestedTemplates as A } from "../../utils/ontology.js";
|
|
6
|
+
import { a as M, F as j, I as k } from "../../InputLabel-CBuAYyuT.js";
|
|
7
|
+
import { S as B } from "../../Select-t3ewnSdf.js";
|
|
8
|
+
import { M as L } from "../../MenuItem-C6qlUyV3.js";
|
|
9
|
+
import { D as w, a as y, b as N } from "../../DialogContent-CqTojymQ.js";
|
|
10
|
+
import { B as R } from "../../Button-eqWvpDuh.js";
|
|
11
|
+
const Z = ({
|
|
12
|
+
data: g,
|
|
13
|
+
label: a,
|
|
14
14
|
selected: r,
|
|
15
15
|
disabled: S,
|
|
16
|
-
idKey:
|
|
17
|
-
variant:
|
|
16
|
+
idKey: d = "id",
|
|
17
|
+
variant: x = "outlined",
|
|
18
|
+
labelPosition: c = "top",
|
|
18
19
|
onChange: D
|
|
19
20
|
}) => {
|
|
20
|
-
const [
|
|
21
|
-
(
|
|
22
|
-
) : [], [r,
|
|
23
|
-
D(
|
|
24
|
-
},
|
|
25
|
-
|
|
21
|
+
const [E, v] = m.useState(!1), [F, f] = m.useState([]), u = A(g), p = m.useMemo(() => i.isArray(r) ? r.map(
|
|
22
|
+
(t) => u.find((e) => String(i.get(e, d)) === t)
|
|
23
|
+
) : [], [r, u]), T = (t, e) => {
|
|
24
|
+
D(t, e);
|
|
25
|
+
}, I = () => {
|
|
26
|
+
v(!0), W();
|
|
26
27
|
}, C = () => {
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
...
|
|
28
|
+
v(!1);
|
|
29
|
+
}, O = (t, e, l) => {
|
|
30
|
+
f(l ? (s) => [
|
|
31
|
+
...s.filter((o) => o !== e),
|
|
31
32
|
e
|
|
32
|
-
] : (
|
|
33
|
-
},
|
|
34
|
-
const
|
|
33
|
+
] : (s) => s.filter((o) => o !== e));
|
|
34
|
+
}, W = () => {
|
|
35
|
+
const t = [];
|
|
35
36
|
p.length > 0 && p.forEach((e) => {
|
|
36
|
-
const l = e == null ? void 0 : e.parentKeys,
|
|
37
|
-
|
|
38
|
-
}),
|
|
37
|
+
const l = e == null ? void 0 : e.parentKeys, s = u.filter((o) => l == null ? void 0 : l.includes(o.templateKey)).map((o) => String(i.get(o, d)));
|
|
38
|
+
t.push(...s);
|
|
39
|
+
}), f(t);
|
|
39
40
|
};
|
|
40
|
-
return /* @__PURE__ */ h(
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
41
|
+
return /* @__PURE__ */ h(_, { children: [
|
|
42
|
+
c === "top" && a !== void 0 && /* @__PURE__ */ n(M, { sx: { display: "block", mb: 0.5 }, children: a }),
|
|
43
|
+
/* @__PURE__ */ h(j, { variant: x, fullWidth: !0, children: [
|
|
44
|
+
c === "default" && a !== void 0 && /* @__PURE__ */ n(k, { id: "select-label", children: a }),
|
|
45
|
+
/* @__PURE__ */ n(
|
|
46
|
+
B,
|
|
45
47
|
{
|
|
46
|
-
label: c,
|
|
47
|
-
variant:
|
|
48
|
+
label: c === "default" ? a : void 0,
|
|
49
|
+
variant: x,
|
|
48
50
|
id: "select",
|
|
49
51
|
labelId: "select-label",
|
|
50
52
|
value: r,
|
|
51
53
|
open: !1,
|
|
52
|
-
onOpen:
|
|
53
|
-
children: p.length > 0 && p.map((
|
|
54
|
+
onOpen: I,
|
|
55
|
+
children: p.length > 0 && p.map((t, e) => /* @__PURE__ */ n(L, { value: i.get(t, d) ?? "", children: t == null ? void 0 : t.name }, e))
|
|
54
56
|
}
|
|
55
57
|
)
|
|
56
58
|
] }),
|
|
57
|
-
/* @__PURE__ */ h(
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
59
|
+
/* @__PURE__ */ h(w, { open: E, onClose: C, fullWidth: !0, maxWidth: "sm", children: [
|
|
60
|
+
/* @__PURE__ */ n(y, { sx: { p: 1, pt: 2 }, children: /* @__PURE__ */ n(
|
|
61
|
+
b,
|
|
60
62
|
{
|
|
61
|
-
data:
|
|
62
|
-
selected:
|
|
63
|
+
data: g,
|
|
64
|
+
selected: i.isArray(r) ? r : void 0,
|
|
63
65
|
disabled: S,
|
|
64
|
-
expanded:
|
|
65
|
-
idKey:
|
|
66
|
-
onExpansionToggle:
|
|
66
|
+
expanded: F,
|
|
67
|
+
idKey: d,
|
|
68
|
+
onExpansionToggle: O,
|
|
67
69
|
onChange: T
|
|
68
70
|
}
|
|
69
71
|
) }),
|
|
70
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ n(N, { children: /* @__PURE__ */ n(R, { onClick: C, variant: "contained", fullWidth: !0, children: "OK" }) })
|
|
71
73
|
] })
|
|
72
74
|
] });
|
|
73
75
|
};
|
|
74
76
|
export {
|
|
75
|
-
|
|
77
|
+
Z as TreeSelect
|
|
76
78
|
};
|