@hybridcore/ui 1.5.57 → 1.5.59
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/card-alternate/index.js +130 -110
- package/dist/components/card-alternate/styled.js +0 -1
- package/dist/components/template-form/components/select-icon/index.js +17 -17
- package/dist/components/template-form/index.js +18 -19
- package/dist/main.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,122 +1,142 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
2
|
+
import { Box as i, Skeleton as n, Typography as o } from "@mui/material";
|
|
3
|
+
import { AlternateCardRoot as b, AlternateCardMenuContainer as v } from "./styled.js";
|
|
4
|
+
const y = ({
|
|
5
5
|
title: s,
|
|
6
|
-
subTitle:
|
|
6
|
+
subTitle: a,
|
|
7
7
|
text: d,
|
|
8
8
|
avatar: h,
|
|
9
9
|
footer: p,
|
|
10
|
-
menu:
|
|
10
|
+
menu: c,
|
|
11
11
|
extra: x,
|
|
12
12
|
loading: t,
|
|
13
|
-
|
|
13
|
+
rightMenu: w,
|
|
14
|
+
onClick: l
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
|
|
16
|
+
const m = () => {
|
|
17
|
+
l && l();
|
|
17
18
|
};
|
|
18
|
-
return /* @__PURE__ */ r(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
19
|
+
return /* @__PURE__ */ r(
|
|
20
|
+
b,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
display: "flex"
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r(i, { children: [
|
|
27
|
+
c && /* @__PURE__ */ e(v, { className: "menu-container", children: c }),
|
|
28
|
+
/* @__PURE__ */ r(i, { display: "flex", alignItems: "center", children: [
|
|
29
|
+
h && /* @__PURE__ */ e(i, { mr: 2, children: t ? /* @__PURE__ */ e(
|
|
30
|
+
n,
|
|
31
|
+
{
|
|
32
|
+
animation: "wave",
|
|
33
|
+
variant: "circular",
|
|
34
|
+
width: 42,
|
|
35
|
+
height: 42
|
|
36
|
+
}
|
|
37
|
+
) : h }),
|
|
38
|
+
/* @__PURE__ */ r(i, { width: "100%", children: [
|
|
39
|
+
t ? /* @__PURE__ */ e(
|
|
40
|
+
n,
|
|
41
|
+
{
|
|
42
|
+
animation: "wave",
|
|
43
|
+
height: 10,
|
|
44
|
+
width: "50%",
|
|
45
|
+
sx: { mb: 0.25, mt: 0.35 }
|
|
46
|
+
}
|
|
47
|
+
) : /* @__PURE__ */ e(
|
|
48
|
+
o,
|
|
49
|
+
{
|
|
50
|
+
gutterBottom: !0,
|
|
51
|
+
variant: "subtitle1",
|
|
52
|
+
component: "h3",
|
|
53
|
+
sx: {
|
|
54
|
+
mb: 0,
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
textOverflow: "ellipsis",
|
|
57
|
+
display: "-webkit-box",
|
|
58
|
+
WebkitLineClamp: 3,
|
|
59
|
+
WebkitBoxOrient: "vertical",
|
|
60
|
+
cursor: l ? "pointer" : "default",
|
|
61
|
+
lineHeight: "22px"
|
|
62
|
+
},
|
|
63
|
+
onClick: m,
|
|
64
|
+
children: s
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
a && (t ? /* @__PURE__ */ e(
|
|
68
|
+
n,
|
|
69
|
+
{
|
|
70
|
+
animation: "wave",
|
|
71
|
+
height: 10,
|
|
72
|
+
width: "40%",
|
|
73
|
+
sx: { mb: 0.25, mt: 0.35 }
|
|
74
|
+
}
|
|
75
|
+
) : /* @__PURE__ */ e(
|
|
76
|
+
o,
|
|
77
|
+
{
|
|
78
|
+
variant: "caption",
|
|
79
|
+
component: "p",
|
|
80
|
+
sx: {
|
|
81
|
+
color: "text.secondary",
|
|
82
|
+
overflow: "hidden",
|
|
83
|
+
textOverflow: "ellipsis",
|
|
84
|
+
display: "-webkit-box",
|
|
85
|
+
WebkitLineClamp: 4,
|
|
86
|
+
WebkitBoxOrient: "vertical",
|
|
87
|
+
lineHeight: "16px"
|
|
88
|
+
},
|
|
89
|
+
children: a
|
|
90
|
+
}
|
|
91
|
+
))
|
|
92
|
+
] })
|
|
93
|
+
] }),
|
|
94
|
+
t ? /* @__PURE__ */ r(i, { children: [
|
|
95
|
+
/* @__PURE__ */ e(n, { animation: "wave", height: 10, sx: { mb: 0.5, mt: 0.5 } }),
|
|
96
|
+
/* @__PURE__ */ e(
|
|
97
|
+
n,
|
|
98
|
+
{
|
|
99
|
+
animation: "wave",
|
|
100
|
+
height: 10,
|
|
101
|
+
width: "80%",
|
|
102
|
+
sx: { mb: 0.5 }
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
] }) : /* @__PURE__ */ e(
|
|
106
|
+
o,
|
|
107
|
+
{
|
|
108
|
+
variant: "caption",
|
|
109
|
+
component: "p",
|
|
110
|
+
sx: {
|
|
111
|
+
color: "text.secondary",
|
|
112
|
+
overflow: "hidden",
|
|
113
|
+
textOverflow: "ellipsis",
|
|
114
|
+
display: "-webkit-box",
|
|
115
|
+
WebkitLineClamp: 4,
|
|
116
|
+
WebkitBoxOrient: "vertical",
|
|
117
|
+
lineHeight: "16px",
|
|
118
|
+
cursor: l ? "pointer" : "default"
|
|
119
|
+
},
|
|
120
|
+
onClick: m,
|
|
121
|
+
children: /* @__PURE__ */ e("small", { children: d })
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
t ? /* @__PURE__ */ e(
|
|
125
|
+
n,
|
|
126
|
+
{
|
|
127
|
+
animation: "wave",
|
|
128
|
+
height: 10,
|
|
129
|
+
width: "100px",
|
|
130
|
+
sx: { mb: 1, mt: 1 }
|
|
131
|
+
}
|
|
132
|
+
) : p,
|
|
133
|
+
t ? null : x
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ e(i, { children: w })
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
);
|
|
119
139
|
};
|
|
120
140
|
export {
|
|
121
|
-
|
|
141
|
+
y as CardAlternate
|
|
122
142
|
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as C, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import a from "react";
|
|
3
2
|
import { AddPhotoAlternate as I, Delete as W, Search as j, CheckBox as E, CloudUpload as P, Add as _ } from "@mui/icons-material";
|
|
4
3
|
import { IconButton as S, Dialog as N, DialogContent as O, Box as u, TextField as q, InputAdornment as z, Button as d, DialogActions as G } from "@mui/material";
|
|
5
|
-
import
|
|
4
|
+
import s from "react";
|
|
6
5
|
import H from "../../../../hooks/useToggle.js";
|
|
7
6
|
import { Tabs as J } from "../../../tabs/index.js";
|
|
7
|
+
import i from "./styled.js";
|
|
8
8
|
function Z({
|
|
9
|
-
value:
|
|
9
|
+
value: p,
|
|
10
10
|
list: A,
|
|
11
11
|
newIcon: o,
|
|
12
12
|
loading: m,
|
|
13
13
|
onChange: f,
|
|
14
14
|
onFileUpload: y
|
|
15
15
|
}) {
|
|
16
|
-
const { state: b, action: g } = H(!1), [x, k] =
|
|
17
|
-
|
|
16
|
+
const { state: b, action: g } = H(!1), [x, k] = s.useState(""), [l, r] = s.useState(null), [h, B] = s.useState();
|
|
17
|
+
s.useEffect(() => (o && r(o), () => {
|
|
18
18
|
}), [o]);
|
|
19
19
|
const F = (t) => {
|
|
20
20
|
k(t.target.value);
|
|
21
21
|
}, U = (t) => () => {
|
|
22
22
|
r(t);
|
|
23
23
|
}, v = () => {
|
|
24
|
-
l && (f(l),
|
|
24
|
+
l && (f(l), c());
|
|
25
25
|
}, D = () => {
|
|
26
26
|
r(null), f("");
|
|
27
|
-
},
|
|
27
|
+
}, c = () => {
|
|
28
28
|
g.close(), r(null);
|
|
29
29
|
}, R = (t) => {
|
|
30
30
|
t.target.files && B(t.target.files[0]);
|
|
31
31
|
}, T = () => {
|
|
32
|
-
|
|
32
|
+
h && (y(h.name), c());
|
|
33
33
|
};
|
|
34
34
|
return /* @__PURE__ */ n(C, { children: [
|
|
35
35
|
/* @__PURE__ */ n(i.Container, { children: [
|
|
36
|
-
|
|
36
|
+
p ? /* @__PURE__ */ e(i.Img, { src: p }) : /* @__PURE__ */ e(I, { color: "action" }),
|
|
37
37
|
/* @__PURE__ */ n(i.Actions, { children: [
|
|
38
38
|
/* @__PURE__ */ e(
|
|
39
39
|
S,
|
|
@@ -44,7 +44,7 @@ function Z({
|
|
|
44
44
|
children: /* @__PURE__ */ e(I, {})
|
|
45
45
|
}
|
|
46
46
|
),
|
|
47
|
-
!!
|
|
47
|
+
!!p && /* @__PURE__ */ e(
|
|
48
48
|
S,
|
|
49
49
|
{
|
|
50
50
|
title: "Remove Icon",
|
|
@@ -59,7 +59,7 @@ function Z({
|
|
|
59
59
|
N,
|
|
60
60
|
{
|
|
61
61
|
open: b.isOpen,
|
|
62
|
-
onClose:
|
|
62
|
+
onClose: c,
|
|
63
63
|
maxWidth: "sm",
|
|
64
64
|
fullWidth: !0,
|
|
65
65
|
scroll: "paper",
|
|
@@ -85,15 +85,15 @@ function Z({
|
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
87
|
A.filter((t) => {
|
|
88
|
-
const
|
|
89
|
-
return !(
|
|
88
|
+
const a = t.split("/ontology-icon/");
|
|
89
|
+
return !(a[1] && a[1].includes("/"));
|
|
90
90
|
}).filter((t) => {
|
|
91
91
|
if (x) {
|
|
92
92
|
if (t.search(new RegExp(x, "i")) !== -1)
|
|
93
93
|
return !0;
|
|
94
94
|
} else return !0;
|
|
95
95
|
return !1;
|
|
96
|
-
}).map((t,
|
|
96
|
+
}).map((t, a) => /* @__PURE__ */ n(
|
|
97
97
|
i.SelectButton,
|
|
98
98
|
{
|
|
99
99
|
variant: l === t ? "outlined" : "text",
|
|
@@ -104,7 +104,7 @@ function Z({
|
|
|
104
104
|
l === t ? /* @__PURE__ */ e(E, {}) : null
|
|
105
105
|
]
|
|
106
106
|
},
|
|
107
|
-
|
|
107
|
+
a
|
|
108
108
|
))
|
|
109
109
|
] })
|
|
110
110
|
},
|
|
@@ -150,7 +150,7 @@ function Z({
|
|
|
150
150
|
variant: "contained",
|
|
151
151
|
color: "primary",
|
|
152
152
|
startIcon: /* @__PURE__ */ e(P, {}),
|
|
153
|
-
disabled: m ||
|
|
153
|
+
disabled: m || h === null,
|
|
154
154
|
children: m ? "Uploading..." : "Upload!"
|
|
155
155
|
}
|
|
156
156
|
)
|
|
@@ -163,7 +163,7 @@ function Z({
|
|
|
163
163
|
}
|
|
164
164
|
) }),
|
|
165
165
|
/* @__PURE__ */ n(G, { style: { padding: "5px 15px 15px 15px" }, children: [
|
|
166
|
-
/* @__PURE__ */ e(d, { onClick:
|
|
166
|
+
/* @__PURE__ */ e(d, { onClick: c, variant: "contained", children: "Cancel" }),
|
|
167
167
|
/* @__PURE__ */ e(
|
|
168
168
|
d,
|
|
169
169
|
{
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import f from "react";
|
|
3
2
|
import k from "lodash";
|
|
3
|
+
import f from "react";
|
|
4
4
|
import { useForm as P, Controller as l } from "react-hook-form";
|
|
5
|
-
import O from "./components/
|
|
6
|
-
import j from "./components/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { CatalogueInstanceSelector as O } from "./components/catalogue-instance-selector/index.js";
|
|
6
|
+
import j from "./components/property-list/index.js";
|
|
7
|
+
import K from "./components/recognition-property-list/index.js";
|
|
8
|
+
import { FormLabel as L, Button as b } from "@mui/material";
|
|
9
|
+
import { getNestedChildrenFromMap as _ } from "../../utils/ontology.js";
|
|
10
|
+
import { TreeSelect as w } from "../tree-select/index.js";
|
|
11
11
|
import A from "./components/select-icon/index.js";
|
|
12
12
|
import { T as m } from "../../TextField-CdKnj6de.js";
|
|
13
13
|
import { F as g } from "../../property-list-form-D77cAJ24.js";
|
|
@@ -21,10 +21,10 @@ function B(e, x) {
|
|
|
21
21
|
control: i,
|
|
22
22
|
formState: { errors: v },
|
|
23
23
|
getValues: h,
|
|
24
|
-
reset:
|
|
24
|
+
reset: V
|
|
25
25
|
} = P({
|
|
26
26
|
defaultValues: e.defaultValues
|
|
27
|
-
}), [
|
|
27
|
+
}), [C, F] = f.useState([]), I = (t) => {
|
|
28
28
|
const a = new Map(t);
|
|
29
29
|
for (const [r, o] of a)
|
|
30
30
|
a.set(r, {
|
|
@@ -33,7 +33,7 @@ function B(e, x) {
|
|
|
33
33
|
value: o.templateKey,
|
|
34
34
|
checked: h("parent") === o.templateKey
|
|
35
35
|
});
|
|
36
|
-
return
|
|
36
|
+
return _(a, !1);
|
|
37
37
|
}, S = () => {
|
|
38
38
|
const t = I(e.mappedTemplates);
|
|
39
39
|
F(t);
|
|
@@ -45,7 +45,7 @@ function B(e, x) {
|
|
|
45
45
|
};
|
|
46
46
|
return f.useImperativeHandle(x, () => ({
|
|
47
47
|
resetForm() {
|
|
48
|
-
|
|
48
|
+
V();
|
|
49
49
|
}
|
|
50
50
|
})), f.useEffect(() => (S(), () => {
|
|
51
51
|
}), [e.mappedTemplates]), /* @__PURE__ */ u("form", { onSubmit: (t, a) => {
|
|
@@ -118,11 +118,11 @@ function B(e, x) {
|
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
120
|
return /* @__PURE__ */ n(
|
|
121
|
-
|
|
121
|
+
w,
|
|
122
122
|
{
|
|
123
123
|
label: "Parent",
|
|
124
124
|
idKey: "templateKey",
|
|
125
|
-
data:
|
|
125
|
+
data: C,
|
|
126
126
|
selected: t ? [t] : "",
|
|
127
127
|
onChange: (r, o) => {
|
|
128
128
|
a({
|
|
@@ -142,7 +142,7 @@ function B(e, x) {
|
|
|
142
142
|
name: "agentReferenceIds",
|
|
143
143
|
control: i,
|
|
144
144
|
render: ({ field: { onChange: t } }) => /* @__PURE__ */ n(
|
|
145
|
-
|
|
145
|
+
O,
|
|
146
146
|
{
|
|
147
147
|
templates: e.agentTemplates ?? /* @__PURE__ */ new Map(),
|
|
148
148
|
data: e.agentsData,
|
|
@@ -243,7 +243,7 @@ function B(e, x) {
|
|
|
243
243
|
)
|
|
244
244
|
] }),
|
|
245
245
|
/* @__PURE__ */ u(g, { children: [
|
|
246
|
-
/* @__PURE__ */ n(
|
|
246
|
+
/* @__PURE__ */ n(L, { children: "Icon" }),
|
|
247
247
|
/* @__PURE__ */ n(
|
|
248
248
|
l,
|
|
249
249
|
{
|
|
@@ -255,8 +255,7 @@ function B(e, x) {
|
|
|
255
255
|
list: [],
|
|
256
256
|
value: t ?? "",
|
|
257
257
|
newIcon: "",
|
|
258
|
-
onFileUpload:
|
|
259
|
-
},
|
|
258
|
+
onFileUpload: a,
|
|
260
259
|
onChange: a
|
|
261
260
|
}
|
|
262
261
|
)
|
|
@@ -269,7 +268,7 @@ function B(e, x) {
|
|
|
269
268
|
name: "properties",
|
|
270
269
|
control: i,
|
|
271
270
|
render: ({ field: { value: t, onChange: a } }) => /* @__PURE__ */ n(
|
|
272
|
-
|
|
271
|
+
j,
|
|
273
272
|
{
|
|
274
273
|
list: t || [],
|
|
275
274
|
inputVariant: e.inputVariant,
|
|
@@ -286,7 +285,7 @@ function B(e, x) {
|
|
|
286
285
|
name: "recognitionPropertyList",
|
|
287
286
|
control: i,
|
|
288
287
|
render: ({ field: { value: t, onChange: a } }) => /* @__PURE__ */ n(
|
|
289
|
-
|
|
288
|
+
K,
|
|
290
289
|
{
|
|
291
290
|
list: t || [],
|
|
292
291
|
getFormValues: h,
|
package/dist/main.d.ts
CHANGED