@hortiview/shared-components 0.0.6193 → 0.0.6320

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 (35) hide show
  1. package/README.md +1 -5
  2. package/dist/assets/main.css +2 -2
  3. package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
  4. package/dist/components/BaseView/BaseView.test.js +1 -1
  5. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  6. package/dist/components/BlockView/BlockView.test.js +1 -1
  7. package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
  8. package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
  9. package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
  10. package/dist/components/EmptyView/EmptyView.test.js +1 -1
  11. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
  12. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +1 -1
  13. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
  14. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +1 -1
  15. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
  16. package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
  17. package/dist/components/GenericTable/GenericTable.d.ts +1 -1
  18. package/dist/components/GenericTable/GenericTable.js +69 -60
  19. package/dist/components/GenericTable/GenericTable.test.js +63 -32
  20. package/dist/components/HashTabView/HashTabView.test.js +1 -1
  21. package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
  22. package/dist/components/Iconify/Iconify.d.ts +1 -1
  23. package/dist/components/Iconify/Iconify.js +37 -37
  24. package/dist/components/Iconify/Iconify.test.js +1 -1
  25. package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
  26. package/dist/components/ListArea/ListArea.test.js +1 -1
  27. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  28. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
  29. package/dist/components/Scrollbar/scrollbar.test.js +1 -1
  30. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  31. package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
  32. package/dist/main.d.ts +3 -3
  33. package/dist/{react.esm-C0LtovhP.js → react.esm-D9-uytwS.js} +1658 -1652
  34. package/dist/types/GenericTable.d.ts +9 -0
  35. package/package.json +23 -10
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, Fragment as m } from "react/jsx-runtime";
2
- import { r as t, s } from "../../react.esm-C0LtovhP.js";
2
+ import { r as t, s } from "../../react.esm-D9-uytwS.js";
3
3
  import { u as i } from "../../useBreakpoint-DROHPVxO.js";
4
4
  import { AlertBanner as n } from "./AlertBanner.js";
5
5
  import { d as c, b as u, t as r, g as l, v as a } from "../../vi.JYQecGiw-BbUbJcT8.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, Fragment as s } from "react/jsx-runtime";
2
2
  import { u as l } from "../../useBreakpoint-DROHPVxO.js";
3
3
  import { BaseView as r } from "./BaseView.js";
4
- import { r as i, s as e, f as p } from "../../react.esm-C0LtovhP.js";
4
+ import { r as i, s as e, f as p } from "../../react.esm-D9-uytwS.js";
5
5
  import { d as u, b as m, t as n, g as t, v as c } from "../../vi.JYQecGiw-BbUbJcT8.js";
