@hortiview/shared-components 0.0.7335 → 0.0.7373
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 +83 -1
- package/dist/assets/contextMenu.css +1 -1
- package/dist/assets/genericCard.css +1 -0
- package/dist/assets/genericTable.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +1 -1
- package/dist/components/AlertBanner/AlertBanner.test.js +2 -2
- package/dist/components/BaseView/BaseView.js +1 -1
- package/dist/components/BaseView/BaseView.test.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.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.js +16 -15
- 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/Filter/Filter.d.ts +4 -1
- package/dist/components/Filter/Filter.js +92 -87
- package/dist/components/Filter/Filter.test.js +44 -23
- 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 +2 -2
- 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 +7 -2
- package/dist/components/GenericTable/GenericTable.js +91 -66
- package/dist/components/GenericTable/GenericTable.test.js +59 -45
- package/dist/components/GenericTable/GenericTableService.d.ts +19 -0
- package/dist/components/GenericTable/GenericTableService.js +59 -0
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +19 -0
- package/dist/components/GenericTable/Mobile/GenericCard.js +68 -0
- package/dist/components/GenericTable/Mobile/GenericCard.test.d.ts +1 -0
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +76 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +22 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.js +20 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.test.d.ts +1 -0
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +78 -0
- package/dist/components/HashTabView/HashTabView.js +1 -1
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.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/OverflowTooltip/OverflowTooltip.js +29 -13
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
- 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/contextMenu.module-DNQ8d9Aj.js +8 -0
- package/dist/genericCard.module-DzqcufuN.js +12 -0
- package/dist/genericTable.module-CNV1Yt1K.js +16 -0
- package/dist/hooks/useBreakpoints.js +5 -0
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/index-DW4oU_OU.js +11708 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +60 -59
- package/dist/{react.esm-C3jDj5Fe.js → react.esm-Dy4VzU4L.js} +4 -1
- package/dist/types/Filter.d.ts +1 -0
- package/dist/types/GenericTable.d.ts +36 -0
- package/package.json +10 -10
- package/dist/assets/Filter.css +0 -22
- package/dist/contextMenu.module-B7aUMFPe.js +0 -7
- package/dist/genericTable.module-BkU2VDKR.js +0 -11
- package/dist/hooks/useBreakpoint.js +0 -5
- package/dist/index-BQnj-5Zt.js +0 -2963
- /package/dist/hooks/{useBreakpoint.d.ts → useBreakpoints.d.ts} +0 -0
- /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 "../../
|
|
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-
|
|
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-
|
|
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-
|
|
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 "../../
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
10
|
-
s(
|
|
10
|
+
const m = o.clientWidth < o.scrollWidth || o.clientHeight < o.scrollHeight;
|
|
11
|
+
s(m);
|
|
11
12
|
}
|
|
12
13
|
}),
|
|
13
|
-
[
|
|
14
|
+
[t, e]
|
|
14
15
|
);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ c(p, { children: [
|
|
16
17
|
n,
|
|
17
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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-
|
|
4
|
-
import { u as a } from "../../index-
|
|
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-
|
|
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-
|
|
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-
|
|
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,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,16 @@
|
|
|
1
|
+
import "./assets/genericTable.css";
|
|
2
|
+
const t = "_filterButton_1xlao_1", e = "_filterBadge_1xlao_6", o = "_dense_1xlao_12", i = {
|
|
3
|
+
filterButton: t,
|
|
4
|
+
filterBadge: e,
|
|
5
|
+
dense: o
|
|
6
|
+
}, s = "_topBar_1msoo_1", a = "_filterBar_1msoo_5", _ = "_emptyTable_1msoo_9", l = "_elevation_1msoo_17", n = "_table_1msoo_22", B = {
|
|
7
|
+
topBar: s,
|
|
8
|
+
filterBar: a,
|
|
9
|
+
emptyTable: _,
|
|
10
|
+
elevation: l,
|
|
11
|
+
table: n
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
B as a,
|
|
15
|
+
i as s
|
|
16
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as t, w as s } from "../react.esm-
|
|
2
|
-
import { u as o } from "../
|
|
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", () => {
|