@hortiview/shared-components 0.0.9183 → 0.0.9233

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 (40) hide show
  1. package/dist/Iconify-B9ptjDuU.js +91 -0
  2. package/dist/_Map-2-rfNHMr.js +59 -0
  3. package/dist/{_baseToString-CW6fzR92.js → _baseToString-xTcv8tEN.js} +12 -12
  4. package/dist/{_equalByTag-D07t7TSb.js → _equalByTag-Bi6Uk01d.js} +13 -13
  5. package/dist/_overArg-BC4qXKbU.js +9 -0
  6. package/dist/components/BaseView/BaseView.js +45 -37
  7. package/dist/components/BasicHeading/BasicHeading.js +1 -1
  8. package/dist/components/BlockView/BlockView.js +15 -15
  9. package/dist/components/BlockView/BlockView.test.js +4 -4
  10. package/dist/components/ChipCard/ChipCard.js +11 -9
  11. package/dist/components/ContextMenu/ContextMenu.js +31 -31
  12. package/dist/components/ContextMenu/ContextMenu.test.js +17 -17
  13. package/dist/components/DeleteModal/DeleteModal.js +42 -33
  14. package/dist/components/EmptyView/EmptyView.js +21 -13
  15. package/dist/components/Filter/Filter.js +37 -36
  16. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +13 -4
  17. package/dist/components/FormComponents/FormSelect/FormSelect.js +88 -79
  18. package/dist/components/FormComponents/FormSlider/FormSlider.js +14 -13
  19. package/dist/components/FormComponents/FormText/FormText.js +36 -33
  20. package/dist/components/GenericTable/GenericTable.js +16 -15
  21. package/dist/components/HashTabView/HashTabView.js +68 -57
  22. package/dist/components/Iconify/Iconify.js +2 -2
  23. package/dist/components/Iconify/Iconify.test.js +1 -1
  24. package/dist/components/ListArea/ListArea.js +208 -198
  25. package/dist/components/ListArea/ListAreaService.d.ts +2 -0
  26. package/dist/components/ListArea/ListAreaService.js +42 -32
  27. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
  28. package/dist/components/Modal/Modal.js +3 -2
  29. package/dist/components/SearchBar/SearchBar.js +16 -15
  30. package/dist/{get-BLA_8TrC.js → get-DAwLfiRB.js} +2 -2
  31. package/dist/{iconify.module-BX040Mko.js → iconify.module-D_I3-4iU.js} +11 -11
  32. package/dist/isArray-thIeLpc5.js +35 -0
  33. package/dist/isPlainObject-BlCDf1Kc.js +18 -0
  34. package/dist/main.js +1 -1
  35. package/dist/services/UtilService.js +6 -5
  36. package/dist/services/services.test.js +6 -3
  37. package/package.json +1 -1
  38. package/dist/Iconify-DV7QhHmp.js +0 -96
  39. package/dist/_Map-CMkK6TmZ.js +0 -54
  40. package/dist/isArray-D_4rqWbH.js +0 -43
