@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.
- package/README.md +1 -5
- package/dist/assets/main.css +2 -2
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/BaseView/BaseView.test.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +1 -1
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +1 -1
- package/dist/components/GenericTable/GenericTable.js +69 -60
- package/dist/components/GenericTable/GenericTable.test.js +63 -32
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.d.ts +1 -1
- package/dist/components/Iconify/Iconify.js +37 -37
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/Scrollbar/scrollbar.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/main.d.ts +3 -3
- package/dist/{react.esm-C0LtovhP.js → react.esm-D9-uytwS.js} +1658 -1652
- package/dist/types/GenericTable.d.ts +9 -0
- 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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
3
|
-
import { Elevation as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { ContextMenu as
|
|
6
|
-
const
|
|
7
|
-
topBar:
|
|
8
|
-
filterBar:
|
|
9
|
-
emptyTable:
|
|
10
|
-
elevation:
|
|
11
|
-
table:
|
|
12
|
-
},
|
|
13
|
-
if (!
|
|
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(
|
|
16
|
-
return l.length > 0 && (o = o.sort((
|
|
17
|
-
const
|
|
18
|
-
return
|
|
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
|
-
},
|
|
21
|
-
data:
|
|
20
|
+
}, $ = ({
|
|
21
|
+
data: n = [],
|
|
22
22
|
hiddenColumns: l = [],
|
|
23
23
|
order: o = [],
|
|
24
|
-
cellTemplates:
|
|
25
|
-
tableActions:
|
|
26
|
-
noContentText:
|
|
27
|
-
headerTranslation:
|
|
28
|
-
pagination:
|
|
29
|
-
getRowActions:
|
|
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 =
|
|
32
|
-
if (
|
|
33
|
+
const f = v(() => {
|
|
34
|
+
if (n.length === 0)
|
|
33
35
|
return [];
|
|
34
|
-
const a =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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:
|
|
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__ */
|
|
56
|
-
|
|
61
|
+
leadingContent: u && i.length === 0 ? /* @__PURE__ */ e(b, { title: u }) : i.length > 0 && /* @__PURE__ */ e(
|
|
62
|
+
b,
|
|
57
63
|
{
|
|
58
|
-
className:
|
|
59
|
-
filterBar: /* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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:
|
|
80
|
+
paginated: c,
|
|
72
81
|
sortable: !0,
|
|
73
82
|
noContentIncludeTable: !!f,
|
|
74
|
-
noContentMessage: /* @__PURE__ */
|
|
75
|
-
|
|
83
|
+
noContentMessage: /* @__PURE__ */ e(
|
|
84
|
+
_,
|
|
76
85
|
{
|
|
77
86
|
fullWidth: !0,
|
|
78
87
|
primaryAlign: "center",
|
|
79
88
|
secondaryAlign: "center",
|
|
80
|
-
className:
|
|
81
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
97
|
+
$ as GenericTable
|
|
89
98
|
};
|
|
@@ -1,40 +1,71 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { r as
|
|
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
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}),
|
|
10
|
-
|
|
11
|
-
}),
|
|
12
|
-
|
|
13
|
-
}),
|
|
14
|
-
|
|
15
|
-
}),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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: () =>
|
|
45
|
+
onClick: () => o(T.id),
|
|
32
46
|
leadingBlock: "edit"
|
|
33
47
|
}
|
|
34
|
-
] })), e
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
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-
|
|
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-
|
|
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:
|
|
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.
|