@hortiview/shared-components 0.0.9195 → 0.0.9279

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 (34) hide show
  1. package/dist/{Iconify-B9ptjDuU.js → Iconify-DoU6pP1o.js} +73 -67
  2. package/dist/{_Map-2-rfNHMr.js → _Map-DKsHX-kc.js} +2 -2
  3. package/dist/{_baseToString-xTcv8tEN.js → _baseToString-dkhmFwqS.js} +1 -1
  4. package/dist/{_equalByTag-Bi6Uk01d.js → _equalByTag-BZEJl6ST.js} +2 -2
  5. package/dist/components/BaseView/BaseView.js +45 -37
  6. package/dist/components/BasicHeading/BasicHeading.js +1 -1
  7. package/dist/components/BlockView/BlockView.js +15 -15
  8. package/dist/components/BlockView/BlockView.test.js +4 -4
  9. package/dist/components/ChipCard/ChipCard.js +11 -9
  10. package/dist/components/ContextMenu/ContextMenu.js +31 -31
  11. package/dist/components/ContextMenu/ContextMenu.test.js +17 -17
  12. package/dist/components/DeleteModal/DeleteModal.js +42 -33
  13. package/dist/components/EmptyView/EmptyView.js +21 -13
  14. package/dist/components/Filter/Filter.js +4 -4
  15. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +13 -4
  16. package/dist/components/FormComponents/FormSelect/FormSelect.js +87 -78
  17. package/dist/components/FormComponents/FormSlider/FormSlider.js +14 -13
  18. package/dist/components/FormComponents/FormText/FormText.js +36 -33
  19. package/dist/components/GenericTable/GenericTable.js +3 -3
  20. package/dist/components/HashTabView/HashTabView.js +68 -57
  21. package/dist/components/Iconify/Iconify.js +2 -2
  22. package/dist/components/Iconify/Iconify.test.js +1 -1
  23. package/dist/components/ListArea/ListArea.js +174 -165
  24. package/dist/components/ListArea/ListAreaService.d.ts +2 -0
  25. package/dist/components/ListArea/ListAreaService.js +42 -32
  26. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
  27. package/dist/components/Modal/Modal.js +3 -2
  28. package/dist/components/SearchBar/SearchBar.js +16 -15
  29. package/dist/enums/AvailableCustomIcons.d.ts +20 -14
  30. package/dist/enums/AvailableCustomIcons.js +1 -1
  31. package/dist/{get-DAwLfiRB.js → get-BJn2Enx7.js} +1 -1
  32. package/dist/{iconify.module-D_I3-4iU.js → iconify.module-Cru5NS2X.js} +5 -5
  33. package/dist/main.js +1 -1
  34. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { jsx as i, Fragment as k, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as i, Fragment as k, jsxs as s } from "react/jsx-runtime";
2
2
  import { Group as o } from "@element/react-components";
3
- import { useMemo as s } from "react";
3
+ import { useMemo as a } from "react";
4
4
  import { BasicHeading as u } from "../BasicHeading/BasicHeading.js";
5
5
  import { EmptyView as L } from "../EmptyView/EmptyView.js";
6
6
  import { ListArea as W } from "../ListArea/ListArea.js";
@@ -8,55 +8,63 @@ import { VerticalDivider as A } from "../VerticalDivider/VerticalDivider.js";
8
8
  import { u as V } from "../../useBreakpoints-MzTZ0tCT.js";
9
9
  import { s as r } from "../../baseView.module-uWbm_a5f.js";
