@hortiview/shared-components 0.0.7335 → 0.0.7369

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.
Files changed (69) hide show
  1. package/README.md +83 -1
  2. package/dist/assets/contextMenu.css +1 -1
  3. package/dist/assets/genericCard.css +1 -0
  4. package/dist/assets/genericTable.css +1 -1
  5. package/dist/components/AlertBanner/AlertBanner.js +1 -1
  6. package/dist/components/AlertBanner/AlertBanner.test.js +2 -2
  7. package/dist/components/BaseView/BaseView.js +1 -1
  8. package/dist/components/BaseView/BaseView.test.js +2 -2
  9. package/dist/components/BasicHeading/BasicHeading.js +1 -1
  10. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  11. package/dist/components/BlockView/BlockView.test.js +1 -1
  12. package/dist/components/ContextMenu/ContextMenu.js +16 -15
  13. package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
  14. package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
  15. package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
  16. package/dist/components/EmptyView/EmptyView.test.js +1 -1
  17. package/dist/components/Filter/Filter.js +39 -42
  18. package/dist/components/Filter/Filter.test.js +22 -19
  19. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
  20. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +1 -1
  21. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
  22. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
  23. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
  24. package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
  25. package/dist/components/GenericTable/GenericTable.d.ts +7 -2
  26. package/dist/components/GenericTable/GenericTable.js +91 -66
  27. package/dist/components/GenericTable/GenericTable.test.js +59 -45
  28. package/dist/components/GenericTable/GenericTableService.d.ts +19 -0
  29. package/dist/components/GenericTable/GenericTableService.js +59 -0
  30. package/dist/components/GenericTable/Mobile/GenericCard.d.ts +19 -0
  31. package/dist/components/GenericTable/Mobile/GenericCard.js +68 -0
  32. package/dist/components/GenericTable/Mobile/GenericCard.test.d.ts +1 -0
  33. package/dist/components/GenericTable/Mobile/GenericCard.test.js +76 -0
  34. package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +22 -0
  35. package/dist/components/GenericTable/Mobile/GenericCardList.js +20 -0
  36. package/dist/components/GenericTable/Mobile/GenericCardList.test.d.ts +1 -0
  37. package/dist/components/GenericTable/Mobile/GenericCardList.test.js +78 -0
  38. package/dist/components/HashTabView/HashTabView.js +1 -1
  39. package/dist/components/HashTabView/HashTabView.test.js +1 -1
  40. package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
  41. package/dist/components/Iconify/Iconify.test.js +1 -1
  42. package/dist/components/InfoGroup/InfoGroup.js +1 -1
  43. package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
  44. package/dist/components/ListArea/ListArea.test.js +1 -1
  45. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  46. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
  47. package/dist/components/OverflowTooltip/OverflowTooltip.js +29 -13
  48. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
  49. package/dist/components/Scrollbar/scrollbar.test.js +1 -1
  50. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  51. package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
  52. package/dist/contextMenu.module-DNQ8d9Aj.js +8 -0
  53. package/dist/genericCard.module-DzqcufuN.js +12 -0
  54. package/dist/genericTable.module-CXfRg0e4.js +15 -0
  55. package/dist/hooks/useBreakpoints.js +5 -0
  56. package/dist/hooks/useBreakpoints.test.js +2 -2
  57. package/dist/index-DW4oU_OU.js +11708 -0
  58. package/dist/main.d.ts +1 -1
  59. package/dist/main.js +60 -59
  60. package/dist/{react.esm-C3jDj5Fe.js → react.esm-Dy4VzU4L.js} +4 -1
  61. package/dist/types/GenericTable.d.ts +36 -0
  62. package/package.json +10 -10
  63. package/dist/assets/Filter.css +0 -22
  64. package/dist/contextMenu.module-B7aUMFPe.js +0 -7
  65. package/dist/genericTable.module-BkU2VDKR.js +0 -11
  66. package/dist/hooks/useBreakpoint.js +0 -5
  67. package/dist/index-BQnj-5Zt.js +0 -2963
  68. /package/dist/hooks/{useBreakpoint.d.ts → useBreakpoints.d.ts} +0 -0
  69. /package/dist/{useBreakpoint-BNeVhjjZ.js → useBreakpoints-BNeVhjjZ.js} +0 -0
