@hortiview/shared-components 2.15.0 → 2.16.1
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 +12 -0
- package/dist/AlertBanner-aW6joVUm.js +35 -0
- package/dist/assets/ButtonCard.css +1 -0
- package/dist/assets/ConfirmationModal.css +1 -0
- package/dist/assets/InfoCard.css +1 -1
- package/dist/assets/stepper.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.d.ts +5 -1
- package/dist/components/AlertBanner/AlertBanner.js +1 -1
- package/dist/components/AlertBanner/AlertBanner.test.js +9 -7
- package/dist/components/AlertBanner/LinkBanner.js +1 -1
- package/dist/components/AlertBanner/LinkBanner.test.js +3 -3
- package/dist/components/BaseView/BaseView.test.js +1 -1
- package/dist/components/ButtonCard/ButtonCard.d.ts +42 -0
- package/dist/components/ButtonCard/ButtonCard.js +51 -0
- package/dist/components/ButtonCard/ButtonCard.test.d.ts +1 -0
- package/dist/components/ButtonCard/ButtonCard.test.js +92 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +77 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.js +90 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.test.d.ts +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.test.js +221 -0
- package/dist/components/DeleteModal/DeleteModal.js +6 -6
- package/dist/components/Filter/Filter.js +3 -3
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +1 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +1 -1
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +4 -4
- package/dist/components/InfoCard/InfoCard.d.ts +6 -2
- package/dist/components/InfoCard/InfoCard.js +50 -37
- package/dist/components/InfoCard/InfoCard.test.js +40 -18
- package/dist/components/ModulePadding/ModulePadding.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +1 -1
- package/dist/components/Stepper/Stepper.d.ts +19 -14
- package/dist/components/Stepper/Stepper.js +94 -39
- package/dist/components/Stepper/Stepper.test.js +305 -121
- package/dist/components/Stepper/components/StepperButton.js +1 -1
- package/dist/components/Stepper/components/StepperHeader.d.ts +2 -11
- package/dist/components/Stepper/components/StepperHeader.js +141 -70
- package/dist/components/Stepper/components/StepperItem.d.ts +8 -0
- package/dist/components/Stepper/components/StepperItem.js +44 -0
- package/dist/components/Stepper/stepperStyles.d.ts +5 -0
- package/dist/components/Stepper/stepperStyles.js +4 -0
- package/dist/components/Stepper/stepperTypes.d.ts +102 -47
- package/dist/{index.es-B74L_Dje.js → index.es-BYcQTTL8.js} +3 -3
- package/dist/{index.es-C7cC1Hdu.js → index.es-C32E1Lcb.js} +1 -1
- package/dist/main.d.ts +3 -1
- package/dist/main.js +120 -116
- package/dist/services/UtilService.js +2 -2
- package/dist/stepper.module-DR_FbENS.js +23 -0
- package/package.json +3 -2
- package/dist/AlertBanner-Ci-F-6S9.js +0 -26
- package/dist/components/Stepper/components/StepperIndicator.d.ts +0 -9
- package/dist/components/Stepper/components/StepperIndicator.js +0 -16
- package/dist/stepper.module-c-CWmpkt.js +0 -15
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { a as i, s as n } from "../../react.esm-Bm0cAgpZ.js";
|
|
3
|
+
import { ConfirmationModal as l } from "./ConfirmationModal.js";
|
|
4
|
+
import { d as m, t as a, a as e, g as t } from "../../vi.bdSIJ99Y-B308Q-4w.js";
|
|
5
|
+
m("ConfirmationModal", () => {
|
|
6
|
+
a("renders modal title, label, list content, icon, and buttons", () => {
|
|
7
|
+
i(
|
|
8
|
+
/* @__PURE__ */ o(
|
|
9
|
+
l,
|
|
10
|
+
{
|
|
11
|
+
modalTitle: "Confirm Action",
|
|
12
|
+
confirmButtonLabel: "Confirm",
|
|
13
|
+
cancelButtonLabel: "Cancel",
|
|
14
|
+
label: "Are you sure?",
|
|
15
|
+
content: ["First item", "Second item"],
|
|
16
|
+
icon: "block",
|
|
17
|
+
isOpen: !0,
|
|
18
|
+
onConfirm: e.fn(),
|
|
19
|
+
onCancel: e.fn(),
|
|
20
|
+
isConfirmationDisabled: !1
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
), t(n.getByText("Confirm Action")).toBeInTheDocument(), t(n.getByText("Are you sure?")).toBeInTheDocument(), t(n.getByText("First item")).toBeInTheDocument(), t(n.getByText("Second item")).toBeInTheDocument(), t(n.getByTestId("block")).toBeInTheDocument(), t(n.getByText("Confirm")).toBeInTheDocument(), t(n.getByText("Cancel")).toBeInTheDocument();
|
|
24
|
+
}), a("renders string content", () => {
|
|
25
|
+
i(
|
|
26
|
+
/* @__PURE__ */ o(
|
|
27
|
+
l,
|
|
28
|
+
{
|
|
29
|
+
modalTitle: "Confirm Action",
|
|
30
|
+
confirmButtonLabel: "Confirm",
|
|
31
|
+
cancelButtonLabel: "Cancel",
|
|
32
|
+
label: "Are you sure?",
|
|
33
|
+
content: ["This action cannot be undone."],
|
|
34
|
+
isOpen: !0,
|
|
35
|
+
onConfirm: e.fn(),
|
|
36
|
+
onCancel: e.fn(),
|
|
37
|
+
isConfirmationDisabled: !1
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
), t(n.getByText("This action cannot be undone.")).toBeInTheDocument();
|
|
41
|
+
}), a("calls onConfirm when confirm button is clicked", () => {
|
|
42
|
+
const r = e.fn();
|
|
43
|
+
i(
|
|
44
|
+
/* @__PURE__ */ o(
|
|
45
|
+
l,
|
|
46
|
+
{
|
|
47
|
+
modalTitle: "Confirm Action",
|
|
48
|
+
confirmButtonLabel: "Confirm",
|
|
49
|
+
cancelButtonLabel: "Cancel",
|
|
50
|
+
label: "Are you sure?",
|
|
51
|
+
isOpen: !0,
|
|
52
|
+
onConfirm: r,
|
|
53
|
+
onCancel: e.fn(),
|
|
54
|
+
isConfirmationDisabled: !1
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
), n.getByText("Confirm").click(), t(r).toHaveBeenCalled();
|
|
58
|
+
}), a("calls onCancel when cancel button is clicked", () => {
|
|
59
|
+
const r = e.fn();
|
|
60
|
+
i(
|
|
61
|
+
/* @__PURE__ */ o(
|
|
62
|
+
l,
|
|
63
|
+
{
|
|
64
|
+
modalTitle: "Confirm Action",
|
|
65
|
+
confirmButtonLabel: "Confirm",
|
|
66
|
+
cancelButtonLabel: "Cancel",
|
|
67
|
+
label: "Are you sure?",
|
|
68
|
+
isOpen: !0,
|
|
69
|
+
onConfirm: e.fn(),
|
|
70
|
+
onCancel: r
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
), n.getByText("Cancel").click(), t(r).toHaveBeenCalled();
|
|
74
|
+
}), a("disables confirm button when confirmation is disabled", () => {
|
|
75
|
+
i(
|
|
76
|
+
/* @__PURE__ */ o(
|
|
77
|
+
l,
|
|
78
|
+
{
|
|
79
|
+
modalTitle: "Confirm Action",
|
|
80
|
+
confirmButtonLabel: "Confirm",
|
|
81
|
+
cancelButtonLabel: "Cancel",
|
|
82
|
+
label: "Are you sure?",
|
|
83
|
+
isOpen: !0,
|
|
84
|
+
onConfirm: e.fn(),
|
|
85
|
+
onCancel: e.fn(),
|
|
86
|
+
isConfirmationDisabled: !0
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
), t(n.getByTestId("confirm-button")).toBeDisabled();
|
|
90
|
+
}), a("renders correctly when content is null or undefined", () => {
|
|
91
|
+
const { rerender: r } = i(
|
|
92
|
+
/* @__PURE__ */ o(
|
|
93
|
+
l,
|
|
94
|
+
{
|
|
95
|
+
modalTitle: "Confirm Action",
|
|
96
|
+
confirmButtonLabel: "Confirm",
|
|
97
|
+
cancelButtonLabel: "Cancel",
|
|
98
|
+
label: "Are you sure?",
|
|
99
|
+
content: void 0,
|
|
100
|
+
isOpen: !0,
|
|
101
|
+
onConfirm: e.fn(),
|
|
102
|
+
onCancel: e.fn()
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
t(n.queryByRole("list")).not.toBeInTheDocument(), r(
|
|
107
|
+
/* @__PURE__ */ o(
|
|
108
|
+
l,
|
|
109
|
+
{
|
|
110
|
+
modalTitle: "Confirm Action",
|
|
111
|
+
confirmButtonLabel: "Confirm",
|
|
112
|
+
cancelButtonLabel: "Cancel",
|
|
113
|
+
label: "Are you sure?",
|
|
114
|
+
content: void 0,
|
|
115
|
+
isOpen: !0,
|
|
116
|
+
onConfirm: e.fn(),
|
|
117
|
+
onCancel: e.fn()
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
), t(n.queryByRole("list")).not.toBeInTheDocument();
|
|
121
|
+
}), a("renders correctly when content is an empty array", () => {
|
|
122
|
+
i(
|
|
123
|
+
/* @__PURE__ */ o(
|
|
124
|
+
l,
|
|
125
|
+
{
|
|
126
|
+
modalTitle: "Confirm Action",
|
|
127
|
+
confirmButtonLabel: "Confirm",
|
|
128
|
+
cancelButtonLabel: "Cancel",
|
|
129
|
+
label: "Are you sure?",
|
|
130
|
+
content: [],
|
|
131
|
+
isOpen: !0,
|
|
132
|
+
onConfirm: e.fn(),
|
|
133
|
+
onCancel: e.fn()
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
), t(n.getByText("Are you sure?")).toBeInTheDocument();
|
|
137
|
+
}), a("renders ReactNode as label", () => {
|
|
138
|
+
i(
|
|
139
|
+
/* @__PURE__ */ o(
|
|
140
|
+
l,
|
|
141
|
+
{
|
|
142
|
+
modalTitle: "Confirm Action",
|
|
143
|
+
confirmButtonLabel: "Confirm",
|
|
144
|
+
cancelButtonLabel: "Cancel",
|
|
145
|
+
label: /* @__PURE__ */ o("span", { "data-testid": "custom-label", children: "Custom Label" }),
|
|
146
|
+
isOpen: !0,
|
|
147
|
+
onConfirm: e.fn(),
|
|
148
|
+
onCancel: e.fn()
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
), t(n.getByTestId("custom-label")).toBeInTheDocument(), t(n.getByText("Custom Label")).toBeInTheDocument();
|
|
152
|
+
}), a("confirm button is not disabled by default", () => {
|
|
153
|
+
i(
|
|
154
|
+
/* @__PURE__ */ o(
|
|
155
|
+
l,
|
|
156
|
+
{
|
|
157
|
+
modalTitle: "Confirm Action",
|
|
158
|
+
confirmButtonLabel: "Confirm",
|
|
159
|
+
cancelButtonLabel: "Cancel",
|
|
160
|
+
label: "Are you sure?",
|
|
161
|
+
isOpen: !0,
|
|
162
|
+
onConfirm: e.fn(),
|
|
163
|
+
onCancel: e.fn()
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
), t(n.getByTestId("confirm-button")).not.toBeDisabled();
|
|
167
|
+
}), a("confirm button can be disabled", () => {
|
|
168
|
+
i(
|
|
169
|
+
/* @__PURE__ */ o(
|
|
170
|
+
l,
|
|
171
|
+
{
|
|
172
|
+
modalTitle: "Confirm Action",
|
|
173
|
+
confirmButtonLabel: "Confirm",
|
|
174
|
+
cancelButtonLabel: "Cancel",
|
|
175
|
+
label: "Are you sure?",
|
|
176
|
+
isOpen: !0,
|
|
177
|
+
onConfirm: e.fn(),
|
|
178
|
+
onCancel: e.fn(),
|
|
179
|
+
isConfirmationDisabled: !0
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
), t(n.getByTestId("confirm-button")).toBeDisabled();
|
|
183
|
+
}), a("renders bullet points when showBulletPoints is true", () => {
|
|
184
|
+
i(
|
|
185
|
+
/* @__PURE__ */ o(
|
|
186
|
+
l,
|
|
187
|
+
{
|
|
188
|
+
modalTitle: "Bullet Modal",
|
|
189
|
+
confirmButtonLabel: "Confirm",
|
|
190
|
+
cancelButtonLabel: "Cancel",
|
|
191
|
+
label: "Choose wisely:",
|
|
192
|
+
content: ["Bullet 1", "Bullet 2"],
|
|
193
|
+
showBulletPoints: !0,
|
|
194
|
+
isOpen: !0,
|
|
195
|
+
onConfirm: e.fn(),
|
|
196
|
+
onCancel: e.fn()
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
), t(n.getByText("Bullet 1")).toBeInTheDocument(), t(n.getByText("Bullet 2")).toBeInTheDocument();
|
|
200
|
+
const r = n.getByText("Bullet 1"), s = n.getByText("Bullet 2");
|
|
201
|
+
t(Array.from(r.classList).some((c) => c.includes("bulletPoint"))).toBe(!0), t(Array.from(s.classList).some((c) => c.includes("bulletPoint"))).toBe(!0);
|
|
202
|
+
}), a("does not render bullet point class when showBulletPoints is false", () => {
|
|
203
|
+
i(
|
|
204
|
+
/* @__PURE__ */ o(
|
|
205
|
+
l,
|
|
206
|
+
{
|
|
207
|
+
modalTitle: "No Bullet Modal",
|
|
208
|
+
confirmButtonLabel: "Confirm",
|
|
209
|
+
cancelButtonLabel: "Cancel",
|
|
210
|
+
label: "Choose wisely:",
|
|
211
|
+
content: ["Item 1", "Item 2"],
|
|
212
|
+
isOpen: !0,
|
|
213
|
+
onConfirm: e.fn(),
|
|
214
|
+
onCancel: e.fn()
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
);
|
|
218
|
+
const r = n.getByText("Item 1"), s = n.getByText("Item 2");
|
|
219
|
+
t(Array.from(r.classList).some((c) => c.includes("bulletPoint"))).toBe(!1), t(Array.from(s.classList).some((c) => c.includes("bulletPoint"))).toBe(!1);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
@@ -10,16 +10,16 @@ import { Iconify as z } from "../Iconify/Iconify.js";
|
|
|
10
10
|
import "react";
|
|
11
11
|
import "../../react-tooltip.min-CVsI--2Y.js";
|
|
12
12
|
import "../../orderBy-DLBJlgdL.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import "../../index-CuHybtft.js";
|
|
14
|
+
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
15
|
+
import { Modal as B } from "../Modal/Modal.js";
|
|
16
|
+
import { LoadingSpinner as M } from "../LoadingSpinner/Default/LoadingSpinner.js";
|
|
15
17
|
import "react-hook-form";
|
|
16
18
|
import "../../get-D8IXqiys.js";
|
|
17
19
|
import "../../isArray-BjSPDQ4v.js";
|
|
18
20
|
import "../../isString-DVA49FEo.js";
|
|
19
21
|
import "../../omit-CYY_mIYv.js";
|
|
20
22
|
import "../../types/Time.js";
|
|
21
|
-
import "../../index-CuHybtft.js";
|
|
22
|
-
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
23
23
|
import "../../react.esm-Bm0cAgpZ.js";
|
|
24
24
|
import '../../assets/DeleteModal.css';const j = "_bulletPoint_bd412_1", A = "_modal_bd412_7", G = "_colorDanger_bd412_11", q = "_crossedOut_bd412_15", e = {
|
|
25
25
|
bulletPoint: j,
|
|
@@ -47,7 +47,7 @@ import '../../assets/DeleteModal.css';const j = "_bulletPoint_bd412_1", A = "_mo
|
|
|
47
47
|
}) => {
|
|
48
48
|
const { isDesktop: D } = O();
|
|
49
49
|
return /* @__PURE__ */ o(
|
|
50
|
-
|
|
50
|
+
B,
|
|
51
51
|
{
|
|
52
52
|
isOnline: p,
|
|
53
53
|
offlineViewProps: k,
|
|
@@ -64,7 +64,7 @@ import '../../assets/DeleteModal.css';const j = "_bulletPoint_bd412_1", A = "_mo
|
|
|
64
64
|
label: s ? "" : t,
|
|
65
65
|
onClick: C,
|
|
66
66
|
disabled: !u || s || !p,
|
|
67
|
-
trailingIcon: s ? /* @__PURE__ */ o(
|
|
67
|
+
trailingIcon: s ? /* @__PURE__ */ o(M, { size: "sm", text: "", spinnerOnly: !0 }) : null
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
footerSupplemental: /* @__PURE__ */ o(
|
|
@@ -11,8 +11,10 @@ import { u as F } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
|
11
11
|
import "../../react-tooltip.min-CVsI--2Y.js";
|
|
12
12
|
import "../../orderBy-DLBJlgdL.js";
|
|
13
13
|
import { SearchBar as I } from "../SearchBar/SearchBar.js";
|
|
14
|
-
import "../../
|
|
14
|
+
import "../../index-CuHybtft.js";
|
|
15
|
+
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
15
16
|
import { Modal as K } from "../Modal/Modal.js";
|
|
17
|
+
import "../../uniqueId-BNVTeImh.js";
|
|
16
18
|
import { Select as M } from "../Select/Select.js";
|
|
17
19
|
import "react-hook-form";
|
|
18
20
|
import "../../get-D8IXqiys.js";
|
|
@@ -20,8 +22,6 @@ import "../../isArray-BjSPDQ4v.js";
|
|
|
20
22
|
import "../../isString-DVA49FEo.js";
|
|
21
23
|
import "../../omit-CYY_mIYv.js";
|
|
22
24
|
import "../../types/Time.js";
|
|
23
|
-
import "../../index-CuHybtft.js";
|
|
24
|
-
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
25
25
|
import "../../react.esm-Bm0cAgpZ.js";
|
|
26
26
|
import '../../assets/Filter.css';const T = "_filterButton_1qtzn_1", V = "_relativeParent_1qtzn_21", E = "_iconColor_1qtzn_25", J = "_filterBadge_1qtzn_29", Q = "_dense_1qtzn_36", U = "_filterModal_1qtzn_41", X = "_borderRadius_1qtzn_45", s = {
|
|
27
27
|
filterButton: T,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as C, jsxs as pa } from "react/jsx-runtime";
|
|
2
2
|
import { B as ba } from "../../../index.es-B8p8KCdj.js";
|
|
3
|
-
import { b as u, a as o, c as d, d as s, r as wa, s as be, t as M, m as j, l as D, f as z, e as N, g as ya, D as Pa } from "../../../index.es-
|
|
3
|
+
import { b as u, a as o, c as d, d as s, r as wa, s as be, t as M, m as j, l as D, f as z, e as N, g as ya, D as Pa } from "../../../index.es-C32E1Lcb.js";
|
|
4
4
|
import { D as ka } from "../../../index.es-B1h6DPYp.js";
|
|
5
5
|
import { P as Ma } from "../../../index.es-BanVdXEd.js";
|
|
6
6
|
import { useMemo as V, useState as $a } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { T as u } from "../../../index.es-
|
|
2
|
+
import { T as u } from "../../../index.es-BYcQTTL8.js";
|
|
3
3
|
import { g } from "../../../get-D8IXqiys.js";
|
|
4
4
|
import { o as f } from "../../../omit-CYY_mIYv.js";
|
|
5
5
|
import { useMemo as v } from "react";
|
|
@@ -4,7 +4,7 @@ import { _ as Qe, a as Ce, b as Ye, c as et, d as Oe, e as _e, f as tt } from ".
|
|
|
4
4
|
import { _ as Re } from "../../../parse-int-D-3oah_F.js";
|
|
5
5
|
import p, { forwardRef as rt, useRef as De, useImperativeHandle as Ne, useCallback as x, useEffect as V, useMemo as ke } from "react";
|
|
6
6
|
import { I as Be } from "../../../index.es-Dgxrk6xW.js";
|
|
7
|
-
import { T as Pe } from "../../../index.es-
|
|
7
|
+
import { T as Pe } from "../../../index.es-BYcQTTL8.js";
|
|
8
8
|
import { c as Me } from "../../../index.es-Da7ok-B-.js";
|
|
9
9
|
import { b as Fe, c as j } from "../../../tslib.es6-BDCynO9F.js";
|
|
10
10
|
import { M as nt, a as it } from "../../../component-Bz_dtX1r.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, Fragment as _, jsxs as z } from "react/jsx-runtime";
|
|
2
|
-
import { T as M } from "../../../index.es-
|
|
2
|
+
import { T as M } from "../../../index.es-BYcQTTL8.js";
|
|
3
3
|
import { a as P } from "../../../index.es-SjZ_-d7U.js";
|
|
4
4
|
import { useState as V, useCallback as W, useMemo as d } from "react";
|
|
5
5
|
import { useFormContext as D, Controller as v } from "react-hook-form";
|
|
@@ -14,10 +14,10 @@ import { a as cd, _ as fd, b as il } from "../../map-BprzXv4m.js";
|
|
|
14
14
|
import { r as gd, c as vd, e as pd, j as hd } from "../../es.string.iterator-UszlTFwY.js";
|
|
15
15
|
import { I as fa, _ as xa } from "../../index.es-t87yNd9Y.js";
|
|
16
16
|
import { _ as Us, a as Wi } from "../../find-CHg-_ooq.js";
|
|
17
|
-
import { T as ll } from "../../index.es-
|
|
17
|
+
import { T as ll } from "../../index.es-BYcQTTL8.js";
|
|
18
18
|
import { M as md, C as js } from "../../index.es-BoUnovl_.js";
|
|
19
19
|
import { S as qs } from "../../index.es-DUTChZks.js";
|
|
20
|
-
import { D as yd } from "../../index.es-
|
|
20
|
+
import { D as yd } from "../../index.es-C32E1Lcb.js";
|
|
21
21
|
import { r as bd, a as wd } from "../../parse-int-D-3oah_F.js";
|
|
22
22
|
import { unstable_batchedUpdates as ga, createPortal as Cd } from "react-dom";
|
|
23
23
|
import { _ as Rd, a as Sd, b as sl, S as ul } from "../../index.es-nwjKmW7-.js";
|
|
@@ -32,6 +32,8 @@ import { u as Id } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
|
32
32
|
import "../../react-tooltip.min-CVsI--2Y.js";
|
|
33
33
|
import "../../orderBy-DLBJlgdL.js";
|
|
34
34
|
import { O as fl } from "../../OfflineView-CIwV08EQ.js";
|
|
35
|
+
import "../../index-CuHybtft.js";
|
|
36
|
+
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
35
37
|
import "../../uniqueId-BNVTeImh.js";
|
|
36
38
|
import "react-hook-form";
|
|
37
39
|
import "../../get-D8IXqiys.js";
|
|
@@ -39,8 +41,6 @@ import "../../isArray-BjSPDQ4v.js";
|
|
|
39
41
|
import "../../isString-DVA49FEo.js";
|
|
40
42
|
import "../../omit-CYY_mIYv.js";
|
|
41
43
|
import "../../types/Time.js";
|
|
42
|
-
import "../../index-CuHybtft.js";
|
|
43
|
-
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
44
44
|
import "../../react.esm-Bm0cAgpZ.js";
|
|
45
45
|
import { useGenerateColumns as Ad, useGenerateTableData as _d } from "./GenericTableService.js";
|
|
46
46
|
import { GenericCardList as Dd } from "./Mobile/GenericCardList.js";
|
|
@@ -12,7 +12,11 @@ export type InfoCardProps = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Type of the failed health check. Depending on the type, a different icon of 3rem size will be displayed.
|
|
14
14
|
*/
|
|
15
|
-
type: 'database' | 'iot' | 'platform' | 'done' | 'other';
|
|
15
|
+
type: 'database' | 'iot' | 'platform' | 'done' | 'other' | 'celebration';
|
|
16
|
+
/**
|
|
17
|
+
* The color of the icon. Depending on the type, a different default color will be applied, but it can be overridden by providing a value for this prop.
|
|
18
|
+
*/
|
|
19
|
+
colorOverride?: 'primary' | 'secondary' | 'success' | 'danger';
|
|
16
20
|
/**
|
|
17
21
|
* The card has a default outline. For design consistency, this prop should only be set to 'false' if the card is embedded, e.g. in a table.
|
|
18
22
|
*/
|
|
@@ -22,4 +26,4 @@ export type InfoCardProps = {
|
|
|
22
26
|
*/
|
|
23
27
|
isFullHeight?: boolean;
|
|
24
28
|
};
|
|
25
|
-
export declare const InfoCard: ({ title, subtitle, type, isOutlined, isFullHeight, }: InfoCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const InfoCard: ({ title, subtitle, type, colorOverride, isOutlined, isFullHeight, }: InfoCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,59 +1,72 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { C as
|
|
3
|
-
import { G as
|
|
4
|
-
import { P as
|
|
5
|
-
import { T as
|
|
6
|
-
import { Iconify as
|
|
7
|
-
import '../../assets/InfoCard.css';const
|
|
8
|
-
database:
|
|
9
|
-
spin:
|
|
10
|
-
done:
|
|
11
|
-
iot:
|
|
12
|
-
platform:
|
|
13
|
-
other:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { C as _, a as p, b as m } from "../../index.es-BPv5dCFQ.js";
|
|
3
|
+
import { G as h } from "../../index.es-oxil0uFe.js";
|
|
4
|
+
import { P as u } from "../../index.es-BanVdXEd.js";
|
|
5
|
+
import { T as c } from "../../index.es-SjZ_-d7U.js";
|
|
6
|
+
import { Iconify as f } from "../Iconify/Iconify.js";
|
|
7
|
+
import '../../assets/InfoCard.css';const g = "_database_1vpro_1", v = "_spin_1vpro_1", y = "_done_1vpro_16", b = "_iot_1vpro_20", C = "_platform_1vpro_21", x = "_other_1vpro_22", N = "_celebration_1vpro_26", H = "_primary_1vpro_30", T = "_secondary_1vpro_34", k = "_danger_1vpro_38", I = "_success_1vpro_42", A = "_crossedOut_1vpro_46", O = "_fullHeight_1vpro_65", j = "_centerText_1vpro_69", r = {
|
|
8
|
+
database: g,
|
|
9
|
+
spin: v,
|
|
10
|
+
done: y,
|
|
11
|
+
iot: b,
|
|
12
|
+
platform: C,
|
|
13
|
+
other: x,
|
|
14
|
+
celebration: N,
|
|
15
|
+
primary: H,
|
|
16
|
+
secondary: T,
|
|
17
|
+
danger: k,
|
|
18
|
+
success: I,
|
|
19
|
+
crossedOut: A,
|
|
20
|
+
fullHeight: O,
|
|
21
|
+
centerText: j
|
|
22
|
+
}, q = ({
|
|
23
|
+
title: o,
|
|
24
|
+
subtitle: t,
|
|
25
|
+
type: n,
|
|
26
|
+
colorOverride: i,
|
|
27
|
+
isOutlined: l = !0,
|
|
28
|
+
isFullHeight: s = !1
|
|
23
29
|
}) => {
|
|
24
|
-
const
|
|
30
|
+
const a = s ? r.fullHeight : "";
|
|
25
31
|
return /* @__PURE__ */ e(
|
|
26
|
-
|
|
32
|
+
_,
|
|
27
33
|
{
|
|
28
|
-
variant:
|
|
29
|
-
"data-testid": `${
|
|
34
|
+
variant: l ? "outlined" : "flat",
|
|
35
|
+
"data-testid": `${n}-health-check-failed-card`,
|
|
30
36
|
bodyAlignment: "centered",
|
|
31
|
-
height:
|
|
32
|
-
children: /* @__PURE__ */ e(
|
|
33
|
-
|
|
37
|
+
height: s ? "100%" : "auto",
|
|
38
|
+
children: /* @__PURE__ */ e(p, { className: a, children: /* @__PURE__ */ e(u, { variant: "airy", className: a, children: /* @__PURE__ */ e(m, { className: a, children: /* @__PURE__ */ d(
|
|
39
|
+
h,
|
|
34
40
|
{
|
|
35
41
|
gap: "none",
|
|
36
42
|
primaryAlign: "center",
|
|
37
43
|
secondaryAlign: "center",
|
|
38
44
|
direction: "vertical",
|
|
39
45
|
fullWidth: !0,
|
|
40
|
-
className:
|
|
46
|
+
className: r.centerText,
|
|
41
47
|
children: [
|
|
42
|
-
/* @__PURE__ */ e(
|
|
43
|
-
/* @__PURE__ */ e(
|
|
44
|
-
/* @__PURE__ */ e(
|
|
48
|
+
/* @__PURE__ */ e(F, { type: n, colorOverride: i }),
|
|
49
|
+
/* @__PURE__ */ e(c, { level: 1, bold: !0, children: o }),
|
|
50
|
+
/* @__PURE__ */ e(c, { level: 2, themeColor: "text-secondary-on-background", children: t })
|
|
45
51
|
]
|
|
46
52
|
}
|
|
47
53
|
) }) }) })
|
|
48
54
|
}
|
|
49
55
|
);
|
|
50
|
-
},
|
|
56
|
+
}, B = {
|
|
51
57
|
database: "sync",
|
|
52
58
|
iot: "settings_input_antenna",
|
|
53
59
|
platform: "engineering",
|
|
54
60
|
done: "sunny-check",
|
|
55
|
-
other: "error"
|
|
56
|
-
|
|
61
|
+
other: "error",
|
|
62
|
+
celebration: "celebration"
|
|
63
|
+
}, F = ({
|
|
64
|
+
type: o,
|
|
65
|
+
colorOverride: t
|
|
66
|
+
}) => {
|
|
67
|
+
const n = t ? r[t] : r[o];
|
|
68
|
+
return /* @__PURE__ */ e("span", { className: o === "iot" ? r.crossedOut : "", children: /* @__PURE__ */ e(f, { icon: B[o], className: n, iconSize: "xlarge" }) });
|
|
69
|
+
};
|
|
57
70
|
export {
|
|
58
|
-
|
|
71
|
+
q as InfoCard
|
|
59
72
|
};
|
|
@@ -1,26 +1,48 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { a as r, s as
|
|
3
|
-
import { InfoCard as
|
|
4
|
-
import { d as
|
|
5
|
-
|
|
6
|
-
const
|
|
2
|
+
import { a as r, s as t } from "../../react.esm-Bm0cAgpZ.js";
|
|
3
|
+
import { InfoCard as n } from "./InfoCard.js";
|
|
4
|
+
import { d as l, t as i, g as o } from "../../vi.bdSIJ99Y-B308Q-4w.js";
|
|
5
|
+
l("HealthCheckFailed Component", () => {
|
|
6
|
+
const c = "Test Title", s = "Test Subtitle";
|
|
7
7
|
i("displays the correct title and subtitle", () => {
|
|
8
|
-
r(/* @__PURE__ */ a(
|
|
8
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "database" })), o(t.getByText(c)).toBeInTheDocument(), o(t.getByText(s)).toBeInTheDocument();
|
|
9
9
|
}), i('displays the correct icon for type "database"', () => {
|
|
10
|
-
r(/* @__PURE__ */ a(
|
|
11
|
-
const
|
|
12
|
-
|
|
10
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "database" }));
|
|
11
|
+
const e = t.getByText("sync");
|
|
12
|
+
o(e).toBeInTheDocument(), o(t.getByTestId("database-health-check-failed-card")).toBeInTheDocument();
|
|
13
13
|
}), i('displays the correct icon for type "iot"', () => {
|
|
14
|
-
r(/* @__PURE__ */ a(
|
|
15
|
-
const
|
|
16
|
-
|
|
14
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "iot" }));
|
|
15
|
+
const e = t.getByText("settings_input_antenna");
|
|
16
|
+
o(e).toBeInTheDocument(), o(t.getByTestId("iot-health-check-failed-card")).toBeInTheDocument();
|
|
17
17
|
}), i('displays the correct icon for type "platform"', () => {
|
|
18
|
-
r(/* @__PURE__ */ a(
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "platform" }));
|
|
19
|
+
const e = t.getByText("engineering");
|
|
20
|
+
o(e).toBeInTheDocument(), o(t.getByTestId("platform-health-check-failed-card")).toBeInTheDocument();
|
|
21
21
|
}), i('displays the correct icon for type "other"', () => {
|
|
22
|
-
r(/* @__PURE__ */ a(
|
|
23
|
-
const
|
|
24
|
-
|
|
22
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "other" }));
|
|
23
|
+
const e = t.getByText("error");
|
|
24
|
+
o(e).toBeInTheDocument(), o(t.getByTestId("other-health-check-failed-card")).toBeInTheDocument();
|
|
25
|
+
}), i('displays the correct icon for type "celebration"', () => {
|
|
26
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "celebration" }));
|
|
27
|
+
const e = t.getByText("celebration");
|
|
28
|
+
o(e).toBeInTheDocument(), o(t.getByTestId("celebration-health-check-failed-card")).toBeInTheDocument();
|
|
29
|
+
}), i("applies colorOverride class for primary", () => {
|
|
30
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "database", colorOverride: "primary" }));
|
|
31
|
+
const e = t.getByText("sync").closest("span")?.querySelector("svg, span, i");
|
|
32
|
+
o(e?.className).toMatch(/primary/);
|
|
33
|
+
}), i("applies colorOverride class for secondary", () => {
|
|
34
|
+
r(
|
|
35
|
+
/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "database", colorOverride: "secondary" })
|
|
36
|
+
);
|
|
37
|
+
const e = t.getByText("sync").closest("span")?.querySelector("svg, span, i");
|
|
38
|
+
o(e?.className).toMatch(/secondary/);
|
|
39
|
+
}), i("applies colorOverride class for success", () => {
|
|
40
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "database", colorOverride: "success" }));
|
|
41
|
+
const e = t.getByText("sync").closest("span")?.querySelector("svg, span, i");
|
|
42
|
+
o(e?.className).toMatch(/success/);
|
|
43
|
+
}), i("applies colorOverride class for danger", () => {
|
|
44
|
+
r(/* @__PURE__ */ a(n, { title: c, subtitle: s, type: "database", colorOverride: "danger" }));
|
|
45
|
+
const e = t.getByText("sync").closest("span")?.querySelector("svg, span, i");
|
|
46
|
+
o(e?.className).toMatch(/danger/);
|
|
25
47
|
});
|
|
26
48
|
});
|
|
@@ -5,6 +5,8 @@ import "react";
|
|
|
5
5
|
import { u as m } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
6
6
|
import "../../react-tooltip.min-CVsI--2Y.js";
|
|
7
7
|
import "../../orderBy-DLBJlgdL.js";
|
|
8
|
+
import "../../index-CuHybtft.js";
|
|
9
|
+
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
8
10
|
import "../../uniqueId-BNVTeImh.js";
|
|
9
11
|
import "react-hook-form";
|
|
10
12
|
import "../../get-D8IXqiys.js";
|
|
@@ -12,8 +14,6 @@ import "../../isArray-BjSPDQ4v.js";
|
|
|
12
14
|
import "../../isString-DVA49FEo.js";
|
|
13
15
|
import "../../omit-CYY_mIYv.js";
|
|
14
16
|
import "../../types/Time.js";
|
|
15
|
-
import "../../index-CuHybtft.js";
|
|
16
|
-
import "../SharedComponentsPermissionProvider/PermissionContext.js";
|
|
17
17
|
import "../../react.esm-Bm0cAgpZ.js";
|
|
18
18
|
const D = ({ children: o }) => {
|
|
19
19
|
const { isDesktop: t } = m();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { I as l } from "../../index.es-t87yNd9Y.js";
|
|
3
|
-
import { T as u } from "../../index.es-
|
|
3
|
+
import { T as u } from "../../index.es-BYcQTTL8.js";
|
|
4
4
|
import '../../assets/SearchBar.css';const b = "_searchbar_g83qp_1", d = {
|
|
5
5
|
searchbar: b
|
|
6
6
|
}, g = ({
|
|
@@ -2,20 +2,25 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { StepperProps } from './stepperTypes';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* A component that displays a stepper with a header, content, and navigation buttons.<br />
|
|
6
|
-
* Available in
|
|
5
|
+
* A component that displays a stepper with a header, content area, and navigation buttons.<br />
|
|
6
|
+
* Available in three styles: 'DESKTOP', 'SMALL', and 'DOTS'.<br />
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* - DESKTOP: Default EDS-style appearance.
|
|
9
|
+
* - SMALL: A compact version of the desktop stepper that shows only the current step, the total number of steps in the header, and the title of the current step.
|
|
10
|
+
* - DOTS: A minimal version that displays centered dots for each step and the title of the current step in the header.
|
|
9
11
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
* @
|
|
12
|
+
* **Note: The stepper is not a controlled component. You must manage the current step, content, and loading state yourself.**
|
|
13
|
+
*
|
|
14
|
+
* @param stepperStyle - The style of stepper indicator. Defaults to `StepperStyle.DESKTOP`. See {@link StepperStyle}.
|
|
15
|
+
* @param steps - An array of step definitions for the stepper.
|
|
16
|
+
* @param currentStepId - The ID of the current step. Must match the `id` property of one of the steps in the `steps` array.
|
|
17
|
+
* @param overwriteTotalSteps - A custom total number of steps to display in the header. Only applicable to the 'SMALL' stepper.
|
|
18
|
+
* @param isStepLoading - Indicates whether the current step is loading. If `true`, the next button is disabled and displays a loading state.
|
|
19
|
+
* @param showStepperHeader - Indicates whether the stepper header is displayed. Defaults to `true`.
|
|
20
|
+
* @param showStepperButtons - Indicates whether the stepper navigation buttons are displayed. Defaults to `true`.
|
|
21
|
+
* @param stepperButtonAlignment - The alignment of the stepper button group. Defaults to `'center'`.
|
|
22
|
+
* @param showPreviousButtonOnFirstStep - Indicates whether the previous button is shown on the first step. This can be useful for providing a cancel action. Defaults to `false`.
|
|
23
|
+
* @param children - The content to render inside the stepper.
|
|
24
|
+
* @returns The rendered stepper component.
|
|
20
25
|
*/
|
|
21
|
-
export declare const Stepper: ({
|
|
26
|
+
export declare const Stepper: ({ stepperStyle, steps, currentStepId, overwriteTotalSteps, isStepLoading, showStepperHeader, showStepperButtons, stepperButtonAlignment, showPreviousButtonOnFirstStep, children, }: PropsWithChildren<StepperProps>) => import("react/jsx-runtime").JSX.Element | null;
|