@luminix/mui-cms 0.2.0 → 0.2.2
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 +219 -213
- package/package.json +1 -1
package/dist/mui-cms.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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 {
|
|
4
|
+
import { Str as T, Obj as J, DateTime as Oe, Query as mn, Func as yr, MakeFacade as St, Reducible as gn, ServiceProvider as bn } from "@luminix/support";
|
|
5
|
+
import { config as oe, collect as V, app as k, model as ye, App as At, Model as Re, Route as wr, Config as re } from "@luminix/core";
|
|
5
6
|
import { jsx as i, jsxs as w, Fragment as B } from "react/jsx-runtime";
|
|
6
|
-
import { Outlet as
|
|
7
|
-
import { useCollection as
|
|
8
|
-
import { useMediaQuery as Me, Dialog as
|
|
9
|
-
import p, { useContext as
|
|
10
|
-
import { useTranslation as L, initReactI18next as
|
|
11
|
-
import { Close as Ne, ArrowDropDown as
|
|
12
|
-
import { useTheme as
|
|
13
|
-
import { Str as T, Obj as J, DateTime as Fe, Query as Bn, Func as fo, MakeFacade as Ft, Reducible as In, ServiceProvider as Mn } from "@luminix/support";
|
|
7
|
+
import { Outlet as Sr, useParams as Ar, useNavigate as xt, useSearchParams as G, Link as Pe, Form as xr } from "react-router-dom";
|
|
8
|
+
import { useCollection as yn, PaginationProvider as Cr, usePagination as Se, ModelForm as Er, useApplyReducers as Ct, Forms as Tr, LuminixProvider as kr } from "@luminix/react";
|
|
9
|
+
import { useMediaQuery as Me, Dialog as Et, DialogTitle as Tt, DialogContent as kt, DialogContentText as Dr, DialogActions as Dt, Button as M, Snackbar as Or, Alert as Rr, IconButton as q, AlertTitle as Pr, Box as H, Unstable_Grid2 as Q, Fab as vr, SpeedDial as Fr, SpeedDialIcon as Lr, SpeedDialAction as Br, ButtonGroup as Ir, Popper as Mr, Grow as Nr, Paper as Ot, ClickAwayListener as jr, MenuList as Ur, MenuItem as se, AppBar as wn, Toolbar as qr, Typography as $, Drawer as Sn, Divider as ve, Autocomplete as _r, TextField as Ae, CircularProgress as Hr, Switch as zr, Stack as N, FormControl as at, InputLabel as it, Select as Fe, Badge as Rt, Popover as Wr, Link as lt, Collapse as An, TableCell as ee, RadioGroup as $t, FormControlLabel as Ke, Radio as Ye, TableContainer as Vr, Table as $r, TableHead as Kr, TableRow as fe, Checkbox as Pt, TableSortLabel as Yr, Skeleton as Kt, TableBody as Jr, TableFooter as Gr, Tabs as Zr, Tab as Yt, Breadcrumbs as Xr, List as Qr, ListItem as eo, ListItemButton as to, ListItemIcon as xn, ListItemText as Cn, Menu as En, Avatar as no, CssBaseline as ro } from "@mui/material";
|
|
10
|
+
import p, { useContext as Tn, useMemo as oo } from "react";
|
|
11
|
+
import { useTranslation as L, initReactI18next as so } from "react-i18next";
|
|
12
|
+
import { Close as Ne, ArrowDropDown as kn, ChevronLeft as je, ChevronRight as Ue, HighlightOffOutlined as ct, AddCircleOutline as Dn, FilterList as On, Menu as Rn, LastPage as Pn, FirstPage as vn, Search as ut, SwapVert as Fn, ArrowUpward as Ln, ArrowDownward as Bn, MoreVert as vt, ExpandLess as In, ExpandMore as Mn, Add as ao, CategoryOutlined as io, DashboardOutlined as lo, PeopleOutlined as co } from "@mui/icons-material";
|
|
13
|
+
import { useTheme as Ft, styled as Z, createTheme as uo, ThemeProvider as fo } from "@mui/material/styles";
|
|
14
14
|
import Jt from "react-dom";
|
|
15
15
|
import Y from "i18next";
|
|
16
16
|
const ho = {
|
|
@@ -78,7 +78,7 @@ function go({ children: e, ...t }) {
|
|
|
78
78
|
}, children: [
|
|
79
79
|
e,
|
|
80
80
|
/* @__PURE__ */ w(
|
|
81
|
-
|
|
81
|
+
Et,
|
|
82
82
|
{
|
|
83
83
|
open: !!n,
|
|
84
84
|
"aria-labelledby": "alert-dialog-title",
|
|
@@ -86,9 +86,9 @@ function go({ children: e, ...t }) {
|
|
|
86
86
|
...(n == null ? void 0 : n.dismissable) ?? !0 ? { onClose: d } : {},
|
|
87
87
|
...t,
|
|
88
88
|
children: [
|
|
89
|
-
(s == null ? void 0 : s.title) && /* @__PURE__ */ i(
|
|
90
|
-
/* @__PURE__ */ i(
|
|
91
|
-
/* @__PURE__ */ w(
|
|
89
|
+
(s == null ? void 0 : s.title) && /* @__PURE__ */ i(Tt, { id: "alert-dialog-title", children: s.title }),
|
|
90
|
+
/* @__PURE__ */ i(kt, { children: /* @__PURE__ */ i(Dr, { id: "alert-dialog-description", children: s == null ? void 0 : s.message }) }),
|
|
91
|
+
/* @__PURE__ */ w(Dt, { children: [
|
|
92
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: c, autoFocus: !0, children: (s == null ? void 0 : s.confirmText) ?? l("Yes") })
|
|
@@ -101,7 +101,7 @@ function go({ children: e, ...t }) {
|
|
|
101
101
|
] });
|
|
102
102
|
}
|
|
103
103
|
function v() {
|
|
104
|
-
const { isBreakpointUp: e } =
|
|
104
|
+
const { isBreakpointUp: e } = Tn(X);
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
107
|
const Lt = p.createContext({
|
|
@@ -127,7 +127,7 @@ const Lt = p.createContext({
|
|
|
127
127
|
sx: o,
|
|
128
128
|
...s
|
|
129
129
|
}) => {
|
|
130
|
-
const a =
|
|
130
|
+
const a = yn(dt), l = v(), c = Ft().spacing(l ? 3 : 1), [u, h] = p.useState(), [y, S] = p.useState(c), { vertical: b = "bottom" } = r || {}, m = (g, x) => {
|
|
131
131
|
x !== "clickaway" && h(void 0);
|
|
132
132
|
};
|
|
133
133
|
return p.useEffect(() => {
|
|
@@ -148,7 +148,7 @@ const Lt = p.createContext({
|
|
|
148
148
|
}, children: [
|
|
149
149
|
e,
|
|
150
150
|
/* @__PURE__ */ i(
|
|
151
|
-
|
|
151
|
+
Or,
|
|
152
152
|
{
|
|
153
153
|
open: !!u,
|
|
154
154
|
autoHideDuration: t,
|
|
@@ -160,7 +160,7 @@ const Lt = p.createContext({
|
|
|
160
160
|
},
|
|
161
161
|
...s,
|
|
162
162
|
children: u && /* @__PURE__ */ w(
|
|
163
|
-
|
|
163
|
+
Rr,
|
|
164
164
|
{
|
|
165
165
|
onClose: m,
|
|
166
166
|
severity: u.severity,
|
|
@@ -180,7 +180,7 @@ const Lt = p.createContext({
|
|
|
180
180
|
/* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: m, children: /* @__PURE__ */ i(Ne, {}) }, "close")
|
|
181
181
|
],
|
|
182
182
|
children: [
|
|
183
|
-
u.title && /* @__PURE__ */ i(
|
|
183
|
+
u.title && /* @__PURE__ */ i(Pr, { children: u.title }),
|
|
184
184
|
u.message
|
|
185
185
|
]
|
|
186
186
|
}
|
|
@@ -206,7 +206,7 @@ const Lt = p.createContext({
|
|
|
206
206
|
/* Error */
|
|
207
207
|
}, s) => [
|
|
208
208
|
{
|
|
209
|
-
element: /* @__PURE__ */ i(wo, { children: /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(
|
|
209
|
+
element: /* @__PURE__ */ i(wo, { children: /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(Sr, {}) }) }),
|
|
210
210
|
// errorElement: (
|
|
211
211
|
// <Error />
|
|
212
212
|
// ),
|
|
@@ -220,7 +220,7 @@ const Lt = p.createContext({
|
|
|
220
220
|
{
|
|
221
221
|
path: "/" + T.kebab(l.plural()),
|
|
222
222
|
name: `luminix.cms.${a}.index`,
|
|
223
|
-
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(
|
|
223
|
+
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(Cr, { factory: l.query, children: /* @__PURE__ */ i(r, {}) }) })
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
path: "/" + T.kebab(l.plural()) + "/create",
|
|
@@ -255,8 +255,8 @@ const Ao = () => {
|
|
|
255
255
|
] }) })
|
|
256
256
|
] });
|
|
257
257
|
function z(e, t) {
|
|
258
|
-
const { layout: n } =
|
|
259
|
-
return
|
|
258
|
+
const { layout: n } = Tn(X);
|
|
259
|
+
return oo(() => J.get(n, e, t), [n, e, t]);
|
|
260
260
|
}
|
|
261
261
|
const Co = Z("div")(({ theme: e }) => ({
|
|
262
262
|
padding: e.spacing(0, 1),
|
|
@@ -2112,7 +2112,7 @@ function sa() {
|
|
|
2112
2112
|
}, [e]);
|
|
2113
2113
|
}
|
|
2114
2114
|
const aa = ({ create: e = !1 }) => {
|
|
2115
|
-
const [t, n] = p.useState(), { id: r } =
|
|
2115
|
+
const [t, n] = p.useState(), { id: r } = Ar(), { t: o } = L(), s = Ut(), a = xt(), 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();
|
|
@@ -2139,7 +2139,7 @@ const aa = ({ create: e = !1 }) => {
|
|
|
2139
2139
|
xs: 12,
|
|
2140
2140
|
[d]: 6,
|
|
2141
2141
|
children: /* @__PURE__ */ i(
|
|
2142
|
-
|
|
2142
|
+
Er,
|
|
2143
2143
|
{
|
|
2144
2144
|
submitText: "Save",
|
|
2145
2145
|
...y,
|
|
@@ -2155,7 +2155,7 @@ const aa = ({ create: e = !1 }) => {
|
|
|
2155
2155
|
function ia(e) {
|
|
2156
2156
|
const {
|
|
2157
2157
|
setDisplacement: t
|
|
2158
|
-
} = p.useContext(Lt), n =
|
|
2158
|
+
} = p.useContext(Lt), n = Ft(), r = v(), o = n.spacing(r ? 3 : 1), s = e === !1 ? o : n.spacing(e);
|
|
2159
2159
|
p.useEffect(() => (t(s), () => {
|
|
2160
2160
|
t(o);
|
|
2161
2161
|
}), [s, o, t]);
|
|
@@ -2164,14 +2164,14 @@ function la() {
|
|
|
2164
2164
|
return p.useContext(jn).dialog;
|
|
2165
2165
|
}
|
|
2166
2166
|
function qt() {
|
|
2167
|
-
const e =
|
|
2167
|
+
const e = xt(), 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
|
-
const ca = Z(
|
|
2170
|
+
const ca = Z(vr)(({ theme: e }) => ({
|
|
2171
2171
|
position: "fixed",
|
|
2172
2172
|
bottom: e.spacing(2),
|
|
2173
2173
|
right: e.spacing(2)
|
|
2174
|
-
})), ua = Z(
|
|
2174
|
+
})), ua = Z(Fr)(({ theme: e }) => ({
|
|
2175
2175
|
position: "fixed",
|
|
2176
2176
|
bottom: e.spacing(2),
|
|
2177
2177
|
right: e.spacing(2)
|
|
@@ -2203,13 +2203,13 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2203
2203
|
ua,
|
|
2204
2204
|
{
|
|
2205
2205
|
ariaLabel: `actions for ${t.singular()}`,
|
|
2206
|
-
icon: /* @__PURE__ */ i(
|
|
2206
|
+
icon: /* @__PURE__ */ i(Lr, {}),
|
|
2207
2207
|
color: "primary",
|
|
2208
2208
|
onClose: () => a(!1),
|
|
2209
2209
|
onOpen: () => a(!0),
|
|
2210
2210
|
open: s,
|
|
2211
2211
|
children: h.map((m) => /* @__PURE__ */ i(
|
|
2212
|
-
|
|
2212
|
+
Br,
|
|
2213
2213
|
{
|
|
2214
2214
|
icon: m.icon || m.label.charAt(0).toUpperCase(),
|
|
2215
2215
|
tooltipTitle: m.label,
|
|
@@ -2222,7 +2222,7 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2222
2222
|
document.body
|
|
2223
2223
|
) : /* @__PURE__ */ w(B, { children: [
|
|
2224
2224
|
/* @__PURE__ */ w(
|
|
2225
|
-
|
|
2225
|
+
Ir,
|
|
2226
2226
|
{
|
|
2227
2227
|
variant: "contained",
|
|
2228
2228
|
ref: l,
|
|
@@ -2239,27 +2239,27 @@ const ca = Z(Pr)(({ theme: e }) => ({
|
|
|
2239
2239
|
"aria-label": `select ${t.singular()} actions`,
|
|
2240
2240
|
"aria-haspopup": "menu",
|
|
2241
2241
|
onClick: S,
|
|
2242
|
-
children: /* @__PURE__ */ i(
|
|
2242
|
+
children: /* @__PURE__ */ i(kn, {})
|
|
2243
2243
|
}
|
|
2244
2244
|
)
|
|
2245
2245
|
]
|
|
2246
2246
|
}
|
|
2247
2247
|
),
|
|
2248
2248
|
/* @__PURE__ */ i(
|
|
2249
|
-
|
|
2249
|
+
Mr,
|
|
2250
2250
|
{
|
|
2251
2251
|
open: s,
|
|
2252
2252
|
anchorEl: l.current,
|
|
2253
2253
|
role: void 0,
|
|
2254
2254
|
transition: !0,
|
|
2255
2255
|
children: ({ TransitionProps: m, placement: g }) => /* @__PURE__ */ i(
|
|
2256
|
-
|
|
2256
|
+
Nr,
|
|
2257
2257
|
{
|
|
2258
2258
|
...m,
|
|
2259
2259
|
style: {
|
|
2260
2260
|
transformOrigin: g === "bottom" ? "center top" : "center bottom"
|
|
2261
2261
|
},
|
|
2262
|
-
children: /* @__PURE__ */ i(
|
|
2262
|
+
children: /* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(jr, { onClickAway: b, children: /* @__PURE__ */ i(Ur, { id: "split-button-menu", children: h.map((x, A) => /* @__PURE__ */ i(
|
|
2263
2263
|
se,
|
|
2264
2264
|
{
|
|
2265
2265
|
selected: A === d,
|
|
@@ -2302,7 +2302,7 @@ function fr() {
|
|
|
2302
2302
|
return e;
|
|
2303
2303
|
}
|
|
2304
2304
|
const fa = Z(
|
|
2305
|
-
|
|
2305
|
+
wn,
|
|
2306
2306
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2307
2307
|
)(({ theme: e, open: t, drawerWidth: n, height: r }) => ({
|
|
2308
2308
|
zIndex: e.zIndex.drawer + 1,
|
|
@@ -2320,7 +2320,7 @@ const fa = Z(
|
|
|
2320
2320
|
})
|
|
2321
2321
|
}
|
|
2322
2322
|
})), ha = Z(
|
|
2323
|
-
|
|
2323
|
+
wn,
|
|
2324
2324
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2325
2325
|
)(({ height: e }) => ({ height: e })), pa = ({ slots: e = {}, ...t }) => {
|
|
2326
2326
|
const n = v(), r = n ? fa : ha, {
|
|
@@ -2340,7 +2340,7 @@ const fa = Z(
|
|
|
2340
2340
|
height: h,
|
|
2341
2341
|
drawerWidth: y,
|
|
2342
2342
|
...t,
|
|
2343
|
-
children: /* @__PURE__ */ w(
|
|
2343
|
+
children: /* @__PURE__ */ w(qr, { children: [
|
|
2344
2344
|
(n && !d || !n && !u) && /* @__PURE__ */ i(o, {}),
|
|
2345
2345
|
!n && u && /* @__PURE__ */ i(a, {}),
|
|
2346
2346
|
n ? null : S,
|
|
@@ -2374,7 +2374,7 @@ function ma(e) {
|
|
|
2374
2374
|
return /* @__PURE__ */ i(
|
|
2375
2375
|
q,
|
|
2376
2376
|
{
|
|
2377
|
-
component:
|
|
2377
|
+
component: Pe,
|
|
2378
2378
|
to: -1,
|
|
2379
2379
|
edge: "start",
|
|
2380
2380
|
color: "inherit",
|
|
@@ -2400,7 +2400,7 @@ const dn = (e, t) => ({
|
|
|
2400
2400
|
width: `calc(${e.spacing(9)} + 1px)`,
|
|
2401
2401
|
[e.breakpoints.up("sm")]: { width: `calc(${e.spacing(10)} + 1px)` }
|
|
2402
2402
|
}), ga = Z(
|
|
2403
|
-
|
|
2403
|
+
Sn,
|
|
2404
2404
|
{ shouldForwardProp: (e) => !["open", "width"].includes(String(e)) }
|
|
2405
2405
|
)(({ theme: e, open: t, width: n }) => ({
|
|
2406
2406
|
flexShrink: 0,
|
|
@@ -2415,7 +2415,7 @@ const dn = (e, t) => ({
|
|
|
2415
2415
|
"& .MuiDrawer-paper": fn(e)
|
|
2416
2416
|
}
|
|
2417
2417
|
})), ba = Z(
|
|
2418
|
-
|
|
2418
|
+
Sn,
|
|
2419
2419
|
{ shouldForwardProp: (e) => e !== "width" }
|
|
2420
2420
|
)(() => ({})), ya = Z("div")(({ theme: e }) => ({
|
|
2421
2421
|
display: "flex",
|
|
@@ -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 =
|
|
2428
|
+
const t = Ft(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ? ga : ba, a = z("drawer.width", 280), l = z("appBar.height"), d = k("cms").getComponent("RecursiveList"), c = k("cms").getMenuItems();
|
|
2429
2429
|
return /* @__PURE__ */ w(
|
|
2430
2430
|
s,
|
|
2431
2431
|
{
|
|
@@ -2443,7 +2443,7 @@ const dn = (e, t) => ({
|
|
|
2443
2443
|
...e,
|
|
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
|
-
/* @__PURE__ */ i(
|
|
2446
|
+
/* @__PURE__ */ i(ve, {}),
|
|
2447
2447
|
/* @__PURE__ */ i(H, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ i(
|
|
2448
2448
|
d,
|
|
2449
2449
|
{
|
|
@@ -2460,7 +2460,7 @@ const dn = (e, t) => ({
|
|
|
2460
2460
|
["Layout.BackButton"]: r
|
|
2461
2461
|
} = k("cms").getComponents();
|
|
2462
2462
|
return /* @__PURE__ */ w(
|
|
2463
|
-
|
|
2463
|
+
Ot,
|
|
2464
2464
|
{
|
|
2465
2465
|
sx: {
|
|
2466
2466
|
display: { xs: "none", [t]: "flex" },
|
|
@@ -2617,7 +2617,7 @@ const hn = async (e, t, n) => {
|
|
|
2617
2617
|
}, [S]), p.useEffect(() => {
|
|
2618
2618
|
o(h.map((m) => m.getKey())), J.isEmpty(l) ? (async () => u(await hn(t, n, h)))() : u(V([]));
|
|
2619
2619
|
}, [h]), /* @__PURE__ */ i(
|
|
2620
|
-
|
|
2620
|
+
_r,
|
|
2621
2621
|
{
|
|
2622
2622
|
sx: { width: e ? 377 : "100%" },
|
|
2623
2623
|
open: s,
|
|
@@ -2661,7 +2661,7 @@ const hn = async (e, t, n) => {
|
|
|
2661
2661
|
InputProps: {
|
|
2662
2662
|
...e.InputProps,
|
|
2663
2663
|
endAdornment: /* @__PURE__ */ w(p.Fragment, { children: [
|
|
2664
|
-
t ? /* @__PURE__ */ i(
|
|
2664
|
+
t ? /* @__PURE__ */ i(Hr, { color: "inherit", size: 20 }) : null,
|
|
2665
2665
|
e.InputProps.endAdornment
|
|
2666
2666
|
] })
|
|
2667
2667
|
}
|
|
@@ -2686,7 +2686,7 @@ const hn = async (e, t, n) => {
|
|
|
2686
2686
|
{
|
|
2687
2687
|
type: r.getInputType(o),
|
|
2688
2688
|
label: c,
|
|
2689
|
-
value:
|
|
2689
|
+
value: Oe.toDateTimeLocal(Oe.parse(u)),
|
|
2690
2690
|
onChange: h,
|
|
2691
2691
|
size: "small",
|
|
2692
2692
|
sx: { width: n ? d : "100%" }
|
|
@@ -2696,7 +2696,7 @@ const hn = async (e, t, n) => {
|
|
|
2696
2696
|
const e = v(), { value: t, setValue: n } = p.useContext(me);
|
|
2697
2697
|
return /* @__PURE__ */ w(B, { children: [
|
|
2698
2698
|
/* @__PURE__ */ i(
|
|
2699
|
-
|
|
2699
|
+
zr,
|
|
2700
2700
|
{
|
|
2701
2701
|
checked: t,
|
|
2702
2702
|
onChange: (o) => {
|
|
@@ -2848,7 +2848,7 @@ const hn = async (e, t, n) => {
|
|
|
2848
2848
|
}
|
|
2849
2849
|
),
|
|
2850
2850
|
/* @__PURE__ */ i(
|
|
2851
|
-
|
|
2851
|
+
Fe,
|
|
2852
2852
|
{
|
|
2853
2853
|
labelId: "filter-column-select-label",
|
|
2854
2854
|
id: "filter-column-select",
|
|
@@ -2900,7 +2900,7 @@ const hn = async (e, t, n) => {
|
|
|
2900
2900
|
}
|
|
2901
2901
|
),
|
|
2902
2902
|
/* @__PURE__ */ i(
|
|
2903
|
-
|
|
2903
|
+
Fe,
|
|
2904
2904
|
{
|
|
2905
2905
|
labelId: "filter-operator-select-label",
|
|
2906
2906
|
id: "filter-operator-select",
|
|
@@ -2976,7 +2976,7 @@ const hn = async (e, t, n) => {
|
|
|
2976
2976
|
},
|
|
2977
2977
|
`row_${u.key}`
|
|
2978
2978
|
),
|
|
2979
|
-
!n && /* @__PURE__ */ i(
|
|
2979
|
+
!n && /* @__PURE__ */ i(ve, { sx: {
|
|
2980
2980
|
mt: S ? 0.625 : 1.25,
|
|
2981
2981
|
mb: S ? 0.75 : 1.5,
|
|
2982
2982
|
...S && {
|
|
@@ -3006,7 +3006,7 @@ const hn = async (e, t, n) => {
|
|
|
3006
3006
|
onClick: c,
|
|
3007
3007
|
color: "primary",
|
|
3008
3008
|
sx: { fontSize: 32 },
|
|
3009
|
-
children: /* @__PURE__ */ i(
|
|
3009
|
+
children: /* @__PURE__ */ i(Dn, { fontSize: "inherit" })
|
|
3010
3010
|
}
|
|
3011
3011
|
)
|
|
3012
3012
|
}
|
|
@@ -3036,7 +3036,7 @@ const hn = async (e, t, n) => {
|
|
|
3036
3036
|
);
|
|
3037
3037
|
};
|
|
3038
3038
|
function Pa(e, t) {
|
|
3039
|
-
const n = [], r =
|
|
3039
|
+
const n = [], r = mn.toObject(t);
|
|
3040
3040
|
return !("where" in r) || J.isEmpty(r.where) ? [] : (Object.entries(r.where).forEach(([o, s]) => {
|
|
3041
3041
|
let [a, l = "equals"] = o.split(":");
|
|
3042
3042
|
const d = e.find((u) => u.key === a);
|
|
@@ -3050,7 +3050,7 @@ function Pa(e, t) {
|
|
|
3050
3050
|
break;
|
|
3051
3051
|
}
|
|
3052
3052
|
case "datetime-local": {
|
|
3053
|
-
Array.isArray(s) ? c = s.map((u) =>
|
|
3053
|
+
Array.isArray(s) ? c = s.map((u) => Oe.toDateTimeLocal(u)) : c = Oe.toDateTimeLocal(s);
|
|
3054
3054
|
break;
|
|
3055
3055
|
}
|
|
3056
3056
|
case "boolean": {
|
|
@@ -3096,7 +3096,7 @@ const va = (e) => {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
}), n;
|
|
3098
3098
|
}, Fa = () => {
|
|
3099
|
-
const { t: e } = L(), t = k("filter"), n = v(), r = te(), [o, s] = G(), a = p.useMemo(() => "where" in
|
|
3099
|
+
const { t: e } = L(), t = k("filter"), n = v(), r = te(), [o, s] = G(), a = p.useMemo(() => "where" in mn.toObject(o), [o]), [l, d] = p.useState(null), [c, u] = 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(() => {
|
|
@@ -3144,18 +3144,18 @@ const va = (e) => {
|
|
|
3144
3144
|
"aria-label": "filter",
|
|
3145
3145
|
onClick: S,
|
|
3146
3146
|
children: /* @__PURE__ */ i(
|
|
3147
|
-
|
|
3147
|
+
Rt,
|
|
3148
3148
|
{
|
|
3149
3149
|
color: "secondary",
|
|
3150
3150
|
variant: "dot",
|
|
3151
3151
|
invisible: !a,
|
|
3152
|
-
children: /* @__PURE__ */ i(
|
|
3152
|
+
children: /* @__PURE__ */ i(On, {})
|
|
3153
3153
|
}
|
|
3154
3154
|
)
|
|
3155
3155
|
}
|
|
3156
3156
|
),
|
|
3157
3157
|
n ? /* @__PURE__ */ i(
|
|
3158
|
-
|
|
3158
|
+
Wr,
|
|
3159
3159
|
{
|
|
3160
3160
|
id: "model-filter-popover",
|
|
3161
3161
|
open: h,
|
|
@@ -3168,13 +3168,13 @@ const va = (e) => {
|
|
|
3168
3168
|
children: /* @__PURE__ */ i(pn, {})
|
|
3169
3169
|
}
|
|
3170
3170
|
) : /* @__PURE__ */ w(
|
|
3171
|
-
|
|
3171
|
+
Et,
|
|
3172
3172
|
{
|
|
3173
3173
|
open: h,
|
|
3174
3174
|
onClose: b,
|
|
3175
3175
|
fullWidth: !0,
|
|
3176
3176
|
children: [
|
|
3177
|
-
/* @__PURE__ */ w(
|
|
3177
|
+
/* @__PURE__ */ w(Tt, { children: [
|
|
3178
3178
|
e("Filter :model", { model: r.plural() }),
|
|
3179
3179
|
/* @__PURE__ */ i(
|
|
3180
3180
|
q,
|
|
@@ -3185,8 +3185,8 @@ const va = (e) => {
|
|
|
3185
3185
|
}
|
|
3186
3186
|
)
|
|
3187
3187
|
] }),
|
|
3188
|
-
/* @__PURE__ */ i(
|
|
3189
|
-
/* @__PURE__ */ w(
|
|
3188
|
+
/* @__PURE__ */ i(kt, { dividers: !0, children: /* @__PURE__ */ i(pn, { dialog: !0 }) }),
|
|
3189
|
+
/* @__PURE__ */ w(Dt, { children: [
|
|
3190
3190
|
/* @__PURE__ */ i(
|
|
3191
3191
|
M,
|
|
3192
3192
|
{
|
|
@@ -3224,7 +3224,7 @@ function Wt() {
|
|
|
3224
3224
|
const {
|
|
3225
3225
|
selected: e,
|
|
3226
3226
|
items: t
|
|
3227
|
-
} = p.useContext(zt), n =
|
|
3227
|
+
} = p.useContext(zt), n = yn(e), r = () => {
|
|
3228
3228
|
e.splice(0, e.count());
|
|
3229
3229
|
}, o = (c) => {
|
|
3230
3230
|
const u = e.search(c);
|
|
@@ -3279,7 +3279,7 @@ function La(e) {
|
|
|
3279
3279
|
children: [
|
|
3280
3280
|
/* @__PURE__ */ i(it, { id: "mass-actions-select-label", children: d }),
|
|
3281
3281
|
/* @__PURE__ */ w(
|
|
3282
|
-
|
|
3282
|
+
Fe,
|
|
3283
3283
|
{
|
|
3284
3284
|
labelId: "mass-actions-select-label",
|
|
3285
3285
|
id: "mass-actions-select",
|
|
@@ -3332,13 +3332,13 @@ const Ba = () => {
|
|
|
3332
3332
|
edge: "start",
|
|
3333
3333
|
onClick: e,
|
|
3334
3334
|
sx: { mr: { md: 2 } },
|
|
3335
|
-
children: /* @__PURE__ */ i(
|
|
3335
|
+
children: /* @__PURE__ */ i(Rn, {})
|
|
3336
3336
|
}
|
|
3337
3337
|
);
|
|
3338
3338
|
}, Ve = p.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
|
|
3339
3339
|
lt,
|
|
3340
3340
|
{
|
|
3341
|
-
component:
|
|
3341
|
+
component: Pe,
|
|
3342
3342
|
to: e,
|
|
3343
3343
|
ref: r,
|
|
3344
3344
|
sx: { textDecoration: "none" },
|
|
@@ -3350,8 +3350,8 @@ Ve.displayName = "Link";
|
|
|
3350
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
|
-
"Last »": /* @__PURE__ */ i(
|
|
3354
|
-
"« First": /* @__PURE__ */ i(
|
|
3353
|
+
"Last »": /* @__PURE__ */ i(Pn, {}),
|
|
3354
|
+
"« First": /* @__PURE__ */ i(vn, {})
|
|
3355
3355
|
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }), Ma = ({ variant: e = "default", ...t }) => {
|
|
3356
3356
|
const n = e === "default", [r, o] = G(), [s, a] = p.useState(r.get("page") || "1"), {
|
|
3357
3357
|
links: l,
|
|
@@ -3372,7 +3372,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3372
3372
|
{ url: y, label: "« Previous", active: !1 },
|
|
3373
3373
|
{
|
|
3374
3374
|
element: /* @__PURE__ */ i(
|
|
3375
|
-
|
|
3375
|
+
xr,
|
|
3376
3376
|
{
|
|
3377
3377
|
onSubmit: m,
|
|
3378
3378
|
preventScrollReset: !0,
|
|
@@ -3466,7 +3466,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3466
3466
|
const l = new URLSearchParams(a);
|
|
3467
3467
|
return l.set("per_page", s.target.value.toString()), l;
|
|
3468
3468
|
});
|
|
3469
|
-
}, o =
|
|
3469
|
+
}, o = Ct(
|
|
3470
3470
|
k("cms"),
|
|
3471
3471
|
"perPageOptions",
|
|
3472
3472
|
[15, 30, 75, 150]
|
|
@@ -3483,7 +3483,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3483
3483
|
":"
|
|
3484
3484
|
] }),
|
|
3485
3485
|
/* @__PURE__ */ i(
|
|
3486
|
-
|
|
3486
|
+
Fe,
|
|
3487
3487
|
{
|
|
3488
3488
|
value: t,
|
|
3489
3489
|
onChange: r,
|
|
@@ -3533,7 +3533,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3533
3533
|
backgroundColor: e.palette.background.paper
|
|
3534
3534
|
}
|
|
3535
3535
|
// transition: 'width 250ms ease-in-out',
|
|
3536
|
-
})), _a =
|
|
3536
|
+
})), _a = yr.throttle((e, t) => {
|
|
3537
3537
|
t((n) => {
|
|
3538
3538
|
const r = new URLSearchParams(n);
|
|
3539
3539
|
return e ? r.set("q", e) : r.delete("q"), r;
|
|
@@ -3552,7 +3552,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3552
3552
|
const h = u ? 300 : "calc(100vw - 58px)";
|
|
3553
3553
|
return /* @__PURE__ */ w(B, { children: [
|
|
3554
3554
|
!u && !s && /* @__PURE__ */ i(q, { color: "inherit", onClick: () => a(!0), children: /* @__PURE__ */ i(
|
|
3555
|
-
|
|
3555
|
+
Rt,
|
|
3556
3556
|
{
|
|
3557
3557
|
variant: "dot",
|
|
3558
3558
|
color: "secondary",
|
|
@@ -3565,7 +3565,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3565
3565
|
}
|
|
3566
3566
|
) }),
|
|
3567
3567
|
/* @__PURE__ */ i(
|
|
3568
|
-
|
|
3568
|
+
An,
|
|
3569
3569
|
{
|
|
3570
3570
|
orientation: "horizontal",
|
|
3571
3571
|
in: u || s,
|
|
@@ -3627,16 +3627,16 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3627
3627
|
};
|
|
3628
3628
|
return /* @__PURE__ */ w(B, { children: [
|
|
3629
3629
|
/* @__PURE__ */ i(q, { onClick: b, children: /* @__PURE__ */ i(
|
|
3630
|
-
|
|
3630
|
+
Rt,
|
|
3631
3631
|
{
|
|
3632
3632
|
color: "secondary",
|
|
3633
3633
|
variant: "dot",
|
|
3634
3634
|
invisible: !a,
|
|
3635
|
-
children: /* @__PURE__ */ i(
|
|
3635
|
+
children: /* @__PURE__ */ i(Fn, {})
|
|
3636
3636
|
}
|
|
3637
3637
|
) }),
|
|
3638
|
-
/* @__PURE__ */ w(
|
|
3639
|
-
/* @__PURE__ */ w(
|
|
3638
|
+
/* @__PURE__ */ w(Et, { open: y, onClose: m, fullWidth: !0, children: [
|
|
3639
|
+
/* @__PURE__ */ w(Tt, { children: [
|
|
3640
3640
|
e("Sort :model", { model: o.plural() }),
|
|
3641
3641
|
/* @__PURE__ */ i(
|
|
3642
3642
|
q,
|
|
@@ -3647,7 +3647,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3647
3647
|
}
|
|
3648
3648
|
)
|
|
3649
3649
|
] }),
|
|
3650
|
-
/* @__PURE__ */ w(
|
|
3650
|
+
/* @__PURE__ */ w(kt, { dividers: !0, children: [
|
|
3651
3651
|
/* @__PURE__ */ w(
|
|
3652
3652
|
$t,
|
|
3653
3653
|
{
|
|
@@ -3657,7 +3657,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3657
3657
|
},
|
|
3658
3658
|
children: [
|
|
3659
3659
|
/* @__PURE__ */ i($, { variant: "caption", children: e("Column") }),
|
|
3660
|
-
/* @__PURE__ */ i(
|
|
3660
|
+
/* @__PURE__ */ i(ve, {}),
|
|
3661
3661
|
V(r).whereStrict("sortable", "!=", !1).map(({ key: A, label: E }) => /* @__PURE__ */ i(
|
|
3662
3662
|
Ke,
|
|
3663
3663
|
{
|
|
@@ -3671,7 +3671,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3671
3671
|
}
|
|
3672
3672
|
),
|
|
3673
3673
|
/* @__PURE__ */ i($, { variant: "caption", children: e("Direction") }),
|
|
3674
|
-
/* @__PURE__ */ i(
|
|
3674
|
+
/* @__PURE__ */ i(ve, {}),
|
|
3675
3675
|
/* @__PURE__ */ w(
|
|
3676
3676
|
$t,
|
|
3677
3677
|
{
|
|
@@ -3685,7 +3685,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3685
3685
|
control: /* @__PURE__ */ i(Ye, {}),
|
|
3686
3686
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3687
3687
|
e("Ascending"),
|
|
3688
|
-
/* @__PURE__ */ i(
|
|
3688
|
+
/* @__PURE__ */ i(Ln, {})
|
|
3689
3689
|
] })
|
|
3690
3690
|
}
|
|
3691
3691
|
),
|
|
@@ -3696,7 +3696,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3696
3696
|
control: /* @__PURE__ */ i(Ye, {}),
|
|
3697
3697
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3698
3698
|
e("Descending"),
|
|
3699
|
-
/* @__PURE__ */ i(
|
|
3699
|
+
/* @__PURE__ */ i(Bn, {})
|
|
3700
3700
|
] })
|
|
3701
3701
|
}
|
|
3702
3702
|
)
|
|
@@ -3704,7 +3704,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3704
3704
|
}
|
|
3705
3705
|
)
|
|
3706
3706
|
] }),
|
|
3707
|
-
/* @__PURE__ */ w(
|
|
3707
|
+
/* @__PURE__ */ w(Dt, { children: [
|
|
3708
3708
|
/* @__PURE__ */ i(M, { onClick: x, sx: { mr: "auto" }, children: e("Clear") }),
|
|
3709
3709
|
/* @__PURE__ */ i(M, { onClick: g, variant: "contained", children: e("Apply") })
|
|
3710
3710
|
] })
|
|
@@ -3716,7 +3716,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3716
3716
|
key: o.getSchema().labeledBy,
|
|
3717
3717
|
label: T.human(o.getSchema().labeledBy)
|
|
3718
3718
|
}
|
|
3719
|
-
], [o]), c = v(), u = p.useMemo(() => k("cms").getMassActions(o, l), [o, l]), h =
|
|
3719
|
+
], [o]), c = v(), u = p.useMemo(() => k("cms").getMassActions(o, l), [o, l]), h = Ct(
|
|
3720
3720
|
k("cms"),
|
|
3721
3721
|
`model${T.studly(o.getSchemaName())}Columns`,
|
|
3722
3722
|
d
|
|
@@ -3743,7 +3743,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3743
3743
|
items: e,
|
|
3744
3744
|
loading: t,
|
|
3745
3745
|
error: n,
|
|
3746
|
-
children: /* @__PURE__ */ i(
|
|
3746
|
+
children: /* @__PURE__ */ i(Vr, { component: Ot, children: /* @__PURE__ */ i($r, { ...o, children: r }) })
|
|
3747
3747
|
}
|
|
3748
3748
|
), Ka = ({ children: e, ...t }) => {
|
|
3749
3749
|
const {
|
|
@@ -3765,11 +3765,11 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3765
3765
|
return A.set("order_by", `${g}:asc`), A;
|
|
3766
3766
|
});
|
|
3767
3767
|
};
|
|
3768
|
-
return /* @__PURE__ */ w(
|
|
3768
|
+
return /* @__PURE__ */ w(Kr, { ...t, children: [
|
|
3769
3769
|
e,
|
|
3770
3770
|
s && /* @__PURE__ */ w(fe, { children: [
|
|
3771
3771
|
n.length > 0 && /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
|
|
3772
|
-
|
|
3772
|
+
Pt,
|
|
3773
3773
|
{
|
|
3774
3774
|
indeterminate: d,
|
|
3775
3775
|
checked: c,
|
|
@@ -3783,7 +3783,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3783
3783
|
sortDirection: A && S === g && b || !1,
|
|
3784
3784
|
...E,
|
|
3785
3785
|
children: /* @__PURE__ */ w(
|
|
3786
|
-
|
|
3786
|
+
Yr,
|
|
3787
3787
|
{
|
|
3788
3788
|
active: A && S === g,
|
|
3789
3789
|
direction: b,
|
|
@@ -3809,7 +3809,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3809
3809
|
["ModelIndex.Table.ShrinkedCell"]: o
|
|
3810
3810
|
} = k("cms").getComponents(), s = (n == null ? void 0 : n.count()) || 15;
|
|
3811
3811
|
return /* @__PURE__ */ i(B, { children: Array.from({ length: s }).map((a, l) => /* @__PURE__ */ w(fe, { children: [
|
|
3812
|
-
e.length > 0 && /* @__PURE__ */ i(o, { children: /* @__PURE__ */ i(
|
|
3812
|
+
e.length > 0 && /* @__PURE__ */ i(o, { children: /* @__PURE__ */ i(Pt, {}) }),
|
|
3813
3813
|
r && t.map(({ key: d, label: c, sortable: u, ...h }, y) => /* @__PURE__ */ i(ee, { ...h, children: /* @__PURE__ */ i(
|
|
3814
3814
|
Kt,
|
|
3815
3815
|
{
|
|
@@ -3826,7 +3826,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3826
3826
|
},
|
|
3827
3827
|
c
|
|
3828
3828
|
)) }),
|
|
3829
|
-
/* @__PURE__ */ i(o, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(
|
|
3829
|
+
/* @__PURE__ */ i(o, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(vt, {}) }) })
|
|
3830
3830
|
] }, l)) });
|
|
3831
3831
|
}, Ja = ({ children: e, ...t }) => {
|
|
3832
3832
|
const n = te(), { t: r } = L(), {
|
|
@@ -3836,7 +3836,7 @@ const qa = Z(Ae)(({ theme: e }) => ({
|
|
|
3836
3836
|
} = ae(), {
|
|
3837
3837
|
["ModelIndex.StaticActions"]: l
|
|
3838
3838
|
} = k("cms").getComponents(), d = p.isValidElement(e) ? e : (o || V([])).map(e);
|
|
3839
|
-
return /* @__PURE__ */ i(
|
|
3839
|
+
return /* @__PURE__ */ i(Jr, { ...t, children: s || !(o != null && o.every((c) => c.getType() === n.getSchemaName())) ? /* @__PURE__ */ i(Ya, {}) : o && o.count() ? d : /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
|
|
3840
3840
|
/* @__PURE__ */ i($, { children: r("No :model found", {
|
|
3841
3841
|
model: n.plural().toLocaleLowerCase()
|
|
3842
3842
|
}) }),
|
|
@@ -3849,7 +3849,7 @@ class Ga {
|
|
|
3849
3849
|
return "cms";
|
|
3850
3850
|
}
|
|
3851
3851
|
}
|
|
3852
|
-
const I =
|
|
3852
|
+
const I = St(Ga, At), de = Z($)(() => ({
|
|
3853
3853
|
whiteSpace: "nowrap",
|
|
3854
3854
|
overflow: "hidden",
|
|
3855
3855
|
textOverflow: "ellipsis",
|
|
@@ -3884,7 +3884,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3884
3884
|
" ",
|
|
3885
3885
|
t
|
|
3886
3886
|
] }), Qa = ({ item: e, ...t }) => {
|
|
3887
|
-
const n = v(), r =
|
|
3887
|
+
const n = v(), r = xt(), o = te(), { massActions: s, columns: a } = ae(), l = p.useMemo(() => a.map((y) => ({
|
|
3888
3888
|
...y,
|
|
3889
3889
|
content: I[`model${T.studly(e.getType())}Get${T.studly(y.key)}Content`](J.get(e, y.key), e)
|
|
3890
3890
|
//
|
|
@@ -3904,7 +3904,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3904
3904
|
hover: !e.deletedAt,
|
|
3905
3905
|
children: [
|
|
3906
3906
|
s.length > 0 && /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(
|
|
3907
|
-
|
|
3907
|
+
Pt,
|
|
3908
3908
|
{
|
|
3909
3909
|
checked: u(e),
|
|
3910
3910
|
onChange: () => h(e)
|
|
@@ -3949,7 +3949,7 @@ const I = Ft(Ga, St), de = Z($)(() => ({
|
|
|
3949
3949
|
["ModelIndex.PaginationDetails"]: a,
|
|
3950
3950
|
["ModelIndex.PerPageSwitch"]: l
|
|
3951
3951
|
} = k("cms").getComponents();
|
|
3952
|
-
return /* @__PURE__ */ w(
|
|
3952
|
+
return /* @__PURE__ */ w(Gr, { ...t, children: [
|
|
3953
3953
|
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
|
|
3954
3954
|
N,
|
|
3955
3955
|
{
|
|
@@ -4040,13 +4040,13 @@ function ni() {
|
|
|
4040
4040
|
const u = new URLSearchParams();
|
|
4041
4041
|
return c !== "all" && u.set("tab", c), u;
|
|
4042
4042
|
});
|
|
4043
|
-
}, a = p.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l =
|
|
4043
|
+
}, a = p.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l = Ct(
|
|
4044
4044
|
k("cms"),
|
|
4045
4045
|
`model${T.studly(e.getSchemaName())}Tabs`,
|
|
4046
4046
|
a
|
|
4047
4047
|
);
|
|
4048
4048
|
return l.length === 0 ? null : /* @__PURE__ */ i(H, { sx: { maxWidth: { xs: 320, sm: 480 }, bgcolor: "background.paper" }, children: /* @__PURE__ */ w(
|
|
4049
|
-
|
|
4049
|
+
Zr,
|
|
4050
4050
|
{
|
|
4051
4051
|
value: o,
|
|
4052
4052
|
onChange: s,
|
|
@@ -4080,7 +4080,7 @@ function ri(e) {
|
|
|
4080
4080
|
...n
|
|
4081
4081
|
} = e;
|
|
4082
4082
|
return /* @__PURE__ */ w(
|
|
4083
|
-
|
|
4083
|
+
Xr,
|
|
4084
4084
|
{
|
|
4085
4085
|
"aria-label": "breadcrumb",
|
|
4086
4086
|
...n,
|
|
@@ -4091,7 +4091,7 @@ function ri(e) {
|
|
|
4091
4091
|
underline: "hover",
|
|
4092
4092
|
color: "inherit",
|
|
4093
4093
|
to: "/",
|
|
4094
|
-
component:
|
|
4094
|
+
component: Pe,
|
|
4095
4095
|
children: oe("app.name", "Laravel")
|
|
4096
4096
|
}
|
|
4097
4097
|
),
|
|
@@ -4101,7 +4101,7 @@ function ri(e) {
|
|
|
4101
4101
|
underline: "hover",
|
|
4102
4102
|
color: "inherit",
|
|
4103
4103
|
to: o,
|
|
4104
|
-
component:
|
|
4104
|
+
component: Pe,
|
|
4105
4105
|
children: r
|
|
4106
4106
|
},
|
|
4107
4107
|
s
|
|
@@ -4124,7 +4124,7 @@ const hr = ({
|
|
|
4124
4124
|
...r
|
|
4125
4125
|
}) => {
|
|
4126
4126
|
const [o, s] = p.useState(null), [a, l] = p.useState(null), [d, c] = p.useState({}), u = z("drawer.width", 280), h = k("cms").getComponent("RecursiveMenu");
|
|
4127
|
-
return /* @__PURE__ */ w(
|
|
4127
|
+
return /* @__PURE__ */ w(Qr, { ...r, children: [
|
|
4128
4128
|
t.map((y) => {
|
|
4129
4129
|
const {
|
|
4130
4130
|
text: S,
|
|
@@ -4136,13 +4136,13 @@ const hr = ({
|
|
|
4136
4136
|
onClick: E
|
|
4137
4137
|
} = y;
|
|
4138
4138
|
return m || /* @__PURE__ */ w(
|
|
4139
|
-
|
|
4139
|
+
eo,
|
|
4140
4140
|
{
|
|
4141
4141
|
disablePadding: !0,
|
|
4142
4142
|
sx: { display: "block" },
|
|
4143
4143
|
children: [
|
|
4144
4144
|
/* @__PURE__ */ w(
|
|
4145
|
-
|
|
4145
|
+
to,
|
|
4146
4146
|
{
|
|
4147
4147
|
sx: {
|
|
4148
4148
|
minHeight: 48,
|
|
@@ -4166,7 +4166,7 @@ const hr = ({
|
|
|
4166
4166
|
...A ? { to: A, component: Ve } : {},
|
|
4167
4167
|
children: [
|
|
4168
4168
|
/* @__PURE__ */ w(
|
|
4169
|
-
|
|
4169
|
+
xn,
|
|
4170
4170
|
{
|
|
4171
4171
|
sx: {
|
|
4172
4172
|
minWidth: 0,
|
|
@@ -4189,13 +4189,13 @@ const hr = ({
|
|
|
4189
4189
|
]
|
|
4190
4190
|
}
|
|
4191
4191
|
),
|
|
4192
|
-
!e && /* @__PURE__ */ i(
|
|
4193
|
-
!e && x && (d[g] ? /* @__PURE__ */ i(
|
|
4192
|
+
!e && /* @__PURE__ */ i(Cn, { primary: S }),
|
|
4193
|
+
!e && x && (d[g] ? /* @__PURE__ */ i(In, {}) : /* @__PURE__ */ i(Mn, {}))
|
|
4194
4194
|
]
|
|
4195
4195
|
}
|
|
4196
4196
|
),
|
|
4197
4197
|
x && !e && /* @__PURE__ */ i(
|
|
4198
|
-
|
|
4198
|
+
An,
|
|
4199
4199
|
{
|
|
4200
4200
|
in: d[g],
|
|
4201
4201
|
timeout: "auto",
|
|
@@ -4241,7 +4241,7 @@ const hr = ({
|
|
|
4241
4241
|
}) => {
|
|
4242
4242
|
const [o, s] = p.useState({}), a = z("drawer.width", 280);
|
|
4243
4243
|
return /* @__PURE__ */ w(B, { children: [
|
|
4244
|
-
/* @__PURE__ */ i(
|
|
4244
|
+
/* @__PURE__ */ i(En, { ...r, children: t.map((l) => {
|
|
4245
4245
|
const {
|
|
4246
4246
|
text: d,
|
|
4247
4247
|
icon: c,
|
|
@@ -4271,7 +4271,7 @@ const hr = ({
|
|
|
4271
4271
|
} : {},
|
|
4272
4272
|
children: [
|
|
4273
4273
|
c && /* @__PURE__ */ i(
|
|
4274
|
-
|
|
4274
|
+
xn,
|
|
4275
4275
|
{
|
|
4276
4276
|
sx: {
|
|
4277
4277
|
minWidth: 0,
|
|
@@ -4282,7 +4282,7 @@ const hr = ({
|
|
|
4282
4282
|
children: c
|
|
4283
4283
|
}
|
|
4284
4284
|
),
|
|
4285
|
-
/* @__PURE__ */ i(
|
|
4285
|
+
/* @__PURE__ */ i(Cn, { sx: { opacity: e ? 0 : 1 }, children: d }),
|
|
4286
4286
|
!e && y && /* @__PURE__ */ i(Ue, {})
|
|
4287
4287
|
]
|
|
4288
4288
|
},
|
|
@@ -4424,53 +4424,13 @@ const hr = ({
|
|
|
4424
4424
|
create: (e) => ({ navigate: t }) => {
|
|
4425
4425
|
t(`/${T.kebab(e.plural())}/create`);
|
|
4426
4426
|
}
|
|
4427
|
-
}, si = ({ item: e }) => {
|
|
4428
|
-
const t = qt(), [n] = G(), r = n.get("tab") ?? "all", o = p.useMemo(() => k("cms").getInstanceActions(e.constructor, r), [e, r]), [s, a] = p.useState(null), l = !!s, d = (u) => {
|
|
4429
|
-
a(u.currentTarget);
|
|
4430
|
-
}, c = () => {
|
|
4431
|
-
a(null);
|
|
4432
|
-
};
|
|
4433
|
-
return /* @__PURE__ */ w(B, { children: [
|
|
4434
|
-
/* @__PURE__ */ i(
|
|
4435
|
-
q,
|
|
4436
|
-
{
|
|
4437
|
-
"aria-describedby": "model-item-actions",
|
|
4438
|
-
"aria-label": "filter",
|
|
4439
|
-
onClick: d,
|
|
4440
|
-
children: /* @__PURE__ */ i(Pt, {})
|
|
4441
|
-
}
|
|
4442
|
-
),
|
|
4443
|
-
/* @__PURE__ */ i(
|
|
4444
|
-
An,
|
|
4445
|
-
{
|
|
4446
|
-
id: "model-item-actions",
|
|
4447
|
-
anchorEl: s,
|
|
4448
|
-
open: l,
|
|
4449
|
-
onClose: c,
|
|
4450
|
-
MenuListProps: {
|
|
4451
|
-
"aria-labelledby": "model-item-action"
|
|
4452
|
-
},
|
|
4453
|
-
children: o.map((u) => /* @__PURE__ */ w(
|
|
4454
|
-
se,
|
|
4455
|
-
{
|
|
4456
|
-
onClick: () => {
|
|
4457
|
-
u.callback({
|
|
4458
|
-
item: e,
|
|
4459
|
-
...t
|
|
4460
|
-
}), c();
|
|
4461
|
-
},
|
|
4462
|
-
sx: { px: 1, gap: 0.75 },
|
|
4463
|
-
children: [
|
|
4464
|
-
u.icon,
|
|
4465
|
-
u.label
|
|
4466
|
-
]
|
|
4467
|
-
},
|
|
4468
|
-
u.label
|
|
4469
|
-
))
|
|
4470
|
-
}
|
|
4471
|
-
)
|
|
4472
|
-
] });
|
|
4473
4427
|
};
|
|
4428
|
+
class si {
|
|
4429
|
+
getFacadeAccessor() {
|
|
4430
|
+
return "icon";
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
const Te = St(si, At);
|
|
4474
4434
|
class ai {
|
|
4475
4435
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4476
4436
|
getComponents() {
|
|
@@ -4511,7 +4471,7 @@ class ai {
|
|
|
4511
4471
|
);
|
|
4512
4472
|
}
|
|
4513
4473
|
}
|
|
4514
|
-
const ii =
|
|
4474
|
+
const ii = gn(ai), be = (e) => !(typeof e > "u" || e === null || J.isEmpty(e));
|
|
4515
4475
|
class li {
|
|
4516
4476
|
getInputType(t) {
|
|
4517
4477
|
switch (t) {
|
|
@@ -4576,30 +4536,30 @@ class li {
|
|
|
4576
4536
|
});
|
|
4577
4537
|
}
|
|
4578
4538
|
getFilterableColumns(t) {
|
|
4579
|
-
const { attributes: n = [], relations: r = {} } = t.getSchema()
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
nullable: o.nullable,
|
|
4539
|
+
const { attributes: n = [], relations: r = {} } = t.getSchema(), o = [
|
|
4540
|
+
...n.filter((s) => !s.hidden && !s.appended).map((s) => {
|
|
4541
|
+
let a = s.phpType ?? "string";
|
|
4542
|
+
return s.cast !== null && !J.isEmpty(s.cast) && (a = s.cast), {
|
|
4543
|
+
key: s.name,
|
|
4544
|
+
label: T.human(s.name),
|
|
4545
|
+
type: a,
|
|
4546
|
+
nullable: s.nullable,
|
|
4588
4547
|
is_relation: !1
|
|
4589
4548
|
};
|
|
4590
4549
|
}),
|
|
4591
4550
|
// TODO: review typing of 'acc'
|
|
4592
|
-
...Object.entries(r ?? {}).reduce((
|
|
4593
|
-
...
|
|
4551
|
+
...Object.entries(r ?? {}).reduce((s, [a]) => [
|
|
4552
|
+
...s,
|
|
4594
4553
|
{
|
|
4595
|
-
key:
|
|
4596
|
-
label: T.human(
|
|
4554
|
+
key: a,
|
|
4555
|
+
label: T.human(a),
|
|
4597
4556
|
type: "autocomplete",
|
|
4598
4557
|
nullable: !1,
|
|
4599
4558
|
is_relation: !0
|
|
4600
4559
|
}
|
|
4601
4560
|
], [])
|
|
4602
4561
|
];
|
|
4562
|
+
return this.filterableColumns(o, t);
|
|
4603
4563
|
}
|
|
4604
4564
|
checkIfCanApplyFilters(t) {
|
|
4605
4565
|
return !!(t.length === 0 || t.map((r) => {
|
|
@@ -4614,11 +4574,11 @@ class li {
|
|
|
4614
4574
|
}).includes(!0));
|
|
4615
4575
|
}
|
|
4616
4576
|
}
|
|
4617
|
-
const ci =
|
|
4577
|
+
const ci = gn(li);
|
|
4618
4578
|
class ui {
|
|
4619
4579
|
constructor() {
|
|
4620
4580
|
$e(this, "icons", []);
|
|
4621
|
-
|
|
4581
|
+
Re.reducer(
|
|
4622
4582
|
"model",
|
|
4623
4583
|
(t) => {
|
|
4624
4584
|
const n = this;
|
|
@@ -4632,7 +4592,7 @@ class ui {
|
|
|
4632
4592
|
);
|
|
4633
4593
|
}
|
|
4634
4594
|
forModel(t, n) {
|
|
4635
|
-
|
|
4595
|
+
Re.reducer(`model${T.studly(t)}`, (r) => {
|
|
4636
4596
|
const o = this;
|
|
4637
4597
|
return class extends r {
|
|
4638
4598
|
static icon() {
|
|
@@ -4657,16 +4617,57 @@ class ui {
|
|
|
4657
4617
|
return this.icons.map((t) => t.name);
|
|
4658
4618
|
}
|
|
4659
4619
|
}
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
}
|
|
4664
|
-
|
|
4665
|
-
|
|
4620
|
+
const di = ({ item: e }) => {
|
|
4621
|
+
const t = qt(), [n] = G(), r = n.get("tab") ?? "all", o = p.useMemo(() => k("cms").getInstanceActions(e.constructor, r), [e, r]), [s, a] = p.useState(null), l = !!s, d = (u) => {
|
|
4622
|
+
a(u.currentTarget);
|
|
4623
|
+
}, c = () => {
|
|
4624
|
+
a(null);
|
|
4625
|
+
};
|
|
4626
|
+
return /* @__PURE__ */ w(B, { children: [
|
|
4627
|
+
/* @__PURE__ */ i(
|
|
4628
|
+
q,
|
|
4629
|
+
{
|
|
4630
|
+
"aria-describedby": "model-item-actions",
|
|
4631
|
+
"aria-label": "filter",
|
|
4632
|
+
onClick: d,
|
|
4633
|
+
children: /* @__PURE__ */ i(vt, {})
|
|
4634
|
+
}
|
|
4635
|
+
),
|
|
4636
|
+
/* @__PURE__ */ i(
|
|
4637
|
+
En,
|
|
4638
|
+
{
|
|
4639
|
+
id: "model-item-actions",
|
|
4640
|
+
anchorEl: s,
|
|
4641
|
+
open: l,
|
|
4642
|
+
onClose: c,
|
|
4643
|
+
MenuListProps: {
|
|
4644
|
+
"aria-labelledby": "model-item-action"
|
|
4645
|
+
},
|
|
4646
|
+
children: o.map((u) => /* @__PURE__ */ w(
|
|
4647
|
+
se,
|
|
4648
|
+
{
|
|
4649
|
+
onClick: () => {
|
|
4650
|
+
u.callback({
|
|
4651
|
+
item: e,
|
|
4652
|
+
...t
|
|
4653
|
+
}), c();
|
|
4654
|
+
},
|
|
4655
|
+
sx: { px: 1, gap: 0.75 },
|
|
4656
|
+
children: [
|
|
4657
|
+
u.icon,
|
|
4658
|
+
u.label
|
|
4659
|
+
]
|
|
4660
|
+
},
|
|
4661
|
+
u.label
|
|
4662
|
+
))
|
|
4663
|
+
}
|
|
4664
|
+
)
|
|
4665
|
+
] });
|
|
4666
|
+
}, fi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAY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90dFDf5CStSUtTzYEiKMSR/cz27fTirvs0043qQZMd0ig+19NLL1y+LBTBN8QMVy78lf/31DiHw9yev/ceOrZjh8klzQ1X+eDVW7fY59oE0MueanJzWgGMYoBDO8GV8n8NhzVVgJ/2D9AER+2RsjLxgd3NwEpCVioWFJpPba00J4XF0SofRLRmss+5s7PopR9+jJXrrOYS+1sa132NNbsFfLJMpWBZfp5Y+92uLhq+fVuohyrYydBII8mEA4cK0OPaIADDEb4pYDhEKk4FXJEd4O/bZJtqi6Ga4msoEBDFqII9Lley2cR6KkBcPsKwrYA7yxc9cfd3SYdUbXG+0ykCAkfWHZeLSYfDggBc8X2IG6hs/vJ6nVPJAxti/rgqZLFFw0gj1/DxrhhvbZQL0/iu1fz7GhQ8H69QKue8mo3iQvv/YOegoJNby2rKpLE2mGKXifyHg9uz3Lq4BTUeSEY31vZzOwYmbOFfRuevM6ot++oAAAAASUVORK5CYII=";
|
|
4666
4667
|
function pi() {
|
|
4667
4668
|
const e = Me("(prefers-color-scheme: dark)"), t = dr();
|
|
4668
4669
|
return /* @__PURE__ */ i(
|
|
4669
|
-
|
|
4670
|
+
no,
|
|
4670
4671
|
{
|
|
4671
4672
|
src: e ? fi : hi,
|
|
4672
4673
|
alt: "Luminix",
|
|
@@ -4679,7 +4680,7 @@ function pi() {
|
|
|
4679
4680
|
}
|
|
4680
4681
|
);
|
|
4681
4682
|
}
|
|
4682
|
-
const Ie = class Ie extends
|
|
4683
|
+
const Ie = class Ie extends bn {
|
|
4683
4684
|
register() {
|
|
4684
4685
|
this.app.singleton("cms", () => new ii()), this.app.singleton("filter", () => new ci()), this.app.singleton("icon", () => new ui()), this.registerIcons();
|
|
4685
4686
|
}
|
|
@@ -4704,31 +4705,31 @@ const Ie = class Ie extends Mn {
|
|
|
4704
4705
|
// }
|
|
4705
4706
|
registerIcons() {
|
|
4706
4707
|
Te.registerIcon({
|
|
4707
|
-
Add:
|
|
4708
|
-
AddCircleOutline:
|
|
4709
|
-
ArrowDownward:
|
|
4710
|
-
ArrowDropDown:
|
|
4711
|
-
ArrowUpward:
|
|
4712
|
-
CategoryOutlined:
|
|
4708
|
+
Add: ao,
|
|
4709
|
+
AddCircleOutline: Dn,
|
|
4710
|
+
ArrowDownward: Bn,
|
|
4711
|
+
ArrowDropDown: kn,
|
|
4712
|
+
ArrowUpward: Ln,
|
|
4713
|
+
CategoryOutlined: io,
|
|
4713
4714
|
ChevronLeft: je,
|
|
4714
4715
|
ChevronRight: Ue,
|
|
4715
4716
|
Close: Ne,
|
|
4716
|
-
DashboardOutlined:
|
|
4717
|
-
ExpandLess:
|
|
4718
|
-
ExpandMore:
|
|
4719
|
-
FilterList:
|
|
4720
|
-
FirstPage:
|
|
4717
|
+
DashboardOutlined: lo,
|
|
4718
|
+
ExpandLess: In,
|
|
4719
|
+
ExpandMore: Mn,
|
|
4720
|
+
FilterList: On,
|
|
4721
|
+
FirstPage: vn,
|
|
4721
4722
|
HighlightOffOutlined: ct,
|
|
4722
|
-
LastPage:
|
|
4723
|
-
Menu:
|
|
4724
|
-
MoreVert:
|
|
4725
|
-
PeopleOutlined:
|
|
4723
|
+
LastPage: Pn,
|
|
4724
|
+
Menu: Rn,
|
|
4725
|
+
MoreVert: vt,
|
|
4726
|
+
PeopleOutlined: co,
|
|
4726
4727
|
Search: ut,
|
|
4727
|
-
SwapVert:
|
|
4728
|
+
SwapVert: Fn
|
|
4728
4729
|
}), Te.forModel("user", "PeopleOutlined");
|
|
4729
4730
|
}
|
|
4730
4731
|
bootRoutes() {
|
|
4731
|
-
I.reducer("cmsRoutes", So, 0),
|
|
4732
|
+
I.reducer("cmsRoutes", So, 0), wr.reducer("domRouterOptions", (t) => ({
|
|
4732
4733
|
...t,
|
|
4733
4734
|
basename: re.get("luminix.admin.url", "/admin")
|
|
4734
4735
|
}));
|
|
@@ -4751,7 +4752,7 @@ const Ie = class Ie extends Mn {
|
|
|
4751
4752
|
"Layout.SearchBar": Ha,
|
|
4752
4753
|
"Layout.BackButton": ma,
|
|
4753
4754
|
"ModelIndex.Filter": Fa,
|
|
4754
|
-
"ModelIndex.InstanceActions":
|
|
4755
|
+
"ModelIndex.InstanceActions": di,
|
|
4755
4756
|
"ModelIndex.MassActions": La,
|
|
4756
4757
|
"ModelIndex.Pagination": Ma,
|
|
4757
4758
|
"ModelIndex.PaginationDetails": Na,
|
|
@@ -4864,7 +4865,7 @@ const Ie = class Ie extends Mn {
|
|
|
4864
4865
|
};
|
|
4865
4866
|
$e(Ie, "applyUserDefaults", !0);
|
|
4866
4867
|
let wt = Ie;
|
|
4867
|
-
class mi extends
|
|
4868
|
+
class mi extends bn {
|
|
4868
4869
|
register() {
|
|
4869
4870
|
this.app.once("booting", () => {
|
|
4870
4871
|
this.initI18Next(), this.translateModelNames();
|
|
@@ -4874,7 +4875,7 @@ class mi extends Mn {
|
|
|
4874
4875
|
this.translateModelColumns(), this.translateMenuEntries(), this.translateInstanceActions(), this.translateMassActions(), this.translateFormLabels(), this.translateStaticActions();
|
|
4875
4876
|
}
|
|
4876
4877
|
initI18Next() {
|
|
4877
|
-
Y.use(
|
|
4878
|
+
Y.use(so).init({
|
|
4878
4879
|
lng: re.get("app.locale", "en"),
|
|
4879
4880
|
fallbackLng: re.get("app.fallback_locale", "en"),
|
|
4880
4881
|
resources: {
|
|
@@ -4896,7 +4897,7 @@ class mi extends Mn {
|
|
|
4896
4897
|
});
|
|
4897
4898
|
}
|
|
4898
4899
|
translateModelNames() {
|
|
4899
|
-
|
|
4900
|
+
Re.reducer(
|
|
4900
4901
|
"model",
|
|
4901
4902
|
(t) => class extends t {
|
|
4902
4903
|
static singular() {
|
|
@@ -4910,7 +4911,7 @@ class mi extends Mn {
|
|
|
4910
4911
|
);
|
|
4911
4912
|
}
|
|
4912
4913
|
translateModelColumns() {
|
|
4913
|
-
for (const t of Object.keys(
|
|
4914
|
+
for (const t of Object.keys(Re.make()))
|
|
4914
4915
|
I.reducer(
|
|
4915
4916
|
`model${T.studly(t)}Columns`,
|
|
4916
4917
|
(n) => n.map((r) => ({
|
|
@@ -4962,11 +4963,16 @@ class mi extends Mn {
|
|
|
4962
4963
|
);
|
|
4963
4964
|
}
|
|
4964
4965
|
translateFormLabels() {
|
|
4965
|
-
|
|
4966
|
+
Tr.reducer(
|
|
4966
4967
|
"getDefaultInputProps",
|
|
4967
|
-
(t) =>
|
|
4968
|
-
n
|
|
4969
|
-
|
|
4968
|
+
(t) => Array.isArray(t) ? t.map((n) => ({
|
|
4969
|
+
...n,
|
|
4970
|
+
label: n != null && n.label ? Y.t(n.label) : n == null ? void 0 : n.label
|
|
4971
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4972
|
+
})) : {
|
|
4973
|
+
...t,
|
|
4974
|
+
label: t != null && t.label ? Y.t(t.label) : t == null ? void 0 : t.label
|
|
4975
|
+
},
|
|
4970
4976
|
99
|
|
4971
4977
|
);
|
|
4972
4978
|
}
|
|
@@ -4986,7 +4992,7 @@ const gi = {
|
|
|
4986
4992
|
providers: n,
|
|
4987
4993
|
...r
|
|
4988
4994
|
}) => {
|
|
4989
|
-
const o = Me("(prefers-color-scheme: dark)"), s = p.useMemo(() =>
|
|
4995
|
+
const o = Me("(prefers-color-scheme: dark)"), s = p.useMemo(() => uo({
|
|
4990
4996
|
...e,
|
|
4991
4997
|
palette: {
|
|
4992
4998
|
...e.palette,
|
|
@@ -4997,10 +5003,10 @@ const gi = {
|
|
|
4997
5003
|
mi,
|
|
4998
5004
|
...n || []
|
|
4999
5005
|
], [n]);
|
|
5000
|
-
return /* @__PURE__ */ w(
|
|
5001
|
-
/* @__PURE__ */ i(
|
|
5006
|
+
return /* @__PURE__ */ w(fo, { theme: s, children: [
|
|
5007
|
+
/* @__PURE__ */ i(ro, {}),
|
|
5002
5008
|
/* @__PURE__ */ i(
|
|
5003
|
-
|
|
5009
|
+
kr,
|
|
5004
5010
|
{
|
|
5005
5011
|
routes: bi,
|
|
5006
5012
|
providers: a,
|
|
@@ -5014,7 +5020,7 @@ class yi {
|
|
|
5014
5020
|
return "filter";
|
|
5015
5021
|
}
|
|
5016
5022
|
}
|
|
5017
|
-
const Gi =
|
|
5023
|
+
const Gi = St(yi, At);
|
|
5018
5024
|
export {
|
|
5019
5025
|
I as Cms,
|
|
5020
5026
|
wt as CmsServiceProvider,
|