@sito/dashboard-app 0.0.17 → 0.0.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/dist/dashboard-app.cjs +1 -1
- package/dist/dashboard-app.js +339 -339
- package/dist/main.css +1 -1
- package/package.json +1 -1
package/dist/dashboard-app.js
CHANGED
|
@@ -20,7 +20,7 @@ function Rt(e) {
|
|
|
20
20
|
onClick: i,
|
|
21
21
|
children: r,
|
|
22
22
|
hidden: c = !1,
|
|
23
|
-
disabled:
|
|
23
|
+
disabled: a = !1,
|
|
24
24
|
showText: d = !1,
|
|
25
25
|
showTooltips: y = !0
|
|
26
26
|
} = e;
|
|
@@ -29,9 +29,9 @@ function Rt(e) {
|
|
|
29
29
|
{
|
|
30
30
|
id: t,
|
|
31
31
|
className: `action ${d ? "text-action" : "icon-action"}`,
|
|
32
|
-
disabled:
|
|
32
|
+
disabled: a,
|
|
33
33
|
onClick: () => i(),
|
|
34
|
-
"aria-disabled":
|
|
34
|
+
"aria-disabled": a,
|
|
35
35
|
"data-tooltip-id": "tooltip",
|
|
36
36
|
"data-tooltip-content": y ? n : "",
|
|
37
37
|
children: [
|
|
@@ -62,22 +62,22 @@ function qt(e) {
|
|
|
62
62
|
}
|
|
63
63
|
const Qs = (e) => {
|
|
64
64
|
const { children: t, open: s, onClose: n } = e, i = Vt(null), r = F(
|
|
65
|
-
(
|
|
65
|
+
(a) => {
|
|
66
66
|
const d = i.current;
|
|
67
|
-
!s || !d || d.contains(
|
|
67
|
+
!s || !d || d.contains(a.target) || n();
|
|
68
68
|
},
|
|
69
69
|
[s, n]
|
|
70
70
|
), c = F(
|
|
71
|
-
(
|
|
72
|
-
s &&
|
|
71
|
+
(a) => {
|
|
72
|
+
s && a.key === "Escape" && n();
|
|
73
73
|
},
|
|
74
74
|
[s, n]
|
|
75
75
|
);
|
|
76
76
|
return Z(() => {
|
|
77
77
|
if (s)
|
|
78
78
|
return setTimeout(() => {
|
|
79
|
-
var
|
|
80
|
-
return (
|
|
79
|
+
var a;
|
|
80
|
+
return (a = i.current) == null ? void 0 : a.focus();
|
|
81
81
|
}, 0), document.addEventListener("mousedown", r), document.addEventListener("keydown", c), () => {
|
|
82
82
|
document.removeEventListener("mousedown", r), document.removeEventListener("keydown", c);
|
|
83
83
|
};
|
|
@@ -89,7 +89,7 @@ const Qs = (e) => {
|
|
|
89
89
|
"aria-hidden": !s,
|
|
90
90
|
tabIndex: -1,
|
|
91
91
|
className: `dropdown-main ${s ? "opened" : "closed"}`,
|
|
92
|
-
onClick: (
|
|
92
|
+
onClick: (a) => a.stopPropagation(),
|
|
93
93
|
children: t
|
|
94
94
|
}
|
|
95
95
|
);
|
|
@@ -101,7 +101,7 @@ const Qs = (e) => {
|
|
|
101
101
|
className: i = "",
|
|
102
102
|
variant: r = "text",
|
|
103
103
|
color: c = "default",
|
|
104
|
-
iconClassName:
|
|
104
|
+
iconClassName: a = "",
|
|
105
105
|
...d
|
|
106
106
|
} = e;
|
|
107
107
|
return /* @__PURE__ */ k(
|
|
@@ -111,7 +111,7 @@ const Qs = (e) => {
|
|
|
111
111
|
className: `icon-button ${i} ${r} ${c}`,
|
|
112
112
|
...d,
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */ m(ce, { icon: s, className: `!w-auto ${
|
|
114
|
+
/* @__PURE__ */ m(ce, { icon: s, className: `!w-auto ${a}` }),
|
|
115
115
|
t
|
|
116
116
|
]
|
|
117
117
|
}
|
|
@@ -131,38 +131,38 @@ var Xe, pt;
|
|
|
131
131
|
function Ks() {
|
|
132
132
|
if (pt) return Xe;
|
|
133
133
|
pt = 1;
|
|
134
|
-
const e = (
|
|
134
|
+
const e = (a, d = "local", y = void 0) => {
|
|
135
135
|
if (d === "local") {
|
|
136
|
-
if (localStorage.getItem(
|
|
137
|
-
return y === void 0 || y !== void 0 && localStorage.getItem(
|
|
138
|
-
} else if (d === "session" && sessionStorage.getItem(
|
|
139
|
-
return y === void 0 || y !== void 0 && sessionStorage.getItem(
|
|
136
|
+
if (localStorage.getItem(a) !== void 0 && localStorage.getItem(a) !== "undefined" && localStorage.getItem(a) !== null)
|
|
137
|
+
return y === void 0 || y !== void 0 && localStorage.getItem(a) === y;
|
|
138
|
+
} else if (d === "session" && sessionStorage.getItem(a) !== void 0 && sessionStorage.getItem(a) !== "undefined" && sessionStorage.getItem(a) !== null)
|
|
139
|
+
return y === void 0 || y !== void 0 && sessionStorage.getItem(a) === y;
|
|
140
140
|
return !1;
|
|
141
|
-
}, t = (
|
|
141
|
+
}, t = (a) => {
|
|
142
142
|
const d = {};
|
|
143
|
-
return
|
|
143
|
+
return a.substring(1).split("&").forEach((g) => {
|
|
144
144
|
const [h, f] = g.split("=");
|
|
145
145
|
d[h] = f;
|
|
146
146
|
}), d;
|
|
147
|
-
}, s = (
|
|
148
|
-
if (r(
|
|
147
|
+
}, s = (a = "") => {
|
|
148
|
+
if (r(a) && a.length) return r(a);
|
|
149
149
|
{
|
|
150
150
|
let d = navigator.language || navigator.userLanguage;
|
|
151
151
|
if (d.indexOf("en") < 0 && d.indexOf("es") < 0 && (d = "en-US"), d = d.split("-")[0], d)
|
|
152
|
-
return
|
|
152
|
+
return a.length && i(a, 730, d), d;
|
|
153
153
|
}
|
|
154
154
|
return "en";
|
|
155
|
-
}, n = (
|
|
156
|
-
top:
|
|
155
|
+
}, n = (a = 0, d = 0, y = window, g = "smooth") => y.scroll({
|
|
156
|
+
top: a,
|
|
157
157
|
left: d,
|
|
158
158
|
behavior: g
|
|
159
|
-
}), i = (
|
|
159
|
+
}), i = (a, d, y, g = "/", h = "Lax") => {
|
|
160
160
|
var f = /* @__PURE__ */ new Date();
|
|
161
161
|
f.setTime(f.getTime() + d * 24 * 60 * 60 * 1e3);
|
|
162
162
|
const v = "; expires=" + f.toUTCString();
|
|
163
|
-
document.cookie = `${
|
|
164
|
-
}, r = (
|
|
165
|
-
const d = `${
|
|
163
|
+
document.cookie = `${a}=${y || ""}${v};path=${g};SameSite=${h}`;
|
|
164
|
+
}, r = (a) => {
|
|
165
|
+
const d = `${a}=`, g = decodeURIComponent(document.cookie).split(";");
|
|
166
166
|
for (let h = 0; h < g.length; h += 1) {
|
|
167
167
|
let f = g[h];
|
|
168
168
|
for (; f.charAt(0) === " "; )
|
|
@@ -175,7 +175,7 @@ function Ks() {
|
|
|
175
175
|
return Xe = {
|
|
176
176
|
getCookie: r,
|
|
177
177
|
createCookie: i,
|
|
178
|
-
deleteCookie: (
|
|
178
|
+
deleteCookie: (a) => document.cookie = `${a}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
|
|
179
179
|
getUserLanguage: s,
|
|
180
180
|
scrollTo: n,
|
|
181
181
|
parseQueries: t,
|
|
@@ -187,8 +187,8 @@ function Wr() {
|
|
|
187
187
|
const { t: e, language: t } = T();
|
|
188
188
|
return { timeAge: F(
|
|
189
189
|
(n) => {
|
|
190
|
-
const r = /* @__PURE__ */ new Date() - n, c = Math.floor(r / (1e3 * 60)),
|
|
191
|
-
return r < 1e3 * 60 ? S : c < 60 ? `${d ? y : ""} ${c} ${c === 1 ? g : h} ${d ? "" : y}` :
|
|
190
|
+
const r = /* @__PURE__ */ new Date() - n, c = Math.floor(r / (1e3 * 60)), a = Math.floor(c / 60), d = t === "es", y = e("_accessibility:labels.ago"), g = e("_accessibility:labels.minute"), h = e("_accessibility:labels.minutes"), f = e("_accessibility:labels.hour"), v = e("_accessibility:labels.hours"), _ = e("_accessibility:labels.yesterday"), S = e("_accessibility:labels.justNow");
|
|
191
|
+
return r < 1e3 * 60 ? S : c < 60 ? `${d ? y : ""} ${c} ${c === 1 ? g : h} ${d ? "" : y}` : a < 24 ? `${d ? y : ""} ${a} ${a === 1 ? f : v} ${d ? "" : y}` : a < 48 ? _ : n.toLocaleDateString(navigator.language || "es-ES", {
|
|
192
192
|
day: "2-digit",
|
|
193
193
|
month: "2-digit",
|
|
194
194
|
year: "numeric"
|
|
@@ -209,14 +209,14 @@ async function Ae(e, t = "GET", s, n) {
|
|
|
209
209
|
headers: i,
|
|
210
210
|
...s ? { body: JSON.stringify(s) } : {}
|
|
211
211
|
}), c = await r.text();
|
|
212
|
-
let
|
|
212
|
+
let a = null;
|
|
213
213
|
try {
|
|
214
|
-
|
|
214
|
+
a = c ? JSON.parse(c) : null;
|
|
215
215
|
} catch {
|
|
216
|
-
|
|
216
|
+
a = null;
|
|
217
217
|
}
|
|
218
218
|
if (!r.ok) {
|
|
219
|
-
const d = typeof
|
|
219
|
+
const d = typeof a == "object" && a !== null ? a.message ?? a.error ?? c : c || r.statusText;
|
|
220
220
|
return {
|
|
221
221
|
data: null,
|
|
222
222
|
status: r.status,
|
|
@@ -227,7 +227,7 @@ async function Ae(e, t = "GET", s, n) {
|
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
return {
|
|
230
|
-
data: r.status !== 204 &&
|
|
230
|
+
data: r.status !== 204 && a !== null ? a : null,
|
|
231
231
|
status: r.status,
|
|
232
232
|
error: null
|
|
233
233
|
};
|
|
@@ -254,12 +254,12 @@ function zs(e, t) {
|
|
|
254
254
|
const Bt = (e, t, s) => {
|
|
255
255
|
const n = [];
|
|
256
256
|
if (t) {
|
|
257
|
-
const { sortingBy: i, sortingOrder: r, currentPage: c, pageSize:
|
|
257
|
+
const { sortingBy: i, sortingOrder: r, currentPage: c, pageSize: a } = t;
|
|
258
258
|
n.push(
|
|
259
259
|
`sort=${String(i)}`,
|
|
260
260
|
`order=${r}`,
|
|
261
261
|
`page=${c}`,
|
|
262
|
-
`pageSize=${
|
|
262
|
+
`pageSize=${a}`
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
265
|
if (s) {
|
|
@@ -267,10 +267,10 @@ const Bt = (e, t, s) => {
|
|
|
267
267
|
([, r]) => r != null && r !== ""
|
|
268
268
|
).flatMap(([r, c]) => {
|
|
269
269
|
if (Array.isArray(c))
|
|
270
|
-
return c.map((
|
|
270
|
+
return c.map((a) => `${r}==${encodeURIComponent((a == null ? void 0 : a.id) ?? a)}`);
|
|
271
271
|
if (typeof c == "object" && c !== null && "start" in c && "end" in c) {
|
|
272
|
-
const
|
|
273
|
-
return c.start != null && c.start !== "" &&
|
|
272
|
+
const a = [];
|
|
273
|
+
return c.start != null && c.start !== "" && a.push(`${r}>=${encodeURIComponent(c.start)}`), c.end != null && c.end !== "" && a.push(`${r}<=${encodeURIComponent(c.end)}`), a;
|
|
274
274
|
}
|
|
275
275
|
return typeof c == "object" && c !== null ? `${r}==${encodeURIComponent(c.id ?? "")}` : `${r}==${encodeURIComponent(c)}`;
|
|
276
276
|
});
|
|
@@ -299,7 +299,7 @@ class jt {
|
|
|
299
299
|
return { Authorization: `Bearer ${s}` };
|
|
300
300
|
}
|
|
301
301
|
async doQuery(t, s = se.GET, n, i) {
|
|
302
|
-
const r = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status:
|
|
302
|
+
const r = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status: a, error: d } = await Ae(
|
|
303
303
|
`${this.baseUrl}${t}`,
|
|
304
304
|
s,
|
|
305
305
|
n,
|
|
@@ -308,10 +308,10 @@ class jt {
|
|
|
308
308
|
...i ?? {}
|
|
309
309
|
}
|
|
310
310
|
);
|
|
311
|
-
if (d ||
|
|
311
|
+
if (d || a < 200 || a >= 300)
|
|
312
312
|
throw d ?? {
|
|
313
|
-
status:
|
|
314
|
-
message: String(
|
|
313
|
+
status: a,
|
|
314
|
+
message: String(a)
|
|
315
315
|
};
|
|
316
316
|
return c;
|
|
317
317
|
}
|
|
@@ -322,13 +322,13 @@ class jt {
|
|
|
322
322
|
* @returns Result list
|
|
323
323
|
*/
|
|
324
324
|
async get(t, s, n) {
|
|
325
|
-
const i = Bt(t, s, n), r = this.secured ? this.defaultTokenAcquirer() : void 0, { data: c, error:
|
|
325
|
+
const i = Bt(t, s, n), r = this.secured ? this.defaultTokenAcquirer() : void 0, { data: c, error: a } = await Ae(
|
|
326
326
|
`${this.baseUrl}${i}`,
|
|
327
327
|
se.GET,
|
|
328
328
|
null,
|
|
329
329
|
r
|
|
330
330
|
);
|
|
331
|
-
if (
|
|
331
|
+
if (a) throw a;
|
|
332
332
|
return c;
|
|
333
333
|
}
|
|
334
334
|
/**
|
|
@@ -613,7 +613,7 @@ function Xr(e) {
|
|
|
613
613
|
}), r = (y) => n({
|
|
614
614
|
type: "set",
|
|
615
615
|
items: [{ ...y }]
|
|
616
|
-
}), c = (y) => n({ type: "set", items: y }),
|
|
616
|
+
}), c = (y) => n({ type: "set", items: y }), a = (y) => n({
|
|
617
617
|
type: "set",
|
|
618
618
|
items: [{ ...y, type: K.success }]
|
|
619
619
|
}), d = (y) => n({ type: "remove", index: y });
|
|
@@ -625,7 +625,7 @@ function Xr(e) {
|
|
|
625
625
|
removeNotification: d,
|
|
626
626
|
showErrorNotification: i,
|
|
627
627
|
showNotification: r,
|
|
628
|
-
showSuccessNotification:
|
|
628
|
+
showSuccessNotification: a,
|
|
629
629
|
showStackNotifications: c
|
|
630
630
|
},
|
|
631
631
|
children: t
|
|
@@ -658,7 +658,7 @@ const Ne = () => {
|
|
|
658
658
|
throw new Error("managerContext must be used within a Provider");
|
|
659
659
|
return e.client;
|
|
660
660
|
}, Wt = je({}), en = (e) => {
|
|
661
|
-
const { children: t, guestMode: s = "guest_mode", user: n = "user" } = e, i = Ys(), [r, c] = R({}),
|
|
661
|
+
const { children: t, guestMode: s = "guest_mode", user: n = "user" } = e, i = Ys(), [r, c] = R({}), a = F(() => !!Ht(s, "boolean") && r.token === void 0, [r.token]), d = F((v) => {
|
|
662
662
|
wt(s, v);
|
|
663
663
|
}, []), y = F((v) => {
|
|
664
664
|
v && (c(v), vt(s), wt(n, v.token));
|
|
@@ -681,7 +681,7 @@ const Ne = () => {
|
|
|
681
681
|
logUser: y,
|
|
682
682
|
logoutUser: g,
|
|
683
683
|
logUserFromLocal: h,
|
|
684
|
-
isInGuestMode:
|
|
684
|
+
isInGuestMode: a,
|
|
685
685
|
setGuestMode: d
|
|
686
686
|
};
|
|
687
687
|
return /* @__PURE__ */ m(Wt.Provider, { value: f, children: t });
|
|
@@ -707,10 +707,10 @@ const Ne = () => {
|
|
|
707
707
|
);
|
|
708
708
|
return e;
|
|
709
709
|
}, Jt = (e) => {
|
|
710
|
-
const { showSuccessNotification: t } = Ne(), { mutationFn: s, onError: n, onSuccess: i, onSuccessMessage: r } = e, [c,
|
|
711
|
-
y(),
|
|
710
|
+
const { showSuccessNotification: t } = Ne(), { mutationFn: s, onError: n, onSuccess: i, onSuccessMessage: r } = e, [c, a] = R([]), { open: d, handleClose: y, handleOpen: g } = is(), h = () => {
|
|
711
|
+
y(), a([]);
|
|
712
712
|
}, f = async (_) => {
|
|
713
|
-
|
|
713
|
+
a(_), g();
|
|
714
714
|
}, v = Pe({
|
|
715
715
|
mutationFn: () => s(
|
|
716
716
|
Array.isArray(c) ? c : [c]
|
|
@@ -756,15 +756,15 @@ var Ke = (e) => /^\w*$/.test(e), H = (e) => e === void 0, st = (e) => Array.isAr
|
|
|
756
756
|
let n = -1;
|
|
757
757
|
const i = Ke(t) ? [t] : rt(t), r = i.length, c = r - 1;
|
|
758
758
|
for (; ++n < r; ) {
|
|
759
|
-
const
|
|
759
|
+
const a = i[n];
|
|
760
760
|
let d = s;
|
|
761
761
|
if (n !== c) {
|
|
762
|
-
const y = e[
|
|
762
|
+
const y = e[a];
|
|
763
763
|
d = B(y) || Array.isArray(y) ? y : isNaN(+i[n + 1]) ? {} : [];
|
|
764
764
|
}
|
|
765
|
-
if (
|
|
765
|
+
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
766
766
|
return;
|
|
767
|
-
e[
|
|
767
|
+
e[a] = d, e = e[a];
|
|
768
768
|
}
|
|
769
769
|
};
|
|
770
770
|
const _t = {
|
|
@@ -817,14 +817,14 @@ function we(e, t, s = /* @__PURE__ */ new WeakSet()) {
|
|
|
817
817
|
if (!i.includes(r))
|
|
818
818
|
return !1;
|
|
819
819
|
if (r !== "ref") {
|
|
820
|
-
const
|
|
821
|
-
if (Se(c) && Se(
|
|
820
|
+
const a = t[r];
|
|
821
|
+
if (Se(c) && Se(a) || B(c) && B(a) || Array.isArray(c) && Array.isArray(a) ? !we(c, a, s) : c !== a)
|
|
822
822
|
return !1;
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
return !0;
|
|
826
826
|
}
|
|
827
|
-
var
|
|
827
|
+
var ar = (e, t, s, n, i) => t ? {
|
|
828
828
|
...s[e],
|
|
829
829
|
types: {
|
|
830
830
|
...s[e] && s[e].types ? s[e].types : {},
|
|
@@ -854,7 +854,7 @@ var or = (e, t, s, n, i) => t ? {
|
|
|
854
854
|
return !1;
|
|
855
855
|
const t = e ? e.ownerDocument : 0;
|
|
856
856
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
857
|
-
}, Xt = (e) => e.type === "select-multiple", it = (e) => e.type === "radio",
|
|
857
|
+
}, Xt = (e) => e.type === "select-multiple", it = (e) => e.type === "radio", or = (e) => it(e) || Oe(e), Ze = (e) => Re(e) && e.isConnected;
|
|
858
858
|
function cr(e, t) {
|
|
859
859
|
const s = t.slice(0, -1).length;
|
|
860
860
|
let n = 0;
|
|
@@ -947,15 +947,15 @@ const Te = (e, t, s, n) => {
|
|
|
947
947
|
for (const i of s || Object.keys(e)) {
|
|
948
948
|
const r = x(e, i);
|
|
949
949
|
if (r) {
|
|
950
|
-
const { _f: c, ...
|
|
950
|
+
const { _f: c, ...a } = r;
|
|
951
951
|
if (c) {
|
|
952
952
|
if (c.refs && c.refs[0] && t(c.refs[0], i) && !n)
|
|
953
953
|
return !0;
|
|
954
954
|
if (c.ref && t(c.ref, c.name) && !n)
|
|
955
955
|
return !0;
|
|
956
|
-
if (Te(
|
|
956
|
+
if (Te(a, t))
|
|
957
957
|
break;
|
|
958
|
-
} else if (B(
|
|
958
|
+
} else if (B(a) && Te(a, t))
|
|
959
959
|
break;
|
|
960
960
|
}
|
|
961
961
|
}
|
|
@@ -969,18 +969,18 @@ function Tt(e, t, s) {
|
|
|
969
969
|
};
|
|
970
970
|
const i = s.split(".");
|
|
971
971
|
for (; i.length; ) {
|
|
972
|
-
const r = i.join("."), c = x(t, r),
|
|
972
|
+
const r = i.join("."), c = x(t, r), a = x(e, r);
|
|
973
973
|
if (c && !Array.isArray(c) && s !== r)
|
|
974
974
|
return { name: s };
|
|
975
|
-
if (
|
|
975
|
+
if (a && a.type)
|
|
976
976
|
return {
|
|
977
977
|
name: r,
|
|
978
|
-
error:
|
|
978
|
+
error: a
|
|
979
979
|
};
|
|
980
|
-
if (
|
|
980
|
+
if (a && a.root && a.root.type)
|
|
981
981
|
return {
|
|
982
982
|
name: `${r}.root`,
|
|
983
|
-
error:
|
|
983
|
+
error: a.root
|
|
984
984
|
};
|
|
985
985
|
i.pop();
|
|
986
986
|
}
|
|
@@ -1008,12 +1008,12 @@ var ke = (e) => B(e) && !Be(e) ? e : {
|
|
|
1008
1008
|
value: e,
|
|
1009
1009
|
message: ""
|
|
1010
1010
|
}, Dt = async (e, t, s, n, i, r) => {
|
|
1011
|
-
const { ref: c, refs:
|
|
1011
|
+
const { ref: c, refs: a, required: d, maxLength: y, minLength: g, min: h, max: f, pattern: v, validate: _, name: S, valueAsNumber: M, mount: re } = e._f, N = x(s, S);
|
|
1012
1012
|
if (!re || t.has(S))
|
|
1013
1013
|
return {};
|
|
1014
|
-
const Q =
|
|
1014
|
+
const Q = a ? a[0] : c, L = (A) => {
|
|
1015
1015
|
i && Q.reportValidity && (Q.setCustomValidity(me(A) ? "" : A || ""), Q.reportValidity());
|
|
1016
|
-
}, $ = {}, J = it(c), Y = Oe(c), q = J || Y, V = (M || nt(c)) && H(c.value) && H(N) || Re(c) && c.value === "" || N === "" || Array.isArray(N) && !N.length, ee =
|
|
1016
|
+
}, $ = {}, J = it(c), Y = Oe(c), q = J || Y, V = (M || nt(c)) && H(c.value) && H(N) || Re(c) && c.value === "" || N === "" || Array.isArray(N) && !N.length, ee = ar.bind(null, S, n, $), ie = (A, E, U, W = ye.maxLength, G = ye.minLength) => {
|
|
1017
1017
|
const P = A ? E : U;
|
|
1018
1018
|
$[S] = {
|
|
1019
1019
|
type: A ? W : G,
|
|
@@ -1022,7 +1022,7 @@ var ke = (e) => B(e) && !Be(e) ? e : {
|
|
|
1022
1022
|
...ee(A ? W : G, P)
|
|
1023
1023
|
};
|
|
1024
1024
|
};
|
|
1025
|
-
if (r ? !Array.isArray(N) || !N.length : d && (!q && (V || X(N)) || me(N) && !N || Y && !ts(
|
|
1025
|
+
if (r ? !Array.isArray(N) || !N.length : d && (!q && (V || X(N)) || me(N) && !N || Y && !ts(a).isValid || J && !rs(a).isValid)) {
|
|
1026
1026
|
const { value: A, message: E } = Ue(d) ? { value: !!d, message: d } : ke(d);
|
|
1027
1027
|
if (A && ($[S] = {
|
|
1028
1028
|
type: ye.required,
|
|
@@ -1039,8 +1039,8 @@ var ke = (e) => B(e) && !Be(e) ? e : {
|
|
|
1039
1039
|
const G = c.valueAsNumber || N && +N;
|
|
1040
1040
|
X(U.value) || (A = G > U.value), X(W.value) || (E = G < W.value);
|
|
1041
1041
|
} else {
|
|
1042
|
-
const G = c.valueAsDate || new Date(N), P = (_e) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + _e),
|
|
1043
|
-
he(U.value) && N && (A =
|
|
1042
|
+
const G = c.valueAsDate || new Date(N), P = (_e) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + _e), ae = c.type == "time", le = c.type == "week";
|
|
1043
|
+
he(U.value) && N && (A = ae ? P(N) > P(U.value) : le ? N > U.value : G > new Date(U.value)), he(W.value) && N && (E = ae ? P(N) < P(W.value) : le ? N < W.value : G < new Date(W.value));
|
|
1044
1044
|
}
|
|
1045
1045
|
if ((A || E) && (ie(!!A, U.message, W.message, ye.max, ye.min), !n))
|
|
1046
1046
|
return L($[S].message), $;
|
|
@@ -1116,7 +1116,7 @@ function wr(e = {}) {
|
|
|
1116
1116
|
action: !1,
|
|
1117
1117
|
mount: !1,
|
|
1118
1118
|
watch: !1
|
|
1119
|
-
},
|
|
1119
|
+
}, a = {
|
|
1120
1120
|
mount: /* @__PURE__ */ new Set(),
|
|
1121
1121
|
disabled: /* @__PURE__ */ new Set(),
|
|
1122
1122
|
unMount: /* @__PURE__ */ new Set(),
|
|
@@ -1138,181 +1138,181 @@ function wr(e = {}) {
|
|
|
1138
1138
|
const f = {
|
|
1139
1139
|
array: Ct(),
|
|
1140
1140
|
state: Ct()
|
|
1141
|
-
}, v = t.criteriaMode === ue.all, _ = (
|
|
1142
|
-
clearTimeout(y), y = setTimeout(
|
|
1143
|
-
}, S = async (
|
|
1144
|
-
if (!t.disabled && (g.isValid || h.isValid ||
|
|
1141
|
+
}, v = t.criteriaMode === ue.all, _ = (o) => (l) => {
|
|
1142
|
+
clearTimeout(y), y = setTimeout(o, l);
|
|
1143
|
+
}, S = async (o) => {
|
|
1144
|
+
if (!t.disabled && (g.isValid || h.isValid || o)) {
|
|
1145
1145
|
const l = t.resolver ? te((await Y()).errors) : await V(n, !0);
|
|
1146
1146
|
l !== s.isValid && f.state.next({
|
|
1147
1147
|
isValid: l
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
|
-
}, M = (
|
|
1151
|
-
!t.disabled && (g.isValidating || g.validatingFields || h.isValidating || h.validatingFields) && ((
|
|
1150
|
+
}, M = (o, l) => {
|
|
1151
|
+
!t.disabled && (g.isValidating || g.validatingFields || h.isValidating || h.validatingFields) && ((o || Array.from(a.mount)).forEach((u) => {
|
|
1152
1152
|
u && (l ? I(s.validatingFields, u, l) : j(s.validatingFields, u));
|
|
1153
1153
|
}), f.state.next({
|
|
1154
1154
|
validatingFields: s.validatingFields,
|
|
1155
1155
|
isValidating: !te(s.validatingFields)
|
|
1156
1156
|
}));
|
|
1157
|
-
}, re = (
|
|
1157
|
+
}, re = (o, l = [], u, w, p = !0, b = !0) => {
|
|
1158
1158
|
if (w && u && !t.disabled) {
|
|
1159
|
-
if (c.action = !0, b && Array.isArray(x(n,
|
|
1160
|
-
const C = u(x(n,
|
|
1161
|
-
p && I(n,
|
|
1159
|
+
if (c.action = !0, b && Array.isArray(x(n, o))) {
|
|
1160
|
+
const C = u(x(n, o), w.argA, w.argB);
|
|
1161
|
+
p && I(n, o, C);
|
|
1162
1162
|
}
|
|
1163
|
-
if (b && Array.isArray(x(s.errors,
|
|
1164
|
-
const C = u(x(s.errors,
|
|
1165
|
-
p && I(s.errors,
|
|
1163
|
+
if (b && Array.isArray(x(s.errors, o))) {
|
|
1164
|
+
const C = u(x(s.errors, o), w.argA, w.argB);
|
|
1165
|
+
p && I(s.errors, o, C), gr(s.errors, o);
|
|
1166
1166
|
}
|
|
1167
|
-
if ((g.touchedFields || h.touchedFields) && b && Array.isArray(x(s.touchedFields,
|
|
1168
|
-
const C = u(x(s.touchedFields,
|
|
1169
|
-
p && I(s.touchedFields,
|
|
1167
|
+
if ((g.touchedFields || h.touchedFields) && b && Array.isArray(x(s.touchedFields, o))) {
|
|
1168
|
+
const C = u(x(s.touchedFields, o), w.argA, w.argB);
|
|
1169
|
+
p && I(s.touchedFields, o, C);
|
|
1170
1170
|
}
|
|
1171
1171
|
(g.dirtyFields || h.dirtyFields) && (s.dirtyFields = Ee(i, r)), f.state.next({
|
|
1172
|
-
name:
|
|
1173
|
-
isDirty: ie(
|
|
1172
|
+
name: o,
|
|
1173
|
+
isDirty: ie(o, l),
|
|
1174
1174
|
dirtyFields: s.dirtyFields,
|
|
1175
1175
|
errors: s.errors,
|
|
1176
1176
|
isValid: s.isValid
|
|
1177
1177
|
});
|
|
1178
1178
|
} else
|
|
1179
|
-
I(r,
|
|
1180
|
-
}, N = (
|
|
1181
|
-
I(s.errors,
|
|
1179
|
+
I(r, o, l);
|
|
1180
|
+
}, N = (o, l) => {
|
|
1181
|
+
I(s.errors, o, l), f.state.next({
|
|
1182
1182
|
errors: s.errors
|
|
1183
1183
|
});
|
|
1184
|
-
}, Q = (
|
|
1185
|
-
s.errors =
|
|
1184
|
+
}, Q = (o) => {
|
|
1185
|
+
s.errors = o, f.state.next({
|
|
1186
1186
|
errors: s.errors,
|
|
1187
1187
|
isValid: !1
|
|
1188
1188
|
});
|
|
1189
|
-
}, L = (
|
|
1190
|
-
const p = x(n,
|
|
1189
|
+
}, L = (o, l, u, w) => {
|
|
1190
|
+
const p = x(n, o);
|
|
1191
1191
|
if (p) {
|
|
1192
|
-
const b = x(r,
|
|
1193
|
-
H(b) || w && w.defaultChecked || l ? I(r,
|
|
1192
|
+
const b = x(r, o, H(u) ? x(i, o) : u);
|
|
1193
|
+
H(b) || w && w.defaultChecked || l ? I(r, o, l ? b : At(p._f)) : U(o, b), c.mount && S();
|
|
1194
1194
|
}
|
|
1195
|
-
}, $ = (
|
|
1195
|
+
}, $ = (o, l, u, w, p) => {
|
|
1196
1196
|
let b = !1, C = !1;
|
|
1197
1197
|
const D = {
|
|
1198
|
-
name:
|
|
1198
|
+
name: o
|
|
1199
1199
|
};
|
|
1200
1200
|
if (!t.disabled) {
|
|
1201
1201
|
if (!u || w) {
|
|
1202
1202
|
(g.isDirty || h.isDirty) && (C = s.isDirty, s.isDirty = D.isDirty = ie(), b = C !== D.isDirty);
|
|
1203
|
-
const O = we(x(i,
|
|
1204
|
-
C = !!x(s.dirtyFields,
|
|
1203
|
+
const O = we(x(i, o), l);
|
|
1204
|
+
C = !!x(s.dirtyFields, o), O ? j(s.dirtyFields, o) : I(s.dirtyFields, o, !0), D.dirtyFields = s.dirtyFields, b = b || (g.dirtyFields || h.dirtyFields) && C !== !O;
|
|
1205
1205
|
}
|
|
1206
1206
|
if (u) {
|
|
1207
|
-
const O = x(s.touchedFields,
|
|
1208
|
-
O || (I(s.touchedFields,
|
|
1207
|
+
const O = x(s.touchedFields, o);
|
|
1208
|
+
O || (I(s.touchedFields, o, u), D.touchedFields = s.touchedFields, b = b || (g.touchedFields || h.touchedFields) && O !== u);
|
|
1209
1209
|
}
|
|
1210
1210
|
b && p && f.state.next(D);
|
|
1211
1211
|
}
|
|
1212
1212
|
return b ? D : {};
|
|
1213
|
-
}, J = (
|
|
1214
|
-
const p = x(s.errors,
|
|
1215
|
-
if (t.delayError && u ? (d = _(() => N(
|
|
1213
|
+
}, J = (o, l, u, w) => {
|
|
1214
|
+
const p = x(s.errors, o), b = (g.isValid || h.isValid) && me(l) && s.isValid !== l;
|
|
1215
|
+
if (t.delayError && u ? (d = _(() => N(o, u)), d(t.delayError)) : (clearTimeout(y), d = null, u ? I(s.errors, o, u) : j(s.errors, o)), (u ? !we(p, u) : p) || !te(w) || b) {
|
|
1216
1216
|
const C = {
|
|
1217
1217
|
...w,
|
|
1218
1218
|
...b && me(l) ? { isValid: l } : {},
|
|
1219
1219
|
errors: s.errors,
|
|
1220
|
-
name:
|
|
1220
|
+
name: o
|
|
1221
1221
|
};
|
|
1222
1222
|
s = {
|
|
1223
1223
|
...s,
|
|
1224
1224
|
...C
|
|
1225
1225
|
}, f.state.next(C);
|
|
1226
1226
|
}
|
|
1227
|
-
}, Y = async (
|
|
1228
|
-
M(
|
|
1229
|
-
const l = await t.resolver(r, t.context, ur(
|
|
1230
|
-
return M(
|
|
1231
|
-
}, q = async (
|
|
1232
|
-
const { errors: l } = await Y(
|
|
1233
|
-
if (
|
|
1234
|
-
for (const u of
|
|
1227
|
+
}, Y = async (o) => {
|
|
1228
|
+
M(o, !0);
|
|
1229
|
+
const l = await t.resolver(r, t.context, ur(o || a.mount, n, t.criteriaMode, t.shouldUseNativeValidation));
|
|
1230
|
+
return M(o), l;
|
|
1231
|
+
}, q = async (o) => {
|
|
1232
|
+
const { errors: l } = await Y(o);
|
|
1233
|
+
if (o)
|
|
1234
|
+
for (const u of o) {
|
|
1235
1235
|
const w = x(l, u);
|
|
1236
1236
|
w ? I(s.errors, u, w) : j(s.errors, u);
|
|
1237
1237
|
}
|
|
1238
1238
|
else
|
|
1239
1239
|
s.errors = l;
|
|
1240
1240
|
return l;
|
|
1241
|
-
}, V = async (
|
|
1241
|
+
}, V = async (o, l, u = {
|
|
1242
1242
|
valid: !0
|
|
1243
1243
|
}) => {
|
|
1244
|
-
for (const w in
|
|
1245
|
-
const p =
|
|
1244
|
+
for (const w in o) {
|
|
1245
|
+
const p = o[w];
|
|
1246
1246
|
if (p) {
|
|
1247
1247
|
const { _f: b, ...C } = p;
|
|
1248
1248
|
if (b) {
|
|
1249
|
-
const D =
|
|
1249
|
+
const D = a.array.has(b.name), O = p._f && dr(p._f);
|
|
1250
1250
|
O && g.validatingFields && M([w], !0);
|
|
1251
|
-
const
|
|
1252
|
-
if (O && g.validatingFields && M([w]),
|
|
1251
|
+
const oe = await Dt(p, a.disabled, r, v, t.shouldUseNativeValidation && !l, D);
|
|
1252
|
+
if (O && g.validatingFields && M([w]), oe[b.name] && (u.valid = !1, l))
|
|
1253
1253
|
break;
|
|
1254
|
-
!l && (x(
|
|
1254
|
+
!l && (x(oe, b.name) ? D ? br(s.errors, oe, b.name) : I(s.errors, b.name, oe[b.name]) : j(s.errors, b.name));
|
|
1255
1255
|
}
|
|
1256
1256
|
!te(C) && await V(C, l, u);
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
return u.valid;
|
|
1260
1260
|
}, ee = () => {
|
|
1261
|
-
for (const
|
|
1262
|
-
const l = x(n,
|
|
1263
|
-
l && (l._f.refs ? l._f.refs.every((u) => !Ze(u)) : !Ze(l._f.ref)) && We(
|
|
1261
|
+
for (const o of a.unMount) {
|
|
1262
|
+
const l = x(n, o);
|
|
1263
|
+
l && (l._f.refs ? l._f.refs.every((u) => !Ze(u)) : !Ze(l._f.ref)) && We(o);
|
|
1264
1264
|
}
|
|
1265
|
-
|
|
1266
|
-
}, ie = (
|
|
1267
|
-
...c.mount ? r : H(l) ? i : he(
|
|
1268
|
-
}, u, l), E = (
|
|
1269
|
-
const w = x(n,
|
|
1265
|
+
a.unMount = /* @__PURE__ */ new Set();
|
|
1266
|
+
}, ie = (o, l) => !t.disabled && (o && l && I(r, o, l), !we(_e(), i)), A = (o, l, u) => ir(o, a, {
|
|
1267
|
+
...c.mount ? r : H(l) ? i : he(o) ? { [o]: l } : l
|
|
1268
|
+
}, u, l), E = (o) => st(x(c.mount ? r : i, o, t.shouldUnregister ? x(i, o, []) : [])), U = (o, l, u = {}) => {
|
|
1269
|
+
const w = x(n, o);
|
|
1270
1270
|
let p = l;
|
|
1271
1271
|
if (w) {
|
|
1272
1272
|
const b = w._f;
|
|
1273
|
-
b && (!b.disabled && I(r,
|
|
1273
|
+
b && (!b.disabled && I(r, o, ss(l, b)), p = Re(b.ref) && X(l) ? "" : l, Xt(b.ref) ? [...b.ref.options].forEach((C) => C.selected = p.includes(C.value)) : b.refs ? Oe(b.ref) ? b.refs.forEach((C) => {
|
|
1274
1274
|
(!C.defaultChecked || !C.disabled) && (Array.isArray(p) ? C.checked = !!p.find((D) => D === C.value) : C.checked = p === C.value || !!p);
|
|
1275
1275
|
}) : b.refs.forEach((C) => C.checked = C.value === p) : nt(b.ref) ? b.ref.value = "" : (b.ref.value = p, b.ref.type || f.state.next({
|
|
1276
|
-
name:
|
|
1276
|
+
name: o,
|
|
1277
1277
|
values: z(r)
|
|
1278
1278
|
})));
|
|
1279
1279
|
}
|
|
1280
|
-
(u.shouldDirty || u.shouldTouch) && $(
|
|
1281
|
-
}, W = (
|
|
1280
|
+
(u.shouldDirty || u.shouldTouch) && $(o, p, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && le(o);
|
|
1281
|
+
}, W = (o, l, u) => {
|
|
1282
1282
|
for (const w in l) {
|
|
1283
1283
|
if (!l.hasOwnProperty(w))
|
|
1284
1284
|
return;
|
|
1285
|
-
const p = l[w], b =
|
|
1286
|
-
(
|
|
1285
|
+
const p = l[w], b = o + "." + w, C = x(n, b);
|
|
1286
|
+
(a.array.has(o) || B(p) || C && !C._f) && !Se(p) ? W(b, p, u) : U(b, p, u);
|
|
1287
1287
|
}
|
|
1288
|
-
}, G = (
|
|
1289
|
-
const w = x(n,
|
|
1290
|
-
I(r,
|
|
1291
|
-
name:
|
|
1288
|
+
}, G = (o, l, u = {}) => {
|
|
1289
|
+
const w = x(n, o), p = a.array.has(o), b = z(l);
|
|
1290
|
+
I(r, o, b), p ? (f.array.next({
|
|
1291
|
+
name: o,
|
|
1292
1292
|
values: z(r)
|
|
1293
1293
|
}), (g.isDirty || g.dirtyFields || h.isDirty || h.dirtyFields) && u.shouldDirty && f.state.next({
|
|
1294
|
-
name:
|
|
1294
|
+
name: o,
|
|
1295
1295
|
dirtyFields: Ee(i, r),
|
|
1296
|
-
isDirty: ie(
|
|
1297
|
-
})) : w && !w._f && !X(b) ? W(
|
|
1298
|
-
name: c.mount ?
|
|
1296
|
+
isDirty: ie(o, b)
|
|
1297
|
+
})) : w && !w._f && !X(b) ? W(o, b, u) : U(o, b, u), $t(o, a) && f.state.next({ ...s, name: o }), f.state.next({
|
|
1298
|
+
name: c.mount ? o : void 0,
|
|
1299
1299
|
values: z(r)
|
|
1300
1300
|
});
|
|
1301
|
-
}, P = async (
|
|
1301
|
+
}, P = async (o) => {
|
|
1302
1302
|
c.mount = !0;
|
|
1303
|
-
const l =
|
|
1303
|
+
const l = o.target;
|
|
1304
1304
|
let u = l.name, w = !0;
|
|
1305
1305
|
const p = x(n, u), b = (O) => {
|
|
1306
1306
|
w = Number.isNaN(O) || Se(O) && isNaN(O.getTime()) || we(O, x(r, u, O));
|
|
1307
1307
|
}, C = Et(t.mode), D = Et(t.reValidateMode);
|
|
1308
1308
|
if (p) {
|
|
1309
|
-
let O,
|
|
1310
|
-
const Me = l.type ? At(p._f) : Xs(
|
|
1311
|
-
I(r, u, Me), pe ? (p._f.onBlur && p._f.onBlur(
|
|
1309
|
+
let O, oe;
|
|
1310
|
+
const Me = l.type ? At(p._f) : Xs(o), pe = o.type === _t.BLUR || o.type === _t.FOCUS_OUT, fs = !fr(p._f) && !t.resolver && !x(s.errors, u) && !p._f.deps || yr(pe, x(s.touchedFields, u), s.isSubmitted, D, C), Je = $t(u, a, pe);
|
|
1311
|
+
I(r, u, Me), pe ? (p._f.onBlur && p._f.onBlur(o), d && d(0)) : p._f.onChange && p._f.onChange(o);
|
|
1312
1312
|
const Ye = $(u, Me, pe), ms = !te(Ye) || Je;
|
|
1313
1313
|
if (!pe && f.state.next({
|
|
1314
1314
|
name: u,
|
|
1315
|
-
type:
|
|
1315
|
+
type: o.type,
|
|
1316
1316
|
values: z(r)
|
|
1317
1317
|
}), fs)
|
|
1318
1318
|
return (g.isValid || h.isValid) && (t.mode === "onBlur" ? pe && S() : pe || S()), ms && f.state.next({ name: u, ...Je ? {} : Ye });
|
|
@@ -1320,99 +1320,99 @@ function wr(e = {}) {
|
|
|
1320
1320
|
const { errors: yt } = await Y([u]);
|
|
1321
1321
|
if (b(Me), w) {
|
|
1322
1322
|
const hs = Tt(s.errors, n, u), gt = Tt(yt, n, hs.name || u);
|
|
1323
|
-
O = gt.error, u = gt.name,
|
|
1323
|
+
O = gt.error, u = gt.name, oe = te(yt);
|
|
1324
1324
|
}
|
|
1325
1325
|
} else
|
|
1326
|
-
M([u], !0), O = (await Dt(p,
|
|
1327
|
-
w && (p._f.deps && le(p._f.deps), J(u,
|
|
1326
|
+
M([u], !0), O = (await Dt(p, a.disabled, r, v, t.shouldUseNativeValidation))[u], M([u]), b(Me), w && (O ? oe = !1 : (g.isValid || h.isValid) && (oe = await V(n, !0)));
|
|
1327
|
+
w && (p._f.deps && le(p._f.deps), J(u, oe, O, Ye));
|
|
1328
1328
|
}
|
|
1329
|
-
},
|
|
1330
|
-
if (x(s.errors, l) &&
|
|
1331
|
-
return
|
|
1332
|
-
}, le = async (
|
|
1329
|
+
}, ae = (o, l) => {
|
|
1330
|
+
if (x(s.errors, l) && o.focus)
|
|
1331
|
+
return o.focus(), 1;
|
|
1332
|
+
}, le = async (o, l = {}) => {
|
|
1333
1333
|
let u, w;
|
|
1334
|
-
const p = $e(
|
|
1334
|
+
const p = $e(o);
|
|
1335
1335
|
if (t.resolver) {
|
|
1336
|
-
const b = await q(H(
|
|
1337
|
-
u = te(b), w =
|
|
1338
|
-
} else
|
|
1336
|
+
const b = await q(H(o) ? o : p);
|
|
1337
|
+
u = te(b), w = o ? !p.some((C) => x(b, C)) : u;
|
|
1338
|
+
} else o ? (w = (await Promise.all(p.map(async (b) => {
|
|
1339
1339
|
const C = x(n, b);
|
|
1340
1340
|
return await V(C && C._f ? { [b]: C } : C);
|
|
1341
1341
|
}))).every(Boolean), !(!w && !s.isValid) && S()) : w = u = await V(n);
|
|
1342
1342
|
return f.state.next({
|
|
1343
|
-
...!he(
|
|
1344
|
-
...t.resolver || !
|
|
1343
|
+
...!he(o) || (g.isValid || h.isValid) && u !== s.isValid ? {} : { name: o },
|
|
1344
|
+
...t.resolver || !o ? { isValid: u } : {},
|
|
1345
1345
|
errors: s.errors
|
|
1346
|
-
}), l.shouldFocus && !w && Te(n,
|
|
1347
|
-
}, _e = (
|
|
1346
|
+
}), l.shouldFocus && !w && Te(n, ae, o ? p : a.mount), w;
|
|
1347
|
+
}, _e = (o) => {
|
|
1348
1348
|
const l = {
|
|
1349
1349
|
...c.mount ? r : i
|
|
1350
1350
|
};
|
|
1351
|
-
return H(
|
|
1352
|
-
}, Ie = (
|
|
1353
|
-
invalid: !!x((l || s).errors,
|
|
1354
|
-
isDirty: !!x((l || s).dirtyFields,
|
|
1355
|
-
error: x((l || s).errors,
|
|
1356
|
-
isValidating: !!x(s.validatingFields,
|
|
1357
|
-
isTouched: !!x((l || s).touchedFields,
|
|
1358
|
-
}), Ce = (
|
|
1359
|
-
|
|
1360
|
-
errors:
|
|
1351
|
+
return H(o) ? l : he(o) ? x(l, o) : o.map((u) => x(l, u));
|
|
1352
|
+
}, Ie = (o, l) => ({
|
|
1353
|
+
invalid: !!x((l || s).errors, o),
|
|
1354
|
+
isDirty: !!x((l || s).dirtyFields, o),
|
|
1355
|
+
error: x((l || s).errors, o),
|
|
1356
|
+
isValidating: !!x(s.validatingFields, o),
|
|
1357
|
+
isTouched: !!x((l || s).touchedFields, o)
|
|
1358
|
+
}), Ce = (o) => {
|
|
1359
|
+
o && $e(o).forEach((l) => j(s.errors, l)), f.state.next({
|
|
1360
|
+
errors: o ? s.errors : {}
|
|
1361
1361
|
});
|
|
1362
|
-
}, ct = (
|
|
1363
|
-
const w = (x(n,
|
|
1364
|
-
I(s.errors,
|
|
1362
|
+
}, ct = (o, l, u) => {
|
|
1363
|
+
const w = (x(n, o, { _f: {} })._f || {}).ref, p = x(s.errors, o) || {}, { ref: b, message: C, type: D, ...O } = p;
|
|
1364
|
+
I(s.errors, o, {
|
|
1365
1365
|
...O,
|
|
1366
1366
|
...l,
|
|
1367
1367
|
ref: w
|
|
1368
1368
|
}), f.state.next({
|
|
1369
|
-
name:
|
|
1369
|
+
name: o,
|
|
1370
1370
|
errors: s.errors,
|
|
1371
1371
|
isValid: !1
|
|
1372
1372
|
}), u && u.shouldFocus && w && w.focus && w.focus();
|
|
1373
|
-
},
|
|
1374
|
-
next: (u) => "values" in u &&
|
|
1375
|
-
}) : A(
|
|
1373
|
+
}, as = (o, l) => de(o) ? f.state.subscribe({
|
|
1374
|
+
next: (u) => "values" in u && o(A(void 0, l), u)
|
|
1375
|
+
}) : A(o, l, !0), lt = (o) => f.state.subscribe({
|
|
1376
1376
|
next: (l) => {
|
|
1377
|
-
hr(
|
|
1377
|
+
hr(o.name, l.name, o.exact) && mr(l, o.formState || g, ds, o.reRenderRoot) && o.callback({
|
|
1378
1378
|
values: { ...r },
|
|
1379
1379
|
...s,
|
|
1380
1380
|
...l,
|
|
1381
1381
|
defaultValues: i
|
|
1382
1382
|
});
|
|
1383
1383
|
}
|
|
1384
|
-
}).unsubscribe,
|
|
1384
|
+
}).unsubscribe, os = (o) => (c.mount = !0, h = {
|
|
1385
1385
|
...h,
|
|
1386
|
-
...
|
|
1386
|
+
...o.formState
|
|
1387
1387
|
}, lt({
|
|
1388
|
-
...
|
|
1388
|
+
...o,
|
|
1389
1389
|
formState: h
|
|
1390
|
-
})), We = (
|
|
1391
|
-
for (const u of
|
|
1392
|
-
|
|
1390
|
+
})), We = (o, l = {}) => {
|
|
1391
|
+
for (const u of o ? $e(o) : a.mount)
|
|
1392
|
+
a.mount.delete(u), a.array.delete(u), l.keepValue || (j(n, u), j(r, u)), !l.keepError && j(s.errors, u), !l.keepDirty && j(s.dirtyFields, u), !l.keepTouched && j(s.touchedFields, u), !l.keepIsValidating && j(s.validatingFields, u), !t.shouldUnregister && !l.keepDefaultValue && j(i, u);
|
|
1393
1393
|
f.state.next({
|
|
1394
1394
|
values: z(r)
|
|
1395
1395
|
}), f.state.next({
|
|
1396
1396
|
...s,
|
|
1397
1397
|
...l.keepDirty ? { isDirty: ie() } : {}
|
|
1398
1398
|
}), !l.keepIsValid && S();
|
|
1399
|
-
}, ut = ({ disabled:
|
|
1400
|
-
(me(
|
|
1401
|
-
}, ze = (
|
|
1402
|
-
let u = x(n,
|
|
1399
|
+
}, ut = ({ disabled: o, name: l }) => {
|
|
1400
|
+
(me(o) && c.mount || o || a.disabled.has(l)) && (o ? a.disabled.add(l) : a.disabled.delete(l));
|
|
1401
|
+
}, ze = (o, l = {}) => {
|
|
1402
|
+
let u = x(n, o);
|
|
1403
1403
|
const w = me(l.disabled) || me(t.disabled);
|
|
1404
|
-
return I(n,
|
|
1404
|
+
return I(n, o, {
|
|
1405
1405
|
...u || {},
|
|
1406
1406
|
_f: {
|
|
1407
|
-
...u && u._f ? u._f : { ref: { name:
|
|
1408
|
-
name:
|
|
1407
|
+
...u && u._f ? u._f : { ref: { name: o } },
|
|
1408
|
+
name: o,
|
|
1409
1409
|
mount: !0,
|
|
1410
1410
|
...l
|
|
1411
1411
|
}
|
|
1412
|
-
}),
|
|
1412
|
+
}), a.mount.add(o), u ? ut({
|
|
1413
1413
|
disabled: me(l.disabled) ? l.disabled : t.disabled,
|
|
1414
|
-
name:
|
|
1415
|
-
}) : L(
|
|
1414
|
+
name: o
|
|
1415
|
+
}) : L(o, !0, l.value), {
|
|
1416
1416
|
...w ? { disabled: l.disabled || t.disabled } : {},
|
|
1417
1417
|
...t.progressive ? {
|
|
1418
1418
|
required: !!l.required,
|
|
@@ -1422,40 +1422,40 @@ function wr(e = {}) {
|
|
|
1422
1422
|
maxLength: Fe(l.maxLength),
|
|
1423
1423
|
pattern: Fe(l.pattern)
|
|
1424
1424
|
} : {},
|
|
1425
|
-
name:
|
|
1425
|
+
name: o,
|
|
1426
1426
|
onChange: P,
|
|
1427
1427
|
onBlur: P,
|
|
1428
1428
|
ref: (p) => {
|
|
1429
1429
|
if (p) {
|
|
1430
|
-
ze(
|
|
1431
|
-
const b = H(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, C =
|
|
1430
|
+
ze(o, l), u = x(n, o);
|
|
1431
|
+
const b = H(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, C = or(b), D = u._f.refs || [];
|
|
1432
1432
|
if (C ? D.find((O) => O === b) : b === u._f.ref)
|
|
1433
1433
|
return;
|
|
1434
|
-
I(n,
|
|
1434
|
+
I(n, o, {
|
|
1435
1435
|
_f: {
|
|
1436
1436
|
...u._f,
|
|
1437
1437
|
...C ? {
|
|
1438
1438
|
refs: [
|
|
1439
1439
|
...D.filter(Ze),
|
|
1440
1440
|
b,
|
|
1441
|
-
...Array.isArray(x(i,
|
|
1441
|
+
...Array.isArray(x(i, o)) ? [{}] : []
|
|
1442
1442
|
],
|
|
1443
|
-
ref: { type: b.type, name:
|
|
1443
|
+
ref: { type: b.type, name: o }
|
|
1444
1444
|
} : { ref: b }
|
|
1445
1445
|
}
|
|
1446
|
-
}), L(
|
|
1446
|
+
}), L(o, !1, void 0, b);
|
|
1447
1447
|
} else
|
|
1448
|
-
u = x(n,
|
|
1448
|
+
u = x(n, o, {}), u._f && (u._f.mount = !1), (t.shouldUnregister || l.shouldUnregister) && !(er(a.array, o) && c.action) && a.unMount.add(o);
|
|
1449
1449
|
}
|
|
1450
1450
|
};
|
|
1451
|
-
}, Ge = () => t.shouldFocusError && Te(n,
|
|
1452
|
-
me(
|
|
1451
|
+
}, Ge = () => t.shouldFocusError && Te(n, ae, a.mount), cs = (o) => {
|
|
1452
|
+
me(o) && (f.state.next({ disabled: o }), Te(n, (l, u) => {
|
|
1453
1453
|
const w = x(n, u);
|
|
1454
|
-
w && (l.disabled = w._f.disabled ||
|
|
1455
|
-
p.disabled = w._f.disabled ||
|
|
1454
|
+
w && (l.disabled = w._f.disabled || o, Array.isArray(w._f.refs) && w._f.refs.forEach((p) => {
|
|
1455
|
+
p.disabled = w._f.disabled || o;
|
|
1456
1456
|
}));
|
|
1457
1457
|
}, 0, !1));
|
|
1458
|
-
}, dt = (
|
|
1458
|
+
}, dt = (o, l) => async (u) => {
|
|
1459
1459
|
let w;
|
|
1460
1460
|
u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
|
|
1461
1461
|
let p = z(r);
|
|
@@ -1466,15 +1466,15 @@ function wr(e = {}) {
|
|
|
1466
1466
|
s.errors = b, p = z(C);
|
|
1467
1467
|
} else
|
|
1468
1468
|
await V(n);
|
|
1469
|
-
if (
|
|
1470
|
-
for (const b of
|
|
1469
|
+
if (a.disabled.size)
|
|
1470
|
+
for (const b of a.disabled)
|
|
1471
1471
|
j(p, b);
|
|
1472
1472
|
if (j(s.errors, "root"), te(s.errors)) {
|
|
1473
1473
|
f.state.next({
|
|
1474
1474
|
errors: {}
|
|
1475
1475
|
});
|
|
1476
1476
|
try {
|
|
1477
|
-
await
|
|
1477
|
+
await o(p, u);
|
|
1478
1478
|
} catch (b) {
|
|
1479
1479
|
w = b;
|
|
1480
1480
|
}
|
|
@@ -1488,35 +1488,35 @@ function wr(e = {}) {
|
|
|
1488
1488
|
errors: s.errors
|
|
1489
1489
|
}), w)
|
|
1490
1490
|
throw w;
|
|
1491
|
-
}, ls = (
|
|
1492
|
-
x(n,
|
|
1493
|
-
}, ft = (
|
|
1494
|
-
const u =
|
|
1491
|
+
}, ls = (o, l = {}) => {
|
|
1492
|
+
x(n, o) && (H(l.defaultValue) ? G(o, z(x(i, o))) : (G(o, l.defaultValue), I(i, o, z(l.defaultValue))), l.keepTouched || j(s.touchedFields, o), l.keepDirty || (j(s.dirtyFields, o), s.isDirty = l.defaultValue ? ie(o, z(x(i, o))) : ie()), l.keepError || (j(s.errors, o), g.isValid && S()), f.state.next({ ...s }));
|
|
1493
|
+
}, ft = (o, l = {}) => {
|
|
1494
|
+
const u = o ? z(o) : i, w = z(u), p = te(o), b = p ? i : w;
|
|
1495
1495
|
if (l.keepDefaultValues || (i = u), !l.keepValues) {
|
|
1496
1496
|
if (l.keepDirtyValues) {
|
|
1497
1497
|
const C = /* @__PURE__ */ new Set([
|
|
1498
|
-
...
|
|
1498
|
+
...a.mount,
|
|
1499
1499
|
...Object.keys(Ee(i, r))
|
|
1500
1500
|
]);
|
|
1501
1501
|
for (const D of Array.from(C))
|
|
1502
1502
|
x(s.dirtyFields, D) ? I(b, D, x(r, D)) : G(D, x(b, D));
|
|
1503
1503
|
} else {
|
|
1504
|
-
if (tt && H(
|
|
1505
|
-
for (const C of
|
|
1504
|
+
if (tt && H(o))
|
|
1505
|
+
for (const C of a.mount) {
|
|
1506
1506
|
const D = x(n, C);
|
|
1507
1507
|
if (D && D._f) {
|
|
1508
1508
|
const O = Array.isArray(D._f.refs) ? D._f.refs[0] : D._f.ref;
|
|
1509
1509
|
if (Re(O)) {
|
|
1510
|
-
const
|
|
1511
|
-
if (
|
|
1512
|
-
|
|
1510
|
+
const oe = O.closest("form");
|
|
1511
|
+
if (oe) {
|
|
1512
|
+
oe.reset();
|
|
1513
1513
|
break;
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
1518
|
if (l.keepFieldsRef)
|
|
1519
|
-
for (const C of
|
|
1519
|
+
for (const C of a.mount)
|
|
1520
1520
|
G(C, x(b, C));
|
|
1521
1521
|
else
|
|
1522
1522
|
n = {};
|
|
@@ -1527,8 +1527,8 @@ function wr(e = {}) {
|
|
|
1527
1527
|
values: { ...b }
|
|
1528
1528
|
});
|
|
1529
1529
|
}
|
|
1530
|
-
|
|
1531
|
-
mount: l.keepDirtyValues ?
|
|
1530
|
+
a = {
|
|
1531
|
+
mount: l.keepDirtyValues ? a.mount : /* @__PURE__ */ new Set(),
|
|
1532
1532
|
unMount: /* @__PURE__ */ new Set(),
|
|
1533
1533
|
array: /* @__PURE__ */ new Set(),
|
|
1534
1534
|
disabled: /* @__PURE__ */ new Set(),
|
|
@@ -1537,24 +1537,24 @@ function wr(e = {}) {
|
|
|
1537
1537
|
focus: ""
|
|
1538
1538
|
}, c.mount = !g.isValid || !!l.keepIsValid || !!l.keepDirtyValues, c.watch = !!t.shouldUnregister, f.state.next({
|
|
1539
1539
|
submitCount: l.keepSubmitCount ? s.submitCount : 0,
|
|
1540
|
-
isDirty: p ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !we(
|
|
1540
|
+
isDirty: p ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !we(o, i)),
|
|
1541
1541
|
isSubmitted: l.keepIsSubmitted ? s.isSubmitted : !1,
|
|
1542
|
-
dirtyFields: p ? {} : l.keepDirtyValues ? l.keepDefaultValues && r ? Ee(i, r) : s.dirtyFields : l.keepDefaultValues &&
|
|
1542
|
+
dirtyFields: p ? {} : l.keepDirtyValues ? l.keepDefaultValues && r ? Ee(i, r) : s.dirtyFields : l.keepDefaultValues && o ? Ee(i, o) : l.keepDirty ? s.dirtyFields : {},
|
|
1543
1543
|
touchedFields: l.keepTouched ? s.touchedFields : {},
|
|
1544
1544
|
errors: l.keepErrors ? s.errors : {},
|
|
1545
1545
|
isSubmitSuccessful: l.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
|
|
1546
1546
|
isSubmitting: !1
|
|
1547
1547
|
});
|
|
1548
|
-
}, mt = (
|
|
1549
|
-
const u = x(n,
|
|
1548
|
+
}, mt = (o, l) => ft(de(o) ? o(r) : o, l), us = (o, l = {}) => {
|
|
1549
|
+
const u = x(n, o), w = u && u._f;
|
|
1550
1550
|
if (w) {
|
|
1551
1551
|
const p = w.refs ? w.refs[0] : w.ref;
|
|
1552
1552
|
p.focus && (p.focus(), l.shouldSelect && de(p.select) && p.select());
|
|
1553
1553
|
}
|
|
1554
|
-
}, ds = (
|
|
1554
|
+
}, ds = (o) => {
|
|
1555
1555
|
s = {
|
|
1556
1556
|
...s,
|
|
1557
|
-
...
|
|
1557
|
+
...o
|
|
1558
1558
|
};
|
|
1559
1559
|
}, ht = {
|
|
1560
1560
|
control: {
|
|
@@ -1574,8 +1574,8 @@ function wr(e = {}) {
|
|
|
1574
1574
|
_setErrors: Q,
|
|
1575
1575
|
_getFieldArray: E,
|
|
1576
1576
|
_reset: ft,
|
|
1577
|
-
_resetDefaultValues: () => de(t.defaultValues) && t.defaultValues().then((
|
|
1578
|
-
mt(
|
|
1577
|
+
_resetDefaultValues: () => de(t.defaultValues) && t.defaultValues().then((o) => {
|
|
1578
|
+
mt(o, t.resetOptions), f.state.next({
|
|
1579
1579
|
isLoading: !1
|
|
1580
1580
|
});
|
|
1581
1581
|
}),
|
|
@@ -1592,17 +1592,17 @@ function wr(e = {}) {
|
|
|
1592
1592
|
get _state() {
|
|
1593
1593
|
return c;
|
|
1594
1594
|
},
|
|
1595
|
-
set _state(
|
|
1596
|
-
c =
|
|
1595
|
+
set _state(o) {
|
|
1596
|
+
c = o;
|
|
1597
1597
|
},
|
|
1598
1598
|
get _defaultValues() {
|
|
1599
1599
|
return i;
|
|
1600
1600
|
},
|
|
1601
1601
|
get _names() {
|
|
1602
|
-
return
|
|
1602
|
+
return a;
|
|
1603
1603
|
},
|
|
1604
|
-
set _names(
|
|
1605
|
-
|
|
1604
|
+
set _names(o) {
|
|
1605
|
+
a = o;
|
|
1606
1606
|
},
|
|
1607
1607
|
get _formState() {
|
|
1608
1608
|
return s;
|
|
@@ -1610,18 +1610,18 @@ function wr(e = {}) {
|
|
|
1610
1610
|
get _options() {
|
|
1611
1611
|
return t;
|
|
1612
1612
|
},
|
|
1613
|
-
set _options(
|
|
1613
|
+
set _options(o) {
|
|
1614
1614
|
t = {
|
|
1615
1615
|
...t,
|
|
1616
|
-
...
|
|
1616
|
+
...o
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
1619
|
},
|
|
1620
|
-
subscribe:
|
|
1620
|
+
subscribe: os,
|
|
1621
1621
|
trigger: le,
|
|
1622
1622
|
register: ze,
|
|
1623
1623
|
handleSubmit: dt,
|
|
1624
|
-
watch:
|
|
1624
|
+
watch: as,
|
|
1625
1625
|
setValue: G,
|
|
1626
1626
|
getValues: _e,
|
|
1627
1627
|
reset: mt,
|
|
@@ -1662,9 +1662,9 @@ function ns(e = {}) {
|
|
|
1662
1662
|
formState: n
|
|
1663
1663
|
}, e.defaultValues && !de(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
1664
1664
|
else {
|
|
1665
|
-
const { formControl: c, ...
|
|
1665
|
+
const { formControl: c, ...a } = wr(e);
|
|
1666
1666
|
t.current = {
|
|
1667
|
-
...
|
|
1667
|
+
...a,
|
|
1668
1668
|
formState: n
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
@@ -1675,8 +1675,8 @@ function ns(e = {}) {
|
|
|
1675
1675
|
callback: () => i({ ...r._formState }),
|
|
1676
1676
|
reRenderRoot: !0
|
|
1677
1677
|
});
|
|
1678
|
-
return i((
|
|
1679
|
-
...
|
|
1678
|
+
return i((a) => ({
|
|
1679
|
+
...a,
|
|
1680
1680
|
isReady: !0
|
|
1681
1681
|
})), r._formState.isReady = !0, c;
|
|
1682
1682
|
}, [r]), ne.useEffect(() => r._disableForm(e.disabled), [r, e.disabled]), ne.useEffect(() => {
|
|
@@ -1708,7 +1708,7 @@ const sn = (e) => {
|
|
|
1708
1708
|
defaultValues: i,
|
|
1709
1709
|
mutationFn: r,
|
|
1710
1710
|
formToDto: c,
|
|
1711
|
-
onError:
|
|
1711
|
+
onError: a,
|
|
1712
1712
|
onSuccess: d,
|
|
1713
1713
|
queryKey: y,
|
|
1714
1714
|
onSuccessMessage: g
|
|
@@ -1742,7 +1742,7 @@ const sn = (e) => {
|
|
|
1742
1742
|
)
|
|
1743
1743
|
);
|
|
1744
1744
|
}
|
|
1745
|
-
|
|
1745
|
+
a && a(L);
|
|
1746
1746
|
},
|
|
1747
1747
|
onSuccess: async (L) => {
|
|
1748
1748
|
be && await be.invalidateQueries({ queryKey: y }), d && d(L), g && n({
|
|
@@ -1865,7 +1865,7 @@ const _r = (e) => {
|
|
|
1865
1865
|
)
|
|
1866
1866
|
};
|
|
1867
1867
|
}, nn = (e) => {
|
|
1868
|
-
const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = Ne(), { t: r } = T(), { open: c, onClick:
|
|
1868
|
+
const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = Ne(), { t: r } = T(), { open: c, onClick: a, close: d, dialogFn: y, isLoading: g } = Jt({
|
|
1869
1869
|
onSuccessMessage: r("_pages:common.actions.delete.successMessage"),
|
|
1870
1870
|
onError: (f) => {
|
|
1871
1871
|
f.errors && i(
|
|
@@ -1881,9 +1881,9 @@ const _r = (e) => {
|
|
|
1881
1881
|
await be.invalidateQueries({ queryKey: t }), s && s(f);
|
|
1882
1882
|
},
|
|
1883
1883
|
...n
|
|
1884
|
-
}), { action: h } = vr({ onClick:
|
|
1884
|
+
}), { action: h } = vr({ onClick: a });
|
|
1885
1885
|
return {
|
|
1886
|
-
onClick:
|
|
1886
|
+
onClick: a,
|
|
1887
1887
|
title: r("_pages:common.actions.delete.dialog.title"),
|
|
1888
1888
|
open: c,
|
|
1889
1889
|
isLoading: g,
|
|
@@ -1894,7 +1894,7 @@ const _r = (e) => {
|
|
|
1894
1894
|
}, is = () => {
|
|
1895
1895
|
const [e, t] = R(!1);
|
|
1896
1896
|
return { open: e, setOpen: t, handleClose: () => t(!1), handleOpen: () => t(!0) };
|
|
1897
|
-
},
|
|
1897
|
+
}, an = (e) => {
|
|
1898
1898
|
const { t } = T(), {
|
|
1899
1899
|
showErrorNotification: s,
|
|
1900
1900
|
showStackNotifications: n,
|
|
@@ -1902,7 +1902,7 @@ const _r = (e) => {
|
|
|
1902
1902
|
} = Ne(), {
|
|
1903
1903
|
defaultValues: r,
|
|
1904
1904
|
getFunction: c,
|
|
1905
|
-
mutationFn:
|
|
1905
|
+
mutationFn: a,
|
|
1906
1906
|
formToDto: d,
|
|
1907
1907
|
dtoToForm: y,
|
|
1908
1908
|
onError: g,
|
|
@@ -1922,16 +1922,16 @@ const _r = (e) => {
|
|
|
1922
1922
|
}, [ee]);
|
|
1923
1923
|
const A = F(
|
|
1924
1924
|
(P) => {
|
|
1925
|
-
const
|
|
1926
|
-
return
|
|
1925
|
+
const ae = P == null ? void 0 : P.errors, le = [];
|
|
1926
|
+
return ae && ae.forEach(([_e, Ie]) => {
|
|
1927
1927
|
const Ce = document.querySelector(`[name="${_e}"]`);
|
|
1928
1928
|
(Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"), le.push(t(`_entities:${f}.${_e}.${Ie}`)));
|
|
1929
1929
|
}), le;
|
|
1930
1930
|
},
|
|
1931
1931
|
[t, f]
|
|
1932
1932
|
), E = F(() => {
|
|
1933
|
-
document.querySelectorAll("input, textarea, select").forEach((
|
|
1934
|
-
|
|
1933
|
+
document.querySelectorAll("input, textarea, select").forEach((ae) => {
|
|
1934
|
+
ae.classList.remove("error");
|
|
1935
1935
|
});
|
|
1936
1936
|
}, []), U = F(
|
|
1937
1937
|
(P) => {
|
|
@@ -1941,12 +1941,12 @@ const _r = (e) => {
|
|
|
1941
1941
|
), W = F(() => {
|
|
1942
1942
|
E(), N(), J();
|
|
1943
1943
|
}, [J, E, N]), G = Pe({
|
|
1944
|
-
mutationFn:
|
|
1944
|
+
mutationFn: a,
|
|
1945
1945
|
onError: (P) => {
|
|
1946
1946
|
if (console.error(P), P.errors) {
|
|
1947
|
-
const
|
|
1947
|
+
const ae = A(P);
|
|
1948
1948
|
n(
|
|
1949
|
-
|
|
1949
|
+
ae.map(
|
|
1950
1950
|
(le) => ({
|
|
1951
1951
|
message: le,
|
|
1952
1952
|
type: K.error
|
|
@@ -1977,8 +1977,8 @@ const _r = (e) => {
|
|
|
1977
1977
|
title: _,
|
|
1978
1978
|
isLoading: ie || G.isPending
|
|
1979
1979
|
};
|
|
1980
|
-
},
|
|
1981
|
-
const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = Ne(), { t: r } = T(), { open: c, onClick:
|
|
1980
|
+
}, on = (e) => {
|
|
1981
|
+
const { queryKey: t, onSuccess: s, ...n } = e, { showStackNotifications: i } = Ne(), { t: r } = T(), { open: c, onClick: a, close: d, dialogFn: y, isLoading: g } = Jt({
|
|
1982
1982
|
onSuccessMessage: r("_pages:common.actions.restore.successMessage"),
|
|
1983
1983
|
onError: (f) => {
|
|
1984
1984
|
f.errors && i(
|
|
@@ -1994,9 +1994,9 @@ const _r = (e) => {
|
|
|
1994
1994
|
await be.invalidateQueries({ queryKey: t }), s && s(f);
|
|
1995
1995
|
},
|
|
1996
1996
|
...n
|
|
1997
|
-
}), { action: h } = xr({ onClick:
|
|
1997
|
+
}), { action: h } = xr({ onClick: a });
|
|
1998
1998
|
return {
|
|
1999
|
-
onClick:
|
|
1999
|
+
onClick: a,
|
|
2000
2000
|
title: r("_pages:common.actions.restore.dialog.title"),
|
|
2001
2001
|
open: c,
|
|
2002
2002
|
isLoading: g,
|
|
@@ -2006,7 +2006,7 @@ const _r = (e) => {
|
|
|
2006
2006
|
};
|
|
2007
2007
|
};
|
|
2008
2008
|
function cn(e) {
|
|
2009
|
-
const { t } = T(), { queryKey: s, mutationFn: n, entity: i, fileProcessor: r } = e, [c,
|
|
2009
|
+
const { t } = T(), { queryKey: s, mutationFn: n, entity: i, fileProcessor: r } = e, [c, a] = R(!1), [d, y] = R(null), [g, h] = R(!1), f = Pe({
|
|
2010
2010
|
mutationFn: n,
|
|
2011
2011
|
onError: (_) => {
|
|
2012
2012
|
console.error(_);
|
|
@@ -2015,7 +2015,7 @@ function cn(e) {
|
|
|
2015
2015
|
be && await be.invalidateQueries({ queryKey: s });
|
|
2016
2016
|
}
|
|
2017
2017
|
}), { action: v } = Cr({
|
|
2018
|
-
onClick: () =>
|
|
2018
|
+
onClick: () => a(!0)
|
|
2019
2019
|
});
|
|
2020
2020
|
return {
|
|
2021
2021
|
handleSubmit: async () => {
|
|
@@ -2024,7 +2024,7 @@ function cn(e) {
|
|
|
2024
2024
|
await f.mutateAsync({
|
|
2025
2025
|
items: d,
|
|
2026
2026
|
override: g
|
|
2027
|
-
}),
|
|
2027
|
+
}), a(!1), y(null), h(!1);
|
|
2028
2028
|
} catch (_) {
|
|
2029
2029
|
console.error(_);
|
|
2030
2030
|
}
|
|
@@ -2038,7 +2038,7 @@ function cn(e) {
|
|
|
2038
2038
|
entity: t(`_pages:${i}.title`)
|
|
2039
2039
|
}),
|
|
2040
2040
|
handleClose: () => {
|
|
2041
|
-
|
|
2041
|
+
a(!1), y(null);
|
|
2042
2042
|
},
|
|
2043
2043
|
action: v
|
|
2044
2044
|
};
|
|
@@ -2049,7 +2049,7 @@ const ln = (e) => {
|
|
|
2049
2049
|
mutationFn: i,
|
|
2050
2050
|
onError: r,
|
|
2051
2051
|
onSuccess: c,
|
|
2052
|
-
onSuccessMessage:
|
|
2052
|
+
onSuccessMessage: a = s("_pages:common.actions.export.successMessage")
|
|
2053
2053
|
} = e, d = Pe({
|
|
2054
2054
|
mutationFn: () => i(),
|
|
2055
2055
|
onError: (h) => {
|
|
@@ -2058,7 +2058,7 @@ const ln = (e) => {
|
|
|
2058
2058
|
onSuccess: async (h) => {
|
|
2059
2059
|
const f = JSON.stringify(h, null, 2), v = new Blob([f], { type: "application/json" }), _ = URL.createObjectURL(v), S = document.createElement("a");
|
|
2060
2060
|
S.href = _, S.download = `${n}.json`, S.click(), URL.revokeObjectURL(_), c && c(h), t({
|
|
2061
|
-
message:
|
|
2061
|
+
message: a
|
|
2062
2062
|
});
|
|
2063
2063
|
}
|
|
2064
2064
|
}), y = F(() => {
|
|
@@ -2121,7 +2121,7 @@ const un = () => {
|
|
|
2121
2121
|
state: i = bs.default,
|
|
2122
2122
|
name: r = "",
|
|
2123
2123
|
id: c = "",
|
|
2124
|
-
label:
|
|
2124
|
+
label: a = "",
|
|
2125
2125
|
disabled: d = !1,
|
|
2126
2126
|
required: y = !1,
|
|
2127
2127
|
containerClassName: g = "",
|
|
@@ -2152,7 +2152,7 @@ const un = () => {
|
|
|
2152
2152
|
htmlFor: r,
|
|
2153
2153
|
className: `text-input-label ${ws(i)} ${f}`,
|
|
2154
2154
|
children: [
|
|
2155
|
-
|
|
2155
|
+
a,
|
|
2156
2156
|
y ? " *" : ""
|
|
2157
2157
|
]
|
|
2158
2158
|
}
|
|
@@ -2172,7 +2172,7 @@ const un = () => {
|
|
|
2172
2172
|
onSubmit: i,
|
|
2173
2173
|
isLoading: r = !1,
|
|
2174
2174
|
buttonEnd: c = !0,
|
|
2175
|
-
reset:
|
|
2175
|
+
reset: a
|
|
2176
2176
|
} = e;
|
|
2177
2177
|
return /* @__PURE__ */ k("form", { className: "form-container", onSubmit: n(i), children: [
|
|
2178
2178
|
s,
|
|
@@ -2197,7 +2197,7 @@ const un = () => {
|
|
|
2197
2197
|
{
|
|
2198
2198
|
type: "button",
|
|
2199
2199
|
variant: "outlined",
|
|
2200
|
-
onClick: () =>
|
|
2200
|
+
onClick: () => a == null ? void 0 : a(),
|
|
2201
2201
|
name: t("_accessibility:buttons.cancel"),
|
|
2202
2202
|
"aria-label": t("_accessibility:ariaLabels.cancel"),
|
|
2203
2203
|
children: t("_accessibility:buttons.cancel")
|
|
@@ -2217,14 +2217,14 @@ const un = () => {
|
|
|
2217
2217
|
icon: s ? Ls : Ds
|
|
2218
2218
|
}
|
|
2219
2219
|
) });
|
|
2220
|
-
}),
|
|
2220
|
+
}), at = (e) => {
|
|
2221
2221
|
const { t } = T(), {
|
|
2222
2222
|
title: s,
|
|
2223
2223
|
children: n,
|
|
2224
2224
|
handleClose: i,
|
|
2225
2225
|
open: r = !1,
|
|
2226
2226
|
containerClassName: c = "",
|
|
2227
|
-
className:
|
|
2227
|
+
className: a = "",
|
|
2228
2228
|
animationClass: d = "appear"
|
|
2229
2229
|
} = e, [y, g] = R(window.innerWidth), h = F(
|
|
2230
2230
|
(S) => {
|
|
@@ -2266,7 +2266,7 @@ const un = () => {
|
|
|
2266
2266
|
children: /* @__PURE__ */ k(
|
|
2267
2267
|
"div",
|
|
2268
2268
|
{
|
|
2269
|
-
className: `dialog elevated animated ${r ? `opened ${d}` : "closed"} ${
|
|
2269
|
+
className: `dialog elevated animated ${r ? `opened ${d}` : "closed"} ${a}`,
|
|
2270
2270
|
children: [
|
|
2271
2271
|
/* @__PURE__ */ k("div", { className: "dialog-header", children: [
|
|
2272
2272
|
/* @__PURE__ */ m("h3", { className: "text-text text-xl", children: s }),
|
|
@@ -2291,7 +2291,7 @@ const un = () => {
|
|
|
2291
2291
|
),
|
|
2292
2292
|
document.body
|
|
2293
2293
|
);
|
|
2294
|
-
},
|
|
2294
|
+
}, ot = (e) => {
|
|
2295
2295
|
const {
|
|
2296
2296
|
primaryText: t,
|
|
2297
2297
|
cancelText: s,
|
|
@@ -2299,7 +2299,7 @@ const un = () => {
|
|
|
2299
2299
|
onCancel: i,
|
|
2300
2300
|
isLoading: r = !1,
|
|
2301
2301
|
disabled: c = !1,
|
|
2302
|
-
primaryType:
|
|
2302
|
+
primaryType: a = "button",
|
|
2303
2303
|
containerClassName: d = "",
|
|
2304
2304
|
primaryClassName: y = "",
|
|
2305
2305
|
alignEnd: g = !1,
|
|
@@ -2316,12 +2316,12 @@ const un = () => {
|
|
|
2316
2316
|
/* @__PURE__ */ k(
|
|
2317
2317
|
ve,
|
|
2318
2318
|
{
|
|
2319
|
-
type:
|
|
2319
|
+
type: a,
|
|
2320
2320
|
color: "primary",
|
|
2321
2321
|
variant: "submit",
|
|
2322
2322
|
className: y,
|
|
2323
2323
|
disabled: c,
|
|
2324
|
-
onClick:
|
|
2324
|
+
onClick: a === "button" ? n : void 0,
|
|
2325
2325
|
name: h,
|
|
2326
2326
|
"aria-label": f,
|
|
2327
2327
|
children: [
|
|
@@ -2352,13 +2352,13 @@ const un = () => {
|
|
|
2352
2352
|
onSubmit: i,
|
|
2353
2353
|
handleClose: r,
|
|
2354
2354
|
isLoading: c = !1,
|
|
2355
|
-
buttonEnd:
|
|
2355
|
+
buttonEnd: a = !0,
|
|
2356
2356
|
...d
|
|
2357
2357
|
} = e;
|
|
2358
|
-
return /* @__PURE__ */ m(
|
|
2358
|
+
return /* @__PURE__ */ m(at, { ...d, handleClose: r, children: /* @__PURE__ */ k("form", { onSubmit: n(i), children: [
|
|
2359
2359
|
/* @__PURE__ */ m("div", { className: "form-container", children: s }),
|
|
2360
2360
|
/* @__PURE__ */ m(
|
|
2361
|
-
|
|
2361
|
+
ot,
|
|
2362
2362
|
{
|
|
2363
2363
|
primaryType: "submit",
|
|
2364
2364
|
primaryText: t("_accessibility:buttons.submit"),
|
|
@@ -2367,7 +2367,7 @@ const un = () => {
|
|
|
2367
2367
|
isLoading: c,
|
|
2368
2368
|
disabled: c,
|
|
2369
2369
|
primaryClassName: "!px-6",
|
|
2370
|
-
alignEnd:
|
|
2370
|
+
alignEnd: a,
|
|
2371
2371
|
primaryName: t("_accessibility:buttons.submit"),
|
|
2372
2372
|
primaryAriaLabel: t("_accessibility:ariaLabels.submit"),
|
|
2373
2373
|
cancelName: t("_accessibility:buttons.cancel"),
|
|
@@ -2383,10 +2383,10 @@ const un = () => {
|
|
|
2383
2383
|
isLoading: r = !1,
|
|
2384
2384
|
...c
|
|
2385
2385
|
} = e;
|
|
2386
|
-
return /* @__PURE__ */ k(
|
|
2386
|
+
return /* @__PURE__ */ k(at, { ...c, handleClose: i, children: [
|
|
2387
2387
|
s,
|
|
2388
2388
|
/* @__PURE__ */ m(
|
|
2389
|
-
|
|
2389
|
+
ot,
|
|
2390
2390
|
{
|
|
2391
2391
|
primaryText: t("_accessibility:buttons.ok"),
|
|
2392
2392
|
cancelText: t("_accessibility:buttons.cancel"),
|
|
@@ -2436,7 +2436,7 @@ function Er(e) {
|
|
|
2436
2436
|
] });
|
|
2437
2437
|
}
|
|
2438
2438
|
const gn = (e) => {
|
|
2439
|
-
const { t } = T(), [s, n] = R(null), [i, r] = R(null), [c,
|
|
2439
|
+
const { t } = T(), [s, n] = R(null), [i, r] = R(null), [c, a] = R(null), [d, y] = R(!1), [g, h] = R(!1), {
|
|
2440
2440
|
children: f,
|
|
2441
2441
|
handleSubmit: v,
|
|
2442
2442
|
handleClose: _,
|
|
@@ -2448,36 +2448,36 @@ const gn = (e) => {
|
|
|
2448
2448
|
...L
|
|
2449
2449
|
} = e, [$, J] = R(0);
|
|
2450
2450
|
Z(() => {
|
|
2451
|
-
Q || (n(null), r(null),
|
|
2451
|
+
Q || (n(null), r(null), a(null), y(!1), h(!1), J((q) => q + 1));
|
|
2452
2452
|
}, [Q]);
|
|
2453
2453
|
const Y = F(async () => {
|
|
2454
2454
|
if (M && s) {
|
|
2455
2455
|
y(!0);
|
|
2456
2456
|
try {
|
|
2457
2457
|
const q = await M(s, { override: g });
|
|
2458
|
-
r(q ?? []),
|
|
2458
|
+
r(q ?? []), a(null), re == null || re(q ?? []);
|
|
2459
2459
|
} catch (q) {
|
|
2460
2460
|
console.error(q), r(null);
|
|
2461
2461
|
const V = q instanceof Error ? q.message : "Failed to parse file";
|
|
2462
|
-
|
|
2462
|
+
a(V);
|
|
2463
2463
|
}
|
|
2464
2464
|
y(!1);
|
|
2465
2465
|
}
|
|
2466
2466
|
}, [s, M, re, g]);
|
|
2467
2467
|
return Z(() => {
|
|
2468
2468
|
Y();
|
|
2469
|
-
}, [s, g]), /* @__PURE__ */ k(
|
|
2469
|
+
}, [s, g]), /* @__PURE__ */ k(at, { ...L, open: Q, handleClose: _, children: [
|
|
2470
2470
|
/* @__PURE__ */ m(
|
|
2471
2471
|
_s,
|
|
2472
2472
|
{
|
|
2473
2473
|
onClear: () => {
|
|
2474
|
-
n(null), r(null),
|
|
2474
|
+
n(null), r(null), a(null), y(!1);
|
|
2475
2475
|
},
|
|
2476
2476
|
onChange: (q) => {
|
|
2477
2477
|
var ee;
|
|
2478
2478
|
const V = (ee = q.target.files) == null ? void 0 : ee[0];
|
|
2479
2479
|
if (!V) {
|
|
2480
|
-
n(null), r(null),
|
|
2480
|
+
n(null), r(null), a(null), y(!1);
|
|
2481
2481
|
return;
|
|
2482
2482
|
}
|
|
2483
2483
|
n(V);
|
|
@@ -2507,7 +2507,7 @@ const gn = (e) => {
|
|
|
2507
2507
|
!!i && i.length > 0 && /* @__PURE__ */ m(Er, { items: i }),
|
|
2508
2508
|
f,
|
|
2509
2509
|
/* @__PURE__ */ m(
|
|
2510
|
-
|
|
2510
|
+
ot,
|
|
2511
2511
|
{
|
|
2512
2512
|
primaryText: t("_accessibility:buttons.ok"),
|
|
2513
2513
|
cancelText: t("_accessibility:buttons.cancel"),
|
|
@@ -2528,7 +2528,7 @@ const gn = (e) => {
|
|
|
2528
2528
|
] });
|
|
2529
2529
|
};
|
|
2530
2530
|
function bn(e) {
|
|
2531
|
-
const { t } = T(), { open: s, onClose: n, menuMap: i, logo: r } = e, { account: c } = zt(), { linkComponent:
|
|
2531
|
+
const { t } = T(), { open: s, onClose: n, menuMap: i, logo: r } = e, { account: c } = zt(), { linkComponent: a } = Qe(), d = a, y = Ve(() => i.filter((h) => {
|
|
2532
2532
|
const f = h.auth, v = !!(c != null && c.email);
|
|
2533
2533
|
return f == null || f && v || !f && !v;
|
|
2534
2534
|
}), [c]), g = F(
|
|
@@ -2549,29 +2549,29 @@ function bn(e) {
|
|
|
2549
2549
|
children: /* @__PURE__ */ k(
|
|
2550
2550
|
"aside",
|
|
2551
2551
|
{
|
|
2552
|
-
className: `${s ? "opened" : "closed"}
|
|
2552
|
+
className: `${s ? "opened" : "closed"} drawer animated`,
|
|
2553
2553
|
children: [
|
|
2554
|
-
/* @__PURE__ */ k("div", { className: "
|
|
2554
|
+
/* @__PURE__ */ k("div", { className: "drawer-header-container", children: [
|
|
2555
2555
|
r,
|
|
2556
|
-
/* @__PURE__ */ m("h2", { className: "
|
|
2556
|
+
/* @__PURE__ */ m("h2", { className: "drawer-header poppins", children: t("_pages:home.appName") })
|
|
2557
2557
|
] }),
|
|
2558
2558
|
/* @__PURE__ */ m("ul", { className: "flex flex-col", children: y.map((h, f) => /* @__PURE__ */ m(
|
|
2559
2559
|
"li",
|
|
2560
2560
|
{
|
|
2561
|
-
className: `
|
|
2561
|
+
className: `drawer-list-item ${h.path === location.pathname ? "active" : ""} animated`,
|
|
2562
2562
|
children: h.type !== "divider" && d ? /* @__PURE__ */ k(
|
|
2563
2563
|
d,
|
|
2564
2564
|
{
|
|
2565
2565
|
"aria-disabled": !s,
|
|
2566
2566
|
to: h.path ?? `/${h.path}`,
|
|
2567
2567
|
"aria-label": t(`_accessibility:ariaLabels.${h.path}`),
|
|
2568
|
-
className: "
|
|
2568
|
+
className: "drawer-link",
|
|
2569
2569
|
children: [
|
|
2570
2570
|
h.icon,
|
|
2571
2571
|
t(`_pages:${h.page}.title`)
|
|
2572
2572
|
]
|
|
2573
2573
|
}
|
|
2574
|
-
) : /* @__PURE__ */ m("hr", { className: "
|
|
2574
|
+
) : /* @__PURE__ */ m("hr", { className: "drawer-divider" })
|
|
2575
2575
|
},
|
|
2576
2576
|
`${h.page ?? f}`
|
|
2577
2577
|
)) })
|
|
@@ -2617,7 +2617,7 @@ const Fr = (e) => {
|
|
|
2617
2617
|
filterOptions: i,
|
|
2618
2618
|
actions: r,
|
|
2619
2619
|
queryKey: c,
|
|
2620
|
-
isLoading:
|
|
2620
|
+
isLoading: a = !1,
|
|
2621
2621
|
isAnimated: d = !0,
|
|
2622
2622
|
showBackButton: y = !1
|
|
2623
2623
|
} = e, { t: g } = T(), { countOfFilters: h } = Cs(), f = Ve(() => {
|
|
@@ -2670,7 +2670,7 @@ const Fr = (e) => {
|
|
|
2670
2670
|
"div",
|
|
2671
2671
|
{
|
|
2672
2672
|
className: `px-5 py-3 h-useConfigfull ${d ? "appear" : ""}`,
|
|
2673
|
-
children:
|
|
2673
|
+
children: a ? /* @__PURE__ */ m(De, { className: "flex justify-center items-center h-50" }) : s
|
|
2674
2674
|
}
|
|
2675
2675
|
)
|
|
2676
2676
|
] }),
|
|
@@ -2696,7 +2696,7 @@ const Fr = (e) => {
|
|
|
2696
2696
|
renderComponent: r,
|
|
2697
2697
|
data: c = []
|
|
2698
2698
|
} = e;
|
|
2699
|
-
return /* @__PURE__ */ m(Le, { children: c != null && c.length ? /* @__PURE__ */ m("ul", { className: "pretty-grid-main", children: c == null ? void 0 : c.map((
|
|
2699
|
+
return /* @__PURE__ */ m(Le, { children: c != null && c.length ? /* @__PURE__ */ m("ul", { className: "pretty-grid-main", children: c == null ? void 0 : c.map((a) => /* @__PURE__ */ m("li", { className: "pretty-grid-item", children: r(a) }, a.id)) }) : /* @__PURE__ */ m(Le, { children: n || /* @__PURE__ */ m(Vr, { message: i }) }) });
|
|
2700
2700
|
}, $r = () => {
|
|
2701
2701
|
const [e, t] = R(xt());
|
|
2702
2702
|
return Z(() => {
|
|
@@ -2713,10 +2713,10 @@ function xn(e) {
|
|
|
2713
2713
|
Z(() => (window.addEventListener("keydown", c), () => {
|
|
2714
2714
|
window.removeEventListener("keydown", c);
|
|
2715
2715
|
}), [c]);
|
|
2716
|
-
const
|
|
2716
|
+
const a = n;
|
|
2717
2717
|
return /* @__PURE__ */ k(Le, { children: [
|
|
2718
|
-
location.pathname !== "/" && !!
|
|
2719
|
-
|
|
2718
|
+
location.pathname !== "/" && !!a && /* @__PURE__ */ m(
|
|
2719
|
+
a,
|
|
2720
2720
|
{
|
|
2721
2721
|
open: i,
|
|
2722
2722
|
onClose: () => r(!1)
|
|
@@ -2768,7 +2768,7 @@ function _n() {
|
|
|
2768
2768
|
default:
|
|
2769
2769
|
return Ms;
|
|
2770
2770
|
}
|
|
2771
|
-
}, []),
|
|
2771
|
+
}, []), a = F((g) => {
|
|
2772
2772
|
switch (g) {
|
|
2773
2773
|
case K.success:
|
|
2774
2774
|
return "!text-success";
|
|
@@ -2822,13 +2822,13 @@ function _n() {
|
|
|
2822
2822
|
ce,
|
|
2823
2823
|
{
|
|
2824
2824
|
icon: c(h ?? K.error),
|
|
2825
|
-
className: `${
|
|
2825
|
+
className: `${a(h ?? K.error)}`
|
|
2826
2826
|
}
|
|
2827
2827
|
),
|
|
2828
2828
|
/* @__PURE__ */ m(
|
|
2829
2829
|
"p",
|
|
2830
2830
|
{
|
|
2831
|
-
className: `whitespace-nowrap ${
|
|
2831
|
+
className: `whitespace-nowrap ${a(
|
|
2832
2832
|
h ?? K.error
|
|
2833
2833
|
)}`,
|
|
2834
2834
|
children: f
|
|
@@ -2845,7 +2845,7 @@ function _n() {
|
|
|
2845
2845
|
onClick: (_) => {
|
|
2846
2846
|
_.stopPropagation(), r(v);
|
|
2847
2847
|
},
|
|
2848
|
-
iconClassName: `${
|
|
2848
|
+
iconClassName: `${a(
|
|
2849
2849
|
h ?? K.error
|
|
2850
2850
|
)} group-hover:!text-red-400 cursor-pointer`,
|
|
2851
2851
|
name: e("_accessibility:buttons.closeNotification"),
|
|
@@ -2882,7 +2882,7 @@ const Tr = (e) => {
|
|
|
2882
2882
|
defaultTab: s,
|
|
2883
2883
|
className: n = "",
|
|
2884
2884
|
tabsContainerClassName: i = ""
|
|
2885
|
-
} = e, [r, c] = R((d = t[0]) == null ? void 0 : d.id),
|
|
2885
|
+
} = e, [r, c] = R((d = t[0]) == null ? void 0 : d.id), a = Ve(() => t.find((y) => y.id === r), [t, r]);
|
|
2886
2886
|
return Z(() => {
|
|
2887
2887
|
s && c(s);
|
|
2888
2888
|
}, [s]), /* @__PURE__ */ k("div", { className: `tabs-layout-main ${n}`, children: [
|
|
@@ -2903,7 +2903,7 @@ const Tr = (e) => {
|
|
|
2903
2903
|
) }, y))
|
|
2904
2904
|
}
|
|
2905
2905
|
),
|
|
2906
|
-
|
|
2906
|
+
a == null ? void 0 : a.content
|
|
2907
2907
|
] });
|
|
2908
2908
|
}, Dr = (e) => {
|
|
2909
2909
|
const {
|
|
@@ -2912,11 +2912,11 @@ const Tr = (e) => {
|
|
|
2912
2912
|
image: n = "",
|
|
2913
2913
|
alt: i = "",
|
|
2914
2914
|
final: r = !1
|
|
2915
|
-
} = e, { setGuestMode: c } = zt(), { t:
|
|
2915
|
+
} = e, { setGuestMode: c } = zt(), { t: a } = T();
|
|
2916
2916
|
return /* @__PURE__ */ k("div", { className: "big-appear w-md flex flex-col gap-20", children: [
|
|
2917
2917
|
/* @__PURE__ */ m("img", { src: n, alt: i }),
|
|
2918
|
-
/* @__PURE__ */ m("h2", { className: "text-5xl text-center leading-16", children:
|
|
2919
|
-
/* @__PURE__ */ m("p", { className: "text-center !text-lg", children:
|
|
2918
|
+
/* @__PURE__ */ m("h2", { className: "text-5xl text-center leading-16", children: a(`_pages:onboarding.${t}.title`) }),
|
|
2919
|
+
/* @__PURE__ */ m("p", { className: "text-center !text-lg", children: a(`_pages:onboarding.${t}.body`) }),
|
|
2920
2920
|
/* @__PURE__ */ m("div", { className: "flex gap-5 items-center justify-center", children: r ? /* @__PURE__ */ k(Le, { children: [
|
|
2921
2921
|
/* @__PURE__ */ m(
|
|
2922
2922
|
ve,
|
|
@@ -2927,8 +2927,8 @@ const Tr = (e) => {
|
|
|
2927
2927
|
onClick: () => {
|
|
2928
2928
|
c(!0), window.location.href = "/";
|
|
2929
2929
|
},
|
|
2930
|
-
"aria-label":
|
|
2931
|
-
children:
|
|
2930
|
+
"aria-label": a("_accessibility:ariaLabels.start"),
|
|
2931
|
+
children: a("_accessibility:buttons.startAsGuest")
|
|
2932
2932
|
}
|
|
2933
2933
|
),
|
|
2934
2934
|
/* @__PURE__ */ m(
|
|
@@ -2937,9 +2937,9 @@ const Tr = (e) => {
|
|
|
2937
2937
|
color: "primary",
|
|
2938
2938
|
variant: "submit",
|
|
2939
2939
|
className: "!px-8",
|
|
2940
|
-
"aria-label":
|
|
2940
|
+
"aria-label": a("_accessibility:ariaLabels.start"),
|
|
2941
2941
|
onClick: () => window.location.href = "/auth/sign-in",
|
|
2942
|
-
children:
|
|
2942
|
+
children: a("_accessibility:buttons.signIn")
|
|
2943
2943
|
}
|
|
2944
2944
|
)
|
|
2945
2945
|
] }) : /* @__PURE__ */ k(Le, { children: [
|
|
@@ -2950,8 +2950,8 @@ const Tr = (e) => {
|
|
|
2950
2950
|
className: "!px-8",
|
|
2951
2951
|
variant: "outlined",
|
|
2952
2952
|
onClick: () => window.location.href = "/auth/sign-in",
|
|
2953
|
-
"aria-label":
|
|
2954
|
-
children:
|
|
2953
|
+
"aria-label": a("_accessibility:ariaLabels.skip"),
|
|
2954
|
+
children: a("_accessibility:buttons.skip")
|
|
2955
2955
|
}
|
|
2956
2956
|
),
|
|
2957
2957
|
/* @__PURE__ */ m(
|
|
@@ -2961,8 +2961,8 @@ const Tr = (e) => {
|
|
|
2961
2961
|
className: "!px-8",
|
|
2962
2962
|
variant: "outlined",
|
|
2963
2963
|
onClick: () => s(),
|
|
2964
|
-
"aria-label":
|
|
2965
|
-
children:
|
|
2964
|
+
"aria-label": a("_accessibility:ariaLabels.next"),
|
|
2965
|
+
children: a("_accessibility:buttons.next")
|
|
2966
2966
|
}
|
|
2967
2967
|
)
|
|
2968
2968
|
] }) })
|
|
@@ -3005,8 +3005,8 @@ export {
|
|
|
3005
3005
|
ve as Button,
|
|
3006
3006
|
tn as ConfigProvider,
|
|
3007
3007
|
yn as ConfirmationDialog,
|
|
3008
|
-
|
|
3009
|
-
|
|
3008
|
+
at as Dialog,
|
|
3009
|
+
ot as DialogActions,
|
|
3010
3010
|
bn as Drawer,
|
|
3011
3011
|
Qs as Dropdown,
|
|
3012
3012
|
Vr as Empty,
|
|
@@ -3053,14 +3053,14 @@ export {
|
|
|
3053
3053
|
rn as useEditAction,
|
|
3054
3054
|
_r as useExportAction,
|
|
3055
3055
|
ln as useExportActionMutate,
|
|
3056
|
-
|
|
3056
|
+
an as useFormDialog,
|
|
3057
3057
|
Cr as useImportAction,
|
|
3058
3058
|
cn as useImportDialog,
|
|
3059
3059
|
Ys as useManager,
|
|
3060
3060
|
Ne as useNotification,
|
|
3061
3061
|
sn as usePostForm,
|
|
3062
3062
|
xr as useRestoreAction,
|
|
3063
|
-
|
|
3063
|
+
on as useRestoreDialog,
|
|
3064
3064
|
Sr as useScrollTrigger,
|
|
3065
3065
|
Wr as useTimeAge
|
|
3066
3066
|
};
|