@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.
@@ -1,31 +1,31 @@
1
- import { useThemeProps as D } from "@mui/material";
1
+ import { useThemeProps as E } from "@mui/material";
2
2
  import { useState as g } from "react";
3
- const _ = (l) => {
4
- const i = D({ props: l, name: "MuiPaginatedList" }), {
5
- title: u,
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: m,
8
+ totalCount: u,
9
9
  onChange: t,
10
10
  onItemClick: w,
11
11
  sx: d,
12
12
  ...h
13
- } = i, [L, p] = g(0), [f, C] = g(5), [b, P] = g([]), r = (e == null ? void 0 : e.pageNumber) !== void 0 ? e.pageNumber : L, n = (e == null ? void 0 : e.rows) !== void 0 ? e.rows : f, v = (s, o) => {
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
- C(o), p(0), t && t({ ...e, pageNumber: 0, rows: o });
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((k) => k !== s));
22
- }, I = t ? m || 0 : a.length, M = t ? a : a.slice(r * n, (r + 1) * n), S = {
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: u,
26
+ title: m,
27
27
  data: a,
28
- displayData: M,
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: S,
38
+ ownerState: k,
39
39
  sx: d,
40
40
  other: h
41
41
  };
42
42
  };
43
43
  export {
44
- _ as usePaginatedListLogic
44
+ T as usePaginatedListLogic
45
45
  };
@@ -1,17 +1,17 @@
1
- import { styled as t, Card as e, CardHeader as a, CardContent as n, List as o } from "@mui/material";
2
- const s = t(e, {
3
- name: "MuiPaginatedList",
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: "MuiPaginatedList",
10
+ name: "HCPaginatedList",
11
11
  slot: "Header"
12
- })(({ theme: i }) => ({
13
- padding: i.spacing(3),
14
- paddingBottom: i.spacing(2),
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: "MuiPaginatedList",
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: "MuiPaginatedList",
32
+ name: "HCPaginatedList",
33
33
  slot: "List"
34
34
  })(() => ({
35
35
  flex: 1,
36
36
  overflowY: "auto"
37
37
  })), p = t("div", {
38
- name: "MuiPaginatedList",
38
+ name: "HCPaginatedList",
39
39
  slot: "Pagination"
40
- })(({ theme: i }) => ({
41
- borderTop: `1px solid ${i.palette.divider}`
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 M } from "../../utils/ontology.js";
4
- const $ = (c) => {
5
- const a = g({ props: c, name: "MuiProfileCard" }), { 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(() => {
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 ? M(e, 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
- $ as useProfileCardLogic
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: "MuiProfileCard",
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: "MuiProfileCard",
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: "MuiProfileCard",
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: "MuiProfileCard",
32
+ name: "HCProfileCard",
33
33
  slot: "Variables",
34
34
  overridesResolver: (r, o) => o.variables
35
35
  })(({ theme: r }) => ({
@@ -0,0 +1,4 @@
1
+ import { Widget as r } from "./styled.js";
2
+ export {
3
+ r as Widget
4
+ };
@@ -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
+ };