@@ -0,0 +1,78 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { a as r, s as n, w as l } from "../../../react.esm-Dy4VzU4L.js";
3
+ import { GenericCardList as s } from "./GenericCardList.js";
4
+ import { d as g, t as i, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
+ g("GenericCardList", () => {
6
+ const d = [
7
+ { id: "name", header: "Name", accessor: "name", asCardTitle: !0 },
8
+ { id: "age", header: "Age", accessor: "age" },
9
+ { id: "id", header: "Id", accessor: "id" },
10
+ { id: "gender", header: "Gender", accessor: "gender" }
11
+ ], c = [
12
+ {
13
+ id: 1,
14
+ name: "John Doe",
15
+ age: 30,
16
+ gender: "male",
17
+ actions: /* @__PURE__ */ o("button", { children: "View" })
18
+ },
19
+ {
20
+ id: 2,
21
+ name: "Jane Smith",
22
+ age: 25,
23
+ gender: "female",
24
+ actions: /* @__PURE__ */ o("button", { children: "Edit" })
25
+ }
26
+ ];
27
+ i("renders noContentText when data is empty", () => {
28
+ r(
29
+ /* @__PURE__ */ o(
30
+ s,
31
+ {
32
+ columns: d,
33
+ data: [],
34
+ hiddenColumns: [],
35
+ order: [],
36
+ noContentText: "No data available"
37
+ }
38
+ )
39
+ );
40
+ const a = n.getByText("No data available");
41
+ e(a).toBeInTheDocument();
42
+ }), i("renders cards with correct data", () => {
43
+ r(
44
+ /* @__PURE__ */ o(
45
+ s,
46
+ {
47
+ columns: d,
48
+ data: c,
49
+ hiddenColumns: [],
50
+ order: [],
51
+ noContentText: "No data available"
52
+ }
53
+ )
54
+ );
55
+ const a = n.getAllByTestId("card-title");
56
+ e(a).toHaveLength(2), e(a[0]).toHaveTextContent("John Doe"), e(a[1]).toHaveTextContent("Jane Smith");
57
+ const t = n.getAllByTestId("card-body");
58
+ e(t).toHaveLength(2), e(t[0]).toHaveTextContent("Age:"), e(t[0]).toHaveTextContent("30"), e(t[1]).toHaveTextContent("Age:"), e(t[1]).toHaveTextContent("25");
59
+ }), i("renders columns in correct order", () => {
60
+ r(
61
+ /* @__PURE__ */ o(
62
+ s,
63
+ {
64
+ columns: d,
65
+ data: [c[1]],
66
+ hiddenColumns: [],
67
+ order: ["gender", "age"],
68
+ noContentText: "No data available"
69
+ }
70
+ )
71
+ ), l(() => {
72
+ const a = n.getAllByTestId("card-body");
73
+ e(a).toHaveLength(1);
74
+ const t = n.getAllByTestId("row");
75
+ e(t).toHaveLength(3), n.debug(), e(t[0]).toHaveTextContent("Gender:"), e(t[1]).toHaveTextContent("Age:"), e(t[1]).toHaveTextContent("Id:");
76
+ });
77
+ });
78
+ });
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as d, Fragment as I } from "react/jsx-runtime";
2
2
  import { Elevation as N, Group as c, TabBar as b, Tab as k, Padding as x } from "@element/react-components";
3
3
  import { useState as y, useEffect as $ } from "react";
4
- import { u as w } from "../../useBreakpoint-BNeVhjjZ.js";
4
+ import { u as w } from "../../useBreakpoints-BNeVhjjZ.js";
5
5
  import { s as a } from "../../HashTabView.module-CJX4gxTu.js";
