@hybridcore/ui 1.3.6 → 1.4.0
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/AccordionDetails-CGs6GZQK.js +454 -0
- package/dist/Add-eepk2WTM.js +379 -0
- package/dist/Box-BPyg-Ybm.js +70 -0
- package/dist/Button-DLwB_sKd.js +354 -0
- package/dist/{ButtonBase-D6qhsxB0.js → ButtonBase-D0qccOVb.js} +6 -5
- package/dist/{CardContent-B8hqgH-I.js → CardContent-DFsCCOWk.js} +4 -4
- package/dist/{Checkbox-BFWhj3s-.js → Checkbox-qy3cjvnb.js} +134 -195
- package/dist/{Collapse-D_TjnyE5.js → Collapse-CL6LGGZw.js} +68 -75
- package/dist/Delete-OHEw9lDi.js +22 -0
- package/dist/DialogContent-CxOSq6h9.js +519 -0
- package/dist/FormControlLabel-D9KFjcIx.js +193 -0
- package/dist/{IconButton-D8bwME9t.js → IconButton-BaiyAtmS.js} +5 -5
- package/dist/{Input-Dxzguyp5.js → Input-CmCkXczh.js} +6 -6
- package/dist/{InputAdornment-B8ERE7Zv.js → InputAdornment-CZUPEeia.js} +5 -5
- package/dist/{FormControl-BMRUQKHh.js → InputLabel-CWkW8NtU.js} +316 -316
- package/dist/{List-DEWyK9IO.js → List-PpNAWJ_I.js} +4 -4
- package/dist/ListItem-CZbZ91vp.js +428 -0
- package/dist/{MenuItem-DstAFfik.js → MenuItem-D-INSvZa.js} +7 -7
- package/dist/{Modal-DNGEQJ1M.js → Modal-KrI5qFIq.js} +61 -57
- package/dist/{OutlinedInput-w2Cj9STF.js → OutlinedInput-DkIUD30e.js} +6 -6
- package/dist/{Paper-BseeergJ.js → Paper-btu3j72o.js} +5 -5
- package/dist/{Select-NDq3WyLt.js → Select-ClaBvSqf.js} +20 -18
- package/dist/Tabs-BzelDJKy.js +787 -0
- package/dist/TextField-D87qTh1k.js +457 -0
- package/dist/Typography-Bm7PFqUT.js +176 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/components/card/index.js +6 -6
- package/dist/components/card/styled.js +1 -1
- package/dist/components/collapsible-card/style.js +20 -466
- package/dist/components/confirm/dialog.js +8 -149
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +7 -7
- package/dist/components/context-menu/index.js +191 -604
- package/dist/components/data-security-selectors/dissemination-list/index.js +12 -6
- package/dist/components/data-security-selectors/security-level/index.js +46 -45
- package/dist/components/date-time-picker/index.js +85 -64
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +16 -16
- package/dist/components/geometry-picker/geometry/index.js +35 -35
- package/dist/components/geometry-picker/index.js +60 -56
- package/dist/components/geometry-picker/kml/index.js +14 -14
- package/dist/components/geometry-picker/map/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +38 -37
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +63 -59
- package/dist/components/geometry-picker/parser/logic.js +33 -32
- package/dist/components/geometry-picker/styled.js +22 -14
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button/styled.js +0 -2
- package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/index.js +2 -2
- package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +15 -6
- package/dist/components/instance-form/components/variable/index.js +19 -0
- package/dist/components/instance-form/components/variables/index.js +40 -0
- package/dist/components/{data-management/instance-form → instance-form}/index.js +174 -155
- package/dist/components/instance-hierarchy-table/index.js +58 -0
- package/dist/components/instance-hierarchy-table/styled.js +29 -0
- package/dist/components/instance-table/index.js +125 -0
- package/dist/components/instance-table/styled.js +13 -0
- package/dist/components/map/helpers/ol.js +1 -1
- package/dist/components/map/index.js +1 -1
- package/dist/components/map/logic.js +1 -1
- package/dist/components/map/styled.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/property-mapping/index.js +558 -0
- package/dist/components/range-selector/components/composite-list-range/index.js +81 -0
- package/dist/components/range-selector/components/date-range/index.js +9 -0
- package/dist/components/range-selector/components/geometry-range/index.js +26 -0
- package/dist/components/range-selector/components/number-range/index.js +86 -0
- package/dist/components/range-selector/components/string-range/index.js +31 -0
- package/dist/components/range-selector/index.js +59 -0
- package/dist/components/search-input/index.js +4 -4
- package/dist/components/tabs/appleTabs.style.js +55 -0
- package/dist/components/tabs/index.js +93 -0
- package/dist/components/tabs/tab-panel.js +18 -0
- package/dist/components/template-form/components/catalogue-instance-selector/index.js +158 -0
- package/dist/components/template-form/components/property-list/index.js +72 -0
- package/dist/components/template-form/components/property-list/property-list-columns.js +125 -0
- package/dist/components/template-form/components/property-list/property-list-form.js +16 -0
- package/dist/components/template-form/components/property-list/property-list-logic.js +66 -0
- package/dist/components/template-form/components/property-list/types.js +8 -0
- package/dist/components/template-form/components/recognition-property-list/index.js +69 -0
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +50 -0
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +174 -0
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-logic.js +64 -0
- package/dist/components/template-form/components/recognition-property-list/types.js +8 -0
- package/dist/components/template-form/components/select-icon/index.js +186 -0
- package/dist/components/template-form/components/select-icon/styled.js +76 -0
- package/dist/components/template-form/index.js +338 -0
- package/dist/components/template-property-filters/property.js +48 -46
- package/dist/components/tree-select/index.js +51 -49
- package/dist/components/tree-select/styled.js +2 -2
- package/dist/components/treeview-filter/index.js +8 -8
- package/dist/components/treeview-filter/item/index.js +1 -1
- package/dist/components/treeview-filter/item-label/index.js +18 -17
- package/dist/constants/index.js +41 -0
- package/dist/{createStyled-B96gjom1.js → createStyled-BzvgQjjR.js} +487 -464
- package/dist/createSvgIcon-Cfm1LkEe.js +73 -0
- package/dist/{createSvgIcon-BNrb7rDY.js → createSvgIcon-DEXLbMwp.js} +62 -90
- package/dist/dialog-v5-nL5yy.js +153 -0
- package/dist/{exactProp-CI_rjX83.js → exactProp-DkmnwNVS.js} +3 -3
- package/dist/extendSxProp-qqdkfHzS.js +30 -0
- package/dist/{index-CSfSVkKj.js → index-B0JPwFI9.js} +6 -5
- package/dist/index-C1fczHEW.js +11042 -0
- package/dist/index-DPf5olog.js +288 -0
- package/dist/{index-JrtqxUdI.js → index-DlnzUkwe.js} +1 -1
- package/dist/{listItemTextClasses-CFiI_U7B.js → listItemTextClasses-DsHGzpPM.js} +2 -2
- package/dist/main.d.ts +569 -81
- package/dist/main.js +157 -157
- package/dist/{ol-BUKJ1urU.js → ol-CHaVTXvL.js} +24 -24
- package/dist/property-list-form-BfP9gzSo.js +391 -0
- package/dist/requirePropFactory-BjhhI-AW.js +18 -0
- package/dist/{styled-cPJbqF0E.js → styled-LNCprp4n.js} +24 -22
- package/dist/unsupportedProp-BuVD30Gh.js +9 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/{useTheme-C-T6Qisa.js → useTheme-DBiahn6p.js} +2 -2
- package/dist/{useThemeProps-DeftUmqJ.js → useThemeProps-uYx_RkOH.js} +16 -14
- package/dist/utils/ontology.js +52 -30
- package/dist/{utils-CCkxV0lZ.js → utils-DNe_YYjm.js} +16 -16
- package/package.json +2 -1
- package/dist/DialogContent-BCYm_d1s.js +0 -864
- package/dist/FormControlLabel-DENNVXWL.js +0 -639
- package/dist/Typography-Dg-ROiTA.js +0 -201
- package/dist/components/data-management/instance-form/components/variable/index.js +0 -17
- package/dist/components/data-management/instance-form/components/variables/index.js +0 -39
- package/dist/createSvgIcon-B2WT0K4k.js +0 -87
- package/dist/index-B3Oj04nl.js +0 -287
- package/dist/components/{data-management/instance-form → instance-form}/components/policy-list/index.js +0 -0
- package/dist/{extends-Cyw62AD_.js → objectWithoutPropertiesLoose-BK36oJDi.js} +9 -9
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Box as n, TextField as d, FormControl as L, InputLabel as V, Select as v, MenuItem as c } from "@mui/material";
|
|
3
|
+
import { useState as h } from "react";
|
|
4
|
+
import y from "lodash";
|
|
5
|
+
function z({ value: t, onChange: i }) {
|
|
6
|
+
const [u, p] = h(
|
|
7
|
+
"discreteList" in t && t.discreteList.length > 0 ? "list" : "range"
|
|
8
|
+
), [x, f] = h(
|
|
9
|
+
"discreteList" in t ? t.discreteList.join(",") : ""
|
|
10
|
+
), b = (l) => {
|
|
11
|
+
p(l.target.value), l.target.value === "list" ? i({ discreteList: [] }) : i({ minValue: "", maxValue: "" });
|
|
12
|
+
}, g = (l) => {
|
|
13
|
+
const a = l.target.value, r = y.trimEnd(a, ",").split(",").filter((m) => m).map((m) => Number(m.trimStart()));
|
|
14
|
+
f(a), i({
|
|
15
|
+
discreteList: r
|
|
16
|
+
});
|
|
17
|
+
}, o = (l) => {
|
|
18
|
+
const { name: a, value: r } = l.target;
|
|
19
|
+
i({
|
|
20
|
+
...t,
|
|
21
|
+
[a]: Number(r)
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ s(n, { display: "flex", width: "100%", children: [
|
|
25
|
+
/* @__PURE__ */ e(n, { flex: 2, children: u === "list" ? /* @__PURE__ */ e(
|
|
26
|
+
d,
|
|
27
|
+
{
|
|
28
|
+
size: "small",
|
|
29
|
+
fullWidth: !0,
|
|
30
|
+
value: x,
|
|
31
|
+
onChange: g,
|
|
32
|
+
inputProps: {
|
|
33
|
+
placeholder: "Comma separated number list"
|
|
34
|
+
},
|
|
35
|
+
title: "Add list values with the comma (,) separated numbers"
|
|
36
|
+
}
|
|
37
|
+
) : /* @__PURE__ */ s(n, { display: "flex", width: "100%", children: [
|
|
38
|
+
/* @__PURE__ */ e(
|
|
39
|
+
d,
|
|
40
|
+
{
|
|
41
|
+
name: "minValue",
|
|
42
|
+
label: "Min",
|
|
43
|
+
type: "number",
|
|
44
|
+
size: "small",
|
|
45
|
+
fullWidth: !0,
|
|
46
|
+
sx: { mr: 0.25 },
|
|
47
|
+
value: t.minValue,
|
|
48
|
+
onChange: o
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ e(
|
|
52
|
+
d,
|
|
53
|
+
{
|
|
54
|
+
name: "maxValue",
|
|
55
|
+
label: "Max",
|
|
56
|
+
type: "number",
|
|
57
|
+
size: "small",
|
|
58
|
+
fullWidth: !0,
|
|
59
|
+
sx: { ml: 0.25 },
|
|
60
|
+
value: t.maxValue,
|
|
61
|
+
onChange: o
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] }) }),
|
|
65
|
+
/* @__PURE__ */ e(n, { flex: 1, ml: 0.5, children: /* @__PURE__ */ s(L, { fullWidth: !0, size: "small", children: [
|
|
66
|
+
/* @__PURE__ */ e(V, { id: "mode-label", children: "Input Type" }),
|
|
67
|
+
/* @__PURE__ */ s(
|
|
68
|
+
v,
|
|
69
|
+
{
|
|
70
|
+
labelId: "mode-label",
|
|
71
|
+
id: "mode",
|
|
72
|
+
value: u,
|
|
73
|
+
label: "Input Type",
|
|
74
|
+
onChange: b,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ e(c, { value: "range", children: "Range" }),
|
|
77
|
+
/* @__PURE__ */ e(c, { value: "list", children: "Discrete List" })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }) })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
z as default
|
|
86
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { TextField as u } from "@mui/material";
|
|
3
|
+
import { useState as d } from "react";
|
|
4
|
+
import p from "lodash";
|
|
5
|
+
function x({ value: i, onChange: a }) {
|
|
6
|
+
var e;
|
|
7
|
+
const [l, r] = d(
|
|
8
|
+
((e = i.listOfPossibleValues) == null ? void 0 : e.join(",")) || ""
|
|
9
|
+
);
|
|
10
|
+
return /* @__PURE__ */ m(
|
|
11
|
+
u,
|
|
12
|
+
{
|
|
13
|
+
size: "small",
|
|
14
|
+
fullWidth: !0,
|
|
15
|
+
value: l,
|
|
16
|
+
onChange: (o) => {
|
|
17
|
+
const s = o.target.value, n = p.trimEnd(s, ",").split(",").filter((t) => t).map((t) => t.trimStart());
|
|
18
|
+
r(s), a({
|
|
19
|
+
listOfPossibleValues: n
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
inputProps: {
|
|
23
|
+
placeholder: "Add list values with the comma (,) separated string"
|
|
24
|
+
},
|
|
25
|
+
title: "Add list values with the comma (,) separated string"
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
x as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as t, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import n from "lodash";
|
|
3
|
+
import f from "./components/composite-list-range/index.js";
|
|
4
|
+
import { D as g } from "../../index-C1fczHEW.js";
|
|
5
|
+
import u from "./components/geometry-range/index.js";
|
|
6
|
+
import l from "./components/number-range/index.js";
|
|
7
|
+
import s from "./components/string-range/index.js";
|
|
8
|
+
const V = ({
|
|
9
|
+
type: r,
|
|
10
|
+
value: e,
|
|
11
|
+
mapboxAccessToken: o,
|
|
12
|
+
onChange: i,
|
|
13
|
+
...m
|
|
14
|
+
}) => r === "byte" || r === "double" || r === "integer" || r === "long" ? /* @__PURE__ */ t(
|
|
15
|
+
l,
|
|
16
|
+
{
|
|
17
|
+
value: e || { minValue: "", maxValue: "" },
|
|
18
|
+
onChange: i
|
|
19
|
+
}
|
|
20
|
+
) : r === "string" || r === "text" ? /* @__PURE__ */ t(
|
|
21
|
+
s,
|
|
22
|
+
{
|
|
23
|
+
value: e || { listOfPossibleValues: [] },
|
|
24
|
+
onChange: i
|
|
25
|
+
}
|
|
26
|
+
) : r === "geometry" ? /* @__PURE__ */ t(
|
|
27
|
+
u,
|
|
28
|
+
{
|
|
29
|
+
value: e || { geometryArea: "" },
|
|
30
|
+
mapboxAccessToken: o,
|
|
31
|
+
onChange: i
|
|
32
|
+
}
|
|
33
|
+
) : r === "date" ? /* @__PURE__ */ t(
|
|
34
|
+
g,
|
|
35
|
+
{
|
|
36
|
+
value: e || {
|
|
37
|
+
startDate: n.get(m, "minDate", ""),
|
|
38
|
+
timeUnit: "MINUTE",
|
|
39
|
+
endRange: 0,
|
|
40
|
+
startRange: 0,
|
|
41
|
+
limitForScenarioTimeRange: !1
|
|
42
|
+
},
|
|
43
|
+
onChange: i,
|
|
44
|
+
...m
|
|
45
|
+
}
|
|
46
|
+
) : r === "composite-list" ? /* @__PURE__ */ t(
|
|
47
|
+
f,
|
|
48
|
+
{
|
|
49
|
+
value: e || {
|
|
50
|
+
count: ""
|
|
51
|
+
},
|
|
52
|
+
mapboxAccessToken: o,
|
|
53
|
+
onChange: i,
|
|
54
|
+
...m
|
|
55
|
+
}
|
|
56
|
+
) : /* @__PURE__ */ t(a, {});
|
|
57
|
+
export {
|
|
58
|
+
V as RangeSelector
|
|
59
|
+
};
|
|
@@ -2,10 +2,10 @@ 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 "../../
|
|
6
|
-
import { O as v } from "../../OutlinedInput-
|
|
7
|
-
import { I as g } from "../../InputAdornment-
|
|
8
|
-
import { I as t } from "../../IconButton-
|
|
5
|
+
import { F as _, I as j } from "../../InputLabel-CWkW8NtU.js";
|
|
6
|
+
import { O as v } from "../../OutlinedInput-DkIUD30e.js";
|
|
7
|
+
import { I as g } from "../../InputAdornment-CZUPEeia.js";
|
|
8
|
+
import { I as t } from "../../IconButton-BaiyAtmS.js";
|
|
9
9
|
const z = ({
|
|
10
10
|
defaultValue: x = "",
|
|
11
11
|
label: I = "Search",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { styled as t, Tabs as a, Tab as i } from "@mui/material";
|
|
2
|
+
const e = t(a)(({ theme: o }) => ({
|
|
3
|
+
backgroundColor: o.palette.mode === "light" ? "#DADADA" : o.palette.divider,
|
|
4
|
+
borderRadius: 13,
|
|
5
|
+
minHeight: 34,
|
|
6
|
+
boxShadow: o.shadows[4],
|
|
7
|
+
"& .MuiTabs-flexContainer": {
|
|
8
|
+
display: "inline-flex",
|
|
9
|
+
position: "relative",
|
|
10
|
+
zIndex: 1
|
|
11
|
+
},
|
|
12
|
+
"& .MuiTabs-scroller": {
|
|
13
|
+
[o.breakpoints.up("md")]: {
|
|
14
|
+
padding: "0 0px"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"& .MuiTabs-indicator": {
|
|
18
|
+
top: 3,
|
|
19
|
+
bottom: 3,
|
|
20
|
+
right: 3,
|
|
21
|
+
height: "auto",
|
|
22
|
+
background: "none",
|
|
23
|
+
"&:after": {
|
|
24
|
+
content: '""',
|
|
25
|
+
display: "block",
|
|
26
|
+
position: "absolute",
|
|
27
|
+
top: 0,
|
|
28
|
+
left: 4,
|
|
29
|
+
right: 4,
|
|
30
|
+
bottom: 0,
|
|
31
|
+
borderRadius: 11,
|
|
32
|
+
backgroundColor: o.palette.mode === "light" ? "#fff" : o.palette.action.selected,
|
|
33
|
+
boxShadow: o.shadows[3]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
})), r = t(i)(({ theme: o }) => ({
|
|
37
|
+
minHeight: 30,
|
|
38
|
+
minWidth: "auto",
|
|
39
|
+
padding: "8px 14.2px",
|
|
40
|
+
textTransform: "none",
|
|
41
|
+
color: o.palette.mode === "light" ? "#919191" : o.palette.text.primary,
|
|
42
|
+
"&:hover": {
|
|
43
|
+
opacity: 1
|
|
44
|
+
},
|
|
45
|
+
"&.Mui-selected": {
|
|
46
|
+
// padding: '8px 22px',
|
|
47
|
+
color: o.palette.text.primary
|
|
48
|
+
}
|
|
49
|
+
})), l = {
|
|
50
|
+
Tabs: e,
|
|
51
|
+
Item: r
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
l as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs as f, Fragment as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import P from "react";
|
|
3
|
+
import { Badge as s, Tab as T } from "@mui/material";
|
|
4
|
+
import v from "./tab-panel.js";
|
|
5
|
+
import d from "./appleTabs.style.js";
|
|
6
|
+
import { T as C } from "../../Tabs-BzelDJKy.js";
|
|
7
|
+
function b(i) {
|
|
8
|
+
return {
|
|
9
|
+
id: `simple-tab-${i}`,
|
|
10
|
+
"aria-controls": `simple-tabpanel-${i}`
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function z({
|
|
14
|
+
defaultActive: i = 0,
|
|
15
|
+
tabContents: e,
|
|
16
|
+
styleVariant: h,
|
|
17
|
+
tabPanelStyle: p,
|
|
18
|
+
onChange: t,
|
|
19
|
+
...l
|
|
20
|
+
}) {
|
|
21
|
+
const [g, m] = P.useState(i), r = t !== void 0 ? i : g, c = (o, a) => {
|
|
22
|
+
m(a), t && t(a);
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
25
|
+
h === "APPLE" ? /* @__PURE__ */ n(d.Tabs, { value: r, onChange: c, ...l, children: e.map((o, a) => /* @__PURE__ */ n(
|
|
26
|
+
d.Item,
|
|
27
|
+
{
|
|
28
|
+
label: /* @__PURE__ */ n(
|
|
29
|
+
s,
|
|
30
|
+
{
|
|
31
|
+
badgeContent: o.badgeContent,
|
|
32
|
+
color: o.badgeColor ?? "primary",
|
|
33
|
+
sx: {
|
|
34
|
+
"& .MuiBadge-badge": {
|
|
35
|
+
right: -7,
|
|
36
|
+
fontSize: 10,
|
|
37
|
+
width: 14,
|
|
38
|
+
height: 14,
|
|
39
|
+
minWidth: 14
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
children: o.label
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
icon: o.icon,
|
|
46
|
+
iconPosition: o.iconPosition,
|
|
47
|
+
...b(a)
|
|
48
|
+
},
|
|
49
|
+
a
|
|
50
|
+
)) }) : /* @__PURE__ */ n(C, { value: r, onChange: c, ...l, children: e.map((o, a) => /* @__PURE__ */ n(
|
|
51
|
+
T,
|
|
52
|
+
{
|
|
53
|
+
label: /* @__PURE__ */ n(
|
|
54
|
+
s,
|
|
55
|
+
{
|
|
56
|
+
badgeContent: o.badgeContent,
|
|
57
|
+
color: o.badgeColor ?? "primary",
|
|
58
|
+
sx: {
|
|
59
|
+
"& .MuiBadge-badge": {
|
|
60
|
+
right: -7,
|
|
61
|
+
fontSize: 10,
|
|
62
|
+
width: 14,
|
|
63
|
+
height: 14,
|
|
64
|
+
minWidth: 14
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
children: o.label
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
icon: o.icon,
|
|
71
|
+
iconPosition: o.iconPosition,
|
|
72
|
+
...b(a)
|
|
73
|
+
},
|
|
74
|
+
a
|
|
75
|
+
)) }),
|
|
76
|
+
e.map((o, a) => {
|
|
77
|
+
if (o.content)
|
|
78
|
+
return /* @__PURE__ */ n(
|
|
79
|
+
v,
|
|
80
|
+
{
|
|
81
|
+
value: r,
|
|
82
|
+
index: a,
|
|
83
|
+
style: p,
|
|
84
|
+
children: o.content
|
|
85
|
+
},
|
|
86
|
+
a
|
|
87
|
+
);
|
|
88
|
+
})
|
|
89
|
+
] });
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
z as default
|
|
93
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
function d(l) {
|
|
3
|
+
const { children: i, value: a, index: e, ...n } = l;
|
|
4
|
+
return /* @__PURE__ */ r(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
role: "tabpanel",
|
|
8
|
+
hidden: a !== e,
|
|
9
|
+
id: `simple-tabpanel-${e}`,
|
|
10
|
+
"aria-labelledby": `simple-tab-${e}`,
|
|
11
|
+
...n,
|
|
12
|
+
children: a === e && i
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
d as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsxs as i, Fragment as y, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Box as t, TextField as I, InputAdornment as S, Button as a, Dialog as k, DialogTitle as w, Typography as s, IconButton as T, DialogContent as j, DialogActions as D } from "@mui/material";
|
|
3
|
+
import { CloseOutlined as A } from "@mui/icons-material";
|
|
4
|
+
import B from "../../../../hooks/useToggle.js";
|
|
5
|
+
import { SearchInput as M } from "../../../search-input/index.js";
|
|
6
|
+
import { InstanceHierarchyTable as O } from "../../../instance-hierarchy-table/index.js";
|
|
7
|
+
import { PropertyMapping as P } from "../../../property-mapping/index.js";
|
|
8
|
+
const R = ({
|
|
9
|
+
inputVariant: r,
|
|
10
|
+
templates: p,
|
|
11
|
+
data: c,
|
|
12
|
+
onSelect: h,
|
|
13
|
+
onSearchSubmit: m,
|
|
14
|
+
openMapping: u,
|
|
15
|
+
mappingData: g,
|
|
16
|
+
objectTemplate: f,
|
|
17
|
+
selectedInstances: l = [],
|
|
18
|
+
mapboxAccessToken: x,
|
|
19
|
+
onMappingSubmit: C,
|
|
20
|
+
onMappingOpen: d,
|
|
21
|
+
onMappingClose: b
|
|
22
|
+
}) => {
|
|
23
|
+
const o = B(!1), v = (n) => {
|
|
24
|
+
o.action.close(), d(n);
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ i(y, { children: [
|
|
27
|
+
/* @__PURE__ */ e(t, { mb: 2, position: "relative", children: /* @__PURE__ */ e(
|
|
28
|
+
I,
|
|
29
|
+
{
|
|
30
|
+
label: "Catalogue Instance(s)",
|
|
31
|
+
variant: r,
|
|
32
|
+
fullWidth: !0,
|
|
33
|
+
InputProps: {
|
|
34
|
+
readOnly: !0,
|
|
35
|
+
endAdornment: /* @__PURE__ */ e(S, { position: "end", children: /* @__PURE__ */ e(
|
|
36
|
+
a,
|
|
37
|
+
{
|
|
38
|
+
variant: "contained",
|
|
39
|
+
size: "small",
|
|
40
|
+
onClick: d,
|
|
41
|
+
children: "Edit Mapping"
|
|
42
|
+
}
|
|
43
|
+
) })
|
|
44
|
+
},
|
|
45
|
+
value: l.map((n) => n.title).join(", "),
|
|
46
|
+
onClick: o.action.open
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
/* @__PURE__ */ i(
|
|
50
|
+
k,
|
|
51
|
+
{
|
|
52
|
+
open: o.state.isOpen,
|
|
53
|
+
fullWidth: !0,
|
|
54
|
+
maxWidth: "lg",
|
|
55
|
+
onClose: o.action.close,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ i(
|
|
58
|
+
w,
|
|
59
|
+
{
|
|
60
|
+
component: "div",
|
|
61
|
+
lineHeight: 1,
|
|
62
|
+
display: "flex",
|
|
63
|
+
justifyContent: "space-between",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ i(t, { flex: 1, children: [
|
|
66
|
+
/* @__PURE__ */ e(s, { variant: "h6", children: "Catalogue Instance" }),
|
|
67
|
+
/* @__PURE__ */ e(s, { variant: "caption", children: "Search and select catalogue instance(s)" })
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ i(
|
|
70
|
+
t,
|
|
71
|
+
{
|
|
72
|
+
flex: 1,
|
|
73
|
+
flexGrow: 1,
|
|
74
|
+
display: "flex",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
justifyContent: "flex-end",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ e(
|
|
79
|
+
M,
|
|
80
|
+
{
|
|
81
|
+
variant: r,
|
|
82
|
+
sx: { width: 300 },
|
|
83
|
+
onSubmit: m
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ e(
|
|
87
|
+
T,
|
|
88
|
+
{
|
|
89
|
+
onClick: o.action.close,
|
|
90
|
+
sx: { ml: 2 },
|
|
91
|
+
children: /* @__PURE__ */ e(A, {})
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(
|
|
101
|
+
t,
|
|
102
|
+
{
|
|
103
|
+
boxShadow: (n) => n.shadows[1],
|
|
104
|
+
mt: 0.1,
|
|
105
|
+
overflow: "hidden",
|
|
106
|
+
borderRadius: 1,
|
|
107
|
+
children: c && /* @__PURE__ */ e(
|
|
108
|
+
O,
|
|
109
|
+
{
|
|
110
|
+
data: c,
|
|
111
|
+
templates: p,
|
|
112
|
+
enableCheckboxSelection: !0,
|
|
113
|
+
selectedIds: l.map((n) => n.id),
|
|
114
|
+
onSelect: h
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
) }),
|
|
119
|
+
/* @__PURE__ */ i(D, { children: [
|
|
120
|
+
/* @__PURE__ */ e(
|
|
121
|
+
a,
|
|
122
|
+
{
|
|
123
|
+
color: "inherit",
|
|
124
|
+
variant: "contained",
|
|
125
|
+
onClick: o.action.close,
|
|
126
|
+
children: "Cancel"
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ e(
|
|
130
|
+
a,
|
|
131
|
+
{
|
|
132
|
+
color: "primary",
|
|
133
|
+
variant: "contained",
|
|
134
|
+
disabled: l.length === 0,
|
|
135
|
+
onClick: v,
|
|
136
|
+
children: "Property Mapping"
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ e(
|
|
144
|
+
P,
|
|
145
|
+
{
|
|
146
|
+
data: g,
|
|
147
|
+
objectTemplate: f,
|
|
148
|
+
mapboxAccessToken: x,
|
|
149
|
+
onSubmit: C,
|
|
150
|
+
open: u,
|
|
151
|
+
onClose: b
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
] });
|
|
155
|
+
};
|
|
156
|
+
export {
|
|
157
|
+
R as CatalogueInstanceSelector
|
|
158
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { DataGrid as d } from "@mui/x-data-grid";
|
|
3
|
+
import { A as n, a as m, d as s } from "../../../../Add-eepk2WTM.js";
|
|
4
|
+
import p from "./property-list-columns.js";
|
|
5
|
+
import { a as c } from "../../../../property-list-form-BfP9gzSo.js";
|
|
6
|
+
import u from "./property-list-logic.js";
|
|
7
|
+
import { B as f } from "../../../../Box-BPyg-Ybm.js";
|
|
8
|
+
import { T as y } from "../../../../Typography-Bm7PFqUT.js";
|
|
9
|
+
import { B as h } from "../../../../Button-DLwB_sKd.js";
|
|
10
|
+
import { D as g, a as b } from "../../../../DialogContent-CxOSq6h9.js";
|
|
11
|
+
import { D } from "../../../../dialog-v5-nL5yy.js";
|
|
12
|
+
function v(t) {
|
|
13
|
+
var a;
|
|
14
|
+
const { state: o, action: r } = u(t);
|
|
15
|
+
return /* @__PURE__ */ i(f, { children: [
|
|
16
|
+
/* @__PURE__ */ e(y, { variant: "h6", marginY: 2, children: "Properties" }),
|
|
17
|
+
t.list.length > 0 ? /* @__PURE__ */ e(
|
|
18
|
+
d,
|
|
19
|
+
{
|
|
20
|
+
rows: t.list,
|
|
21
|
+
columns: p({
|
|
22
|
+
templateId: t.templateId,
|
|
23
|
+
onEdit: r.handleOnEditClick,
|
|
24
|
+
onDelete: r.handleOnDeleteClick
|
|
25
|
+
}),
|
|
26
|
+
getRowId: (l) => l.id || l.propertyId,
|
|
27
|
+
autoHeight: !0
|
|
28
|
+
}
|
|
29
|
+
) : /* @__PURE__ */ i(n, { severity: "info", children: [
|
|
30
|
+
/* @__PURE__ */ e(m, { children: "No Property Added!" }),
|
|
31
|
+
"Add least one property before save the template!"
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ e(
|
|
34
|
+
h,
|
|
35
|
+
{
|
|
36
|
+
color: "primary",
|
|
37
|
+
onClick: r.handleOnAddClick,
|
|
38
|
+
sx: { mt: 2 },
|
|
39
|
+
startIcon: /* @__PURE__ */ e(s, {}),
|
|
40
|
+
children: "Add Property"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ i(
|
|
44
|
+
g,
|
|
45
|
+
{
|
|
46
|
+
open: o.dialog.isOpen,
|
|
47
|
+
onClose: r.dialog.close,
|
|
48
|
+
"aria-labelledby": "alert-dialog-title",
|
|
49
|
+
"aria-describedby": "alert-dialog-description",
|
|
50
|
+
fullWidth: !0,
|
|
51
|
+
maxWidth: "sm",
|
|
52
|
+
scroll: "body",
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(D, { id: "alert-dialog-title", children: o.propertyForm.title }),
|
|
55
|
+
/* @__PURE__ */ e(b, { className: "pb-30", children: /* @__PURE__ */ e(
|
|
56
|
+
c,
|
|
57
|
+
{
|
|
58
|
+
inputVariant: t.inputVariant,
|
|
59
|
+
defaultValues: o.propertyForm.defaultValues,
|
|
60
|
+
disablePropertyId: t.disablePropertyId && o.propertyForm.type === "edit" && !!((a = o.propertyForm.defaultValues) != null && a.id),
|
|
61
|
+
onSubmit: r.handleSubmit,
|
|
62
|
+
onCancel: r.dialog.close
|
|
63
|
+
}
|
|
64
|
+
) })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
v as default
|
|
72
|
+
};
|