biblio-react 3.0.75 → 3.0.76
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/README.md +30 -30
- package/dist/index.js +551 -553
- package/dist/index.js.map +1 -1
- package/package.json +16 -14
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var Ad = Object.defineProperty;
|
|
|
2
2
|
var n = (e, t) => Ad(e, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { jsx as i, jsxs as k, Fragment as dt } from "react/jsx-runtime";
|
|
4
4
|
import * as M from "react";
|
|
5
|
-
import { forwardRef as Ir, createElement as ei, createContext as tt, useContext as xe, useState as oe, useMemo as
|
|
5
|
+
import { forwardRef as Ir, createElement as ei, createContext as tt, useContext as xe, useState as oe, useMemo as re, useRef as Ae, useCallback as ie, useEffect as se, useSyncExternalStore as Dd, useLayoutEffect as ir, Fragment as yt, isValidElement as Dt, Children as Eo, cloneElement as Tt, useImperativeHandle as Ed, memo as Od } from "react";
|
|
6
6
|
import Da from "@mui/icons-material/Lock";
|
|
7
7
|
import Bd from "@mui/icons-material/VpnLock";
|
|
8
8
|
import { MenuItem as et, ListItemIcon as zt, ListItemText as io, useMediaQuery as wt, Typography as go, Box as Q, CircularProgress as Rr, useTheme as No, Card as Ea, CardHeader as $d, Divider as Ld, CardContent as Oa, Stack as di, IconButton as gt, Tooltip as kt, createTheme as Nd, ThemeProvider as Vd, Chip as Ba, Menu as xo, Grid as Wd, Button as rr, alpha as zd, StyledEngineProvider as $a, DialogTitle as sr, Dialog as ti, DialogContent as ar, GlobalStyles as Gd, Collapse as Hd, List as qd, Switch as jd, DialogActions as Cs, Paper as La, Table as Ud, TableHead as Kd, TableRow as ws, TableCell as po, Skeleton as mo, TableBody as Xd } from "@mui/material";
|
|
@@ -173,7 +173,7 @@ const om = Ir((e, t) => {
|
|
|
173
173
|
t && /* @__PURE__ */ i(Q, { component: "span", sx: { flex: 1 } })
|
|
174
174
|
] });
|
|
175
175
|
}, "CustomAppBar"), El = tt(), Bo = /* @__PURE__ */ n(({ children: e }) => {
|
|
176
|
-
const [t, o] = oe(!1), [r, s] = oe(""), a =
|
|
176
|
+
const [t, o] = oe(!1), [r, s] = oe(""), a = re(
|
|
177
177
|
() => ({
|
|
178
178
|
open: t,
|
|
179
179
|
mensaje: r,
|
|
@@ -207,25 +207,25 @@ const om = Ir((e, t) => {
|
|
|
207
207
|
}
|
|
208
208
|
return null;
|
|
209
209
|
}, "getHideMatcher"), Fs = /* @__PURE__ */ n(({ children: e, isolate: t = !1 }) => {
|
|
210
|
-
const o = xe(pr), [r, s] = oe([]), [a, c] = oe(null), l = r.length > 0, d = r[r.length - 1] || {}, p =
|
|
210
|
+
const o = xe(pr), [r, s] = oe([]), [a, c] = oe(null), l = r.length > 0, d = r[r.length - 1] || {}, p = re(
|
|
211
211
|
() => ({
|
|
212
212
|
open: l,
|
|
213
213
|
props: d,
|
|
214
214
|
stack: r,
|
|
215
215
|
hostId: a,
|
|
216
|
-
registerHost: /* @__PURE__ */ n((u) => c((
|
|
217
|
-
unregisterHost: /* @__PURE__ */ n((u) => c((
|
|
216
|
+
registerHost: /* @__PURE__ */ n((u) => c((m) => m === null ? u : m), "registerHost"),
|
|
217
|
+
unregisterHost: /* @__PURE__ */ n((u) => c((m) => m === u ? null : m), "unregisterHost"),
|
|
218
218
|
show: /* @__PURE__ */ n((u) => {
|
|
219
|
-
s((
|
|
219
|
+
s((m) => [...m, u]);
|
|
220
220
|
}, "show"),
|
|
221
|
-
hide: /* @__PURE__ */ n((u) => s((
|
|
222
|
-
if (!
|
|
223
|
-
return
|
|
221
|
+
hide: /* @__PURE__ */ n((u) => s((m) => {
|
|
222
|
+
if (!m.length)
|
|
223
|
+
return m;
|
|
224
224
|
const h = am(u);
|
|
225
225
|
if (!h)
|
|
226
|
-
return
|
|
227
|
-
const
|
|
228
|
-
return sm(
|
|
226
|
+
return m.slice(0, -1);
|
|
227
|
+
const f = rm(m, h);
|
|
228
|
+
return sm(m, f);
|
|
229
229
|
}), "hide")
|
|
230
230
|
}),
|
|
231
231
|
[l, d, r, a]
|
|
@@ -240,24 +240,24 @@ const om = Ir((e, t) => {
|
|
|
240
240
|
hideGridToolbarActions: a = !0,
|
|
241
241
|
children: c
|
|
242
242
|
}) => {
|
|
243
|
-
const l =
|
|
243
|
+
const l = Ae(null), d = Ae(null), p = Ae(null), [u, m] = oe({
|
|
244
244
|
hasCreate: e,
|
|
245
245
|
hasSeleccionMultiple: t,
|
|
246
246
|
handleSeleccionMultiple: r,
|
|
247
247
|
pivotEnabled: _s,
|
|
248
248
|
pivotUi: As
|
|
249
|
-
}), [h,
|
|
250
|
-
|
|
249
|
+
}), [h, f] = oe("grilla"), g = ie((C) => {
|
|
250
|
+
m((b) => ({ ...b, ...C }));
|
|
251
251
|
}, []), y = u.pivotEnabled ?? _s, x = u.pivotUi ?? As, S = ie((C) => {
|
|
252
|
-
|
|
252
|
+
f((b) => {
|
|
253
253
|
const I = typeof C == "function" ? C(b) : C;
|
|
254
254
|
return !y && I === "pivot" ? "grilla" : I;
|
|
255
255
|
});
|
|
256
256
|
}, [y]);
|
|
257
|
-
|
|
258
|
-
!y && h === "pivot" &&
|
|
257
|
+
se(() => {
|
|
258
|
+
!y && h === "pivot" && f("grilla");
|
|
259
259
|
}, [y, h]);
|
|
260
|
-
const P =
|
|
260
|
+
const P = re(
|
|
261
261
|
() => ({
|
|
262
262
|
props: {
|
|
263
263
|
...u,
|
|
@@ -360,7 +360,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
360
360
|
}), d = ie((P) => {
|
|
361
361
|
const C = { campo: P };
|
|
362
362
|
return c((b) => [...b, C]), () => c((b) => b.filter((I) => I !== C));
|
|
363
|
-
}, []), p =
|
|
363
|
+
}, []), p = re(() => {
|
|
364
364
|
const P = a.map((b) => b.campo), C = [...P];
|
|
365
365
|
for (const [b, I] of Object.entries(e.fichaProps || {})) {
|
|
366
366
|
const v = I?.grupoBloqueoCarga;
|
|
@@ -371,26 +371,26 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
371
371
|
ir(() => {
|
|
372
372
|
l.campos = new Set(p), l.notify();
|
|
373
373
|
}, [p, l]);
|
|
374
|
-
const u = Kt(),
|
|
374
|
+
const u = Kt(), m = e.scopeIdentity ?? e.estado ?? "ficha", h = Ae(m), [f, g] = oe(
|
|
375
375
|
() => hr("ficha")
|
|
376
376
|
);
|
|
377
|
-
|
|
378
|
-
h.current !==
|
|
379
|
-
}, [u,
|
|
377
|
+
se(() => {
|
|
378
|
+
h.current !== m && (h.current = m, u(fr(f)), s({}), g(hr("ficha")));
|
|
379
|
+
}, [u, f, m]), se(
|
|
380
380
|
() => () => {
|
|
381
|
-
u(fr(
|
|
381
|
+
u(fr(f));
|
|
382
382
|
},
|
|
383
|
-
[u,
|
|
383
|
+
[u, f]
|
|
384
384
|
);
|
|
385
|
-
const y =
|
|
385
|
+
const y = re(
|
|
386
386
|
() => ({
|
|
387
387
|
estado: e.estado,
|
|
388
388
|
initialValues: e.initialValues,
|
|
389
389
|
isLoading: e.isLoading,
|
|
390
390
|
fichaProps: e.fichaProps,
|
|
391
391
|
mutationOptions: e.mutationOptions,
|
|
392
|
-
scopeIdentity:
|
|
393
|
-
reduxScope:
|
|
392
|
+
scopeIdentity: m,
|
|
393
|
+
reduxScope: f,
|
|
394
394
|
parentFormControl: o,
|
|
395
395
|
iniciarCargaCampo: d,
|
|
396
396
|
propsContenidos: r,
|
|
@@ -407,11 +407,11 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
407
407
|
e.isLoading,
|
|
408
408
|
e.mutationOptions,
|
|
409
409
|
e.fichaProps,
|
|
410
|
-
f,
|
|
411
410
|
m,
|
|
411
|
+
f,
|
|
412
412
|
o
|
|
413
413
|
]
|
|
414
|
-
), x =
|
|
414
|
+
), x = re(
|
|
415
415
|
() => ({ ...y, camposCargando: p }),
|
|
416
416
|
[y, p]
|
|
417
417
|
), S = /* @__PURE__ */ i(Bl.Provider, { value: x, children: /* @__PURE__ */ i(Wo.Provider, { value: void 0, children: t }) });
|
|
@@ -433,20 +433,20 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
433
433
|
propsContenidos: a = {},
|
|
434
434
|
iniciarCargaCampo: c
|
|
435
435
|
} = Be(), d = xe(Wo) !== void 0, p = Bt(), u = Or((ve) => zr(ve.configInputs, t, p)), {
|
|
436
|
-
conts:
|
|
436
|
+
conts: m = []
|
|
437
437
|
//user = [],
|
|
438
438
|
} = xe(Xe) || {}, {
|
|
439
439
|
hidden: h,
|
|
440
|
-
required:
|
|
440
|
+
required: f,
|
|
441
441
|
disabled: g,
|
|
442
442
|
label: y
|
|
443
|
-
} =
|
|
443
|
+
} = m.length === 0 || !m[t] ? { hidden: 0, required: 0, disabled: 0, label: void 0 } : m[t], {
|
|
444
444
|
disabled: x,
|
|
445
445
|
hidden: S,
|
|
446
446
|
required: P,
|
|
447
447
|
error: C,
|
|
448
448
|
label: b
|
|
449
|
-
} = u || {}, I =
|
|
449
|
+
} = u || {}, I = re(
|
|
450
450
|
() => typeof C == "function" ? C : C === void 0 ? void 0 : () => C,
|
|
451
451
|
[C]
|
|
452
452
|
), { [t]: v = {} } = s, { [t]: T = {} } = a, {
|
|
@@ -469,7 +469,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
469
469
|
required: ae,
|
|
470
470
|
grupoBloqueoCarga: ue,
|
|
471
471
|
...Y
|
|
472
|
-
} = v, L = d || R === void 0 ? z : R, ee = d || N === void 0 ? H : N, pe = d || A === void 0 ? _ : A,
|
|
472
|
+
} = v, L = d || R === void 0 ? z : R, ee = d || N === void 0 ? H : N, pe = d || A === void 0 ? _ : A, De = d || B === void 0 ? O : B, he = d || X === void 0 ? E : X, Ie = Ft(e), me = q({
|
|
473
473
|
...F,
|
|
474
474
|
estado: o,
|
|
475
475
|
hidden: L,
|
|
@@ -485,7 +485,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
485
485
|
validate: ne,
|
|
486
486
|
required: $e,
|
|
487
487
|
...Oe
|
|
488
|
-
} = me, Te = Ue || pe, pt = ge ||
|
|
488
|
+
} = me, Te = Ue || pe, pt = ge || De, mt = J || he, Ce = [W, te, ne].flat().some((ve) => ve?.isRequired), ft = P !== void 0 ? P : $e !== void 0 ? $e : f ? !0 : d || ae === void 0 ? Z ?? Ce : ae, nt = S !== void 0 ? S : Re !== void 0 ? Re : h ? !0 : L, Ke = x !== void 0 ? x : He !== void 0 ? He : g ? !0 : ee, Yt = re(() => {
|
|
489
489
|
const ve = Array.isArray(W) ? W : [W], qe = Array.isArray(te) ? te : [te], st = Array.isArray(ne) ? ne : [ne];
|
|
490
490
|
let ht = [
|
|
491
491
|
...ve,
|
|
@@ -616,9 +616,9 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
616
616
|
setSort: d,
|
|
617
617
|
setPerPage: p,
|
|
618
618
|
perPage: u,
|
|
619
|
-
defaultTitle:
|
|
619
|
+
defaultTitle: m,
|
|
620
620
|
setPage: h,
|
|
621
|
-
setFilters:
|
|
621
|
+
setFilters: f,
|
|
622
622
|
selectedIds: g,
|
|
623
623
|
onUnselectItems: y,
|
|
624
624
|
onToggleItem: x,
|
|
@@ -748,7 +748,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
748
748
|
let p = d;
|
|
749
749
|
a === "F" && (p += c === "N" ? "/create" : `/${l.clave}`), setTimeout(() => {
|
|
750
750
|
const u = e.current.panels.find(
|
|
751
|
-
(
|
|
751
|
+
(m) => m.id === `win_${d}`
|
|
752
752
|
);
|
|
753
753
|
u ? u.api.setActive() : e.current.addPanel({
|
|
754
754
|
id: `win_${d}`,
|
|
@@ -848,7 +848,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
848
848
|
}, "useAjax"), Yl = tt(), Jl = /* @__PURE__ */ n(({ children: e }) => {
|
|
849
849
|
const [t, o] = oe({}), r = /* @__PURE__ */ n((a, c) => {
|
|
850
850
|
o((l) => l[a] === c ? l : { ...l, [a]: c });
|
|
851
|
-
}, "setVisibilidad"), s =
|
|
851
|
+
}, "setVisibilidad"), s = re(
|
|
852
852
|
() => ({
|
|
853
853
|
hidden: t,
|
|
854
854
|
setHidden: r
|
|
@@ -862,12 +862,12 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
862
862
|
o.refetchQueries({ queryKey: [t], type: "active" });
|
|
863
863
|
}, [o, t]);
|
|
864
864
|
}, "useResourceRefresh"), yn = /* @__PURE__ */ n(() => ({}), "useDefaultHook"), Ci = /* @__PURE__ */ n((e) => {
|
|
865
|
-
const t = jt(), o = Mt(), r = qt(), s = pi(), a = vo(), c = ye(e), l = Zl(e), d = ou(c), p = Ot(), u = Xt(),
|
|
865
|
+
const t = jt(), o = Mt(), r = qt(), s = pi(), a = vo(), c = ye(e), l = Zl(e), d = ou(c), p = Ot(), u = Xt(), m = fe(), h = Gl(), [f] = qr(c), g = xe(Va), y = Tr(), x = `lista_${c.split("_")[1]}`, { getItem: S } = nu(), P = S(`${x}.selectedIds`), C = S(`${x}.selectedDetails`), b = /* @__PURE__ */ n((I) => {
|
|
866
866
|
const v = I?.name;
|
|
867
867
|
!v || y?.[v] || g?.register?.(I);
|
|
868
868
|
}, "registerResource");
|
|
869
869
|
return {
|
|
870
|
-
ajax:
|
|
870
|
+
ajax: f,
|
|
871
871
|
data: t,
|
|
872
872
|
grilla: u,
|
|
873
873
|
lista: {
|
|
@@ -883,16 +883,16 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
883
883
|
progress: a,
|
|
884
884
|
unselectAll: d,
|
|
885
885
|
asistente: p,
|
|
886
|
-
translate:
|
|
886
|
+
translate: m,
|
|
887
887
|
abrirVentanaSistema: h,
|
|
888
888
|
registerResource: b
|
|
889
889
|
};
|
|
890
890
|
}, "useUtilsGrilla"), xy = /* @__PURE__ */ n((e) => {
|
|
891
|
-
const t = Hl(), o = ql(), r = jl(), s = Ul(), a = Kl(), c = Xl(), l = vo(), d = Mt(), p = qt(), u = pi(),
|
|
892
|
-
propsContenidos:
|
|
891
|
+
const t = Hl(), o = ql(), r = jl(), s = Ul(), a = Kl(), c = Xl(), l = vo(), d = Mt(), p = qt(), u = pi(), m = ye(e), h = Ot(), {
|
|
892
|
+
propsContenidos: f,
|
|
893
893
|
setPropsContenidos: g,
|
|
894
894
|
fichaProps: { etrs: y = {} } = {}
|
|
895
|
-
} = Be() || {}, x = xe(Wo) || {}, [S] = qr(
|
|
895
|
+
} = Be() || {}, x = xe(Wo) || {}, [S] = qr(m);
|
|
896
896
|
return {
|
|
897
897
|
ajax: S,
|
|
898
898
|
notify: d,
|
|
@@ -901,7 +901,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
901
901
|
recargarComboBox: t,
|
|
902
902
|
progress: l,
|
|
903
903
|
asistente: h,
|
|
904
|
-
ficha: { propsContenidos:
|
|
904
|
+
ficha: { propsContenidos: f, setPropsContenidos: g },
|
|
905
905
|
setHidden: o,
|
|
906
906
|
setDisable: r,
|
|
907
907
|
setRequire: s,
|
|
@@ -912,7 +912,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
912
912
|
};
|
|
913
913
|
}, "useUtilsSubmit"), $n = /* @__PURE__ */ new Map(), Ft = /* @__PURE__ */ n((e) => {
|
|
914
914
|
const t = ye(e), o = e?.id ?? "new", r = Bt(), { parentFormControl: s } = Be(), a = r ?? `${t}-${o}`, c = Ge(), l = c?.control === s ? null : c;
|
|
915
|
-
|
|
915
|
+
se(() => {
|
|
916
916
|
if (!l) return;
|
|
917
917
|
const A = $n.get(a) ?? /* @__PURE__ */ new Map(), B = A.get(l.control) ?? { count: 0 };
|
|
918
918
|
return B.form = l, B.count += 1, A.set(l.control, B), $n.set(a, A), () => {
|
|
@@ -925,7 +925,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
925
925
|
return A?.size === 1 ? A.values().next().value.form : null;
|
|
926
926
|
}, "getForm"), p = /* @__PURE__ */ n((...A) => d()?.trigger?.(...A), "trigger"), u = /* @__PURE__ */ n((A) => (B, X) => {
|
|
927
927
|
A(B, X), setTimeout(() => p(B), 0);
|
|
928
|
-
}, "withRevalidate"),
|
|
928
|
+
}, "withRevalidate"), m = Ql(), h = Hl(), f = ql(), g = jl(), y = Ul(), x = Kl(), S = Xl(), P = vo(), C = Mt(), b = qt(), I = pi(), v = Ot(), T = Gl(), _ = xe(Va), E = Tr(), {
|
|
929
929
|
propsContenidos: O,
|
|
930
930
|
setPropsContenidos: z,
|
|
931
931
|
fichaProps: { etrs: H = {} } = {}
|
|
@@ -949,8 +949,8 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
949
949
|
!B || E?.[B] || _?.register?.(A);
|
|
950
950
|
}, "registerResource"),
|
|
951
951
|
ficha: { propsContenidos: O, setPropsContenidos: z },
|
|
952
|
-
setHiddenButton:
|
|
953
|
-
setHidden: u(
|
|
952
|
+
setHiddenButton: m?.setHidden,
|
|
953
|
+
setHidden: u(f),
|
|
954
954
|
setDisable: u(g),
|
|
955
955
|
setRequire: u(y),
|
|
956
956
|
setError: u(x),
|
|
@@ -967,14 +967,14 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
967
967
|
hidden: l,
|
|
968
968
|
useContenido: d = yn,
|
|
969
969
|
...p
|
|
970
|
-
} = s, u = l !== void 0 ? l : a,
|
|
970
|
+
} = s, u = l !== void 0 ? l : a, m = d({
|
|
971
971
|
...c,
|
|
972
972
|
estado: t,
|
|
973
973
|
hidden: u,
|
|
974
974
|
isLoading: o,
|
|
975
975
|
...p
|
|
976
|
-
}), { hidden: h, ...
|
|
977
|
-
if (
|
|
976
|
+
}), { hidden: h, ...f } = m;
|
|
977
|
+
if (m === void 0)
|
|
978
978
|
throw new Error(
|
|
979
979
|
`useContenido está devolviendo undefined para el contenido ${e.source}
|
|
980
980
|
Asegúrese de incluir una instrucción return al final de la función`
|
|
@@ -983,7 +983,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
983
983
|
propsContenido: {
|
|
984
984
|
...c,
|
|
985
985
|
...p,
|
|
986
|
-
...
|
|
986
|
+
...f
|
|
987
987
|
},
|
|
988
988
|
hidden: h !== void 0 ? h : u
|
|
989
989
|
};
|
|
@@ -1017,11 +1017,11 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1017
1017
|
(a, c) => {
|
|
1018
1018
|
const l = oc(a), d = Math.max(
|
|
1019
1019
|
0,
|
|
1020
|
-
...t.current.getAllRowIds().filter((
|
|
1020
|
+
...t.current.getAllRowIds().filter((m) => typeof m == "number")
|
|
1021
1021
|
) + 1, p = { ...l, id: d };
|
|
1022
1022
|
t.current.updateRows([p]), Mm(t, p);
|
|
1023
|
-
const u = r ? Array.from(t.current.getRowModels().values(), (
|
|
1024
|
-
...
|
|
1023
|
+
const u = r ? Array.from(t.current.getRowModels().values(), (m) => ({
|
|
1024
|
+
...m,
|
|
1025
1025
|
claveFila: "",
|
|
1026
1026
|
estado: s
|
|
1027
1027
|
})) || [] : c.getValues()[o] || [];
|
|
@@ -1040,17 +1040,17 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1040
1040
|
(a, c, l) => {
|
|
1041
1041
|
const d = oc(c);
|
|
1042
1042
|
if (t.current.updateRows([{ ...d, id: a }]), si(t), r) {
|
|
1043
|
-
const
|
|
1043
|
+
const m = Array.from(t.current.getRowModels().values(), (h) => ({
|
|
1044
1044
|
...h,
|
|
1045
1045
|
claveFila: "",
|
|
1046
1046
|
estado: "N"
|
|
1047
1047
|
})) || [];
|
|
1048
|
-
l.setValue(o,
|
|
1048
|
+
l.setValue(o, m, { shouldDirty: !0 });
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
1051
|
const p = l.getValues()[o] || [];
|
|
1052
1052
|
let u = p.findIndex(
|
|
1053
|
-
(
|
|
1053
|
+
(m) => typeof a == "number" ? m?._id === a : m?.claveFila === a
|
|
1054
1054
|
);
|
|
1055
1055
|
u === -1 && (u = p.length), p[u] = {
|
|
1056
1056
|
...d,
|
|
@@ -1103,8 +1103,8 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1103
1103
|
deleteRow: a,
|
|
1104
1104
|
getRows: /* @__PURE__ */ n(() => nc(e.apiRef), "getRows"),
|
|
1105
1105
|
setRows: /* @__PURE__ */ n((p, u) => {
|
|
1106
|
-
const
|
|
1107
|
-
e.apiRef.current.setRows(
|
|
1106
|
+
const m = Array.isArray(p) ? p : [];
|
|
1107
|
+
e.apiRef.current.setRows(m), si(e.apiRef), u?.setValue(e.source, m, { shouldDirty: !0 });
|
|
1108
1108
|
}, "setRows"),
|
|
1109
1109
|
clear: /* @__PURE__ */ n((p) => {
|
|
1110
1110
|
e.apiRef.current.setRows([]), si(e.apiRef), p.setValue(e.source, "");
|
|
@@ -1539,10 +1539,10 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1539
1539
|
Math.max(a, c) + 1
|
|
1540
1540
|
), p = s && new RegExp(
|
|
1541
1541
|
`^\\d{1,3}(\\${r[0]}\\d{3})+$`
|
|
1542
|
-
).test(o), u = s && !p && l !== null && d !== "",
|
|
1542
|
+
).test(o), u = s && !p && l !== null && d !== "", m = u ? t.replace(
|
|
1543
1543
|
l === "." ? /,/g : /\./g,
|
|
1544
1544
|
""
|
|
1545
|
-
).replace(l, ".") : t.replace(/[.,]/g, ""), h = Number(
|
|
1545
|
+
).replace(l, ".") : t.replace(/[.,]/g, ""), h = Number(m);
|
|
1546
1546
|
return Number.isFinite(h) ? { isDecimal: u, number: h, text: t } : null;
|
|
1547
1547
|
}, "normalizeNumberText"), cc = /* @__PURE__ */ n((e, t) => {
|
|
1548
1548
|
if (typeof t == "number" && Number.isFinite(t))
|
|
@@ -1598,13 +1598,13 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1598
1598
|
children: c,
|
|
1599
1599
|
disableCombo: l = !1
|
|
1600
1600
|
}) => {
|
|
1601
|
-
const d = No(), p = Qm({ children: c, formattedValue: o, value: t }), u = no(o) ?? no(t) ?? no(c),
|
|
1601
|
+
const d = No(), p = Qm({ children: c, formattedValue: o, value: t }), u = no(o) ?? no(t) ?? no(c), m = !l && Kr(e, { row: r, columns: s, primaryField: a }), h = tf({
|
|
1602
1602
|
children: c,
|
|
1603
1603
|
displayValue: p,
|
|
1604
1604
|
formattedValue: o,
|
|
1605
1605
|
value: t
|
|
1606
|
-
}),
|
|
1607
|
-
if (
|
|
1606
|
+
}), f = e?.type === "boolean" || h !== null, g = Jm(e, t), y = cc(e, t);
|
|
1607
|
+
if (f) {
|
|
1608
1608
|
const P = h !== null ? h : Um(t), C = P ? d.palette.success.main : d.palette.error.main;
|
|
1609
1609
|
return /* @__PURE__ */ k(
|
|
1610
1610
|
Q,
|
|
@@ -1645,7 +1645,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1645
1645
|
}
|
|
1646
1646
|
);
|
|
1647
1647
|
}
|
|
1648
|
-
if (
|
|
1648
|
+
if (m) {
|
|
1649
1649
|
if (!Zm({ children: c, formattedValue: o, value: t }))
|
|
1650
1650
|
return null;
|
|
1651
1651
|
if (M.isValidElement(p) && (ai(t) || ai(o)))
|
|
@@ -1823,10 +1823,10 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1823
1823
|
const O = b?.[E.field];
|
|
1824
1824
|
return !(E.type === "number" || E.type === "numeric" || d(O)) && O != null && O !== "";
|
|
1825
1825
|
});
|
|
1826
|
-
}, [l, e.row]),
|
|
1826
|
+
}, [l, e.row]), m = u?.field, h = u?.headerName ?? u?.field ?? "Detalle", f = M.useMemo(() => {
|
|
1827
1827
|
const b = e.row ?? {};
|
|
1828
|
-
return
|
|
1829
|
-
}, [e.row,
|
|
1828
|
+
return m ? b?.[m] : void 0;
|
|
1829
|
+
}, [e.row, m]), g = typeof e.primaryText == "function" ? e.primaryText(e.row) : e.primaryText, y = typeof e.primaryTextPrefix == "function" ? e.primaryTextPrefix(e.row) : e.primaryTextPrefix, x = typeof e.secondaryText == "function" ? e.secondaryText(e.row) : e.secondaryText, S = M.useCallback(
|
|
1830
1830
|
(b, I) => {
|
|
1831
1831
|
const v = b?.field?.toLowerCase() ?? "", T = b?.type, _ = T === "date" || T === "dateTime" || v.includes("fecha") || I instanceof Date, E = T === "time" || v.includes("hora") || v.includes("time") || (b?.headerName || "").toString().toLowerCase().includes("hora"), O = T === "number" || T === "numeric" || typeof I == "number", z = T === "boolean";
|
|
1832
1832
|
return v.endsWith("_lis") || (!b?.align || v.endsWith("nom")) && !T ? {
|
|
@@ -1849,9 +1849,9 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1849
1849
|
[o]
|
|
1850
1850
|
), P = M.useMemo(
|
|
1851
1851
|
() => l.filter(
|
|
1852
|
-
(b) => y || b.field !==
|
|
1852
|
+
(b) => y || b.field !== m
|
|
1853
1853
|
),
|
|
1854
|
-
[l, y,
|
|
1854
|
+
[l, y, m]
|
|
1855
1855
|
), C = /* @__PURE__ */ n((b, I, v) => {
|
|
1856
1856
|
if (typeof b?.valueFormatter == "function") {
|
|
1857
1857
|
try {
|
|
@@ -1901,7 +1901,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1901
1901
|
/* @__PURE__ */ i(
|
|
1902
1902
|
$d,
|
|
1903
1903
|
{
|
|
1904
|
-
title: g ?? ([y,
|
|
1904
|
+
title: g ?? ([y, f].filter((b) => b != null && b !== "").join(" — ") || "Detalle del registro"),
|
|
1905
1905
|
subheader: x ?? h,
|
|
1906
1906
|
action: e.showAction ? /* @__PURE__ */ i(
|
|
1907
1907
|
Q,
|
|
@@ -1991,7 +1991,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
1991
1991
|
{
|
|
1992
1992
|
row: T,
|
|
1993
1993
|
columns: l,
|
|
1994
|
-
primaryField:
|
|
1994
|
+
primaryField: m
|
|
1995
1995
|
}
|
|
1996
1996
|
);
|
|
1997
1997
|
if (typeof b?.renderCell == "function") {
|
|
@@ -2020,7 +2020,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
2020
2020
|
),
|
|
2021
2021
|
row: T,
|
|
2022
2022
|
columns: l,
|
|
2023
|
-
primaryField:
|
|
2023
|
+
primaryField: m,
|
|
2024
2024
|
children: X
|
|
2025
2025
|
}
|
|
2026
2026
|
) : X;
|
|
@@ -2073,7 +2073,7 @@ const hr = /* @__PURE__ */ n((e = "scope") => (Es += 1, `${e}-${Es}`), "createRe
|
|
|
2073
2073
|
formattedValue: z,
|
|
2074
2074
|
row: T,
|
|
2075
2075
|
columns: l,
|
|
2076
|
-
primaryField:
|
|
2076
|
+
primaryField: m
|
|
2077
2077
|
}
|
|
2078
2078
|
);
|
|
2079
2079
|
const A = H || M.isValidElement(z);
|
|
@@ -2271,14 +2271,14 @@ function af(e) {
|
|
|
2271
2271
|
children: [
|
|
2272
2272
|
/* @__PURE__ */ i(uc, { children: /* @__PURE__ */ i(Et, { fontWeight: 500, children: t("pos.columns") }) }),
|
|
2273
2273
|
/* @__PURE__ */ i(Oo, { children: l.map((u) => {
|
|
2274
|
-
const
|
|
2274
|
+
const m = d[u.field] !== !1;
|
|
2275
2275
|
return /* @__PURE__ */ i(Br, { disablePadding: !0, children: /* @__PURE__ */ k(
|
|
2276
2276
|
to,
|
|
2277
2277
|
{
|
|
2278
2278
|
onClick: /* @__PURE__ */ n(() => p(u.field), "onClick"),
|
|
2279
2279
|
disabled: u.hideable === !1,
|
|
2280
2280
|
children: [
|
|
2281
|
-
/* @__PURE__ */ i(oo, { children:
|
|
2281
|
+
/* @__PURE__ */ i(oo, { children: m ? /* @__PURE__ */ i(vp, { color: "primary" }) : /* @__PURE__ */ i(Mp, {}) }),
|
|
2282
2282
|
/* @__PURE__ */ i(Wt, { children: u.headerName || u.field })
|
|
2283
2283
|
]
|
|
2284
2284
|
}
|
|
@@ -2291,7 +2291,7 @@ function af(e) {
|
|
|
2291
2291
|
}
|
|
2292
2292
|
n(af, "ToolbarColumnsItem");
|
|
2293
2293
|
function lf(e) {
|
|
2294
|
-
const t = fe(), { listView: o, container: r, containerRef: s } = e, [a, c] = M.useState(!1), [l, d] = M.useState(null), p = ao(), u = yo(p, ul),
|
|
2294
|
+
const t = fe(), { listView: o, container: r, containerRef: s } = e, [a, c] = M.useState(!1), [l, d] = M.useState(null), p = ao(), u = yo(p, ul), m = yo(p, qu), h = u.filter((x) => x.sortable), f = m.length, g = /* @__PURE__ */ n((x, S) => {
|
|
2295
2295
|
p.current.sortColumn(x, S, !0);
|
|
2296
2296
|
}, "handleSortChange");
|
|
2297
2297
|
M.useEffect(() => {
|
|
@@ -2303,7 +2303,7 @@ function lf(e) {
|
|
|
2303
2303
|
{
|
|
2304
2304
|
"aria-label": t("pos.sort"),
|
|
2305
2305
|
onClick: /* @__PURE__ */ n(() => c(!0), "onClick"),
|
|
2306
|
-
children: /* @__PURE__ */ i(Ms, { badgeContent:
|
|
2306
|
+
children: /* @__PURE__ */ i(Ms, { badgeContent: f, color: "primary", variant: "dot", children: /* @__PURE__ */ i(Rp, { fontSize: "small" }) })
|
|
2307
2307
|
}
|
|
2308
2308
|
),
|
|
2309
2309
|
/* @__PURE__ */ k(
|
|
@@ -2316,9 +2316,9 @@ function lf(e) {
|
|
|
2316
2316
|
children: [
|
|
2317
2317
|
/* @__PURE__ */ i(uc, { children: /* @__PURE__ */ i(Et, { fontWeight: 500, children: t("pos.sort_by") }) }),
|
|
2318
2318
|
/* @__PURE__ */ i(Oo, { children: h.map((x) => {
|
|
2319
|
-
const S =
|
|
2319
|
+
const S = m.findIndex(
|
|
2320
2320
|
(b) => b.field === x.field
|
|
2321
|
-
), P =
|
|
2321
|
+
), P = m[S];
|
|
2322
2322
|
let C = "asc";
|
|
2323
2323
|
return P && (C = P.sort === "asc" ? "desc" : null), /* @__PURE__ */ i(Br, { disablePadding: !0, children: /* @__PURE__ */ k(
|
|
2324
2324
|
to,
|
|
@@ -2328,7 +2328,7 @@ function lf(e) {
|
|
|
2328
2328
|
/* @__PURE__ */ i(oo, { children: P && /* @__PURE__ */ i(
|
|
2329
2329
|
Ms,
|
|
2330
2330
|
{
|
|
2331
|
-
badgeContent:
|
|
2331
|
+
badgeContent: f > 1 ? S + 1 : null,
|
|
2332
2332
|
children: P.sort === "asc" ? /* @__PURE__ */ i(ju, {}) : /* @__PURE__ */ i(Uu, {})
|
|
2333
2333
|
}
|
|
2334
2334
|
) }),
|
|
@@ -2399,26 +2399,26 @@ const Yr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2399
2399
|
const { jsPDF: o } = await import("jspdf"), r = new o({ orientation: "landscape", unit: "mm" }), s = 8, a = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), l = a - s * 2, d = ff(e, t), p = t.getRowsToExport?.({ apiRef: e }) ?? mc({ apiRef: e });
|
|
2400
2400
|
if (!d.length)
|
|
2401
2401
|
return;
|
|
2402
|
-
const u = l / d.length,
|
|
2403
|
-
let
|
|
2402
|
+
const u = l / d.length, m = d.map(() => u), h = t.fileName?.replace(/_/g, " ") || "Grilla";
|
|
2403
|
+
let f = Bs(r, h, s, s + 8);
|
|
2404
2404
|
const g = 7, y = d.length > 10 ? 5 : 7;
|
|
2405
|
-
r.setFontSize(y), $s(r, d,
|
|
2405
|
+
r.setFontSize(y), $s(r, d, m, s, f, g), f += g, p.forEach((S) => {
|
|
2406
2406
|
const P = d.map(
|
|
2407
2407
|
(I, v) => r.splitTextToSize(
|
|
2408
2408
|
hf(e, S, I),
|
|
2409
|
-
|
|
2409
|
+
m[v] - 2.4
|
|
2410
2410
|
)
|
|
2411
2411
|
), C = Math.max(
|
|
2412
2412
|
6,
|
|
2413
2413
|
...P.map((I) => I.length * 3.2 + 2.4)
|
|
2414
2414
|
);
|
|
2415
|
-
|
|
2415
|
+
f + C > c - s && (r.addPage(), f = Bs(r, h, s, s + 8), r.setFontSize(y), $s(r, d, m, s, f, g), f += g);
|
|
2416
2416
|
let b = s;
|
|
2417
2417
|
d.forEach((I, v) => {
|
|
2418
|
-
r.setDrawColor(225, 229, 235), r.rect(b,
|
|
2419
|
-
maxWidth:
|
|
2420
|
-
}), b +=
|
|
2421
|
-
}),
|
|
2418
|
+
r.setDrawColor(225, 229, 235), r.rect(b, f, m[v], C), r.text(P[v], b + 1.2, f + 4, {
|
|
2419
|
+
maxWidth: m[v] - 2.4
|
|
2420
|
+
}), b += m[v];
|
|
2421
|
+
}), f += C;
|
|
2422
2422
|
});
|
|
2423
2423
|
const x = r.internal.getNumberOfPages();
|
|
2424
2424
|
for (let S = 1; S <= x; S += 1)
|
|
@@ -2458,11 +2458,11 @@ const Yr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2458
2458
|
}, "ExportMenuItem"), hc = /* @__PURE__ */ n(({ containerRef: e, fetchRowsForExport: t, ...o }) => {
|
|
2459
2459
|
const [r, s] = oe(null), [a, c] = oe(!1), l = ao(), d = wo(), p = fe(), {
|
|
2460
2460
|
csvOptions: u = {},
|
|
2461
|
-
excelOptions:
|
|
2461
|
+
excelOptions: m = {},
|
|
2462
2462
|
printOptions: h = {},
|
|
2463
|
-
...
|
|
2464
|
-
} = o, { slotProps: g = {}, ...y } =
|
|
2465
|
-
|
|
2463
|
+
...f
|
|
2464
|
+
} = o, { slotProps: g = {}, ...y } = f, x = ye(), S = so({ resource: x }), P = M.useContext(Xe) || {};
|
|
2465
|
+
se(() => {
|
|
2466
2466
|
e?.current && s(e.current);
|
|
2467
2467
|
}, [e]);
|
|
2468
2468
|
const C = M.useCallback(
|
|
@@ -2522,12 +2522,12 @@ const Yr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2522
2522
|
);
|
|
2523
2523
|
if (!r) return null;
|
|
2524
2524
|
const _ = I(u), E = v(
|
|
2525
|
-
I(
|
|
2525
|
+
I(m)
|
|
2526
2526
|
), O = I({
|
|
2527
2527
|
hideFooter: !0,
|
|
2528
2528
|
hideToolbar: !0,
|
|
2529
2529
|
...h
|
|
2530
|
-
}), z = u.disableToolbarButton !== !0 && typeof l.current?.exportDataAsCsv == "function", H =
|
|
2530
|
+
}), z = u.disableToolbarButton !== !0 && typeof l.current?.exportDataAsCsv == "function", H = m.disableToolbarButton !== !0 && typeof l.current?.exportDataAsExcel == "function", W = h.disableToolbarButton !== !0, Z = !!a || !!g?.button?.disabled;
|
|
2531
2531
|
return !z && !H && !W ? null : $r(
|
|
2532
2532
|
/* @__PURE__ */ k(
|
|
2533
2533
|
Xu,
|
|
@@ -2576,7 +2576,7 @@ const Yr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2576
2576
|
);
|
|
2577
2577
|
}, "ExportButton"), gc = /* @__PURE__ */ n(({ containerRef: e, ...t }) => {
|
|
2578
2578
|
const [o, r] = oe(null);
|
|
2579
|
-
if (
|
|
2579
|
+
if (se(() => {
|
|
2580
2580
|
e?.current && r(e.current);
|
|
2581
2581
|
}, [e]), !o) return null;
|
|
2582
2582
|
const { slotProps: s = {}, ...a } = t;
|
|
@@ -2609,13 +2609,13 @@ function xf(e) {
|
|
|
2609
2609
|
props: {
|
|
2610
2610
|
actionsContainerRef: p,
|
|
2611
2611
|
filterActionsContainerRef: u,
|
|
2612
|
-
hideGridToolbarActions:
|
|
2612
|
+
hideGridToolbarActions: m = !0,
|
|
2613
2613
|
pivotUi: h = "mui"
|
|
2614
2614
|
}
|
|
2615
|
-
} = Xt(),
|
|
2615
|
+
} = Xt(), f = yo(
|
|
2616
2616
|
l,
|
|
2617
2617
|
Ju
|
|
2618
|
-
), g = a &&
|
|
2618
|
+
), g = a && f > 0, y = t && m && !c && !g, x = /* @__PURE__ */ n(() => {
|
|
2619
2619
|
l.current.setRowSelectionModel([]);
|
|
2620
2620
|
}, "handleClearSelection"), S = {
|
|
2621
2621
|
listView: t,
|
|
@@ -2646,11 +2646,11 @@ function xf(e) {
|
|
|
2646
2646
|
}
|
|
2647
2647
|
),
|
|
2648
2648
|
/* @__PURE__ */ k(Et, { variant: "body2", children: [
|
|
2649
|
-
|
|
2649
|
+
f,
|
|
2650
2650
|
" seleccionado"
|
|
2651
2651
|
] })
|
|
2652
2652
|
] }) : /* @__PURE__ */ k(M.Fragment, { children: [
|
|
2653
|
-
!
|
|
2653
|
+
!m && s && /* @__PURE__ */ i(
|
|
2654
2654
|
Pe,
|
|
2655
2655
|
{
|
|
2656
2656
|
sx: {
|
|
@@ -2685,8 +2685,8 @@ function xf(e) {
|
|
|
2685
2685
|
)
|
|
2686
2686
|
}
|
|
2687
2687
|
),
|
|
2688
|
-
!
|
|
2689
|
-
(!
|
|
2688
|
+
!m && /* @__PURE__ */ i(af, { ...S }),
|
|
2689
|
+
(!m || t) && /* @__PURE__ */ i(
|
|
2690
2690
|
lf,
|
|
2691
2691
|
{
|
|
2692
2692
|
...S,
|
|
@@ -3071,7 +3071,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
3073
3073
|
} : {}, "fichaPopupStyles"), bc = tt({ resolve: null }), wy = /* @__PURE__ */ n(({ resolve: e, children: t }) => {
|
|
3074
|
-
const o =
|
|
3074
|
+
const o = re(() => ({ resolve: e }), [e]);
|
|
3075
3075
|
return /* @__PURE__ */ i(bc.Provider, { value: o, children: t });
|
|
3076
3076
|
}, "FormResolverProvider"), wf = /* @__PURE__ */ n(() => xe(bc), "useFormResolver"), on = /* @__PURE__ */ n((e) => typeof e == "string" ? e.replace(/^(?:mantenimiento|asignaci[oó]n)\s+de\s+/i, "") : e, "cleanFormLabel"), Yo = {
|
|
3077
3077
|
maxWidth: "md",
|
|
@@ -3230,10 +3230,10 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3230
3230
|
}, "removeStoredSize"), Ff = /* @__PURE__ */ n((e, t) => {
|
|
3231
3231
|
!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`);
|
|
3232
3232
|
}, "applyPopupSizeStyles"), ci = /* @__PURE__ */ n((e) => {
|
|
3233
|
-
const t = No(), o = t.metiri?.fichaVisual === !0, r = fe(), s = ye(), a = e?.resource ?? s ?? "default", l = Xt()?.props, d = e?.dockviewTabParent === !0, p = M.useContext(Xe) || {}, u = p?.popup ?? p?.popupSize ?? null,
|
|
3233
|
+
const t = No(), o = t.metiri?.fichaVisual === !0, r = fe(), s = ye(), a = e?.resource ?? s ?? "default", l = Xt()?.props, d = e?.dockviewTabParent === !0, p = M.useContext(Xe) || {}, u = p?.popup ?? p?.popupSize ?? null, m = M.useMemo(
|
|
3234
3234
|
() => If(u, e?.popupRatio),
|
|
3235
3235
|
[u, e?.popupRatio]
|
|
3236
|
-
), h = wt((F) => F.breakpoints.down("sm")), [
|
|
3236
|
+
), h = wt((F) => F.breakpoints.down("sm")), [f, g] = M.useState(null), y = M.useMemo(
|
|
3237
3237
|
() => d ? zs(l) : null,
|
|
3238
3238
|
[d, l]
|
|
3239
3239
|
), x = M.useMemo(
|
|
@@ -3243,7 +3243,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3243
3243
|
() => Tf(x)
|
|
3244
3244
|
), C = M.useRef(null), [b, I] = M.useState(null);
|
|
3245
3245
|
M.useEffect(() => {
|
|
3246
|
-
if (!o || !
|
|
3246
|
+
if (!o || !f)
|
|
3247
3247
|
return;
|
|
3248
3248
|
const F = y ?? vi(l), A = /* @__PURE__ */ n(() => {
|
|
3249
3249
|
const X = F?.getBoundingClientRect?.() ?? {
|
|
@@ -3253,26 +3253,26 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3253
3253
|
I(
|
|
3254
3254
|
(N) => N?.width === X.width && N?.height === X.height ? N : { width: X.width, height: X.height }
|
|
3255
3255
|
);
|
|
3256
|
-
const R = qi({ rect: X, ratio:
|
|
3257
|
-
|
|
3256
|
+
const R = qi({ rect: X, ratio: m });
|
|
3257
|
+
f.style.maxWidth && (f.style.maxWidth = `${R.maxWidth}px`, f.style.maxHeight = `${R.maxHeight}px`);
|
|
3258
3258
|
}, "measure");
|
|
3259
3259
|
A();
|
|
3260
3260
|
const B = typeof ResizeObserver > "u" ? null : new ResizeObserver(A);
|
|
3261
3261
|
return F && B?.observe(F), window.addEventListener("resize", A), () => {
|
|
3262
3262
|
B?.disconnect(), window.removeEventListener("resize", A);
|
|
3263
3263
|
};
|
|
3264
|
-
}, [o,
|
|
3264
|
+
}, [o, f, y, l, m]);
|
|
3265
3265
|
const v = M.useMemo(() => {
|
|
3266
3266
|
const F = (o ? b : null) ?? y?.getBoundingClientRect?.() ?? Ws(l);
|
|
3267
|
-
return qi({ rect: F, ratio:
|
|
3268
|
-
}, [o, b, l, y,
|
|
3267
|
+
return qi({ rect: F, ratio: m });
|
|
3268
|
+
}, [o, b, l, y, m]);
|
|
3269
3269
|
M.useEffect(() => {
|
|
3270
3270
|
S || h || P({
|
|
3271
3271
|
width: v.width,
|
|
3272
3272
|
height: v.height
|
|
3273
3273
|
});
|
|
3274
3274
|
}, [v.height, v.width, h, S]), M.useEffect(() => {
|
|
3275
|
-
if (!
|
|
3275
|
+
if (!f || h || typeof ResizeObserver > "u")
|
|
3276
3276
|
return;
|
|
3277
3277
|
const F = new ResizeObserver((A) => {
|
|
3278
3278
|
const B = A?.[0];
|
|
@@ -3286,22 +3286,22 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3286
3286
|
Gs(x, X);
|
|
3287
3287
|
}, 200);
|
|
3288
3288
|
});
|
|
3289
|
-
return F.observe(
|
|
3289
|
+
return F.observe(f), () => {
|
|
3290
3290
|
C.current && clearTimeout(C.current), F.disconnect();
|
|
3291
3291
|
};
|
|
3292
|
-
}, [
|
|
3292
|
+
}, [f, x, h]);
|
|
3293
3293
|
const T = M.useCallback(
|
|
3294
3294
|
(F) => {
|
|
3295
|
-
const A = y?.getBoundingClientRect?.() ?? Ws(l), B = qi({ rect: A, ratio:
|
|
3295
|
+
const A = y?.getBoundingClientRect?.() ?? Ws(l), B = qi({ rect: A, ratio: m }), X = {
|
|
3296
3296
|
width: B.width,
|
|
3297
3297
|
height: B.height
|
|
3298
3298
|
};
|
|
3299
3299
|
if (kf(x), Gs(x, X), P(X), h)
|
|
3300
3300
|
return;
|
|
3301
|
-
const R =
|
|
3301
|
+
const R = f ?? F?.currentTarget?.closest?.(".MuiDialog-paper") ?? null;
|
|
3302
3302
|
Ff(R, B);
|
|
3303
3303
|
},
|
|
3304
|
-
[l, h,
|
|
3304
|
+
[l, h, f, y, m, x]
|
|
3305
3305
|
), _ = S || {
|
|
3306
3306
|
width: v.width,
|
|
3307
3307
|
height: v.height
|
|
@@ -3459,16 +3459,16 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3459
3459
|
const a = _f(t, s);
|
|
3460
3460
|
return s?.container === void 0 && delete a.container, a;
|
|
3461
3461
|
}, "resolvePopupDialogProps"), Qr = /* @__PURE__ */ n((e) => {
|
|
3462
|
-
const t = ye(), o = e?.resource ?? t, r = so({ resource: o }).options?.label, s = ui(), a = fe(), c = Mt(), l = Ot(), d = wf(), u = Xt()?.props,
|
|
3462
|
+
const t = ye(), o = e?.resource ?? t, r = so({ resource: o }).options?.label, s = ui(), a = fe(), c = Mt(), l = Ot(), d = wf(), u = Xt()?.props, m = d?.resolve ? d.resolve(o) : null, h = ci({
|
|
3463
3463
|
resource: o,
|
|
3464
3464
|
popupRatio: e?.popupRatio
|
|
3465
|
-
}),
|
|
3465
|
+
}), f = ci({
|
|
3466
3466
|
resource: o,
|
|
3467
3467
|
popupRatio: e?.popupRatio,
|
|
3468
3468
|
dockviewTabParent: !0
|
|
3469
3469
|
}), g = M.useCallback(
|
|
3470
3470
|
(S) => {
|
|
3471
|
-
const P =
|
|
3471
|
+
const P = m?.create;
|
|
3472
3472
|
if (!P || !o || !l?.show)
|
|
3473
3473
|
return;
|
|
3474
3474
|
const C = S?.title ?? `${a("ra.action.create")} ${on(r || s(o, 1) || o)}`, b = ji(`${o}:create`), I = S?.panel && typeof S.panel == "object" ? S.panel : {}, v = Hs(
|
|
@@ -3492,7 +3492,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3492
3492
|
}, _ = Ui({
|
|
3493
3493
|
asistente: l,
|
|
3494
3494
|
popupDialogProps: h,
|
|
3495
|
-
popupFormDialogProps:
|
|
3495
|
+
popupFormDialogProps: f,
|
|
3496
3496
|
grillaProps: u
|
|
3497
3497
|
});
|
|
3498
3498
|
l.show({
|
|
@@ -3509,16 +3509,16 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3509
3509
|
s,
|
|
3510
3510
|
c,
|
|
3511
3511
|
h,
|
|
3512
|
-
|
|
3512
|
+
f,
|
|
3513
3513
|
u,
|
|
3514
3514
|
o,
|
|
3515
3515
|
r,
|
|
3516
|
-
|
|
3516
|
+
m?.create,
|
|
3517
3517
|
a
|
|
3518
3518
|
]
|
|
3519
3519
|
), y = M.useCallback(
|
|
3520
3520
|
(S) => {
|
|
3521
|
-
const P =
|
|
3521
|
+
const P = m?.edit, C = S?.id ?? S?.record?.id;
|
|
3522
3522
|
if (!P || !o || !l?.show || !C)
|
|
3523
3523
|
return;
|
|
3524
3524
|
const b = S?.title ?? `${a("ra.action.edit")} ${on(r || s(o, 1) || o)}`, I = ji(`${o}:${C}`), v = S?.panel && typeof S.panel == "object" ? S.panel : {}, T = Hs(
|
|
@@ -3542,7 +3542,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3542
3542
|
}, E = Ui({
|
|
3543
3543
|
asistente: l,
|
|
3544
3544
|
popupDialogProps: h,
|
|
3545
|
-
popupFormDialogProps:
|
|
3545
|
+
popupFormDialogProps: f,
|
|
3546
3546
|
grillaProps: u
|
|
3547
3547
|
});
|
|
3548
3548
|
l.show({
|
|
@@ -3559,22 +3559,22 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3559
3559
|
s,
|
|
3560
3560
|
c,
|
|
3561
3561
|
h,
|
|
3562
|
-
|
|
3562
|
+
f,
|
|
3563
3563
|
u,
|
|
3564
3564
|
o,
|
|
3565
3565
|
r,
|
|
3566
|
-
|
|
3566
|
+
m?.edit,
|
|
3567
3567
|
a
|
|
3568
3568
|
]
|
|
3569
3569
|
), x = M.useCallback(
|
|
3570
3570
|
(S) => {
|
|
3571
|
-
const P =
|
|
3571
|
+
const P = m?.show, C = S?.id;
|
|
3572
3572
|
if (!P || !o || !l?.show || !C)
|
|
3573
3573
|
return;
|
|
3574
3574
|
const b = S?.title ?? `${on(r || s(o, 1) || o)}`, I = ji(`${o}:show:${C}`), v = Ui({
|
|
3575
3575
|
asistente: l,
|
|
3576
3576
|
popupDialogProps: h,
|
|
3577
|
-
popupFormDialogProps:
|
|
3577
|
+
popupFormDialogProps: f,
|
|
3578
3578
|
grillaProps: u
|
|
3579
3579
|
});
|
|
3580
3580
|
l.show({
|
|
@@ -3590,11 +3590,11 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3590
3590
|
l,
|
|
3591
3591
|
s,
|
|
3592
3592
|
h,
|
|
3593
|
-
|
|
3593
|
+
f,
|
|
3594
3594
|
u,
|
|
3595
3595
|
o,
|
|
3596
3596
|
r,
|
|
3597
|
-
|
|
3597
|
+
m?.show
|
|
3598
3598
|
]
|
|
3599
3599
|
);
|
|
3600
3600
|
return { showCreate: g, showEdit: y, showShow: x };
|
|
@@ -3627,8 +3627,8 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3627
3627
|
isRowDeletable: d,
|
|
3628
3628
|
borra: p,
|
|
3629
3629
|
nuevoDesde: u,
|
|
3630
|
-
onClose:
|
|
3631
|
-
} = e, h = ye(e),
|
|
3630
|
+
onClose: m
|
|
3631
|
+
} = e, h = ye(e), f = fe(), g = Ci(e), y = No(), { showCreate: x, showEdit: S, showShow: P } = Qr({ resource: h }), C = !Cr(t.row, l), b = !wc(t.row, d), I = c && C, v = t?.id ?? t?.row?.id;
|
|
3632
3632
|
return /* @__PURE__ */ k(
|
|
3633
3633
|
Q,
|
|
3634
3634
|
{
|
|
@@ -3653,7 +3653,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3653
3653
|
{
|
|
3654
3654
|
disabled: C,
|
|
3655
3655
|
onClick: /* @__PURE__ */ n(() => {
|
|
3656
|
-
|
|
3656
|
+
m && m(), I || !r && c ? P({ id: v, record: t.row }) : r && S({ id: v, record: t.row });
|
|
3657
3657
|
}, "onClick"),
|
|
3658
3658
|
children: [
|
|
3659
3659
|
/* @__PURE__ */ i(oo, { children: r ? I ? /* @__PURE__ */ i(ii, { color: "inherit" }) : Df(
|
|
@@ -3669,7 +3669,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3669
3669
|
/* @__PURE__ */ i(
|
|
3670
3670
|
Wt,
|
|
3671
3671
|
{
|
|
3672
|
-
primary: r ?
|
|
3672
|
+
primary: r ? f(I ? "pos.view" : "ra.action.edit") : c ? f("pos.view") : ""
|
|
3673
3673
|
}
|
|
3674
3674
|
)
|
|
3675
3675
|
]
|
|
@@ -3680,7 +3680,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3680
3680
|
to,
|
|
3681
3681
|
{
|
|
3682
3682
|
onClick: /* @__PURE__ */ n(() => {
|
|
3683
|
-
|
|
3683
|
+
m && m(), x({
|
|
3684
3684
|
id: v,
|
|
3685
3685
|
estado: "ND",
|
|
3686
3686
|
record: t.row
|
|
@@ -3691,7 +3691,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3691
3691
|
/* @__PURE__ */ i(
|
|
3692
3692
|
Wt,
|
|
3693
3693
|
{
|
|
3694
|
-
primary:
|
|
3694
|
+
primary: f("pos.create_from")
|
|
3695
3695
|
}
|
|
3696
3696
|
)
|
|
3697
3697
|
]
|
|
@@ -3702,7 +3702,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3702
3702
|
to,
|
|
3703
3703
|
{
|
|
3704
3704
|
onClick: /* @__PURE__ */ n(() => {
|
|
3705
|
-
|
|
3705
|
+
m && m(), S({
|
|
3706
3706
|
id: v,
|
|
3707
3707
|
estado: "B",
|
|
3708
3708
|
record: t.row
|
|
@@ -3716,7 +3716,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3716
3716
|
/* @__PURE__ */ i(
|
|
3717
3717
|
Wt,
|
|
3718
3718
|
{
|
|
3719
|
-
primary:
|
|
3719
|
+
primary: f("ra.action.delete")
|
|
3720
3720
|
}
|
|
3721
3721
|
)
|
|
3722
3722
|
]
|
|
@@ -3729,7 +3729,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3729
3729
|
/* @__PURE__ */ i(Q, { sx: { width: "100%" }, children: /* @__PURE__ */ i(Oo, { sx: { p: 2 }, children: o.map((T) => /* @__PURE__ */ k(
|
|
3730
3730
|
to,
|
|
3731
3731
|
{
|
|
3732
|
-
onClick: /* @__PURE__ */ n(() => typeof T.handler == "function" ? (
|
|
3732
|
+
onClick: /* @__PURE__ */ n(() => typeof T.handler == "function" ? (m && m(), T.handler(
|
|
3733
3733
|
{
|
|
3734
3734
|
...g,
|
|
3735
3735
|
record: t.row
|
|
@@ -3797,7 +3797,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3797
3797
|
type: p,
|
|
3798
3798
|
...u
|
|
3799
3799
|
}) => {
|
|
3800
|
-
const
|
|
3800
|
+
const m = pl(), h = s?.root?.slotProps, f = M.useId(), [g, y] = M.useState(
|
|
3801
3801
|
() => js(e.value)
|
|
3802
3802
|
);
|
|
3803
3803
|
M.useEffect(() => {
|
|
@@ -3814,10 +3814,10 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3814
3814
|
}, "handleChange");
|
|
3815
3815
|
return /* @__PURE__ */ k(M.Fragment, { children: [
|
|
3816
3816
|
/* @__PURE__ */ i(
|
|
3817
|
-
|
|
3817
|
+
m.slots.baseTextField,
|
|
3818
3818
|
{
|
|
3819
3819
|
fullWidth: !0,
|
|
3820
|
-
id:
|
|
3820
|
+
id: f,
|
|
3821
3821
|
label: o.current.getLocaleText("filterPanelInputLabel"),
|
|
3822
3822
|
placeholder: "dd/mm/aaaa",
|
|
3823
3823
|
value: g,
|
|
@@ -3834,7 +3834,7 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3834
3834
|
...h?.htmlInput
|
|
3835
3835
|
}
|
|
3836
3836
|
},
|
|
3837
|
-
...
|
|
3837
|
+
...m.slotProps?.baseTextField,
|
|
3838
3838
|
...u,
|
|
3839
3839
|
...s?.root
|
|
3840
3840
|
}
|
|
@@ -3844,9 +3844,9 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3844
3844
|
] });
|
|
3845
3845
|
}, "DateFilterInput"), Vf = /* @__PURE__ */ n((e) => {
|
|
3846
3846
|
const { onRenderGrilla: t, onLoadGrilla: o, apiRef: r = {} } = e, { isLoading: s } = jt(), a = Ci(e);
|
|
3847
|
-
|
|
3847
|
+
se(() => {
|
|
3848
3848
|
t && t({ ...a, api: r?.current });
|
|
3849
|
-
}, []),
|
|
3849
|
+
}, []), se(() => {
|
|
3850
3850
|
s || o && o({ ...a, api: r?.current });
|
|
3851
3851
|
}, [s]);
|
|
3852
3852
|
}, "useInitGrilla"), Wf = /* @__PURE__ */ n(() => {
|
|
@@ -3881,18 +3881,18 @@ const Si = /* @__PURE__ */ n((e) => {
|
|
|
3881
3881
|
(u) => {
|
|
3882
3882
|
if (!o)
|
|
3883
3883
|
return;
|
|
3884
|
-
const
|
|
3885
|
-
!
|
|
3886
|
-
(
|
|
3884
|
+
const m = String(u?.colDef?.field ?? ""), h = u?.width;
|
|
3885
|
+
!m || !Number.isFinite(h) || c(
|
|
3886
|
+
(f) => f[m] === h ? f : { ...f, [m]: h }
|
|
3887
3887
|
);
|
|
3888
3888
|
},
|
|
3889
3889
|
[o]
|
|
3890
3890
|
), p = M.useCallback(() => {
|
|
3891
3891
|
if (!o)
|
|
3892
3892
|
return;
|
|
3893
|
-
const u = e.current?.getAllColumns?.()?.map((
|
|
3893
|
+
const u = e.current?.getAllColumns?.()?.map((m) => String(m?.field ?? "")).filter(Boolean) ?? [];
|
|
3894
3894
|
s(
|
|
3895
|
-
(
|
|
3895
|
+
(m) => Gf(m, u) ? m : u
|
|
3896
3896
|
);
|
|
3897
3897
|
}, [e, o]);
|
|
3898
3898
|
return {
|
|
@@ -4189,9 +4189,9 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
4189
4189
|
primaryText: d,
|
|
4190
4190
|
secondaryText: p,
|
|
4191
4191
|
onRenderGrilla: u,
|
|
4192
|
-
onLoadGrilla:
|
|
4192
|
+
onLoadGrilla: m,
|
|
4193
4193
|
mobileColumns: h,
|
|
4194
|
-
hasEdit:
|
|
4194
|
+
hasEdit: f,
|
|
4195
4195
|
editIcon: g,
|
|
4196
4196
|
deleteIcon: y,
|
|
4197
4197
|
initialState: x = Kf,
|
|
@@ -4211,7 +4211,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
4211
4211
|
slots: Z,
|
|
4212
4212
|
slotProps: F,
|
|
4213
4213
|
...A
|
|
4214
|
-
} = e, [B, X] = M.useState(0), [R, N] = M.useState(null), q = M.useRef(null), [te, ae] = M.useState({ top: 2, left: 8, h: 28 }), ue = wt((w) => w.breakpoints.down("md")), Y = Ci(e), L = fe(), [ee] = kr(), pe = (ee === "en" ? Lr : Nr).components.MuiDataGrid.defaultProps.localeText,
|
|
4214
|
+
} = e, [B, X] = M.useState(0), [R, N] = M.useState(null), q = M.useRef(null), [te, ae] = M.useState({ top: 2, left: 8, h: 28 }), ue = wt((w) => w.breakpoints.down("md")), Y = Ci(e), L = fe(), [ee] = kr(), pe = (ee === "en" ? Lr : Nr).components.MuiDataGrid.defaultProps.localeText, De = zf(), he = ye(e), {
|
|
4215
4215
|
props: {
|
|
4216
4216
|
bulkActionButtons: Ie = r,
|
|
4217
4217
|
hasCreate: me,
|
|
@@ -4287,16 +4287,16 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
4287
4287
|
exporter: vn
|
|
4288
4288
|
} = jt(), lo = M.useRef(He);
|
|
4289
4289
|
M.useEffect(() => {
|
|
4290
|
-
lo.current && !He && Je.length && (Lt([]),
|
|
4291
|
-
}, [He, Lt,
|
|
4290
|
+
lo.current && !He && Je.length && (Lt([]), De?.([])), lo.current = He;
|
|
4291
|
+
}, [He, Lt, De, Je.length]);
|
|
4292
4292
|
const Mn = M.useCallback(
|
|
4293
4293
|
(w) => {
|
|
4294
4294
|
if ($t)
|
|
4295
4295
|
return;
|
|
4296
4296
|
const D = [w];
|
|
4297
|
-
Lt(D),
|
|
4297
|
+
Lt(D), De?.(D);
|
|
4298
4298
|
},
|
|
4299
|
-
[$t, Lt,
|
|
4299
|
+
[$t, Lt, De]
|
|
4300
4300
|
), Pn = V || !$e || vn !== !1 || $, Po = M.useCallback(async () => typeof Vt != "function" ? Ye : Vt(), [Ye, Vt]), ki = $ ? void 0 : Po, Fi = M.useMemo(() => {
|
|
4301
4301
|
const w = {
|
|
4302
4302
|
loadingOverlay: km,
|
|
@@ -4487,21 +4487,21 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
4487
4487
|
user: Rn = Us,
|
|
4488
4488
|
lang: is = Us
|
|
4489
4489
|
} = Go, ad = sn(Go, "borrar") || sn(Go, "delete"), Tn = v && !ad, Ai = xe(Wl), at = Zr(), Ho = (G.current?.state?.rowGrouping?.model?.length ?? 0) > 0, Di = Ho && !$ ? `${te.h + 4}px` : 0;
|
|
4490
|
-
|
|
4490
|
+
se(() => {
|
|
4491
4491
|
if (!$ || Ke === "custom" || !G.current?.showSidebar || G.current?.state?.sidebar?.open && G.current?.state?.sidebar?.value === "pivot")
|
|
4492
4492
|
return;
|
|
4493
4493
|
const D = requestAnimationFrame(() => {
|
|
4494
4494
|
G.current?.showSidebar?.("pivot");
|
|
4495
4495
|
});
|
|
4496
4496
|
return () => cancelAnimationFrame(D);
|
|
4497
|
-
}, [G, Ke, $]),
|
|
4497
|
+
}, [G, Ke, $]), se(() => {
|
|
4498
4498
|
if (Ai) {
|
|
4499
4499
|
const w = Ai.current.panels.find(
|
|
4500
4500
|
(D) => D.id === `win_${he}`
|
|
4501
4501
|
);
|
|
4502
4502
|
w && (w.params.apiRef = G);
|
|
4503
4503
|
}
|
|
4504
|
-
}, [G, he, Ai]),
|
|
4504
|
+
}, [G, he, Ai]), se(() => {
|
|
4505
4505
|
const w = {};
|
|
4506
4506
|
pt !== G && (w.apiRef = G), mt !== o && (w.actionButtonsHeader = o), Oe !== nt && (w.pivotEnabled = nt), Te !== Ke && (w.pivotUi = Ke), Object.keys(w).length > 0 && ft?.(w);
|
|
4507
4507
|
}, [
|
|
@@ -4658,7 +4658,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
4658
4658
|
headerName: is[w.field.replace("_lis", "")] ?? w.headerName
|
|
4659
4659
|
})),
|
|
4660
4660
|
[cs, is]
|
|
4661
|
-
), ps = M.useMemo(() => $ || !(t.length > 0 ||
|
|
4661
|
+
), ps = M.useMemo(() => $ || !(t.length > 0 || f || b || T || Tn) ? Ro : Ro.concat([
|
|
4662
4662
|
{
|
|
4663
4663
|
field: "actions",
|
|
4664
4664
|
type: "actions",
|
|
@@ -4751,7 +4751,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
4751
4751
|
);
|
|
4752
4752
|
}
|
|
4753
4753
|
return j ? [
|
|
4754
|
-
...
|
|
4754
|
+
...f ? [
|
|
4755
4755
|
we ? Me : /* @__PURE__ */ i(
|
|
4756
4756
|
Fo,
|
|
4757
4757
|
{
|
|
@@ -4810,7 +4810,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
4810
4810
|
Go,
|
|
4811
4811
|
y,
|
|
4812
4812
|
g,
|
|
4813
|
-
|
|
4813
|
+
f,
|
|
4814
4814
|
b,
|
|
4815
4815
|
c,
|
|
4816
4816
|
T,
|
|
@@ -5052,11 +5052,11 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5052
5052
|
const w = Array.from(
|
|
5053
5053
|
/* @__PURE__ */ new Set([...Je, ...Ye.map((D) => D.id)])
|
|
5054
5054
|
);
|
|
5055
|
-
Lt(w),
|
|
5055
|
+
Lt(w), De?.(w);
|
|
5056
5056
|
}, "selectAllVisibleRows"), gd = /* @__PURE__ */ n((w) => Array.from(w?.ids ?? []), "normalizeRowSelectionModel"), bd = /* @__PURE__ */ n((w) => {
|
|
5057
5057
|
if (!$t) {
|
|
5058
5058
|
const D = gd(w);
|
|
5059
|
-
Lt(D),
|
|
5059
|
+
Lt(D), De?.(D);
|
|
5060
5060
|
}
|
|
5061
5061
|
}, "handleSelectionChange"), xd = M.useMemo(
|
|
5062
5062
|
() => ({
|
|
@@ -5115,7 +5115,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5115
5115
|
D && (D.defaultMuiPrevented = !0);
|
|
5116
5116
|
return;
|
|
5117
5117
|
}
|
|
5118
|
-
!w?.id?.startsWith("auto-generated-row") &&
|
|
5118
|
+
!w?.id?.startsWith("auto-generated-row") && f && Cr(w.row, c) && _i({ id: w.id, record: w.row });
|
|
5119
5119
|
}, "handleRowDoubleClick"), Md = M.useCallback(
|
|
5120
5120
|
(w, D, K) => {
|
|
5121
5121
|
rt?.onCellDoubleClick?.(w, D, K), ve?.onCellDoubleClick?.(w, D, K), $ && (D.defaultMuiPrevented = !0);
|
|
@@ -5562,14 +5562,14 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5562
5562
|
editIcon: d,
|
|
5563
5563
|
deleteIcon: p,
|
|
5564
5564
|
hasVerFicha: u,
|
|
5565
|
-
isRowEditable:
|
|
5565
|
+
isRowEditable: m,
|
|
5566
5566
|
isRowDeletable: h,
|
|
5567
|
-
borra:
|
|
5567
|
+
borra: f,
|
|
5568
5568
|
nuevoDesde: g,
|
|
5569
5569
|
pivotActive: y = !1,
|
|
5570
5570
|
forceListView: x,
|
|
5571
5571
|
...S
|
|
5572
|
-
} = e, P = M.useRef(null), C = xe(Xe) || {}, { lang: b = [] } = C, I = sn(C, "borrar") || sn(C, "delete"), v =
|
|
5572
|
+
} = e, P = M.useRef(null), C = xe(Xe) || {}, { lang: b = [] } = C, I = sn(C, "borrar") || sn(C, "delete"), v = f && !I, T = y ? [] : (a || []).filter(
|
|
5573
5573
|
(me) => ro(C, me)
|
|
5574
5574
|
), _ = !!(!y && (l || u || g || v || T.length)), E = ye(e), { sort: O } = jt(), z = /* @__PURE__ */ n(() => P.current, "container"), H = wt((me) => me.breakpoints.down("md")), W = x ?? H, Z = x && !H, [F] = kr(), A = (F === "en" ? Lr : Nr).components.MuiDataGrid.defaultProps.localeText, B = Dr(), {
|
|
5575
5575
|
props: { gridContainerRef: X, chkSeleccion: R }
|
|
@@ -5598,7 +5598,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5598
5598
|
headerName: b[me.field.replace("_lis", "")] ?? me.headerName
|
|
5599
5599
|
})), pe = /* @__PURE__ */ n(() => {
|
|
5600
5600
|
q({ overlay: null, params: null });
|
|
5601
|
-
}, "handleCloseOverlay"),
|
|
5601
|
+
}, "handleCloseOverlay"), De = M.useMemo(
|
|
5602
5602
|
() => ({
|
|
5603
5603
|
field: "listCell",
|
|
5604
5604
|
renderCell: /* @__PURE__ */ n((me) => /* @__PURE__ */ i(
|
|
@@ -5667,7 +5667,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5667
5667
|
}
|
|
5668
5668
|
},
|
|
5669
5669
|
listView: W,
|
|
5670
|
-
listViewColumn:
|
|
5670
|
+
listViewColumn: De,
|
|
5671
5671
|
columnHeaderHeight: W ? 0 : void 0,
|
|
5672
5672
|
initialState: {
|
|
5673
5673
|
density: "comfortable",
|
|
@@ -5762,7 +5762,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5762
5762
|
actions: T,
|
|
5763
5763
|
hasEdit: y ? !1 : l,
|
|
5764
5764
|
hasVerFicha: y ? !1 : u,
|
|
5765
|
-
isRowEditable: y ? void 0 :
|
|
5765
|
+
isRowEditable: y ? void 0 : m,
|
|
5766
5766
|
isRowDeletable: y ? void 0 : h,
|
|
5767
5767
|
borra: y ? !1 : v,
|
|
5768
5768
|
nuevoDesde: y ? !1 : g,
|
|
@@ -5782,7 +5782,7 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5782
5782
|
pivotUi: d = "mui",
|
|
5783
5783
|
columns: p,
|
|
5784
5784
|
extraColumns: u,
|
|
5785
|
-
...
|
|
5785
|
+
...m
|
|
5786
5786
|
} = e, h = M.useMemo(
|
|
5787
5787
|
() => {
|
|
5788
5788
|
const C = p.some((I) => I.type === "boolean") ? p.map(
|
|
@@ -5802,16 +5802,16 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5802
5802
|
return b;
|
|
5803
5803
|
},
|
|
5804
5804
|
[p, u]
|
|
5805
|
-
),
|
|
5805
|
+
), f = s === !1 ? s : r?.borra, g = a, y = c, {
|
|
5806
5806
|
props: { viewMode: x = "grilla" }
|
|
5807
5807
|
} = Xt(), S = l && x === "pivot";
|
|
5808
5808
|
return /* @__PURE__ */ i(Q, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: !S && (t ? !0 : x === "ficha") ? /* @__PURE__ */ i(
|
|
5809
5809
|
lh,
|
|
5810
5810
|
{
|
|
5811
|
-
...
|
|
5811
|
+
...m,
|
|
5812
5812
|
columns: h,
|
|
5813
5813
|
hasEdit: o,
|
|
5814
|
-
borra:
|
|
5814
|
+
borra: f,
|
|
5815
5815
|
editIcon: g,
|
|
5816
5816
|
deleteIcon: y,
|
|
5817
5817
|
pivotActive: S,
|
|
@@ -5822,10 +5822,10 @@ const ah = M.memo(/* @__PURE__ */ n(function({
|
|
|
5822
5822
|
) : /* @__PURE__ */ i(
|
|
5823
5823
|
Tc,
|
|
5824
5824
|
{
|
|
5825
|
-
...
|
|
5825
|
+
...m,
|
|
5826
5826
|
columns: h,
|
|
5827
5827
|
hasEdit: o,
|
|
5828
|
-
borra:
|
|
5828
|
+
borra: f,
|
|
5829
5829
|
editIcon: g,
|
|
5830
5830
|
deleteIcon: y,
|
|
5831
5831
|
pivotEnabled: l,
|
|
@@ -5863,9 +5863,9 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
5863
5863
|
format: d,
|
|
5864
5864
|
formatOnBlur: p,
|
|
5865
5865
|
formClassName: u,
|
|
5866
|
-
initialValue:
|
|
5866
|
+
initialValue: m,
|
|
5867
5867
|
initializeForm: h,
|
|
5868
|
-
input:
|
|
5868
|
+
input: f,
|
|
5869
5869
|
isEqual: g,
|
|
5870
5870
|
isRequired: y,
|
|
5871
5871
|
label: x,
|
|
@@ -5909,9 +5909,9 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
5909
5909
|
margin: d,
|
|
5910
5910
|
onBlur: p,
|
|
5911
5911
|
onChange: u,
|
|
5912
|
-
parse:
|
|
5912
|
+
parse: m,
|
|
5913
5913
|
validate: h,
|
|
5914
|
-
variant:
|
|
5914
|
+
variant: f,
|
|
5915
5915
|
disabled: g,
|
|
5916
5916
|
readOnly: y,
|
|
5917
5917
|
sx: x,
|
|
@@ -5921,7 +5921,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
5921
5921
|
defaultValue: t,
|
|
5922
5922
|
name: s,
|
|
5923
5923
|
format: o,
|
|
5924
|
-
parse:
|
|
5924
|
+
parse: m,
|
|
5925
5925
|
onBlur: p,
|
|
5926
5926
|
onChange: u,
|
|
5927
5927
|
resource: c,
|
|
@@ -5939,7 +5939,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
5939
5939
|
className: Mi("ra-input", `ra-input-${a}`, e),
|
|
5940
5940
|
type: "date",
|
|
5941
5941
|
size: "small",
|
|
5942
|
-
variant:
|
|
5942
|
+
variant: f,
|
|
5943
5943
|
margin: d,
|
|
5944
5944
|
error: T,
|
|
5945
5945
|
disabled: g || y,
|
|
@@ -5981,9 +5981,9 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
5981
5981
|
source: d,
|
|
5982
5982
|
resource: p,
|
|
5983
5983
|
parse: u = hh,
|
|
5984
|
-
validate:
|
|
5984
|
+
validate: m,
|
|
5985
5985
|
variant: h,
|
|
5986
|
-
disabled:
|
|
5986
|
+
disabled: f,
|
|
5987
5987
|
readOnly: g,
|
|
5988
5988
|
sx: y,
|
|
5989
5989
|
...x
|
|
@@ -5996,8 +5996,8 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
5996
5996
|
onChange: l,
|
|
5997
5997
|
resource: p,
|
|
5998
5998
|
source: d,
|
|
5999
|
-
validate:
|
|
6000
|
-
disabled:
|
|
5999
|
+
validate: m,
|
|
6000
|
+
disabled: f,
|
|
6001
6001
|
readOnly: g,
|
|
6002
6002
|
...x
|
|
6003
6003
|
}), { error: I, invalid: v } = P, T = s !== !1 || v;
|
|
@@ -6012,7 +6012,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6012
6012
|
variant: h,
|
|
6013
6013
|
margin: a,
|
|
6014
6014
|
error: v,
|
|
6015
|
-
disabled:
|
|
6015
|
+
disabled: f || g,
|
|
6016
6016
|
readOnly: g,
|
|
6017
6017
|
helperText: T ? /* @__PURE__ */ i(
|
|
6018
6018
|
Fc,
|
|
@@ -6052,13 +6052,13 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6052
6052
|
return "";
|
|
6053
6053
|
let u = String(p).replace(",", ".");
|
|
6054
6054
|
u = u.replace(r ? /[^0-9.-]/g : /[^0-9.]/g, "");
|
|
6055
|
-
let
|
|
6056
|
-
r && u.startsWith("-") && (
|
|
6057
|
-
const h = e -
|
|
6055
|
+
let m = "";
|
|
6056
|
+
r && u.startsWith("-") && (m = "-", u = u.slice(1)), u = u.replace(/-/g, "");
|
|
6057
|
+
const h = e - m.length;
|
|
6058
6058
|
if (h <= 0)
|
|
6059
|
-
return
|
|
6060
|
-
const [
|
|
6061
|
-
return
|
|
6059
|
+
return m;
|
|
6060
|
+
const [f, g = ""] = u.split(".", 2), y = f.slice(0, h), x = h - y.length, S = g.slice(0, Math.min(t, x));
|
|
6061
|
+
return m + (u.includes(".") && S.length < 1 && x > 0 ? `${y}.` : u.includes(".") && x > 0 ? `${y}.${S}` : y);
|
|
6062
6062
|
},
|
|
6063
6063
|
[e, t, r]
|
|
6064
6064
|
), c = ie(
|
|
@@ -6226,18 +6226,18 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6226
6226
|
openOnFocus: d = !0,
|
|
6227
6227
|
injectedChoices: p = [],
|
|
6228
6228
|
fullWidth: u = !1,
|
|
6229
|
-
slotProps:
|
|
6229
|
+
slotProps: m,
|
|
6230
6230
|
...h
|
|
6231
6231
|
} = e, {
|
|
6232
|
-
isFetching:
|
|
6232
|
+
isFetching: f,
|
|
6233
6233
|
allChoices: g,
|
|
6234
6234
|
availableChoices: y
|
|
6235
|
-
} = qa(), { iniciarCargaCampo: x } = Be(), S = Ll(h.source), P = wo(), [C, b] = oe(!1), I =
|
|
6235
|
+
} = qa(), { iniciarCargaCampo: x } = Be(), S = Ll(h.source), P = wo(), [C, b] = oe(!1), I = f && !C;
|
|
6236
6236
|
ir(() => {
|
|
6237
6237
|
if (I)
|
|
6238
6238
|
return x?.(h.source);
|
|
6239
6239
|
}, [x, I, h.source]);
|
|
6240
|
-
const v =
|
|
6240
|
+
const v = Ae(null), T = Ae(!1), [_, E] = oe(!1), O = I || S, z = h.readOnly || O;
|
|
6241
6241
|
ir(() => {
|
|
6242
6242
|
if (!z) {
|
|
6243
6243
|
if (document.activeElement === document.body) {
|
|
@@ -6251,7 +6251,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6251
6251
|
T.current = !1, _ && E(!1);
|
|
6252
6252
|
}
|
|
6253
6253
|
}, [z, _]);
|
|
6254
|
-
const H =
|
|
6254
|
+
const H = Ae(null), W = re(() => {
|
|
6255
6255
|
const B = Array.isArray(y) ? y : [];
|
|
6256
6256
|
if (!Array.isArray(p) || p.length === 0)
|
|
6257
6257
|
return B;
|
|
@@ -6259,7 +6259,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6259
6259
|
return B.forEach((R) => {
|
|
6260
6260
|
X.some((N) => $o(N?.id, R?.id)) || X.push(R);
|
|
6261
6261
|
}), X;
|
|
6262
|
-
}, [y, p]), Z =
|
|
6262
|
+
}, [y, p]), Z = re(() => h?.isRequired || I || !Array.isArray(W) ? !1 : !W.some((B) => $o(B?.id, "0")), [I, W, h?.isRequired]), F = ie(
|
|
6263
6263
|
(B, X) => {
|
|
6264
6264
|
b(!1), typeof a == "function" && a({
|
|
6265
6265
|
target: {
|
|
@@ -6275,8 +6275,8 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6275
6275
|
},
|
|
6276
6276
|
[l]
|
|
6277
6277
|
);
|
|
6278
|
-
return
|
|
6279
|
-
if (!
|
|
6278
|
+
return se(() => {
|
|
6279
|
+
if (!f && typeof t == "function") {
|
|
6280
6280
|
const B = o ?? t;
|
|
6281
6281
|
if (H.current === B)
|
|
6282
6282
|
return;
|
|
@@ -6287,7 +6287,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6287
6287
|
Promise.resolve(X).catch((N) => P(N.message || "No se pudieron cargar los datos.", { type: "error" })).finally(() => R?.());
|
|
6288
6288
|
}
|
|
6289
6289
|
}
|
|
6290
|
-
}, [g, t, o, x,
|
|
6290
|
+
}, [g, t, o, x, f, P, h.source]), /* @__PURE__ */ i(Ph, { title: v.current?.value || "", placement: "top", arrow: !0, disableInteractive: !0, children: /* @__PURE__ */ i(
|
|
6291
6291
|
Q,
|
|
6292
6292
|
{
|
|
6293
6293
|
onFocusCapture: /* @__PURE__ */ n((B) => {
|
|
@@ -6319,7 +6319,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6319
6319
|
openOnFocus: d && !_,
|
|
6320
6320
|
readOnly: z,
|
|
6321
6321
|
"aria-busy": O || h["aria-busy"],
|
|
6322
|
-
slotProps: Ec(
|
|
6322
|
+
slotProps: Ec(m),
|
|
6323
6323
|
choices: Array.isArray(p) && p.length > 0 ? W : void 0,
|
|
6324
6324
|
emptyText: Z ? "" : h.emptyText,
|
|
6325
6325
|
emptyValue: Z ? "0" : h.emptyValue,
|
|
@@ -6341,10 +6341,10 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6341
6341
|
} = wi(), {
|
|
6342
6342
|
queryOptions: p,
|
|
6343
6343
|
asistant: u,
|
|
6344
|
-
asistantResource:
|
|
6344
|
+
asistantResource: m,
|
|
6345
6345
|
perPage: h = 500,
|
|
6346
|
-
...
|
|
6347
|
-
} = t, { source: g, reference: y, fullWidth: x = !1 } = e, S = x || !!e.sx, P = ye(e), C = Pi(P), [b, I] = oe([]), v = typeof
|
|
6346
|
+
...f
|
|
6347
|
+
} = t, { source: g, reference: y, fullWidth: x = !1 } = e, S = x || !!e.sx, P = ye(e), C = Pi(P), [b, I] = oe([]), v = typeof f.optionText == "string" ? f.optionText : "etiqueta", T = Bt(), _ = Or((A) => zr(A.reload_cb, g, T)), E = Ae(_), O = _ === null && E.current ? E.current : _, z = d || O !== null;
|
|
6348
6348
|
let H, W;
|
|
6349
6349
|
if (O) {
|
|
6350
6350
|
const { callback: A, ...B } = O;
|
|
@@ -6391,7 +6391,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6391
6391
|
},
|
|
6392
6392
|
[b]
|
|
6393
6393
|
);
|
|
6394
|
-
return
|
|
6394
|
+
return se(() => {
|
|
6395
6395
|
_ !== null && (E.current = _, r(cm(g, void 0, T)));
|
|
6396
6396
|
}, [r, _, T, g]), C && !o && !c && z ? /* @__PURE__ */ i(
|
|
6397
6397
|
Rh,
|
|
@@ -6400,7 +6400,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6400
6400
|
fullWidth: S,
|
|
6401
6401
|
isTC: e.isTC,
|
|
6402
6402
|
optionText: v,
|
|
6403
|
-
restProps:
|
|
6403
|
+
restProps: f,
|
|
6404
6404
|
sx: e.sx
|
|
6405
6405
|
}
|
|
6406
6406
|
) : !o && !c && z ? /* @__PURE__ */ k(
|
|
@@ -6434,7 +6434,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6434
6434
|
children: /* @__PURE__ */ i(
|
|
6435
6435
|
kh,
|
|
6436
6436
|
{
|
|
6437
|
-
...
|
|
6437
|
+
...f,
|
|
6438
6438
|
callback: H,
|
|
6439
6439
|
callbackKey: O,
|
|
6440
6440
|
fullWidth: S,
|
|
@@ -6454,7 +6454,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6454
6454
|
u,
|
|
6455
6455
|
{
|
|
6456
6456
|
panel: {
|
|
6457
|
-
resource:
|
|
6457
|
+
resource: m,
|
|
6458
6458
|
tipo: "ventana",
|
|
6459
6459
|
inline: !0,
|
|
6460
6460
|
mutationOptions: {
|
|
@@ -6476,13 +6476,13 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6476
6476
|
}, "ComboBox"), Xi = /* @__PURE__ */ n((e) => typeof e == "string" ? e.trimStart() : e, "trimLeading"), Fh = /* @__PURE__ */ n((e) => {
|
|
6477
6477
|
const { label: t, sx: o, source: r } = e, s = Ge(), { estado: a } = Be(), {
|
|
6478
6478
|
hidden: c,
|
|
6479
|
-
propsContenido: { helperText: l, sx: d, readOnly: p, onChange: u, InputProps:
|
|
6479
|
+
propsContenido: { helperText: l, sx: d, readOnly: p, onChange: u, InputProps: m }
|
|
6480
6480
|
} = ot(e);
|
|
6481
6481
|
return M.useEffect(() => {
|
|
6482
6482
|
if (a !== "ND" || !r)
|
|
6483
6483
|
return;
|
|
6484
|
-
const h = s.getValues(r),
|
|
6485
|
-
|
|
6484
|
+
const h = s.getValues(r), f = Xi(h);
|
|
6485
|
+
f !== h && s.setValue(r, f, {
|
|
6486
6486
|
shouldDirty: !1,
|
|
6487
6487
|
shouldTouch: !1,
|
|
6488
6488
|
shouldValidate: !1
|
|
@@ -6503,7 +6503,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6503
6503
|
Gt,
|
|
6504
6504
|
{
|
|
6505
6505
|
...e,
|
|
6506
|
-
InputProps:
|
|
6506
|
+
InputProps: m,
|
|
6507
6507
|
onChange: u,
|
|
6508
6508
|
disabled: !1,
|
|
6509
6509
|
readOnly: p,
|
|
@@ -6638,15 +6638,15 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6638
6638
|
() => Bh(e),
|
|
6639
6639
|
[e]
|
|
6640
6640
|
), d = M.useMemo(() => new Set(c), [c]), p = M.useMemo(
|
|
6641
|
-
() => l.filter((
|
|
6641
|
+
() => l.filter((f) => !d.has(f.id)),
|
|
6642
6642
|
[l, d]
|
|
6643
6643
|
), u = M.useMemo(
|
|
6644
|
-
() => c.map((
|
|
6644
|
+
() => c.map((f) => l.find((g) => g.id === f)).filter(Boolean),
|
|
6645
6645
|
[l, c]
|
|
6646
|
-
),
|
|
6647
|
-
t || d.has(
|
|
6648
|
-
}, "moveRight"), h = /* @__PURE__ */ n((
|
|
6649
|
-
t || a.onChange(c.filter((g) => g !==
|
|
6646
|
+
), m = /* @__PURE__ */ n((f) => {
|
|
6647
|
+
t || d.has(f) || a.onChange([...c, f]);
|
|
6648
|
+
}, "moveRight"), h = /* @__PURE__ */ n((f) => {
|
|
6649
|
+
t || a.onChange(c.filter((g) => g !== f));
|
|
6650
6650
|
}, "moveLeft");
|
|
6651
6651
|
return /* @__PURE__ */ i(
|
|
6652
6652
|
Pe,
|
|
@@ -6675,7 +6675,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6675
6675
|
{
|
|
6676
6676
|
disabled: t,
|
|
6677
6677
|
items: p,
|
|
6678
|
-
onDoubleClick:
|
|
6678
|
+
onDoubleClick: m,
|
|
6679
6679
|
selectedSet: d,
|
|
6680
6680
|
emptyText: "Sin opciones disponibles"
|
|
6681
6681
|
}
|
|
@@ -6696,7 +6696,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6696
6696
|
}
|
|
6697
6697
|
);
|
|
6698
6698
|
}, "ListCheckPreviewSandbox"), ca = /* @__PURE__ */ n((e, t) => e.filter((o) => !t.includes(o)), "not"), At = /* @__PURE__ */ n((e, t) => e.filter((o) => t.includes(o)), "intersection"), Lh = /* @__PURE__ */ n((e) => {
|
|
6699
|
-
const t = fe(), { source: o, record: r, sx: s = {}, readOnly: a, disabled: c } = e, l = !!(a || c), { allChoices: d, availableChoices: p } = qa(), [u,
|
|
6699
|
+
const t = fe(), { source: o, record: r, sx: s = {}, readOnly: a, disabled: c } = e, l = !!(a || c), { allChoices: d, availableChoices: p } = qa(), [u, m] = M.useState([]), [h, f] = M.useState(null), g = Ge(), y = np({ control: g.control, name: o }), x = Array.isArray(y) ? y : r?.[o] || [], S = M.useMemo(
|
|
6700
6700
|
() => Array.isArray(r?.[o]) ? r[o] : [],
|
|
6701
6701
|
[r, o]
|
|
6702
6702
|
), [P, C] = M.useState(""), { field: b } = un({ defaultValue: "", ...e }), I = M.useMemo(
|
|
@@ -6733,7 +6733,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6733
6733
|
});
|
|
6734
6734
|
} else
|
|
6735
6735
|
ue === -1 ? Y.push(R) : Y.splice(ue, 1);
|
|
6736
|
-
|
|
6736
|
+
m(Y), f({ id: R, fromLeft: ae, searchTerm: P });
|
|
6737
6737
|
}, "handleToggle"), H = /* @__PURE__ */ n((R, N) => {
|
|
6738
6738
|
const q = R?.id;
|
|
6739
6739
|
if (q != null) {
|
|
@@ -6751,13 +6751,13 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6751
6751
|
);
|
|
6752
6752
|
b.onChange(te);
|
|
6753
6753
|
}
|
|
6754
|
-
|
|
6754
|
+
m((te) => te.filter((ae) => ae !== q));
|
|
6755
6755
|
}
|
|
6756
6756
|
}, "handleDoubleClick"), W = /* @__PURE__ */ n(() => {
|
|
6757
6757
|
const R = (Array.isArray(v) ? v : []).map((N) => N.id).filter((N) => N != null);
|
|
6758
|
-
b.onChange(R),
|
|
6758
|
+
b.onChange(R), m([]);
|
|
6759
6759
|
}, "handleAllRight"), Z = /* @__PURE__ */ n(() => {
|
|
6760
|
-
b.onChange([]),
|
|
6760
|
+
b.onChange([]), m([]);
|
|
6761
6761
|
}, "handleAllLeft"), F = /* @__PURE__ */ n(() => {
|
|
6762
6762
|
const R = At(
|
|
6763
6763
|
u,
|
|
@@ -6769,7 +6769,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6769
6769
|
...Array.isArray(x) ? x : [],
|
|
6770
6770
|
...R.filter((q) => !E.has(q))
|
|
6771
6771
|
];
|
|
6772
|
-
b.onChange(N),
|
|
6772
|
+
b.onChange(N), m(ca(u, R));
|
|
6773
6773
|
}, "handleCheckedRight"), A = /* @__PURE__ */ n(() => {
|
|
6774
6774
|
const R = At(
|
|
6775
6775
|
u,
|
|
@@ -6780,9 +6780,9 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
6780
6780
|
const N = new Set(R), q = (Array.isArray(x) ? x : []).filter(
|
|
6781
6781
|
(te) => !N.has(te)
|
|
6782
6782
|
);
|
|
6783
|
-
b.onChange(q),
|
|
6783
|
+
b.onChange(q), m(ca(u, R));
|
|
6784
6784
|
}, "handleCheckedLeft"), B = /* @__PURE__ */ n(() => {
|
|
6785
|
-
b.onChange(S), typeof g.resetField == "function" ? g.resetField(o, { defaultValue: S }) : g.setValue(o, S, { shouldDirty: !1 }),
|
|
6785
|
+
b.onChange(S), typeof g.resetField == "function" ? g.resetField(o, { defaultValue: S }) : g.setValue(o, S, { shouldDirty: !1 }), m([]), f(null);
|
|
6786
6786
|
}, "handleResetChanges"), X = /* @__PURE__ */ n((R, N, q = {}) => {
|
|
6787
6787
|
const te = N ? "Disponibles..." : "Seleccionados...", ae = /* @__PURE__ */ n((Y) => {
|
|
6788
6788
|
C(Y === "" ? Y : Y.target.value);
|
|
@@ -7092,7 +7092,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7092
7092
|
} = ot(e), { isLoading: a } = Be(), c = Cn(), {
|
|
7093
7093
|
isActive: l,
|
|
7094
7094
|
hasBeenActive: d = l
|
|
7095
|
-
} = wi(), p = wt((
|
|
7095
|
+
} = wi(), p = wt((f) => f.breakpoints.down("md")), { source: u, reference: m } = e, h = ut(e) || {};
|
|
7096
7096
|
return !s && c?.enabled ? /* @__PURE__ */ i(
|
|
7097
7097
|
$h,
|
|
7098
7098
|
{
|
|
@@ -7105,7 +7105,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7105
7105
|
cu,
|
|
7106
7106
|
{
|
|
7107
7107
|
source: u,
|
|
7108
|
-
reference:
|
|
7108
|
+
reference: m,
|
|
7109
7109
|
perPage: 500,
|
|
7110
7110
|
queryOptions: { enabled: d },
|
|
7111
7111
|
children: p ? /* @__PURE__ */ i(
|
|
@@ -7182,7 +7182,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7182
7182
|
if (!Dt(a))
|
|
7183
7183
|
return a;
|
|
7184
7184
|
const c = Eo.toArray(a.props.children);
|
|
7185
|
-
if (!(a.type === t && !a.props.container && c.some((
|
|
7185
|
+
if (!(a.type === t && !a.props.container && c.some((f) => Dt(f) && r.has(f.type))))
|
|
7186
7186
|
return a.props.children && (!a.props.source || a.type === s) ? Tt(
|
|
7187
7187
|
a,
|
|
7188
7188
|
{},
|
|
@@ -7193,15 +7193,15 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7193
7193
|
SectionGroup: s
|
|
7194
7194
|
})
|
|
7195
7195
|
) : a;
|
|
7196
|
-
const d = a.props.sx, p = typeof d?.gridTemplateColumns == "string" ? Number(d.gridTemplateColumns.match(/repeat\((\d+)/)?.[1]) : 0,
|
|
7197
|
-
const g = Dt(
|
|
7196
|
+
const d = a.props.sx, p = typeof d?.gridTemplateColumns == "string" ? Number(d.gridTemplateColumns.match(/repeat\((\d+)/)?.[1]) : 0, m = `@container (width < ${p ? p * 200 + (p - 1) * 8 : 824}px)`, h = c.map((f) => {
|
|
7197
|
+
const g = Dt(f) && r.get(f.type);
|
|
7198
7198
|
if (!g)
|
|
7199
|
-
return
|
|
7200
|
-
const y =
|
|
7199
|
+
return f;
|
|
7200
|
+
const y = f.props.sx?.gridColumn ? f.props.sx : null;
|
|
7201
7201
|
return ei(
|
|
7202
7202
|
o,
|
|
7203
7203
|
{
|
|
7204
|
-
key:
|
|
7204
|
+
key: f.key,
|
|
7205
7205
|
className: "FichaVisual-slot",
|
|
7206
7206
|
sx: [
|
|
7207
7207
|
{
|
|
@@ -7222,7 +7222,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7222
7222
|
},
|
|
7223
7223
|
y,
|
|
7224
7224
|
{
|
|
7225
|
-
[
|
|
7225
|
+
[m]: {
|
|
7226
7226
|
gridColumn: "1 / -1",
|
|
7227
7227
|
flexGrow: p ? void 0 : 1,
|
|
7228
7228
|
width: p ? void 0 : "100%",
|
|
@@ -7242,7 +7242,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7242
7242
|
maxWidth: "100%"
|
|
7243
7243
|
}
|
|
7244
7244
|
},
|
|
7245
|
-
|
|
7245
|
+
f
|
|
7246
7246
|
)
|
|
7247
7247
|
);
|
|
7248
7248
|
});
|
|
@@ -7265,7 +7265,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7265
7265
|
},
|
|
7266
7266
|
"& > .FichaVisual-slot": { margin: 0 },
|
|
7267
7267
|
"&:not(:has(> :not(.FichaVisual-slot)), :has(.FichaVisual-control:not(:empty)))": { display: "none" },
|
|
7268
|
-
[
|
|
7268
|
+
[m]: {
|
|
7269
7269
|
"& > .FichaVisual-slot": { gridColumn: "1 / -1" }
|
|
7270
7270
|
}
|
|
7271
7271
|
}
|
|
@@ -7370,17 +7370,17 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7370
7370
|
controls: Lc,
|
|
7371
7371
|
SectionGroup: zh
|
|
7372
7372
|
}), "presentFicha"), Hh = /* @__PURE__ */ n((e) => {
|
|
7373
|
-
const { validateDelete: t, className: o } = e, r = ye(e), s = ut(), a = Mt(), { mutationOptions: { onError: c } = {} } = xn(), { open: l, isLoading: d, handleDialogOpen: p, handleDialogClose: u } = uu({ record: s, resource: r }),
|
|
7374
|
-
p(
|
|
7373
|
+
const { validateDelete: t, className: o } = e, r = ye(e), s = ut(), a = Mt(), { mutationOptions: { onError: c } = {} } = xn(), { open: l, isLoading: d, handleDialogOpen: p, handleDialogClose: u } = uu({ record: s, resource: r }), m = /* @__PURE__ */ n((f) => {
|
|
7374
|
+
p(f);
|
|
7375
7375
|
}, "handleClick"), h = ie(
|
|
7376
|
-
async (
|
|
7376
|
+
async (f) => {
|
|
7377
7377
|
if (s)
|
|
7378
7378
|
try {
|
|
7379
7379
|
await t(s);
|
|
7380
7380
|
} catch (g) {
|
|
7381
7381
|
c && typeof c == "function" ? c(g) : a(g.message, { type: "error" });
|
|
7382
7382
|
} finally {
|
|
7383
|
-
u(
|
|
7383
|
+
u(f);
|
|
7384
7384
|
}
|
|
7385
7385
|
},
|
|
7386
7386
|
[s, t, a, u, c]
|
|
@@ -7390,7 +7390,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7390
7390
|
Ze,
|
|
7391
7391
|
{
|
|
7392
7392
|
label: "ra.action.delete",
|
|
7393
|
-
onClick:
|
|
7393
|
+
onClick: m,
|
|
7394
7394
|
disabled: d,
|
|
7395
7395
|
className: Mi("ra-delete-button", o),
|
|
7396
7396
|
children: /* @__PURE__ */ i(hn, {})
|
|
@@ -7619,7 +7619,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7619
7619
|
estado: d,
|
|
7620
7620
|
mutationOptions: p = {},
|
|
7621
7621
|
fichaProps: { onBeforeSubmitFicha: u } = {}
|
|
7622
|
-
} = Be(), { onError:
|
|
7622
|
+
} = Be(), { onError: m, onSuccess: h, _popupKey: f } = p, g = Ft(e), [y] = Xa(
|
|
7623
7623
|
o,
|
|
7624
7624
|
{
|
|
7625
7625
|
id: r?.id
|
|
@@ -7636,12 +7636,12 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7636
7636
|
})
|
|
7637
7637
|
},
|
|
7638
7638
|
undoable: !1
|
|
7639
|
-
}), Uh(l,
|
|
7639
|
+
}), Uh(l, f) && (f ? l.hide({ popupKey: f }) : l.hide()), a("list", o, void 0, void 0, {
|
|
7640
7640
|
_scrollToTop: !1
|
|
7641
7641
|
});
|
|
7642
7642
|
}, "onSuccess"),
|
|
7643
7643
|
onError: /* @__PURE__ */ n((C) => {
|
|
7644
|
-
|
|
7644
|
+
m && typeof m == "function" ? m(C) : c(
|
|
7645
7645
|
typeof C == "string" ? C : C.message || "ra.notification.http_error",
|
|
7646
7646
|
{
|
|
7647
7647
|
type: "error",
|
|
@@ -7689,7 +7689,7 @@ const Fc = /* @__PURE__ */ n((e) => {
|
|
|
7689
7689
|
let vr = null;
|
|
7690
7690
|
const Wc = /* @__PURE__ */ n(() => {
|
|
7691
7691
|
const { reset: e } = Ge();
|
|
7692
|
-
return
|
|
7692
|
+
return se(() => {
|
|
7693
7693
|
Kh(() => e());
|
|
7694
7694
|
}, [e]), null;
|
|
7695
7695
|
}, "FormResetter"), Kh = /* @__PURE__ */ n((e) => {
|
|
@@ -7712,8 +7712,8 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7712
7712
|
opacity: 0.6,
|
|
7713
7713
|
position: "relative"
|
|
7714
7714
|
}, Qh = /* @__PURE__ */ n((e) => {
|
|
7715
|
-
const t = Ge(), o = vo(), r =
|
|
7716
|
-
return
|
|
7715
|
+
const t = Ge(), o = vo(), r = Ae(hr("etr")).current, s = Kt(), a = o.open ? Jh : zc;
|
|
7716
|
+
return se(
|
|
7717
7717
|
() => () => {
|
|
7718
7718
|
s(fr(r));
|
|
7719
7719
|
},
|
|
@@ -7791,11 +7791,11 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7791
7791
|
camposClaveFila: l,
|
|
7792
7792
|
setOpen: d,
|
|
7793
7793
|
open: p
|
|
7794
|
-
} = e, { dirtyFields: u, isValid:
|
|
7794
|
+
} = e, { dirtyFields: u, isValid: m } = fl(), {
|
|
7795
7795
|
fichaProps: { [e.source]: h = {} } = {},
|
|
7796
|
-
camposCargando:
|
|
7796
|
+
camposCargando: f = []
|
|
7797
7797
|
} = xn(), g = vo(), { onAfterRenderAsistente: y, ...x } = h, S = Ft({ resource: r });
|
|
7798
|
-
return
|
|
7798
|
+
return se(() => {
|
|
7799
7799
|
p && typeof y == "function" && y({ ...S, form: o }, s);
|
|
7800
7800
|
}, [p]), /* @__PURE__ */ k(dt, { children: [
|
|
7801
7801
|
/* @__PURE__ */ i(gi, { className: "Asistente-content", children: /* @__PURE__ */ i(di, { spacing: t.metiri?.fichaVisual ? "19px" : 4, children: Eo.map(a, (P) => {
|
|
@@ -7821,7 +7821,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7821
7821
|
/* @__PURE__ */ i(
|
|
7822
7822
|
mn,
|
|
7823
7823
|
{
|
|
7824
|
-
disabled: Object.keys(u).length === 0 || !
|
|
7824
|
+
disabled: Object.keys(u).length === 0 || !m || g.open || f.length > 0
|
|
7825
7825
|
}
|
|
7826
7826
|
),
|
|
7827
7827
|
/* @__PURE__ */ i(
|
|
@@ -7852,14 +7852,14 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7852
7852
|
onBeforeSubmitAsistente: l = Lo,
|
|
7853
7853
|
onAfterSubmitAsistente: d = Lo,
|
|
7854
7854
|
validateAllowAdd: p
|
|
7855
|
-
} = e, [u,
|
|
7855
|
+
} = e, [u, m] = M.useState(!1), h = ye(e), f = Ge(), g = ao(), y = ic({ apiRef: g, source: a, enviarTodo: c }), x = "N", { estado: S } = Be(), P = Ft(), b = fe()("ra.action.create");
|
|
7856
7856
|
return /* @__PURE__ */ k(dt, { children: [
|
|
7857
7857
|
/* @__PURE__ */ i(
|
|
7858
7858
|
Ze,
|
|
7859
7859
|
{
|
|
7860
7860
|
onClick: /* @__PURE__ */ n((v) => {
|
|
7861
7861
|
const T = p ? p(P) : !0;
|
|
7862
|
-
|
|
7862
|
+
m(T === !0 ? T : !1), v.stopPropagation();
|
|
7863
7863
|
}, "onClick"),
|
|
7864
7864
|
children: /* @__PURE__ */ i(fn, {})
|
|
7865
7865
|
}
|
|
@@ -7869,7 +7869,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7869
7869
|
{
|
|
7870
7870
|
open: u,
|
|
7871
7871
|
onClose: /* @__PURE__ */ n((v) => {
|
|
7872
|
-
|
|
7872
|
+
m(!1), v.stopPropagation();
|
|
7873
7873
|
}, "onClose"),
|
|
7874
7874
|
labelEstado: b,
|
|
7875
7875
|
label: s,
|
|
@@ -7881,13 +7881,13 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7881
7881
|
x,
|
|
7882
7882
|
S
|
|
7883
7883
|
);
|
|
7884
|
-
_ !== !1 && (y(typeof _ == "object" ? _ : v,
|
|
7884
|
+
_ !== !1 && (y(typeof _ == "object" ? _ : v, f), m(!1), d(P, v, x, S));
|
|
7885
7885
|
}, "handleSubmit"),
|
|
7886
7886
|
children: /* @__PURE__ */ i(
|
|
7887
7887
|
Hc,
|
|
7888
7888
|
{
|
|
7889
7889
|
source: a,
|
|
7890
|
-
form:
|
|
7890
|
+
form: f,
|
|
7891
7891
|
resource: h,
|
|
7892
7892
|
estado: x,
|
|
7893
7893
|
editors: t,
|
|
@@ -7895,7 +7895,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7895
7895
|
camposClaveFila: r,
|
|
7896
7896
|
open: u,
|
|
7897
7897
|
setOpen: /* @__PURE__ */ n(() => {
|
|
7898
|
-
|
|
7898
|
+
m(!1);
|
|
7899
7899
|
}, "setOpen")
|
|
7900
7900
|
}
|
|
7901
7901
|
)
|
|
@@ -7913,7 +7913,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7913
7913
|
enviarTodo: l,
|
|
7914
7914
|
onBeforeSubmitAsistente: d = Lo,
|
|
7915
7915
|
onAfterSubmitAsistente: p = Lo
|
|
7916
|
-
} = e, u = fe(), [
|
|
7916
|
+
} = e, u = fe(), [m, h] = M.useState(!1), f = ao(), g = Ge(), y = rc({ apiRef: f, source: a, enviarTodo: l }), x = "M", { estado: S } = Be(), P = Ft(), C = u("ra.action.edit");
|
|
7917
7917
|
return /* @__PURE__ */ k(dt, { children: [
|
|
7918
7918
|
/* @__PURE__ */ i(
|
|
7919
7919
|
Ze,
|
|
@@ -7927,7 +7927,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7927
7927
|
/* @__PURE__ */ i(
|
|
7928
7928
|
Gc,
|
|
7929
7929
|
{
|
|
7930
|
-
open:
|
|
7930
|
+
open: m,
|
|
7931
7931
|
onClose: /* @__PURE__ */ n((I) => {
|
|
7932
7932
|
h(!1), I.stopPropagation();
|
|
7933
7933
|
}, "onClose"),
|
|
@@ -7954,7 +7954,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7954
7954
|
editors: t,
|
|
7955
7955
|
recordPadre: c,
|
|
7956
7956
|
camposClaveFila: o,
|
|
7957
|
-
open:
|
|
7957
|
+
open: m,
|
|
7958
7958
|
setOpen: /* @__PURE__ */ n(() => {
|
|
7959
7959
|
h(!1);
|
|
7960
7960
|
}, "setOpen")
|
|
@@ -7973,7 +7973,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7973
7973
|
enviarTodo: a,
|
|
7974
7974
|
onBeforeSubmitAsistente: c = Lo,
|
|
7975
7975
|
onAfterSubmitAsistente: l = Lo
|
|
7976
|
-
} = e, [d, p] = M.useState(!1), u = ao(),
|
|
7976
|
+
} = e, [d, p] = M.useState(!1), u = ao(), m = Ge(), h = sc({ apiRef: u, source: s, enviarTodo: a }), { estado: f } = Be(), g = Ft();
|
|
7977
7977
|
return /* @__PURE__ */ k(yt, { children: [
|
|
7978
7978
|
/* @__PURE__ */ i(
|
|
7979
7979
|
Xh,
|
|
@@ -7992,7 +7992,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
7992
7992
|
title: t,
|
|
7993
7993
|
content: o,
|
|
7994
7994
|
onConfirm: /* @__PURE__ */ n(async (x) => {
|
|
7995
|
-
await c(g, r, "B",
|
|
7995
|
+
await c(g, r, "B", f) !== !1 && (h(r.id, m), l(g, r, "B", f));
|
|
7996
7996
|
}, "handleSubmit"),
|
|
7997
7997
|
onClose: /* @__PURE__ */ n((x) => {
|
|
7998
7998
|
p(!1), x.stopPropagation();
|
|
@@ -8071,9 +8071,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8071
8071
|
allowRemove: d = !0,
|
|
8072
8072
|
enableLoad: p = !0,
|
|
8073
8073
|
disabled: u,
|
|
8074
|
-
hidden:
|
|
8074
|
+
hidden: m = !1,
|
|
8075
8075
|
apiRef: h,
|
|
8076
|
-
source:
|
|
8076
|
+
source: f,
|
|
8077
8077
|
sxContainer: g = zc,
|
|
8078
8078
|
slotSx: y,
|
|
8079
8079
|
filter: x,
|
|
@@ -8081,21 +8081,21 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8081
8081
|
slotProps: P,
|
|
8082
8082
|
showToolbar: C,
|
|
8083
8083
|
...b
|
|
8084
|
-
} = e, [I, v] = M.useState([]), T =
|
|
8084
|
+
} = e, [I, v] = M.useState([]), T = Ae(null), _ = ut(e), E = Ge(), O = Ae(E), { field: z } = un({ defaultValue: "", ...e }), H = Zr(), {
|
|
8085
8085
|
isActive: W,
|
|
8086
8086
|
hasBeenActive: Z = W
|
|
8087
8087
|
} = wi(), {
|
|
8088
8088
|
isLoading: F,
|
|
8089
|
-
fichaProps: { [
|
|
8090
|
-
propsContenidos: { [
|
|
8091
|
-
} = Be(), X = Bt(), R = Or((ce) => zr(ce.configInputs,
|
|
8089
|
+
fichaProps: { [f]: A } = {},
|
|
8090
|
+
propsContenidos: { [f]: B = {} } = {}
|
|
8091
|
+
} = Be(), X = Bt(), R = Or((ce) => zr(ce.configInputs, f, X)), {
|
|
8092
8092
|
conts: N = []
|
|
8093
8093
|
//user = [],
|
|
8094
8094
|
} = xe(Xe), {
|
|
8095
8095
|
hidden: q,
|
|
8096
8096
|
disabled: te,
|
|
8097
8097
|
label: ae
|
|
8098
|
-
} = N[
|
|
8098
|
+
} = N[f] || {
|
|
8099
8099
|
hidden: 0,
|
|
8100
8100
|
disabled: 0,
|
|
8101
8101
|
label: void 0
|
|
@@ -8104,7 +8104,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8104
8104
|
disabled: L,
|
|
8105
8105
|
hidden: ee,
|
|
8106
8106
|
enableLoad: pe,
|
|
8107
|
-
useContenido:
|
|
8107
|
+
useContenido: De = yn,
|
|
8108
8108
|
onBeforeSubmitAsistente: he,
|
|
8109
8109
|
onAfterSubmitAsistente: Ie,
|
|
8110
8110
|
allowEdit: me,
|
|
@@ -8115,7 +8115,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8115
8115
|
slotProps: ge,
|
|
8116
8116
|
initialState: ne,
|
|
8117
8117
|
validateAllowAdd: $e
|
|
8118
|
-
} = A || {}, Oe = `${
|
|
8118
|
+
} = A || {}, Oe = `${f}_enviartodo`, [Te, pt] = M.useState(r), [{ field: mt, sort: Ce }] = r, ft = te || u || L, nt = ue !== void 0 ? ue : q ? !0 : ee !== void 0 ? ee : m, Ke = B.enableLoad ?? pe ?? p, Yt = me ?? c, V = Re ?? l, $ = He ?? d;
|
|
8119
8119
|
let G = { ...x };
|
|
8120
8120
|
_ && t.split(",").forEach((ce) => {
|
|
8121
8121
|
ce && (G[ce] = [
|
|
@@ -8126,36 +8126,36 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8126
8126
|
field: ce
|
|
8127
8127
|
}
|
|
8128
8128
|
]);
|
|
8129
|
-
}),
|
|
8129
|
+
}), se(() => {
|
|
8130
8130
|
O.current = E;
|
|
8131
|
-
}, [E]),
|
|
8131
|
+
}, [E]), se(() => {
|
|
8132
8132
|
if (!Ke) {
|
|
8133
8133
|
const ce = setTimeout(() => {
|
|
8134
|
-
const Se = ua(h).length > 0, ke = O.current.getValues(
|
|
8135
|
-
!Se && ke !== "" && ke !== void 0 && O.current.setValue(
|
|
8134
|
+
const Se = ua(h).length > 0, ke = O.current.getValues(f);
|
|
8135
|
+
!Se && ke !== "" && ke !== void 0 && O.current.setValue(f, "");
|
|
8136
8136
|
}, 1e3);
|
|
8137
8137
|
return () => clearTimeout(ce);
|
|
8138
8138
|
}
|
|
8139
|
-
}, [h, Ke,
|
|
8139
|
+
}, [h, Ke, f]), se(() => {
|
|
8140
8140
|
const ce = O.current, Se = ce.getValues(Oe);
|
|
8141
8141
|
Y ? Se !== "true" && ce.setValue(Oe, "true") : Se !== void 0 && ce.unregister(Oe);
|
|
8142
|
-
}, [Y, Oe]),
|
|
8142
|
+
}, [Y, Oe]), se(() => {
|
|
8143
8143
|
h.__setEtrRows = v;
|
|
8144
8144
|
const ce = ua(h);
|
|
8145
8145
|
return ce.length > 0 && (T.current = ce, v(ce)), () => {
|
|
8146
8146
|
h.__setEtrRows === v && delete h.__setEtrRows;
|
|
8147
8147
|
};
|
|
8148
8148
|
}, [h]);
|
|
8149
|
-
const Le =
|
|
8150
|
-
|
|
8149
|
+
const Le = Ae();
|
|
8150
|
+
se(() => () => clearTimeout(Le.current), [f]), se(
|
|
8151
8151
|
() => Pm(E.control, () => {
|
|
8152
8152
|
clearTimeout(Le.current);
|
|
8153
8153
|
const ce = T.current, Se = ce ?? [];
|
|
8154
8154
|
h.current?.setRows?.(Se), v(Se);
|
|
8155
8155
|
const ke = O.current;
|
|
8156
|
-
Y && ce ? ke.setValue(
|
|
8156
|
+
Y && ce ? ke.setValue(f, pa(ce)) : ke.getValues(f) !== "" && ke.setValue(f, ""), Y && ke.getValues(Oe) !== "true" && ke.setValue(Oe, "true");
|
|
8157
8157
|
}),
|
|
8158
|
-
[h, E.control,
|
|
8158
|
+
[h, E.control, f, Y, Oe]
|
|
8159
8159
|
);
|
|
8160
8160
|
const { isFetching: Jt, refetch: it } = Ya(
|
|
8161
8161
|
a,
|
|
@@ -8171,28 +8171,28 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8171
8171
|
const Se = ce?.data || [];
|
|
8172
8172
|
if (T.current = Se, Y)
|
|
8173
8173
|
O.current.setValue(
|
|
8174
|
-
|
|
8174
|
+
f,
|
|
8175
8175
|
pa(Se)
|
|
8176
8176
|
);
|
|
8177
8177
|
else {
|
|
8178
8178
|
const ke = /* @__PURE__ */ n(() => {
|
|
8179
8179
|
const Pt = O.current;
|
|
8180
|
-
Pt.getValues(
|
|
8180
|
+
Pt.getValues(f) !== "" && Pt.setValue(f, "");
|
|
8181
8181
|
}, "limpiarValor");
|
|
8182
8182
|
ke(), Le.current = setTimeout(() => {
|
|
8183
|
-
O.current.getFieldState(
|
|
8183
|
+
O.current.getFieldState(f).isDirty || ke();
|
|
8184
8184
|
}, 1e3);
|
|
8185
8185
|
}
|
|
8186
8186
|
v(Se);
|
|
8187
8187
|
}, "onSuccess")
|
|
8188
8188
|
}
|
|
8189
|
-
), _t =
|
|
8189
|
+
), _t = De({
|
|
8190
8190
|
...e,
|
|
8191
8191
|
refetch: it
|
|
8192
8192
|
});
|
|
8193
8193
|
if (_t === void 0)
|
|
8194
8194
|
throw new Error(
|
|
8195
|
-
`useContenido está devolviendo undefined para el contenido ${
|
|
8195
|
+
`useContenido está devolviendo undefined para el contenido ${f}
|
|
8196
8196
|
Asegúrese de incluir una instrucción return al final de la función`
|
|
8197
8197
|
);
|
|
8198
8198
|
const {
|
|
@@ -8204,7 +8204,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8204
8204
|
slots: ht,
|
|
8205
8205
|
slotProps: xt,
|
|
8206
8206
|
...Ye
|
|
8207
|
-
} = B || {}, $t =
|
|
8207
|
+
} = B || {}, $t = re(() => {
|
|
8208
8208
|
const ce = {
|
|
8209
8209
|
...J || {},
|
|
8210
8210
|
...ht || {},
|
|
@@ -8213,7 +8213,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8213
8213
|
noRowsOverlay: jr
|
|
8214
8214
|
};
|
|
8215
8215
|
return typeof ce.toolbar == "boolean" && (ce.toolbar = void 0), ce;
|
|
8216
|
-
}, [J, ht, rt, S]), Je =
|
|
8216
|
+
}, [J, ht, rt, S]), Je = re(
|
|
8217
8217
|
() => ({
|
|
8218
8218
|
...ge || {},
|
|
8219
8219
|
...xt || {},
|
|
@@ -8233,7 +8233,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8233
8233
|
label: Sn,
|
|
8234
8234
|
confirmTitle: Ve,
|
|
8235
8235
|
confirmContent: Mo
|
|
8236
|
-
} = b, Vt =
|
|
8236
|
+
} = b, Vt = re(() => {
|
|
8237
8237
|
const ce = {
|
|
8238
8238
|
editors: Lt,
|
|
8239
8239
|
record: wn,
|
|
@@ -8266,7 +8266,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8266
8266
|
eg,
|
|
8267
8267
|
{
|
|
8268
8268
|
...ce,
|
|
8269
|
-
source:
|
|
8269
|
+
source: f,
|
|
8270
8270
|
onBeforeSubmitAsistente: he,
|
|
8271
8271
|
onAfterSubmitAsistente: Ie,
|
|
8272
8272
|
enviarTodo: Y,
|
|
@@ -8285,7 +8285,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8285
8285
|
{
|
|
8286
8286
|
...ce,
|
|
8287
8287
|
validateAllowAdd: $e,
|
|
8288
|
-
source:
|
|
8288
|
+
source: f,
|
|
8289
8289
|
onBeforeSubmitAsistente: he,
|
|
8290
8290
|
onAfterSubmitAsistente: Ie,
|
|
8291
8291
|
enviarTodo: Y,
|
|
@@ -8304,7 +8304,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8304
8304
|
tg,
|
|
8305
8305
|
{
|
|
8306
8306
|
...ce,
|
|
8307
|
-
source:
|
|
8307
|
+
source: f,
|
|
8308
8308
|
onBeforeSubmitAsistente: he,
|
|
8309
8309
|
onAfterSubmitAsistente: Ie,
|
|
8310
8310
|
enviarTodo: Y,
|
|
@@ -8322,7 +8322,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8322
8322
|
Yt,
|
|
8323
8323
|
V,
|
|
8324
8324
|
$,
|
|
8325
|
-
|
|
8325
|
+
f,
|
|
8326
8326
|
he,
|
|
8327
8327
|
Ie,
|
|
8328
8328
|
Y,
|
|
@@ -8334,7 +8334,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8334
8334
|
Sn,
|
|
8335
8335
|
Ve,
|
|
8336
8336
|
Mo
|
|
8337
|
-
]), vn =
|
|
8337
|
+
]), vn = re(() => {
|
|
8338
8338
|
const ce = new Set(
|
|
8339
8339
|
Vt.filter((Se) => Se.type === "boolean").map((Se) => Se.field)
|
|
8340
8340
|
);
|
|
@@ -8348,7 +8348,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8348
8348
|
)
|
|
8349
8349
|
}
|
|
8350
8350
|
} : Je;
|
|
8351
|
-
}, [Vt, Je]), lo =
|
|
8351
|
+
}, [Vt, Je]), lo = re(
|
|
8352
8352
|
() => ({
|
|
8353
8353
|
...b.initialState?.columns?.columnVisibilityModel || {},
|
|
8354
8354
|
...ne?.columns?.columnVisibilityModel || {},
|
|
@@ -8365,7 +8365,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8365
8365
|
Ye.initialState?.columns?.columnVisibilityModel
|
|
8366
8366
|
)
|
|
8367
8367
|
]
|
|
8368
|
-
), Mn =
|
|
8368
|
+
), Mn = re(
|
|
8369
8369
|
() => ({
|
|
8370
8370
|
...b.initialState || {},
|
|
8371
8371
|
...ne || {},
|
|
@@ -8386,16 +8386,16 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8386
8386
|
JSON.stringify(Ye.initialState),
|
|
8387
8387
|
JSON.stringify(lo)
|
|
8388
8388
|
]
|
|
8389
|
-
), Pn =
|
|
8389
|
+
), Pn = re(
|
|
8390
8390
|
() => Vt.filter(
|
|
8391
8391
|
(ce) => lo[ce?.field] !== !1
|
|
8392
8392
|
),
|
|
8393
8393
|
[Vt, lo]
|
|
8394
|
-
), Po =
|
|
8394
|
+
), Po = re(
|
|
8395
8395
|
() => Pn.reduce((ce, Se) => da(Se?.width) ? ce + Se.width : da(Se?.minWidth) ? ce + Se.minWidth : ce + 140, 0),
|
|
8396
8396
|
[Pn]
|
|
8397
8397
|
);
|
|
8398
|
-
|
|
8398
|
+
se(() => {
|
|
8399
8399
|
if (!W)
|
|
8400
8400
|
return;
|
|
8401
8401
|
const ce = requestAnimationFrame(() => {
|
|
@@ -8403,10 +8403,10 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8403
8403
|
});
|
|
8404
8404
|
return () => cancelAnimationFrame(ce);
|
|
8405
8405
|
}, [h, Po, W]);
|
|
8406
|
-
const ki =
|
|
8406
|
+
const ki = re(
|
|
8407
8407
|
() => y ? [ma, y] : ma,
|
|
8408
8408
|
[y]
|
|
8409
|
-
), Fi =
|
|
8409
|
+
), Fi = re(
|
|
8410
8410
|
() => ({
|
|
8411
8411
|
width: Po > 0 ? `${Po}px` : "100%",
|
|
8412
8412
|
minWidth: "100%",
|
|
@@ -8414,7 +8414,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8414
8414
|
flex: "0 0 auto"
|
|
8415
8415
|
}),
|
|
8416
8416
|
[Po]
|
|
8417
|
-
), zo =
|
|
8417
|
+
), zo = re(
|
|
8418
8418
|
() => ({
|
|
8419
8419
|
width: "100%",
|
|
8420
8420
|
minWidth: 0,
|
|
@@ -8432,7 +8432,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8432
8432
|
Fr,
|
|
8433
8433
|
{
|
|
8434
8434
|
label: ae || e.label,
|
|
8435
|
-
source:
|
|
8435
|
+
source: f,
|
|
8436
8436
|
resource: e.resource,
|
|
8437
8437
|
isRequired: e.isRequired,
|
|
8438
8438
|
sx: ig,
|
|
@@ -8487,7 +8487,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8487
8487
|
enableLoad: a = !0,
|
|
8488
8488
|
initialState: c,
|
|
8489
8489
|
...l
|
|
8490
|
-
} = e, { isLoading: d } = Be(), p = ut(e), [u,
|
|
8490
|
+
} = e, { isLoading: d } = Be(), p = ut(e), [u, m] = oe(o), [{ field: h, sort: f }] = o;
|
|
8491
8491
|
let g = {};
|
|
8492
8492
|
p && t.split(",").forEach((F) => {
|
|
8493
8493
|
F && (g[F] = [
|
|
@@ -8510,7 +8510,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8510
8510
|
s,
|
|
8511
8511
|
{
|
|
8512
8512
|
pagination: { page: 1, perPage: 200 },
|
|
8513
|
-
sort: { field: h, order:
|
|
8513
|
+
sort: { field: h, order: f },
|
|
8514
8514
|
filter: g
|
|
8515
8515
|
},
|
|
8516
8516
|
{
|
|
@@ -8559,7 +8559,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8559
8559
|
paginationModel: { page: 1, pageSize: 50 },
|
|
8560
8560
|
hideFooter: !0,
|
|
8561
8561
|
sortModel: u,
|
|
8562
|
-
onSortModelChange: /* @__PURE__ */ n((F) =>
|
|
8562
|
+
onSortModelChange: /* @__PURE__ */ n((F) => m(F), "onSortModelChange"),
|
|
8563
8563
|
slots: {
|
|
8564
8564
|
//header: <div>This is my custom Toolbar!</div>,
|
|
8565
8565
|
noRowsOverlay: jr
|
|
@@ -8657,9 +8657,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8657
8657
|
location: d = null,
|
|
8658
8658
|
match: p = null,
|
|
8659
8659
|
mutationOptions: u = null,
|
|
8660
|
-
options:
|
|
8660
|
+
options: m = null,
|
|
8661
8661
|
permissions: h = null,
|
|
8662
|
-
transform:
|
|
8662
|
+
transform: f = null,
|
|
8663
8663
|
// ?? nunca al DOM:
|
|
8664
8664
|
isOpen: g = null,
|
|
8665
8665
|
open: y = null,
|
|
@@ -8695,7 +8695,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8695
8695
|
PaperProps: d,
|
|
8696
8696
|
mutationOptions: p,
|
|
8697
8697
|
...u
|
|
8698
|
-
} = e,
|
|
8698
|
+
} = e, m = ye(e), h = r ?? m, f = so({ resource: h }).options?.label, g = ui(), y = fe(), x = qt(), S = M.useCallback(() => {
|
|
8699
8699
|
if (a)
|
|
8700
8700
|
return a();
|
|
8701
8701
|
x("list", h, void 0, void 0, {
|
|
@@ -8713,7 +8713,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8713
8713
|
}
|
|
8714
8714
|
}),
|
|
8715
8715
|
[h, p, S]
|
|
8716
|
-
), C = hu(P), b = o ?? `${y("ra.action.create")} ${h ?
|
|
8716
|
+
), C = hu(P), b = o ?? `${y("ra.action.create")} ${h ? f || g(h, 1) : ""}`.trim(), I = /* @__PURE__ */ i(Ao, { value: h, children: /* @__PURE__ */ i(gu, { value: C, children: t }) });
|
|
8717
8717
|
return /* @__PURE__ */ i(dt, { children: s && /* @__PURE__ */ k(
|
|
8718
8718
|
ti,
|
|
8719
8719
|
{
|
|
@@ -8762,7 +8762,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8762
8762
|
r(!0);
|
|
8763
8763
|
}, []), a = ie(() => {
|
|
8764
8764
|
r(!1);
|
|
8765
|
-
}, []), c =
|
|
8765
|
+
}, []), c = re(
|
|
8766
8766
|
() => ({
|
|
8767
8767
|
isOpen: o,
|
|
8768
8768
|
open: s,
|
|
@@ -8774,23 +8774,23 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8774
8774
|
label: d = "",
|
|
8775
8775
|
inline: p,
|
|
8776
8776
|
dialog: u,
|
|
8777
|
-
ButtonProps:
|
|
8777
|
+
ButtonProps: m
|
|
8778
8778
|
} = e, h = ie(
|
|
8779
8779
|
(y) => {
|
|
8780
8780
|
s(), y.stopPropagation();
|
|
8781
8781
|
},
|
|
8782
8782
|
[s]
|
|
8783
|
-
),
|
|
8783
|
+
), f = t(d, { _: d }), g = p ? /* @__PURE__ */ i(kt, { title: f, children: /* @__PURE__ */ i(
|
|
8784
8784
|
gt,
|
|
8785
8785
|
{
|
|
8786
|
-
"aria-label":
|
|
8786
|
+
"aria-label": f,
|
|
8787
8787
|
size: "small",
|
|
8788
8788
|
color: "primary",
|
|
8789
|
-
...
|
|
8789
|
+
...m,
|
|
8790
8790
|
onClick: h,
|
|
8791
8791
|
children: l
|
|
8792
8792
|
}
|
|
8793
|
-
) }) : /* @__PURE__ */ i(Ze, { label:
|
|
8793
|
+
) }) : /* @__PURE__ */ i(Ze, { label: f, ...m, onClick: h, children: l });
|
|
8794
8794
|
return /* @__PURE__ */ k(Kc.Provider, { value: c, children: [
|
|
8795
8795
|
g,
|
|
8796
8796
|
u
|
|
@@ -8814,7 +8814,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8814
8814
|
}
|
|
8815
8815
|
);
|
|
8816
8816
|
}, "CreateInDialogButton"), fg = /* @__PURE__ */ i(fn, {}), jn = /* @__PURE__ */ new Set(), hg = /* @__PURE__ */ n((e) => {
|
|
8817
|
-
const { children: t, enableLoad: o, queryOptions: r, fichaProps: s, mutationOptions: a } = e, [c, l] = oe(null), d = bt(), p = Ht(), u = ye(e),
|
|
8817
|
+
const { children: t, enableLoad: o, queryOptions: r, fichaProps: s, mutationOptions: a } = e, [c, l] = oe(null), d = bt(), p = Ht(), u = ye(e), m = Pi(u), h = e.estado ?? (d?.state?.estado || "N"), f = d?.state?.record, g = e.record ?? f, y = e.id ?? d?.state?.id ?? g?.id ?? "-1", x = `${u}:${h}:${y}`, P = y === "-1" && g && typeof g == "object" && !Array.isArray(g) ? Object.fromEntries(
|
|
8818
8818
|
Object.entries(g).filter(
|
|
8819
8819
|
([, z]) => z != null && (typeof z == "string" || typeof z == "number" || typeof z == "boolean")
|
|
8820
8820
|
)
|
|
@@ -8826,10 +8826,10 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8826
8826
|
}, { data: b, isFetching: I } = ag(
|
|
8827
8827
|
u,
|
|
8828
8828
|
{
|
|
8829
|
-
enabled: o && !
|
|
8829
|
+
enabled: o && !m
|
|
8830
8830
|
},
|
|
8831
8831
|
C
|
|
8832
|
-
), v =
|
|
8832
|
+
), v = m?.record || m?.initialValues || b, _ = (m ? !1 : I) && !v, E = g && typeof g == "object" && !Array.isArray(g) ? { ...v || {}, ...g } : v, O = re(
|
|
8833
8833
|
() => ({
|
|
8834
8834
|
estado: h,
|
|
8835
8835
|
initialValues: E || {},
|
|
@@ -8847,9 +8847,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8847
8847
|
x
|
|
8848
8848
|
]
|
|
8849
8849
|
);
|
|
8850
|
-
return
|
|
8850
|
+
return se(() => {
|
|
8851
8851
|
let z = !0;
|
|
8852
|
-
return
|
|
8852
|
+
return m ? (l(m.formConfig || {}), () => {
|
|
8853
8853
|
z = !1;
|
|
8854
8854
|
}) : o ? (l(null), _ ? () => {
|
|
8855
8855
|
z = !1;
|
|
@@ -8868,7 +8868,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8868
8868
|
h,
|
|
8869
8869
|
_,
|
|
8870
8870
|
u,
|
|
8871
|
-
|
|
8871
|
+
m,
|
|
8872
8872
|
x
|
|
8873
8873
|
]), o && c === null ? /* @__PURE__ */ i(So, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i(Hr, { value: O, children: /* @__PURE__ */ i(Xe.Provider, { value: c, children: t }) });
|
|
8874
8874
|
}, "CreateChildren"), fa = /* @__PURE__ */ n((e) => {
|
|
@@ -8882,9 +8882,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8882
8882
|
children: d,
|
|
8883
8883
|
estado: p,
|
|
8884
8884
|
id: u,
|
|
8885
|
-
record:
|
|
8885
|
+
record: m,
|
|
8886
8886
|
...h
|
|
8887
|
-
} = e,
|
|
8887
|
+
} = e, f = p ?? (t?.state?.estado || "N"), { fichaProps: g } = ts({ ...e, estado: f }), y = s === "ventana" ? mg : bu, x = re(
|
|
8888
8888
|
() => ln(
|
|
8889
8889
|
ln(
|
|
8890
8890
|
c,
|
|
@@ -8907,9 +8907,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8907
8907
|
children: /* @__PURE__ */ i(
|
|
8908
8908
|
hg,
|
|
8909
8909
|
{
|
|
8910
|
-
estado:
|
|
8910
|
+
estado: f,
|
|
8911
8911
|
id: u,
|
|
8912
|
-
record:
|
|
8912
|
+
record: m,
|
|
8913
8913
|
fichaProps: g,
|
|
8914
8914
|
enableLoad: r,
|
|
8915
8915
|
queryOptions: a,
|
|
@@ -8924,12 +8924,12 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8924
8924
|
const t = bt(), o = Ot(), r = qt(), s = Mt(), a = ye(e), c = so({ resource: a }).options?.label, l = ci({
|
|
8925
8925
|
resource: a,
|
|
8926
8926
|
dockviewTabParent: !0
|
|
8927
|
-
}), d = ui(), p = fe(), u =
|
|
8928
|
-
return
|
|
8929
|
-
if (!
|
|
8927
|
+
}), d = ui(), p = fe(), u = Ae(!1), m = t?.state?._asistentePopup === "router" && typeof o?.show == "function", h = m ? `${a}:create` : null;
|
|
8928
|
+
return se(() => {
|
|
8929
|
+
if (!m || u.current || (u.current = !0, h && (jn.has(h) || o?.open && o?.props?._popupKey === h) || !h))
|
|
8930
8930
|
return;
|
|
8931
8931
|
h && jn.add(h);
|
|
8932
|
-
const
|
|
8932
|
+
const f = /* @__PURE__ */ n(() => {
|
|
8933
8933
|
h && jn.delete(h), h ? o.hide({ popupKey: h }) : o.hide(), r("list", a, void 0, void 0, {
|
|
8934
8934
|
_scrollToTop: !1
|
|
8935
8935
|
});
|
|
@@ -8946,7 +8946,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8946
8946
|
o.show({
|
|
8947
8947
|
title: x,
|
|
8948
8948
|
tipo: "vista",
|
|
8949
|
-
cancelar:
|
|
8949
|
+
cancelar: f,
|
|
8950
8950
|
dialogProps: l,
|
|
8951
8951
|
_popupKey: h,
|
|
8952
8952
|
controles: /* @__PURE__ */ i(Ao, { value: a, children: /* @__PURE__ */ i(
|
|
@@ -8962,7 +8962,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8962
8962
|
}, [
|
|
8963
8963
|
o,
|
|
8964
8964
|
d,
|
|
8965
|
-
|
|
8965
|
+
m,
|
|
8966
8966
|
s,
|
|
8967
8967
|
l,
|
|
8968
8968
|
h,
|
|
@@ -8971,7 +8971,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
8971
8971
|
a,
|
|
8972
8972
|
c,
|
|
8973
8973
|
p
|
|
8974
|
-
]),
|
|
8974
|
+
]), m ? null : /* @__PURE__ */ i(fa, { ...e });
|
|
8975
8975
|
}, "CreateEtriek"), Ty = Ut(gg, {
|
|
8976
8976
|
name: cn,
|
|
8977
8977
|
overridesResolver: /* @__PURE__ */ n((e, t) => t.root, "overridesResolver")
|
|
@@ -9008,7 +9008,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9008
9008
|
}, p = xu({
|
|
9009
9009
|
...s,
|
|
9010
9010
|
mutationOptions: d
|
|
9011
|
-
}), { defaultTitle: u, record:
|
|
9011
|
+
}), { defaultTitle: u, record: m, resource: h } = p, f = /* @__PURE__ */ n(() => {
|
|
9012
9012
|
s.close ? s.close() : a("list", s.resource, void 0, void 0, {
|
|
9013
9013
|
_scrollToTop: !1
|
|
9014
9014
|
});
|
|
@@ -9023,7 +9023,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9023
9023
|
{
|
|
9024
9024
|
open: s.isOpen,
|
|
9025
9025
|
"aria-labelledby": "list-dialog-title",
|
|
9026
|
-
onClose:
|
|
9026
|
+
onClose: f,
|
|
9027
9027
|
"data-testid": "list-dialog",
|
|
9028
9028
|
disableEnforceFocus: y,
|
|
9029
9029
|
disableAutoFocus: x,
|
|
@@ -9036,8 +9036,8 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9036
9036
|
id: "list-dialog-title",
|
|
9037
9037
|
title: o,
|
|
9038
9038
|
defaultTitle: u,
|
|
9039
|
-
record:
|
|
9040
|
-
onClose:
|
|
9039
|
+
record: m,
|
|
9040
|
+
onClose: f
|
|
9041
9041
|
}
|
|
9042
9042
|
),
|
|
9043
9043
|
/* @__PURE__ */ i(Qa, { value: p, children: e })
|
|
@@ -9056,9 +9056,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9056
9056
|
match: d = null,
|
|
9057
9057
|
mutationOptions: p = null,
|
|
9058
9058
|
options: u = null,
|
|
9059
|
-
permissions:
|
|
9059
|
+
permissions: m = null,
|
|
9060
9060
|
transform: h = null,
|
|
9061
|
-
isOpen:
|
|
9061
|
+
isOpen: f = null,
|
|
9062
9062
|
open: g = null,
|
|
9063
9063
|
close: y = null,
|
|
9064
9064
|
...x
|
|
@@ -9095,17 +9095,17 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9095
9095
|
onSelectionChange: d,
|
|
9096
9096
|
storeKey: p,
|
|
9097
9097
|
...u
|
|
9098
|
-
} = e,
|
|
9098
|
+
} = e, m = xe(rn), h = o === "ventana" ? yg : Za, f = Pi(t), { pathname: g, state: y } = bt(), x = Ht(), [S, P] = oe(null), [C, b] = oe(a), [I, v] = oe([]), [T, _] = oe({}), [E, O] = oe(
|
|
9099
9099
|
u.sort || { field: "id", order: "ASC" }
|
|
9100
9100
|
), [z, H] = oe(
|
|
9101
9101
|
ga
|
|
9102
|
-
), W =
|
|
9102
|
+
), W = Ae(null), Z = /* @__PURE__ */ n((q) => {
|
|
9103
9103
|
b(q.target.checked);
|
|
9104
9104
|
}, "handleChange"), F = ie((q) => {
|
|
9105
9105
|
v(
|
|
9106
9106
|
(te) => te.includes(q) ? te.filter((ae) => ae !== q) : [...te, q]
|
|
9107
9107
|
);
|
|
9108
|
-
}, []), A =
|
|
9108
|
+
}, []), A = f?.rows || f?.data || [], B = M.useMemo(
|
|
9109
9109
|
() => ({
|
|
9110
9110
|
data: A,
|
|
9111
9111
|
total: A.length,
|
|
@@ -9144,9 +9144,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9144
9144
|
E
|
|
9145
9145
|
]
|
|
9146
9146
|
);
|
|
9147
|
-
if (
|
|
9148
|
-
if (
|
|
9149
|
-
P(
|
|
9147
|
+
if (se(() => {
|
|
9148
|
+
if (f) {
|
|
9149
|
+
P(f.gridConfig || {});
|
|
9150
9150
|
return;
|
|
9151
9151
|
}
|
|
9152
9152
|
x.getGrillaConfig(t, y).then((q) => {
|
|
@@ -9154,7 +9154,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9154
9154
|
}).catch((q) => {
|
|
9155
9155
|
S === null && P({});
|
|
9156
9156
|
});
|
|
9157
|
-
}, [x, t,
|
|
9157
|
+
}, [x, t, f, y]), se(() => {
|
|
9158
9158
|
const q = W.current;
|
|
9159
9159
|
if (!q)
|
|
9160
9160
|
return;
|
|
@@ -9184,7 +9184,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9184
9184
|
return /* @__PURE__ */ i(So, { loadingPrimary: "", loadingSecondary: "", timeout: 0 });
|
|
9185
9185
|
let X = u.filter, R = u.queryOptions;
|
|
9186
9186
|
const N = u.filters === void 0 ? /* @__PURE__ */ i(vg, {}) : u.filters;
|
|
9187
|
-
return y && g.substring(1) === t && (X = y.filter ?? u.filter, R = y?.meta ? { meta: { ...y.meta } } : u.queryOptions),
|
|
9187
|
+
return y && g.substring(1) === t && (X = y.filter ?? u.filter, R = y?.meta ? { meta: { ...y.meta } } : u.queryOptions), f ? /* @__PURE__ */ i(
|
|
9188
9188
|
Ds,
|
|
9189
9189
|
{
|
|
9190
9190
|
hasCreate: r,
|
|
@@ -9310,7 +9310,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9310
9310
|
},
|
|
9311
9311
|
...u.sx
|
|
9312
9312
|
},
|
|
9313
|
-
disableSyncWithLocation: !!
|
|
9313
|
+
disableSyncWithLocation: !!m,
|
|
9314
9314
|
storeKey: p ?? `${t}.listParams`
|
|
9315
9315
|
}
|
|
9316
9316
|
) })
|
|
@@ -9359,21 +9359,21 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9359
9359
|
typeof e[o] == "string" && e[o].trim().length === 0 || (e[o] == null && (e[o] = ""), t[o] = e[o]);
|
|
9360
9360
|
return t;
|
|
9361
9361
|
}, "defaultTransform"), Rg = /* @__PURE__ */ n((e) => {
|
|
9362
|
-
const { children: t, fichaProps: o, mutationOptions: r } = e, s = Su(), [a, c] = oe(null), l = bt(), d = Ht(), p = ye(e), u = Pi(p), { record:
|
|
9363
|
-
|
|
9364
|
-
!g &&
|
|
9365
|
-
}, [g,
|
|
9366
|
-
const b =
|
|
9362
|
+
const { children: t, fichaProps: o, mutationOptions: r } = e, s = Su(), [a, c] = oe(null), l = bt(), d = Ht(), p = ye(e), u = Pi(p), { record: m, isFetching: h } = s, f = u?.record || u?.initialValues || m, g = u ? !1 : h, y = e.estado ?? (l?.state?.estado || "M"), x = m?.id ?? l?.state?.id ?? "edit", S = `${p}:${y}:${x}`, P = Ae(null), C = g && P.current !== S;
|
|
9363
|
+
se(() => {
|
|
9364
|
+
!g && f && (P.current = S);
|
|
9365
|
+
}, [g, f, S]);
|
|
9366
|
+
const b = re(
|
|
9367
9367
|
() => ({
|
|
9368
9368
|
estado: y,
|
|
9369
|
-
initialValues:
|
|
9369
|
+
initialValues: f,
|
|
9370
9370
|
isLoading: C,
|
|
9371
9371
|
mutationOptions: r,
|
|
9372
9372
|
fichaProps: o,
|
|
9373
9373
|
scopeIdentity: S
|
|
9374
9374
|
}),
|
|
9375
9375
|
[
|
|
9376
|
-
|
|
9376
|
+
f,
|
|
9377
9377
|
C,
|
|
9378
9378
|
r,
|
|
9379
9379
|
o,
|
|
@@ -9381,7 +9381,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9381
9381
|
S
|
|
9382
9382
|
]
|
|
9383
9383
|
);
|
|
9384
|
-
return
|
|
9384
|
+
return se(() => {
|
|
9385
9385
|
let I = !0;
|
|
9386
9386
|
return u ? (c(u.formConfig || {}), () => {
|
|
9387
9387
|
I = !1;
|
|
@@ -9410,38 +9410,38 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9410
9410
|
popupMutationOptions: a,
|
|
9411
9411
|
children: c,
|
|
9412
9412
|
...l
|
|
9413
|
-
} = e, d = al(), p = Nl(e) ?? d?.id, u = e.estado ?? (t?.state?.estado || "M"), { fichaProps:
|
|
9413
|
+
} = e, d = al(), p = Nl(e) ?? d?.id, u = e.estado ?? (t?.state?.estado || "M"), { fichaProps: m } = ts({ ...e, estado: u }), h = re(
|
|
9414
9414
|
() => ln(
|
|
9415
9415
|
ln(
|
|
9416
9416
|
s,
|
|
9417
|
-
|
|
9417
|
+
m?.panel?.mutationOptions
|
|
9418
9418
|
),
|
|
9419
9419
|
a
|
|
9420
9420
|
),
|
|
9421
9421
|
[
|
|
9422
9422
|
s,
|
|
9423
|
-
|
|
9423
|
+
m?.panel?.mutationOptions,
|
|
9424
9424
|
a
|
|
9425
9425
|
]
|
|
9426
|
-
),
|
|
9426
|
+
), f = l.queryOptions ?? m?.panel?.queryOptions, g = /* @__PURE__ */ i(
|
|
9427
9427
|
wu,
|
|
9428
9428
|
{
|
|
9429
9429
|
emptyWhileLoading: !0,
|
|
9430
9430
|
mutationMode: r,
|
|
9431
9431
|
transform: Ig,
|
|
9432
9432
|
id: p,
|
|
9433
|
-
...
|
|
9433
|
+
...m?.panel,
|
|
9434
9434
|
...l,
|
|
9435
9435
|
queryOptions: {
|
|
9436
|
-
...
|
|
9437
|
-
meta: { ...
|
|
9436
|
+
...f,
|
|
9437
|
+
meta: { ...f?.meta, estado: u }
|
|
9438
9438
|
},
|
|
9439
9439
|
mutationOptions: h,
|
|
9440
9440
|
children: /* @__PURE__ */ i(
|
|
9441
9441
|
Rg,
|
|
9442
9442
|
{
|
|
9443
9443
|
estado: u,
|
|
9444
|
-
fichaProps:
|
|
9444
|
+
fichaProps: m,
|
|
9445
9445
|
mutationOptions: h,
|
|
9446
9446
|
children: c
|
|
9447
9447
|
}
|
|
@@ -9453,9 +9453,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9453
9453
|
const t = bt(), o = Ot(), r = qt(), s = Mt(), a = ye(e), c = so({ resource: a }).options?.label, l = ci({
|
|
9454
9454
|
resource: a,
|
|
9455
9455
|
dockviewTabParent: !0
|
|
9456
|
-
}), d = ui(), p = fe(), u = al(),
|
|
9457
|
-
return
|
|
9458
|
-
if (!y ||
|
|
9456
|
+
}), d = ui(), p = fe(), u = al(), m = Ae(!1), h = t?.state?._asistentePopup === "router" && typeof o?.show == "function", f = nn(`/${a}/:id/*`, t.pathname) || nn(`/${a}/:id`, t.pathname), g = e.id ?? u?.id ?? t?.state?.id ?? t?.state?.record?.id ?? e.record?.id ?? f?.params?.id, y = h && !!g, x = y ? `${a}:${g}` : null;
|
|
9457
|
+
return se(() => {
|
|
9458
|
+
if (!y || m.current || (m.current = !0, x && (Un.has(x) || o?.open && o?.props?._popupKey === x) || !x))
|
|
9459
9459
|
return;
|
|
9460
9460
|
x && Un.add(x);
|
|
9461
9461
|
const S = /* @__PURE__ */ n(() => {
|
|
@@ -9515,8 +9515,8 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9515
9515
|
hasAccept: d = !0,
|
|
9516
9516
|
hasCancel: p = !0,
|
|
9517
9517
|
isLoading: u = !1
|
|
9518
|
-
} = e,
|
|
9519
|
-
s && s(
|
|
9518
|
+
} = e, m = ye(e), h = /* @__PURE__ */ n((f) => {
|
|
9519
|
+
s && s(f);
|
|
9520
9520
|
}, "handleClose");
|
|
9521
9521
|
return /* @__PURE__ */ k(
|
|
9522
9522
|
fi,
|
|
@@ -9528,7 +9528,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9528
9528
|
"aria-labelledby": "form-dialog-title",
|
|
9529
9529
|
children: [
|
|
9530
9530
|
/* @__PURE__ */ i(bi, { id: "form-dialog-title", children: a }),
|
|
9531
|
-
/* @__PURE__ */ k(Vo, { resource:
|
|
9531
|
+
/* @__PURE__ */ k(Vo, { resource: m, onSubmit: r, children: [
|
|
9532
9532
|
/* @__PURE__ */ k(gi, { dividers: !0, children: [
|
|
9533
9533
|
/* @__PURE__ */ i(cl, { children: c }),
|
|
9534
9534
|
/* @__PURE__ */ i(Pe, { sx: { mt: 2 }, children: l })
|
|
@@ -9539,7 +9539,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9539
9539
|
{
|
|
9540
9540
|
label: "ra.action.cancel",
|
|
9541
9541
|
disabled: u,
|
|
9542
|
-
onClick: /* @__PURE__ */ n((
|
|
9542
|
+
onClick: /* @__PURE__ */ n((f) => h(f), "onClick"),
|
|
9543
9543
|
children: /* @__PURE__ */ i(tn, {})
|
|
9544
9544
|
}
|
|
9545
9545
|
),
|
|
@@ -9567,7 +9567,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9567
9567
|
animationName: "mui-auto-fill"
|
|
9568
9568
|
}
|
|
9569
9569
|
}, Jc = /* @__PURE__ */ n((e) => {
|
|
9570
|
-
const t = mi(), o =
|
|
9570
|
+
const t = mi(), o = re(
|
|
9571
9571
|
() => ({
|
|
9572
9572
|
...t,
|
|
9573
9573
|
components: {
|
|
@@ -9603,13 +9603,11 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9603
9603
|
}
|
|
9604
9604
|
}),
|
|
9605
9605
|
[t]
|
|
9606
|
-
), r = ye(e), { estado: s, isLoading: a, initialValues: c, fichaProps: l } = Be(), d = Ft({ resource: r }), p = a || !d.form?.formState.isReady;
|
|
9607
|
-
|
|
9608
|
-
l.onRenderFicha && l.
|
|
9609
|
-
}, []), re(() => {
|
|
9610
|
-
p || l.onLoadFicha && l.onLoadFicha(d, s, c);
|
|
9606
|
+
), r = ye(e), { estado: s, isLoading: a, initialValues: c, fichaProps: l } = Be(), d = Ft({ resource: r }), p = a || !d.form?.formState.isReady, u = Ae(!1);
|
|
9607
|
+
se(() => {
|
|
9608
|
+
p || (u.current || (u.current = !0, l.onRenderFicha?.(d, s)), l.onLoadFicha && l.onLoadFicha(d, s, c));
|
|
9611
9609
|
}, [p]);
|
|
9612
|
-
const
|
|
9610
|
+
const m = re(
|
|
9613
9611
|
() => p ? null : t.metiri?.fichaVisual ? Gh(e.children) : e.children,
|
|
9614
9612
|
[e.children, t.metiri?.fichaVisual, p]
|
|
9615
9613
|
);
|
|
@@ -9623,7 +9621,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9623
9621
|
timeout: 0
|
|
9624
9622
|
}
|
|
9625
9623
|
);
|
|
9626
|
-
const
|
|
9624
|
+
const h = [
|
|
9627
9625
|
{
|
|
9628
9626
|
display: "flex",
|
|
9629
9627
|
flexDirection: "column",
|
|
@@ -9635,10 +9633,10 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9635
9633
|
},
|
|
9636
9634
|
e.sx
|
|
9637
9635
|
];
|
|
9638
|
-
return /* @__PURE__ */ i(Q, { component: Oa, className: e.className, sx:
|
|
9636
|
+
return /* @__PURE__ */ i(Q, { component: Oa, className: e.className, sx: h, children: t.metiri?.fichaVisual ? /* @__PURE__ */ k(Ar, { theme: o, children: [
|
|
9639
9637
|
/* @__PURE__ */ i(Gd, { styles: kg }),
|
|
9640
|
-
|
|
9641
|
-
] }) :
|
|
9638
|
+
m
|
|
9639
|
+
] }) : m });
|
|
9642
9640
|
}, "FormContainer"), _g = {}, Ag = {
|
|
9643
9641
|
pointerEvents: "none",
|
|
9644
9642
|
backgroundColor: "#ffffff",
|
|
@@ -9646,7 +9644,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9646
9644
|
}, Dg = ".MuiDialog-paper", Qi = /* @__PURE__ */ n((e) => {
|
|
9647
9645
|
e.preventDefault();
|
|
9648
9646
|
}, "disableKeyboardEvents"), Eg = /* @__PURE__ */ n(() => typeof document > "u" ? !1 : !!document.activeElement?.closest?.(Dg), "isDialogInteraction"), Og = /* @__PURE__ */ n((e, t) => typeof e?.hide != "function" || !e?.open ? !1 : t ? !0 : Eg() ? !!(e?.props?._popupKey || e?.props?.tipo === "vista") : !1, "canHideAsistentePopup"), Qc = /* @__PURE__ */ n((e) => {
|
|
9649
|
-
const t = vo(), o = bt(), r = ye(), s = qt(), a = ut(), c = Ot(), { estado: l, mutationOptions: d = {}, camposCargando: p = [] } = xn(), u = d?._popupKey,
|
|
9647
|
+
const t = vo(), o = bt(), r = ye(), s = qt(), a = ut(), c = Ot(), { estado: l, mutationOptions: d = {}, camposCargando: p = [] } = xn(), u = d?._popupKey, m = l === "B" || o.state?.estado === "B", h = Ti({ borrar: m, ...e }), f = t.open || m, g = t.open ? Ag : _g;
|
|
9650
9648
|
return /* @__PURE__ */ k(dt, { children: [
|
|
9651
9649
|
t.open && /* @__PURE__ */ i(
|
|
9652
9650
|
So,
|
|
@@ -9665,24 +9663,24 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9665
9663
|
flexDirection: "column",
|
|
9666
9664
|
flex: 1,
|
|
9667
9665
|
minHeight: 0,
|
|
9668
|
-
opacity:
|
|
9669
|
-
pointerEvents:
|
|
9666
|
+
opacity: f ? 0.6 : 1,
|
|
9667
|
+
pointerEvents: f ? "none" : "auto",
|
|
9670
9668
|
...g
|
|
9671
9669
|
},
|
|
9672
|
-
onKeyDown:
|
|
9673
|
-
onKeyPress:
|
|
9674
|
-
onKeyUp:
|
|
9670
|
+
onKeyDown: f ? Qi : void 0,
|
|
9671
|
+
onKeyPress: f ? Qi : void 0,
|
|
9672
|
+
onKeyUp: f ? Qi : void 0,
|
|
9675
9673
|
onSubmitCapture: /* @__PURE__ */ n((y) => {
|
|
9676
9674
|
p.length > 0 && (y.preventDefault(), y.stopPropagation());
|
|
9677
9675
|
}, "onSubmitCapture"),
|
|
9678
|
-
disabled:
|
|
9676
|
+
disabled: f,
|
|
9679
9677
|
children: e.children
|
|
9680
9678
|
}
|
|
9681
9679
|
),
|
|
9682
9680
|
/* @__PURE__ */ i(
|
|
9683
9681
|
pn,
|
|
9684
9682
|
{
|
|
9685
|
-
isOpen:
|
|
9683
|
+
isOpen: m,
|
|
9686
9684
|
title: "pos.delete_title",
|
|
9687
9685
|
content: "pos.delete_confirm",
|
|
9688
9686
|
onConfirm: /* @__PURE__ */ n(async () => {
|
|
@@ -9815,14 +9813,14 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9815
9813
|
fichaProps: { config: d = {} } = {}
|
|
9816
9814
|
} = Be(), p = Ti(e);
|
|
9817
9815
|
if (!c) return null;
|
|
9818
|
-
const { toolbar: u, ...
|
|
9816
|
+
const { toolbar: u, ...m } = d, h = u !== void 0 ? u : s !== void 0 ? s : /* @__PURE__ */ i(Ri, { deleteButton: r });
|
|
9819
9817
|
return /* @__PURE__ */ i(Jl, { children: /* @__PURE__ */ i(Qc, { children: /* @__PURE__ */ i(
|
|
9820
9818
|
Ng,
|
|
9821
9819
|
{
|
|
9822
9820
|
mode: "onBlur",
|
|
9823
9821
|
onSubmit: p,
|
|
9824
9822
|
defaultValues: c,
|
|
9825
|
-
...
|
|
9823
|
+
...m,
|
|
9826
9824
|
...a,
|
|
9827
9825
|
className: [a.className, "FichaVisual-root"].filter(Boolean).join(" "),
|
|
9828
9826
|
children: /* @__PURE__ */ k(
|
|
@@ -9896,10 +9894,10 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9896
9894
|
);
|
|
9897
9895
|
}) });
|
|
9898
9896
|
}, "renderMenu"), zg = /* @__PURE__ */ n(({ dense: e = !1 }) => {
|
|
9899
|
-
const t = fe(), [o, r] = oe({ mnuPrueba: !1 }), s = wt((h) => h.breakpoints.down("sm")), [a] = el(), c = JSON.parse(localStorage.getItem("menus")),
|
|
9897
|
+
const t = fe(), [o, r] = oe({ mnuPrueba: !1 }), s = wt((h) => h.breakpoints.down("sm")), [a] = el(), c = JSON.parse(localStorage.getItem("menus")), m = Zc({
|
|
9900
9898
|
items: c,
|
|
9901
9899
|
handleToggle: /* @__PURE__ */ n((h) => {
|
|
9902
|
-
r((
|
|
9900
|
+
r((f) => ({ ...f, [h]: !f[h] }));
|
|
9903
9901
|
}, "handleToggle"),
|
|
9904
9902
|
state: o,
|
|
9905
9903
|
activeClassName: "",
|
|
@@ -9928,7 +9926,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9928
9926
|
primaryText: t("ra.page.dashboard")
|
|
9929
9927
|
}
|
|
9930
9928
|
),
|
|
9931
|
-
|
|
9929
|
+
m,
|
|
9932
9930
|
s && /* @__PURE__ */ i(
|
|
9933
9931
|
tl,
|
|
9934
9932
|
{
|
|
@@ -9996,7 +9994,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
9996
9994
|
jsBotonGrilla: d = qg,
|
|
9997
9995
|
refresh: p = !0,
|
|
9998
9996
|
...u
|
|
9999
|
-
} = e, [
|
|
9997
|
+
} = e, [m, h] = M.useState(null), [f, g] = M.useState(null), [y, x] = M.useState({}), S = fe(), P = jt(), { displayedFilters: C, filterValues: b, exporter: I, showFilter: v } = P, T = ye(e), { hasCreate: _ } = so(e), E = xe(Iu) || r, O = Ci(e), z = xe(Xe) || {}, {
|
|
10000
9998
|
props: {
|
|
10001
9999
|
hasCreate: H,
|
|
10002
10000
|
hasSeleccionMultiple: W,
|
|
@@ -10014,7 +10012,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10014
10012
|
}
|
|
10015
10013
|
} = Xt(), Y = !q && X === "pivot" ? "grilla" : X, { showCreate: L } = Qr({ resource: T }), ee = wt((J) => J.breakpoints.down("md"));
|
|
10016
10014
|
Ed(t, () => A.current);
|
|
10017
|
-
const pe = { ...O, ...P },
|
|
10015
|
+
const pe = { ...O, ...P }, De = /* @__PURE__ */ n((J) => {
|
|
10018
10016
|
h(J.currentTarget);
|
|
10019
10017
|
}, "handleOpenMenu"), he = /* @__PURE__ */ n(() => {
|
|
10020
10018
|
h(null), g(null);
|
|
@@ -10132,7 +10130,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10132
10130
|
R,
|
|
10133
10131
|
S
|
|
10134
10132
|
]);
|
|
10135
|
-
return
|
|
10133
|
+
return se(() => {
|
|
10136
10134
|
x((J) => {
|
|
10137
10135
|
const ge = { ...J };
|
|
10138
10136
|
return Ue.forEach((ne) => {
|
|
@@ -10146,7 +10144,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10146
10144
|
}
|
|
10147
10145
|
}), ge;
|
|
10148
10146
|
});
|
|
10149
|
-
}, [Ue]),
|
|
10147
|
+
}, [Ue]), re(
|
|
10150
10148
|
() => /* @__PURE__ */ k(dt, { children: [
|
|
10151
10149
|
/* @__PURE__ */ i(
|
|
10152
10150
|
"div",
|
|
@@ -10182,13 +10180,13 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10182
10180
|
),
|
|
10183
10181
|
p !== !1 && /* @__PURE__ */ i(Gg, { resource: T }),
|
|
10184
10182
|
q && te !== "custom" && Y === "pivot" && /* @__PURE__ */ i(gt, { onClick: me, children: /* @__PURE__ */ i(oi, {}) }),
|
|
10185
|
-
!l && Ue.length > 0 && /* @__PURE__ */ i(gt, { className: "metiri-grid-menu-button", "aria-label": S("pos.grid_more_actions"), "aria-haspopup": "menu", "aria-expanded": !!
|
|
10183
|
+
!l && Ue.length > 0 && /* @__PURE__ */ i(gt, { className: "metiri-grid-menu-button", "aria-label": S("pos.grid_more_actions"), "aria-haspopup": "menu", "aria-expanded": !!m, onClick: De, children: /* @__PURE__ */ i(bl, {}) }),
|
|
10186
10184
|
!l && Ue.length > 0 && /* @__PURE__ */ i(
|
|
10187
10185
|
xo,
|
|
10188
10186
|
{
|
|
10189
10187
|
sx: ac,
|
|
10190
|
-
anchorEl:
|
|
10191
|
-
open: !!
|
|
10188
|
+
anchorEl: m,
|
|
10189
|
+
open: !!m,
|
|
10192
10190
|
onClose: he,
|
|
10193
10191
|
anchorOrigin: {
|
|
10194
10192
|
vertical: "bottom",
|
|
@@ -10254,8 +10252,8 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10254
10252
|
/* @__PURE__ */ i(
|
|
10255
10253
|
xo,
|
|
10256
10254
|
{
|
|
10257
|
-
anchorEl:
|
|
10258
|
-
open:
|
|
10255
|
+
anchorEl: m,
|
|
10256
|
+
open: f === J.index,
|
|
10259
10257
|
onClose: he,
|
|
10260
10258
|
anchorOrigin: {
|
|
10261
10259
|
vertical: "top",
|
|
@@ -10360,8 +10358,8 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10360
10358
|
ee,
|
|
10361
10359
|
P.selectedIds,
|
|
10362
10360
|
pe.data,
|
|
10363
|
-
f,
|
|
10364
10361
|
m,
|
|
10362
|
+
f,
|
|
10365
10363
|
Ue,
|
|
10366
10364
|
y
|
|
10367
10365
|
]
|
|
@@ -10372,8 +10370,8 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10372
10370
|
nameSource: o = "username",
|
|
10373
10371
|
passwordSource: r = "password"
|
|
10374
10372
|
} = e, [s, a] = oe(!1), c = fe(), l = c("ra.auth.sign_in"), d = Mt(), p = ku(), u = bt();
|
|
10375
|
-
return /* @__PURE__ */ i(Vo, { onSubmit: /* @__PURE__ */ n((
|
|
10376
|
-
a(!0), p(
|
|
10373
|
+
return /* @__PURE__ */ i(Vo, { onSubmit: /* @__PURE__ */ n((f) => {
|
|
10374
|
+
a(!0), p(f, u.state ? u.state.nextPathname : "/").catch(
|
|
10377
10375
|
(g) => {
|
|
10378
10376
|
a(!1), d(
|
|
10379
10377
|
typeof g == "string" ? g : typeof g > "u" || !g.message ? "ra.auth.sign_in_error" : g.message,
|
|
@@ -10386,9 +10384,9 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10386
10384
|
);
|
|
10387
10385
|
}
|
|
10388
10386
|
);
|
|
10389
|
-
}, "handleSubmit"), validate: /* @__PURE__ */ n((
|
|
10387
|
+
}, "handleSubmit"), validate: /* @__PURE__ */ n((f) => {
|
|
10390
10388
|
const g = {};
|
|
10391
|
-
return
|
|
10389
|
+
return f[o] || (g[o] = c("ra.validation.required")), f[r] || (g[r] = c("ra.validation.required")), g;
|
|
10392
10390
|
}, "validate"), children: /* @__PURE__ */ i(
|
|
10393
10391
|
Q,
|
|
10394
10392
|
{
|
|
@@ -10505,7 +10503,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10505
10503
|
// NUEVO (opcional): si querés forzar el tooltip del botón, aunque el seleccionado sea otro
|
|
10506
10504
|
title: a
|
|
10507
10505
|
// string
|
|
10508
|
-
} = e, [c, l] = oe(!1), d =
|
|
10506
|
+
} = e, [c, l] = oe(!1), d = Ae(), p = ye(e), u = xe(Xe) || {}, { menuModel: m, leafOptions: h, menuVisible: f } = re(() => {
|
|
10509
10507
|
const v = [], T = [], _ = t?.[s];
|
|
10510
10508
|
return ro(u, _) ? ((t || []).forEach((E) => {
|
|
10511
10509
|
if (!ro(u, E))
|
|
@@ -10544,7 +10542,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10544
10542
|
0,
|
|
10545
10543
|
Math.min(s, Math.max(h.length - 1, 0))
|
|
10546
10544
|
), [y, x] = oe(g);
|
|
10547
|
-
|
|
10545
|
+
se(() => {
|
|
10548
10546
|
x(
|
|
10549
10547
|
(v) => Math.max(
|
|
10550
10548
|
0,
|
|
@@ -10559,7 +10557,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10559
10557
|
}, "handleClose"), C = /* @__PURE__ */ n((v, T) => {
|
|
10560
10558
|
x(T), l(!1);
|
|
10561
10559
|
}, "handleLeafClick"), b = h[y], I = b?.icon || o;
|
|
10562
|
-
return !
|
|
10560
|
+
return !f || h.length === 0 ? null : /* @__PURE__ */ k(yt, { children: [
|
|
10563
10561
|
/* @__PURE__ */ i(xi, { title: a ?? b?.label, children: /* @__PURE__ */ k(
|
|
10564
10562
|
Co,
|
|
10565
10563
|
{
|
|
@@ -10572,7 +10570,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10572
10570
|
]
|
|
10573
10571
|
}
|
|
10574
10572
|
) }),
|
|
10575
|
-
/* @__PURE__ */ i(Lp, { open: c, anchorEl: d.current, onClose: P, children:
|
|
10573
|
+
/* @__PURE__ */ i(Lp, { open: c, anchorEl: d.current, onClose: P, children: m.map((v) => {
|
|
10576
10574
|
if (v.type === "header")
|
|
10577
10575
|
return /* @__PURE__ */ k(yt, { children: [
|
|
10578
10576
|
/* @__PURE__ */ k(
|
|
@@ -10682,17 +10680,17 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10682
10680
|
)
|
|
10683
10681
|
] });
|
|
10684
10682
|
}, "MultiTextField"), Kg = /* @__PURE__ */ n((e) => {
|
|
10685
|
-
const { children: t, fichaProps: o } = e, r = _u(), [s, a] = oe(null), c = bt(), l = Ht(), d = ye(e), { record: p, isFetching: u } = r,
|
|
10683
|
+
const { children: t, fichaProps: o } = e, r = _u(), [s, a] = oe(null), c = bt(), l = Ht(), d = ye(e), { record: p, isFetching: u } = r, m = e.estado ?? (c?.state?.estado || "M"), h = p?.id ?? c?.state?.id ?? "show", f = `${d}:${m}:${h}`, g = re(
|
|
10686
10684
|
() => ({
|
|
10687
|
-
estado:
|
|
10685
|
+
estado: m,
|
|
10688
10686
|
initialValues: p,
|
|
10689
10687
|
isLoading: u,
|
|
10690
10688
|
fichaProps: o,
|
|
10691
|
-
scopeIdentity:
|
|
10689
|
+
scopeIdentity: f
|
|
10692
10690
|
}),
|
|
10693
|
-
[p, u, o,
|
|
10691
|
+
[p, u, o, m, f]
|
|
10694
10692
|
);
|
|
10695
|
-
return
|
|
10693
|
+
return se(() => {
|
|
10696
10694
|
let y = !0;
|
|
10697
10695
|
return a(null), u ? () => {
|
|
10698
10696
|
y = !1;
|
|
@@ -10703,7 +10701,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10703
10701
|
}), () => {
|
|
10704
10702
|
y = !1;
|
|
10705
10703
|
});
|
|
10706
|
-
}, [l,
|
|
10704
|
+
}, [l, m, u, d]), s === null ? /* @__PURE__ */ i(So, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i(Hr, { value: g, children: /* @__PURE__ */ i(Xe.Provider, { value: s, children: t }) });
|
|
10707
10705
|
}, "ShowChildren"), Xg = /* @__PURE__ */ n((e) => {
|
|
10708
10706
|
const t = bt(), { useFormulario: o, children: r, ...s } = e, a = Nl(e), c = e.estado ?? (t?.state?.estado || "M"), { fichaProps: l } = ts({ ...e, estado: c });
|
|
10709
10707
|
return /* @__PURE__ */ i(Bo, { children: /* @__PURE__ */ i(Fu, { id: a, emptyWhileLoading: !0, ...s, ...l?.panel, children: /* @__PURE__ */ i(Kg, { estado: c, fichaProps: l, children: r }) }) });
|
|
@@ -10820,8 +10818,8 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10820
10818
|
toolbar: d = sb,
|
|
10821
10819
|
onChange: p,
|
|
10822
10820
|
...u
|
|
10823
|
-
} = t,
|
|
10824
|
-
|
|
10821
|
+
} = t, m = bt(), h = ye(t), [f, g] = oe(0), y = Du(), { estado: x } = Be(), S = Ft(t), P = wt((F) => F.breakpoints.down("sm")), C = wt((F) => F.breakpoints.down("md")), b = Ae(null), I = Np(b, l.props.action);
|
|
10822
|
+
se(() => {
|
|
10825
10823
|
b.current?.updateScrollButtons();
|
|
10826
10824
|
}, [P, C]);
|
|
10827
10825
|
const v = /* @__PURE__ */ n((F, A) => {
|
|
@@ -10830,27 +10828,27 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10830
10828
|
x,
|
|
10831
10829
|
{
|
|
10832
10830
|
newTab: A,
|
|
10833
|
-
prevTab:
|
|
10831
|
+
prevTab: f,
|
|
10834
10832
|
setTab: g
|
|
10835
10833
|
},
|
|
10836
10834
|
F
|
|
10837
10835
|
)), l.props.onChange && l.props.onChange(F, A);
|
|
10838
|
-
}, "handleTabChange"), T =
|
|
10836
|
+
}, "handleTabChange"), T = re(() => Eo.toArray(o), [o]), _ = re(
|
|
10839
10837
|
() => T.reduce((F, A) => va(A) ? [...F, { tab: A, tabIndex: F.length }] : F, []),
|
|
10840
10838
|
[T]
|
|
10841
|
-
), E =
|
|
10839
|
+
), E = re(() => c ? _.findIndex(({ tab: F, tabIndex: A }) => {
|
|
10842
10840
|
const B = En(F, A);
|
|
10843
10841
|
return nn(
|
|
10844
10842
|
`${y}/${B}`,
|
|
10845
|
-
|
|
10843
|
+
m.pathname
|
|
10846
10844
|
);
|
|
10847
|
-
}) : _.findIndex(({ tabIndex: F }) => F ===
|
|
10848
|
-
|
|
10845
|
+
}) : _.findIndex(({ tabIndex: F }) => F === f), [
|
|
10846
|
+
m.pathname,
|
|
10849
10847
|
y,
|
|
10850
10848
|
c,
|
|
10851
|
-
|
|
10849
|
+
f,
|
|
10852
10850
|
_
|
|
10853
|
-
]), O =
|
|
10851
|
+
]), O = re(() => !c || E >= 0 ? E : _.length ? 0 : -1, [E, c, _.length]), z = re(() => {
|
|
10854
10852
|
if (c) {
|
|
10855
10853
|
const F = _[O];
|
|
10856
10854
|
return F ? En(
|
|
@@ -10858,15 +10856,15 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10858
10856
|
F.tabIndex
|
|
10859
10857
|
) : !1;
|
|
10860
10858
|
}
|
|
10861
|
-
return
|
|
10862
|
-
}, [O, c, _,
|
|
10859
|
+
return f;
|
|
10860
|
+
}, [O, c, _, f]), H = re(
|
|
10863
10861
|
() => _.map(
|
|
10864
10862
|
({ tab: F, tabIndex: A }) => Tt(F, {
|
|
10865
10863
|
value: c ? En(F, A) : A
|
|
10866
10864
|
})
|
|
10867
10865
|
),
|
|
10868
10866
|
[c, _]
|
|
10869
|
-
), W =
|
|
10867
|
+
), W = re(() => {
|
|
10870
10868
|
let F = -1;
|
|
10871
10869
|
return Eo.map(o, (A) => {
|
|
10872
10870
|
if (!A)
|
|
@@ -10877,7 +10875,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10877
10875
|
const B = En(
|
|
10878
10876
|
A,
|
|
10879
10877
|
F
|
|
10880
|
-
), R = !(c ? O === F :
|
|
10878
|
+
), R = !(c ? O === F : f === F);
|
|
10881
10879
|
return Tt(A, {
|
|
10882
10880
|
intent: "content",
|
|
10883
10881
|
resource: h,
|
|
@@ -10895,7 +10893,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
10895
10893
|
].join(" ").trim()
|
|
10896
10894
|
});
|
|
10897
10895
|
});
|
|
10898
|
-
}, [o, h, c, O,
|
|
10896
|
+
}, [o, h, c, O, f]), Z = /* @__PURE__ */ n(() => /* @__PURE__ */ i(Pe, { className: je.navigation, children: Tt(
|
|
10899
10897
|
l,
|
|
10900
10898
|
{
|
|
10901
10899
|
className: [
|
|
@@ -11104,20 +11102,20 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11104
11102
|
initialValues: d,
|
|
11105
11103
|
scopeIdentity: p,
|
|
11106
11104
|
fichaProps: { config: u = {} } = {}
|
|
11107
|
-
} = Be(),
|
|
11105
|
+
} = Be(), m = Ti(e), h = ob();
|
|
11108
11106
|
if (!d) return null;
|
|
11109
11107
|
const {
|
|
11110
|
-
toolbar:
|
|
11108
|
+
toolbar: f,
|
|
11111
11109
|
tabs: g,
|
|
11112
11110
|
onChange: y,
|
|
11113
11111
|
...x
|
|
11114
|
-
} = u, S =
|
|
11112
|
+
} = u, S = f !== void 0 ? f : s !== void 0 ? s : /* @__PURE__ */ i(Ri, { deleteButton: r }), P = g !== void 0 ? g : a !== void 0 ? a : /* @__PURE__ */ i(ol, {}), C = y !== void 0 ? y : c;
|
|
11115
11113
|
return /* @__PURE__ */ i(Jl, { children: /* @__PURE__ */ i(Qc, { children: /* @__PURE__ */ i(
|
|
11116
11114
|
ab,
|
|
11117
11115
|
{
|
|
11118
11116
|
mode: "onBlur",
|
|
11119
11117
|
formRootPathname: h,
|
|
11120
|
-
onSubmit:
|
|
11118
|
+
onSubmit: m,
|
|
11121
11119
|
defaultValues: d,
|
|
11122
11120
|
...x,
|
|
11123
11121
|
...l,
|
|
@@ -11234,16 +11232,16 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11234
11232
|
disableAutoFocus: !0,
|
|
11235
11233
|
disableRestoreFocus: !0
|
|
11236
11234
|
}, zy = /* @__PURE__ */ n((e) => {
|
|
11237
|
-
const { isLoading: t } = e, o = fe(), r = ye(e), s = Ot(), a = xe(Pa), c =
|
|
11235
|
+
const { isLoading: t } = e, o = fe(), r = ye(e), s = Ot(), a = xe(Pa), c = Ae(
|
|
11238
11236
|
`asistente-host-${Math.random().toString(36).slice(2)}`
|
|
11239
11237
|
), l = s?.hostId, d = !l || l === c.current;
|
|
11240
|
-
|
|
11238
|
+
se(() => {
|
|
11241
11239
|
if (!(!s?.registerHost || !d))
|
|
11242
11240
|
return s.registerHost(c.current), () => {
|
|
11243
11241
|
s.unregisterHost && s.unregisterHost(c.current);
|
|
11244
11242
|
};
|
|
11245
11243
|
}, [s, d]);
|
|
11246
|
-
const { hide: p, stack: u = [] } = s || {},
|
|
11244
|
+
const { hide: p, stack: u = [] } = s || {}, m = /* @__PURE__ */ n(({ botonesExtra: y }) => {
|
|
11247
11245
|
const x = Ge(), S = /* @__PURE__ */ n((P) => (C) => {
|
|
11248
11246
|
if (typeof P != "function")
|
|
11249
11247
|
return;
|
|
@@ -11298,7 +11296,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11298
11296
|
children: y
|
|
11299
11297
|
}
|
|
11300
11298
|
),
|
|
11301
|
-
/* @__PURE__ */ i(
|
|
11299
|
+
/* @__PURE__ */ i(m, { botonesExtra: S }),
|
|
11302
11300
|
C && typeof b == "function" && /* @__PURE__ */ i(kt, { title: I, children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
11303
11301
|
gt,
|
|
11304
11302
|
{
|
|
@@ -11400,7 +11398,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11400
11398
|
)
|
|
11401
11399
|
]
|
|
11402
11400
|
}
|
|
11403
|
-
), "getDialogVista"),
|
|
11401
|
+
), "getDialogVista"), f = /* @__PURE__ */ n(({
|
|
11404
11402
|
title: y,
|
|
11405
11403
|
controles: x,
|
|
11406
11404
|
aceptar: S,
|
|
@@ -11439,7 +11437,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11439
11437
|
className: "Asistente-actions",
|
|
11440
11438
|
sx: { flexShrink: 0 },
|
|
11441
11439
|
children: [
|
|
11442
|
-
/* @__PURE__ */ i(
|
|
11440
|
+
/* @__PURE__ */ i(m, { botonesExtra: C }),
|
|
11443
11441
|
b && /* @__PURE__ */ i(
|
|
11444
11442
|
Ze,
|
|
11445
11443
|
{
|
|
@@ -11503,7 +11501,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11503
11501
|
/* @__PURE__ */ i(sr, { className: "Asistente-header", children: y || o("pos.attention") }),
|
|
11504
11502
|
/* @__PURE__ */ i(ar, { className: "Asistente-content", sx: { pt: 1, pb: 0 }, children: x }),
|
|
11505
11503
|
/* @__PURE__ */ k(Cs, { className: "Asistente-actions", sx: { flexShrink: 0 }, children: [
|
|
11506
|
-
/* @__PURE__ */ i(
|
|
11504
|
+
/* @__PURE__ */ i(m, { botonesExtra: I }),
|
|
11507
11505
|
T !== !1 && /* @__PURE__ */ i(
|
|
11508
11506
|
Ze,
|
|
11509
11507
|
{
|
|
@@ -11604,7 +11602,7 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11604
11602
|
...Array.isArray(q.sx) ? q.sx : [q.sx]
|
|
11605
11603
|
],
|
|
11606
11604
|
PaperProps: ae,
|
|
11607
|
-
children: /* @__PURE__ */ i(mr.Provider, { value: x + 1, children: T === "form" ?
|
|
11605
|
+
children: /* @__PURE__ */ i(mr.Provider, { value: x + 1, children: T === "form" ? f({
|
|
11608
11606
|
title: C,
|
|
11609
11607
|
controles: b,
|
|
11610
11608
|
aceptar: I,
|
|
@@ -11640,20 +11638,20 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11640
11638
|
incluyeAcciones: s = !1,
|
|
11641
11639
|
saveButtonProps: a,
|
|
11642
11640
|
...c
|
|
11643
|
-
} = e, [l, d] = oe(!1), { camposCargando: p = [] } = xn(), u = p.length > 0,
|
|
11641
|
+
} = e, [l, d] = oe(!1), { camposCargando: p = [] } = xn(), u = p.length > 0, m = Ft(c), h = Mt(), f = fe(), { trigger: g } = Ge(), { hidden: y } = Ql(), x = M.useContext(Xe) || {}, S = M.useMemo(
|
|
11644
11642
|
() => [...r || [], ...t?.buttons || []],
|
|
11645
11643
|
[r, t]
|
|
11646
11644
|
), P = ie(
|
|
11647
11645
|
async (C, b, I) => {
|
|
11648
|
-
typeof t == "function" ? (I?.skipValidation ? !0 : await g()) ? (d(!0), t(
|
|
11646
|
+
typeof t == "function" ? (I?.skipValidation ? !0 : await g()) ? (d(!0), t(m, b, I?.name, C).finally(
|
|
11649
11647
|
() => {
|
|
11650
11648
|
d(!1);
|
|
11651
11649
|
}
|
|
11652
|
-
)) : h(
|
|
11650
|
+
)) : h(f("pos.invalid_form"), { type: "warning" }) : h(f("pos.missing_toolbar_handler"), {
|
|
11653
11651
|
type: "error"
|
|
11654
11652
|
});
|
|
11655
11653
|
},
|
|
11656
|
-
[g, t,
|
|
11654
|
+
[g, t, m, h, f]
|
|
11657
11655
|
);
|
|
11658
11656
|
return /* @__PURE__ */ k(Ka, { sx: Nc, children: [
|
|
11659
11657
|
s ? /* @__PURE__ */ i(mn, { ...a, alwaysEnable: u ? !1 : a?.alwaysEnable, disabled: u || a?.disabled, className: ["metiri-save-button", a?.className].filter(Boolean).join(" ") }) : null,
|
|
@@ -11681,22 +11679,22 @@ const Wc = /* @__PURE__ */ n(() => {
|
|
|
11681
11679
|
textOverflow: "ellipsis"
|
|
11682
11680
|
}, qy = /* @__PURE__ */ n((e) => {
|
|
11683
11681
|
const t = No(), { label: o, icon: r, ...s } = e, a = wt((y) => y.breakpoints.down("md")), c = r ?? Hp, l = o ?? "", d = !!s.hidden, [p, u] = oe(!d);
|
|
11684
|
-
|
|
11682
|
+
se(() => {
|
|
11685
11683
|
d || u(!0);
|
|
11686
11684
|
}, [d]);
|
|
11687
|
-
const
|
|
11685
|
+
const m = p || !d, h = re(
|
|
11688
11686
|
() => ({
|
|
11689
11687
|
hidden: d,
|
|
11690
11688
|
isActive: !d,
|
|
11691
|
-
hasBeenActive:
|
|
11689
|
+
hasBeenActive: m
|
|
11692
11690
|
}),
|
|
11693
|
-
[
|
|
11694
|
-
),
|
|
11691
|
+
[m, d]
|
|
11692
|
+
), f = /* @__PURE__ */ i(kt, { title: l, children: /* @__PURE__ */ i(c, { fontSize: "medium" }) }), g = a && !t.metiri?.fichaVisual ? "" : /* @__PURE__ */ i(kt, { title: l, children: /* @__PURE__ */ i("span", { style: pb, children: o }) });
|
|
11695
11693
|
return /* @__PURE__ */ i(Sm, { value: h, children: /* @__PURE__ */ i(
|
|
11696
11694
|
Eu,
|
|
11697
11695
|
{
|
|
11698
11696
|
"aria-label": o,
|
|
11699
|
-
icon:
|
|
11697
|
+
icon: f,
|
|
11700
11698
|
label: g,
|
|
11701
11699
|
iconPosition: t.metiri?.fichaVisual ? "start" : void 0,
|
|
11702
11700
|
...s
|
|
@@ -11897,17 +11895,17 @@ const Uy = {
|
|
|
11897
11895
|
};
|
|
11898
11896
|
return /* @__PURE__ */ i(Ou, { ...t, record: a });
|
|
11899
11897
|
}, "BooleanField"), Ia = /* @__PURE__ */ n((e) => {
|
|
11900
|
-
const [t, o] = oe(!1), [r, s] = oe(!1), a = Ge(), c = Mt(), l =
|
|
11901
|
-
field:
|
|
11898
|
+
const [t, o] = oe(!1), [r, s] = oe(!1), a = Ge(), c = Mt(), l = Ae(c), d = Ae(null), p = Ae(null), u = fe(), {
|
|
11899
|
+
field: m,
|
|
11902
11900
|
sx: h,
|
|
11903
|
-
className:
|
|
11901
|
+
className: f,
|
|
11904
11902
|
children: g,
|
|
11905
11903
|
directCamera: y = !1,
|
|
11906
11904
|
label: x = u("from_camera")
|
|
11907
11905
|
} = e, S = !y && typeof navigator < "u" && /Android|iPhone|iPad|iPod/i.test(navigator.userAgent), P = /* @__PURE__ */ n(({ target: C }) => {
|
|
11908
11906
|
const [b] = C.files;
|
|
11909
11907
|
b && (a.setValue(
|
|
11910
|
-
|
|
11908
|
+
m,
|
|
11911
11909
|
{
|
|
11912
11910
|
title: b.name,
|
|
11913
11911
|
src: URL.createObjectURL(b),
|
|
@@ -11916,9 +11914,9 @@ const Uy = {
|
|
|
11916
11914
|
{ shouldDirty: !0, shouldValidate: !0 }
|
|
11917
11915
|
), C.value = "");
|
|
11918
11916
|
}, "handleNativeCapture");
|
|
11919
|
-
return
|
|
11917
|
+
return se(() => {
|
|
11920
11918
|
l.current = c;
|
|
11921
|
-
}, [c]),
|
|
11919
|
+
}, [c]), se(() => {
|
|
11922
11920
|
if (!t)
|
|
11923
11921
|
return;
|
|
11924
11922
|
let C = !0, b;
|
|
@@ -12008,11 +12006,11 @@ const Uy = {
|
|
|
12008
12006
|
] }),
|
|
12009
12007
|
onConfirm: /* @__PURE__ */ n((C) => {
|
|
12010
12008
|
r && p.current.toBlob(function(b) {
|
|
12011
|
-
const I = new File([b], `${
|
|
12009
|
+
const I = new File([b], `${m}-img.jpg`, {
|
|
12012
12010
|
type: "image/jpeg"
|
|
12013
12011
|
}), v = URL.createObjectURL(I);
|
|
12014
12012
|
a.setValue(
|
|
12015
|
-
|
|
12013
|
+
m,
|
|
12016
12014
|
{
|
|
12017
12015
|
title: I.name,
|
|
12018
12016
|
src: v,
|
|
@@ -12032,7 +12030,7 @@ const Uy = {
|
|
|
12032
12030
|
{
|
|
12033
12031
|
component: S ? "label" : "button",
|
|
12034
12032
|
type: "button",
|
|
12035
|
-
className:
|
|
12033
|
+
className: f,
|
|
12036
12034
|
"aria-label": x,
|
|
12037
12035
|
sx: h,
|
|
12038
12036
|
onClick: S ? void 0 : () => o(!0),
|
|
@@ -12267,9 +12265,9 @@ const Uy = {
|
|
|
12267
12265
|
prefix: d,
|
|
12268
12266
|
rutaAsync: p,
|
|
12269
12267
|
accept: u,
|
|
12270
|
-
download:
|
|
12268
|
+
download: m = !0,
|
|
12271
12269
|
sx: h,
|
|
12272
|
-
...
|
|
12270
|
+
...f
|
|
12273
12271
|
} = o, g = c === "image" ? gb : typeof u == "string" || u && typeof u == "object" ? u : void 0, y = /* @__PURE__ */ n((O) => {
|
|
12274
12272
|
const z = (O.name || "").toLowerCase(), H = (O.type || "").toLowerCase();
|
|
12275
12273
|
return z.endsWith(".zip") || H === "application/zip" || H === "application/x-zip-compressed" ? null : bb.some((W) => z.endsWith(W)) ? {
|
|
@@ -12280,20 +12278,20 @@ const Uy = {
|
|
|
12280
12278
|
message: x("pos.executables_zip_only")
|
|
12281
12279
|
} : null;
|
|
12282
12280
|
}, "validatorNonImage"), x = fe(), S = ut(e), [P, C] = oe(() => Date.now()), b = wt((O) => O.breakpoints.down("sm")), I = Ge(), [v, T] = oe(
|
|
12283
|
-
S && d ? Mr(`${d}/${S[
|
|
12284
|
-
), _ = I?.getValues()[
|
|
12285
|
-
if (
|
|
12281
|
+
S && d ? Mr(`${d}/${S[f.source]}`, P) : void 0
|
|
12282
|
+
), _ = I?.getValues()[f.source];
|
|
12283
|
+
if (se(() => {
|
|
12286
12284
|
C(Date.now());
|
|
12287
|
-
}, [_]),
|
|
12285
|
+
}, [_]), se(() => {
|
|
12288
12286
|
p && typeof _ == "string" && _ && p(_).then((O) => {
|
|
12289
12287
|
T(Mr(O, P));
|
|
12290
12288
|
});
|
|
12291
12289
|
}, [_, P, p]), !I) return null;
|
|
12292
|
-
const E = /* @__PURE__ */ i(hb, { download:
|
|
12290
|
+
const E = /* @__PURE__ */ i(hb, { download: m });
|
|
12293
12291
|
return !r && (c === "image" ? /* @__PURE__ */ k(
|
|
12294
12292
|
dr,
|
|
12295
12293
|
{
|
|
12296
|
-
"data-contnom":
|
|
12294
|
+
"data-contnom": f.source,
|
|
12297
12295
|
direction: "row",
|
|
12298
12296
|
alignItems: "flex-start",
|
|
12299
12297
|
justifyContent: "flex-start",
|
|
@@ -12302,12 +12300,12 @@ const Uy = {
|
|
|
12302
12300
|
/* @__PURE__ */ i(
|
|
12303
12301
|
Bu,
|
|
12304
12302
|
{
|
|
12305
|
-
id:
|
|
12303
|
+
id: f.source,
|
|
12306
12304
|
maxSize: 5e6,
|
|
12307
|
-
...
|
|
12305
|
+
...f,
|
|
12308
12306
|
readOnly: a,
|
|
12309
12307
|
options: { ...s, disabled: a || s.disabled },
|
|
12310
|
-
validateFileRemoval: a ? Ta :
|
|
12308
|
+
validateFileRemoval: a ? Ta : f.validateFileRemoval,
|
|
12311
12309
|
format: /* @__PURE__ */ n((O) => Ra(O, d, v, P), "format"),
|
|
12312
12310
|
placeholder: x("ra.input.image.upload_single"),
|
|
12313
12311
|
accept: g,
|
|
@@ -12327,13 +12325,13 @@ const Uy = {
|
|
|
12327
12325
|
] })
|
|
12328
12326
|
}
|
|
12329
12327
|
),
|
|
12330
|
-
!a && !b && /* @__PURE__ */ i(Ia, { className: "Camino-camera", sx: { mt: 3 }, field:
|
|
12328
|
+
!a && !b && /* @__PURE__ */ i(Ia, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
|
|
12331
12329
|
]
|
|
12332
12330
|
}
|
|
12333
12331
|
) : /* @__PURE__ */ k(
|
|
12334
12332
|
dr,
|
|
12335
12333
|
{
|
|
12336
|
-
"data-contnom":
|
|
12334
|
+
"data-contnom": f.source,
|
|
12337
12335
|
direction: "row",
|
|
12338
12336
|
alignItems: "flex-start",
|
|
12339
12337
|
justifyContent: "flex-start",
|
|
@@ -12342,11 +12340,11 @@ const Uy = {
|
|
|
12342
12340
|
/* @__PURE__ */ i(
|
|
12343
12341
|
Lu,
|
|
12344
12342
|
{
|
|
12345
|
-
id:
|
|
12343
|
+
id: f.source,
|
|
12346
12344
|
maxSize: 5e6,
|
|
12347
|
-
...
|
|
12345
|
+
...f,
|
|
12348
12346
|
readOnly: a,
|
|
12349
|
-
validateFileRemoval: a ? Ta :
|
|
12347
|
+
validateFileRemoval: a ? Ta : f.validateFileRemoval,
|
|
12350
12348
|
options: {
|
|
12351
12349
|
...c !== "image" ? { validator: y } : {},
|
|
12352
12350
|
onDropRejected: /* @__PURE__ */ n((O) => {
|
|
@@ -12384,7 +12382,7 @@ const Uy = {
|
|
|
12384
12382
|
children: /* @__PURE__ */ i(fb, { actions: E })
|
|
12385
12383
|
}
|
|
12386
12384
|
),
|
|
12387
|
-
!a && l && /* @__PURE__ */ i(Ia, { className: "Camino-camera", sx: { mt: 3 }, field:
|
|
12385
|
+
!a && l && /* @__PURE__ */ i(Ia, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
|
|
12388
12386
|
]
|
|
12389
12387
|
}
|
|
12390
12388
|
));
|
|
@@ -12420,12 +12418,12 @@ const Uy = {
|
|
|
12420
12418
|
onClose: d,
|
|
12421
12419
|
onConfirm: p,
|
|
12422
12420
|
contentResource: u,
|
|
12423
|
-
translateOptions:
|
|
12424
|
-
} = e, h = fe(), [
|
|
12421
|
+
translateOptions: m = {}
|
|
12422
|
+
} = e, h = fe(), [f] = il({ resource: u }), g = ie(
|
|
12425
12423
|
(x, S) => {
|
|
12426
|
-
x.stopPropagation(), p(x,
|
|
12424
|
+
x.stopPropagation(), p(x, f);
|
|
12427
12425
|
},
|
|
12428
|
-
[
|
|
12426
|
+
[f, p]
|
|
12429
12427
|
), y = ie((x) => {
|
|
12430
12428
|
x.stopPropagation();
|
|
12431
12429
|
}, []);
|
|
@@ -12439,7 +12437,7 @@ const Uy = {
|
|
|
12439
12437
|
PaperComponent: yb,
|
|
12440
12438
|
"aria-labelledby": "draggable-dialog-title",
|
|
12441
12439
|
children: [
|
|
12442
|
-
/* @__PURE__ */ i(bi, { style: Cb, id: "draggable-dialog-title", children: h(r, { _: r, ...
|
|
12440
|
+
/* @__PURE__ */ i(bi, { style: Cb, id: "draggable-dialog-title", children: h(r, { _: r, ...m }) }),
|
|
12443
12441
|
/* @__PURE__ */ i(gi, { dividers: !0, children: s }),
|
|
12444
12442
|
/* @__PURE__ */ k(hi, { children: [
|
|
12445
12443
|
/* @__PURE__ */ k(Rt, { disabled: o, onClick: d, children: [
|
|
@@ -12469,12 +12467,12 @@ const Uy = {
|
|
|
12469
12467
|
}, Mb = /* @__PURE__ */ n((e, t) => !e || e?.all ? t("pos.all") : e?.none || e.seleccion.length === 0 ? t("pos.none") : t("pos.selection_count", {
|
|
12470
12468
|
count: e.seleccion.split(",").length
|
|
12471
12469
|
}), "format"), Pb = /* @__PURE__ */ n((e) => e, "parse"), Jy = /* @__PURE__ */ n((e) => {
|
|
12472
|
-
const t = fe(), [o, r] = oe(!1), [s, a] = oe(null), [c, l] = oe(null), d =
|
|
12470
|
+
const t = fe(), [o, r] = oe(!1), [s, a] = oe(null), [c, l] = oe(null), d = Ae(!1), p = Cn(), {
|
|
12473
12471
|
hidden: u,
|
|
12474
12472
|
propsContenido: {
|
|
12475
|
-
readOnly:
|
|
12473
|
+
readOnly: m,
|
|
12476
12474
|
label: h,
|
|
12477
|
-
sx:
|
|
12475
|
+
sx: f,
|
|
12478
12476
|
onChange: g,
|
|
12479
12477
|
asistant: y,
|
|
12480
12478
|
asistantResource: x,
|
|
@@ -12482,7 +12480,7 @@ const Uy = {
|
|
|
12482
12480
|
...P
|
|
12483
12481
|
}
|
|
12484
12482
|
} = ot(e), C = Ge();
|
|
12485
|
-
|
|
12483
|
+
se(() => {
|
|
12486
12484
|
d.current || (setTimeout(() => {
|
|
12487
12485
|
C.setValue(S, vb);
|
|
12488
12486
|
}, 0), d.current = !0);
|
|
@@ -12517,7 +12515,7 @@ const Uy = {
|
|
|
12517
12515
|
display: "flex",
|
|
12518
12516
|
alignItems: "center",
|
|
12519
12517
|
sx: {
|
|
12520
|
-
...
|
|
12518
|
+
...f,
|
|
12521
12519
|
display: "inline-flex",
|
|
12522
12520
|
width: { xs: "100%", md: "auto" },
|
|
12523
12521
|
minWidth: 0,
|
|
@@ -12529,8 +12527,8 @@ const Uy = {
|
|
|
12529
12527
|
...P,
|
|
12530
12528
|
source: S,
|
|
12531
12529
|
label: h,
|
|
12532
|
-
readOnly:
|
|
12533
|
-
disabled:
|
|
12530
|
+
readOnly: m,
|
|
12531
|
+
disabled: m,
|
|
12534
12532
|
parse: Pb,
|
|
12535
12533
|
format: /* @__PURE__ */ n((_) => Mb(_, t), "format"),
|
|
12536
12534
|
helperText: !1,
|
|
@@ -12557,7 +12555,7 @@ const Uy = {
|
|
|
12557
12555
|
Co,
|
|
12558
12556
|
{
|
|
12559
12557
|
onClick: /* @__PURE__ */ n((_) => a(_.currentTarget), "onClick"),
|
|
12560
|
-
disabled:
|
|
12558
|
+
disabled: m,
|
|
12561
12559
|
"aria-label": `${h}: ${t("pos.selection")}`,
|
|
12562
12560
|
"aria-haspopup": "menu",
|
|
12563
12561
|
"aria-expanded": !!s,
|
|
@@ -12572,7 +12570,7 @@ const Uy = {
|
|
|
12572
12570
|
onClick: /* @__PURE__ */ n((_) => {
|
|
12573
12571
|
l(null), r(!0);
|
|
12574
12572
|
}, "onClick"),
|
|
12575
|
-
disabled:
|
|
12573
|
+
disabled: m,
|
|
12576
12574
|
"aria-label": t("pos.selection"),
|
|
12577
12575
|
size: "small",
|
|
12578
12576
|
title: t("pos.selection"),
|
|
@@ -12705,16 +12703,16 @@ const Uy = {
|
|
|
12705
12703
|
return t;
|
|
12706
12704
|
}
|
|
12707
12705
|
}, "getFuncionarioTooltipLine"), Fb = /* @__PURE__ */ n((e) => e ? typeof e == "string" ? e.trim() : typeof e == "object" && !Array.isArray(e) ? String(e.fillista || e.filgrilla || "").trim() : "" : "", "normalizeFilgrilla"), _a = /* @__PURE__ */ n((e, t) => t ? !e || e === "null" ? t : `(${e}) AND (${t})` : e, "combineFillista"), _b = /* @__PURE__ */ n(({ onRecordsLoaded: e }) => {
|
|
12708
|
-
const { data: t = [], isPending: o, isLoading: r, isFetching: s } = jt(), a =
|
|
12706
|
+
const { data: t = [], isPending: o, isLoading: r, isFetching: s } = jt(), a = re(
|
|
12709
12707
|
() => Array.isArray(t) ? t : Object.values(t),
|
|
12710
12708
|
[t]
|
|
12711
|
-
), c =
|
|
12709
|
+
), c = re(
|
|
12712
12710
|
() => a.map((d) => String(d.id)).join("|"),
|
|
12713
12711
|
[a]
|
|
12714
12712
|
), l = M.useRef(a);
|
|
12715
|
-
return
|
|
12713
|
+
return se(() => {
|
|
12716
12714
|
l.current = a;
|
|
12717
|
-
}, [a]),
|
|
12715
|
+
}, [a]), se(() => {
|
|
12718
12716
|
!e || o || r || s || e(l.current);
|
|
12719
12717
|
}, [e, c, s, r, o]), null;
|
|
12720
12718
|
}, "ListSelectionBridge"), Ab = [
|
|
@@ -12925,9 +12923,9 @@ const Uy = {
|
|
|
12925
12923
|
onStatusFilterChange: l,
|
|
12926
12924
|
initialFilterKey: d = Qo[0].key,
|
|
12927
12925
|
filterOptionKeys: p
|
|
12928
|
-
} = e, u =
|
|
12926
|
+
} = e, u = re(() => !Array.isArray(p) || p.length === 0 ? Qo : Qo.filter(
|
|
12929
12927
|
(L) => p.includes(L.key)
|
|
12930
|
-
), [p]), [
|
|
12928
|
+
), [p]), [m, h] = oe(Bb), [f, g] = oe([]), [y, x] = oe(null), [S, P] = oe(!0), [C, b] = oe(!1), [I, v] = oe(
|
|
12931
12929
|
u.find((L) => L.key === d) || u[0] || Qo[0]
|
|
12932
12930
|
), T = Ht(), _ = bn(), E = wo(), O = ie(
|
|
12933
12931
|
(L) => _.fetchQuery({
|
|
@@ -12938,35 +12936,35 @@ const Uy = {
|
|
|
12938
12936
|
staleTime: 0
|
|
12939
12937
|
}),
|
|
12940
12938
|
[T, _]
|
|
12941
|
-
), z = mi(), H = !!y, W =
|
|
12939
|
+
), z = mi(), H = !!y, W = re(
|
|
12942
12940
|
() => Fb(o),
|
|
12943
12941
|
[o]
|
|
12944
|
-
), Z =
|
|
12942
|
+
), Z = re(
|
|
12945
12943
|
() => ({
|
|
12946
12944
|
...r || {},
|
|
12947
12945
|
...I.getMeta(),
|
|
12948
12946
|
esPOST: !0
|
|
12949
12947
|
}),
|
|
12950
12948
|
[r, I]
|
|
12951
|
-
), F =
|
|
12949
|
+
), F = re(
|
|
12952
12950
|
() => [
|
|
12953
12951
|
I.key,
|
|
12954
|
-
JSON.stringify(
|
|
12952
|
+
JSON.stringify(m),
|
|
12955
12953
|
JSON.stringify(Z)
|
|
12956
12954
|
].join("|"),
|
|
12957
|
-
[
|
|
12955
|
+
[m, I.key, Z]
|
|
12958
12956
|
);
|
|
12959
|
-
|
|
12957
|
+
se(() => {
|
|
12960
12958
|
const L = u.find(
|
|
12961
12959
|
(ee) => ee.key === d
|
|
12962
12960
|
) || u[0] || Qo[0];
|
|
12963
12961
|
v(L), P(!0);
|
|
12964
|
-
}, [u, d]),
|
|
12962
|
+
}, [u, d]), se(() => {
|
|
12965
12963
|
a && a({
|
|
12966
|
-
filter:
|
|
12964
|
+
filter: m,
|
|
12967
12965
|
meta: Z
|
|
12968
12966
|
});
|
|
12969
|
-
}, [
|
|
12967
|
+
}, [m, Z, a]), se(() => {
|
|
12970
12968
|
let L = !0;
|
|
12971
12969
|
return (/* @__PURE__ */ n(async () => {
|
|
12972
12970
|
try {
|
|
@@ -12983,7 +12981,7 @@ const Uy = {
|
|
|
12983
12981
|
(L, ee) => {
|
|
12984
12982
|
if (String(ee).endsWith("-placeholder"))
|
|
12985
12983
|
return;
|
|
12986
|
-
const pe = Pr(
|
|
12984
|
+
const pe = Pr(f, ee), De = ee === Yn.id ? {
|
|
12987
12985
|
fillista: _a("null", W),
|
|
12988
12986
|
mapId: ["funcod"]
|
|
12989
12987
|
} : {
|
|
@@ -12993,21 +12991,21 @@ const Uy = {
|
|
|
12993
12991
|
),
|
|
12994
12992
|
mapId: ["funcod"]
|
|
12995
12993
|
};
|
|
12996
|
-
P(!0), h(
|
|
12997
|
-
filter:
|
|
12994
|
+
P(!0), h(De), c?.({
|
|
12995
|
+
filter: De,
|
|
12998
12996
|
meta: Z,
|
|
12999
12997
|
selectedNode: pe
|
|
13000
12998
|
});
|
|
13001
12999
|
},
|
|
13002
|
-
[W, Z, c,
|
|
13000
|
+
[W, Z, c, f]
|
|
13003
13001
|
), B = ie(
|
|
13004
13002
|
(L) => {
|
|
13005
13003
|
P(!1), s && s(L);
|
|
13006
13004
|
},
|
|
13007
13005
|
[s]
|
|
13008
13006
|
), X = /* @__PURE__ */ n(async (L, ee, pe) => {
|
|
13009
|
-
const
|
|
13010
|
-
if (!(!pe || !
|
|
13007
|
+
const De = Pr(f, ee);
|
|
13008
|
+
if (!(!pe || !De?.hasItems || De.children.length > 0))
|
|
13011
13009
|
try {
|
|
13012
13010
|
const he = await O(ee), Ie = /* @__PURE__ */ n((me) => me.map((Re) => String(Re.id) === String(ee) ? Re.children.length > 0 ? Re : { ...Re, children: he } : Re.children.length > 0 ? { ...Re, children: Ie(Re.children) } : Re), "updateNodeChildren");
|
|
13013
13011
|
g((me) => Ie(me));
|
|
@@ -13197,7 +13195,7 @@ const Uy = {
|
|
|
13197
13195
|
fontSize: 18
|
|
13198
13196
|
}
|
|
13199
13197
|
},
|
|
13200
|
-
children: N(
|
|
13198
|
+
children: N(f)
|
|
13201
13199
|
}
|
|
13202
13200
|
)
|
|
13203
13201
|
]
|
|
@@ -13222,7 +13220,7 @@ const Uy = {
|
|
|
13222
13220
|
Ob,
|
|
13223
13221
|
{
|
|
13224
13222
|
resource: "form_224",
|
|
13225
|
-
filter:
|
|
13223
|
+
filter: m,
|
|
13226
13224
|
queryOptions: { meta: Z },
|
|
13227
13225
|
onRecordsLoaded: B
|
|
13228
13226
|
},
|
|
@@ -13275,9 +13273,9 @@ const Uy = {
|
|
|
13275
13273
|
onConfirm: d,
|
|
13276
13274
|
translateOptions: p = {},
|
|
13277
13275
|
filgrilla: u,
|
|
13278
|
-
meta:
|
|
13276
|
+
meta: m,
|
|
13279
13277
|
onStructureFilterChange: h,
|
|
13280
|
-
onStatusFilterChange:
|
|
13278
|
+
onStatusFilterChange: f,
|
|
13281
13279
|
initialFilterKey: g,
|
|
13282
13280
|
filterOptionKeys: y,
|
|
13283
13281
|
dialogProps: x
|
|
@@ -13354,11 +13352,11 @@ const Uy = {
|
|
|
13354
13352
|
$b,
|
|
13355
13353
|
{
|
|
13356
13354
|
filgrilla: u,
|
|
13357
|
-
meta:
|
|
13355
|
+
meta: m,
|
|
13358
13356
|
onRecordsLoaded: O,
|
|
13359
13357
|
onListParamsChange: T,
|
|
13360
13358
|
onStructureFilterChange: h,
|
|
13361
|
-
onStatusFilterChange:
|
|
13359
|
+
onStatusFilterChange: f,
|
|
13362
13360
|
initialFilterKey: g,
|
|
13363
13361
|
filterOptionKeys: y
|
|
13364
13362
|
}
|
|
@@ -13410,7 +13408,7 @@ const Uy = {
|
|
|
13410
13408
|
egresadosdosmeses: "E",
|
|
13411
13409
|
todos: "T"
|
|
13412
13410
|
}, Qy = /* @__PURE__ */ n((e) => {
|
|
13413
|
-
const { source: t, onChange: o, fullWidth: r = !1 } = e, [s, a] = oe(!1), [c, l] = oe(null), [d, p] = oe(""), u = Cn(),
|
|
13411
|
+
const { source: t, onChange: o, fullWidth: r = !1 } = e, [s, a] = oe(!1), [c, l] = oe(null), [d, p] = oe(""), u = Cn(), m = Ht(), h = bn(), f = wo(), g = fe(), y = Ge(), { estado: x, fichaProps: S = {} } = Be(), P = Ae(!1), {
|
|
13414
13412
|
hidden: C,
|
|
13415
13413
|
propsContenido: {
|
|
13416
13414
|
readOnly: b,
|
|
@@ -13447,13 +13445,13 @@ const Uy = {
|
|
|
13447
13445
|
rules: R
|
|
13448
13446
|
}), { [t]: te = {} } = S, ae = Ft(e), ue = te.onChange === void 0 ? o : te.onChange, Y = E !== !1 && W !== !1, [L, ee] = oe(
|
|
13449
13447
|
fo(W)
|
|
13450
|
-
), pe =
|
|
13448
|
+
), pe = re(
|
|
13451
13449
|
() => nr.find((V) => V.value === L) || nr[0],
|
|
13452
13450
|
[L]
|
|
13453
13451
|
);
|
|
13454
|
-
|
|
13452
|
+
se(() => {
|
|
13455
13453
|
ee(fo(W));
|
|
13456
|
-
}, [W]),
|
|
13454
|
+
}, [W]), se(() => {
|
|
13457
13455
|
P.current || (setTimeout(() => {
|
|
13458
13456
|
const V = y.getValues(t);
|
|
13459
13457
|
if (Y ? Fa(V) : V == null || V === "") {
|
|
@@ -13467,7 +13465,7 @@ const Uy = {
|
|
|
13467
13465
|
}
|
|
13468
13466
|
}, 0), P.current = !0);
|
|
13469
13467
|
}, [_, y, W, t, Y]);
|
|
13470
|
-
const
|
|
13468
|
+
const De = ie(
|
|
13471
13469
|
(V) => {
|
|
13472
13470
|
if (Y && Fa(V))
|
|
13473
13471
|
return g(pe.label);
|
|
@@ -13485,10 +13483,10 @@ const Uy = {
|
|
|
13485
13483
|
g,
|
|
13486
13484
|
Y
|
|
13487
13485
|
]
|
|
13488
|
-
), he = N.value, Ie =
|
|
13489
|
-
() =>
|
|
13490
|
-
[he,
|
|
13491
|
-
), me =
|
|
13486
|
+
), he = N.value, Ie = re(
|
|
13487
|
+
() => De(he),
|
|
13488
|
+
[he, De]
|
|
13489
|
+
), me = re(() => {
|
|
13492
13490
|
const V = Xn(he, {
|
|
13493
13491
|
soloActivos: L
|
|
13494
13492
|
});
|
|
@@ -13497,7 +13495,7 @@ const Uy = {
|
|
|
13497
13495
|
const $ = Kn(V.seleccion);
|
|
13498
13496
|
return $.length === 0 ? Ie : $.length === 1 ? `Funcionario ${$[0]}` : `${$.length} funcionarios seleccionados`;
|
|
13499
13497
|
}, [L, Ie, he]), [Re, He] = oe("");
|
|
13500
|
-
|
|
13498
|
+
se(() => {
|
|
13501
13499
|
const V = Xn(he, {
|
|
13502
13500
|
soloActivos: L
|
|
13503
13501
|
}), $ = Kn(V.seleccion);
|
|
@@ -13509,7 +13507,7 @@ const Uy = {
|
|
|
13509
13507
|
return (/* @__PURE__ */ n(async () => {
|
|
13510
13508
|
const Jt = await Promise.all(
|
|
13511
13509
|
$.slice(0, 12).map(
|
|
13512
|
-
(it) => kb(
|
|
13510
|
+
(it) => kb(m, it, h)
|
|
13513
13511
|
)
|
|
13514
13512
|
);
|
|
13515
13513
|
G && He(
|
|
@@ -13521,7 +13519,7 @@ const Uy = {
|
|
|
13521
13519
|
}, "loadTooltip"))(), () => {
|
|
13522
13520
|
G = !1;
|
|
13523
13521
|
};
|
|
13524
|
-
}, [L,
|
|
13522
|
+
}, [L, m, he, h]);
|
|
13525
13523
|
const Ue = ie(
|
|
13526
13524
|
(V) => {
|
|
13527
13525
|
ue && ue(ae, x, V);
|
|
@@ -13624,7 +13622,7 @@ const Uy = {
|
|
|
13624
13622
|
let Le = null;
|
|
13625
13623
|
try {
|
|
13626
13624
|
Le = await Tb(
|
|
13627
|
-
|
|
13625
|
+
m,
|
|
13628
13626
|
$,
|
|
13629
13627
|
L
|
|
13630
13628
|
);
|
|
@@ -13632,7 +13630,7 @@ const Uy = {
|
|
|
13632
13630
|
Le = null;
|
|
13633
13631
|
}
|
|
13634
13632
|
if (!Le) {
|
|
13635
|
-
p(""),
|
|
13633
|
+
p(""), f(`El funcionario '${$}' no existe`, {
|
|
13636
13634
|
type: "error"
|
|
13637
13635
|
}), G && H?.(ae, x, V);
|
|
13638
13636
|
return;
|
|
@@ -13646,10 +13644,10 @@ const Uy = {
|
|
|
13646
13644
|
[
|
|
13647
13645
|
O,
|
|
13648
13646
|
L,
|
|
13649
|
-
|
|
13647
|
+
m,
|
|
13650
13648
|
x,
|
|
13651
13649
|
d,
|
|
13652
|
-
|
|
13650
|
+
f,
|
|
13653
13651
|
H,
|
|
13654
13652
|
z,
|
|
13655
13653
|
ne,
|