@hortiview/shared-components 0.0.4991 → 0.0.4993
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/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,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.4993",
|
|
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>",
|