biblio-react 3.0.60 → 3.0.61
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/index.js +68 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { forwardRef as wr, createElement as Qn, createContext as ct, useContext
|
|
|
6
6
|
import Ia from "@mui/icons-material/Lock";
|
|
7
7
|
import Pd from "@mui/icons-material/VpnLock";
|
|
8
8
|
import { MenuItem as et, ListItemIcon as Lt, ListItemText as eo, useMediaQuery as mt, Typography as fo, Box as Y, useTheme as Oo, Card as Ra, CardHeader as Id, Divider as Rd, CardContent as Ta, Stack as li, IconButton as lt, Tooltip as wt, createTheme as Td, ThemeProvider as kd, Chip as ka, Menu as go, Grid as Ad, Button as tr, alpha as _d, StyledEngineProvider as Aa, CircularProgress as _a, DialogTitle as or, Dialog as Zn, DialogContent as nr, Collapse as Dd, List as Ed, Switch as Od, DialogActions as hs, Paper as Da, Table as Bd, TableHead as Ld, TableRow as gs, TableCell as uo, Skeleton as po, TableBody as $d } from "@mui/material";
|
|
9
|
-
import { useTranslate as he, useUserMenu as Nd, useResourceDefinitions as Sr, AppBar as Vd, UserMenu as Wd, Logout as zd, required as Gd, TopToolbar as Ea, ShowButton as Hd, useNotify as Bo, useDataProvider as Nt, useResourceContext as
|
|
9
|
+
import { useTranslate as he, useUserMenu as Nd, useResourceDefinitions as Sr, AppBar as Vd, UserMenu as Wd, Logout as zd, required as Gd, TopToolbar as Ea, ShowButton as Hd, useNotify as Bo, useDataProvider as Nt, useResourceContext as xe, useRedirect as Vt, ResourceDefinitionContext as Oa, useListContext as oo, useUnselectAll as jd, useStoreContext as qd, NumberField as Ud, DateField as bs, TextField as Yo, ReferenceField as Kd, useResourceDefinition as no, useGetResourceLabel as ci, ResourceContextProvider as Ro, useLocaleState as vr, BulkActionsToolbar as Ba, ValidationError as Xd, useInput as ln, FieldTitle as La, TextInput as $t, ReferenceInput as $a, AutocompleteInput as Na, useChoicesContext as Va, SelectInput as Yd, BooleanInput as Jd, PasswordInput as Wa, Labeled as Mr, useRecordContext as st, ReferenceArrayInput as Qd, AutocompleteArrayInput as Zd, SearchInput as Fr, RadioButtonGroupInput as za, useDeleteWithConfirmController as eu, Button as Ze, Confirm as cn, useFormIsDirty as tu, Toolbar as Ga, ToolbarClasses as ou, SaveButton as dn, useDelete as Ha, useSaveContext as nu, useGetList as ja, Form as Lo, useGetOne as qa, useCreateController as iu, CreateContextProvider as ru, Create as su, Loading as yo, useListController as au, ListContextProvider as Ua, List as Ka, Filter as lu, Pagination as cu, Edit as du, useEditContext as uu, useSidebarState as Xa, Menu as pu, DashboardMenuItem as mu, MenuItemLink as Ya, Layout as fu, FilterContext as hu, FilterButton as gu, sanitizeListRestProps as bu, useLogin as xu, Show as yu, useShowContext as Cu, useCreatePath as wu, useSplatPathBase as Su, getTabbedFormTabFullPath as _n, TabbedFormTabs as Ja, defaultTheme as Qa, FormTab as vu, BooleanField as Mu, ImageInput as Fu, ImageField as Pu, FileInput as Iu, useRecordSelection as Za, ListActions as Ru, Datagrid as Tu, SelectAllButton as ku } from "react-admin";
|
|
10
10
|
import { Link as ir, useNavigate as di, useLocation as dt, Routes as el, Route as tl, useParams as ol, matchPath as en } from "react-router-dom";
|
|
11
11
|
import { styled as Wt, alpha as se, useTheme as ui, ThemeProvider as Pr, useThemeProps as nl } from "@mui/material/styles";
|
|
12
12
|
import un from "@mui/icons-material/Add";
|
|
@@ -450,7 +450,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
450
450
|
validate: X,
|
|
451
451
|
required: pe,
|
|
452
452
|
...re
|
|
453
|
-
} = Ce, ke = Te || $, Ke = Ue || J, Fe = He || fe, at = [j, H, X].flat().some(($e) => $e?.isRequired), Je = y !== void 0 ? y : pe !== void 0 ? pe : f ? !0 : l || Z === void 0 ? q ?? at : Z,
|
|
453
|
+
} = Ce, ke = Te || $, Ke = Ue || J, Fe = He || fe, at = [j, H, X].flat().some(($e) => $e?.isRequired), Je = y !== void 0 ? y : pe !== void 0 ? pe : f ? !0 : l || Z === void 0 ? q ?? at : Z, be = b !== void 0 ? b : De !== void 0 ? De : m ? !0 : ae, bt = C !== void 0 ? C : me !== void 0 ? me : h ? !0 : ee, Xe = de(() => {
|
|
454
454
|
const $e = Array.isArray(j) ? j : [j], Tt = Array.isArray(H) ? H : [H], kt = Array.isArray(X) ? X : [X];
|
|
455
455
|
let je = [
|
|
456
456
|
...$e,
|
|
@@ -495,7 +495,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
495
495
|
Ne && "metiri-field-modified"
|
|
496
496
|
].filter(Boolean).join(" "), {
|
|
497
497
|
propsContenido: B,
|
|
498
|
-
hidden:
|
|
498
|
+
hidden: be
|
|
499
499
|
};
|
|
500
500
|
}, "useContenidoController"), im = /* @__PURE__ */ n((e) => e.split("_")[1], "getFormcodFromResource"), rm = /^\d{2}\/\d{2}\/\d{4}$/, ni = /* @__PURE__ */ n((e) => {
|
|
501
501
|
if (!(e instanceof Date) || isNaN(e.getDate())) return "";
|
|
@@ -799,12 +799,12 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
799
799
|
);
|
|
800
800
|
return /* @__PURE__ */ i(zl.Provider, { value: a, children: e });
|
|
801
801
|
}, "FormToolbarProvider"), Hl = /* @__PURE__ */ n(() => we(zl), "useFormToolbar"), jl = /* @__PURE__ */ n((e) => {
|
|
802
|
-
const t =
|
|
802
|
+
const t = xe(e), o = fn();
|
|
803
803
|
return ne(() => {
|
|
804
804
|
o.refetchQueries({ queryKey: [t], type: "active" });
|
|
805
805
|
}, [o, t]);
|
|
806
806
|
}, "useResourceRefresh"), hn = /* @__PURE__ */ n(() => ({}), "useDefaultHook"), xi = /* @__PURE__ */ n((e) => {
|
|
807
|
-
const t = oo(), o = gt(), r = Vt(), a = di(), s = Co(), c =
|
|
807
|
+
const t = oo(), o = gt(), r = Vt(), a = di(), s = Co(), c = xe(e), l = jl(e), d = jd(c), p = It(), u = Gt(), m = he(), f = Ol(), [h] = Nr(c), g = we(Oa), C = Sr(), b = `lista_${c.split("_")[1]}`, { getItem: y } = qd(), F = y(`${b}.selectedIds`), S = y(`${b}.selectedDetails`), x = /* @__PURE__ */ n((P) => {
|
|
808
808
|
const M = P?.name;
|
|
809
809
|
!M || C?.[M] || g?.register?.(P);
|
|
810
810
|
}, "registerResource");
|
|
@@ -830,7 +830,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
830
830
|
registerResource: x
|
|
831
831
|
};
|
|
832
832
|
}, "useUtilsGrilla"), ey = /* @__PURE__ */ n((e) => {
|
|
833
|
-
const t = Bl(), o = Ll(), r = $l(), a = Nl(), s = Vl(), c = Wl(), l = Co(), d = gt(), p = Vt(), u = di(), m =
|
|
833
|
+
const t = Bl(), o = Ll(), r = $l(), a = Nl(), s = Vl(), c = Wl(), l = Co(), d = gt(), p = Vt(), u = di(), m = xe(e), f = It(), {
|
|
834
834
|
propsContenidos: h,
|
|
835
835
|
setPropsContenidos: g,
|
|
836
836
|
fichaProps: { etrs: C = {} } = {}
|
|
@@ -853,7 +853,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
853
853
|
asisEtr: b
|
|
854
854
|
};
|
|
855
855
|
}, "useUtilsSubmit"), On = /* @__PURE__ */ new Map(), St = /* @__PURE__ */ n((e) => {
|
|
856
|
-
const t =
|
|
856
|
+
const t = xe(e), o = e?.id ?? "new", r = Rt(), { parentFormControl: a } = Re(), s = r ?? `${t}-${o}`, c = Ge(), l = c?.control === a ? null : c;
|
|
857
857
|
ie(() => {
|
|
858
858
|
if (!l) return;
|
|
859
859
|
const O = On.get(s) ?? /* @__PURE__ */ new Map(), G = O.get(l.control) ?? { count: 0 };
|
|
@@ -2394,7 +2394,7 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2394
2394
|
excelOptions: m = {},
|
|
2395
2395
|
printOptions: f = {},
|
|
2396
2396
|
...h
|
|
2397
|
-
} = o, { slotProps: g = {}, ...C } = h, b =
|
|
2397
|
+
} = o, { slotProps: g = {}, ...C } = h, b = xe(), y = no({ resource: b }), F = v.useContext(Ye) || {};
|
|
2398
2398
|
ie(() => {
|
|
2399
2399
|
e?.current && a(e.current);
|
|
2400
2400
|
}, [e]);
|
|
@@ -3155,7 +3155,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3155
3155
|
}, "removeStoredSize"), xf = /* @__PURE__ */ n((e, t) => {
|
|
3156
3156
|
!e || !t || (e.style.width = `${Math.round(t.width)}px`, e.style.height = `${Math.round(t.height)}px`, e.style.maxWidth = `${Math.round(t.maxWidth)}px`, e.style.maxHeight = `${Math.round(t.maxHeight)}px`, e.style.minWidth = `${Math.round(t.minWidth)}px`, e.style.minHeight = `${Math.round(t.minHeight)}px`);
|
|
3157
3157
|
}, "applyPopupSizeStyles"), ai = /* @__PURE__ */ n((e) => {
|
|
3158
|
-
const t = Oo(), o = t.metiri?.fichaVisual === !0, r = he(), a =
|
|
3158
|
+
const t = Oo(), o = t.metiri?.fichaVisual === !0, r = he(), a = xe(), s = e?.resource ?? a ?? "default", l = Gt()?.props, d = e?.dockviewTabParent === !0, p = v.useContext(Ye) || {}, u = p?.popup ?? p?.popupSize ?? null, m = v.useMemo(
|
|
3159
3159
|
() => ff(u, e?.popupRatio),
|
|
3160
3160
|
[u, e?.popupRatio]
|
|
3161
3161
|
), f = mt((E) => E.breakpoints.down("sm")), [h, g] = v.useState(null), C = v.useMemo(
|
|
@@ -3384,7 +3384,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3384
3384
|
const s = yf(t, a);
|
|
3385
3385
|
return a?.container === void 0 && delete s.container, s;
|
|
3386
3386
|
}, "resolvePopupDialogProps"), qr = /* @__PURE__ */ n((e) => {
|
|
3387
|
-
const t =
|
|
3387
|
+
const t = xe(), o = e?.resource ?? t, r = no({ resource: o }).options?.label, a = ci(), s = he(), c = gt(), l = It(), d = cf(), u = Gt()?.props, m = d?.resolve ? d.resolve(o) : null, f = ai({
|
|
3388
3388
|
resource: o,
|
|
3389
3389
|
popupRatio: e?.popupRatio
|
|
3390
3390
|
}), h = ai({
|
|
@@ -3553,7 +3553,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3553
3553
|
borra: p,
|
|
3554
3554
|
nuevoDesde: u,
|
|
3555
3555
|
onClose: m
|
|
3556
|
-
} = e, f =
|
|
3556
|
+
} = e, f = xe(e), h = he(), g = xi(e), C = Oo(), { showCreate: b, showEdit: y, showShow: F } = qr({ resource: f }), S = !hr(t.row, l), x = !mc(t.row, d), P = c && S, M = t?.id ?? t?.row?.id;
|
|
3557
3557
|
return /* @__PURE__ */ R(
|
|
3558
3558
|
Y,
|
|
3559
3559
|
{
|
|
@@ -4136,7 +4136,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4136
4136
|
slots: D,
|
|
4137
4137
|
slotProps: E,
|
|
4138
4138
|
...O
|
|
4139
|
-
} = e, [G, Q] = v.useState(0), [T, V] = v.useState(null), H = v.useRef(null), [Z, oe] = v.useState({ top: 2, left: 8, h: 28 }), ae = mt((w) => w.breakpoints.down("md")), ee = xi(e), $ = he(), [J] = vr(), fe = (J === "en" ? Dr : Er).components.MuiDataGrid.defaultProps.localeText, Se = kf(), Ce =
|
|
4139
|
+
} = e, [G, Q] = v.useState(0), [T, V] = v.useState(null), H = v.useRef(null), [Z, oe] = v.useState({ top: 2, left: 8, h: 28 }), ae = mt((w) => w.breakpoints.down("md")), ee = xi(e), $ = he(), [J] = vr(), fe = (J === "en" ? Dr : Er).components.MuiDataGrid.defaultProps.localeText, Se = kf(), Ce = xe(e), {
|
|
4140
4140
|
props: {
|
|
4141
4141
|
bulkActionButtons: De = r,
|
|
4142
4142
|
hasCreate: me,
|
|
@@ -4151,7 +4151,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4151
4151
|
pivotUi: Fe = "mui",
|
|
4152
4152
|
apiRef: at,
|
|
4153
4153
|
actionButtonsHeader: Je,
|
|
4154
|
-
...
|
|
4154
|
+
...be
|
|
4155
4155
|
},
|
|
4156
4156
|
setProps: bt
|
|
4157
4157
|
} = Gt(), Xe = k ?? Ke, ot = _ ?? Fe, ro = v.useCallback(
|
|
@@ -4165,7 +4165,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4165
4165
|
}
|
|
4166
4166
|
},
|
|
4167
4167
|
[pe]
|
|
4168
|
-
), N = O?.unstable_listView ??
|
|
4168
|
+
), N = O?.unstable_listView ?? be?.unstable_listView ?? !1, B = Xe && re === "pivot";
|
|
4169
4169
|
v.useLayoutEffect(() => {
|
|
4170
4170
|
const w = H.current;
|
|
4171
4171
|
if (!w || N) return;
|
|
@@ -4185,20 +4185,20 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4185
4185
|
js
|
|
4186
4186
|
), Tt = v.useCallback(() => {
|
|
4187
4187
|
$e(js());
|
|
4188
|
-
}, []), kt = O?.dataSource ??
|
|
4188
|
+
}, []), kt = O?.dataSource ?? be?.dataSource, je = v.useMemo(() => {
|
|
4189
4189
|
const w = { ...O };
|
|
4190
4190
|
return delete w.dataSource, delete w.pivotingColDef, w;
|
|
4191
4191
|
}, [O]), Ee = v.useMemo(() => {
|
|
4192
|
-
const w = { ...
|
|
4192
|
+
const w = { ...be };
|
|
4193
4193
|
return delete w.dataSource, delete w.pivotingColDef, w;
|
|
4194
|
-
}, [
|
|
4194
|
+
}, [be]), At = v.useRef(null), Ht = v.useRef(null), bn = v.useMemo(() => {
|
|
4195
4195
|
const w = {
|
|
4196
4196
|
...qs,
|
|
4197
4197
|
...O?.aggregationFunctions || {},
|
|
4198
|
-
...
|
|
4198
|
+
...be?.aggregationFunctions || {}
|
|
4199
4199
|
};
|
|
4200
4200
|
return w.count || (w.count = qs.count), w;
|
|
4201
|
-
}, [O?.aggregationFunctions,
|
|
4201
|
+
}, [O?.aggregationFunctions, be?.aggregationFunctions]), _t = Nt(), {
|
|
4202
4202
|
data: jt = [],
|
|
4203
4203
|
isFetching: Dt,
|
|
4204
4204
|
selectedIds: vt,
|
|
@@ -4310,7 +4310,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4310
4310
|
return Oe.current.promise;
|
|
4311
4311
|
const Ae = {
|
|
4312
4312
|
...O?.meta || {},
|
|
4313
|
-
...
|
|
4313
|
+
...be?.meta || {},
|
|
4314
4314
|
pivot: 1,
|
|
4315
4315
|
pivotModel: JSON.stringify(K),
|
|
4316
4316
|
aggregationModel: JSON.stringify(
|
|
@@ -4396,7 +4396,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4396
4396
|
B,
|
|
4397
4397
|
Ce,
|
|
4398
4398
|
O?.meta,
|
|
4399
|
-
|
|
4399
|
+
be?.meta,
|
|
4400
4400
|
Ve.field,
|
|
4401
4401
|
Ve.order
|
|
4402
4402
|
]), Xc = v.useCallback(
|
|
@@ -5364,7 +5364,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5364
5364
|
onFilterModelChange: dd,
|
|
5365
5365
|
rowSelectionModel: cd,
|
|
5366
5366
|
onRowGroupingModelChange: ed,
|
|
5367
|
-
disableRowGrouping: ae ||
|
|
5367
|
+
disableRowGrouping: ae || be?.disableRowGrouping || O?.disableRowGrouping,
|
|
5368
5368
|
onRowSelectionModelChange: ld,
|
|
5369
5369
|
isRowSelectable: /* @__PURE__ */ n((w) => {
|
|
5370
5370
|
const A = w?.id;
|
|
@@ -5388,13 +5388,13 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5388
5388
|
...Ee,
|
|
5389
5389
|
onColumnWidthChange: nd,
|
|
5390
5390
|
onColumnOrderChange: id,
|
|
5391
|
-
disableColumnMenu: B ? !0 :
|
|
5392
|
-
disableColumnSelector: B ? !0 :
|
|
5393
|
-
showCellVerticalBorder: B ? !0 :
|
|
5394
|
-
showColumnVerticalBorder: B ? !0 :
|
|
5395
|
-
hideFooter: B ? !0 :
|
|
5396
|
-
columnGroupingModel:
|
|
5397
|
-
columnGroupHeaderHeight:
|
|
5391
|
+
disableColumnMenu: B ? !0 : be?.disableColumnMenu ?? O?.disableColumnMenu,
|
|
5392
|
+
disableColumnSelector: B ? !0 : be?.disableColumnSelector ?? O?.disableColumnSelector,
|
|
5393
|
+
showCellVerticalBorder: B ? !0 : be?.showCellVerticalBorder ?? O?.showCellVerticalBorder,
|
|
5394
|
+
showColumnVerticalBorder: B ? !0 : be?.showColumnVerticalBorder ?? O?.showColumnVerticalBorder ?? !0,
|
|
5395
|
+
hideFooter: B ? !0 : be?.hideFooter ?? O?.hideFooter ?? !0,
|
|
5396
|
+
columnGroupingModel: be?.columnGroupingModel ?? O?.columnGroupingModel,
|
|
5397
|
+
columnGroupHeaderHeight: be?.columnGroupHeaderHeight ?? O?.columnGroupHeaderHeight,
|
|
5398
5398
|
aggregationFunctions: bn,
|
|
5399
5399
|
dataSource: Ii ? Mn : void 0,
|
|
5400
5400
|
pivotingColDef: Ii ? Yc : void 0,
|
|
@@ -5495,7 +5495,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5495
5495
|
...y
|
|
5496
5496
|
} = e, F = v.useRef(null), S = we(Ye) || {}, { lang: x = [] } = S, P = on(S, "borrar") || on(S, "delete"), M = h && !P, I = C ? [] : (s || []).filter(
|
|
5497
5497
|
(me) => to(S, me)
|
|
5498
|
-
), k = !!(!C && (l || u || g || M || I.length)), _ =
|
|
5498
|
+
), k = !!(!C && (l || u || g || M || I.length)), _ = xe(e), { sort: L } = oo(), W = /* @__PURE__ */ n(() => F.current, "container"), j = mt((me) => me.breakpoints.down("md")), q = b ?? j, D = b && !j, [E] = vr(), O = (E === "en" ? Dr : Er).components.MuiDataGrid.defaultProps.localeText, G = Ir(), {
|
|
5499
5499
|
props: { gridContainerRef: Q, chkSeleccion: T }
|
|
5500
5500
|
} = Gt(), [V, H] = v.useState({
|
|
5501
5501
|
overlay: null,
|
|
@@ -6232,7 +6232,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6232
6232
|
asistantResource: m,
|
|
6233
6233
|
perPage: f = 500,
|
|
6234
6234
|
...h
|
|
6235
|
-
} = t, { source: g, reference: C, fullWidth: b = !1 } = e, y = b || !!e.sx, F =
|
|
6235
|
+
} = t, { source: g, reference: C, fullWidth: b = !1 } = e, y = b || !!e.sx, F = xe(e), S = vi(F), [x, P] = te([]), M = typeof h.optionText == "string" ? h.optionText : "etiqueta", I = Rt(), k = Tr((O) => Br(O.reload_cb, g, I)), _ = _e(k), L = k === null && _.current ? _.current : k, W = d || L !== null;
|
|
6236
6236
|
let j, q;
|
|
6237
6237
|
if (L) {
|
|
6238
6238
|
const { callback: O, ...G } = L;
|
|
@@ -7258,7 +7258,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7258
7258
|
controls: kc,
|
|
7259
7259
|
SectionGroup: kh
|
|
7260
7260
|
}), "presentFicha"), _h = /* @__PURE__ */ n((e) => {
|
|
7261
|
-
const { validateDelete: t, className: o } = e, r =
|
|
7261
|
+
const { validateDelete: t, className: o } = e, r = xe(e), a = st(), s = gt(), { mutationOptions: { onError: c } = {} } = Re(), { open: l, isLoading: d, handleDialogOpen: p, handleDialogClose: u } = eu({ record: a, resource: r }), m = /* @__PURE__ */ n((h) => {
|
|
7262
7262
|
p(h);
|
|
7263
7263
|
}, "handleClick"), f = ne(
|
|
7264
7264
|
async (h) => {
|
|
@@ -7463,7 +7463,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7463
7463
|
}
|
|
7464
7464
|
}
|
|
7465
7465
|
}), "getClassesForm"), Fi = /* @__PURE__ */ n((e) => {
|
|
7466
|
-
const { deleteButton: t = !0, sx: o, ...r } = e, { estado: a } = Re(), s =
|
|
7466
|
+
const { deleteButton: t = !0, sx: o, ...r } = e, { estado: a } = Re(), s = xe(e), c = no({ resource: s }), l = Pi({ borrar: !0, ...r });
|
|
7467
7467
|
return /* @__PURE__ */ i(Ga, { ...r, sx: [Ac, ...Array.isArray(o) ? o : o ? [o] : []], children: /* @__PURE__ */ R("div", { className: ou.defaultToolbar, children: [
|
|
7468
7468
|
/* @__PURE__ */ i(dn, { className: "metiri-save-button" }),
|
|
7469
7469
|
/* @__PURE__ */ i(_c, {}),
|
|
@@ -7477,7 +7477,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7477
7477
|
] }) });
|
|
7478
7478
|
}, "ToolbarFicha"), Ki = /* @__PURE__ */ n(() => {
|
|
7479
7479
|
}, "dontSave"), Eh = /* @__PURE__ */ n(() => typeof document > "u" ? !1 : !!document.activeElement?.closest?.(Dh), "isDialogInteraction$1"), Oh = /* @__PURE__ */ n((e, t) => typeof e?.hide != "function" || !e?.open ? !1 : t ? !0 : Eh() ? !!(e?.props?._popupKey || e?.props?.tipo === "vista") : !1, "canHideAsistentePopup$1"), Pi = /* @__PURE__ */ n((e) => {
|
|
7480
|
-
const { borrar: t = !1 } = e, o =
|
|
7480
|
+
const { borrar: t = !1 } = e, o = xe(), r = st(), a = he(), s = Vt(), c = gt(), l = It(), {
|
|
7481
7481
|
estado: d,
|
|
7482
7482
|
mutationOptions: p = {},
|
|
7483
7483
|
fichaProps: { onBeforeSubmitFicha: u } = {}
|
|
@@ -7707,7 +7707,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7707
7707
|
onBeforeSubmitAsistente: l = Eo,
|
|
7708
7708
|
onAfterSubmitAsistente: d = Eo,
|
|
7709
7709
|
validateAllowAdd: p
|
|
7710
|
-
} = e, [u, m] = v.useState(!1), f =
|
|
7710
|
+
} = e, [u, m] = v.useState(!1), f = xe(e), h = Ge(), g = io(), C = Yl({ apiRef: g, source: s, enviarTodo: c }), b = "N", { estado: y } = Re(), F = St(), x = he()("ra.action.create");
|
|
7711
7711
|
return /* @__PURE__ */ R(rt, { children: [
|
|
7712
7712
|
/* @__PURE__ */ i(
|
|
7713
7713
|
Ze,
|
|
@@ -7916,7 +7916,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7916
7916
|
slotProps: X,
|
|
7917
7917
|
initialState: pe,
|
|
7918
7918
|
validateAllowAdd: re
|
|
7919
|
-
} = E || {}, ke = `${h}_enviartodo`, [Ke, Fe] = v.useState(r), [{ field: at, sort: Je }] = r,
|
|
7919
|
+
} = E || {}, ke = `${h}_enviartodo`, [Ke, Fe] = v.useState(r), [{ field: at, sort: Je }] = r, be = H || u || ee, bt = oe !== void 0 ? oe : V ? !0 : $ !== void 0 ? $ : m, Xe = O.enableLoad ?? J ?? p, ot = De ?? c, ro = me ?? l, N = Te ?? d;
|
|
7920
7920
|
let B = { ...b };
|
|
7921
7921
|
I && t.split(",").forEach((ue) => {
|
|
7922
7922
|
ue && (B[ue] = [
|
|
@@ -8039,7 +8039,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8039
8039
|
valueFormatter: ao.valueFormatter ?? jr
|
|
8040
8040
|
} : ao;
|
|
8041
8041
|
});
|
|
8042
|
-
return
|
|
8042
|
+
return be || (ot && Oe.push({
|
|
8043
8043
|
field: " ",
|
|
8044
8044
|
width: 80,
|
|
8045
8045
|
headerName: "",
|
|
@@ -8104,7 +8104,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8104
8104
|
a,
|
|
8105
8105
|
He,
|
|
8106
8106
|
At,
|
|
8107
|
-
|
|
8107
|
+
be,
|
|
8108
8108
|
ot,
|
|
8109
8109
|
ro,
|
|
8110
8110
|
N,
|
|
@@ -8463,7 +8463,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8463
8463
|
const { useFormulario: t = hn, ...o } = e;
|
|
8464
8464
|
return { fichaProps: { ...t(o), etrs: o.etrs } };
|
|
8465
8465
|
}, "useInitFicha"), jh = /* @__PURE__ */ n((e, t, o) => qa(e, { id: o?.id || "-1", meta: o }, t), "useNuevo"), cy = /* @__PURE__ */ n((e, t) => {
|
|
8466
|
-
const o =
|
|
8466
|
+
const o = xe(), {
|
|
8467
8467
|
data: r,
|
|
8468
8468
|
isFetching: a,
|
|
8469
8469
|
error: s
|
|
@@ -8531,7 +8531,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8531
8531
|
title: M = null,
|
|
8532
8532
|
...I
|
|
8533
8533
|
}) => I, "sanitizeRestProps$4"), Kh = /* @__PURE__ */ n((e) => {
|
|
8534
|
-
const t =
|
|
8534
|
+
const t = xe(e), o = Vc(e), r = !!(o?.isOpen ?? e.isOpen), a = o?.close ?? e.close;
|
|
8535
8535
|
return /* @__PURE__ */ i(
|
|
8536
8536
|
Xh,
|
|
8537
8537
|
{
|
|
@@ -8554,7 +8554,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8554
8554
|
PaperProps: d,
|
|
8555
8555
|
mutationOptions: p,
|
|
8556
8556
|
...u
|
|
8557
|
-
} = e, m =
|
|
8557
|
+
} = e, m = xe(e), f = r ?? m, h = no({ resource: f }).options?.label, g = ci(), C = he(), b = Vt(), y = v.useCallback(() => {
|
|
8558
8558
|
if (s)
|
|
8559
8559
|
return s();
|
|
8560
8560
|
b("list", f, void 0, void 0, {
|
|
@@ -8673,7 +8673,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8673
8673
|
}
|
|
8674
8674
|
);
|
|
8675
8675
|
}, "CreateInDialogButton"), Qh = /* @__PURE__ */ i(un, {}), Hn = /* @__PURE__ */ new Set(), Zh = /* @__PURE__ */ n((e) => {
|
|
8676
|
-
const { children: t, enableLoad: o, queryOptions: r, fichaProps: a, mutationOptions: s } = e, [c, l] = te(null), d = dt(), p = Nt(), u =
|
|
8676
|
+
const { children: t, enableLoad: o, queryOptions: r, fichaProps: a, mutationOptions: s } = e, [c, l] = te(null), d = dt(), p = Nt(), u = xe(e), m = vi(u), f = e.estado ?? (d?.state?.estado || "N"), h = d?.state?.record, g = e.record ?? h, C = e.id ?? d?.state?.id ?? g?.id ?? "-1", b = `${u}:${f}:${C}`, F = C === "-1" && g && typeof g == "object" && !Array.isArray(g) ? Object.fromEntries(
|
|
8677
8677
|
Object.entries(g).filter(
|
|
8678
8678
|
([, W]) => W != null && (typeof W == "string" || typeof W == "number" || typeof W == "boolean")
|
|
8679
8679
|
)
|
|
@@ -8780,7 +8780,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8780
8780
|
);
|
|
8781
8781
|
return /* @__PURE__ */ i(_o, { children: y });
|
|
8782
8782
|
}, "CreateEtriekView"), eg = /* @__PURE__ */ n((e) => {
|
|
8783
|
-
const t = dt(), o = It(), r = Vt(), a = gt(), s =
|
|
8783
|
+
const t = dt(), o = It(), r = Vt(), a = gt(), s = xe(e), c = no({ resource: s }).options?.label, l = ai({
|
|
8784
8784
|
resource: s,
|
|
8785
8785
|
dockviewTabParent: !0
|
|
8786
8786
|
}), d = ci(), p = he(), u = _e(!1), m = t?.state?._asistentePopup === "router" && typeof o?.show == "function", f = m ? `${s}:create` : null;
|
|
@@ -8835,7 +8835,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8835
8835
|
name: sn,
|
|
8836
8836
|
overridesResolver: /* @__PURE__ */ n((e, t) => t.root, "overridesResolver")
|
|
8837
8837
|
})(({ theme: e }) => Mi(e)), tg = /* @__PURE__ */ n((e) => {
|
|
8838
|
-
const t =
|
|
8838
|
+
const t = xe(e), o = Vc(e);
|
|
8839
8839
|
return o ? /* @__PURE__ */ i(ca, { resource: t, ...o, ...e }) : /* @__PURE__ */ i(el, { children: /* @__PURE__ */ i(
|
|
8840
8840
|
tl,
|
|
8841
8841
|
{
|
|
@@ -8944,7 +8944,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8944
8944
|
return t?.viewMode === "pivot" || e === !1 ? null : Ft(e) ? e : /* @__PURE__ */ i(cu, { rowsPerPageOptions: sg });
|
|
8945
8945
|
}, "PivotAwarePagination"), Ko = /* @__PURE__ */ n(() => {
|
|
8946
8946
|
}, "noop"), uy = /* @__PURE__ */ n((e) => {
|
|
8947
|
-
const t =
|
|
8947
|
+
const t = xe(e), {
|
|
8948
8948
|
tipo: o,
|
|
8949
8949
|
hasCreate: r,
|
|
8950
8950
|
hasSeleccionMultiple: a,
|
|
@@ -9218,7 +9218,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9218
9218
|
typeof e[o] == "string" && e[o].trim().length === 0 || (e[o] == null && (e[o] = ""), t[o] = e[o]);
|
|
9219
9219
|
return t;
|
|
9220
9220
|
}, "defaultTransform"), ug = /* @__PURE__ */ n((e) => {
|
|
9221
|
-
const { children: t, fichaProps: o, mutationOptions: r } = e, a = uu(), [s, c] = te(null), l = dt(), d = Nt(), p =
|
|
9221
|
+
const { children: t, fichaProps: o, mutationOptions: r } = e, a = uu(), [s, c] = te(null), l = dt(), d = Nt(), p = xe(e), u = vi(p), { record: m, isFetching: f } = a, h = u?.record || u?.initialValues || m, C = (u ? !1 : f) && !h, b = e.estado ?? (l?.state?.estado || "M"), y = m?.id ?? l?.state?.id ?? "edit", F = `${p}:${b}:${y}`, S = de(
|
|
9222
9222
|
() => ({
|
|
9223
9223
|
estado: b,
|
|
9224
9224
|
initialValues: h,
|
|
@@ -9305,7 +9305,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9305
9305
|
);
|
|
9306
9306
|
return /* @__PURE__ */ i(_o, { children: g });
|
|
9307
9307
|
}, "EditEtriekView"), pg = /* @__PURE__ */ n((e) => {
|
|
9308
|
-
const t = dt(), o = It(), r = Vt(), a = gt(), s =
|
|
9308
|
+
const t = dt(), o = It(), r = Vt(), a = gt(), s = xe(e), c = no({ resource: s }).options?.label, l = ai({
|
|
9309
9309
|
resource: s,
|
|
9310
9310
|
dockviewTabParent: !0
|
|
9311
9311
|
}), d = ci(), p = he(), u = ol(), m = _e(!1), f = t?.state?._asistentePopup === "router" && typeof o?.show == "function", h = en(`/${s}/:id/*`, t.pathname) || en(`/${s}/:id`, t.pathname), g = e.id ?? u?.id ?? t?.state?.id ?? t?.state?.record?.id ?? e.record?.id ?? h?.params?.id, C = f && !!g, b = C ? `${s}:${g}` : null;
|
|
@@ -9370,7 +9370,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9370
9370
|
hasAccept: d = !0,
|
|
9371
9371
|
hasCancel: p = !0,
|
|
9372
9372
|
isLoading: u = !1
|
|
9373
|
-
} = e, m =
|
|
9373
|
+
} = e, m = xe(e), f = /* @__PURE__ */ n((h) => {
|
|
9374
9374
|
a && a(h);
|
|
9375
9375
|
}, "handleClose");
|
|
9376
9376
|
return /* @__PURE__ */ R(
|
|
@@ -9434,7 +9434,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9434
9434
|
}
|
|
9435
9435
|
}),
|
|
9436
9436
|
[t]
|
|
9437
|
-
), r =
|
|
9437
|
+
), r = xe(e), { estado: a, isLoading: s, initialValues: c, fichaProps: l } = Re(), d = St({ resource: r });
|
|
9438
9438
|
if (ie(() => {
|
|
9439
9439
|
l.onRenderFicha && l.onRenderFicha(d, a);
|
|
9440
9440
|
}, []), ie(() => {
|
|
@@ -9469,7 +9469,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9469
9469
|
}, hg = ".MuiDialog-paper", Xi = /* @__PURE__ */ n((e) => {
|
|
9470
9470
|
e.preventDefault();
|
|
9471
9471
|
}, "disableKeyboardEvents"), gg = /* @__PURE__ */ n(() => typeof document > "u" ? !1 : !!document.activeElement?.closest?.(hg), "isDialogInteraction"), bg = /* @__PURE__ */ n((e, t) => typeof e?.hide != "function" || !e?.open ? !1 : t ? !0 : gg() ? !!(e?.props?._popupKey || e?.props?.tipo === "vista") : !1, "canHideAsistentePopup"), Gc = /* @__PURE__ */ n((e) => {
|
|
9472
|
-
const t = Co(), o = dt(), r =
|
|
9472
|
+
const t = Co(), o = dt(), r = xe(), a = Vt(), s = st(), c = It(), { estado: l, mutationOptions: d = {} } = Re(), p = d?._popupKey, u = l === "B" || o.state?.estado === "B", m = Pi({ borrar: u, ...e }), f = t.open || u, h = t.open ? fg : mg;
|
|
9473
9473
|
return /* @__PURE__ */ R(rt, { children: [
|
|
9474
9474
|
t.open && /* @__PURE__ */ i(
|
|
9475
9475
|
yo,
|
|
@@ -9816,7 +9816,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9816
9816
|
jsBotonGrilla: d = Ig,
|
|
9817
9817
|
refresh: p = !0,
|
|
9818
9818
|
...u
|
|
9819
|
-
} = e, [m, f] = v.useState(null), [h, g] = v.useState(null), [C, b] = v.useState({}), y = he(), F = oo(), { displayedFilters: S, filterValues: x, exporter: P, showFilter: M } = F, I =
|
|
9819
|
+
} = e, [m, f] = v.useState(null), [h, g] = v.useState(null), [C, b] = v.useState({}), y = he(), F = oo(), { displayedFilters: S, filterValues: x, exporter: P, showFilter: M } = F, I = xe(e), { hasCreate: k } = no(e), _ = we(hu) || r, L = xi(e), W = we(Ye) || {}, {
|
|
9820
9820
|
props: {
|
|
9821
9821
|
hasCreate: j,
|
|
9822
9822
|
hasSeleccionMultiple: q,
|
|
@@ -10099,23 +10099,23 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10099
10099
|
},
|
|
10100
10100
|
children: X.options.flatMap((Fe) => (Array.isArray(
|
|
10101
10101
|
Fe?.children
|
|
10102
|
-
) && Fe.children.length > 0 ? Fe.children : [Fe]).map((
|
|
10103
|
-
const bt = X.selectOnClick && C[X.index]?.selectedOption?.key ===
|
|
10102
|
+
) && Fe.children.length > 0 ? Fe.children : [Fe]).map((be) => {
|
|
10103
|
+
const bt = X.selectOnClick && C[X.index]?.selectedOption?.key === be.key;
|
|
10104
10104
|
return /* @__PURE__ */ R(
|
|
10105
10105
|
et,
|
|
10106
10106
|
{
|
|
10107
10107
|
selected: bt,
|
|
10108
10108
|
onClick: /* @__PURE__ */ n((Xe) => {
|
|
10109
10109
|
Te(
|
|
10110
|
-
|
|
10110
|
+
be,
|
|
10111
10111
|
X.index,
|
|
10112
10112
|
X
|
|
10113
|
-
),
|
|
10113
|
+
), be.onClick ? be.onClick(
|
|
10114
10114
|
Xe,
|
|
10115
10115
|
fe
|
|
10116
10116
|
) : d(
|
|
10117
10117
|
fe,
|
|
10118
|
-
|
|
10118
|
+
be.key
|
|
10119
10119
|
);
|
|
10120
10120
|
}, "onClick"),
|
|
10121
10121
|
sx: Yi,
|
|
@@ -10124,24 +10124,21 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10124
10124
|
Lt,
|
|
10125
10125
|
{
|
|
10126
10126
|
sx: Ji,
|
|
10127
|
-
children: Ct(
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
fontSize: "inherit"
|
|
10131
|
-
}
|
|
10132
|
-
)
|
|
10127
|
+
children: v.isValidElement(be.icon) && Ct(be.icon, {
|
|
10128
|
+
fontSize: "inherit"
|
|
10129
|
+
})
|
|
10133
10130
|
}
|
|
10134
10131
|
),
|
|
10135
10132
|
/* @__PURE__ */ i(
|
|
10136
10133
|
eo,
|
|
10137
10134
|
{
|
|
10138
|
-
primary:
|
|
10135
|
+
primary: be.label,
|
|
10139
10136
|
primaryTypographyProps: Qi
|
|
10140
10137
|
}
|
|
10141
10138
|
)
|
|
10142
10139
|
]
|
|
10143
10140
|
},
|
|
10144
|
-
|
|
10141
|
+
be.key
|
|
10145
10142
|
);
|
|
10146
10143
|
}))
|
|
10147
10144
|
},
|
|
@@ -10328,7 +10325,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10328
10325
|
// NUEVO (opcional): si querés forzar el tooltip del botón, aunque el seleccionado sea otro
|
|
10329
10326
|
title: s
|
|
10330
10327
|
// string
|
|
10331
|
-
} = e, [c, l] = te(!1), d = _e(), p =
|
|
10328
|
+
} = e, [c, l] = te(!1), d = _e(), p = xe(e), u = we(Ye) || {}, { menuModel: m, leafOptions: f, menuVisible: h } = de(() => {
|
|
10332
10329
|
const M = [], I = [], k = t?.[a];
|
|
10333
10330
|
return to(u, k) ? ((t || []).forEach((_) => {
|
|
10334
10331
|
if (!to(u, _))
|
|
@@ -10505,7 +10502,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10505
10502
|
)
|
|
10506
10503
|
] });
|
|
10507
10504
|
}, "MultiTextField"), kg = /* @__PURE__ */ n((e) => {
|
|
10508
|
-
const { children: t, fichaProps: o } = e, r = Cu(), [a, s] = te(null), c = dt(), l = Nt(), d =
|
|
10505
|
+
const { children: t, fichaProps: o } = e, r = Cu(), [a, s] = te(null), c = dt(), l = Nt(), d = xe(e), { record: p, isFetching: u } = r, m = e.estado ?? (c?.state?.estado || "M"), f = p?.id ?? c?.state?.id ?? "show", h = `${d}:${m}:${f}`, g = de(
|
|
10509
10506
|
() => ({
|
|
10510
10507
|
estado: m,
|
|
10511
10508
|
initialValues: p,
|
|
@@ -10586,7 +10583,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10586
10583
|
resource: a,
|
|
10587
10584
|
scrollToTop: s = !0,
|
|
10588
10585
|
...c
|
|
10589
|
-
} = e, l =
|
|
10586
|
+
} = e, l = xe(e), d = st(e), p = wu();
|
|
10590
10587
|
return d ? /* @__PURE__ */ i(
|
|
10591
10588
|
_g,
|
|
10592
10589
|
{
|
|
@@ -10643,7 +10640,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10643
10640
|
toolbar: d = zg,
|
|
10644
10641
|
onChange: p,
|
|
10645
10642
|
...u
|
|
10646
|
-
} = t, m = dt(), f =
|
|
10643
|
+
} = t, m = dt(), f = xe(t), [h, g] = te(0), C = Su(), { estado: b } = Re(), y = St(t), F = mt((D) => D.breakpoints.down("sm")), S = mt((D) => D.breakpoints.down("md")), x = _e(null), P = Pp(x, l.props.action);
|
|
10647
10644
|
ie(() => {
|
|
10648
10645
|
x.current?.updateScrollButtons();
|
|
10649
10646
|
}, [F, S]);
|
|
@@ -11063,7 +11060,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11063
11060
|
disableAutoFocus: !0,
|
|
11064
11061
|
disableRestoreFocus: !0
|
|
11065
11062
|
}, My = /* @__PURE__ */ n((e) => {
|
|
11066
|
-
const { isLoading: t } = e, o = he(), r =
|
|
11063
|
+
const { isLoading: t } = e, o = he(), r = xe(e), a = It(), s = we(ya), c = _e(
|
|
11067
11064
|
`asistente-host-${Math.random().toString(36).slice(2)}`
|
|
11068
11065
|
), l = a?.hostId, d = !l || l === c.current;
|
|
11069
11066
|
ie(() => {
|
|
@@ -13407,7 +13404,7 @@ const Ty = {
|
|
|
13407
13404
|
l(N.currentTarget);
|
|
13408
13405
|
}, []), Je = ne(() => {
|
|
13409
13406
|
l(null);
|
|
13410
|
-
}, []),
|
|
13407
|
+
}, []), be = ne(
|
|
13411
13408
|
(N, B) => {
|
|
13412
13409
|
J(B.value), l(null), re(N, {
|
|
13413
13410
|
seleccion: "",
|
|
@@ -13668,7 +13665,7 @@ const Ty = {
|
|
|
13668
13665
|
et,
|
|
13669
13666
|
{
|
|
13670
13667
|
selected: N.value === $,
|
|
13671
|
-
onClick: /* @__PURE__ */ n((z) =>
|
|
13668
|
+
onClick: /* @__PURE__ */ n((z) => be(z, N), "onClick"),
|
|
13672
13669
|
children: [
|
|
13673
13670
|
/* @__PURE__ */ i(
|
|
13674
13671
|
B,
|