@hortiview/shared-components 0.0.6504 → 0.0.6849
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/ListAreaService-DDlsV9UD.js +100 -0
- package/dist/assets/BaseView.css +1 -1
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/ListAreaService.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +19 -11
- package/dist/components/AlertBanner/AlertBanner.test.js +17 -23
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +57 -55
- package/dist/components/BaseView/BaseView.test.js +19 -25
- package/dist/components/BasicHeading/BasicHeading.js +52 -45
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +7 -7
- package/dist/components/ContextMenu/ContextMenu.test.js +6 -6
- 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/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +5 -5
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +8 -8
- package/dist/components/FormComponents/FormSelect/FormSelect.js +90 -1465
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +70 -3027
- 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.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.js +33 -33
- 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 +4 -4
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +2 -2
- package/dist/components/ListArea/ListAreaService.d.ts +2 -2
- package/dist/components/ListArea/ListAreaService.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +7 -7
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +30 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.test.d.ts +1 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +37 -0
- package/dist/components/Scrollbar/scrollbar.test.js +8 -8
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +16 -11
- package/dist/hooks/useBreakpoint.js +2 -3
- package/dist/hooks/useBreakpoints.test.d.ts +1 -0
- package/dist/hooks/useBreakpoints.test.js +11 -0
- package/dist/index-DP2ENnrX.js +2963 -0
- package/dist/main.js +7 -7
- package/dist/react-tooltip.min-BzHiZW8k.js +1380 -0
- package/dist/{react.esm-BBemCHUU.js → react.esm-DoZanrUz.js} +1223 -1190
- package/dist/useBreakpoint-2MH8ICuE.js +28 -0
- package/package.json +1 -1
- package/dist/ListAreaService-BoNnFzrZ.js +0 -82
- package/dist/useBreakpoint-DROHPVxO.js +0 -35
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import "./assets/ListAreaService.css";
|
|
2
|
+
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
import { TypoButton as N, Group as O, TypoSubtitle as k, TypoBody as $, Icon as L } from "@element/react-components";
|
|
4
|
+
import { Iconify as E } from "./components/Iconify/Iconify.js";
|
|
5
|
+
import { AvailableCustomIcons as j } from "./enums/AvailableCustomIcons.js";
|
|
6
|
+
const W = "_fullWidth_1l0gd_1", G = "_mainElevation_1l0gd_5", S = "_searchbar_1l0gd_11", w = "_roundedBottom_1l0gd_19", A = "_primaryText_1l0gd_24", P = "_noOverlineText_1l0gd_28", q = "_list_1l0gd_32", z = "_listItem_1l0gd_60", D = "_trailingIcon_1l0gd_64", F = "_groupedListItem_1l0gd_76", H = "_iconColor_1l0gd_80", J = "_overlineTitle_1l0gd_84", K = "_truncate_1l0gd_89", M = "_truncateOverlineText_1l0gd_98", i = {
|
|
7
|
+
fullWidth: W,
|
|
8
|
+
mainElevation: G,
|
|
9
|
+
searchbar: S,
|
|
10
|
+
roundedBottom: w,
|
|
11
|
+
primaryText: A,
|
|
12
|
+
noOverlineText: P,
|
|
13
|
+
list: q,
|
|
14
|
+
listItem: z,
|
|
15
|
+
trailingIcon: D,
|
|
16
|
+
groupedListItem: F,
|
|
17
|
+
iconColor: H,
|
|
18
|
+
overlineTitle: J,
|
|
19
|
+
truncate: K,
|
|
20
|
+
truncateOverlineText: M
|
|
21
|
+
}, tt = (e, l, c, a) => {
|
|
22
|
+
const o = e.reduce((n, s) => {
|
|
23
|
+
const { groupName: t, ...m } = s;
|
|
24
|
+
return !t || typeof t != "string" || (n[t] || (n[t] = {
|
|
25
|
+
groupName: /* @__PURE__ */ r(N, { children: t }),
|
|
26
|
+
id: t,
|
|
27
|
+
items: []
|
|
28
|
+
}), n[t].items = [
|
|
29
|
+
...n[t].items,
|
|
30
|
+
T(m, l, c, a)
|
|
31
|
+
]), n;
|
|
32
|
+
}, {});
|
|
33
|
+
return Object.values(o);
|
|
34
|
+
}, et = (e, l, c, a) => e.map((o) => T(o, l, c, a)), T = (e, l, c, a) => {
|
|
35
|
+
const {
|
|
36
|
+
id: o,
|
|
37
|
+
title: n,
|
|
38
|
+
subTitle: s,
|
|
39
|
+
route: t,
|
|
40
|
+
value: m,
|
|
41
|
+
noNavigation: g,
|
|
42
|
+
disabled: d,
|
|
43
|
+
icon: y,
|
|
44
|
+
iconType: u,
|
|
45
|
+
trailingIcon: I,
|
|
46
|
+
trailingIconType: x,
|
|
47
|
+
actionButton: f,
|
|
48
|
+
onClick: h,
|
|
49
|
+
customTitle: p,
|
|
50
|
+
listItemClassName: B,
|
|
51
|
+
overlineTitle: v
|
|
52
|
+
} = e, _ = l === t;
|
|
53
|
+
return {
|
|
54
|
+
id: o,
|
|
55
|
+
key: o,
|
|
56
|
+
select: _,
|
|
57
|
+
primaryText: o,
|
|
58
|
+
secondaryText: /* @__PURE__ */ C(O, { direction: "vertical", gap: "none", children: [
|
|
59
|
+
p ?? /* @__PURE__ */ r(
|
|
60
|
+
k,
|
|
61
|
+
{
|
|
62
|
+
level: 1,
|
|
63
|
+
bold: _,
|
|
64
|
+
className: `${i.truncate} lmnt-theme-on-surface-active`,
|
|
65
|
+
children: n
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
s && !p ? /* @__PURE__ */ r(
|
|
69
|
+
$,
|
|
70
|
+
{
|
|
71
|
+
level: 2,
|
|
72
|
+
themeColor: _ ? "primary" : void 0,
|
|
73
|
+
className: `${i.truncate} lmnt-theme-on-surface-inactive`,
|
|
74
|
+
children: s
|
|
75
|
+
}
|
|
76
|
+
) : void 0
|
|
77
|
+
] }),
|
|
78
|
+
overlineText: /* @__PURE__ */ r("span", { className: `${i.truncate} ${i.truncateOverlineText}`, children: v }),
|
|
79
|
+
trailingBlock: f ?? I ?? /* @__PURE__ */ r(L, { icon: "arrow_right", className: i.iconColor }),
|
|
80
|
+
leadingBlock: Q(y),
|
|
81
|
+
value: m,
|
|
82
|
+
componentProps: {
|
|
83
|
+
id: o,
|
|
84
|
+
key: o,
|
|
85
|
+
leadingBlockType: u ?? "icon",
|
|
86
|
+
trailingBlockType: x ?? "icon",
|
|
87
|
+
className: `${u === "avatar" ? "" : i.listItem} ${c} ${B ?? ""} ${v ? i.overlineTitle : i.noOverlineText}`,
|
|
88
|
+
onClick: (R, b) => h?.(b),
|
|
89
|
+
tag: d || g ? void 0 : a ?? "a",
|
|
90
|
+
to: d || g ? void 0 : t,
|
|
91
|
+
disabled: d
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}, Q = (e) => typeof e == "string" && e in j ? /* @__PURE__ */ r(E, { icon: e }) : e;
|
|
95
|
+
export {
|
|
96
|
+
et as a,
|
|
97
|
+
tt as g,
|
|
98
|
+
T as m,
|
|
99
|
+
i as s
|
|
100
|
+
};
|
package/dist/assets/BaseView.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._divider_12ecr_1{margin:0 2rem}._truncate_12ecr_5{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55vw}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._elevation_16c7u_1{width:100%;border-radius:.5rem}._themeBackground_16c7u_6{background:var(--lmnt-theme-background)}._tabBar_16c7u_10{background:transparent;align-self:flex-end;border-radius:.5rem}._tabWrapper_16c7u_16{border-bottom:1px solid var(--lmnt-theme-on-surface-stroke)}._tabButton_16c7u_20{height:3.5rem!important}._childContainer_16c7u_24{width:25rem}._childContainerPhone_16c7u_28{width:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._fullWidth_1l0gd_1{width:100%}._mainElevation_1l0gd_5{background:var(--lmnt-theme-background);border-radius:.5rem;width:100%}._searchbar_1l0gd_11 div{border:none}._searchbar_1l0gd_11 button{margin-right:.5rem}._roundedBottom_1l0gd_19{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_1l0gd_24 [class*=mdc-list-item__primary-text]{display:none!important}._noOverlineText_1l0gd_28 [class*=mdc-list-item__content]{margin-top:-.625rem}._list_1l0gd_32{padding-top:0;padding-bottom:0;overflow-y:auto}._list_1l0gd_32 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._list_1l0gd_32::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 .25rem rgba(0,0,0,.2);border-radius:.5rem;margin-right:.25rem;background-color:var(--lmnt-theme-background)}._list_1l0gd_32::-webkit-scrollbar{width:.5rem;background-color:var(--lmnt-theme-background)}._list_1l0gd_32::-webkit-scrollbar-thumb{border-radius:.5rem;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:var(--lmnt-theme-primary-on-surface)}._listItem_1l0gd_60{border-bottom:.0775rem solid var(--lmnt-utility-gray-surface)}._listItem_1l0gd_60 i:not(._trailingIcon_1l0gd_64){color:var(--lmnt-theme-on-surface-inactive)}._listItem_1l0gd_60 i._trailingIcon_1l0gd_64{color:var(--lmnt-theme-on-surface-disabled)}._listItem_1l0gd_60 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._groupedListItem_1l0gd_76{height:4.5rem!important}._iconColor_1l0gd_80{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_1l0gd_84 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}._truncate_1l0gd_89{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%}._truncateOverlineText_1l0gd_98{margin-bottom:-1rem!important;margin-top:-1rem!important}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import "../../assets/AlertBanner.css";
|
|
2
|
-
import { jsx as e, Fragment as
|
|
2
|
+
import { jsx as e, Fragment as c, jsxs as a } from "react/jsx-runtime";
|
|
3
3
|
import { Group as p, TypoBody as l } from "@element/react-components";
|
|
4
|
-
import {
|
|
5
|
-
const d = "_messageContainer_1kpsp_1",
|
|
4
|
+
import { u as m } from "../../useBreakpoint-2MH8ICuE.js";
|
|
5
|
+
const d = "_messageContainer_1kpsp_1", _ = "_info_1kpsp_9", g = "_danger_1kpsp_14", u = "_success_1kpsp_19", n = {
|
|
6
6
|
messageContainer: d,
|
|
7
|
-
info:
|
|
8
|
-
danger:
|
|
9
|
-
success:
|
|
7
|
+
info: _,
|
|
8
|
+
danger: g,
|
|
9
|
+
success: u
|
|
10
10
|
}, v = ({ text: s, color: r = "info", isOpen: o = !0, action: i }) => {
|
|
11
|
-
const {
|
|
12
|
-
return o ? /* @__PURE__ */ e("div", { className: `${n.messageContainer} ${n[r]}`, children: /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const { isDesktop: t } = m();
|
|
12
|
+
return o ? /* @__PURE__ */ e("div", { className: `${n.messageContainer} ${n[r]}`, children: /* @__PURE__ */ a(
|
|
13
|
+
p,
|
|
14
|
+
{
|
|
15
|
+
direction: t ? "horizontal" : "vertical",
|
|
16
|
+
primaryAlign: "space-between",
|
|
17
|
+
secondaryAlign: "center",
|
|
18
|
+
children: [
|
|
19
|
+
typeof s == "string" ? /* @__PURE__ */ e(l, { bold: !0, level: 2, children: s }) : /* @__PURE__ */ e("div", { children: s }),
|
|
20
|
+
i
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
) }) : /* @__PURE__ */ e(c, {});
|
|
16
24
|
};
|
|
17
25
|
export {
|
|
18
26
|
v as AlertBanner
|
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
import { jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { a as t, s } from "../../react.esm-DoZanrUz.js";
|
|
3
|
+
import { a as l } from "../../useBreakpoint-2MH8ICuE.js";
|
|
4
4
|
import { AlertBanner as n } from "./AlertBanner.js";
|
|
5
|
-
import { d as c, b as
|
|
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", () => {
|
|
7
|
-
|
|
8
|
-
a.spyOn(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
isLg: !0,
|
|
13
|
-
isXlg: !0,
|
|
14
|
-
active: "lg"
|
|
7
|
+
p(() => {
|
|
8
|
+
a.spyOn(l, "useBreakpoints").mockReturnValue({
|
|
9
|
+
isMobile: !1,
|
|
10
|
+
isTablet: !1,
|
|
11
|
+
isDesktop: !0
|
|
15
12
|
});
|
|
16
13
|
}), r("render AlertBanner with text", () => {
|
|
17
|
-
t(/* @__PURE__ */ e(n, { text: "Test" })),
|
|
14
|
+
t(/* @__PURE__ */ e(n, { text: "Test" })), o(s.getByText("Test")).toBeInTheDocument();
|
|
18
15
|
}), r("render AlertBanner with element", () => {
|
|
19
|
-
t(/* @__PURE__ */ e(n, { text: /* @__PURE__ */ e(m, { children: "Element" }) })),
|
|
16
|
+
t(/* @__PURE__ */ e(n, { text: /* @__PURE__ */ e(m, { children: "Element" }) })), o(s.getByText("Element")).toBeInTheDocument();
|
|
20
17
|
}), r("renders AlertBanner with vertical style (flex-direction: column) when screen is small", () => {
|
|
21
|
-
a.spyOn(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
isLg: !1,
|
|
26
|
-
isXlg: !1,
|
|
27
|
-
active: "sm"
|
|
18
|
+
a.spyOn(l, "useBreakpoints").mockReturnValue({
|
|
19
|
+
isMobile: !0,
|
|
20
|
+
isTablet: !1,
|
|
21
|
+
isDesktop: !1
|
|
28
22
|
}), t(/* @__PURE__ */ e(n, { text: "Test" }));
|
|
29
|
-
const
|
|
30
|
-
|
|
23
|
+
const i = s.getByText("Test").closest(".lmnt.lmnt-group");
|
|
24
|
+
o(i).toHaveStyle(
|
|
31
25
|
"display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 16px;"
|
|
32
26
|
);
|
|
33
27
|
}), r("renders nothing when isOpen is false", () => {
|
|
34
|
-
t(/* @__PURE__ */ e(n, { text: "Test", isOpen: !1 })),
|
|
28
|
+
t(/* @__PURE__ */ e(n, { text: "Test", isOpen: !1 })), o(s.queryByText("Test")).not.toBeInTheDocument();
|
|
35
29
|
});
|
|
36
30
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { LinkProps } from '../../types/internal/ReactRouterTypes';
|
|
3
2
|
import { BaseListElement } from '../../types/ListElement';
|
|
3
|
+
import { LinkProps } from '../../types/internal/ReactRouterTypes';
|
|
4
4
|
type BaseViewProps = {
|
|
5
5
|
/**
|
|
6
6
|
* elements to be displayed in the list area
|
|
@@ -1,65 +1,67 @@
|
|
|
1
1
|
import "../../assets/BaseView.css";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
11
|
-
divider:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
import { jsx as e, Fragment as w, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import { Grid as x, GridRow as A, GridCol as a, Group as u } from "@element/react-components";
|
|
4
|
+
import { useMemo as l } from "react";
|
|
5
|
+
import { BasicHeading as m } from "../BasicHeading/BasicHeading.js";
|
|
6
|
+
import { EmptyView as D } from "../EmptyView/EmptyView.js";
|
|
7
|
+
import { ListArea as H } from "../ListArea/ListArea.js";
|
|
8
|
+
import { VerticalDivider as N } from "../VerticalDivider/VerticalDivider.js";
|
|
9
|
+
import { u as V } from "../../useBreakpoint-2MH8ICuE.js";
|
|
10
|
+
const W = "_divider_12ecr_1", j = "_truncate_12ecr_5", p = {
|
|
11
|
+
divider: W,
|
|
12
|
+
truncate: j
|
|
13
|
+
}, J = ({
|
|
14
|
+
action: c,
|
|
15
|
+
heading: d,
|
|
15
16
|
elements: o,
|
|
16
17
|
emptyText: s,
|
|
17
|
-
hasSearch:
|
|
18
|
-
isSorted:
|
|
19
|
-
className:
|
|
20
|
-
withAvatar:
|
|
21
|
-
listMaxHeight:
|
|
22
|
-
pathname:
|
|
23
|
-
routerLinkElement:
|
|
24
|
-
searchPlaceholder:
|
|
18
|
+
hasSearch: h = !0,
|
|
19
|
+
isSorted: f = !0,
|
|
20
|
+
className: v,
|
|
21
|
+
withAvatar: g = !1,
|
|
22
|
+
listMaxHeight: C = "calc(100vh - 200px)",
|
|
23
|
+
pathname: n,
|
|
24
|
+
routerLinkElement: B,
|
|
25
|
+
searchPlaceholder: _
|
|
25
26
|
}) => {
|
|
26
|
-
const {
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ e(m, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
A,
|
|
33
|
-
{
|
|
34
|
-
elements: o,
|
|
35
|
-
hasSearch: p,
|
|
36
|
-
maxHeight: g,
|
|
37
|
-
isSorted: h,
|
|
38
|
-
pathname: l,
|
|
39
|
-
routerLinkElement: C,
|
|
40
|
-
searchPlaceholder: B
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
] }),
|
|
44
|
-
r && /* @__PURE__ */ t(H, { className: j.divider, height: "100%" })
|
|
45
|
-
] }),
|
|
46
|
-
/* @__PURE__ */ t(a, { desktopCol: 8, tabletCol: 12, phoneCol: 12, children: /* @__PURE__ */ e(m, { direction: "vertical", fullWidth: !0, children: [
|
|
47
|
-
/* @__PURE__ */ t(
|
|
48
|
-
u,
|
|
27
|
+
const { isDesktop: r } = V(), t = l(() => o.find((k) => k.route === n), [n, o]), G = l(() => t?.component ?? (r ? /* @__PURE__ */ e(D, { subtitle: s }) : /* @__PURE__ */ e(w, {})), [t, r, s]), b = l(() => r ? !0 : !t, [t, r]);
|
|
28
|
+
return /* @__PURE__ */ e(x, { className: v ?? "", fullHeight: !0, fullWidth: !0, columnGap: 0, children: /* @__PURE__ */ i(A, { children: [
|
|
29
|
+
b && /* @__PURE__ */ e(a, { desktopCol: 3, tabletCol: 12, phoneCol: 12, children: /* @__PURE__ */ i(u, { direction: "vertical", fullWidth: !0, gap: r ? "standard" : "dense", children: [
|
|
30
|
+
d && /* @__PURE__ */ e(m, { heading: d, level: 4, marginBottom: 0, children: c }),
|
|
31
|
+
/* @__PURE__ */ e(
|
|
32
|
+
H,
|
|
49
33
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
34
|
+
elements: o,
|
|
35
|
+
hasSearch: h,
|
|
36
|
+
maxHeight: C,
|
|
37
|
+
isSorted: f,
|
|
38
|
+
pathname: n,
|
|
39
|
+
routerLinkElement: B,
|
|
40
|
+
searchPlaceholder: _
|
|
57
41
|
}
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
)
|
|
43
|
+
] }) }),
|
|
44
|
+
/* @__PURE__ */ i(a, { desktopCol: 9, tabletCol: 12, phoneCol: 12, children: [
|
|
45
|
+
r && /* @__PURE__ */ e(N, { className: p.divider, height: "100%" }),
|
|
46
|
+
/* @__PURE__ */ i(u, { direction: "vertical", fullWidth: !0, children: [
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
m,
|
|
49
|
+
{
|
|
50
|
+
className: p.truncate,
|
|
51
|
+
heading: t?.detailTitle ?? t?.title ?? "",
|
|
52
|
+
level: 4,
|
|
53
|
+
icon: t?.hideIconInDetail === !0 ? void 0 : t?.icon,
|
|
54
|
+
marginBottom: 0,
|
|
55
|
+
invisibleButton: t?.detailAction === void 0,
|
|
56
|
+
withAvatar: g,
|
|
57
|
+
children: t?.detailAction ?? c
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
G
|
|
61
|
+
] })
|
|
62
|
+
] })
|
|
61
63
|
] }) });
|
|
62
64
|
};
|
|
63
65
|
export {
|
|
64
|
-
|
|
66
|
+
J as BaseView
|
|
65
67
|
};
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { jsx as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as r, s as e, f as p } from "../../react.esm-DoZanrUz.js";
|
|
3
|
+
import { a as l } from "../../useBreakpoint-2MH8ICuE.js";
|
|
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", () => {
|
|
7
7
|
m(() => {
|
|
8
8
|
c.spyOn(l, "useBreakpoints").mockReturnValue({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
isLg: !0,
|
|
13
|
-
isXlg: !0,
|
|
14
|
-
active: "lg"
|
|
9
|
+
isMobile: !1,
|
|
10
|
+
isTablet: !1,
|
|
11
|
+
isDesktop: !0
|
|
15
12
|
});
|
|
16
13
|
});
|
|
17
14
|
const o = [
|
|
@@ -40,9 +37,9 @@ u("BaseView Test", () => {
|
|
|
40
37
|
}
|
|
41
38
|
];
|
|
42
39
|
n("render BaseView with empty view and navigation list", () => {
|
|
43
|
-
|
|
40
|
+
r(
|
|
44
41
|
/* @__PURE__ */ a(
|
|
45
|
-
|
|
42
|
+
i,
|
|
46
43
|
{
|
|
47
44
|
pathname: "/personal-profile",
|
|
48
45
|
elements: o,
|
|
@@ -55,9 +52,9 @@ u("BaseView Test", () => {
|
|
|
55
52
|
)
|
|
56
53
|
), t(e.getByText("user.noselection")).toBeInTheDocument(), t(e.getByText("user.personal-profile")).toBeInTheDocument(), t(e.getByText("user.personal_information")).toBeInTheDocument(), t(e.getByText("user.data_privacy")).toBeInTheDocument(), t(e.getByText("user.security")).toBeInTheDocument();
|
|
57
54
|
}), n("render BaseView with data and navigation list", () => {
|
|
58
|
-
|
|
55
|
+
r(
|
|
59
56
|
/* @__PURE__ */ a(
|
|
60
|
-
|
|
57
|
+
i,
|
|
61
58
|
{
|
|
62
59
|
pathname: "/personal-profile/personal-information",
|
|
63
60
|
elements: o,
|
|
@@ -70,9 +67,9 @@ u("BaseView Test", () => {
|
|
|
70
67
|
)
|
|
71
68
|
), t(e.getByText("Personal information selected")).toBeInTheDocument(), t(e.getAllByText("account_circle")).toHaveLength(2), t(e.getAllByText("user.personal_information")).toHaveLength(2);
|
|
72
69
|
}), n("render BaseView with custom detail title and no detail icon", () => {
|
|
73
|
-
|
|
70
|
+
r(
|
|
74
71
|
/* @__PURE__ */ a(
|
|
75
|
-
|
|
72
|
+
i,
|
|
76
73
|
{
|
|
77
74
|
pathname: "/personal-profile/data-privacy",
|
|
78
75
|
elements: o,
|
|
@@ -86,15 +83,12 @@ u("BaseView Test", () => {
|
|
|
86
83
|
), t(e.getByText("Data Privacy selected")).toBeInTheDocument(), t(e.getByText("Data Privacy 2000")).toBeInTheDocument(), t(e.getAllByText("privacy_tip")).toHaveLength(1), t(e.getAllByText("user.data_privacy")).toHaveLength(1);
|
|
87
84
|
}), n("hide empty view when screen is small", () => {
|
|
88
85
|
c.spyOn(l, "useBreakpoints").mockReturnValue({
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
isXlg: !1,
|
|
94
|
-
active: "sm"
|
|
95
|
-
}), i(
|
|
86
|
+
isMobile: !0,
|
|
87
|
+
isTablet: !1,
|
|
88
|
+
isDesktop: !1
|
|
89
|
+
}), r(
|
|
96
90
|
/* @__PURE__ */ a(
|
|
97
|
-
|
|
91
|
+
i,
|
|
98
92
|
{
|
|
99
93
|
pathname: "/personal-profile/data-privacy",
|
|
100
94
|
elements: o,
|
|
@@ -107,9 +101,9 @@ u("BaseView Test", () => {
|
|
|
107
101
|
)
|
|
108
102
|
), t(e.queryByText("user.noselection")).not.toBeInTheDocument();
|
|
109
103
|
}), n("render BaseView with selected detail section", () => {
|
|
110
|
-
|
|
104
|
+
r(
|
|
111
105
|
/* @__PURE__ */ a(
|
|
112
|
-
|
|
106
|
+
i,
|
|
113
107
|
{
|
|
114
108
|
pathname: "/personal-profile/data-privacy",
|
|
115
109
|
elements: o,
|
|
@@ -1,69 +1,76 @@
|
|
|
1
1
|
import "../../assets/BasicHeading.css";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { TypoDisplay as C, TypoBody as w, Icon as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { TypoDisplay as C, TypoBody as w, Icon as u } from "@element/react-components";
|
|
4
|
+
import { Iconify as y } from "../Iconify/Iconify.js";
|
|
5
|
+
import { AvailableCustomIcons as I } from "../../enums/AvailableCustomIcons.js";
|
|
6
|
+
import { u as B } from "../../useBreakpoint-2MH8ICuE.js";
|
|
7
|
+
import { OverflowTooltip as N } from "../OverflowTooltip/OverflowTooltip.js";
|
|
8
|
+
const H = "_pageHeader_fwns1_1", b = "_headlineContainer_fwns1_11", x = "_actionButtonContainer_fwns1_16", A = "_content_fwns1_25", T = "_leadingIcon_fwns1_31", W = "_headingWrapper_fwns1_38", $ = "_headingContainer_fwns1_43", j = "_invisible_fwns1_48", k = "_withAvatar_fwns1_52", z = "_iconContainer_fwns1_57", n = {
|
|
9
|
+
pageHeader: H,
|
|
10
|
+
headlineContainer: b,
|
|
11
|
+
actionButtonContainer: x,
|
|
11
12
|
content: A,
|
|
12
|
-
leadingIcon:
|
|
13
|
-
headingWrapper:
|
|
14
|
-
headingContainer:
|
|
15
|
-
invisible:
|
|
16
|
-
withAvatar:
|
|
13
|
+
leadingIcon: T,
|
|
14
|
+
headingWrapper: W,
|
|
15
|
+
headingContainer: $,
|
|
16
|
+
invisible: j,
|
|
17
|
+
withAvatar: k,
|
|
17
18
|
iconContainer: z
|
|
18
|
-
},
|
|
19
|
-
|
|
19
|
+
}, D = ({ icon: e }) => e ? typeof e != "string" ? /* @__PURE__ */ t("div", { className: n.iconContainer, children: e }) : e in I ? /* @__PURE__ */ t(
|
|
20
|
+
y,
|
|
20
21
|
{
|
|
21
22
|
icon: e,
|
|
22
23
|
className: n.leadingIcon,
|
|
23
24
|
iconSize: "large",
|
|
24
25
|
iconType: "filled"
|
|
25
26
|
}
|
|
26
|
-
) : /* @__PURE__ */
|
|
27
|
+
) : /* @__PURE__ */ t(u, { iconSize: "large", iconType: "filled", icon: e, className: n.leadingIcon }) : null, E = ({
|
|
27
28
|
children: e,
|
|
28
|
-
marginBottom:
|
|
29
|
-
heading:
|
|
29
|
+
marginBottom: i,
|
|
30
|
+
heading: a,
|
|
30
31
|
icon: d,
|
|
31
32
|
className: p,
|
|
32
|
-
subHeading:
|
|
33
|
+
subHeading: r,
|
|
33
34
|
subHeadingLevel: _ = 2,
|
|
34
35
|
invisibleButton: f = !1,
|
|
35
|
-
level:
|
|
36
|
-
fontWeight:
|
|
37
|
-
withAvatar:
|
|
36
|
+
level: s = 4,
|
|
37
|
+
fontWeight: c = 400,
|
|
38
|
+
withAvatar: m = !1
|
|
38
39
|
}) => {
|
|
39
|
-
const {
|
|
40
|
-
if (
|
|
41
|
-
return typeof
|
|
40
|
+
const { isDesktop: l } = B(), h = l ? s : s + 1, g = c === "bold" ? 500 : c, v = () => {
|
|
41
|
+
if (i !== void 0)
|
|
42
|
+
return typeof i == "number" ? `${i}px` : "2rem";
|
|
42
43
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ o(
|
|
44
45
|
"div",
|
|
45
46
|
{
|
|
46
47
|
className: n.pageHeader,
|
|
47
48
|
style: { marginBottom: v() },
|
|
48
49
|
"data-testid": "HeaderContainer",
|
|
49
50
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: `${m && l ? n.withAvatar : ""} ${n.headingWrapper}`,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ t(D, { icon: d }),
|
|
57
|
+
/* @__PURE__ */ o("div", { className: r ? n.headingContainer : "", children: [
|
|
58
|
+
/* @__PURE__ */ t(N, { id: a, text: a, children: /* @__PURE__ */ t(
|
|
59
|
+
C,
|
|
60
|
+
{
|
|
61
|
+
level: h,
|
|
62
|
+
"data-testid": "Header",
|
|
63
|
+
className: p ?? "",
|
|
64
|
+
style: { fontWeight: g },
|
|
65
|
+
children: a
|
|
66
|
+
}
|
|
67
|
+
) }),
|
|
68
|
+
/* @__PURE__ */ t(w, { level: _, children: r })
|
|
69
|
+
] })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ t(
|
|
67
74
|
"div",
|
|
68
75
|
{
|
|
69
76
|
className: `${n.actionButtonContainer} ${f && n.invisible}`,
|
|
@@ -76,5 +83,5 @@ const N = "_pageHeader_fwns1_1", H = "_headlineContainer_fwns1_11", b = "_action
|
|
|
76
83
|
);
|
|
77
84
|
};
|
|
78
85
|
export {
|
|
79
|
-
|
|
86
|
+
E as BasicHeading
|
|
80
87
|
};
|
|
@@ -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 {
|
|
4
|
+
import { a as i, s as n } from "../../react.esm-DoZanrUz.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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { BlockView as
|
|
4
|
-
import { d as B, v as a, t as
|
|
2
|
+
import { a as s, s as o, f as n } from "../../react.esm-DoZanrUz.js";
|
|
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
5
|
B("BlockView Test", () => {
|
|
6
6
|
const c = a.fn(), e = {
|
|
7
7
|
id: "1",
|
|
@@ -11,10 +11,10 @@ B("BlockView Test", () => {
|
|
|
11
11
|
column: 2
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
r("renders BlockView correctly with 2x3 blocks", () => {
|
|
15
15
|
s(
|
|
16
16
|
/* @__PURE__ */ l(
|
|
17
|
-
|
|
17
|
+
i,
|
|
18
18
|
{
|
|
19
19
|
blocks: [e],
|
|
20
20
|
columns: 2,
|
|
@@ -27,10 +27,10 @@ B("BlockView Test", () => {
|
|
|
27
27
|
), t(o.getByText("Layout")).toBeInTheDocument(), t(o.getByText("6 Block")).toBeInTheDocument();
|
|
28
28
|
const k = o.getAllByTestId("blockViewBlock");
|
|
29
29
|
t(k.length).toBe(6);
|
|
30
|
-
}),
|
|
30
|
+
}), r("executes onClick method", () => {
|
|
31
31
|
s(
|
|
32
32
|
/* @__PURE__ */ l(
|
|
33
|
-
|
|
33
|
+
i,
|
|
34
34
|
{
|
|
35
35
|
blocks: [e],
|
|
36
36
|
columns: 2,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
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-DoZanrUz.js";
|
|
3
3
|
import { ContextMenu as u } from "./ContextMenu.js";
|
|
4
|
-
import { v as
|
|
5
|
-
const T =
|
|
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
6
|
{ primaryText: "Open", onClick: T, leadingBlock: "add" },
|
|
7
7
|
{ primaryText: "Delete", onClick: i, leadingBlock: "delete_outline" },
|
|
8
8
|
{ primaryText: "Edit", onClick: l, leadingBlock: "edit" }
|
|
9
9
|
];
|
|
10
10
|
g("ContextMenu Test", () => {
|
|
11
11
|
B("render contextMenu and close it", () => {
|
|
12
|
-
d(/* @__PURE__ */
|
|
12
|
+
d(/* @__PURE__ */ r(u, { actions: p }));
|
|
13
13
|
const c = n.getByTestId("openButton"), t = n.getByTestId("selectionmenu");
|
|
14
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
15
|
}), B("render ContextMenu and open it", async () => {
|
|
16
|
-
d(/* @__PURE__ */
|
|
16
|
+
d(/* @__PURE__ */ r(u, { actions: p, triggerOpen: !0 }));
|
|
17
17
|
const c = n.getByTestId("openButton"), t = n.getByTestId("selectionmenu");
|
|
18
18
|
e(t).toBeInTheDocument(), e(t).not.toHaveClass("mdc-menu-surface--open"), o.click(c), a(() => e(t).toHaveClass("mdc-menu-surface--open"));
|
|
19
19
|
const s = n.getAllByTestId("listItemButton");
|