@hybridcore/ui 1.5.32 → 1.5.34
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-security-selectors/dissemination-list/index.js +896 -884
- package/dist/components/data-security-selectors/security-level/index.js +66 -54
- package/dist/components/instance-form/components/composite-list/index.js +3 -2
- package/dist/components/instance-form/components/policy-list/index.js +33 -32
- package/dist/components/instance-form/components/variable/index.js +4 -3
- package/dist/components/instance-form/components/variables/index.js +19 -17
- package/dist/components/instance-form/index.js +357 -273
- package/dist/components/phone-input/index.js +6 -6
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/tabs/index.js +430 -429
- package/dist/index-OtGK6phq.js +445 -0
- package/dist/main.d.ts +6 -2
- package/package.json +1 -1
- package/dist/index-CdecY907.js +0 -351
|
@@ -1,82 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as u, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as D } from "react";
|
|
3
|
+
import { Box as p, Typography as F, FormControl as I, InputLabel as $, Select as j, MenuItem as v, FormHelperText as w } from "@mui/material";
|
|
4
4
|
import { a as s } from "../../../helpers-DaCoWmi2.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { ConditionalWrapper as y } from "../../conditional-wrapper/index.js";
|
|
6
|
+
const B = ({
|
|
7
|
+
ontologyId: a,
|
|
7
8
|
appRoles: o,
|
|
8
|
-
templateKeys:
|
|
9
|
+
templateKeys: i,
|
|
9
10
|
templateType: c,
|
|
10
|
-
securityLevels:
|
|
11
|
-
value:
|
|
12
|
-
minLevel:
|
|
13
|
-
minLevelId:
|
|
11
|
+
securityLevels: t,
|
|
12
|
+
value: x,
|
|
13
|
+
minLevel: l = 99,
|
|
14
|
+
minLevelId: d,
|
|
14
15
|
minLevelRoles: n,
|
|
15
|
-
showError:
|
|
16
|
-
variant:
|
|
16
|
+
showError: m,
|
|
17
|
+
variant: g = "outlined",
|
|
18
|
+
labelPosition: f = "default",
|
|
17
19
|
onChange: S
|
|
18
20
|
}) => {
|
|
19
|
-
const
|
|
21
|
+
const C = D(() => {
|
|
20
22
|
if (n && n.length > 0) {
|
|
21
23
|
for (const r of n)
|
|
22
24
|
if (s(r, "SUPER_ADMIN", o))
|
|
23
|
-
return
|
|
25
|
+
return l;
|
|
24
26
|
}
|
|
25
|
-
if (
|
|
26
|
-
for (const r of
|
|
27
|
+
if (i && i.length > 0 && c) {
|
|
28
|
+
for (const r of i)
|
|
27
29
|
if (s(
|
|
28
|
-
`${
|
|
30
|
+
`${a}.${c}.${r}`,
|
|
29
31
|
"SUPER_ADMIN",
|
|
30
32
|
o
|
|
31
33
|
))
|
|
32
|
-
return
|
|
34
|
+
return l;
|
|
33
35
|
}
|
|
34
|
-
if (
|
|
35
|
-
const r =
|
|
36
|
-
(
|
|
36
|
+
if (d && t.length > 0) {
|
|
37
|
+
const r = t.find(
|
|
38
|
+
(h) => h.id === d
|
|
37
39
|
);
|
|
38
40
|
if (r) return r.level;
|
|
39
41
|
}
|
|
40
|
-
return
|
|
42
|
+
return l;
|
|
41
43
|
}, [
|
|
44
|
+
l,
|
|
45
|
+
d,
|
|
42
46
|
t,
|
|
43
|
-
u,
|
|
44
|
-
i,
|
|
45
47
|
n,
|
|
46
|
-
|
|
48
|
+
i,
|
|
47
49
|
c,
|
|
48
50
|
o,
|
|
49
|
-
|
|
50
|
-
]),
|
|
51
|
+
a
|
|
52
|
+
]), b = (r) => {
|
|
51
53
|
S(r.target.value);
|
|
52
54
|
};
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
return /* @__PURE__ */ e(
|
|
56
|
+
y,
|
|
57
|
+
{
|
|
58
|
+
condition: f === "left",
|
|
59
|
+
wrapper: (r) => /* @__PURE__ */ u(p, { display: "flex", alignItems: "center", children: [
|
|
60
|
+
/* @__PURE__ */ e(F, { width: "32%", children: "Security Level *" }),
|
|
61
|
+
/* @__PURE__ */ e(p, { width: "68%", children: r })
|
|
62
|
+
] }),
|
|
63
|
+
children: /* @__PURE__ */ u(A, { children: [
|
|
64
|
+
/* @__PURE__ */ u(
|
|
65
|
+
I,
|
|
66
|
+
{
|
|
67
|
+
fullWidth: !0,
|
|
68
|
+
variant: g,
|
|
69
|
+
error: m,
|
|
70
|
+
sx: { ...g === "outlined" && { mt: 1 } },
|
|
71
|
+
children: [
|
|
72
|
+
f === "default" && /* @__PURE__ */ e($, { id: "security-level-label", children: "Security Level *" }),
|
|
73
|
+
/* @__PURE__ */ e(
|
|
74
|
+
j,
|
|
75
|
+
{
|
|
76
|
+
label: f === "default" ? "Security Level *" : void 0,
|
|
77
|
+
labelId: "security-level-label",
|
|
78
|
+
id: "demo-simple-select",
|
|
79
|
+
value: x,
|
|
80
|
+
onChange: b,
|
|
81
|
+
children: t.filter((r) => r.level <= C).map((r, h) => /* @__PURE__ */ e(v, { value: r.id, children: r.name }, h))
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
m && /* @__PURE__ */ e(w, { error: !0, children: "This field is required!" })
|
|
88
|
+
] })
|
|
89
|
+
}
|
|
90
|
+
);
|
|
79
91
|
};
|
|
80
92
|
export {
|
|
81
|
-
|
|
93
|
+
B as SecurityLevel
|
|
82
94
|
};
|
|
@@ -3,10 +3,11 @@ import "@mui/material";
|
|
|
3
3
|
import "./styled.js";
|
|
4
4
|
import "@mui/icons-material";
|
|
5
5
|
import "../../../../hooks/useToggle.js";
|
|
6
|
-
import { C as
|
|
6
|
+
import { C as s } from "../../../../index-OtGK6phq.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "lodash";
|
|
9
9
|
import "dayjs";
|
|
10
|
+
import "../../../conditional-wrapper/index.js";
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
s as default
|
|
12
13
|
};
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
policyList:
|
|
6
|
-
value:
|
|
1
|
+
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Box as c, FormLabel as m } from "@mui/material";
|
|
3
|
+
import x from "react-select";
|
|
4
|
+
const g = ({
|
|
5
|
+
policyList: l,
|
|
6
|
+
value: i = [],
|
|
7
7
|
showError: t = !1,
|
|
8
|
-
variant:
|
|
9
|
-
|
|
8
|
+
variant: o = "standart",
|
|
9
|
+
labelPosition: r = "default",
|
|
10
|
+
onChange: d
|
|
10
11
|
}) => {
|
|
11
|
-
const
|
|
12
|
-
|
|
12
|
+
const a = (e) => {
|
|
13
|
+
d(e.map((s) => s.id));
|
|
13
14
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
15
|
+
return /* @__PURE__ */ p(
|
|
16
|
+
c,
|
|
16
17
|
{
|
|
17
18
|
sx: {
|
|
18
|
-
...
|
|
19
|
+
...o === "outlined" && {
|
|
19
20
|
position: "relative",
|
|
20
21
|
mt: 1.5,
|
|
21
22
|
zIndex: 9
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
25
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
26
|
+
r === "default" && /* @__PURE__ */ n(
|
|
27
|
+
m,
|
|
27
28
|
{
|
|
28
29
|
sx: {
|
|
29
30
|
display: "block",
|
|
30
31
|
...t && {
|
|
31
|
-
color: (
|
|
32
|
+
color: (e) => e.palette.error.main
|
|
32
33
|
},
|
|
33
|
-
...
|
|
34
|
+
...o === "outlined" && {
|
|
34
35
|
position: "absolute",
|
|
35
36
|
fontSize: "small",
|
|
36
37
|
zIndex: 1,
|
|
37
|
-
bgcolor: (
|
|
38
|
+
bgcolor: (e) => e.palette.background.paper,
|
|
38
39
|
ml: 1.5,
|
|
39
40
|
mt: "-9px",
|
|
40
41
|
px: 0.5
|
|
@@ -43,21 +44,21 @@ const f = ({
|
|
|
43
44
|
children: "Policy List"
|
|
44
45
|
}
|
|
45
46
|
),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
47
|
+
/* @__PURE__ */ n(
|
|
48
|
+
x,
|
|
48
49
|
{
|
|
49
|
-
value:
|
|
50
|
-
options:
|
|
50
|
+
value: l.filter((e) => i.includes(e.id)),
|
|
51
|
+
options: l,
|
|
51
52
|
isMulti: !0,
|
|
52
|
-
onChange:
|
|
53
|
+
onChange: a,
|
|
53
54
|
menuPosition: "fixed",
|
|
54
|
-
getOptionLabel: (
|
|
55
|
-
getOptionValue: (
|
|
55
|
+
getOptionLabel: (e) => e.name ?? e.key,
|
|
56
|
+
getOptionValue: (e) => String(e.id),
|
|
56
57
|
styles: {
|
|
57
|
-
control: (
|
|
58
|
-
...
|
|
58
|
+
control: (e) => ({
|
|
59
|
+
...e,
|
|
59
60
|
boxShadow: "none",
|
|
60
|
-
...
|
|
61
|
+
...o === "standart" && {
|
|
61
62
|
border: "none",
|
|
62
63
|
borderBottom: "1px solid",
|
|
63
64
|
borderRadius: 0,
|
|
@@ -65,10 +66,10 @@ const f = ({
|
|
|
65
66
|
},
|
|
66
67
|
...t && { color: "#c00", borderColor: "#c00" }
|
|
67
68
|
}),
|
|
68
|
-
valueContainer: (
|
|
69
|
-
...
|
|
69
|
+
valueContainer: (e) => ({
|
|
70
|
+
...e,
|
|
70
71
|
fontSize: "1rem",
|
|
71
|
-
...
|
|
72
|
+
...o === "standart" ? { paddingLeft: 0 } : {
|
|
72
73
|
padding: "6px 0px 3px 8px"
|
|
73
74
|
},
|
|
74
75
|
...t && { color: "#c00" }
|
|
@@ -81,5 +82,5 @@ const f = ({
|
|
|
81
82
|
);
|
|
82
83
|
};
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
g as default
|
|
85
86
|
};
|
|
@@ -3,17 +3,18 @@ import "@mui/icons-material";
|
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "dayjs";
|
|
5
5
|
import "lodash";
|
|
6
|
-
import { V as
|
|
6
|
+
import { V as h } from "../../../../index-OtGK6phq.js";
|
|
7
7
|
import "../../../date-time-picker/index.js";
|
|
8
8
|
import "../../../geometry-picker/index.js";
|
|
9
9
|
import "../../../phone-input/index.js";
|
|
10
|
+
import "../../../conditional-wrapper/index.js";
|
|
11
|
+
import "../../../../Box-SSMZuKnS.js";
|
|
10
12
|
import "../../../../TextField-CdKnj6de.js";
|
|
11
13
|
import "../../../../FormControlLabel-BNT5EI0b.js";
|
|
12
14
|
import "../../../../Checkbox-B0P8LhCl.js";
|
|
13
15
|
import "../../../../InputLabel-ClDXuWBr.js";
|
|
14
16
|
import "../../../../Select-DuyWoyoF.js";
|
|
15
17
|
import "../../../../MenuItem-Lcjh1XlV.js";
|
|
16
|
-
import "../../../../Box-SSMZuKnS.js";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
h as default
|
|
19
20
|
};
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsx as u, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { V as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as u, Fragment as I, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import b from "react";
|
|
3
|
+
import { V as g } from "../../../../index-OtGK6phq.js";
|
|
4
|
+
import p from "lodash";
|
|
5
5
|
import { Box as i } from "@mui/material";
|
|
6
|
-
function
|
|
6
|
+
function C({
|
|
7
7
|
template: n,
|
|
8
8
|
value: t,
|
|
9
9
|
mapboxAccessToken: c,
|
|
10
|
-
variant:
|
|
10
|
+
variant: f = "outlined",
|
|
11
|
+
labelPosition: s = "default",
|
|
11
12
|
fieldOptions: e,
|
|
12
|
-
onChange:
|
|
13
|
+
onChange: m
|
|
13
14
|
}) {
|
|
14
|
-
const
|
|
15
|
+
const h = b.useMemo(() => {
|
|
15
16
|
let r = n == null ? void 0 : n.properties.filter((o) => o.visible);
|
|
16
|
-
return r =
|
|
17
|
-
}, [n]),
|
|
17
|
+
return r = p.orderBy(r, "id"), r;
|
|
18
|
+
}, [n]), l = (r) => {
|
|
18
19
|
const o = {
|
|
19
20
|
target: {
|
|
20
21
|
value: { ...t, ...r }
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
+
m(o);
|
|
24
25
|
};
|
|
25
|
-
return n === void 0 ? /* @__PURE__ */ u(
|
|
26
|
+
return n === void 0 ? /* @__PURE__ */ u(I, {}) : /* @__PURE__ */ u(i, { display: "flex", flexDirection: "column", children: h.filter((r) => {
|
|
26
27
|
var o;
|
|
27
28
|
return e ? !((o = e[r.propertyId]) != null && o.hidden) : !0;
|
|
28
29
|
}).map((r, o) => {
|
|
29
30
|
var d, a;
|
|
30
31
|
const x = t ? t[r.propertyId] : "";
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ _(
|
|
32
33
|
i,
|
|
33
34
|
{
|
|
34
35
|
mb: 2,
|
|
@@ -37,14 +38,15 @@ function B({
|
|
|
37
38
|
},
|
|
38
39
|
children: [
|
|
39
40
|
/* @__PURE__ */ u(
|
|
40
|
-
|
|
41
|
+
g,
|
|
41
42
|
{
|
|
42
43
|
property: r,
|
|
43
44
|
value: x,
|
|
44
45
|
mapboxAccessToken: c,
|
|
45
|
-
variant:
|
|
46
|
+
variant: f,
|
|
47
|
+
labelPosition: s,
|
|
46
48
|
fieldOptions: e,
|
|
47
|
-
onChange:
|
|
49
|
+
onChange: l
|
|
48
50
|
}
|
|
49
51
|
),
|
|
50
52
|
e && ((a = e[r.propertyId]) == null ? void 0 : a.helperText)
|
|
@@ -55,5 +57,5 @@ function B({
|
|
|
55
57
|
}) });
|
|
56
58
|
}
|
|
57
59
|
export {
|
|
58
|
-
|
|
60
|
+
C as default
|
|
59
61
|
};
|