@luminix/mui-cms 0.1.17 → 0.1.19
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 +294 -294
- package/package.json +3 -3
package/dist/mui-cms.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var gr = Object.defineProperty;
|
|
2
2
|
var br = (e, t, n) => t in e ? gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var $e = (e, t, n) => br(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { config as oe, collect as
|
|
5
|
-
import { jsx as i, jsxs as w, Fragment as
|
|
4
|
+
import { config as oe, collect as V, app as T, model as ye, App as St, Model as Oe, Route as yr, Config as re } from "@luminix/core";
|
|
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
|
|
9
|
-
import
|
|
10
|
-
import { useTranslation as
|
|
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 Je, TableContainer as Wr, Table as Vr, TableHead as $r, TableRow as fe, Checkbox as Rt, TableSortLabel as Kr, Skeleton as Kt, TableBody as Jr, TableFooter as Yr, Tabs as Gr, Tab as Jt, 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
|
+
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
14
|
import Yt from "react-dom";
|
|
15
15
|
import Y from "i18next";
|
|
16
|
-
const
|
|
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), Ye = 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
|
|
44
|
+
return p.useEffect(() => (document.title = r ? `${r} | ${oe("app.name", Ye)}` : oe("app.name", Ye), () => {
|
|
45
45
|
document.title = Ye;
|
|
46
|
-
}), [r]), /* @__PURE__ */ i(X.Provider, { value:
|
|
47
|
-
}, Nn =
|
|
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,18 +54,18 @@ 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
|
-
}), []), { t: l } =
|
|
68
|
+
}), []), { t: l } = L(), d = () => {
|
|
69
69
|
r && r(!1), o({});
|
|
70
70
|
}, u = () => {
|
|
71
71
|
r && r(!0), o({});
|
|
@@ -89,7 +89,7 @@ function go({ children: e, ...t }) {
|
|
|
89
89
|
(s == null ? void 0 : s.title) && /* @__PURE__ */ i(Et, { id: "alert-dialog-title", children: s.title }),
|
|
90
90
|
/* @__PURE__ */ i(kt, { children: /* @__PURE__ */ i(Tr, { id: "alert-dialog-description", children: s == null ? void 0 : s.message }) }),
|
|
91
91
|
/* @__PURE__ */ w(Tt, { children: [
|
|
92
|
-
(s == null ? void 0 : s.type) === "confirm" && /* @__PURE__ */ w(
|
|
92
|
+
(s == null ? void 0 : s.type) === "confirm" && /* @__PURE__ */ w(B, { children: [
|
|
93
93
|
/* @__PURE__ */ i(M, { onClick: d, children: (s == null ? void 0 : s.cancelText) ?? l("No") }),
|
|
94
94
|
/* @__PURE__ */ i(M, { onClick: u, autoFocus: !0, children: (s == null ? void 0 : s.confirmText) ?? l("Yes") })
|
|
95
95
|
] }),
|
|
@@ -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
|
},
|
|
@@ -115,7 +115,7 @@ const Lt = h.createContext({
|
|
|
115
115
|
displacement: "8px",
|
|
116
116
|
setDisplacement: () => {
|
|
117
117
|
}
|
|
118
|
-
}), dt =
|
|
118
|
+
}), dt = V([]), bo = (e) => {
|
|
119
119
|
dt.push(
|
|
120
120
|
typeof e == "string" ? { message: e } : e
|
|
121
121
|
);
|
|
@@ -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,24 +237,24 @@ 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
|
}
|
|
245
245
|
const Ao = () => {
|
|
246
|
-
const { t: e } =
|
|
247
|
-
return Bt(e("Dashboard")), /* @__PURE__ */ i(
|
|
246
|
+
const { t: e } = L();
|
|
247
|
+
return Bt(e("Dashboard")), /* @__PURE__ */ i(H, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: "Dashboard" });
|
|
248
248
|
}, xo = ({ error: e }) => /* @__PURE__ */ w("div", { children: [
|
|
249
249
|
/* @__PURE__ */ i("h1", { children: "Ops..." }),
|
|
250
250
|
/* @__PURE__ */ i("p", { children: "Something went wrong" }),
|
|
251
|
-
T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(
|
|
251
|
+
T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(B, { children: /* @__PURE__ */ w("pre", { style: { whiteSpace: "pre-wrap" }, children: [
|
|
252
252
|
e.message,
|
|
253
253
|
/* @__PURE__ */ i("br", {}),
|
|
254
254
|
e.stack
|
|
255
255
|
] }) })
|
|
256
256
|
] });
|
|
257
|
-
function
|
|
257
|
+
function z(e, t) {
|
|
258
258
|
const { layout: n } = xn(X);
|
|
259
259
|
return ro(() => G.get(n, e, t), [n, e, t]);
|
|
260
260
|
}
|
|
@@ -267,12 +267,12 @@ const Co = Z("div")(({ theme: e }) => ({
|
|
|
267
267
|
DesktopPageTitle: r,
|
|
268
268
|
["Layout.AppBar"]: o,
|
|
269
269
|
["Layout.Drawer"]: s
|
|
270
|
-
} = T("cms").getComponents(), a =
|
|
270
|
+
} = T("cms").getComponents(), a = z("appBar.height"), {
|
|
271
271
|
AppBar: l,
|
|
272
272
|
Drawer: d,
|
|
273
273
|
main: u
|
|
274
274
|
} = t || {};
|
|
275
|
-
return /* @__PURE__ */ w(
|
|
275
|
+
return /* @__PURE__ */ w(H, { sx: { display: "flex" }, ...n, children: [
|
|
276
276
|
/* @__PURE__ */ i(
|
|
277
277
|
o,
|
|
278
278
|
{
|
|
@@ -282,7 +282,7 @@ const Co = Z("div")(({ theme: e }) => ({
|
|
|
282
282
|
),
|
|
283
283
|
/* @__PURE__ */ i(s, { ...d }),
|
|
284
284
|
/* @__PURE__ */ w(
|
|
285
|
-
|
|
285
|
+
H,
|
|
286
286
|
{
|
|
287
287
|
component: "main",
|
|
288
288
|
sx: {
|
|
@@ -293,20 +293,20 @@ const Co = Z("div")(({ theme: e }) => ({
|
|
|
293
293
|
children: [
|
|
294
294
|
/* @__PURE__ */ i(Co, { style: { height: a } }),
|
|
295
295
|
/* @__PURE__ */ i(r, {}),
|
|
296
|
-
|
|
296
|
+
e
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
)
|
|
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,12 +323,12 @@ 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
|
|
330
330
|
} = T("cms").getComponents();
|
|
331
|
-
return /* @__PURE__ */ w(Q, { container: !0, spacing: 2, children: [
|
|
331
|
+
return /* @__PURE__ */ i(H, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: /* @__PURE__ */ w(Q, { container: !0, spacing: 2, children: [
|
|
332
332
|
/* @__PURE__ */ w(
|
|
333
333
|
Q,
|
|
334
334
|
{
|
|
@@ -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,7 +380,7 @@ 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)), J = (e) => (e = e.toLowerCase(), (t) => qe(t) === e), _e = (e) => (t) => typeof t === e, { isArray:
|
|
383
|
+
})(/* @__PURE__ */ Object.create(null)), J = (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
|
}
|
|
@@ -403,7 +403,7 @@ 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);
|
|
@@ -454,7 +454,7 @@ const Vo = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (o, s) => {
|
|
|
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);
|
|
@@ -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);
|
|
@@ -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,
|
|
@@ -656,8 +656,8 @@ 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
663
|
function Yn(e) {
|
|
@@ -668,8 +668,8 @@ function Xt(e, t, n) {
|
|
|
668
668
|
return o = Yn(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,7 +700,7 @@ 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) &&
|
|
703
|
+
else if (f.isArray(b) && ps(b) || (f.isFileList(b) || f.endsWith(m, "[]")) && (x = f.toArray(b)))
|
|
704
704
|
return m = Yn(m), x.forEach(function(E, P) {
|
|
705
705
|
!(f.isUndefined(E) || E === null) && t.append(
|
|
706
706
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -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));
|
|
@@ -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";
|
|
@@ -1608,14 +1608,14 @@ const Gs = async (e) => {
|
|
|
1608
1608
|
duplex: "half"
|
|
1609
1609
|
}), R;
|
|
1610
1610
|
if (f.isFormData(r) && (R = O.headers.get("content-type")) && c.setContentType(R), O.body) {
|
|
1611
|
-
const [D,
|
|
1611
|
+
const [D, W] = nn(
|
|
1612
1612
|
g,
|
|
1613
1613
|
Le(rn(d))
|
|
1614
1614
|
);
|
|
1615
|
-
r = sn(O.body, an, D,
|
|
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");
|
|
@@ -1633,13 +1633,13 @@ const Gs = async (e) => {
|
|
|
1633
1633
|
["status", "statusText", "headers"].forEach((Ee) => {
|
|
1634
1634
|
O[Ee] = A[Ee];
|
|
1635
1635
|
});
|
|
1636
|
-
const R = f.toFiniteNumber(A.headers.get("content-length")), [D,
|
|
1636
|
+
const R = f.toFiniteNumber(A.headers.get("content-length")), [D, W] = l && nn(
|
|
1637
1637
|
R,
|
|
1638
1638
|
Le(rn(l), !0)
|
|
1639
1639
|
) || [];
|
|
1640
1640
|
A = new Response(
|
|
1641
1641
|
sn(A.body, an, D, () => {
|
|
1642
|
-
|
|
1642
|
+
W && W(), m && m();
|
|
1643
1643
|
}),
|
|
1644
1644
|
O
|
|
1645
1645
|
);
|
|
@@ -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;
|
|
@@ -2103,27 +2103,27 @@ 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]),
|
|
2126
|
-
return t ? /* @__PURE__ */ w(Q, { container: !0, children: [
|
|
2125
|
+
}, [s, a, l, t, o]), h = sa(), y = p.useMemo(() => T("cms").getModelFormProps(t), [t]);
|
|
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,
|
|
2129
2129
|
{
|
|
@@ -2145,26 +2145,26 @@ 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
|
}
|
|
2152
2152
|
)
|
|
2153
|
-
] }) : null;
|
|
2153
|
+
] }) }) : null;
|
|
2154
2154
|
};
|
|
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
|
-
const e = At(), t = Ut(), n = la(), { t: r } =
|
|
2167
|
+
const e = At(), t = Ut(), n = la(), { t: r } = L(), { refresh: o } = Se();
|
|
2168
2168
|
return { navigate: e, notify: t, dialog: n, t: r, refresh: o };
|
|
2169
2169
|
}
|
|
2170
2170
|
const ca = Z(Pr)(({ theme: e }) => ({
|
|
@@ -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,13 +2188,13 @@ 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 ? Yt.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
|
|
@@ -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(),
|
|
@@ -2220,16 +2220,16 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2220
2220
|
}
|
|
2221
2221
|
),
|
|
2222
2222
|
document.body
|
|
2223
|
-
) : /* @__PURE__ */ w(
|
|
2223
|
+
) : /* @__PURE__ */ w(B, { children: [
|
|
2224
2224
|
/* @__PURE__ */ w(
|
|
2225
2225
|
Br,
|
|
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: [
|
|
@@ -2354,9 +2354,9 @@ const fa = Z(
|
|
|
2354
2354
|
children: !n && m || oe("app.name", document.title)
|
|
2355
2355
|
}
|
|
2356
2356
|
),
|
|
2357
|
-
/* @__PURE__ */ i(
|
|
2357
|
+
/* @__PURE__ */ i(H, { sx: { flexGrow: 1 } }),
|
|
2358
2358
|
/* @__PURE__ */ w(
|
|
2359
|
-
|
|
2359
|
+
H,
|
|
2360
2360
|
{
|
|
2361
2361
|
display: "flex",
|
|
2362
2362
|
alignItems: "center",
|
|
@@ -2425,7 +2425,7 @@ const dn = (e, t) => ({
|
|
|
2425
2425
|
// necessary for content to be below app bar
|
|
2426
2426
|
...e.mixins.toolbar
|
|
2427
2427
|
})), wa = (e) => {
|
|
2428
|
-
const t = vt(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ? ga : ba, a =
|
|
2428
|
+
const t = vt(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ? ga : ba, a = z("drawer.width", 280), l = z("appBar.height"), d = T("cms").getComponent("RecursiveList"), u = T("cms").getMenuItems();
|
|
2429
2429
|
return /* @__PURE__ */ w(
|
|
2430
2430
|
s,
|
|
2431
2431
|
{
|
|
@@ -2444,7 +2444,7 @@ const dn = (e, t) => ({
|
|
|
2444
2444
|
children: [
|
|
2445
2445
|
/* @__PURE__ */ i(ya, { style: { height: l }, children: /* @__PURE__ */ i(q, { onClick: o, children: t.direction === "ltr" ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(Ue, {}) }) }),
|
|
2446
2446
|
/* @__PURE__ */ i(Pe, {}),
|
|
2447
|
-
/* @__PURE__ */ i(
|
|
2447
|
+
/* @__PURE__ */ i(H, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ i(
|
|
2448
2448
|
d,
|
|
2449
2449
|
{
|
|
2450
2450
|
collapsed: !r && n,
|
|
@@ -2456,7 +2456,7 @@ const dn = (e, t) => ({
|
|
|
2456
2456
|
}
|
|
2457
2457
|
);
|
|
2458
2458
|
}, Sa = () => {
|
|
2459
|
-
const e = ur(), t =
|
|
2459
|
+
const e = ur(), t = z("breakpoint", "md"), n = fr(), {
|
|
2460
2460
|
["Layout.BackButton"]: r
|
|
2461
2461
|
} = T("cms").getComponents();
|
|
2462
2462
|
return /* @__PURE__ */ w(
|
|
@@ -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,14 +2529,14 @@ 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 } =
|
|
2533
|
-
o((R) => R.filter((D,
|
|
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
|
+
o((R) => R.filter((D, W) => W !== O));
|
|
2534
2534
|
}, E = async (O) => {
|
|
2535
|
-
const R = O.target.value, D = x.find((mr) => mr.key === R),
|
|
2536
|
-
Vt ? (d("relation"), y([])) : m && d("equals"), g(Vt), b(Ee),
|
|
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;
|
|
2536
|
+
Vt ? (d("relation"), y([])) : m && d("equals"), g(Vt), b(Ee), W !== u && (d("equals"), y(() => {
|
|
2537
2537
|
if (["between", "notBetween"].includes(l))
|
|
2538
2538
|
return [];
|
|
2539
|
-
switch (n.getInputType(
|
|
2539
|
+
switch (n.getInputType(W)) {
|
|
2540
2540
|
case "number":
|
|
2541
2541
|
return 0;
|
|
2542
2542
|
case "boolean":
|
|
@@ -2544,7 +2544,7 @@ function Ea(e, t) {
|
|
|
2544
2544
|
default:
|
|
2545
2545
|
return "";
|
|
2546
2546
|
}
|
|
2547
|
-
})), a(R), c(
|
|
2547
|
+
})), a(R), c(W);
|
|
2548
2548
|
}, P = async (O) => {
|
|
2549
2549
|
const R = O.target.value;
|
|
2550
2550
|
l !== R && y((D) => {
|
|
@@ -2560,17 +2560,17 @@ function Ea(e, t) {
|
|
|
2560
2560
|
}
|
|
2561
2561
|
}), d(R);
|
|
2562
2562
|
};
|
|
2563
|
-
return
|
|
2564
|
-
o((O) => O.map((D,
|
|
2563
|
+
return p.useEffect(() => {
|
|
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,34 +2589,34 @@ 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
|
-
return a + l > d ?
|
|
2594
|
+
return a + l > d ? V([...n, ...s.slice(0, d - l)]) : V([...n, ...s]);
|
|
2595
2595
|
}, ka = async (e, t, n = "", r) => {
|
|
2596
2596
|
const o = e.getSchema().relations[t], s = ye().make(o.model), a = s.getSchema().primaryKey, { data: l } = await s.searchBy(n).get();
|
|
2597
|
-
return
|
|
2597
|
+
return V([...r, ...l]).unique(a);
|
|
2598
2598
|
}, Ta = () => {
|
|
2599
2599
|
const e = v(), t = te(), {
|
|
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,
|
|
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
|
},
|
|
@@ -2652,7 +2652,7 @@ const pn = async (e, t, n) => {
|
|
|
2652
2652
|
}
|
|
2653
2653
|
);
|
|
2654
2654
|
}, Da = ({ params: e, loading: t }) => {
|
|
2655
|
-
const { t: n } =
|
|
2655
|
+
const { t: n } = L();
|
|
2656
2656
|
return /* @__PURE__ */ i(
|
|
2657
2657
|
Ae,
|
|
2658
2658
|
{
|
|
@@ -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
|
] })
|
|
@@ -2668,14 +2668,14 @@ const pn = async (e, t, n) => {
|
|
|
2668
2668
|
}
|
|
2669
2669
|
);
|
|
2670
2670
|
}, tt = ({ index: e = null }) => {
|
|
2671
|
-
const { t } =
|
|
2671
|
+
const { t } = L(), n = v(), r = T("filter"), {
|
|
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,14 +2687,14 @@ 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 } =
|
|
2697
|
-
return /* @__PURE__ */ w(
|
|
2696
|
+
const e = v(), { value: t, setValue: n } = p.useContext(me);
|
|
2697
|
+
return /* @__PURE__ */ w(B, { children: [
|
|
2698
2698
|
/* @__PURE__ */ i(
|
|
2699
2699
|
Hr,
|
|
2700
2700
|
{
|
|
@@ -2707,19 +2707,19 @@ const pn = async (e, t, n) => {
|
|
|
2707
2707
|
size: "small"
|
|
2708
2708
|
}
|
|
2709
2709
|
),
|
|
2710
|
-
e && /* @__PURE__ */ i(
|
|
2710
|
+
e && /* @__PURE__ */ i(H, { width: 325 })
|
|
2711
2711
|
] });
|
|
2712
2712
|
}, nt = ({ index: e = null }) => {
|
|
2713
|
-
const { t } =
|
|
2713
|
+
const { t } = L(), n = v(), r = T("filter"), {
|
|
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,22 +2735,22 @@ 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
|
);
|
|
2742
2742
|
if (["null", "notNull"].includes(r))
|
|
2743
|
-
return e ? /* @__PURE__ */ i(
|
|
2743
|
+
return e ? /* @__PURE__ */ i(H, { width: 230 }) : null;
|
|
2744
2744
|
if (o)
|
|
2745
2745
|
switch (t.getInputType(n)) {
|
|
2746
2746
|
case "date":
|
|
2747
2747
|
case "datetime-local":
|
|
2748
|
-
return /* @__PURE__ */ w(
|
|
2748
|
+
return /* @__PURE__ */ w(B, { children: [
|
|
2749
2749
|
/* @__PURE__ */ i(tt, { index: 0 }),
|
|
2750
2750
|
/* @__PURE__ */ i(tt, { index: 1 })
|
|
2751
2751
|
] });
|
|
2752
2752
|
default:
|
|
2753
|
-
return /* @__PURE__ */ w(
|
|
2753
|
+
return /* @__PURE__ */ w(B, { children: [
|
|
2754
2754
|
/* @__PURE__ */ i(nt, { index: 0 }),
|
|
2755
2755
|
/* @__PURE__ */ i(nt, { index: 1 })
|
|
2756
2756
|
] });
|
|
@@ -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 } =
|
|
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
|
-
},
|
|
2941
|
-
const { t } =
|
|
2940
|
+
}, pn = ({ dialog: e = !1 }) => {
|
|
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
|
{
|
|
@@ -2958,20 +2958,20 @@ const pn = async (e, t, n) => {
|
|
|
2958
2958
|
]);
|
|
2959
2959
|
};
|
|
2960
2960
|
return /* @__PURE__ */ w(
|
|
2961
|
-
|
|
2961
|
+
H,
|
|
2962
2962
|
{
|
|
2963
2963
|
sx: {
|
|
2964
2964
|
minWidth: { [r]: 567.5 },
|
|
2965
2965
|
p: e ? 0 : 2
|
|
2966
2966
|
},
|
|
2967
2967
|
children: [
|
|
2968
|
-
/* @__PURE__ */ i(N, { children: s.map((c,
|
|
2969
|
-
const S =
|
|
2970
|
-
return /* @__PURE__ */ w(
|
|
2968
|
+
/* @__PURE__ */ i(N, { children: s.map((c, h, y) => {
|
|
2969
|
+
const S = h == y.length - 1;
|
|
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 } =
|
|
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,12 +3211,12 @@ const va = (e) => {
|
|
|
3211
3211
|
]
|
|
3212
3212
|
}
|
|
3213
3213
|
);
|
|
3214
|
-
}, zt =
|
|
3214
|
+
}, zt = p.createContext({
|
|
3215
3215
|
columns: [],
|
|
3216
3216
|
columnCount: 0,
|
|
3217
|
-
selected:
|
|
3217
|
+
selected: V([]),
|
|
3218
3218
|
massActions: [],
|
|
3219
|
-
items:
|
|
3219
|
+
items: V([]),
|
|
3220
3220
|
error: new Error("Trying to access TableContext outside of TableProvider"),
|
|
3221
3221
|
Model: null
|
|
3222
3222
|
});
|
|
@@ -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,
|
|
@@ -3347,13 +3347,13 @@ const Ba = () => {
|
|
|
3347
3347
|
}
|
|
3348
3348
|
));
|
|
3349
3349
|
Ve.displayName = "Link";
|
|
3350
|
-
const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */ i(
|
|
3350
|
+
const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */ i(B, { children: {
|
|
3351
3351
|
"« Previous": /* @__PURE__ */ i(je, {}),
|
|
3352
3352
|
"Next »": /* @__PURE__ */ i(Ue, {}),
|
|
3353
3353
|
"Last »": /* @__PURE__ */ i(Dn, {}),
|
|
3354
3354
|
"« First": /* @__PURE__ */ i(On, {})
|
|
3355
|
-
}[e] || e }) : /* @__PURE__ */ i(
|
|
3356
|
-
const n = e === "default", [r, o] = K(), [s, a] =
|
|
3355
|
+
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }), Ma = ({ variant: e = "default", ...t }) => {
|
|
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,
|
|
@@ -3444,7 +3444,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3444
3444
|
}
|
|
3445
3445
|
);
|
|
3446
3446
|
}, Na = () => {
|
|
3447
|
-
const { t: e } =
|
|
3447
|
+
const { t: e } = L(), {
|
|
3448
3448
|
meta: {
|
|
3449
3449
|
total: t = 0,
|
|
3450
3450
|
from: n = 0,
|
|
@@ -3457,7 +3457,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3457
3457
|
total: t
|
|
3458
3458
|
}) });
|
|
3459
3459
|
}, ja = () => {
|
|
3460
|
-
const { t: e } =
|
|
3460
|
+
const { t: e } = L(), {
|
|
3461
3461
|
meta: {
|
|
3462
3462
|
per_page: t = 15
|
|
3463
3463
|
} = {}
|
|
@@ -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,8 +3549,8 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3549
3549
|
Ua(["Control", "/"], () => {
|
|
3550
3550
|
l.current.focus();
|
|
3551
3551
|
});
|
|
3552
|
-
const
|
|
3553
|
-
return /* @__PURE__ */ w(
|
|
3552
|
+
const h = c ? 300 : "calc(100vw - 58px)";
|
|
3553
|
+
return /* @__PURE__ */ w(B, { children: [
|
|
3554
3554
|
!c && !s && /* @__PURE__ */ i(q, { color: "inherit", onClick: () => a(!0), children: /* @__PURE__ */ i(
|
|
3555
3555
|
Ot,
|
|
3556
3556
|
{
|
|
@@ -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
|
)
|
|
@@ -3603,13 +3603,13 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3603
3603
|
children: e
|
|
3604
3604
|
}
|
|
3605
3605
|
), Wa = () => {
|
|
3606
|
-
const { t: e } =
|
|
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,9 +3623,9 @@ 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
|
-
return /* @__PURE__ */ w(
|
|
3628
|
+
return /* @__PURE__ */ w(B, { children: [
|
|
3629
3629
|
/* @__PURE__ */ i(q, { onClick: b, children: /* @__PURE__ */ i(
|
|
3630
3630
|
Ot,
|
|
3631
3631
|
{
|
|
@@ -3653,12 +3653,12 @@ 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") }),
|
|
3660
3660
|
/* @__PURE__ */ i(Pe, {}),
|
|
3661
|
-
|
|
3661
|
+
V(r).whereStrict("sortable", "!=", !1).map(({ key: A, label: E }) => /* @__PURE__ */ i(
|
|
3662
3662
|
Ke,
|
|
3663
3663
|
{
|
|
3664
3664
|
value: A,
|
|
@@ -3676,14 +3676,14 @@ 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
3685
|
control: /* @__PURE__ */ i(Je, {}),
|
|
3686
|
-
label: /* @__PURE__ */ w(
|
|
3686
|
+
label: /* @__PURE__ */ w(B, { children: [
|
|
3687
3687
|
e("Ascending"),
|
|
3688
3688
|
/* @__PURE__ */ i(Pn, {})
|
|
3689
3689
|
] })
|
|
@@ -3694,7 +3694,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3694
3694
|
{
|
|
3695
3695
|
value: "desc",
|
|
3696
3696
|
control: /* @__PURE__ */ i(Je, {}),
|
|
3697
|
-
label: /* @__PURE__ */ w(
|
|
3697
|
+
label: /* @__PURE__ */ w(B, { children: [
|
|
3698
3698
|
e("Descending"),
|
|
3699
3699
|
/* @__PURE__ */ i(vn, {})
|
|
3700
3700
|
] })
|
|
@@ -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,
|
|
@@ -3790,14 +3790,14 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3790
3790
|
onClick: m(g),
|
|
3791
3791
|
children: [
|
|
3792
3792
|
x,
|
|
3793
|
-
A && S === g ? /* @__PURE__ */ i(
|
|
3793
|
+
A && S === g ? /* @__PURE__ */ i(H, { component: "span", sx: { visibility: "hidden", display: "none" }, children: b === "desc" ? "sorted descending" : "sorted ascending" }) : null
|
|
3794
3794
|
]
|
|
3795
3795
|
}
|
|
3796
3796
|
)
|
|
3797
3797
|
},
|
|
3798
3798
|
g
|
|
3799
3799
|
)),
|
|
3800
|
-
/* @__PURE__ */ i(
|
|
3800
|
+
/* @__PURE__ */ i(h, {})
|
|
3801
3801
|
] })
|
|
3802
3802
|
] });
|
|
3803
3803
|
}, Ja = () => {
|
|
@@ -3807,9 +3807,9 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3807
3807
|
} = ae(), n = v(), {
|
|
3808
3808
|
["ModelIndex.Table.ShrinkedCell"]: r
|
|
3809
3809
|
} = T("cms").getComponents(), [o] = K(), s = parseInt(o.get("per_page") || "15");
|
|
3810
|
-
return /* @__PURE__ */ i(
|
|
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",
|
|
@@ -3828,13 +3828,13 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3828
3828
|
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(Pt, {}) }) })
|
|
3829
3829
|
] }, l)) });
|
|
3830
3830
|
}, Ya = ({ children: e, ...t }) => {
|
|
3831
|
-
const n = te(), { t: r } =
|
|
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 =
|
|
3837
|
+
} = T("cms").getComponents(), d = p.isValidElement(e) ? e : (o || V([])).map(e);
|
|
3838
3838
|
return /* @__PURE__ */ w(Jr, { ...t, children: [
|
|
3839
3839
|
s && /* @__PURE__ */ i(Ja, {}),
|
|
3840
3840
|
d,
|
|
@@ -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,7 +3887,7 @@ 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
3892
|
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](G.get(e.toJson(), y.key), e)
|
|
3893
3893
|
//
|
|
@@ -3896,7 +3896,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
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(
|
|
@@ -3947,7 +3947,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3947
3947
|
}, ei = ({ children: e, ...t }) => {
|
|
3948
3948
|
const {
|
|
3949
3949
|
columnCount: n
|
|
3950
|
-
} = ae(), r = v(), o =
|
|
3950
|
+
} = ae(), r = v(), o = z("breakpoint", "md"), {
|
|
3951
3951
|
["ModelIndex.Pagination"]: s,
|
|
3952
3952
|
["ModelIndex.PaginationDetails"]: a,
|
|
3953
3953
|
["ModelIndex.PerPageSwitch"]: l
|
|
@@ -3996,7 +3996,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3996
3996
|
["ModelIndex.Sort"]: r,
|
|
3997
3997
|
["ModelIndex.Pagination"]: o
|
|
3998
3998
|
// ['ModelIndex.PaginationDetails']: PaginationDetails,
|
|
3999
|
-
} = T("cms").getComponents(), s = v(), a =
|
|
3999
|
+
} = T("cms").getComponents(), s = v(), a = z("breakpoint", "md");
|
|
4000
4000
|
return /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: e, sx: { p: 1 }, children: /* @__PURE__ */ w(
|
|
4001
4001
|
N,
|
|
4002
4002
|
{
|
|
@@ -4038,17 +4038,17 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
4038
4038
|
) }) });
|
|
4039
4039
|
};
|
|
4040
4040
|
function ni() {
|
|
4041
|
-
const e = te(), { t } =
|
|
4041
|
+
const e = te(), { t } = L(), [n, r] = K(), o = n.get("tab") || "all", s = (d, u) => {
|
|
4042
4042
|
r(() => {
|
|
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
|
|
4050
4050
|
);
|
|
4051
|
-
return l.length === 0 ? null : /* @__PURE__ */ i(
|
|
4051
|
+
return l.length === 0 ? null : /* @__PURE__ */ i(H, { sx: { maxWidth: { xs: 320, sm: 480 }, bgcolor: "background.paper" }, children: /* @__PURE__ */ w(
|
|
4052
4052
|
Gr,
|
|
4053
4053
|
{
|
|
4054
4054
|
value: o,
|
|
@@ -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] =
|
|
4246
|
-
return /* @__PURE__ */ w(
|
|
4245
|
+
const [o, s] = p.useState({}), a = z("drawer.width", 280);
|
|
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,12 +4428,12 @@ 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);
|
|
4435
4435
|
};
|
|
4436
|
-
return /* @__PURE__ */ w(
|
|
4436
|
+
return /* @__PURE__ */ w(B, { children: [
|
|
4437
4437
|
/* @__PURE__ */ i(
|
|
4438
4438
|
q,
|
|
4439
4439
|
{
|
|
@@ -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+9vlrvnkK4tHkr1PGEEeajHh9opaka1JqSvSkfFnKKvffeZqpyYl6d3cA2p8t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tTzYEiKMSR/cz27fTirvs0043qQZMd0ig+19NLL1y+LBTBN8QMVy78lf/31DiHw9yev/ceOrZjh8klzQ1X+eDVW7fY59oE0MueanJzWgGMYoBDO8GV8n8NhzVVgJ/2D9AER+2RsjLxgd3NwEpCVioWFJpPba00J4XF0SofRLRmss+5s7PopR9+jJXrrOYS+1sa132NNbsFfLJMpWBZfp5Y+92uLhq+fVuohyrYydBII8mEA4cK0OPaIADDEb4pYDhEKk4FXJEd4O/bZJtqi6Ga4msoEBDFqII9Lley2cR6KkBcPsKwrYA7yxc9cfd3SYdUbXG+0ykCAkfWHZeLSYfDggBc8X2IG6hs/vJ6nVPJAxti/rgqZLFFw0gj1/DxrhhvbZQL0/iu1fz7GhQ8H69QKue8mo3iQvv/YOegoJNby2rKpLE2mGKXifyHg9uz3Lq4BTUeSEY31vZzOwYmbOFfRuevM6ot++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,
|
|
@@ -4989,13 +4989,13 @@ const gi = {
|
|
|
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,7 +5024,7 @@ 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
|
Yi as LuminixCms,
|
|
5030
5030
|
Ge as ModelProvider,
|
|
@@ -5038,7 +5038,7 @@ export {
|
|
|
5038
5038
|
sa as useHandleError,
|
|
5039
5039
|
dr as useHasSearch,
|
|
5040
5040
|
v as useIsDesktopMode,
|
|
5041
|
-
|
|
5041
|
+
z as useLayoutConfig,
|
|
5042
5042
|
_t as useMenu,
|
|
5043
5043
|
Ut as useNotify,
|
|
5044
5044
|
ur as usePageTitle,
|