@applica-software-guru/react-admin 1.5.289 → 1.5.291
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Pagination/index.d.ts +3 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +43 -43
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +281 -280
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +45 -45
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Pagination/Pagination.tsx +1 -1
- package/src/components/index.jsx +1 -0
- package/src/index.ts +0 -1
package/dist/react-admin.es.js
CHANGED
|
@@ -10,14 +10,14 @@ import JR from "@emotion/styled";
|
|
|
10
10
|
import { CacheProvider as ek, Global as tk, ThemeContext as Am, css as Sm, keyframes as fs, useTheme as Em } from "@emotion/react";
|
|
11
11
|
import * as D from "react";
|
|
12
12
|
import Ie, { createContext as cn, useLayoutEffect as nk, useEffect as Me, useContext as Mt, useRef as tr, useInsertionEffect as rk, useCallback as Ce, useMemo as We, forwardRef as Or, createElement as Nw, useId as ok, useState as Fe, Children as Vt, isValidElement as Ln, cloneElement as Bn, useReducer as Im, Suspense as Vw, Fragment as ik, memo as $w } from "react";
|
|
13
|
-
import { Card as Tm, CardHeader as qh, Typography as ge, Divider as Xi, CardContent as Ww, Grid as Ee, Box as Re, Tooltip as Bl, tooltipClasses as Va, Grow as ak, Collapse as Om, Fade as jw, Slide as sk, Zoom as zw, CircularProgress as ci, circularProgressClasses as lk, LinearProgress as Pm, Popover as Mm, styled as ps, IconButton as Cl, MenuItem as Rm, useMediaQuery as oi, Button as en, Fab as Uw, alpha as c1, TextField as Hw, useTheme as En, Container as Ud, Stack as bt, InputLabel as km, FormHelperText as Gw, ListItemText as nr, Chip as Kh, Menu as Yw, Alert as ck, AlertTitle as uk, List as ui, ListItem as ed, ListItemButton as jr, ListItemIcon as Wr, Badge as qw, ListItemAvatar as Kw, Dialog as hs, TableCell as Ui, TableContainer as dk, Paper as Ji, Table as Xw, TableHead as fk, TableRow as rh, TableBody as pk, Stepper as hk, Step as gk, StepLabel as mk, Toolbar as Nl, ButtonBase as vk, Drawer as Zw, AppBar as Hd, ToggleButton as yk, Avatar as Xh, Popper as Gd, ClickAwayListener as es, useScrollTrigger as bk, buttonClasses as xk,
|
|
13
|
+
import { Card as Tm, CardHeader as qh, Typography as ge, Divider as Xi, CardContent as Ww, Grid as Ee, Box as Re, Tooltip as Bl, tooltipClasses as Va, Grow as ak, Collapse as Om, Fade as jw, Slide as sk, Zoom as zw, CircularProgress as ci, circularProgressClasses as lk, LinearProgress as Pm, Popover as Mm, styled as ps, IconButton as Cl, MenuItem as Rm, useMediaQuery as oi, Button as en, Fab as Uw, alpha as c1, TextField as Hw, useTheme as En, Container as Ud, Stack as bt, InputLabel as km, FormHelperText as Gw, ListItemText as nr, Chip as Kh, Menu as Yw, Alert as ck, AlertTitle as uk, List as ui, ListItem as ed, ListItemButton as jr, ListItemIcon as Wr, Badge as qw, ListItemAvatar as Kw, Dialog as hs, TableCell as Ui, TableContainer as dk, Paper as Ji, Table as Xw, TableHead as fk, TableRow as rh, TableBody as pk, Stepper as hk, Step as gk, StepLabel as mk, Toolbar as Nl, ButtonBase as vk, Drawer as Zw, AppBar as Hd, ToggleButton as yk, Avatar as Xh, Popper as Gd, ClickAwayListener as es, useScrollTrigger as bk, buttonClasses as xk, Pagination as Ck, TablePagination as u1, DialogContent as Qw, darken as wk, lighten as Ak, Link as Sk, StyledEngineProvider as Ek, CssBaseline as Ik } from "@mui/material";
|
|
14
14
|
import { HomeOutlined as oh, HomeFilled as ih, ApartmentOutlined as Zh, AntDesignOutlined as Tk, FlagFilled as Ok, FlagOutlined as Pk, PlusCircleOutlined as Jw, CaretUpOutlined as Mk, CaretDownOutlined as Rk, MenuUnfoldOutlined as kk, MenuFoldOutlined as _k, MessageOutlined as Dk, BellOutlined as Fk, CheckCircleOutlined as Lk, LogoutOutlined as Bk, MoreOutlined as Nk, UpOutlined as Vk, DownOutlined as td, RightOutlined as _m, BorderOutlined as $k, SunOutlined as Wk, MoonOutlined as jk, CheckSquareFilled as zk, MinusSquareFilled as Uk } from "@ant-design/icons";
|
|
15
15
|
import { useLocation as Vl, Link as ln, useNavigate as Dm, Outlet as Hk, useParams as Gk } from "react-router-dom";
|
|
16
16
|
import { MoreHoriz as Yk, MoreVert as qk, History as Kk, ExpandLess as Xk, ExpandMore as Zk, Key as Qk, LogoutOutlined as eA, VpnKey as Jk, Close as e8, Inbox as t8, Email as n8, Drafts as r8 } from "@mui/icons-material";
|
|
17
|
-
import { useTranslate as ht, useResourceContext as $l, useCreatePath as tA, useLoading as o8, usePreferencesEditor as i8, PreferenceKeyContextProvider as a8, usePreference as s8, useRecordContext as gs, usePreferenceInput as l8, warning as nA, useTimeout as c8, useRefresh as rA, useSaveContext as u8, setSubmissionErrors as d8, useResourceDefinitions as f8, useGetIdentity as Yd, usePermissions as p8, useLocaleState as Wl, useLocales as Fm, composeValidators as h8, useInput as g8, ValidationError as m8, useAuthProvider as ms, useNotify as ko, ResourceContextProvider as v8, EditContextProvider as y8, required as ii, CreateContextProvider as b8, useTranslateLabel as x8, FormDataConsumer as d1, useRedirect as Lm, useUpdate as C8, useGetList as w8, useUpdateMany as A8, useLogout as oA, useDataProvider as iA,
|
|
17
|
+
import { useTranslate as ht, useResourceContext as $l, useCreatePath as tA, useLoading as o8, usePreferencesEditor as i8, PreferenceKeyContextProvider as a8, usePreference as s8, useRecordContext as gs, usePreferenceInput as l8, warning as nA, useTimeout as c8, useRefresh as rA, useSaveContext as u8, setSubmissionErrors as d8, useResourceDefinitions as f8, useGetIdentity as Yd, usePermissions as p8, useLocaleState as Wl, useLocales as Fm, composeValidators as h8, useInput as g8, ValidationError as m8, useAuthProvider as ms, useNotify as ko, ResourceContextProvider as v8, EditContextProvider as y8, required as ii, CreateContextProvider as b8, useTranslateLabel as x8, FormDataConsumer as d1, useRedirect as Lm, useUpdate as C8, useGetList as w8, useUpdateMany as A8, useLogout as oA, useDataProvider as iA, useListPaginationContext as S8, sanitizeListRestProps as nd, ComponentPropType as E8, CreateBase as I8, EditBase as T8, FieldTitle as O8, useListContext as Bm, useResourceDefinition as P8, useGetResourceLabel as M8, ListBase as R8, useSafeSetState as k8, useLogin as _8, useCheckAuth as D8, Form as F8, email as aA } from "ra-core";
|
|
18
18
|
import { useLocation as jl, matchPath as L8, useNavigate as B8 } from "react-router";
|
|
19
19
|
import { useRecordContext as tn, useTranslate as Hr, useResourceContext as _o, Toolbar as N8, Form as zl, SaveButton as Ul, SimpleForm as V8, DeleteWithConfirmButton as Nm, FieldTitle as Vm, ArrayInput as $8, EditButton as W8, CloneButton as j8, useDataProvider as $m, useNotify as qd, ImageField as z8, useLocaleState as sA, DateField as lA, EmailField as U8, FileField as H8, FunctionField as G8, TextField as Y8, ReferenceManyField as q8, Pagination as Wm, useInput as jm, FileInput as cA, AutocompleteArrayInput as K8, AutocompleteInput as X8, BooleanInput as Z8, DateInput as Q8, DateTimeInput as J8, ImageInput as e9, TextInput as t9, NumberInput as n9, RadioButtonGroupInput as r9, ReferenceArrayInput as o9, ReferenceInput as i9, ResourceContextProvider as a9, ListToolbar as uA, SearchInput as s9, SelectArrayInput as l9, SelectInput as c9, maxLength as u9, TimeInput as d9, Create as f9, Edit as p9, Show as h9, SimpleFormIterator as g9, TabbedForm as zm, useArrayInput as Um, EditContextProvider as m9, Confirm as dA, Notification as v9, Button as Hl, useAuthProvider as y9, TopToolbar as b9, useListContext as Hm, PureDatagridBody as x9, DatagridBody as C9, DatagridHeader as w9, DatagridLoading as A9, DatagridRoot as S9, DatagridClasses as ah, ListNoResults as E9, BulkDeleteButton as I9, Title as T9, ListActions as O9, Empty as P9, useRefresh as fA, useUnselectAll as pA, useUpdateMany as hA, useRedirect as M9, useUpdate as R9, Datagrid as k9, SimpleList as _9, CoreAdminContext as D9, localStorageStore as F9, AdminUI as L9 } from "react-admin";
|
|
20
|
-
import { ArrayField as aue, ArrayInputContext as sue, BooleanField as lue, BulkDeleteWithConfirmButton as cue, ChipField as uue, Confirm as due, CreateButton as fue, CreateContextProvider as pue, CustomRoutes as hue, DeleteWithConfirmButton as gue, DeleteWithUndoButton as mue, EditButton as vue, EditContextProvider as yue, FieldTitle as bue, FilterButton as xue, Form as Cue, FormDataConsumer as wue, HttpError as Aue, I18nContextProvider as Sue, ListBase as Eue, ListToolbar as Iue, LoadingIndicator as Tue,
|
|
20
|
+
import { ArrayField as aue, ArrayInputContext as sue, BooleanField as lue, BulkDeleteWithConfirmButton as cue, ChipField as uue, Confirm as due, CreateButton as fue, CreateContextProvider as pue, CustomRoutes as hue, DeleteWithConfirmButton as gue, DeleteWithUndoButton as mue, EditButton as vue, EditContextProvider as yue, FieldTitle as bue, FilterButton as xue, Form as Cue, FormDataConsumer as wue, HttpError as Aue, I18nContextProvider as Sue, ListBase as Eue, ListToolbar as Iue, LoadingIndicator as Tue, SimpleFormIterator as Oue, RecordContextProvider as Pue, ReferenceArrayField as Mue, ReferenceField as Rue, Resource as kue, ResourceContextProvider as _ue, SaveButton as Due, SimpleFormIteratorContext as Fue, SimpleShowLayout as Lue, SingleFieldList as Bue, TabbedFormTabs as Nue, TopToolbar as Vue, UrlField as $ue, ValidationError as Wue, choices as jue, email as zue, maxLength as Uue, maxValue as Hue, minLength as Gue, minValue as Yue, number as que, regex as Kue, required as Xue, useArrayInput as Zue, useAuthProvider as Que, useChoices as Jue, useChoicesContext as ede, useCreate as tde, useCreateContext as nde, useCreateController as rde, useCreateSuggestionContext as ode, useDataProvider as ide, useEditContext as ade, useEditController as sde, useGetIdentity as lde, useGetList as cde, useGetMany as ude, useGetManyReference as dde, useGetOne as fde, useInput as pde, useListContext as hde, useListController as gde, useLocaleState as mde, useLocales as vde, useNotify as yde, usePermissions as bde, useRecordContext as xde, useRefresh as Cde, useRemoveFromStore as wde, useResetStore as Ade, useResourceContext as Sde, useResourceDefinition as Ede, useResourceDefinitions as Ide, useShowContext as Tde, useShowController as Ode, useSimpleFormIterator as Pde, useSimpleFormIteratorItem as Mde, useStore as Rde, useStoreContext as kde, useTranslate as _de, useTranslateLabel as Dde, useUnselect as Fde, useUnselectAll as Lde, useUpdate as Bde, useUpdateMany as Nde, withLifecycleCallbacks as Vde } from "react-admin";
|
|
21
21
|
import { useFormContext as ra, useFormState as Gm, useWatch as Ym, useController as B9 } from "react-hook-form";
|
|
22
22
|
import { useQuery as gA, useQueryClient as mA, useMutation as N9, QueryClient as V9 } from "react-query";
|
|
23
23
|
import * as vA from "react-dom";
|
|
@@ -28894,8 +28894,148 @@ const Vce = ps(bae)(({ theme: e }) => {
|
|
|
28894
28894
|
color: r.main
|
|
28895
28895
|
}
|
|
28896
28896
|
};
|
|
28897
|
+
}), LO = $w((e) => {
|
|
28898
|
+
const { page: t, rowsPerPage: n, count: r, onPageChange: o, size: a = "small", className: s, ...c } = e, u = ht(), d = Math.ceil(r / n) || 1;
|
|
28899
|
+
if (d === 1)
|
|
28900
|
+
return /* @__PURE__ */ m(Dw, { className: s });
|
|
28901
|
+
function p(h, g, v) {
|
|
28902
|
+
return h === "page" ? v ? u("ra.navigation.current_page", {
|
|
28903
|
+
page: g,
|
|
28904
|
+
_: `page ${g}`
|
|
28905
|
+
}) : u("ra.navigation.page", {
|
|
28906
|
+
page: g,
|
|
28907
|
+
_: `Go to page ${g}`
|
|
28908
|
+
}) : u(`ra.navigation.${h}`, { _: `Go to ${h} page` });
|
|
28909
|
+
}
|
|
28910
|
+
return /* @__PURE__ */ m(Dw, { className: s, children: /* @__PURE__ */ m(
|
|
28911
|
+
Ck,
|
|
28912
|
+
{
|
|
28913
|
+
size: a,
|
|
28914
|
+
count: d,
|
|
28915
|
+
page: t + 1,
|
|
28916
|
+
onChange: (h, g) => o(h, g - 1),
|
|
28917
|
+
...Cae(c),
|
|
28918
|
+
getItemAriaLabel: p
|
|
28919
|
+
}
|
|
28920
|
+
) });
|
|
28897
28921
|
});
|
|
28898
|
-
|
|
28922
|
+
LO.propTypes = {
|
|
28923
|
+
count: C.number.isRequired,
|
|
28924
|
+
onPageChange: C.func.isRequired,
|
|
28925
|
+
page: C.number.isRequired,
|
|
28926
|
+
rowsPerPage: C.number.isRequired,
|
|
28927
|
+
color: C.oneOf(["primary", "secondary", "standard"]),
|
|
28928
|
+
size: C.oneOf(["small", "medium", "large"])
|
|
28929
|
+
};
|
|
28930
|
+
const xae = "RaPaginationActions", Dw = ce("div", {
|
|
28931
|
+
name: xae,
|
|
28932
|
+
overridesResolver: (e) => e.root
|
|
28933
|
+
})(() => ({
|
|
28934
|
+
flexShrink: 0,
|
|
28935
|
+
ml: 4
|
|
28936
|
+
}));
|
|
28937
|
+
function Cae({ nextIconButtonProps: e, backIconButtonProps: t, slotProps: n, ...r }) {
|
|
28938
|
+
return r;
|
|
28939
|
+
}
|
|
28940
|
+
const BO = $w((e) => {
|
|
28941
|
+
const { rowsPerPageOptions: t = wae, actions: n, limit: r = null, ...o } = e, { isLoading: a, hasNextPage: s, page: c, perPage: u, total: d, setPage: p, setPerPage: h } = S8(e), g = ht(), v = oi((R) => R.breakpoints.down("md")), [b, x] = Fe(c - 1), w = We(() => d != null ? Math.ceil(d / u) : void 0, [u, d]), E = Ce(
|
|
28942
|
+
gt.debounce((R) => {
|
|
28943
|
+
p(R + 1);
|
|
28944
|
+
}, 500),
|
|
28945
|
+
[p]
|
|
28946
|
+
), M = Ce(
|
|
28947
|
+
(R, V) => {
|
|
28948
|
+
var W, oe;
|
|
28949
|
+
if (!R)
|
|
28950
|
+
return;
|
|
28951
|
+
if (R.preventDefault(), V < 0 || w !== void 0 && V > w - 1)
|
|
28952
|
+
throw new Error(
|
|
28953
|
+
g("ra.navigation.page_out_of_boundaries", {
|
|
28954
|
+
page: V + 1
|
|
28955
|
+
})
|
|
28956
|
+
);
|
|
28957
|
+
const z = (((W = R.target.dataset) == null ? void 0 : W.testid) || ((oe = R.target.classList) == null ? void 0 : oe.value)) ?? "", X = z.includes("MuiPaginationItem-previousNext") || z.includes("NavigateBeforeIcon") || z.includes("NavigateNextIcon") || z.includes("KeyboardArrowLeftIcon") || z.includes("KeyboardArrowRightIcon");
|
|
28958
|
+
x(V), X ? E(V) : p(V + 1);
|
|
28959
|
+
},
|
|
28960
|
+
[E, p, g, w]
|
|
28961
|
+
), S = Ce(
|
|
28962
|
+
(R) => {
|
|
28963
|
+
h(Number(R.target.value));
|
|
28964
|
+
},
|
|
28965
|
+
[h]
|
|
28966
|
+
), O = Ce(
|
|
28967
|
+
({ from: R, to: V, count: z }) => z === -1 && s ? g("ra.navigation.partial_page_range_info", {
|
|
28968
|
+
offsetBegin: R,
|
|
28969
|
+
offsetEnd: V,
|
|
28970
|
+
_: "%{from}-%{to} of more than %{to}"
|
|
28971
|
+
}) : g("ra.navigation.page_range_info", {
|
|
28972
|
+
offsetBegin: R,
|
|
28973
|
+
offsetEnd: V,
|
|
28974
|
+
total: z === -1 ? V : z,
|
|
28975
|
+
_: "%{from}-%{to} of %{count === -1 ? to : count}"
|
|
28976
|
+
}),
|
|
28977
|
+
[g, s]
|
|
28978
|
+
), T = Ce(
|
|
28979
|
+
(R) => g(`ra.navigation.${R}`, { _: `Go to ${R} page` }),
|
|
28980
|
+
[g]
|
|
28981
|
+
);
|
|
28982
|
+
if (a)
|
|
28983
|
+
return /* @__PURE__ */ m(Nl, { variant: "dense" });
|
|
28984
|
+
if (d === 0 || c < 1 || w !== void 0 && c > w)
|
|
28985
|
+
return r != null && process.env.NODE_ENV === "development" && console.warn(
|
|
28986
|
+
"The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."
|
|
28987
|
+
), null;
|
|
28988
|
+
if (v)
|
|
28989
|
+
return /* @__PURE__ */ m(
|
|
28990
|
+
u1,
|
|
28991
|
+
{
|
|
28992
|
+
count: d ?? -1,
|
|
28993
|
+
rowsPerPage: u,
|
|
28994
|
+
page: b,
|
|
28995
|
+
onPageChange: M,
|
|
28996
|
+
rowsPerPageOptions: Aae,
|
|
28997
|
+
component: "span",
|
|
28998
|
+
labelDisplayedRows: O,
|
|
28999
|
+
...nd(o)
|
|
29000
|
+
}
|
|
29001
|
+
);
|
|
29002
|
+
const k = n || (!a && d != null ? LO : void 0);
|
|
29003
|
+
return /* @__PURE__ */ m(
|
|
29004
|
+
u1,
|
|
29005
|
+
{
|
|
29006
|
+
count: d ?? -1,
|
|
29007
|
+
rowsPerPage: u,
|
|
29008
|
+
page: b,
|
|
29009
|
+
onPageChange: M,
|
|
29010
|
+
onRowsPerPageChange: S,
|
|
29011
|
+
ActionsComponent: k,
|
|
29012
|
+
nextIconButtonProps: {
|
|
29013
|
+
disabled: !s
|
|
29014
|
+
},
|
|
29015
|
+
component: "span",
|
|
29016
|
+
labelRowsPerPage: g("ra.navigation.page_rows_per_page"),
|
|
29017
|
+
labelDisplayedRows: O,
|
|
29018
|
+
getItemAriaLabel: T,
|
|
29019
|
+
rowsPerPageOptions: t,
|
|
29020
|
+
...nd(o)
|
|
29021
|
+
}
|
|
29022
|
+
);
|
|
29023
|
+
});
|
|
29024
|
+
BO.propTypes = {
|
|
29025
|
+
actions: E8,
|
|
29026
|
+
limit: C.element,
|
|
29027
|
+
rowsPerPageOptions: C.arrayOf(
|
|
29028
|
+
C.oneOfType([
|
|
29029
|
+
C.number,
|
|
29030
|
+
C.shape({
|
|
29031
|
+
label: C.string.isRequired,
|
|
29032
|
+
value: C.number.isRequired
|
|
29033
|
+
})
|
|
29034
|
+
])
|
|
29035
|
+
)
|
|
29036
|
+
};
|
|
29037
|
+
const wae = [5, 10, 25, 50], Aae = [];
|
|
29038
|
+
function Sae({ children: e }) {
|
|
28899
29039
|
const t = Vl(), { pathname: n } = t;
|
|
28900
29040
|
return Me(() => {
|
|
28901
29041
|
window.scrollTo({
|
|
@@ -28913,11 +29053,11 @@ const $ce = ce("div")({
|
|
|
28913
29053
|
function Wce({ shadow: e, children: t, ...n }) {
|
|
28914
29054
|
return /* @__PURE__ */ m(wr, { content: !1, border: !1, shadow: e, boxShadow: !0, ...n, children: t });
|
|
28915
29055
|
}
|
|
28916
|
-
function
|
|
29056
|
+
function Eae({ title: e }) {
|
|
28917
29057
|
return /* @__PURE__ */ m(ge, { variant: "h2", sx: { style: "bold" }, children: e == null ? void 0 : e.substring(0, 1).toUpperCase() });
|
|
28918
29058
|
}
|
|
28919
|
-
const
|
|
28920
|
-
function
|
|
29059
|
+
const Iae = "RaButton";
|
|
29060
|
+
function Tae(e) {
|
|
28921
29061
|
if (e == null)
|
|
28922
29062
|
return;
|
|
28923
29063
|
if (typeof e == "string")
|
|
@@ -28930,8 +29070,8 @@ function Aae(e) {
|
|
|
28930
29070
|
state: r
|
|
28931
29071
|
};
|
|
28932
29072
|
}
|
|
28933
|
-
const
|
|
28934
|
-
name:
|
|
29073
|
+
const Oae = ce(en, {
|
|
29074
|
+
name: Iae,
|
|
28935
29075
|
overridesResolver: (e, t) => t.root
|
|
28936
29076
|
})({
|
|
28937
29077
|
"&.MuiButton-sizeSmall": {
|
|
@@ -28951,11 +29091,11 @@ function Fv(e) {
|
|
|
28951
29091
|
alignIcon: u,
|
|
28952
29092
|
to: d,
|
|
28953
29093
|
...p
|
|
28954
|
-
} = e, h = Hr(), g =
|
|
29094
|
+
} = e, h = Hr(), g = Tae(d);
|
|
28955
29095
|
if (t) {
|
|
28956
29096
|
const v = n ? h(n, { _: n }) : void 0;
|
|
28957
29097
|
return /* @__PURE__ */ m(
|
|
28958
|
-
|
|
29098
|
+
Oae,
|
|
28959
29099
|
{
|
|
28960
29100
|
className: o,
|
|
28961
29101
|
color: a,
|
|
@@ -28978,16 +29118,16 @@ function Lv(e, t) {
|
|
|
28978
29118
|
const r = e.findIndex((o) => o.id === n);
|
|
28979
29119
|
return r === -1 ? [...e, t] : [...e.slice(0, r), { ...e[r], ...t }, ...e.slice(r + 1)];
|
|
28980
29120
|
}
|
|
28981
|
-
function
|
|
29121
|
+
function Pae(e, t) {
|
|
28982
29122
|
return e && e.data ? { data: Lv(e.data, t), total: e.total + 1 } : e;
|
|
28983
29123
|
}
|
|
28984
|
-
function
|
|
29124
|
+
function Mae(e, t) {
|
|
28985
29125
|
return e && e.length > 0 ? Lv(e, t) : e;
|
|
28986
29126
|
}
|
|
28987
|
-
function
|
|
29127
|
+
function Rae(e, t) {
|
|
28988
29128
|
return e && e.data ? { ...e, data: Lv(e.data, t), total: e.total + 1 } : e;
|
|
28989
29129
|
}
|
|
28990
|
-
function
|
|
29130
|
+
function kae(e) {
|
|
28991
29131
|
const { disableFloatingButton: t, label: n = "ra.action.create", startIcon: r = /* @__PURE__ */ m(Jw, {}), ...o } = e, a = Ce(
|
|
28992
29132
|
(s) => {
|
|
28993
29133
|
var c;
|
|
@@ -28997,7 +29137,7 @@ function Oae(e) {
|
|
|
28997
29137
|
);
|
|
28998
29138
|
return t ? /* @__PURE__ */ m(Fv, { ...o, onClick: a, label: n, children: r }) : /* @__PURE__ */ m(nQ, { ...e, onClick: a, label: n, children: r });
|
|
28999
29139
|
}
|
|
29000
|
-
function
|
|
29140
|
+
function _ae(e) {
|
|
29001
29141
|
const { onSubmit: t, closeDialog: n } = e, { handleSubmit: r } = ra(), o = ht(), a = Ce(
|
|
29002
29142
|
(s) => {
|
|
29003
29143
|
s.preventDefault(), s.stopPropagation(), r((c) => t(c, n))();
|
|
@@ -29020,18 +29160,18 @@ function jce(e) {
|
|
|
29020
29160
|
(S, O, T) => {
|
|
29021
29161
|
var V, z;
|
|
29022
29162
|
const R = Date.now();
|
|
29023
|
-
d.setQueryData([p, "getOne", { id: S.id }], S), d.setQueriesData([p, "getList"], (X) =>
|
|
29163
|
+
d.setQueryData([p, "getOne", { id: S.id }], S), d.setQueriesData([p, "getList"], (X) => Rae(X, S), {
|
|
29024
29164
|
updatedAt: R
|
|
29025
|
-
}), d.setQueriesData([p, "getMany"], (X) =>
|
|
29165
|
+
}), d.setQueriesData([p, "getMany"], (X) => Mae(X, S), {
|
|
29026
29166
|
updatedAt: R
|
|
29027
|
-
}), d.setQueriesData([p, "getManyReference"], (X) =>
|
|
29167
|
+
}), d.setQueriesData([p, "getManyReference"], (X) => Pae(X, S), {
|
|
29028
29168
|
updatedAt: R
|
|
29029
29169
|
}), E(), x("ra.notification.created", { messageArgs: { smart_count: 1 } }), (z = (V = e == null ? void 0 : e.mutationOptions) == null ? void 0 : V.onSuccess) == null || z.call(V, S, O, T);
|
|
29030
29170
|
},
|
|
29031
29171
|
[E, x, e.mutationOptions, d, p]
|
|
29032
29172
|
);
|
|
29033
29173
|
return /* @__PURE__ */ Q(at, { children: [
|
|
29034
|
-
/* @__PURE__ */ m(
|
|
29174
|
+
/* @__PURE__ */ m(kae, { ...u, onClick: w }),
|
|
29035
29175
|
/* @__PURE__ */ m(
|
|
29036
29176
|
hs,
|
|
29037
29177
|
{
|
|
@@ -29042,7 +29182,7 @@ function jce(e) {
|
|
|
29042
29182
|
fullWidth: r,
|
|
29043
29183
|
fullScreen: o,
|
|
29044
29184
|
children: /* @__PURE__ */ m(Qw, { sx: { m: 0, p: 0 }, children: /* @__PURE__ */ m(
|
|
29045
|
-
|
|
29185
|
+
I8,
|
|
29046
29186
|
{
|
|
29047
29187
|
...e,
|
|
29048
29188
|
mutationOptions: {
|
|
@@ -29054,7 +29194,7 @@ function jce(e) {
|
|
|
29054
29194
|
modal: !0,
|
|
29055
29195
|
toolbar: /* @__PURE__ */ Q(ua, { children: [
|
|
29056
29196
|
/* @__PURE__ */ m(en, { variant: "text", size: "medium", onClick: E, children: h("ra.action.cancel") }),
|
|
29057
|
-
a ? /* @__PURE__ */ m(
|
|
29197
|
+
a ? /* @__PURE__ */ m(_ae, { onSubmit: a, closeDialog: E }) : /* @__PURE__ */ m(hv, { type: "button" })
|
|
29058
29198
|
] })
|
|
29059
29199
|
}) : null
|
|
29060
29200
|
}
|
|
@@ -29063,7 +29203,7 @@ function jce(e) {
|
|
|
29063
29203
|
)
|
|
29064
29204
|
] });
|
|
29065
29205
|
}
|
|
29066
|
-
function
|
|
29206
|
+
function Dae(e) {
|
|
29067
29207
|
const t = Ce(
|
|
29068
29208
|
(n) => {
|
|
29069
29209
|
var r;
|
|
@@ -29073,7 +29213,7 @@ function Mae(e) {
|
|
|
29073
29213
|
);
|
|
29074
29214
|
return /* @__PURE__ */ m(zE, { ...e, onClick: t });
|
|
29075
29215
|
}
|
|
29076
|
-
function
|
|
29216
|
+
function Fae(e) {
|
|
29077
29217
|
const { onSubmit: t, closeDialog: n } = e, { handleSubmit: r } = ra(), o = Ce(
|
|
29078
29218
|
(a) => {
|
|
29079
29219
|
a.preventDefault(), a.stopPropagation(), r((s) => t(s, n))();
|
|
@@ -29113,7 +29253,7 @@ function zce(e) {
|
|
|
29113
29253
|
[b, d, e.mutationOptions, e.mutationMode]
|
|
29114
29254
|
), w = gs();
|
|
29115
29255
|
return /* @__PURE__ */ Q(at, { children: [
|
|
29116
|
-
/* @__PURE__ */ m(
|
|
29256
|
+
/* @__PURE__ */ m(Dae, { ...u, onClick: v }),
|
|
29117
29257
|
/* @__PURE__ */ m(
|
|
29118
29258
|
hs,
|
|
29119
29259
|
{
|
|
@@ -29125,7 +29265,7 @@ function zce(e) {
|
|
|
29125
29265
|
fullScreen: o,
|
|
29126
29266
|
keepMounted: !1,
|
|
29127
29267
|
children: /* @__PURE__ */ m(Qw, { sx: { m: 0, p: 0 }, children: /* @__PURE__ */ m(
|
|
29128
|
-
|
|
29268
|
+
T8,
|
|
29129
29269
|
{
|
|
29130
29270
|
...e,
|
|
29131
29271
|
id: w.id,
|
|
@@ -29148,7 +29288,7 @@ function zce(e) {
|
|
|
29148
29288
|
label: "ra.action.cancel"
|
|
29149
29289
|
}
|
|
29150
29290
|
),
|
|
29151
|
-
s ? /* @__PURE__ */ m(
|
|
29291
|
+
s ? /* @__PURE__ */ m(Fae, { onSubmit: s, closeDialog: b }) : /* @__PURE__ */ m(hv, { type: "button" })
|
|
29152
29292
|
] })
|
|
29153
29293
|
}) : null
|
|
29154
29294
|
}
|
|
@@ -29210,7 +29350,7 @@ function Hce({
|
|
|
29210
29350
|
children: [
|
|
29211
29351
|
/* @__PURE__ */ Q(bt, { direction: "row", alignItems: "start", children: [
|
|
29212
29352
|
c ? Ie.isValidElement(c) ? Ie.cloneElement(c, { style: Du }) : Ie.createElement(c, { style: Du }) : null,
|
|
29213
|
-
/* @__PURE__ */ m(
|
|
29353
|
+
/* @__PURE__ */ m(O8, { label: t, source: e, resource: b || v })
|
|
29214
29354
|
] }),
|
|
29215
29355
|
/* @__PURE__ */ Q(bt, { direction: "row", alignItems: "center", children: [
|
|
29216
29356
|
s ? Ie.isValidElement(s) ? Ie.cloneElement(s, { record: w, resource: v, value: E }) : Ie.createElement(s, { source: e, record: w, resource: v, value: E }) : /* @__PURE__ */ m(ge, { variant: n, children: E }),
|
|
@@ -29225,11 +29365,11 @@ const Du = {
|
|
|
29225
29365
|
width: "1.5rem",
|
|
29226
29366
|
alignSelf: "center"
|
|
29227
29367
|
};
|
|
29228
|
-
function
|
|
29368
|
+
function Lae(e) {
|
|
29229
29369
|
const { label: t = "ra.action.bulk_actions", children: n, className: r, ...o } = e, { filterValues: a, resource: s, selectedIds: c = [], onUnselectItems: u } = Bm(e), d = ht(), p = Ce(() => {
|
|
29230
29370
|
u();
|
|
29231
29371
|
}, [u]);
|
|
29232
|
-
return /* @__PURE__ */ m(
|
|
29372
|
+
return /* @__PURE__ */ m(Bae, { className: r, children: /* @__PURE__ */ Q(
|
|
29233
29373
|
Nl,
|
|
29234
29374
|
{
|
|
29235
29375
|
"data-test": "bulk-actions-toolbar",
|
|
@@ -29275,7 +29415,7 @@ const ji = "RaBulkActionsToolbar", $r = {
|
|
|
29275
29415
|
collapsed: `${ji}-collapsed`,
|
|
29276
29416
|
title: `${ji}-title`,
|
|
29277
29417
|
icon: `${ji}-icon`
|
|
29278
|
-
},
|
|
29418
|
+
}, Bae = ce("div", {
|
|
29279
29419
|
name: ji,
|
|
29280
29420
|
overridesResolver: (e, t) => t.root
|
|
29281
29421
|
})(({ theme: e }) => ({
|
|
@@ -29322,7 +29462,7 @@ const ji = "RaBulkActionsToolbar", $r = {
|
|
|
29322
29462
|
})), Uh = {
|
|
29323
29463
|
p: 0,
|
|
29324
29464
|
m: 0
|
|
29325
|
-
},
|
|
29465
|
+
}, Fw = {
|
|
29326
29466
|
p: 2,
|
|
29327
29467
|
m: 0,
|
|
29328
29468
|
borderRadius: 0,
|
|
@@ -29371,7 +29511,7 @@ function Gce(e) {
|
|
|
29371
29511
|
Hl,
|
|
29372
29512
|
{
|
|
29373
29513
|
onClick: v,
|
|
29374
|
-
sx:
|
|
29514
|
+
sx: Fw,
|
|
29375
29515
|
label: "ra.action.unselect",
|
|
29376
29516
|
startIcon: /* @__PURE__ */ m(Vg, {}),
|
|
29377
29517
|
children: /* @__PURE__ */ m(Vg, {})
|
|
@@ -29383,7 +29523,7 @@ function Gce(e) {
|
|
|
29383
29523
|
filterValues: c,
|
|
29384
29524
|
resource: u,
|
|
29385
29525
|
selectedIds: d,
|
|
29386
|
-
sx:
|
|
29526
|
+
sx: Fw,
|
|
29387
29527
|
...(x = b.props) != null && x.popover ? { closePopover: a } : {}
|
|
29388
29528
|
}) : null });
|
|
29389
29529
|
})
|
|
@@ -29394,22 +29534,22 @@ function Gce(e) {
|
|
|
29394
29534
|
}
|
|
29395
29535
|
) });
|
|
29396
29536
|
}
|
|
29397
|
-
const
|
|
29398
|
-
|
|
29399
|
-
function
|
|
29400
|
-
return /* @__PURE__ */ m(
|
|
29537
|
+
const NO = cn({});
|
|
29538
|
+
NO.displayName = "DatagridContext";
|
|
29539
|
+
function Nae({ children: e, value: t }) {
|
|
29540
|
+
return /* @__PURE__ */ m(NO.Provider, { value: t, children: e });
|
|
29401
29541
|
}
|
|
29402
|
-
const
|
|
29542
|
+
const Lw = /* @__PURE__ */ m(I9, {}), VO = D.forwardRef((e, t) => {
|
|
29403
29543
|
const {
|
|
29404
29544
|
optimized: n = !1,
|
|
29405
29545
|
body: r = n ? x9 : C9,
|
|
29406
29546
|
header: o = w9,
|
|
29407
29547
|
children: a,
|
|
29408
29548
|
className: s,
|
|
29409
|
-
empty: c =
|
|
29549
|
+
empty: c = Wae,
|
|
29410
29550
|
expand: u,
|
|
29411
29551
|
bulkActionsToolbar: d = !1,
|
|
29412
|
-
bulkActionButtons: p =
|
|
29552
|
+
bulkActionButtons: p = Lw,
|
|
29413
29553
|
hover: h,
|
|
29414
29554
|
isRowSelectable: g,
|
|
29415
29555
|
isRowExpandable: v,
|
|
@@ -29451,13 +29591,13 @@ const Fw = /* @__PURE__ */ m(I9, {}), BO = D.forwardRef((e, t) => {
|
|
|
29451
29591
|
nbChildren: D.Children.count(a),
|
|
29452
29592
|
size: M
|
|
29453
29593
|
}
|
|
29454
|
-
) : R == null || R.length === 0 || re === 0 ? c || null : /* @__PURE__ */ m(
|
|
29594
|
+
) : R == null || R.length === 0 || re === 0 ? c || null : /* @__PURE__ */ m(Nae, { value: Y, children: /* @__PURE__ */ Q(S9, { sx: S, className: pt(ah.root, s), children: [
|
|
29455
29595
|
d != null && Ln(d) ? Bn(d, {
|
|
29456
29596
|
selectedIds: W,
|
|
29457
29597
|
total: re
|
|
29458
|
-
}) : p !== !1 ? /* @__PURE__ */ m(
|
|
29459
|
-
/* @__PURE__ */ m("div", { className: ah.tableWrapper, children: /* @__PURE__ */ Q(Xw, { ref: t, className: ah.table, size: M,
|
|
29460
|
-
|
|
29598
|
+
}) : p !== !1 ? /* @__PURE__ */ m(Lae, { children: Ln(p) ? p : Lw }) : null,
|
|
29599
|
+
/* @__PURE__ */ m("div", { className: ah.tableWrapper, children: /* @__PURE__ */ Q(Xw, { ref: t, className: ah.table, size: M, ...$ae(T), children: [
|
|
29600
|
+
Bw(
|
|
29461
29601
|
o,
|
|
29462
29602
|
{
|
|
29463
29603
|
children: a,
|
|
@@ -29473,7 +29613,7 @@ const Fw = /* @__PURE__ */ m(I9, {}), BO = D.forwardRef((e, t) => {
|
|
|
29473
29613
|
},
|
|
29474
29614
|
a
|
|
29475
29615
|
),
|
|
29476
|
-
|
|
29616
|
+
Bw(
|
|
29477
29617
|
r,
|
|
29478
29618
|
{
|
|
29479
29619
|
expand: u,
|
|
@@ -29493,10 +29633,10 @@ const Fw = /* @__PURE__ */ m(I9, {}), BO = D.forwardRef((e, t) => {
|
|
|
29493
29633
|
] }) })
|
|
29494
29634
|
] }) });
|
|
29495
29635
|
});
|
|
29496
|
-
function
|
|
29636
|
+
function Bw(e, t, n) {
|
|
29497
29637
|
return Ln(e) ? Bn(e, t, n) : Nw(e, t, n);
|
|
29498
29638
|
}
|
|
29499
|
-
const
|
|
29639
|
+
const Vae = [
|
|
29500
29640
|
"isRequired",
|
|
29501
29641
|
"setFilter",
|
|
29502
29642
|
"setPagination",
|
|
@@ -29507,11 +29647,11 @@ const Fae = [
|
|
|
29507
29647
|
"fieldState",
|
|
29508
29648
|
"formState"
|
|
29509
29649
|
];
|
|
29510
|
-
function
|
|
29511
|
-
return Object.keys(nd(e)).filter((t) => !
|
|
29650
|
+
function $ae(e) {
|
|
29651
|
+
return Object.keys(nd(e)).filter((t) => !Vae.includes(t)).reduce((t, n) => ({ ...t, [n]: e[n] }), {});
|
|
29512
29652
|
}
|
|
29513
|
-
|
|
29514
|
-
const
|
|
29653
|
+
VO.displayName = "Datagrid";
|
|
29654
|
+
const Wae = /* @__PURE__ */ m(E9, {}), jae = ce(VO, { slot: "root" })(({ theme: e }) => ({
|
|
29515
29655
|
"& .RaBulkActionsToolbar-toolbar": {
|
|
29516
29656
|
height: 48
|
|
29517
29657
|
},
|
|
@@ -29542,17 +29682,17 @@ const Bae = /* @__PURE__ */ m(E9, {}), Nae = ce(BO, { slot: "root" })(({ theme:
|
|
|
29542
29682
|
}
|
|
29543
29683
|
}));
|
|
29544
29684
|
function Yce(e) {
|
|
29545
|
-
return /* @__PURE__ */ m(
|
|
29685
|
+
return /* @__PURE__ */ m(jae, { ...e });
|
|
29546
29686
|
}
|
|
29547
|
-
const
|
|
29687
|
+
const zae = ce("div")(({ theme: e }) => ({
|
|
29548
29688
|
padding: e.spacing(2)
|
|
29549
29689
|
}));
|
|
29550
29690
|
function qce({ actions: e, className: t, ...n }) {
|
|
29551
|
-
const { hasCreate: r } =
|
|
29691
|
+
const { hasCreate: r } = P8(n), o = $l(n), a = ht(), s = M8(), c = a(`resources.${o}.forcedCaseName`, {
|
|
29552
29692
|
smart_count: 0,
|
|
29553
29693
|
_: s(o, 0)
|
|
29554
29694
|
}), u = a("ra.page.empty", { name: c }), d = a("ra.page.invite");
|
|
29555
|
-
return /* @__PURE__ */ Q(
|
|
29695
|
+
return /* @__PURE__ */ Q(Uae, { className: t, children: [
|
|
29556
29696
|
/* @__PURE__ */ Q("div", { className: Qa.message, children: [
|
|
29557
29697
|
/* @__PURE__ */ m(t8, { className: Qa.icon }),
|
|
29558
29698
|
/* @__PURE__ */ m(ge, { variant: "h4", paragraph: !0, children: a(`resources.${o}.empty`, {
|
|
@@ -29562,14 +29702,14 @@ function qce({ actions: e, className: t, ...n }) {
|
|
|
29562
29702
|
_: d
|
|
29563
29703
|
}) }) : null
|
|
29564
29704
|
] }),
|
|
29565
|
-
/* @__PURE__ */ m(
|
|
29705
|
+
/* @__PURE__ */ m(zae, { className: Qa.toolbar, children: e })
|
|
29566
29706
|
] });
|
|
29567
29707
|
}
|
|
29568
29708
|
const Ju = "ApplicaEmpty", Qa = {
|
|
29569
29709
|
message: `${Ju}-message`,
|
|
29570
29710
|
icon: `${Ju}-icon`,
|
|
29571
29711
|
toolbar: `${Ju}-toolbar`
|
|
29572
|
-
},
|
|
29712
|
+
}, Uae = ce("span", {
|
|
29573
29713
|
name: Ju,
|
|
29574
29714
|
overridesResolver: (e, t) => t.root
|
|
29575
29715
|
})(({ theme: e }) => ({
|
|
@@ -29588,21 +29728,21 @@ const Ju = "ApplicaEmpty", Qa = {
|
|
|
29588
29728
|
textAlign: "center",
|
|
29589
29729
|
marginTop: "2em"
|
|
29590
29730
|
}
|
|
29591
|
-
})),
|
|
29592
|
-
function
|
|
29731
|
+
})), Hae = /* @__PURE__ */ m(O9, {}), Gae = /* @__PURE__ */ m(Wm, {}), Yae = /* @__PURE__ */ m(P9, {}), qae = Tm;
|
|
29732
|
+
function Kae(e) {
|
|
29593
29733
|
const {
|
|
29594
|
-
actions: t =
|
|
29734
|
+
actions: t = Hae,
|
|
29595
29735
|
aside: n,
|
|
29596
29736
|
filters: r,
|
|
29597
29737
|
bulkActionButtons: o,
|
|
29598
29738
|
emptyWhileLoading: a,
|
|
29599
29739
|
hasCreate: s,
|
|
29600
|
-
pagination: c =
|
|
29740
|
+
pagination: c = Gae,
|
|
29601
29741
|
children: u,
|
|
29602
29742
|
className: d,
|
|
29603
|
-
component: p =
|
|
29743
|
+
component: p = qae,
|
|
29604
29744
|
title: h,
|
|
29605
|
-
empty: g =
|
|
29745
|
+
empty: g = Yae,
|
|
29606
29746
|
...v
|
|
29607
29747
|
} = e, { defaultTitle: b, data: x, error: w, isLoading: E, filterValues: M, resource: S } = Bm(e);
|
|
29608
29748
|
if (!u || !x && E && a)
|
|
@@ -29629,7 +29769,7 @@ function Hae(e) {
|
|
|
29629
29769
|
return g !== !1 && Bn(g, { className: ri.noResults, hasCreate: s });
|
|
29630
29770
|
}
|
|
29631
29771
|
const k = !E && (x == null ? void 0 : x.length) === 0 && !Object.keys(M).length && g !== !1;
|
|
29632
|
-
return /* @__PURE__ */ Q(
|
|
29772
|
+
return /* @__PURE__ */ Q(Xae, { className: pt("list-page", d), ...v, children: [
|
|
29633
29773
|
/* @__PURE__ */ m(T9, { title: h, defaultTitle: b, preferenceKey: `${S}.list.title` }),
|
|
29634
29774
|
k ? T() : O(),
|
|
29635
29775
|
n
|
|
@@ -29640,7 +29780,7 @@ const cl = "RaList", ri = {
|
|
|
29640
29780
|
content: `${cl}-content`,
|
|
29641
29781
|
actions: `${cl}-actions`,
|
|
29642
29782
|
noResults: `${cl}-noResults`
|
|
29643
|
-
},
|
|
29783
|
+
}, Xae = ce("div", {
|
|
29644
29784
|
name: cl,
|
|
29645
29785
|
overridesResolver: (e, t) => t.root
|
|
29646
29786
|
})(({ theme: e }) => ({
|
|
@@ -29659,147 +29799,7 @@ const cl = "RaList", ri = {
|
|
|
29659
29799
|
},
|
|
29660
29800
|
[`& .${ri.actions}`]: {},
|
|
29661
29801
|
[`& .${ri.noResults}`]: {}
|
|
29662
|
-
})), NO = $w((e) => {
|
|
29663
|
-
const { page: t, rowsPerPage: n, count: r, onPageChange: o, size: a = "small", className: s, ...c } = e, u = ht(), d = Math.ceil(r / n) || 1;
|
|
29664
|
-
if (d === 1)
|
|
29665
|
-
return /* @__PURE__ */ m(Bw, { className: s });
|
|
29666
|
-
function p(h, g, v) {
|
|
29667
|
-
return h === "page" ? v ? u("ra.navigation.current_page", {
|
|
29668
|
-
page: g,
|
|
29669
|
-
_: `page ${g}`
|
|
29670
|
-
}) : u("ra.navigation.page", {
|
|
29671
|
-
page: g,
|
|
29672
|
-
_: `Go to page ${g}`
|
|
29673
|
-
}) : u(`ra.navigation.${h}`, { _: `Go to ${h} page` });
|
|
29674
|
-
}
|
|
29675
|
-
return /* @__PURE__ */ m(Bw, { className: s, children: /* @__PURE__ */ m(
|
|
29676
|
-
Ck,
|
|
29677
|
-
{
|
|
29678
|
-
size: a,
|
|
29679
|
-
count: d,
|
|
29680
|
-
page: t + 1,
|
|
29681
|
-
onChange: (h, g) => o(h, g - 1),
|
|
29682
|
-
...qae(c),
|
|
29683
|
-
getItemAriaLabel: p
|
|
29684
|
-
}
|
|
29685
|
-
) });
|
|
29686
|
-
});
|
|
29687
|
-
NO.propTypes = {
|
|
29688
|
-
count: C.number.isRequired,
|
|
29689
|
-
onPageChange: C.func.isRequired,
|
|
29690
|
-
page: C.number.isRequired,
|
|
29691
|
-
rowsPerPage: C.number.isRequired,
|
|
29692
|
-
color: C.oneOf(["primary", "secondary", "standard"]),
|
|
29693
|
-
size: C.oneOf(["small", "medium", "large"])
|
|
29694
|
-
};
|
|
29695
|
-
const Yae = "RaPaginationActions", Bw = ce("div", {
|
|
29696
|
-
name: Yae,
|
|
29697
|
-
overridesResolver: (e) => e.root
|
|
29698
|
-
})(() => ({
|
|
29699
|
-
flexShrink: 0,
|
|
29700
|
-
ml: 4
|
|
29701
29802
|
}));
|
|
29702
|
-
function qae({ nextIconButtonProps: e, backIconButtonProps: t, slotProps: n, ...r }) {
|
|
29703
|
-
return r;
|
|
29704
|
-
}
|
|
29705
|
-
const VO = $w((e) => {
|
|
29706
|
-
const { rowsPerPageOptions: t = Kae, actions: n, limit: r = null, ...o } = e, { isLoading: a, hasNextPage: s, page: c, perPage: u, total: d, setPage: p, setPerPage: h } = P8(e), g = ht(), v = oi((R) => R.breakpoints.down("md")), [b, x] = Fe(0), w = We(() => d != null ? Math.ceil(d / u) : void 0, [u, d]), E = Ce(
|
|
29707
|
-
gt.debounce((R) => {
|
|
29708
|
-
p(R + 1);
|
|
29709
|
-
}, 500),
|
|
29710
|
-
[p]
|
|
29711
|
-
), M = Ce(
|
|
29712
|
-
(R, V) => {
|
|
29713
|
-
var W, oe;
|
|
29714
|
-
if (!R)
|
|
29715
|
-
return;
|
|
29716
|
-
if (R.preventDefault(), V < 0 || w !== void 0 && V > w - 1)
|
|
29717
|
-
throw new Error(
|
|
29718
|
-
g("ra.navigation.page_out_of_boundaries", {
|
|
29719
|
-
page: V + 1
|
|
29720
|
-
})
|
|
29721
|
-
);
|
|
29722
|
-
const z = (((W = R.target.dataset) == null ? void 0 : W.testid) || ((oe = R.target.classList) == null ? void 0 : oe.value)) ?? "", X = z.includes("MuiPaginationItem-previousNext") || z.includes("NavigateBeforeIcon") || z.includes("NavigateNextIcon") || z.includes("KeyboardArrowLeftIcon") || z.includes("KeyboardArrowRightIcon");
|
|
29723
|
-
x(V), X ? E(V) : p(V + 1);
|
|
29724
|
-
},
|
|
29725
|
-
[E, p, g, w]
|
|
29726
|
-
), S = Ce(
|
|
29727
|
-
(R) => {
|
|
29728
|
-
h(Number(R.target.value));
|
|
29729
|
-
},
|
|
29730
|
-
[h]
|
|
29731
|
-
), O = Ce(
|
|
29732
|
-
({ from: R, to: V, count: z }) => z === -1 && s ? g("ra.navigation.partial_page_range_info", {
|
|
29733
|
-
offsetBegin: R,
|
|
29734
|
-
offsetEnd: V,
|
|
29735
|
-
_: "%{from}-%{to} of more than %{to}"
|
|
29736
|
-
}) : g("ra.navigation.page_range_info", {
|
|
29737
|
-
offsetBegin: R,
|
|
29738
|
-
offsetEnd: V,
|
|
29739
|
-
total: z === -1 ? V : z,
|
|
29740
|
-
_: "%{from}-%{to} of %{count === -1 ? to : count}"
|
|
29741
|
-
}),
|
|
29742
|
-
[g, s]
|
|
29743
|
-
), T = Ce(
|
|
29744
|
-
(R) => g(`ra.navigation.${R}`, { _: `Go to ${R} page` }),
|
|
29745
|
-
[g]
|
|
29746
|
-
);
|
|
29747
|
-
if (a)
|
|
29748
|
-
return /* @__PURE__ */ m(Nl, { variant: "dense" });
|
|
29749
|
-
if (d === 0 || c < 1 || w !== void 0 && c > w)
|
|
29750
|
-
return r != null && process.env.NODE_ENV === "development" && console.warn(
|
|
29751
|
-
"The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."
|
|
29752
|
-
), null;
|
|
29753
|
-
if (v)
|
|
29754
|
-
return /* @__PURE__ */ m(
|
|
29755
|
-
u1,
|
|
29756
|
-
{
|
|
29757
|
-
count: d ?? -1,
|
|
29758
|
-
rowsPerPage: u,
|
|
29759
|
-
page: b,
|
|
29760
|
-
onPageChange: M,
|
|
29761
|
-
rowsPerPageOptions: Xae,
|
|
29762
|
-
component: "span",
|
|
29763
|
-
labelDisplayedRows: O,
|
|
29764
|
-
...nd(o)
|
|
29765
|
-
}
|
|
29766
|
-
);
|
|
29767
|
-
const k = n || (!a && d != null ? NO : void 0);
|
|
29768
|
-
return /* @__PURE__ */ m(
|
|
29769
|
-
u1,
|
|
29770
|
-
{
|
|
29771
|
-
count: d ?? -1,
|
|
29772
|
-
rowsPerPage: u,
|
|
29773
|
-
page: b,
|
|
29774
|
-
onPageChange: M,
|
|
29775
|
-
onRowsPerPageChange: S,
|
|
29776
|
-
ActionsComponent: k,
|
|
29777
|
-
nextIconButtonProps: {
|
|
29778
|
-
disabled: !s
|
|
29779
|
-
},
|
|
29780
|
-
component: "span",
|
|
29781
|
-
labelRowsPerPage: g("ra.navigation.page_rows_per_page"),
|
|
29782
|
-
labelDisplayedRows: O,
|
|
29783
|
-
getItemAriaLabel: T,
|
|
29784
|
-
rowsPerPageOptions: t,
|
|
29785
|
-
...nd(o)
|
|
29786
|
-
}
|
|
29787
|
-
);
|
|
29788
|
-
});
|
|
29789
|
-
VO.propTypes = {
|
|
29790
|
-
actions: M8,
|
|
29791
|
-
limit: C.element,
|
|
29792
|
-
rowsPerPageOptions: C.arrayOf(
|
|
29793
|
-
C.oneOfType([
|
|
29794
|
-
C.number,
|
|
29795
|
-
C.shape({
|
|
29796
|
-
label: C.string.isRequired,
|
|
29797
|
-
value: C.number.isRequired
|
|
29798
|
-
})
|
|
29799
|
-
])
|
|
29800
|
-
)
|
|
29801
|
-
};
|
|
29802
|
-
const Kae = [5, 10, 25, 50], Xae = [];
|
|
29803
29803
|
function Zae({
|
|
29804
29804
|
debounce: e,
|
|
29805
29805
|
disableAuthentication: t,
|
|
@@ -29828,7 +29828,7 @@ function Zae({
|
|
|
29828
29828
|
resource: u,
|
|
29829
29829
|
sort: d,
|
|
29830
29830
|
storeKey: p,
|
|
29831
|
-
children: /* @__PURE__ */ m(
|
|
29831
|
+
children: /* @__PURE__ */ m(Kae, { ...h })
|
|
29832
29832
|
}
|
|
29833
29833
|
);
|
|
29834
29834
|
}
|
|
@@ -29928,7 +29928,7 @@ const Qae = {}, Jae = oc(Zae, { slot: "root" })(({ theme: e }) => ({
|
|
|
29928
29928
|
}
|
|
29929
29929
|
}));
|
|
29930
29930
|
function Kce(e) {
|
|
29931
|
-
return /* @__PURE__ */ m(wr, { content: !1, children: /* @__PURE__ */ m(Jae, { ...e, pagination: /* @__PURE__ */ m(
|
|
29931
|
+
return /* @__PURE__ */ m(wr, { content: !1, children: /* @__PURE__ */ m(Jae, { ...e, pagination: /* @__PURE__ */ m(BO, {}) }) });
|
|
29932
29932
|
}
|
|
29933
29933
|
function ese() {
|
|
29934
29934
|
const e = fA(), t = qd(), n = _o(), r = pA(n), { selectedIds: o, data: a } = Hm(), s = tn(), c = o.map((h) => a.find((g) => g.id === h)), [u, { isLoading: d }] = hA(
|
|
@@ -33255,7 +33255,7 @@ function $O({ themeOverrides: e, children: t }) {
|
|
|
33255
33255
|
] }) });
|
|
33256
33256
|
}
|
|
33257
33257
|
function vle({ children: e, theme: t, ...n }) {
|
|
33258
|
-
return /* @__PURE__ */ m(D9, { ...n, children: /* @__PURE__ */ m($O, { themeOverrides: t, children: /* @__PURE__ */ m(
|
|
33258
|
+
return /* @__PURE__ */ m(D9, { ...n, children: /* @__PURE__ */ m($O, { themeOverrides: t, children: /* @__PURE__ */ m(Sae, { children: e }) }) });
|
|
33259
33259
|
}
|
|
33260
33260
|
function yle(e) {
|
|
33261
33261
|
const {
|
|
@@ -33575,7 +33575,7 @@ function rue({
|
|
|
33575
33575
|
copy: p,
|
|
33576
33576
|
version: h,
|
|
33577
33577
|
logoMain: d ? /* @__PURE__ */ m(kO, { title: d }) : a,
|
|
33578
|
-
logoIcon: d ? /* @__PURE__ */ m(
|
|
33578
|
+
logoIcon: d ? /* @__PURE__ */ m(Eae, { title: d }) : s,
|
|
33579
33579
|
notification: V,
|
|
33580
33580
|
enableThemeToggler: O,
|
|
33581
33581
|
enableNotification: E,
|
|
@@ -33638,7 +33638,7 @@ export {
|
|
|
33638
33638
|
lue as BooleanField,
|
|
33639
33639
|
uce as BooleanInput,
|
|
33640
33640
|
eW as Breadcrumbs,
|
|
33641
|
-
|
|
33641
|
+
Lae as BulkActionsToolbar,
|
|
33642
33642
|
cue as BulkDeleteWithConfirmButton,
|
|
33643
33643
|
Gce as BulkFloatingActionsToolbar,
|
|
33644
33644
|
Fv as Button,
|
|
@@ -33740,26 +33740,27 @@ export {
|
|
|
33740
33740
|
zd as OnboardingModes,
|
|
33741
33741
|
Bce as OnboardingProvider,
|
|
33742
33742
|
Vce as OnboardingTip,
|
|
33743
|
-
|
|
33743
|
+
BO as Pagination,
|
|
33744
|
+
LO as PaginationActions,
|
|
33744
33745
|
Ule as PopupTransition,
|
|
33745
|
-
|
|
33746
|
+
Oue as RaSimpleFormIterator,
|
|
33746
33747
|
vce as RadioButtonGroupInput,
|
|
33747
33748
|
ice as ReadonlyField,
|
|
33748
|
-
|
|
33749
|
+
Pue as RecordContextProvider,
|
|
33749
33750
|
yce as RecordInput,
|
|
33750
33751
|
Jce as RecoverPage,
|
|
33751
|
-
|
|
33752
|
+
Mue as ReferenceArrayField,
|
|
33752
33753
|
bce as ReferenceArrayInput,
|
|
33753
|
-
|
|
33754
|
+
Rue as ReferenceField,
|
|
33754
33755
|
xce as ReferenceInput,
|
|
33755
33756
|
yne as ReferenceManyField,
|
|
33756
33757
|
Cce as ReferenceManyInput,
|
|
33757
33758
|
eue as RegisterPage,
|
|
33758
|
-
|
|
33759
|
-
|
|
33759
|
+
kue as Resource,
|
|
33760
|
+
_ue as ResourceContextProvider,
|
|
33760
33761
|
Kie as ResponsiveSection,
|
|
33761
|
-
|
|
33762
|
-
|
|
33762
|
+
Due as SaveButton,
|
|
33763
|
+
Sae as ScrollTop,
|
|
33763
33764
|
$ce as ScrollX,
|
|
33764
33765
|
wce as SearchInput,
|
|
33765
33766
|
Ace as SelectArrayInput,
|
|
@@ -33769,16 +33770,16 @@ export {
|
|
|
33769
33770
|
kie as SimpleBar,
|
|
33770
33771
|
Gte as SimpleForm,
|
|
33771
33772
|
kce as SimpleFormIterator,
|
|
33772
|
-
|
|
33773
|
+
Fue as SimpleFormIteratorContext,
|
|
33773
33774
|
Zce as SimpleList,
|
|
33774
|
-
|
|
33775
|
-
|
|
33775
|
+
Lue as SimpleShowLayout,
|
|
33776
|
+
Bue as SingleFieldList,
|
|
33776
33777
|
ace as SizeField,
|
|
33777
|
-
|
|
33778
|
+
Eae as SmallIcon,
|
|
33778
33779
|
Ece as SmartTextInput,
|
|
33779
33780
|
rz as StyledArrow,
|
|
33780
33781
|
gT as TabbedForm,
|
|
33781
|
-
|
|
33782
|
+
Nue as TabbedFormTabs,
|
|
33782
33783
|
Ov as TableFormIterator,
|
|
33783
33784
|
bT as TableFormIteratorContext,
|
|
33784
33785
|
ure as TableFormIteratorItem,
|
|
@@ -33793,52 +33794,52 @@ export {
|
|
|
33793
33794
|
Ice as TimeInput,
|
|
33794
33795
|
ua as Toolbar,
|
|
33795
33796
|
G0 as Tooltip,
|
|
33796
|
-
|
|
33797
|
+
Vue as TopToolbar,
|
|
33797
33798
|
us as Transitions,
|
|
33798
|
-
|
|
33799
|
-
|
|
33799
|
+
$ue as UrlField,
|
|
33800
|
+
Wue as ValidationError,
|
|
33800
33801
|
Cre as WizardForm,
|
|
33801
|
-
|
|
33802
|
+
jue as choices,
|
|
33802
33803
|
wle as createI18nProvider,
|
|
33803
33804
|
tue as createJsonI18nProvider,
|
|
33804
|
-
|
|
33805
|
+
zue as email,
|
|
33805
33806
|
TI as getLocalizedValue,
|
|
33806
33807
|
oz as getPosition,
|
|
33807
33808
|
yn as getThemeColor,
|
|
33808
33809
|
ic as getThemeShadow,
|
|
33809
33810
|
Hg as localizedValueHasAllLocales,
|
|
33810
33811
|
Fte as localizedValueHasAtLeastOneLocale,
|
|
33811
|
-
|
|
33812
|
-
|
|
33813
|
-
|
|
33814
|
-
|
|
33815
|
-
|
|
33812
|
+
Uue as maxLength,
|
|
33813
|
+
Hue as maxValue,
|
|
33814
|
+
Gue as minLength,
|
|
33815
|
+
Yue as minValue,
|
|
33816
|
+
que as number,
|
|
33816
33817
|
dae as onboardingModesSchema,
|
|
33817
33818
|
uae as onboardingTopicSchema,
|
|
33818
33819
|
Lte as parseTime,
|
|
33819
|
-
|
|
33820
|
-
|
|
33821
|
-
|
|
33822
|
-
|
|
33820
|
+
Kue as regex,
|
|
33821
|
+
Xue as required,
|
|
33822
|
+
Zue as useArrayInput,
|
|
33823
|
+
Que as useAuthProvider,
|
|
33823
33824
|
Bee as useBreadcrumbs,
|
|
33824
|
-
|
|
33825
|
-
|
|
33826
|
-
|
|
33827
|
-
|
|
33828
|
-
|
|
33829
|
-
|
|
33830
|
-
|
|
33831
|
-
|
|
33832
|
-
|
|
33833
|
-
|
|
33834
|
-
|
|
33825
|
+
Jue as useChoices,
|
|
33826
|
+
ede as useChoicesContext,
|
|
33827
|
+
tde as useCreate,
|
|
33828
|
+
nde as useCreateContext,
|
|
33829
|
+
rde as useCreateController,
|
|
33830
|
+
ode as useCreateSuggestionContext,
|
|
33831
|
+
ide as useDataProvider,
|
|
33832
|
+
ade as useEditContext,
|
|
33833
|
+
sde as useEditController,
|
|
33834
|
+
lde as useGetIdentity,
|
|
33835
|
+
cde as useGetList,
|
|
33835
33836
|
Zle as useGetLocalizedValue,
|
|
33836
|
-
|
|
33837
|
-
|
|
33838
|
-
|
|
33837
|
+
ude as useGetMany,
|
|
33838
|
+
dde as useGetManyReference,
|
|
33839
|
+
fde as useGetOne,
|
|
33839
33840
|
nue as useI18nLanguages,
|
|
33840
33841
|
Ale as useI18nProvider,
|
|
33841
|
-
|
|
33842
|
+
pde as useInput,
|
|
33842
33843
|
wT as useLayoutContext,
|
|
33843
33844
|
_ce as useLayoutDispatch,
|
|
33844
33845
|
Ts as useLayoutDrawerState,
|
|
@@ -33847,53 +33848,53 @@ export {
|
|
|
33847
33848
|
Mv as useLayoutNotificationsState,
|
|
33848
33849
|
fc as useLayoutState,
|
|
33849
33850
|
Dce as useLayoutThemeState,
|
|
33850
|
-
|
|
33851
|
-
|
|
33851
|
+
hde as useListContext,
|
|
33852
|
+
gde as useListController,
|
|
33852
33853
|
MI as useLocalStorage,
|
|
33853
|
-
|
|
33854
|
-
|
|
33854
|
+
mde as useLocaleState,
|
|
33855
|
+
vde as useLocales,
|
|
33855
33856
|
Xle as useLocalizedValue,
|
|
33856
33857
|
Nte as useMemoizedObject,
|
|
33857
33858
|
fI as useMenu,
|
|
33858
33859
|
_d as useMenuConfig,
|
|
33859
33860
|
mv as useMenuContext,
|
|
33860
|
-
|
|
33861
|
+
yde as useNotify,
|
|
33861
33862
|
gae as useOnboardingDataProvider,
|
|
33862
33863
|
yae as useOnboardingTip,
|
|
33863
|
-
|
|
33864
|
+
bde as usePermissions,
|
|
33864
33865
|
Df as usePopoverState,
|
|
33865
|
-
|
|
33866
|
+
xde as useRecordContext,
|
|
33866
33867
|
Qle as useRefDimensions,
|
|
33867
|
-
|
|
33868
|
-
|
|
33869
|
-
|
|
33870
|
-
|
|
33868
|
+
Cde as useRefresh,
|
|
33869
|
+
wde as useRemoveFromStore,
|
|
33870
|
+
Ade as useResetStore,
|
|
33871
|
+
Sde as useResourceContext,
|
|
33871
33872
|
Oce as useResourceDefaultValues,
|
|
33872
|
-
|
|
33873
|
-
|
|
33873
|
+
Ede as useResourceDefinition,
|
|
33874
|
+
Ide as useResourceDefinitions,
|
|
33874
33875
|
kI as useResourceTitle,
|
|
33875
33876
|
Nce as useRestartOnboarding,
|
|
33876
|
-
|
|
33877
|
-
|
|
33878
|
-
|
|
33879
|
-
|
|
33880
|
-
|
|
33881
|
-
|
|
33877
|
+
Tde as useShowContext,
|
|
33878
|
+
Ode as useShowController,
|
|
33879
|
+
Pde as useSimpleFormIterator,
|
|
33880
|
+
Mde as useSimpleFormIteratorItem,
|
|
33881
|
+
Rde as useStore,
|
|
33882
|
+
kde as useStoreContext,
|
|
33882
33883
|
so as useSx,
|
|
33883
33884
|
cre as useTableFormIterator,
|
|
33884
33885
|
sre as useTableFormIteratorItem,
|
|
33885
33886
|
ar as useThemeConfig,
|
|
33886
33887
|
FI as useThemeContext,
|
|
33887
|
-
|
|
33888
|
-
|
|
33889
|
-
|
|
33890
|
-
|
|
33891
|
-
|
|
33892
|
-
|
|
33888
|
+
_de as useTranslate,
|
|
33889
|
+
Dde as useTranslateLabel,
|
|
33890
|
+
Fde as useUnselect,
|
|
33891
|
+
Lde as useUnselectAll,
|
|
33892
|
+
Bde as useUpdate,
|
|
33893
|
+
Nde as useUpdateMany,
|
|
33893
33894
|
Pv as useWizardFormContext,
|
|
33894
33895
|
Kle as uuid,
|
|
33895
33896
|
Av as walkChildren,
|
|
33896
33897
|
Ire as withLayoutProvider,
|
|
33897
|
-
|
|
33898
|
+
Vde as withLifecycleCallbacks
|
|
33898
33899
|
};
|
|
33899
33900
|
//# sourceMappingURL=react-admin.es.js.map
|