@luminix/mui-cms 0.1.15 → 0.1.16
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 +8 -8
- package/dist/mui-cms.js +106 -105
- package/package.json +1 -1
package/dist/mui-cms.js
CHANGED
|
@@ -5,14 +5,14 @@ import { config as oe, collect as W, 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 yr, useParams as wr, useNavigate as At, useSearchParams as K, Link as Re, Form as Sr } from "react-router-dom";
|
|
7
7
|
import { useCollection as mn, PaginationProvider as Ar, usePagination as Se, ModelForm as xr, useApplyReducers as xt, Forms as Cr, LuminixProvider as Er } from "@luminix/react";
|
|
8
|
-
import { useMediaQuery as Me, Dialog as Ct, DialogTitle as Et, DialogContent as kt, DialogContentText as kr, DialogActions as Tt, Button as M, Snackbar as Tr, Alert as Dr, IconButton as q, AlertTitle as Or, Box as V, Unstable_Grid2 as
|
|
8
|
+
import { useMediaQuery as Me, Dialog as Ct, DialogTitle as Et, DialogContent as kt, DialogContentText as kr, DialogActions as Tt, Button as M, Snackbar as Tr, Alert as Dr, IconButton as q, AlertTitle as Or, Box as V, Unstable_Grid2 as Q, Fab as Rr, SpeedDial as Pr, SpeedDialIcon as vr, SpeedDialAction as Fr, ButtonGroup as Br, Popper as Lr, Grow as Ir, Paper as Dt, ClickAwayListener as Mr, MenuList as Nr, MenuItem as se, AppBar as gn, Toolbar as jr, Typography as $, Avatar as Ur, 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, CssBaseline as to } from "@mui/material";
|
|
9
9
|
import p, { useContext as xn, useMemo as no } from "react";
|
|
10
10
|
import { useTranslation as L, initReactI18next as ro } 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 Bn, Add as oo, CategoryOutlined as so, DashboardOutlined as ao, PeopleOutlined as io } from "@mui/icons-material";
|
|
12
|
-
import { useTheme as vt, styled as
|
|
13
|
-
import { Str as k, Obj as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
12
|
+
import { useTheme as vt, styled as Z, createTheme as lo, ThemeProvider as co } from "@mui/material/styles";
|
|
13
|
+
import { Str as k, Obj as G, DateTime as Fe, Query as Ln, Func as uo, MakeFacade as Ft, Reducible as In, ServiceProvider as Mn } from "@luminix/support";
|
|
14
|
+
import Yt from "react-dom";
|
|
15
|
+
import Y from "i18next";
|
|
16
16
|
const fo = {
|
|
17
17
|
open: !1,
|
|
18
18
|
setOpen: () => {
|
|
@@ -28,7 +28,7 @@ const fo = {
|
|
|
28
28
|
showBackButton: !1,
|
|
29
29
|
setShowBackButton: () => {
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, X = p.createContext(fo), Ye = document.title, ho = ({ children: e }) => {
|
|
32
32
|
const [t, n] = p.useState(!1), [r, o] = p.useState(""), [s, a] = p.useState(!1), [l, d] = p.useState(!1), c = oe("luminix.cms.layout", {}), u = Me((y) => y.breakpoints.up((c == null ? void 0 : c.breakpoint) || "md")), h = {
|
|
33
33
|
open: t,
|
|
34
34
|
setOpen: n,
|
|
@@ -41,9 +41,9 @@ const fo = {
|
|
|
41
41
|
showBackButton: l,
|
|
42
42
|
setShowBackButton: d
|
|
43
43
|
};
|
|
44
|
-
return p.useEffect(() => (document.title = r ? `${r} | ${oe("app.name",
|
|
45
|
-
document.title =
|
|
46
|
-
}), [r]), /* @__PURE__ */ i(
|
|
44
|
+
return p.useEffect(() => (document.title = r ? `${r} | ${oe("app.name", Ye)}` : oe("app.name", Ye), () => {
|
|
45
|
+
document.title = Ye;
|
|
46
|
+
}), [r]), /* @__PURE__ */ i(X.Provider, { value: h, children: e });
|
|
47
47
|
}, Nn = p.createContext({
|
|
48
48
|
Model: null
|
|
49
49
|
}), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn = p.createContext({
|
|
@@ -101,7 +101,7 @@ function mo({ children: e, ...t }) {
|
|
|
101
101
|
] });
|
|
102
102
|
}
|
|
103
103
|
function v() {
|
|
104
|
-
const { isBreakpointUp: e } = xn(
|
|
104
|
+
const { isBreakpointUp: e } = xn(X);
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
107
|
const Bt = p.createContext({
|
|
@@ -237,7 +237,7 @@ const Bt = p.createContext({
|
|
|
237
237
|
}
|
|
238
238
|
];
|
|
239
239
|
function Lt(e) {
|
|
240
|
-
const { setCurrentPage: t } = p.useContext(
|
|
240
|
+
const { setCurrentPage: t } = p.useContext(X);
|
|
241
241
|
p.useEffect(() => (t(e), () => {
|
|
242
242
|
t("");
|
|
243
243
|
}), [e, t]);
|
|
@@ -255,10 +255,10 @@ const So = () => {
|
|
|
255
255
|
] }) })
|
|
256
256
|
] });
|
|
257
257
|
function H(e, t) {
|
|
258
|
-
const { layout: n } = xn(
|
|
259
|
-
return no(() =>
|
|
258
|
+
const { layout: n } = xn(X);
|
|
259
|
+
return no(() => G.get(n, e, t), [n, e, t]);
|
|
260
260
|
}
|
|
261
|
-
const xo =
|
|
261
|
+
const xo = Z("div")(({ theme: e }) => ({
|
|
262
262
|
padding: e.spacing(0, 1),
|
|
263
263
|
// necessary for content to be below app bar
|
|
264
264
|
...e.mixins.toolbar
|
|
@@ -300,7 +300,7 @@ const xo = G("div")(({ theme: e }) => ({
|
|
|
300
300
|
] });
|
|
301
301
|
};
|
|
302
302
|
function Eo() {
|
|
303
|
-
const { setShowSearch: e } = p.useContext(
|
|
303
|
+
const { setShowSearch: e } = p.useContext(X);
|
|
304
304
|
p.useEffect(() => (e(!0), () => {
|
|
305
305
|
e(!1);
|
|
306
306
|
}), [e]);
|
|
@@ -328,9 +328,9 @@ const ko = () => {
|
|
|
328
328
|
["ModelIndex.Table.TableBody.TableRow"]: S,
|
|
329
329
|
["ModelIndex.Tabs"]: b
|
|
330
330
|
} = T("cms").getComponents();
|
|
331
|
-
return /* @__PURE__ */ w(
|
|
331
|
+
return /* @__PURE__ */ w(Q, { container: !0, spacing: 2, children: [
|
|
332
332
|
/* @__PURE__ */ w(
|
|
333
|
-
|
|
333
|
+
Q,
|
|
334
334
|
{
|
|
335
335
|
xs: 12,
|
|
336
336
|
display: "flex",
|
|
@@ -349,9 +349,9 @@ const ko = () => {
|
|
|
349
349
|
]
|
|
350
350
|
}
|
|
351
351
|
),
|
|
352
|
-
!o && /* @__PURE__ */ i(
|
|
353
|
-
/* @__PURE__ */ i(
|
|
354
|
-
/* @__PURE__ */ i(
|
|
352
|
+
!o && /* @__PURE__ */ i(Q, { display: "flex", justifyContent: "center", xs: 12, children: /* @__PURE__ */ i(a, { variant: "compact" }) }),
|
|
353
|
+
/* @__PURE__ */ i(Q, { xs: 12, sx: { pb: 0 }, children: /* @__PURE__ */ i(b, {}) }),
|
|
354
|
+
/* @__PURE__ */ i(Q, { xs: 12, sx: { pt: 0 }, children: /* @__PURE__ */ w(
|
|
355
355
|
d,
|
|
356
356
|
{
|
|
357
357
|
items: t,
|
|
@@ -367,7 +367,7 @@ const ko = () => {
|
|
|
367
367
|
] });
|
|
368
368
|
};
|
|
369
369
|
function To() {
|
|
370
|
-
const { setShowBackButton: e } = p.useContext(
|
|
370
|
+
const { setShowBackButton: e } = p.useContext(X);
|
|
371
371
|
p.useEffect(() => (e(!0), () => {
|
|
372
372
|
e(!1);
|
|
373
373
|
}), [e]);
|
|
@@ -380,11 +380,11 @@ function Un(e, t) {
|
|
|
380
380
|
const { toString: Do } = Object.prototype, { getPrototypeOf: It } = Object, qe = /* @__PURE__ */ ((e) => (t) => {
|
|
381
381
|
const n = Do.call(t);
|
|
382
382
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
383
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
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 Oo(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 = J("ArrayBuffer");
|
|
388
388
|
function Ro(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,11 +394,11 @@ const Po = _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
|
-
}, Fo =
|
|
397
|
+
}, Fo = J("Date"), Bo = J("File"), Lo = J("Blob"), Io = J("FileList"), Mo = (e) => He(e) && _(e.pipe), No = (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
|
-
}, jo =
|
|
401
|
+
}, jo = J("URLSearchParams"), [Uo, qo, _o, Ho] = ["ReadableStream", "Request", "Response", "Headers"].map(J), zo = (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;
|
|
@@ -448,11 +448,11 @@ const Wo = (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
|
+
}, Yo = (e) => {
|
|
456
456
|
if (!e) return null;
|
|
457
457
|
if (he(e)) return e;
|
|
458
458
|
let t = e.length;
|
|
@@ -474,12 +474,12 @@ const Wo = (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
|
-
}, Qo =
|
|
477
|
+
}, Qo = J("HTMLFormElement"), es = (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), ts =
|
|
482
|
+
), Gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ts = J("RegExp"), Wn = (e, t) => {
|
|
483
483
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
484
484
|
xe(n, (o, s) => {
|
|
485
485
|
let a;
|
|
@@ -539,7 +539,7 @@ const ls = (e) => {
|
|
|
539
539
|
return r;
|
|
540
540
|
};
|
|
541
541
|
return n(e, 0);
|
|
542
|
-
}, cs =
|
|
542
|
+
}, cs = J("AsyncFunction"), us = (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, "*");
|
|
@@ -579,9 +579,9 @@ const ls = (e) => {
|
|
|
579
579
|
inherits: $o,
|
|
580
580
|
toFlatObject: Ko,
|
|
581
581
|
kindOf: qe,
|
|
582
|
-
kindOfTest:
|
|
583
|
-
endsWith:
|
|
584
|
-
toArray:
|
|
582
|
+
kindOfTest: J,
|
|
583
|
+
endsWith: Jo,
|
|
584
|
+
toArray: Yo,
|
|
585
585
|
forEachEntry: Zo,
|
|
586
586
|
matchAll: Xo,
|
|
587
587
|
isHTMLForm: 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, Jn = {};
|
|
634
634
|
[
|
|
635
635
|
"ERR_BAD_OPTION_VALUE",
|
|
636
636
|
"ERR_BAD_OPTION",
|
|
@@ -646,9 +646,9 @@ const Kn = C.prototype, Yn = {};
|
|
|
646
646
|
"ERR_INVALID_URL"
|
|
647
647
|
// eslint-disable-next-line func-names
|
|
648
648
|
].forEach((e) => {
|
|
649
|
-
|
|
649
|
+
Jn[e] = { value: e };
|
|
650
650
|
});
|
|
651
|
-
Object.defineProperties(C,
|
|
651
|
+
Object.defineProperties(C, Jn);
|
|
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);
|
|
@@ -660,12 +660,12 @@ const fs = null;
|
|
|
660
660
|
function ht(e) {
|
|
661
661
|
return f.isPlainObject(e) || f.isArray(e);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Yn(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 = Yn(o), !n && s ? "[" + o + "]" : o;
|
|
669
669
|
}).join(n ? "." : "") : t;
|
|
670
670
|
}
|
|
671
671
|
function hs(e) {
|
|
@@ -701,7 +701,7 @@ function ze(e, t, n) {
|
|
|
701
701
|
if (f.endsWith(m, "{}"))
|
|
702
702
|
m = r ? m : m.slice(0, -2), b = JSON.stringify(b);
|
|
703
703
|
else if (f.isArray(b) && hs(b) || (f.isFileList(b) || f.endsWith(m, "[]")) && (x = f.toArray(b)))
|
|
704
|
-
return m =
|
|
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
|
|
707
707
|
a === !0 ? Xt([m], P, s) : a === null ? m : m + "[]",
|
|
@@ -1542,7 +1542,7 @@ const rr = (e) => {
|
|
|
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(),
|
|
@@ -1562,7 +1562,7 @@ We && ((e) => {
|
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
1564
|
})(new Response());
|
|
1565
|
-
const
|
|
1565
|
+
const Ys = async (e) => {
|
|
1566
1566
|
if (e == null)
|
|
1567
1567
|
return 0;
|
|
1568
1568
|
if (f.isBlob(e))
|
|
@@ -1578,7 +1578,7 @@ const Js = async (e) => {
|
|
|
1578
1578
|
return (await Ks(e)).byteLength;
|
|
1579
1579
|
}, Gs = async (e, t) => {
|
|
1580
1580
|
const n = f.toFiniteNumber(e.getContentLength());
|
|
1581
|
-
return n ??
|
|
1581
|
+
return n ?? Ys(t);
|
|
1582
1582
|
}, Zs = We && (async (e) => {
|
|
1583
1583
|
let {
|
|
1584
1584
|
url: t,
|
|
@@ -1601,7 +1601,7 @@ const Js = async (e) => {
|
|
|
1601
1601
|
});
|
|
1602
1602
|
let g;
|
|
1603
1603
|
try {
|
|
1604
|
-
if (d &&
|
|
1604
|
+
if (d && Js && n !== "get" && n !== "head" && (g = await Gs(u, r)) !== 0) {
|
|
1605
1605
|
let O = new Request(t, {
|
|
1606
1606
|
method: "POST",
|
|
1607
1607
|
body: r,
|
|
@@ -2123,8 +2123,8 @@ const sa = ({ create: e = !1 }) => {
|
|
|
2123
2123
|
const u = p.useCallback(() => {
|
|
2124
2124
|
s(o(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${k.kebab(l.plural())}/${t.getKey()}`);
|
|
2125
2125
|
}, [s, a, l, t, o]), h = oa(), y = p.useMemo(() => T("cms").getModelFormProps(t), [t]);
|
|
2126
|
-
return t ? /* @__PURE__ */ w(
|
|
2127
|
-
/* @__PURE__ */ i(
|
|
2126
|
+
return t ? /* @__PURE__ */ w(Q, { container: !0, children: [
|
|
2127
|
+
/* @__PURE__ */ i(Q, { xs: 12, children: /* @__PURE__ */ i(
|
|
2128
2128
|
c,
|
|
2129
2129
|
{
|
|
2130
2130
|
parts: [
|
|
@@ -2134,7 +2134,7 @@ const sa = ({ create: e = !1 }) => {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
) }),
|
|
2136
2136
|
/* @__PURE__ */ i(
|
|
2137
|
-
|
|
2137
|
+
Q,
|
|
2138
2138
|
{
|
|
2139
2139
|
xs: 12,
|
|
2140
2140
|
[d]: 6,
|
|
@@ -2167,11 +2167,11 @@ function qt() {
|
|
|
2167
2167
|
const e = At(), t = Ut(), n = ia(), { t: r } = L(), { refresh: o } = Se();
|
|
2168
2168
|
return { navigate: e, notify: t, dialog: n, t: r, refresh: o };
|
|
2169
2169
|
}
|
|
2170
|
-
const la =
|
|
2170
|
+
const la = Z(Rr)(({ theme: e }) => ({
|
|
2171
2171
|
position: "fixed",
|
|
2172
2172
|
bottom: e.spacing(2),
|
|
2173
2173
|
right: e.spacing(2)
|
|
2174
|
-
})), ca =
|
|
2174
|
+
})), ca = Z(Pr)(({ theme: e }) => ({
|
|
2175
2175
|
position: "fixed",
|
|
2176
2176
|
bottom: e.spacing(2),
|
|
2177
2177
|
right: e.spacing(2)
|
|
@@ -2188,7 +2188,7 @@ const la = G(Rr)(({ theme: e }) => ({
|
|
|
2188
2188
|
}, b = (m) => {
|
|
2189
2189
|
l.current && l.current.contains(m.target) || a(!1);
|
|
2190
2190
|
};
|
|
2191
|
-
return e === "fab" ? h.length === 1 ?
|
|
2191
|
+
return e === "fab" ? h.length === 1 ? Yt.createPortal(
|
|
2192
2192
|
/* @__PURE__ */ i(
|
|
2193
2193
|
la,
|
|
2194
2194
|
{
|
|
@@ -2198,7 +2198,7 @@ const la = G(Rr)(({ theme: e }) => ({
|
|
|
2198
2198
|
}
|
|
2199
2199
|
),
|
|
2200
2200
|
document.body
|
|
2201
|
-
) :
|
|
2201
|
+
) : Yt.createPortal(
|
|
2202
2202
|
/* @__PURE__ */ i(
|
|
2203
2203
|
ca,
|
|
2204
2204
|
{
|
|
@@ -2275,7 +2275,7 @@ const la = G(Rr)(({ theme: e }) => ({
|
|
|
2275
2275
|
] });
|
|
2276
2276
|
};
|
|
2277
2277
|
function _t() {
|
|
2278
|
-
const { open: e, setOpen: t } = p.useContext(
|
|
2278
|
+
const { open: e, setOpen: t } = p.useContext(X);
|
|
2279
2279
|
return {
|
|
2280
2280
|
open: e,
|
|
2281
2281
|
handleDrawerOpen: () => {
|
|
@@ -2290,19 +2290,19 @@ function _t() {
|
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
2292
|
function ur() {
|
|
2293
|
-
const { currentPage: e } = p.useContext(
|
|
2293
|
+
const { currentPage: e } = p.useContext(X);
|
|
2294
2294
|
return e;
|
|
2295
2295
|
}
|
|
2296
2296
|
function da() {
|
|
2297
|
-
const { showSearch: e } = p.useContext(
|
|
2297
|
+
const { showSearch: e } = p.useContext(X);
|
|
2298
2298
|
return e;
|
|
2299
2299
|
}
|
|
2300
2300
|
const fa = "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+mTHzD4PjRx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m8B0CcqeN/zNNXw8MiUcugFAKlODjD5+/OwsKEYMoA04B3zny89Xtq7uvTjGaMB5wray195POJo86Mmd7i+MlPdXXT+d5e3RwHlTfl5NDHj/hoS36+GTYxFtWMYZvkWk+x77hAaLxyRVe5AMOV5+WJysUKnGlAnByIztHZWTp+qVX4oFbljFNk6/r19AnD3c25zqoZVhARiLJqYGqKnmttpV84SaelyB/HS+zkKvlCfb3RskqT33CQIDnX8/cG6rieiQmya8Ah9XiLi+mU92HTlYuM0nCQfDMyQvDBWa5gtOCg3AFOvk0P1VKWhcrFMiDA4H/prJoe3GE+tt7iE0JW3cgWN9Ind6K4J6MUpRNt7XSdt1gGh4McyqGsOsnK/ZtwwNDd4hneztfa2+nzwUFprgNckOGerKykV+/3SF/AiEp6YzQBv74+Qm90dFDf5CStSUtTzYEiKMSR/cz27fTirvs0043qQZMd0ig+19NLL1y+LBTBN8QMVy78lf/31DiHw9yev/ceOrZjh8klzQ1X+eDVW7fY59oE0MueanJzWgGMYoBDO8GV8n8NhzVVgJ/2D9AER+2RsjLxgd3NwEpCVioWFJpPba00J4XF0SofRLRmss+5s7PopR9+jJXrrOYS+1sa132NNbsFfLJMpWBZfp5Y+92uLhq+fVuohyrYydBII8mEA4cK0OPaIADDEb4pYDhEKk4FXJEd4O/bZJtqi6Ga4msoEBDFqII9Lley2cR6KkBcPsKwrYA7yxc9cfd3SYdUbXG+0ykCAkfWHZeLSYfDggBc8X2IG6hs/vJ6nVPJAxti/rgqZLFFw0gj1/DxrhhvbZQL0/iu1fz7GhQ8H69QKue8mo3iQvv/YOegoJNby2rKpLE2mGKXifyHg9uz3Lq4BTUeSEY31vZzOwYmbOFfRuevM6ot++oAAAAASUVORK5CYII=";
|
|
2301
2301
|
function dr() {
|
|
2302
|
-
const { showBackButton: e } = p.useContext(
|
|
2302
|
+
const { showBackButton: e } = p.useContext(X);
|
|
2303
2303
|
return e;
|
|
2304
2304
|
}
|
|
2305
|
-
const pa =
|
|
2305
|
+
const pa = Z(
|
|
2306
2306
|
gn,
|
|
2307
2307
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2308
2308
|
)(({ theme: e, open: t, drawerWidth: n, height: r }) => ({
|
|
@@ -2320,7 +2320,7 @@ const pa = G(
|
|
|
2320
2320
|
duration: e.transitions.duration.enteringScreen
|
|
2321
2321
|
})
|
|
2322
2322
|
}
|
|
2323
|
-
})), ma =
|
|
2323
|
+
})), ma = Z(
|
|
2324
2324
|
gn,
|
|
2325
2325
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2326
2326
|
)(({ height: e }) => ({ height: e })), ga = ({ slots: e = {}, ...t }) => {
|
|
@@ -2411,7 +2411,7 @@ const dn = (e, t) => ({
|
|
|
2411
2411
|
overflowX: "hidden",
|
|
2412
2412
|
width: `calc(${e.spacing(9)} + 1px)`,
|
|
2413
2413
|
[e.breakpoints.up("sm")]: { width: `calc(${e.spacing(10)} + 1px)` }
|
|
2414
|
-
}), ya =
|
|
2414
|
+
}), ya = Z(
|
|
2415
2415
|
bn,
|
|
2416
2416
|
{ shouldForwardProp: (e) => !["open", "width"].includes(String(e)) }
|
|
2417
2417
|
)(({ theme: e, open: t, width: n }) => ({
|
|
@@ -2426,10 +2426,10 @@ const dn = (e, t) => ({
|
|
|
2426
2426
|
...fn(e),
|
|
2427
2427
|
"& .MuiDrawer-paper": fn(e)
|
|
2428
2428
|
}
|
|
2429
|
-
})), wa =
|
|
2429
|
+
})), wa = Z(
|
|
2430
2430
|
bn,
|
|
2431
2431
|
{ shouldForwardProp: (e) => e !== "width" }
|
|
2432
|
-
)(() => ({})), Sa =
|
|
2432
|
+
)(() => ({})), Sa = Z("div")(({ theme: e }) => ({
|
|
2433
2433
|
display: "flex",
|
|
2434
2434
|
alignItems: "center",
|
|
2435
2435
|
justifyContent: "space-between",
|
|
@@ -2526,12 +2526,12 @@ const dn = (e, t) => ({
|
|
|
2526
2526
|
if (!Array.isArray(e))
|
|
2527
2527
|
return e;
|
|
2528
2528
|
let t;
|
|
2529
|
-
return
|
|
2529
|
+
return G.isEmpty(e) ? t = "" : t = e[0], t;
|
|
2530
2530
|
}, Ea = (e) => {
|
|
2531
2531
|
if (Array.isArray(e))
|
|
2532
2532
|
return e;
|
|
2533
2533
|
let t;
|
|
2534
|
-
return
|
|
2534
|
+
return G.isEmpty(e) ? t = [] : t = [e, ""], t;
|
|
2535
2535
|
}, ka = async (e, t, n) => {
|
|
2536
2536
|
const r = e.getSchema().relations[t], o = ye().make(r.model), s = o.getSchema().primaryKey, a = [];
|
|
2537
2537
|
for (const l of n) {
|
|
@@ -2616,7 +2616,7 @@ const hn = async (e, t, n) => {
|
|
|
2616
2616
|
() => s && c.count() === 0,
|
|
2617
2617
|
[s, c]
|
|
2618
2618
|
), b = async (m, g) => {
|
|
2619
|
-
d(g),
|
|
2619
|
+
d(g), G.isEmpty(g) || u(await Da(t, n, g, W(h)));
|
|
2620
2620
|
};
|
|
2621
2621
|
return p.useEffect(() => {
|
|
2622
2622
|
r.length > 0 && (async () => y(await ka(t, n, r)))();
|
|
@@ -2627,7 +2627,7 @@ const hn = async (e, t, n) => {
|
|
|
2627
2627
|
m = !1;
|
|
2628
2628
|
};
|
|
2629
2629
|
}, [S]), p.useEffect(() => {
|
|
2630
|
-
o(h.map((m) => m.getKey())),
|
|
2630
|
+
o(h.map((m) => m.getKey())), G.isEmpty(l) ? (async () => u(await hn(t, n, h)))() : u(W([]));
|
|
2631
2631
|
}, [h]), /* @__PURE__ */ i(
|
|
2632
2632
|
qr,
|
|
2633
2633
|
{
|
|
@@ -2811,7 +2811,7 @@ const hn = async (e, t, n) => {
|
|
|
2811
2811
|
setIsRelation: x
|
|
2812
2812
|
},
|
|
2813
2813
|
children: /* @__PURE__ */ w(
|
|
2814
|
-
|
|
2814
|
+
Q,
|
|
2815
2815
|
{
|
|
2816
2816
|
container: !0,
|
|
2817
2817
|
display: "flex",
|
|
@@ -3049,7 +3049,7 @@ const hn = async (e, t, n) => {
|
|
|
3049
3049
|
};
|
|
3050
3050
|
function Fa(e, t) {
|
|
3051
3051
|
const n = [], r = Ln.toObject(t);
|
|
3052
|
-
return !("where" in r) ||
|
|
3052
|
+
return !("where" in r) || G.isEmpty(r.where) ? [] : (Object.entries(r.where).forEach(([o, s]) => {
|
|
3053
3053
|
let [a, l = "equals"] = o.split(":");
|
|
3054
3054
|
const d = e.find((u) => u.key === a);
|
|
3055
3055
|
if (!d)
|
|
@@ -3540,7 +3540,7 @@ function _a(e, t) {
|
|
|
3540
3540
|
};
|
|
3541
3541
|
}, [e, t]), n;
|
|
3542
3542
|
}
|
|
3543
|
-
const Ha =
|
|
3543
|
+
const Ha = Z(Ae)(({ theme: e }) => ({
|
|
3544
3544
|
"& .MuiInputBase-root": {
|
|
3545
3545
|
backgroundColor: e.palette.background.paper
|
|
3546
3546
|
}
|
|
@@ -3607,7 +3607,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3607
3607
|
)
|
|
3608
3608
|
] });
|
|
3609
3609
|
}, Va = ({ children: e, ...t }) => /* @__PURE__ */ i(
|
|
3610
|
-
|
|
3610
|
+
ee,
|
|
3611
3611
|
{
|
|
3612
3612
|
sx: { width: "1px" },
|
|
3613
3613
|
padding: "checkbox",
|
|
@@ -3674,7 +3674,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3674
3674
|
Ke,
|
|
3675
3675
|
{
|
|
3676
3676
|
value: A,
|
|
3677
|
-
control: /* @__PURE__ */ i(
|
|
3677
|
+
control: /* @__PURE__ */ i(Je, {}),
|
|
3678
3678
|
label: E
|
|
3679
3679
|
},
|
|
3680
3680
|
A
|
|
@@ -3694,7 +3694,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3694
3694
|
Ke,
|
|
3695
3695
|
{
|
|
3696
3696
|
value: "asc",
|
|
3697
|
-
control: /* @__PURE__ */ i(
|
|
3697
|
+
control: /* @__PURE__ */ i(Je, {}),
|
|
3698
3698
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3699
3699
|
e("Ascending"),
|
|
3700
3700
|
/* @__PURE__ */ i(Pn, {})
|
|
@@ -3705,7 +3705,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3705
3705
|
Ke,
|
|
3706
3706
|
{
|
|
3707
3707
|
value: "desc",
|
|
3708
|
-
control: /* @__PURE__ */ i(
|
|
3708
|
+
control: /* @__PURE__ */ i(Je, {}),
|
|
3709
3709
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3710
3710
|
e("Descending"),
|
|
3711
3711
|
/* @__PURE__ */ i(vn, {})
|
|
@@ -3743,7 +3743,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3743
3743
|
Model: o
|
|
3744
3744
|
};
|
|
3745
3745
|
return /* @__PURE__ */ i(zt.Provider, { value: b, children: n });
|
|
3746
|
-
},
|
|
3746
|
+
}, Ja = ({
|
|
3747
3747
|
items: e,
|
|
3748
3748
|
loading: t,
|
|
3749
3749
|
error: n,
|
|
@@ -3757,7 +3757,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3757
3757
|
error: n,
|
|
3758
3758
|
children: /* @__PURE__ */ i(Wr, { component: Dt, children: /* @__PURE__ */ i(Vr, { ...o, children: r }) })
|
|
3759
3759
|
}
|
|
3760
|
-
),
|
|
3760
|
+
), Ya = ({ children: e, ...t }) => {
|
|
3761
3761
|
const {
|
|
3762
3762
|
massActions: n,
|
|
3763
3763
|
columns: r,
|
|
@@ -3790,7 +3790,7 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3790
3790
|
}
|
|
3791
3791
|
) }),
|
|
3792
3792
|
r.map(({ key: g, label: x, sortable: A = !0, ...E }) => /* @__PURE__ */ i(
|
|
3793
|
-
|
|
3793
|
+
ee,
|
|
3794
3794
|
{
|
|
3795
3795
|
sortDirection: A && S === g && b || !1,
|
|
3796
3796
|
...E,
|
|
@@ -3821,14 +3821,14 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3821
3821
|
} = T("cms").getComponents(), [o] = K(), s = parseInt(o.get("per_page") || "15");
|
|
3822
3822
|
return /* @__PURE__ */ i(B, { children: Array.from({ length: s }).map((a, l) => /* @__PURE__ */ w(fe, { children: [
|
|
3823
3823
|
e.length > 0 && /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(Rt, {}) }),
|
|
3824
|
-
n && t.map(({ key: d, label: c, sortable: u, ...h }, y) => /* @__PURE__ */ i(
|
|
3824
|
+
n && t.map(({ key: d, label: c, sortable: u, ...h }, y) => /* @__PURE__ */ i(ee, { ...h, children: /* @__PURE__ */ i(
|
|
3825
3825
|
Kt,
|
|
3826
3826
|
{
|
|
3827
3827
|
variant: "text",
|
|
3828
3828
|
height: 24
|
|
3829
3829
|
}
|
|
3830
3830
|
) }, y)),
|
|
3831
|
-
!n && /* @__PURE__ */ i(
|
|
3831
|
+
!n && /* @__PURE__ */ i(ee, { sx: { px: 0 }, children: Array.from({ length: t.length }).map((d, c) => /* @__PURE__ */ i(
|
|
3832
3832
|
Kt,
|
|
3833
3833
|
{
|
|
3834
3834
|
variant: "text",
|
|
@@ -3847,10 +3847,10 @@ const Ha = G(Ae)(({ theme: e }) => ({
|
|
|
3847
3847
|
} = ae(), {
|
|
3848
3848
|
["ModelIndex.StaticActions"]: l
|
|
3849
3849
|
} = T("cms").getComponents(), d = p.isValidElement(e) ? e : (o || W([])).map(e);
|
|
3850
|
-
return /* @__PURE__ */ w(
|
|
3850
|
+
return /* @__PURE__ */ w(Jr, { ...t, children: [
|
|
3851
3851
|
s && /* @__PURE__ */ i(Ga, {}),
|
|
3852
3852
|
d,
|
|
3853
|
-
o && !o.count() && /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(
|
|
3853
|
+
o && !o.count() && /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
|
|
3854
3854
|
/* @__PURE__ */ i($, { children: r("No :model found", {
|
|
3855
3855
|
model: n.plural().toLocaleLowerCase()
|
|
3856
3856
|
}) }),
|
|
@@ -3864,7 +3864,7 @@ class Xa {
|
|
|
3864
3864
|
return "cms";
|
|
3865
3865
|
}
|
|
3866
3866
|
}
|
|
3867
|
-
const I = Ft(Xa, St), de =
|
|
3867
|
+
const I = Ft(Xa, St), de = Z($)(() => ({
|
|
3868
3868
|
whiteSpace: "nowrap",
|
|
3869
3869
|
overflow: "hidden",
|
|
3870
3870
|
textOverflow: "ellipsis",
|
|
@@ -3901,7 +3901,8 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3901
3901
|
] }), ti = ({ item: e, ...t }) => {
|
|
3902
3902
|
const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l = p.useMemo(() => a.map((y) => ({
|
|
3903
3903
|
...y,
|
|
3904
|
-
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](e.
|
|
3904
|
+
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](G.get(e.toJson(), y.key), e)
|
|
3905
|
+
//
|
|
3905
3906
|
})), [a, e]), {
|
|
3906
3907
|
["ModelIndex.Table.ShrinkedCell"]: d,
|
|
3907
3908
|
["ModelIndex.InstanceActions"]: c
|
|
@@ -3925,7 +3926,7 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3925
3926
|
}
|
|
3926
3927
|
) }),
|
|
3927
3928
|
n && l.map(({ key: y, label: S, sortable: b, content: m, ...g }) => /* @__PURE__ */ i(
|
|
3928
|
-
|
|
3929
|
+
ee,
|
|
3929
3930
|
{
|
|
3930
3931
|
...g,
|
|
3931
3932
|
onClick: () => {
|
|
@@ -3942,7 +3943,7 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3942
3943
|
y
|
|
3943
3944
|
)),
|
|
3944
3945
|
!n && /* @__PURE__ */ i(
|
|
3945
|
-
|
|
3946
|
+
ee,
|
|
3946
3947
|
{
|
|
3947
3948
|
sx: { maxWidth: 0, px: 0 },
|
|
3948
3949
|
onClick: () => {
|
|
@@ -3963,8 +3964,8 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
3963
3964
|
["ModelIndex.PaginationDetails"]: a,
|
|
3964
3965
|
["ModelIndex.PerPageSwitch"]: l
|
|
3965
3966
|
} = T("cms").getComponents();
|
|
3966
|
-
return /* @__PURE__ */ w(
|
|
3967
|
-
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
3967
|
+
return /* @__PURE__ */ w(Yr, { ...t, children: [
|
|
3968
|
+
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
|
|
3968
3969
|
N,
|
|
3969
3970
|
{
|
|
3970
3971
|
direction: r ? "row" : "column-reverse",
|
|
@@ -4008,7 +4009,7 @@ const I = Ft(Xa, St), de = G($)(() => ({
|
|
|
4008
4009
|
["ModelIndex.Pagination"]: o
|
|
4009
4010
|
// ['ModelIndex.PaginationDetails']: PaginationDetails,
|
|
4010
4011
|
} = T("cms").getComponents(), s = v(), a = H("breakpoint", "md");
|
|
4011
|
-
return /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
4012
|
+
return /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: e, sx: { p: 1 }, children: /* @__PURE__ */ w(
|
|
4012
4013
|
N,
|
|
4013
4014
|
{
|
|
4014
4015
|
direction: { xs: "column", [a]: "row" },
|
|
@@ -4070,14 +4071,14 @@ function oi() {
|
|
|
4070
4071
|
allowScrollButtonsMobile: !0,
|
|
4071
4072
|
children: [
|
|
4072
4073
|
/* @__PURE__ */ i(
|
|
4073
|
-
|
|
4074
|
+
Jt,
|
|
4074
4075
|
{
|
|
4075
4076
|
label: t("All"),
|
|
4076
4077
|
value: "all"
|
|
4077
4078
|
}
|
|
4078
4079
|
),
|
|
4079
4080
|
l.map((d) => /* @__PURE__ */ i(
|
|
4080
|
-
|
|
4081
|
+
Jt,
|
|
4081
4082
|
{
|
|
4082
4083
|
label: d.label,
|
|
4083
4084
|
value: d.value
|
|
@@ -4525,7 +4526,7 @@ class li {
|
|
|
4525
4526
|
);
|
|
4526
4527
|
}
|
|
4527
4528
|
}
|
|
4528
|
-
const ci = In(li), be = (e) => !(typeof e > "u" || e === null ||
|
|
4529
|
+
const ci = In(li), be = (e) => !(typeof e > "u" || e === null || G.isEmpty(e));
|
|
4529
4530
|
class ui {
|
|
4530
4531
|
getInputType(t) {
|
|
4531
4532
|
switch (t) {
|
|
@@ -4594,7 +4595,7 @@ class ui {
|
|
|
4594
4595
|
return [
|
|
4595
4596
|
...n.filter((o) => !o.hidden && !o.appended).map((o) => {
|
|
4596
4597
|
let s = o.phpType ?? "string";
|
|
4597
|
-
return o.cast !== null && !
|
|
4598
|
+
return o.cast !== null && !G.isEmpty(o.cast) && (s = o.cast), {
|
|
4598
4599
|
key: o.name,
|
|
4599
4600
|
label: k.human(o.name),
|
|
4600
4601
|
type: s,
|
|
@@ -4620,7 +4621,7 @@ class ui {
|
|
|
4620
4621
|
if (!be(r.key) || !be(r.operator))
|
|
4621
4622
|
return !0;
|
|
4622
4623
|
if (["boolean"].includes(this.getInputType(r.type))) {
|
|
4623
|
-
if (typeof r.value > "u" ||
|
|
4624
|
+
if (typeof r.value > "u" || G.isNull(r.value))
|
|
4624
4625
|
return !0;
|
|
4625
4626
|
} else if (!be(r.value))
|
|
4626
4627
|
return !0;
|
|
@@ -4754,8 +4755,8 @@ const ke = Ft(hi, St), Ie = class Ie extends Mn {
|
|
|
4754
4755
|
"ModelIndex.PerPageSwitch": qa,
|
|
4755
4756
|
"ModelIndex.Sort": $a,
|
|
4756
4757
|
"ModelIndex.StaticActions": ua,
|
|
4757
|
-
"ModelIndex.Table":
|
|
4758
|
-
"ModelIndex.Table.TableHead":
|
|
4758
|
+
"ModelIndex.Table": Ja,
|
|
4759
|
+
"ModelIndex.Table.TableHead": Ya,
|
|
4759
4760
|
"ModelIndex.Table.TableBody": Za,
|
|
4760
4761
|
"ModelIndex.Table.TableFooter": ni,
|
|
4761
4762
|
"ModelIndex.Table.TableToolbar": ri,
|
|
@@ -4870,7 +4871,7 @@ class pi extends Mn {
|
|
|
4870
4871
|
this.translateModelColumns(), this.translateMenuEntries(), this.translateInstanceActions(), this.translateMassActions(), this.translateFormLabels(), this.translateStaticActions();
|
|
4871
4872
|
}
|
|
4872
4873
|
initI18Next() {
|
|
4873
|
-
|
|
4874
|
+
Y.use(ro).init({
|
|
4874
4875
|
lng: re.get("app.locale", "en"),
|
|
4875
4876
|
fallbackLng: re.get("app.fallback_locale", "en"),
|
|
4876
4877
|
resources: {
|
|
@@ -4896,10 +4897,10 @@ class pi extends Mn {
|
|
|
4896
4897
|
"model",
|
|
4897
4898
|
(t) => class extends t {
|
|
4898
4899
|
static singular() {
|
|
4899
|
-
return
|
|
4900
|
+
return Y.t(t.singular());
|
|
4900
4901
|
}
|
|
4901
4902
|
static plural() {
|
|
4902
|
-
return
|
|
4903
|
+
return Y.t(t.plural());
|
|
4903
4904
|
}
|
|
4904
4905
|
},
|
|
4905
4906
|
0
|
|
@@ -4911,7 +4912,7 @@ class pi extends Mn {
|
|
|
4911
4912
|
`model${k.studly(t)}Columns`,
|
|
4912
4913
|
(n) => n.map((r) => ({
|
|
4913
4914
|
...r,
|
|
4914
|
-
label:
|
|
4915
|
+
label: Y.t(r.label)
|
|
4915
4916
|
})),
|
|
4916
4917
|
99
|
|
4917
4918
|
);
|
|
@@ -4921,7 +4922,7 @@ class pi extends Mn {
|
|
|
4921
4922
|
"menuItems",
|
|
4922
4923
|
(t) => {
|
|
4923
4924
|
const n = t.find((r) => r.key === "dashboard");
|
|
4924
|
-
return n && (n.text =
|
|
4925
|
+
return n && (n.text = Y.t(n.text)), t;
|
|
4925
4926
|
},
|
|
4926
4927
|
5
|
|
4927
4928
|
);
|
|
@@ -4931,7 +4932,7 @@ class pi extends Mn {
|
|
|
4931
4932
|
"massActions",
|
|
4932
4933
|
(t) => t.map((n) => ({
|
|
4933
4934
|
...n,
|
|
4934
|
-
label:
|
|
4935
|
+
label: Y.t(n.label)
|
|
4935
4936
|
})),
|
|
4936
4937
|
99
|
|
4937
4938
|
);
|
|
@@ -4941,7 +4942,7 @@ class pi extends Mn {
|
|
|
4941
4942
|
"instanceActions",
|
|
4942
4943
|
(t) => t.map((n) => ({
|
|
4943
4944
|
...n,
|
|
4944
|
-
label:
|
|
4945
|
+
label: Y.t(n.label)
|
|
4945
4946
|
})),
|
|
4946
4947
|
99
|
|
4947
4948
|
);
|
|
@@ -4951,7 +4952,7 @@ class pi extends Mn {
|
|
|
4951
4952
|
"staticActions",
|
|
4952
4953
|
(t, n) => {
|
|
4953
4954
|
const r = t.find(({ key: o }) => o === "create");
|
|
4954
|
-
return r && (r.label =
|
|
4955
|
+
return r && (r.label = Y.t("Create :model", {
|
|
4955
4956
|
model: n.singular()
|
|
4956
4957
|
})), t;
|
|
4957
4958
|
}
|
|
@@ -4961,8 +4962,8 @@ class pi extends Mn {
|
|
|
4961
4962
|
Cr.reducer(
|
|
4962
4963
|
"getDefaultInputProps",
|
|
4963
4964
|
(t) => (Array.isArray(t) ? t.map((n) => {
|
|
4964
|
-
n != null && n.label && (n.label =
|
|
4965
|
-
}) : t != null && t.label && (t.label =
|
|
4965
|
+
n != null && n.label && (n.label = Y.t(n.label));
|
|
4966
|
+
}) : t != null && t.label && (t.label = Y.t(t.label)), t),
|
|
4966
4967
|
99
|
|
4967
4968
|
);
|
|
4968
4969
|
}
|
|
@@ -4976,7 +4977,7 @@ const mi = {
|
|
|
4976
4977
|
main: "#fa510c"
|
|
4977
4978
|
}
|
|
4978
4979
|
}
|
|
4979
|
-
}, gi = (e) => e.make("cms").getRoutes(),
|
|
4980
|
+
}, gi = (e) => e.make("cms").getRoutes(), Ji = ({
|
|
4980
4981
|
theme: e = mi,
|
|
4981
4982
|
themeArgs: t,
|
|
4982
4983
|
providers: n,
|
|
@@ -5010,16 +5011,16 @@ class bi {
|
|
|
5010
5011
|
return "filter";
|
|
5011
5012
|
}
|
|
5012
5013
|
}
|
|
5013
|
-
const
|
|
5014
|
+
const Yi = Ft(bi, St);
|
|
5014
5015
|
export {
|
|
5015
5016
|
I as Cms,
|
|
5016
5017
|
wt as CmsServiceProvider,
|
|
5017
5018
|
mo as DialogProvider,
|
|
5018
|
-
|
|
5019
|
+
Yi as Filter,
|
|
5019
5020
|
ke as Icon,
|
|
5020
5021
|
ho as LayoutProvider,
|
|
5021
5022
|
Ve as Link,
|
|
5022
|
-
|
|
5023
|
+
Ji as LuminixCms,
|
|
5023
5024
|
Ge as ModelProvider,
|
|
5024
5025
|
bo as NotificationProvider,
|
|
5025
5026
|
pi as i18NextServiceProvider,
|