10
10
  const C = ({
11
- action: c,
12
- heading: m,
13
- elements: l,
14
- emptyText: d,
11
+ action: d,
12
+ heading: c,
13
+ elements: n,
14
+ emptyText: m,
15
15
  hasSearch: p = !0,
16
- isSorted: f = !0,
17
- className: h,
16
+ isSorted: h = !0,
17
+ className: f,
18
18
  withAvatar: v = !1,
19
19
  listMaxHeight: g = "calc(100vh - 200px)",
20
- pathname: a,
20
+ pathname: l,
21
21
  routerLinkElement: w,
22
- searchPlaceholder: B
22
+ searchPlaceholder: b
23
23
  }) => {
24
- const { isDesktopNavbar: e } = V(), t = s(() => l.find((x) => x.route === a), [a, l]), D = s(() => t?.component ?? (e ? /* @__PURE__ */ i(L, { subtitle: d }) : /* @__PURE__ */ i(k, {})), [t, e, d]), N = s(() => e ? !0 : !t, [t, e]), b = s(() => e ? !0 : t, [t, e]);
25
- return /* @__PURE__ */ n(o, { className: h ?? "", gap: "", fullWidth: !0, children: [
26
- N && /* @__PURE__ */ i(o, { gap: "none", className: e ? r.desktopList : r.mobileList, children: /* @__PURE__ */ n(o, { direction: "vertical", fullWidth: !0, gap: e ? "standard" : "dense", children: [
27
- m && /* @__PURE__ */ i(u, { heading: m, level: 4, marginBottom: 0, children: c }),
24
+ const { isDesktopNavbar: e } = V(), t = a(() => n.find((x) => x.route === l), [l, n]), B = a(() => t?.component ?? (e ? /* @__PURE__ */ i(L, { subtitle: m }) : /* @__PURE__ */ i(k, {})), [t, e, m]), D = a(() => e ? !0 : !t, [t, e]), N = a(() => e ? !0 : t, [t, e]);
25
+ return /* @__PURE__ */ s(o, { "data-testid": "base-view-container", className: f ?? "", gap: "", fullWidth: !0, children: [
26
+ D && /* @__PURE__ */ i(o, { gap: "none", className: e ? r.desktopList : r.mobileList, children: /* @__PURE__ */ s(o, { direction: "vertical", fullWidth: !0, gap: e ? "standard" : "dense", children: [
27
+ c && /* @__PURE__ */ i(u, { "data-testid": "heading", heading: c, level: 4, marginBottom: 0, children: d }),
28
28
  /* @__PURE__ */ i(
29
29
  W,
30
30
  {
31
- elements: l,
31
+ elements: n,
32
32
  hasSearch: p,
33
33
  maxHeight: g,
34
- isSorted: f,
35
- pathname: a,
34
+ isSorted: h,
35
+ pathname: l,
36
36
  routerLinkElement: w,
37
- searchPlaceholder: B
37
+ searchPlaceholder: b
38
38
  }
39
39
  )
40
40
  ] }) }),
41
- b && /* @__PURE__ */ n(o, { gap: "none", className: e ? r.desktopDetail : r.mobileDetail, children: [
42
- e && /* @__PURE__ */ i(A, { className: r.divider, height: "100%" }),
43
- /* @__PURE__ */ n(o, { direction: "vertical", fullWidth: !0, children: [
44
- /* @__PURE__ */ i(
45
- u,
46
- {
47
- className: r.maxWidth,
48
- heading: t?.detailTitle ?? t?.title ?? "",
49
- level: 4,
50
- icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
51
- marginBottom: 0,
52
- invisibleButton: t?.detailAction === void 0,
53
- withAvatar: v,
54
- children: t?.detailAction ?? c
55
- }
56
- ),
57
- D
58
- ] })
59
- ] })
41
+ N && /* @__PURE__ */ s(
42
+ o,
43
+ {
44
+ "data-testid": "details",
45
+ gap: "none",
46
+ className: e ? r.desktopDetail : r.mobileDetail,
47
+ children: [
48
+ e && /* @__PURE__ */ i(A, { className: r.divider, height: "100%" }),
49
+ /* @__PURE__ */ s(o, { direction: "vertical", fullWidth: !0, children: [
50
+ /* @__PURE__ */ i(
51
+ u,
52
+ {
53
+ className: r.maxWidth,
54
+ heading: t?.detailTitle ?? t?.title ?? "",
55
+ level: 4,
56
+ icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
57
+ marginBottom: 0,
58
+ invisibleButton: t?.detailAction === void 0,
59
+ withAvatar: v,
60
+ children: t?.detailAction ?? d
61
+ }
62
+ ),
63
+ B
64
+ ] })
65
+ ]
66
+ }
67
+ )
60
68
  ] });
61
69
  };
62
70
  export {
@@ -1,6 +1,6 @@
1
1
  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
- import { I as x } from "../../Iconify-B9ptjDuU.js";
3
+ import { I as x } from "../../Iconify-DoU6pP1o.js";
4
4
  import { AvailableCustomIcons as B } from "../../enums/AvailableCustomIcons.js";
5
5
  import { u as C } from "../../useBreakpoints-MzTZ0tCT.js";
6
6
  import { OverflowTooltip as T } from "../OverflowTooltip/OverflowTooltip.js";
@@ -1,4 +1,4 @@
1
- import { jsxs as k, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
2
  import { TypoSubtitle as C, TypoDisplay as E } from "@element/react-components";
3
3
  import { useState as A, useEffect as D, useMemo as S } from "react";
4
4
  import { getBlockNumberByDto as T } from "../../services/BlockService.js";
@@ -6,10 +6,10 @@ import { s as e } from "../../BlockView.module-BPlNT5uh.js";
6
6
  const j = ({
7
7
  rows: s,
8
8
  columns: t,
9
- hideText: a = !1,
10
- errorBlocks: y = [],
11
- showNumbers: N = !0,
12
- clickable: v = !0,
9
+ hideText: m = !1,
10
+ errorBlocks: v = [],
11
+ showNumbers: y = !0,
12
+ clickable: N = !0,
13
13
  size: d = 15,
14
14
  onClick: u = null,
15
15
  currentBlock: c,
@@ -26,21 +26,21 @@ const j = ({
26
26
  }, [c, t]);
27
27
  const w = S(() => s * t, [s, t]), x = (o) => {
28
28
  u && u(o, c ?? void 0);
29
- }, B = ({ row: o, column: l }) => b.length === 0 ? !0 : b.some((m) => m.position?.row === o && m.position?.column === l);
30
- return /* @__PURE__ */ k("div", { className: e.grid, children: [
31
- !a && /* @__PURE__ */ i(C, { level: 1, bold: !0, className: e.black, children: $ }),
32
- /* @__PURE__ */ i("div", { className: e.blockLayout, style: { width: `${d}rem`, height: `${d}rem` }, children: Array.from({ length: s }).map((o, l) => /* @__PURE__ */ i("div", { className: e.blockRow, children: Array.from({ length: t }).map((m, n) => {
33
- const r = t * l + n + 1, f = B({ row: l + 1, column: n + 1 });
29
+ }, B = ({ row: o, column: l }) => b.length === 0 ? !0 : b.some((a) => a.position?.row === o && a.position?.column === l);
30
+ return /* @__PURE__ */ f("div", { "data-testid": "block-view-container", className: e.grid, children: [
31
+ !m && /* @__PURE__ */ i(C, { level: 1, bold: !0, className: e.black, children: $ }),
32
+ /* @__PURE__ */ i("div", { className: e.blockLayout, style: { width: `${d}rem`, height: `${d}rem` }, children: Array.from({ length: s }).map((o, l) => /* @__PURE__ */ i("div", { className: e.blockRow, children: Array.from({ length: t }).map((a, n) => {
33
+ const r = t * l + n + 1, k = B({ row: l + 1, column: n + 1 });
34
34
  return /* @__PURE__ */ i(
35
35
  "div",
36
36
  {
37
- "data-testid": "blockViewBlock",
38
- className: `${e.block} ${p === r ? e.active : ""} ${f ? "" : e.empty} ${y.includes(r) ? e.error : ""}`,
37
+ "data-testid": "block-view-block",
38
+ className: `${e.block} ${p === r ? e.active : ""} ${k ? "" : e.empty} ${v.includes(r) ? e.error : ""}`,
39
39
  id: `block${r}`,
40
- onClick: v ? () => {
40
+ onClick: N ? () => {
41
41
  h(r), x({ row: l + 1, column: n + 1 });
42
42
  } : void 0,
43
- children: N && f && /* @__PURE__ */ i(
43
+ children: y && k && /* @__PURE__ */ i(
44
44
  "div",
45
45
  {
46
46
  className: `${e.blockText} ${p === r ? e.black : ""}`,
@@ -51,7 +51,7 @@ const j = ({
51
51
  r
52
52
  );
53
53
  }) }, l)) }),
54
- !a && /* @__PURE__ */ k(E, { themeColor: "primary", level: 6, children: [
54
+ !m && /* @__PURE__ */ f(E, { themeColor: "primary", level: 6, children: [
55
55
  w,
56
56
  " ",
57
57
  g
@@ -1,9 +1,9 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
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
- import { d as B, v as a, t as r, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
- B("BlockView Test", () => {
6
- const c = a.fn(), e = {
4
+ import { d as a, v as B, t as r, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
5
+ a("BlockView Test", () => {
6
+ const c = B.fn(), e = {
7
7
  id: "1",
8
8
  fieldId: "2",
9
9
  position: {
@@ -25,7 +25,7 @@ B("BlockView Test", () => {
25
25
  }
26
26
  )
27
27
  ), t(o.getByText("Layout")).toBeInTheDocument(), t(o.getByText("6 Block")).toBeInTheDocument();
28
- const k = o.getAllByTestId("blockViewBlock");
28
+ const k = o.getAllByTestId("block-view-block");
29
29
  t(k.length).toBe(6);
30
30
  }), r("executes onClick method", () => {
31
31
  s(
@@ -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-B9ptjDuU.js";
6
+ import { I as M } from "../../Iconify-DoU6pP1o.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-B9ptjDuU.js";
7
+ import { I as H } from "../../Iconify-DoU6pP1o.js";
8
8
  import "../../react-tooltip.min-BzHiZW8k.js";
9
9
  import "../../overflowTooltip.module-YyRN2MGc.js";
10
10
  import "../../basicHeading.module-BYb8xvuk.js";
11
11
  import "../../isArray-thIeLpc5.js";
12
- import "../../_baseToString-xTcv8tEN.js";
13
- import "../../_equalByTag-Bi6Uk01d.js";
14
- import "../../iconify.module-D_I3-4iU.js";
12
+ import "../../_baseToString-dkhmFwqS.js";
13
+ import "../../_equalByTag-BZEJl6ST.js";
14
+ import "../../iconify.module-Cru5NS2X.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";
@@ -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-DAwLfiRB.js";
3
+ import { g as wa } from "../../../get-BJn2Enx7.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);