@luminix/mui-cms 0.1.18 → 0.1.20
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/bundle/mui-cms.bundle.iife.js +33 -33
- package/dist/mui-cms.js +274 -274
- package/package.json +3 -3
package/dist/mui-cms.js
CHANGED
|
@@ -5,15 +5,15 @@ import { config as oe, collect as V, app as T, model as ye, App as St, Model as
|
|
|
5
5
|
import { jsx as i, jsxs as w, Fragment as B } from "react/jsx-runtime";
|
|
6
6
|
import { Outlet as wr, useParams as Sr, useNavigate as At, useSearchParams as K, Link as Re, Form as Ar } from "react-router-dom";
|
|
7
7
|
import { useCollection as mn, PaginationProvider as xr, usePagination as Se, ModelForm as Cr, useApplyReducers as xt, Forms as Er, LuminixProvider as kr } from "@luminix/react";
|
|
8
|
-
import { useMediaQuery as Me, Dialog as Ct, DialogTitle as Et, DialogContent as kt, DialogContentText as Tr, DialogActions as Tt, Button as M, Snackbar as Dr, Alert as Or, IconButton as q, AlertTitle as Rr, Box as H, Unstable_Grid2 as Q, Fab as Pr, SpeedDial as vr, SpeedDialIcon as Fr, SpeedDialAction as Lr, ButtonGroup as Br, Popper as Ir, Grow as Mr, Paper as Dt, ClickAwayListener as Nr, MenuList as jr, MenuItem as se, AppBar as gn, Toolbar as Ur, Typography as $, Drawer as bn, Divider as Pe, Autocomplete as qr, TextField as Ae, CircularProgress as _r, Switch as Hr, Stack as N, FormControl as at, InputLabel as it, Select as ve, Badge as Ot, Popover as zr, Link as lt, Collapse as yn, TableCell as ee, RadioGroup as $t, FormControlLabel as Ke, Radio as
|
|
9
|
-
import
|
|
8
|
+
import { useMediaQuery as Me, Dialog as Ct, DialogTitle as Et, DialogContent as kt, DialogContentText as Tr, DialogActions as Tt, Button as M, Snackbar as Dr, Alert as Or, IconButton as q, AlertTitle as Rr, Box as H, Unstable_Grid2 as Q, Fab as Pr, SpeedDial as vr, SpeedDialIcon as Fr, SpeedDialAction as Lr, ButtonGroup as Br, Popper as Ir, Grow as Mr, Paper as Dt, ClickAwayListener as Nr, MenuList as jr, MenuItem as se, AppBar as gn, Toolbar as Ur, Typography as $, Drawer as bn, Divider as Pe, Autocomplete as qr, TextField as Ae, CircularProgress as _r, Switch as Hr, Stack as N, FormControl as at, InputLabel as it, Select as ve, Badge as Ot, Popover as zr, Link as lt, Collapse as yn, TableCell as ee, RadioGroup as $t, FormControlLabel as Ke, Radio as Ye, TableContainer as Wr, Table as Vr, TableHead as $r, TableRow as fe, Checkbox as Rt, TableSortLabel as Kr, Skeleton as Kt, TableBody as Yr, TableFooter as Jr, Tabs as Gr, Tab as Yt, Breadcrumbs as Zr, List as Xr, ListItem as Qr, ListItemButton as eo, ListItemIcon as wn, ListItemText as Sn, Menu as An, Avatar as to, CssBaseline as no } from "@mui/material";
|
|
9
|
+
import p, { useContext as xn, useMemo as ro } from "react";
|
|
10
10
|
import { useTranslation as L, initReactI18next as oo } from "react-i18next";
|
|
11
11
|
import { Close as Ne, ArrowDropDown as Cn, ChevronLeft as je, ChevronRight as Ue, HighlightOffOutlined as ct, AddCircleOutline as En, FilterList as kn, Menu as Tn, LastPage as Dn, FirstPage as On, Search as ut, SwapVert as Rn, ArrowUpward as Pn, ArrowDownward as vn, MoreVert as Pt, ExpandLess as Fn, ExpandMore as Ln, Add as so, CategoryOutlined as ao, DashboardOutlined as io, PeopleOutlined as lo } from "@mui/icons-material";
|
|
12
12
|
import { useTheme as vt, styled as Z, createTheme as co, ThemeProvider as uo } from "@mui/material/styles";
|
|
13
13
|
import { Str as k, Obj as G, DateTime as Fe, Query as Bn, Func as fo, MakeFacade as Ft, Reducible as In, ServiceProvider as Mn } from "@luminix/support";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
14
|
+
import Jt from "react-dom";
|
|
15
|
+
import J from "i18next";
|
|
16
|
+
const ho = {
|
|
17
17
|
open: !1,
|
|
18
18
|
setOpen: () => {
|
|
19
19
|
},
|
|
@@ -28,8 +28,8 @@ const po = {
|
|
|
28
28
|
showBackButton: !1,
|
|
29
29
|
setShowBackButton: () => {
|
|
30
30
|
}
|
|
31
|
-
}, X =
|
|
32
|
-
const [t, n] =
|
|
31
|
+
}, X = p.createContext(ho), Je = document.title, po = ({ children: e }) => {
|
|
32
|
+
const [t, n] = p.useState(!1), [r, o] = p.useState(""), [s, a] = p.useState(!1), [l, d] = p.useState(!1), u = oe("luminix.cms.layout", {}), c = Me((y) => y.breakpoints.up((u == null ? void 0 : u.breakpoint) || "md")), h = {
|
|
33
33
|
open: t,
|
|
34
34
|
setOpen: n,
|
|
35
35
|
layout: u,
|
|
@@ -41,12 +41,12 @@ const po = {
|
|
|
41
41
|
showBackButton: l,
|
|
42
42
|
setShowBackButton: d
|
|
43
43
|
};
|
|
44
|
-
return
|
|
45
|
-
document.title =
|
|
46
|
-
}), [r]), /* @__PURE__ */ i(X.Provider, { value:
|
|
47
|
-
}, Nn =
|
|
44
|
+
return p.useEffect(() => (document.title = r ? `${r} | ${oe("app.name", Je)}` : oe("app.name", Je), () => {
|
|
45
|
+
document.title = Je;
|
|
46
|
+
}), [r]), /* @__PURE__ */ i(X.Provider, { value: h, children: e });
|
|
47
|
+
}, Nn = p.createContext({
|
|
48
48
|
Model: null
|
|
49
|
-
}), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn =
|
|
49
|
+
}), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn = p.createContext({
|
|
50
50
|
isOpen: !1,
|
|
51
51
|
dialog: () => Promise.reject(new Error("Trying to access DialogContext outside of DialogProvider")),
|
|
52
52
|
dismissDialog: () => {
|
|
@@ -54,16 +54,16 @@ const po = {
|
|
|
54
54
|
current: void 0
|
|
55
55
|
});
|
|
56
56
|
function mo(e) {
|
|
57
|
-
const [t, n] =
|
|
58
|
-
return
|
|
57
|
+
const [t, n] = p.useState(e);
|
|
58
|
+
return p.useEffect(() => {
|
|
59
59
|
e && n(e);
|
|
60
60
|
}, [e]), e || t;
|
|
61
61
|
}
|
|
62
62
|
function go({ children: e, ...t }) {
|
|
63
|
-
const [{ current: n, resolve: r }, o] =
|
|
63
|
+
const [{ current: n, resolve: r }, o] = p.useState({}), s = mo(n), a = p.useCallback((c) => new Promise((h) => {
|
|
64
64
|
o({
|
|
65
65
|
current: typeof c == "string" ? { message: c } : c,
|
|
66
|
-
resolve:
|
|
66
|
+
resolve: h
|
|
67
67
|
});
|
|
68
68
|
}), []), { t: l } = L(), d = () => {
|
|
69
69
|
r && r(!1), o({});
|
|
@@ -104,7 +104,7 @@ function v() {
|
|
|
104
104
|
const { isBreakpointUp: e } = xn(X);
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
|
-
const Lt =
|
|
107
|
+
const Lt = p.createContext({
|
|
108
108
|
isOpen: !1,
|
|
109
109
|
notify: () => {
|
|
110
110
|
},
|
|
@@ -127,13 +127,13 @@ const Lt = h.createContext({
|
|
|
127
127
|
sx: o,
|
|
128
128
|
...s
|
|
129
129
|
}) => {
|
|
130
|
-
const a = mn(dt), l = v(), u = vt().spacing(l ? 3 : 1), [c,
|
|
131
|
-
x !== "clickaway" &&
|
|
130
|
+
const a = mn(dt), l = v(), u = vt().spacing(l ? 3 : 1), [c, h] = p.useState(), [y, S] = p.useState(u), { vertical: b = "bottom" } = r || {}, m = (g, x) => {
|
|
131
|
+
x !== "clickaway" && h(void 0);
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return p.useEffect(() => {
|
|
134
134
|
if (!c && a.isNotEmpty()) {
|
|
135
135
|
const g = setTimeout(() => {
|
|
136
|
-
|
|
136
|
+
h(dt.pull(0) ?? void 0);
|
|
137
137
|
}, 100);
|
|
138
138
|
return () => clearTimeout(g);
|
|
139
139
|
}
|
|
@@ -195,7 +195,7 @@ const Lt = h.createContext({
|
|
|
195
195
|
{
|
|
196
196
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
197
197
|
variant: t ? "standard" : "filled",
|
|
198
|
-
children: /* @__PURE__ */ i(go, { children: /* @__PURE__ */ i(
|
|
198
|
+
children: /* @__PURE__ */ i(go, { children: /* @__PURE__ */ i(po, { children: e }) })
|
|
199
199
|
}
|
|
200
200
|
);
|
|
201
201
|
}, So = (e, {
|
|
@@ -224,12 +224,12 @@ const Lt = h.createContext({
|
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
path: "/" + k.kebab(l.plural()) + "/create",
|
|
227
|
-
name: `luminix.cms.${a}.
|
|
227
|
+
name: `luminix.cms.${a}.create`,
|
|
228
228
|
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(o, { create: !0 }) })
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
path: "/" + k.kebab(l.plural()) + "/:id",
|
|
232
|
-
name: `luminix.cms.${a}.
|
|
232
|
+
name: `luminix.cms.${a}.show`,
|
|
233
233
|
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(o, {}) })
|
|
234
234
|
}
|
|
235
235
|
])
|
|
@@ -237,8 +237,8 @@ const Lt = h.createContext({
|
|
|
237
237
|
}
|
|
238
238
|
];
|
|
239
239
|
function Bt(e) {
|
|
240
|
-
const { setCurrentPage: t } =
|
|
241
|
-
|
|
240
|
+
const { setCurrentPage: t } = p.useContext(X);
|
|
241
|
+
p.useEffect(() => (t(e), () => {
|
|
242
242
|
t("");
|
|
243
243
|
}), [e, t]);
|
|
244
244
|
}
|
|
@@ -300,13 +300,13 @@ const Co = Z("div")(({ theme: e }) => ({
|
|
|
300
300
|
] });
|
|
301
301
|
};
|
|
302
302
|
function ko() {
|
|
303
|
-
const { setShowSearch: e } =
|
|
304
|
-
|
|
303
|
+
const { setShowSearch: e } = p.useContext(X);
|
|
304
|
+
p.useEffect(() => (e(!0), () => {
|
|
305
305
|
e(!1);
|
|
306
306
|
}), [e]);
|
|
307
307
|
}
|
|
308
308
|
function te() {
|
|
309
|
-
const { Model: e } =
|
|
309
|
+
const { Model: e } = p.useContext(Nn);
|
|
310
310
|
return e;
|
|
311
311
|
}
|
|
312
312
|
const To = () => {
|
|
@@ -323,7 +323,7 @@ const To = () => {
|
|
|
323
323
|
["ModelIndex.Table"]: d,
|
|
324
324
|
["ModelIndex.Table.TableBody"]: u,
|
|
325
325
|
["ModelIndex.Table.TableHead"]: c,
|
|
326
|
-
["ModelIndex.Table.TableFooter"]:
|
|
326
|
+
["ModelIndex.Table.TableFooter"]: h,
|
|
327
327
|
["ModelIndex.Table.TableToolbar"]: y,
|
|
328
328
|
["ModelIndex.Table.TableBody.TableRow"]: S,
|
|
329
329
|
["ModelIndex.Tabs"]: b
|
|
@@ -360,15 +360,15 @@ const To = () => {
|
|
|
360
360
|
children: [
|
|
361
361
|
/* @__PURE__ */ i(c, { children: /* @__PURE__ */ i(y, {}) }),
|
|
362
362
|
/* @__PURE__ */ i(u, { children: (m) => /* @__PURE__ */ i(S, { item: m }, m.getKey()) }),
|
|
363
|
-
/* @__PURE__ */ i(
|
|
363
|
+
/* @__PURE__ */ i(h, {})
|
|
364
364
|
]
|
|
365
365
|
}
|
|
366
366
|
) })
|
|
367
367
|
] }) });
|
|
368
368
|
};
|
|
369
369
|
function Do() {
|
|
370
|
-
const { setShowBackButton: e } =
|
|
371
|
-
|
|
370
|
+
const { setShowBackButton: e } = p.useContext(X);
|
|
371
|
+
p.useEffect(() => (e(!0), () => {
|
|
372
372
|
e(!1);
|
|
373
373
|
}), [e]);
|
|
374
374
|
}
|
|
@@ -380,11 +380,11 @@ function Un(e, t) {
|
|
|
380
380
|
const { toString: Oo } = Object.prototype, { getPrototypeOf: It } = Object, qe = /* @__PURE__ */ ((e) => (t) => {
|
|
381
381
|
const n = Oo.call(t);
|
|
382
382
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
383
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
383
|
+
})(/* @__PURE__ */ Object.create(null)), Y = (e) => (e = e.toLowerCase(), (t) => qe(t) === e), _e = (e) => (t) => typeof t === e, { isArray: he } = Array, we = _e("undefined");
|
|
384
384
|
function Ro(e) {
|
|
385
385
|
return e !== null && !we(e) && e.constructor !== null && !we(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
386
386
|
}
|
|
387
|
-
const qn =
|
|
387
|
+
const qn = Y("ArrayBuffer");
|
|
388
388
|
function Po(e) {
|
|
389
389
|
let t;
|
|
390
390
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qn(e.buffer), t;
|
|
@@ -394,16 +394,16 @@ const vo = _e("string"), _ = _e("function"), _n = _e("number"), He = (e) => e !=
|
|
|
394
394
|
return !1;
|
|
395
395
|
const t = It(e);
|
|
396
396
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
397
|
-
}, Lo =
|
|
397
|
+
}, Lo = Y("Date"), Bo = Y("File"), Io = Y("Blob"), Mo = Y("FileList"), No = (e) => He(e) && _(e.pipe), jo = (e) => {
|
|
398
398
|
let t;
|
|
399
399
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = qe(e)) === "formdata" || // detect form-data instance
|
|
400
400
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
401
|
-
}, Uo =
|
|
401
|
+
}, Uo = Y("URLSearchParams"), [qo, _o, Ho, zo] = ["ReadableStream", "Request", "Response", "Headers"].map(Y), Wo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
402
402
|
function xe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
403
403
|
if (e === null || typeof e > "u")
|
|
404
404
|
return;
|
|
405
405
|
let r, o;
|
|
406
|
-
if (typeof e != "object" && (e = [e]),
|
|
406
|
+
if (typeof e != "object" && (e = [e]), he(e))
|
|
407
407
|
for (r = 0, o = e.length; r < o; r++)
|
|
408
408
|
t.call(null, e[r], r, e);
|
|
409
409
|
else {
|
|
@@ -426,7 +426,7 @@ const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
426
426
|
function ft() {
|
|
427
427
|
const { caseless: e } = zn(this) && this || {}, t = {}, n = (r, o) => {
|
|
428
428
|
const s = e && Hn(t, o) || o;
|
|
429
|
-
Te(t[s]) && Te(r) ? t[s] = ft(t[s], r) : Te(r) ? t[s] = ft({}, r) :
|
|
429
|
+
Te(t[s]) && Te(r) ? t[s] = ft(t[s], r) : Te(r) ? t[s] = ft({}, r) : he(r) ? t[s] = r.slice() : t[s] = r;
|
|
430
430
|
};
|
|
431
431
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
432
432
|
arguments[r] && xe(arguments[r], n);
|
|
@@ -438,7 +438,7 @@ const Vo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
|
438
438
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
439
439
|
value: t.prototype
|
|
440
440
|
}), n && Object.assign(e.prototype, n);
|
|
441
|
-
},
|
|
441
|
+
}, Yo = (e, t, n, r) => {
|
|
442
442
|
let o, s, a;
|
|
443
443
|
const l = {};
|
|
444
444
|
if (t = t || {}, e == null) return t;
|
|
@@ -448,13 +448,13 @@ const Vo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
|
448
448
|
e = n !== !1 && It(e);
|
|
449
449
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
450
450
|
return t;
|
|
451
|
-
},
|
|
451
|
+
}, Jo = (e, t, n) => {
|
|
452
452
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
453
453
|
const r = e.indexOf(t, n);
|
|
454
454
|
return r !== -1 && r === n;
|
|
455
455
|
}, Go = (e) => {
|
|
456
456
|
if (!e) return null;
|
|
457
|
-
if (
|
|
457
|
+
if (he(e)) return e;
|
|
458
458
|
let t = e.length;
|
|
459
459
|
if (!_n(t)) return null;
|
|
460
460
|
const n = new Array(t);
|
|
@@ -474,12 +474,12 @@ const Vo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
|
474
474
|
for (; (n = e.exec(t)) !== null; )
|
|
475
475
|
r.push(n);
|
|
476
476
|
return r;
|
|
477
|
-
}, es =
|
|
477
|
+
}, es = Y("HTMLFormElement"), ts = (e) => e.toLowerCase().replace(
|
|
478
478
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
479
479
|
function(n, r, o) {
|
|
480
480
|
return r.toUpperCase() + o;
|
|
481
481
|
}
|
|
482
|
-
), Gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ns =
|
|
482
|
+
), Gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ns = Y("RegExp"), Wn = (e, t) => {
|
|
483
483
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
484
484
|
xe(n, (o, s) => {
|
|
485
485
|
let a;
|
|
@@ -506,7 +506,7 @@ const Vo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
|
506
506
|
n[s] = !0;
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
|
-
return
|
|
509
|
+
return he(e) ? r(e) : r(String(e).split(t)), n;
|
|
510
510
|
}, ss = () => {
|
|
511
511
|
}, as = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Ze = "abcdefghijklmnopqrstuvwxyz", Zt = "0123456789", Vn = {
|
|
512
512
|
DIGIT: Zt,
|
|
@@ -529,7 +529,7 @@ const cs = (e) => {
|
|
|
529
529
|
return;
|
|
530
530
|
if (!("toJSON" in r)) {
|
|
531
531
|
t[o] = r;
|
|
532
|
-
const s =
|
|
532
|
+
const s = he(r) ? [] : {};
|
|
533
533
|
return xe(r, (a, l) => {
|
|
534
534
|
const d = n(a, o + 1);
|
|
535
535
|
!we(d) && (s[l] = d);
|
|
@@ -539,7 +539,7 @@ const cs = (e) => {
|
|
|
539
539
|
return r;
|
|
540
540
|
};
|
|
541
541
|
return n(e, 0);
|
|
542
|
-
}, us =
|
|
542
|
+
}, us = Y("AsyncFunction"), ds = (e) => e && (He(e) || _(e)) && _(e.then) && _(e.catch), $n = ((e, t) => e ? setImmediate : t ? ((n, r) => (ie.addEventListener("message", ({ source: o, data: s }) => {
|
|
543
543
|
o === ie && s === n && r.length && r.shift()();
|
|
544
544
|
}, !1), (o) => {
|
|
545
545
|
r.push(o), ie.postMessage(n, "*");
|
|
@@ -547,7 +547,7 @@ const cs = (e) => {
|
|
|
547
547
|
typeof setImmediate == "function",
|
|
548
548
|
_(ie.postMessage)
|
|
549
549
|
), fs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || $n, f = {
|
|
550
|
-
isArray:
|
|
550
|
+
isArray: he,
|
|
551
551
|
isArrayBuffer: qn,
|
|
552
552
|
isBuffer: Ro,
|
|
553
553
|
isFormData: jo,
|
|
@@ -577,10 +577,10 @@ const cs = (e) => {
|
|
|
577
577
|
trim: Wo,
|
|
578
578
|
stripBOM: $o,
|
|
579
579
|
inherits: Ko,
|
|
580
|
-
toFlatObject:
|
|
580
|
+
toFlatObject: Yo,
|
|
581
581
|
kindOf: qe,
|
|
582
|
-
kindOfTest:
|
|
583
|
-
endsWith:
|
|
582
|
+
kindOfTest: Y,
|
|
583
|
+
endsWith: Jo,
|
|
584
584
|
toArray: Go,
|
|
585
585
|
forEachEntry: Xo,
|
|
586
586
|
matchAll: Qo,
|
|
@@ -630,7 +630,7 @@ f.inherits(C, Error, {
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
});
|
|
633
|
-
const Kn = C.prototype,
|
|
633
|
+
const Kn = C.prototype, Yn = {};
|
|
634
634
|
[
|
|
635
635
|
"ERR_BAD_OPTION_VALUE",
|
|
636
636
|
"ERR_BAD_OPTION",
|
|
@@ -646,9 +646,9 @@ const Kn = C.prototype, Jn = {};
|
|
|
646
646
|
"ERR_INVALID_URL"
|
|
647
647
|
// eslint-disable-next-line func-names
|
|
648
648
|
].forEach((e) => {
|
|
649
|
-
|
|
649
|
+
Yn[e] = { value: e };
|
|
650
650
|
});
|
|
651
|
-
Object.defineProperties(C,
|
|
651
|
+
Object.defineProperties(C, Yn);
|
|
652
652
|
Object.defineProperty(Kn, "isAxiosError", { value: !0 });
|
|
653
653
|
C.from = (e, t, n, r, o, s) => {
|
|
654
654
|
const a = Object.create(Kn);
|
|
@@ -656,20 +656,20 @@ C.from = (e, t, n, r, o, s) => {
|
|
|
656
656
|
return d !== Error.prototype;
|
|
657
657
|
}, (l) => l !== "isAxiosError"), C.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
|
|
658
658
|
};
|
|
659
|
-
const
|
|
660
|
-
function
|
|
659
|
+
const hs = null;
|
|
660
|
+
function ht(e) {
|
|
661
661
|
return f.isPlainObject(e) || f.isArray(e);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Jn(e) {
|
|
664
664
|
return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
665
665
|
}
|
|
666
666
|
function Xt(e, t, n) {
|
|
667
667
|
return e ? e.concat(t).map(function(o, s) {
|
|
668
|
-
return o =
|
|
668
|
+
return o = Jn(o), !n && s ? "[" + o + "]" : o;
|
|
669
669
|
}).join(n ? "." : "") : t;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
return f.isArray(e) && !e.some(
|
|
671
|
+
function ps(e) {
|
|
672
|
+
return f.isArray(e) && !e.some(ht);
|
|
673
673
|
}
|
|
674
674
|
const ms = f.toFlatObject(f, {}, null, function(t) {
|
|
675
675
|
return /^is[A-Z]/.test(t);
|
|
@@ -700,8 +700,8 @@ function ze(e, t, n) {
|
|
|
700
700
|
if (b && !g && typeof b == "object") {
|
|
701
701
|
if (f.endsWith(m, "{}"))
|
|
702
702
|
m = r ? m : m.slice(0, -2), b = JSON.stringify(b);
|
|
703
|
-
else if (f.isArray(b) &&
|
|
704
|
-
return m =
|
|
703
|
+
else if (f.isArray(b) && ps(b) || (f.isFileList(b) || f.endsWith(m, "[]")) && (x = f.toArray(b)))
|
|
704
|
+
return m = Jn(m), x.forEach(function(E, P) {
|
|
705
705
|
!(f.isUndefined(E) || E === null) && t.append(
|
|
706
706
|
// eslint-disable-next-line no-nested-ternary
|
|
707
707
|
a === !0 ? Xt([m], P, s) : a === null ? m : m + "[]",
|
|
@@ -709,18 +709,18 @@ function ze(e, t, n) {
|
|
|
709
709
|
);
|
|
710
710
|
}), !1;
|
|
711
711
|
}
|
|
712
|
-
return
|
|
712
|
+
return ht(b) ? !0 : (t.append(Xt(g, m, s), u(b)), !1);
|
|
713
713
|
}
|
|
714
|
-
const
|
|
714
|
+
const h = [], y = Object.assign(ms, {
|
|
715
715
|
defaultVisitor: c,
|
|
716
716
|
convertValue: u,
|
|
717
|
-
isVisitable:
|
|
717
|
+
isVisitable: ht
|
|
718
718
|
});
|
|
719
719
|
function S(b, m) {
|
|
720
720
|
if (!f.isUndefined(b)) {
|
|
721
|
-
if (
|
|
721
|
+
if (h.indexOf(b) !== -1)
|
|
722
722
|
throw Error("Circular reference detected in " + m.join("."));
|
|
723
|
-
|
|
723
|
+
h.push(b), f.forEach(b, function(x, A) {
|
|
724
724
|
(!(f.isUndefined(x) || x === null) && o.call(
|
|
725
725
|
t,
|
|
726
726
|
x,
|
|
@@ -728,7 +728,7 @@ function ze(e, t, n) {
|
|
|
728
728
|
m,
|
|
729
729
|
y
|
|
730
730
|
)) === !0 && S(x, m ? m.concat(A) : [A]);
|
|
731
|
-
}),
|
|
731
|
+
}), h.pop();
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
734
|
if (!f.isObject(e))
|
|
@@ -844,13 +844,13 @@ const Xn = {
|
|
|
844
844
|
Blob: ws
|
|
845
845
|
},
|
|
846
846
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
847
|
-
}, Nt = typeof window < "u" && typeof document < "u",
|
|
847
|
+
}, Nt = typeof window < "u" && typeof document < "u", pt = typeof navigator == "object" && navigator || void 0, As = Nt && (!pt || ["ReactNative", "NativeScript", "NS"].indexOf(pt.product) < 0), xs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
848
848
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cs = Nt && window.location.href || "http://localhost", Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
849
849
|
__proto__: null,
|
|
850
850
|
hasBrowserEnv: Nt,
|
|
851
851
|
hasStandardBrowserEnv: As,
|
|
852
852
|
hasStandardBrowserWebWorkerEnv: xs,
|
|
853
|
-
navigator:
|
|
853
|
+
navigator: pt,
|
|
854
854
|
origin: Cs
|
|
855
855
|
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
856
856
|
...Es,
|
|
@@ -1043,8 +1043,8 @@ let U = class {
|
|
|
1043
1043
|
const c = ge(d);
|
|
1044
1044
|
if (!c)
|
|
1045
1045
|
throw new Error("header name must be a non-empty string");
|
|
1046
|
-
const
|
|
1047
|
-
(!
|
|
1046
|
+
const h = f.findKey(o, c);
|
|
1047
|
+
(!h || o[h] === void 0 || u === !0 || u === void 0 && o[h] !== !1) && (o[h || d] = De(l));
|
|
1048
1048
|
}
|
|
1049
1049
|
const a = (l, d) => f.forEach(l, (u, c) => s(u, c, d));
|
|
1050
1050
|
if (f.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -1172,10 +1172,10 @@ function Qe(e, t) {
|
|
|
1172
1172
|
function er(e) {
|
|
1173
1173
|
return !!(e && e.__CANCEL__);
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function pe(e, t, n) {
|
|
1176
1176
|
C.call(this, e ?? "canceled", C.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1177
1177
|
}
|
|
1178
|
-
f.inherits(
|
|
1178
|
+
f.inherits(pe, C, {
|
|
1179
1179
|
__CANCEL__: !0
|
|
1180
1180
|
});
|
|
1181
1181
|
function tr(e, t, n) {
|
|
@@ -1199,9 +1199,9 @@ function Ms(e, t) {
|
|
|
1199
1199
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1200
1200
|
const u = Date.now(), c = r[s];
|
|
1201
1201
|
a || (a = u), n[o] = d, r[o] = u;
|
|
1202
|
-
let
|
|
1203
|
-
for (;
|
|
1204
|
-
y += n[
|
|
1202
|
+
let h = s, y = 0;
|
|
1203
|
+
for (; h !== o; )
|
|
1204
|
+
y += n[h++], h = h % e;
|
|
1205
1205
|
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), u - a < t)
|
|
1206
1206
|
return;
|
|
1207
1207
|
const S = c && u - c;
|
|
@@ -1214,10 +1214,10 @@ function Ns(e, t) {
|
|
|
1214
1214
|
n = c, o = null, s && (clearTimeout(s), s = null), e.apply(null, u);
|
|
1215
1215
|
};
|
|
1216
1216
|
return [(...u) => {
|
|
1217
|
-
const c = Date.now(),
|
|
1218
|
-
|
|
1217
|
+
const c = Date.now(), h = c - n;
|
|
1218
|
+
h >= r ? a(u, c) : (o = u, s || (s = setTimeout(() => {
|
|
1219
1219
|
s = null, a(o);
|
|
1220
|
-
}, r -
|
|
1220
|
+
}, r - h)));
|
|
1221
1221
|
}, () => o && a(o)];
|
|
1222
1222
|
}
|
|
1223
1223
|
const Le = (e, t, n = 3) => {
|
|
@@ -1226,7 +1226,7 @@ const Le = (e, t, n = 3) => {
|
|
|
1226
1226
|
return Ns((s) => {
|
|
1227
1227
|
const a = s.loaded, l = s.lengthComputable ? s.total : void 0, d = a - r, u = o(d), c = a <= l;
|
|
1228
1228
|
r = a;
|
|
1229
|
-
const
|
|
1229
|
+
const h = {
|
|
1230
1230
|
loaded: a,
|
|
1231
1231
|
total: l,
|
|
1232
1232
|
progress: l ? a / l : void 0,
|
|
@@ -1237,7 +1237,7 @@ const Le = (e, t, n = 3) => {
|
|
|
1237
1237
|
lengthComputable: l != null,
|
|
1238
1238
|
[t ? "download" : "upload"]: !0
|
|
1239
1239
|
};
|
|
1240
|
-
e(
|
|
1240
|
+
e(h);
|
|
1241
1241
|
}, n);
|
|
1242
1242
|
}, nn = (e, t) => {
|
|
1243
1243
|
const n = e != null;
|
|
@@ -1317,14 +1317,14 @@ const on = (e) => e instanceof U ? { ...e } : e;
|
|
|
1317
1317
|
function ue(e, t) {
|
|
1318
1318
|
t = t || {};
|
|
1319
1319
|
const n = {};
|
|
1320
|
-
function r(u, c,
|
|
1321
|
-
return f.isPlainObject(u) && f.isPlainObject(c) ? f.merge.call({ caseless:
|
|
1320
|
+
function r(u, c, h) {
|
|
1321
|
+
return f.isPlainObject(u) && f.isPlainObject(c) ? f.merge.call({ caseless: h }, u, c) : f.isPlainObject(c) ? f.merge({}, c) : f.isArray(c) ? c.slice() : c;
|
|
1322
1322
|
}
|
|
1323
|
-
function o(u, c,
|
|
1323
|
+
function o(u, c, h) {
|
|
1324
1324
|
if (f.isUndefined(c)) {
|
|
1325
1325
|
if (!f.isUndefined(u))
|
|
1326
|
-
return r(void 0, u,
|
|
1327
|
-
} else return r(u, c,
|
|
1326
|
+
return r(void 0, u, h);
|
|
1327
|
+
} else return r(u, c, h);
|
|
1328
1328
|
}
|
|
1329
1329
|
function s(u, c) {
|
|
1330
1330
|
if (!f.isUndefined(c))
|
|
@@ -1336,10 +1336,10 @@ function ue(e, t) {
|
|
|
1336
1336
|
return r(void 0, u);
|
|
1337
1337
|
} else return r(void 0, c);
|
|
1338
1338
|
}
|
|
1339
|
-
function l(u, c,
|
|
1340
|
-
if (
|
|
1339
|
+
function l(u, c, h) {
|
|
1340
|
+
if (h in t)
|
|
1341
1341
|
return r(u, c);
|
|
1342
|
-
if (
|
|
1342
|
+
if (h in e)
|
|
1343
1343
|
return r(void 0, u);
|
|
1344
1344
|
}
|
|
1345
1345
|
const d = {
|
|
@@ -1374,8 +1374,8 @@ function ue(e, t) {
|
|
|
1374
1374
|
headers: (u, c) => o(on(u), on(c), !0)
|
|
1375
1375
|
};
|
|
1376
1376
|
return f.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
|
|
1377
|
-
const
|
|
1378
|
-
f.isUndefined(y) &&
|
|
1377
|
+
const h = d[c] || o, y = h(e[c], t[c], c);
|
|
1378
|
+
f.isUndefined(y) && h !== l || (n[c] = y);
|
|
1379
1379
|
}), n;
|
|
1380
1380
|
}
|
|
1381
1381
|
const rr = (e) => {
|
|
@@ -1390,7 +1390,7 @@ const rr = (e) => {
|
|
|
1390
1390
|
if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
|
|
1391
1391
|
a.setContentType(void 0);
|
|
1392
1392
|
else if ((d = a.getContentType()) !== !1) {
|
|
1393
|
-
const [u, ...c] = d ? d.split(";").map((
|
|
1393
|
+
const [u, ...c] = d ? d.split(";").map((h) => h.trim()).filter(Boolean) : [];
|
|
1394
1394
|
a.setContentType([u || "multipart/form-data", ...c].join("; "));
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
@@ -1404,7 +1404,7 @@ const rr = (e) => {
|
|
|
1404
1404
|
const o = rr(e);
|
|
1405
1405
|
let s = o.data;
|
|
1406
1406
|
const a = U.from(o.headers).normalize();
|
|
1407
|
-
let { responseType: l, onUploadProgress: d, onDownloadProgress: u } = o, c,
|
|
1407
|
+
let { responseType: l, onUploadProgress: d, onDownloadProgress: u } = o, c, h, y, S, b;
|
|
1408
1408
|
function m() {
|
|
1409
1409
|
S && S(), b && b(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
|
|
1410
1410
|
}
|
|
@@ -1446,8 +1446,8 @@ const rr = (e) => {
|
|
|
1446
1446
|
)), g = null;
|
|
1447
1447
|
}, s === void 0 && a.setContentType(null), "setRequestHeader" in g && f.forEach(a.toJSON(), function(P, O) {
|
|
1448
1448
|
g.setRequestHeader(O, P);
|
|
1449
|
-
}), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), u && ([y, b] = Le(u, !0), g.addEventListener("progress", y)), d && g.upload && ([
|
|
1450
|
-
g && (r(!E || E.type ? new
|
|
1449
|
+
}), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), u && ([y, b] = Le(u, !0), g.addEventListener("progress", y)), d && g.upload && ([h, S] = Le(d), g.upload.addEventListener("progress", h), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (c = (E) => {
|
|
1450
|
+
g && (r(!E || E.type ? new pe(null, e, g) : E), g.abort(), g = null);
|
|
1451
1451
|
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
|
|
1452
1452
|
const A = Is(o.url);
|
|
1453
1453
|
if (A && j.protocols.indexOf(A) === -1) {
|
|
@@ -1464,7 +1464,7 @@ const rr = (e) => {
|
|
|
1464
1464
|
if (!o) {
|
|
1465
1465
|
o = !0, l();
|
|
1466
1466
|
const c = u instanceof Error ? u : this.reason;
|
|
1467
|
-
r.abort(c instanceof C ? c : new
|
|
1467
|
+
r.abort(c instanceof C ? c : new pe(c instanceof Error ? c.message : c));
|
|
1468
1468
|
}
|
|
1469
1469
|
};
|
|
1470
1470
|
let a = t && setTimeout(() => {
|
|
@@ -1520,9 +1520,9 @@ const rr = (e) => {
|
|
|
1520
1520
|
l(), d.close();
|
|
1521
1521
|
return;
|
|
1522
1522
|
}
|
|
1523
|
-
let
|
|
1523
|
+
let h = c.byteLength;
|
|
1524
1524
|
if (n) {
|
|
1525
|
-
let y = s +=
|
|
1525
|
+
let y = s += h;
|
|
1526
1526
|
n(y);
|
|
1527
1527
|
}
|
|
1528
1528
|
d.enqueue(new Uint8Array(c));
|
|
@@ -1536,13 +1536,13 @@ const rr = (e) => {
|
|
|
1536
1536
|
}, {
|
|
1537
1537
|
highWaterMark: 2
|
|
1538
1538
|
});
|
|
1539
|
-
}, We = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", or = We && typeof ReadableStream == "function",
|
|
1539
|
+
}, We = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", or = We && typeof ReadableStream == "function", Ys = We && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), sr = (e, ...t) => {
|
|
1540
1540
|
try {
|
|
1541
1541
|
return !!e(...t);
|
|
1542
1542
|
} catch {
|
|
1543
1543
|
return !1;
|
|
1544
1544
|
}
|
|
1545
|
-
},
|
|
1545
|
+
}, Js = or && sr(() => {
|
|
1546
1546
|
let e = !1;
|
|
1547
1547
|
const t = new Request(j.origin, {
|
|
1548
1548
|
body: new ReadableStream(),
|
|
@@ -1575,7 +1575,7 @@ const Gs = async (e) => {
|
|
|
1575
1575
|
if (f.isArrayBufferView(e) || f.isArrayBuffer(e))
|
|
1576
1576
|
return e.byteLength;
|
|
1577
1577
|
if (f.isURLSearchParams(e) && (e = e + ""), f.isString(e))
|
|
1578
|
-
return (await
|
|
1578
|
+
return (await Ys(e)).byteLength;
|
|
1579
1579
|
}, Zs = async (e, t) => {
|
|
1580
1580
|
const n = f.toFiniteNumber(e.getContentLength());
|
|
1581
1581
|
return n ?? Gs(t);
|
|
@@ -1591,7 +1591,7 @@ const Gs = async (e) => {
|
|
|
1591
1591
|
onUploadProgress: d,
|
|
1592
1592
|
responseType: u,
|
|
1593
1593
|
headers: c,
|
|
1594
|
-
withCredentials:
|
|
1594
|
+
withCredentials: h = "same-origin",
|
|
1595
1595
|
fetchOptions: y
|
|
1596
1596
|
} = rr(e);
|
|
1597
1597
|
u = u ? (u + "").toLowerCase() : "text";
|
|
@@ -1601,7 +1601,7 @@ const Gs = async (e) => {
|
|
|
1601
1601
|
});
|
|
1602
1602
|
let g;
|
|
1603
1603
|
try {
|
|
1604
|
-
if (d &&
|
|
1604
|
+
if (d && Js && n !== "get" && n !== "head" && (g = await Zs(c, r)) !== 0) {
|
|
1605
1605
|
let O = new Request(t, {
|
|
1606
1606
|
method: "POST",
|
|
1607
1607
|
body: r,
|
|
@@ -1615,7 +1615,7 @@ const Gs = async (e) => {
|
|
|
1615
1615
|
r = sn(O.body, an, D, W);
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
|
-
f.isString(
|
|
1618
|
+
f.isString(h) || (h = h ? "include" : "omit");
|
|
1619
1619
|
const x = "credentials" in Request.prototype;
|
|
1620
1620
|
b = new Request(t, {
|
|
1621
1621
|
...y,
|
|
@@ -1624,7 +1624,7 @@ const Gs = async (e) => {
|
|
|
1624
1624
|
headers: c.normalize().toJSON(),
|
|
1625
1625
|
body: r,
|
|
1626
1626
|
duplex: "half",
|
|
1627
|
-
credentials: x ?
|
|
1627
|
+
credentials: x ? h : void 0
|
|
1628
1628
|
});
|
|
1629
1629
|
let A = await fetch(b);
|
|
1630
1630
|
const E = mt && (u === "stream" || u === "response");
|
|
@@ -1665,7 +1665,7 @@ const Gs = async (e) => {
|
|
|
1665
1665
|
) : C.from(x, x && x.code, e, b);
|
|
1666
1666
|
}
|
|
1667
1667
|
}), gt = {
|
|
1668
|
-
http:
|
|
1668
|
+
http: hs,
|
|
1669
1669
|
xhr: zs,
|
|
1670
1670
|
fetch: Xs
|
|
1671
1671
|
};
|
|
@@ -1711,7 +1711,7 @@ const ln = (e) => `- ${e}`, Qs = (e) => f.isFunction(e) || e === null || e === !
|
|
|
1711
1711
|
};
|
|
1712
1712
|
function et(e) {
|
|
1713
1713
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1714
|
-
throw new
|
|
1714
|
+
throw new pe(null, e);
|
|
1715
1715
|
}
|
|
1716
1716
|
function cn(e) {
|
|
1717
1717
|
return et(e), e.headers = U.from(e.headers), e.data = Qe.call(
|
|
@@ -1841,17 +1841,17 @@ let le = class {
|
|
|
1841
1841
|
this.interceptors.response.forEach(function(m) {
|
|
1842
1842
|
u.push(m.fulfilled, m.rejected);
|
|
1843
1843
|
});
|
|
1844
|
-
let c,
|
|
1844
|
+
let c, h = 0, y;
|
|
1845
1845
|
if (!d) {
|
|
1846
1846
|
const b = [cn.bind(this), void 0];
|
|
1847
|
-
for (b.unshift.apply(b, l), b.push.apply(b, u), y = b.length, c = Promise.resolve(n);
|
|
1848
|
-
c = c.then(b[
|
|
1847
|
+
for (b.unshift.apply(b, l), b.push.apply(b, u), y = b.length, c = Promise.resolve(n); h < y; )
|
|
1848
|
+
c = c.then(b[h++], b[h++]);
|
|
1849
1849
|
return c;
|
|
1850
1850
|
}
|
|
1851
1851
|
y = l.length;
|
|
1852
1852
|
let S = n;
|
|
1853
|
-
for (
|
|
1854
|
-
const b = l[
|
|
1853
|
+
for (h = 0; h < y; ) {
|
|
1854
|
+
const b = l[h++], m = l[h++];
|
|
1855
1855
|
try {
|
|
1856
1856
|
S = b(S);
|
|
1857
1857
|
} catch (g) {
|
|
@@ -1864,8 +1864,8 @@ let le = class {
|
|
|
1864
1864
|
} catch (b) {
|
|
1865
1865
|
return Promise.reject(b);
|
|
1866
1866
|
}
|
|
1867
|
-
for (
|
|
1868
|
-
c = c.then(u[
|
|
1867
|
+
for (h = 0, y = u.length; h < y; )
|
|
1868
|
+
c = c.then(u[h++], u[h++]);
|
|
1869
1869
|
return c;
|
|
1870
1870
|
}
|
|
1871
1871
|
getUri(t) {
|
|
@@ -1922,7 +1922,7 @@ let ta = class lr {
|
|
|
1922
1922
|
r.unsubscribe(s);
|
|
1923
1923
|
}, a;
|
|
1924
1924
|
}, t(function(s, a, l) {
|
|
1925
|
-
r.reason || (r.reason = new
|
|
1925
|
+
r.reason || (r.reason = new pe(s, a, l), n(r.reason));
|
|
1926
1926
|
});
|
|
1927
1927
|
}
|
|
1928
1928
|
/**
|
|
@@ -2055,7 +2055,7 @@ function cr(e) {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
const F = cr(Ce);
|
|
2057
2057
|
F.Axios = le;
|
|
2058
|
-
F.CanceledError =
|
|
2058
|
+
F.CanceledError = pe;
|
|
2059
2059
|
F.CancelToken = ta;
|
|
2060
2060
|
F.isCancel = er;
|
|
2061
2061
|
F.VERSION = ir;
|
|
@@ -2089,7 +2089,7 @@ const {
|
|
|
2089
2089
|
HttpStatusCode: Vi,
|
|
2090
2090
|
formToJSON: $i,
|
|
2091
2091
|
getAdapter: Ki,
|
|
2092
|
-
mergeConfig:
|
|
2092
|
+
mergeConfig: Yi
|
|
2093
2093
|
} = F;
|
|
2094
2094
|
function ce(e) {
|
|
2095
2095
|
return (t) => {
|
|
@@ -2103,26 +2103,26 @@ function ce(e) {
|
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
2105
|
function Ut() {
|
|
2106
|
-
return
|
|
2106
|
+
return p.useContext(Lt).notify;
|
|
2107
2107
|
}
|
|
2108
2108
|
function sa() {
|
|
2109
2109
|
const e = Ut();
|
|
2110
|
-
return
|
|
2110
|
+
return p.useCallback((t) => {
|
|
2111
2111
|
ce(e)(t);
|
|
2112
2112
|
}, [e]);
|
|
2113
2113
|
}
|
|
2114
2114
|
const aa = ({ create: e = !1 }) => {
|
|
2115
|
-
const [t, n] =
|
|
2115
|
+
const [t, n] = p.useState(), { id: r } = Sr(), { t: o } = L(), s = Ut(), a = At(), l = te(), d = z("breakpoint", "md");
|
|
2116
2116
|
Bt(
|
|
2117
2117
|
t != null && t.exists ? o("Edit :model “:label“", { model: l.singular(), label: (t == null ? void 0 : t.getLabel()) || "..." }) : o("Create :model", { model: l.singular() })
|
|
2118
2118
|
), Do();
|
|
2119
2119
|
const u = T("cms").getComponent("Breadcrumbs");
|
|
2120
|
-
|
|
2120
|
+
p.useEffect(() => {
|
|
2121
2121
|
e ? n(new l()) : l.find(r).then((S) => n(S ?? void 0));
|
|
2122
2122
|
}, [r, l, e]);
|
|
2123
|
-
const c =
|
|
2123
|
+
const c = p.useCallback(() => {
|
|
2124
2124
|
s(o(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${k.kebab(l.plural())}/${t.getKey()}`);
|
|
2125
|
-
}, [s, a, l, t, o]),
|
|
2125
|
+
}, [s, a, l, t, o]), h = sa(), y = p.useMemo(() => T("cms").getModelFormProps(t), [t]);
|
|
2126
2126
|
return t ? /* @__PURE__ */ i(H, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: /* @__PURE__ */ w(Q, { container: !0, children: [
|
|
2127
2127
|
/* @__PURE__ */ i(Q, { xs: 12, children: /* @__PURE__ */ i(
|
|
2128
2128
|
u,
|
|
@@ -2145,7 +2145,7 @@ const aa = ({ create: e = !1 }) => {
|
|
|
2145
2145
|
...y,
|
|
2146
2146
|
item: t,
|
|
2147
2147
|
onSuccess: c,
|
|
2148
|
-
onError:
|
|
2148
|
+
onError: h
|
|
2149
2149
|
}
|
|
2150
2150
|
)
|
|
2151
2151
|
}
|
|
@@ -2155,13 +2155,13 @@ const aa = ({ create: e = !1 }) => {
|
|
|
2155
2155
|
function ia(e) {
|
|
2156
2156
|
const {
|
|
2157
2157
|
setDisplacement: t
|
|
2158
|
-
} =
|
|
2159
|
-
|
|
2158
|
+
} = p.useContext(Lt), n = vt(), r = v(), o = n.spacing(r ? 3 : 1), s = e === !1 ? o : n.spacing(e);
|
|
2159
|
+
p.useEffect(() => (t(s), () => {
|
|
2160
2160
|
t(o);
|
|
2161
2161
|
}), [s, o, t]);
|
|
2162
2162
|
}
|
|
2163
2163
|
function la() {
|
|
2164
|
-
return
|
|
2164
|
+
return p.useContext(jn).dialog;
|
|
2165
2165
|
}
|
|
2166
2166
|
function qt() {
|
|
2167
2167
|
const e = At(), t = Ut(), n = la(), { t: r } = L(), { refresh: o } = Se();
|
|
@@ -2176,10 +2176,10 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2176
2176
|
bottom: e.spacing(2),
|
|
2177
2177
|
right: e.spacing(2)
|
|
2178
2178
|
})), da = ({ variant: e = "default" }) => {
|
|
2179
|
-
const t = te(), n = v(), [r] = K(), o = r.get("tab") ?? "all", [s, a] =
|
|
2179
|
+
const t = te(), n = v(), [r] = K(), o = r.get("tab") ?? "all", [s, a] = p.useState(!1), l = p.useRef(null), [d, u] = p.useState(0), c = qt(), h = p.useMemo(() => T("cms").getStaticActions(t, o), [t, o]);
|
|
2180
2180
|
if (ia(
|
|
2181
|
-
e === "fab" &&
|
|
2182
|
-
),
|
|
2181
|
+
e === "fab" && h.length > 0 ? n ? 12 : 10 : !1
|
|
2182
|
+
), h.length === 0)
|
|
2183
2183
|
return null;
|
|
2184
2184
|
const y = (m, g) => {
|
|
2185
2185
|
u(g), a(!1);
|
|
@@ -2188,17 +2188,17 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2188
2188
|
}, b = (m) => {
|
|
2189
2189
|
l.current && l.current.contains(m.target) || a(!1);
|
|
2190
2190
|
};
|
|
2191
|
-
return e === "fab" ?
|
|
2191
|
+
return e === "fab" ? h.length === 1 ? Jt.createPortal(
|
|
2192
2192
|
/* @__PURE__ */ i(
|
|
2193
2193
|
ca,
|
|
2194
2194
|
{
|
|
2195
2195
|
color: "primary",
|
|
2196
|
-
onClick: () =>
|
|
2197
|
-
children:
|
|
2196
|
+
onClick: () => h[0].callback(c),
|
|
2197
|
+
children: h[0].icon || h[0].label.charAt(0).toUpperCase()
|
|
2198
2198
|
}
|
|
2199
2199
|
),
|
|
2200
2200
|
document.body
|
|
2201
|
-
) :
|
|
2201
|
+
) : Jt.createPortal(
|
|
2202
2202
|
/* @__PURE__ */ i(
|
|
2203
2203
|
ua,
|
|
2204
2204
|
{
|
|
@@ -2208,7 +2208,7 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2208
2208
|
onClose: () => a(!1),
|
|
2209
2209
|
onOpen: () => a(!0),
|
|
2210
2210
|
open: s,
|
|
2211
|
-
children:
|
|
2211
|
+
children: h.map((m) => /* @__PURE__ */ i(
|
|
2212
2212
|
Lr,
|
|
2213
2213
|
{
|
|
2214
2214
|
icon: m.icon || m.label.charAt(0).toUpperCase(),
|
|
@@ -2226,10 +2226,10 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2226
2226
|
{
|
|
2227
2227
|
variant: "contained",
|
|
2228
2228
|
ref: l,
|
|
2229
|
-
"aria-label":
|
|
2229
|
+
"aria-label": h[d].label,
|
|
2230
2230
|
children: [
|
|
2231
|
-
/* @__PURE__ */ i(M, { onClick: () =>
|
|
2232
|
-
|
|
2231
|
+
/* @__PURE__ */ i(M, { onClick: () => h[d].callback(c), children: h[d].label }),
|
|
2232
|
+
h.length > 1 && /* @__PURE__ */ i(
|
|
2233
2233
|
M,
|
|
2234
2234
|
{
|
|
2235
2235
|
variant: "contained",
|
|
@@ -2259,7 +2259,7 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2259
2259
|
style: {
|
|
2260
2260
|
transformOrigin: g === "bottom" ? "center top" : "center bottom"
|
|
2261
2261
|
},
|
|
2262
|
-
children: /* @__PURE__ */ i(Dt, { children: /* @__PURE__ */ i(Nr, { onClickAway: b, children: /* @__PURE__ */ i(jr, { id: "split-button-menu", children:
|
|
2262
|
+
children: /* @__PURE__ */ i(Dt, { children: /* @__PURE__ */ i(Nr, { onClickAway: b, children: /* @__PURE__ */ i(jr, { id: "split-button-menu", children: h.map((x, A) => /* @__PURE__ */ i(
|
|
2263
2263
|
se,
|
|
2264
2264
|
{
|
|
2265
2265
|
selected: A === d,
|
|
@@ -2275,7 +2275,7 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2275
2275
|
] });
|
|
2276
2276
|
};
|
|
2277
2277
|
function _t() {
|
|
2278
|
-
const { open: e, setOpen: t } =
|
|
2278
|
+
const { open: e, setOpen: t } = p.useContext(X);
|
|
2279
2279
|
return {
|
|
2280
2280
|
open: e,
|
|
2281
2281
|
handleDrawerOpen: () => {
|
|
@@ -2290,15 +2290,15 @@ function _t() {
|
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
2292
|
function ur() {
|
|
2293
|
-
const { currentPage: e } =
|
|
2293
|
+
const { currentPage: e } = p.useContext(X);
|
|
2294
2294
|
return e;
|
|
2295
2295
|
}
|
|
2296
2296
|
function dr() {
|
|
2297
|
-
const { showSearch: e } =
|
|
2297
|
+
const { showSearch: e } = p.useContext(X);
|
|
2298
2298
|
return e;
|
|
2299
2299
|
}
|
|
2300
2300
|
function fr() {
|
|
2301
|
-
const { showBackButton: e } =
|
|
2301
|
+
const { showBackButton: e } = p.useContext(X);
|
|
2302
2302
|
return e;
|
|
2303
2303
|
}
|
|
2304
2304
|
const fa = Z(
|
|
@@ -2319,16 +2319,16 @@ const fa = Z(
|
|
|
2319
2319
|
duration: e.transitions.duration.enteringScreen
|
|
2320
2320
|
})
|
|
2321
2321
|
}
|
|
2322
|
-
})),
|
|
2322
|
+
})), ha = Z(
|
|
2323
2323
|
gn,
|
|
2324
2324
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2325
|
-
)(({ height: e }) => ({ height: e })),
|
|
2326
|
-
const n = v(), r = n ? fa :
|
|
2325
|
+
)(({ height: e }) => ({ height: e })), pa = ({ slots: e = {}, ...t }) => {
|
|
2326
|
+
const n = v(), r = n ? fa : ha, {
|
|
2327
2327
|
["Layout.AppBar.MenuButton"]: o,
|
|
2328
2328
|
["Layout.SearchBar"]: s,
|
|
2329
2329
|
["Layout.BackButton"]: a,
|
|
2330
2330
|
["Layout.AppLogo"]: l
|
|
2331
|
-
} = T("cms").getComponents(), { open: d } = _t(), u = dr(), c = fr(),
|
|
2331
|
+
} = T("cms").getComponents(), { open: d } = _t(), u = dr(), c = fr(), h = z("appBar.height"), y = z("drawer.width", 280), {
|
|
2332
2332
|
start: S = null,
|
|
2333
2333
|
//: title = config('app.name', document.title),
|
|
2334
2334
|
end: b = null
|
|
@@ -2337,7 +2337,7 @@ const fa = Z(
|
|
|
2337
2337
|
r,
|
|
2338
2338
|
{
|
|
2339
2339
|
open: d,
|
|
2340
|
-
height:
|
|
2340
|
+
height: h,
|
|
2341
2341
|
drawerWidth: y,
|
|
2342
2342
|
...t,
|
|
2343
2343
|
children: /* @__PURE__ */ w(Ur, { children: [
|
|
@@ -2476,7 +2476,7 @@ const dn = (e, t) => ({
|
|
|
2476
2476
|
]
|
|
2477
2477
|
}
|
|
2478
2478
|
);
|
|
2479
|
-
}, Ht =
|
|
2479
|
+
}, Ht = p.createContext({
|
|
2480
2480
|
Model: null,
|
|
2481
2481
|
anchorEl: null,
|
|
2482
2482
|
setAnchorEl: () => {
|
|
@@ -2493,7 +2493,7 @@ const dn = (e, t) => ({
|
|
|
2493
2493
|
},
|
|
2494
2494
|
clearFilters: () => {
|
|
2495
2495
|
}
|
|
2496
|
-
}), me =
|
|
2496
|
+
}), me = p.createContext({
|
|
2497
2497
|
key: "",
|
|
2498
2498
|
type: "",
|
|
2499
2499
|
operator: "",
|
|
@@ -2529,7 +2529,7 @@ const dn = (e, t) => ({
|
|
|
2529
2529
|
return a;
|
|
2530
2530
|
};
|
|
2531
2531
|
function Ea(e, t) {
|
|
2532
|
-
const n = T("filter"), { Model: r, setColumnsFilter: o } =
|
|
2532
|
+
const n = T("filter"), { Model: r, setColumnsFilter: o } = p.useContext(Ht), [s, a] = p.useState(t.key), [l, d] = p.useState(t.operator), [u, c] = p.useState(t.type), [h, y] = p.useState(t.value), [S, b] = p.useState(t.nullable), [m, g] = p.useState(t.is_relation), x = p.useMemo(() => n.getFilterableColumns(r), [r]), A = (O) => () => {
|
|
2533
2533
|
o((R) => R.filter((D, W) => W !== O));
|
|
2534
2534
|
}, E = async (O) => {
|
|
2535
2535
|
const R = O.target.value, D = x.find((mr) => mr.key === R), W = (D == null ? void 0 : D.type) ?? "text", Ee = (D == null ? void 0 : D.nullable) ?? !1, Vt = (D == null ? void 0 : D.is_relation) ?? !1;
|
|
@@ -2560,17 +2560,17 @@ function Ea(e, t) {
|
|
|
2560
2560
|
}
|
|
2561
2561
|
}), d(R);
|
|
2562
2562
|
};
|
|
2563
|
-
return
|
|
2563
|
+
return p.useEffect(() => {
|
|
2564
2564
|
o((O) => O.map((D, W) => e === W ? {
|
|
2565
2565
|
...D,
|
|
2566
2566
|
key: s,
|
|
2567
2567
|
operator: l,
|
|
2568
2568
|
type: u,
|
|
2569
|
-
value:
|
|
2569
|
+
value: h,
|
|
2570
2570
|
nullable: S,
|
|
2571
2571
|
is_relation: m
|
|
2572
2572
|
} : D));
|
|
2573
|
-
}, [s, l, u,
|
|
2573
|
+
}, [s, l, u, h, S, m]), {
|
|
2574
2574
|
columns: x,
|
|
2575
2575
|
key: s,
|
|
2576
2576
|
setKey: a,
|
|
@@ -2578,7 +2578,7 @@ function Ea(e, t) {
|
|
|
2578
2578
|
setOperator: d,
|
|
2579
2579
|
type: u,
|
|
2580
2580
|
setType: c,
|
|
2581
|
-
value:
|
|
2581
|
+
value: h,
|
|
2582
2582
|
setValue: y,
|
|
2583
2583
|
nullable: S,
|
|
2584
2584
|
setNullable: b,
|
|
@@ -2589,7 +2589,7 @@ function Ea(e, t) {
|
|
|
2589
2589
|
handleRemoveColumn: A
|
|
2590
2590
|
};
|
|
2591
2591
|
}
|
|
2592
|
-
const
|
|
2592
|
+
const hn = async (e, t, n) => {
|
|
2593
2593
|
const r = e.getSchema().relations[t].model, { data: o } = await ye().make(r).get(), s = o.all().filter((u) => !n.find((c) => c.getKey() === u.getKey())), a = s.length, l = n.length, d = 15;
|
|
2594
2594
|
return a + l > d ? V([...n, ...s.slice(0, d - l)]) : V([...n, ...s]);
|
|
2595
2595
|
}, ka = async (e, t, n = "", r) => {
|
|
@@ -2600,23 +2600,23 @@ const pn = async (e, t, n) => {
|
|
|
2600
2600
|
key: n,
|
|
2601
2601
|
value: r,
|
|
2602
2602
|
setValue: o
|
|
2603
|
-
} =
|
|
2603
|
+
} = p.useContext(me), [s, a] = p.useState(!1), [l, d] = p.useState(""), [u, c] = p.useState(V([])), [h, y] = p.useState([]), S = p.useMemo(
|
|
2604
2604
|
() => s && u.count() === 0,
|
|
2605
2605
|
[s, u]
|
|
2606
2606
|
), b = async (m, g) => {
|
|
2607
|
-
d(g), G.isEmpty(g) || c(await ka(t, n, g, V(
|
|
2607
|
+
d(g), G.isEmpty(g) || c(await ka(t, n, g, V(h)));
|
|
2608
2608
|
};
|
|
2609
|
-
return
|
|
2609
|
+
return p.useEffect(() => {
|
|
2610
2610
|
r.length > 0 && (async () => y(await Ca(t, n, r)))();
|
|
2611
|
-
}, []),
|
|
2611
|
+
}, []), p.useEffect(() => {
|
|
2612
2612
|
let m = !0;
|
|
2613
2613
|
if (S)
|
|
2614
|
-
return (async () => m && c(await
|
|
2614
|
+
return (async () => m && c(await hn(t, n, h)))(), () => {
|
|
2615
2615
|
m = !1;
|
|
2616
2616
|
};
|
|
2617
|
-
}, [S]),
|
|
2618
|
-
o(
|
|
2619
|
-
}, [
|
|
2617
|
+
}, [S]), p.useEffect(() => {
|
|
2618
|
+
o(h.map((m) => m.getKey())), G.isEmpty(l) ? (async () => c(await hn(t, n, h)))() : c(V([]));
|
|
2619
|
+
}, [h]), /* @__PURE__ */ i(
|
|
2620
2620
|
qr,
|
|
2621
2621
|
{
|
|
2622
2622
|
sx: { width: e ? 377 : "100%" },
|
|
@@ -2627,7 +2627,7 @@ const pn = async (e, t, n) => {
|
|
|
2627
2627
|
onClose: () => {
|
|
2628
2628
|
a(!1);
|
|
2629
2629
|
},
|
|
2630
|
-
value:
|
|
2630
|
+
value: h,
|
|
2631
2631
|
onChange: (m, g) => {
|
|
2632
2632
|
y(g);
|
|
2633
2633
|
},
|
|
@@ -2660,7 +2660,7 @@ const pn = async (e, t, n) => {
|
|
|
2660
2660
|
label: n("Value"),
|
|
2661
2661
|
InputProps: {
|
|
2662
2662
|
...e.InputProps,
|
|
2663
|
-
endAdornment: /* @__PURE__ */ w(
|
|
2663
|
+
endAdornment: /* @__PURE__ */ w(p.Fragment, { children: [
|
|
2664
2664
|
t ? /* @__PURE__ */ i(_r, { color: "inherit", size: 20 }) : null,
|
|
2665
2665
|
e.InputProps.endAdornment
|
|
2666
2666
|
] })
|
|
@@ -2672,10 +2672,10 @@ const pn = async (e, t, n) => {
|
|
|
2672
2672
|
type: o,
|
|
2673
2673
|
value: s,
|
|
2674
2674
|
setValue: a
|
|
2675
|
-
} =
|
|
2675
|
+
} = p.useContext(me), d = r.getInputType(o) === "datetime-local" ? 230 : 167.5, u = e !== null ? `${t("Date")} ${e + 1}` : `${t("Date")}`, c = p.useMemo(
|
|
2676
2676
|
() => e !== null ? s[e] : s,
|
|
2677
2677
|
[s]
|
|
2678
|
-
),
|
|
2678
|
+
), h = (y) => {
|
|
2679
2679
|
a(typeof e == "number" ? (S) => {
|
|
2680
2680
|
const b = S;
|
|
2681
2681
|
return b[e] = y.target.value, [...b];
|
|
@@ -2687,13 +2687,13 @@ const pn = async (e, t, n) => {
|
|
|
2687
2687
|
type: r.getInputType(o),
|
|
2688
2688
|
label: u,
|
|
2689
2689
|
value: Fe.toDateTimeLocal(Fe.parse(c)),
|
|
2690
|
-
onChange:
|
|
2690
|
+
onChange: h,
|
|
2691
2691
|
size: "small",
|
|
2692
2692
|
sx: { width: n ? d : "100%" }
|
|
2693
2693
|
}
|
|
2694
2694
|
);
|
|
2695
2695
|
}, Oa = () => {
|
|
2696
|
-
const e = v(), { value: t, setValue: n } =
|
|
2696
|
+
const e = v(), { value: t, setValue: n } = p.useContext(me);
|
|
2697
2697
|
return /* @__PURE__ */ w(B, { children: [
|
|
2698
2698
|
/* @__PURE__ */ i(
|
|
2699
2699
|
Hr,
|
|
@@ -2714,12 +2714,12 @@ const pn = async (e, t, n) => {
|
|
|
2714
2714
|
type: o,
|
|
2715
2715
|
value: s,
|
|
2716
2716
|
setValue: a
|
|
2717
|
-
} =
|
|
2717
|
+
} = p.useContext(me), l = e !== null ? `${t("Value")} ${e + 1}` : `${t("Value")}`, d = p.useMemo(
|
|
2718
2718
|
() => e !== null ? s[e] : s,
|
|
2719
2719
|
[s]
|
|
2720
2720
|
), u = (c) => {
|
|
2721
|
-
a(typeof e == "number" ? (
|
|
2722
|
-
const y =
|
|
2721
|
+
a(typeof e == "number" ? (h) => {
|
|
2722
|
+
const y = h;
|
|
2723
2723
|
return y[e] = c.target.value, [...y];
|
|
2724
2724
|
} : c.target.value);
|
|
2725
2725
|
};
|
|
@@ -2735,7 +2735,7 @@ const pn = async (e, t, n) => {
|
|
|
2735
2735
|
}
|
|
2736
2736
|
);
|
|
2737
2737
|
}, rt = () => {
|
|
2738
|
-
const e = v(), t = T("filter"), { type: n, operator: r } =
|
|
2738
|
+
const e = v(), t = T("filter"), { type: n, operator: r } = p.useContext(me), o = p.useMemo(
|
|
2739
2739
|
() => ["between", "notBetween"].includes(r),
|
|
2740
2740
|
[r]
|
|
2741
2741
|
);
|
|
@@ -2767,12 +2767,12 @@ const pn = async (e, t, n) => {
|
|
|
2767
2767
|
return /* @__PURE__ */ i(nt, {});
|
|
2768
2768
|
}
|
|
2769
2769
|
}, Ra = ({ index: e, column: t }) => {
|
|
2770
|
-
const { t: n } = L(), r = v(), o = z("breakpoint", "md"), s = T("filter"), a =
|
|
2770
|
+
const { t: n } = L(), r = v(), o = z("breakpoint", "md"), s = T("filter"), a = p.useMemo(() => s.getMatchingOperators(t), [t]), {
|
|
2771
2771
|
columns: l,
|
|
2772
2772
|
key: d,
|
|
2773
2773
|
setKey: u,
|
|
2774
2774
|
operator: c,
|
|
2775
|
-
setOperator:
|
|
2775
|
+
setOperator: h,
|
|
2776
2776
|
type: y,
|
|
2777
2777
|
setType: S,
|
|
2778
2778
|
value: b,
|
|
@@ -2792,7 +2792,7 @@ const pn = async (e, t, n) => {
|
|
|
2792
2792
|
type: y,
|
|
2793
2793
|
setType: S,
|
|
2794
2794
|
operator: c,
|
|
2795
|
-
setOperator:
|
|
2795
|
+
setOperator: h,
|
|
2796
2796
|
value: b,
|
|
2797
2797
|
setValue: m,
|
|
2798
2798
|
isRelation: g,
|
|
@@ -2937,13 +2937,13 @@ const pn = async (e, t, n) => {
|
|
|
2937
2937
|
)
|
|
2938
2938
|
}
|
|
2939
2939
|
);
|
|
2940
|
-
},
|
|
2940
|
+
}, pn = ({ dialog: e = !1 }) => {
|
|
2941
2941
|
const { t } = L(), n = v(), r = z("breakpoint", "md"), o = T("filter"), {
|
|
2942
2942
|
columnsFilter: s,
|
|
2943
2943
|
setColumnsFilter: a,
|
|
2944
2944
|
handleApplyFilters: l,
|
|
2945
2945
|
clearFilters: d
|
|
2946
|
-
} =
|
|
2946
|
+
} = p.useContext(Ht), u = () => {
|
|
2947
2947
|
a((c) => [
|
|
2948
2948
|
...c,
|
|
2949
2949
|
{
|
|
@@ -2965,13 +2965,13 @@ const pn = async (e, t, n) => {
|
|
|
2965
2965
|
p: e ? 0 : 2
|
|
2966
2966
|
},
|
|
2967
2967
|
children: [
|
|
2968
|
-
/* @__PURE__ */ i(N, { children: s.map((c,
|
|
2969
|
-
const S =
|
|
2968
|
+
/* @__PURE__ */ i(N, { children: s.map((c, h, y) => {
|
|
2969
|
+
const S = h == y.length - 1;
|
|
2970
2970
|
return /* @__PURE__ */ w(B, { children: [
|
|
2971
2971
|
/* @__PURE__ */ i(
|
|
2972
2972
|
Ra,
|
|
2973
2973
|
{
|
|
2974
|
-
index:
|
|
2974
|
+
index: h,
|
|
2975
2975
|
column: c
|
|
2976
2976
|
},
|
|
2977
2977
|
`row_${c.key}`
|
|
@@ -3075,14 +3075,14 @@ const va = (e) => {
|
|
|
3075
3075
|
let d = `:${s}`;
|
|
3076
3076
|
if (["equals"].includes(s) && (d = ""), Array.isArray(a))
|
|
3077
3077
|
a.forEach((u, c) => {
|
|
3078
|
-
let
|
|
3078
|
+
let h = u;
|
|
3079
3079
|
switch (t.getInputType(l)) {
|
|
3080
3080
|
case "datetime-local": {
|
|
3081
|
-
|
|
3081
|
+
h = new Date(u).toISOString();
|
|
3082
3082
|
break;
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
|
-
n.set(`where[${o}${d}][${c}]`,
|
|
3085
|
+
n.set(`where[${o}${d}][${c}]`, h);
|
|
3086
3086
|
});
|
|
3087
3087
|
else {
|
|
3088
3088
|
let u = a;
|
|
@@ -3096,7 +3096,7 @@ const va = (e) => {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
}), n;
|
|
3098
3098
|
}, Fa = () => {
|
|
3099
|
-
const { t: e } = L(), t = T("filter"), n = v(), r = te(), [o, s] = K(), a =
|
|
3099
|
+
const { t: e } = L(), t = T("filter"), n = v(), r = te(), [o, s] = K(), a = p.useMemo(() => "where" in Bn.toObject(o), [o]), [l, d] = p.useState(null), [u, c] = p.useState([]), h = !!l, y = p.useMemo(() => t.getFilterableColumns(r), [r]), S = (A) => {
|
|
3100
3100
|
d(A.currentTarget);
|
|
3101
3101
|
}, b = () => {
|
|
3102
3102
|
d(null), setTimeout(() => {
|
|
@@ -3118,7 +3118,7 @@ const va = (e) => {
|
|
|
3118
3118
|
c([]);
|
|
3119
3119
|
}, 300);
|
|
3120
3120
|
};
|
|
3121
|
-
return
|
|
3121
|
+
return p.useEffect(() => {
|
|
3122
3122
|
const A = Pa(y, o);
|
|
3123
3123
|
c(A);
|
|
3124
3124
|
}, [y, o, l]), /* @__PURE__ */ w(
|
|
@@ -3158,19 +3158,19 @@ const va = (e) => {
|
|
|
3158
3158
|
zr,
|
|
3159
3159
|
{
|
|
3160
3160
|
id: "model-filter-popover",
|
|
3161
|
-
open:
|
|
3161
|
+
open: h,
|
|
3162
3162
|
anchorEl: l,
|
|
3163
3163
|
onClose: b,
|
|
3164
3164
|
anchorOrigin: {
|
|
3165
3165
|
vertical: "bottom",
|
|
3166
3166
|
horizontal: "left"
|
|
3167
3167
|
},
|
|
3168
|
-
children: /* @__PURE__ */ i(
|
|
3168
|
+
children: /* @__PURE__ */ i(pn, {})
|
|
3169
3169
|
}
|
|
3170
3170
|
) : /* @__PURE__ */ w(
|
|
3171
3171
|
Ct,
|
|
3172
3172
|
{
|
|
3173
|
-
open:
|
|
3173
|
+
open: h,
|
|
3174
3174
|
onClose: b,
|
|
3175
3175
|
fullWidth: !0,
|
|
3176
3176
|
children: [
|
|
@@ -3185,7 +3185,7 @@ const va = (e) => {
|
|
|
3185
3185
|
}
|
|
3186
3186
|
)
|
|
3187
3187
|
] }),
|
|
3188
|
-
/* @__PURE__ */ i(kt, { dividers: !0, children: /* @__PURE__ */ i(
|
|
3188
|
+
/* @__PURE__ */ i(kt, { dividers: !0, children: /* @__PURE__ */ i(pn, { dialog: !0 }) }),
|
|
3189
3189
|
/* @__PURE__ */ w(Tt, { children: [
|
|
3190
3190
|
/* @__PURE__ */ i(
|
|
3191
3191
|
M,
|
|
@@ -3211,7 +3211,7 @@ const va = (e) => {
|
|
|
3211
3211
|
]
|
|
3212
3212
|
}
|
|
3213
3213
|
);
|
|
3214
|
-
}, zt =
|
|
3214
|
+
}, zt = p.createContext({
|
|
3215
3215
|
columns: [],
|
|
3216
3216
|
columnCount: 0,
|
|
3217
3217
|
selected: V([]),
|
|
@@ -3224,7 +3224,7 @@ function Wt() {
|
|
|
3224
3224
|
const {
|
|
3225
3225
|
selected: e,
|
|
3226
3226
|
items: t
|
|
3227
|
-
} =
|
|
3227
|
+
} = p.useContext(zt), n = mn(e), r = () => {
|
|
3228
3228
|
e.splice(0, e.count());
|
|
3229
3229
|
}, o = (u) => {
|
|
3230
3230
|
const c = e.search(u);
|
|
@@ -3253,13 +3253,13 @@ function Wt() {
|
|
|
3253
3253
|
};
|
|
3254
3254
|
}
|
|
3255
3255
|
function ae() {
|
|
3256
|
-
return
|
|
3256
|
+
return p.useContext(zt);
|
|
3257
3257
|
}
|
|
3258
3258
|
function La(e) {
|
|
3259
|
-
const [t, n] =
|
|
3259
|
+
const [t, n] = p.useState(""), { selected: r } = Wt(), { t: o } = L(), s = qt(), { massActions: a } = ae(), l = (u) => {
|
|
3260
3260
|
n(u.target.value);
|
|
3261
3261
|
};
|
|
3262
|
-
if (
|
|
3262
|
+
if (p.useEffect(() => {
|
|
3263
3263
|
r.isEmpty() && n("");
|
|
3264
3264
|
}, [r]), a.length === 0)
|
|
3265
3265
|
return null;
|
|
@@ -3335,7 +3335,7 @@ const Ba = () => {
|
|
|
3335
3335
|
children: /* @__PURE__ */ i(Tn, {})
|
|
3336
3336
|
}
|
|
3337
3337
|
);
|
|
3338
|
-
}, Ve =
|
|
3338
|
+
}, Ve = p.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
|
|
3339
3339
|
lt,
|
|
3340
3340
|
{
|
|
3341
3341
|
component: Re,
|
|
@@ -3353,7 +3353,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3353
3353
|
"Last »": /* @__PURE__ */ i(Dn, {}),
|
|
3354
3354
|
"« First": /* @__PURE__ */ i(On, {})
|
|
3355
3355
|
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }), Ma = ({ variant: e = "default", ...t }) => {
|
|
3356
|
-
const n = e === "default", [r, o] = K(), [s, a] =
|
|
3356
|
+
const n = e === "default", [r, o] = K(), [s, a] = p.useState(r.get("page") || "1"), {
|
|
3357
3357
|
links: l,
|
|
3358
3358
|
meta: {
|
|
3359
3359
|
current_page: d = 1,
|
|
@@ -3361,14 +3361,14 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3361
3361
|
last_page: c = 1
|
|
3362
3362
|
} = {}
|
|
3363
3363
|
} = Se(), {
|
|
3364
|
-
first:
|
|
3364
|
+
first: h,
|
|
3365
3365
|
prev: y,
|
|
3366
3366
|
next: S,
|
|
3367
3367
|
last: b
|
|
3368
3368
|
} = l || {}, m = (x) => {
|
|
3369
3369
|
x.preventDefault(), o((A) => (A.set("page", s || "1"), A));
|
|
3370
3370
|
}, g = [
|
|
3371
|
-
{ url: d > 1 ?
|
|
3371
|
+
{ url: d > 1 ? h : null, label: "« First", active: !1 },
|
|
3372
3372
|
{ url: y, label: "« Previous", active: !1 },
|
|
3373
3373
|
{
|
|
3374
3374
|
element: /* @__PURE__ */ i(
|
|
@@ -3412,7 +3412,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3412
3412
|
{ url: S, label: "Next »", active: !1 },
|
|
3413
3413
|
{ url: d < c ? b : null, label: "Last »", active: !1 }
|
|
3414
3414
|
];
|
|
3415
|
-
return
|
|
3415
|
+
return p.useEffect(() => {
|
|
3416
3416
|
d && a(String(d));
|
|
3417
3417
|
}, [d]), /* @__PURE__ */ i(
|
|
3418
3418
|
N,
|
|
@@ -3516,8 +3516,8 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3516
3516
|
);
|
|
3517
3517
|
};
|
|
3518
3518
|
function Ua(e, t) {
|
|
3519
|
-
const [n, r] =
|
|
3520
|
-
return
|
|
3519
|
+
const [n, r] = p.useState(!1);
|
|
3520
|
+
return p.useEffect(() => {
|
|
3521
3521
|
const o = /* @__PURE__ */ new Set(), s = (l) => {
|
|
3522
3522
|
o.add(l.key), e.every((d) => o.has(d)) && (r(!0), t && t());
|
|
3523
3523
|
}, a = (l) => {
|
|
@@ -3539,8 +3539,8 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3539
3539
|
return e ? r.set("q", e) : r.delete("q"), r;
|
|
3540
3540
|
});
|
|
3541
3541
|
}, 500), Ha = () => {
|
|
3542
|
-
const [e, t] = K(), n = e.get("q") || "", [r, o] =
|
|
3543
|
-
|
|
3542
|
+
const [e, t] = K(), n = e.get("q") || "", [r, o] = p.useState(n), [s, a] = p.useState(!1), l = p.useRef(null), { t: d } = L();
|
|
3543
|
+
p.useEffect(() => {
|
|
3544
3544
|
o(n);
|
|
3545
3545
|
}, [n]);
|
|
3546
3546
|
const u = (y) => {
|
|
@@ -3549,7 +3549,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3549
3549
|
Ua(["Control", "/"], () => {
|
|
3550
3550
|
l.current.focus();
|
|
3551
3551
|
});
|
|
3552
|
-
const
|
|
3552
|
+
const h = c ? 300 : "calc(100vw - 58px)";
|
|
3553
3553
|
return /* @__PURE__ */ w(B, { children: [
|
|
3554
3554
|
!c && !s && /* @__PURE__ */ i(q, { color: "inherit", onClick: () => a(!0), children: /* @__PURE__ */ i(
|
|
3555
3555
|
Ot,
|
|
@@ -3587,7 +3587,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3587
3587
|
},
|
|
3588
3588
|
onChange: u,
|
|
3589
3589
|
onBlur: () => a(!1),
|
|
3590
|
-
sx: { width:
|
|
3590
|
+
sx: { width: h },
|
|
3591
3591
|
size: "small"
|
|
3592
3592
|
}
|
|
3593
3593
|
)
|
|
@@ -3606,10 +3606,10 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3606
3606
|
const { t: e } = L(), [t, n] = K(), {
|
|
3607
3607
|
columns: r,
|
|
3608
3608
|
Model: o
|
|
3609
|
-
} = ae(), s = t.get("order_by") || "", [a = "", l = ""] = s.split(":"), [d, u] =
|
|
3609
|
+
} = ae(), s = t.get("order_by") || "", [a = "", l = ""] = s.split(":"), [d, u] = p.useState(a), [c, h] = p.useState(l), [y, S] = p.useState(!1), b = () => {
|
|
3610
3610
|
S(!0);
|
|
3611
3611
|
}, m = () => {
|
|
3612
|
-
S(!1), u(a),
|
|
3612
|
+
S(!1), u(a), h(l);
|
|
3613
3613
|
}, g = () => {
|
|
3614
3614
|
if (!d || !c) {
|
|
3615
3615
|
S(!1);
|
|
@@ -3623,7 +3623,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3623
3623
|
n((A) => {
|
|
3624
3624
|
const E = new URLSearchParams(A);
|
|
3625
3625
|
return E.delete("order_by"), E;
|
|
3626
|
-
}), S(!1), u(""),
|
|
3626
|
+
}), S(!1), u(""), h("");
|
|
3627
3627
|
};
|
|
3628
3628
|
return /* @__PURE__ */ w(B, { children: [
|
|
3629
3629
|
/* @__PURE__ */ i(q, { onClick: b, children: /* @__PURE__ */ i(
|
|
@@ -3653,7 +3653,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3653
3653
|
{
|
|
3654
3654
|
value: d,
|
|
3655
3655
|
onChange: (A) => {
|
|
3656
|
-
u(A.target.value), c ||
|
|
3656
|
+
u(A.target.value), c || h("asc");
|
|
3657
3657
|
},
|
|
3658
3658
|
children: [
|
|
3659
3659
|
/* @__PURE__ */ i($, { variant: "caption", children: e("Column") }),
|
|
@@ -3662,7 +3662,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3662
3662
|
Ke,
|
|
3663
3663
|
{
|
|
3664
3664
|
value: A,
|
|
3665
|
-
control: /* @__PURE__ */ i(
|
|
3665
|
+
control: /* @__PURE__ */ i(Ye, {}),
|
|
3666
3666
|
label: E
|
|
3667
3667
|
},
|
|
3668
3668
|
A
|
|
@@ -3676,13 +3676,13 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3676
3676
|
$t,
|
|
3677
3677
|
{
|
|
3678
3678
|
value: c,
|
|
3679
|
-
onChange: (A) =>
|
|
3679
|
+
onChange: (A) => h(A.target.value),
|
|
3680
3680
|
children: [
|
|
3681
3681
|
/* @__PURE__ */ i(
|
|
3682
3682
|
Ke,
|
|
3683
3683
|
{
|
|
3684
3684
|
value: "asc",
|
|
3685
|
-
control: /* @__PURE__ */ i(
|
|
3685
|
+
control: /* @__PURE__ */ i(Ye, {}),
|
|
3686
3686
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3687
3687
|
e("Ascending"),
|
|
3688
3688
|
/* @__PURE__ */ i(Pn, {})
|
|
@@ -3693,7 +3693,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3693
3693
|
Ke,
|
|
3694
3694
|
{
|
|
3695
3695
|
value: "desc",
|
|
3696
|
-
control: /* @__PURE__ */ i(
|
|
3696
|
+
control: /* @__PURE__ */ i(Ye, {}),
|
|
3697
3697
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3698
3698
|
e("Descending"),
|
|
3699
3699
|
/* @__PURE__ */ i(vn, {})
|
|
@@ -3711,17 +3711,17 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3711
3711
|
] })
|
|
3712
3712
|
] });
|
|
3713
3713
|
}, Va = ({ items: e, loading: t, children: n, error: r }) => {
|
|
3714
|
-
const o = te(), s =
|
|
3714
|
+
const o = te(), s = p.useMemo(() => V([]), [o, e]), [a] = K(), l = a.get("tab") ?? "all", d = p.useMemo(() => [
|
|
3715
3715
|
{
|
|
3716
3716
|
key: o.getSchema().labeledBy,
|
|
3717
3717
|
label: k.human(o.getSchema().labeledBy)
|
|
3718
3718
|
}
|
|
3719
|
-
], [o]), u = v(), c =
|
|
3719
|
+
], [o]), u = v(), c = p.useMemo(() => T("cms").getMassActions(o, l), [o, l]), h = xt(
|
|
3720
3720
|
T("cms"),
|
|
3721
3721
|
`model${k.studly(o.getSchemaName())}Columns`,
|
|
3722
3722
|
d
|
|
3723
|
-
), S = (u ?
|
|
3724
|
-
columns:
|
|
3723
|
+
), S = (u ? h.length : 1) + (c.length > 0 ? 2 : 1), b = {
|
|
3724
|
+
columns: h,
|
|
3725
3725
|
columnCount: S,
|
|
3726
3726
|
massActions: c,
|
|
3727
3727
|
items: e,
|
|
@@ -3755,7 +3755,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3755
3755
|
allSelected: u,
|
|
3756
3756
|
handleSelectToggleAll: c
|
|
3757
3757
|
} = Wt(), {
|
|
3758
|
-
["ModelIndex.Table.ShrinkedCell"]:
|
|
3758
|
+
["ModelIndex.Table.ShrinkedCell"]: h
|
|
3759
3759
|
} = T("cms").getComponents(), y = a.get("order_by") || "", [S, b] = y.split(":"), m = (g) => () => {
|
|
3760
3760
|
l(S === g ? (x) => {
|
|
3761
3761
|
const A = new URLSearchParams(x);
|
|
@@ -3768,7 +3768,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3768
3768
|
return /* @__PURE__ */ w($r, { ...t, children: [
|
|
3769
3769
|
e,
|
|
3770
3770
|
s && /* @__PURE__ */ w(fe, { children: [
|
|
3771
|
-
n.length > 0 && /* @__PURE__ */ i(
|
|
3771
|
+
n.length > 0 && /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
|
|
3772
3772
|
Rt,
|
|
3773
3773
|
{
|
|
3774
3774
|
indeterminate: d,
|
|
@@ -3797,10 +3797,10 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3797
3797
|
},
|
|
3798
3798
|
g
|
|
3799
3799
|
)),
|
|
3800
|
-
/* @__PURE__ */ i(
|
|
3800
|
+
/* @__PURE__ */ i(h, {})
|
|
3801
3801
|
] })
|
|
3802
3802
|
] });
|
|
3803
|
-
},
|
|
3803
|
+
}, Ya = () => {
|
|
3804
3804
|
const {
|
|
3805
3805
|
massActions: e,
|
|
3806
3806
|
columns: t
|
|
@@ -3809,7 +3809,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3809
3809
|
} = T("cms").getComponents(), [o] = K(), s = parseInt(o.get("per_page") || "15");
|
|
3810
3810
|
return /* @__PURE__ */ i(B, { children: Array.from({ length: s }).map((a, l) => /* @__PURE__ */ w(fe, { children: [
|
|
3811
3811
|
e.length > 0 && /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(Rt, {}) }),
|
|
3812
|
-
n && t.map(({ key: d, label: u, sortable: c, ...
|
|
3812
|
+
n && t.map(({ key: d, label: u, sortable: c, ...h }, y) => /* @__PURE__ */ i(ee, { ...h, children: /* @__PURE__ */ i(
|
|
3813
3813
|
Kt,
|
|
3814
3814
|
{
|
|
3815
3815
|
variant: "text",
|
|
@@ -3827,16 +3827,16 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3827
3827
|
)) }),
|
|
3828
3828
|
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(Pt, {}) }) })
|
|
3829
3829
|
] }, l)) });
|
|
3830
|
-
},
|
|
3830
|
+
}, Ja = ({ children: e, ...t }) => {
|
|
3831
3831
|
const n = te(), { t: r } = L(), {
|
|
3832
3832
|
items: o,
|
|
3833
3833
|
loading: s,
|
|
3834
3834
|
columnCount: a
|
|
3835
3835
|
} = ae(), {
|
|
3836
3836
|
["ModelIndex.StaticActions"]: l
|
|
3837
|
-
} = T("cms").getComponents(), d =
|
|
3838
|
-
return /* @__PURE__ */ w(
|
|
3839
|
-
s && /* @__PURE__ */ i(
|
|
3837
|
+
} = T("cms").getComponents(), d = p.isValidElement(e) ? e : (o || V([])).map(e);
|
|
3838
|
+
return /* @__PURE__ */ w(Yr, { ...t, children: [
|
|
3839
|
+
s && /* @__PURE__ */ i(Ya, {}),
|
|
3840
3840
|
d,
|
|
3841
3841
|
o && !o.count() && /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
|
|
3842
3842
|
/* @__PURE__ */ i($, { children: r("No :model found", {
|
|
@@ -3859,7 +3859,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3859
3859
|
"& label": {
|
|
3860
3860
|
fontWeight: "bold"
|
|
3861
3861
|
}
|
|
3862
|
-
})), Za = ({ content: e }) => ["string", "number"].includes(typeof e) ? /* @__PURE__ */ i(de, { children: e }) : e instanceof Date ? /* @__PURE__ */ i(de, { children: e.toLocaleString(oe("app.locale", "en")) }) : typeof e == "object" && !
|
|
3862
|
+
})), Za = ({ content: e }) => ["string", "number"].includes(typeof e) ? /* @__PURE__ */ i(de, { children: e }) : e instanceof Date ? /* @__PURE__ */ i(de, { children: e.toLocaleString(oe("app.locale", "en")) }) : typeof e == "object" && !p.isValidElement(e) ? /* @__PURE__ */ i(de, { children: JSON.stringify(e) }) : /* @__PURE__ */ i(p.Fragment, { children: e }), Xa = ({ label: e, content: t }) => ["string", "number"].includes(typeof t) ? /* @__PURE__ */ w(de, { children: [
|
|
3863
3863
|
/* @__PURE__ */ w("label", { children: [
|
|
3864
3864
|
e,
|
|
3865
3865
|
":"
|
|
@@ -3872,14 +3872,14 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3872
3872
|
":"
|
|
3873
3873
|
] }),
|
|
3874
3874
|
t.toLocaleString(oe("app.locale", "en"))
|
|
3875
|
-
] }) : typeof t == "object" && !
|
|
3875
|
+
] }) : typeof t == "object" && !p.isValidElement(t) ? /* @__PURE__ */ w(de, { children: [
|
|
3876
3876
|
/* @__PURE__ */ w("label", { children: [
|
|
3877
3877
|
e,
|
|
3878
3878
|
":"
|
|
3879
3879
|
] }),
|
|
3880
3880
|
" ",
|
|
3881
3881
|
JSON.stringify(t)
|
|
3882
|
-
] }) : /* @__PURE__ */ w(
|
|
3882
|
+
] }) : /* @__PURE__ */ w(p.Fragment, { children: [
|
|
3883
3883
|
/* @__PURE__ */ i($, { sx: { display: "inline" }, children: /* @__PURE__ */ w("b", { children: [
|
|
3884
3884
|
e,
|
|
3885
3885
|
":"
|
|
@@ -3887,16 +3887,16 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3887
3887
|
" ",
|
|
3888
3888
|
t
|
|
3889
3889
|
] }), Qa = ({ item: e, ...t }) => {
|
|
3890
|
-
const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l =
|
|
3890
|
+
const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l = p.useMemo(() => a.map((y) => ({
|
|
3891
3891
|
...y,
|
|
3892
|
-
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](G.get(e
|
|
3892
|
+
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](G.get(e, y.key), e)
|
|
3893
3893
|
//
|
|
3894
3894
|
})), [a, e]), {
|
|
3895
3895
|
["ModelIndex.Table.ShrinkedCell"]: d,
|
|
3896
3896
|
["ModelIndex.InstanceActions"]: u
|
|
3897
3897
|
} = I.getComponents(), {
|
|
3898
3898
|
isSelected: c,
|
|
3899
|
-
handleSelectToggle:
|
|
3899
|
+
handleSelectToggle: h
|
|
3900
3900
|
} = Wt();
|
|
3901
3901
|
return /* @__PURE__ */ w(
|
|
3902
3902
|
fe,
|
|
@@ -3910,7 +3910,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3910
3910
|
Rt,
|
|
3911
3911
|
{
|
|
3912
3912
|
checked: c(e),
|
|
3913
|
-
onChange: () =>
|
|
3913
|
+
onChange: () => h(e)
|
|
3914
3914
|
}
|
|
3915
3915
|
) }),
|
|
3916
3916
|
n && l.map(({ key: y, label: S, sortable: b, content: m, ...g }) => /* @__PURE__ */ i(
|
|
@@ -3952,7 +3952,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3952
3952
|
["ModelIndex.PaginationDetails"]: a,
|
|
3953
3953
|
["ModelIndex.PerPageSwitch"]: l
|
|
3954
3954
|
} = T("cms").getComponents();
|
|
3955
|
-
return /* @__PURE__ */ w(
|
|
3955
|
+
return /* @__PURE__ */ w(Jr, { ...t, children: [
|
|
3956
3956
|
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
|
|
3957
3957
|
N,
|
|
3958
3958
|
{
|
|
@@ -4043,7 +4043,7 @@ function ni() {
|
|
|
4043
4043
|
const c = new URLSearchParams();
|
|
4044
4044
|
return u !== "all" && c.set("tab", u), c;
|
|
4045
4045
|
});
|
|
4046
|
-
}, a =
|
|
4046
|
+
}, a = p.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l = xt(
|
|
4047
4047
|
T("cms"),
|
|
4048
4048
|
`model${k.studly(e.getSchemaName())}Tabs`,
|
|
4049
4049
|
a
|
|
@@ -4059,14 +4059,14 @@ function ni() {
|
|
|
4059
4059
|
allowScrollButtonsMobile: !0,
|
|
4060
4060
|
children: [
|
|
4061
4061
|
/* @__PURE__ */ i(
|
|
4062
|
-
|
|
4062
|
+
Yt,
|
|
4063
4063
|
{
|
|
4064
4064
|
label: t("All"),
|
|
4065
4065
|
value: "all"
|
|
4066
4066
|
}
|
|
4067
4067
|
),
|
|
4068
4068
|
l.map((d) => /* @__PURE__ */ i(
|
|
4069
|
-
|
|
4069
|
+
Yt,
|
|
4070
4070
|
{
|
|
4071
4071
|
label: d.label,
|
|
4072
4072
|
value: d.value
|
|
@@ -4120,13 +4120,13 @@ function ri(e) {
|
|
|
4120
4120
|
}
|
|
4121
4121
|
);
|
|
4122
4122
|
}
|
|
4123
|
-
const
|
|
4123
|
+
const hr = ({
|
|
4124
4124
|
collapsed: e = !1,
|
|
4125
4125
|
items: t,
|
|
4126
4126
|
onClick: n,
|
|
4127
4127
|
...r
|
|
4128
4128
|
}) => {
|
|
4129
|
-
const [o, s] =
|
|
4129
|
+
const [o, s] = p.useState(null), [a, l] = p.useState(null), [d, u] = p.useState({}), c = z("drawer.width", 280), h = T("cms").getComponent("RecursiveMenu");
|
|
4130
4130
|
return /* @__PURE__ */ w(Xr, { ...r, children: [
|
|
4131
4131
|
t.map((y) => {
|
|
4132
4132
|
const {
|
|
@@ -4204,7 +4204,7 @@ const pr = ({
|
|
|
4204
4204
|
timeout: "auto",
|
|
4205
4205
|
unmountOnExit: !0,
|
|
4206
4206
|
children: /* @__PURE__ */ i(
|
|
4207
|
-
|
|
4207
|
+
hr,
|
|
4208
4208
|
{
|
|
4209
4209
|
items: x,
|
|
4210
4210
|
onClick: n,
|
|
@@ -4220,7 +4220,7 @@ const pr = ({
|
|
|
4220
4220
|
);
|
|
4221
4221
|
}),
|
|
4222
4222
|
e && /* @__PURE__ */ i(
|
|
4223
|
-
|
|
4223
|
+
h,
|
|
4224
4224
|
{
|
|
4225
4225
|
items: a || [],
|
|
4226
4226
|
onClick: n,
|
|
@@ -4236,20 +4236,20 @@ const pr = ({
|
|
|
4236
4236
|
}
|
|
4237
4237
|
)
|
|
4238
4238
|
] });
|
|
4239
|
-
},
|
|
4239
|
+
}, pr = ({
|
|
4240
4240
|
collapsed: e = !1,
|
|
4241
4241
|
items: t,
|
|
4242
4242
|
onClick: n,
|
|
4243
4243
|
...r
|
|
4244
4244
|
}) => {
|
|
4245
|
-
const [o, s] =
|
|
4245
|
+
const [o, s] = p.useState({}), a = z("drawer.width", 280);
|
|
4246
4246
|
return /* @__PURE__ */ w(B, { children: [
|
|
4247
4247
|
/* @__PURE__ */ i(An, { ...r, children: t.map((l) => {
|
|
4248
4248
|
const {
|
|
4249
4249
|
text: d,
|
|
4250
4250
|
icon: u,
|
|
4251
4251
|
element: c = null,
|
|
4252
|
-
key:
|
|
4252
|
+
key: h,
|
|
4253
4253
|
children: y,
|
|
4254
4254
|
onClick: S,
|
|
4255
4255
|
to: b
|
|
@@ -4261,7 +4261,7 @@ const pr = ({
|
|
|
4261
4261
|
if (S && S(m), y) {
|
|
4262
4262
|
s({
|
|
4263
4263
|
...o,
|
|
4264
|
-
[
|
|
4264
|
+
[h]: o[h] ? null : m.currentTarget
|
|
4265
4265
|
});
|
|
4266
4266
|
return;
|
|
4267
4267
|
}
|
|
@@ -4289,13 +4289,13 @@ const pr = ({
|
|
|
4289
4289
|
!e && y && /* @__PURE__ */ i(Ue, {})
|
|
4290
4290
|
]
|
|
4291
4291
|
},
|
|
4292
|
-
|
|
4292
|
+
h
|
|
4293
4293
|
);
|
|
4294
4294
|
}) }),
|
|
4295
4295
|
t.map((l) => {
|
|
4296
4296
|
const { key: d, children: u } = l;
|
|
4297
4297
|
return u ? /* @__PURE__ */ i(
|
|
4298
|
-
|
|
4298
|
+
pr,
|
|
4299
4299
|
{
|
|
4300
4300
|
items: u,
|
|
4301
4301
|
onClick: n,
|
|
@@ -4428,7 +4428,7 @@ const pr = ({
|
|
|
4428
4428
|
t(`/${k.kebab(e.plural())}/create`);
|
|
4429
4429
|
}
|
|
4430
4430
|
}, si = ({ item: e }) => {
|
|
4431
|
-
const t = qt(), [n] = K(), r = n.get("tab") ?? "all", o =
|
|
4431
|
+
const t = qt(), [n] = K(), r = n.get("tab") ?? "all", o = p.useMemo(() => T("cms").getInstanceActions(e.constructor, r), [e, r]), [s, a] = p.useState(null), l = !!s, d = (c) => {
|
|
4432
4432
|
a(c.currentTarget);
|
|
4433
4433
|
}, u = () => {
|
|
4434
4434
|
a(null);
|
|
@@ -4665,13 +4665,13 @@ class di {
|
|
|
4665
4665
|
return "icon";
|
|
4666
4666
|
}
|
|
4667
4667
|
}
|
|
4668
|
-
const ke = Ft(di, St), fi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABbWlDQ1BpY2MAACiRdZG9S0JRGMZ/aqWU0VBDRIOBRYORFERj2eAiIWaQ1aI3PwI/LvcqIa1BS4PQELX0NfQf1Bq0FgRBEUQ0Nve1hNzeo4ISdS7nvj+ec56Xc54D9lBWy5ltfsjli0YkGPAsxZY9zldcdADjDMU1U58Nh0P8O77usal6N6Z6/b/vz9G1ljQ1sLmEpzTdKArPCIc2irriHeE+LRNfEz4S9hlyQOFrpSfq/KI4XecPxUY0Mgd21dOTbuFEC2sZIyc8KuzNZUta4zzqJu5kfnFB6oDMQUwiBAngIUGJdbIUGZOal8z+9vlrvnkK4tHkr1PGEEeajHh9opaka1JqSvSkfFnKKvffeZqpyYl6d3cA2p8t630YnLtQrVjW97FlVU/A8QSX+aa/IDlNf4peaWreQ+jZgvOrppbYg4tt6H/U40a8Jjlk2lMpeDuD7hj03kLnSj2rxjqnDxDdlCe6gf0DGJH9Pas/3QVn+hiI/rEAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAWBSURBVFhHxZl/TFtVFMe/pZQOGMIA0W3iBgOloLIBzrkZJsuWmCwah/8sYW4my0QYc1NijM5o1MQ4/3B/CUb/0Bn+mTHzD4PjRxEUxEGmcWb8VsbPTTYYDBjQFlrPubTQ0va9+6qdJ3lp+t69537eOfeec+59OpAklpWvQkhICV0FsNvT4XCE8X0tYrPb8WBsLL7L34eoMPnukxYrjpprYe4fgEGvtxJDOzFU0PXJYHHRnC6x/NNwAqnQGY35WFiAY35eC9dSWwv1Ld+zB/kPpEr3H52dR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q4BTUeSEY31vZzOwYmbOFfRuevM6ot++oAAAAASUVORK5CYII=";
|
|
4669
|
+
function pi() {
|
|
4670
4670
|
const e = Me("(prefers-color-scheme: dark)"), t = dr();
|
|
4671
4671
|
return /* @__PURE__ */ i(
|
|
4672
4672
|
to,
|
|
4673
4673
|
{
|
|
4674
|
-
src: e ? fi :
|
|
4674
|
+
src: e ? fi : hi,
|
|
4675
4675
|
alt: "Luminix",
|
|
4676
4676
|
variant: "square",
|
|
4677
4677
|
sx: {
|
|
@@ -4744,11 +4744,11 @@ const Ie = class Ie extends Mn {
|
|
|
4744
4744
|
ModelItem: aa,
|
|
4745
4745
|
Error: xo,
|
|
4746
4746
|
DesktopPageTitle: Sa,
|
|
4747
|
-
RecursiveList:
|
|
4748
|
-
RecursiveMenu:
|
|
4747
|
+
RecursiveList: hr,
|
|
4748
|
+
RecursiveMenu: pr,
|
|
4749
4749
|
Breadcrumbs: ri,
|
|
4750
|
-
"Layout.AppBar":
|
|
4751
|
-
"Layout.AppLogo":
|
|
4750
|
+
"Layout.AppBar": pa,
|
|
4751
|
+
"Layout.AppLogo": pi,
|
|
4752
4752
|
"Layout.Drawer": wa,
|
|
4753
4753
|
"Layout.AppBar.MenuButton": Ba,
|
|
4754
4754
|
"Layout.SearchBar": Ha,
|
|
@@ -4763,7 +4763,7 @@ const Ie = class Ie extends Mn {
|
|
|
4763
4763
|
"ModelIndex.StaticActions": da,
|
|
4764
4764
|
"ModelIndex.Table": $a,
|
|
4765
4765
|
"ModelIndex.Table.TableHead": Ka,
|
|
4766
|
-
"ModelIndex.Table.TableBody":
|
|
4766
|
+
"ModelIndex.Table.TableBody": Ja,
|
|
4767
4767
|
"ModelIndex.Table.TableFooter": ei,
|
|
4768
4768
|
"ModelIndex.Table.TableToolbar": ti,
|
|
4769
4769
|
"ModelIndex.Table.TableBody.TableRow": Qa,
|
|
@@ -4877,7 +4877,7 @@ class mi extends Mn {
|
|
|
4877
4877
|
this.translateModelColumns(), this.translateMenuEntries(), this.translateInstanceActions(), this.translateMassActions(), this.translateFormLabels(), this.translateStaticActions();
|
|
4878
4878
|
}
|
|
4879
4879
|
initI18Next() {
|
|
4880
|
-
|
|
4880
|
+
J.use(oo).init({
|
|
4881
4881
|
lng: re.get("app.locale", "en"),
|
|
4882
4882
|
fallbackLng: re.get("app.fallback_locale", "en"),
|
|
4883
4883
|
resources: {
|
|
@@ -4903,10 +4903,10 @@ class mi extends Mn {
|
|
|
4903
4903
|
"model",
|
|
4904
4904
|
(t) => class extends t {
|
|
4905
4905
|
static singular() {
|
|
4906
|
-
return
|
|
4906
|
+
return J.t(t.singular());
|
|
4907
4907
|
}
|
|
4908
4908
|
static plural() {
|
|
4909
|
-
return
|
|
4909
|
+
return J.t(t.plural());
|
|
4910
4910
|
}
|
|
4911
4911
|
},
|
|
4912
4912
|
0
|
|
@@ -4918,7 +4918,7 @@ class mi extends Mn {
|
|
|
4918
4918
|
`model${k.studly(t)}Columns`,
|
|
4919
4919
|
(n) => n.map((r) => ({
|
|
4920
4920
|
...r,
|
|
4921
|
-
label:
|
|
4921
|
+
label: J.t(r.label)
|
|
4922
4922
|
})),
|
|
4923
4923
|
99
|
|
4924
4924
|
);
|
|
@@ -4928,7 +4928,7 @@ class mi extends Mn {
|
|
|
4928
4928
|
"menuItems",
|
|
4929
4929
|
(t) => {
|
|
4930
4930
|
const n = t.find((r) => r.key === "dashboard");
|
|
4931
|
-
return n && (n.text =
|
|
4931
|
+
return n && (n.text = J.t(n.text)), t;
|
|
4932
4932
|
},
|
|
4933
4933
|
5
|
|
4934
4934
|
);
|
|
@@ -4938,7 +4938,7 @@ class mi extends Mn {
|
|
|
4938
4938
|
"massActions",
|
|
4939
4939
|
(t) => t.map((n) => ({
|
|
4940
4940
|
...n,
|
|
4941
|
-
label:
|
|
4941
|
+
label: J.t(n.label)
|
|
4942
4942
|
})),
|
|
4943
4943
|
99
|
|
4944
4944
|
);
|
|
@@ -4948,7 +4948,7 @@ class mi extends Mn {
|
|
|
4948
4948
|
"instanceActions",
|
|
4949
4949
|
(t) => t.map((n) => ({
|
|
4950
4950
|
...n,
|
|
4951
|
-
label:
|
|
4951
|
+
label: J.t(n.label)
|
|
4952
4952
|
})),
|
|
4953
4953
|
99
|
|
4954
4954
|
);
|
|
@@ -4958,7 +4958,7 @@ class mi extends Mn {
|
|
|
4958
4958
|
"staticActions",
|
|
4959
4959
|
(t, n) => {
|
|
4960
4960
|
const r = t.find(({ key: o }) => o === "create");
|
|
4961
|
-
return r && (r.label =
|
|
4961
|
+
return r && (r.label = J.t("Create :model", {
|
|
4962
4962
|
model: n.singular()
|
|
4963
4963
|
})), t;
|
|
4964
4964
|
}
|
|
@@ -4968,8 +4968,8 @@ class mi extends Mn {
|
|
|
4968
4968
|
Er.reducer(
|
|
4969
4969
|
"getDefaultInputProps",
|
|
4970
4970
|
(t) => (Array.isArray(t) ? t.map((n) => {
|
|
4971
|
-
n != null && n.label && (n.label =
|
|
4972
|
-
}) : t != null && t.label && (t.label =
|
|
4971
|
+
n != null && n.label && (n.label = J.t(n.label));
|
|
4972
|
+
}) : t != null && t.label && (t.label = J.t(t.label)), t),
|
|
4973
4973
|
99
|
|
4974
4974
|
);
|
|
4975
4975
|
}
|
|
@@ -4983,19 +4983,19 @@ const gi = {
|
|
|
4983
4983
|
main: "#fa510c"
|
|
4984
4984
|
}
|
|
4985
4985
|
}
|
|
4986
|
-
}, bi = (e) => e.make("cms").getRoutes(),
|
|
4986
|
+
}, bi = (e) => e.make("cms").getRoutes(), Ji = ({
|
|
4987
4987
|
theme: e = gi,
|
|
4988
4988
|
themeArgs: t,
|
|
4989
4989
|
providers: n,
|
|
4990
4990
|
...r
|
|
4991
4991
|
}) => {
|
|
4992
|
-
const o = Me("(prefers-color-scheme: dark)"), s =
|
|
4992
|
+
const o = Me("(prefers-color-scheme: dark)"), s = p.useMemo(() => co({
|
|
4993
4993
|
...e,
|
|
4994
4994
|
palette: {
|
|
4995
4995
|
...e.palette,
|
|
4996
4996
|
mode: o ? "dark" : "light"
|
|
4997
4997
|
}
|
|
4998
|
-
}, ...t ?? []), [e, o, t]), a =
|
|
4998
|
+
}, ...t ?? []), [e, o, t]), a = p.useMemo(() => [
|
|
4999
4999
|
wt,
|
|
5000
5000
|
mi,
|
|
5001
5001
|
...n || []
|
|
@@ -5024,9 +5024,9 @@ export {
|
|
|
5024
5024
|
go as DialogProvider,
|
|
5025
5025
|
Gi as Filter,
|
|
5026
5026
|
ke as Icon,
|
|
5027
|
-
|
|
5027
|
+
po as LayoutProvider,
|
|
5028
5028
|
Ve as Link,
|
|
5029
|
-
|
|
5029
|
+
Ji as LuminixCms,
|
|
5030
5030
|
Ge as ModelProvider,
|
|
5031
5031
|
yo as NotificationProvider,
|
|
5032
5032
|
mi as i18NextServiceProvider,
|