@nice2dev/ui 1.3.17 → 1.3.18
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 +71 -0
- package/README.md +2 -2
- package/dist/{NiceDataGrid-aNPAHsWy.cjs → NiceDataGrid-CFibAGHt.cjs} +1 -1
- package/dist/NiceForm-ChRj4r3f.cjs +1 -0
- package/dist/{NiceMention-CMqAGvO0.cjs → NiceMention-DNx3d9L7.cjs} +1 -1
- package/dist/NiceModuleLifecyclePanel-D8Q081R6.cjs +1 -0
- package/dist/{NiceSavedQueryPanel-JHrSlHAV.cjs → NiceSavedQueryPanel-BuRAgrBk.cjs} +1 -1
- package/dist/{NiceScheduler-2TwOZq-y.cjs → NiceScheduler-DAoo1eyo.cjs} +1 -1
- package/dist/{core-lazy-Cda-D35m.cjs → core-lazy-DohJQ33c.cjs} +1 -1
- package/dist/data/treeDragSession.mjs +52 -46
- package/dist/data.cjs +1 -1
- package/dist/editors/inputs/NiceAutocomplete.mjs +44 -46
- package/dist/editors/pickers/NiceDateTimePicker.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/index.cjs +113 -113
- package/dist/index.d.ts +111 -21
- package/dist/index.mjs +364 -359
- package/dist/navigation/NiceIconRail.mjs +74 -53
- package/dist/navigation/NiceNavShell.mjs +855 -807
- package/dist/navigation/NiceSetupWizard.mjs +287 -278
- package/dist/navigation/NiceSidebarNav.mjs +1487 -1144
- package/dist/navigation/navItemDrag.mjs +42 -0
- package/dist/navigation/navShellPane.mjs +16 -11
- package/dist/navigation/sidebarNavTypes.mjs +1 -0
- package/dist/navigation/sidebarSearch.mjs +28 -0
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +63 -21
- package/dist/style.css +2 -2
- package/package.json +4 -4
- package/dist/NiceForm-BtRBLffD.cjs +0 -1
- package/dist/NiceModuleLifecyclePanel-ugNtHimh.cjs +0 -1
|
@@ -1,164 +1,173 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { useRovingFocus as
|
|
3
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as i, jsxs as c, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useRovingFocus as fi, useNiceAccessMode as _i, useNiceTranslation as wi, useControlId as vi, useIntent as zi, useInputHints as bi, NiceIcon as I, NiceThemeProvider as gi, useMediaQuery as Ni } from "@nice2dev/ui-core";
|
|
3
|
+
import { forwardRef as xi, useRef as L, useState as b, useMemo as P, useEffect as J, useCallback as h, useContext as ki, createContext as Si } from "react";
|
|
4
4
|
import { NiceButton as Ge } from "../buttons/NiceButton.mjs";
|
|
5
|
-
import { NiceSpinner as
|
|
6
|
-
import { NiceLanguagePicker as
|
|
7
|
-
import { NiceThemePicker as
|
|
8
|
-
import { NiceConfirmDialog as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
5
|
+
import { NiceSpinner as Ci } from "../display/NiceSpinner.mjs";
|
|
6
|
+
import { NiceLanguagePicker as Ii } from "../editors/pickers/NiceLanguagePicker.mjs";
|
|
7
|
+
import { NiceThemePicker as yi } from "../editors/pickers/NiceThemePicker.mjs";
|
|
8
|
+
import { NiceConfirmDialog as $i } from "../feedback/NiceConfirmDialog.mjs";
|
|
9
|
+
const Li = [], Ve = /* @__PURE__ */ Si(null);
|
|
10
|
+
function ji() {
|
|
11
|
+
const g = ki(Ve);
|
|
12
|
+
if (!g)
|
|
13
13
|
throw new Error("useSetupWizard must be used within NiceSetupWizard");
|
|
14
|
-
return
|
|
14
|
+
return g;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const Mi = /* @__PURE__ */ i(I, { name: "refresh", size: 18 });
|
|
17
|
+
function qi({ children: g }) {
|
|
18
|
+
const M = L(null), p = Ni("(prefers-reduced-motion: reduce)");
|
|
19
|
+
return J(() => {
|
|
20
|
+
const Y = M.current?.querySelectorAll("svg") ?? [];
|
|
21
|
+
for (const S of Y)
|
|
22
|
+
p ? S.pauseAnimations?.() : S.unpauseAnimations?.();
|
|
23
|
+
}, [p, g]), /* @__PURE__ */ i("div", { ref: M, className: "nice-setup-wizard__loading-indicator", "aria-hidden": "true", children: g });
|
|
24
|
+
}
|
|
25
|
+
const Di = /* @__PURE__ */ Object.assign(
|
|
26
|
+
/* @__PURE__ */ xi(
|
|
18
27
|
({
|
|
19
|
-
steps:
|
|
20
|
-
initialValues:
|
|
21
|
-
activeStep:
|
|
22
|
-
completedSteps:
|
|
23
|
-
layout:
|
|
24
|
-
size:
|
|
28
|
+
steps: g = Li,
|
|
29
|
+
initialValues: M = {},
|
|
30
|
+
activeStep: p,
|
|
31
|
+
completedSteps: Y,
|
|
32
|
+
layout: S = "horizontal",
|
|
33
|
+
size: W = "md",
|
|
25
34
|
defaultQuickMode: Je = !1,
|
|
26
|
-
allowQuickModeToggle:
|
|
35
|
+
allowQuickModeToggle: pe = !0,
|
|
27
36
|
showStepNumbers: Ye = !0,
|
|
28
37
|
showProgress: Ue = !0,
|
|
29
|
-
showEstimatedTime:
|
|
38
|
+
showEstimatedTime: me = !1,
|
|
30
39
|
allowStepClick: Xe = !0,
|
|
31
|
-
showReviewStep:
|
|
32
|
-
persistKey:
|
|
33
|
-
animation:
|
|
40
|
+
showReviewStep: he = !1,
|
|
41
|
+
persistKey: f,
|
|
42
|
+
animation: fe = "slide",
|
|
34
43
|
theme: _e,
|
|
35
|
-
branding:
|
|
36
|
-
showLanguagePicker:
|
|
44
|
+
branding: U,
|
|
45
|
+
showLanguagePicker: we = !1,
|
|
37
46
|
languagePickerProps: Ze,
|
|
38
|
-
showThemePicker:
|
|
47
|
+
showThemePicker: ve = !1,
|
|
39
48
|
themePickerProps: Ke,
|
|
40
|
-
showRestart:
|
|
41
|
-
onRestart:
|
|
42
|
-
restart:
|
|
43
|
-
header:
|
|
44
|
-
footer:
|
|
45
|
-
onStepChange:
|
|
46
|
-
onValuesChange:
|
|
49
|
+
showRestart: X = !1,
|
|
50
|
+
onRestart: Z,
|
|
51
|
+
restart: N = {},
|
|
52
|
+
header: ze,
|
|
53
|
+
footer: be,
|
|
54
|
+
onStepChange: ge,
|
|
55
|
+
onValuesChange: A,
|
|
47
56
|
onComplete: E,
|
|
48
|
-
onCancel:
|
|
49
|
-
labels:
|
|
57
|
+
onCancel: K,
|
|
58
|
+
labels: m = {},
|
|
50
59
|
accessMode: ei,
|
|
51
|
-
height:
|
|
52
|
-
loading:
|
|
60
|
+
height: Ne,
|
|
61
|
+
loading: ee = !1,
|
|
53
62
|
loadingText: ii,
|
|
54
63
|
loadingIndicator: ni,
|
|
55
|
-
id:
|
|
64
|
+
id: xe,
|
|
56
65
|
className: ti,
|
|
57
|
-
style:
|
|
58
|
-
},
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
orientation:
|
|
66
|
+
style: ke
|
|
67
|
+
}, q) => {
|
|
68
|
+
const Se = L(null);
|
|
69
|
+
fi(Se, {
|
|
70
|
+
orientation: S === "vertical" ? "vertical" : "horizontal",
|
|
62
71
|
wrap: !0,
|
|
63
72
|
activateOnMove: !0
|
|
64
73
|
});
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
74
|
+
const ie = _i(ei, xe), Ce = ie === "hidden", { t: d } = wi(), Ie = vi(xe), [B, ai] = b(Je), F = P(() => B ? g.filter((e) => !e.quickModeSkip) : g, [g, B]), r = P(() => {
|
|
75
|
+
if (!he)
|
|
67
76
|
return F;
|
|
68
77
|
const e = {
|
|
69
78
|
id: "__review__",
|
|
70
|
-
title:
|
|
71
|
-
icon: /* @__PURE__ */ i(
|
|
72
|
-
content: (n) => /* @__PURE__ */
|
|
79
|
+
title: m.review ?? d("wizard.review", "Review"),
|
|
80
|
+
icon: /* @__PURE__ */ i(I, { name: "clipboard", size: 16 }),
|
|
81
|
+
content: (n) => /* @__PURE__ */ c("div", { className: "nice-setup-wizard__review", children: [
|
|
73
82
|
/* @__PURE__ */ i("h3", { children: d("wizard.reviewTitle", "Review Your Setup") }),
|
|
74
|
-
F.filter((a) => a.summary).map((a) => /* @__PURE__ */
|
|
83
|
+
F.filter((a) => a.summary).map((a) => /* @__PURE__ */ c("div", { className: "nice-setup-wizard__review-section", children: [
|
|
75
84
|
/* @__PURE__ */ i("h4", { children: a.title }),
|
|
76
85
|
a.summary?.(n.values)
|
|
77
86
|
] }, a.id))
|
|
78
87
|
] })
|
|
79
88
|
};
|
|
80
89
|
return [...F, e];
|
|
81
|
-
}, [F,
|
|
82
|
-
if (
|
|
90
|
+
}, [F, he, m.review, d]), [u, ye] = b(() => {
|
|
91
|
+
if (f)
|
|
83
92
|
try {
|
|
84
|
-
const e = localStorage.getItem(
|
|
93
|
+
const e = localStorage.getItem(f);
|
|
85
94
|
if (e)
|
|
86
|
-
return { ...
|
|
95
|
+
return { ...M, ...JSON.parse(e) };
|
|
87
96
|
} catch {
|
|
88
97
|
}
|
|
89
|
-
return
|
|
90
|
-
}), [w,
|
|
98
|
+
return M;
|
|
99
|
+
}), [w, $e] = b(() => {
|
|
100
|
+
if (p)
|
|
101
|
+
return p;
|
|
91
102
|
if (f)
|
|
92
|
-
return f;
|
|
93
|
-
if (h)
|
|
94
103
|
try {
|
|
95
|
-
const e = localStorage.getItem(`${
|
|
104
|
+
const e = localStorage.getItem(`${f}_step`);
|
|
96
105
|
if (e && r.some((n) => n.id === e))
|
|
97
106
|
return e;
|
|
98
107
|
} catch {
|
|
99
108
|
}
|
|
100
109
|
return r[0]?.id ?? "";
|
|
101
|
-
}), [
|
|
110
|
+
}), [ne, Le] = b(() => /* @__PURE__ */ new Set([w])), [O, Me] = b({}), [qe, j] = b(!1), [Be, Oe] = b(!1), te = L(!1), [Re, ae] = b("next"), [ri, re] = b(!1), Te = r.findIndex((e) => e.id === w), l = Te >= 0 ? Te : r.length > 0 ? 0 : -1, t = r[l], R = l === 0, se = l === r.length - 1, C = r.some((e) => e.final) ? !!t?.final : se && t?.final !== !1, x = P(() => {
|
|
102
111
|
const e = /* @__PURE__ */ new Map();
|
|
103
112
|
for (const n of r)
|
|
104
113
|
n.numbered !== !1 && e.set(n.id, e.size + 1);
|
|
105
114
|
return e;
|
|
106
|
-
}, [r]),
|
|
107
|
-
|
|
108
|
-
if (
|
|
115
|
+
}, [r]), si = r.slice(0, l + 1).filter((e) => e.numbered !== !1).length, D = x.size > 0 ? si / x.size * 100 : 0, Pe = L(p);
|
|
116
|
+
J(() => {
|
|
117
|
+
if (p === void 0 || p === Pe.current)
|
|
109
118
|
return;
|
|
110
|
-
const e = r.findIndex((n) => n.id ===
|
|
111
|
-
e < 0 || (
|
|
119
|
+
const e = r.findIndex((n) => n.id === p);
|
|
120
|
+
e < 0 || (Pe.current = p, p !== w && (ae(
|
|
112
121
|
e > r.findIndex((n) => n.id === w) ? "next" : "prev"
|
|
113
|
-
),
|
|
114
|
-
}, [
|
|
115
|
-
|
|
116
|
-
}, [u, w,
|
|
117
|
-
const
|
|
122
|
+
), $e(p), Le((n) => new Set(n).add(p))));
|
|
123
|
+
}, [p, r, w]), J(() => {
|
|
124
|
+
f && (localStorage.setItem(f, JSON.stringify(u)), localStorage.setItem(`${f}_step`, w));
|
|
125
|
+
}, [u, w, f]);
|
|
126
|
+
const ce = h(
|
|
118
127
|
(e, n) => {
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
return
|
|
128
|
+
ye((a) => {
|
|
129
|
+
const o = { ...a, [e]: n };
|
|
130
|
+
return A?.(o), o;
|
|
122
131
|
});
|
|
123
132
|
},
|
|
124
|
-
[
|
|
125
|
-
),
|
|
133
|
+
[A]
|
|
134
|
+
), We = h(
|
|
126
135
|
(e) => {
|
|
127
|
-
|
|
136
|
+
ye((n) => {
|
|
128
137
|
const a = { ...n, ...e };
|
|
129
|
-
return
|
|
138
|
+
return A?.(a), a;
|
|
130
139
|
});
|
|
131
140
|
},
|
|
132
|
-
[
|
|
133
|
-
),
|
|
134
|
-
|
|
135
|
-
}, []),
|
|
136
|
-
|
|
141
|
+
[A]
|
|
142
|
+
), k = h((e, n) => {
|
|
143
|
+
Me((a) => ({ ...a, [e]: n }));
|
|
144
|
+
}, []), T = h((e) => {
|
|
145
|
+
Me((n) => {
|
|
137
146
|
const a = { ...n };
|
|
138
147
|
return delete a[e], a;
|
|
139
148
|
});
|
|
140
|
-
}, []),
|
|
149
|
+
}, []), H = L(null), [ci, di] = b(0), v = h(
|
|
141
150
|
(e) => {
|
|
142
151
|
const n = r.findIndex((a) => a.id === e);
|
|
143
|
-
n >= 0 && (
|
|
152
|
+
n >= 0 && (H.current = null, ae(n > l ? "next" : "prev"), $e(e), Le((a) => new Set(a).add(e)), ge?.(e, n));
|
|
144
153
|
},
|
|
145
|
-
[r,
|
|
146
|
-
),
|
|
154
|
+
[r, l, ge]
|
|
155
|
+
), y = h(
|
|
147
156
|
(e, n) => e.nextStep ? typeof e.nextStep == "function" ? e.nextStep(u) : e.nextStep : r[n + 1]?.id ?? "",
|
|
148
157
|
[u, r]
|
|
149
|
-
),
|
|
158
|
+
), Q = h(async () => {
|
|
150
159
|
if (!(!t || t.canProceed === !1)) {
|
|
151
160
|
if (t.validate) {
|
|
152
161
|
j(!0);
|
|
153
162
|
try {
|
|
154
163
|
const e = await t.validate(u);
|
|
155
164
|
if (e) {
|
|
156
|
-
|
|
165
|
+
k(t.id, e), j(!1);
|
|
157
166
|
return;
|
|
158
167
|
}
|
|
159
|
-
|
|
168
|
+
T(t.id);
|
|
160
169
|
} catch (e) {
|
|
161
|
-
|
|
170
|
+
k(t.id, String(e)), j(!1);
|
|
162
171
|
return;
|
|
163
172
|
}
|
|
164
173
|
j(!1);
|
|
@@ -166,172 +175,172 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
166
175
|
if (t.fields) {
|
|
167
176
|
for (const e of t.fields) {
|
|
168
177
|
if (e.required && !u[e.id]) {
|
|
169
|
-
|
|
178
|
+
k(t.id, `${e.label} ${d("wizard.isRequired", "is required")}`);
|
|
170
179
|
return;
|
|
171
180
|
}
|
|
172
181
|
if (e.validation?.custom) {
|
|
173
182
|
const n = e.validation.custom(u[e.id]);
|
|
174
183
|
if (n) {
|
|
175
|
-
|
|
184
|
+
k(t.id, n);
|
|
176
185
|
return;
|
|
177
186
|
}
|
|
178
187
|
}
|
|
179
188
|
}
|
|
180
|
-
|
|
189
|
+
T(t.id);
|
|
181
190
|
}
|
|
182
|
-
if (
|
|
183
|
-
if (
|
|
191
|
+
if (C) {
|
|
192
|
+
if (te.current)
|
|
184
193
|
return;
|
|
185
|
-
|
|
194
|
+
te.current = !0, Oe(!0);
|
|
186
195
|
try {
|
|
187
|
-
await E?.(u),
|
|
196
|
+
await E?.(u), f && (localStorage.removeItem(f), localStorage.removeItem(`${f}_step`));
|
|
188
197
|
} catch (e) {
|
|
189
|
-
|
|
198
|
+
k(t.id, e instanceof Error ? e.message : String(e));
|
|
190
199
|
} finally {
|
|
191
|
-
|
|
200
|
+
te.current = !1, Oe(!1);
|
|
192
201
|
}
|
|
193
202
|
} else {
|
|
194
|
-
const e =
|
|
195
|
-
e && r.some((n) => n.id === e) ? v(e) : (
|
|
203
|
+
const e = y(t, l);
|
|
204
|
+
e && r.some((n) => n.id === e) ? v(e) : (H.current = t.id, di((n) => n + 1));
|
|
196
205
|
}
|
|
197
206
|
}
|
|
198
207
|
}, [
|
|
199
208
|
t,
|
|
200
209
|
u,
|
|
201
|
-
|
|
202
|
-
|
|
210
|
+
C,
|
|
211
|
+
l,
|
|
203
212
|
E,
|
|
204
|
-
|
|
213
|
+
f,
|
|
205
214
|
d,
|
|
206
|
-
|
|
207
|
-
|
|
215
|
+
k,
|
|
216
|
+
T,
|
|
208
217
|
v,
|
|
209
|
-
|
|
218
|
+
y,
|
|
210
219
|
r
|
|
211
220
|
]);
|
|
212
|
-
|
|
213
|
-
const e =
|
|
221
|
+
J(() => {
|
|
222
|
+
const e = H.current;
|
|
214
223
|
if (e === null)
|
|
215
224
|
return;
|
|
216
225
|
if (e !== w) {
|
|
217
|
-
|
|
226
|
+
H.current = null;
|
|
218
227
|
return;
|
|
219
228
|
}
|
|
220
|
-
const n = r.findIndex((
|
|
229
|
+
const n = r.findIndex((o) => o.id === e);
|
|
221
230
|
if (n < 0)
|
|
222
231
|
return;
|
|
223
|
-
const a =
|
|
224
|
-
a && r.some((
|
|
225
|
-
}, [r, w,
|
|
226
|
-
const G =
|
|
227
|
-
if (
|
|
232
|
+
const a = y(r[n], n);
|
|
233
|
+
a && r.some((o) => o.id === a) && v(a);
|
|
234
|
+
}, [r, w, y, v, ci]);
|
|
235
|
+
const G = h(() => {
|
|
236
|
+
if (R || t?.canGoBack === !1)
|
|
228
237
|
return;
|
|
229
|
-
const e = t?.prevStep ?? r[
|
|
230
|
-
e && (
|
|
231
|
-
}, [
|
|
232
|
-
if (t?.optional && !
|
|
233
|
-
const e =
|
|
238
|
+
const e = t?.prevStep ?? r[l - 1]?.id;
|
|
239
|
+
e && (ae("prev"), v(e));
|
|
240
|
+
}, [R, t, l, r, v]), de = h(() => {
|
|
241
|
+
if (t?.optional && !C) {
|
|
242
|
+
const e = y(t, l);
|
|
234
243
|
e && v(e);
|
|
235
244
|
}
|
|
236
|
-
}, [t,
|
|
245
|
+
}, [t, C, l, y, v]), Ae = h(() => {
|
|
237
246
|
E?.(u);
|
|
238
|
-
}, [E, u]),
|
|
239
|
-
|
|
240
|
-
}, [
|
|
241
|
-
|
|
242
|
-
}, [
|
|
247
|
+
}, [E, u]), oe = h(() => {
|
|
248
|
+
K?.();
|
|
249
|
+
}, [K]), oi = h(() => {
|
|
250
|
+
N.skipConfirm ? Z?.() : re(!0);
|
|
251
|
+
}, [N.skipConfirm, Z]), le = h(() => {
|
|
243
252
|
ai((e) => !e);
|
|
244
|
-
}, []),
|
|
253
|
+
}, []), $ = P(
|
|
245
254
|
() => ({
|
|
246
255
|
values: u,
|
|
247
|
-
setValue:
|
|
248
|
-
setValues:
|
|
256
|
+
setValue: ce,
|
|
257
|
+
setValues: We,
|
|
249
258
|
currentStep: t,
|
|
250
|
-
currentIndex:
|
|
259
|
+
currentIndex: l,
|
|
251
260
|
totalSteps: r.length,
|
|
252
|
-
visitedSteps:
|
|
253
|
-
errors:
|
|
254
|
-
setError:
|
|
255
|
-
clearError:
|
|
256
|
-
goNext:
|
|
261
|
+
visitedSteps: ne,
|
|
262
|
+
errors: O,
|
|
263
|
+
setError: k,
|
|
264
|
+
clearError: T,
|
|
265
|
+
goNext: Q,
|
|
257
266
|
goPrev: G,
|
|
258
267
|
goTo: v,
|
|
259
|
-
skip:
|
|
260
|
-
complete:
|
|
261
|
-
cancel:
|
|
262
|
-
isFirst:
|
|
263
|
-
isLast:
|
|
264
|
-
isQuickMode:
|
|
265
|
-
toggleQuickMode:
|
|
266
|
-
progress:
|
|
268
|
+
skip: de,
|
|
269
|
+
complete: Ae,
|
|
270
|
+
cancel: oe,
|
|
271
|
+
isFirst: R,
|
|
272
|
+
isLast: se,
|
|
273
|
+
isQuickMode: B,
|
|
274
|
+
toggleQuickMode: le,
|
|
275
|
+
progress: D,
|
|
267
276
|
t: d
|
|
268
277
|
}),
|
|
269
278
|
[
|
|
270
279
|
u,
|
|
271
|
-
|
|
272
|
-
|
|
280
|
+
ce,
|
|
281
|
+
We,
|
|
273
282
|
t,
|
|
274
|
-
|
|
283
|
+
l,
|
|
275
284
|
r.length,
|
|
276
|
-
|
|
277
|
-
B,
|
|
278
|
-
x,
|
|
285
|
+
ne,
|
|
279
286
|
O,
|
|
280
|
-
|
|
287
|
+
k,
|
|
288
|
+
T,
|
|
289
|
+
Q,
|
|
281
290
|
G,
|
|
282
291
|
v,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
te,
|
|
288
|
-
L,
|
|
292
|
+
de,
|
|
293
|
+
Ae,
|
|
294
|
+
oe,
|
|
295
|
+
R,
|
|
289
296
|
se,
|
|
290
|
-
|
|
297
|
+
B,
|
|
298
|
+
le,
|
|
299
|
+
D,
|
|
291
300
|
d
|
|
292
301
|
]
|
|
293
|
-
), Ee =
|
|
294
|
-
if (!
|
|
302
|
+
), Ee = P(() => {
|
|
303
|
+
if (!me)
|
|
295
304
|
return null;
|
|
296
305
|
const n = r.map((a) => a.estimatedTime).filter(Boolean).map((a) => {
|
|
297
|
-
const
|
|
298
|
-
if (!
|
|
306
|
+
const o = a.match(/(\d+)\s*(min|sec|s|m)/i);
|
|
307
|
+
if (!o)
|
|
299
308
|
return 0;
|
|
300
|
-
const _ = parseInt(
|
|
301
|
-
return
|
|
302
|
-
}).reduce((a,
|
|
309
|
+
const _ = parseInt(o[1], 10);
|
|
310
|
+
return o[2].toLowerCase().startsWith("m") ? _ : _ / 60;
|
|
311
|
+
}).reduce((a, o) => a + o, 0);
|
|
303
312
|
return n > 0 ? `~${Math.ceil(n)} min` : null;
|
|
304
|
-
}, [r,
|
|
313
|
+
}, [r, me]), ue = L(null), li = h(
|
|
305
314
|
(e) => {
|
|
306
|
-
|
|
315
|
+
ue.current = e, typeof q == "function" ? q(e) : q && (q.current = e);
|
|
307
316
|
},
|
|
308
|
-
[
|
|
317
|
+
[q]
|
|
309
318
|
);
|
|
310
319
|
zi(
|
|
311
320
|
["sectionPrev", "sectionNext"],
|
|
312
321
|
(e) => {
|
|
313
|
-
e.intent === "sectionNext" ?
|
|
322
|
+
e.intent === "sectionNext" ? Q() : G();
|
|
314
323
|
},
|
|
315
|
-
{ ref:
|
|
324
|
+
{ ref: ue, enabled: !Ce && !!t }
|
|
316
325
|
);
|
|
317
|
-
const Fe = !
|
|
326
|
+
const Fe = !R && t?.canGoBack !== !1, je = t?.canProceed !== !1;
|
|
318
327
|
if (bi(
|
|
319
|
-
|
|
328
|
+
ue,
|
|
320
329
|
[
|
|
321
|
-
...Fe ? [{ intent: "sectionPrev", label:
|
|
330
|
+
...Fe ? [{ intent: "sectionPrev", label: m.prev ?? d("wizard.prev", "Back") }] : [],
|
|
322
331
|
...je ? [
|
|
323
332
|
{
|
|
324
333
|
intent: "sectionNext",
|
|
325
|
-
label: t?.nextLabel ?? (
|
|
334
|
+
label: t?.nextLabel ?? (C ? m.finish ?? d("wizard.finish", "Finish") : m.next ?? d("wizard.next", "Continue"))
|
|
326
335
|
}
|
|
327
336
|
] : []
|
|
328
337
|
],
|
|
329
|
-
{ enabled: !!t && !
|
|
330
|
-
), !t && !
|
|
338
|
+
{ enabled: !!t && !ee }
|
|
339
|
+
), !t && !ee)
|
|
331
340
|
return null;
|
|
332
341
|
const ui = (e, n) => {
|
|
333
|
-
const a = e.id === w,
|
|
334
|
-
return /* @__PURE__ */
|
|
342
|
+
const a = e.id === w, o = !a && (!!Y?.includes(e.id) || ne.has(e.id) && n < l), _ = !a && !o, z = !!O[e.id], s = Xe && (o || n <= l);
|
|
343
|
+
return /* @__PURE__ */ c(
|
|
335
344
|
"button",
|
|
336
345
|
{
|
|
337
346
|
type: "button",
|
|
@@ -341,20 +350,20 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
341
350
|
className: [
|
|
342
351
|
"nice-setup-wizard__step-indicator",
|
|
343
352
|
a && "nice-setup-wizard__step-indicator--active",
|
|
344
|
-
|
|
353
|
+
o && "nice-setup-wizard__step-indicator--completed",
|
|
345
354
|
_ && "nice-setup-wizard__step-indicator--pending",
|
|
346
355
|
z && "nice-setup-wizard__step-indicator--error"
|
|
347
356
|
].filter(Boolean).join(" "),
|
|
348
|
-
onClick: () =>
|
|
349
|
-
disabled: !
|
|
357
|
+
onClick: () => s && v(e.id),
|
|
358
|
+
disabled: !s,
|
|
350
359
|
children: [
|
|
351
|
-
/* @__PURE__ */ i("span", { className: "nice-setup-wizard__step-marker", children: z ? "!" :
|
|
352
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ i("span", { className: "nice-setup-wizard__step-marker", children: z ? "!" : o ? /* @__PURE__ */ i(I, { name: "check", size: 14 }) : Ye && e.numbered !== !1 ? x.get(e.id) : e.icon || /* @__PURE__ */ i(I, { name: "circle", size: 12 }) }),
|
|
361
|
+
/* @__PURE__ */ c("span", { className: "nice-setup-wizard__step-info", children: [
|
|
353
362
|
/* @__PURE__ */ i("span", { className: "nice-setup-wizard__step-title", children: e.title }),
|
|
354
363
|
e.subtitle && /* @__PURE__ */ i("span", { className: "nice-setup-wizard__step-subtitle", children: e.subtitle }),
|
|
355
|
-
e.optional && /* @__PURE__ */
|
|
364
|
+
e.optional && /* @__PURE__ */ c("span", { className: "nice-setup-wizard__step-optional", children: [
|
|
356
365
|
"(",
|
|
357
|
-
|
|
366
|
+
m.optional ?? d("wizard.optional", "optional"),
|
|
358
367
|
")"
|
|
359
368
|
] })
|
|
360
369
|
] }),
|
|
@@ -366,7 +375,7 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
366
375
|
}, pi = (e) => {
|
|
367
376
|
if (e.showWhen && !e.showWhen(u))
|
|
368
377
|
return null;
|
|
369
|
-
const n = u[e.id] ?? e.defaultValue ?? "", a = (
|
|
378
|
+
const n = u[e.id] ?? e.defaultValue ?? "", a = (s) => ce(e.id, s);
|
|
370
379
|
if (e.render)
|
|
371
380
|
return /* @__PURE__ */ i(
|
|
372
381
|
"div",
|
|
@@ -376,9 +385,9 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
376
385
|
},
|
|
377
386
|
e.id
|
|
378
387
|
);
|
|
379
|
-
const
|
|
380
|
-
id:
|
|
381
|
-
disabled: e.disabled ||
|
|
388
|
+
const o = `${Ie}-${e.id}`, _ = {
|
|
389
|
+
id: o,
|
|
390
|
+
disabled: e.disabled || ie === "disabled" || ie === "readOnly",
|
|
382
391
|
placeholder: e.placeholder,
|
|
383
392
|
required: e.required
|
|
384
393
|
};
|
|
@@ -391,51 +400,51 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
391
400
|
..._,
|
|
392
401
|
className: "nice-setup-wizard__input nice-setup-wizard__textarea",
|
|
393
402
|
value: String(n),
|
|
394
|
-
onChange: (
|
|
403
|
+
onChange: (s) => a(s.target.value),
|
|
395
404
|
rows: 4
|
|
396
405
|
}
|
|
397
406
|
);
|
|
398
407
|
break;
|
|
399
408
|
case "select":
|
|
400
|
-
z = /* @__PURE__ */
|
|
409
|
+
z = /* @__PURE__ */ c(
|
|
401
410
|
"select",
|
|
402
411
|
{
|
|
403
412
|
..._,
|
|
404
413
|
className: "nice-setup-wizard__input nice-setup-wizard__select",
|
|
405
414
|
value: String(n),
|
|
406
|
-
onChange: (
|
|
415
|
+
onChange: (s) => a(s.target.value),
|
|
407
416
|
children: [
|
|
408
417
|
/* @__PURE__ */ i("option", { value: "", children: e.placeholder || d("wizard.select", "Select...") }),
|
|
409
|
-
e.options?.map((
|
|
418
|
+
e.options?.map((s) => /* @__PURE__ */ i("option", { value: s.value, children: s.label }, s.value))
|
|
410
419
|
]
|
|
411
420
|
}
|
|
412
421
|
);
|
|
413
422
|
break;
|
|
414
423
|
case "radio":
|
|
415
|
-
z = /* @__PURE__ */ i("div", { className: "nice-setup-wizard__radio-group", children: e.options?.map((
|
|
424
|
+
z = /* @__PURE__ */ i("div", { className: "nice-setup-wizard__radio-group", children: e.options?.map((s) => /* @__PURE__ */ c("label", { className: "nice-setup-wizard__radio-label", children: [
|
|
416
425
|
/* @__PURE__ */ i(
|
|
417
426
|
"input",
|
|
418
427
|
{
|
|
419
428
|
type: "radio",
|
|
420
|
-
name:
|
|
421
|
-
value:
|
|
422
|
-
checked: n ===
|
|
423
|
-
onChange: () => a(
|
|
429
|
+
name: o,
|
|
430
|
+
value: s.value,
|
|
431
|
+
checked: n === s.value,
|
|
432
|
+
onChange: () => a(s.value),
|
|
424
433
|
disabled: _.disabled
|
|
425
434
|
}
|
|
426
435
|
),
|
|
427
|
-
|
|
428
|
-
/* @__PURE__ */ i("span", { children:
|
|
429
|
-
] },
|
|
436
|
+
s.icon && /* @__PURE__ */ i("span", { className: "nice-setup-wizard__radio-icon", children: s.icon }),
|
|
437
|
+
/* @__PURE__ */ i("span", { children: s.label })
|
|
438
|
+
] }, s.value)) });
|
|
430
439
|
break;
|
|
431
440
|
case "checkbox":
|
|
432
|
-
z = /* @__PURE__ */
|
|
441
|
+
z = /* @__PURE__ */ c("label", { className: "nice-setup-wizard__checkbox-label", children: [
|
|
433
442
|
/* @__PURE__ */ i(
|
|
434
443
|
"input",
|
|
435
444
|
{
|
|
436
445
|
type: "checkbox",
|
|
437
446
|
checked: !!n,
|
|
438
|
-
onChange: (
|
|
447
|
+
onChange: (s) => a(s.target.checked),
|
|
439
448
|
disabled: _.disabled
|
|
440
449
|
}
|
|
441
450
|
),
|
|
@@ -443,9 +452,9 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
443
452
|
] });
|
|
444
453
|
break;
|
|
445
454
|
case "switch":
|
|
446
|
-
z = /* @__PURE__ */
|
|
455
|
+
z = /* @__PURE__ */ c("label", { className: "nice-setup-wizard__switch-label", children: [
|
|
447
456
|
/* @__PURE__ */ i("span", { className: "nice-setup-wizard__switch-text", children: e.label }),
|
|
448
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ c(
|
|
449
458
|
"span",
|
|
450
459
|
{
|
|
451
460
|
className: `nice-setup-wizard__switch${n ? " nice-setup-wizard__switch--on" : ""}`,
|
|
@@ -455,7 +464,7 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
455
464
|
{
|
|
456
465
|
type: "checkbox",
|
|
457
466
|
checked: !!n,
|
|
458
|
-
onChange: (
|
|
467
|
+
onChange: (s) => a(s.target.checked),
|
|
459
468
|
disabled: _.disabled
|
|
460
469
|
}
|
|
461
470
|
),
|
|
@@ -467,7 +476,7 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
467
476
|
] });
|
|
468
477
|
break;
|
|
469
478
|
case "slider":
|
|
470
|
-
z = /* @__PURE__ */
|
|
479
|
+
z = /* @__PURE__ */ c("div", { className: "nice-setup-wizard__slider-wrapper", children: [
|
|
471
480
|
/* @__PURE__ */ i(
|
|
472
481
|
"input",
|
|
473
482
|
{
|
|
@@ -477,7 +486,7 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
477
486
|
value: Number(n) || e.validation?.min || 0,
|
|
478
487
|
min: e.validation?.min,
|
|
479
488
|
max: e.validation?.max,
|
|
480
|
-
onChange: (
|
|
489
|
+
onChange: (s) => a(Number(s.target.value))
|
|
481
490
|
}
|
|
482
491
|
),
|
|
483
492
|
/* @__PURE__ */ i("span", { className: "nice-setup-wizard__slider-value", children: String(n ?? "") })
|
|
@@ -491,7 +500,7 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
491
500
|
..._,
|
|
492
501
|
className: "nice-setup-wizard__input",
|
|
493
502
|
value: String(n),
|
|
494
|
-
onChange: (
|
|
503
|
+
onChange: (s) => a(s.target.value),
|
|
495
504
|
minLength: e.validation?.minLength,
|
|
496
505
|
maxLength: e.validation?.maxLength,
|
|
497
506
|
min: e.validation?.min,
|
|
@@ -500,12 +509,12 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
500
509
|
}
|
|
501
510
|
);
|
|
502
511
|
}
|
|
503
|
-
return /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ c(
|
|
504
513
|
"div",
|
|
505
514
|
{
|
|
506
515
|
className: `nice-setup-wizard__field${e.fullWidth ? " nice-setup-wizard__field--full" : ""}`,
|
|
507
516
|
children: [
|
|
508
|
-
e.type !== "checkbox" && e.type !== "switch" && /* @__PURE__ */
|
|
517
|
+
e.type !== "checkbox" && e.type !== "switch" && /* @__PURE__ */ c("label", { htmlFor: o, className: "nice-setup-wizard__label", children: [
|
|
509
518
|
e.label,
|
|
510
519
|
e.required && /* @__PURE__ */ i("span", { className: "nice-setup-wizard__required", children: "*" })
|
|
511
520
|
] }),
|
|
@@ -515,64 +524,64 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
515
524
|
},
|
|
516
525
|
e.id
|
|
517
526
|
);
|
|
518
|
-
}, mi = () => t.fields ? /* @__PURE__ */ i("div", { className: "nice-setup-wizard__fields", children: t.fields.map(pi) }) : t.content ? typeof t.content == "function" ? t.content(
|
|
519
|
-
if (
|
|
527
|
+
}, mi = () => t.fields ? /* @__PURE__ */ i("div", { className: "nice-setup-wizard__fields", children: t.fields.map(pi) }) : t.content ? typeof t.content == "function" ? t.content($) : t.content : null;
|
|
528
|
+
if (Ce)
|
|
520
529
|
return null;
|
|
521
|
-
const
|
|
530
|
+
const De = we || ve || X, He = N.label ?? d("wizard.restart", "Start over"), hi = ee || !t, Qe = /* @__PURE__ */ i(Ve.Provider, { value: $, children: /* @__PURE__ */ c(
|
|
522
531
|
"div",
|
|
523
532
|
{
|
|
524
|
-
ref:
|
|
525
|
-
id:
|
|
533
|
+
ref: li,
|
|
534
|
+
id: Ie,
|
|
526
535
|
className: [
|
|
527
536
|
"nice-setup-wizard",
|
|
528
|
-
`nice-setup-wizard--${
|
|
529
|
-
`nice-size-${
|
|
530
|
-
|
|
537
|
+
`nice-setup-wizard--${S}`,
|
|
538
|
+
`nice-size-${W}`,
|
|
539
|
+
fe !== "none" && `nice-setup-wizard--anim-${fe}`,
|
|
531
540
|
ti
|
|
532
541
|
].filter(Boolean).join(" "),
|
|
533
|
-
style:
|
|
542
|
+
style: Ne != null ? { height: Ne, minHeight: 0, maxHeight: "none", boxSizing: "border-box", ...ke } : ke,
|
|
534
543
|
children: [
|
|
535
|
-
(
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
544
|
+
(U || ze || pe || De) && /* @__PURE__ */ c("header", { className: "nice-setup-wizard__header", children: [
|
|
545
|
+
U && /* @__PURE__ */ i("div", { className: "nice-setup-wizard__branding", children: U }),
|
|
546
|
+
De && /* @__PURE__ */ c("div", { className: "nice-setup-wizard__header-controls", children: [
|
|
547
|
+
we && /* @__PURE__ */ i(Ii, { compact: !0, variant: "ghost", ...Ze }),
|
|
548
|
+
ve && /* @__PURE__ */ i(yi, { compact: !0, variant: "ghost", ...Ke }),
|
|
549
|
+
X && /* @__PURE__ */ i(
|
|
541
550
|
"button",
|
|
542
551
|
{
|
|
543
552
|
type: "button",
|
|
544
553
|
className: "nice-setup-wizard__icon-btn nice-setup-wizard__restart",
|
|
545
|
-
onClick:
|
|
546
|
-
title:
|
|
547
|
-
"aria-label":
|
|
548
|
-
children:
|
|
554
|
+
onClick: oi,
|
|
555
|
+
title: He,
|
|
556
|
+
"aria-label": He,
|
|
557
|
+
children: N.icon ?? Mi
|
|
549
558
|
}
|
|
550
559
|
)
|
|
551
560
|
] }),
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
/* @__PURE__ */ i("input", { type: "checkbox", checked:
|
|
555
|
-
/* @__PURE__ */ i("span", { children:
|
|
561
|
+
ze,
|
|
562
|
+
pe && /* @__PURE__ */ c("label", { className: "nice-setup-wizard__quick-toggle", children: [
|
|
563
|
+
/* @__PURE__ */ i("input", { type: "checkbox", checked: B, onChange: le }),
|
|
564
|
+
/* @__PURE__ */ i("span", { children: m.quickMode ?? d("wizard.quickMode", "Quick Setup") })
|
|
556
565
|
] }),
|
|
557
566
|
Ee && /* @__PURE__ */ i("span", { className: "nice-setup-wizard__time", children: Ee })
|
|
558
567
|
] }),
|
|
559
|
-
hi ? /* @__PURE__ */
|
|
560
|
-
/* @__PURE__ */ i(
|
|
568
|
+
hi ? /* @__PURE__ */ c("div", { className: "nice-setup-wizard__loading", role: "status", "aria-busy": "true", children: [
|
|
569
|
+
/* @__PURE__ */ i(qi, { children: ni ?? /* @__PURE__ */ i(Ci, { size: "lg" }) }),
|
|
561
570
|
/* @__PURE__ */ i("div", { className: "nice-setup-wizard__loading-text", children: ii ?? d("wizard.loading", "Loading…") })
|
|
562
|
-
] }) : /* @__PURE__ */
|
|
563
|
-
|
|
571
|
+
] }) : /* @__PURE__ */ c(V, { children: [
|
|
572
|
+
S !== "minimal" && /* @__PURE__ */ i("nav", { className: "nice-setup-wizard__nav", ref: Se, role: "tablist", children: r.map(ui) }),
|
|
564
573
|
Ue && /* @__PURE__ */ i("div", { className: "nice-setup-wizard__progress", children: /* @__PURE__ */ i(
|
|
565
574
|
"div",
|
|
566
575
|
{
|
|
567
576
|
className: "nice-setup-wizard__progress-bar",
|
|
568
|
-
style: { width: `${
|
|
577
|
+
style: { width: `${D}%` },
|
|
569
578
|
role: "progressbar",
|
|
570
|
-
"aria-valuenow":
|
|
579
|
+
"aria-valuenow": D,
|
|
571
580
|
"aria-valuemin": 0,
|
|
572
581
|
"aria-valuemax": 100
|
|
573
582
|
}
|
|
574
583
|
) }),
|
|
575
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ c(
|
|
576
585
|
"div",
|
|
577
586
|
{
|
|
578
587
|
className: [
|
|
@@ -584,22 +593,22 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
584
593
|
children: [
|
|
585
594
|
t.description && /* @__PURE__ */ i("p", { className: "nice-setup-wizard__step-description", children: t.description }),
|
|
586
595
|
mi(),
|
|
587
|
-
|
|
596
|
+
O[t.id] && /* @__PURE__ */ i("div", { className: "nice-setup-wizard__error", role: "alert", children: O[t.id] })
|
|
588
597
|
]
|
|
589
598
|
},
|
|
590
599
|
w
|
|
591
600
|
),
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
|
|
595
|
-
t.optional && !
|
|
596
|
-
t.actions?.filter((e) => e.position === "left").map((e) => /* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ c("footer", { className: "nice-setup-wizard__footer", children: [
|
|
602
|
+
/* @__PURE__ */ c("div", { className: "nice-setup-wizard__actions-left", children: [
|
|
603
|
+
K && /* @__PURE__ */ i("button", { type: "button", className: "nice-btn nice-btn--text", onClick: oe, children: m.cancel ?? d("wizard.cancel", "Cancel") }),
|
|
604
|
+
t.optional && !C && /* @__PURE__ */ i("button", { type: "button", className: "nice-btn nice-btn--text", onClick: de, children: m.skip ?? d("wizard.skip", "Skip") }),
|
|
605
|
+
t.actions?.filter((e) => e.position === "left").map((e) => /* @__PURE__ */ c(
|
|
597
606
|
"button",
|
|
598
607
|
{
|
|
599
608
|
type: "button",
|
|
600
609
|
className: `nice-btn nice-btn--${e.variant || "outlined"}`,
|
|
601
|
-
onClick: () => e.onClick(
|
|
602
|
-
disabled: e.disabled?.(
|
|
610
|
+
onClick: () => e.onClick($),
|
|
611
|
+
disabled: e.disabled?.($),
|
|
603
612
|
children: [
|
|
604
613
|
e.icon,
|
|
605
614
|
" ",
|
|
@@ -609,14 +618,14 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
609
618
|
e.id
|
|
610
619
|
))
|
|
611
620
|
] }),
|
|
612
|
-
/* @__PURE__ */
|
|
613
|
-
t.actions?.filter((e) => e.position !== "left").map((e) => /* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ c("div", { className: "nice-setup-wizard__actions-right", children: [
|
|
622
|
+
t.actions?.filter((e) => e.position !== "left").map((e) => /* @__PURE__ */ c(
|
|
614
623
|
"button",
|
|
615
624
|
{
|
|
616
625
|
type: "button",
|
|
617
626
|
className: `nice-btn nice-btn--${e.variant || "outlined"}`,
|
|
618
|
-
onClick: () => e.onClick(
|
|
619
|
-
disabled: e.disabled?.(
|
|
627
|
+
onClick: () => e.onClick($),
|
|
628
|
+
disabled: e.disabled?.($),
|
|
620
629
|
children: [
|
|
621
630
|
e.icon,
|
|
622
631
|
" ",
|
|
@@ -625,8 +634,8 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
625
634
|
},
|
|
626
635
|
e.id
|
|
627
636
|
)),
|
|
628
|
-
Fe && /* @__PURE__ */ i(Ge, { variant: "outline", size:
|
|
629
|
-
/* @__PURE__ */ i(
|
|
637
|
+
Fe && /* @__PURE__ */ i(Ge, { variant: "outline", size: W, onClick: G, children: m.prev ?? /* @__PURE__ */ c(V, { children: [
|
|
638
|
+
/* @__PURE__ */ i(I, { name: "arrow-left", size: 14 }),
|
|
630
639
|
" ",
|
|
631
640
|
d("wizard.prev", "Back")
|
|
632
641
|
] }) }),
|
|
@@ -634,54 +643,54 @@ const Li = /* @__PURE__ */ i(S, { name: "refresh", size: 18 }), ji = /* @__PURE_
|
|
|
634
643
|
Ge,
|
|
635
644
|
{
|
|
636
645
|
variant: "primary",
|
|
637
|
-
size:
|
|
638
|
-
onClick:
|
|
639
|
-
disabled:
|
|
640
|
-
loading:
|
|
641
|
-
children: t.nextLabel ?? (
|
|
646
|
+
size: W,
|
|
647
|
+
onClick: Q,
|
|
648
|
+
disabled: qe || Be || !je,
|
|
649
|
+
loading: qe || Be,
|
|
650
|
+
children: t.nextLabel ?? (C ? m.finish ?? /* @__PURE__ */ c(V, { children: [
|
|
642
651
|
d("wizard.finish", "Finish"),
|
|
643
652
|
" ",
|
|
644
|
-
/* @__PURE__ */ i(
|
|
645
|
-
] }) :
|
|
653
|
+
/* @__PURE__ */ i(I, { name: "check", size: 14 })
|
|
654
|
+
] }) : m.next ?? /* @__PURE__ */ c(V, { children: [
|
|
646
655
|
d("wizard.next", "Continue"),
|
|
647
656
|
" ",
|
|
648
|
-
/* @__PURE__ */ i(
|
|
657
|
+
/* @__PURE__ */ i(I, { name: "arrow-right", size: 14 })
|
|
649
658
|
] }))
|
|
650
659
|
}
|
|
651
660
|
)
|
|
652
661
|
] })
|
|
653
662
|
] }),
|
|
654
|
-
|
|
655
|
-
|
|
663
|
+
be && /* @__PURE__ */ i("div", { className: "nice-setup-wizard__custom-footer", children: be }),
|
|
664
|
+
S === "minimal" && x.has(t.id) && /* @__PURE__ */ i("div", { className: "nice-setup-wizard__minimal-indicator", children: m.stepOf ? m.stepOf.replace("{current}", String(x.get(t.id))).replace("{total}", String(x.size)) : `${x.get(t.id)} / ${x.size}` })
|
|
656
665
|
] }),
|
|
657
|
-
|
|
658
|
-
|
|
666
|
+
X && !N.skipConfirm && /* @__PURE__ */ i(
|
|
667
|
+
$i,
|
|
659
668
|
{
|
|
660
669
|
visible: ri,
|
|
661
670
|
variant: "warning",
|
|
662
|
-
size:
|
|
663
|
-
header:
|
|
664
|
-
message:
|
|
671
|
+
size: W,
|
|
672
|
+
header: N.confirmTitle ?? d("wizard.restartConfirmTitle", "Start setup over?"),
|
|
673
|
+
message: N.confirmMessage ?? d(
|
|
665
674
|
"wizard.restartConfirmMessage",
|
|
666
675
|
"This will discard your progress and restart the setup from the beginning."
|
|
667
676
|
),
|
|
668
|
-
acceptLabel:
|
|
669
|
-
rejectLabel:
|
|
677
|
+
acceptLabel: N.confirmLabel ?? d("wizard.restartConfirmAccept", "Yes, start over"),
|
|
678
|
+
rejectLabel: N.cancelLabel ?? d("wizard.restartConfirmReject", "Cancel"),
|
|
670
679
|
onAccept: () => {
|
|
671
|
-
|
|
680
|
+
re(!1), Z?.();
|
|
672
681
|
},
|
|
673
|
-
onReject: () =>
|
|
682
|
+
onReject: () => re(!1)
|
|
674
683
|
}
|
|
675
684
|
)
|
|
676
685
|
]
|
|
677
686
|
}
|
|
678
687
|
) });
|
|
679
|
-
return _e != null ? /* @__PURE__ */ i(gi, { theme: _e, children:
|
|
688
|
+
return _e != null ? /* @__PURE__ */ i(gi, { theme: _e, children: Qe }) : Qe;
|
|
680
689
|
}
|
|
681
690
|
),
|
|
682
691
|
{ displayName: "NiceSetupWizard" }
|
|
683
692
|
);
|
|
684
693
|
export {
|
|
685
|
-
|
|
686
|
-
|
|
694
|
+
Di as NiceSetupWizard,
|
|
695
|
+
ji as useSetupWizard
|
|
687
696
|
};
|