@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.
- 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.js +39 -42
- package/dist/components/Filter/Filter.test.js +22 -19
- 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-CXfRg0e4.js +15 -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/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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, Fragment as l, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { Group as m, TypoBody as p } from "@element/react-components";
|
|
3
|
-
import { u as d } from "../../
|
|
3
|
+
import { u as d } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
4
4
|
import { s as o } from "../../alertBanner.module-HneYdVzN.js";
|
|
5
5
|
const h = ({
|
|
6
6
|
text: e,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import { a as t, s } from "../../react.esm-
|
|
3
|
-
import { a as l } from "../../
|
|
2
|
+
import { a as t, s } from "../../react.esm-Dy4VzU4L.js";
|
|
3
|
+
import { a as l } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
4
4
|
import { AlertBanner as n } from "./AlertBanner.js";
|
|
5
5
|
import { d as c, b as p, t as r, g as o, v as a } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
6
6
|
c("AlertBanner Test", () => {
|
|
@@ -5,7 +5,7 @@ import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
|
|
|
5
5
|
import { EmptyView as L } from "../EmptyView/EmptyView.js";
|
|
6
6
|
import { ListArea as A } from "../ListArea/ListArea.js";
|
|
7
7
|
import { VerticalDivider as V } from "../VerticalDivider/VerticalDivider.js";
|
|
8
|
-
import { u as W } from "../../
|
|
8
|
+
import { u as W } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
9
9
|
import { s as r } from "../../baseView.module-ve87u_d0.js";
|
|
10
10
|
const C = ({
|
|
11
11
|
action: c,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import { a as r, s as e, f as p } from "../../react.esm-
|
|
3
|
-
import { a as l } from "../../
|
|
2
|
+
import { a as r, s as e, f as p } from "../../react.esm-Dy4VzU4L.js";
|
|
3
|
+
import { a as l } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
4
4
|
import { BaseView as i } from "./BaseView.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", () => {
|
|
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { TypoDisplay as g, TypoBody as N, Icon as I } from "@element/react-components";
|
|
3
3
|
import { I as x } from "../../Iconify-CY9lZjFd.js";
|
|
4
4
|
import { AvailableCustomIcons as B } from "../../enums/AvailableCustomIcons.js";
|
|
5
|
-
import { u as C } from "../../
|
|
5
|
+
import { u as C } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
6
6
|
import { OverflowTooltip as T } from "../OverflowTooltip/OverflowTooltip.js";
|
|
7
7
|
import { s as e } from "../../basicHeading.module-BYb8xvuk.js";
|
|
8
8
|
const $ = ({ icon: i }) => i ? typeof i != "string" ? /* @__PURE__ */ t("div", { className: e.iconContainer, children: i }) : i in B ? /* @__PURE__ */ t(
|
|
@@ -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 { a as i, s as n } from "../../react.esm-
|
|
4
|
+
import { a as i, s as n } from "../../react.esm-Dy4VzU4L.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 { a as s, s as o, f as n } from "../../react.esm-
|
|
2
|
+
import { a as s, s as o, f as n } from "../../react.esm-Dy4VzU4L.js";
|
|
3
3
|
import { BlockView as i } from "./BlockView.js";
|
|
4
4
|
import { d as B, v as a, t as r, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
B("BlockView Test", () => {
|
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Menu as u, IconButton as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { s as C } from "../../contextMenu.module-B7aUMFPe.js";
|
|
2
|
+
import { Menu as u, IconButton as d, List as f, ListItem as p } from "@element/react-components";
|
|
3
|
+
import { useState as y, useCallback as l, useEffect as C } from "react";
|
|
5
4
|
import { uniqueId as k } from "lodash";
|
|
5
|
+
import { s as r } from "../../contextMenu.module-DNQ8d9Aj.js";
|
|
6
6
|
const M = ({
|
|
7
7
|
triggerOpen: n = null,
|
|
8
|
-
actions:
|
|
9
|
-
iconOrientation:
|
|
8
|
+
actions: a,
|
|
9
|
+
iconOrientation: c = "vertical"
|
|
10
10
|
}) => {
|
|
11
|
-
const [e, t] =
|
|
11
|
+
const [e, t] = y(!1), m = l(() => {
|
|
12
12
|
t(!e);
|
|
13
|
-
}, [e]),
|
|
13
|
+
}, [e]), s = l(() => {
|
|
14
14
|
t(!1);
|
|
15
15
|
}, []);
|
|
16
|
-
return
|
|
16
|
+
return C(() => {
|
|
17
17
|
t(n !== null ? n : !1);
|
|
18
18
|
}, [n]), /* @__PURE__ */ o(
|
|
19
19
|
u,
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
21
|
+
className: r.menu,
|
|
22
22
|
"data-testid": "selectionmenu",
|
|
23
23
|
open: e,
|
|
24
24
|
surfaceOnly: !0,
|
|
25
25
|
hoistToBody: !0,
|
|
26
|
-
onClose:
|
|
26
|
+
onClose: s,
|
|
27
27
|
trigger: /* @__PURE__ */ o(
|
|
28
|
-
|
|
28
|
+
d,
|
|
29
29
|
{
|
|
30
|
+
className: r.icon,
|
|
30
31
|
variant: e ? "filled-primary" : void 0,
|
|
31
32
|
"data-testid": "openButton",
|
|
32
|
-
icon:
|
|
33
|
+
icon: c === "vertical" ? "more_vert" : "more_horiz",
|
|
33
34
|
onClick: m
|
|
34
35
|
}
|
|
35
36
|
),
|
|
36
|
-
children: /* @__PURE__ */ o(
|
|
37
|
-
|
|
37
|
+
children: /* @__PURE__ */ o(f, { children: a.map((i) => /* @__PURE__ */ o(
|
|
38
|
+
p,
|
|
38
39
|
{
|
|
39
40
|
...i,
|
|
40
41
|
leadingBlockType: "icon",
|
|
41
42
|
"data-testid": "listItemButton",
|
|
42
43
|
onClick: () => {
|
|
43
|
-
i?.onClick?.(),
|
|
44
|
+
i?.onClick?.(), s();
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
k(`LI_${i.primaryText?.toString()}_`)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { a as d, s as n, f as o, w as a } from "../../react.esm-
|
|
2
|
+
import { a as d, s as n, f as o, w as a } from "../../react.esm-Dy4VzU4L.js";
|
|
3
3
|
import { ContextMenu as u } from "./ContextMenu.js";
|
|
4
4
|
import { v as m, d as g, t as B, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const T = m.fn(), l = m.fn(), i = m.fn(), p = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as c, s as e } from "../../react.esm-
|
|
2
|
+
import { a as c, s as e } from "../../react.esm-Dy4VzU4L.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 { a as r, s as t } from "../../react.esm-
|
|
2
|
+
import { a as r, s as t } from "../../react.esm-Dy4VzU4L.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 { a as s, s as o, w as r, f as l } from "../../react.esm-
|
|
2
|
+
import { a as s, s as o, w as r, f as l } from "../../react.esm-Dy4VzU4L.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,8 +1,8 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import { Modal as j, Button as s, Group as q, Select as A, IconButton as D, NotificationBadge as C } from "@element/react-components";
|
|
1
|
+
import { jsxs as B, Fragment as I, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as j, Button as s, Group as A, Select as D, IconButton as K, NotificationBadge as v } from "@element/react-components";
|
|
4
3
|
import { useState as u } from "react";
|
|
5
|
-
import {
|
|
4
|
+
import { s as f } from "../../genericTable.module-CXfRg0e4.js";
|
|
5
|
+
import { u as F } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
6
6
|
import "../../alertBanner.module-HneYdVzN.js";
|
|
7
7
|
import "../../iconify.module-C89oaw5b.js";
|
|
8
8
|
import "../../isArray-Ca4KR8TK.js";
|
|
@@ -15,11 +15,11 @@ import "../../listArea.module-CGpHPOji.js";
|
|
|
15
15
|
import "../../verticalDivider.module-C3_GL-fH.js";
|
|
16
16
|
import "../../baseView.module-ve87u_d0.js";
|
|
17
17
|
import "../../BlockView.module-BPlNT5uh.js";
|
|
18
|
-
import "../../contextMenu.module-B7aUMFPe.js";
|
|
19
18
|
import "lodash";
|
|
19
|
+
import "../../contextMenu.module-DNQ8d9Aj.js";
|
|
20
20
|
import "../../deleteModal.module-Ds3MDzdl.js";
|
|
21
21
|
import "../../disclaimer.module-BZydt-Q_.js";
|
|
22
|
-
import "../../
|
|
22
|
+
import "../../genericCard.module-DzqcufuN.js";
|
|
23
23
|
import "../../HashTabView.module-CJX4gxTu.js";
|
|
24
24
|
import "../../HeaderFilter.module-DiBmulr5.js";
|
|
25
25
|
import "../../infoGroup.module-B3E1gCGi.js";
|
|
@@ -30,64 +30,61 @@ import "react-hook-form";
|
|
|
30
30
|
import "../../formDatePicker.module-BV3ma_7y.js";
|
|
31
31
|
import "../../formSelect.module-C18N-SsT.js";
|
|
32
32
|
import "../../formText.module-C0by6_DK.js";
|
|
33
|
-
const
|
|
34
|
-
filterButton: K,
|
|
35
|
-
filterBadge: M
|
|
36
|
-
}, gt = ({
|
|
33
|
+
const ft = ({
|
|
37
34
|
clearFilterText: a,
|
|
38
35
|
closeCallback: m,
|
|
39
36
|
currentFilter: i,
|
|
40
37
|
filterButtonAsIcon: r = !1,
|
|
41
38
|
filterButtonText: l,
|
|
42
|
-
filterModalTitle:
|
|
43
|
-
filters:
|
|
44
|
-
modalCancelButtonText:
|
|
45
|
-
modalConfirmButtonText:
|
|
39
|
+
filterModalTitle: x,
|
|
40
|
+
filters: y,
|
|
41
|
+
modalCancelButtonText: S,
|
|
42
|
+
modalConfirmButtonText: k
|
|
46
43
|
}) => {
|
|
47
|
-
const { isDesktop:
|
|
48
|
-
|
|
44
|
+
const { isDesktop: O } = F(), [b, p] = u(!1), [n, h] = u(i), [N, g] = u(0), C = () => {
|
|
45
|
+
p(!1), m(n), g(
|
|
49
46
|
n.reduce((e, { selectedOptions: o }) => e + o.length, 0)
|
|
50
47
|
);
|
|
51
|
-
},
|
|
48
|
+
}, _ = () => {
|
|
52
49
|
h([]), g(0);
|
|
53
|
-
},
|
|
50
|
+
}, w = (e) => {
|
|
54
51
|
const o = [
|
|
55
|
-
...n.filter((
|
|
52
|
+
...n.filter((c) => c.id !== e.id),
|
|
56
53
|
e
|
|
57
54
|
];
|
|
58
55
|
h(o);
|
|
59
56
|
};
|
|
60
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ B(I, { children: [
|
|
61
58
|
/* @__PURE__ */ t(
|
|
62
|
-
|
|
59
|
+
M,
|
|
63
60
|
{
|
|
64
61
|
filterButtonText: l,
|
|
65
62
|
filterButtonAsIcon: r,
|
|
66
|
-
count:
|
|
67
|
-
onClick: () =>
|
|
63
|
+
count: N,
|
|
64
|
+
onClick: () => p(!0)
|
|
68
65
|
}
|
|
69
66
|
),
|
|
70
67
|
/* @__PURE__ */ t(
|
|
71
68
|
j,
|
|
72
69
|
{
|
|
73
|
-
open:
|
|
74
|
-
onClose:
|
|
75
|
-
title:
|
|
76
|
-
modalSize:
|
|
77
|
-
headerActions: /* @__PURE__ */ t(s, { variant: "text", onClick:
|
|
78
|
-
dismissiveButton: /* @__PURE__ */ t(s, { variant: "outlined", onClick: () =>
|
|
79
|
-
primaryButton: /* @__PURE__ */ t(s, { variant: "filled", onClick:
|
|
80
|
-
children: /* @__PURE__ */ t(
|
|
81
|
-
|
|
70
|
+
open: b,
|
|
71
|
+
onClose: C,
|
|
72
|
+
title: x,
|
|
73
|
+
modalSize: O ? "small" : "fullscreen",
|
|
74
|
+
headerActions: /* @__PURE__ */ t(s, { variant: "text", onClick: _, children: a }),
|
|
75
|
+
dismissiveButton: /* @__PURE__ */ t(s, { variant: "outlined", onClick: () => p(!1), children: S }),
|
|
76
|
+
primaryButton: /* @__PURE__ */ t(s, { variant: "filled", onClick: C, children: k }),
|
|
77
|
+
children: /* @__PURE__ */ t(A, { direction: "vertical", children: y.map(({ id: e, title: o, availableOptions: c }) => /* @__PURE__ */ t(
|
|
78
|
+
D,
|
|
82
79
|
{
|
|
83
80
|
variant: "outlined",
|
|
84
|
-
options:
|
|
81
|
+
options: c,
|
|
85
82
|
label: o,
|
|
86
83
|
multiSelect: !0,
|
|
87
84
|
textKey: "text",
|
|
88
85
|
valueKey: "id",
|
|
89
|
-
value: n.find((
|
|
90
|
-
onChange: (
|
|
86
|
+
value: n.find((d) => d.id === e)?.selectedOptions ?? [],
|
|
87
|
+
onChange: (d) => w({ id: e, selectedOptions: d }),
|
|
91
88
|
hoisted: !0,
|
|
92
89
|
menuMaxHeight: "300px",
|
|
93
90
|
disabled: e === "location",
|
|
@@ -98,20 +95,20 @@ const K = "_filterButton_66wbq_1", M = "_filterBadge_66wbq_6", f = {
|
|
|
98
95
|
}
|
|
99
96
|
)
|
|
100
97
|
] });
|
|
101
|
-
},
|
|
98
|
+
}, M = ({
|
|
102
99
|
filterButtonText: a,
|
|
103
100
|
filterButtonAsIcon: m,
|
|
104
101
|
count: i,
|
|
105
102
|
onClick: r
|
|
106
103
|
}) => {
|
|
107
|
-
const { isDesktop: l } =
|
|
104
|
+
const { isDesktop: l } = F();
|
|
108
105
|
return m ? /* @__PURE__ */ t(
|
|
109
|
-
|
|
106
|
+
K,
|
|
110
107
|
{
|
|
111
108
|
icon: "filter_list_alt",
|
|
112
109
|
onClick: r,
|
|
113
110
|
badge: i !== 0 && /* @__PURE__ */ t(
|
|
114
|
-
|
|
111
|
+
v,
|
|
115
112
|
{
|
|
116
113
|
counter: i,
|
|
117
114
|
className: f.filterBadge,
|
|
@@ -120,7 +117,7 @@ const K = "_filterButton_66wbq_1", M = "_filterBadge_66wbq_6", f = {
|
|
|
120
117
|
}
|
|
121
118
|
)
|
|
122
119
|
}
|
|
123
|
-
) : /* @__PURE__ */
|
|
120
|
+
) : /* @__PURE__ */ B("div", { style: { height: "100%", width: l ? void 0 : "100%" }, children: [
|
|
124
121
|
/* @__PURE__ */ t(
|
|
125
122
|
s,
|
|
126
123
|
{
|
|
@@ -134,7 +131,7 @@ const K = "_filterButton_66wbq_1", M = "_filterBadge_66wbq_6", f = {
|
|
|
134
131
|
}
|
|
135
132
|
),
|
|
136
133
|
i !== 0 && /* @__PURE__ */ t(
|
|
137
|
-
|
|
134
|
+
v,
|
|
138
135
|
{
|
|
139
136
|
counter: i,
|
|
140
137
|
className: f.filterBadge,
|
|
@@ -145,5 +142,5 @@ const K = "_filterButton_66wbq_1", M = "_filterBadge_66wbq_6", f = {
|
|
|
145
142
|
] });
|
|
146
143
|
};
|
|
147
144
|
export {
|
|
148
|
-
|
|
145
|
+
ft as Filter
|
|
149
146
|
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { a, s as t, f as c, t as u, w as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { a as r, s as t, f as c, t as u, w as m } from "../../react.esm-Dy4VzU4L.js";
|
|
3
|
+
import { a as s } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
4
4
|
import { Filter as T } from "./Filter.js";
|
|
5
|
-
import { v as
|
|
6
|
-
const o =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { v as x, b as d, d as f, t as B, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
6
|
+
const o = x.fn();
|
|
7
|
+
d(() => {
|
|
8
|
+
x.spyOn(s, "useBreakpoints").mockReturnValue({
|
|
9
|
+
isDesktop: !0,
|
|
10
|
+
isMobile: !1,
|
|
11
|
+
isTablet: !1,
|
|
12
|
+
isDesktopNavbar: !1
|
|
13
|
+
});
|
|
11
14
|
});
|
|
12
15
|
f("Filter", () => {
|
|
13
16
|
const n = [
|
|
@@ -32,8 +35,8 @@ f("Filter", () => {
|
|
|
32
35
|
{ id: "2", selectedOptions: [{ id: "3", text: "Option 3" }] }
|
|
33
36
|
];
|
|
34
37
|
B("should render filter", () => {
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */
|
|
38
|
+
r(
|
|
39
|
+
/* @__PURE__ */ a(
|
|
37
40
|
T,
|
|
38
41
|
{
|
|
39
42
|
filters: n,
|
|
@@ -52,8 +55,8 @@ f("Filter", () => {
|
|
|
52
55
|
e(o).toHaveBeenCalledTimes(1), e(t.getByText("2")).toBeInTheDocument();
|
|
53
56
|
});
|
|
54
57
|
}), B("should clear filter", () => {
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */
|
|
58
|
+
r(
|
|
59
|
+
/* @__PURE__ */ a(
|
|
57
60
|
T,
|
|
58
61
|
{
|
|
59
62
|
filters: n,
|
|
@@ -72,8 +75,8 @@ f("Filter", () => {
|
|
|
72
75
|
e(o).toHaveBeenCalledTimes(1), e(t.queryByTestId("filter-badge")).not.toBeInTheDocument();
|
|
73
76
|
});
|
|
74
77
|
}), B("should close filter", () => {
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */
|
|
78
|
+
r(
|
|
79
|
+
/* @__PURE__ */ a(
|
|
77
80
|
T,
|
|
78
81
|
{
|
|
79
82
|
filters: n,
|
|
@@ -90,12 +93,12 @@ f("Filter", () => {
|
|
|
90
93
|
const l = t.getByRole("button", { name: "modalCancelButtonText" });
|
|
91
94
|
c.click(l), u.act(() => {
|
|
92
95
|
e(o).toHaveBeenCalledTimes(1), e(t.queryByTestId("filter-badge")).not.toBeInTheDocument();
|
|
93
|
-
}),
|
|
96
|
+
}), m(() => {
|
|
94
97
|
e(t.queryByText("filterModalTitle")).not.toBeInTheDocument(), e(t.queryByText("modalCancelButtonText")).not.toBeInTheDocument(), e(t.queryByText("modalConfirmButtonText")).not.toBeInTheDocument(), e(t.queryByText("clearFilterText")).not.toBeInTheDocument();
|
|
95
98
|
});
|
|
96
99
|
}), B("should render as icon button ", () => {
|
|
97
|
-
|
|
98
|
-
/* @__PURE__ */
|
|
100
|
+
r(
|
|
101
|
+
/* @__PURE__ */ a(
|
|
99
102
|
T,
|
|
100
103
|
{
|
|
101
104
|
filters: n,
|
|
@@ -109,6 +112,6 @@ f("Filter", () => {
|
|
|
109
112
|
filterButtonAsIcon: !0
|
|
110
113
|
}
|
|
111
114
|
)
|
|
112
|
-
),
|
|
115
|
+
), e(t.queryByText("filterButtonText")).not.toBeInTheDocument(), e(t.getByText("filter_list_alt")).toBeInTheDocument(), e(t.getByText("filter_list_alt").tagName).toBe("I");
|
|
113
116
|
});
|
|
114
117
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a as n, s as t, f as m } from "../../../react.esm-
|
|
2
|
+
import { a as n, s as t, f as m } from "../../../react.esm-Dy4VzU4L.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 { a as s, s as a, f as m } from "../../../react.esm-
|
|
2
|
+
import { a as s, s as a, f as m } from "../../../react.esm-Dy4VzU4L.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 { a as s, s as t, f as m } from "../../../react.esm-
|
|
2
|
+
import { a as s, s as t, f as m } from "../../../react.esm-Dy4VzU4L.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 r = e.fn();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as t, f as T, w as p } from "../../../react.esm-
|
|
3
|
-
import { u as B } from "../../../index-
|
|
2
|
+
import { a, s as t, f as T, w as p } from "../../../react.esm-Dy4VzU4L.js";
|
|
3
|
+
import { u as B } from "../../../index-DW4oU_OU.js";
|
|
4
4
|
import { FormSelect as i } from "./FormSelect.js";
|
|
5
5
|
import { SelectTooltipText as d } from "./SelectTooltipText.js";
|
|
6
6
|
import { v as n, d as f, t as u, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as n } from "../../../react.esm-
|
|
2
|
+
import { a, s as n } from "../../../react.esm-Dy4VzU4L.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 { a as s, s as r, f as d } from "../../../react.esm-
|
|
2
|
+
import { a as s, s as r, f as d } from "../../../react.esm-Dy4VzU4L.js";
|
|
3
3
|
import { FormText as o } from "./FormText.js";
|
|
4
4
|
import { v as a, d as u, t as l, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
|
|
5
5
|
const m = a.fn();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TableLayoutProps } from '../../types/GenericTable';
|
|
2
2
|
/**
|
|
3
|
-
* Automatically creates a table layout based on the given data
|
|
3
|
+
* Automatically creates a table layout based on the given data.
|
|
4
|
+
* If the screen is too small, it will switch to a card layout.
|
|
4
5
|
* @see {@link TableLayoutProps} for even more information on the props
|
|
5
6
|
* @example <GenericTable<YourElementType> data={data} />
|
|
6
7
|
* @example
|
|
@@ -48,6 +49,10 @@ import { TableLayoutProps } from '../../types/GenericTable';
|
|
|
48
49
|
* @param pagination whether to show pagination or not
|
|
49
50
|
* @param getRowActions function that will be called to get the actions for a row to be displayed as actions in a context menu
|
|
50
51
|
* @param headerTranslation function that will be called to translate the headers by its key
|
|
52
|
+
* @param customColumnWidth custom column width
|
|
53
|
+
* @param title title of the table
|
|
54
|
+
* @param cardTitleColumn column to be used as the title in the card layout
|
|
55
|
+
* @param cardSubTitleColumn column to be used as the subtitle in the card layout
|
|
51
56
|
* @returns a table based on a given type and data
|
|
52
57
|
*/
|
|
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;
|
|
58
|
+
export declare const GenericTable: <T>({ data, hiddenColumns, order, cellTemplates, tableActions, noContentText, headerTranslation, pagination, getRowActions, customColumnWidth, title, cardTitleColumn, cardSubTitleColumn, }: TableLayoutProps<T>) => import("react/jsx-runtime").JSX.Element;
|