@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.
- package/dist/{Iconify-B9ptjDuU.js → Iconify-DoU6pP1o.js} +73 -67
- package/dist/{_Map-2-rfNHMr.js → _Map-DKsHX-kc.js} +2 -2
- package/dist/{_baseToString-xTcv8tEN.js → _baseToString-dkhmFwqS.js} +1 -1
- package/dist/{_equalByTag-Bi6Uk01d.js → _equalByTag-BZEJl6ST.js} +2 -2
- package/dist/components/BaseView/BaseView.js +45 -37
- package/dist/components/BasicHeading/BasicHeading.js +1 -1
- package/dist/components/BlockView/BlockView.js +15 -15
- package/dist/components/BlockView/BlockView.test.js +4 -4
- package/dist/components/ChipCard/ChipCard.js +11 -9
- package/dist/components/ContextMenu/ContextMenu.js +31 -31
- package/dist/components/ContextMenu/ContextMenu.test.js +17 -17
- package/dist/components/DeleteModal/DeleteModal.js +42 -33
- package/dist/components/EmptyView/EmptyView.js +21 -13
- package/dist/components/Filter/Filter.js +4 -4
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +13 -4
- package/dist/components/FormComponents/FormSelect/FormSelect.js +87 -78
- package/dist/components/FormComponents/FormSlider/FormSlider.js +14 -13
- package/dist/components/FormComponents/FormText/FormText.js +36 -33
- package/dist/components/GenericTable/GenericTable.js +3 -3
- package/dist/components/HashTabView/HashTabView.js +68 -57
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +174 -165
- package/dist/components/ListArea/ListAreaService.d.ts +2 -0
- package/dist/components/ListArea/ListAreaService.js +42 -32
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
- package/dist/components/Modal/Modal.js +3 -2
- package/dist/components/SearchBar/SearchBar.js +16 -15
- package/dist/enums/AvailableCustomIcons.d.ts +20 -14
- package/dist/enums/AvailableCustomIcons.js +1 -1
- package/dist/{get-DAwLfiRB.js → get-BJn2Enx7.js} +1 -1
- package/dist/{iconify.module-D_I3-4iU.js → iconify.module-Cru5NS2X.js} +5 -5
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as i, Fragment as k, jsxs as
|
|
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
|
|
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:
|
|
12
|
-
heading:
|
|
13
|
-
elements:
|
|
14
|
-
emptyText:
|
|
11
|
+
action: d,
|
|
12
|
+
heading: c,
|
|
13
|
+
elements: n,
|
|
14
|
+
emptyText: m,
|
|
15
15
|
hasSearch: p = !0,
|
|
16
|
-
isSorted:
|
|
17
|
-
className:
|
|
16
|
+
isSorted: h = !0,
|
|
17
|
+
className: f,
|
|
18
18
|
withAvatar: v = !1,
|
|
19
19
|
listMaxHeight: g = "calc(100vh - 200px)",
|
|
20
|
-
pathname:
|
|
20
|
+
pathname: l,
|
|
21
21
|
routerLinkElement: w,
|
|
22
|
-
searchPlaceholder:
|
|
22
|
+
searchPlaceholder: b
|
|
23
23
|
}) => {
|
|
24
|
-
const { isDesktopNavbar: e } = V(), t =
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
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:
|
|
31
|
+
elements: n,
|
|
32
32
|
hasSearch: p,
|
|
33
33
|
maxHeight: g,
|
|
34
|
-
isSorted:
|
|
35
|
-
pathname:
|
|
34
|
+
isSorted: h,
|
|
35
|
+
pathname: l,
|
|
36
36
|
routerLinkElement: w,
|
|
37
|
-
searchPlaceholder:
|
|
37
|
+
searchPlaceholder: b
|
|
38
38
|
}
|
|
39
39
|
)
|
|
40
40
|
] }) }),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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-
|
|
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
|
|
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:
|
|
10
|
-
errorBlocks:
|
|
11
|
-
showNumbers:
|
|
12
|
-
clickable:
|
|
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((
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
!
|
|
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((
|
|
33
|
-
const r = t * l + 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": "
|
|
38
|
-
className: `${e.block} ${p === r ? e.active : ""} ${
|
|
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:
|
|
40
|
+
onClick: N ? () => {
|
|
41
41
|
h(r), x({ row: l + 1, column: n + 1 });
|
|
42
42
|
} : void 0,
|
|
43
|
-
children:
|
|
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
|
-
!
|
|
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
|
|
5
|
-
|
|
6
|
-
const c =
|
|
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("
|
|
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
|
|
2
|
-
import { Card as e, Chips as
|
|
3
|
-
import { OverflowTooltip as
|
|
4
|
-
import { s as
|
|
5
|
-
const h = ({ label:
|
|
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: `${
|
|
12
|
-
children: /* @__PURE__ */
|
|
13
|
-
|
|
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:
|
|
19
|
+
label: t,
|
|
18
20
|
leadingIcon: i
|
|
19
21
|
}
|
|
20
22
|
],
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsx as
|
|
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
|
|
4
|
-
import { uniqueId as
|
|
5
|
-
import { s } from "../../contextMenu.module-vNQHb48g.js";
|
|
6
|
-
const
|
|
7
|
-
triggerOpen:
|
|
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:
|
|
9
|
+
iconOrientation: m = "vertical"
|
|
10
10
|
}) => {
|
|
11
|
-
const [
|
|
12
|
-
|
|
13
|
-
}, [
|
|
14
|
-
|
|
11
|
+
const [t, o] = y(!1), c = r(() => {
|
|
12
|
+
o(!t);
|
|
13
|
+
}, [t]), s = r(() => {
|
|
14
|
+
o(!1);
|
|
15
15
|
}, []);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
}, [
|
|
16
|
+
return C(() => {
|
|
17
|
+
o(n !== null ? n : !1);
|
|
18
|
+
}, [n]), /* @__PURE__ */ l(
|
|
19
19
|
u,
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
22
|
-
"data-testid": "
|
|
23
|
-
open:
|
|
21
|
+
className: i.menu,
|
|
22
|
+
"data-testid": "selection-menu",
|
|
23
|
+
open: t,
|
|
24
24
|
surfaceOnly: !0,
|
|
25
25
|
hoistToBody: !0,
|
|
26
|
-
onClose:
|
|
27
|
-
trigger: /* @__PURE__ */
|
|
26
|
+
onClose: s,
|
|
27
|
+
trigger: /* @__PURE__ */ l(
|
|
28
28
|
f,
|
|
29
29
|
{
|
|
30
|
-
className:
|
|
31
|
-
variant:
|
|
32
|
-
"data-testid": "
|
|
33
|
-
icon:
|
|
34
|
-
onClick:
|
|
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__ */
|
|
37
|
+
children: /* @__PURE__ */ l(d, { children: a.map((e) => /* @__PURE__ */ l(
|
|
38
38
|
p,
|
|
39
39
|
{
|
|
40
|
-
className:
|
|
41
|
-
...
|
|
40
|
+
className: i.listItem,
|
|
41
|
+
...e,
|
|
42
42
|
leadingBlockType: "icon",
|
|
43
|
-
"data-testid":
|
|
43
|
+
"data-testid": `list-item-button-${e.primaryText}`,
|
|
44
44
|
onClick: () => {
|
|
45
|
-
|
|
45
|
+
e?.onClick?.(), e.closeOnClick !== !1 && s();
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
k(`LI_${e.primaryText?.toString()}_`)
|
|
49
49
|
)) })
|
|
50
50
|
},
|
|
51
51
|
"selectionmenu"
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
T as ContextMenu
|
|
56
56
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
3
|
-
import { ContextMenu as
|
|
4
|
-
import { v as
|
|
5
|
-
const
|
|
6
|
-
{ primaryText: "Open", onClick:
|
|
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:
|
|
8
|
+
{ primaryText: "Edit", onClick: a, leadingBlock: "edit" }
|
|
9
9
|
];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const c =
|
|
14
|
-
e(
|
|
15
|
-
}),
|
|
16
|
-
|
|
17
|
-
const c =
|
|
18
|
-
e(
|
|
19
|
-
const
|
|
20
|
-
e(
|
|
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
|
|
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-
|
|
6
|
+
import { I as M } from "../../Iconify-DoU6pP1o.js";
|
|
7
7
|
import { Modal as j } from "../Modal/Modal.js";
|
|
8
|
-
import { s as
|
|
8
|
+
import { s as t } from "../../deleteModal.module-Ds3MDzdl.js";
|
|
9
9
|
const L = ({
|
|
10
|
-
title:
|
|
11
|
-
confirmButtonLabel:
|
|
12
|
-
cancelButtonLabel:
|
|
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:
|
|
19
|
-
open:
|
|
18
|
+
impossibleDeleteHeader: b,
|
|
19
|
+
open: v,
|
|
20
20
|
setOpen: m,
|
|
21
|
-
onDelete:
|
|
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:
|
|
30
|
+
className: t.modal,
|
|
31
31
|
modalSize: C ? "small" : "fullscreen",
|
|
32
|
-
open:
|
|
32
|
+
open: v,
|
|
33
33
|
onClose: k,
|
|
34
|
-
title:
|
|
34
|
+
title: e,
|
|
35
35
|
primaryButton: /* @__PURE__ */ r(
|
|
36
36
|
u,
|
|
37
37
|
{
|
|
38
|
+
"data-testid": "delete-button",
|
|
38
39
|
variant: "danger",
|
|
39
|
-
label:
|
|
40
|
-
onClick:
|
|
40
|
+
label: o,
|
|
41
|
+
onClick: y,
|
|
41
42
|
disabled: !d
|
|
42
43
|
}
|
|
43
44
|
),
|
|
44
|
-
footerSupplemental: /* @__PURE__ */ r(
|
|
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:
|
|
63
|
+
) : /* @__PURE__ */ r(A, { impossibleDeleteHeader: b }) })
|
|
55
64
|
] })
|
|
56
65
|
}
|
|
57
66
|
);
|
|
58
67
|
}, z = ({
|
|
59
|
-
element:
|
|
60
|
-
isCrossedOut:
|
|
61
|
-
}) =>
|
|
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:
|
|
73
|
+
icon: e,
|
|
65
74
|
iconSize: "xlarge",
|
|
66
|
-
className:
|
|
75
|
+
className: t.colorDanger
|
|
67
76
|
}
|
|
68
|
-
) : /* @__PURE__ */ r(D, { icon:
|
|
69
|
-
deleteHeader:
|
|
70
|
-
deleteText:
|
|
71
|
-
deleteBody:
|
|
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(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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:
|
|
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:
|
|
88
|
-
}) => /* @__PURE__ */ r(
|
|
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
|
|
3
|
-
const
|
|
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:
|
|
6
|
+
icon: n = "dashbord",
|
|
7
7
|
text: t = "",
|
|
8
8
|
action: l
|
|
9
|
-
}) => /* @__PURE__ */ e(
|
|
9
|
+
}) => /* @__PURE__ */ e(
|
|
10
10
|
d,
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
)
|
|
19
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
29
|
+
] }) : /* @__PURE__ */ e(i, { level: 2, children: o }) : r;
|
|
22
30
|
export {
|
|
23
|
-
|
|
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-
|
|
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-
|
|
13
|
-
import "../../_equalByTag-
|
|
14
|
-
import "../../iconify.module-
|
|
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-
|
|
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(
|
|
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);
|