@hortiview/shared-components 2.0.0 → 2.2.0
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/CHANGELOG.md +17 -0
- package/README.md +15 -0
- package/dist/GenericCard-BFYKwkzI.js +89 -0
- package/dist/{ListAreaService-Wq9IkwWN.js → ListAreaService-BVtuBN0K.js} +34 -33
- package/dist/assets/OnboardingBanner.css +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +6 -1
- package/dist/components/ContextMenu/ContextMenu.js +33 -32
- package/dist/components/ContextMenu/ContextMenu.test.js +7 -7
- package/dist/components/GenericTable/Mobile/GenericCard.js +3 -2
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +1 -1
- package/dist/components/ListArea/ListArea.d.ts +5 -1
- package/dist/components/ListArea/ListArea.js +24 -23
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/ListArea/ListAreaService.js +1 -1
- package/dist/components/OnboardingBanner/OnboardingBanner.d.ts +30 -0
- package/dist/components/OnboardingBanner/OnboardingBanner.js +89 -0
- package/dist/components/OnboardingBanner/OnboardingBanner.test.d.ts +1 -0
- package/dist/components/OnboardingBanner/OnboardingBanner.test.js +72 -0
- package/dist/index.es-Dvj_qpAp.js +268 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +41 -39
- package/dist/types/ListElement.d.ts +4 -0
- package/package.json +1 -1
- package/dist/GenericCard-DuNnB9Ve.js +0 -350
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [2.2.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.1.0...v2.2.0) (2025-07-24)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add new data-testids and fix onboardingbanner test ([1ac90c1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/1ac90c1c4db3ff909e6ac3beb52863e6a8e55937))
|
|
6
|
+
|
|
7
|
+
## [2.1.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.0.0...v2.1.0) (2025-06-11)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* create OnboardingBanner component ([8cfeadf](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/8cfeadf8dde24b6d888de22533e506805b81c83c))
|
|
12
|
+
* improve component API, update tests and docs ([12e6da4](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/12e6da4a40b66885dc2ccf56c8319e4baab5df4c))
|
|
13
|
+
|
|
14
|
+
### Code Refactoring
|
|
15
|
+
|
|
16
|
+
* change index to buttonProps.id ([0c9e4b6](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/0c9e4b661ef71bde4b82540a15d73a2d2e79552c))
|
|
17
|
+
|
|
1
18
|
## [2.0.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v1.12.0...v2.0.0) (2025-06-06)
|
|
2
19
|
|
|
3
20
|
### ⚠ BREAKING CHANGES
|
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ Additionally the library provides form components using [react-hook-form](https:
|
|
|
51
51
|
1. [LoadingSpinner](#loadingspinner)
|
|
52
52
|
1. [Modal](#modal)
|
|
53
53
|
1. [ModulePadding](#modulepadding)
|
|
54
|
+
1. [OnboardingBanner](#onboardingbanner)
|
|
54
55
|
1. [OverflowTooltip](#overflowtooltip)
|
|
55
56
|
1. [ScrollBar](#scrollbar)
|
|
56
57
|
1. [SearchBar](#searchbar)
|
|
@@ -887,6 +888,20 @@ import { ModulePadding } from '@hortiview/shared-components';
|
|
|
887
888
|
</ModulePadding>;
|
|
888
889
|
```
|
|
889
890
|
|
|
891
|
+
### OnboardingBanner
|
|
892
|
+
|
|
893
|
+
A responsive onboarding banner that adapts its layout for desktop and mobile.
|
|
894
|
+
|
|
895
|
+
- **Desktop:** Media content is displayed to the _right_ of the description
|
|
896
|
+
- **Mobile:** Media content appears _above_ the description
|
|
897
|
+
|
|
898
|
+
```jsx
|
|
899
|
+
import {OnboardingBanner} from '@hortiview/shared-components';
|
|
900
|
+
|
|
901
|
+
<OnboardingBanner headline='Hello' />
|
|
902
|
+
|
|
903
|
+
```
|
|
904
|
+
|
|
890
905
|
### OverflowTooltip
|
|
891
906
|
|
|
892
907
|
Provides a tooltip and overflow behavior of a given text value.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as r, jsxs as d, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import { C as h, a as m, b as T, c as g, d as v } from "./index.es-6TJ1S8Jr.js";
|
|
3
|
+
import { G as b, a as x, b as c } from "./index.es-Dvj_qpAp.js";
|
|
4
|
+
import { d as f } from "./index.es-D54RuMc_.js";
|
|
5
|
+
import { useMemo as w } from "react";
|
|
6
|
+
import { OverflowTooltip as l } from "./components/OverflowTooltip/OverflowTooltip.js";
|
|
7
|
+
import './assets/GenericCard.css';const u = "_cardTitle_ny9m0_1", B = "_cardBody_ny9m0_5", N = "_cardContent_ny9m0_10", $ = "_row_ny9m0_14", G = "_font_ny9m0_18", k = "_fontHeader_ny9m0_23", H = "_title_ny9m0_27", S = "_emptyContainer_ny9m0_33", A = "_empty_ny9m0_33", n = {
|
|
8
|
+
cardTitle: u,
|
|
9
|
+
cardBody: B,
|
|
10
|
+
cardContent: N,
|
|
11
|
+
row: $,
|
|
12
|
+
font: G,
|
|
13
|
+
fontHeader: k,
|
|
14
|
+
title: H,
|
|
15
|
+
emptyContainer: S,
|
|
16
|
+
empty: A
|
|
17
|
+
}, _ = {
|
|
18
|
+
desktopCol: 6,
|
|
19
|
+
phoneCol: 2,
|
|
20
|
+
tabletCol: 4,
|
|
21
|
+
verticalAlign: "bottom"
|
|
22
|
+
}, W = ({ item: e, columns: t, hiddenColumns: o }) => {
|
|
23
|
+
const i = t.find((a) => a.asCardTitle), y = t.find((a) => a.asCardSubtitle), p = w(
|
|
24
|
+
() => t.filter(
|
|
25
|
+
(a) => !a.asCardTitle && !a.asCardSubtitle && a.id !== "actions"
|
|
26
|
+
),
|
|
27
|
+
[t]
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ r(
|
|
30
|
+
h,
|
|
31
|
+
{
|
|
32
|
+
variant: "raised",
|
|
33
|
+
"data-testid": `card${i ? "-" + e[i.accessor] : ""}`,
|
|
34
|
+
children: /* @__PURE__ */ d(m, { className: n.cardContent, "data-testid": "card-content", children: [
|
|
35
|
+
/* @__PURE__ */ r(j, { item: e, titleColumn: i, subTitleColumn: y }),
|
|
36
|
+
/* @__PURE__ */ r(T, { className: n.cardBody, "data-testid": "card-body", children: /* @__PURE__ */ r(b, { fullHeight: !0, fullWidth: !0, variant: "none", children: p.map((a) => o?.includes(a.id) ? null : /* @__PURE__ */ d(x, { className: n.row, "data-testid": "row", children: [
|
|
37
|
+
/* @__PURE__ */ r(c, { horizontalAlign: "right", ..._, children: /* @__PURE__ */ d(
|
|
38
|
+
f,
|
|
39
|
+
{
|
|
40
|
+
level: 2,
|
|
41
|
+
themeColor: "text-secondary-on-background",
|
|
42
|
+
className: `${n.font} ${n.fontHeader}`,
|
|
43
|
+
tag: "div",
|
|
44
|
+
children: [
|
|
45
|
+
a.header,
|
|
46
|
+
":"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) }),
|
|
50
|
+
/* @__PURE__ */ r(c, { horizontalAlign: "left", ..._, children: /* @__PURE__ */ r(s, { column: a, item: e }) })
|
|
51
|
+
] }, a.id)) }) })
|
|
52
|
+
] })
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}, j = ({ item: e, titleColumn: t, subTitleColumn: o }) => {
|
|
56
|
+
const i = e.actions;
|
|
57
|
+
return !t && !o && !i ? null : /* @__PURE__ */ d(C, { children: [
|
|
58
|
+
/* @__PURE__ */ r(
|
|
59
|
+
g,
|
|
60
|
+
{
|
|
61
|
+
"data-testid": "card-title",
|
|
62
|
+
className: n.cardTitle,
|
|
63
|
+
primaryText: t !== void 0 && /* @__PURE__ */ r(s, { column: t, item: e, isTitle: !0 }),
|
|
64
|
+
secondaryText: o !== void 0 && /* @__PURE__ */ r(s, { column: o, item: e, isTitle: !0 }),
|
|
65
|
+
trailingBlock: i,
|
|
66
|
+
trailingBlockType: i ? "title-actions" : void 0
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ r(v, {})
|
|
70
|
+
] });
|
|
71
|
+
}, s = ({ item: e, column: t, isTitle: o = !1 }) => t.cellTemplate ? t.cellTemplate({ row: { original: e } }) : o ? /* @__PURE__ */ r(
|
|
72
|
+
l,
|
|
73
|
+
{
|
|
74
|
+
id: `tip_${t.id}_${e[t.accessor]}`,
|
|
75
|
+
text: e[t.accessor],
|
|
76
|
+
children: /* @__PURE__ */ r("span", { className: n.title, children: e[t.accessor] })
|
|
77
|
+
}
|
|
78
|
+
) : /* @__PURE__ */ r(
|
|
79
|
+
l,
|
|
80
|
+
{
|
|
81
|
+
id: `tip_${t.id}_${e[t.accessor]}`,
|
|
82
|
+
text: e[t.accessor],
|
|
83
|
+
children: /* @__PURE__ */ r(f, { level: 2, themeColor: "text-primary-on-background", className: n.font, children: e[t.accessor] })
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
export {
|
|
87
|
+
W as G,
|
|
88
|
+
n as s
|
|
89
|
+
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { G as
|
|
3
|
-
import { I as
|
|
4
|
-
import { c as
|
|
5
|
-
import { Iconify as
|
|
6
|
-
import { AvailableCustomIcons as
|
|
7
|
-
import './assets/ListAreaService.css';const
|
|
8
|
-
fullWidth:
|
|
9
|
-
mainElevation:
|
|
10
|
-
searchbar:
|
|
11
|
-
roundedBottom:
|
|
12
|
-
primaryText:
|
|
13
|
-
list:
|
|
14
|
-
listItem:
|
|
15
|
-
iconColor:
|
|
16
|
-
overlineTitle:
|
|
17
|
-
noOverlineTitle:
|
|
18
|
-
truncate:
|
|
19
|
-
truncateOverlineText:
|
|
20
|
-
},
|
|
1
|
+
import { jsx as r, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import { G as C } from "./index.es-DntoATwO.js";
|
|
3
|
+
import { I as b } from "./index.es-3043KTnb.js";
|
|
4
|
+
import { c as N, d as O, T as $ } from "./index.es-D54RuMc_.js";
|
|
5
|
+
import { Iconify as k } from "./components/Iconify/Iconify.js";
|
|
6
|
+
import { AvailableCustomIcons as E } from "./enums/AvailableCustomIcons.js";
|
|
7
|
+
import './assets/ListAreaService.css';const j = "_fullWidth_zewqs_1", G = "_mainElevation_zewqs_5", W = "_searchbar_zewqs_11", L = "_roundedBottom_zewqs_19", S = "_primaryText_zewqs_24", A = "_list_zewqs_28", P = "_listItem_zewqs_56", D = "_iconColor_zewqs_76", F = "_overlineTitle_zewqs_80", H = "_noOverlineTitle_zewqs_85", J = "_truncate_zewqs_89", K = "_truncateOverlineText_zewqs_100", n = {
|
|
8
|
+
fullWidth: j,
|
|
9
|
+
mainElevation: G,
|
|
10
|
+
searchbar: W,
|
|
11
|
+
roundedBottom: L,
|
|
12
|
+
primaryText: S,
|
|
13
|
+
list: A,
|
|
14
|
+
listItem: P,
|
|
15
|
+
iconColor: D,
|
|
16
|
+
overlineTitle: F,
|
|
17
|
+
noOverlineTitle: H,
|
|
18
|
+
truncate: J,
|
|
19
|
+
truncateOverlineText: K
|
|
20
|
+
}, ee = (t, s, a, l) => {
|
|
21
21
|
const i = t.reduce((o, c) => {
|
|
22
22
|
const { groupName: e, ...m } = c;
|
|
23
23
|
return !e || typeof e != "string" || (o[e] || (o[e] = {
|
|
24
|
-
groupName: /* @__PURE__ */ r(
|
|
24
|
+
groupName: /* @__PURE__ */ r(N, { children: e }),
|
|
25
25
|
id: e,
|
|
26
26
|
items: []
|
|
27
27
|
}), o[e].items = [
|
|
@@ -30,7 +30,7 @@ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_main
|
|
|
30
30
|
]), o;
|
|
31
31
|
}, {});
|
|
32
32
|
return Object.values(i);
|
|
33
|
-
},
|
|
33
|
+
}, te = (t, s, a, l) => t.map((i) => y(i, s, a, l)), y = (t, s, a, l) => {
|
|
34
34
|
const {
|
|
35
35
|
id: i,
|
|
36
36
|
title: o,
|
|
@@ -47,16 +47,17 @@ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_main
|
|
|
47
47
|
onClick: w,
|
|
48
48
|
customTitle: T,
|
|
49
49
|
listItemClassName: x,
|
|
50
|
-
overlineTitle: _
|
|
50
|
+
overlineTitle: _,
|
|
51
|
+
"data-testid": q
|
|
51
52
|
} = t, u = s === e;
|
|
52
53
|
return {
|
|
53
54
|
id: i,
|
|
54
55
|
key: i,
|
|
55
56
|
select: u,
|
|
56
57
|
primaryText: i,
|
|
57
|
-
secondaryText: /* @__PURE__ */
|
|
58
|
+
secondaryText: /* @__PURE__ */ B(C, { direction: "vertical", gap: "none", children: [
|
|
58
59
|
T ?? /* @__PURE__ */ r(
|
|
59
|
-
|
|
60
|
+
O,
|
|
60
61
|
{
|
|
61
62
|
"data-testid": "title",
|
|
62
63
|
level: 1,
|
|
@@ -66,7 +67,7 @@ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_main
|
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
69
|
c && !T ? /* @__PURE__ */ r(
|
|
69
|
-
|
|
70
|
+
$,
|
|
70
71
|
{
|
|
71
72
|
"data-testid": "subtitle",
|
|
72
73
|
level: 2,
|
|
@@ -84,26 +85,26 @@ import './assets/ListAreaService.css';const E = "_fullWidth_zewqs_1", j = "_main
|
|
|
84
85
|
children: _
|
|
85
86
|
}
|
|
86
87
|
) : void 0,
|
|
87
|
-
trailingBlock: I ?? f ?? /* @__PURE__ */ r(
|
|
88
|
-
leadingBlock:
|
|
88
|
+
trailingBlock: I ?? f ?? /* @__PURE__ */ r(b, { icon: "arrow_right", className: n.iconColor }),
|
|
89
|
+
leadingBlock: M(g),
|
|
89
90
|
value: m,
|
|
90
91
|
componentProps: {
|
|
91
92
|
id: i,
|
|
92
|
-
"data-testid": `${o}-list-item`,
|
|
93
|
+
"data-testid": `${q ?? o}-list-item`,
|
|
93
94
|
key: i,
|
|
94
95
|
leadingBlockType: p ?? "icon",
|
|
95
96
|
trailingBlockType: h ?? "icon",
|
|
96
97
|
className: `${p === "avatar" ? "" : n.listItem} ${a} ${x ?? ""} ${_ ? n.overlineTitle : n.noOverlineTitle}`,
|
|
97
|
-
onClick: (
|
|
98
|
+
onClick: (Q, z) => w?.(z),
|
|
98
99
|
tag: d || v ? void 0 : l ?? "a",
|
|
99
100
|
to: d || v ? void 0 : e,
|
|
100
101
|
disabled: d
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
|
-
},
|
|
104
|
+
}, M = (t) => typeof t == "string" && t in E ? /* @__PURE__ */ r(k, { icon: t }) : t;
|
|
104
105
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
te as a,
|
|
107
|
+
ee as g,
|
|
107
108
|
y as m,
|
|
108
109
|
n as s
|
|
109
110
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._elevation_5dfyt_1{background-color:var(--lmnt-theme-primary-50)}
|
|
@@ -15,9 +15,14 @@ type ContextMenuProps = {
|
|
|
15
15
|
* Default is 'vertical'
|
|
16
16
|
*/
|
|
17
17
|
iconOrientation?: 'vertical' | 'horizontal';
|
|
18
|
+
/**
|
|
19
|
+
* data-testid for testing
|
|
20
|
+
*/
|
|
21
|
+
'data-testid'?: string;
|
|
18
22
|
};
|
|
19
23
|
export type ActionProps = ListItemProps & {
|
|
20
24
|
closeOnClick?: boolean;
|
|
25
|
+
'data-testid'?: string;
|
|
21
26
|
};
|
|
22
27
|
/**
|
|
23
28
|
*
|
|
@@ -32,5 +37,5 @@ export type ActionProps = ListItemProps & {
|
|
|
32
37
|
* ];
|
|
33
38
|
* @returns a context menu with the given actions as ListItems
|
|
34
39
|
*/
|
|
35
|
-
export declare const ContextMenu: ({ triggerOpen, actions, iconOrientation, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare const ContextMenu: ({ triggerOpen, actions, iconOrientation, "data-testid": dataTestId, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
41
|
export {};
|
|
@@ -1,60 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { I as
|
|
3
|
-
import { M as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { I as d } from "../../index.es-0lQcz8m1.js";
|
|
3
|
+
import { M as f, L as _, a as I } from "../../index.es-fnFnw2P1.js";
|
|
4
|
+
import { useState as p, useCallback as a, useEffect as v } from "react";
|
|
5
5
|
import { u as C } from "../../uniqueId-NU3-C36A.js";
|
|
6
|
-
import '../../assets/ContextMenu.css';const k = "_menu_ol91v_1", y = "_icon_ol91v_5", M = "_listItem_ol91v_9",
|
|
6
|
+
import '../../assets/ContextMenu.css';const k = "_menu_ol91v_1", y = "_icon_ol91v_5", M = "_listItem_ol91v_9", i = {
|
|
7
7
|
menu: k,
|
|
8
8
|
icon: y,
|
|
9
9
|
listItem: M
|
|
10
|
-
},
|
|
11
|
-
triggerOpen:
|
|
10
|
+
}, T = ({
|
|
11
|
+
triggerOpen: n = null,
|
|
12
12
|
actions: c,
|
|
13
|
-
iconOrientation: m = "vertical"
|
|
13
|
+
iconOrientation: m = "vertical",
|
|
14
|
+
"data-testid": r
|
|
14
15
|
}) => {
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
}, [
|
|
18
|
-
|
|
16
|
+
const [t, s] = p(!1), u = a(() => {
|
|
17
|
+
s(!t);
|
|
18
|
+
}, [t]), l = a(() => {
|
|
19
|
+
s(!1);
|
|
19
20
|
}, []);
|
|
20
21
|
return v(() => {
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
|
|
22
|
+
s(n !== null ? n : !1);
|
|
23
|
+
}, [n]), /* @__PURE__ */ o(
|
|
24
|
+
f,
|
|
24
25
|
{
|
|
25
|
-
className:
|
|
26
|
-
"data-testid": "selection-menu",
|
|
27
|
-
open:
|
|
26
|
+
className: i.menu,
|
|
27
|
+
"data-testid": r ?? "selection-menu",
|
|
28
|
+
open: t,
|
|
28
29
|
surfaceOnly: !0,
|
|
29
30
|
hoistToBody: !0,
|
|
30
|
-
onClose:
|
|
31
|
-
trigger: /* @__PURE__ */
|
|
32
|
-
|
|
31
|
+
onClose: l,
|
|
32
|
+
trigger: /* @__PURE__ */ o(
|
|
33
|
+
d,
|
|
33
34
|
{
|
|
34
|
-
className:
|
|
35
|
-
variant:
|
|
35
|
+
className: i.icon,
|
|
36
|
+
variant: t ? "filled-primary" : void 0,
|
|
36
37
|
"data-testid": "open-button",
|
|
37
38
|
icon: m === "vertical" ? "more_vert" : "more_horiz",
|
|
38
|
-
onClick:
|
|
39
|
+
onClick: u
|
|
39
40
|
}
|
|
40
41
|
),
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
|
|
42
|
+
children: /* @__PURE__ */ o(_, { "data-testid": "selection-list", children: c.map((e) => /* @__PURE__ */ o(
|
|
43
|
+
I,
|
|
43
44
|
{
|
|
44
|
-
className:
|
|
45
|
-
...
|
|
45
|
+
className: i.listItem,
|
|
46
|
+
...e,
|
|
46
47
|
leadingBlockType: "icon",
|
|
47
|
-
"data-testid":
|
|
48
|
+
"data-testid": e["data-testid"],
|
|
48
49
|
onClick: () => {
|
|
49
|
-
|
|
50
|
+
e?.onClick?.(), e.closeOnClick !== !1 && l();
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
|
-
C(`LI_${
|
|
53
|
+
C(`LI_${e.primaryText?.toString()}_`)
|
|
53
54
|
)) })
|
|
54
55
|
},
|
|
55
56
|
"selectionmenu"
|
|
56
57
|
);
|
|
57
58
|
};
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
T as ContextMenu
|
|
60
61
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { a as B, s as t, f as o, w as s } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { ContextMenu as p } from "./ContextMenu.js";
|
|
4
|
-
import { a as
|
|
5
|
-
const C =
|
|
6
|
-
{ primaryText: "Open", onClick: C, leadingBlock: "add" },
|
|
7
|
-
{ primaryText: "Delete", onClick: i, leadingBlock: "delete_outline" },
|
|
8
|
-
{ primaryText: "Edit", onClick: a, leadingBlock: "edit" }
|
|
4
|
+
import { a as d, d as k, t as T, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
|
+
const C = d.fn(), a = d.fn(), i = d.fn(), g = [
|
|
6
|
+
{ primaryText: "Open", onClick: C, leadingBlock: "add", "data-testid": "open-testid" },
|
|
7
|
+
{ primaryText: "Delete", onClick: i, leadingBlock: "delete_outline", "data-testid": "delete-testid" },
|
|
8
|
+
{ primaryText: "Edit", onClick: a, leadingBlock: "edit", "data-testid": "edit-testid" }
|
|
9
9
|
];
|
|
10
10
|
k("ContextMenu Test", () => {
|
|
11
11
|
T("render contextMenu and close it", () => {
|
|
@@ -16,7 +16,7 @@ k("ContextMenu Test", () => {
|
|
|
16
16
|
B(/* @__PURE__ */ r(p, { actions: g, triggerOpen: !0 }));
|
|
17
17
|
const c = t.getByTestId("open-button"), n = t.getByTestId("selection-menu");
|
|
18
18
|
e(n).toBeInTheDocument(), e(n).not.toHaveClass("mdc-menu-surface--open"), o.click(c), await s(() => e(n).toHaveClass("mdc-menu-surface--animating-open")), e(t.getByText("Open")).toBeInTheDocument(), e(t.getByText("Delete")).toBeInTheDocument(), e(t.getByText("Edit")).toBeInTheDocument();
|
|
19
|
-
const
|
|
20
|
-
e(
|
|
19
|
+
const l = t.getByTestId("open-testid"), m = t.getByTestId("delete-testid"), u = t.getByTestId("edit-testid");
|
|
20
|
+
e(l).toBeInTheDocument(), e(m).toBeInTheDocument(), e(u).toBeInTheDocument(), o.click(l), e(C).toHaveBeenCalled(), e(i).not.toHaveBeenCalled(), e(a).not.toHaveBeenCalled(), o.click(m), e(i).toHaveBeenCalled(), o.click(u), e(a).toHaveBeenCalled();
|
|
21
21
|
});
|
|
22
22
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../../index.es-6TJ1S8Jr.js";
|
|
3
|
-
import
|
|
3
|
+
import "../../../index.es-Dvj_qpAp.js";
|
|
4
4
|
import "../../../index.es-D54RuMc_.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "../../OverflowTooltip/OverflowTooltip.js";
|
|
7
|
+
import { G } from "../../../GenericCard-BFYKwkzI.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
G as GenericCard
|
|
9
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { a as c, s as o } from "../../../react.esm-CX1WJ2Pp.js";
|
|
3
|
-
import { G as i } from "../../../GenericCard-
|
|
3
|
+
import { G as i } from "../../../GenericCard-BFYKwkzI.js";
|
|
4
4
|
import { d as m, t as s, g as e } from "../../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
m("GenericCard", () => {
|
|
6
6
|
const d = {
|
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { G as c } from "../../../index.es-DntoATwO.js";
|
|
3
3
|
import { P as l } from "../../../index.es-D-CKRzIB.js";
|
|
4
4
|
import { a as o } from "../../../index.es-D54RuMc_.js";
|
|
5
|
-
import { s as i, G as m } from "../../../GenericCard-
|
|
5
|
+
import { s as i, G as m } from "../../../GenericCard-BFYKwkzI.js";
|
|
6
6
|
const u = ({
|
|
7
7
|
columns: n,
|
|
8
8
|
data: e,
|
|
@@ -42,6 +42,10 @@ type ListAreaProps = {
|
|
|
42
42
|
* noElementsView is the view to be displayed when the list is empty
|
|
43
43
|
*/
|
|
44
44
|
noElementsView?: JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* data-testid for testing
|
|
47
|
+
*/
|
|
48
|
+
'data-testid'?: string;
|
|
45
49
|
/**
|
|
46
50
|
* routerLinkElement is the element to be used for the elements link, use react-router Link component for the best experience.
|
|
47
51
|
* If the element has `noNavigation=false` and the `routerLinkElement` is undefined an `<a>` tag is used.
|
|
@@ -54,5 +58,5 @@ type ListAreaProps = {
|
|
|
54
58
|
* list elements act as router links to the corresponding route.
|
|
55
59
|
* The list will be displayed in the desktop view or when no detail view is selected (in mobile view).
|
|
56
60
|
*/
|
|
57
|
-
export declare const ListArea: ({ elements, pathname, isGrouped, hasSearch, searchPlaceholder, isIntegrated, isSorted, itemClassName, maxHeight, noElementsView, routerLinkElement, }: ListAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare const ListArea: ({ elements, pathname, isGrouped, hasSearch, searchPlaceholder, isIntegrated, isSorted, itemClassName, maxHeight, noElementsView, "data-testid": dataTestId, routerLinkElement, }: ListAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
62
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as s, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { D as u } from "../../index.es-BWgXLqXn.js";
|
|
3
|
-
import { E as
|
|
4
|
-
import { L as
|
|
3
|
+
import { E as C } from "../../index.es-h2lMdt7G.js";
|
|
4
|
+
import { L as b } from "../../index.es-fnFnw2P1.js";
|
|
5
5
|
import { o as p } from "../../orderBy-Bd48bw88.js";
|
|
6
|
-
import { useState as
|
|
7
|
-
import { SearchBar as
|
|
8
|
-
import { g as
|
|
9
|
-
const
|
|
6
|
+
import { useState as B, useMemo as v } from "react";
|
|
7
|
+
import { SearchBar as D } from "../SearchBar/SearchBar.js";
|
|
8
|
+
import { g as j, a as E, s as e } from "../../ListAreaService-BVtuBN0K.js";
|
|
9
|
+
const z = ({
|
|
10
10
|
elements: r,
|
|
11
11
|
pathname: o,
|
|
12
12
|
isGrouped: i = !1,
|
|
@@ -17,31 +17,32 @@ const q = ({
|
|
|
17
17
|
itemClassName: c = "",
|
|
18
18
|
maxHeight: T = "100%",
|
|
19
19
|
noElementsView: $,
|
|
20
|
+
"data-testid": g,
|
|
20
21
|
routerLinkElement: d
|
|
21
22
|
}) => {
|
|
22
|
-
const [
|
|
23
|
-
if (!
|
|
24
|
-
const n = r.filter((f) => f.title.toLowerCase().includes(
|
|
23
|
+
const [t, x] = B(""), a = v(() => {
|
|
24
|
+
if (!t) return l ? p(r, "title") : r;
|
|
25
|
+
const n = r.filter((f) => f.title.toLowerCase().includes(t.toLowerCase()) || f.subTitle?.toLowerCase().includes(t.toLowerCase()) || f.overlineTitle?.toLowerCase().includes(t.toLowerCase()));
|
|
25
26
|
return l ? p(n, "title") : n;
|
|
26
|
-
}, [
|
|
27
|
-
() => i ?
|
|
27
|
+
}, [t, r, l]), y = v(
|
|
28
|
+
() => i ? j(a, o, c, d) : E(a, o, c, d),
|
|
28
29
|
[a, o, c, i, d]
|
|
29
30
|
);
|
|
30
31
|
return /* @__PURE__ */ s(
|
|
31
|
-
|
|
32
|
+
C,
|
|
32
33
|
{
|
|
33
34
|
"data-testid": "elevation",
|
|
34
35
|
elevation: m ? 0 : 1,
|
|
35
|
-
className: `${
|
|
36
|
-
children: /* @__PURE__ */ h("div", { className:
|
|
36
|
+
className: `${e.mainElevation}`,
|
|
37
|
+
children: /* @__PURE__ */ h("div", { className: e.fullWidth, children: [
|
|
37
38
|
L && r.length > 0 && /* @__PURE__ */ h("span", { "data-testid": "search-bar-container", children: [
|
|
38
39
|
m && /* @__PURE__ */ s(u, {}),
|
|
39
40
|
/* @__PURE__ */ s(
|
|
40
|
-
|
|
41
|
+
D,
|
|
41
42
|
{
|
|
42
|
-
searchTerm:
|
|
43
|
-
setSearchTerm:
|
|
44
|
-
className:
|
|
43
|
+
searchTerm: t,
|
|
44
|
+
setSearchTerm: x,
|
|
45
|
+
className: e.searchbar,
|
|
45
46
|
placeholder: w
|
|
46
47
|
}
|
|
47
48
|
),
|
|
@@ -49,11 +50,11 @@ const q = ({
|
|
|
49
50
|
] }),
|
|
50
51
|
a.length === 0 && $,
|
|
51
52
|
/* @__PURE__ */ s(
|
|
52
|
-
|
|
53
|
+
b,
|
|
53
54
|
{
|
|
54
|
-
"data-testid":
|
|
55
|
-
items:
|
|
56
|
-
className: `${
|
|
55
|
+
"data-testid": g,
|
|
56
|
+
items: y,
|
|
57
|
+
className: `${e.list} ${e.primaryText} ${i ? "" : e.roundedBottom}`,
|
|
57
58
|
style: { maxHeight: T },
|
|
58
59
|
showDivider: !1
|
|
59
60
|
}
|
|
@@ -63,5 +64,5 @@ const q = ({
|
|
|
63
64
|
);
|
|
64
65
|
};
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
+
z as ListArea
|
|
67
68
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as r, Fragment as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as p } from "../../index.es-D54RuMc_.js";
|
|
3
3
|
import { a as s, s as a, f as u } from "../../react.esm-CX1WJ2Pp.js";
|
|
4
4
|
import { ListArea as c } from "./ListArea.js";
|
|
5
|
-
import { g as h } from "../../ListAreaService-
|
|
5
|
+
import { g as h } from "../../ListAreaService-BVtuBN0K.js";
|
|
6
6
|
import { d as m, t as n, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
7
7
|
m("ListArea Test", () => {
|
|
8
8
|
const o = [
|
|
@@ -4,7 +4,7 @@ import "../../index.es-3043KTnb.js";
|
|
|
4
4
|
import "../../index.es-D54RuMc_.js";
|
|
5
5
|
import "../Iconify/Iconify.js";
|
|
6
6
|
import "../../enums/AvailableCustomIcons.js";
|
|
7
|
-
import { g as a, a as g, m as d } from "../../ListAreaService-
|
|
7
|
+
import { g as a, a as g, m as d } from "../../ListAreaService-BVtuBN0K.js";
|
|
8
8
|
export {
|
|
9
9
|
a as getGroupedItems,
|
|
10
10
|
g as getListedItems,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ButtonProps } from '@element-public/react-button';
|
|
2
|
+
|
|
3
|
+
type OnboardingBannerProps = {
|
|
4
|
+
headline: string;
|
|
5
|
+
description: string;
|
|
6
|
+
mediaContent?: React.ReactNode;
|
|
7
|
+
isVisible: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
buttons?: (ButtonProps & {
|
|
10
|
+
id: string;
|
|
11
|
+
})[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A responsive onboarding banner that displays a headline, description, optional media content,
|
|
15
|
+
* and, if provided, one or more action buttons.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* On desktop, the mediaContent is shown to the right of the description;
|
|
19
|
+
* on mobile, it appears above the description.
|
|
20
|
+
*
|
|
21
|
+
* @param headline - The headline of the Onboarding Banner
|
|
22
|
+
* @param description - The description of the Onboarding Banner
|
|
23
|
+
* @param mediaContent - Optional React node (e.g. video or image) shown on the side
|
|
24
|
+
* @param isVisible - Whether the banner should be rendered
|
|
25
|
+
* @param onClose - Fired when the close icon is clicked
|
|
26
|
+
* @param buttons - An array of ButtonProps to render as action buttons below the description.
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
export declare const OnboardingBanner: ({ headline, description, mediaContent, isVisible, onClose, buttons, }: OnboardingBannerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
+
export {};
|