@hortiview/shared-components 0.0.7428 → 0.0.7501
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/assets/genericCard.css +1 -1
- package/dist/assets/genericTable.css +1 -1
- package/dist/components/Filter/Filter.js +71 -64
- package/dist/components/GenericTable/GenericTable.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +12 -11
- package/dist/genericCard.module-CnQn6tMH.js +14 -0
- package/dist/genericTable.module-Dk3yy2S3.js +17 -0
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/dist/genericCard.module-DzqcufuN.js +0 -12
- package/dist/genericTable.module-CNV1Yt1K.js +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._cardTitle_a6o2v_1{padding:.5rem!important}._cardBody_a6o2v_5{padding:.25rem .5rem!important;overflow:hidden!important}._cardContent_a6o2v_10{border-radius:.5rem}._row_a6o2v_14{padding:.25rem 0}._font_a6o2v_18{max-width:125px;font-weight:400;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}._title_a6o2v_26{display:inline-block;width:65vw;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}._emptyContainer_a6o2v_34{width:inherit;height:inherit}._empty_a6o2v_34{position:relative;top:50%;left:50%;transform:translate(-50%,-50%)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700|Roboto+Mono:400,500|Material+Icons";.
|
|
1
|
+
@import"https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700|Roboto+Mono:400,500|Material+Icons";._filterButton_qtl7a_1{width:15rem;height:100%!important}._relativeParent_qtl7a_6{position:relative}._filterBadge_qtl7a_10{position:absolute;top:0;right:0;transform:translate(50%,-50%)}._dense_qtl7a_17,._dense_qtl7a_17 div[class*=lmnt-select__anchor]{height:2.5rem!important}._topBar_1msoo_1 [class*=lmnt-table__top-bar__title]{display:none}._filterBar_1msoo_5{padding:1rem;width:inherit!important}._emptyTable_1msoo_9{height:16rem}[class*=mnt-pagination][class*=mdc-data-table__pagination]{border-top:1px solid var(--lmnt-theme-on-secondary-stroke)}._elevation_1msoo_17{border-radius:.4rem;width:100%}._table_1msoo_22,._table_1msoo_22 [class*=mdc-data-table__table-container]{border-radius:.4rem}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t, jsxs as y, Fragment as I } from "react/jsx-runtime";
|
|
2
|
-
import { Group as v, Modal as W, Button as
|
|
2
|
+
import { Group as v, Modal as W, Button as u, Select as j, IconButton as z, NotificationBadge as N } from "@element/react-components";
|
|
3
3
|
import { useState as g } from "react";
|
|
4
|
-
import { s as
|
|
5
|
-
import { u as
|
|
4
|
+
import { s as a } from "../../genericTable.module-Dk3yy2S3.js";
|
|
5
|
+
import { u as k } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
6
6
|
import "../../alertBanner.module-HneYdVzN.js";
|
|
7
7
|
import { I as H } from "../../Iconify-CY9lZjFd.js";
|
|
8
8
|
import "../../react-tooltip.min-BzHiZW8k.js";
|
|
@@ -20,7 +20,7 @@ import "lodash";
|
|
|
20
20
|
import "../../contextMenu.module-DNQ8d9Aj.js";
|
|
21
21
|
import "../../deleteModal.module-Ds3MDzdl.js";
|
|
22
22
|
import "../../disclaimer.module-BZydt-Q_.js";
|
|
23
|
-
import "../../genericCard.module-
|
|
23
|
+
import "../../genericCard.module-CnQn6tMH.js";
|
|
24
24
|
import "../../HashTabView.module-DUekkiTC.js";
|
|
25
25
|
import "../../HeaderFilter.module-DiBmulr5.js";
|
|
26
26
|
import "../../infoGroup.module-Cxw88dfC.js";
|
|
@@ -32,67 +32,67 @@ import "../../formDatePicker.module-BV3ma_7y.js";
|
|
|
32
32
|
import "../../formSelect.module-C18N-SsT.js";
|
|
33
33
|
import "../../formText.module-C0by6_DK.js";
|
|
34
34
|
const vt = ({
|
|
35
|
-
clearFilterText:
|
|
36
|
-
closeCallback:
|
|
35
|
+
clearFilterText: l,
|
|
36
|
+
closeCallback: o,
|
|
37
37
|
currentFilter: r,
|
|
38
38
|
filterButtonAsIcon: e = !1,
|
|
39
39
|
filterButtonText: i,
|
|
40
|
-
filterModalTitle:
|
|
41
|
-
filters:
|
|
42
|
-
modalCancelButtonText:
|
|
40
|
+
filterModalTitle: f,
|
|
41
|
+
filters: m,
|
|
42
|
+
modalCancelButtonText: c,
|
|
43
43
|
modalConfirmButtonText: n,
|
|
44
|
-
useModal:
|
|
44
|
+
useModal: C = !0
|
|
45
45
|
}) => {
|
|
46
|
-
const { isDesktop:
|
|
47
|
-
|
|
48
|
-
s.reduce((
|
|
46
|
+
const { isDesktop: b } = k(), [A, h] = g(!1), [s, x] = g(r), [_, B] = g(0), F = () => {
|
|
47
|
+
h(!1), o(s), B(
|
|
48
|
+
s.reduce((p, { selectedOptions: d }) => p + d.length, 0)
|
|
49
49
|
);
|
|
50
50
|
}, w = () => {
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
...s.filter((D) => D.id !==
|
|
55
|
-
|
|
51
|
+
x([]), B(0);
|
|
52
|
+
}, S = (p) => {
|
|
53
|
+
const d = [
|
|
54
|
+
...s.filter((D) => D.id !== p.id),
|
|
55
|
+
p
|
|
56
56
|
];
|
|
57
|
-
C(
|
|
57
|
+
x(d), C || o(d);
|
|
58
58
|
};
|
|
59
|
-
return
|
|
59
|
+
return C ? /* @__PURE__ */ y(I, { children: [
|
|
60
60
|
/* @__PURE__ */ t(
|
|
61
61
|
K,
|
|
62
62
|
{
|
|
63
63
|
filterButtonText: i,
|
|
64
64
|
filterButtonAsIcon: e,
|
|
65
65
|
count: _,
|
|
66
|
-
onClick: () =>
|
|
66
|
+
onClick: () => h(!0)
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
69
|
/* @__PURE__ */ t(
|
|
70
70
|
W,
|
|
71
71
|
{
|
|
72
72
|
open: A,
|
|
73
|
-
onClose:
|
|
74
|
-
title:
|
|
75
|
-
modalSize:
|
|
76
|
-
headerActions: /* @__PURE__ */ t(
|
|
77
|
-
dismissiveButton: /* @__PURE__ */ t(
|
|
78
|
-
primaryButton: /* @__PURE__ */ t(
|
|
79
|
-
children: /* @__PURE__ */ t(v, { direction: "vertical", children:
|
|
73
|
+
onClose: F,
|
|
74
|
+
title: f,
|
|
75
|
+
modalSize: b ? "small" : "fullscreen",
|
|
76
|
+
headerActions: /* @__PURE__ */ t(u, { variant: "text", onClick: w, children: l }),
|
|
77
|
+
dismissiveButton: /* @__PURE__ */ t(u, { variant: "outlined", onClick: () => h(!1), children: c }),
|
|
78
|
+
primaryButton: /* @__PURE__ */ t(u, { variant: "filled", onClick: F, children: n }),
|
|
79
|
+
children: /* @__PURE__ */ t(v, { direction: "vertical", children: O(m, s, S) })
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
|
-
] }) : /* @__PURE__ */ t(v, { secondaryAlign: "center", fullWidth: !0, children:
|
|
83
|
-
},
|
|
84
|
-
|
|
82
|
+
] }) : /* @__PURE__ */ t(v, { secondaryAlign: "center", fullWidth: !0, children: O(m, s, S, !1) });
|
|
83
|
+
}, O = (l, o, r, e = !0) => l.map(({ id: i, title: f, availableOptions: m, icon: c }) => /* @__PURE__ */ y(v, { fullWidth: !0, secondaryAlign: "center", children: [
|
|
84
|
+
c ? /* @__PURE__ */ t(H, { icon: c, iconSize: "medium" }) : null,
|
|
85
85
|
/* @__PURE__ */ t(
|
|
86
86
|
j,
|
|
87
87
|
{
|
|
88
|
-
className: e ? void 0 :
|
|
88
|
+
className: e ? void 0 : a.dense,
|
|
89
89
|
variant: "outlined",
|
|
90
|
-
options:
|
|
91
|
-
label:
|
|
90
|
+
options: m,
|
|
91
|
+
label: f,
|
|
92
92
|
multiSelect: !0,
|
|
93
93
|
textKey: "text",
|
|
94
94
|
valueKey: "id",
|
|
95
|
-
value:
|
|
95
|
+
value: o.find((n) => n.id === i)?.selectedOptions ?? [],
|
|
96
96
|
onChange: (n) => r({ id: i, selectedOptions: n }),
|
|
97
97
|
hoisted: !0,
|
|
98
98
|
menuMaxHeight: "300px",
|
|
@@ -104,50 +104,57 @@ const vt = ({
|
|
|
104
104
|
}
|
|
105
105
|
)
|
|
106
106
|
] }, i)), K = ({
|
|
107
|
-
filterButtonText:
|
|
108
|
-
filterButtonAsIcon:
|
|
107
|
+
filterButtonText: l,
|
|
108
|
+
filterButtonAsIcon: o,
|
|
109
109
|
count: r,
|
|
110
110
|
onClick: e
|
|
111
111
|
}) => {
|
|
112
|
-
const { isDesktop: i } =
|
|
113
|
-
return
|
|
112
|
+
const { isDesktop: i } = k();
|
|
113
|
+
return o ? /* @__PURE__ */ t(
|
|
114
114
|
z,
|
|
115
115
|
{
|
|
116
116
|
icon: "filter_list_alt",
|
|
117
117
|
onClick: e,
|
|
118
118
|
badge: r !== 0 && /* @__PURE__ */ t(
|
|
119
|
-
|
|
119
|
+
N,
|
|
120
120
|
{
|
|
121
121
|
counter: r,
|
|
122
|
-
className:
|
|
122
|
+
className: a.filterBadge,
|
|
123
123
|
themeColor: "secondary",
|
|
124
124
|
"data-testid": "filter-badge"
|
|
125
125
|
}
|
|
126
126
|
)
|
|
127
127
|
}
|
|
128
|
-
) : /* @__PURE__ */ y(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
128
|
+
) : /* @__PURE__ */ y(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: a.relativeParent,
|
|
132
|
+
style: { height: "100%", width: i ? void 0 : "100%" },
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ t(
|
|
135
|
+
u,
|
|
136
|
+
{
|
|
137
|
+
variant: "outlined",
|
|
138
|
+
themeColor: "primary",
|
|
139
|
+
leadingIcon: "filter_list_alt",
|
|
140
|
+
onClick: e,
|
|
141
|
+
className: a.filterButton,
|
|
142
|
+
fullWidth: !i,
|
|
143
|
+
children: l
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
r !== 0 && /* @__PURE__ */ t(
|
|
147
|
+
N,
|
|
148
|
+
{
|
|
149
|
+
counter: r,
|
|
150
|
+
className: a.filterBadge,
|
|
151
|
+
themeColor: "secondary",
|
|
152
|
+
"data-testid": "filter-badge"
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
);
|
|
151
158
|
};
|
|
152
159
|
export {
|
|
153
160
|
vt as Filter
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as B } from "react/jsx-runtime";
|
|
2
2
|
import { Elevation as D, Table as G, TableTopBar as u, Group as l, Padding as W, TypoDisplay as k, TypoSubtitle as C } from "@element/react-components";
|
|
3
3
|
import { Fragment as j } from "react";
|
|
4
|
-
import { a as e } from "../../genericTable.module-
|
|
4
|
+
import { a as e } from "../../genericTable.module-Dk3yy2S3.js";
|
|
5
5
|
import { u as x } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
6
6
|
import "../../alertBanner.module-HneYdVzN.js";
|
|
7
7
|
import "../../iconify.module-C89oaw5b.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as s, Fragment as T } from "react/jsx-runtime";
|
|
|
2
2
|
import { Card as g, CardContent as y, CardBody as x, Grid as v, GridRow as u, GridCol as n, TypoSubtitle as f, CardTitle as N, CardDivider as b } from "@element/react-components";
|
|
3
3
|
import { useMemo as k } from "react";
|
|
4
4
|
import { OverflowTooltip as c } from "../../OverflowTooltip/OverflowTooltip.js";
|
|
5
|
-
import { s as d } from "../../../genericCard.module-
|
|
5
|
+
import { s as d } from "../../../genericCard.module-CnQn6tMH.js";
|
|
6
6
|
const h = {
|
|
7
7
|
desktopCol: 6,
|
|
8
8
|
phoneCol: 2,
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Padding as l, TypoCaption as d, Group as s } from "@element/react-components";
|
|
3
3
|
import { GenericCard as m } from "./GenericCard.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { s as i } from "../../../genericCard.module-CnQn6tMH.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
columns: n,
|
|
6
7
|
data: e,
|
|
7
|
-
hiddenColumns:
|
|
8
|
-
noContentText:
|
|
9
|
-
}) => e?.length === 0 ? /* @__PURE__ */ r("div", { children:
|
|
8
|
+
hiddenColumns: a = [],
|
|
9
|
+
noContentText: o
|
|
10
|
+
}) => e?.length === 0 ? /* @__PURE__ */ r("div", { className: i.emptyContainer, children: /* @__PURE__ */ r(l, { variant: "standard", style: { textAlign: "center" }, className: i.empty, children: /* @__PURE__ */ r(d, { children: o }) }) }) : /* @__PURE__ */ r(s, { fullWidth: !0, direction: "vertical", primaryAlign: "center", secondaryAlign: "center", children: e?.map((t, c) => /* @__PURE__ */ r(
|
|
10
11
|
m,
|
|
11
12
|
{
|
|
12
|
-
item:
|
|
13
|
-
columns:
|
|
14
|
-
hiddenColumns:
|
|
13
|
+
item: t,
|
|
14
|
+
columns: n,
|
|
15
|
+
hiddenColumns: a
|
|
15
16
|
},
|
|
16
|
-
c
|
|
17
|
+
t.id ?? c
|
|
17
18
|
)) });
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
u as GenericCardList
|
|
20
21
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./assets/genericCard.css";
|
|
2
|
+
const t = "_cardTitle_a6o2v_1", o = "_cardBody_a6o2v_5", n = "_cardContent_a6o2v_10", _ = "_row_a6o2v_14", a = "_font_a6o2v_18", e = "_title_a6o2v_26", c = "_emptyContainer_a6o2v_34", r = "_empty_a6o2v_34", d = {
|
|
3
|
+
cardTitle: t,
|
|
4
|
+
cardBody: o,
|
|
5
|
+
cardContent: n,
|
|
6
|
+
row: _,
|
|
7
|
+
font: a,
|
|
8
|
+
title: e,
|
|
9
|
+
emptyContainer: c,
|
|
10
|
+
empty: r
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
d as s
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./assets/genericTable.css";
|
|
2
|
+
const t = "_filterButton_qtl7a_1", e = "_relativeParent_qtl7a_6", o = "_filterBadge_qtl7a_10", a = "_dense_qtl7a_17", B = {
|
|
3
|
+
filterButton: t,
|
|
4
|
+
relativeParent: e,
|
|
5
|
+
filterBadge: o,
|
|
6
|
+
dense: a
|
|
7
|
+
}, l = "_topBar_1msoo_1", _ = "_filterBar_1msoo_5", s = "_emptyTable_1msoo_9", n = "_elevation_1msoo_17", r = "_table_1msoo_22", c = {
|
|
8
|
+
topBar: l,
|
|
9
|
+
filterBar: _,
|
|
10
|
+
emptyTable: s,
|
|
11
|
+
elevation: n,
|
|
12
|
+
table: r
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
c as a,
|
|
16
|
+
B as s
|
|
17
|
+
};
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./genericTable.module-
|
|
1
|
+
import "./genericTable.module-Dk3yy2S3.js";
|
|
2
2
|
import { AlertBanner as t } from "./components/AlertBanner/AlertBanner.js";
|
|
3
3
|
import { BaseView as p } from "./components/BaseView/BaseView.js";
|
|
4
4
|
import { BasicHeading as x } from "./components/BasicHeading/BasicHeading.js";
|
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.7501",
|
|
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,12 +0,0 @@
|
|
|
1
|
-
import "./assets/genericCard.css";
|
|
2
|
-
const t = "_cardTitle_1738q_1", o = "_cardBody_1738q_5", _ = "_cardContent_1738q_10", c = "_row_1738q_14", n = "_font_1738q_18", r = "_title_1738q_26", e = {
|
|
3
|
-
cardTitle: t,
|
|
4
|
-
cardBody: o,
|
|
5
|
-
cardContent: _,
|
|
6
|
-
row: c,
|
|
7
|
-
font: n,
|
|
8
|
-
title: r
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
e as s
|
|
12
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "./assets/genericTable.css";
|
|
2
|
-
const t = "_filterButton_1xlao_1", e = "_filterBadge_1xlao_6", o = "_dense_1xlao_12", i = {
|
|
3
|
-
filterButton: t,
|
|
4
|
-
filterBadge: e,
|
|
5
|
-
dense: o
|
|
6
|
-
}, s = "_topBar_1msoo_1", a = "_filterBar_1msoo_5", _ = "_emptyTable_1msoo_9", l = "_elevation_1msoo_17", n = "_table_1msoo_22", B = {
|
|
7
|
-
topBar: s,
|
|
8
|
-
filterBar: a,
|
|
9
|
-
emptyTable: _,
|
|
10
|
-
elevation: l,
|
|
11
|
-
table: n
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
B as a,
|
|
15
|
-
i as s
|
|
16
|
-
};
|