6
6
  const h = (n, t) => !t || !n ? 0 : n.findIndex((i) => i.hash === t.replace("#", "")) ?? 0, D = ({
7
7
  tabs: n,
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, Fragment as o } from "react/jsx-runtime";
2
- import { a, s as e, f as r } from "../../react.esm-C3jDj5Fe.js";
2
+ import { a, s as e, f as r } from "../../react.esm-Dy4VzU4L.js";
3
3
  import { HashTabView as c } from "./HashTabView.js";
4
4
  import { d as h, t as l, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const m = [
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { a as i, s as t, f as T } from "../../react.esm-C3jDj5Fe.js";
2
+ import { a as i, s as t, f as T } from "../../react.esm-Dy4VzU4L.js";
3
3
  import { HeaderFilter as s } from "./HeaderFilter.js";
4
4
  import { d as c, t as o, v as l, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  c("HeaderFilter-Test", () => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { I as c } from "../../Iconify-CY9lZjFd.js";
3
3
  import { AvailableCustomIcons as l } from "../../enums/AvailableCustomIcons.js";
4
- import { a as r, w as s, s as i } from "../../react.esm-C3jDj5Fe.js";
4
+ import { a as r, w as s, s as i } from "../../react.esm-Dy4VzU4L.js";
5
5
  import { d as f, t as a, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
6
6
  f("Iconify Test", async () => {
7
7
  const m = Object.keys(l).filter((e) => isNaN(Number(e)));
@@ -1,7 +1,7 @@
1
1
  import { jsxs as s, jsx as e, Fragment as h } from "react/jsx-runtime";
2
2
  import { Divider as d, Group as c, TypoCaption as v, TypoSubtitle as g } from "@element/react-components";
3
3
  import { Fragment as u } from "react";
4
- import { u as f } from "../../useBreakpoint-BNeVhjjZ.js";
4
+ import { u as f } from "../../useBreakpoints-BNeVhjjZ.js";
5
5
  import { VerticalDivider as y } from "../VerticalDivider/VerticalDivider.js";
6
6
  import { s as i } from "../../infoGroup.module-B3E1gCGi.js";
7
7
  const x = ({ fields: t, bold: n }) => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { a as l, s as t } from "../../react.esm-C3jDj5Fe.js";
2
+ import { a as l, s as t } from "../../react.esm-Dy4VzU4L.js";
3
3
  import { InfoGroup as r } from "./InfoGroup.js";
4
4
  import { d as s, t as i, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  s("InfoGroup Test", () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, Fragment as i } from "react/jsx-runtime";
2
2
  import { TypoButton as p } from "@element/react-components";
3
- import { a as s, s as a, f as u } from "../../react.esm-C3jDj5Fe.js";
3
+ import { a as s, s as a, f as u } from "../../react.esm-Dy4VzU4L.js";
4
4
  import { ListArea as c } from "./ListArea.js";
5
5
  import { getGroupedItems as h } from "./ListAreaService.js";
6
6
  import { d as m, t as n, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { BigLoadingSpinner as n } from "./BigLoadingSpinner.js";
3
- import { a as i, s as e } from "../../../react.esm-C3jDj5Fe.js";
3
+ import { a as i, s as e } from "../../../react.esm-Dy4VzU4L.js";
4
4
  import { s as r } from "../../../bigLoadingSpinner.module-GgbFol8k.js";
5
5
  import { d as g, t as a, g as t } from "../../../vi.JYQecGiw-BbUbJcT8.js";
6
6
  g("BigLoadingSpinner Test", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { a as o, s as e } from "../../../react.esm-C3jDj5Fe.js";
2
+ import { a as o, s as e } from "../../../react.esm-Dy4VzU4L.js";
3
3
  import { LoadingSpinner as r } from "./LoadingSpinner.js";
4
4
  import { d as a, t as i, g as n } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  a("LoadingSpinner Test", () => {
@@ -1,22 +1,38 @@
1
- import { jsxs as m, Fragment as p, jsx as c } from "react/jsx-runtime";
2
- import { useState as h, useMemo as f, cloneElement as d } from "react";
3
- import { H as x } from "../../react-tooltip.min-BzHiZW8k.js";
4
- const a = ({ id: t, text: e, children: i }) => {
5
- const [l, s] = h(""), n = f(
6
- () => d(i, {
7
- "data-tooltip-id": t,
1
+ import { jsxs as c, Fragment as p, jsx as l } from "react/jsx-runtime";
2
+ import { TypoBody as d } from "@element/react-components";
3
+ import { useState as h, useMemo as a, cloneElement as f } from "react";
4
+ import { H as w } from "../../react-tooltip.min-BzHiZW8k.js";
5
+ const k = ({ id: e, text: i, children: t }) => {
6
+ const [r, s] = h(!1), n = a(
7
+ () => f(t, {
8
+ "data-tooltip-id": e,
8
9
  onMouseEnter: ({ currentTarget: o }) => {
9
- const r = o.clientWidth < o.scrollWidth || o.clientHeight < o.scrollHeight;
10
- s(r ? e : "");
10
+ const m = o.clientWidth < o.scrollWidth || o.clientHeight < o.scrollHeight;
11
+ s(m);
11
12
  }
12
13
  }),
13
- [i, t, e]
14
+ [t, e]
14
15
  );
15
- return /* @__PURE__ */ m(p, { children: [
16
+ return /* @__PURE__ */ c(p, { children: [
16
17
  n,
17
- /* @__PURE__ */ c(x, { id: t, noArrow: !0, place: "bottom", children: l })
18
+ /* @__PURE__ */ l(
19
+ w,
20
+ {
21
+ id: e,
22
+ noArrow: !0,
23
+ place: "bottom",
24
+ clickable: !0,
25
+ hidden: !r,
26
+ style: {
27
+ whiteSpace: "normal",
28
+ maxWidth: "90%",
29
+ wordBreak: "break-word"
30
+ },
31
+ children: /* @__PURE__ */ l(d, { level: 2, children: i })
32
+ }
33
+ )
18
34
  ] });
19
35
  };
20
36
  export {
21
- a as OverflowTooltip
37
+ k as OverflowTooltip
22
38
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { TypoDisplay as n } from "@element/react-components";
3
- import { a as i, s as e, w as s } from "../../react.esm-C3jDj5Fe.js";
4
- import { u as a } from "../../index-BQnj-5Zt.js";
3
+ import { a as i, s as e, w as s } from "../../react.esm-Dy4VzU4L.js";
4
+ import { u as a } from "../../index-DW4oU_OU.js";
5
5
  import { OverflowTooltip as c } from "./OverflowTooltip.js";
6
6
  import { d as u, t as p, g as r } from "../../vi.JYQecGiw-BbUbJcT8.js";
7
7
  u("OverflowTooltip Test", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { a, s as e } from "../../react.esm-C3jDj5Fe.js";
2
+ import { a, s as e } from "../../react.esm-Dy4VzU4L.js";
3
3
  import { ScrollbarY as d, ScrollbarX as l } from "./Scrollbar.js";
4
4
  import { d as c, t, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  c("Scrollbar", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { a as r, s as t, f as h, b as l } from "../../react.esm-C3jDj5Fe.js";
2
+ import { a as r, s as t, f as h, b as l } from "../../react.esm-Dy4VzU4L.js";
3
3
  import { SearchBar as s } from "./SearchBar.js";
4
4
  import { d as m, t as o, v as n, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  m("SearchBar Test", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { a as r } from "../../react.esm-C3jDj5Fe.js";
2
+ import { a as r } from "../../react.esm-Dy4VzU4L.js";
3
3
  import { VerticalDivider as s } from "./VerticalDivider.js";
4
4
  import { d as o, t as l, g as i } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  o("VerticalDivider Test", () => {
@@ -0,0 +1,8 @@
1
+ import "./assets/contextMenu.css";
2
+ const n = "_menu_1jlla_1", o = "_icon_1jlla_5", c = {
3
+ menu: n,
4
+ icon: o
5
+ };
6
+ export {
7
+ c as s
8
+ };
@@ -0,0 +1,12 @@
1
+ import "./assets/genericCard.css";
2
+ const t = "_cardTitle_1738q_1", o = "_cardBody_1738q_5", _ = "_cardContent_1738q_10", c = "_row_1738q_14", n = "_font_1738q_18", r = "_title_1738q_26", e = {
3
+ cardTitle: t,
4
+ cardBody: o,
5
+ cardContent: _,
6
+ row: c,
7
+ font: n,
8
+ title: r
9
+ };
10
+ export {
11
+ e as s
12
+ };
@@ -0,0 +1,15 @@
1
+ import "./assets/genericTable.css";
2
+ const t = "_filterButton_66wbq_1", e = "_filterBadge_66wbq_6", n = {
3
+ filterButton: t,
4
+ filterBadge: e
5
+ }, o = "_topBar_1msoo_1", a = "_filterBar_1msoo_5", s = "_emptyTable_1msoo_9", _ = "_elevation_1msoo_17", l = "_table_1msoo_22", i = {
6
+ topBar: o,
7
+ filterBar: a,
8
+ emptyTable: s,
9
+ elevation: _,
10
+ table: l
11
+ };
12
+ export {
13
+ i as a,
14
+ n as s
15
+ };
@@ -0,0 +1,5 @@
1
+ import "react";
2
+ import { u as p } from "../useBreakpoints-BNeVhjjZ.js";
3
+ export {
4
+ p as useBreakpoints
5
+ };
@@ -1,5 +1,5 @@
1
- import { r as t, w as s } from "../react.esm-C3jDj5Fe.js";
2
- import { u as o } from "../useBreakpoint-BNeVhjjZ.js";
1
+ import { r as t, w as s } from "../react.esm-Dy4VzU4L.js";
2
+ import { u as o } from "../useBreakpoints-BNeVhjjZ.js";
3
3
  import { d as a, t as i, g as r } from "../vi.JYQecGiw-BbUbJcT8.js";
4
4
  a("useBreakpoint Test", () => {
5
5
  i("returns object", () => {