@hortiview/shared-components 2.18.1 → 2.19.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 +15 -0
- package/dist/ListAreaService-Y8wR14Xq.js +126 -0
- package/dist/assets/ListAreaService.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/components/AllowedButton/AllowedButton.d.ts +1 -1
- package/dist/components/AllowedIconButton/AllowedIconButton.d.ts +1 -1
- package/dist/components/EmptyView/EmptyView.d.ts +10 -1
- package/dist/components/EmptyView/EmptyView.js +50 -34
- package/dist/components/GenericTable/GenericTableService.d.ts +4 -1
- package/dist/components/GenericTable/GenericTableService.js +24 -24
- package/dist/components/ListArea/ListArea.d.ts +5 -1
- package/dist/components/ListArea/ListArea.js +39 -36
- package/dist/components/ListArea/ListAreaService.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +36 -34
- package/dist/types/GenericTable.d.ts +3 -3
- package/package.json +1 -1
- package/dist/ListAreaService-DfxJ7jFs.js +0 -125
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [2.19.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.18.1...v2.19.0) (2026-03-18)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* add loading state and custom spinner support to EmptyView component ([0bf67d8](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/0bf67d8b4c209a8a7248c68235faa20d9c9d6413))
|
|
6
|
+
* add non-interactive prop to ListArea component and update styles ([7d93cca](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/7d93cca72e59498b38f0f3b1b9512e463b5deb86))
|
|
7
|
+
* add permission handling to row actions ([8d9a9b8](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/8d9a9b88b36ca94c885cbcb543ba4d6c44d50b2d))
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* allowedIconButtonProps to allow the usage of htmlButtonElement props like "type" ([3ff7b1e](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/3ff7b1e2c2ec685c36758069f6030e06c4d0348b))
|
|
12
|
+
* update AllowedButtonProps to include HTML button element props ([0e019e5](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/0e019e5ea019f860d6f667a9d0a3d9f12e9b5d8f))
|
|
13
|
+
* update data handling in GenericTable and GenericTableService components ([0bdb591](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/0bdb5911564efecc8f7861ec6206bdbf0faaf40b))
|
|
14
|
+
* update LoadingSpinner component with new props and styles for centering ([1cde6e4](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/1cde6e4a1e259f37ee37b867e35d6eac649fe56c))
|
|
15
|
+
|
|
1
16
|
## [2.18.1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.18.0...v2.18.1) (2026-03-10)
|
|
2
17
|
|
|
3
18
|
### Bug Fixes
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { jsx as r, jsxs as G } from "react/jsx-runtime";
|
|
2
|
+
import { G as S } from "./index.es-Z0aF-7Cn.js";
|
|
3
|
+
import { I as O } from "./index.es-DEBGoIKX.js";
|
|
4
|
+
import { P as k } from "./index.es-DgncYOqO.js";
|
|
5
|
+
import { e as $, c as w, T as A } from "./index.es-DUrjyxNI.js";
|
|
6
|
+
import { c as j } from "./index-Df2FYN-K.js";
|
|
7
|
+
import { Iconify as H } from "./components/Iconify/Iconify.js";
|
|
8
|
+
import { AvailableCustomIcons as M } from "./enums/AvailableCustomIcons.js";
|
|
9
|
+
import './assets/ListAreaService.css';const P = "_fullWidth_a185b_1", R = "_mainElevation_a185b_6", W = "_searchbar_a185b_13", L = "_roundedBottom_a185b_21", q = "_primaryText_a185b_26", z = "_list_a185b_30", D = "_listItem_a185b_41", F = "_isSelected_a185b_65", J = "_noGroupHeaderMargin_a185b_74", K = "_indentGroupedElement_a185b_78", Q = "_isNotSelected_a185b_82", U = "_iconColor_a185b_92", V = "_overlineTitle_a185b_96", X = "_noOverlineTitle_a185b_101", Y = "_truncate_a185b_105", Z = "_truncateOverlineText_a185b_116", ee = "_hasNoRoundedEdges_a185b_121", te = "_hideArrowIcon_a185b_125", t = {
|
|
10
|
+
fullWidth: P,
|
|
11
|
+
mainElevation: R,
|
|
12
|
+
searchbar: W,
|
|
13
|
+
roundedBottom: L,
|
|
14
|
+
primaryText: q,
|
|
15
|
+
list: z,
|
|
16
|
+
listItem: D,
|
|
17
|
+
isSelected: F,
|
|
18
|
+
noGroupHeaderMargin: J,
|
|
19
|
+
indentGroupedElement: K,
|
|
20
|
+
isNotSelected: Q,
|
|
21
|
+
iconColor: U,
|
|
22
|
+
overlineTitle: V,
|
|
23
|
+
noOverlineTitle: X,
|
|
24
|
+
truncate: Y,
|
|
25
|
+
truncateOverlineText: Z,
|
|
26
|
+
hasNoRoundedEdges: ee,
|
|
27
|
+
hideArrowIcon: te
|
|
28
|
+
}, _e = (o, a, s, l) => {
|
|
29
|
+
const n = o.reduce((i, c) => {
|
|
30
|
+
const { groupName: e, groupComponent: _, ...d } = c;
|
|
31
|
+
return !e || typeof e != "string" || (i[e] || (i[e] = {
|
|
32
|
+
groupName: _ ?? /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r($, { children: e }) }),
|
|
33
|
+
id: e,
|
|
34
|
+
items: []
|
|
35
|
+
}), i[e].items = [
|
|
36
|
+
...i[e].items,
|
|
37
|
+
b(d, a, s, l)
|
|
38
|
+
]), i;
|
|
39
|
+
}, {});
|
|
40
|
+
return Object.values(n);
|
|
41
|
+
}, ue = (o, a, s, l) => o.map((n) => b(n, a, s, l)), b = (o, a, s, l) => {
|
|
42
|
+
const {
|
|
43
|
+
id: n,
|
|
44
|
+
title: i,
|
|
45
|
+
subTitle: c,
|
|
46
|
+
route: e,
|
|
47
|
+
value: _,
|
|
48
|
+
noNavigation: d,
|
|
49
|
+
disabled: u,
|
|
50
|
+
icon: g,
|
|
51
|
+
iconType: v,
|
|
52
|
+
trailingIcon: h,
|
|
53
|
+
trailingIconType: y,
|
|
54
|
+
actionButton: f,
|
|
55
|
+
onClick: I,
|
|
56
|
+
customTitle: T,
|
|
57
|
+
listItemClassName: N,
|
|
58
|
+
overlineTitle: p,
|
|
59
|
+
"data-testid": x,
|
|
60
|
+
indentElement: E
|
|
61
|
+
} = o, m = a === e, C = j(
|
|
62
|
+
v !== "avatar" && t.listItem,
|
|
63
|
+
s,
|
|
64
|
+
N,
|
|
65
|
+
p ? t.overlineTitle : t.noOverlineTitle,
|
|
66
|
+
E && t.indentGroupedElement,
|
|
67
|
+
m ? t.isSelected : t.isNotSelected
|
|
68
|
+
);
|
|
69
|
+
return {
|
|
70
|
+
id: n,
|
|
71
|
+
key: n,
|
|
72
|
+
select: m,
|
|
73
|
+
primaryText: n,
|
|
74
|
+
secondaryText: /* @__PURE__ */ G(S, { direction: "vertical", gap: "none", children: [
|
|
75
|
+
T ?? /* @__PURE__ */ r(
|
|
76
|
+
w,
|
|
77
|
+
{
|
|
78
|
+
"data-testid": "title",
|
|
79
|
+
level: 1,
|
|
80
|
+
themeColor: m ? "primary" : void 0,
|
|
81
|
+
className: `${t.truncate} lmnt-theme-on-surface-active`,
|
|
82
|
+
children: i
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
c && !T ? /* @__PURE__ */ r(
|
|
86
|
+
A,
|
|
87
|
+
{
|
|
88
|
+
"data-testid": "subtitle",
|
|
89
|
+
level: 2,
|
|
90
|
+
themeColor: m ? "primary" : void 0,
|
|
91
|
+
className: `${t.truncate} lmnt-theme-on-surface-inactive`,
|
|
92
|
+
children: c
|
|
93
|
+
}
|
|
94
|
+
) : void 0
|
|
95
|
+
] }),
|
|
96
|
+
overlineText: p ? /* @__PURE__ */ r(
|
|
97
|
+
"span",
|
|
98
|
+
{
|
|
99
|
+
"data-testid": "overline-title",
|
|
100
|
+
className: `${t.truncate} ${t.truncateOverlineText}`,
|
|
101
|
+
children: p
|
|
102
|
+
}
|
|
103
|
+
) : void 0,
|
|
104
|
+
trailingBlock: f ?? h ?? /* @__PURE__ */ r(O, { icon: "arrow_right", className: t.iconColor }),
|
|
105
|
+
leadingBlock: oe(g),
|
|
106
|
+
value: _,
|
|
107
|
+
componentProps: {
|
|
108
|
+
id: n,
|
|
109
|
+
"data-testid": `${x ?? i}-list-item`,
|
|
110
|
+
key: n,
|
|
111
|
+
leadingBlockType: v ?? "icon",
|
|
112
|
+
trailingBlockType: y ?? "icon",
|
|
113
|
+
className: C,
|
|
114
|
+
onClick: (ne, B) => I?.(B),
|
|
115
|
+
tag: u || d ? void 0 : l ?? "a",
|
|
116
|
+
to: u || d ? void 0 : e,
|
|
117
|
+
disabled: u
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}, oe = (o) => typeof o == "string" && o in M ? /* @__PURE__ */ r(H, { icon: o }) : o;
|
|
121
|
+
export {
|
|
122
|
+
ue as a,
|
|
123
|
+
_e as g,
|
|
124
|
+
b as m,
|
|
125
|
+
t as s
|
|
126
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._fullWidth_a185b_1{width:100%;height:100%}._mainElevation_a185b_6{background:var(--lmnt-theme-background);width:100%;height:100%}._searchbar_a185b_13 div{border:none}._searchbar_a185b_13 button{margin-right:.5rem}._roundedBottom_a185b_21{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}._primaryText_a185b_26 [class*=mdc-list-item__primary-text]{display:none!important}._list_a185b_30{padding-top:0;padding-bottom:0;overflow-y:auto;scrollbar-width:thin}._list_a185b_30 [class*=mdc-list-item__overline-text]{margin-bottom:-2.25rem}._listItem_a185b_41:hover{background-color:var(--lmnt-theme-surface-variant)}._listItem_a185b_41 i:not(._trailingIcon_a185b_45){color:var(--lmnt-theme-on-surface-inactive)}._listItem_a185b_41 [class^="lmnt mdc-list-item__end"] i{color:var(--lmnt-theme-on-surface-disabled)}._listItem_a185b_41:focus-within [class^="lmnt mdc-list-item__end"] i{color:var(--lmnt-theme-primary)!important}._listItem_a185b_41 [class^=mdc-list-item__start]{margin:0 1rem!important;align-self:center!important}._listItem_a185b_41:focus [class^=mdc-list-item__start] i{color:var(--lmnt-theme-primary)!important}._listItem_a185b_41._isSelected_a185b_65 i,._listItem_a185b_41[aria-selected=true] i{color:var(--lmnt-theme-primary)!important}._groupedListItem_a185b_70{height:4.5rem!important}._noGroupHeaderMargin_a185b_74 h3{margin:0}._indentGroupedElement_a185b_78{padding-left:2.5rem!important}._isNotSelected_a185b_82 [class*=mdc-list-item__ripple]:before{opacity:inherit!important;background-color:inherit!important}._isSelected_a185b_65 [class*=mdc-list-item__ripple]:before{opacity:.2!important;background-color:var(--lmnt-theme-primary)!important}._iconColor_a185b_92{color:var(--lmnt-theme-on-surface-disabled)!important}._overlineTitle_a185b_96 [class*=mdc-list-item__overline-text]{color:var(--lmnt-theme-on-surface-inactive)!important;line-height:1rem!important}._noOverlineTitle_a185b_101 [class*=mdc-list-item__secondary-text] [class*=lmnt-group]{margin-top:-.875rem}._truncate_a185b_105{display:-webkit-box!important;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%;word-break:break-all}._truncateOverlineText_a185b_116{margin-bottom:-1rem!important;margin-top:-1rem!important}._hasNoRoundedEdges_a185b_121{border-radius:0rem!important}._hideArrowIcon_a185b_125 i{visibility:hidden}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._centered_1aq9c_1{width:100%;height:100%;display:grid;place-items:center}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from '@element-public/react-button';
|
|
2
2
|
import { IsAllowedProps } from '../PermissionChecks/PermissionService';
|
|
3
3
|
|
|
4
|
-
export type AllowedButtonProps = Omit<ButtonProps
|
|
4
|
+
export type AllowedButtonProps = Omit<ButtonProps & React.HTMLProps<HTMLButtonElement>, 'buttonSize' | 'variant' | 'type' | 'label' | 'size'> & {
|
|
5
5
|
/**
|
|
6
6
|
* This applies the html button type (button, submit, reset) or the anchor media type when used with the href property.
|
|
7
7
|
* Default: 'button'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconButtonProps } from '@element-public/react-icon-button';
|
|
2
2
|
import { IsAllowedProps } from '../PermissionChecks/PermissionService';
|
|
3
3
|
|
|
4
|
-
export type AllowedIconButtonProps = Omit<IconButtonProps
|
|
4
|
+
export type AllowedIconButtonProps = Omit<IconButtonProps & React.HTMLProps<HTMLButtonElement>, 'variant' | 'iconType' | 'iconSize' | 'size'> & {
|
|
5
5
|
/**
|
|
6
6
|
* data-testid used for testing.
|
|
7
7
|
*/
|
|
@@ -33,6 +33,15 @@ type EmptyViewProps = {
|
|
|
33
33
|
* The className of EmptyView
|
|
34
34
|
*/
|
|
35
35
|
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* If true a loading spinner is shown instead of the empty view, default is false
|
|
38
|
+
*/
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The spinner to be shown when isLoading is true,
|
|
42
|
+
* default is the LoadingSpinner component with spinnerOnly=true and size='sm'
|
|
43
|
+
*/
|
|
44
|
+
loadingSpinner?: ReactNode;
|
|
36
45
|
};
|
|
37
|
-
export declare const EmptyView: ({ title, subtitle, height, icon, iconSize, action, className, }: EmptyViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare const EmptyView: ({ title, subtitle, height, icon, iconSize, action, className, isLoading, loadingSpinner, }: EmptyViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
47
|
export {};
|
|
@@ -1,45 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { G as
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsx as t, jsxs as d, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { G as y } from "../../index.es-Z0aF-7Cn.js";
|
|
3
|
+
import { a as l } from "../../index.es-DUrjyxNI.js";
|
|
4
|
+
import { c as _ } from "../../index-Df2FYN-K.js";
|
|
5
|
+
import { Iconify as f } from "../Iconify/Iconify.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "../../react-tooltip.min-Dkz5ltCC.js";
|
|
8
|
+
import "../../orderBy-Ce85KqD6.js";
|
|
9
|
+
import "../../index-CuHybtft.js";
|
|
10
|
+
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
11
|
+
import "../../uniqueId-CJo-XRQb.js";
|
|
12
|
+
import { LoadingSpinner as w } from "../LoadingSpinner/Default/LoadingSpinner.js";
|
|
13
|
+
import "react-hook-form";
|
|
14
|
+
import "../../get-CBFiuc3f.js";
|
|
15
|
+
import "../../isArray-olhCpv2e.js";
|
|
16
|
+
import "../../isString-BNdV0Jpg.js";
|
|
17
|
+
import "../../omit-BWQrFyQ-.js";
|
|
18
|
+
import "../../types/Time.js";
|
|
19
|
+
import "../../react.esm-DF7i80eN.js";
|
|
20
|
+
import '../../assets/EmptyView.css';const C = "_emptyViewContainer_19inl_1", V = "_full_19inl_7", x = "_medium_19inl_11", N = "_small_19inl_15", g = "_title_19inl_20", i = {
|
|
21
|
+
emptyViewContainer: C,
|
|
22
|
+
full: V,
|
|
23
|
+
medium: x,
|
|
24
|
+
small: N,
|
|
25
|
+
title: g
|
|
26
|
+
}, H = ({
|
|
27
|
+
title: e,
|
|
28
|
+
subtitle: r,
|
|
29
|
+
height: m = "medium",
|
|
30
|
+
icon: o,
|
|
31
|
+
iconSize: n = "medium",
|
|
32
|
+
action: p,
|
|
33
|
+
className: s,
|
|
34
|
+
isLoading: a = !1,
|
|
35
|
+
loadingSpinner: c
|
|
36
|
+
}) => /* @__PURE__ */ t(
|
|
37
|
+
y,
|
|
22
38
|
{
|
|
23
39
|
fullWidth: !0,
|
|
24
40
|
direction: "vertical",
|
|
25
41
|
secondaryAlign: "center",
|
|
26
42
|
primaryAlign: "center",
|
|
27
43
|
"data-testid": "empty-view-container",
|
|
28
|
-
className:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
className: _(
|
|
45
|
+
s,
|
|
46
|
+
i.emptyViewContainer,
|
|
47
|
+
m === "full" && i.full,
|
|
48
|
+
m === "medium" && i.medium,
|
|
49
|
+
m === "small" && i.small
|
|
34
50
|
),
|
|
35
|
-
children: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
]
|
|
51
|
+
children: a ? c ?? /* @__PURE__ */ t(w, { spinnerOnly: !0, size: "sm" }) : /* @__PURE__ */ d(u, { children: [
|
|
52
|
+
o && /* @__PURE__ */ t(f, { icon: o, iconSize: n }),
|
|
53
|
+
e && /* @__PURE__ */ t(l, { type: "body1", className: i.title, children: e }),
|
|
54
|
+
r && /* @__PURE__ */ t(l, { type: "body1", className: i.title, children: r }),
|
|
55
|
+
p
|
|
56
|
+
] })
|
|
41
57
|
}
|
|
42
58
|
);
|
|
43
59
|
export {
|
|
44
|
-
|
|
60
|
+
H as EmptyView
|
|
45
61
|
};
|
|
@@ -15,6 +15,9 @@ export declare const useGenerateColumns: <T>({ data, order, cellTemplates, heade
|
|
|
15
15
|
* Adds row actions to the data for the table
|
|
16
16
|
* @param data data to be used to generate the columns
|
|
17
17
|
* @param getRowActions function that will be called to get the actions for a row to be displayed as actions in a context menu
|
|
18
|
+
*
|
|
19
|
+
* Note:
|
|
20
|
+
* If rowActions is undefined (e.g. missing permissions) the row item is returned without a contextMenu
|
|
18
21
|
* @returns
|
|
19
22
|
*/
|
|
20
|
-
export declare const useGenerateTableData: <T>({ data, getRowActions, }: TableLayoutProps<T>) =>
|
|
23
|
+
export declare const useGenerateTableData: <T>({ data, getRowActions, }: TableLayoutProps<T>) => T[];
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as d } from "react";
|
|
3
3
|
import { ContextMenu as l } from "../ContextMenu/ContextMenu.js";
|
|
4
4
|
const P = ({
|
|
5
|
-
data:
|
|
5
|
+
data: n = [],
|
|
6
6
|
order: e = [],
|
|
7
|
-
cellTemplates:
|
|
8
|
-
headerTranslation: t = (
|
|
7
|
+
cellTemplates: r = void 0,
|
|
8
|
+
headerTranslation: t = (f) => f,
|
|
9
9
|
getRowActions: c = void 0,
|
|
10
10
|
customColumnWidth: o,
|
|
11
11
|
cardTitleColumn: u,
|
|
12
12
|
cardSubTitleColumn: s
|
|
13
|
-
}) =>
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
const
|
|
13
|
+
}) => d(() => {
|
|
14
|
+
if (n?.length === 0) return [];
|
|
15
|
+
const f = v(n[0], e).map((i) => {
|
|
16
|
+
const a = o ? o[i] : void 0;
|
|
17
17
|
return {
|
|
18
18
|
id: i,
|
|
19
19
|
header: t(i),
|
|
20
20
|
accessor: i,
|
|
21
|
-
cellTemplate:
|
|
22
|
-
cellProps:
|
|
23
|
-
headerCellProps:
|
|
21
|
+
cellTemplate: r ? r[i] : void 0,
|
|
22
|
+
cellProps: a ? { width: a } : void 0,
|
|
23
|
+
headerCellProps: a ? { width: a } : void 0,
|
|
24
24
|
asCardTitle: i === u,
|
|
25
25
|
asCardSubtitle: i === s
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
28
|
return c ? [
|
|
29
|
-
...
|
|
29
|
+
...f,
|
|
30
30
|
{
|
|
31
31
|
id: "actions",
|
|
32
32
|
header: " ",
|
|
@@ -34,10 +34,10 @@ const P = ({
|
|
|
34
34
|
cellProps: { id: "actions" },
|
|
35
35
|
headerCellProps: { id: "actions" }
|
|
36
36
|
}
|
|
37
|
-
] :
|
|
37
|
+
] : f;
|
|
38
38
|
}, [
|
|
39
|
-
r,
|
|
40
39
|
n,
|
|
40
|
+
r,
|
|
41
41
|
e,
|
|
42
42
|
t,
|
|
43
43
|
c,
|
|
@@ -45,18 +45,18 @@ const P = ({
|
|
|
45
45
|
u,
|
|
46
46
|
s
|
|
47
47
|
]), C = ({
|
|
48
|
-
data:
|
|
48
|
+
data: n = [],
|
|
49
49
|
getRowActions: e = void 0
|
|
50
|
-
}) =>
|
|
51
|
-
const t =
|
|
52
|
-
return { ...
|
|
53
|
-
}) :
|
|
54
|
-
if (!
|
|
55
|
-
let
|
|
56
|
-
return e?.length > 0 && (
|
|
50
|
+
}) => d(() => e ? n.map((r) => {
|
|
51
|
+
const t = e(r);
|
|
52
|
+
return !t || t.length === 0 ? r : { ...r, actions: /* @__PURE__ */ p(l, { actions: t, iconOrientation: "horizontal" }) };
|
|
53
|
+
}) : n, [n, e]), v = (n, e) => {
|
|
54
|
+
if (!n) return [];
|
|
55
|
+
let r = Object.keys(n).map((t) => t);
|
|
56
|
+
return e?.length > 0 && (r = r.sort((t, c) => {
|
|
57
57
|
const o = e.findIndex((s) => s === t), u = e.findIndex((s) => s === c);
|
|
58
58
|
return o === -1 ? 1 : u === -1 ? -1 : o - u;
|
|
59
|
-
})),
|
|
59
|
+
})), r;
|
|
60
60
|
};
|
|
61
61
|
export {
|
|
62
62
|
P as useGenerateColumns,
|
|
@@ -56,11 +56,15 @@ type ListAreaProps = {
|
|
|
56
56
|
* @default undefined
|
|
57
57
|
*/
|
|
58
58
|
routerLinkElement: undefined | React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
59
|
+
/**
|
|
60
|
+
* if true the list items will not have hover and active states and the cursor will be default, @default false
|
|
61
|
+
*/
|
|
62
|
+
nonInteractive?: boolean;
|
|
59
63
|
};
|
|
60
64
|
/**
|
|
61
65
|
* `ListArea` is a layout component that displays a list of items.
|
|
62
66
|
* list elements act as router links to the corresponding route.
|
|
63
67
|
* The list will be displayed in the desktop view or when no detail view is selected (in mobile view).
|
|
64
68
|
*/
|
|
65
|
-
export declare const ListArea: ({ elements, pathname, isGrouped, hasSearch, searchPlaceholder, isIntegrated, isSorted, itemClassName, maxHeight, noElementsView, hasLastItemNoRoundedEdges, "data-testid": dataTestId, routerLinkElement, }: ListAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare const ListArea: ({ elements, pathname, isGrouped, hasSearch, searchPlaceholder, isIntegrated, isSorted, itemClassName, maxHeight, noElementsView, hasLastItemNoRoundedEdges, "data-testid": dataTestId, nonInteractive, routerLinkElement, }: ListAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
66
70
|
export {};
|
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { D
|
|
3
|
-
import { E as
|
|
4
|
-
import { L as
|
|
5
|
-
import { c as
|
|
6
|
-
import { o as
|
|
1
|
+
import { jsx as a, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { D } from "../../index.es-C27R5Xae.js";
|
|
3
|
+
import { E as j } from "../../index.es-DhlgTSuU.js";
|
|
4
|
+
import { L as A } from "../../index.es-Cg57snrN.js";
|
|
5
|
+
import { c as p } from "../../index-Df2FYN-K.js";
|
|
6
|
+
import { o as w } from "../../orderBy-Ce85KqD6.js";
|
|
7
7
|
import { useState as E, useMemo as v } from "react";
|
|
8
8
|
import { SearchBar as I } from "../SearchBar/SearchBar.js";
|
|
9
|
-
import { g as M, a as N, s as e } from "../../ListAreaService-
|
|
10
|
-
const
|
|
11
|
-
elements:
|
|
9
|
+
import { g as M, a as N, s as e } from "../../ListAreaService-Y8wR14Xq.js";
|
|
10
|
+
const G = ({
|
|
11
|
+
elements: t,
|
|
12
12
|
pathname: o,
|
|
13
13
|
isGrouped: i = !1,
|
|
14
|
-
hasSearch:
|
|
15
|
-
searchPlaceholder:
|
|
16
|
-
isIntegrated:
|
|
14
|
+
hasSearch: L = !1,
|
|
15
|
+
searchPlaceholder: g = "",
|
|
16
|
+
isIntegrated: x = !0,
|
|
17
17
|
isSorted: l = !0,
|
|
18
18
|
itemClassName: c = "",
|
|
19
|
-
maxHeight:
|
|
20
|
-
noElementsView:
|
|
19
|
+
maxHeight: T = "100%",
|
|
20
|
+
noElementsView: y,
|
|
21
21
|
hasLastItemNoRoundedEdges: m = !1,
|
|
22
|
-
"data-testid":
|
|
22
|
+
"data-testid": C,
|
|
23
|
+
nonInteractive: n = !1,
|
|
23
24
|
routerLinkElement: d
|
|
24
25
|
}) => {
|
|
25
|
-
const [
|
|
26
|
-
if (!
|
|
27
|
-
const
|
|
28
|
-
return l ?
|
|
29
|
-
}, [
|
|
26
|
+
const [r, b] = E(""), s = v(() => {
|
|
27
|
+
if (!r) return l ? w(t, "title") : t;
|
|
28
|
+
const u = t.filter((f) => f.title.toLowerCase().includes(r.toLowerCase()) || f.subTitle?.toLowerCase().includes(r.toLowerCase()) || f.overlineTitle?.toLowerCase().includes(r.toLowerCase()));
|
|
29
|
+
return l ? w(u, "title") : u;
|
|
30
|
+
}, [r, t, l]), B = v(
|
|
30
31
|
() => i ? M(s, o, c, d) : N(s, o, c, d),
|
|
31
32
|
[s, o, c, i, d]
|
|
32
33
|
);
|
|
33
34
|
return /* @__PURE__ */ a(
|
|
34
|
-
|
|
35
|
+
j,
|
|
35
36
|
{
|
|
36
37
|
"data-testid": "elevation",
|
|
37
|
-
elevation:
|
|
38
|
+
elevation: x ? 0 : 1,
|
|
38
39
|
className: `${e.mainElevation}`,
|
|
39
|
-
children: /* @__PURE__ */
|
|
40
|
-
|
|
40
|
+
children: /* @__PURE__ */ h("div", { className: p(e.fullWidth, e.noGroupHeaderMargin), children: [
|
|
41
|
+
L && t.length > 0 && /* @__PURE__ */ h("span", { "data-testid": "search-bar-container", children: [
|
|
41
42
|
/* @__PURE__ */ a(
|
|
42
43
|
I,
|
|
43
44
|
{
|
|
44
|
-
searchTerm:
|
|
45
|
-
setSearchTerm:
|
|
45
|
+
searchTerm: r,
|
|
46
|
+
setSearchTerm: b,
|
|
46
47
|
className: e.searchbar,
|
|
47
|
-
placeholder:
|
|
48
|
+
placeholder: g
|
|
48
49
|
}
|
|
49
50
|
),
|
|
50
|
-
/* @__PURE__ */ a(
|
|
51
|
+
/* @__PURE__ */ a(D, {})
|
|
51
52
|
] }),
|
|
52
|
-
s.length === 0 &&
|
|
53
|
+
s.length === 0 && y,
|
|
53
54
|
/* @__PURE__ */ a(
|
|
54
|
-
|
|
55
|
+
A,
|
|
55
56
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
nonInteractive: n,
|
|
58
|
+
"data-testid": C,
|
|
59
|
+
items: B,
|
|
60
|
+
className: p(
|
|
59
61
|
e.list,
|
|
60
62
|
e.primaryText,
|
|
61
63
|
!i && !m && e.roundedBottom,
|
|
62
|
-
m && e.hasNoRoundedEdges
|
|
64
|
+
m && e.hasNoRoundedEdges,
|
|
65
|
+
n && e.hideArrowIcon
|
|
63
66
|
),
|
|
64
|
-
style: { maxHeight:
|
|
67
|
+
style: { maxHeight: T },
|
|
65
68
|
showDivider: !1
|
|
66
69
|
}
|
|
67
70
|
)
|
|
@@ -70,5 +73,5 @@ const F = ({
|
|
|
70
73
|
);
|
|
71
74
|
};
|
|
72
75
|
export {
|
|
73
|
-
|
|
76
|
+
G as ListArea
|
|
74
77
|
};
|
|
@@ -6,7 +6,7 @@ import "../../index.es-DUrjyxNI.js";
|
|
|
6
6
|
import "../../index-Df2FYN-K.js";
|
|
7
7
|
import "../Iconify/Iconify.js";
|
|
8
8
|
import "../../enums/AvailableCustomIcons.js";
|
|
9
|
-
import { g as d, a as I, m as L } from "../../ListAreaService-
|
|
9
|
+
import { g as d, a as I, m as L } from "../../ListAreaService-Y8wR14Xq.js";
|
|
10
10
|
export {
|
|
11
11
|
d as getGroupedItems,
|
|
12
12
|
I as getListedItems,
|
|
@@ -2,7 +2,7 @@ import { jsx as y, jsxs as Q } from "react/jsx-runtime";
|
|
|
2
2
|
import { _ as X, a as Y, c as $, P as u } from "../../../index-Df2FYN-K.js";
|
|
3
3
|
import { i as Z, _ as w, d as ee } from "../../../index.es-C6I3L4U4.js";
|
|
4
4
|
import t, { forwardRef as re, useRef as H, useImperativeHandle as te, useEffect as T, useCallback as se, useState as ae, useMemo as ie } from "react";
|
|
5
|
-
import { b as
|
|
5
|
+
import { b as q, c as U } from "../../../tslib.es6-BDCynO9F.js";
|
|
6
6
|
import { M as oe, a as ne } from "../../../component-By6nyiBU.js";
|
|
7
7
|
import { G as ce } from "../../../index.es-Z0aF-7Cn.js";
|
|
8
8
|
import { P as le } from "../../../index.es-DgncYOqO.js";
|
|
@@ -21,7 +21,7 @@ import '../../../assets/LoadingSpinner.css';var p = {
|
|
|
21
21
|
var V = (
|
|
22
22
|
/** @class */
|
|
23
23
|
(function(s) {
|
|
24
|
-
|
|
24
|
+
q(e, s);
|
|
25
25
|
function e(r) {
|
|
26
26
|
return s.call(this, U(U({}, e.defaultAdapter), r)) || this;
|
|
27
27
|
}
|
|
@@ -85,7 +85,7 @@ var V = (
|
|
|
85
85
|
var me = (
|
|
86
86
|
/** @class */
|
|
87
87
|
(function(s) {
|
|
88
|
-
|
|
88
|
+
q(e, s);
|
|
89
89
|
function e() {
|
|
90
90
|
return s !== null && s.apply(this, arguments) || this;
|
|
91
91
|
}
|
|
@@ -214,21 +214,21 @@ var me = (
|
|
|
214
214
|
progress: 0,
|
|
215
215
|
themeColor: "primary",
|
|
216
216
|
variant: "indeterminate"
|
|
217
|
-
}, fe = ["ariaLabel", "className", "open", "progress", "size", "indicatorSize", "themeColor", "variant"], h = he,
|
|
217
|
+
}, fe = ["ariaLabel", "className", "open", "progress", "size", "indicatorSize", "themeColor", "variant"], h = he, W = /* @__PURE__ */ re(function(s, e) {
|
|
218
218
|
var r, c = s.ariaLabel, a = c === void 0 ? h.ariaLabel : c, l = s.className, g = l === void 0 ? h.className : l, v = s.open, D = v === void 0 ? h.open : v, A = s.progress, d = A === void 0 ? h.progress : A;
|
|
219
219
|
s.size;
|
|
220
|
-
var
|
|
220
|
+
var k = s.indicatorSize, P = k === void 0 ? h.indicatorSize : k, R = s.themeColor, E = R === void 0 ? h.themeColor : R, O = s.variant, b = O === void 0 ? h.variant : O, G = X(s, fe), L = H(), S = H();
|
|
221
221
|
te(e, function() {
|
|
222
222
|
return L.current;
|
|
223
223
|
}, []), T(function() {
|
|
224
|
-
return
|
|
225
|
-
|
|
224
|
+
return S.current = me.attachTo(L.current), function() {
|
|
225
|
+
S.current.destroy();
|
|
226
226
|
};
|
|
227
227
|
}, []), T(function() {
|
|
228
|
-
(
|
|
229
|
-
}, [d,
|
|
230
|
-
var
|
|
231
|
-
switch (
|
|
228
|
+
(b === "determinate" && d < 0 || d > 1) && Z("CircularProgress: `progress` must be between 0 and 1."), S.current.determinate = b === "determinate", S.current.progress = d;
|
|
229
|
+
}, [d, b]);
|
|
230
|
+
var K = function() {
|
|
231
|
+
switch (P) {
|
|
232
232
|
case "xs":
|
|
233
233
|
return {
|
|
234
234
|
heightWidth: "16px",
|
|
@@ -302,7 +302,7 @@ var me = (
|
|
|
302
302
|
halfStrokeDashoffset: "56.549"
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
}, o =
|
|
305
|
+
}, o = K(), z = o.heightWidth, n = o.viewBox, i = o.cxCy, f = o.r, _ = o.strokeWidth, B = o.strokeWidth80, C = o.strokeDashArray, J = o.strokeDashoffset, x = o.halfStrokeDashoffset, N = se(function() {
|
|
306
306
|
var I, F, j;
|
|
307
307
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
308
308
|
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"
|
|
@@ -314,9 +314,9 @@ var me = (
|
|
|
314
314
|
cx: i,
|
|
315
315
|
cy: i,
|
|
316
316
|
r: f,
|
|
317
|
-
strokeDasharray:
|
|
317
|
+
strokeDasharray: C,
|
|
318
318
|
strokeDashoffset: x,
|
|
319
|
-
strokeWidth:
|
|
319
|
+
strokeWidth: _
|
|
320
320
|
}))), /* @__PURE__ */ t.createElement("div", {
|
|
321
321
|
className: "mdc-circular-progress__gap-patch"
|
|
322
322
|
}, /* @__PURE__ */ t.createElement("svg", {
|
|
@@ -327,7 +327,7 @@ var me = (
|
|
|
327
327
|
cx: i,
|
|
328
328
|
cy: i,
|
|
329
329
|
r: f,
|
|
330
|
-
strokeDasharray:
|
|
330
|
+
strokeDasharray: C,
|
|
331
331
|
strokeDashoffset: x,
|
|
332
332
|
strokeWidth: B
|
|
333
333
|
}))), /* @__PURE__ */ t.createElement("div", {
|
|
@@ -340,14 +340,14 @@ var me = (
|
|
|
340
340
|
cx: i,
|
|
341
341
|
cy: i,
|
|
342
342
|
r: f,
|
|
343
|
-
strokeDasharray:
|
|
343
|
+
strokeDasharray: C,
|
|
344
344
|
strokeDashoffset: x,
|
|
345
|
-
strokeWidth:
|
|
345
|
+
strokeWidth: _
|
|
346
346
|
}))));
|
|
347
|
-
}, [i, x, f,
|
|
347
|
+
}, [i, x, f, C, _, B, n]), M = E === "two-color" || E === "two-color-variant";
|
|
348
348
|
return /* @__PURE__ */ t.createElement("div", Y({
|
|
349
349
|
ref: L,
|
|
350
|
-
className: $("lmnt", "mdc-circular-progress",
|
|
350
|
+
className: $("lmnt", "mdc-circular-progress", b === "indeterminate" && "mdc-circular-progress--indeterminate", !D && "mdc-circular-progress--closed", E && "lmnt-circular-progress--".concat(E), g),
|
|
351
351
|
style: {
|
|
352
352
|
width: z,
|
|
353
353
|
height: z
|
|
@@ -357,7 +357,7 @@ var me = (
|
|
|
357
357
|
"aria-valuemin": "0",
|
|
358
358
|
"aria-valuemax": "1",
|
|
359
359
|
"aria-valuenow": d
|
|
360
|
-
},
|
|
360
|
+
}, G), /* @__PURE__ */ t.createElement("div", {
|
|
361
361
|
className: "mdc-circular-progress__determinate-container"
|
|
362
362
|
}, /* @__PURE__ */ t.createElement("svg", {
|
|
363
363
|
className: "mdc-circular-progress__determinate-circle-graphic",
|
|
@@ -368,15 +368,15 @@ var me = (
|
|
|
368
368
|
cx: i,
|
|
369
369
|
cy: i,
|
|
370
370
|
r: f,
|
|
371
|
-
strokeWidth:
|
|
371
|
+
strokeWidth: _
|
|
372
372
|
}), /* @__PURE__ */ t.createElement("circle", {
|
|
373
373
|
className: "mdc-circular-progress__determinate-circle",
|
|
374
374
|
cx: i,
|
|
375
375
|
cy: i,
|
|
376
376
|
r: f,
|
|
377
|
-
strokeDasharray:
|
|
377
|
+
strokeDasharray: C,
|
|
378
378
|
strokeDashoffset: J,
|
|
379
|
-
strokeWidth:
|
|
379
|
+
strokeWidth: _
|
|
380
380
|
}))), /* @__PURE__ */ t.createElement("div", {
|
|
381
381
|
className: "mdc-circular-progress__indeterminate-container"
|
|
382
382
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
@@ -389,10 +389,10 @@ var me = (
|
|
|
389
389
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-4"
|
|
390
390
|
}, N()))));
|
|
391
391
|
});
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
const ge = "
|
|
395
|
-
|
|
392
|
+
W.displayName = "CircularProgress";
|
|
393
|
+
W.propTypes = pe;
|
|
394
|
+
const ge = "_centered_1aq9c_1", ve = {
|
|
395
|
+
centered: ge
|
|
396
396
|
}, Ne = ({
|
|
397
397
|
size: s,
|
|
398
398
|
center: e = !1,
|
|
@@ -406,14 +406,14 @@ const ge = "_loadingSpinnerContainer_1f3ss_1", ve = {
|
|
|
406
406
|
}) => {
|
|
407
407
|
const [D, A] = ae(0);
|
|
408
408
|
T(() => {
|
|
409
|
-
const
|
|
410
|
-
A((
|
|
409
|
+
const k = setInterval(() => {
|
|
410
|
+
A((P) => P + 1);
|
|
411
411
|
}, 1e3);
|
|
412
|
-
return () => clearInterval(
|
|
412
|
+
return () => clearInterval(k);
|
|
413
413
|
}, []);
|
|
414
414
|
const d = ie(() => g && D > v ? g : r, [g, v, r, D]);
|
|
415
415
|
return s === "big" ? /* @__PURE__ */ y(ue, { text: d }) : l ? /* @__PURE__ */ y(
|
|
416
|
-
|
|
416
|
+
W,
|
|
417
417
|
{
|
|
418
418
|
"data-testid": "loading-spinner",
|
|
419
419
|
themeColor: a,
|
|
@@ -422,19 +422,21 @@ const ge = "_loadingSpinnerContainer_1f3ss_1", ve = {
|
|
|
422
422
|
) : /* @__PURE__ */ y(
|
|
423
423
|
le,
|
|
424
424
|
{
|
|
425
|
+
"data-testid": "loading-spinner-padding",
|
|
425
426
|
variant: "standard",
|
|
426
|
-
|
|
427
|
-
className: e ? ve.loadingSpinnerContainer : "",
|
|
427
|
+
className: e ? ve.centered : "",
|
|
428
428
|
children: /* @__PURE__ */ Q(
|
|
429
429
|
ce,
|
|
430
430
|
{
|
|
431
|
+
"data-testid": "loading-spinner-group",
|
|
432
|
+
fullWidth: !0,
|
|
431
433
|
direction: c === "right" ? "horizontal" : "vertical",
|
|
432
434
|
gap: "dense",
|
|
433
435
|
primaryAlign: "center",
|
|
434
436
|
secondaryAlign: "center",
|
|
435
437
|
children: [
|
|
436
438
|
/* @__PURE__ */ y(
|
|
437
|
-
|
|
439
|
+
W,
|
|
438
440
|
{
|
|
439
441
|
"data-testid": "loading-spinner",
|
|
440
442
|
themeColor: a,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListItemProps } from '@element-public/react-list';
|
|
2
1
|
import { OfflineViewProps } from '../components/OfflineView/OfflineView';
|
|
2
|
+
import { ActionProps } from '../main';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for the GenericTable component {@link GenericTable}
|
|
@@ -64,9 +64,9 @@ export type TableLayoutProps<T> = {
|
|
|
64
64
|
/**
|
|
65
65
|
* function that will be called to get the actions for a row to be displayed as actions in a context menu
|
|
66
66
|
* @param row the row (element) that will be used in each action
|
|
67
|
-
* @returns an array of
|
|
67
|
+
* @returns an array of ActionProps that will be shown as actions for the row
|
|
68
68
|
*/
|
|
69
|
-
getRowActions?: (row: T) =>
|
|
69
|
+
getRowActions?: (row: T) => ActionProps[] | undefined;
|
|
70
70
|
/**
|
|
71
71
|
* custom column width that is specified by a column key. Note, can be a unit-less number (in pixels) or a percentage "10%"
|
|
72
72
|
* @example customColumnWidth={{ id: '15%', actionColumn: '10%' }}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hortiview/shared-components",
|
|
3
3
|
"description": "This is a shared component library. It should used in the HortiView platform and its modules.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.19.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
|
|
7
7
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as B } from "react/jsx-runtime";
|
|
2
|
-
import { G } from "./index.es-Z0aF-7Cn.js";
|
|
3
|
-
import { I as S } from "./index.es-DEBGoIKX.js";
|
|
4
|
-
import { P as O } from "./index.es-DgncYOqO.js";
|
|
5
|
-
import { e as k, c as $, T as j } from "./index.es-DUrjyxNI.js";
|
|
6
|
-
import { c as H } from "./index-Df2FYN-K.js";
|
|
7
|
-
import { Iconify as M } from "./components/Iconify/Iconify.js";
|
|
8
|
-
import { AvailableCustomIcons as P } from "./enums/AvailableCustomIcons.js";
|
|
9
|
-
import './assets/ListAreaService.css';const R = "_fullWidth_1abq6_1", W = "_mainElevation_1abq6_6", L = "_searchbar_1abq6_13", w = "_roundedBottom_1abq6_21", A = "_primaryText_1abq6_26", z = "_list_1abq6_30", D = "_listItem_1abq6_41", F = "_isSelected_1abq6_65", J = "_noGroupHeaderMargin_1abq6_74", K = "_indentGroupedElement_1abq6_78", Q = "_isNotSelected_1abq6_82", U = "_iconColor_1abq6_92", V = "_overlineTitle_1abq6_96", X = "_noOverlineTitle_1abq6_101", Y = "_truncate_1abq6_105", Z = "_truncateOverlineText_1abq6_116", ee = "_hasNoRoundedEdges_1abq6_121", t = {
|
|
10
|
-
fullWidth: R,
|
|
11
|
-
mainElevation: W,
|
|
12
|
-
searchbar: L,
|
|
13
|
-
roundedBottom: w,
|
|
14
|
-
primaryText: A,
|
|
15
|
-
list: z,
|
|
16
|
-
listItem: D,
|
|
17
|
-
isSelected: F,
|
|
18
|
-
noGroupHeaderMargin: J,
|
|
19
|
-
indentGroupedElement: K,
|
|
20
|
-
isNotSelected: Q,
|
|
21
|
-
iconColor: U,
|
|
22
|
-
overlineTitle: V,
|
|
23
|
-
noOverlineTitle: X,
|
|
24
|
-
truncate: Y,
|
|
25
|
-
truncateOverlineText: Z,
|
|
26
|
-
hasNoRoundedEdges: ee
|
|
27
|
-
}, me = (o, r, s, l) => {
|
|
28
|
-
const n = o.reduce((i, c) => {
|
|
29
|
-
const { groupName: e, groupComponent: _, ...d } = c;
|
|
30
|
-
return !e || typeof e != "string" || (i[e] || (i[e] = {
|
|
31
|
-
groupName: _ ?? /* @__PURE__ */ a(O, { children: /* @__PURE__ */ a(k, { children: e }) }),
|
|
32
|
-
id: e,
|
|
33
|
-
items: []
|
|
34
|
-
}), i[e].items = [
|
|
35
|
-
...i[e].items,
|
|
36
|
-
g(d, r, s, l)
|
|
37
|
-
]), i;
|
|
38
|
-
}, {});
|
|
39
|
-
return Object.values(n);
|
|
40
|
-
}, _e = (o, r, s, l) => o.map((n) => g(n, r, s, l)), g = (o, r, s, l) => {
|
|
41
|
-
const {
|
|
42
|
-
id: n,
|
|
43
|
-
title: i,
|
|
44
|
-
subTitle: c,
|
|
45
|
-
route: e,
|
|
46
|
-
value: _,
|
|
47
|
-
noNavigation: d,
|
|
48
|
-
disabled: u,
|
|
49
|
-
icon: b,
|
|
50
|
-
iconType: v,
|
|
51
|
-
trailingIcon: y,
|
|
52
|
-
trailingIconType: h,
|
|
53
|
-
actionButton: f,
|
|
54
|
-
onClick: q,
|
|
55
|
-
customTitle: T,
|
|
56
|
-
listItemClassName: N,
|
|
57
|
-
overlineTitle: p,
|
|
58
|
-
"data-testid": I,
|
|
59
|
-
indentElement: x
|
|
60
|
-
} = o, m = r === e, E = H(
|
|
61
|
-
v !== "avatar" && t.listItem,
|
|
62
|
-
s,
|
|
63
|
-
N,
|
|
64
|
-
p ? t.overlineTitle : t.noOverlineTitle,
|
|
65
|
-
x && t.indentGroupedElement,
|
|
66
|
-
m ? t.isSelected : t.isNotSelected
|
|
67
|
-
);
|
|
68
|
-
return {
|
|
69
|
-
id: n,
|
|
70
|
-
key: n,
|
|
71
|
-
select: m,
|
|
72
|
-
primaryText: n,
|
|
73
|
-
secondaryText: /* @__PURE__ */ B(G, { direction: "vertical", gap: "none", children: [
|
|
74
|
-
T ?? /* @__PURE__ */ a(
|
|
75
|
-
$,
|
|
76
|
-
{
|
|
77
|
-
"data-testid": "title",
|
|
78
|
-
level: 1,
|
|
79
|
-
themeColor: m ? "primary" : void 0,
|
|
80
|
-
className: `${t.truncate} lmnt-theme-on-surface-active`,
|
|
81
|
-
children: i
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
c && !T ? /* @__PURE__ */ a(
|
|
85
|
-
j,
|
|
86
|
-
{
|
|
87
|
-
"data-testid": "subtitle",
|
|
88
|
-
level: 2,
|
|
89
|
-
themeColor: m ? "primary" : void 0,
|
|
90
|
-
className: `${t.truncate} lmnt-theme-on-surface-inactive`,
|
|
91
|
-
children: c
|
|
92
|
-
}
|
|
93
|
-
) : void 0
|
|
94
|
-
] }),
|
|
95
|
-
overlineText: p ? /* @__PURE__ */ a(
|
|
96
|
-
"span",
|
|
97
|
-
{
|
|
98
|
-
"data-testid": "overline-title",
|
|
99
|
-
className: `${t.truncate} ${t.truncateOverlineText}`,
|
|
100
|
-
children: p
|
|
101
|
-
}
|
|
102
|
-
) : void 0,
|
|
103
|
-
trailingBlock: f ?? y ?? /* @__PURE__ */ a(S, { icon: "arrow_right", className: t.iconColor }),
|
|
104
|
-
leadingBlock: te(b),
|
|
105
|
-
value: _,
|
|
106
|
-
componentProps: {
|
|
107
|
-
id: n,
|
|
108
|
-
"data-testid": `${I ?? i}-list-item`,
|
|
109
|
-
key: n,
|
|
110
|
-
leadingBlockType: v ?? "icon",
|
|
111
|
-
trailingBlockType: h ?? "icon",
|
|
112
|
-
className: E,
|
|
113
|
-
onClick: (oe, C) => q?.(C),
|
|
114
|
-
tag: u || d ? void 0 : l ?? "a",
|
|
115
|
-
to: u || d ? void 0 : e,
|
|
116
|
-
disabled: u
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}, te = (o) => typeof o == "string" && o in P ? /* @__PURE__ */ a(M, { icon: o }) : o;
|
|
120
|
-
export {
|
|
121
|
-
_e as a,
|
|
122
|
-
me as g,
|
|
123
|
-
g as m,
|
|
124
|
-
t as s
|
|
125
|
-
};
|