@hortiview/shared-components 0.0.4991 → 0.0.5024
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-8vnw7uAP.js → ListAreaService-jz92va76.js} +16 -16
- package/dist/components/HashTabView/HashTabView.js +34 -34
- package/dist/components/ListArea/ListArea.d.ts +1 -1
- package/dist/components/ListArea/ListArea.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/ListArea/ListAreaService.d.ts +7 -7
- package/dist/components/ListArea/ListAreaService.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { jsx as l } from "react/jsx-runtime";
|
|
|
3
3
|
import { TypoButton as b, TypoSubtitle as k, TypoBody as L, Icon as x } from "@element/react-components";
|
|
4
4
|
import { Iconify as C } from "./components/Iconify/Iconify.js";
|
|
5
5
|
import { AvailableCustomIcons as E } from "./enums/AvailableCustomIcons.js";
|
|
6
|
-
const N = "_fullWidth_1y0ty_1", W = "_mainElevation_1y0ty_5", $ = "_searchbar_1y0ty_11", j = "_roundedBottom_1y0ty_19", S = "_list_1y0ty_24", w = "_listItem_1y0ty_52", A = "_trailingIcon_1y0ty_56", G = "_groupedListItem_1y0ty_68",
|
|
6
|
+
const N = "_fullWidth_1y0ty_1", W = "_mainElevation_1y0ty_5", $ = "_searchbar_1y0ty_11", j = "_roundedBottom_1y0ty_19", S = "_list_1y0ty_24", w = "_listItem_1y0ty_52", A = "_trailingIcon_1y0ty_56", G = "_groupedListItem_1y0ty_68", _ = {
|
|
7
7
|
fullWidth: N,
|
|
8
8
|
mainElevation: W,
|
|
9
9
|
searchbar: $,
|
|
@@ -21,48 +21,48 @@ const N = "_fullWidth_1y0ty_1", W = "_mainElevation_1y0ty_5", $ = "_searchbar_1y
|
|
|
21
21
|
items: []
|
|
22
22
|
}), e[o].items = [
|
|
23
23
|
...e[o].items,
|
|
24
|
-
|
|
24
|
+
g(m, i, n, !0, r)
|
|
25
25
|
]), e;
|
|
26
26
|
}, {});
|
|
27
27
|
return Object.values(s);
|
|
28
|
-
}, K = (t, i, n, r) => t.map((s) =>
|
|
28
|
+
}, K = (t, i, n, r) => t.map((s) => g(s, i, n, !1, r)), g = (t, i, n, r, s) => {
|
|
29
29
|
const {
|
|
30
30
|
title: e,
|
|
31
31
|
subTitle: a,
|
|
32
32
|
route: o,
|
|
33
33
|
value: m,
|
|
34
|
-
noNavigation:
|
|
35
|
-
disabled:
|
|
34
|
+
noNavigation: y,
|
|
35
|
+
disabled: d,
|
|
36
36
|
icon: I,
|
|
37
|
-
iconType:
|
|
37
|
+
iconType: p,
|
|
38
38
|
trailingIcon: v,
|
|
39
39
|
trailingIconType: f,
|
|
40
40
|
actionButton: T,
|
|
41
41
|
onClick: h,
|
|
42
|
-
customTitle:
|
|
42
|
+
customTitle: u
|
|
43
43
|
} = t, c = i === o;
|
|
44
44
|
return {
|
|
45
45
|
select: c,
|
|
46
|
-
primaryText:
|
|
47
|
-
secondaryText: a && !
|
|
46
|
+
primaryText: u ?? /* @__PURE__ */ l(k, { level: 1, bold: c, themeColor: c ? "primary" : void 0, children: e }),
|
|
47
|
+
secondaryText: a && !u ? /* @__PURE__ */ l(L, { level: 2, themeColor: c ? "primary" : void 0, children: a }) : void 0,
|
|
48
48
|
overlineText: t.overlineTitle,
|
|
49
49
|
trailingBlock: T ?? v ?? /* @__PURE__ */ l(x, { icon: "arrow_right" }),
|
|
50
50
|
leadingBlock: O(I),
|
|
51
|
-
nonInteractive: g,
|
|
52
51
|
value: m,
|
|
53
52
|
componentProps: {
|
|
54
|
-
leadingBlockType:
|
|
53
|
+
leadingBlockType: p ?? "icon",
|
|
55
54
|
trailingBlockType: f ?? "icon",
|
|
56
|
-
className: `${
|
|
55
|
+
className: `${p === "avatar" ? "" : _.listItem} ${n} ${r ? _.groupedListItem : ""}`,
|
|
57
56
|
onClick: (P, B) => h?.(B),
|
|
58
|
-
tag: d ? void 0 : s ?? "a",
|
|
59
|
-
to: d ? void 0 : o
|
|
57
|
+
tag: d || y ? void 0 : s ?? "a",
|
|
58
|
+
to: d || y ? void 0 : o,
|
|
59
|
+
disabled: d
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
}, O = (t) => typeof t == "string" && t in E ? /* @__PURE__ */ l(C, { icon: t }) : t;
|
|
63
63
|
export {
|
|
64
64
|
K as a,
|
|
65
65
|
J as g,
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
g as m,
|
|
67
|
+
_ as s
|
|
68
68
|
};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
import "../../assets/HashTabView.css";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as a, jsxs as l, Fragment as w } from "react/jsx-runtime";
|
|
3
3
|
import { Elevation as T, Group as o, TabBar as C, Tab as k, Padding as A } from "@element/react-components";
|
|
4
4
|
import { useState as I, useEffect as L } from "react";
|
|
5
5
|
import { a as N } from "../../useBreakpoint-DROHPVxO.js";
|
|
6
|
-
const x = "_elevation_1rcw6_1", y = "_themeBackground_1rcw6_6", W = "_tabBar_1rcw6_10",
|
|
6
|
+
const x = "_elevation_1rcw6_1", y = "_themeBackground_1rcw6_6", W = "_tabBar_1rcw6_10", j = "_tabWrapper_1rcw6_16", E = "_tabButton_1rcw6_20", $ = "_childContainer_1rcw6_24", z = "_childContainerLg_1rcw6_28", t = {
|
|
7
7
|
elevation: x,
|
|
8
8
|
themeBackground: y,
|
|
9
9
|
tabBar: W,
|
|
10
|
-
tabWrapper:
|
|
11
|
-
tabButton:
|
|
12
|
-
childContainer:
|
|
10
|
+
tabWrapper: j,
|
|
11
|
+
tabButton: E,
|
|
12
|
+
childContainer: $,
|
|
13
13
|
childContainerLg: z
|
|
14
|
-
},
|
|
14
|
+
}, p = (n, r) => !r || !n ? 0 : n.findIndex((c) => c.hash === r.replace("#", "")) ?? 0, q = ({
|
|
15
15
|
tabs: n,
|
|
16
|
-
hasHash:
|
|
16
|
+
hasHash: r = !0,
|
|
17
17
|
hash: c = "",
|
|
18
|
-
clusterAlign:
|
|
19
|
-
hasClusteredTabs:
|
|
20
|
-
children:
|
|
21
|
-
verticalGap:
|
|
18
|
+
clusterAlign: u = "start",
|
|
19
|
+
hasClusteredTabs: _,
|
|
20
|
+
children: i,
|
|
21
|
+
verticalGap: g = "none",
|
|
22
22
|
elevation: B = 0,
|
|
23
23
|
backgroundColor: v = "themeBackground",
|
|
24
24
|
onChange: b
|
|
25
25
|
}) => {
|
|
26
|
-
const [
|
|
26
|
+
const [d, h] = I(p(n, c)), { isLg: s } = N();
|
|
27
27
|
L(() => {
|
|
28
|
-
const e =
|
|
29
|
-
|
|
30
|
-
}, [c, n,
|
|
28
|
+
const e = p(n, c);
|
|
29
|
+
h(e);
|
|
30
|
+
}, [c, n, r]);
|
|
31
31
|
const f = (e) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const m = n[e].hash;
|
|
33
|
+
m != null && r && (window.location.hash = m), h(e), b?.(e);
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ a(
|
|
36
36
|
T,
|
|
37
37
|
{
|
|
38
38
|
elevation: B,
|
|
39
|
-
className: `${
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
39
|
+
className: `${t.elevation} ${v === "none" ? "" : t.themeBackground}`,
|
|
40
|
+
children: /* @__PURE__ */ l(o, { direction: "vertical", gap: g, secondaryAlign: "stretch", children: [
|
|
41
|
+
/* @__PURE__ */ l(o, { direction: s ? "horizontal" : "vertical", className: t.tabWrapper, children: [
|
|
42
|
+
/* @__PURE__ */ a(
|
|
43
43
|
C,
|
|
44
44
|
{
|
|
45
|
-
className:
|
|
46
|
-
clustered: s ?
|
|
47
|
-
clusterAlign:
|
|
45
|
+
className: t.tabBar,
|
|
46
|
+
clustered: s ? _ : !1,
|
|
47
|
+
clusterAlign: u,
|
|
48
48
|
variant: "surface",
|
|
49
|
-
activeTabIndex:
|
|
49
|
+
activeTabIndex: d,
|
|
50
50
|
onTabActivated: f,
|
|
51
|
-
children: n.map((e) => /* @__PURE__ */
|
|
51
|
+
children: n.map((e) => /* @__PURE__ */ a(
|
|
52
52
|
k,
|
|
53
53
|
{
|
|
54
54
|
icon: e.leadingIcon,
|
|
55
|
-
className:
|
|
56
|
-
children: /* @__PURE__ */
|
|
55
|
+
className: i ? t.tabButton : "",
|
|
56
|
+
children: /* @__PURE__ */ l(o, { gap: "dense", children: [
|
|
57
57
|
e.title,
|
|
58
58
|
e.trailingIcon
|
|
59
59
|
] })
|
|
@@ -62,16 +62,16 @@ const x = "_elevation_1rcw6_1", y = "_themeBackground_1rcw6_6", W = "_tabBar_1rc
|
|
|
62
62
|
))
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
|
|
65
|
+
i ? /* @__PURE__ */ a(
|
|
66
66
|
A,
|
|
67
67
|
{
|
|
68
68
|
variant: "dense",
|
|
69
|
-
className: s ?
|
|
70
|
-
children: /* @__PURE__ */
|
|
69
|
+
className: s ? t.childContainer : t.childContainerLg,
|
|
70
|
+
children: /* @__PURE__ */ a(o, { gap: "dense", primaryAlign: "center", secondaryAlign: "center", children: i })
|
|
71
71
|
}
|
|
72
|
-
) : /* @__PURE__ */
|
|
72
|
+
) : /* @__PURE__ */ a(w, {})
|
|
73
73
|
] }),
|
|
74
|
-
n[
|
|
74
|
+
n[d]?.component
|
|
75
75
|
] })
|
|
76
76
|
}
|
|
77
77
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { LinkProps } from '../../types/internal/ReactRouterTypes';
|
|
3
2
|
import { ListElement } from '../../types/ListElement';
|
|
3
|
+
import { LinkProps } from '../../types/internal/ReactRouterTypes';
|
|
4
4
|
type ListAreaProps = {
|
|
5
5
|
/**
|
|
6
6
|
* elements to be displayed in the list area
|
|
@@ -4,7 +4,7 @@ import { g as Hr } from "../../_commonjsHelpers-CT_km90n.js";
|
|
|
4
4
|
import { _ as H, a as Tr, b as wr, c as T, d as Nr, e as Wr, i as h, f as N, h as B, j as Xr, k as zr, l as I, m as Yr, n as Zr, o as Jr, p as W, q as Qr, r as Or, s as Pr, t as kr, u as Vr } from "../../get-Dyz8NMrE.js";
|
|
5
5
|
import { useState as re, useMemo as k } from "react";
|
|
6
6
|
import { SearchBar as ee } from "../SearchBar/SearchBar.js";
|
|
7
|
-
import { g as ae, a as te, s as m } from "../../ListAreaService-
|
|
7
|
+
import { g as ae, a as te, s as m } from "../../ListAreaService-jz92va76.js";
|
|
8
8
|
var ne = H;
|
|
9
9
|
function se() {
|
|
10
10
|
this.__data__ = new ne(), this.size = 0;
|
|
@@ -2,7 +2,7 @@ import { jsx as r, Fragment as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { TypoButton as p } from "@element/react-components";
|
|
3
3
|
import { r as s, s as a, f as u } from "../../react.esm-C0LtovhP.js";
|
|
4
4
|
import { ListArea as c } from "./ListArea.js";
|
|
5
|
-
import { g as h } from "../../ListAreaService-
|
|
5
|
+
import { g as h } from "../../ListAreaService-jz92va76.js";
|
|
6
6
|
import { d as m, t as n, g as t } from "../../vi.JYQecGiw-BbUbJcT8.js";
|
|
7
7
|
m("ListArea Test", () => {
|
|
8
8
|
const o = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
|
-
import { LinkProps } from '../../types/internal/ReactRouterTypes';
|
|
3
2
|
import { ListElement } from '../../types/ListElement';
|
|
3
|
+
import { LinkProps } from '../../types/internal/ReactRouterTypes';
|
|
4
4
|
/**
|
|
5
5
|
* Groups items by groupName property and maps them to the schema of Bayer's List component
|
|
6
6
|
* @param items the items to group
|
|
@@ -27,15 +27,15 @@ export declare const getListedItems: (items: ListElement[], pathname: string, it
|
|
|
27
27
|
overlineText: string | undefined;
|
|
28
28
|
trailingBlock: string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode>;
|
|
29
29
|
leadingBlock: string | import("react/jsx-runtime").JSX.Element | undefined;
|
|
30
|
-
nonInteractive: boolean | undefined;
|
|
31
30
|
value: string | undefined;
|
|
32
31
|
componentProps: {
|
|
33
|
-
leadingBlockType: "icon" | "checkbox" | "radio" | "switch" | "
|
|
34
|
-
trailingBlockType: "icon" | "checkbox" | "radio" | "switch" | "
|
|
32
|
+
leadingBlockType: "icon" | "checkbox" | "radio" | "switch" | "avatar" | "badge" | "image" | "lgImage" | "meta" | "thumbnail";
|
|
33
|
+
trailingBlockType: "icon" | "checkbox" | "radio" | "switch" | "avatar" | "badge" | "image" | "lgImage" | "meta" | "thumbnail";
|
|
35
34
|
className: string;
|
|
36
35
|
onClick: (_: ChangeEvent, value: string) => void | undefined;
|
|
37
36
|
tag: string | import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>> | undefined;
|
|
38
37
|
to: string | undefined;
|
|
38
|
+
disabled: boolean | undefined;
|
|
39
39
|
};
|
|
40
40
|
}[];
|
|
41
41
|
/**
|
|
@@ -53,14 +53,14 @@ export declare const mapListElement: (element: ListElement, pathname: string | u
|
|
|
53
53
|
overlineText: string | undefined;
|
|
54
54
|
trailingBlock: string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode>;
|
|
55
55
|
leadingBlock: string | import("react/jsx-runtime").JSX.Element | undefined;
|
|
56
|
-
nonInteractive: boolean | undefined;
|
|
57
56
|
value: string | undefined;
|
|
58
57
|
componentProps: {
|
|
59
|
-
leadingBlockType: "icon" | "checkbox" | "radio" | "switch" | "
|
|
60
|
-
trailingBlockType: "icon" | "checkbox" | "radio" | "switch" | "
|
|
58
|
+
leadingBlockType: "icon" | "checkbox" | "radio" | "switch" | "avatar" | "badge" | "image" | "lgImage" | "meta" | "thumbnail";
|
|
59
|
+
trailingBlockType: "icon" | "checkbox" | "radio" | "switch" | "avatar" | "badge" | "image" | "lgImage" | "meta" | "thumbnail";
|
|
61
60
|
className: string;
|
|
62
61
|
onClick: (_: ChangeEvent, value: string) => void | undefined;
|
|
63
62
|
tag: string | import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>> | undefined;
|
|
64
63
|
to: string | undefined;
|
|
64
|
+
disabled: boolean | undefined;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@element/react-components";
|
|
3
3
|
import "../Iconify/Iconify.js";
|
|
4
|
-
import { g as s, a as i, m as a } from "../../ListAreaService-8vnw7uAP.js";
|
|
5
4
|
import "../../enums/AvailableCustomIcons.js";
|
|
5
|
+
import { g as s, a as i, m as a } from "../../ListAreaService-jz92va76.js";
|
|
6
6
|
export {
|
|
7
7
|
s as getGroupedItems,
|
|
8
8
|
i as getListedItems,
|
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": "0.0.
|
|
4
|
+
"version": "0.0.5024",
|
|
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>",
|