@hortiview/shared-components 0.0.7857 → 0.0.7862
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.
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { uniqueId as
|
|
4
|
-
import { AvailableCustomIcons as
|
|
5
|
-
import { u as
|
|
6
|
-
import { I as
|
|
2
|
+
import { Button as u, Group as c, Icon as D, TypoBody as t } from "@element/react-components";
|
|
3
|
+
import { uniqueId as N } from "lodash";
|
|
4
|
+
import { AvailableCustomIcons as S } from "../../enums/AvailableCustomIcons.js";
|
|
5
|
+
import { u as x } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
6
|
+
import { I as M } from "../../Iconify-CY9lZjFd.js";
|
|
7
|
+
import { Modal as j } from "../Modal/Modal.js";
|
|
7
8
|
import { s as n } from "../../deleteModal.module-Ds3MDzdl.js";
|
|
8
|
-
const
|
|
9
|
-
title:
|
|
10
|
-
confirmButtonLabel:
|
|
9
|
+
const L = ({
|
|
10
|
+
title: o,
|
|
11
|
+
confirmButtonLabel: e,
|
|
11
12
|
cancelButtonLabel: l,
|
|
12
13
|
deleteHeader: a,
|
|
13
14
|
deleteBody: i,
|
|
@@ -20,22 +21,22 @@ const K = ({
|
|
|
20
21
|
onDelete: b,
|
|
21
22
|
isDeletePossible: d = !0
|
|
22
23
|
}) => {
|
|
23
|
-
const { isDesktop: C } =
|
|
24
|
+
const { isDesktop: C } = x(), k = (I) => {
|
|
24
25
|
I.detail.action === "close" && m(!1);
|
|
25
26
|
};
|
|
26
27
|
return /* @__PURE__ */ r(
|
|
27
|
-
|
|
28
|
+
j,
|
|
28
29
|
{
|
|
29
30
|
className: n.modal,
|
|
30
31
|
modalSize: C ? "small" : "fullscreen",
|
|
31
32
|
open: y,
|
|
32
33
|
onClose: k,
|
|
33
|
-
title:
|
|
34
|
+
title: o,
|
|
34
35
|
primaryButton: /* @__PURE__ */ r(
|
|
35
36
|
u,
|
|
36
37
|
{
|
|
37
38
|
variant: "danger",
|
|
38
|
-
label:
|
|
39
|
+
label: e,
|
|
39
40
|
onClick: b,
|
|
40
41
|
disabled: !d
|
|
41
42
|
}
|
|
@@ -55,24 +56,24 @@ const K = ({
|
|
|
55
56
|
}
|
|
56
57
|
);
|
|
57
58
|
}, z = ({
|
|
58
|
-
element:
|
|
59
|
-
isCrossedOut:
|
|
60
|
-
}) =>
|
|
61
|
-
|
|
59
|
+
element: o,
|
|
60
|
+
isCrossedOut: e = !1
|
|
61
|
+
}) => e ? /* @__PURE__ */ r("span", { className: n.crossedOut, children: o }) : o, B = ({ icon: o }) => o ? typeof o != "string" ? o : Object.values(S).includes(o) ? /* @__PURE__ */ r(
|
|
62
|
+
M,
|
|
62
63
|
{
|
|
63
|
-
icon:
|
|
64
|
+
icon: o,
|
|
64
65
|
iconSize: "xlarge",
|
|
65
66
|
className: n.colorDanger
|
|
66
67
|
}
|
|
67
|
-
) : /* @__PURE__ */ r(
|
|
68
|
-
deleteHeader:
|
|
69
|
-
deleteText:
|
|
68
|
+
) : /* @__PURE__ */ r(D, { icon: o, iconSize: "xlarge", className: n.colorDanger }) : /* @__PURE__ */ r(s, {}), O = ({
|
|
69
|
+
deleteHeader: o,
|
|
70
|
+
deleteText: e,
|
|
70
71
|
deleteBody: l
|
|
71
72
|
}) => /* @__PURE__ */ p(s, { children: [
|
|
72
|
-
/* @__PURE__ */ r(t, { level: 1, themeColor: "text-primary-on-background", children:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
l &&
|
|
73
|
+
/* @__PURE__ */ r(t, { level: 1, themeColor: "text-primary-on-background", children: o }),
|
|
74
|
+
e && typeof e == "string" && /* @__PURE__ */ r(t, { level: 2, themeColor: "text-secondary-on-background", children: e }),
|
|
75
|
+
e && typeof e != "string" && /* @__PURE__ */ r(s, { children: e }),
|
|
76
|
+
l && e === void 0 && /* @__PURE__ */ r(c, { direction: "vertical", gap: "none", children: l.map((a, i) => /* @__PURE__ */ r(
|
|
76
77
|
t,
|
|
77
78
|
{
|
|
78
79
|
level: 2,
|
|
@@ -80,11 +81,11 @@ const K = ({
|
|
|
80
81
|
themeColor: "text-secondary-on-background",
|
|
81
82
|
children: a
|
|
82
83
|
},
|
|
83
|
-
|
|
84
|
+
N(i.toString())
|
|
84
85
|
)) })
|
|
85
86
|
] }), A = ({
|
|
86
|
-
impossibleDeleteHeader:
|
|
87
|
-
}) => /* @__PURE__ */ r(t, { level: 1, themeColor: "text-primary-on-background", children:
|
|
87
|
+
impossibleDeleteHeader: o
|
|
88
|
+
}) => /* @__PURE__ */ r(t, { level: 1, themeColor: "text-primary-on-background", children: o });
|
|
88
89
|
export {
|
|
89
|
-
|
|
90
|
+
L as DeleteModal
|
|
90
91
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as B, Fragment as I } from "react/jsx-runtime";
|
|
2
|
-
import { Group as y,
|
|
2
|
+
import { Group as y, Button as h, Select as T, Switch as W, IconButton as j, NotificationBadge as b } from "@element/react-components";
|
|
3
3
|
import { useState as v } from "react";
|
|
4
4
|
import { s as c } from "../../genericTable.module-Dk3yy2S3.js";
|
|
5
5
|
import { u as A } from "../../useBreakpoints-BNeVhjjZ.js";
|
|
6
6
|
import "../../alertBanner.module-BPiKN0gh.js";
|
|
7
|
-
import { I as
|
|
7
|
+
import { I as z } from "../../Iconify-CY9lZjFd.js";
|
|
8
8
|
import "../../react-tooltip.min-BzHiZW8k.js";
|
|
9
9
|
import "../../overflowTooltip.module-BN3bp9Cj.js";
|
|
10
10
|
import "../../basicHeading.module-BYb8xvuk.js";
|
|
@@ -12,13 +12,14 @@ import "../../isArray-Ca4KR8TK.js";
|
|
|
12
12
|
import "../../_baseToString-BNXOi2Mf.js";
|
|
13
13
|
import "../../_equalByTag-DJhSpgVG.js";
|
|
14
14
|
import "../../iconify.module-C89oaw5b.js";
|
|
15
|
-
import { SearchBar as
|
|
15
|
+
import { SearchBar as H } from "../SearchBar/SearchBar.js";
|
|
16
16
|
import "../../listArea.module-CGpHPOji.js";
|
|
17
17
|
import "../../verticalDivider.module-C3_GL-fH.js";
|
|
18
18
|
import "../../baseView.module-uWbm_a5f.js";
|
|
19
19
|
import "../../BlockView.module-BPlNT5uh.js";
|
|
20
20
|
import "lodash";
|
|
21
21
|
import "../../contextMenu.module-DNQ8d9Aj.js";
|
|
22
|
+
import { Modal as K } from "../Modal/Modal.js";
|
|
22
23
|
import "../../deleteModal.module-Ds3MDzdl.js";
|
|
23
24
|
import "../../disclaimer.module-BZydt-Q_.js";
|
|
24
25
|
import "../../genericCard.module-DrQu86jX.js";
|
|
@@ -27,7 +28,6 @@ import "../../HeaderFilter.module-DiBmulr5.js";
|
|
|
27
28
|
import "../../infoGroup.module-Cxw88dfC.js";
|
|
28
29
|
import "../../bigLoadingSpinner.module-GgbFol8k.js";
|
|
29
30
|
import "../../loadingSpinner.module-CLtqSMWA.js";
|
|
30
|
-
import "../../modal.module-BlDp1Wiq.js";
|
|
31
31
|
import "../Scrollbar/Scrollbar.js";
|
|
32
32
|
import "react-hook-form";
|
|
33
33
|
import "../../formDatePicker.module-BV3ma_7y.js";
|
|
@@ -69,7 +69,7 @@ const xt = ({
|
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
71
|
/* @__PURE__ */ t(
|
|
72
|
-
|
|
72
|
+
K,
|
|
73
73
|
{
|
|
74
74
|
open: w,
|
|
75
75
|
onClose: S,
|
|
@@ -83,9 +83,9 @@ const xt = ({
|
|
|
83
83
|
)
|
|
84
84
|
] }) : /* @__PURE__ */ t(y, { secondaryAlign: "center", fullWidth: !0, children: k(d, f, F, !1) });
|
|
85
85
|
}, k = (m, a, i, n = !0) => m.map(({ id: r, title: p, availableOptions: d, icon: u, type: s }) => /* @__PURE__ */ B(y, { fullWidth: !0, secondaryAlign: "center", children: [
|
|
86
|
-
u ? /* @__PURE__ */ t(
|
|
86
|
+
u ? /* @__PURE__ */ t(z, { icon: u, iconSize: "medium" }) : null,
|
|
87
87
|
s === "select" && /* @__PURE__ */ t(
|
|
88
|
-
|
|
88
|
+
T,
|
|
89
89
|
{
|
|
90
90
|
className: n ? void 0 : c.dense,
|
|
91
91
|
variant: "outlined",
|
|
@@ -106,7 +106,7 @@ const xt = ({
|
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
108
|
s === "toggle" && /* @__PURE__ */ t(
|
|
109
|
-
|
|
109
|
+
W,
|
|
110
110
|
{
|
|
111
111
|
label: p,
|
|
112
112
|
onChange: (e) => i({ id: r, type: s, filterValue: e }),
|
|
@@ -114,7 +114,7 @@ const xt = ({
|
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
116
|
s === "search" && /* @__PURE__ */ t(
|
|
117
|
-
|
|
117
|
+
H,
|
|
118
118
|
{
|
|
119
119
|
placeholder: p,
|
|
120
120
|
searchTerm: a.find((e) => e.id === r)?.filterValue,
|
|
@@ -129,7 +129,7 @@ const xt = ({
|
|
|
129
129
|
}) => {
|
|
130
130
|
const { isDesktop: r } = A();
|
|
131
131
|
return a ? /* @__PURE__ */ t(
|
|
132
|
-
|
|
132
|
+
j,
|
|
133
133
|
{
|
|
134
134
|
icon: "filter_list_alt",
|
|
135
135
|
onClick: n,
|
|
@@ -18,6 +18,7 @@ import "../../baseView.module-uWbm_a5f.js";
|
|
|
18
18
|
import "../../BlockView.module-BPlNT5uh.js";
|
|
19
19
|
import "lodash";
|
|
20
20
|
import "../../contextMenu.module-DNQ8d9Aj.js";
|
|
21
|
+
import "../../modal.module-BlDp1Wiq.js";
|
|
21
22
|
import "../../deleteModal.module-Ds3MDzdl.js";
|
|
22
23
|
import "../../disclaimer.module-BZydt-Q_.js";
|
|
23
24
|
import "../../HashTabView.module-DUekkiTC.js";
|
|
@@ -25,7 +26,6 @@ import "../../HeaderFilter.module-DiBmulr5.js";
|
|
|
25
26
|
import "../../infoGroup.module-Cxw88dfC.js";
|
|
26
27
|
import "../../bigLoadingSpinner.module-GgbFol8k.js";
|
|
27
28
|
import "../../loadingSpinner.module-CLtqSMWA.js";
|
|
28
|
-
import "../../modal.module-BlDp1Wiq.js";
|
|
29
29
|
import "../Scrollbar/Scrollbar.js";
|
|
30
30
|
import "react-hook-form";
|
|
31
31
|
import "../../formDatePicker.module-BV3ma_7y.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.7862",
|
|
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>",
|