@@ -1,20 +1,22 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { Card as e, Chips as n } from "@element/react-components";
3
- import { OverflowTooltip as a } from "../OverflowTooltip/OverflowTooltip.js";
4
- import { s as m } from "../../chipCard.module-BjpKuf1b.js";
5
- const h = ({ label: r, icon: i, className: o = "" }) => /* @__PURE__ */ t(
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Card as e, Chips as a } from "@element/react-components";
3
+ import { OverflowTooltip as d } from "../OverflowTooltip/OverflowTooltip.js";
4
+ import { s as n } from "../../chipCard.module-BjpKuf1b.js";
5
+ const h = ({ label: t, icon: i, className: o = "" }) => /* @__PURE__ */ r(
6
6
  e,
7
7
  {
8
+ "data-testid": "chip-card",
8
9
  variant: "flat",
9
10
  bodyAlignment: "centered",
10
11
  themeColor: "primary-50",
11
- className: `${m.entityContainer} ${o}`,
12
- children: /* @__PURE__ */ t(a, { id: `chip_card_${r}`, text: r, children: /* @__PURE__ */ t(
13
- n,
12
+ className: `${n.entityContainer} ${o}`,
13
+ children: /* @__PURE__ */ r(d, { id: `chip_card_${t}`, text: t, children: /* @__PURE__ */ r(
14
+ a,
14
15
  {
16
+ "data-testid": `${t}-chip`,
15
17
  chips: [
16
18
  {
17
- label: r,
19
+ label: t,
18
20
  leadingIcon: i
19
21
  }
20
22
  ],
@@ -1,56 +1,56 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import { Menu as u, IconButton as f, List as d, ListItem as p } from "@element/react-components";
3
- import { useState as C, useCallback as r, useEffect as k } from "react";
4
- import { uniqueId as y } from "lodash";
5
- import { s } from "../../contextMenu.module-vNQHb48g.js";
6
- const M = ({
7
- triggerOpen: l = null,
3
+ import { useState as y, useCallback as r, useEffect as C } from "react";
4
+ import { uniqueId as k } from "lodash";
5
+ import { s as i } from "../../contextMenu.module-vNQHb48g.js";
6
+ const T = ({
7
+ triggerOpen: n = null,
8
8
  actions: a,
9
- iconOrientation: c = "vertical"
9
+ iconOrientation: m = "vertical"
10
10
  }) => {
11
- const [e, t] = C(!1), m = r(() => {
12
- t(!e);
13
- }, [e]), i = r(() => {
14
- t(!1);
11
+ const [t, o] = y(!1), c = r(() => {
12
+ o(!t);
13
+ }, [t]), s = r(() => {
14
+ o(!1);
15
15
  }, []);
16
- return k(() => {
17
- t(l !== null ? l : !1);
18
- }, [l]), /* @__PURE__ */ n(
16
+ return C(() => {
17
+ o(n !== null ? n : !1);
18
+ }, [n]), /* @__PURE__ */ l(
19
19
  u,
20
20
  {
21
- className: s.menu,
22
- "data-testid": "selectionmenu",
23
- open: e,
21
+ className: i.menu,
22
+ "data-testid": "selection-menu",
23
+ open: t,
24
24
  surfaceOnly: !0,
25
25
  hoistToBody: !0,
26
- onClose: i,
27
- trigger: /* @__PURE__ */ n(
26
+ onClose: s,
27
+ trigger: /* @__PURE__ */ l(
28
28
  f,
29
29
  {
30
- className: s.icon,
31
- variant: e ? "filled-primary" : void 0,
32
- "data-testid": "openButton",
33
- icon: c === "vertical" ? "more_vert" : "more_horiz",
34
- onClick: m
30
+ className: i.icon,
31
+ variant: t ? "filled-primary" : void 0,
32
+ "data-testid": "open-button",
33
+ icon: m === "vertical" ? "more_vert" : "more_horiz",
34
+ onClick: c
35
35
  }
36
36
  ),
37
- children: /* @__PURE__ */ n(d, { children: a.map((o) => /* @__PURE__ */ n(
37
+ children: /* @__PURE__ */ l(d, { children: a.map((e) => /* @__PURE__ */ l(
38
38
  p,
39
39
  {
40
- className: s.listItem,
41
- ...o,
40
+ className: i.listItem,
41
+ ...e,
42
42
  leadingBlockType: "icon",
43
- "data-testid": "listItemButton",
43
+ "data-testid": `list-item-button-${e.primaryText}`,
44
44
  onClick: () => {
45
- o?.onClick?.(), o.closeOnClick !== !1 && i();
45
+ e?.onClick?.(), e.closeOnClick !== !1 && s();
46
46
  }
47
47
  },
48
- y(`LI_${o.primaryText?.toString()}_`)
48
+ k(`LI_${e.primaryText?.toString()}_`)
49
49
  )) })
50
50
  },
51
51
  "selectionmenu"
52
52
  );
53
53
  };
54
54
  export {
55
- M as ContextMenu
55
+ T as ContextMenu
56
56
  };
@@ -1,22 +1,22 @@
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-Dy4VzU4L.js";
3
- import { ContextMenu as u } from "./ContextMenu.js";
4
- import { v as m, d as g, t as B, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
- const T = m.fn(), l = m.fn(), i = m.fn(), p = [
6
- { primaryText: "Open", onClick: T, leadingBlock: "add" },
2
+ import { a as B, s as t, f as o, w as s } from "../../react.esm-Dy4VzU4L.js";
3
+ import { ContextMenu as p } from "./ContextMenu.js";
4
+ import { v as l, d as k, t as T, g as e } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
+ const C = l.fn(), a = l.fn(), i = l.fn(), g = [
6
+ { primaryText: "Open", onClick: C, leadingBlock: "add" },
7
7
  { primaryText: "Delete", onClick: i, leadingBlock: "delete_outline" },
8
- { primaryText: "Edit", onClick: l, leadingBlock: "edit" }
8
+ { primaryText: "Edit", onClick: a, leadingBlock: "edit" }
9
9
  ];
10
- g("ContextMenu Test", () => {
11
- B("render contextMenu and close it", () => {
12
- d(/* @__PURE__ */ r(u, { actions: p }));
13
- const c = n.getByTestId("openButton"), t = n.getByTestId("selectionmenu");
14
- e(t).toBeInTheDocument(), e(t).not.toHaveClass("mdc-menu-surface--open"), o.click(c), a(() => e(t).toHaveClass("mdc-menu-surface--open")), o.click(c), a(() => e(t).not.toHaveClass("mdc-menu-surface--open"));
15
- }), B("render ContextMenu and open it", async () => {
16
- d(/* @__PURE__ */ r(u, { actions: p, triggerOpen: !0 }));
17
- const c = n.getByTestId("openButton"), t = n.getByTestId("selectionmenu");
18
- e(t).toBeInTheDocument(), e(t).not.toHaveClass("mdc-menu-surface--open"), o.click(c), a(() => e(t).toHaveClass("mdc-menu-surface--open"));
19
- const s = n.getAllByTestId("listItemButton");
20
- e(s.length).toBe(3), e(n.getByText("Open")).toBeInTheDocument(), e(n.getByText("Delete")).toBeInTheDocument(), e(n.getByText("Edit")).toBeInTheDocument(), o.click(s[0]), e(T).toHaveBeenCalled(), e(i).not.toHaveBeenCalled(), e(l).not.toHaveBeenCalled(), o.click(s[1]), e(i).toHaveBeenCalled(), o.click(s[2]), e(l).toHaveBeenCalled();
10
+ k("ContextMenu Test", () => {
11
+ T("render contextMenu and close it", () => {
12
+ B(/* @__PURE__ */ r(p, { actions: g }));
13
+ const c = t.getByTestId("open-button"), n = t.getByTestId("selection-menu");
14
+ e(n).toBeInTheDocument(), e(n).not.toHaveClass("mdc-menu-surface--open"), o.click(c), s(() => e(n).toHaveClass("mdc-menu-surface--open")), o.click(c), s(() => e(n).not.toHaveClass("mdc-menu-surface--open"));
15
+ }), T("render ContextMenu and open it", async () => {
16
+ B(/* @__PURE__ */ r(p, { actions: g, triggerOpen: !0 }));
17
+ const c = t.getByTestId("open-button"), n = t.getByTestId("selection-menu");
18
+ e(n).toBeInTheDocument(), e(n).not.toHaveClass("mdc-menu-surface--open"), o.click(c), s(() => e(n).toHaveClass("mdc-menu-surface--open")), e(t.getByText("Open")).toBeInTheDocument(), e(t.getByText("Delete")).toBeInTheDocument(), e(t.getByText("Edit")).toBeInTheDocument();
19
+ const m = t.getByTestId("list-item-button-Open"), u = t.getByTestId("list-item-button-Delete"), d = t.getByTestId("list-item-button-Edit");
20
+ e(m).toBeInTheDocument(), e(u).toBeInTheDocument(), e(d).toBeInTheDocument(), o.click(m), e(C).toHaveBeenCalled(), e(i).not.toHaveBeenCalled(), e(a).not.toHaveBeenCalled(), o.click(u), e(i).toHaveBeenCalled(), o.click(d), e(a).toHaveBeenCalled();
21
21
  });
22
22
  });
@@ -1,24 +1,24 @@
1
1
  import { jsx as r, jsxs as p, Fragment as s } from "react/jsx-runtime";
2
- import { Button as u, Group as c, Icon as D, TypoBody as t } from "@element/react-components";
2
+ import { Button as u, Group as c, Icon as D, TypoBody as l } from "@element/react-components";
3
3
  import { uniqueId as N } from "lodash";
4
4
  import { AvailableCustomIcons as S } from "../../enums/AvailableCustomIcons.js";
5
5
  import { u as x } from "../../useBreakpoints-MzTZ0tCT.js";
6
- import { I as M } from "../../Iconify-DV7QhHmp.js";
6
+ import { I as M } from "../../Iconify-B9ptjDuU.js";
7
7
  import { Modal as j } from "../Modal/Modal.js";
8
- import { s as n } from "../../deleteModal.module-Ds3MDzdl.js";
8
+ import { s as t } from "../../deleteModal.module-Ds3MDzdl.js";
9
9
  const L = ({
10
- title: o,
11
- confirmButtonLabel: e,
12
- cancelButtonLabel: l,
10
+ title: e,
11
+ confirmButtonLabel: o,
12
+ cancelButtonLabel: n,
13
13
  deleteHeader: a,
14
14
  deleteBody: i,
15
15
  deleteText: f,
16
16
  icon: g,
17
17
  isIconCrossedOut: h,
18
- impossibleDeleteHeader: v,
19
- open: y,
18
+ impossibleDeleteHeader: b,
19
+ open: v,
20
20
  setOpen: m,
21
- onDelete: b,
21
+ onDelete: y,
22
22
  isDeletePossible: d = !0
23
23
  }) => {
24
24
  const { isDesktop: C } = x(), k = (I) => {
@@ -27,21 +27,30 @@ const L = ({
27
27
  return /* @__PURE__ */ r(
28
28
  j,
29
29
  {
30
- className: n.modal,
30
+ className: t.modal,
31
31
  modalSize: C ? "small" : "fullscreen",
32
- open: y,
32
+ open: v,
33
33
  onClose: k,
34
- title: o,
34
+ title: e,
35
35
  primaryButton: /* @__PURE__ */ r(
36
36
  u,
37
37
  {
38
+ "data-testid": "delete-button",
38
39
  variant: "danger",
39
- label: e,
40
- onClick: b,
40
+ label: o,
41
+ onClick: y,
41
42
  disabled: !d
42
43
  }
43
44
  ),
44
- footerSupplemental: /* @__PURE__ */ r(u, { variant: "text", label: l, onClick: () => m(!1) }),
45
+ footerSupplemental: /* @__PURE__ */ r(
46
+ u,
47
+ {
48
+ "data-testid": "cancel-button",
49
+ variant: "text",
50
+ label: n,
51
+ onClick: () => m(!1)
52
+ }
53
+ ),
45
54
  children: /* @__PURE__ */ p(c, { direction: "vertical", secondaryAlign: "center", children: [
46
55
  /* @__PURE__ */ r(z, { element: /* @__PURE__ */ r(B, { icon: g }), isCrossedOut: h }),
47
56
  /* @__PURE__ */ r(c, { direction: "vertical", children: d ? /* @__PURE__ */ r(
@@ -51,41 +60,41 @@ const L = ({
51
60
  deleteText: f,
52
61
  deleteBody: i
53
62
  }
54
- ) : /* @__PURE__ */ r(A, { impossibleDeleteHeader: v }) })
63
+ ) : /* @__PURE__ */ r(A, { impossibleDeleteHeader: b }) })
55
64
  ] })
56
65
  }
57
66
  );
58
67
  }, z = ({
59
- element: o,
60
- isCrossedOut: e = !1
61
- }) => e ? /* @__PURE__ */ r("span", { className: n.crossedOut, children: o }) : o, B = ({ icon: o }) => o ? typeof o != "string" ? o : Object.values(S).includes(o) ? /* @__PURE__ */ r(
68
+ element: e,
69
+ isCrossedOut: o = !1
70
+ }) => o ? /* @__PURE__ */ r("span", { className: t.crossedOut, children: e }) : e, B = ({ icon: e }) => e ? typeof e != "string" ? e : Object.values(S).includes(e) ? /* @__PURE__ */ r(
62
71
  M,
63
72
  {
64
- icon: o,
73
+ icon: e,
65
74
  iconSize: "xlarge",
66
- className: n.colorDanger
75
+ className: t.colorDanger
67
76
  }
68
- ) : /* @__PURE__ */ r(D, { icon: o, iconSize: "xlarge", className: n.colorDanger }) : /* @__PURE__ */ r(s, {}), O = ({
69
- deleteHeader: o,
70
- deleteText: e,
71
- deleteBody: l
77
+ ) : /* @__PURE__ */ r(D, { icon: e, iconSize: "xlarge", className: t.colorDanger }) : /* @__PURE__ */ r(s, {}), O = ({
78
+ deleteHeader: e,
79
+ deleteText: o,
80
+ deleteBody: n
72
81
  }) => /* @__PURE__ */ p(s, { children: [
73
- /* @__PURE__ */ r(t, { level: 1, themeColor: "text-primary-on-background", children: o }),
74
- e && typeof e == "string" && /* @__PURE__ */ r(t, { level: 2, themeColor: "text-secondary-on-background", children: e }),
75
- e && typeof e != "string" && /* @__PURE__ */ r(s, { children: e }),
76
- l && e === void 0 && /* @__PURE__ */ r(c, { direction: "vertical", gap: "none", children: l.map((a, i) => /* @__PURE__ */ r(
77
- t,
82
+ /* @__PURE__ */ r(l, { level: 1, themeColor: "text-primary-on-background", children: e }),
83
+ o && typeof o == "string" && /* @__PURE__ */ r(l, { level: 2, themeColor: "text-secondary-on-background", children: o }),
84
+ o && typeof o != "string" && /* @__PURE__ */ r(s, { children: o }),
85
+ n && o === void 0 && /* @__PURE__ */ r(c, { direction: "vertical", gap: "none", children: n.map((a, i) => /* @__PURE__ */ r(
86
+ l,
78
87
  {
79
88
  level: 2,
80
- className: n.bulletPoint,
89
+ className: t.bulletPoint,
81
90
  themeColor: "text-secondary-on-background",
82
91
  children: a
83
92
  },
84
93
  N(i.toString())
85
94
  )) })
86
95
  ] }), A = ({
87
- impossibleDeleteHeader: o
88
- }) => /* @__PURE__ */ r(t, { level: 1, themeColor: "text-primary-on-background", children: o });
96
+ impossibleDeleteHeader: e
97
+ }) => /* @__PURE__ */ r(l, { level: 1, themeColor: "text-primary-on-background", children: e });
89
98
  export {
90
99
  L as DeleteModal
91
100
  };
@@ -1,24 +1,32 @@
1
1
  import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import { Hero as h, HeroContent as d, Icon as s, TypoBody as n, Group as m } from "@element/react-components";
3
- const f = ({
2
+ import { Hero as d, HeroContent as h, Icon as s, TypoBody as i, Group as m } from "@element/react-components";
3
+ const u = ({
4
4
  title: r = "",
5
5
  subtitle: o = "",
6
- icon: i = "dashbord",
6
+ icon: n = "dashbord",
7
7
  text: t = "",
8
8
  action: l
9
- }) => /* @__PURE__ */ e(h, { style: { width: "100%", height: "25vh" }, themeColor: "surface", children: /* @__PURE__ */ e(
9
+ }) => /* @__PURE__ */ e(
10
10
  d,
11
11
  {
12
- logo: /* @__PURE__ */ e(s, { iconSize: "large", icon: i }),
13
- overline: "",
14
- subtitle: o,
15
- title: r,
16
- heroBtn: /* @__PURE__ */ e(p, { action: l, text: t })
12
+ "data-testid": "empty-view-container",
13
+ style: { width: "100%", height: "25vh" },
14
+ themeColor: "surface",
15
+ children: /* @__PURE__ */ e(
16
+ h,
17
+ {
18
+ logo: /* @__PURE__ */ e(s, { iconSize: "large", icon: n }),
19
+ overline: "",
20
+ subtitle: o,
21
+ title: r,
22
+ heroBtn: /* @__PURE__ */ e(p, { action: l, text: t })
23
+ }
24
+ )
17
25
  }
18
- ) }), p = ({ action: r, text: o }) => o ? r ? /* @__PURE__ */ c(m, { direction: "vertical", primaryAlign: "center", secondaryAlign: "center", children: [
19
- /* @__PURE__ */ e(n, { level: 2, children: o }),
26
+ ), p = ({ action: r, text: o }) => o ? r ? /* @__PURE__ */ c(m, { direction: "vertical", primaryAlign: "center", secondaryAlign: "center", children: [
27
+ /* @__PURE__ */ e(i, { level: 2, children: o }),
20
28
  r
21
- ] }) : /* @__PURE__ */ e(n, { level: 2, children: o }) : r;
29
+ ] }) : /* @__PURE__ */ e(i, { level: 2, children: o }) : r;
22
30
  export {
23
- f as EmptyView
31
+ u as EmptyView
24
32
  };
@@ -4,14 +4,14 @@ import { useState as y } from "react";
4
4
  import { s as c } from "../../genericTable.module-Dk3yy2S3.js";
5
5
  import { u as A } from "../../useBreakpoints-MzTZ0tCT.js";
6
6
  import "../../alertBanner.module-BPiKN0gh.js";
7
- import { I as H } from "../../Iconify-DV7QhHmp.js";
7
+ import { I as H } from "../../Iconify-B9ptjDuU.js";
8
8
  import "../../react-tooltip.min-BzHiZW8k.js";
9
9
  import "../../overflowTooltip.module-YyRN2MGc.js";
10
10
  import "../../basicHeading.module-BYb8xvuk.js";
11
- import "../../isArray-D_4rqWbH.js";
12
- import "../../_baseToString-CW6fzR92.js";
13
- import "../../_equalByTag-D07t7TSb.js";
14
- import "../../iconify.module-BX040Mko.js";
11
+ import "../../isArray-thIeLpc5.js";
12
+ import "../../_baseToString-xTcv8tEN.js";
13
+ import "../../_equalByTag-Bi6Uk01d.js";
14
+ import "../../iconify.module-D_I3-4iU.js";
15
15
  import { SearchBar as K } from "../SearchBar/SearchBar.js";
16
16
  import "../../listArea.module-BhO_OJ1S.js";
17
17
  import "../../verticalDivider.module-C3_GL-fH.js";
@@ -34,21 +34,22 @@ import "react-hook-form";
34
34
  import "../../formDatePicker.module-BV3ma_7y.js";
35
35
  import "../../formSelect.module-DMHh1bp8.js";
36
36
  import "../../formText.module-C0by6_DK.js";
37
- const Ft = ({
37
+ import "../../isPlainObject-BlCDf1Kc.js";
38
+ const kt = ({
38
39
  clearFilterText: f,
39
- closeCallback: s,
40
- currentFilter: e,
41
- filterButtonAsIcon: m = !1,
40
+ closeCallback: m,
41
+ currentFilter: i,
42
+ filterButtonAsIcon: s = !1,
42
43
  filterButtonText: n,
43
- filterModalTitle: i,
44
+ filterModalTitle: e,
44
45
  filters: p,
45
46
  modalCancelButtonText: g,
46
47
  modalConfirmButtonText: u,
47
48
  useModal: l = !0,
48
49
  selectAllLabel: r
49
50
  }) => {
50
- const { isDesktop: w } = A(), [O, v] = y(!1), [d, x] = y(e), [_, S] = y(0), F = () => {
51
- v(!1), s(d), S(
51
+ const { isDesktop: w } = A(), [O, v] = y(!1), [d, x] = y(i), [_, S] = y(0), F = () => {
52
+ v(!1), m(d), S(
52
53
  d.reduce((a, { filterValue: o }) => o === void 0 ? a : typeof o == "boolean" ? o ? a + 1 : a : Array.isArray(o) ? a + o.length : typeof o == "string" && o.length ? a + 1 : a, 0)
53
54
  );
54
55
  }, D = () => {
@@ -58,14 +59,14 @@ const Ft = ({
58
59
  ...d.filter((I) => I.id !== a.id),
59
60
  a
60
61
  ];
61
- x(o), l || s(o);
62
+ x(o), l || m(o);
62
63
  };
63
64
  return l ? /* @__PURE__ */ C(T, { children: [
64
65
  /* @__PURE__ */ t(
65
66
  P,
66
67
  {
67
68
  filterButtonText: n,
68
- filterButtonAsIcon: m,
69
+ filterButtonAsIcon: s,
69
70
  count: _,
70
71
  onClick: () => v(!0)
71
72
  }
@@ -75,7 +76,7 @@ const Ft = ({
75
76
  {
76
77
  open: O,
77
78
  onClose: F,
78
- title: i,
79
+ title: e,
79
80
  modalSize: w ? "small" : "fullscreen",
80
81
  headerActions: /* @__PURE__ */ t(h, { variant: "text", onClick: D, children: f }),
81
82
  dismissiveButton: /* @__PURE__ */ t(h, { variant: "outlined", onClick: () => v(!1), children: g }),
@@ -84,12 +85,12 @@ const Ft = ({
84
85
  }
85
86
  )
86
87
  ] }) : /* @__PURE__ */ t(B, { secondaryAlign: "center", fullWidth: !0, children: b(p, d, k, r, !1) });
87
- }, b = (f, s, e, m, n = !0) => f.map(({ id: i, title: p, availableOptions: g, icon: u, type: l }) => /* @__PURE__ */ C(B, { fullWidth: !0, secondaryAlign: "center", children: [
88
+ }, b = (f, m, i, s, n = !0) => f.map(({ id: e, title: p, availableOptions: g, icon: u, type: l }) => /* @__PURE__ */ C(B, { fullWidth: !0, secondaryAlign: "center", children: [
88
89
  u ? /* @__PURE__ */ t(H, { icon: u, iconSize: "medium" }) : null,
89
90
  l === "select" && /* @__PURE__ */ t(
90
91
  W,
91
92
  {
92
- selectAllLabel: m,
93
+ selectAllLabel: s,
93
94
  className: n ? void 0 : c.dense,
94
95
  variant: "outlined",
95
96
  options: g,
@@ -97,11 +98,11 @@ const Ft = ({
97
98
  multiSelect: !0,
98
99
  textKey: "text",
99
100
  valueKey: "id",
100
- value: s.find((r) => r.id === i)?.filterValue ?? [],
101
- onChange: (r) => e({ id: i, type: l, filterValue: r }),
101
+ value: m.find((r) => r.id === e)?.filterValue ?? [],
102
+ onChange: (r) => i({ id: e, type: l, filterValue: r }),
102
103
  hoisted: !0,
103
104
  menuMaxHeight: "300px",
104
- disabled: i === "location",
105
+ disabled: e === "location",
105
106
  showOptionFilter: !1,
106
107
  dense: !n,
107
108
  fixedHeightInput: !n,
@@ -112,34 +113,34 @@ const Ft = ({
112
113
  j,
113
114
  {
114
115
  label: p,
115
- onChange: (r) => e({ id: i, type: l, filterValue: r }),
116
- checked: !!s.find((r) => r.id === i)?.filterValue
116
+ onChange: (r) => i({ id: e, type: l, filterValue: r }),
117
+ checked: !!m.find((r) => r.id === e)?.filterValue
117
118
  }
118
119
  ),
119
120
  l === "search" && /* @__PURE__ */ t(
120
121
  K,
121
122
  {
122
123
  placeholder: p,
123
- searchTerm: s.find((r) => r.id === i)?.filterValue,
124
- setSearchTerm: (r) => e({ id: i, type: l, filterValue: r })
124
+ searchTerm: m.find((r) => r.id === e)?.filterValue,
125
+ setSearchTerm: (r) => i({ id: e, type: l, filterValue: r })
125
126
  }
126
127
  )
127
- ] }, i)), P = ({
128
+ ] }, e)), P = ({
128
129
  filterButtonText: f,
129
- filterButtonAsIcon: s,
130
- count: e,
131
- onClick: m
130
+ filterButtonAsIcon: m,
131
+ count: i,
132
+ onClick: s
132
133
  }) => {
133
134
  const { isDesktop: n } = A();
134
- return s ? /* @__PURE__ */ t(
135
+ return m ? /* @__PURE__ */ t(
135
136
  z,
136
137
  {
137
138
  icon: "filter_list_alt",
138
- onClick: m,
139
- badge: e !== 0 && /* @__PURE__ */ t(
139
+ onClick: s,
140
+ badge: i !== 0 && /* @__PURE__ */ t(
140
141
  N,
141
142
  {
142
- counter: e,
143
+ counter: i,
143
144
  className: c.filterBadge,
144
145
  themeColor: "secondary",
145
146
  "data-testid": "filter-badge"
@@ -158,16 +159,16 @@ const Ft = ({
158
159
  variant: "outlined",
159
160
  themeColor: "primary",
160
161
  leadingIcon: "filter_list_alt",
161
- onClick: m,
162
+ onClick: s,
162
163
  className: c.filterButton,
163
164
  fullWidth: !n,
164
165
  children: f
165
166
  }
166
167
  ),
167
- e !== 0 && /* @__PURE__ */ t(
168
+ i !== 0 && /* @__PURE__ */ t(
168
169
  N,
169
170
  {
170
- counter: e,
171
+ counter: i,
171
172
  className: c.filterBadge,
172
173
  themeColor: "secondary",
173
174
  "data-testid": "filter-badge"
@@ -178,5 +179,5 @@ const Ft = ({
178
179
  );
179
180
  };
180
181
  export {
181
- Ft as Filter
182
+ kt as Filter
182
183
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as X, jsxs as va } from "react/jsx-runtime";
2
2
  import { Datepicker as fa, Divider as ga, Padding as pa, Button as ba } from "@element/react-components";
3
- import { g as wa } from "../../../get-BLA_8TrC.js";
3
+ import { g as wa } from "../../../get-DAwLfiRB.js";
4
4
  import { useMemo as S, useState as ya } from "react";
5
5
  import { useFormContext as Pa, Controller as $a } from "react-hook-form";
6
6
  import { s as L } from "../../../formDatePicker.module-BV3ma_7y.js";
@@ -30000,9 +30000,10 @@ const E7 = X7, F7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
30000
30000
  name: r,
30001
30001
  rules: l,
30002
30002
  control: v,
30003
- render: ({ field: { ref: ha, onChange: V, value: F, ...ca } }) => /* @__PURE__ */ X("div", { className: L.datePickerContainer, children: /* @__PURE__ */ X(
30003
+ render: ({ field: { ref: ha, onChange: V, value: F, ...ca } }) => /* @__PURE__ */ X("div", { "data-testid": "date-picker-container", className: L.datePickerContainer, children: /* @__PURE__ */ X(
30004
30004
  fa,
30005
30005
  {
30006
+ "data-testid": "date-picker",
30006
30007
  ...h,
30007
30008
  ...ca,
30008
30009
  locale: C,
@@ -30012,9 +30013,17 @@ const E7 = X7, F7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
30012
30013
  label: e,
30013
30014
  format: (W) => W ? te(W.toISOString()).toLocaleDateString(m ?? "en") : "",
30014
30015
  disableClearing: !0,
30015
- trailingContent: /* @__PURE__ */ va("div", { className: L.trailingContent, children: [
30016
+ trailingContent: /* @__PURE__ */ va("div", { "data-testid": "trailing-content", className: L.trailingContent, children: [
30016
30017
  /* @__PURE__ */ X(ga, {}),
30017
- /* @__PURE__ */ X(pa, { variant: "dense", children: /* @__PURE__ */ X(ba, { label: n, variant: "text", onClick: () => K(!1) }) })
30018
+ /* @__PURE__ */ X(pa, { variant: "dense", children: /* @__PURE__ */ X(
30019
+ ba,
30020
+ {
30021
+ "data-testid": `button-${n}`,
30022
+ label: n,
30023
+ variant: "text",
30024
+ onClick: () => K(!1)
30025
+ }
30026
+ ) })
30018
30027
  ] }),
30019
30028
  onClick: () => {
30020
30029
  K(!0);