6
6
  u("BaseView Test", () => {
7
7
  m(() => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, Fragment as c } from "react/jsx-runtime";
2
2
  import { Button as g } from "@element/react-components";
3
3
  import { BasicHeading as a } from "./BasicHeading.js";
4
- import { r as i, s as n } from "../../react.esm-C0LtovhP.js";
4
+ import { r as i, s as n } from "../../react.esm-D9-uytwS.js";
5
5
  import { d as h, t as s, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
6
6
  h("BasicHeading-Test", () => {
7
7
  s("render small container without content", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { r as s, s as o, f as n } from "../../react.esm-C0LtovhP.js";
2
+ import { r as s, s as o, f as n } from "../../react.esm-D9-uytwS.js";
3
3
  import { BlockView as r } from "./BlockView.js";
4
4
  import { d as B, v as a, t as i, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  B("BlockView Test", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { r as d, s as n, f as o, w as a } from "../../react.esm-C0LtovhP.js";
2
+ import { r as d, s as n, f as o, w as a } from "../../react.esm-D9-uytwS.js";
3
3
  import { ContextMenu as u } from "./ContextMenu.js";
4
4
  import { v as r, d as g, t as B, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const T = r.fn(), l = r.fn(), i = r.fn(), p = [
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { r as c, s as e } from "../../react.esm-C0LtovhP.js";
2
+ import { r as c, s as e } from "../../react.esm-D9-uytwS.js";
3
3
  import { DeleteModal as b } from "./DeleteModal.js";
4
4
  import { d as B, t as a, v as o, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  B("DeleteModal Test", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { r, s as t } from "../../react.esm-C0LtovhP.js";
2
+ import { r, s as t } from "../../react.esm-D9-uytwS.js";
3
3
  import { Disclaimer as s } from "./Disclaimer.js";
4
4
  import { d as i, t as m, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  i("Disclaimer test", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { r as s, s as o, w as r, f as l } from "../../react.esm-C0LtovhP.js";
2
+ import { r as s, s as o, w as r, f as l } from "../../react.esm-D9-uytwS.js";
3
3
  import { EmptyView as c } from "./EmptyView.js";
4
4
  import { d as h, t as T, g as e, v as d } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  h("EmptyView", () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { r as n, s as t, f as m } from "../../../react.esm-C0LtovhP.js";
2
+ import { r as n, s as t, f as m } from "../../../react.esm-D9-uytwS.js";
3
3
  import { FormCheckBox as c } from "./FormCheckBox.js";
4
4
  import { v as e, d as h, t as l, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const a = e.fn();
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { r as s, s as o, f as m } from "../../../react.esm-C0LtovhP.js";
2
+ import { r as s, s as o, f as m } from "../../../react.esm-D9-uytwS.js";
3
3
  import { FormDatePicker as c } from "./FormDatePicker.js";
4
4
  import { v as e, d as f, t as l, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const i = e.fn();
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { r as s, s as t, f as m } from "../../../react.esm-C0LtovhP.js";
2
+ import { r as s, s as t, f as m } from "../../../react.esm-D9-uytwS.js";
3
3
  import { FormRadio as l } from "./FormRadio.js";
4
4
  import { v as e, d as c, t as i, g as o } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const a = e.fn();
@@ -1,5 +1,5 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import { r as l, s as t, f as i } from "../../../react.esm-C0LtovhP.js";
2
+ import { r as l, s as t, f as i } from "../../../react.esm-D9-uytwS.js";
3
3
  import { FormSelect as m } from "./FormSelect.js";
4
4
  import { v as n, d as g, t as d, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const p = n.fn();
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { r as a, s as n } from "../../../react.esm-C0LtovhP.js";
2
+ import { r as a, s as n } from "../../../react.esm-D9-uytwS.js";
3
3
  import { FormSlider as l } from "./FormSlider.js";
4
4
  import { v as e, d as m, t as i, g as r } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const o = e.fn();
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { r as s, s as r, f as d } from "../../../react.esm-C0LtovhP.js";
2
+ import { r as s, s as r, f as d } from "../../../react.esm-D9-uytwS.js";
3
3
  import { FormText as o } from "./FormText.js";
4
4
  import { v as a, d as i, t as l, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
5
5
  const m = a.fn();
@@ -50,4 +50,4 @@ import { TableLayoutProps } from '../../types/GenericTable';
50
50
  * @param headerTranslation function that will be called to translate the headers by its key
51
51
  * @returns a table based on a given type and data
52
52
  */
53
- export declare const GenericTable: <T>({ data, hiddenColumns, order, cellTemplates, tableActions, noContentText, headerTranslation, pagination, getRowActions, }: TableLayoutProps<T>) => import("react/jsx-runtime").JSX.Element;
53
+ export declare const GenericTable: <T>({ data, hiddenColumns, order, cellTemplates, tableActions, noContentText, headerTranslation, pagination, getRowActions, customColumnWidth, title, }: TableLayoutProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,89 +1,98 @@
1
1
  import "../../assets/GenericTable.css";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { Elevation as h, Table as v, TableTopBar as y, Group as d, TypoSubtitle as B } from "@element/react-components";
4
- import { useMemo as b, Fragment as g } from "react";
5
- import { ContextMenu as T } from "../ContextMenu/ContextMenu.js";
6
- const x = "_topBar_1msoo_1", N = "_filterBar_1msoo_5", C = "_emptyTable_1msoo_9", I = "_elevation_1msoo_17", M = "_table_1msoo_22", m = {
7
- topBar: x,
8
- filterBar: N,
9
- emptyTable: C,
10
- elevation: I,
11
- table: M
12
- }, W = (e, l) => {
13
- if (!e)
2
+ import { jsx as e, jsxs as B } from "react/jsx-runtime";
3
+ import { Elevation as T, Table as x, TableTopBar as b, Group as _, Padding as N, TypoDisplay as j, TypoSubtitle as C } from "@element/react-components";
4
+ import { useMemo as v, Fragment as D } from "react";
5
+ import { ContextMenu as I } from "../ContextMenu/ContextMenu.js";
6
+ const M = "_topBar_1msoo_1", G = "_filterBar_1msoo_5", O = "_emptyTable_1msoo_9", P = "_elevation_1msoo_17", W = "_table_1msoo_22", d = {
7
+ topBar: M,
8
+ filterBar: G,
9
+ emptyTable: O,
10
+ elevation: P,
11
+ table: W
12
+ }, z = (n, l) => {
13
+ if (!n)
14
14
  return [];
15
- let o = Object.keys(e).map((r) => r);
16
- return l.length > 0 && (o = o.sort((r, u) => {
17
- const p = l.findIndex((s) => s === r), i = l.findIndex((s) => s === u);
18
- return p === -1 ? 1 : i === -1 ? -1 : p - i;
15
+ let o = Object.keys(n).map((t) => t);
16
+ return l.length > 0 && (o = o.sort((t, i) => {
17
+ const m = l.findIndex((c) => c === t), s = l.findIndex((c) => c === i);
18
+ return m === -1 ? 1 : s === -1 ? -1 : m - s;
19
19
  })), o;
20
- }, E = ({
21
- data: e = [],
20
+ }, $ = ({
21
+ data: n = [],
22
22
  hiddenColumns: l = [],
23
23
  order: o = [],
24
- cellTemplates: r = void 0,
25
- tableActions: u = [],
26
- noContentText: p = "No data available",
27
- headerTranslation: i = (f) => f,
28
- pagination: s = !1,
29
- getRowActions: c = void 0
24
+ cellTemplates: t = void 0,
25
+ tableActions: i = [],
26
+ noContentText: m = "No data available",
27
+ headerTranslation: s = (f) => f,
28
+ pagination: c = !1,
29
+ getRowActions: p = void 0,
30
+ customColumnWidth: h,
31
+ title: u
30
32
  }) => {
31
- const f = b(() => {
32
- if (e.length === 0)
33
+ const f = v(() => {
34
+ if (n.length === 0)
33
35
  return [];
34
- const a = W(e[0], o).map((t) => ({
35
- id: t,
36
- header: i(t),
37
- accessor: t,
38
- cellTemplate: r ? r[t] : void 0
39
- }));
40
- return c ? [...a, { id: "actions", header: "", accessor: "actions" }] : a;
41
- }, [e, r, o, i, c]), _ = b(() => c ? e.map((a) => {
42
- const t = /* @__PURE__ */ n(T, { actions: c(a), iconOrientation: "horizontal" });
43
- return { ...a, actions: t };
44
- }) : e, [e, c]);
45
- return /* @__PURE__ */ n(h, { elevation: 1, className: m.elevation, children: /* @__PURE__ */ n(
46
- v,
36
+ const a = z(n[0], o).map((r) => {
37
+ const y = h ? h[r] : void 0;
38
+ return {
39
+ id: r,
40
+ header: s(r),
41
+ accessor: r,
42
+ cellTemplate: t ? t[r] : void 0,
43
+ cellProps: { width: y }
44
+ };
45
+ });
46
+ return p ? [...a, { id: "actions", header: "", accessor: "actions" }] : a;
47
+ }, [n, t, o, s, p, h]), g = v(() => p ? n.map((a) => {
48
+ const r = /* @__PURE__ */ e(I, { actions: p(a), iconOrientation: "horizontal" });
49
+ return { ...a, actions: r };
50
+ }) : n, [n, p]);
51
+ return /* @__PURE__ */ e(T, { elevation: 1, className: d.elevation, children: /* @__PURE__ */ e(
52
+ x,
47
53
  {
48
- className: m.table,
54
+ className: d.table,
49
55
  fullWidth: !0,
50
56
  alwaysUseDivTags: !0,
51
57
  layout: "standard",
52
58
  hiddenColumns: l,
53
- data: _,
59
+ data: g,
54
60
  columns: f,
55
- leadingContent: u.length > 0 && /* @__PURE__ */ n(
56
- y,
61
+ leadingContent: u && i.length === 0 ? /* @__PURE__ */ e(b, { title: u }) : i.length > 0 && /* @__PURE__ */ e(
62
+ b,
57
63
  {
58
- className: m.topBar,
59
- filterBar: /* @__PURE__ */ n(
60
- d,
61
- {
62
- className: m.filterBar,
63
- fullWidth: !0,
64
- primaryAlign: "center",
65
- secondaryAlign: "center",
66
- children: u.map((a, t) => /* @__PURE__ */ n(g, { children: a }, `action_${t}`))
67
- }
68
- )
64
+ className: d.topBar,
65
+ filterBar: /* @__PURE__ */ B(_, { fullWidth: !0, direction: "vertical", gap: "none", children: [
66
+ u && /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(j, { level: 6, children: u }) }),
67
+ /* @__PURE__ */ e(
68
+ _,
69
+ {
70
+ className: d.filterBar,
71
+ fullWidth: !0,
72
+ primaryAlign: "center",
73
+ secondaryAlign: "center",
74
+ children: i.map((a, r) => /* @__PURE__ */ e(D, { children: a }, `action_${r}`))
75
+ }
76
+ )
77
+ ] })
69
78
  }
70
79
  ),
71
- paginated: s,
80
+ paginated: c,
72
81
  sortable: !0,
73
82
  noContentIncludeTable: !!f,
74
- noContentMessage: /* @__PURE__ */ n(
75
- d,
83
+ noContentMessage: /* @__PURE__ */ e(
84
+ _,
76
85
  {
77
86
  fullWidth: !0,
78
87
  primaryAlign: "center",
79
88
  secondaryAlign: "center",
80
- className: m.emptyTable,
81
- children: /* @__PURE__ */ n(B, { children: p })
89
+ className: d.emptyTable,
90
+ children: /* @__PURE__ */ e(C, { children: m })
82
91
  }
83
92
  )
84
93
  }
85
94
  ) });
86
95
  };
87
96
  export {
88
- E as GenericTable
97
+ $ as GenericTable
89
98
  };
@@ -1,40 +1,71 @@
1
- import { jsx as o, jsxs as B } from "react/jsx-runtime";
2
- import { r as d, s as t } from "../../react.esm-C0LtovhP.js";
1
+ import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
+ import { r as i, s as e } from "../../react.esm-D9-uytwS.js";
3
3
  import { GenericTable as c } from "./GenericTable.js";
4
- import { d as u, t as i, g as e, v as m } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
- u("GenericTable Test", () => {
6
- const T = [];
7
- i("render GenericTable with custom no content text", () => {
8
- d(/* @__PURE__ */ o(c, { data: T, noContentText: "noContent" })), e(t.getByText("noContent")).toBeInTheDocument();
9
- }), i("render GenericTable with data should render headers", () => {
10
- d(/* @__PURE__ */ o(c, { data: [{ id: 1, name: "test" }] })), e(t.getByText("id")).toBeInTheDocument(), e(t.getByText("name")).toBeInTheDocument();
11
- }), i("render GenericTable with hidden headers", () => {
12
- d(/* @__PURE__ */ o(c, { data: [{ id: 1, name: "test" }], hiddenColumns: ["name"] })), e(t.getByText("id")).toBeInTheDocument(), e(t.queryByText("name")).not.toBeInTheDocument();
13
- }), i("render GenericTable with custom header translation", () => {
14
- d(/* @__PURE__ */ o(c, { data: [{ id: 1, name: "test" }], headerTranslation: (a) => a + ".translated" })), e(t.getByText("id.translated")).toBeInTheDocument(), e(t.getByText("name.translated")).toBeInTheDocument();
15
- }), i("render GenericTable with custom cell template", () => {
16
- d(/* @__PURE__ */ o(c, { data: [{ id: 1, name: "test" }], cellTemplates: { id: (a) => /* @__PURE__ */ B("div", { children: [
17
- "label: ",
18
- a.row.original.id
19
- ] }) } })), e(t.getByText("label: 1")).toBeInTheDocument();
20
- }), i("render GenericTable with custom table actions", () => {
21
- const n = m.fn();
22
- d(/* @__PURE__ */ o(c, { data: [{ id: 1, name: "test" }], tableActions: [/* @__PURE__ */ o("button", { "data-testid": "testButton", onClick: n, children: "testbutton" }, "test")] })), e(t.getByText("testbutton")).toBeInTheDocument(), t.getByTestId("testButton").click(), e(n).toHaveBeenCalled();
23
- }), i("render GenericTable with custom pagination", () => {
24
- d(/* @__PURE__ */ o(c, { data: [{ id: 1, name: "test" }, { id: 2, name: "test2" }, { id: 3, name: "test3" }], pagination: !0 })), e(t.getByText("1 - 3 of 3")).toBeInTheDocument(), e(t.getByText("last_page")).toBeInTheDocument();
25
- }), i("render GenericTable with custom getRowActions", () => {
26
- const n = [{ id: 1, name: "test" }], a = m.fn();
27
- d(/* @__PURE__ */ o(c, { data: n, getRowActions: (l) => [
4
+ import { d as B, t as d, g as t, v as r } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
+ B("GenericTable Test", () => {
6
+ const m = [];
7
+ d("render GenericTable with custom no content text", () => {
8
+ i(/* @__PURE__ */ a(c, { data: m, noContentText: "noContent" })), t(e.getByText("noContent")).toBeInTheDocument();
9
+ }), d("render GenericTable with data should render headers", () => {
10
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test" }] })), t(e.getByText("id")).toBeInTheDocument(), t(e.getByText("name")).toBeInTheDocument();
11
+ }), d("render GenericTable with hidden headers", () => {
12
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test" }], hiddenColumns: ["name"] })), t(e.getByText("id")).toBeInTheDocument(), t(e.queryByText("name")).not.toBeInTheDocument();
13
+ }), d("render GenericTable with custom header translation", () => {
14
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test" }], headerTranslation: (o) => o + ".translated" })), t(e.getByText("id.translated")).toBeInTheDocument(), t(e.getByText("name.translated")).toBeInTheDocument();
15
+ }), d("render GenericTable with custom cell template", () => {
16
+ i(
17
+ /* @__PURE__ */ a(
18
+ c,
19
+ {
20
+ data: [{ id: 1, name: "test" }],
21
+ cellTemplates: { id: (o) => /* @__PURE__ */ u("div", { children: [
22
+ "label: ",
23
+ o.row.original.id
24
+ ] }) }
25
+ }
26
+ )
27
+ ), t(e.getByText("label: 1")).toBeInTheDocument();
28
+ }), d("render GenericTable with custom table actions", () => {
29
+ const n = r.fn();
30
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test" }], tableActions: [
31
+ /* @__PURE__ */ a("button", { "data-testid": "testButton", onClick: n, children: "testbutton" }, "test")
32
+ ] })), t(e.getByText("testbutton")).toBeInTheDocument(), e.getByTestId("testButton").click(), t(n).toHaveBeenCalled();
33
+ }), d("render GenericTable with custom pagination", () => {
34
+ i(/* @__PURE__ */ a(c, { data: [
35
+ { id: 1, name: "test" },
36
+ { id: 2, name: "test2" },
37
+ { id: 3, name: "test3" }
38
+ ], pagination: !0 })), t(e.getByText("1 - 3 of 3")).toBeInTheDocument(), t(e.getByText("last_page")).toBeInTheDocument();
39
+ }), d("render GenericTable with custom getRowActions", () => {
40
+ const n = [{ id: 1, name: "test" }], o = r.fn();
41
+ i(/* @__PURE__ */ a(c, { data: n, getRowActions: (T) => [
28
42
  {
29
43
  primaryText: "primText",
30
44
  secondaryText: "secText",
31
- onClick: () => a(l.id),
45
+ onClick: () => o(T.id),
32
46
  leadingBlock: "edit"
33
47
  }
34
- ] })), e(t.getByText("primText")).toBeInTheDocument(), t.getByText("primText").click(), e(a).toHaveBeenCalledWith(1);
35
- }), i("render GenericTable with custom order", () => {
36
- d(/* @__PURE__ */ o(c, { data: [{ id: 1, name: "test", age: 20 }], order: ["name", "age"] }));
37
- const a = t.getByText("id"), r = t.getByText("name"), s = t.getByText("age");
38
- e(r).toBeInTheDocument(), e(s).toBeInTheDocument(), e(a).toBeInTheDocument(), e(r.compareDocumentPosition(s)).toBe(4), e(s.compareDocumentPosition(a)).toBe(4);
48
+ ] })), t(e.getByText("primText")).toBeInTheDocument(), e.getByText("primText").click(), t(o).toHaveBeenCalledWith(1);
49
+ }), d("render GenericTable with custom order", () => {
50
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test", age: 20 }], order: ["name", "age"] }));
51
+ const o = e.getByText("id"), s = e.getByText("name"), l = e.getByText("age");
52
+ t(s).toBeInTheDocument(), t(l).toBeInTheDocument(), t(o).toBeInTheDocument(), t(s.compareDocumentPosition(l)).toBe(4), t(l.compareDocumentPosition(o)).toBe(4);
53
+ }), d("render GenericTable with custom columnWidth in pixel", () => {
54
+ i(
55
+ /* @__PURE__ */ a(c, { data: [{ id: 1, name: "test", age: 20 }], customColumnWidth: { id: 200, name: 200, age: 200 } })
56
+ );
57
+ const s = e.getAllByRole("cell")[0].getAttribute("width");
58
+ t(s).toBe("200");
59
+ }), d("render GenericTable with custom columnWidth in percent", () => {
60
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test" }], customColumnWidth: { id: "50%", name: "50%" } }));
61
+ const s = e.getAllByRole("cell")[0].getAttribute("width");
62
+ t(s).toBe("50%");
63
+ }), d("render GenericTable with title", () => {
64
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test" }], title: "test-title" })), t(e.getByText("test-title")).toBeInTheDocument();
65
+ }), d("render GenericTable with title and table actions", () => {
66
+ const n = r.fn();
67
+ i(/* @__PURE__ */ a(c, { data: [{ id: 1, name: "test" }], title: "test-title", tableActions: [
68
+ /* @__PURE__ */ a("button", { "data-testid": "testButton", onClick: n, children: "test-button" }, "test")
69
+ ] })), t(e.getByText("test-title")).toBeInTheDocument(), t(e.getByText("test-button")).toBeInTheDocument(), e.getByTestId("testButton").click(), t(n).toHaveBeenCalled();
39
70
  });
40
71
  });
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, Fragment as o } from "react/jsx-runtime";
2
- import { r as a, s as e, f as r } from "../../react.esm-C0LtovhP.js";
2
+ import { r as a, s as e, f as r } from "../../react.esm-D9-uytwS.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 { r as i, s as t, f as T } from "../../react.esm-C0LtovhP.js";
2
+ import { r as i, s as t, f as T } from "../../react.esm-D9-uytwS.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", () => {
@@ -18,7 +18,7 @@ export type IconifyProps = {
18
18
  * @example <Iconify icon='farm' />
19
19
  * @returns
20
20
  */
21
- export declare const Iconify: React.FC<IconifyProps>;
21
+ export declare const Iconify: ({ icon: iconName, pure, ...props }: IconifyProps) => import("react/jsx-runtime").JSX.Element;
22
22
  /**
23
23
  * A component that renders an icon from the available custom icons.
24
24
  * @param icon The icon to display. The available icons are listed in the {@link AvailableCustomIcons} enum.