@hybridcore/ui 1.5.88 → 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 +20 -7
- 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/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/widget/index.js +4 -0
- package/dist/components/widget/styled.js +38 -0
- package/dist/main.d.ts +148 -68
- package/dist/main.js +13 -11
- package/package.json +3 -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 }) => ({
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { styled as t, Paper as n, Box as o } from "@mui/material";
|
|
2
|
+
const i = t(n, {
|
|
3
|
+
name: "HCWidget",
|
|
4
|
+
slot: "Root"
|
|
5
|
+
})(() => ({
|
|
6
|
+
height: "100%",
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "column"
|
|
9
|
+
})), a = t(o, {
|
|
10
|
+
name: "HCWidget",
|
|
11
|
+
slot: "Header"
|
|
12
|
+
})(({ theme: e }) => ({
|
|
13
|
+
flex: "0 0 auto",
|
|
14
|
+
padding: e.spacing(1.25, 2)
|
|
15
|
+
})), l = t(o, {
|
|
16
|
+
name: "HCWidget",
|
|
17
|
+
slot: "Content"
|
|
18
|
+
})(() => ({
|
|
19
|
+
position: "relative",
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column",
|
|
22
|
+
flex: "1 1 auto",
|
|
23
|
+
minHeight: 0
|
|
24
|
+
})), s = t(o, {
|
|
25
|
+
name: "HCWidget",
|
|
26
|
+
slot: "Footer"
|
|
27
|
+
})(({ theme: e }) => ({
|
|
28
|
+
flex: "0 0 auto",
|
|
29
|
+
padding: e.spacing(1.25, 2)
|
|
30
|
+
})), c = {
|
|
31
|
+
Root: i,
|
|
32
|
+
Header: a,
|
|
33
|
+
Content: l,
|
|
34
|
+
Footer: s
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
c as Widget
|
|
38
|
+
};
|