@sito/dashboard-app 0.0.51 → 0.0.53
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.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var et = Object.defineProperty;
|
|
2
2
|
var tt = (n, e, t) => e in n ? et(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var A = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import "./main.css";
|
|
5
|
-
import { State as st, inputStateClassName as nt, labelStateClassName as rt, helperTextStateClassName as it, useTranslation as T, Button as
|
|
5
|
+
import { State as st, inputStateClassName as nt, labelStateClassName as rt, helperTextStateClassName as it, useTranslation as T, Button as q, Loading as ne, TextInput as ot, FileInput as at, IconButton as ct, Actions as lt, ActionsDropdown as ut, useTableOptions as dt, Badge as mt, Action as ht } from "@sito/dashboard";
|
|
6
6
|
export * from "@sito/dashboard";
|
|
7
7
|
import { Action as ln, Actions as un, ActionsDropdown as dn, Button as mn } from "@sito/dashboard";
|
|
8
|
-
import { jsxs as
|
|
9
|
-
import { FontAwesomeIcon as
|
|
10
|
-
import { forwardRef as Ae, useState as
|
|
8
|
+
import { jsxs as k, jsx as f, Fragment as ae } from "react/jsx-runtime";
|
|
9
|
+
import { FontAwesomeIcon as K } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { forwardRef as Ae, useState as L, useCallback as w, useEffect as O, useReducer as Le, useRef as M, useMemo as V, createContext as re, useContext as ie, useLayoutEffect as ft } from "react";
|
|
11
11
|
import { faEyeSlash as pt, faEye as gt, faClose as _e, faTrash as yt, faRotateLeft as Re, faPencil as bt, faCircleNotch as Ie, faCloudArrowDown as wt, faCloudUpload as St, faArrowUp as kt, faArrowLeft as vt, faAdd as Ne, faFilter as Ct, faBars as Tt, faSearch as Nt, faCircleCheck as Et, faWarning as $t } from "@fortawesome/free-solid-svg-icons";
|
|
12
12
|
import { createPortal as Fe } from "react-dom";
|
|
13
13
|
import { QueryClient as xt, QueryClientProvider as At, useMutation as Z, useQueryClient as J, useQuery as Oe } from "@tanstack/react-query";
|
|
@@ -25,48 +25,48 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
25
25
|
disabled: u = !1,
|
|
26
26
|
required: l = !1,
|
|
27
27
|
containerClassName: d = "",
|
|
28
|
-
inputClassName:
|
|
29
|
-
labelClassName:
|
|
30
|
-
helperText:
|
|
28
|
+
inputClassName: m = "",
|
|
29
|
+
labelClassName: p = "",
|
|
30
|
+
helperText: h = "",
|
|
31
31
|
helperTextClassName: y = "",
|
|
32
32
|
...g
|
|
33
|
-
} = n, b = t !== void 0, [
|
|
33
|
+
} = n, b = t !== void 0, [S, E] = L(
|
|
34
34
|
() => Ee(s)
|
|
35
|
-
),
|
|
36
|
-
b || E(
|
|
35
|
+
), x = b ? Ee(t) : S, N = (U) => {
|
|
36
|
+
b || E(U.currentTarget.value.length > 0), r == null || r(U);
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ k("div", { className: `form-paragraph-container group ${d}`, children: [
|
|
39
|
+
/* @__PURE__ */ f(
|
|
40
40
|
"textarea",
|
|
41
41
|
{
|
|
42
42
|
ref: e,
|
|
43
43
|
name: o,
|
|
44
44
|
id: c,
|
|
45
|
-
className: `text-input text-area form-paragraph-textarea peer ${nt(i)} ${
|
|
45
|
+
className: `text-input text-area form-paragraph-textarea peer ${nt(i)} ${x ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${m}`,
|
|
46
46
|
required: l,
|
|
47
47
|
defaultValue: s,
|
|
48
48
|
...b ? { value: t } : {},
|
|
49
|
-
onChange:
|
|
49
|
+
onChange: N,
|
|
50
50
|
disabled: u,
|
|
51
51
|
...g
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ k(
|
|
55
55
|
"label",
|
|
56
56
|
{
|
|
57
57
|
htmlFor: c,
|
|
58
|
-
className: `text-input-label ${rt(i)} ${
|
|
58
|
+
className: `text-input-label ${rt(i)} ${p}`,
|
|
59
59
|
children: [
|
|
60
60
|
a,
|
|
61
61
|
l ? " *" : ""
|
|
62
62
|
]
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
!!
|
|
65
|
+
!!h && /* @__PURE__ */ f(
|
|
66
66
|
"p",
|
|
67
67
|
{
|
|
68
68
|
className: `text-input-helper-text ${it(i)} ${y}`,
|
|
69
|
-
children:
|
|
69
|
+
children: h
|
|
70
70
|
}
|
|
71
71
|
)
|
|
72
72
|
] });
|
|
@@ -79,11 +79,11 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
79
79
|
buttonEnd: o = !0,
|
|
80
80
|
reset: c
|
|
81
81
|
} = n;
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ k("form", { className: "form-container", onSubmit: s(r), children: [
|
|
83
83
|
t,
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
84
|
+
/* @__PURE__ */ k("div", { className: `form-actions ${o ? "end" : ""}`, children: [
|
|
85
|
+
/* @__PURE__ */ k(
|
|
86
|
+
q,
|
|
87
87
|
{
|
|
88
88
|
type: "submit",
|
|
89
89
|
color: "primary",
|
|
@@ -92,7 +92,7 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
92
92
|
name: e("_accessibility:buttons.submit"),
|
|
93
93
|
"aria-label": e("_accessibility:ariaLabels.submit"),
|
|
94
94
|
children: [
|
|
95
|
-
i ? /* @__PURE__ */
|
|
95
|
+
i ? /* @__PURE__ */ f(
|
|
96
96
|
ne,
|
|
97
97
|
{
|
|
98
98
|
color: "stroke-base",
|
|
@@ -104,8 +104,8 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
104
104
|
]
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
|
|
107
|
+
/* @__PURE__ */ f(
|
|
108
|
+
q,
|
|
109
109
|
{
|
|
110
110
|
type: "button",
|
|
111
111
|
variant: "outlined",
|
|
@@ -118,8 +118,8 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
118
118
|
] })
|
|
119
119
|
] });
|
|
120
120
|
}, Ss = Ae(function(n, e) {
|
|
121
|
-
const { t } = T(), [s, r] =
|
|
122
|
-
return /* @__PURE__ */
|
|
121
|
+
const { t } = T(), [s, r] = L(!1);
|
|
122
|
+
return /* @__PURE__ */ f(ot, { ...n, type: s ? "text" : "password", ref: e, children: /* @__PURE__ */ f(
|
|
123
123
|
G,
|
|
124
124
|
{
|
|
125
125
|
type: "button",
|
|
@@ -157,28 +157,28 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
157
157
|
[r]
|
|
158
158
|
);
|
|
159
159
|
return O(() => {
|
|
160
|
-
const d = (
|
|
161
|
-
|
|
160
|
+
const d = (m) => {
|
|
161
|
+
m ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
|
|
162
162
|
};
|
|
163
163
|
return d(i), () => {
|
|
164
164
|
d(!1);
|
|
165
165
|
};
|
|
166
166
|
}, [i]), Fe(
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ f(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
170
170
|
"aria-label": e("_accessibility:ariaLabels.closeDialog"),
|
|
171
171
|
"aria-hidden": !i,
|
|
172
172
|
onClick: l,
|
|
173
173
|
className: `dialog-backdrop animated ${i ? `opened ${a}` : "closed"} ${o}`,
|
|
174
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ k(
|
|
175
175
|
"div",
|
|
176
176
|
{
|
|
177
177
|
className: `dialog elevated animated ${i ? `opened ${a}` : "closed"} ${c}`,
|
|
178
178
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ k("div", { className: "dialog-header", children: [
|
|
180
|
+
/* @__PURE__ */ f("h3", { className: "dialog-title", children: t }),
|
|
181
|
+
/* @__PURE__ */ f(
|
|
182
182
|
G,
|
|
183
183
|
{
|
|
184
184
|
icon: _e,
|
|
@@ -214,17 +214,18 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
214
214
|
primaryClassName: u = "",
|
|
215
215
|
alignEnd: l = !1,
|
|
216
216
|
primaryName: d,
|
|
217
|
-
primaryAriaLabel:
|
|
218
|
-
cancelName:
|
|
219
|
-
cancelAriaLabel:
|
|
217
|
+
primaryAriaLabel: m,
|
|
218
|
+
cancelName: p,
|
|
219
|
+
cancelAriaLabel: h,
|
|
220
|
+
extraActions: y = []
|
|
220
221
|
} = n;
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
+
return /* @__PURE__ */ k(
|
|
222
223
|
"div",
|
|
223
224
|
{
|
|
224
225
|
className: `dialog-actions ${l ? "end" : ""} ${a}`,
|
|
225
226
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
|
|
227
|
+
/* @__PURE__ */ k(
|
|
228
|
+
q,
|
|
228
229
|
{
|
|
229
230
|
type: c,
|
|
230
231
|
color: "primary",
|
|
@@ -233,9 +234,9 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
233
234
|
disabled: o,
|
|
234
235
|
onClick: s,
|
|
235
236
|
name: d,
|
|
236
|
-
"aria-label":
|
|
237
|
+
"aria-label": m,
|
|
237
238
|
children: [
|
|
238
|
-
i ? /* @__PURE__ */
|
|
239
|
+
i ? /* @__PURE__ */ f(
|
|
239
240
|
ne,
|
|
240
241
|
{
|
|
241
242
|
color: "stroke-base",
|
|
@@ -247,15 +248,16 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
247
248
|
]
|
|
248
249
|
}
|
|
249
250
|
),
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
|
|
251
|
+
y == null ? void 0 : y.map((g) => /* @__PURE__ */ f(q, { ...g }, g.id)),
|
|
252
|
+
/* @__PURE__ */ f(
|
|
253
|
+
q,
|
|
252
254
|
{
|
|
253
255
|
type: "button",
|
|
254
256
|
variant: "outlined",
|
|
255
257
|
disabled: o,
|
|
256
258
|
onClick: r,
|
|
257
|
-
name:
|
|
258
|
-
"aria-label":
|
|
259
|
+
name: p,
|
|
260
|
+
"aria-label": h,
|
|
259
261
|
children: t
|
|
260
262
|
}
|
|
261
263
|
)
|
|
@@ -270,11 +272,12 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
270
272
|
handleClose: i,
|
|
271
273
|
isLoading: o = !1,
|
|
272
274
|
buttonEnd: c = !0,
|
|
273
|
-
|
|
275
|
+
extraActions: a = [],
|
|
276
|
+
...u
|
|
274
277
|
} = n;
|
|
275
|
-
return /* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ f(ke, { ...u, handleClose: i, children: /* @__PURE__ */ k("form", { onSubmit: s(r), children: [
|
|
279
|
+
/* @__PURE__ */ f("div", { className: "form-container", children: t }),
|
|
280
|
+
/* @__PURE__ */ f(
|
|
278
281
|
ve,
|
|
279
282
|
{
|
|
280
283
|
primaryType: "submit",
|
|
@@ -288,7 +291,8 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
288
291
|
primaryName: e("_accessibility:buttons.submit"),
|
|
289
292
|
primaryAriaLabel: e("_accessibility:ariaLabels.submit"),
|
|
290
293
|
cancelName: e("_accessibility:buttons.cancel"),
|
|
291
|
-
cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
|
|
294
|
+
cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
|
|
295
|
+
extraActions: a
|
|
292
296
|
}
|
|
293
297
|
)
|
|
294
298
|
] }) });
|
|
@@ -298,11 +302,12 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
298
302
|
handleSubmit: s,
|
|
299
303
|
handleClose: r,
|
|
300
304
|
isLoading: i = !1,
|
|
301
|
-
|
|
305
|
+
extraActions: o = [],
|
|
306
|
+
...c
|
|
302
307
|
} = n;
|
|
303
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ k(ke, { ...c, handleClose: r, children: [
|
|
304
309
|
t,
|
|
305
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ f(
|
|
306
311
|
ve,
|
|
307
312
|
{
|
|
308
313
|
primaryText: e("_accessibility:buttons.ok"),
|
|
@@ -316,22 +321,23 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
|
|
|
316
321
|
primaryName: e("_accessibility:buttons.ok"),
|
|
317
322
|
primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
|
|
318
323
|
cancelName: e("_accessibility:buttons.cancel"),
|
|
319
|
-
cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
|
|
324
|
+
cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
|
|
325
|
+
extraActions: o
|
|
320
326
|
}
|
|
321
327
|
)
|
|
322
328
|
] });
|
|
323
329
|
};
|
|
324
330
|
function _t(n) {
|
|
325
331
|
const { message: e, className: t = "" } = n, { t: s } = T();
|
|
326
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ f("p", { className: `import-error-message ${t}`, children: e ?? s("_messages:errors.parseFile", {
|
|
327
333
|
defaultValue: "Failed to process file"
|
|
328
334
|
}) });
|
|
329
335
|
}
|
|
330
336
|
function Rt(n) {
|
|
331
337
|
const { message: e, className: t = "" } = n, { t: s } = T();
|
|
332
|
-
return /* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ k("div", { className: `import-loading ${t}`, children: [
|
|
339
|
+
/* @__PURE__ */ f(ne, { loaderClass: "w-5 h-5", className: "!w-auto" }),
|
|
340
|
+
/* @__PURE__ */ f("span", { children: e ?? s("_messages:loading.processingFile", {
|
|
335
341
|
defaultValue: "Processing file..."
|
|
336
342
|
}) })
|
|
337
343
|
] });
|
|
@@ -340,12 +346,12 @@ function It(n) {
|
|
|
340
346
|
const { items: e, max: t = 5, className: s = "" } = n, { t: r } = T();
|
|
341
347
|
if (!e || e.length === 0) return null;
|
|
342
348
|
const i = e.slice(0, t);
|
|
343
|
-
return /* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ k("div", { className: `import-preview ${s}`, children: [
|
|
350
|
+
/* @__PURE__ */ f("p", { className: "import-preview-count", children: r("_pages:common.actions.import.previewCount", {
|
|
345
351
|
count: e.length,
|
|
346
352
|
defaultValue: `Preview: ${e.length} items`
|
|
347
353
|
}) }),
|
|
348
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ f("pre", { className: "import-preview-content", children: JSON.stringify(i, null, 2) })
|
|
349
355
|
] });
|
|
350
356
|
}
|
|
351
357
|
const De = () => ({
|
|
@@ -399,90 +405,91 @@ const Cs = (n) => {
|
|
|
399
405
|
renderCustomPreview: a,
|
|
400
406
|
onOverrideChange: u,
|
|
401
407
|
open: l,
|
|
402
|
-
|
|
403
|
-
|
|
408
|
+
extraActions: d = [],
|
|
409
|
+
...m
|
|
410
|
+
} = n, [p, h] = Le(
|
|
404
411
|
Ft,
|
|
405
412
|
De()
|
|
406
413
|
), {
|
|
407
|
-
file:
|
|
408
|
-
previewItems:
|
|
409
|
-
parseError:
|
|
410
|
-
processing:
|
|
411
|
-
overrideExisting:
|
|
412
|
-
inputKey:
|
|
413
|
-
} =
|
|
414
|
+
file: y,
|
|
415
|
+
previewItems: g,
|
|
416
|
+
parseError: b,
|
|
417
|
+
processing: S,
|
|
418
|
+
overrideExisting: E,
|
|
419
|
+
inputKey: x
|
|
420
|
+
} = p, N = M(c), U = M(o);
|
|
414
421
|
O(() => {
|
|
415
422
|
N.current = c;
|
|
416
423
|
}, [c]), O(() => {
|
|
417
|
-
|
|
424
|
+
U.current = o;
|
|
418
425
|
}, [o]), O(() => {
|
|
419
|
-
l ||
|
|
426
|
+
l || h({ type: "RESET" });
|
|
420
427
|
}, [l]);
|
|
421
|
-
const
|
|
422
|
-
async (
|
|
423
|
-
var
|
|
424
|
-
if (
|
|
425
|
-
|
|
428
|
+
const H = w(
|
|
429
|
+
async (v, $) => {
|
|
430
|
+
var _;
|
|
431
|
+
if (U.current) {
|
|
432
|
+
h({ type: "START_PROCESSING" });
|
|
426
433
|
try {
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
} catch (
|
|
430
|
-
console.error(
|
|
431
|
-
const
|
|
432
|
-
|
|
434
|
+
const R = await U.current(v, { override: $ });
|
|
435
|
+
h({ type: "SET_PREVIEW", items: R ?? [] }), (_ = N.current) == null || _.call(N, R ?? []);
|
|
436
|
+
} catch (R) {
|
|
437
|
+
console.error(R);
|
|
438
|
+
const j = R instanceof Error ? R.message : "Failed to parse file";
|
|
439
|
+
h({ type: "SET_ERROR", message: j });
|
|
433
440
|
}
|
|
434
441
|
}
|
|
435
442
|
},
|
|
436
443
|
[]
|
|
437
444
|
);
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
/* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ k(ke, { ...m, open: l, handleClose: r, children: [
|
|
446
|
+
/* @__PURE__ */ f(
|
|
440
447
|
at,
|
|
441
448
|
{
|
|
442
449
|
onClear: () => {
|
|
443
|
-
var
|
|
444
|
-
|
|
450
|
+
var v;
|
|
451
|
+
h({ type: "SET_FILE", file: null }), (v = N.current) == null || v.call(N, []);
|
|
445
452
|
},
|
|
446
|
-
onChange: (
|
|
447
|
-
var
|
|
448
|
-
const
|
|
449
|
-
if (
|
|
450
|
-
|
|
453
|
+
onChange: (v) => {
|
|
454
|
+
var _, R;
|
|
455
|
+
const $ = (_ = v.target.files) == null ? void 0 : _[0];
|
|
456
|
+
if (!$) {
|
|
457
|
+
h({ type: "SET_FILE", file: null }), (R = N.current) == null || R.call(N, []);
|
|
451
458
|
return;
|
|
452
459
|
}
|
|
453
|
-
|
|
460
|
+
h({ type: "SET_FILE", file: $ }), H($, E);
|
|
454
461
|
},
|
|
455
462
|
label: e("_accessibility:labels.file")
|
|
456
463
|
},
|
|
457
|
-
|
|
464
|
+
x
|
|
458
465
|
),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ k("label", { className: "import-override-label", children: [
|
|
467
|
+
/* @__PURE__ */ f(
|
|
461
468
|
"input",
|
|
462
469
|
{
|
|
463
470
|
type: "checkbox",
|
|
464
|
-
checked:
|
|
465
|
-
onChange: (
|
|
466
|
-
const
|
|
467
|
-
|
|
471
|
+
checked: E,
|
|
472
|
+
onChange: (v) => {
|
|
473
|
+
const $ = v.target.checked;
|
|
474
|
+
h({ type: "SET_OVERRIDE", value: $ }), u == null || u($), y && H(y, $);
|
|
468
475
|
}
|
|
469
476
|
}
|
|
470
477
|
),
|
|
471
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ f("span", { children: e("_pages:common.actions.import.override", {
|
|
472
479
|
defaultValue: "Override existing items"
|
|
473
480
|
}) })
|
|
474
481
|
] }),
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
|
|
477
|
-
a ? a(
|
|
482
|
+
/* @__PURE__ */ f(_t, { message: b }),
|
|
483
|
+
S && /* @__PURE__ */ f(Rt, {}),
|
|
484
|
+
a ? a(g) : !!g && g.length > 0 && /* @__PURE__ */ f(It, { items: g }),
|
|
478
485
|
t,
|
|
479
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ f(
|
|
480
487
|
ve,
|
|
481
488
|
{
|
|
482
489
|
primaryText: e("_accessibility:buttons.ok"),
|
|
483
490
|
cancelText: e("_accessibility:buttons.cancel"),
|
|
484
491
|
onPrimaryClick: () => {
|
|
485
|
-
(!o || !!
|
|
492
|
+
(!o || !!g && g.length > 0) && s();
|
|
486
493
|
},
|
|
487
494
|
onCancel: r,
|
|
488
495
|
isLoading: i,
|
|
@@ -491,12 +498,13 @@ const Cs = (n) => {
|
|
|
491
498
|
primaryName: e("_accessibility:buttons.ok"),
|
|
492
499
|
primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
|
|
493
500
|
cancelName: e("_accessibility:buttons.cancel"),
|
|
494
|
-
cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
|
|
501
|
+
cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
|
|
502
|
+
extraActions: d
|
|
495
503
|
}
|
|
496
504
|
)
|
|
497
505
|
] });
|
|
498
506
|
};
|
|
499
|
-
var
|
|
507
|
+
var I = /* @__PURE__ */ ((n) => (n[n.success = 0] = "success", n[n.error = 1] = "error", n[n.warning = 2] = "warning", n[n.info = 3] = "info", n))(I || {}), F = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.PATCH = "PATCH", n.DELETE = "DELETE", n))(F || {});
|
|
500
508
|
const Ot = (n) => Array.isArray(n) || n instanceof Headers ? !1 : typeof n == "object" && n !== null && ("headers" in n || "credentials" in n), Mt = (n) => n ? Ot(n) ? n : { headers: n } : {}, Dt = (n) => n ? n instanceof Headers ? Object.fromEntries(n.entries()) : Array.isArray(n) ? Object.fromEntries(n) : n : {};
|
|
501
509
|
async function be(n, e = "GET", t, s) {
|
|
502
510
|
const r = Mt(s), i = {
|
|
@@ -581,15 +589,15 @@ const Pe = (n, e, t) => {
|
|
|
581
589
|
* @param tokenAcquirer custom token acquirer
|
|
582
590
|
*/
|
|
583
591
|
constructor(e, t = "user", s = !0, r, i = {}) {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
592
|
+
A(this, "baseUrl");
|
|
593
|
+
A(this, "userKey");
|
|
594
|
+
A(this, "rememberKey");
|
|
595
|
+
A(this, "refreshTokenKey");
|
|
596
|
+
A(this, "accessTokenExpiresAtKey");
|
|
597
|
+
A(this, "refreshEndpoint");
|
|
598
|
+
A(this, "refreshExpirySkewMs");
|
|
599
|
+
A(this, "secured");
|
|
600
|
+
A(this, "tokenAcquirer");
|
|
593
601
|
this.baseUrl = e, this.secured = s, this.userKey = t, this.rememberKey = i.rememberKey ?? "remember", this.refreshTokenKey = i.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = i.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = i.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = i.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = r ?? this.defaultTokenAcquirer;
|
|
594
602
|
}
|
|
595
603
|
defaultTokenAcquirer(e) {
|
|
@@ -624,12 +632,12 @@ const Pe = (n, e, t) => {
|
|
|
624
632
|
return Number.isNaN(s) ? !1 : Date.now() >= s - this.refreshExpirySkewMs;
|
|
625
633
|
}
|
|
626
634
|
clearStoredSession() {
|
|
627
|
-
|
|
635
|
+
P(this.userKey), P(this.rememberKey), P(this.refreshTokenKey), P(this.accessTokenExpiresAtKey);
|
|
628
636
|
}
|
|
629
637
|
storeSession(e, t) {
|
|
630
638
|
W(this.userKey, e.token);
|
|
631
639
|
const s = e.refreshToken === void 0 ? t : e.refreshToken;
|
|
632
|
-
typeof s == "string" && s.length ? W(this.refreshTokenKey, s) :
|
|
640
|
+
typeof s == "string" && s.length ? W(this.refreshTokenKey, s) : P(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? W(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : P(this.accessTokenExpiresAtKey);
|
|
633
641
|
}
|
|
634
642
|
async refreshAccessTokenWithMutex() {
|
|
635
643
|
const e = this.getRefreshToken();
|
|
@@ -805,11 +813,11 @@ const Pe = (n, e, t) => {
|
|
|
805
813
|
return r;
|
|
806
814
|
}
|
|
807
815
|
};
|
|
808
|
-
|
|
816
|
+
A(se, "refreshInFlight", /* @__PURE__ */ new Map());
|
|
809
817
|
let me = se;
|
|
810
818
|
class Kt {
|
|
811
819
|
constructor(e, t = "user", s = {}) {
|
|
812
|
-
|
|
820
|
+
A(this, "api");
|
|
813
821
|
this.api = new me(e, t, !1, void 0, s);
|
|
814
822
|
}
|
|
815
823
|
async login(e) {
|
|
@@ -856,7 +864,7 @@ class Kt {
|
|
|
856
864
|
}
|
|
857
865
|
class Ts {
|
|
858
866
|
constructor(e, t, s = {}) {
|
|
859
|
-
|
|
867
|
+
A(this, "auth");
|
|
860
868
|
this.auth = new Kt(e, t, s);
|
|
861
869
|
}
|
|
862
870
|
/**
|
|
@@ -873,9 +881,9 @@ class Ns {
|
|
|
873
881
|
* @param secured to see if the api client requires jwt protection
|
|
874
882
|
*/
|
|
875
883
|
constructor(e, t, s = "user", r = !0, i = {}) {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
884
|
+
A(this, "table");
|
|
885
|
+
A(this, "secured");
|
|
886
|
+
A(this, "api");
|
|
879
887
|
this.table = e, this.secured = r, this.api = new me(t, s, r, void 0, i);
|
|
880
888
|
}
|
|
881
889
|
/**
|
|
@@ -971,10 +979,10 @@ class Ns {
|
|
|
971
979
|
}
|
|
972
980
|
class Es {
|
|
973
981
|
constructor(e, t, s = 1) {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
982
|
+
A(this, "table");
|
|
983
|
+
A(this, "dbName");
|
|
984
|
+
A(this, "version");
|
|
985
|
+
A(this, "db", null);
|
|
978
986
|
this.table = e, this.dbName = t, this.version = s;
|
|
979
987
|
}
|
|
980
988
|
close() {
|
|
@@ -1025,13 +1033,13 @@ class Es {
|
|
|
1025
1033
|
return await this.request(i.put(r)), r;
|
|
1026
1034
|
}
|
|
1027
1035
|
async get(e, t) {
|
|
1028
|
-
var
|
|
1029
|
-
const s = await this.transaction("readonly"), r = await this.request(s.getAll()), i = this.applyFilter(r, t), o = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((
|
|
1030
|
-
i.sort((
|
|
1031
|
-
const g =
|
|
1036
|
+
var p;
|
|
1037
|
+
const s = await this.transaction("readonly"), r = await this.request(s.getAll()), i = this.applyFilter(r, t), o = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((p = e == null ? void 0 : e.sortingOrder) == null ? void 0 : p.toLowerCase()) ?? "asc";
|
|
1038
|
+
i.sort((h, y) => {
|
|
1039
|
+
const g = h[o], b = y[o];
|
|
1032
1040
|
return g < b ? c === "asc" ? -1 : 1 : g > b ? c === "asc" ? 1 : -1 : 0;
|
|
1033
1041
|
});
|
|
1034
|
-
const a = (e == null ? void 0 : e.pageSize) ?? 10, u = (e == null ? void 0 : e.currentPage) ?? 0, l = i.length, d = Math.ceil(l / a),
|
|
1042
|
+
const a = (e == null ? void 0 : e.pageSize) ?? 10, u = (e == null ? void 0 : e.currentPage) ?? 0, l = i.length, d = Math.ceil(l / a), m = i.slice(
|
|
1035
1043
|
u * a,
|
|
1036
1044
|
u * a + a
|
|
1037
1045
|
);
|
|
@@ -1042,7 +1050,7 @@ class Es {
|
|
|
1042
1050
|
pageSize: a,
|
|
1043
1051
|
totalElements: l,
|
|
1044
1052
|
totalPages: d,
|
|
1045
|
-
items:
|
|
1053
|
+
items: m
|
|
1046
1054
|
};
|
|
1047
1055
|
}
|
|
1048
1056
|
async export(e) {
|
|
@@ -1126,7 +1134,7 @@ const X = (n, e = "") => {
|
|
|
1126
1134
|
}, W = (n, e) => localStorage.setItem(
|
|
1127
1135
|
n,
|
|
1128
1136
|
typeof e == "object" ? JSON.stringify(e) : e
|
|
1129
|
-
),
|
|
1137
|
+
), P = (n) => localStorage.removeItem(n);
|
|
1130
1138
|
function xs(n) {
|
|
1131
1139
|
const e = n ? new Date(n) : /* @__PURE__ */ new Date(), t = {
|
|
1132
1140
|
weekday: "long",
|
|
@@ -1181,38 +1189,38 @@ const Ke = re(
|
|
|
1181
1189
|
void 0
|
|
1182
1190
|
);
|
|
1183
1191
|
function Rs(n) {
|
|
1184
|
-
const { children: e } = n, t =
|
|
1185
|
-
(
|
|
1186
|
-
const { type:
|
|
1187
|
-
switch (
|
|
1192
|
+
const { children: e } = n, t = M(0), [s, r] = Le(
|
|
1193
|
+
(m, p) => {
|
|
1194
|
+
const { type: h, items: y, id: g } = p;
|
|
1195
|
+
switch (h) {
|
|
1188
1196
|
case "set":
|
|
1189
1197
|
return y ?? [];
|
|
1190
1198
|
case "remove":
|
|
1191
|
-
return g !== void 0 ?
|
|
1199
|
+
return g !== void 0 ? m.filter((b) => b.id !== g) : [];
|
|
1192
1200
|
}
|
|
1193
|
-
return
|
|
1201
|
+
return m;
|
|
1194
1202
|
},
|
|
1195
1203
|
[],
|
|
1196
1204
|
() => []
|
|
1197
|
-
), i = (
|
|
1198
|
-
(
|
|
1205
|
+
), i = (m) => m.map((p) => ({ ...p, id: t.current++ })), o = w(
|
|
1206
|
+
(m) => r({
|
|
1199
1207
|
type: "set",
|
|
1200
|
-
items: i([{ ...
|
|
1208
|
+
items: i([{ ...m, type: I.error }])
|
|
1201
1209
|
}),
|
|
1202
1210
|
[]
|
|
1203
1211
|
), c = w(
|
|
1204
|
-
(
|
|
1212
|
+
(m) => r({ type: "set", items: i([{ ...m }]) }),
|
|
1205
1213
|
[]
|
|
1206
1214
|
), a = w(
|
|
1207
|
-
(
|
|
1215
|
+
(m) => r({ type: "set", items: i(m) }),
|
|
1208
1216
|
[]
|
|
1209
1217
|
), u = w(
|
|
1210
|
-
(
|
|
1218
|
+
(m) => r({
|
|
1211
1219
|
type: "set",
|
|
1212
|
-
items: i([{ ...
|
|
1220
|
+
items: i([{ ...m, type: I.success }])
|
|
1213
1221
|
}),
|
|
1214
1222
|
[]
|
|
1215
|
-
), l = (
|
|
1223
|
+
), l = (m) => r({ type: "remove", id: m }), d = V(() => ({
|
|
1216
1224
|
notification: s,
|
|
1217
1225
|
removeNotification: l,
|
|
1218
1226
|
showErrorNotification: o,
|
|
@@ -1226,7 +1234,7 @@ function Rs(n) {
|
|
|
1226
1234
|
a,
|
|
1227
1235
|
u
|
|
1228
1236
|
]);
|
|
1229
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ f(Ke.Provider, { value: d, children: e });
|
|
1230
1238
|
}
|
|
1231
1239
|
const ee = () => {
|
|
1232
1240
|
const n = ie(Ke);
|
|
@@ -1248,8 +1256,8 @@ const ee = () => {
|
|
|
1248
1256
|
}), Is = qe(), Ue = re(
|
|
1249
1257
|
void 0
|
|
1250
1258
|
), Fs = (n) => {
|
|
1251
|
-
const { children: e, manager: t, queryClient: s } = n, [r] =
|
|
1252
|
-
return /* @__PURE__ */
|
|
1259
|
+
const { children: e, manager: t, queryClient: s } = n, [r] = L(qe), i = s ?? r;
|
|
1260
|
+
return /* @__PURE__ */ f(Ue.Provider, { value: { client: t }, children: /* @__PURE__ */ f(At, { client: i, children: e }) });
|
|
1253
1261
|
}, Ut = () => {
|
|
1254
1262
|
const n = ie(Ue);
|
|
1255
1263
|
if (!n)
|
|
@@ -1265,26 +1273,26 @@ const ee = () => {
|
|
|
1265
1273
|
remember: r = "remember",
|
|
1266
1274
|
refreshTokenKey: i = "refreshToken",
|
|
1267
1275
|
accessTokenExpiresAtKey: o = "accessTokenExpiresAt"
|
|
1268
|
-
} = n, c = Ut(), [a, u] =
|
|
1269
|
-
|
|
1270
|
-
}, [o, i, r, s]), d = w(() => !!X(t, "boolean") && a.token === void 0, [a.token, t]),
|
|
1276
|
+
} = n, c = Ut(), [a, u] = L({}), l = w(() => {
|
|
1277
|
+
P(s), P(r), P(i), P(o);
|
|
1278
|
+
}, [o, i, r, s]), d = w(() => !!X(t, "boolean") && a.token === void 0, [a.token, t]), m = w(
|
|
1271
1279
|
(b) => {
|
|
1272
1280
|
W(t, b);
|
|
1273
1281
|
},
|
|
1274
1282
|
[t]
|
|
1275
|
-
),
|
|
1276
|
-
(b,
|
|
1283
|
+
), p = w(
|
|
1284
|
+
(b, S) => {
|
|
1277
1285
|
if (!b) return;
|
|
1278
|
-
const E = X(r, "boolean"),
|
|
1279
|
-
u(b),
|
|
1286
|
+
const E = X(r, "boolean"), x = S ?? (typeof E == "boolean" ? E : !1);
|
|
1287
|
+
u(b), P(t), W(s, b.token), W(r, x), typeof b.refreshToken == "string" && b.refreshToken.length ? W(i, b.refreshToken) : P(i), typeof b.accessTokenExpiresAt == "string" && b.accessTokenExpiresAt.length ? W(o, b.accessTokenExpiresAt) : P(o);
|
|
1280
1288
|
},
|
|
1281
1289
|
[o, t, i, r, s]
|
|
1282
|
-
),
|
|
1283
|
-
const b = X(s) ?? a.token,
|
|
1290
|
+
), h = w(async () => {
|
|
1291
|
+
const b = X(s) ?? a.token, S = X(i) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
|
|
1284
1292
|
try {
|
|
1285
1293
|
await c.Auth.logout({
|
|
1286
1294
|
accessToken: b,
|
|
1287
|
-
refreshToken:
|
|
1295
|
+
refreshToken: S
|
|
1288
1296
|
});
|
|
1289
1297
|
} catch (E) {
|
|
1290
1298
|
console.error(E);
|
|
@@ -1300,41 +1308,41 @@ const ee = () => {
|
|
|
1300
1308
|
]), y = w(async () => {
|
|
1301
1309
|
try {
|
|
1302
1310
|
const b = await c.Auth.getSession();
|
|
1303
|
-
|
|
1311
|
+
p(b);
|
|
1304
1312
|
} catch (b) {
|
|
1305
|
-
console.error(b),
|
|
1313
|
+
console.error(b), h();
|
|
1306
1314
|
}
|
|
1307
|
-
}, [
|
|
1315
|
+
}, [p, h, c.Auth]), g = V(() => ({
|
|
1308
1316
|
account: a,
|
|
1309
|
-
logUser:
|
|
1310
|
-
logoutUser:
|
|
1317
|
+
logUser: p,
|
|
1318
|
+
logoutUser: h,
|
|
1311
1319
|
logUserFromLocal: y,
|
|
1312
1320
|
isInGuestMode: d,
|
|
1313
|
-
setGuestMode:
|
|
1321
|
+
setGuestMode: m
|
|
1314
1322
|
}), [
|
|
1315
1323
|
a,
|
|
1316
|
-
|
|
1317
|
-
|
|
1324
|
+
p,
|
|
1325
|
+
h,
|
|
1318
1326
|
y,
|
|
1319
1327
|
d,
|
|
1320
|
-
|
|
1328
|
+
m
|
|
1321
1329
|
]);
|
|
1322
|
-
return /* @__PURE__ */
|
|
1323
|
-
},
|
|
1330
|
+
return /* @__PURE__ */ f(je.Provider, { value: g, children: e });
|
|
1331
|
+
}, He = () => {
|
|
1324
1332
|
const n = ie(je);
|
|
1325
1333
|
if (!n) throw new Error("authContext must be used within a Provider");
|
|
1326
1334
|
return n;
|
|
1327
|
-
},
|
|
1335
|
+
}, Qe = re({}), Ms = (n) => {
|
|
1328
1336
|
const { children: e, location: t, navigate: s, linkComponent: r, searchComponent: i } = n;
|
|
1329
|
-
return /* @__PURE__ */
|
|
1330
|
-
|
|
1337
|
+
return /* @__PURE__ */ f(
|
|
1338
|
+
Qe.Provider,
|
|
1331
1339
|
{
|
|
1332
1340
|
value: { location: t, navigate: s, linkComponent: r, searchComponent: i },
|
|
1333
1341
|
children: e
|
|
1334
1342
|
}
|
|
1335
1343
|
);
|
|
1336
1344
|
}, ce = () => {
|
|
1337
|
-
const n = ie(
|
|
1345
|
+
const n = ie(Qe);
|
|
1338
1346
|
if (n === void 0 || Object.keys(n).length === 0)
|
|
1339
1347
|
throw new Error(
|
|
1340
1348
|
"Config provider has not been set. This step is required and cannot be skipped."
|
|
@@ -1351,7 +1359,7 @@ const ee = () => {
|
|
|
1351
1359
|
}, Ve = re(
|
|
1352
1360
|
jt
|
|
1353
1361
|
), Ds = (n) => {
|
|
1354
|
-
const { children: e } = n, [t, s] =
|
|
1362
|
+
const { children: e } = n, [t, s] = L({}), r = w(
|
|
1355
1363
|
(a, u) => s((l) => ({
|
|
1356
1364
|
...l,
|
|
1357
1365
|
[a]: [...l[a] ?? [], u]
|
|
@@ -1360,7 +1368,7 @@ const ee = () => {
|
|
|
1360
1368
|
), i = w(
|
|
1361
1369
|
(a, u) => s((l) => ({
|
|
1362
1370
|
...l,
|
|
1363
|
-
[a]: (l[a] ?? []).filter((d,
|
|
1371
|
+
[a]: (l[a] ?? []).filter((d, m) => m !== u)
|
|
1364
1372
|
})),
|
|
1365
1373
|
[]
|
|
1366
1374
|
), o = w((a) => {
|
|
@@ -1368,7 +1376,7 @@ const ee = () => {
|
|
|
1368
1376
|
...u,
|
|
1369
1377
|
[a]: []
|
|
1370
1378
|
}) : {});
|
|
1371
|
-
}, []), c =
|
|
1379
|
+
}, []), c = V(
|
|
1372
1380
|
() => ({
|
|
1373
1381
|
dynamicItems: t,
|
|
1374
1382
|
addChildItem: r,
|
|
@@ -1377,36 +1385,36 @@ const ee = () => {
|
|
|
1377
1385
|
}),
|
|
1378
1386
|
[t, o, i, r]
|
|
1379
1387
|
);
|
|
1380
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ f(
|
|
1381
1389
|
Ve.Provider,
|
|
1382
1390
|
{
|
|
1383
1391
|
value: c,
|
|
1384
1392
|
children: e
|
|
1385
1393
|
}
|
|
1386
1394
|
);
|
|
1387
|
-
},
|
|
1395
|
+
}, Ht = () => ie(Ve);
|
|
1388
1396
|
function Ps(n) {
|
|
1389
|
-
const { t: e } = T(), { open: t, onClose: s, menuMap: r, logo: i } = n, { account: o } =
|
|
1390
|
-
const b = g.auth,
|
|
1391
|
-
return b == null || b &&
|
|
1392
|
-
}), [o == null ? void 0 : o.email, r]),
|
|
1397
|
+
const { t: e } = T(), { open: t, onClose: s, menuMap: r, logo: i } = n, { account: o } = He(), { dynamicItems: c } = Ht(), { linkComponent: a, location: u } = ce(), l = a, d = V(() => r.filter((g) => {
|
|
1398
|
+
const b = g.auth, S = !!(o != null && o.email);
|
|
1399
|
+
return b == null || b && S || !b && !S;
|
|
1400
|
+
}), [o == null ? void 0 : o.email, r]), m = w(
|
|
1393
1401
|
(g) => {
|
|
1394
1402
|
g.key === "Escape" && t && s();
|
|
1395
1403
|
},
|
|
1396
1404
|
[s, t]
|
|
1397
1405
|
);
|
|
1398
|
-
O(() => (document.addEventListener("keydown",
|
|
1399
|
-
document.removeEventListener("keydown",
|
|
1400
|
-
}), [
|
|
1401
|
-
const
|
|
1406
|
+
O(() => (document.addEventListener("keydown", m), () => {
|
|
1407
|
+
document.removeEventListener("keydown", m);
|
|
1408
|
+
}), [m]);
|
|
1409
|
+
const p = w(
|
|
1402
1410
|
(g, b) => b ? g === `${u.pathname}${u.search}` : g === u.pathname,
|
|
1403
1411
|
[u.pathname, u.search]
|
|
1404
|
-
),
|
|
1405
|
-
(g) => /* @__PURE__ */
|
|
1412
|
+
), h = w(
|
|
1413
|
+
(g) => /* @__PURE__ */ f(
|
|
1406
1414
|
"li",
|
|
1407
1415
|
{
|
|
1408
|
-
className: `drawer-list-item-child ${
|
|
1409
|
-
children: g.path ? /* @__PURE__ */
|
|
1416
|
+
className: `drawer-list-item-child ${p(g.path, !0) ? "active" : ""} animated`,
|
|
1417
|
+
children: g.path ? /* @__PURE__ */ f(
|
|
1410
1418
|
l,
|
|
1411
1419
|
{
|
|
1412
1420
|
tabIndex: t ? 0 : -1,
|
|
@@ -1421,14 +1429,14 @@ function Ps(n) {
|
|
|
1421
1429
|
},
|
|
1422
1430
|
g.id
|
|
1423
1431
|
),
|
|
1424
|
-
[l, t, e,
|
|
1425
|
-
), y =
|
|
1426
|
-
const
|
|
1432
|
+
[l, t, e, p]
|
|
1433
|
+
), y = V(() => d.map((g, b) => {
|
|
1434
|
+
const S = g.page ?? String(b), E = `drawer-list-item ${p(g.path) ? "active" : ""} animated`;
|
|
1427
1435
|
if (g.type === "divider")
|
|
1428
|
-
return /* @__PURE__ */
|
|
1429
|
-
const
|
|
1430
|
-
return /* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1436
|
+
return /* @__PURE__ */ f("li", { className: E, children: /* @__PURE__ */ f("hr", { className: "drawer-divider" }) }, S);
|
|
1437
|
+
const x = g.children ?? (g.page && c ? c[g.page] : null);
|
|
1438
|
+
return /* @__PURE__ */ k("li", { className: E, children: [
|
|
1439
|
+
/* @__PURE__ */ k(
|
|
1432
1440
|
l,
|
|
1433
1441
|
{
|
|
1434
1442
|
tabIndex: t ? 0 : -1,
|
|
@@ -1443,29 +1451,29 @@ function Ps(n) {
|
|
|
1443
1451
|
]
|
|
1444
1452
|
}
|
|
1445
1453
|
),
|
|
1446
|
-
|
|
1447
|
-
] },
|
|
1448
|
-
}), [l, c,
|
|
1449
|
-
return /* @__PURE__ */
|
|
1454
|
+
x && /* @__PURE__ */ f("ul", { className: "drawer-children-list", children: x.map(h) })
|
|
1455
|
+
] }, S);
|
|
1456
|
+
}), [l, c, p, t, d, h, e]);
|
|
1457
|
+
return /* @__PURE__ */ f(
|
|
1450
1458
|
"div",
|
|
1451
1459
|
{
|
|
1452
1460
|
"aria-label": e("_accessibility:ariaLabels.closeMenu"),
|
|
1453
1461
|
"aria-disabled": !t,
|
|
1454
1462
|
className: `${t ? "opened" : "closed"} drawer-backdrop`,
|
|
1455
1463
|
onClick: () => s(),
|
|
1456
|
-
children: /* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1464
|
+
children: /* @__PURE__ */ k("aside", { className: `${t ? "opened" : "closed"} drawer animated`, children: [
|
|
1465
|
+
/* @__PURE__ */ k("div", { className: "drawer-header-container", children: [
|
|
1458
1466
|
i,
|
|
1459
|
-
/* @__PURE__ */
|
|
1467
|
+
/* @__PURE__ */ f("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
|
|
1460
1468
|
] }),
|
|
1461
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ f("ul", { className: "drawer-menu-list", children: y })
|
|
1462
1470
|
] })
|
|
1463
1471
|
}
|
|
1464
1472
|
);
|
|
1465
1473
|
}
|
|
1466
|
-
const G = ({ icon: n, ...e }) => /* @__PURE__ */
|
|
1474
|
+
const G = ({ icon: n, ...e }) => /* @__PURE__ */ f(ct, { icon: /* @__PURE__ */ f(K, { icon: n }), ...e });
|
|
1467
1475
|
var we, $e;
|
|
1468
|
-
function
|
|
1476
|
+
function Qt() {
|
|
1469
1477
|
if ($e) return we;
|
|
1470
1478
|
$e = 1;
|
|
1471
1479
|
const n = (c, a = "local", u = void 0) => {
|
|
@@ -1478,8 +1486,8 @@ function Ht() {
|
|
|
1478
1486
|
}, e = (c) => {
|
|
1479
1487
|
const a = {};
|
|
1480
1488
|
return c.substring(1).split("&").forEach((l) => {
|
|
1481
|
-
const [d,
|
|
1482
|
-
a[d] =
|
|
1489
|
+
const [d, m] = l.split("=");
|
|
1490
|
+
a[d] = m;
|
|
1483
1491
|
}), a;
|
|
1484
1492
|
}, t = (c = "") => {
|
|
1485
1493
|
if (i(c) && c.length) return i(c);
|
|
@@ -1494,18 +1502,18 @@ function Ht() {
|
|
|
1494
1502
|
left: a,
|
|
1495
1503
|
behavior: l
|
|
1496
1504
|
}), r = (c, a, u, l = "/", d = "Lax") => {
|
|
1497
|
-
var
|
|
1498
|
-
|
|
1499
|
-
const
|
|
1500
|
-
document.cookie = `${c}=${u || ""}${
|
|
1505
|
+
var m = /* @__PURE__ */ new Date();
|
|
1506
|
+
m.setTime(m.getTime() + a * 24 * 60 * 60 * 1e3);
|
|
1507
|
+
const p = "; expires=" + m.toUTCString();
|
|
1508
|
+
document.cookie = `${c}=${u || ""}${p};path=${l};SameSite=${d}`;
|
|
1501
1509
|
}, i = (c) => {
|
|
1502
1510
|
const a = `${c}=`, l = decodeURIComponent(document.cookie).split(";");
|
|
1503
1511
|
for (let d = 0; d < l.length; d += 1) {
|
|
1504
|
-
let
|
|
1505
|
-
for (;
|
|
1506
|
-
|
|
1507
|
-
if (
|
|
1508
|
-
return
|
|
1512
|
+
let m = l[d];
|
|
1513
|
+
for (; m.charAt(0) === " "; )
|
|
1514
|
+
m = m.substring(1);
|
|
1515
|
+
if (m.indexOf(a) === 0)
|
|
1516
|
+
return m.substring(a.length, m.length);
|
|
1509
1517
|
}
|
|
1510
1518
|
return "";
|
|
1511
1519
|
};
|
|
@@ -1519,13 +1527,13 @@ function Ht() {
|
|
|
1519
1527
|
validation: n
|
|
1520
1528
|
}, we;
|
|
1521
1529
|
}
|
|
1522
|
-
var Vt =
|
|
1530
|
+
var Vt = Qt();
|
|
1523
1531
|
function Ks() {
|
|
1524
1532
|
const { t: n, language: e } = T();
|
|
1525
1533
|
return { timeAge: w(
|
|
1526
1534
|
(s) => {
|
|
1527
|
-
const i = /* @__PURE__ */ new Date() - s, o = Math.floor(i / (1e3 * 60)), c = Math.floor(o / 60), a = e === "es", u = n("_accessibility:labels.ago"), l = n("_accessibility:labels.minute"), d = n("_accessibility:labels.minutes"),
|
|
1528
|
-
return i < 1e3 * 60 ? y : o < 60 ? `${a ? u : ""} ${o} ${o === 1 ? l : d} ${a ? "" : u}` : c < 24 ? `${a ? u : ""} ${c} ${c === 1 ?
|
|
1535
|
+
const i = /* @__PURE__ */ new Date() - s, o = Math.floor(i / (1e3 * 60)), c = Math.floor(o / 60), a = e === "es", u = n("_accessibility:labels.ago"), l = n("_accessibility:labels.minute"), d = n("_accessibility:labels.minutes"), m = n("_accessibility:labels.hour"), p = n("_accessibility:labels.hours"), h = n("_accessibility:labels.yesterday"), y = n("_accessibility:labels.justNow");
|
|
1536
|
+
return i < 1e3 * 60 ? y : o < 60 ? `${a ? u : ""} ${o} ${o === 1 ? l : d} ${a ? "" : u}` : c < 24 ? `${a ? u : ""} ${c} ${c === 1 ? m : p} ${a ? "" : u}` : c < 48 ? h : s.toLocaleDateString(navigator.language || "es-ES", {
|
|
1529
1537
|
day: "2-digit",
|
|
1530
1538
|
month: "2-digit",
|
|
1531
1539
|
year: "numeric"
|
|
@@ -1535,24 +1543,24 @@ function Ks() {
|
|
|
1535
1543
|
) };
|
|
1536
1544
|
}
|
|
1537
1545
|
const Be = (n) => {
|
|
1538
|
-
const { showSuccessNotification: e } = ee(), { mutationFn: t, onError: s, onSuccess: r, onSuccessMessage: i } = n, [o, c] =
|
|
1546
|
+
const { showSuccessNotification: e } = ee(), { mutationFn: t, onError: s, onSuccess: r, onSuccessMessage: i } = n, [o, c] = L([]), { open: a, handleClose: u, handleOpen: l } = We(), d = () => {
|
|
1539
1547
|
u(), c([]);
|
|
1540
|
-
},
|
|
1541
|
-
c(
|
|
1542
|
-
},
|
|
1548
|
+
}, m = async (h) => {
|
|
1549
|
+
c(h), l();
|
|
1550
|
+
}, p = Z({
|
|
1543
1551
|
mutationFn: () => t(
|
|
1544
1552
|
Array.isArray(o) ? o : [o]
|
|
1545
1553
|
),
|
|
1546
|
-
onError: (
|
|
1547
|
-
console.error(
|
|
1554
|
+
onError: (h) => {
|
|
1555
|
+
console.error(h), s && s(h), d();
|
|
1548
1556
|
},
|
|
1549
|
-
onSuccess: async (
|
|
1550
|
-
r && r(
|
|
1557
|
+
onSuccess: async (h) => {
|
|
1558
|
+
r && r(h), e({
|
|
1551
1559
|
message: i
|
|
1552
1560
|
}), d();
|
|
1553
1561
|
}
|
|
1554
1562
|
});
|
|
1555
|
-
return { open: a, onClick:
|
|
1563
|
+
return { open: a, onClick: m, close: d, dialogFn: p, isLoading: p.isPending };
|
|
1556
1564
|
}, qs = (n) => {
|
|
1557
1565
|
const { t: e } = T(), {
|
|
1558
1566
|
showStackNotifications: t,
|
|
@@ -1565,76 +1573,76 @@ const Be = (n) => {
|
|
|
1565
1573
|
onError: u,
|
|
1566
1574
|
onSuccess: l,
|
|
1567
1575
|
queryKey: d,
|
|
1568
|
-
onSuccessMessage:
|
|
1569
|
-
} = n, { control:
|
|
1576
|
+
onSuccessMessage: m
|
|
1577
|
+
} = n, { control: p, handleSubmit: h, reset: y, setError: g, getValues: b, setValue: S } = Me({
|
|
1570
1578
|
defaultValues: o
|
|
1571
|
-
}), E =
|
|
1579
|
+
}), E = M(null), x = w(() => {
|
|
1572
1580
|
const v = document.activeElement;
|
|
1573
1581
|
if (!(v instanceof HTMLElement)) {
|
|
1574
1582
|
E.current = null;
|
|
1575
1583
|
return;
|
|
1576
1584
|
}
|
|
1577
1585
|
E.current = v.closest("form");
|
|
1578
|
-
}, []),
|
|
1586
|
+
}, []), N = w(
|
|
1579
1587
|
(v) => {
|
|
1580
|
-
const
|
|
1581
|
-
if (!
|
|
1582
|
-
let
|
|
1583
|
-
return
|
|
1584
|
-
const B =
|
|
1585
|
-
(B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (
|
|
1586
|
-
}),
|
|
1588
|
+
const $ = v == null ? void 0 : v.errors, _ = [], R = E.current;
|
|
1589
|
+
if (!R) return _;
|
|
1590
|
+
let j = !1;
|
|
1591
|
+
return $ && $.forEach(([le, ge]) => {
|
|
1592
|
+
const B = R.querySelector(`[name="${le}"]`);
|
|
1593
|
+
(B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (j || (B.focus(), j = !0), B.classList.add("error"), _.push(e(`_entities:${d}.${le}.${ge}`)));
|
|
1594
|
+
}), _;
|
|
1587
1595
|
},
|
|
1588
1596
|
[e, d]
|
|
1589
|
-
),
|
|
1597
|
+
), U = w(() => {
|
|
1590
1598
|
const v = E.current;
|
|
1591
1599
|
if (!v) return;
|
|
1592
|
-
v.querySelectorAll("input, textarea, select").forEach((
|
|
1593
|
-
|
|
1600
|
+
v.querySelectorAll("input, textarea, select").forEach((_) => {
|
|
1601
|
+
_.classList.remove("error");
|
|
1594
1602
|
});
|
|
1595
|
-
}, []),
|
|
1603
|
+
}, []), H = Z(
|
|
1596
1604
|
{
|
|
1597
1605
|
mutationFn: c,
|
|
1598
1606
|
onError: (v) => {
|
|
1599
1607
|
console.error(v);
|
|
1600
|
-
const
|
|
1608
|
+
const $ = v;
|
|
1601
1609
|
if (u) u(v);
|
|
1602
|
-
else if (he(
|
|
1603
|
-
const
|
|
1610
|
+
else if (he($)) {
|
|
1611
|
+
const _ = N($);
|
|
1604
1612
|
t(
|
|
1605
|
-
|
|
1606
|
-
(
|
|
1607
|
-
message:
|
|
1608
|
-
type:
|
|
1613
|
+
_.map(
|
|
1614
|
+
(R) => ({
|
|
1615
|
+
message: R,
|
|
1616
|
+
type: I.error
|
|
1609
1617
|
})
|
|
1610
1618
|
)
|
|
1611
1619
|
);
|
|
1612
|
-
} else if (fe(
|
|
1613
|
-
const
|
|
1614
|
-
r({ message:
|
|
1620
|
+
} else if (fe($)) {
|
|
1621
|
+
const _ = $.message || e("_accessibility:errors.500"), R = e(`_accessibility:errors.${$.status}`);
|
|
1622
|
+
r({ message: R || _ });
|
|
1615
1623
|
} else
|
|
1616
1624
|
r({ message: e("_accessibility:errors.500") });
|
|
1617
1625
|
},
|
|
1618
1626
|
onSuccess: async (v) => {
|
|
1619
|
-
await i.invalidateQueries({ queryKey: d }), l && l(v),
|
|
1620
|
-
message:
|
|
1627
|
+
await i.invalidateQueries({ queryKey: d }), l && l(v), m && s({
|
|
1628
|
+
message: m
|
|
1621
1629
|
});
|
|
1622
1630
|
}
|
|
1623
1631
|
}
|
|
1624
1632
|
);
|
|
1625
1633
|
return {
|
|
1626
|
-
control:
|
|
1634
|
+
control: p,
|
|
1627
1635
|
getValues: b,
|
|
1628
|
-
setValue:
|
|
1629
|
-
handleSubmit:
|
|
1636
|
+
setValue: S,
|
|
1637
|
+
handleSubmit: h,
|
|
1630
1638
|
onSubmit: (v) => {
|
|
1631
|
-
|
|
1639
|
+
x(), U(), H.mutate(
|
|
1632
1640
|
a ? a(v) : v
|
|
1633
1641
|
);
|
|
1634
1642
|
},
|
|
1635
1643
|
reset: y,
|
|
1636
1644
|
setError: g,
|
|
1637
|
-
isLoading:
|
|
1645
|
+
isLoading: H.isPending
|
|
1638
1646
|
};
|
|
1639
1647
|
}, Bt = (n) => {
|
|
1640
1648
|
const { t: e } = T(), {
|
|
@@ -1657,8 +1665,8 @@ const Be = (n) => {
|
|
|
1657
1665
|
onClick: () => t([d == null ? void 0 : d.id]),
|
|
1658
1666
|
hidden: !!d.deletedAt || i,
|
|
1659
1667
|
disabled: !!d.deletedAt || c,
|
|
1660
|
-
icon: /* @__PURE__ */
|
|
1661
|
-
onMultipleClick: (
|
|
1668
|
+
icon: /* @__PURE__ */ f(K, { className: "text-bg-error", icon: s }),
|
|
1669
|
+
onMultipleClick: (m) => t(m.map((p) => p.id))
|
|
1662
1670
|
}),
|
|
1663
1671
|
[c, i, s, a, o, t, r, u]
|
|
1664
1672
|
)
|
|
@@ -1684,8 +1692,8 @@ const Be = (n) => {
|
|
|
1684
1692
|
onClick: () => t([d == null ? void 0 : d.id]),
|
|
1685
1693
|
hidden: !d.deletedAt || r,
|
|
1686
1694
|
disabled: !d.deletedAt || i,
|
|
1687
|
-
icon: /* @__PURE__ */
|
|
1688
|
-
onMultipleClick: (
|
|
1695
|
+
icon: /* @__PURE__ */ f(K, { className: "text-bg-error", icon: c }),
|
|
1696
|
+
onMultipleClick: (m) => t(m.map((p) => p.id))
|
|
1689
1697
|
}),
|
|
1690
1698
|
[i, r, c, a, o, t, s, u]
|
|
1691
1699
|
)
|
|
@@ -1709,7 +1717,7 @@ const Be = (n) => {
|
|
|
1709
1717
|
onClick: () => t(l == null ? void 0 : l.id),
|
|
1710
1718
|
hidden: !!l.deletedAt || s,
|
|
1711
1719
|
disabled: !!l.deletedAt || i,
|
|
1712
|
-
icon: /* @__PURE__ */
|
|
1720
|
+
icon: /* @__PURE__ */ f(K, { className: "primary", icon: c })
|
|
1713
1721
|
}),
|
|
1714
1722
|
[i, s, c, o, t, r, a]
|
|
1715
1723
|
)
|
|
@@ -1729,8 +1737,8 @@ const Gt = (n) => {
|
|
|
1729
1737
|
id: z.Export,
|
|
1730
1738
|
hidden: s,
|
|
1731
1739
|
disabled: r,
|
|
1732
|
-
icon: /* @__PURE__ */
|
|
1733
|
-
|
|
1740
|
+
icon: /* @__PURE__ */ f(
|
|
1741
|
+
K,
|
|
1734
1742
|
{
|
|
1735
1743
|
className: `${i ? "rotate" : ""}`,
|
|
1736
1744
|
icon: i ? Ie : wt
|
|
@@ -1755,8 +1763,8 @@ const Gt = (n) => {
|
|
|
1755
1763
|
id: z.Import,
|
|
1756
1764
|
hidden: s,
|
|
1757
1765
|
disabled: r,
|
|
1758
|
-
icon: /* @__PURE__ */
|
|
1759
|
-
|
|
1766
|
+
icon: /* @__PURE__ */ f(
|
|
1767
|
+
K,
|
|
1760
1768
|
{
|
|
1761
1769
|
className: `${i ? "rotate" : ""}`,
|
|
1762
1770
|
icon: i ? Ie : St
|
|
@@ -1771,32 +1779,32 @@ const Gt = (n) => {
|
|
|
1771
1779
|
}, js = (n) => {
|
|
1772
1780
|
const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = T(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
|
|
1773
1781
|
onSuccessMessage: o("_pages:common.actions.delete.successMessage"),
|
|
1774
|
-
onError: (
|
|
1775
|
-
const
|
|
1776
|
-
if (he(
|
|
1782
|
+
onError: (p) => {
|
|
1783
|
+
const h = p;
|
|
1784
|
+
if (he(h))
|
|
1777
1785
|
i(
|
|
1778
|
-
|
|
1786
|
+
h.errors.map(
|
|
1779
1787
|
([y, g]) => ({
|
|
1780
1788
|
message: o(`_pages:${y}.errors.${g}`),
|
|
1781
|
-
type:
|
|
1789
|
+
type: I.error
|
|
1782
1790
|
})
|
|
1783
1791
|
)
|
|
1784
1792
|
);
|
|
1785
|
-
else if (fe(
|
|
1786
|
-
const y =
|
|
1793
|
+
else if (fe(h)) {
|
|
1794
|
+
const y = h.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${h.status}`);
|
|
1787
1795
|
i([
|
|
1788
1796
|
{
|
|
1789
1797
|
message: g || y,
|
|
1790
|
-
type:
|
|
1798
|
+
type: I.error
|
|
1791
1799
|
}
|
|
1792
1800
|
]);
|
|
1793
1801
|
}
|
|
1794
1802
|
},
|
|
1795
|
-
onSuccess: async (
|
|
1796
|
-
await r.invalidateQueries({ queryKey: e }), t && t(
|
|
1803
|
+
onSuccess: async (p) => {
|
|
1804
|
+
await r.invalidateQueries({ queryKey: e }), t && t(p);
|
|
1797
1805
|
},
|
|
1798
1806
|
...s
|
|
1799
|
-
}), { action:
|
|
1807
|
+
}), { action: m } = Bt({ onClick: a });
|
|
1800
1808
|
return {
|
|
1801
1809
|
onClick: a,
|
|
1802
1810
|
title: o("_pages:common.actions.delete.dialog.title"),
|
|
@@ -1804,60 +1812,60 @@ const Gt = (n) => {
|
|
|
1804
1812
|
isLoading: d,
|
|
1805
1813
|
handleSubmit: () => l.mutate(),
|
|
1806
1814
|
handleClose: u,
|
|
1807
|
-
action:
|
|
1815
|
+
action: m
|
|
1808
1816
|
};
|
|
1809
1817
|
}, We = () => {
|
|
1810
|
-
const [n, e] =
|
|
1818
|
+
const [n, e] = L(!1);
|
|
1811
1819
|
return { open: n, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
|
|
1812
1820
|
}, Jt = (n) => "mutationFn" in n && "queryKey" in n, pe = (n) => {
|
|
1813
1821
|
const e = Jt(n), t = e ? n : void 0, s = e ? void 0 : n, r = e ? "entity" : (s == null ? void 0 : s.mode) ?? "state", { t: i } = T(), o = J(), {
|
|
1814
1822
|
showErrorNotification: c,
|
|
1815
1823
|
showStackNotifications: a,
|
|
1816
1824
|
showSuccessNotification: u
|
|
1817
|
-
} = ee(), [l, d] =
|
|
1825
|
+
} = ee(), [l, d] = L(), [m, p] = L(!1), h = M(!1), y = M(), { open: g, handleClose: b, handleOpen: S } = We(), { control: E, handleSubmit: x, reset: N, setError: U, getValues: H, setValue: v } = Me({
|
|
1818
1826
|
defaultValues: (t == null ? void 0 : t.defaultValues) || (s == null ? void 0 : s.defaultValues) || {}
|
|
1819
|
-
}),
|
|
1827
|
+
}), $ = M(null), _ = w(() => {
|
|
1820
1828
|
const C = document.activeElement;
|
|
1821
1829
|
if (!(C instanceof HTMLElement)) {
|
|
1822
|
-
|
|
1830
|
+
$.current = null;
|
|
1823
1831
|
return;
|
|
1824
1832
|
}
|
|
1825
|
-
|
|
1826
|
-
}, []),
|
|
1833
|
+
$.current = C.closest("form");
|
|
1834
|
+
}, []), R = t ? [...t.queryKey, l ?? 0] : ["__legacy-form-dialog-disabled__", l ?? 0], { data: j, isLoading: le } = Oe({
|
|
1827
1835
|
queryFn: async () => {
|
|
1828
1836
|
if (!(!(t != null && t.getFunction) || !l))
|
|
1829
1837
|
return t.getFunction(l);
|
|
1830
1838
|
},
|
|
1831
|
-
queryKey:
|
|
1839
|
+
queryKey: R,
|
|
1832
1840
|
enabled: !!(t != null && t.getFunction) && !!l
|
|
1833
1841
|
});
|
|
1834
1842
|
O(() => {
|
|
1835
|
-
!t || !
|
|
1836
|
-
}, [
|
|
1843
|
+
!t || !j || !t.dtoToForm || y.current !== j && (N({ ...t.dtoToForm(j) }), y.current = j);
|
|
1844
|
+
}, [j, t, N]), O(() => {
|
|
1837
1845
|
if (s) {
|
|
1838
1846
|
if (!g) {
|
|
1839
|
-
|
|
1847
|
+
h.current = !1;
|
|
1840
1848
|
return;
|
|
1841
1849
|
}
|
|
1842
|
-
if (!
|
|
1843
|
-
if (
|
|
1844
|
-
|
|
1850
|
+
if (!h.current) {
|
|
1851
|
+
if (h.current = !0, s.reinitializeOnOpen && s.mapIn) {
|
|
1852
|
+
N(s.mapIn());
|
|
1845
1853
|
return;
|
|
1846
1854
|
}
|
|
1847
1855
|
if (s.reinitializeOnOpen && s.defaultValues) {
|
|
1848
|
-
|
|
1856
|
+
N(s.defaultValues);
|
|
1849
1857
|
return;
|
|
1850
1858
|
}
|
|
1851
|
-
s.resetOnOpen &&
|
|
1859
|
+
s.resetOnOpen && N(s.defaultValues || {});
|
|
1852
1860
|
}
|
|
1853
1861
|
}
|
|
1854
|
-
}, [s, g,
|
|
1862
|
+
}, [s, g, N]);
|
|
1855
1863
|
const ge = w(
|
|
1856
1864
|
(C) => {
|
|
1857
|
-
const
|
|
1865
|
+
const D = C == null ? void 0 : C.errors, Q = [], te = $.current;
|
|
1858
1866
|
if (!te || !t) return Q;
|
|
1859
1867
|
let Ce = !1;
|
|
1860
|
-
return
|
|
1868
|
+
return D && D.forEach(([Te, Ze]) => {
|
|
1861
1869
|
const oe = te.querySelector(`[name="${Te}"]`);
|
|
1862
1870
|
(oe instanceof HTMLInputElement || oe instanceof HTMLTextAreaElement || oe instanceof HTMLSelectElement) && (Ce || (oe.focus(), Ce = !0), oe.classList.add("error"), Q.push(
|
|
1863
1871
|
i(`_entities:${t.queryKey}.${Te}.${Ze}`)
|
|
@@ -1866,18 +1874,18 @@ const Gt = (n) => {
|
|
|
1866
1874
|
},
|
|
1867
1875
|
[t, i]
|
|
1868
1876
|
), B = w(() => {
|
|
1869
|
-
const C =
|
|
1877
|
+
const C = $.current;
|
|
1870
1878
|
if (!C) return;
|
|
1871
1879
|
C.querySelectorAll("input, textarea, select").forEach((Q) => {
|
|
1872
1880
|
Q.classList.remove("error");
|
|
1873
1881
|
});
|
|
1874
1882
|
}, []), Y = w(() => {
|
|
1875
|
-
B(),
|
|
1876
|
-
}, [b, B,
|
|
1883
|
+
B(), $.current = null, b(), N();
|
|
1884
|
+
}, [b, B, N]), ze = w(
|
|
1877
1885
|
(C) => {
|
|
1878
|
-
d(C),
|
|
1886
|
+
d(C), S();
|
|
1879
1887
|
},
|
|
1880
|
-
[
|
|
1888
|
+
[S]
|
|
1881
1889
|
), ye = Z({
|
|
1882
1890
|
mutationFn: async (C) => {
|
|
1883
1891
|
if (t)
|
|
@@ -1887,19 +1895,19 @@ const Gt = (n) => {
|
|
|
1887
1895
|
if (t)
|
|
1888
1896
|
if (t.onError) t.onError(C);
|
|
1889
1897
|
else {
|
|
1890
|
-
const
|
|
1891
|
-
if (he(
|
|
1892
|
-
const Q = ge(
|
|
1898
|
+
const D = C;
|
|
1899
|
+
if (he(D)) {
|
|
1900
|
+
const Q = ge(D);
|
|
1893
1901
|
a(
|
|
1894
1902
|
Q.map(
|
|
1895
1903
|
(te) => ({
|
|
1896
1904
|
message: te,
|
|
1897
|
-
type:
|
|
1905
|
+
type: I.error
|
|
1898
1906
|
})
|
|
1899
1907
|
)
|
|
1900
1908
|
);
|
|
1901
|
-
} else if (fe(
|
|
1902
|
-
const Q =
|
|
1909
|
+
} else if (fe(D)) {
|
|
1910
|
+
const Q = D.message || i("_accessibility:errors.500"), te = i(`_accessibility:errors.${D.status}`);
|
|
1903
1911
|
c({ message: te || Q });
|
|
1904
1912
|
} else
|
|
1905
1913
|
c({ message: i("_accessibility:errors.500") });
|
|
@@ -1915,51 +1923,51 @@ const Gt = (n) => {
|
|
|
1915
1923
|
[s, l, t]
|
|
1916
1924
|
), Je = w(async () => {
|
|
1917
1925
|
if (!(s != null && s.onApply)) return;
|
|
1918
|
-
const C =
|
|
1919
|
-
|
|
1926
|
+
const C = H(), D = ue(C);
|
|
1927
|
+
p(!0);
|
|
1920
1928
|
try {
|
|
1921
|
-
await s.onApply(
|
|
1929
|
+
await s.onApply(D, {
|
|
1922
1930
|
close: Y,
|
|
1923
1931
|
id: l,
|
|
1924
1932
|
values: C
|
|
1925
1933
|
});
|
|
1926
1934
|
} finally {
|
|
1927
|
-
|
|
1935
|
+
p(!1);
|
|
1928
1936
|
}
|
|
1929
|
-
}, [Y, s,
|
|
1937
|
+
}, [Y, s, H, l, ue]), Ye = w(async () => {
|
|
1930
1938
|
if (s) {
|
|
1931
1939
|
if (s.onClear) {
|
|
1932
|
-
|
|
1940
|
+
p(!0);
|
|
1933
1941
|
try {
|
|
1934
1942
|
await s.onClear();
|
|
1935
1943
|
} finally {
|
|
1936
|
-
|
|
1944
|
+
p(!1);
|
|
1937
1945
|
}
|
|
1938
1946
|
}
|
|
1939
|
-
|
|
1947
|
+
N(s.defaultValues || {});
|
|
1940
1948
|
}
|
|
1941
|
-
}, [s,
|
|
1949
|
+
}, [s, N]), Xe = w(
|
|
1942
1950
|
async (C) => {
|
|
1943
1951
|
if (t) {
|
|
1944
|
-
|
|
1952
|
+
_(), ye.mutate(
|
|
1945
1953
|
t.formToDto ? t.formToDto(C) : C
|
|
1946
1954
|
);
|
|
1947
1955
|
return;
|
|
1948
1956
|
}
|
|
1949
|
-
const
|
|
1950
|
-
|
|
1957
|
+
const D = ue(C);
|
|
1958
|
+
p(!0);
|
|
1951
1959
|
try {
|
|
1952
|
-
s != null && s.onSubmit && await s.onSubmit(
|
|
1960
|
+
s != null && s.onSubmit && await s.onSubmit(D, {
|
|
1953
1961
|
close: Y,
|
|
1954
1962
|
id: l,
|
|
1955
1963
|
values: C
|
|
1956
1964
|
}), ((s == null ? void 0 : s.closeOnSubmit) ?? !0) && Y();
|
|
1957
1965
|
} finally {
|
|
1958
|
-
|
|
1966
|
+
p(!1);
|
|
1959
1967
|
}
|
|
1960
1968
|
},
|
|
1961
1969
|
[
|
|
1962
|
-
|
|
1970
|
+
_,
|
|
1963
1971
|
Y,
|
|
1964
1972
|
s,
|
|
1965
1973
|
l,
|
|
@@ -1975,19 +1983,19 @@ const Gt = (n) => {
|
|
|
1975
1983
|
openDialog: ze,
|
|
1976
1984
|
handleClose: Y,
|
|
1977
1985
|
control: E,
|
|
1978
|
-
getValues:
|
|
1986
|
+
getValues: H,
|
|
1979
1987
|
setValue: v,
|
|
1980
|
-
handleSubmit:
|
|
1988
|
+
handleSubmit: x,
|
|
1981
1989
|
onSubmit: Xe,
|
|
1982
|
-
reset:
|
|
1983
|
-
setError:
|
|
1990
|
+
reset: N,
|
|
1991
|
+
setError: U,
|
|
1984
1992
|
title: n.title,
|
|
1985
|
-
isSubmitting:
|
|
1993
|
+
isSubmitting: m,
|
|
1986
1994
|
onApply: Je,
|
|
1987
1995
|
onClear: Ye,
|
|
1988
|
-
isLoading: le || ye.isPending ||
|
|
1996
|
+
isLoading: le || ye.isPending || m
|
|
1989
1997
|
};
|
|
1990
|
-
},
|
|
1998
|
+
}, Hs = pe, Qs = (n) => pe(n), Vs = (n) => {
|
|
1991
1999
|
const e = J(), { mutationFn: t, queryKey: s, onSuccess: r, onError: i, mapOut: o, ...c } = n, a = Z({
|
|
1992
2000
|
mutationFn: t
|
|
1993
2001
|
});
|
|
@@ -2005,77 +2013,81 @@ const Gt = (n) => {
|
|
|
2005
2013
|
}
|
|
2006
2014
|
});
|
|
2007
2015
|
}, Bs = (n) => {
|
|
2008
|
-
const e = J(), t =
|
|
2009
|
-
mutationFn:
|
|
2010
|
-
queryKey:
|
|
2011
|
-
onSuccess:
|
|
2012
|
-
onError:
|
|
2013
|
-
mapOut:
|
|
2014
|
-
getFunction:
|
|
2015
|
-
dtoToForm:
|
|
2016
|
-
title:
|
|
2017
|
-
...
|
|
2018
|
-
} = n,
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2016
|
+
const e = J(), t = M(), s = M(), {
|
|
2017
|
+
mutationFn: r,
|
|
2018
|
+
queryKey: i,
|
|
2019
|
+
onSuccess: o,
|
|
2020
|
+
onError: c,
|
|
2021
|
+
mapOut: a,
|
|
2022
|
+
getFunction: u,
|
|
2023
|
+
dtoToForm: l,
|
|
2024
|
+
title: d,
|
|
2025
|
+
...m
|
|
2026
|
+
} = n, p = M(l);
|
|
2027
|
+
O(() => {
|
|
2028
|
+
p.current = l;
|
|
2029
|
+
}, [l]);
|
|
2030
|
+
const h = Z({
|
|
2031
|
+
mutationFn: r
|
|
2032
|
+
}), y = pe({
|
|
2033
|
+
...m,
|
|
2022
2034
|
mode: "entity",
|
|
2023
|
-
title:
|
|
2024
|
-
onSubmit: async (
|
|
2035
|
+
title: d,
|
|
2036
|
+
onSubmit: async (E) => {
|
|
2025
2037
|
try {
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2028
|
-
} catch (
|
|
2029
|
-
throw
|
|
2038
|
+
const x = await h.mutateAsync(E);
|
|
2039
|
+
i && await e.invalidateQueries({ queryKey: i }), o && await o(x);
|
|
2040
|
+
} catch (x) {
|
|
2041
|
+
throw c && c(x), x;
|
|
2030
2042
|
}
|
|
2031
2043
|
},
|
|
2032
|
-
mapOut: (
|
|
2033
|
-
}), { reset:
|
|
2034
|
-
queryFn: () =>
|
|
2035
|
-
queryKey: [...
|
|
2036
|
-
enabled:
|
|
2044
|
+
mapOut: (E) => a ? a(E, t.current) : E
|
|
2045
|
+
}), { reset: g } = y, S = Oe({
|
|
2046
|
+
queryFn: () => u(y.id),
|
|
2047
|
+
queryKey: [...i || ["put-dialog", d], y.id],
|
|
2048
|
+
enabled: y.open && !!y.id
|
|
2037
2049
|
});
|
|
2038
2050
|
return O(() => {
|
|
2039
|
-
if (
|
|
2040
|
-
if (t.current =
|
|
2041
|
-
|
|
2051
|
+
if (S.data && s.current !== S.data) {
|
|
2052
|
+
if (t.current = S.data, s.current = S.data, p.current && g) {
|
|
2053
|
+
g(p.current(S.data));
|
|
2042
2054
|
return;
|
|
2043
2055
|
}
|
|
2044
|
-
|
|
2056
|
+
g == null || g(S.data);
|
|
2045
2057
|
}
|
|
2046
|
-
}, [
|
|
2047
|
-
...
|
|
2048
|
-
isLoading:
|
|
2058
|
+
}, [S.data, g]), {
|
|
2059
|
+
...y,
|
|
2060
|
+
isLoading: y.isLoading || h.isPending || S.isFetching || S.isLoading
|
|
2049
2061
|
};
|
|
2050
2062
|
}, Ws = (n) => {
|
|
2051
2063
|
const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = T(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
|
|
2052
2064
|
onSuccessMessage: o("_pages:common.actions.restore.successMessage"),
|
|
2053
|
-
onError: (
|
|
2054
|
-
const
|
|
2055
|
-
if (he(
|
|
2065
|
+
onError: (p) => {
|
|
2066
|
+
const h = p;
|
|
2067
|
+
if (he(h))
|
|
2056
2068
|
i(
|
|
2057
|
-
|
|
2069
|
+
h.errors.map(
|
|
2058
2070
|
([y, g]) => ({
|
|
2059
2071
|
message: o(`_pages:${y}.errors.${g}`),
|
|
2060
|
-
type:
|
|
2072
|
+
type: I.error
|
|
2061
2073
|
})
|
|
2062
2074
|
)
|
|
2063
2075
|
);
|
|
2064
|
-
else if (fe(
|
|
2065
|
-
const y =
|
|
2076
|
+
else if (fe(h)) {
|
|
2077
|
+
const y = h.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${h.status}`);
|
|
2066
2078
|
i([
|
|
2067
2079
|
{
|
|
2068
2080
|
message: g || y,
|
|
2069
|
-
type:
|
|
2081
|
+
type: I.error
|
|
2070
2082
|
}
|
|
2071
2083
|
]);
|
|
2072
2084
|
}
|
|
2073
2085
|
},
|
|
2074
|
-
onSuccess: async (
|
|
2075
|
-
await r.invalidateQueries({ queryKey: e }), t && t(
|
|
2086
|
+
onSuccess: async (p) => {
|
|
2087
|
+
await r.invalidateQueries({ queryKey: e }), t && t(p);
|
|
2076
2088
|
},
|
|
2077
2089
|
...s
|
|
2078
|
-
}), { action:
|
|
2090
|
+
}), { action: m } = Wt({ onClick: a });
|
|
2079
2091
|
return {
|
|
2080
2092
|
onClick: a,
|
|
2081
2093
|
title: o("_pages:common.actions.restore.dialog.title"),
|
|
@@ -2083,7 +2095,7 @@ const Gt = (n) => {
|
|
|
2083
2095
|
isLoading: d,
|
|
2084
2096
|
handleSubmit: () => l.mutate(),
|
|
2085
2097
|
handleClose: u,
|
|
2086
|
-
action:
|
|
2098
|
+
action: m
|
|
2087
2099
|
};
|
|
2088
2100
|
};
|
|
2089
2101
|
function Gs(n) {
|
|
@@ -2094,7 +2106,7 @@ function Gs(n) {
|
|
|
2094
2106
|
fileProcessor: o,
|
|
2095
2107
|
renderCustomPreview: c,
|
|
2096
2108
|
onError: a
|
|
2097
|
-
} = n, [u, l] =
|
|
2109
|
+
} = n, [u, l] = L(!1), [d, m] = L(null), [p, h] = L(!1), y = Z({
|
|
2098
2110
|
mutationFn: r,
|
|
2099
2111
|
onError: (b) => {
|
|
2100
2112
|
console.error(b), a == null || a(b);
|
|
@@ -2111,23 +2123,23 @@ function Gs(n) {
|
|
|
2111
2123
|
try {
|
|
2112
2124
|
await y.mutateAsync({
|
|
2113
2125
|
items: d,
|
|
2114
|
-
override:
|
|
2115
|
-
}), l(!1),
|
|
2126
|
+
override: p
|
|
2127
|
+
}), l(!1), m(null), h(!1);
|
|
2116
2128
|
} catch (b) {
|
|
2117
2129
|
console.error(b);
|
|
2118
2130
|
}
|
|
2119
2131
|
},
|
|
2120
2132
|
isLoading: y.isPending,
|
|
2121
2133
|
fileProcessor: o,
|
|
2122
|
-
onFileProcessed: (b) =>
|
|
2134
|
+
onFileProcessed: (b) => m(b),
|
|
2123
2135
|
renderCustomPreview: c,
|
|
2124
|
-
onOverrideChange: (b) =>
|
|
2136
|
+
onOverrideChange: (b) => h(b),
|
|
2125
2137
|
open: u,
|
|
2126
2138
|
title: e("_pages:common.actions.import.dialog.title", {
|
|
2127
2139
|
entity: e(`_pages:${i}.title`)
|
|
2128
2140
|
}),
|
|
2129
2141
|
handleClose: () => {
|
|
2130
|
-
l(!1),
|
|
2142
|
+
l(!1), m(null), h(!1);
|
|
2131
2143
|
},
|
|
2132
2144
|
action: g
|
|
2133
2145
|
};
|
|
@@ -2145,8 +2157,8 @@ const zs = (n) => {
|
|
|
2145
2157
|
console.error(d), i && i(d);
|
|
2146
2158
|
},
|
|
2147
2159
|
onSuccess: async (d) => {
|
|
2148
|
-
const
|
|
2149
|
-
y.href =
|
|
2160
|
+
const m = JSON.stringify(d, null, 2), p = new Blob([m], { type: "application/json" }), h = URL.createObjectURL(p), y = document.createElement("a");
|
|
2161
|
+
y.href = h, y.download = `${s}.json`, y.click(), URL.revokeObjectURL(h), o && o(d), e({
|
|
2150
2162
|
message: c
|
|
2151
2163
|
});
|
|
2152
2164
|
}
|
|
@@ -2161,7 +2173,7 @@ const zs = (n) => {
|
|
|
2161
2173
|
};
|
|
2162
2174
|
}, xe = () => typeof window < "u" ? window.scrollY : 0;
|
|
2163
2175
|
function Yt(n) {
|
|
2164
|
-
const [e, t] =
|
|
2176
|
+
const [e, t] = L(xe), s = w(() => {
|
|
2165
2177
|
t(xe());
|
|
2166
2178
|
}, []);
|
|
2167
2179
|
return O(() => (window.addEventListener("scroll", s), () => {
|
|
@@ -2180,9 +2192,9 @@ const Js = (n) => {
|
|
|
2180
2192
|
className: u = "",
|
|
2181
2193
|
variant: l = "submit",
|
|
2182
2194
|
color: d = "primary",
|
|
2183
|
-
...
|
|
2184
|
-
} = n,
|
|
2185
|
-
return /* @__PURE__ */
|
|
2195
|
+
...m
|
|
2196
|
+
} = n, p = Yt(s);
|
|
2197
|
+
return /* @__PURE__ */ f(
|
|
2186
2198
|
G,
|
|
2187
2199
|
{
|
|
2188
2200
|
variant: l,
|
|
@@ -2192,17 +2204,17 @@ const Js = (n) => {
|
|
|
2192
2204
|
onClick: () => {
|
|
2193
2205
|
a == null || a(), c && Vt.scrollTo(i, r);
|
|
2194
2206
|
},
|
|
2195
|
-
className: `to-top ${
|
|
2207
|
+
className: `to-top ${p ? "show" : "hide"} ${u}`.trim(),
|
|
2196
2208
|
"data-tooltip-content": o,
|
|
2197
|
-
...
|
|
2209
|
+
...m
|
|
2198
2210
|
}
|
|
2199
2211
|
);
|
|
2200
2212
|
};
|
|
2201
2213
|
function Ys(n) {
|
|
2202
2214
|
const { t: e } = T();
|
|
2203
2215
|
if ("children" in n) {
|
|
2204
|
-
const { children:
|
|
2205
|
-
return /* @__PURE__ */
|
|
2216
|
+
const { children: x, className: N } = n;
|
|
2217
|
+
return /* @__PURE__ */ f("div", { className: `error-container${N ? ` ${N}` : ""}`, children: x });
|
|
2206
2218
|
}
|
|
2207
2219
|
const {
|
|
2208
2220
|
error: s,
|
|
@@ -2214,50 +2226,50 @@ function Ys(n) {
|
|
|
2214
2226
|
messageProps: u,
|
|
2215
2227
|
className: l,
|
|
2216
2228
|
resetErrorBoundary: d
|
|
2217
|
-
} = n,
|
|
2218
|
-
className:
|
|
2219
|
-
children:
|
|
2229
|
+
} = n, m = o ?? d, {
|
|
2230
|
+
className: p,
|
|
2231
|
+
children: h,
|
|
2220
2232
|
onClick: y,
|
|
2221
2233
|
...g
|
|
2222
|
-
} = a ?? {}, { className: b, ...
|
|
2223
|
-
return /* @__PURE__ */
|
|
2224
|
-
E && /* @__PURE__ */
|
|
2225
|
-
|
|
2234
|
+
} = a ?? {}, { className: b, ...S } = u ?? {}, E = i !== null;
|
|
2235
|
+
return /* @__PURE__ */ k("div", { className: `error-container${l ? ` ${l}` : ""}`, children: [
|
|
2236
|
+
E && /* @__PURE__ */ f(
|
|
2237
|
+
K,
|
|
2226
2238
|
{
|
|
2227
2239
|
...i,
|
|
2228
2240
|
icon: (i == null ? void 0 : i.icon) ?? Lt,
|
|
2229
2241
|
className: `error-icon${i != null && i.className ? ` ${i.className}` : ""}`
|
|
2230
2242
|
}
|
|
2231
2243
|
),
|
|
2232
|
-
/* @__PURE__ */
|
|
2244
|
+
/* @__PURE__ */ f(
|
|
2233
2245
|
"p",
|
|
2234
2246
|
{
|
|
2235
|
-
...
|
|
2247
|
+
...S,
|
|
2236
2248
|
className: `error-message${b ? ` ${b}` : ""}`,
|
|
2237
2249
|
children: r ?? (s == null ? void 0 : s.message) ?? e("_accessibility:errors.unknownError")
|
|
2238
2250
|
}
|
|
2239
2251
|
),
|
|
2240
|
-
|
|
2241
|
-
|
|
2252
|
+
m && /* @__PURE__ */ f(
|
|
2253
|
+
q,
|
|
2242
2254
|
{
|
|
2243
2255
|
type: "button",
|
|
2244
2256
|
variant: "submit",
|
|
2245
2257
|
color: "primary",
|
|
2246
2258
|
...g,
|
|
2247
|
-
className: `error-retry ${
|
|
2248
|
-
onClick: (
|
|
2249
|
-
y == null || y(
|
|
2259
|
+
className: `error-retry ${p ? ` ${p}` : ""}`,
|
|
2260
|
+
onClick: (x) => {
|
|
2261
|
+
y == null || y(x), x.defaultPrevented || m();
|
|
2250
2262
|
},
|
|
2251
|
-
children:
|
|
2263
|
+
children: h ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
|
|
2252
2264
|
}
|
|
2253
2265
|
)
|
|
2254
2266
|
] });
|
|
2255
2267
|
}
|
|
2256
2268
|
const Xt = (n) => {
|
|
2257
2269
|
const { showBackButton: e, title: t, actions: s } = n, { t: r } = T(), { navigate: i } = ce();
|
|
2258
|
-
return /* @__PURE__ */
|
|
2259
|
-
/* @__PURE__ */
|
|
2260
|
-
e && /* @__PURE__ */
|
|
2270
|
+
return /* @__PURE__ */ k("div", { className: "page-header", children: [
|
|
2271
|
+
/* @__PURE__ */ k("div", { className: "page-header-left", children: [
|
|
2272
|
+
e && /* @__PURE__ */ f(
|
|
2261
2273
|
G,
|
|
2262
2274
|
{
|
|
2263
2275
|
icon: vt,
|
|
@@ -2268,17 +2280,17 @@ const Xt = (n) => {
|
|
|
2268
2280
|
"data-tooltip-content": r("_accessibility:buttons.back")
|
|
2269
2281
|
}
|
|
2270
2282
|
),
|
|
2271
|
-
/* @__PURE__ */
|
|
2283
|
+
/* @__PURE__ */ f("h2", { className: "page-header-title", children: t })
|
|
2272
2284
|
] }),
|
|
2273
|
-
/* @__PURE__ */
|
|
2274
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ k("div", { children: [
|
|
2286
|
+
/* @__PURE__ */ f(
|
|
2275
2287
|
lt,
|
|
2276
2288
|
{
|
|
2277
2289
|
className: "page-header-actions-desktop",
|
|
2278
2290
|
actions: s ?? []
|
|
2279
2291
|
}
|
|
2280
2292
|
),
|
|
2281
|
-
/* @__PURE__ */
|
|
2293
|
+
/* @__PURE__ */ f(
|
|
2282
2294
|
ut,
|
|
2283
2295
|
{
|
|
2284
2296
|
className: "page-header-actions-mobile",
|
|
@@ -2298,69 +2310,69 @@ const Xt = (n) => {
|
|
|
2298
2310
|
isLoading: c = !1,
|
|
2299
2311
|
isAnimated: a = !0,
|
|
2300
2312
|
showBackButton: u = !1
|
|
2301
|
-
} = n, { t: l } = T(), d = J(), { countOfFilters:
|
|
2302
|
-
const
|
|
2313
|
+
} = n, { t: l } = T(), d = J(), { countOfFilters: m } = dt(), p = V(() => {
|
|
2314
|
+
const h = Array.isArray(i) ? [...i] : [];
|
|
2303
2315
|
if (o) {
|
|
2304
2316
|
const y = {
|
|
2305
2317
|
id: z.Refresh,
|
|
2306
2318
|
onClick: () => d.invalidateQueries({ queryKey: o }),
|
|
2307
|
-
icon: /* @__PURE__ */
|
|
2319
|
+
icon: /* @__PURE__ */ f(K, { icon: Re }),
|
|
2308
2320
|
tooltip: l("_pages:common.actions.refresh.text")
|
|
2309
2321
|
};
|
|
2310
|
-
|
|
2322
|
+
h.unshift(y);
|
|
2311
2323
|
}
|
|
2312
2324
|
if (s) {
|
|
2313
2325
|
const y = {
|
|
2314
2326
|
...s,
|
|
2315
2327
|
id: z.Add,
|
|
2316
|
-
icon: /* @__PURE__ */
|
|
2328
|
+
icon: /* @__PURE__ */ f(K, { icon: Ne })
|
|
2317
2329
|
};
|
|
2318
|
-
|
|
2330
|
+
h.unshift(y);
|
|
2319
2331
|
}
|
|
2320
2332
|
if (r) {
|
|
2321
2333
|
const y = {
|
|
2322
2334
|
...r,
|
|
2323
2335
|
id: "filter",
|
|
2324
|
-
icon: /* @__PURE__ */
|
|
2325
|
-
children: /* @__PURE__ */
|
|
2336
|
+
icon: /* @__PURE__ */ f(K, { icon: Ct }),
|
|
2337
|
+
children: /* @__PURE__ */ f(
|
|
2326
2338
|
mt,
|
|
2327
2339
|
{
|
|
2328
|
-
className: `${
|
|
2329
|
-
count:
|
|
2340
|
+
className: `${m > 0 ? "show" : "hide"} `,
|
|
2341
|
+
count: m
|
|
2330
2342
|
}
|
|
2331
2343
|
)
|
|
2332
2344
|
};
|
|
2333
|
-
|
|
2345
|
+
h.push(y);
|
|
2334
2346
|
}
|
|
2335
|
-
return
|
|
2347
|
+
return h;
|
|
2336
2348
|
}, [
|
|
2337
2349
|
i,
|
|
2338
2350
|
s,
|
|
2339
|
-
|
|
2351
|
+
m,
|
|
2340
2352
|
r,
|
|
2341
2353
|
d,
|
|
2342
2354
|
o,
|
|
2343
2355
|
l
|
|
2344
2356
|
]);
|
|
2345
|
-
return /* @__PURE__ */
|
|
2346
|
-
/* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ k("main", { className: "page-main", children: [
|
|
2358
|
+
/* @__PURE__ */ f(
|
|
2347
2359
|
Xt,
|
|
2348
2360
|
{
|
|
2349
2361
|
showBackButton: u,
|
|
2350
|
-
actions:
|
|
2362
|
+
actions: p,
|
|
2351
2363
|
title: e
|
|
2352
2364
|
}
|
|
2353
2365
|
),
|
|
2354
|
-
/* @__PURE__ */
|
|
2355
|
-
s && /* @__PURE__ */
|
|
2366
|
+
/* @__PURE__ */ f("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ f(ne, { className: "page-loading" }) : t }),
|
|
2367
|
+
s && /* @__PURE__ */ f(
|
|
2356
2368
|
G,
|
|
2357
2369
|
{
|
|
2358
2370
|
icon: s.icon ?? Ne,
|
|
2359
2371
|
color: s.color ?? "primary",
|
|
2360
2372
|
variant: s.variant ?? "submit",
|
|
2361
2373
|
onClick: () => {
|
|
2362
|
-
var
|
|
2363
|
-
return (
|
|
2374
|
+
var h;
|
|
2375
|
+
return (h = s.onClick) == null ? void 0 : h.call(s);
|
|
2364
2376
|
},
|
|
2365
2377
|
className: `button page-fab ${s.className ?? ""}`
|
|
2366
2378
|
}
|
|
@@ -2378,10 +2390,10 @@ const Xt = (n) => {
|
|
|
2378
2390
|
hasMore: u = !1,
|
|
2379
2391
|
loadingMore: l = !1,
|
|
2380
2392
|
onLoadMore: d,
|
|
2381
|
-
loadMoreComponent:
|
|
2382
|
-
observerRootMargin:
|
|
2383
|
-
observerThreshold:
|
|
2384
|
-
} = n, y =
|
|
2393
|
+
loadMoreComponent: m = null,
|
|
2394
|
+
observerRootMargin: p = "0px 0px 200px 0px",
|
|
2395
|
+
observerThreshold: h = 0
|
|
2396
|
+
} = n, y = M(!1), g = M(null), b = w(async () => {
|
|
2385
2397
|
if (!(!u || !d) && !(l || y.current)) {
|
|
2386
2398
|
y.current = !0;
|
|
2387
2399
|
try {
|
|
@@ -2393,26 +2405,26 @@ const Xt = (n) => {
|
|
|
2393
2405
|
}, [u, l, d]);
|
|
2394
2406
|
return O(() => {
|
|
2395
2407
|
if (!u || !d || !g.current || typeof IntersectionObserver > "u") return;
|
|
2396
|
-
const
|
|
2408
|
+
const S = new IntersectionObserver(
|
|
2397
2409
|
(E) => {
|
|
2398
|
-
E.some((
|
|
2410
|
+
E.some((x) => x.isIntersecting) && b();
|
|
2399
2411
|
},
|
|
2400
2412
|
{
|
|
2401
|
-
rootMargin:
|
|
2402
|
-
threshold:
|
|
2413
|
+
rootMargin: p,
|
|
2414
|
+
threshold: h
|
|
2403
2415
|
}
|
|
2404
2416
|
);
|
|
2405
|
-
return
|
|
2417
|
+
return S.observe(g.current), () => S.disconnect();
|
|
2406
2418
|
}, [
|
|
2407
2419
|
u,
|
|
2408
2420
|
d,
|
|
2409
|
-
|
|
2410
|
-
|
|
2421
|
+
p,
|
|
2422
|
+
h,
|
|
2411
2423
|
b
|
|
2412
|
-
]), r ? /* @__PURE__ */
|
|
2413
|
-
a == null ? void 0 : a.map((
|
|
2414
|
-
u && d && /* @__PURE__ */
|
|
2415
|
-
] }) : /* @__PURE__ */
|
|
2424
|
+
]), r ? /* @__PURE__ */ f(ne, {}) : /* @__PURE__ */ f(ae, { children: a != null && a.length ? /* @__PURE__ */ k("ul", { className: `pretty-grid-main ${t}`, children: [
|
|
2425
|
+
a == null ? void 0 : a.map((S) => /* @__PURE__ */ f("li", { className: `pretty-grid-item ${s}`, children: c(S) }, S.id)),
|
|
2426
|
+
u && d && /* @__PURE__ */ f("li", { className: "pretty-grid-load-more", ref: g, children: m })
|
|
2427
|
+
] }) : /* @__PURE__ */ f(ae, { children: i || /* @__PURE__ */ f(os, { message: o }) }) });
|
|
2416
2428
|
}, Ge = re({
|
|
2417
2429
|
title: "",
|
|
2418
2430
|
setTitle: () => {
|
|
@@ -2421,11 +2433,11 @@ const Xt = (n) => {
|
|
|
2421
2433
|
setRightContent: () => {
|
|
2422
2434
|
}
|
|
2423
2435
|
}), en = (n) => {
|
|
2424
|
-
const { children: e } = n, [t, s] =
|
|
2436
|
+
const { children: e } = n, [t, s] = L(""), [r, i] = L(null), o = w((u) => {
|
|
2425
2437
|
s(u);
|
|
2426
2438
|
}, []), c = w((u) => {
|
|
2427
2439
|
i(u);
|
|
2428
|
-
}, []), a =
|
|
2440
|
+
}, []), a = V(
|
|
2429
2441
|
() => ({
|
|
2430
2442
|
title: t,
|
|
2431
2443
|
setTitle: o,
|
|
@@ -2434,40 +2446,40 @@ const Xt = (n) => {
|
|
|
2434
2446
|
}),
|
|
2435
2447
|
[t, o, r, c]
|
|
2436
2448
|
);
|
|
2437
|
-
return /* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ f(Ge.Provider, { value: a, children: e });
|
|
2438
2450
|
}, Zt = () => ie(Ge);
|
|
2439
2451
|
function tn(n) {
|
|
2440
|
-
const { t: e } = T(), { openDrawer: t, showSearch: s = !0, menuButtonProps: r } = n, { searchComponent: i, location: o } = ce(), { title: c, rightContent: a } = Zt(), [u, l] =
|
|
2441
|
-
(qt() ?
|
|
2452
|
+
const { t: e } = T(), { openDrawer: t, showSearch: s = !0, menuButtonProps: r } = n, { searchComponent: i, location: o } = ce(), { title: c, rightContent: a } = Zt(), [u, l] = L(!1), d = w((h) => {
|
|
2453
|
+
(qt() ? h.metaKey : h.ctrlKey) && h.shiftKey && h.key.toLowerCase() === "f" && (l(!0), h.preventDefault());
|
|
2442
2454
|
}, []);
|
|
2443
2455
|
O(() => (window.addEventListener("keydown", d), () => {
|
|
2444
2456
|
window.removeEventListener("keydown", d);
|
|
2445
2457
|
}), [d]);
|
|
2446
|
-
const
|
|
2447
|
-
return /* @__PURE__ */
|
|
2448
|
-
o.pathname !== "/" && !!
|
|
2449
|
-
/* @__PURE__ */
|
|
2450
|
-
/* @__PURE__ */
|
|
2451
|
-
/* @__PURE__ */
|
|
2458
|
+
const m = i, p = s && !!m;
|
|
2459
|
+
return /* @__PURE__ */ k(ae, { children: [
|
|
2460
|
+
o.pathname !== "/" && !!m && /* @__PURE__ */ f(m, { open: u, onClose: () => l(!1) }),
|
|
2461
|
+
/* @__PURE__ */ k("header", { id: "header", className: "header", children: [
|
|
2462
|
+
/* @__PURE__ */ k("div", { className: "navbar-left", children: [
|
|
2463
|
+
/* @__PURE__ */ f(
|
|
2452
2464
|
G,
|
|
2453
2465
|
{
|
|
2454
2466
|
...r,
|
|
2455
2467
|
type: (r == null ? void 0 : r.type) ?? "button",
|
|
2456
2468
|
icon: (r == null ? void 0 : r.icon) ?? Tt,
|
|
2457
|
-
onClick: (
|
|
2469
|
+
onClick: (h) => {
|
|
2458
2470
|
var y;
|
|
2459
|
-
(y = r == null ? void 0 : r.onClick) == null || y.call(r,
|
|
2471
|
+
(y = r == null ? void 0 : r.onClick) == null || y.call(r, h), t();
|
|
2460
2472
|
},
|
|
2461
2473
|
name: (r == null ? void 0 : r.name) ?? e("_accessibility:buttons.openMenu"),
|
|
2462
2474
|
"aria-label": (r == null ? void 0 : r["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
|
|
2463
2475
|
className: `navbar-menu animated ${(r == null ? void 0 : r.className) ?? ""}`
|
|
2464
2476
|
}
|
|
2465
2477
|
),
|
|
2466
|
-
/* @__PURE__ */
|
|
2478
|
+
/* @__PURE__ */ f("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
|
|
2467
2479
|
] }),
|
|
2468
|
-
/* @__PURE__ */
|
|
2480
|
+
/* @__PURE__ */ k("div", { className: "navbar-right", children: [
|
|
2469
2481
|
a,
|
|
2470
|
-
|
|
2482
|
+
p && /* @__PURE__ */ f(
|
|
2471
2483
|
G,
|
|
2472
2484
|
{
|
|
2473
2485
|
icon: Nt,
|
|
@@ -2479,42 +2491,42 @@ function tn(n) {
|
|
|
2479
2491
|
] })
|
|
2480
2492
|
] });
|
|
2481
2493
|
}
|
|
2482
|
-
const de = 300, es = (n) => n ??
|
|
2494
|
+
const de = 300, es = (n) => n ?? I.error, ts = (n) => {
|
|
2483
2495
|
switch (n) {
|
|
2484
|
-
case
|
|
2496
|
+
case I.error:
|
|
2485
2497
|
return $t;
|
|
2486
2498
|
default:
|
|
2487
2499
|
return Et;
|
|
2488
2500
|
}
|
|
2489
2501
|
}, Se = (n) => {
|
|
2490
2502
|
switch (n) {
|
|
2491
|
-
case
|
|
2503
|
+
case I.success:
|
|
2492
2504
|
return "!text-success";
|
|
2493
|
-
case
|
|
2505
|
+
case I.error:
|
|
2494
2506
|
return "!text-error";
|
|
2495
|
-
case
|
|
2507
|
+
case I.warning:
|
|
2496
2508
|
return "!text-warning";
|
|
2497
2509
|
default:
|
|
2498
2510
|
return "!text-info";
|
|
2499
2511
|
}
|
|
2500
2512
|
}, ss = (n) => {
|
|
2501
2513
|
switch (n) {
|
|
2502
|
-
case
|
|
2514
|
+
case I.success:
|
|
2503
2515
|
return "bg-bg-success";
|
|
2504
|
-
case
|
|
2516
|
+
case I.error:
|
|
2505
2517
|
return "bg-bg-error";
|
|
2506
|
-
case
|
|
2518
|
+
case I.warning:
|
|
2507
2519
|
return "bg-bg-warning";
|
|
2508
2520
|
default:
|
|
2509
2521
|
return "bg-bg-info";
|
|
2510
2522
|
}
|
|
2511
2523
|
};
|
|
2512
2524
|
function sn() {
|
|
2513
|
-
const { t: n } = T(), { notification: e, removeNotification: t } = ee(), [s, r] =
|
|
2525
|
+
const { t: n } = T(), { notification: e, removeNotification: t } = ee(), [s, r] = L([]), i = M(s);
|
|
2514
2526
|
ft(() => {
|
|
2515
2527
|
i.current = s;
|
|
2516
2528
|
});
|
|
2517
|
-
const o =
|
|
2529
|
+
const o = M(null), c = w(
|
|
2518
2530
|
(a) => {
|
|
2519
2531
|
r(
|
|
2520
2532
|
(u) => a !== void 0 ? u.map((l) => l.id === a ? { ...l, closing: !0 } : l) : u.map((l) => ({ ...l, closing: !0 }))
|
|
@@ -2533,30 +2545,30 @@ function sn() {
|
|
|
2533
2545
|
};
|
|
2534
2546
|
if (e.length === 0)
|
|
2535
2547
|
return i.current.length === 0 ? void 0 : (o.current && clearTimeout(o.current), a = setTimeout(() => {
|
|
2536
|
-
r((
|
|
2548
|
+
r((p) => p.map((h) => ({ ...h, closing: !0 }))), a = null;
|
|
2537
2549
|
}, 0), o.current = setTimeout(() => {
|
|
2538
2550
|
r([]), o.current = null;
|
|
2539
2551
|
}, de), u);
|
|
2540
|
-
const l = new Set(i.current.map((
|
|
2552
|
+
const l = new Set(i.current.map((p) => p.id));
|
|
2541
2553
|
if (!e.some(
|
|
2542
|
-
(
|
|
2554
|
+
(p) => p.id !== void 0 && !l.has(p.id)
|
|
2543
2555
|
)) return;
|
|
2544
2556
|
if (i.current.length === 0) {
|
|
2545
|
-
const
|
|
2557
|
+
const p = [...e];
|
|
2546
2558
|
return a = setTimeout(() => {
|
|
2547
|
-
r(
|
|
2559
|
+
r(p.map((h) => ({ ...h, closing: !1 }))), a = null;
|
|
2548
2560
|
}, 0), () => {
|
|
2549
2561
|
a && clearTimeout(a);
|
|
2550
2562
|
};
|
|
2551
2563
|
}
|
|
2552
2564
|
o.current && clearTimeout(o.current), a = setTimeout(() => {
|
|
2553
2565
|
r(
|
|
2554
|
-
(
|
|
2566
|
+
(p) => p.every((h) => h.closing) ? p : p.map((h) => ({ ...h, closing: !0 }))
|
|
2555
2567
|
), a = null;
|
|
2556
2568
|
}, 0);
|
|
2557
|
-
const
|
|
2569
|
+
const m = [...e];
|
|
2558
2570
|
return o.current = setTimeout(() => {
|
|
2559
|
-
r(
|
|
2571
|
+
r(m.map((p) => ({ ...p, closing: !1 }))), o.current = null;
|
|
2560
2572
|
}, de), u;
|
|
2561
2573
|
}, [e]), O(() => {
|
|
2562
2574
|
if (!s.length) return;
|
|
@@ -2570,35 +2582,35 @@ function sn() {
|
|
|
2570
2582
|
window.clearTimeout(u), a && window.removeEventListener("click", a), window.removeEventListener("keydown", l);
|
|
2571
2583
|
};
|
|
2572
2584
|
}, [s.length, c]), Fe(
|
|
2573
|
-
/* @__PURE__ */
|
|
2574
|
-
const
|
|
2575
|
-
return /* @__PURE__ */
|
|
2585
|
+
/* @__PURE__ */ f("div", { className: `notification-portal ${s.length ? "active" : ""}`, children: s.map(({ id: a, type: u, message: l, closing: d }) => {
|
|
2586
|
+
const m = es(u);
|
|
2587
|
+
return /* @__PURE__ */ k(
|
|
2576
2588
|
"div",
|
|
2577
2589
|
{
|
|
2578
|
-
className: `notification ${d ? "closing" : ""} ${ss(
|
|
2579
|
-
onClick: (
|
|
2590
|
+
className: `notification ${d ? "closing" : ""} ${ss(m)}`,
|
|
2591
|
+
onClick: (p) => p.stopPropagation(),
|
|
2580
2592
|
children: [
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
|
|
2593
|
+
/* @__PURE__ */ k("div", { className: "notification-body", children: [
|
|
2594
|
+
/* @__PURE__ */ f(
|
|
2595
|
+
K,
|
|
2584
2596
|
{
|
|
2585
|
-
icon: ts(
|
|
2586
|
-
className: `notification-icon ${Se(
|
|
2597
|
+
icon: ts(m),
|
|
2598
|
+
className: `notification-icon ${Se(m)}`
|
|
2587
2599
|
}
|
|
2588
2600
|
),
|
|
2589
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ f("p", { className: `notification-text ${Se(m)}`, children: l })
|
|
2590
2602
|
] }),
|
|
2591
|
-
/* @__PURE__ */
|
|
2603
|
+
/* @__PURE__ */ f(
|
|
2592
2604
|
G,
|
|
2593
2605
|
{
|
|
2594
2606
|
type: "button",
|
|
2595
2607
|
icon: _e,
|
|
2596
2608
|
color: "error",
|
|
2597
2609
|
className: "notification-close group",
|
|
2598
|
-
onClick: (
|
|
2599
|
-
|
|
2610
|
+
onClick: (p) => {
|
|
2611
|
+
p.stopPropagation(), a !== void 0 && c(a);
|
|
2600
2612
|
},
|
|
2601
|
-
iconClassName: `${Se(
|
|
2613
|
+
iconClassName: `${Se(m)} notification-close-icon`,
|
|
2602
2614
|
name: n("_accessibility:buttons.closeNotification"),
|
|
2603
2615
|
"aria-label": n("_accessibility:ariaLabels.closeNotification")
|
|
2604
2616
|
}
|
|
@@ -2613,7 +2625,7 @@ function sn() {
|
|
|
2613
2625
|
}
|
|
2614
2626
|
function nn(n) {
|
|
2615
2627
|
const { className: e, ...t } = n;
|
|
2616
|
-
return /* @__PURE__ */
|
|
2628
|
+
return /* @__PURE__ */ f("div", { className: "splash-screen", children: /* @__PURE__ */ f(
|
|
2617
2629
|
ne,
|
|
2618
2630
|
{
|
|
2619
2631
|
className: `blur-appear ${e ? ` ${e}` : ""}`,
|
|
@@ -2634,25 +2646,25 @@ const ns = (n) => {
|
|
|
2634
2646
|
if (!o) {
|
|
2635
2647
|
const {
|
|
2636
2648
|
className: d = "",
|
|
2637
|
-
variant:
|
|
2638
|
-
color:
|
|
2639
|
-
...
|
|
2649
|
+
variant: m = t ? "submit" : "outlined",
|
|
2650
|
+
color: p = t ? "primary" : "default",
|
|
2651
|
+
...h
|
|
2640
2652
|
} = c ?? {};
|
|
2641
|
-
return /* @__PURE__ */
|
|
2642
|
-
|
|
2653
|
+
return /* @__PURE__ */ f(
|
|
2654
|
+
q,
|
|
2643
2655
|
{
|
|
2644
2656
|
type: "button",
|
|
2645
|
-
variant:
|
|
2646
|
-
color:
|
|
2657
|
+
variant: m,
|
|
2658
|
+
color: p,
|
|
2647
2659
|
className: `tab ${d}`,
|
|
2648
2660
|
onClick: s,
|
|
2649
|
-
...
|
|
2661
|
+
...h,
|
|
2650
2662
|
children: r
|
|
2651
2663
|
}
|
|
2652
2664
|
);
|
|
2653
2665
|
}
|
|
2654
2666
|
const l = `button submit tab ${t ? "primary" : "outlined"} ${(c == null ? void 0 : c.className) ?? ""}`.trim();
|
|
2655
|
-
return /* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ f(
|
|
2656
2668
|
u,
|
|
2657
2669
|
{
|
|
2658
2670
|
to: i ?? `#${e}`,
|
|
@@ -2662,7 +2674,7 @@ const ns = (n) => {
|
|
|
2662
2674
|
}
|
|
2663
2675
|
);
|
|
2664
2676
|
}, rs = (n) => {
|
|
2665
|
-
var
|
|
2677
|
+
var p;
|
|
2666
2678
|
const {
|
|
2667
2679
|
tabs: e = [],
|
|
2668
2680
|
defaultTab: t,
|
|
@@ -2672,30 +2684,30 @@ const ns = (n) => {
|
|
|
2672
2684
|
tabsContainerClassName: o = "",
|
|
2673
2685
|
useLinks: c = !0,
|
|
2674
2686
|
tabButtonProps: a
|
|
2675
|
-
} = n, [u, l] =
|
|
2676
|
-
return /* @__PURE__ */
|
|
2677
|
-
/* @__PURE__ */
|
|
2687
|
+
} = n, [u, l] = L(t ?? ((p = e[0]) == null ? void 0 : p.id)), d = s ?? u, m = V(() => e.find((h) => h.id === d), [e, d]);
|
|
2688
|
+
return /* @__PURE__ */ k("div", { className: `tabs-layout-main ${i}`, children: [
|
|
2689
|
+
/* @__PURE__ */ f(
|
|
2678
2690
|
"ul",
|
|
2679
2691
|
{
|
|
2680
2692
|
className: `horizontal tabs tabs-container ${o}`,
|
|
2681
|
-
children: e.map(({ id:
|
|
2693
|
+
children: e.map(({ id: h, to: y, label: g }) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f(
|
|
2682
2694
|
ns,
|
|
2683
2695
|
{
|
|
2684
2696
|
onClick: () => {
|
|
2685
|
-
s === void 0 && l(
|
|
2697
|
+
s === void 0 && l(h), r == null || r(h);
|
|
2686
2698
|
},
|
|
2687
|
-
id:
|
|
2699
|
+
id: h,
|
|
2688
2700
|
to: y,
|
|
2689
2701
|
siblings: e.length > 1,
|
|
2690
|
-
active: d ===
|
|
2702
|
+
active: d === h,
|
|
2691
2703
|
useLinks: c,
|
|
2692
2704
|
tabButtonProps: a,
|
|
2693
2705
|
children: g
|
|
2694
2706
|
}
|
|
2695
|
-
) },
|
|
2707
|
+
) }, h))
|
|
2696
2708
|
}
|
|
2697
2709
|
),
|
|
2698
|
-
|
|
2710
|
+
m == null ? void 0 : m.content
|
|
2699
2711
|
] });
|
|
2700
2712
|
}, is = (n) => {
|
|
2701
2713
|
const {
|
|
@@ -2710,14 +2722,14 @@ const ns = (n) => {
|
|
|
2710
2722
|
alt: u = "",
|
|
2711
2723
|
final: l = !1
|
|
2712
2724
|
} = n, { t: d } = T();
|
|
2713
|
-
return /* @__PURE__ */
|
|
2714
|
-
a && /* @__PURE__ */
|
|
2715
|
-
e != null && /* @__PURE__ */
|
|
2716
|
-
t != null && /* @__PURE__ */
|
|
2717
|
-
s != null && /* @__PURE__ */
|
|
2718
|
-
/* @__PURE__ */
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
|
|
2725
|
+
return /* @__PURE__ */ k("div", { className: "big-appear step-container", children: [
|
|
2726
|
+
a && /* @__PURE__ */ f("img", { src: a, alt: u }),
|
|
2727
|
+
e != null && /* @__PURE__ */ f("h2", { className: "step-title", children: e }),
|
|
2728
|
+
t != null && /* @__PURE__ */ f("div", { className: "step-body", children: t }),
|
|
2729
|
+
s != null && /* @__PURE__ */ f("div", { className: "step-content", children: s }),
|
|
2730
|
+
/* @__PURE__ */ f("div", { className: "step-actions", children: l ? /* @__PURE__ */ k(ae, { children: [
|
|
2731
|
+
/* @__PURE__ */ f(
|
|
2732
|
+
q,
|
|
2721
2733
|
{
|
|
2722
2734
|
color: "primary",
|
|
2723
2735
|
className: "step-button",
|
|
@@ -2727,8 +2739,8 @@ const ns = (n) => {
|
|
|
2727
2739
|
children: d("_accessibility:buttons.startAsGuest")
|
|
2728
2740
|
}
|
|
2729
2741
|
),
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
-
|
|
2742
|
+
/* @__PURE__ */ f(
|
|
2743
|
+
q,
|
|
2732
2744
|
{
|
|
2733
2745
|
color: "primary",
|
|
2734
2746
|
variant: "submit",
|
|
@@ -2738,9 +2750,9 @@ const ns = (n) => {
|
|
|
2738
2750
|
children: d("_accessibility:buttons.signIn")
|
|
2739
2751
|
}
|
|
2740
2752
|
)
|
|
2741
|
-
] }) : /* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
|
|
2753
|
+
] }) : /* @__PURE__ */ k(ae, { children: [
|
|
2754
|
+
/* @__PURE__ */ f(
|
|
2755
|
+
q,
|
|
2744
2756
|
{
|
|
2745
2757
|
color: "primary",
|
|
2746
2758
|
className: "step-button",
|
|
@@ -2750,8 +2762,8 @@ const ns = (n) => {
|
|
|
2750
2762
|
children: d("_accessibility:buttons.skip")
|
|
2751
2763
|
}
|
|
2752
2764
|
),
|
|
2753
|
-
/* @__PURE__ */
|
|
2754
|
-
|
|
2765
|
+
/* @__PURE__ */ f(
|
|
2766
|
+
q,
|
|
2755
2767
|
{
|
|
2756
2768
|
color: "primary",
|
|
2757
2769
|
className: "step-button",
|
|
@@ -2771,45 +2783,45 @@ const ns = (n) => {
|
|
|
2771
2783
|
onSkip: r,
|
|
2772
2784
|
onSignIn: i,
|
|
2773
2785
|
onStartAsGuest: o
|
|
2774
|
-
} = n, { setGuestMode: c } =
|
|
2786
|
+
} = n, { setGuestMode: c } = He(), { navigate: a } = ce(), [u, l] = L(1), d = w(() => {
|
|
2775
2787
|
if (r) {
|
|
2776
2788
|
r();
|
|
2777
2789
|
return;
|
|
2778
2790
|
}
|
|
2779
2791
|
a(t);
|
|
2780
|
-
}, [a, r, t]),
|
|
2792
|
+
}, [a, r, t]), m = w(() => {
|
|
2781
2793
|
if (i) {
|
|
2782
2794
|
i();
|
|
2783
2795
|
return;
|
|
2784
2796
|
}
|
|
2785
2797
|
a(t);
|
|
2786
|
-
}, [a, i, t]),
|
|
2798
|
+
}, [a, i, t]), p = w(() => {
|
|
2787
2799
|
if (o) {
|
|
2788
2800
|
o();
|
|
2789
2801
|
return;
|
|
2790
2802
|
}
|
|
2791
2803
|
c(!0), a(s);
|
|
2792
|
-
}, [s, a, o, c]),
|
|
2804
|
+
}, [s, a, o, c]), h = V(() => e.map((y, g) => ({
|
|
2793
2805
|
id: g + 1,
|
|
2794
2806
|
label: "",
|
|
2795
|
-
content: /* @__PURE__ */
|
|
2807
|
+
content: /* @__PURE__ */ f(
|
|
2796
2808
|
is,
|
|
2797
2809
|
{
|
|
2798
2810
|
...y,
|
|
2799
2811
|
final: g === e.length - 1,
|
|
2800
2812
|
onClickNext: () => l((b) => b + 1),
|
|
2801
2813
|
onSkip: d,
|
|
2802
|
-
onStartAsGuest:
|
|
2803
|
-
onSignIn:
|
|
2814
|
+
onStartAsGuest: p,
|
|
2815
|
+
onSignIn: m
|
|
2804
2816
|
}
|
|
2805
2817
|
)
|
|
2806
|
-
})), [
|
|
2807
|
-
return /* @__PURE__ */
|
|
2818
|
+
})), [m, d, p, e]);
|
|
2819
|
+
return /* @__PURE__ */ f("div", { className: "onboarding-main", children: /* @__PURE__ */ f(
|
|
2808
2820
|
rs,
|
|
2809
2821
|
{
|
|
2810
2822
|
currentTab: u,
|
|
2811
2823
|
onTabChange: (y) => l(Number(y)),
|
|
2812
|
-
tabs:
|
|
2824
|
+
tabs: h,
|
|
2813
2825
|
useLinks: !1
|
|
2814
2826
|
}
|
|
2815
2827
|
) });
|
|
@@ -2820,10 +2832,10 @@ const ns = (n) => {
|
|
|
2820
2832
|
action: s,
|
|
2821
2833
|
iconProps: r
|
|
2822
2834
|
} = n;
|
|
2823
|
-
return /* @__PURE__ */
|
|
2824
|
-
r && /* @__PURE__ */
|
|
2825
|
-
/* @__PURE__ */
|
|
2826
|
-
s && /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ k("div", { className: "empty-container", children: [
|
|
2836
|
+
r && /* @__PURE__ */ f(K, { ...r }),
|
|
2837
|
+
/* @__PURE__ */ f("p", { ...t, children: e }),
|
|
2838
|
+
s && /* @__PURE__ */ f(ht, { showTooltips: !1, showText: !0, ...s })
|
|
2827
2839
|
] });
|
|
2828
2840
|
};
|
|
2829
2841
|
export {
|
|
@@ -2858,7 +2870,7 @@ export {
|
|
|
2858
2870
|
Ge as NavbarContext,
|
|
2859
2871
|
en as NavbarProvider,
|
|
2860
2872
|
sn as Notification,
|
|
2861
|
-
|
|
2873
|
+
I as NotificationEnumType,
|
|
2862
2874
|
Rs as NotificationProvider,
|
|
2863
2875
|
rn as Onboarding,
|
|
2864
2876
|
Xs as Page,
|
|
@@ -2884,21 +2896,21 @@ export {
|
|
|
2884
2896
|
_s as mapValidationErrors,
|
|
2885
2897
|
Pe as parseQueries,
|
|
2886
2898
|
Is as queryClient,
|
|
2887
|
-
|
|
2899
|
+
P as removeFromLocal,
|
|
2888
2900
|
W as toLocal,
|
|
2889
|
-
|
|
2901
|
+
He as useAuth,
|
|
2890
2902
|
ce as useConfig,
|
|
2891
2903
|
Be as useConfirmationForm,
|
|
2892
2904
|
Bt as useDeleteAction,
|
|
2893
2905
|
js as useDeleteDialog,
|
|
2894
2906
|
We as useDialog,
|
|
2895
|
-
|
|
2907
|
+
Ht as useDrawerMenu,
|
|
2896
2908
|
Us as useEditAction,
|
|
2897
|
-
|
|
2909
|
+
Qs as useEntityFormDialog,
|
|
2898
2910
|
Gt as useExportAction,
|
|
2899
2911
|
zs as useExportActionMutate,
|
|
2900
2912
|
pe as useFormDialog,
|
|
2901
|
-
|
|
2913
|
+
Hs as useFormDialogLegacy,
|
|
2902
2914
|
zt as useImportAction,
|
|
2903
2915
|
Gs as useImportDialog,
|
|
2904
2916
|
Ut as useManager,
|