biblio-react 3.0.61 → 3.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1005 -1001
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -221,11 +221,11 @@ const jp = wr((e, t) => {
|
|
|
221
221
|
hide: /* @__PURE__ */ n((u) => a((m) => {
|
|
222
222
|
if (!m.length)
|
|
223
223
|
return m;
|
|
224
|
-
const
|
|
225
|
-
if (!
|
|
224
|
+
const h = Yp(u);
|
|
225
|
+
if (!h)
|
|
226
226
|
return m.slice(0, -1);
|
|
227
|
-
const
|
|
228
|
-
return Xp(m,
|
|
227
|
+
const f = Kp(m, h);
|
|
228
|
+
return Xp(m, f);
|
|
229
229
|
}), "hide")
|
|
230
230
|
}),
|
|
231
231
|
[l, d, r, s]
|
|
@@ -246,18 +246,18 @@ const jp = wr((e, t) => {
|
|
|
246
246
|
handleSeleccionMultiple: r,
|
|
247
247
|
pivotEnabled: Ps,
|
|
248
248
|
pivotUi: Is
|
|
249
|
-
}), [
|
|
250
|
-
m((
|
|
251
|
-
}, []), C = u.pivotEnabled ?? Ps,
|
|
252
|
-
|
|
253
|
-
const
|
|
254
|
-
return !C &&
|
|
249
|
+
}), [h, f] = te("grilla"), g = ne((S) => {
|
|
250
|
+
m((y) => ({ ...y, ...S }));
|
|
251
|
+
}, []), C = u.pivotEnabled ?? Ps, x = u.pivotUi ?? Is, b = ne((S) => {
|
|
252
|
+
f((y) => {
|
|
253
|
+
const F = typeof S == "function" ? S(y) : S;
|
|
254
|
+
return !C && F === "pivot" ? "grilla" : F;
|
|
255
255
|
});
|
|
256
256
|
}, [C]);
|
|
257
257
|
ie(() => {
|
|
258
|
-
!C &&
|
|
259
|
-
}, [C,
|
|
260
|
-
const
|
|
258
|
+
!C && h === "pivot" && f("grilla");
|
|
259
|
+
}, [C, h]);
|
|
260
|
+
const P = de(
|
|
261
261
|
() => ({
|
|
262
262
|
props: {
|
|
263
263
|
...u,
|
|
@@ -269,10 +269,10 @@ const jp = wr((e, t) => {
|
|
|
269
269
|
filterActionsContainerRef: l,
|
|
270
270
|
actionsContainerRef: d,
|
|
271
271
|
gridContainerRef: p,
|
|
272
|
-
viewMode:
|
|
273
|
-
setViewMode:
|
|
272
|
+
viewMode: h,
|
|
273
|
+
setViewMode: b,
|
|
274
274
|
pivotEnabled: C,
|
|
275
|
-
pivotUi:
|
|
275
|
+
pivotUi: x
|
|
276
276
|
},
|
|
277
277
|
setProps: g
|
|
278
278
|
}),
|
|
@@ -286,13 +286,13 @@ const jp = wr((e, t) => {
|
|
|
286
286
|
l,
|
|
287
287
|
d,
|
|
288
288
|
p,
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
h,
|
|
290
|
+
b,
|
|
291
291
|
C,
|
|
292
|
-
|
|
292
|
+
x
|
|
293
293
|
]
|
|
294
294
|
);
|
|
295
|
-
return /* @__PURE__ */ i(kl.Provider, { value:
|
|
295
|
+
return /* @__PURE__ */ i(kl.Provider, { value: P, children: c });
|
|
296
296
|
}, "GrillaEtriekProvider"), Gt = /* @__PURE__ */ n(() => we(kl), "useGrillaEtriek"), Jp = /* @__PURE__ */ n((e, t, o, r, a) => ({
|
|
297
297
|
type: "RELOAD_CB",
|
|
298
298
|
payload: {
|
|
@@ -369,7 +369,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
369
369
|
parentFormControl: o,
|
|
370
370
|
propsContenidos: r,
|
|
371
371
|
setPropsContenidos: /* @__PURE__ */ n((m) => {
|
|
372
|
-
a((
|
|
372
|
+
a((h) => ({ ...h, ...m }));
|
|
373
373
|
}, "setPropsContenidos")
|
|
374
374
|
}),
|
|
375
375
|
[
|
|
@@ -403,19 +403,19 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
403
403
|
//user = [],
|
|
404
404
|
} = we(Ye) || {}, {
|
|
405
405
|
hidden: m,
|
|
406
|
-
required:
|
|
407
|
-
disabled:
|
|
406
|
+
required: h,
|
|
407
|
+
disabled: f,
|
|
408
408
|
label: g
|
|
409
409
|
} = u.length === 0 || !u[t] ? { hidden: 0, required: 0, disabled: 0, label: void 0 } : u[t], {
|
|
410
410
|
disabled: C,
|
|
411
|
-
hidden:
|
|
412
|
-
required:
|
|
413
|
-
error:
|
|
411
|
+
hidden: x,
|
|
412
|
+
required: b,
|
|
413
|
+
error: P,
|
|
414
414
|
label: S
|
|
415
|
-
} = p || {},
|
|
416
|
-
() => typeof
|
|
417
|
-
[
|
|
418
|
-
), { [t]:
|
|
415
|
+
} = p || {}, y = de(
|
|
416
|
+
() => typeof P == "function" ? P : P === void 0 ? void 0 : () => P,
|
|
417
|
+
[P]
|
|
418
|
+
), { [t]: F = {} } = a, { [t]: M = {} } = s, {
|
|
419
419
|
onFocus: I,
|
|
420
420
|
onChange: k,
|
|
421
421
|
onBlur: _,
|
|
@@ -434,7 +434,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
434
434
|
validate: H,
|
|
435
435
|
required: Z,
|
|
436
436
|
...oe
|
|
437
|
-
} =
|
|
437
|
+
} = F, ae = l || Q === void 0 ? L : Q, ee = l || T === void 0 ? W : T, $ = l || E === void 0 ? I : E, J = l || O === void 0 ? _ : O, fe = l || G === void 0 ? k : G, Se = St(e), Ce = V({
|
|
438
438
|
...D,
|
|
439
439
|
estado: o,
|
|
440
440
|
hidden: ae,
|
|
@@ -450,20 +450,20 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
450
450
|
validate: X,
|
|
451
451
|
required: pe,
|
|
452
452
|
...re
|
|
453
|
-
} = Ce, ke = Te || $, Ke = Ue || J, Fe = He || fe, at = [j, H, X].flat().some(($e) => $e?.isRequired), Je =
|
|
453
|
+
} = Ce, ke = Te || $, Ke = Ue || J, Fe = He || fe, at = [j, H, X].flat().some(($e) => $e?.isRequired), Je = b !== void 0 ? b : pe !== void 0 ? pe : h ? !0 : l || Z === void 0 ? q ?? at : Z, be = x !== void 0 ? x : De !== void 0 ? De : m ? !0 : ae, bt = C !== void 0 ? C : me !== void 0 ? me : f ? !0 : ee, Xe = de(() => {
|
|
454
454
|
const $e = Array.isArray(j) ? j : [j], Tt = Array.isArray(H) ? H : [H], kt = Array.isArray(X) ? X : [X];
|
|
455
455
|
let je = [
|
|
456
456
|
...$e,
|
|
457
457
|
...Tt,
|
|
458
458
|
...kt,
|
|
459
|
-
|
|
459
|
+
y
|
|
460
460
|
].filter((Ee) => Ee !== void 0);
|
|
461
461
|
return Je ? je.push(_l) : je = je.filter((Ee) => !Ee.isRequired), je;
|
|
462
462
|
}, [
|
|
463
463
|
j,
|
|
464
464
|
H,
|
|
465
465
|
X,
|
|
466
|
-
|
|
466
|
+
y,
|
|
467
467
|
Je
|
|
468
468
|
]), B = {
|
|
469
469
|
sx: {
|
|
@@ -560,16 +560,16 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
560
560
|
setPerPage: p,
|
|
561
561
|
perPage: u,
|
|
562
562
|
defaultTitle: m,
|
|
563
|
-
setPage:
|
|
564
|
-
setFilters:
|
|
563
|
+
setPage: h,
|
|
564
|
+
setFilters: f,
|
|
565
565
|
selectedIds: g,
|
|
566
566
|
onUnselectItems: C,
|
|
567
|
-
onToggleItem:
|
|
568
|
-
isLoading:
|
|
569
|
-
exporter:
|
|
567
|
+
onToggleItem: x,
|
|
568
|
+
isLoading: b,
|
|
569
|
+
exporter: P,
|
|
570
570
|
hideFilter: S,
|
|
571
|
-
hasCreate:
|
|
572
|
-
filterValues:
|
|
571
|
+
hasCreate: y,
|
|
572
|
+
filterValues: F,
|
|
573
573
|
displayedFilters: M,
|
|
574
574
|
sort: I,
|
|
575
575
|
...k
|
|
@@ -804,16 +804,16 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
804
804
|
o.refetchQueries({ queryKey: [t], type: "active" });
|
|
805
805
|
}, [o, t]);
|
|
806
806
|
}, "useResourceRefresh"), hn = /* @__PURE__ */ n(() => ({}), "useDefaultHook"), xi = /* @__PURE__ */ n((e) => {
|
|
807
|
-
const t = oo(), o = gt(), r = Vt(), a = di(), s = Co(), c = xe(e), l = jl(e), d = jd(c), p = It(), u = Gt(), m = he(),
|
|
808
|
-
const M =
|
|
809
|
-
!M || C?.[M] || g?.register?.(
|
|
807
|
+
const t = oo(), o = gt(), r = Vt(), a = di(), s = Co(), c = xe(e), l = jl(e), d = jd(c), p = It(), u = Gt(), m = he(), h = Ol(), [f] = Nr(c), g = we(Oa), C = Sr(), x = `lista_${c.split("_")[1]}`, { getItem: b } = qd(), P = b(`${x}.selectedIds`), S = b(`${x}.selectedDetails`), y = /* @__PURE__ */ n((F) => {
|
|
808
|
+
const M = F?.name;
|
|
809
|
+
!M || C?.[M] || g?.register?.(F);
|
|
810
810
|
}, "registerResource");
|
|
811
811
|
return {
|
|
812
|
-
ajax:
|
|
812
|
+
ajax: f,
|
|
813
813
|
data: t,
|
|
814
814
|
grilla: u,
|
|
815
815
|
lista: {
|
|
816
|
-
selectedIds:
|
|
816
|
+
selectedIds: P,
|
|
817
817
|
selectedDetails: S
|
|
818
818
|
},
|
|
819
819
|
notify: o,
|
|
@@ -826,31 +826,31 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
826
826
|
unselectAll: d,
|
|
827
827
|
asistente: p,
|
|
828
828
|
translate: m,
|
|
829
|
-
abrirVentanaSistema:
|
|
830
|
-
registerResource:
|
|
829
|
+
abrirVentanaSistema: h,
|
|
830
|
+
registerResource: y
|
|
831
831
|
};
|
|
832
832
|
}, "useUtilsGrilla"), ey = /* @__PURE__ */ n((e) => {
|
|
833
|
-
const t = Bl(), o = Ll(), r = $l(), a = Nl(), s = Vl(), c = Wl(), l = Co(), d = gt(), p = Vt(), u = di(), m = xe(e),
|
|
834
|
-
propsContenidos:
|
|
833
|
+
const t = Bl(), o = Ll(), r = $l(), a = Nl(), s = Vl(), c = Wl(), l = Co(), d = gt(), p = Vt(), u = di(), m = xe(e), h = It(), {
|
|
834
|
+
propsContenidos: f,
|
|
835
835
|
setPropsContenidos: g,
|
|
836
836
|
fichaProps: { etrs: C = {} } = {}
|
|
837
|
-
} = Re() || {},
|
|
837
|
+
} = Re() || {}, x = we($o) || {}, [b] = Nr(m);
|
|
838
838
|
return {
|
|
839
|
-
ajax:
|
|
839
|
+
ajax: b,
|
|
840
840
|
notify: d,
|
|
841
841
|
redirect: p,
|
|
842
842
|
navigate: u,
|
|
843
843
|
recargarComboBox: t,
|
|
844
844
|
progress: l,
|
|
845
|
-
asistente:
|
|
846
|
-
ficha: { propsContenidos:
|
|
845
|
+
asistente: h,
|
|
846
|
+
ficha: { propsContenidos: f, setPropsContenidos: g },
|
|
847
847
|
setHidden: o,
|
|
848
848
|
setDisable: r,
|
|
849
849
|
setRequire: a,
|
|
850
850
|
setError: s,
|
|
851
851
|
setLabel: c,
|
|
852
852
|
etrs: C,
|
|
853
|
-
asisEtr:
|
|
853
|
+
asisEtr: x
|
|
854
854
|
};
|
|
855
855
|
}, "useUtilsSubmit"), On = /* @__PURE__ */ new Map(), St = /* @__PURE__ */ n((e) => {
|
|
856
856
|
const t = xe(e), o = e?.id ?? "new", r = Rt(), { parentFormControl: a } = Re(), s = r ?? `${t}-${o}`, c = Ge(), l = c?.control === a ? null : c;
|
|
@@ -867,7 +867,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
867
867
|
return O?.size === 1 ? O.values().next().value.form : null;
|
|
868
868
|
}, "getForm"), p = /* @__PURE__ */ n((...O) => d()?.trigger?.(...O), "trigger"), u = /* @__PURE__ */ n((O) => (G, Q) => {
|
|
869
869
|
O(G, Q), setTimeout(() => p(G), 0);
|
|
870
|
-
}, "withRevalidate"), m = Hl(),
|
|
870
|
+
}, "withRevalidate"), m = Hl(), h = Bl(), f = Ll(), g = $l(), C = Nl(), x = Vl(), b = Wl(), P = Co(), S = gt(), y = Vt(), F = di(), M = It(), I = Ol(), k = we(Oa), _ = Sr(), {
|
|
871
871
|
propsContenidos: L,
|
|
872
872
|
setPropsContenidos: W,
|
|
873
873
|
fichaProps: { etrs: j = {} } = {}
|
|
@@ -879,11 +879,11 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
879
879
|
},
|
|
880
880
|
ajax: D,
|
|
881
881
|
notify: S,
|
|
882
|
-
redirect:
|
|
883
|
-
navigate:
|
|
884
|
-
recargarComboBox:
|
|
882
|
+
redirect: y,
|
|
883
|
+
navigate: F,
|
|
884
|
+
recargarComboBox: h,
|
|
885
885
|
resource: t,
|
|
886
|
-
progress:
|
|
886
|
+
progress: P,
|
|
887
887
|
asistente: M,
|
|
888
888
|
abrirVentanaSistema: I,
|
|
889
889
|
registerResource: /* @__PURE__ */ n((O) => {
|
|
@@ -892,11 +892,11 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
892
892
|
}, "registerResource"),
|
|
893
893
|
ficha: { propsContenidos: L, setPropsContenidos: W },
|
|
894
894
|
setHiddenButton: m?.setHidden,
|
|
895
|
-
setHidden: u(
|
|
895
|
+
setHidden: u(f),
|
|
896
896
|
setDisable: u(g),
|
|
897
897
|
setRequire: u(C),
|
|
898
|
-
setError: u(
|
|
899
|
-
setLabel: u(
|
|
898
|
+
setError: u(x),
|
|
899
|
+
setLabel: u(b),
|
|
900
900
|
etrs: j,
|
|
901
901
|
asisEtr: q
|
|
902
902
|
};
|
|
@@ -915,7 +915,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
915
915
|
hidden: u,
|
|
916
916
|
isLoading: o,
|
|
917
917
|
...p
|
|
918
|
-
}), { hidden:
|
|
918
|
+
}), { hidden: h, ...f } = m;
|
|
919
919
|
if (m === void 0)
|
|
920
920
|
throw new Error(
|
|
921
921
|
`useContenido está devolviendo undefined para el contenido ${e.source}
|
|
@@ -925,9 +925,9 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
925
925
|
propsContenido: {
|
|
926
926
|
...c,
|
|
927
927
|
...p,
|
|
928
|
-
...
|
|
928
|
+
...f
|
|
929
929
|
},
|
|
930
|
-
hidden:
|
|
930
|
+
hidden: h !== void 0 ? h : u
|
|
931
931
|
};
|
|
932
932
|
}, "useFieldController"), pm = /* @__PURE__ */ n((e) => {
|
|
933
933
|
const { tipo: t, ...o } = e, { propsContenido: r, hidden: a } = Ul(o), s = {
|
|
@@ -982,17 +982,17 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
982
982
|
(s, c, l) => {
|
|
983
983
|
const d = Kl(c);
|
|
984
984
|
if (t.current.updateRows([{ ...d, id: s }]), ii(t), r) {
|
|
985
|
-
const
|
|
986
|
-
...
|
|
985
|
+
const h = Array.from(t.current.getRowModels().values(), (f) => ({
|
|
986
|
+
...f,
|
|
987
987
|
claveFila: "",
|
|
988
988
|
estado: "N"
|
|
989
989
|
})) || [];
|
|
990
|
-
l.setValue(o,
|
|
990
|
+
l.setValue(o, h, { shouldDirty: !0 });
|
|
991
991
|
return;
|
|
992
992
|
}
|
|
993
993
|
const p = l.getValues()[o] || [];
|
|
994
994
|
let u = p.findIndex(
|
|
995
|
-
(
|
|
995
|
+
(h) => typeof s == "number" ? h?._id === s : h?.claveFila === s
|
|
996
996
|
);
|
|
997
997
|
const m = t.current.getRowIndexRelativeToVisibleRows(s);
|
|
998
998
|
u = u !== -1 ? u : m !== void 0 ? m : p.length, p[u] = {
|
|
@@ -1475,8 +1475,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1475
1475
|
).test(o), u = a && !p && l !== null && d !== "", m = u ? t.replace(
|
|
1476
1476
|
l === "." ? /,/g : /\./g,
|
|
1477
1477
|
""
|
|
1478
|
-
).replace(l, ".") : t.replace(/[.,]/g, ""),
|
|
1479
|
-
return Number.isFinite(
|
|
1478
|
+
).replace(l, ".") : t.replace(/[.,]/g, ""), h = Number(m);
|
|
1479
|
+
return Number.isFinite(h) ? { isDecimal: u, number: h, text: t } : null;
|
|
1480
1480
|
}, "normalizeNumberText"), tc = /* @__PURE__ */ n((e, t) => {
|
|
1481
1481
|
if (typeof t == "number" && Number.isFinite(t))
|
|
1482
1482
|
return {
|
|
@@ -1531,14 +1531,14 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1531
1531
|
children: c,
|
|
1532
1532
|
disableCombo: l = !1
|
|
1533
1533
|
}) => {
|
|
1534
|
-
const d = Oo(), p = Vm({ children: c, formattedValue: o, value: t }), u = Zt(o) ?? Zt(t) ?? Zt(c), m = !l && zr(e, { row: r, columns: a, primaryField: s }),
|
|
1534
|
+
const d = Oo(), p = Vm({ children: c, formattedValue: o, value: t }), u = Zt(o) ?? Zt(t) ?? Zt(c), m = !l && zr(e, { row: r, columns: a, primaryField: s }), h = Gm({
|
|
1535
1535
|
children: c,
|
|
1536
1536
|
displayValue: p,
|
|
1537
1537
|
formattedValue: o,
|
|
1538
1538
|
value: t
|
|
1539
|
-
}),
|
|
1540
|
-
if (
|
|
1541
|
-
const
|
|
1539
|
+
}), f = e?.type === "boolean" || h !== null, g = Nm(e, t), C = tc(e, t);
|
|
1540
|
+
if (f) {
|
|
1541
|
+
const P = h !== null ? h : Om(t), S = P ? d.palette.success.main : d.palette.error.main;
|
|
1542
1542
|
return /* @__PURE__ */ R(
|
|
1543
1543
|
Y,
|
|
1544
1544
|
{
|
|
@@ -1562,7 +1562,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1562
1562
|
}
|
|
1563
1563
|
},
|
|
1564
1564
|
children: [
|
|
1565
|
-
/* @__PURE__ */ i(
|
|
1565
|
+
/* @__PURE__ */ i(P ? fl : hl, { fontSize: "small" }),
|
|
1566
1566
|
/* @__PURE__ */ i(
|
|
1567
1567
|
Y,
|
|
1568
1568
|
{
|
|
@@ -1571,7 +1571,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1571
1571
|
display: "block",
|
|
1572
1572
|
lineHeight: "inherit"
|
|
1573
1573
|
},
|
|
1574
|
-
children:
|
|
1574
|
+
children: P ? "Si" : "No"
|
|
1575
1575
|
}
|
|
1576
1576
|
)
|
|
1577
1577
|
]
|
|
@@ -1629,7 +1629,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1629
1629
|
children: c
|
|
1630
1630
|
}
|
|
1631
1631
|
);
|
|
1632
|
-
const
|
|
1632
|
+
const P = Rm(o ?? t);
|
|
1633
1633
|
return /* @__PURE__ */ R(
|
|
1634
1634
|
Y,
|
|
1635
1635
|
{
|
|
@@ -1643,9 +1643,9 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1643
1643
|
px: 1,
|
|
1644
1644
|
py: 0.25,
|
|
1645
1645
|
borderRadius: 999,
|
|
1646
|
-
color:
|
|
1647
|
-
backgroundColor: se(
|
|
1648
|
-
border: `1px solid ${se(
|
|
1646
|
+
color: P,
|
|
1647
|
+
backgroundColor: se(P, 0.11),
|
|
1648
|
+
border: `1px solid ${se(P, 0.28)}`,
|
|
1649
1649
|
fontSize: "0.8125rem",
|
|
1650
1650
|
fontWeight: 650,
|
|
1651
1651
|
lineHeight: 1.4,
|
|
@@ -1662,7 +1662,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1662
1662
|
mr: 0.75,
|
|
1663
1663
|
flex: "0 0 auto",
|
|
1664
1664
|
borderRadius: "50%",
|
|
1665
|
-
backgroundColor:
|
|
1665
|
+
backgroundColor: P
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
1668
|
),
|
|
@@ -1687,7 +1687,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1687
1687
|
}
|
|
1688
1688
|
);
|
|
1689
1689
|
}
|
|
1690
|
-
const
|
|
1690
|
+
const x = C.isNumber ? C.isDecimal ? Cm : ym : g ? wm : d.palette.text?.primary || Sm, b = C.isNumber ? 650 : 600;
|
|
1691
1691
|
return /* @__PURE__ */ i(
|
|
1692
1692
|
Y,
|
|
1693
1693
|
{
|
|
@@ -1699,8 +1699,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1699
1699
|
overflow: "hidden",
|
|
1700
1700
|
textOverflow: "ellipsis",
|
|
1701
1701
|
whiteSpace: "nowrap",
|
|
1702
|
-
color:
|
|
1703
|
-
fontWeight:
|
|
1702
|
+
color: x,
|
|
1703
|
+
fontWeight: b,
|
|
1704
1704
|
lineHeight: 1.45,
|
|
1705
1705
|
verticalAlign: "middle"
|
|
1706
1706
|
},
|
|
@@ -1713,25 +1713,25 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1713
1713
|
rl
|
|
1714
1714
|
), s = bo(t, _u).has(e.id), c = v.useMemo(
|
|
1715
1715
|
() => Object.keys(r).filter(
|
|
1716
|
-
(
|
|
1716
|
+
(y) => r[y] !== !1
|
|
1717
1717
|
),
|
|
1718
1718
|
[r]
|
|
1719
|
-
), l = v.useMemo(() => Array.isArray(e.columns) && e.columns.length ? e.columns.map((
|
|
1720
|
-
if (
|
|
1721
|
-
if (typeof
|
|
1722
|
-
if (typeof
|
|
1723
|
-
const
|
|
1724
|
-
if (["true", "1", "si", "sí", "yes", "y"].includes(
|
|
1719
|
+
), l = v.useMemo(() => Array.isArray(e.columns) && e.columns.length ? e.columns.map((y) => y.field ? y : t.current.getColumn(y)).filter((y) => y?.field && c.includes(y.field)) : c.map((y) => t.current.getColumn(y)).filter(Boolean), [e.columns, t, c]), d = /* @__PURE__ */ n((y) => typeof y == "number" || typeof y == "string" && y.trim() !== "" && !isNaN(y), "isNumericValue"), p = /* @__PURE__ */ n((y) => {
|
|
1720
|
+
if (y == null || y === "") return !1;
|
|
1721
|
+
if (typeof y == "boolean") return y;
|
|
1722
|
+
if (typeof y == "string") {
|
|
1723
|
+
const F = y.trim().toLowerCase();
|
|
1724
|
+
if (["true", "1", "si", "sí", "yes", "y"].includes(F))
|
|
1725
1725
|
return !0;
|
|
1726
|
-
if (["false", "0", "no", "n"].includes(
|
|
1726
|
+
if (["false", "0", "no", "n"].includes(F)) return !1;
|
|
1727
1727
|
}
|
|
1728
1728
|
return null;
|
|
1729
1729
|
}, "parseBooleanValue"), u = v.useMemo(() => {
|
|
1730
|
-
const
|
|
1730
|
+
const y = e.row ?? {}, F = l.find((_) => {
|
|
1731
1731
|
const L = (_.field?.toLowerCase?.() ?? "").replace(
|
|
1732
1732
|
/_lis$/,
|
|
1733
1733
|
""
|
|
1734
|
-
), W = (_.headerName ?? "").toString().toLowerCase(), j =
|
|
1734
|
+
), W = (_.headerName ?? "").toString().toLowerCase(), j = y?.[_.field], q = [
|
|
1735
1735
|
"nombrecompleto",
|
|
1736
1736
|
"nombrecompletodos",
|
|
1737
1737
|
"funcnom",
|
|
@@ -1739,8 +1739,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1739
1739
|
].includes(L) || W.includes("nombre completo") || W === "funcionario", D = _.type === "number" || _.type === "numeric" || d(j);
|
|
1740
1740
|
return q && !D && j != null && j !== "";
|
|
1741
1741
|
});
|
|
1742
|
-
if (
|
|
1743
|
-
return
|
|
1742
|
+
if (F?.field)
|
|
1743
|
+
return F;
|
|
1744
1744
|
const M = [
|
|
1745
1745
|
"descripcion",
|
|
1746
1746
|
"desc",
|
|
@@ -1749,20 +1749,20 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1749
1749
|
"titulo",
|
|
1750
1750
|
"title"
|
|
1751
1751
|
], I = l.find((_) => {
|
|
1752
|
-
const L = _.field?.toLowerCase?.() ?? "", W = M.some((D) => L.includes(D)), j =
|
|
1752
|
+
const L = _.field?.toLowerCase?.() ?? "", W = M.some((D) => L.includes(D)), j = y?.[_.field], q = _.type === "number" || _.type === "numeric" || d(j);
|
|
1753
1753
|
return W && !q && j != null && j !== "";
|
|
1754
1754
|
});
|
|
1755
1755
|
return I?.field ? I : l.find((_) => {
|
|
1756
|
-
const L =
|
|
1756
|
+
const L = y?.[_.field];
|
|
1757
1757
|
return !(_.type === "number" || _.type === "numeric" || d(L)) && L != null && L !== "";
|
|
1758
1758
|
});
|
|
1759
|
-
}, [l, e.row]), m = u?.field,
|
|
1760
|
-
const
|
|
1761
|
-
return m ?
|
|
1762
|
-
}, [e.row, m]), g = typeof e.primaryText == "function" ? e.primaryText(e.row) : e.primaryText, C = typeof e.primaryTextPrefix == "function" ? e.primaryTextPrefix(e.row) : e.primaryTextPrefix,
|
|
1763
|
-
(
|
|
1764
|
-
const M =
|
|
1765
|
-
return M.endsWith("_lis") || (!
|
|
1759
|
+
}, [l, e.row]), m = u?.field, h = u?.headerName ?? u?.field ?? "Detalle", f = v.useMemo(() => {
|
|
1760
|
+
const y = e.row ?? {};
|
|
1761
|
+
return m ? y?.[m] : void 0;
|
|
1762
|
+
}, [e.row, m]), g = typeof e.primaryText == "function" ? e.primaryText(e.row) : e.primaryText, C = typeof e.primaryTextPrefix == "function" ? e.primaryTextPrefix(e.row) : e.primaryTextPrefix, x = typeof e.secondaryText == "function" ? e.secondaryText(e.row) : e.secondaryText, b = v.useCallback(
|
|
1763
|
+
(y, F) => {
|
|
1764
|
+
const M = y?.field?.toLowerCase() ?? "", I = y?.type, k = I === "date" || I === "dateTime" || M.includes("fecha") || F instanceof Date, _ = I === "time" || M.includes("hora") || M.includes("time") || (y?.headerName || "").toString().toLowerCase().includes("hora"), L = I === "number" || I === "numeric" || typeof F == "number", W = I === "boolean";
|
|
1765
|
+
return M.endsWith("_lis") || (!y?.align || M.endsWith("nom")) && !I ? {
|
|
1766
1766
|
icon: dp,
|
|
1767
1767
|
color: o.palette.secondary.main
|
|
1768
1768
|
} : k || _ ? {
|
|
@@ -1780,23 +1780,23 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1780
1780
|
};
|
|
1781
1781
|
},
|
|
1782
1782
|
[o]
|
|
1783
|
-
),
|
|
1783
|
+
), P = v.useMemo(
|
|
1784
1784
|
() => l.filter(
|
|
1785
|
-
(
|
|
1785
|
+
(y) => C || y.field !== m
|
|
1786
1786
|
),
|
|
1787
1787
|
[l, C, m]
|
|
1788
|
-
), S = /* @__PURE__ */ n((
|
|
1789
|
-
if (typeof
|
|
1788
|
+
), S = /* @__PURE__ */ n((y, F, M) => {
|
|
1789
|
+
if (typeof y?.valueFormatter == "function") {
|
|
1790
1790
|
try {
|
|
1791
|
-
|
|
1791
|
+
F = t.current.getCellParams(
|
|
1792
1792
|
M?.id ?? e.id,
|
|
1793
|
-
|
|
1793
|
+
y.field
|
|
1794
1794
|
).value;
|
|
1795
1795
|
} catch {
|
|
1796
1796
|
}
|
|
1797
|
-
return
|
|
1797
|
+
return y.valueFormatter(F, M, y, t.current);
|
|
1798
1798
|
}
|
|
1799
|
-
return
|
|
1799
|
+
return F ?? M?.[y.field] ?? "N/A";
|
|
1800
1800
|
}, "formatValue");
|
|
1801
1801
|
return /* @__PURE__ */ R(
|
|
1802
1802
|
Ra,
|
|
@@ -1834,8 +1834,8 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1834
1834
|
/* @__PURE__ */ i(
|
|
1835
1835
|
Id,
|
|
1836
1836
|
{
|
|
1837
|
-
title: g ?? ([C,
|
|
1838
|
-
subheader:
|
|
1837
|
+
title: g ?? ([C, f].filter((y) => y != null && y !== "").join(" — ") || "Detalle del registro"),
|
|
1838
|
+
subheader: x ?? h,
|
|
1839
1839
|
action: e.showAction ? /* @__PURE__ */ i(
|
|
1840
1840
|
Y,
|
|
1841
1841
|
{
|
|
@@ -1883,7 +1883,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1883
1883
|
},
|
|
1884
1884
|
sx: {
|
|
1885
1885
|
p: 2,
|
|
1886
|
-
pb:
|
|
1886
|
+
pb: P.length ? 1.5 : 2,
|
|
1887
1887
|
alignItems: "center",
|
|
1888
1888
|
"& .MuiCardHeader-content": { minWidth: 0 },
|
|
1889
1889
|
"& .MuiCardHeader-action": {
|
|
@@ -1895,7 +1895,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
1897
|
),
|
|
1898
|
-
|
|
1898
|
+
P.length > 0 && /* @__PURE__ */ R(rt, { children: [
|
|
1899
1899
|
/* @__PURE__ */ i(Rd, { sx: { mx: 2 } }),
|
|
1900
1900
|
/* @__PURE__ */ i(
|
|
1901
1901
|
Ta,
|
|
@@ -1916,38 +1916,38 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1916
1916
|
columnGap: 2,
|
|
1917
1917
|
rowGap: 1.5
|
|
1918
1918
|
},
|
|
1919
|
-
children:
|
|
1920
|
-
const
|
|
1919
|
+
children: P.map((y) => {
|
|
1920
|
+
const F = y.field, M = y?.headerName ?? F, I = e.row ?? {}, k = t.current.getRowValue(I, y), _ = b(y, k), L = _.icon === xs || _.icon === lp;
|
|
1921
1921
|
let W, j = !1, q = null;
|
|
1922
1922
|
const E = zr(
|
|
1923
|
-
|
|
1923
|
+
y,
|
|
1924
1924
|
{
|
|
1925
1925
|
row: I,
|
|
1926
1926
|
columns: l,
|
|
1927
1927
|
primaryField: m
|
|
1928
1928
|
}
|
|
1929
1929
|
);
|
|
1930
|
-
if (typeof
|
|
1930
|
+
if (typeof y?.renderCell == "function") {
|
|
1931
1931
|
const G = {
|
|
1932
1932
|
id: I?.id ?? e.id,
|
|
1933
|
-
field:
|
|
1933
|
+
field: F,
|
|
1934
1934
|
row: I,
|
|
1935
1935
|
value: k,
|
|
1936
1936
|
api: t.current,
|
|
1937
1937
|
// v7 usa "api"
|
|
1938
|
-
colDef:
|
|
1938
|
+
colDef: y,
|
|
1939
1939
|
getValue: /* @__PURE__ */ n((T) => I?.[T], "getValue"),
|
|
1940
1940
|
// props opcionales comunes:
|
|
1941
1941
|
hasFocus: !1,
|
|
1942
1942
|
tabIndex: -1
|
|
1943
|
-
}, Q =
|
|
1943
|
+
}, Q = y.renderCell(G);
|
|
1944
1944
|
W = E ? /* @__PURE__ */ i(
|
|
1945
1945
|
ho,
|
|
1946
1946
|
{
|
|
1947
|
-
colDef:
|
|
1947
|
+
colDef: y,
|
|
1948
1948
|
value: k,
|
|
1949
1949
|
formattedValue: S(
|
|
1950
|
-
|
|
1950
|
+
y,
|
|
1951
1951
|
k,
|
|
1952
1952
|
I
|
|
1953
1953
|
),
|
|
@@ -1958,7 +1958,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
1958
1958
|
}
|
|
1959
1959
|
) : Q;
|
|
1960
1960
|
} else
|
|
1961
|
-
W = S(
|
|
1961
|
+
W = S(y, k, I), y?.type === "boolean" && !L ? (q = p(k), j = !0, W = /* @__PURE__ */ R(
|
|
1962
1962
|
li,
|
|
1963
1963
|
{
|
|
1964
1964
|
direction: "row",
|
|
@@ -2001,7 +2001,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
2001
2001
|
)) : W = /* @__PURE__ */ i(
|
|
2002
2002
|
ho,
|
|
2003
2003
|
{
|
|
2004
|
-
colDef:
|
|
2004
|
+
colDef: y,
|
|
2005
2005
|
value: k,
|
|
2006
2006
|
formattedValue: W,
|
|
2007
2007
|
row: I,
|
|
@@ -2074,7 +2074,7 @@ const ur = /* @__PURE__ */ n((e = "scope") => (Ts += 1, `${e}-${Ts}`), "createRe
|
|
|
2074
2074
|
)
|
|
2075
2075
|
]
|
|
2076
2076
|
},
|
|
2077
|
-
|
|
2077
|
+
F
|
|
2078
2078
|
);
|
|
2079
2079
|
})
|
|
2080
2080
|
}
|
|
@@ -2224,8 +2224,8 @@ function Km(e) {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
n(Km, "ToolbarColumnsItem");
|
|
2226
2226
|
function Xm(e) {
|
|
2227
|
-
const t = he(), { listView: o, container: r, containerRef: a } = e, [s, c] = v.useState(!1), [l, d] = v.useState(null), p = io(), u = bo(p, sl), m = bo(p, Eu),
|
|
2228
|
-
p.current.sortColumn(
|
|
2227
|
+
const t = he(), { listView: o, container: r, containerRef: a } = e, [s, c] = v.useState(!1), [l, d] = v.useState(null), p = io(), u = bo(p, sl), m = bo(p, Eu), h = u.filter((x) => x.sortable), f = m.length, g = /* @__PURE__ */ n((x, b) => {
|
|
2228
|
+
p.current.sortColumn(x, b, !0);
|
|
2229
2229
|
}, "handleSortChange");
|
|
2230
2230
|
v.useEffect(() => {
|
|
2231
2231
|
a?.current && d(a.current);
|
|
@@ -2236,7 +2236,7 @@ function Xm(e) {
|
|
|
2236
2236
|
{
|
|
2237
2237
|
"aria-label": t("pos.sort"),
|
|
2238
2238
|
onClick: /* @__PURE__ */ n(() => c(!0), "onClick"),
|
|
2239
|
-
children: /* @__PURE__ */ i(ys, { badgeContent:
|
|
2239
|
+
children: /* @__PURE__ */ i(ys, { badgeContent: f, color: "primary", variant: "dot", children: /* @__PURE__ */ i(bp, { fontSize: "small" }) })
|
|
2240
2240
|
}
|
|
2241
2241
|
),
|
|
2242
2242
|
/* @__PURE__ */ R(
|
|
@@ -2248,27 +2248,27 @@ function Xm(e) {
|
|
|
2248
2248
|
onClose: /* @__PURE__ */ n(() => c(!1), "onClose"),
|
|
2249
2249
|
children: [
|
|
2250
2250
|
/* @__PURE__ */ i(nc, { children: /* @__PURE__ */ i(Pt, { fontWeight: 500, children: t("pos.sort_by") }) }),
|
|
2251
|
-
/* @__PURE__ */ i(Ao, { children:
|
|
2252
|
-
const
|
|
2253
|
-
(
|
|
2254
|
-
),
|
|
2251
|
+
/* @__PURE__ */ i(Ao, { children: h.map((x) => {
|
|
2252
|
+
const b = m.findIndex(
|
|
2253
|
+
(y) => y.field === x.field
|
|
2254
|
+
), P = m[b];
|
|
2255
2255
|
let S = "asc";
|
|
2256
|
-
return
|
|
2256
|
+
return P && (S = P.sort === "asc" ? "desc" : null), /* @__PURE__ */ i(Ar, { disablePadding: !0, children: /* @__PURE__ */ R(
|
|
2257
2257
|
Jt,
|
|
2258
2258
|
{
|
|
2259
|
-
onClick: /* @__PURE__ */ n(() => g(
|
|
2259
|
+
onClick: /* @__PURE__ */ n(() => g(x.field, S), "onClick"),
|
|
2260
2260
|
children: [
|
|
2261
|
-
/* @__PURE__ */ i(Qt, { children:
|
|
2261
|
+
/* @__PURE__ */ i(Qt, { children: P && /* @__PURE__ */ i(
|
|
2262
2262
|
ys,
|
|
2263
2263
|
{
|
|
2264
|
-
badgeContent:
|
|
2265
|
-
children:
|
|
2264
|
+
badgeContent: f > 1 ? b + 1 : null,
|
|
2265
|
+
children: P.sort === "asc" ? /* @__PURE__ */ i(Ou, {}) : /* @__PURE__ */ i(Bu, {})
|
|
2266
2266
|
}
|
|
2267
2267
|
) }),
|
|
2268
|
-
/* @__PURE__ */ i(Bt, { children:
|
|
2268
|
+
/* @__PURE__ */ i(Bt, { children: x.headerName })
|
|
2269
2269
|
]
|
|
2270
2270
|
}
|
|
2271
|
-
) },
|
|
2271
|
+
) }, x.field);
|
|
2272
2272
|
}) })
|
|
2273
2273
|
]
|
|
2274
2274
|
}
|
|
@@ -2332,30 +2332,30 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2332
2332
|
const { jsPDF: o } = await import("jspdf"), r = new o({ orientation: "landscape", unit: "mm" }), a = 8, s = r.internal.pageSize.getWidth(), c = r.internal.pageSize.getHeight(), l = s - a * 2, d = tf(e, t), p = t.getRowsToExport?.({ apiRef: e }) ?? rc({ apiRef: e });
|
|
2333
2333
|
if (!d.length)
|
|
2334
2334
|
return;
|
|
2335
|
-
const u = l / d.length, m = d.map(() => u),
|
|
2336
|
-
let
|
|
2335
|
+
const u = l / d.length, m = d.map(() => u), h = t.fileName?.replace(/_/g, " ") || "Grilla";
|
|
2336
|
+
let f = As(r, h, a, a + 8);
|
|
2337
2337
|
const g = 7, C = d.length > 10 ? 5 : 7;
|
|
2338
|
-
r.setFontSize(C), _s(r, d, m, a,
|
|
2339
|
-
const
|
|
2340
|
-
(
|
|
2341
|
-
of(e,
|
|
2338
|
+
r.setFontSize(C), _s(r, d, m, a, f, g), f += g, p.forEach((b) => {
|
|
2339
|
+
const P = d.map(
|
|
2340
|
+
(F, M) => r.splitTextToSize(
|
|
2341
|
+
of(e, b, F),
|
|
2342
2342
|
m[M] - 2.4
|
|
2343
2343
|
)
|
|
2344
2344
|
), S = Math.max(
|
|
2345
2345
|
6,
|
|
2346
|
-
...
|
|
2346
|
+
...P.map((F) => F.length * 3.2 + 2.4)
|
|
2347
2347
|
);
|
|
2348
|
-
|
|
2349
|
-
let
|
|
2350
|
-
d.forEach((
|
|
2351
|
-
r.setDrawColor(225, 229, 235), r.rect(
|
|
2348
|
+
f + S > c - a && (r.addPage(), f = As(r, h, a, a + 8), r.setFontSize(C), _s(r, d, m, a, f, g), f += g);
|
|
2349
|
+
let y = a;
|
|
2350
|
+
d.forEach((F, M) => {
|
|
2351
|
+
r.setDrawColor(225, 229, 235), r.rect(y, f, m[M], S), r.text(P[M], y + 1.2, f + 4, {
|
|
2352
2352
|
maxWidth: m[M] - 2.4
|
|
2353
|
-
}),
|
|
2354
|
-
}),
|
|
2353
|
+
}), y += m[M];
|
|
2354
|
+
}), f += S;
|
|
2355
2355
|
});
|
|
2356
|
-
const
|
|
2357
|
-
for (let
|
|
2358
|
-
r.setPage(
|
|
2356
|
+
const x = r.internal.getNumberOfPages();
|
|
2357
|
+
for (let b = 1; b <= x; b += 1)
|
|
2358
|
+
r.setPage(b), r.setFontSize(7), r.text(`${b}/${x}`, s - a, c - 4, {
|
|
2359
2359
|
align: "right"
|
|
2360
2360
|
});
|
|
2361
2361
|
r.save(`${t.fileName || "grilla"}.pdf`);
|
|
@@ -2392,28 +2392,28 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2392
2392
|
const [r, a] = te(null), [s, c] = te(!1), l = io(), d = Bo(), p = he(), {
|
|
2393
2393
|
csvOptions: u = {},
|
|
2394
2394
|
excelOptions: m = {},
|
|
2395
|
-
printOptions:
|
|
2396
|
-
...
|
|
2397
|
-
} = o, { slotProps: g = {}, ...C } =
|
|
2395
|
+
printOptions: h = {},
|
|
2396
|
+
...f
|
|
2397
|
+
} = o, { slotProps: g = {}, ...C } = f, x = xe(), b = no({ resource: x }), P = v.useContext(Ye) || {};
|
|
2398
2398
|
ie(() => {
|
|
2399
2399
|
e?.current && a(e.current);
|
|
2400
2400
|
}, [e]);
|
|
2401
2401
|
const S = v.useCallback(
|
|
2402
2402
|
(E, O) => l.current?.getLocaleText?.(E) ?? O,
|
|
2403
2403
|
[l]
|
|
2404
|
-
),
|
|
2404
|
+
), y = v.useCallback(
|
|
2405
2405
|
(E) => ({
|
|
2406
2406
|
...E,
|
|
2407
2407
|
getRowsToExport: rc
|
|
2408
2408
|
}),
|
|
2409
2409
|
[]
|
|
2410
|
-
),
|
|
2410
|
+
), F = v.useCallback(
|
|
2411
2411
|
(E) => {
|
|
2412
|
-
const O =
|
|
2412
|
+
const O = y(E);
|
|
2413
2413
|
if (O.fileName)
|
|
2414
2414
|
return O;
|
|
2415
2415
|
const G = Zm(
|
|
2416
|
-
|
|
2416
|
+
P.titulo || b?.options?.label || x
|
|
2417
2417
|
);
|
|
2418
2418
|
return G ? {
|
|
2419
2419
|
...O,
|
|
@@ -2421,10 +2421,10 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2421
2421
|
} : O;
|
|
2422
2422
|
},
|
|
2423
2423
|
[
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2424
|
+
P.titulo,
|
|
2425
|
+
x,
|
|
2426
|
+
b?.options?.label,
|
|
2427
|
+
y
|
|
2428
2428
|
]
|
|
2429
2429
|
), M = v.useCallback(
|
|
2430
2430
|
(E) => {
|
|
@@ -2454,13 +2454,13 @@ const Hr = /* @__PURE__ */ n((e) => typeof e == "boolean" ? e : !!parseInt(e), "
|
|
|
2454
2454
|
[l, t, s, d]
|
|
2455
2455
|
);
|
|
2456
2456
|
if (!r) return null;
|
|
2457
|
-
const k =
|
|
2458
|
-
|
|
2459
|
-
), L =
|
|
2457
|
+
const k = F(u), _ = M(
|
|
2458
|
+
F(m)
|
|
2459
|
+
), L = F({
|
|
2460
2460
|
hideFooter: !0,
|
|
2461
2461
|
hideToolbar: !0,
|
|
2462
|
-
...
|
|
2463
|
-
}), W = u.disableToolbarButton !== !0 && typeof l.current?.exportDataAsCsv == "function", j = m.disableToolbarButton !== !0 && typeof l.current?.exportDataAsExcel == "function", q =
|
|
2462
|
+
...h
|
|
2463
|
+
}), W = u.disableToolbarButton !== !0 && typeof l.current?.exportDataAsCsv == "function", j = m.disableToolbarButton !== !0 && typeof l.current?.exportDataAsExcel == "function", q = h.disableToolbarButton !== !0, D = !!s || !!g?.button?.disabled;
|
|
2464
2464
|
return !W && !j && !q ? null : _r(
|
|
2465
2465
|
/* @__PURE__ */ R(
|
|
2466
2466
|
$u,
|
|
@@ -2543,17 +2543,17 @@ function sf(e) {
|
|
|
2543
2543
|
actionsContainerRef: p,
|
|
2544
2544
|
filterActionsContainerRef: u,
|
|
2545
2545
|
hideGridToolbarActions: m = !0,
|
|
2546
|
-
pivotUi:
|
|
2546
|
+
pivotUi: h = "mui"
|
|
2547
2547
|
}
|
|
2548
|
-
} = Gt(),
|
|
2548
|
+
} = Gt(), f = bo(
|
|
2549
2549
|
l,
|
|
2550
2550
|
Vu
|
|
2551
|
-
), g = s &&
|
|
2551
|
+
), g = s && f > 0, C = t && m && !c && !g, x = /* @__PURE__ */ n(() => {
|
|
2552
2552
|
l.current.setRowSelectionModel([]);
|
|
2553
|
-
}, "handleClearSelection"),
|
|
2553
|
+
}, "handleClearSelection"), b = {
|
|
2554
2554
|
listView: t,
|
|
2555
2555
|
container: o
|
|
2556
|
-
},
|
|
2556
|
+
}, P = /* @__PURE__ */ n((S) => {
|
|
2557
2557
|
S?.stopPropagation?.(), l.current?.showSidebar?.("pivot");
|
|
2558
2558
|
}, "handleOpenPivotPanel");
|
|
2559
2559
|
return /* @__PURE__ */ i(
|
|
@@ -2574,12 +2574,12 @@ function sf(e) {
|
|
|
2574
2574
|
si,
|
|
2575
2575
|
{
|
|
2576
2576
|
sx: { mr: 0.5 },
|
|
2577
|
-
onClick:
|
|
2577
|
+
onClick: x,
|
|
2578
2578
|
children: /* @__PURE__ */ i(zu, { fontSize: "small" })
|
|
2579
2579
|
}
|
|
2580
2580
|
),
|
|
2581
2581
|
/* @__PURE__ */ R(Pt, { variant: "body2", children: [
|
|
2582
|
-
|
|
2582
|
+
f,
|
|
2583
2583
|
" seleccionado"
|
|
2584
2584
|
] })
|
|
2585
2585
|
] }) : /* @__PURE__ */ R(v.Fragment, { children: [
|
|
@@ -2618,15 +2618,15 @@ function sf(e) {
|
|
|
2618
2618
|
)
|
|
2619
2619
|
}
|
|
2620
2620
|
),
|
|
2621
|
-
!m && /* @__PURE__ */ i(Km, { ...
|
|
2621
|
+
!m && /* @__PURE__ */ i(Km, { ...b }),
|
|
2622
2622
|
(!m || t) && /* @__PURE__ */ i(
|
|
2623
2623
|
Xm,
|
|
2624
2624
|
{
|
|
2625
|
-
...
|
|
2625
|
+
...b,
|
|
2626
2626
|
containerRef: t ? u : void 0
|
|
2627
2627
|
}
|
|
2628
2628
|
),
|
|
2629
|
-
c &&
|
|
2629
|
+
c && h !== "custom" && /* @__PURE__ */ i(si, { onClick: P, children: /* @__PURE__ */ i(Hu, { fontSize: "small" }) }),
|
|
2630
2630
|
/* @__PURE__ */ i(
|
|
2631
2631
|
lc,
|
|
2632
2632
|
{
|
|
@@ -3158,46 +3158,46 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3158
3158
|
const t = Oo(), o = t.metiri?.fichaVisual === !0, r = he(), a = xe(), s = e?.resource ?? a ?? "default", l = Gt()?.props, d = e?.dockviewTabParent === !0, p = v.useContext(Ye) || {}, u = p?.popup ?? p?.popupSize ?? null, m = v.useMemo(
|
|
3159
3159
|
() => ff(u, e?.popupRatio),
|
|
3160
3160
|
[u, e?.popupRatio]
|
|
3161
|
-
),
|
|
3161
|
+
), h = mt((E) => E.breakpoints.down("sm")), [f, g] = v.useState(null), C = v.useMemo(
|
|
3162
3162
|
() => d ? Ls(l) : null,
|
|
3163
3163
|
[d, l]
|
|
3164
|
-
),
|
|
3164
|
+
), x = v.useMemo(
|
|
3165
3165
|
() => `metiri_popup_size_${s}`,
|
|
3166
3166
|
[s]
|
|
3167
|
-
), [
|
|
3168
|
-
() => gf(
|
|
3169
|
-
), S = v.useRef(null), [
|
|
3167
|
+
), [b, P] = v.useState(
|
|
3168
|
+
() => gf(x)
|
|
3169
|
+
), S = v.useRef(null), [y, F] = v.useState(null);
|
|
3170
3170
|
v.useEffect(() => {
|
|
3171
|
-
if (!o || !
|
|
3171
|
+
if (!o || !f)
|
|
3172
3172
|
return;
|
|
3173
3173
|
const E = C ?? wi(l), O = /* @__PURE__ */ n(() => {
|
|
3174
3174
|
const Q = E?.getBoundingClientRect?.() ?? {
|
|
3175
3175
|
width: window.innerWidth,
|
|
3176
3176
|
height: window.innerHeight
|
|
3177
3177
|
};
|
|
3178
|
-
|
|
3178
|
+
F(
|
|
3179
3179
|
(V) => V?.width === Q.width && V?.height === Q.height ? V : { width: Q.width, height: Q.height }
|
|
3180
3180
|
);
|
|
3181
3181
|
const T = zi({ rect: Q, ratio: m });
|
|
3182
|
-
|
|
3182
|
+
f.style.maxWidth && (f.style.maxWidth = `${T.maxWidth}px`, f.style.maxHeight = `${T.maxHeight}px`);
|
|
3183
3183
|
}, "measure");
|
|
3184
3184
|
O();
|
|
3185
3185
|
const G = typeof ResizeObserver > "u" ? null : new ResizeObserver(O);
|
|
3186
3186
|
return E && G?.observe(E), window.addEventListener("resize", O), () => {
|
|
3187
3187
|
G?.disconnect(), window.removeEventListener("resize", O);
|
|
3188
3188
|
};
|
|
3189
|
-
}, [o,
|
|
3189
|
+
}, [o, f, C, l, m]);
|
|
3190
3190
|
const M = v.useMemo(() => {
|
|
3191
|
-
const E = (o ?
|
|
3191
|
+
const E = (o ? y : null) ?? C?.getBoundingClientRect?.() ?? Bs(l);
|
|
3192
3192
|
return zi({ rect: E, ratio: m });
|
|
3193
|
-
}, [o,
|
|
3193
|
+
}, [o, y, l, C, m]);
|
|
3194
3194
|
v.useEffect(() => {
|
|
3195
|
-
|
|
3195
|
+
b || h || P({
|
|
3196
3196
|
width: M.width,
|
|
3197
3197
|
height: M.height
|
|
3198
3198
|
});
|
|
3199
|
-
}, [M.height, M.width,
|
|
3200
|
-
if (!
|
|
3199
|
+
}, [M.height, M.width, h, b]), v.useEffect(() => {
|
|
3200
|
+
if (!f || h || typeof ResizeObserver > "u")
|
|
3201
3201
|
return;
|
|
3202
3202
|
const E = new ResizeObserver((O) => {
|
|
3203
3203
|
const G = O?.[0];
|
|
@@ -3207,27 +3207,27 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3207
3207
|
width: Math.round(G.contentRect.width),
|
|
3208
3208
|
height: Math.round(G.contentRect.height)
|
|
3209
3209
|
};
|
|
3210
|
-
|
|
3211
|
-
$s(
|
|
3210
|
+
P((T) => T?.width === Q.width && T?.height === Q.height ? T : Q), S.current && clearTimeout(S.current), S.current = setTimeout(() => {
|
|
3211
|
+
$s(x, Q);
|
|
3212
3212
|
}, 200);
|
|
3213
3213
|
});
|
|
3214
|
-
return E.observe(
|
|
3214
|
+
return E.observe(f), () => {
|
|
3215
3215
|
S.current && clearTimeout(S.current), E.disconnect();
|
|
3216
3216
|
};
|
|
3217
|
-
}, [
|
|
3217
|
+
}, [f, x, h]);
|
|
3218
3218
|
const I = v.useCallback(
|
|
3219
3219
|
(E) => {
|
|
3220
3220
|
const O = C?.getBoundingClientRect?.() ?? Bs(l), G = zi({ rect: O, ratio: m }), Q = {
|
|
3221
3221
|
width: G.width,
|
|
3222
3222
|
height: G.height
|
|
3223
3223
|
};
|
|
3224
|
-
if (bf(
|
|
3224
|
+
if (bf(x), $s(x, Q), P(Q), h)
|
|
3225
3225
|
return;
|
|
3226
|
-
const T =
|
|
3226
|
+
const T = f ?? E?.currentTarget?.closest?.(".MuiDialog-paper") ?? null;
|
|
3227
3227
|
xf(T, G);
|
|
3228
3228
|
},
|
|
3229
|
-
[l,
|
|
3230
|
-
), k =
|
|
3229
|
+
[l, h, f, C, m, x]
|
|
3230
|
+
), k = b || {
|
|
3231
3231
|
width: M.width,
|
|
3232
3232
|
height: M.height
|
|
3233
3233
|
}, _ = M.maxWidth, L = M.maxHeight, W = M.minWidth, j = M.minHeight, q = d ? "100%" : "100vw", D = d ? "100%" : "100dvh";
|
|
@@ -3236,9 +3236,9 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3236
3236
|
...Uo,
|
|
3237
3237
|
// MUI resuelve el contenedor al montar el popup, cuando el tab ya existe.
|
|
3238
3238
|
...d ? { container: /* @__PURE__ */ n(() => Ls(l), "container") } : {},
|
|
3239
|
-
fullScreen: d ? !1 :
|
|
3239
|
+
fullScreen: d ? !1 : h,
|
|
3240
3240
|
popupControls: {
|
|
3241
|
-
showResetSize: !
|
|
3241
|
+
showResetSize: !h,
|
|
3242
3242
|
onResetSize: I,
|
|
3243
3243
|
resetSizeTooltip: r("pos.reset_size"),
|
|
3244
3244
|
resetSizeAriaLabel: r("pos.reset_size")
|
|
@@ -3318,7 +3318,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3318
3318
|
t,
|
|
3319
3319
|
d,
|
|
3320
3320
|
l,
|
|
3321
|
-
|
|
3321
|
+
h,
|
|
3322
3322
|
L,
|
|
3323
3323
|
_,
|
|
3324
3324
|
j,
|
|
@@ -3384,57 +3384,57 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3384
3384
|
const s = yf(t, a);
|
|
3385
3385
|
return a?.container === void 0 && delete s.container, s;
|
|
3386
3386
|
}, "resolvePopupDialogProps"), qr = /* @__PURE__ */ n((e) => {
|
|
3387
|
-
const t = xe(), o = e?.resource ?? t, r = no({ resource: o }).options?.label, a = ci(), s = he(), c = gt(), l = It(), d = cf(), u = Gt()?.props, m = d?.resolve ? d.resolve(o) : null,
|
|
3387
|
+
const t = xe(), o = e?.resource ?? t, r = no({ resource: o }).options?.label, a = ci(), s = he(), c = gt(), l = It(), d = cf(), u = Gt()?.props, m = d?.resolve ? d.resolve(o) : null, h = ai({
|
|
3388
3388
|
resource: o,
|
|
3389
3389
|
popupRatio: e?.popupRatio
|
|
3390
|
-
}),
|
|
3390
|
+
}), f = ai({
|
|
3391
3391
|
resource: o,
|
|
3392
3392
|
popupRatio: e?.popupRatio,
|
|
3393
3393
|
dockviewTabParent: !0
|
|
3394
3394
|
}), g = v.useCallback(
|
|
3395
|
-
(
|
|
3396
|
-
const
|
|
3397
|
-
if (!
|
|
3395
|
+
(b) => {
|
|
3396
|
+
const P = m?.create;
|
|
3397
|
+
if (!P || !o || !l?.show)
|
|
3398
3398
|
return;
|
|
3399
|
-
const S =
|
|
3400
|
-
|
|
3399
|
+
const S = b?.title ?? `${s("ra.action.create")} ${Zo(r || a(o, 1) || o)}`, y = Gi(`${o}:create`), F = b?.panel && typeof b.panel == "object" ? b.panel : {}, M = Ns(
|
|
3400
|
+
b?.mutationOptions ?? F.mutationOptions,
|
|
3401
3401
|
l,
|
|
3402
|
-
|
|
3402
|
+
y,
|
|
3403
3403
|
() => c("ra.notification.created", {
|
|
3404
3404
|
type: "info",
|
|
3405
3405
|
messageArgs: { smart_count: 1 }
|
|
3406
3406
|
})
|
|
3407
3407
|
), I = {
|
|
3408
|
-
...
|
|
3408
|
+
...b,
|
|
3409
3409
|
panel: {
|
|
3410
|
-
...
|
|
3410
|
+
...F,
|
|
3411
3411
|
popupMutationOptions: M,
|
|
3412
|
-
...
|
|
3413
|
-
...
|
|
3414
|
-
...
|
|
3412
|
+
...b?.estado !== void 0 ? { estado: b.estado } : {},
|
|
3413
|
+
...b?.id !== void 0 ? { id: b.id } : {},
|
|
3414
|
+
...b?.record !== void 0 ? { record: b.record } : {}
|
|
3415
3415
|
},
|
|
3416
3416
|
mutationOptions: M
|
|
3417
3417
|
}, k = Hi({
|
|
3418
3418
|
asistente: l,
|
|
3419
|
-
popupDialogProps:
|
|
3420
|
-
popupFormDialogProps:
|
|
3419
|
+
popupDialogProps: h,
|
|
3420
|
+
popupFormDialogProps: f,
|
|
3421
3421
|
grillaProps: u
|
|
3422
3422
|
});
|
|
3423
3423
|
l.show({
|
|
3424
3424
|
title: S,
|
|
3425
3425
|
tipo: "vista",
|
|
3426
|
-
cancelar: /* @__PURE__ */ n(() => Xn(l,
|
|
3426
|
+
cancelar: /* @__PURE__ */ n(() => Xn(l, y), "cancelar"),
|
|
3427
3427
|
dialogProps: k,
|
|
3428
|
-
_popupKey:
|
|
3429
|
-
controles: /* @__PURE__ */ i(Ro, { value: o, children: /* @__PURE__ */ i(
|
|
3428
|
+
_popupKey: y,
|
|
3429
|
+
controles: /* @__PURE__ */ i(Ro, { value: o, children: /* @__PURE__ */ i(P, { ...I }) })
|
|
3430
3430
|
});
|
|
3431
3431
|
},
|
|
3432
3432
|
[
|
|
3433
3433
|
l,
|
|
3434
3434
|
a,
|
|
3435
3435
|
c,
|
|
3436
|
-
f,
|
|
3437
3436
|
h,
|
|
3437
|
+
f,
|
|
3438
3438
|
u,
|
|
3439
3439
|
o,
|
|
3440
3440
|
r,
|
|
@@ -3442,87 +3442,87 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3442
3442
|
s
|
|
3443
3443
|
]
|
|
3444
3444
|
), C = v.useCallback(
|
|
3445
|
-
(
|
|
3446
|
-
const
|
|
3447
|
-
if (!
|
|
3445
|
+
(b) => {
|
|
3446
|
+
const P = m?.edit, S = b?.id ?? b?.record?.id;
|
|
3447
|
+
if (!P || !o || !l?.show || !S)
|
|
3448
3448
|
return;
|
|
3449
|
-
const
|
|
3450
|
-
|
|
3449
|
+
const y = b?.title ?? `${s("ra.action.edit")} ${Zo(r || a(o, 1) || o)}`, F = Gi(`${o}:${S}`), M = b?.panel && typeof b.panel == "object" ? b.panel : {}, I = Ns(
|
|
3450
|
+
b?.mutationOptions ?? M.mutationOptions,
|
|
3451
3451
|
l,
|
|
3452
|
-
|
|
3452
|
+
F,
|
|
3453
3453
|
() => c("ra.notification.updated", {
|
|
3454
3454
|
type: "info",
|
|
3455
3455
|
messageArgs: { smart_count: 1 }
|
|
3456
3456
|
})
|
|
3457
3457
|
), k = {
|
|
3458
|
-
...
|
|
3458
|
+
...b,
|
|
3459
3459
|
panel: {
|
|
3460
3460
|
...M,
|
|
3461
3461
|
popupMutationOptions: I,
|
|
3462
|
-
...
|
|
3463
|
-
...
|
|
3464
|
-
...
|
|
3462
|
+
...b?.estado !== void 0 ? { estado: b.estado } : {},
|
|
3463
|
+
...b?.id !== void 0 ? { id: b.id } : {},
|
|
3464
|
+
...b?.record !== void 0 ? { record: b.record } : {}
|
|
3465
3465
|
},
|
|
3466
3466
|
mutationOptions: I
|
|
3467
3467
|
}, _ = Hi({
|
|
3468
3468
|
asistente: l,
|
|
3469
|
-
popupDialogProps:
|
|
3470
|
-
popupFormDialogProps:
|
|
3469
|
+
popupDialogProps: h,
|
|
3470
|
+
popupFormDialogProps: f,
|
|
3471
3471
|
grillaProps: u
|
|
3472
3472
|
});
|
|
3473
3473
|
l.show({
|
|
3474
|
-
title:
|
|
3474
|
+
title: y,
|
|
3475
3475
|
tipo: "vista",
|
|
3476
|
-
cancelar: /* @__PURE__ */ n(() => Xn(l,
|
|
3476
|
+
cancelar: /* @__PURE__ */ n(() => Xn(l, F), "cancelar"),
|
|
3477
3477
|
dialogProps: _,
|
|
3478
|
-
_popupKey:
|
|
3479
|
-
controles: /* @__PURE__ */ i(Ro, { value: o, children: /* @__PURE__ */ i(tn.Provider, { value: S, children: /* @__PURE__ */ i(
|
|
3478
|
+
_popupKey: F,
|
|
3479
|
+
controles: /* @__PURE__ */ i(Ro, { value: o, children: /* @__PURE__ */ i(tn.Provider, { value: S, children: /* @__PURE__ */ i(P, { ...k }) }) })
|
|
3480
3480
|
});
|
|
3481
3481
|
},
|
|
3482
3482
|
[
|
|
3483
3483
|
l,
|
|
3484
3484
|
a,
|
|
3485
3485
|
c,
|
|
3486
|
-
f,
|
|
3487
3486
|
h,
|
|
3487
|
+
f,
|
|
3488
3488
|
u,
|
|
3489
3489
|
o,
|
|
3490
3490
|
r,
|
|
3491
3491
|
m?.edit,
|
|
3492
3492
|
s
|
|
3493
3493
|
]
|
|
3494
|
-
),
|
|
3495
|
-
(
|
|
3496
|
-
const
|
|
3497
|
-
if (!
|
|
3494
|
+
), x = v.useCallback(
|
|
3495
|
+
(b) => {
|
|
3496
|
+
const P = m?.show, S = b?.id;
|
|
3497
|
+
if (!P || !o || !l?.show || !S)
|
|
3498
3498
|
return;
|
|
3499
|
-
const
|
|
3499
|
+
const y = b?.title ?? `${Zo(r || a(o, 1) || o)}`, F = Gi(`${o}:show:${S}`), M = Hi({
|
|
3500
3500
|
asistente: l,
|
|
3501
|
-
popupDialogProps:
|
|
3502
|
-
popupFormDialogProps:
|
|
3501
|
+
popupDialogProps: h,
|
|
3502
|
+
popupFormDialogProps: f,
|
|
3503
3503
|
grillaProps: u
|
|
3504
3504
|
});
|
|
3505
3505
|
l.show({
|
|
3506
|
-
title:
|
|
3506
|
+
title: y,
|
|
3507
3507
|
tipo: "vista",
|
|
3508
|
-
cancelar: /* @__PURE__ */ n(() => Xn(l,
|
|
3508
|
+
cancelar: /* @__PURE__ */ n(() => Xn(l, F), "cancelar"),
|
|
3509
3509
|
dialogProps: M,
|
|
3510
|
-
_popupKey:
|
|
3511
|
-
controles: /* @__PURE__ */ i(Ro, { value: o, children: /* @__PURE__ */ i(tn.Provider, { value: S, children: /* @__PURE__ */ i(
|
|
3510
|
+
_popupKey: F,
|
|
3511
|
+
controles: /* @__PURE__ */ i(Ro, { value: o, children: /* @__PURE__ */ i(tn.Provider, { value: S, children: /* @__PURE__ */ i(P, { ...b }) }) })
|
|
3512
3512
|
});
|
|
3513
3513
|
},
|
|
3514
3514
|
[
|
|
3515
3515
|
l,
|
|
3516
3516
|
a,
|
|
3517
|
-
f,
|
|
3518
3517
|
h,
|
|
3518
|
+
f,
|
|
3519
3519
|
u,
|
|
3520
3520
|
o,
|
|
3521
3521
|
r,
|
|
3522
3522
|
m?.show
|
|
3523
3523
|
]
|
|
3524
3524
|
);
|
|
3525
|
-
return { showCreate: g, showEdit: C, showShow:
|
|
3525
|
+
return { showCreate: g, showEdit: C, showShow: x };
|
|
3526
3526
|
}, "useAsistentePopup"), dc = /* @__PURE__ */ n((e, t) => v.isValidElement(e) ? e : typeof e == "function" ? /* @__PURE__ */ i(e, {}) : t, "resolveActionIcon$1"), wf = /* @__PURE__ */ n((e, t, o) => /* @__PURE__ */ i(
|
|
3527
3527
|
Y,
|
|
3528
3528
|
{
|
|
@@ -3553,7 +3553,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3553
3553
|
borra: p,
|
|
3554
3554
|
nuevoDesde: u,
|
|
3555
3555
|
onClose: m
|
|
3556
|
-
} = e,
|
|
3556
|
+
} = e, h = xe(e), f = he(), g = xi(e), C = Oo(), { showCreate: x, showEdit: b, showShow: P } = qr({ resource: h }), S = !hr(t.row, l), y = !mc(t.row, d), F = c && S, M = t?.id ?? t?.row?.id;
|
|
3557
3557
|
return /* @__PURE__ */ R(
|
|
3558
3558
|
Y,
|
|
3559
3559
|
{
|
|
@@ -3578,10 +3578,10 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3578
3578
|
{
|
|
3579
3579
|
disabled: S,
|
|
3580
3580
|
onClick: /* @__PURE__ */ n(() => {
|
|
3581
|
-
m && m(),
|
|
3581
|
+
m && m(), F || !r && c ? P({ id: M, record: t.row }) : r && b({ id: M, record: t.row });
|
|
3582
3582
|
}, "onClick"),
|
|
3583
3583
|
children: [
|
|
3584
|
-
/* @__PURE__ */ i(Qt, { children: r ?
|
|
3584
|
+
/* @__PURE__ */ i(Qt, { children: r ? F ? /* @__PURE__ */ i(oi, { color: "inherit" }) : wf(
|
|
3585
3585
|
a,
|
|
3586
3586
|
/* @__PURE__ */ i(
|
|
3587
3587
|
ml,
|
|
@@ -3594,7 +3594,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3594
3594
|
/* @__PURE__ */ i(
|
|
3595
3595
|
Bt,
|
|
3596
3596
|
{
|
|
3597
|
-
primary: r ?
|
|
3597
|
+
primary: r ? f(F ? "pos.view" : "ra.action.edit") : c ? f("pos.view") : ""
|
|
3598
3598
|
}
|
|
3599
3599
|
)
|
|
3600
3600
|
]
|
|
@@ -3605,7 +3605,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3605
3605
|
Jt,
|
|
3606
3606
|
{
|
|
3607
3607
|
onClick: /* @__PURE__ */ n(() => {
|
|
3608
|
-
m && m(),
|
|
3608
|
+
m && m(), x({
|
|
3609
3609
|
id: M,
|
|
3610
3610
|
estado: "ND",
|
|
3611
3611
|
record: t.row
|
|
@@ -3616,18 +3616,18 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3616
3616
|
/* @__PURE__ */ i(
|
|
3617
3617
|
Bt,
|
|
3618
3618
|
{
|
|
3619
|
-
primary:
|
|
3619
|
+
primary: f("pos.create_from")
|
|
3620
3620
|
}
|
|
3621
3621
|
)
|
|
3622
3622
|
]
|
|
3623
3623
|
},
|
|
3624
3624
|
"nd_list"
|
|
3625
3625
|
),
|
|
3626
|
-
p && !
|
|
3626
|
+
p && !y && /* @__PURE__ */ R(
|
|
3627
3627
|
Jt,
|
|
3628
3628
|
{
|
|
3629
3629
|
onClick: /* @__PURE__ */ n(() => {
|
|
3630
|
-
m && m(),
|
|
3630
|
+
m && m(), b({
|
|
3631
3631
|
id: M,
|
|
3632
3632
|
estado: "B",
|
|
3633
3633
|
record: t.row
|
|
@@ -3641,7 +3641,7 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3641
3641
|
/* @__PURE__ */ i(
|
|
3642
3642
|
Bt,
|
|
3643
3643
|
{
|
|
3644
|
-
primary:
|
|
3644
|
+
primary: f("ra.action.delete")
|
|
3645
3645
|
}
|
|
3646
3646
|
)
|
|
3647
3647
|
]
|
|
@@ -3722,19 +3722,19 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3722
3722
|
type: p,
|
|
3723
3723
|
...u
|
|
3724
3724
|
}) => {
|
|
3725
|
-
const m = al(),
|
|
3725
|
+
const m = al(), h = a?.root?.slotProps, f = v.useId(), [g, C] = v.useState(
|
|
3726
3726
|
() => Ws(e.value)
|
|
3727
3727
|
);
|
|
3728
3728
|
v.useEffect(() => {
|
|
3729
3729
|
C(Ws(e.value));
|
|
3730
3730
|
}, [e.value]);
|
|
3731
|
-
const
|
|
3732
|
-
const
|
|
3733
|
-
if (C(
|
|
3731
|
+
const x = /* @__PURE__ */ n((b) => {
|
|
3732
|
+
const P = Pf(b.target.value);
|
|
3733
|
+
if (C(P), P === "") {
|
|
3734
3734
|
t({ ...e, value: void 0 });
|
|
3735
3735
|
return;
|
|
3736
3736
|
}
|
|
3737
|
-
const S = Ff(
|
|
3737
|
+
const S = Ff(P);
|
|
3738
3738
|
S && t({ ...e, value: S });
|
|
3739
3739
|
}, "handleChange");
|
|
3740
3740
|
return /* @__PURE__ */ R(v.Fragment, { children: [
|
|
@@ -3742,21 +3742,21 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3742
3742
|
m.slots.baseTextField,
|
|
3743
3743
|
{
|
|
3744
3744
|
fullWidth: !0,
|
|
3745
|
-
id:
|
|
3745
|
+
id: f,
|
|
3746
3746
|
label: o.current.getLocaleText("filterPanelInputLabel"),
|
|
3747
3747
|
placeholder: "dd/mm/aaaa",
|
|
3748
3748
|
value: g,
|
|
3749
|
-
onChange:
|
|
3749
|
+
onChange: x,
|
|
3750
3750
|
type: "text",
|
|
3751
3751
|
disabled: d,
|
|
3752
3752
|
inputRef: r,
|
|
3753
3753
|
slotProps: {
|
|
3754
|
-
...
|
|
3754
|
+
...h,
|
|
3755
3755
|
htmlInput: {
|
|
3756
3756
|
inputMode: "numeric",
|
|
3757
3757
|
maxLength: 10,
|
|
3758
3758
|
tabIndex: l,
|
|
3759
|
-
...
|
|
3759
|
+
...h?.htmlInput
|
|
3760
3760
|
}
|
|
3761
3761
|
},
|
|
3762
3762
|
...m.slotProps?.baseTextField,
|
|
@@ -3806,9 +3806,9 @@ const Ci = /* @__PURE__ */ n((e) => {
|
|
|
3806
3806
|
(u) => {
|
|
3807
3807
|
if (!o)
|
|
3808
3808
|
return;
|
|
3809
|
-
const m = String(u?.colDef?.field ?? ""),
|
|
3810
|
-
!m || !Number.isFinite(
|
|
3811
|
-
(
|
|
3809
|
+
const m = String(u?.colDef?.field ?? ""), h = u?.width;
|
|
3810
|
+
!m || !Number.isFinite(h) || c(
|
|
3811
|
+
(f) => f[m] === h ? f : { ...f, [m]: h }
|
|
3812
3812
|
);
|
|
3813
3813
|
},
|
|
3814
3814
|
[o]
|
|
@@ -4115,16 +4115,16 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4115
4115
|
secondaryText: p,
|
|
4116
4116
|
onRenderGrilla: u,
|
|
4117
4117
|
onLoadGrilla: m,
|
|
4118
|
-
mobileColumns:
|
|
4119
|
-
hasEdit:
|
|
4118
|
+
mobileColumns: h,
|
|
4119
|
+
hasEdit: f,
|
|
4120
4120
|
editIcon: g,
|
|
4121
4121
|
deleteIcon: C,
|
|
4122
|
-
initialState:
|
|
4123
|
-
convertFilterModelToFilterValues:
|
|
4124
|
-
convertFilterValuesToFilterModel:
|
|
4122
|
+
initialState: x = Bf,
|
|
4123
|
+
convertFilterModelToFilterValues: b = zf,
|
|
4124
|
+
convertFilterValuesToFilterModel: P = Hf,
|
|
4125
4125
|
claveNuevo: S,
|
|
4126
|
-
hasVerFicha:
|
|
4127
|
-
disableMultipleRowSelection:
|
|
4126
|
+
hasVerFicha: y = !1,
|
|
4127
|
+
disableMultipleRowSelection: F = !0,
|
|
4128
4128
|
borra: M = !0,
|
|
4129
4129
|
nuevoDesde: I = !1,
|
|
4130
4130
|
pivotEnabled: k,
|
|
@@ -4290,7 +4290,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4290
4290
|
getRows: /* @__PURE__ */ n(async (A) => {
|
|
4291
4291
|
const K = A.pivotModel || {};
|
|
4292
4292
|
Be.current = K;
|
|
4293
|
-
const le = A.start ?? 0, ge = A.end ?? le + 50, Pe = Math.max(1, ge - le), ye = Math.floor(le / Pe) + 1, Le = A.sortModel ?? [], xt = Le[0]?.field ?? Ve.field ?? "id", U = (Le[0]?.sort ?? Ve.order ?? "ASC").toUpperCase(), ve = z.current?.state?.rowGrouping?.model?.[0], We =
|
|
4293
|
+
const le = A.start ?? 0, ge = A.end ?? le + 50, Pe = Math.max(1, ge - le), ye = Math.floor(le / Pe) + 1, Le = A.sortModel ?? [], xt = Le[0]?.field ?? Ve.field ?? "id", U = (Le[0]?.sort ?? Ve.order ?? "ASC").toUpperCase(), ve = z.current?.state?.rowGrouping?.model?.[0], We = b({
|
|
4294
4294
|
groupingField: ve,
|
|
4295
4295
|
...A.filterModel || {}
|
|
4296
4296
|
}), ce = {
|
|
@@ -4390,7 +4390,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4390
4390
|
});
|
|
4391
4391
|
}, [
|
|
4392
4392
|
z,
|
|
4393
|
-
|
|
4393
|
+
b,
|
|
4394
4394
|
_t,
|
|
4395
4395
|
kt,
|
|
4396
4396
|
B,
|
|
@@ -4490,7 +4490,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4490
4490
|
), {
|
|
4491
4491
|
columns: { columnVisibilityModel: ts = pc },
|
|
4492
4492
|
...In
|
|
4493
|
-
} =
|
|
4493
|
+
} = x, { columnVisibilityModel: os, columnOrder: ns, columnasConfiguradas: is } = v.useMemo(() => {
|
|
4494
4494
|
const w = {}, A = [], K = [];
|
|
4495
4495
|
return es.forEach((le) => {
|
|
4496
4496
|
w[le.field] = le.oculto !== void 0 ? !le.oculto : ts[le.field] ?? !0, A.push(le.field), K.push({
|
|
@@ -4583,7 +4583,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4583
4583
|
headerName: Zr[w.field.replace("_lis", "")] ?? w.headerName
|
|
4584
4584
|
})),
|
|
4585
4585
|
[is, Zr]
|
|
4586
|
-
), as = v.useMemo(() => B || !(t.length > 0 ||
|
|
4586
|
+
), as = v.useMemo(() => B || !(t.length > 0 || f || y || I || Pn) ? vo : vo.concat([
|
|
4587
4587
|
{
|
|
4588
4588
|
field: "actions",
|
|
4589
4589
|
type: "actions",
|
|
@@ -4594,7 +4594,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4594
4594
|
const A = z.current.getRowNode(w.id), K = A?.children?.[0], le = !!S && typeof K == "string" && K.indexOf(`${S}=`) !== -1, ge = !hr(w.row, c), Pe = !mc(
|
|
4595
4595
|
w.row,
|
|
4596
4596
|
l
|
|
4597
|
-
), ye =
|
|
4597
|
+
), ye = y && ge, Le = ss.current, xt = (w.row?.id == null || w.row?.id === "") && le, U = A?.type === "group" || xt ? void 0 : w.row?.id ?? w.id, ve = U ? /* @__PURE__ */ i(
|
|
4598
4598
|
Po,
|
|
4599
4599
|
{
|
|
4600
4600
|
label: $("ra.action.show"),
|
|
@@ -4676,7 +4676,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4676
4676
|
);
|
|
4677
4677
|
}
|
|
4678
4678
|
return U ? [
|
|
4679
|
-
...
|
|
4679
|
+
...f ? [
|
|
4680
4680
|
ye ? ve : /* @__PURE__ */ i(
|
|
4681
4681
|
Po,
|
|
4682
4682
|
{
|
|
@@ -4701,7 +4701,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4701
4701
|
},
|
|
4702
4702
|
`edit-${U}`
|
|
4703
4703
|
)
|
|
4704
|
-
] :
|
|
4704
|
+
] : y ? [ve] : [],
|
|
4705
4705
|
...ze
|
|
4706
4706
|
] : le ? [
|
|
4707
4707
|
/* @__PURE__ */ i(
|
|
@@ -4735,8 +4735,8 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4735
4735
|
Vo,
|
|
4736
4736
|
C,
|
|
4737
4737
|
g,
|
|
4738
|
-
|
|
4739
|
-
|
|
4738
|
+
f,
|
|
4739
|
+
y,
|
|
4740
4740
|
c,
|
|
4741
4741
|
I,
|
|
4742
4742
|
Ce,
|
|
@@ -4944,12 +4944,12 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4944
4944
|
};
|
|
4945
4945
|
});
|
|
4946
4946
|
}, [Mo, ps, Di]), Fo = v.useMemo(
|
|
4947
|
-
() =>
|
|
4947
|
+
() => P(
|
|
4948
4948
|
Ot,
|
|
4949
4949
|
B ? vo : Ei
|
|
4950
4950
|
),
|
|
4951
4951
|
[
|
|
4952
|
-
|
|
4952
|
+
P,
|
|
4953
4953
|
B,
|
|
4954
4954
|
Ot,
|
|
4955
4955
|
Ei,
|
|
@@ -4991,7 +4991,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
4991
4991
|
), dd = /* @__PURE__ */ n((w) => {
|
|
4992
4992
|
if (B && Mn || (Ht.current = w, At.current && clearTimeout(At.current), Xs(w)) || Nn(w, Fo))
|
|
4993
4993
|
return;
|
|
4994
|
-
const le = (z.current.state.rowGrouping?.model || [])[0], ge =
|
|
4994
|
+
const le = (z.current.state.rowGrouping?.model || [])[0], ge = b({
|
|
4995
4995
|
groupingField: le,
|
|
4996
4996
|
...w
|
|
4997
4997
|
});
|
|
@@ -5039,7 +5039,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5039
5039
|
A && (A.defaultMuiPrevented = !0);
|
|
5040
5040
|
return;
|
|
5041
5041
|
}
|
|
5042
|
-
!w?.id?.startsWith("auto-generated-row") &&
|
|
5042
|
+
!w?.id?.startsWith("auto-generated-row") && f && hr(w.row, c) && Ri({ id: w.id, record: w.row });
|
|
5043
5043
|
}, "handleRowDoubleClick"), hd = v.useCallback(
|
|
5044
5044
|
(w, A, K) => {
|
|
5045
5045
|
je?.onCellDoubleClick?.(w, A, K), Ee?.onCellDoubleClick?.(w, A, K), B && (A.defaultMuiPrevented = !0);
|
|
@@ -5358,7 +5358,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5358
5358
|
loading: Dt || ee.progress.open,
|
|
5359
5359
|
hideFooterRowCount: !0,
|
|
5360
5360
|
hideFooterSelectedRowCount: !0,
|
|
5361
|
-
disableMultipleRowSelection: !Te &&
|
|
5361
|
+
disableMultipleRowSelection: !Te && F,
|
|
5362
5362
|
checkboxSelection: He,
|
|
5363
5363
|
filterMode: "server",
|
|
5364
5364
|
onFilterModelChange: dd,
|
|
@@ -5487,15 +5487,15 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5487
5487
|
deleteIcon: p,
|
|
5488
5488
|
hasVerFicha: u,
|
|
5489
5489
|
isRowEditable: m,
|
|
5490
|
-
isRowDeletable:
|
|
5491
|
-
borra:
|
|
5490
|
+
isRowDeletable: h,
|
|
5491
|
+
borra: f,
|
|
5492
5492
|
nuevoDesde: g,
|
|
5493
5493
|
pivotActive: C = !1,
|
|
5494
|
-
forceListView:
|
|
5495
|
-
...
|
|
5496
|
-
} = e,
|
|
5494
|
+
forceListView: x,
|
|
5495
|
+
...b
|
|
5496
|
+
} = e, P = v.useRef(null), S = we(Ye) || {}, { lang: y = [] } = S, F = on(S, "borrar") || on(S, "delete"), M = f && !F, I = C ? [] : (s || []).filter(
|
|
5497
5497
|
(me) => to(S, me)
|
|
5498
|
-
), k = !!(!C && (l || u || g || M || I.length)), _ = xe(e), { sort: L } = oo(), W = /* @__PURE__ */ n(() =>
|
|
5498
|
+
), k = !!(!C && (l || u || g || M || I.length)), _ = xe(e), { sort: L } = oo(), W = /* @__PURE__ */ n(() => P.current, "container"), j = mt((me) => me.breakpoints.down("md")), q = x ?? j, D = x && !j, [E] = vr(), O = (E === "en" ? Dr : Er).components.MuiDataGrid.defaultProps.localeText, G = Ir(), {
|
|
5499
5499
|
props: { gridContainerRef: Q, chkSeleccion: T }
|
|
5500
5500
|
} = Gt(), [V, H] = v.useState({
|
|
5501
5501
|
overlay: null,
|
|
@@ -5519,7 +5519,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5519
5519
|
)
|
|
5520
5520
|
).filter(Boolean) : t).map((me) => ({
|
|
5521
5521
|
...me,
|
|
5522
|
-
headerName:
|
|
5522
|
+
headerName: y[me.field.replace("_lis", "")] ?? me.headerName
|
|
5523
5523
|
})), fe = /* @__PURE__ */ n(() => {
|
|
5524
5524
|
H({ overlay: null, params: null });
|
|
5525
5525
|
}, "handleCloseOverlay"), Se = v.useMemo(
|
|
@@ -5670,7 +5670,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5670
5670
|
C || !k || Te?.defaultMuiPrevented || T || Yn.has(me?.field) || H({ overlay: "actions", params: me });
|
|
5671
5671
|
}, "onCellClick"),
|
|
5672
5672
|
hideFooterSelectedRowCount: !0,
|
|
5673
|
-
...
|
|
5673
|
+
...b,
|
|
5674
5674
|
rowGroupingModel: Of,
|
|
5675
5675
|
onRowGroupingModelChange: Lf,
|
|
5676
5676
|
disableRowGrouping: !0
|
|
@@ -5687,7 +5687,7 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5687
5687
|
hasEdit: C ? !1 : l,
|
|
5688
5688
|
hasVerFicha: C ? !1 : u,
|
|
5689
5689
|
isRowEditable: C ? void 0 : m,
|
|
5690
|
-
isRowDeletable: C ? void 0 :
|
|
5690
|
+
isRowDeletable: C ? void 0 : h,
|
|
5691
5691
|
borra: C ? !1 : M,
|
|
5692
5692
|
nuevoDesde: C ? !1 : g,
|
|
5693
5693
|
editIcon: d,
|
|
@@ -5707,38 +5707,38 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5707
5707
|
columns: p,
|
|
5708
5708
|
extraColumns: u,
|
|
5709
5709
|
...m
|
|
5710
|
-
} = e,
|
|
5710
|
+
} = e, h = v.useMemo(
|
|
5711
5711
|
() => {
|
|
5712
|
-
const S = p.some((
|
|
5713
|
-
(
|
|
5712
|
+
const S = p.some((F) => F.type === "boolean") ? p.map(
|
|
5713
|
+
(F) => F.type === "boolean" ? { ...F, valueGetter: Hr } : F
|
|
5714
5714
|
) : p;
|
|
5715
5715
|
if (!u?.length) return S;
|
|
5716
|
-
const
|
|
5717
|
-
for (const { before:
|
|
5718
|
-
const I =
|
|
5719
|
-
|
|
5716
|
+
const y = [...S];
|
|
5717
|
+
for (const { before: F, ...M } of u) {
|
|
5718
|
+
const I = y.findIndex((k) => k.field === F);
|
|
5719
|
+
y.splice(I < 0 ? y.length : I, 0, {
|
|
5720
5720
|
sortable: !1,
|
|
5721
5721
|
filterable: !1,
|
|
5722
5722
|
groupable: !1,
|
|
5723
5723
|
...M
|
|
5724
5724
|
});
|
|
5725
5725
|
}
|
|
5726
|
-
return
|
|
5726
|
+
return y;
|
|
5727
5727
|
},
|
|
5728
5728
|
[p, u]
|
|
5729
|
-
),
|
|
5730
|
-
props: { viewMode:
|
|
5731
|
-
} = Gt(),
|
|
5732
|
-
return /* @__PURE__ */ i(Y, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: !
|
|
5729
|
+
), f = a === !1 ? a : r?.borra, g = s, C = c, {
|
|
5730
|
+
props: { viewMode: x = "grilla" }
|
|
5731
|
+
} = Gt(), b = l && x === "pivot";
|
|
5732
|
+
return /* @__PURE__ */ i(Y, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: !b && (t ? !0 : x === "ficha") ? /* @__PURE__ */ i(
|
|
5733
5733
|
Yf,
|
|
5734
5734
|
{
|
|
5735
5735
|
...m,
|
|
5736
|
-
columns:
|
|
5736
|
+
columns: h,
|
|
5737
5737
|
hasEdit: o,
|
|
5738
|
-
borra:
|
|
5738
|
+
borra: f,
|
|
5739
5739
|
editIcon: g,
|
|
5740
5740
|
deleteIcon: C,
|
|
5741
|
-
pivotActive:
|
|
5741
|
+
pivotActive: b,
|
|
5742
5742
|
pivotEnabled: l,
|
|
5743
5743
|
pivotUi: d,
|
|
5744
5744
|
forceListView: !0
|
|
@@ -5747,9 +5747,9 @@ const Xf = v.memo(/* @__PURE__ */ n(function({
|
|
|
5747
5747
|
Cc,
|
|
5748
5748
|
{
|
|
5749
5749
|
...m,
|
|
5750
|
-
columns:
|
|
5750
|
+
columns: h,
|
|
5751
5751
|
hasEdit: o,
|
|
5752
|
-
borra:
|
|
5752
|
+
borra: f,
|
|
5753
5753
|
editIcon: g,
|
|
5754
5754
|
deleteIcon: C,
|
|
5755
5755
|
pivotEnabled: l,
|
|
@@ -5788,16 +5788,16 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5788
5788
|
formatOnBlur: p,
|
|
5789
5789
|
formClassName: u,
|
|
5790
5790
|
initialValue: m,
|
|
5791
|
-
initializeForm:
|
|
5792
|
-
input:
|
|
5791
|
+
initializeForm: h,
|
|
5792
|
+
input: f,
|
|
5793
5793
|
isEqual: g,
|
|
5794
5794
|
isRequired: C,
|
|
5795
|
-
label:
|
|
5796
|
-
limitChoicesToValue:
|
|
5797
|
-
locale:
|
|
5795
|
+
label: x,
|
|
5796
|
+
limitChoicesToValue: b,
|
|
5797
|
+
locale: P,
|
|
5798
5798
|
meta: S,
|
|
5799
|
-
multiple:
|
|
5800
|
-
name:
|
|
5799
|
+
multiple: y,
|
|
5800
|
+
name: F,
|
|
5801
5801
|
options: M,
|
|
5802
5802
|
optionText: I,
|
|
5803
5803
|
optionValue: k,
|
|
@@ -5834,14 +5834,14 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5834
5834
|
onBlur: p,
|
|
5835
5835
|
onChange: u,
|
|
5836
5836
|
parse: m,
|
|
5837
|
-
validate:
|
|
5838
|
-
variant:
|
|
5837
|
+
validate: h,
|
|
5838
|
+
variant: f,
|
|
5839
5839
|
disabled: g,
|
|
5840
5840
|
readOnly: C,
|
|
5841
|
-
sx:
|
|
5842
|
-
...
|
|
5841
|
+
sx: x,
|
|
5842
|
+
...b
|
|
5843
5843
|
}) => {
|
|
5844
|
-
const { field:
|
|
5844
|
+
const { field: P, fieldState: S, id: y, isRequired: F } = ln({
|
|
5845
5845
|
defaultValue: t,
|
|
5846
5846
|
name: a,
|
|
5847
5847
|
format: o,
|
|
@@ -5850,20 +5850,20 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5850
5850
|
onChange: u,
|
|
5851
5851
|
resource: c,
|
|
5852
5852
|
source: s,
|
|
5853
|
-
validate:
|
|
5853
|
+
validate: h,
|
|
5854
5854
|
disabled: g,
|
|
5855
5855
|
readOnly: C,
|
|
5856
|
-
...
|
|
5856
|
+
...b
|
|
5857
5857
|
}), { error: M, invalid: I } = S, k = l !== !1 || I;
|
|
5858
5858
|
return /* @__PURE__ */ i(
|
|
5859
5859
|
kr,
|
|
5860
5860
|
{
|
|
5861
|
-
id:
|
|
5862
|
-
...
|
|
5861
|
+
id: y,
|
|
5862
|
+
...P,
|
|
5863
5863
|
className: Si("ra-input", `ra-input-${s}`, e),
|
|
5864
5864
|
type: "date",
|
|
5865
5865
|
size: "small",
|
|
5866
|
-
variant:
|
|
5866
|
+
variant: f,
|
|
5867
5867
|
margin: d,
|
|
5868
5868
|
error: I,
|
|
5869
5869
|
disabled: g || C,
|
|
@@ -5881,12 +5881,12 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5881
5881
|
label: r,
|
|
5882
5882
|
source: s,
|
|
5883
5883
|
resource: c,
|
|
5884
|
-
isRequired:
|
|
5884
|
+
isRequired: F
|
|
5885
5885
|
}
|
|
5886
5886
|
),
|
|
5887
5887
|
InputLabelProps: th,
|
|
5888
|
-
sx: { ...
|
|
5889
|
-
...vc(
|
|
5888
|
+
sx: { ...x, mt: 1 },
|
|
5889
|
+
...vc(b)
|
|
5890
5890
|
}
|
|
5891
5891
|
);
|
|
5892
5892
|
}, "DateInput"), Zs = /* @__PURE__ */ n((e) => {
|
|
@@ -5906,13 +5906,13 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5906
5906
|
resource: p,
|
|
5907
5907
|
parse: u = nh,
|
|
5908
5908
|
validate: m,
|
|
5909
|
-
variant:
|
|
5910
|
-
disabled:
|
|
5909
|
+
variant: h,
|
|
5910
|
+
disabled: f,
|
|
5911
5911
|
readOnly: g,
|
|
5912
5912
|
sx: C,
|
|
5913
|
-
...
|
|
5913
|
+
...x
|
|
5914
5914
|
}) => {
|
|
5915
|
-
const { field:
|
|
5915
|
+
const { field: b, fieldState: P, id: S, isRequired: y } = ln({
|
|
5916
5916
|
defaultValue: t,
|
|
5917
5917
|
format: o,
|
|
5918
5918
|
parse: u,
|
|
@@ -5921,27 +5921,27 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5921
5921
|
resource: p,
|
|
5922
5922
|
source: d,
|
|
5923
5923
|
validate: m,
|
|
5924
|
-
disabled:
|
|
5924
|
+
disabled: f,
|
|
5925
5925
|
readOnly: g,
|
|
5926
|
-
...
|
|
5927
|
-
}), { error:
|
|
5926
|
+
...x
|
|
5927
|
+
}), { error: F, invalid: M } = P, I = a !== !1 || M;
|
|
5928
5928
|
return /* @__PURE__ */ i(
|
|
5929
5929
|
kr,
|
|
5930
5930
|
{
|
|
5931
5931
|
id: S,
|
|
5932
|
-
...
|
|
5932
|
+
...b,
|
|
5933
5933
|
className: Si("ra-input", `ra-input-${d}`, e),
|
|
5934
5934
|
type: "datetime-local",
|
|
5935
5935
|
size: "small",
|
|
5936
|
-
variant:
|
|
5936
|
+
variant: h,
|
|
5937
5937
|
margin: s,
|
|
5938
5938
|
error: M,
|
|
5939
|
-
disabled:
|
|
5939
|
+
disabled: f || g,
|
|
5940
5940
|
readOnly: g,
|
|
5941
5941
|
helperText: I ? /* @__PURE__ */ i(
|
|
5942
5942
|
Sc,
|
|
5943
5943
|
{
|
|
5944
|
-
error:
|
|
5944
|
+
error: F?.message,
|
|
5945
5945
|
helperText: a
|
|
5946
5946
|
}
|
|
5947
5947
|
) : null,
|
|
@@ -5951,12 +5951,12 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5951
5951
|
label: r,
|
|
5952
5952
|
source: d,
|
|
5953
5953
|
resource: p,
|
|
5954
|
-
isRequired:
|
|
5954
|
+
isRequired: y
|
|
5955
5955
|
}
|
|
5956
5956
|
),
|
|
5957
5957
|
InputLabelProps: ah,
|
|
5958
5958
|
sx: { ...C, mt: 1 },
|
|
5959
|
-
...vc(
|
|
5959
|
+
...vc(x)
|
|
5960
5960
|
}
|
|
5961
5961
|
);
|
|
5962
5962
|
}, "DateTimeInput"), Mc = /* @__PURE__ */ n((e = 2) => (t) => ("0".repeat(e) + t).slice(-e), "leftPad"), rh = Mc(4), Wn = Mc(2), ea = /* @__PURE__ */ n((e) => {
|
|
@@ -5978,11 +5978,11 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
5978
5978
|
u = u.replace(r ? /[^0-9.-]/g : /[^0-9.]/g, "");
|
|
5979
5979
|
let m = "";
|
|
5980
5980
|
r && u.startsWith("-") && (m = "-", u = u.slice(1)), u = u.replace(/-/g, "");
|
|
5981
|
-
const
|
|
5982
|
-
if (
|
|
5981
|
+
const h = e - m.length;
|
|
5982
|
+
if (h <= 0)
|
|
5983
5983
|
return m;
|
|
5984
|
-
const [
|
|
5985
|
-
return m + (u.includes(".") &&
|
|
5984
|
+
const [f, g = ""] = u.split(".", 2), C = f.slice(0, h), x = h - C.length, b = g.slice(0, Math.min(t, x));
|
|
5985
|
+
return m + (u.includes(".") && b.length < 1 && x > 0 ? `${C}.` : u.includes(".") && x > 0 ? `${C}.${b}` : C);
|
|
5986
5986
|
},
|
|
5987
5987
|
[e, t, r]
|
|
5988
5988
|
), c = ne(
|
|
@@ -6152,40 +6152,40 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6152
6152
|
...u
|
|
6153
6153
|
} = e, {
|
|
6154
6154
|
isFetching: m,
|
|
6155
|
-
allChoices:
|
|
6156
|
-
availableChoices:
|
|
6157
|
-
} = Va(), g = _e(null), C = _e(null),
|
|
6158
|
-
const
|
|
6155
|
+
allChoices: h,
|
|
6156
|
+
availableChoices: f
|
|
6157
|
+
} = Va(), g = _e(null), C = _e(null), x = de(() => {
|
|
6158
|
+
const y = Array.isArray(f) ? f : [];
|
|
6159
6159
|
if (!Array.isArray(l) || l.length === 0)
|
|
6160
|
-
return
|
|
6161
|
-
const
|
|
6162
|
-
return
|
|
6163
|
-
|
|
6164
|
-
}),
|
|
6165
|
-
}, [
|
|
6166
|
-
(
|
|
6160
|
+
return y;
|
|
6161
|
+
const F = [...l];
|
|
6162
|
+
return y.forEach((M) => {
|
|
6163
|
+
F.some((I) => Do(I?.id, M?.id)) || F.push(M);
|
|
6164
|
+
}), F;
|
|
6165
|
+
}, [f, l]), b = de(() => u?.isRequired || m || !Array.isArray(x) ? !1 : !x.some((y) => Do(y?.id, "0")), [m, x, u?.isRequired]), P = ne(
|
|
6166
|
+
(y, F) => {
|
|
6167
6167
|
typeof s == "function" && s({
|
|
6168
6168
|
target: {
|
|
6169
|
-
value:
|
|
6169
|
+
value: y
|
|
6170
6170
|
},
|
|
6171
|
-
label: Ic(
|
|
6171
|
+
label: Ic(F)
|
|
6172
6172
|
});
|
|
6173
6173
|
},
|
|
6174
6174
|
[s, u.source]
|
|
6175
6175
|
), S = ne(
|
|
6176
|
-
(
|
|
6177
|
-
typeof c == "function" && c(
|
|
6176
|
+
(y, F, M) => {
|
|
6177
|
+
typeof c == "function" && c(y, F, M);
|
|
6178
6178
|
},
|
|
6179
6179
|
[c]
|
|
6180
6180
|
);
|
|
6181
6181
|
return ie(() => {
|
|
6182
6182
|
if (!m && typeof t == "function") {
|
|
6183
|
-
const
|
|
6184
|
-
if (C.current ===
|
|
6183
|
+
const y = o ?? t;
|
|
6184
|
+
if (C.current === y)
|
|
6185
6185
|
return;
|
|
6186
|
-
C.current =
|
|
6186
|
+
C.current = y, t(Object.values([h]));
|
|
6187
6187
|
}
|
|
6188
|
-
}, [
|
|
6188
|
+
}, [h, t, o, m]), /* @__PURE__ */ i(mh, { title: g.current?.value || "", placement: "top", arrow: !0, disableInteractive: !0, children: /* @__PURE__ */ i(
|
|
6189
6189
|
Y,
|
|
6190
6190
|
{
|
|
6191
6191
|
sx: a ? { marginLeft: 1, ...r } : {
|
|
@@ -6212,10 +6212,10 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6212
6212
|
},
|
|
6213
6213
|
...u,
|
|
6214
6214
|
slotProps: Pc(p),
|
|
6215
|
-
choices: Array.isArray(l) && l.length > 0 ?
|
|
6216
|
-
emptyText:
|
|
6217
|
-
emptyValue:
|
|
6218
|
-
onChange:
|
|
6215
|
+
choices: Array.isArray(l) && l.length > 0 ? x : void 0,
|
|
6216
|
+
emptyText: b ? "" : u.emptyText,
|
|
6217
|
+
emptyValue: b ? "0" : u.emptyValue,
|
|
6218
|
+
onChange: P,
|
|
6219
6219
|
onInputChange: S,
|
|
6220
6220
|
TextFieldProps: { inputRef: g }
|
|
6221
6221
|
}
|
|
@@ -6230,9 +6230,9 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6230
6230
|
queryOptions: p,
|
|
6231
6231
|
asistant: u,
|
|
6232
6232
|
asistantResource: m,
|
|
6233
|
-
perPage:
|
|
6234
|
-
...
|
|
6235
|
-
} = t, { source: g, reference: C, fullWidth:
|
|
6233
|
+
perPage: h = 500,
|
|
6234
|
+
...f
|
|
6235
|
+
} = t, { source: g, reference: C, fullWidth: x = !1 } = e, b = x || !!e.sx, P = xe(e), S = vi(P), [y, F] = te([]), M = typeof f.optionText == "string" ? f.optionText : "etiqueta", I = Rt(), k = Tr((O) => Br(O.reload_cb, g, I)), _ = _e(k), L = k === null && _.current ? _.current : k, W = d || L !== null;
|
|
6236
6236
|
let j, q;
|
|
6237
6237
|
if (L) {
|
|
6238
6238
|
const { callback: O, ...G } = L;
|
|
@@ -6244,7 +6244,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6244
6244
|
...G?.data && typeof G.data == "object" ? G.data : {},
|
|
6245
6245
|
...O && typeof O == "object" ? O : {}
|
|
6246
6246
|
}, T = O?.id ?? O?.[g] ?? Q?.id ?? Q?.[g] ?? G?.id ?? G?.data?.id ?? G?.data?.[g], V = gh(Q, T, g);
|
|
6247
|
-
V && V.id !== void 0 && V.id !== null && V.id !== "" && (
|
|
6247
|
+
V && V.id !== void 0 && V.id !== null && V.id !== "" && (F((H) => H.some(
|
|
6248
6248
|
(oe) => Do(oe?.id, V.id)
|
|
6249
6249
|
) ? H : [V, ...H].slice(0, 10)), a.setQueriesData(
|
|
6250
6250
|
{ queryKey: [C, "getList"] },
|
|
@@ -6275,9 +6275,9 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6275
6275
|
[s, a, C, g]
|
|
6276
6276
|
), E = ne(
|
|
6277
6277
|
(O, G, Q) => {
|
|
6278
|
-
Q === "input" && Array.isArray(
|
|
6278
|
+
Q === "input" && Array.isArray(y) && y.length > 0 && G !== void 0 && F([]);
|
|
6279
6279
|
},
|
|
6280
|
-
[
|
|
6280
|
+
[y]
|
|
6281
6281
|
);
|
|
6282
6282
|
return ie(() => {
|
|
6283
6283
|
k !== null && (_.current = k, r(Qp(g, void 0, I)));
|
|
@@ -6285,10 +6285,10 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6285
6285
|
hh,
|
|
6286
6286
|
{
|
|
6287
6287
|
choices: fh(t.choices),
|
|
6288
|
-
fullWidth:
|
|
6288
|
+
fullWidth: b,
|
|
6289
6289
|
isTC: e.isTC,
|
|
6290
6290
|
optionText: M,
|
|
6291
|
-
restProps:
|
|
6291
|
+
restProps: f,
|
|
6292
6292
|
sx: e.sx
|
|
6293
6293
|
}
|
|
6294
6294
|
) : !o && !c && W ? /* @__PURE__ */ R(
|
|
@@ -6297,12 +6297,12 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6297
6297
|
sx: {
|
|
6298
6298
|
display: {
|
|
6299
6299
|
xs: "flex",
|
|
6300
|
-
md:
|
|
6300
|
+
md: b || e.isTC ? "flex" : "inline-flex"
|
|
6301
6301
|
},
|
|
6302
6302
|
flexWrap: "nowrap",
|
|
6303
6303
|
alignItems: "center",
|
|
6304
6304
|
gap: 1,
|
|
6305
|
-
width:
|
|
6305
|
+
width: b ? "100%" : e.isTC ? "80%" : { xs: "100%", md: "auto" },
|
|
6306
6306
|
mr: 1,
|
|
6307
6307
|
verticalAlign: "top",
|
|
6308
6308
|
...e.sx
|
|
@@ -6313,7 +6313,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6313
6313
|
{
|
|
6314
6314
|
reference: C,
|
|
6315
6315
|
source: g,
|
|
6316
|
-
perPage:
|
|
6316
|
+
perPage: h,
|
|
6317
6317
|
filter: q,
|
|
6318
6318
|
queryOptions: {
|
|
6319
6319
|
...p || {},
|
|
@@ -6322,17 +6322,17 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6322
6322
|
children: /* @__PURE__ */ i(
|
|
6323
6323
|
bh,
|
|
6324
6324
|
{
|
|
6325
|
-
...
|
|
6325
|
+
...f,
|
|
6326
6326
|
callback: j,
|
|
6327
6327
|
callbackKey: L,
|
|
6328
|
-
fullWidth:
|
|
6328
|
+
fullWidth: b,
|
|
6329
6329
|
isTC: e.isTC,
|
|
6330
|
-
injectedChoices:
|
|
6330
|
+
injectedChoices: y,
|
|
6331
6331
|
onInputChange: E,
|
|
6332
6332
|
optionText: M,
|
|
6333
6333
|
sx: {
|
|
6334
6334
|
width: "100%",
|
|
6335
|
-
minWidth:
|
|
6335
|
+
minWidth: b ? 0 : 220
|
|
6336
6336
|
}
|
|
6337
6337
|
}
|
|
6338
6338
|
)
|
|
@@ -6369,8 +6369,8 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6369
6369
|
return v.useEffect(() => {
|
|
6370
6370
|
if (s !== "ND" || !r)
|
|
6371
6371
|
return;
|
|
6372
|
-
const
|
|
6373
|
-
|
|
6372
|
+
const h = a.getValues(r), f = qi(h);
|
|
6373
|
+
f !== h && a.setValue(r, f, {
|
|
6374
6374
|
shouldDirty: !1,
|
|
6375
6375
|
shouldTouch: !1,
|
|
6376
6376
|
shouldValidate: !1
|
|
@@ -6400,8 +6400,8 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6400
6400
|
flex: 1,
|
|
6401
6401
|
"& .MuiFormHelperText-root": { display: "none" }
|
|
6402
6402
|
},
|
|
6403
|
-
parse: /* @__PURE__ */ n((
|
|
6404
|
-
format: /* @__PURE__ */ n((
|
|
6403
|
+
parse: /* @__PURE__ */ n((h) => qi(h), "parse"),
|
|
6404
|
+
format: /* @__PURE__ */ n((h) => h == null ? "" : qi(h), "format"),
|
|
6405
6405
|
helperText: " "
|
|
6406
6406
|
}
|
|
6407
6407
|
),
|
|
@@ -6526,15 +6526,15 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6526
6526
|
() => Mh(e),
|
|
6527
6527
|
[e]
|
|
6528
6528
|
), d = v.useMemo(() => new Set(c), [c]), p = v.useMemo(
|
|
6529
|
-
() => l.filter((
|
|
6529
|
+
() => l.filter((f) => !d.has(f.id)),
|
|
6530
6530
|
[l, d]
|
|
6531
6531
|
), u = v.useMemo(
|
|
6532
|
-
() => c.map((
|
|
6532
|
+
() => c.map((f) => l.find((g) => g.id === f)).filter(Boolean),
|
|
6533
6533
|
[l, c]
|
|
6534
|
-
), m = /* @__PURE__ */ n((
|
|
6535
|
-
t || d.has(
|
|
6536
|
-
}, "moveRight"),
|
|
6537
|
-
t || s.onChange(c.filter((g) => g !==
|
|
6534
|
+
), m = /* @__PURE__ */ n((f) => {
|
|
6535
|
+
t || d.has(f) || s.onChange([...c, f]);
|
|
6536
|
+
}, "moveRight"), h = /* @__PURE__ */ n((f) => {
|
|
6537
|
+
t || s.onChange(c.filter((g) => g !== f));
|
|
6538
6538
|
}, "moveLeft");
|
|
6539
6539
|
return /* @__PURE__ */ i(
|
|
6540
6540
|
Me,
|
|
@@ -6573,7 +6573,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6573
6573
|
{
|
|
6574
6574
|
disabled: t,
|
|
6575
6575
|
items: u,
|
|
6576
|
-
onDoubleClick:
|
|
6576
|
+
onDoubleClick: h,
|
|
6577
6577
|
selectedSet: d,
|
|
6578
6578
|
emptyText: "Sin opciones seleccionadas"
|
|
6579
6579
|
}
|
|
@@ -6584,14 +6584,14 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6584
6584
|
}
|
|
6585
6585
|
);
|
|
6586
6586
|
}, "ListCheckPreviewSandbox"), ia = /* @__PURE__ */ n((e, t) => e.filter((o) => !t.includes(o)), "not"), Mt = /* @__PURE__ */ n((e, t) => e.filter((o) => t.includes(o)), "intersection"), Ph = /* @__PURE__ */ n((e) => {
|
|
6587
|
-
const t = he(), { source: o, record: r, sx: a = {}, readOnly: s, disabled: c } = e, l = !!(s || c), { allChoices: d, availableChoices: p } = Va(), [u, m] = v.useState([]), [
|
|
6587
|
+
const t = he(), { source: o, record: r, sx: a = {}, readOnly: s, disabled: c } = e, l = !!(s || c), { allChoices: d, availableChoices: p } = Va(), [u, m] = v.useState([]), [h, f] = v.useState(null), g = Ge(), C = qu({ control: g.control, name: o }), x = Array.isArray(C) ? C : r?.[o] || [], b = v.useMemo(
|
|
6588
6588
|
() => Array.isArray(r?.[o]) ? r[o] : [],
|
|
6589
6589
|
[r, o]
|
|
6590
|
-
), [
|
|
6591
|
-
() => Array.isArray(
|
|
6592
|
-
(T) => !
|
|
6590
|
+
), [P, S] = v.useState(""), { field: y } = ln({ defaultValue: "", ...e }), F = v.useMemo(
|
|
6591
|
+
() => Array.isArray(x) && x.length > 0 ? p?.filter(
|
|
6592
|
+
(T) => !x.some((V) => V === T.id)
|
|
6593
6593
|
) || [] : p || [],
|
|
6594
|
-
[p,
|
|
6594
|
+
[p, x, o]
|
|
6595
6595
|
);
|
|
6596
6596
|
v.useEffect(() => {
|
|
6597
6597
|
g.getValues(o) === void 0 && g.setValue(o, r?.[o] || [], {
|
|
@@ -6607,21 +6607,21 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6607
6607
|
V && V.id != null && T.set(V.id, V);
|
|
6608
6608
|
}), T;
|
|
6609
6609
|
}, [M]), k = v.useMemo(
|
|
6610
|
-
() => (Array.isArray(
|
|
6611
|
-
[
|
|
6610
|
+
() => (Array.isArray(x) ? x : []).map((T) => I.get(T)).filter(Boolean),
|
|
6611
|
+
[x, I]
|
|
6612
6612
|
), _ = v.useMemo(
|
|
6613
|
-
() => new Set(Array.isArray(
|
|
6614
|
-
[
|
|
6615
|
-
), L = v.useMemo(() => ((Array.isArray(
|
|
6613
|
+
() => new Set(Array.isArray(x) ? x : []),
|
|
6614
|
+
[x]
|
|
6615
|
+
), L = v.useMemo(() => ((Array.isArray(F) && F.length ? F : (M || []).filter((V) => !_.has(V.id))) || []).filter((V) => V && !_.has(V.id)), [F, M, _]), W = /* @__PURE__ */ n((T, V, H) => () => {
|
|
6616
6616
|
const Z = u.indexOf(T), oe = [...u];
|
|
6617
|
-
if (H.shiftKey &&
|
|
6618
|
-
const ae = Math.min(
|
|
6617
|
+
if (H.shiftKey && h !== null) {
|
|
6618
|
+
const ae = Math.min(h, V), ee = Math.max(h, V);
|
|
6619
6619
|
L.slice(ae, ee + 1).map((J) => J.id).forEach((J) => {
|
|
6620
6620
|
oe.includes(J) || oe.push(J);
|
|
6621
6621
|
});
|
|
6622
6622
|
} else
|
|
6623
6623
|
Z === -1 ? oe.push(T) : oe.splice(Z, 1);
|
|
6624
|
-
m(oe),
|
|
6624
|
+
m(oe), f(V);
|
|
6625
6625
|
}, "handleToggle"), j = /* @__PURE__ */ n((T, V) => {
|
|
6626
6626
|
const H = T?.id;
|
|
6627
6627
|
if (H != null) {
|
|
@@ -6629,12 +6629,12 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6629
6629
|
if (_.has(H))
|
|
6630
6630
|
return;
|
|
6631
6631
|
const Z = [
|
|
6632
|
-
...Array.isArray(
|
|
6632
|
+
...Array.isArray(x) ? x : [],
|
|
6633
6633
|
H
|
|
6634
6634
|
];
|
|
6635
6635
|
g.setValue(o, Z, { shouldDirty: !0 });
|
|
6636
6636
|
} else {
|
|
6637
|
-
const Z = (Array.isArray(
|
|
6637
|
+
const Z = (Array.isArray(x) ? x : []).filter(
|
|
6638
6638
|
(oe) => oe !== H
|
|
6639
6639
|
);
|
|
6640
6640
|
g.setValue(o, Z, { shouldDirty: !0 });
|
|
@@ -6654,7 +6654,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6654
6654
|
if (!T.length)
|
|
6655
6655
|
return;
|
|
6656
6656
|
const V = [
|
|
6657
|
-
...Array.isArray(
|
|
6657
|
+
...Array.isArray(x) ? x : [],
|
|
6658
6658
|
...T.filter((H) => !_.has(H))
|
|
6659
6659
|
];
|
|
6660
6660
|
g.setValue(o, V, { shouldDirty: !0 }), m(ia(u, T));
|
|
@@ -6665,17 +6665,17 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6665
6665
|
);
|
|
6666
6666
|
if (!T.length)
|
|
6667
6667
|
return;
|
|
6668
|
-
const V = new Set(T), H = (Array.isArray(
|
|
6668
|
+
const V = new Set(T), H = (Array.isArray(x) ? x : []).filter(
|
|
6669
6669
|
(Z) => !V.has(Z)
|
|
6670
6670
|
);
|
|
6671
6671
|
g.setValue(o, H, { shouldDirty: !0 }), m(ia(u, T));
|
|
6672
6672
|
}, "handleCheckedLeft"), G = /* @__PURE__ */ n(() => {
|
|
6673
|
-
typeof g.resetField == "function" ? g.resetField(o, { defaultValue:
|
|
6673
|
+
typeof g.resetField == "function" ? g.resetField(o, { defaultValue: b }) : g.setValue(o, b, { shouldDirty: !1 }), m([]), f(null);
|
|
6674
6674
|
}, "handleResetChanges"), Q = /* @__PURE__ */ n((T, V, H = {}) => {
|
|
6675
6675
|
const Z = V ? "Disponibles..." : "Seleccionados...", oe = /* @__PURE__ */ n((ee) => {
|
|
6676
6676
|
S(ee === "" ? ee : ee.target.value);
|
|
6677
6677
|
}, "handleSearchChange"), ae = T.filter(
|
|
6678
|
-
(ee) => ee.etiqueta.toLowerCase().includes(
|
|
6678
|
+
(ee) => ee.etiqueta.toLowerCase().includes(P.toLowerCase())
|
|
6679
6679
|
);
|
|
6680
6680
|
return /* @__PURE__ */ R(
|
|
6681
6681
|
mn,
|
|
@@ -6711,7 +6711,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6711
6711
|
alwaysOn: !0,
|
|
6712
6712
|
fullWidth: !0,
|
|
6713
6713
|
resettable: !0,
|
|
6714
|
-
value:
|
|
6714
|
+
value: P,
|
|
6715
6715
|
onChange: oe,
|
|
6716
6716
|
placeholder: Z,
|
|
6717
6717
|
inputProps: { "aria-label": Z },
|
|
@@ -6783,7 +6783,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6783
6783
|
})
|
|
6784
6784
|
}
|
|
6785
6785
|
),
|
|
6786
|
-
!V && /* @__PURE__ */ i("input", { type: "hidden", ...
|
|
6786
|
+
!V && /* @__PURE__ */ i("input", { type: "hidden", ...y })
|
|
6787
6787
|
]
|
|
6788
6788
|
}
|
|
6789
6789
|
);
|
|
@@ -6980,7 +6980,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
6980
6980
|
} = tt(e), { isLoading: s } = Re(), c = gn(), {
|
|
6981
6981
|
isActive: l,
|
|
6982
6982
|
hasBeenActive: d = l
|
|
6983
|
-
} = yi(), p = mt((
|
|
6983
|
+
} = yi(), p = mt((f) => f.breakpoints.down("md")), { source: u, reference: m } = e, h = st(e) || {};
|
|
6984
6984
|
return !a && c?.enabled ? /* @__PURE__ */ i(
|
|
6985
6985
|
Fh,
|
|
6986
6986
|
{
|
|
@@ -7013,7 +7013,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7013
7013
|
{
|
|
7014
7014
|
sx: t,
|
|
7015
7015
|
...r,
|
|
7016
|
-
record:
|
|
7016
|
+
record: h,
|
|
7017
7017
|
optionText: "etiqueta",
|
|
7018
7018
|
optionValue: "id"
|
|
7019
7019
|
}
|
|
@@ -7070,7 +7070,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7070
7070
|
if (!Ft(s))
|
|
7071
7071
|
return s;
|
|
7072
7072
|
const c = ko.toArray(s.props.children);
|
|
7073
|
-
if (!(s.type === t && !s.props.container && c.some((
|
|
7073
|
+
if (!(s.type === t && !s.props.container && c.some((f) => Ft(f) && r.has(f.type))))
|
|
7074
7074
|
return s.props.children && (!s.props.source || s.type === a) ? Ct(
|
|
7075
7075
|
s,
|
|
7076
7076
|
{},
|
|
@@ -7081,15 +7081,15 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7081
7081
|
SectionGroup: a
|
|
7082
7082
|
})
|
|
7083
7083
|
) : s;
|
|
7084
|
-
const d = s.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)`,
|
|
7085
|
-
const g = Ft(
|
|
7084
|
+
const d = s.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) => {
|
|
7085
|
+
const g = Ft(f) && r.get(f.type);
|
|
7086
7086
|
if (!g)
|
|
7087
|
-
return
|
|
7088
|
-
const C =
|
|
7087
|
+
return f;
|
|
7088
|
+
const C = f.props.sx?.gridColumn ? f.props.sx : null;
|
|
7089
7089
|
return Qn(
|
|
7090
7090
|
o,
|
|
7091
7091
|
{
|
|
7092
|
-
key:
|
|
7092
|
+
key: f.key,
|
|
7093
7093
|
className: "FichaVisual-slot",
|
|
7094
7094
|
sx: [
|
|
7095
7095
|
{
|
|
@@ -7130,7 +7130,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7130
7130
|
maxWidth: "100%"
|
|
7131
7131
|
}
|
|
7132
7132
|
},
|
|
7133
|
-
|
|
7133
|
+
f
|
|
7134
7134
|
)
|
|
7135
7135
|
);
|
|
7136
7136
|
});
|
|
@@ -7159,7 +7159,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7159
7159
|
}
|
|
7160
7160
|
]
|
|
7161
7161
|
},
|
|
7162
|
-
|
|
7162
|
+
h
|
|
7163
7163
|
);
|
|
7164
7164
|
}), "presentFichaChildren"), kh = /* @__PURE__ */ n(({ title: e, children: t, sx: o, source: r, ...a }) => {
|
|
7165
7165
|
const s = ui(), { hidden: c, propsContenido: l } = tt({
|
|
@@ -7258,17 +7258,17 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7258
7258
|
controls: kc,
|
|
7259
7259
|
SectionGroup: kh
|
|
7260
7260
|
}), "presentFicha"), _h = /* @__PURE__ */ n((e) => {
|
|
7261
|
-
const { validateDelete: t, className: o } = e, r = xe(e), a = st(), s = gt(), { mutationOptions: { onError: c } = {} } = Re(), { open: l, isLoading: d, handleDialogOpen: p, handleDialogClose: u } = eu({ record: a, resource: r }), m = /* @__PURE__ */ n((
|
|
7262
|
-
p(
|
|
7263
|
-
}, "handleClick"),
|
|
7264
|
-
async (
|
|
7261
|
+
const { validateDelete: t, className: o } = e, r = xe(e), a = st(), s = gt(), { mutationOptions: { onError: c } = {} } = Re(), { open: l, isLoading: d, handleDialogOpen: p, handleDialogClose: u } = eu({ record: a, resource: r }), m = /* @__PURE__ */ n((f) => {
|
|
7262
|
+
p(f);
|
|
7263
|
+
}, "handleClick"), h = ne(
|
|
7264
|
+
async (f) => {
|
|
7265
7265
|
if (a)
|
|
7266
7266
|
try {
|
|
7267
7267
|
await t(a);
|
|
7268
7268
|
} catch (g) {
|
|
7269
7269
|
c && typeof c == "function" ? c(g) : s(g.message, { type: "error" });
|
|
7270
7270
|
} finally {
|
|
7271
|
-
u(
|
|
7271
|
+
u(f);
|
|
7272
7272
|
}
|
|
7273
7273
|
},
|
|
7274
7274
|
[a, t, s, u, c]
|
|
@@ -7291,7 +7291,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7291
7291
|
loading: d,
|
|
7292
7292
|
title: "ra.message.are_you_sure",
|
|
7293
7293
|
content: "ra.message.delete_content",
|
|
7294
|
-
onConfirm:
|
|
7294
|
+
onConfirm: h,
|
|
7295
7295
|
onClose: u
|
|
7296
7296
|
}
|
|
7297
7297
|
)
|
|
@@ -7481,7 +7481,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7481
7481
|
estado: d,
|
|
7482
7482
|
mutationOptions: p = {},
|
|
7483
7483
|
fichaProps: { onBeforeSubmitFicha: u } = {}
|
|
7484
|
-
} = Re(), { onError: m, onSuccess:
|
|
7484
|
+
} = Re(), { onError: m, onSuccess: h, _popupKey: f } = p, g = St(e), [C] = Ha(
|
|
7485
7485
|
o,
|
|
7486
7486
|
{
|
|
7487
7487
|
id: r?.id
|
|
@@ -7489,7 +7489,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7489
7489
|
{
|
|
7490
7490
|
mutationMode: "pessimistic",
|
|
7491
7491
|
onSuccess: /* @__PURE__ */ n((S) => {
|
|
7492
|
-
typeof
|
|
7492
|
+
typeof h == "function" && h(S), c(`resources.${o}.notifications.deleted`, {
|
|
7493
7493
|
type: "info",
|
|
7494
7494
|
messageArgs: {
|
|
7495
7495
|
smart_count: 1,
|
|
@@ -7498,7 +7498,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7498
7498
|
})
|
|
7499
7499
|
},
|
|
7500
7500
|
undoable: !1
|
|
7501
|
-
}), Oh(l,
|
|
7501
|
+
}), Oh(l, f) && (f ? l.hide({ popupKey: f }) : l.hide()), s("list", o, void 0, void 0, {
|
|
7502
7502
|
_scrollToTop: !1
|
|
7503
7503
|
});
|
|
7504
7504
|
}, "onSuccess"),
|
|
@@ -7514,31 +7514,31 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7514
7514
|
);
|
|
7515
7515
|
}, "onError")
|
|
7516
7516
|
}
|
|
7517
|
-
), { save:
|
|
7517
|
+
), { save: x } = nu(), b = gn(), P = ne(
|
|
7518
7518
|
async (S) => {
|
|
7519
|
-
if (
|
|
7520
|
-
return
|
|
7519
|
+
if (b?.enabled)
|
|
7520
|
+
return b?.onSubmit?.({
|
|
7521
7521
|
values: S,
|
|
7522
7522
|
resource: o,
|
|
7523
7523
|
estado: t ? "B" : d
|
|
7524
|
-
}), c(
|
|
7524
|
+
}), c(b.message || "Preview: no se graba.", {
|
|
7525
7525
|
type: "info"
|
|
7526
7526
|
}), Ki();
|
|
7527
|
-
const
|
|
7527
|
+
const y = /* @__PURE__ */ n((M, I) => x(M, rn(I, p)), "saveWithMutationOptions"), F = u && await u(
|
|
7528
7528
|
{
|
|
7529
|
-
submit: t ? () => C() :
|
|
7529
|
+
submit: t ? () => C() : y,
|
|
7530
7530
|
...g
|
|
7531
7531
|
},
|
|
7532
7532
|
t ? "B" : d
|
|
7533
7533
|
);
|
|
7534
|
-
return typeof
|
|
7534
|
+
return typeof F == "string" ? (c(F, { type: "error" }), Ki()) : F === void 0 || F ? t ? C() : y(S) : Ki();
|
|
7535
7535
|
},
|
|
7536
7536
|
[
|
|
7537
7537
|
u,
|
|
7538
7538
|
c,
|
|
7539
|
-
|
|
7539
|
+
x,
|
|
7540
7540
|
p,
|
|
7541
|
-
|
|
7541
|
+
b,
|
|
7542
7542
|
o,
|
|
7543
7543
|
t,
|
|
7544
7544
|
d,
|
|
@@ -7546,7 +7546,7 @@ const Sc = /* @__PURE__ */ n((e) => {
|
|
|
7546
7546
|
g
|
|
7547
7547
|
]
|
|
7548
7548
|
);
|
|
7549
|
-
return
|
|
7549
|
+
return b?.enabled || t === !0 || typeof u == "function" ? P : void 0;
|
|
7550
7550
|
}, "useFormSubmit");
|
|
7551
7551
|
let xr = null;
|
|
7552
7552
|
const Dc = /* @__PURE__ */ n(() => {
|
|
@@ -7653,42 +7653,42 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7653
7653
|
camposClaveFila: l,
|
|
7654
7654
|
setOpen: d,
|
|
7655
7655
|
open: p
|
|
7656
|
-
} = e, { dirtyFields: u, isValid: m } = cl(), { fichaProps: { [e.source]:
|
|
7656
|
+
} = e, { dirtyFields: u, isValid: m } = cl(), { fichaProps: { [e.source]: h = {} } = {} } = Re(), f = Co(), { onAfterRenderAsistente: g, ...C } = h, x = St({ resource: r });
|
|
7657
7657
|
return ie(() => {
|
|
7658
|
-
p && typeof g == "function" && g({ ...
|
|
7658
|
+
p && typeof g == "function" && g({ ...x, form: o }, a);
|
|
7659
7659
|
}, [p]), /* @__PURE__ */ R(rt, { children: [
|
|
7660
|
-
/* @__PURE__ */ i(fi, { className: "Asistente-content", children: /* @__PURE__ */ i(li, { spacing: t.metiri?.fichaVisual ? "19px" : 4, children: ko.map(s, (
|
|
7661
|
-
const
|
|
7660
|
+
/* @__PURE__ */ i(fi, { className: "Asistente-content", children: /* @__PURE__ */ i(li, { spacing: t.metiri?.fichaVisual ? "19px" : 4, children: ko.map(s, (b) => {
|
|
7661
|
+
const P = Ct(b, {
|
|
7662
7662
|
resource: r,
|
|
7663
7663
|
estado: a,
|
|
7664
|
-
defaultValue: c[
|
|
7664
|
+
defaultValue: c[b.props.source] || "",
|
|
7665
7665
|
fullWidth: !0,
|
|
7666
7666
|
sx: { margin: 0 },
|
|
7667
|
-
disabled: a !== "N" && (l.indexOf(
|
|
7668
|
-
...C[
|
|
7667
|
+
disabled: a !== "N" && (l.indexOf(b.props.source) !== -1 || b.props.disabled),
|
|
7668
|
+
...C[b.props.source]
|
|
7669
7669
|
/*InputLabelProps: { shrink: true },*/
|
|
7670
|
-
}), S = kc.get(
|
|
7670
|
+
}), S = kc.get(b.type);
|
|
7671
7671
|
return t.metiri?.fichaVisual && S ? /* @__PURE__ */ i(
|
|
7672
7672
|
Y,
|
|
7673
7673
|
{
|
|
7674
7674
|
className: `FichaVisual-control FichaVisual-${S}`,
|
|
7675
|
-
children:
|
|
7675
|
+
children: P
|
|
7676
7676
|
}
|
|
7677
|
-
) :
|
|
7677
|
+
) : P;
|
|
7678
7678
|
}) }) }),
|
|
7679
7679
|
/* @__PURE__ */ R(mi, { className: "Asistente-actions", children: [
|
|
7680
7680
|
/* @__PURE__ */ i(
|
|
7681
7681
|
dn,
|
|
7682
7682
|
{
|
|
7683
|
-
disabled: Object.keys(u).length === 0 || !m ||
|
|
7683
|
+
disabled: Object.keys(u).length === 0 || !m || f.open
|
|
7684
7684
|
}
|
|
7685
7685
|
),
|
|
7686
7686
|
/* @__PURE__ */ i(
|
|
7687
7687
|
Ze,
|
|
7688
7688
|
{
|
|
7689
7689
|
label: "ra.action.cancel",
|
|
7690
|
-
onClick: /* @__PURE__ */ n((
|
|
7691
|
-
d(!1),
|
|
7690
|
+
onClick: /* @__PURE__ */ n((b) => {
|
|
7691
|
+
d(!1), b.stopPropagation();
|
|
7692
7692
|
}, "onClick"),
|
|
7693
7693
|
children: /* @__PURE__ */ i(Qo, {})
|
|
7694
7694
|
}
|
|
@@ -7707,13 +7707,13 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7707
7707
|
onBeforeSubmitAsistente: l = Eo,
|
|
7708
7708
|
onAfterSubmitAsistente: d = Eo,
|
|
7709
7709
|
validateAllowAdd: p
|
|
7710
|
-
} = e, [u, m] = v.useState(!1),
|
|
7710
|
+
} = e, [u, m] = v.useState(!1), h = xe(e), f = Ge(), g = io(), C = Yl({ apiRef: g, source: s, enviarTodo: c }), x = "N", { estado: b } = Re(), P = St(), y = he()("ra.action.create");
|
|
7711
7711
|
return /* @__PURE__ */ R(rt, { children: [
|
|
7712
7712
|
/* @__PURE__ */ i(
|
|
7713
7713
|
Ze,
|
|
7714
7714
|
{
|
|
7715
7715
|
onClick: /* @__PURE__ */ n((M) => {
|
|
7716
|
-
const I = p ? p(
|
|
7716
|
+
const I = p ? p(P) : !0;
|
|
7717
7717
|
m(I === !0 ? I : !1), M.stopPropagation();
|
|
7718
7718
|
}, "onClick"),
|
|
7719
7719
|
children: /* @__PURE__ */ i(un, {})
|
|
@@ -7726,25 +7726,25 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7726
7726
|
onClose: /* @__PURE__ */ n((M) => {
|
|
7727
7727
|
m(!1), M.stopPropagation();
|
|
7728
7728
|
}, "onClose"),
|
|
7729
|
-
labelEstado:
|
|
7729
|
+
labelEstado: y,
|
|
7730
7730
|
label: a,
|
|
7731
|
-
resource:
|
|
7731
|
+
resource: h,
|
|
7732
7732
|
onSubmit: /* @__PURE__ */ n(async (M, I) => {
|
|
7733
7733
|
const k = await l(
|
|
7734
|
-
|
|
7734
|
+
P,
|
|
7735
7735
|
M,
|
|
7736
|
-
|
|
7737
|
-
|
|
7736
|
+
x,
|
|
7737
|
+
b
|
|
7738
7738
|
);
|
|
7739
|
-
k !== !1 && (C(typeof k == "object" ? k : M,
|
|
7739
|
+
k !== !1 && (C(typeof k == "object" ? k : M, f), m(!1), d(P, M, x, b));
|
|
7740
7740
|
}, "handleSubmit"),
|
|
7741
7741
|
children: /* @__PURE__ */ i(
|
|
7742
7742
|
Oc,
|
|
7743
7743
|
{
|
|
7744
7744
|
source: s,
|
|
7745
|
-
form:
|
|
7746
|
-
resource:
|
|
7747
|
-
estado:
|
|
7745
|
+
form: f,
|
|
7746
|
+
resource: h,
|
|
7747
|
+
estado: x,
|
|
7748
7748
|
editors: t,
|
|
7749
7749
|
recordPadre: o || {},
|
|
7750
7750
|
camposClaveFila: r,
|
|
@@ -7768,13 +7768,13 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7768
7768
|
enviarTodo: l,
|
|
7769
7769
|
onBeforeSubmitAsistente: d = Eo,
|
|
7770
7770
|
onAfterSubmitAsistente: p = Eo
|
|
7771
|
-
} = e, u = he(), [m,
|
|
7771
|
+
} = e, u = he(), [m, h] = v.useState(!1), f = io(), g = Ge(), C = Jl({ apiRef: f, source: s, enviarTodo: l }), x = "M", { estado: b } = Re(), P = St(), S = u("ra.action.edit");
|
|
7772
7772
|
return /* @__PURE__ */ R(rt, { children: [
|
|
7773
7773
|
/* @__PURE__ */ i(
|
|
7774
7774
|
Ze,
|
|
7775
7775
|
{
|
|
7776
|
-
onClick: /* @__PURE__ */ n((
|
|
7777
|
-
|
|
7776
|
+
onClick: /* @__PURE__ */ n((F) => {
|
|
7777
|
+
h(!0), F.stopPropagation();
|
|
7778
7778
|
}, "onClick"),
|
|
7779
7779
|
children: /* @__PURE__ */ i(Au, {})
|
|
7780
7780
|
}
|
|
@@ -7783,20 +7783,20 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7783
7783
|
Ec,
|
|
7784
7784
|
{
|
|
7785
7785
|
open: m,
|
|
7786
|
-
onClose: /* @__PURE__ */ n((
|
|
7787
|
-
|
|
7786
|
+
onClose: /* @__PURE__ */ n((F) => {
|
|
7787
|
+
h(!1), F.stopPropagation();
|
|
7788
7788
|
}, "onClose"),
|
|
7789
7789
|
labelEstado: S,
|
|
7790
7790
|
label: a,
|
|
7791
7791
|
resource: r,
|
|
7792
|
-
onSubmit: /* @__PURE__ */ n(async (
|
|
7792
|
+
onSubmit: /* @__PURE__ */ n(async (F, M) => {
|
|
7793
7793
|
const I = await d(
|
|
7794
|
-
F,
|
|
7795
7794
|
P,
|
|
7796
|
-
|
|
7797
|
-
|
|
7795
|
+
F,
|
|
7796
|
+
x,
|
|
7797
|
+
b
|
|
7798
7798
|
);
|
|
7799
|
-
I !== !1 && (C(c.id, typeof I == "object" ? I :
|
|
7799
|
+
I !== !1 && (C(c.id, typeof I == "object" ? I : F, g), h(!1), p(P, F, x, b));
|
|
7800
7800
|
}, "handleSubmit"),
|
|
7801
7801
|
children: /* @__PURE__ */ i(
|
|
7802
7802
|
Oc,
|
|
@@ -7804,13 +7804,13 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7804
7804
|
source: s,
|
|
7805
7805
|
form: g,
|
|
7806
7806
|
resource: r,
|
|
7807
|
-
estado:
|
|
7807
|
+
estado: x,
|
|
7808
7808
|
editors: t,
|
|
7809
7809
|
recordPadre: c,
|
|
7810
7810
|
camposClaveFila: o,
|
|
7811
7811
|
open: m,
|
|
7812
7812
|
setOpen: /* @__PURE__ */ n(() => {
|
|
7813
|
-
|
|
7813
|
+
h(!1);
|
|
7814
7814
|
}, "setOpen")
|
|
7815
7815
|
}
|
|
7816
7816
|
)
|
|
@@ -7827,13 +7827,13 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7827
7827
|
enviarTodo: s,
|
|
7828
7828
|
onBeforeSubmitAsistente: c = Eo,
|
|
7829
7829
|
onAfterSubmitAsistente: l = Eo
|
|
7830
|
-
} = e, [d, p] = v.useState(!1), u = io(), m = Ge(),
|
|
7830
|
+
} = e, [d, p] = v.useState(!1), u = io(), m = Ge(), h = Ql({ apiRef: u, source: a, enviarTodo: s }), { estado: f } = Re(), g = St();
|
|
7831
7831
|
return /* @__PURE__ */ R(ut, { children: [
|
|
7832
7832
|
/* @__PURE__ */ i(
|
|
7833
7833
|
Lh,
|
|
7834
7834
|
{
|
|
7835
|
-
onClick: /* @__PURE__ */ n((
|
|
7836
|
-
p(!0),
|
|
7835
|
+
onClick: /* @__PURE__ */ n((x) => {
|
|
7836
|
+
p(!0), x.stopPropagation();
|
|
7837
7837
|
}, "onClick"),
|
|
7838
7838
|
children: /* @__PURE__ */ i(pn, {})
|
|
7839
7839
|
},
|
|
@@ -7845,11 +7845,11 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7845
7845
|
isOpen: d,
|
|
7846
7846
|
title: t,
|
|
7847
7847
|
content: o,
|
|
7848
|
-
onConfirm: /* @__PURE__ */ n(async (
|
|
7849
|
-
await c(g, r, "B",
|
|
7848
|
+
onConfirm: /* @__PURE__ */ n(async (x) => {
|
|
7849
|
+
await c(g, r, "B", f) !== !1 && (h(r.id, m), l(g, r, "B", f));
|
|
7850
7850
|
}, "handleSubmit"),
|
|
7851
|
-
onClose: /* @__PURE__ */ n((
|
|
7852
|
-
p(!1),
|
|
7851
|
+
onClose: /* @__PURE__ */ n((x) => {
|
|
7852
|
+
p(!1), x.stopPropagation();
|
|
7853
7853
|
}, "onClose")
|
|
7854
7854
|
}
|
|
7855
7855
|
)
|
|
@@ -7873,30 +7873,30 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7873
7873
|
enableLoad: p = !0,
|
|
7874
7874
|
disabled: u,
|
|
7875
7875
|
hidden: m = !1,
|
|
7876
|
-
apiRef:
|
|
7877
|
-
source:
|
|
7876
|
+
apiRef: h,
|
|
7877
|
+
source: f,
|
|
7878
7878
|
sxContainer: g = {},
|
|
7879
7879
|
slotSx: C,
|
|
7880
|
-
filter:
|
|
7881
|
-
slots:
|
|
7882
|
-
slotProps:
|
|
7880
|
+
filter: x,
|
|
7881
|
+
slots: b,
|
|
7882
|
+
slotProps: P,
|
|
7883
7883
|
showToolbar: S,
|
|
7884
|
-
...
|
|
7885
|
-
} = e, [
|
|
7884
|
+
...y
|
|
7885
|
+
} = e, [F, M] = v.useState([]), I = st(e), k = Ge(), _ = _e(k), { field: L } = ln({ defaultValue: "", ...e }), W = Ur(), {
|
|
7886
7886
|
isActive: j,
|
|
7887
7887
|
hasBeenActive: q = j
|
|
7888
7888
|
} = yi(), {
|
|
7889
7889
|
isLoading: D,
|
|
7890
|
-
fichaProps: { [
|
|
7891
|
-
propsContenidos: { [
|
|
7892
|
-
} = Re(), G = Rt(), Q = Tr((ue) => Br(ue.configInputs,
|
|
7890
|
+
fichaProps: { [f]: E } = {},
|
|
7891
|
+
propsContenidos: { [f]: O = {} } = {}
|
|
7892
|
+
} = Re(), G = Rt(), Q = Tr((ue) => Br(ue.configInputs, f, G)), {
|
|
7893
7893
|
conts: T = []
|
|
7894
7894
|
//user = [],
|
|
7895
7895
|
} = we(Ye), {
|
|
7896
7896
|
hidden: V,
|
|
7897
7897
|
disabled: H,
|
|
7898
7898
|
label: Z
|
|
7899
|
-
} = T[
|
|
7899
|
+
} = T[f] || {
|
|
7900
7900
|
hidden: 0,
|
|
7901
7901
|
disabled: 0,
|
|
7902
7902
|
label: void 0
|
|
@@ -7916,8 +7916,8 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7916
7916
|
slotProps: X,
|
|
7917
7917
|
initialState: pe,
|
|
7918
7918
|
validateAllowAdd: re
|
|
7919
|
-
} = E || {}, ke = `${
|
|
7920
|
-
let B = { ...
|
|
7919
|
+
} = E || {}, ke = `${f}_enviartodo`, [Ke, Fe] = v.useState(r), [{ field: at, sort: Je }] = r, be = H || u || ee, bt = oe !== void 0 ? oe : V ? !0 : $ !== void 0 ? $ : m, Xe = O.enableLoad ?? J ?? p, ot = De ?? c, ro = me ?? l, N = Te ?? d;
|
|
7920
|
+
let B = { ...x };
|
|
7921
7921
|
I && t.split(",").forEach((ue) => {
|
|
7922
7922
|
ue && (B[ue] = [
|
|
7923
7923
|
{
|
|
@@ -7932,22 +7932,22 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7932
7932
|
}, [k]), ie(() => {
|
|
7933
7933
|
if (!Xe) {
|
|
7934
7934
|
const ue = setTimeout(() => {
|
|
7935
|
-
const Oe = sa(
|
|
7936
|
-
!Oe && Be !== "" && Be !== void 0 && _.current.setValue(
|
|
7935
|
+
const Oe = sa(h).length > 0, Be = _.current.getValues(f);
|
|
7936
|
+
!Oe && Be !== "" && Be !== void 0 && _.current.setValue(f, "");
|
|
7937
7937
|
}, 1e3);
|
|
7938
7938
|
return () => clearTimeout(ue);
|
|
7939
7939
|
}
|
|
7940
|
-
}, [
|
|
7940
|
+
}, [h, Xe, f]), ie(() => {
|
|
7941
7941
|
ae ? _.current.getValues(ke) !== "true" && _.current.setValue(ke, "true") : _.current.unregister(ke);
|
|
7942
7942
|
}, [ae, ke]), ie(() => {
|
|
7943
|
-
|
|
7944
|
-
const ue = sa(
|
|
7943
|
+
h.__setEtrRows = M;
|
|
7944
|
+
const ue = sa(h);
|
|
7945
7945
|
return ue.length > 0 && M(ue), () => {
|
|
7946
|
-
|
|
7946
|
+
h.__setEtrRows === M && delete h.__setEtrRows;
|
|
7947
7947
|
};
|
|
7948
|
-
}, [
|
|
7948
|
+
}, [h]);
|
|
7949
7949
|
const z = _e();
|
|
7950
|
-
ie(() => () => clearTimeout(z.current), [
|
|
7950
|
+
ie(() => () => clearTimeout(z.current), [f]);
|
|
7951
7951
|
const { isFetching: Ne, refetch: $e } = ja(
|
|
7952
7952
|
s,
|
|
7953
7953
|
{
|
|
@@ -7961,14 +7961,14 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7961
7961
|
clearTimeout(z.current);
|
|
7962
7962
|
const Oe = ue?.data || [];
|
|
7963
7963
|
ae ? _.current.setValue(
|
|
7964
|
-
|
|
7964
|
+
f,
|
|
7965
7965
|
Oe.map((Be) => ({
|
|
7966
7966
|
...Be,
|
|
7967
7967
|
claveFila: "",
|
|
7968
7968
|
estado: "N"
|
|
7969
7969
|
}))
|
|
7970
|
-
) : (_.current.setValue(
|
|
7971
|
-
_.current.getFieldState(
|
|
7970
|
+
) : (_.current.setValue(f, ""), z.current = setTimeout(() => {
|
|
7971
|
+
_.current.getFieldState(f).isDirty || _.current.setValue(f, "");
|
|
7972
7972
|
}, 1e3)), M(Oe);
|
|
7973
7973
|
}, "onSuccess")
|
|
7974
7974
|
}
|
|
@@ -7978,7 +7978,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7978
7978
|
});
|
|
7979
7979
|
if (Tt === void 0)
|
|
7980
7980
|
throw new Error(
|
|
7981
|
-
`useContenido está devolviendo undefined para el contenido ${
|
|
7981
|
+
`useContenido está devolviendo undefined para el contenido ${f}
|
|
7982
7982
|
Asegúrese de incluir una instrucción return al final de la función`
|
|
7983
7983
|
);
|
|
7984
7984
|
const {
|
|
@@ -7995,22 +7995,22 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
7995
7995
|
...Ue || {},
|
|
7996
7996
|
...Ht || {},
|
|
7997
7997
|
...kt || {},
|
|
7998
|
-
...
|
|
7998
|
+
...b || {},
|
|
7999
7999
|
noRowsOverlay: Vr
|
|
8000
8000
|
};
|
|
8001
8001
|
return typeof ue.toolbar == "boolean" && (ue.toolbar = void 0), ue;
|
|
8002
|
-
}, [Ue, Ht, kt,
|
|
8002
|
+
}, [Ue, Ht, kt, b]), Dt = de(
|
|
8003
8003
|
() => ({
|
|
8004
8004
|
...X || {},
|
|
8005
8005
|
...bn || {},
|
|
8006
8006
|
...je || {},
|
|
8007
|
-
...
|
|
8007
|
+
...P || {}
|
|
8008
8008
|
}),
|
|
8009
8009
|
[
|
|
8010
8010
|
X,
|
|
8011
8011
|
bn,
|
|
8012
8012
|
je,
|
|
8013
|
-
|
|
8013
|
+
P
|
|
8014
8014
|
]
|
|
8015
8015
|
), {
|
|
8016
8016
|
editors: vt,
|
|
@@ -8019,7 +8019,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8019
8019
|
label: Ot,
|
|
8020
8020
|
confirmTitle: yn,
|
|
8021
8021
|
confirmContent: Ve
|
|
8022
|
-
} =
|
|
8022
|
+
} = y, qt = de(() => {
|
|
8023
8023
|
const ue = {
|
|
8024
8024
|
editors: vt,
|
|
8025
8025
|
record: Et,
|
|
@@ -8052,7 +8052,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8052
8052
|
Gh,
|
|
8053
8053
|
{
|
|
8054
8054
|
...ue,
|
|
8055
|
-
source:
|
|
8055
|
+
source: f,
|
|
8056
8056
|
onBeforeSubmitAsistente: Se,
|
|
8057
8057
|
onAfterSubmitAsistente: Ce,
|
|
8058
8058
|
enviarTodo: ae,
|
|
@@ -8071,7 +8071,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8071
8071
|
{
|
|
8072
8072
|
...ue,
|
|
8073
8073
|
validateAllowAdd: re,
|
|
8074
|
-
source:
|
|
8074
|
+
source: f,
|
|
8075
8075
|
onBeforeSubmitAsistente: Se,
|
|
8076
8076
|
onAfterSubmitAsistente: Ce,
|
|
8077
8077
|
enviarTodo: ae,
|
|
@@ -8090,7 +8090,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8090
8090
|
Hh,
|
|
8091
8091
|
{
|
|
8092
8092
|
...ue,
|
|
8093
|
-
source:
|
|
8093
|
+
source: f,
|
|
8094
8094
|
onBeforeSubmitAsistente: Se,
|
|
8095
8095
|
onAfterSubmitAsistente: Ce,
|
|
8096
8096
|
enviarTodo: ae,
|
|
@@ -8108,7 +8108,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8108
8108
|
ot,
|
|
8109
8109
|
ro,
|
|
8110
8110
|
N,
|
|
8111
|
-
|
|
8111
|
+
f,
|
|
8112
8112
|
Se,
|
|
8113
8113
|
Ce,
|
|
8114
8114
|
ae,
|
|
@@ -8133,13 +8133,13 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8133
8133
|
}
|
|
8134
8134
|
} : Dt, so = de(
|
|
8135
8135
|
() => ({
|
|
8136
|
-
...
|
|
8136
|
+
...y.initialState?.columns?.columnVisibilityModel || {},
|
|
8137
8137
|
...pe?.columns?.columnVisibilityModel || {},
|
|
8138
8138
|
...Ee.initialState?.columns?.columnVisibilityModel || {},
|
|
8139
8139
|
..._t.initialState?.columns?.columnVisibilityModel || {}
|
|
8140
8140
|
}),
|
|
8141
8141
|
[
|
|
8142
|
-
JSON.stringify(
|
|
8142
|
+
JSON.stringify(y.initialState?.columns?.columnVisibilityModel),
|
|
8143
8143
|
JSON.stringify(
|
|
8144
8144
|
pe?.columns?.columnVisibilityModel
|
|
8145
8145
|
),
|
|
@@ -8152,12 +8152,12 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8152
8152
|
]
|
|
8153
8153
|
), wn = de(
|
|
8154
8154
|
() => ({
|
|
8155
|
-
...
|
|
8155
|
+
...y.initialState || {},
|
|
8156
8156
|
...pe || {},
|
|
8157
8157
|
...Ee.initialState || {},
|
|
8158
8158
|
..._t.initialState || {},
|
|
8159
8159
|
columns: {
|
|
8160
|
-
...
|
|
8160
|
+
...y.initialState?.columns || {},
|
|
8161
8161
|
...pe?.columns || {},
|
|
8162
8162
|
...Ee.initialState?.columns || {},
|
|
8163
8163
|
..._t.initialState?.columns || {},
|
|
@@ -8165,7 +8165,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8165
8165
|
}
|
|
8166
8166
|
}),
|
|
8167
8167
|
[
|
|
8168
|
-
JSON.stringify(
|
|
8168
|
+
JSON.stringify(y.initialState),
|
|
8169
8169
|
JSON.stringify(pe),
|
|
8170
8170
|
JSON.stringify(Ee.initialState),
|
|
8171
8171
|
JSON.stringify(_t.initialState),
|
|
@@ -8184,12 +8184,12 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8184
8184
|
if (!j || !vn)
|
|
8185
8185
|
return;
|
|
8186
8186
|
const ue = /* @__PURE__ */ n(() => {
|
|
8187
|
-
|
|
8187
|
+
h?.current?.resize?.(), typeof window < "u" && window.dispatchEvent(new Event("resize"));
|
|
8188
8188
|
}, "syncGridLayout"), Oe = requestAnimationFrame(ue), Be = setTimeout(ue, 120);
|
|
8189
8189
|
return () => {
|
|
8190
8190
|
cancelAnimationFrame(Oe), clearTimeout(Be);
|
|
8191
8191
|
};
|
|
8192
|
-
}, [
|
|
8192
|
+
}, [h, No, j, F.length, vn]), bt ? null : /* @__PURE__ */ i(Y, { sx: C ? [aa, C] : aa, children: /* @__PURE__ */ i(
|
|
8193
8193
|
Y,
|
|
8194
8194
|
{
|
|
8195
8195
|
sx: {
|
|
@@ -8216,7 +8216,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8216
8216
|
Mr,
|
|
8217
8217
|
{
|
|
8218
8218
|
label: Z || e.label,
|
|
8219
|
-
source:
|
|
8219
|
+
source: f,
|
|
8220
8220
|
resource: e.resource,
|
|
8221
8221
|
isRequired: e.isRequired,
|
|
8222
8222
|
sx: {
|
|
@@ -8253,7 +8253,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8253
8253
|
children: /* @__PURE__ */ i(
|
|
8254
8254
|
Rr,
|
|
8255
8255
|
{
|
|
8256
|
-
apiRef:
|
|
8256
|
+
apiRef: h,
|
|
8257
8257
|
loading: Ne || D,
|
|
8258
8258
|
sx: {
|
|
8259
8259
|
width: "100%",
|
|
@@ -8297,7 +8297,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8297
8297
|
pageSize: 50
|
|
8298
8298
|
},
|
|
8299
8299
|
hideFooter: !0,
|
|
8300
|
-
rows:
|
|
8300
|
+
rows: F,
|
|
8301
8301
|
columns: qt,
|
|
8302
8302
|
sortModel: Ke,
|
|
8303
8303
|
onSortModelChange: /* @__PURE__ */ n((ue) => Fe(ue), "onSortModelChange"),
|
|
@@ -8310,7 +8310,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8310
8310
|
showToolbar: S ?? !!jt.toolbar,
|
|
8311
8311
|
slots: jt,
|
|
8312
8312
|
slotProps: Cn,
|
|
8313
|
-
...
|
|
8313
|
+
...y,
|
|
8314
8314
|
...Ee,
|
|
8315
8315
|
..._t,
|
|
8316
8316
|
initialState: wn
|
|
@@ -8346,7 +8346,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8346
8346
|
enableLoad: s = !0,
|
|
8347
8347
|
initialState: c,
|
|
8348
8348
|
...l
|
|
8349
|
-
} = e, { isLoading: d } = Re(), p = st(e), [u, m] = te(o), [{ field:
|
|
8349
|
+
} = e, { isLoading: d } = Re(), p = st(e), [u, m] = te(o), [{ field: h, sort: f }] = o;
|
|
8350
8350
|
let g = {};
|
|
8351
8351
|
p && t.split(",").forEach((E) => {
|
|
8352
8352
|
E && (g[E] = [
|
|
@@ -8358,10 +8358,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8358
8358
|
}
|
|
8359
8359
|
]);
|
|
8360
8360
|
});
|
|
8361
|
-
const { estado: C, isLoading:
|
|
8362
|
-
isActive:
|
|
8363
|
-
hasBeenActive:
|
|
8364
|
-
} = yi() || {}, { [e.source]: M = {} } =
|
|
8361
|
+
const { estado: C, isLoading: x, fichaProps: b = {} } = Re(), P = Ur(), S = St(e), {
|
|
8362
|
+
isActive: y = !0,
|
|
8363
|
+
hasBeenActive: F = y
|
|
8364
|
+
} = yi() || {}, { [e.source]: M = {} } = b, { useContenido: I = hn, ...k } = M, {
|
|
8365
8365
|
data: _ = [],
|
|
8366
8366
|
isFetching: L,
|
|
8367
8367
|
refetch: W
|
|
@@ -8369,11 +8369,11 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8369
8369
|
a,
|
|
8370
8370
|
{
|
|
8371
8371
|
pagination: { page: 1, perPage: 200 },
|
|
8372
|
-
sort: { field:
|
|
8372
|
+
sort: { field: h, order: f },
|
|
8373
8373
|
filter: g
|
|
8374
8374
|
},
|
|
8375
8375
|
{
|
|
8376
|
-
enabled: s && !d &&
|
|
8376
|
+
enabled: s && !d && F
|
|
8377
8377
|
}
|
|
8378
8378
|
), j = Ir(), q = ll({
|
|
8379
8379
|
apiRef: j,
|
|
@@ -8383,14 +8383,14 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8383
8383
|
...l,
|
|
8384
8384
|
estado: C,
|
|
8385
8385
|
hidden: e.hidden,
|
|
8386
|
-
isLoading:
|
|
8386
|
+
isLoading: x,
|
|
8387
8387
|
utils: S,
|
|
8388
8388
|
...k,
|
|
8389
8389
|
refetch: W,
|
|
8390
8390
|
apiRef: j
|
|
8391
8391
|
});
|
|
8392
8392
|
const D = _;
|
|
8393
|
-
return
|
|
8393
|
+
return F ? /* @__PURE__ */ i(
|
|
8394
8394
|
mn,
|
|
8395
8395
|
{
|
|
8396
8396
|
sx: {
|
|
@@ -8399,7 +8399,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8399
8399
|
borderRadius: 0,
|
|
8400
8400
|
marginTop: 1
|
|
8401
8401
|
},
|
|
8402
|
-
children: /* @__PURE__ */ i(Aa, { injectFirst: !0, children: /* @__PURE__ */ i(Pr, { theme:
|
|
8402
|
+
children: /* @__PURE__ */ i(Aa, { injectFirst: !0, children: /* @__PURE__ */ i(Pr, { theme: P, children: /* @__PURE__ */ i(
|
|
8403
8403
|
Rr,
|
|
8404
8404
|
{
|
|
8405
8405
|
apiRef: j,
|
|
@@ -8517,17 +8517,17 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8517
8517
|
match: p = null,
|
|
8518
8518
|
mutationOptions: u = null,
|
|
8519
8519
|
options: m = null,
|
|
8520
|
-
permissions:
|
|
8521
|
-
transform:
|
|
8520
|
+
permissions: h = null,
|
|
8521
|
+
transform: f = null,
|
|
8522
8522
|
// ?? nunca al DOM:
|
|
8523
8523
|
isOpen: g = null,
|
|
8524
8524
|
open: C = null,
|
|
8525
|
-
close:
|
|
8526
|
-
redirect:
|
|
8527
|
-
resource:
|
|
8525
|
+
close: x = null,
|
|
8526
|
+
redirect: b = null,
|
|
8527
|
+
resource: P = null,
|
|
8528
8528
|
PaperProps: S = null,
|
|
8529
|
-
maxWidth:
|
|
8530
|
-
fullWidth:
|
|
8529
|
+
maxWidth: y = null,
|
|
8530
|
+
fullWidth: F = null,
|
|
8531
8531
|
title: M = null,
|
|
8532
8532
|
...I
|
|
8533
8533
|
}) => I, "sanitizeRestProps$4"), Kh = /* @__PURE__ */ n((e) => {
|
|
@@ -8554,31 +8554,31 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8554
8554
|
PaperProps: d,
|
|
8555
8555
|
mutationOptions: p,
|
|
8556
8556
|
...u
|
|
8557
|
-
} = e, m = xe(e),
|
|
8557
|
+
} = e, m = xe(e), h = r ?? m, f = no({ resource: h }).options?.label, g = ci(), C = he(), x = Vt(), b = v.useCallback(() => {
|
|
8558
8558
|
if (s)
|
|
8559
8559
|
return s();
|
|
8560
|
-
|
|
8560
|
+
x("list", h, void 0, void 0, {
|
|
8561
8561
|
_scrollToTop: !1
|
|
8562
8562
|
});
|
|
8563
|
-
}, [s,
|
|
8563
|
+
}, [s, x, h]), P = v.useMemo(
|
|
8564
8564
|
() => ({
|
|
8565
|
-
resource:
|
|
8565
|
+
resource: h,
|
|
8566
8566
|
redirect: !1,
|
|
8567
8567
|
mutationOptions: {
|
|
8568
8568
|
...p || {},
|
|
8569
8569
|
onSuccess: /* @__PURE__ */ n((...M) => {
|
|
8570
|
-
typeof p?.onSuccess == "function" && p.onSuccess(...M),
|
|
8570
|
+
typeof p?.onSuccess == "function" && p.onSuccess(...M), b();
|
|
8571
8571
|
}, "onSuccess")
|
|
8572
8572
|
}
|
|
8573
8573
|
}),
|
|
8574
|
-
[
|
|
8575
|
-
), S = iu(
|
|
8574
|
+
[h, p, b]
|
|
8575
|
+
), S = iu(P), y = o ?? `${C("ra.action.create")} ${h ? f || g(h, 1) : ""}`.trim(), F = /* @__PURE__ */ i(Ro, { value: h, children: /* @__PURE__ */ i(ru, { value: S, children: t }) });
|
|
8576
8576
|
return /* @__PURE__ */ i(rt, { children: a && /* @__PURE__ */ R(
|
|
8577
8577
|
Zn,
|
|
8578
8578
|
{
|
|
8579
8579
|
open: !0,
|
|
8580
8580
|
"aria-labelledby": "create-dialog-title",
|
|
8581
|
-
onClose:
|
|
8581
|
+
onClose: b,
|
|
8582
8582
|
"data-testid": "create-dialog",
|
|
8583
8583
|
fullWidth: l,
|
|
8584
8584
|
maxWidth: c,
|
|
@@ -8596,10 +8596,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8596
8596
|
Bc,
|
|
8597
8597
|
{
|
|
8598
8598
|
id: "create-dialog-title",
|
|
8599
|
-
title:
|
|
8600
|
-
defaultTitle:
|
|
8599
|
+
title: y,
|
|
8600
|
+
defaultTitle: y,
|
|
8601
8601
|
record: void 0,
|
|
8602
|
-
onClose:
|
|
8602
|
+
onClose: b
|
|
8603
8603
|
}
|
|
8604
8604
|
),
|
|
8605
8605
|
/* @__PURE__ */ i(nr, { dividers: !0, sx: { p: 0 }, children: /* @__PURE__ */ i(
|
|
@@ -8610,7 +8610,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8610
8610
|
minWidth: { xs: 320, sm: 560 },
|
|
8611
8611
|
minHeight: { xs: 200, sm: 300 }
|
|
8612
8612
|
},
|
|
8613
|
-
children:
|
|
8613
|
+
children: F
|
|
8614
8614
|
}
|
|
8615
8615
|
) })
|
|
8616
8616
|
]
|
|
@@ -8634,22 +8634,22 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8634
8634
|
inline: p,
|
|
8635
8635
|
dialog: u,
|
|
8636
8636
|
ButtonProps: m
|
|
8637
|
-
} = e,
|
|
8637
|
+
} = e, h = ne(
|
|
8638
8638
|
(C) => {
|
|
8639
8639
|
a(), C.stopPropagation();
|
|
8640
8640
|
},
|
|
8641
8641
|
[a]
|
|
8642
|
-
),
|
|
8642
|
+
), f = t(d, { _: d }), g = p ? /* @__PURE__ */ i(wt, { title: f, children: /* @__PURE__ */ i(
|
|
8643
8643
|
lt,
|
|
8644
8644
|
{
|
|
8645
|
-
"aria-label":
|
|
8645
|
+
"aria-label": f,
|
|
8646
8646
|
size: "small",
|
|
8647
8647
|
color: "primary",
|
|
8648
8648
|
...m,
|
|
8649
|
-
onClick:
|
|
8649
|
+
onClick: h,
|
|
8650
8650
|
children: l
|
|
8651
8651
|
}
|
|
8652
|
-
) }) : /* @__PURE__ */ i(Ze, { label:
|
|
8652
|
+
) }) : /* @__PURE__ */ i(Ze, { label: f, ...m, onClick: h, children: l });
|
|
8653
8653
|
return /* @__PURE__ */ R(Nc.Provider, { value: c, children: [
|
|
8654
8654
|
g,
|
|
8655
8655
|
u
|
|
@@ -8673,37 +8673,37 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8673
8673
|
}
|
|
8674
8674
|
);
|
|
8675
8675
|
}, "CreateInDialogButton"), Qh = /* @__PURE__ */ i(un, {}), Hn = /* @__PURE__ */ new Set(), Zh = /* @__PURE__ */ n((e) => {
|
|
8676
|
-
const { children: t, enableLoad: o, queryOptions: r, fichaProps: a, mutationOptions: s } = e, [c, l] = te(null), d = dt(), p = Nt(), u = xe(e), m = vi(u),
|
|
8676
|
+
const { children: t, enableLoad: o, queryOptions: r, fichaProps: a, mutationOptions: s } = e, [c, l] = te(null), d = dt(), p = Nt(), u = xe(e), m = vi(u), h = e.estado ?? (d?.state?.estado || "N"), f = d?.state?.record, g = e.record ?? f, C = e.id ?? d?.state?.id ?? g?.id ?? "-1", x = `${u}:${h}:${C}`, P = C === "-1" && g && typeof g == "object" && !Array.isArray(g) ? Object.fromEntries(
|
|
8677
8677
|
Object.entries(g).filter(
|
|
8678
8678
|
([, W]) => W != null && (typeof W == "string" || typeof W == "number" || typeof W == "boolean")
|
|
8679
8679
|
)
|
|
8680
8680
|
) : {}, S = {
|
|
8681
|
-
estado:
|
|
8681
|
+
estado: h,
|
|
8682
8682
|
id: C,
|
|
8683
|
-
...
|
|
8683
|
+
...P,
|
|
8684
8684
|
...r?.meta
|
|
8685
|
-
}, { data:
|
|
8685
|
+
}, { data: y, isFetching: F } = jh(
|
|
8686
8686
|
u,
|
|
8687
8687
|
{
|
|
8688
8688
|
enabled: o && !m
|
|
8689
8689
|
},
|
|
8690
8690
|
S
|
|
8691
|
-
), M = m?.record || m?.initialValues ||
|
|
8691
|
+
), M = m?.record || m?.initialValues || y, k = (m ? !1 : F) && !M, _ = g && typeof g == "object" && !Array.isArray(g) ? { ...M || {}, ...g } : M, L = de(
|
|
8692
8692
|
() => ({
|
|
8693
|
-
estado:
|
|
8693
|
+
estado: h,
|
|
8694
8694
|
initialValues: _ || {},
|
|
8695
8695
|
isLoading: k,
|
|
8696
8696
|
mutationOptions: s,
|
|
8697
8697
|
fichaProps: a,
|
|
8698
|
-
scopeIdentity:
|
|
8698
|
+
scopeIdentity: x
|
|
8699
8699
|
}),
|
|
8700
8700
|
[
|
|
8701
8701
|
_,
|
|
8702
8702
|
k,
|
|
8703
8703
|
s,
|
|
8704
8704
|
a,
|
|
8705
|
-
|
|
8706
|
-
|
|
8705
|
+
h,
|
|
8706
|
+
x
|
|
8707
8707
|
]
|
|
8708
8708
|
);
|
|
8709
8709
|
return ie(() => {
|
|
@@ -8712,7 +8712,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8712
8712
|
W = !1;
|
|
8713
8713
|
}) : o ? (l(null), k ? () => {
|
|
8714
8714
|
W = !1;
|
|
8715
|
-
} : (p.getFichaConfig(u, { estado:
|
|
8715
|
+
} : (p.getFichaConfig(u, { estado: h }).then((j) => {
|
|
8716
8716
|
W && l(j.data);
|
|
8717
8717
|
}).catch(() => {
|
|
8718
8718
|
W && l({});
|
|
@@ -8724,11 +8724,11 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8724
8724
|
}, [
|
|
8725
8725
|
p,
|
|
8726
8726
|
o,
|
|
8727
|
-
|
|
8727
|
+
h,
|
|
8728
8728
|
k,
|
|
8729
8729
|
u,
|
|
8730
8730
|
m,
|
|
8731
|
-
|
|
8731
|
+
x
|
|
8732
8732
|
]), o && c === null ? /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i($r, { value: L, children: /* @__PURE__ */ i(Ye.Provider, { value: c, children: t }) });
|
|
8733
8733
|
}, "CreateChildren"), la = /* @__PURE__ */ n((e) => {
|
|
8734
8734
|
const t = dt(), {
|
|
@@ -8742,8 +8742,8 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8742
8742
|
estado: p,
|
|
8743
8743
|
id: u,
|
|
8744
8744
|
record: m,
|
|
8745
|
-
...
|
|
8746
|
-
} = e,
|
|
8745
|
+
...h
|
|
8746
|
+
} = e, f = p ?? (t?.state?.estado || "N"), { fichaProps: g } = Xr({ ...e, estado: f }), C = a === "ventana" ? Jh : su, x = de(
|
|
8747
8747
|
() => rn(
|
|
8748
8748
|
rn(
|
|
8749
8749
|
c,
|
|
@@ -8756,58 +8756,58 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8756
8756
|
g?.panel?.mutationOptions,
|
|
8757
8757
|
l
|
|
8758
8758
|
]
|
|
8759
|
-
),
|
|
8759
|
+
), b = /* @__PURE__ */ i(
|
|
8760
8760
|
C,
|
|
8761
8761
|
{
|
|
8762
8762
|
redirect: "list",
|
|
8763
8763
|
...g?.panel,
|
|
8764
|
-
...
|
|
8765
|
-
mutationOptions:
|
|
8764
|
+
...h,
|
|
8765
|
+
mutationOptions: x,
|
|
8766
8766
|
children: /* @__PURE__ */ i(
|
|
8767
8767
|
Zh,
|
|
8768
8768
|
{
|
|
8769
|
-
estado:
|
|
8769
|
+
estado: f,
|
|
8770
8770
|
id: u,
|
|
8771
8771
|
record: m,
|
|
8772
8772
|
fichaProps: g,
|
|
8773
8773
|
enableLoad: r,
|
|
8774
8774
|
queryOptions: s,
|
|
8775
|
-
mutationOptions:
|
|
8775
|
+
mutationOptions: x,
|
|
8776
8776
|
children: d
|
|
8777
8777
|
}
|
|
8778
8778
|
)
|
|
8779
8779
|
}
|
|
8780
8780
|
);
|
|
8781
|
-
return /* @__PURE__ */ i(_o, { children:
|
|
8781
|
+
return /* @__PURE__ */ i(_o, { children: b });
|
|
8782
8782
|
}, "CreateEtriekView"), eg = /* @__PURE__ */ n((e) => {
|
|
8783
8783
|
const t = dt(), o = It(), r = Vt(), a = gt(), s = xe(e), c = no({ resource: s }).options?.label, l = ai({
|
|
8784
8784
|
resource: s,
|
|
8785
8785
|
dockviewTabParent: !0
|
|
8786
|
-
}), d = ci(), p = he(), u = _e(!1), m = t?.state?._asistentePopup === "router" && typeof o?.show == "function",
|
|
8786
|
+
}), d = ci(), p = he(), u = _e(!1), m = t?.state?._asistentePopup === "router" && typeof o?.show == "function", h = m ? `${s}:create` : null;
|
|
8787
8787
|
return ie(() => {
|
|
8788
|
-
if (!m || u.current || (u.current = !0,
|
|
8788
|
+
if (!m || u.current || (u.current = !0, h && (Hn.has(h) || o?.open && o?.props?._popupKey === h) || !h))
|
|
8789
8789
|
return;
|
|
8790
|
-
|
|
8791
|
-
const
|
|
8792
|
-
|
|
8790
|
+
h && Hn.add(h);
|
|
8791
|
+
const f = /* @__PURE__ */ n(() => {
|
|
8792
|
+
h && Hn.delete(h), h ? o.hide({ popupKey: h }) : o.hide(), r("list", s, void 0, void 0, {
|
|
8793
8793
|
_scrollToTop: !1
|
|
8794
8794
|
});
|
|
8795
8795
|
}, "handleClose"), g = e.mutationOptions || {}, C = {
|
|
8796
8796
|
...g,
|
|
8797
|
-
...
|
|
8798
|
-
onSuccess: /* @__PURE__ */ n((...
|
|
8799
|
-
typeof g.onSuccess == "function" ? g.onSuccess(...
|
|
8797
|
+
...h ? { _popupKey: h } : {},
|
|
8798
|
+
onSuccess: /* @__PURE__ */ n((...b) => {
|
|
8799
|
+
typeof g.onSuccess == "function" ? g.onSuccess(...b) : a("ra.notification.created", {
|
|
8800
8800
|
type: "info",
|
|
8801
8801
|
messageArgs: { smart_count: 1 }
|
|
8802
|
-
}),
|
|
8802
|
+
}), h && Hn.delete(h), h ? o.hide({ popupKey: h }) : o.hide();
|
|
8803
8803
|
}, "onSuccess")
|
|
8804
|
-
},
|
|
8804
|
+
}, x = e.title ?? `${p("ra.action.create")} ${Zo(c || d(s, 1) || s)}`;
|
|
8805
8805
|
o.show({
|
|
8806
|
-
title:
|
|
8806
|
+
title: x,
|
|
8807
8807
|
tipo: "vista",
|
|
8808
|
-
cancelar:
|
|
8808
|
+
cancelar: f,
|
|
8809
8809
|
dialogProps: l,
|
|
8810
|
-
_popupKey:
|
|
8810
|
+
_popupKey: h,
|
|
8811
8811
|
controles: /* @__PURE__ */ i(Ro, { value: s, children: /* @__PURE__ */ i(
|
|
8812
8812
|
la,
|
|
8813
8813
|
{
|
|
@@ -8824,7 +8824,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8824
8824
|
m,
|
|
8825
8825
|
a,
|
|
8826
8826
|
l,
|
|
8827
|
-
|
|
8827
|
+
h,
|
|
8828
8828
|
e,
|
|
8829
8829
|
r,
|
|
8830
8830
|
s,
|
|
@@ -8856,9 +8856,9 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8856
8856
|
type: "info",
|
|
8857
8857
|
messageArgs: { smart_count: 1 }
|
|
8858
8858
|
}), l.invalidateQueries({
|
|
8859
|
-
queryKey: [
|
|
8859
|
+
queryKey: [h, "getList"]
|
|
8860
8860
|
}), l.invalidateQueries({
|
|
8861
|
-
queryKey: [
|
|
8861
|
+
queryKey: [h, "getManyReference"]
|
|
8862
8862
|
}), a.close ? a.close() : s(r, a.resource, S.id, S, {
|
|
8863
8863
|
_scrollToTop: !1
|
|
8864
8864
|
});
|
|
@@ -8867,27 +8867,27 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8867
8867
|
}, p = au({
|
|
8868
8868
|
...a,
|
|
8869
8869
|
mutationOptions: d
|
|
8870
|
-
}), { defaultTitle: u, record: m, resource:
|
|
8870
|
+
}), { defaultTitle: u, record: m, resource: h } = p, f = /* @__PURE__ */ n(() => {
|
|
8871
8871
|
a.close ? a.close() : s("list", a.resource, void 0, void 0, {
|
|
8872
8872
|
_scrollToTop: !1
|
|
8873
8873
|
});
|
|
8874
8874
|
}, "handleClose"), g = og(a), {
|
|
8875
8875
|
disableEnforceFocus: C = !0,
|
|
8876
|
-
disableAutoFocus:
|
|
8877
|
-
disableRestoreFocus:
|
|
8878
|
-
...
|
|
8876
|
+
disableAutoFocus: x = !0,
|
|
8877
|
+
disableRestoreFocus: b = !0,
|
|
8878
|
+
...P
|
|
8879
8879
|
} = g;
|
|
8880
8880
|
return /* @__PURE__ */ R(
|
|
8881
8881
|
Zn,
|
|
8882
8882
|
{
|
|
8883
8883
|
open: a.isOpen,
|
|
8884
8884
|
"aria-labelledby": "list-dialog-title",
|
|
8885
|
-
onClose:
|
|
8885
|
+
onClose: f,
|
|
8886
8886
|
"data-testid": "list-dialog",
|
|
8887
8887
|
disableEnforceFocus: C,
|
|
8888
|
-
disableAutoFocus:
|
|
8889
|
-
disableRestoreFocus:
|
|
8890
|
-
...
|
|
8888
|
+
disableAutoFocus: x,
|
|
8889
|
+
disableRestoreFocus: b,
|
|
8890
|
+
...P,
|
|
8891
8891
|
children: [
|
|
8892
8892
|
/* @__PURE__ */ i(
|
|
8893
8893
|
Bc,
|
|
@@ -8896,7 +8896,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8896
8896
|
title: o,
|
|
8897
8897
|
defaultTitle: u,
|
|
8898
8898
|
record: m,
|
|
8899
|
-
onClose:
|
|
8899
|
+
onClose: f
|
|
8900
8900
|
}
|
|
8901
8901
|
),
|
|
8902
8902
|
/* @__PURE__ */ i(Ua, { value: p, children: e })
|
|
@@ -8916,12 +8916,12 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8916
8916
|
mutationOptions: p = null,
|
|
8917
8917
|
options: u = null,
|
|
8918
8918
|
permissions: m = null,
|
|
8919
|
-
transform:
|
|
8920
|
-
isOpen:
|
|
8919
|
+
transform: h = null,
|
|
8920
|
+
isOpen: f = null,
|
|
8921
8921
|
open: g = null,
|
|
8922
8922
|
close: C = null,
|
|
8923
|
-
...
|
|
8924
|
-
}) =>
|
|
8923
|
+
...x
|
|
8924
|
+
}) => x, "sanitizeRestProps$3"), ng = /* @__PURE__ */ n((e) => {
|
|
8925
8925
|
const {
|
|
8926
8926
|
inline: t,
|
|
8927
8927
|
icon: o = ig,
|
|
@@ -8954,17 +8954,17 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8954
8954
|
onSelectionChange: d,
|
|
8955
8955
|
storeKey: p,
|
|
8956
8956
|
...u
|
|
8957
|
-
} = e, m = we(tn),
|
|
8957
|
+
} = e, m = we(tn), h = o === "ventana" ? ng : Ka, f = vi(t), { pathname: g, state: C } = dt(), x = Nt(), [b, P] = te(null), [S, y] = te(s), [F, M] = te([]), [I, k] = te({}), [_, L] = te(
|
|
8958
8958
|
u.sort || { field: "id", order: "ASC" }
|
|
8959
8959
|
), [W, j] = te(
|
|
8960
8960
|
da
|
|
8961
8961
|
), q = _e(null), D = /* @__PURE__ */ n((H) => {
|
|
8962
|
-
|
|
8962
|
+
y(H.target.checked);
|
|
8963
8963
|
}, "handleChange"), E = ne((H) => {
|
|
8964
8964
|
M(
|
|
8965
8965
|
(Z) => Z.includes(H) ? Z.filter((oe) => oe !== H) : [...Z, H]
|
|
8966
8966
|
);
|
|
8967
|
-
}, []), O =
|
|
8967
|
+
}, []), O = f?.rows || f?.data || [], G = v.useMemo(
|
|
8968
8968
|
() => ({
|
|
8969
8969
|
data: O,
|
|
8970
8970
|
total: O.length,
|
|
@@ -8976,7 +8976,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8976
8976
|
perPage: u.perPage ?? pa,
|
|
8977
8977
|
setPage: Ko,
|
|
8978
8978
|
setPerPage: Ko,
|
|
8979
|
-
selectedIds:
|
|
8979
|
+
selectedIds: F,
|
|
8980
8980
|
onSelect: M,
|
|
8981
8981
|
onToggleItem: E,
|
|
8982
8982
|
onUnselectItems: /* @__PURE__ */ n(() => M([]), "onUnselectItems"),
|
|
@@ -8999,21 +8999,21 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
8999
8999
|
u.perPage,
|
|
9000
9000
|
I,
|
|
9001
9001
|
O,
|
|
9002
|
-
|
|
9002
|
+
F,
|
|
9003
9003
|
_
|
|
9004
9004
|
]
|
|
9005
9005
|
);
|
|
9006
9006
|
if (ie(() => {
|
|
9007
|
-
if (
|
|
9008
|
-
|
|
9007
|
+
if (f) {
|
|
9008
|
+
P(f.gridConfig || {});
|
|
9009
9009
|
return;
|
|
9010
9010
|
}
|
|
9011
|
-
|
|
9012
|
-
|
|
9011
|
+
x.getGrillaConfig(t, C).then((H) => {
|
|
9012
|
+
P(H.data);
|
|
9013
9013
|
}).catch((H) => {
|
|
9014
|
-
|
|
9014
|
+
b === null && P({});
|
|
9015
9015
|
});
|
|
9016
|
-
}, [
|
|
9016
|
+
}, [x, t, f, C]), ie(() => {
|
|
9017
9017
|
const H = q.current;
|
|
9018
9018
|
if (!H)
|
|
9019
9019
|
return;
|
|
@@ -9039,11 +9039,11 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9039
9039
|
}), ee(), () => {
|
|
9040
9040
|
ae?.disconnect(), Z && oe && oe.unobserve(Z), oe?.disconnect();
|
|
9041
9041
|
};
|
|
9042
|
-
}, []),
|
|
9042
|
+
}, []), b === null)
|
|
9043
9043
|
return /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 });
|
|
9044
9044
|
let Q = u.filter, T = u.queryOptions;
|
|
9045
9045
|
const V = u.filters === void 0 ? /* @__PURE__ */ i(ag, {}) : u.filters;
|
|
9046
|
-
return C && g.substring(1) === t && (Q = C.filter ?? u.filter, T = C?.meta ? { meta: { ...C.meta } } : u.queryOptions),
|
|
9046
|
+
return C && g.substring(1) === t && (Q = C.filter ?? u.filter, T = C?.meta ? { meta: { ...C.meta } } : u.queryOptions), f ? /* @__PURE__ */ i(
|
|
9047
9047
|
Rs,
|
|
9048
9048
|
{
|
|
9049
9049
|
hasCreate: r,
|
|
@@ -9052,7 +9052,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9052
9052
|
handleSeleccionMultiple: D,
|
|
9053
9053
|
hideViewModeMenu: c,
|
|
9054
9054
|
hideGridToolbarActions: l,
|
|
9055
|
-
children: /* @__PURE__ */ i(_o, { children: /* @__PURE__ */ i(Ye.Provider, { value:
|
|
9055
|
+
children: /* @__PURE__ */ i(_o, { children: /* @__PURE__ */ i(Ye.Provider, { value: b, children: /* @__PURE__ */ i(Fs, { children: /* @__PURE__ */ i(
|
|
9056
9056
|
fr.Provider,
|
|
9057
9057
|
{
|
|
9058
9058
|
value: d ?? (() => {
|
|
@@ -9085,13 +9085,13 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9085
9085
|
handleSeleccionMultiple: D,
|
|
9086
9086
|
hideViewModeMenu: c,
|
|
9087
9087
|
hideGridToolbarActions: l,
|
|
9088
|
-
children: /* @__PURE__ */ i(_o, { children: /* @__PURE__ */ i(Ye.Provider, { value:
|
|
9088
|
+
children: /* @__PURE__ */ i(_o, { children: /* @__PURE__ */ i(Ye.Provider, { value: b, children: /* @__PURE__ */ i(Fs, { children: /* @__PURE__ */ i(
|
|
9089
9089
|
fr.Provider,
|
|
9090
9090
|
{
|
|
9091
9091
|
value: d ?? (() => {
|
|
9092
9092
|
}),
|
|
9093
9093
|
children: /* @__PURE__ */ i(Me, { className: "metiri-list-surface", ref: q, sx: bm, children: /* @__PURE__ */ i(
|
|
9094
|
-
|
|
9094
|
+
h,
|
|
9095
9095
|
{
|
|
9096
9096
|
...u,
|
|
9097
9097
|
perPage: u.perPage ?? pa,
|
|
@@ -9218,45 +9218,49 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9218
9218
|
typeof e[o] == "string" && e[o].trim().length === 0 || (e[o] == null && (e[o] = ""), t[o] = e[o]);
|
|
9219
9219
|
return t;
|
|
9220
9220
|
}, "defaultTransform"), ug = /* @__PURE__ */ n((e) => {
|
|
9221
|
-
const { children: t, fichaProps: o, mutationOptions: r } = e, a = uu(), [s, c] = te(null), l = dt(), d = Nt(), p = xe(e), u = vi(p), { record: m, isFetching:
|
|
9221
|
+
const { children: t, fichaProps: o, mutationOptions: r } = e, a = uu(), [s, c] = te(null), l = dt(), d = Nt(), p = xe(e), u = vi(p), { record: m, isFetching: h } = a, f = u?.record || u?.initialValues || m, g = u ? !1 : h, C = e.estado ?? (l?.state?.estado || "M"), x = m?.id ?? l?.state?.id ?? "edit", b = `${p}:${C}:${x}`, P = _e(null), S = g && P.current !== b;
|
|
9222
|
+
ie(() => {
|
|
9223
|
+
!g && f && (P.current = b);
|
|
9224
|
+
}, [g, f, b]);
|
|
9225
|
+
const y = de(
|
|
9222
9226
|
() => ({
|
|
9223
|
-
estado:
|
|
9224
|
-
initialValues:
|
|
9225
|
-
isLoading:
|
|
9227
|
+
estado: C,
|
|
9228
|
+
initialValues: f,
|
|
9229
|
+
isLoading: S,
|
|
9226
9230
|
mutationOptions: r,
|
|
9227
9231
|
fichaProps: o,
|
|
9228
|
-
scopeIdentity:
|
|
9232
|
+
scopeIdentity: b
|
|
9229
9233
|
}),
|
|
9230
9234
|
[
|
|
9231
|
-
|
|
9232
|
-
|
|
9235
|
+
f,
|
|
9236
|
+
S,
|
|
9233
9237
|
r,
|
|
9234
9238
|
o,
|
|
9235
|
-
|
|
9236
|
-
|
|
9239
|
+
C,
|
|
9240
|
+
b
|
|
9237
9241
|
]
|
|
9238
9242
|
);
|
|
9239
9243
|
return ie(() => {
|
|
9240
|
-
let
|
|
9244
|
+
let F = !0;
|
|
9241
9245
|
return u ? (c(u.formConfig || {}), () => {
|
|
9242
|
-
|
|
9243
|
-
}) : (c(null),
|
|
9244
|
-
|
|
9245
|
-
} : (d.getFichaConfig(p, { estado:
|
|
9246
|
-
|
|
9246
|
+
F = !1;
|
|
9247
|
+
}) : (c(null), S ? () => {
|
|
9248
|
+
F = !1;
|
|
9249
|
+
} : (d.getFichaConfig(p, { estado: C }).then((M) => {
|
|
9250
|
+
F && c(M.data);
|
|
9247
9251
|
}).catch(() => {
|
|
9248
|
-
|
|
9252
|
+
F && c({});
|
|
9249
9253
|
}), () => {
|
|
9250
|
-
|
|
9254
|
+
F = !1;
|
|
9251
9255
|
}));
|
|
9252
9256
|
}, [
|
|
9253
9257
|
d,
|
|
9254
|
-
b,
|
|
9255
9258
|
C,
|
|
9259
|
+
S,
|
|
9256
9260
|
p,
|
|
9257
9261
|
u,
|
|
9258
|
-
|
|
9259
|
-
]), s === null ? /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i($r, { value:
|
|
9262
|
+
b
|
|
9263
|
+
]), s === null ? /* @__PURE__ */ i(yo, { loadingPrimary: "", loadingSecondary: "", timeout: 0 }) : /* @__PURE__ */ i($r, { value: y, children: /* @__PURE__ */ i(Ye.Provider, { value: s, children: t }) });
|
|
9260
9264
|
}, "EditChildren"), ma = /* @__PURE__ */ n((e) => {
|
|
9261
9265
|
const t = dt(), {
|
|
9262
9266
|
useFormulario: o,
|
|
@@ -9265,7 +9269,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9265
9269
|
popupMutationOptions: s,
|
|
9266
9270
|
children: c,
|
|
9267
9271
|
...l
|
|
9268
|
-
} = e, d = ol(), p = Al(e) ?? d?.id, u = e.estado ?? (t?.state?.estado || "M"), { fichaProps: m } = Xr({ ...e, estado: u }),
|
|
9272
|
+
} = e, d = ol(), p = Al(e) ?? d?.id, u = e.estado ?? (t?.state?.estado || "M"), { fichaProps: m } = Xr({ ...e, estado: u }), h = de(
|
|
9269
9273
|
() => rn(
|
|
9270
9274
|
rn(
|
|
9271
9275
|
a,
|
|
@@ -9278,7 +9282,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9278
9282
|
m?.panel?.mutationOptions,
|
|
9279
9283
|
s
|
|
9280
9284
|
]
|
|
9281
|
-
),
|
|
9285
|
+
), f = l.queryOptions ?? m?.panel?.queryOptions, g = /* @__PURE__ */ i(
|
|
9282
9286
|
du,
|
|
9283
9287
|
{
|
|
9284
9288
|
emptyWhileLoading: !0,
|
|
@@ -9288,16 +9292,16 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9288
9292
|
...m?.panel,
|
|
9289
9293
|
...l,
|
|
9290
9294
|
queryOptions: {
|
|
9291
|
-
...
|
|
9292
|
-
meta: { ...
|
|
9295
|
+
...f,
|
|
9296
|
+
meta: { ...f?.meta, estado: u }
|
|
9293
9297
|
},
|
|
9294
|
-
mutationOptions:
|
|
9298
|
+
mutationOptions: h,
|
|
9295
9299
|
children: /* @__PURE__ */ i(
|
|
9296
9300
|
ug,
|
|
9297
9301
|
{
|
|
9298
9302
|
estado: u,
|
|
9299
9303
|
fichaProps: m,
|
|
9300
|
-
mutationOptions:
|
|
9304
|
+
mutationOptions: h,
|
|
9301
9305
|
children: c
|
|
9302
9306
|
}
|
|
9303
9307
|
)
|
|
@@ -9308,31 +9312,31 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9308
9312
|
const t = dt(), o = It(), r = Vt(), a = gt(), s = xe(e), c = no({ resource: s }).options?.label, l = ai({
|
|
9309
9313
|
resource: s,
|
|
9310
9314
|
dockviewTabParent: !0
|
|
9311
|
-
}), d = ci(), p = he(), u = ol(), m = _e(!1),
|
|
9315
|
+
}), d = ci(), p = he(), u = ol(), m = _e(!1), h = t?.state?._asistentePopup === "router" && typeof o?.show == "function", f = en(`/${s}/:id/*`, t.pathname) || en(`/${s}/:id`, t.pathname), g = e.id ?? u?.id ?? t?.state?.id ?? t?.state?.record?.id ?? e.record?.id ?? f?.params?.id, C = h && !!g, x = C ? `${s}:${g}` : null;
|
|
9312
9316
|
return ie(() => {
|
|
9313
|
-
if (!C || m.current || (m.current = !0,
|
|
9317
|
+
if (!C || m.current || (m.current = !0, x && (jn.has(x) || o?.open && o?.props?._popupKey === x) || !x))
|
|
9314
9318
|
return;
|
|
9315
|
-
|
|
9316
|
-
const
|
|
9317
|
-
|
|
9319
|
+
x && jn.add(x);
|
|
9320
|
+
const b = /* @__PURE__ */ n(() => {
|
|
9321
|
+
x && jn.delete(x), x ? o.hide({ popupKey: x }) : o.hide(), r("list", s, void 0, void 0, {
|
|
9318
9322
|
_scrollToTop: !1
|
|
9319
9323
|
});
|
|
9320
|
-
}, "handleClose"),
|
|
9321
|
-
...
|
|
9322
|
-
...
|
|
9323
|
-
onSuccess: /* @__PURE__ */ n((...
|
|
9324
|
-
typeof
|
|
9324
|
+
}, "handleClose"), P = e.mutationOptions || {}, S = {
|
|
9325
|
+
...P,
|
|
9326
|
+
...x ? { _popupKey: x } : {},
|
|
9327
|
+
onSuccess: /* @__PURE__ */ n((...F) => {
|
|
9328
|
+
typeof P.onSuccess == "function" ? P.onSuccess(...F) : a("ra.notification.updated", {
|
|
9325
9329
|
type: "info",
|
|
9326
9330
|
messageArgs: { smart_count: 1 }
|
|
9327
|
-
}),
|
|
9331
|
+
}), x && jn.delete(x), x ? o.hide({ popupKey: x }) : o.hide();
|
|
9328
9332
|
}, "onSuccess")
|
|
9329
|
-
},
|
|
9333
|
+
}, y = e.title ?? `${p("ra.action.edit")} ${Zo(c || d(s, 1) || s)}`;
|
|
9330
9334
|
o.show({
|
|
9331
|
-
title:
|
|
9335
|
+
title: y,
|
|
9332
9336
|
tipo: "vista",
|
|
9333
|
-
cancelar:
|
|
9337
|
+
cancelar: b,
|
|
9334
9338
|
dialogProps: l,
|
|
9335
|
-
_popupKey:
|
|
9339
|
+
_popupKey: x,
|
|
9336
9340
|
controles: /* @__PURE__ */ i(Ro, { value: s, children: /* @__PURE__ */ i(tn.Provider, { value: g, children: /* @__PURE__ */ i(
|
|
9337
9341
|
ma,
|
|
9338
9342
|
{
|
|
@@ -9349,7 +9353,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9349
9353
|
d,
|
|
9350
9354
|
a,
|
|
9351
9355
|
l,
|
|
9352
|
-
|
|
9356
|
+
x,
|
|
9353
9357
|
e,
|
|
9354
9358
|
r,
|
|
9355
9359
|
s,
|
|
@@ -9370,8 +9374,8 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9370
9374
|
hasAccept: d = !0,
|
|
9371
9375
|
hasCancel: p = !0,
|
|
9372
9376
|
isLoading: u = !1
|
|
9373
|
-
} = e, m = xe(e),
|
|
9374
|
-
a && a(
|
|
9377
|
+
} = e, m = xe(e), h = /* @__PURE__ */ n((f) => {
|
|
9378
|
+
a && a(f);
|
|
9375
9379
|
}, "handleClose");
|
|
9376
9380
|
return /* @__PURE__ */ R(
|
|
9377
9381
|
pi,
|
|
@@ -9379,7 +9383,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9379
9383
|
ref: t,
|
|
9380
9384
|
open: o,
|
|
9381
9385
|
fullWidth: !0,
|
|
9382
|
-
onClose:
|
|
9386
|
+
onClose: h,
|
|
9383
9387
|
"aria-labelledby": "form-dialog-title",
|
|
9384
9388
|
children: [
|
|
9385
9389
|
/* @__PURE__ */ i(hi, { id: "form-dialog-title", children: s }),
|
|
@@ -9394,7 +9398,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9394
9398
|
{
|
|
9395
9399
|
label: "ra.action.cancel",
|
|
9396
9400
|
disabled: u,
|
|
9397
|
-
onClick: /* @__PURE__ */ n((
|
|
9401
|
+
onClick: /* @__PURE__ */ n((f) => h(f), "onClick"),
|
|
9398
9402
|
children: /* @__PURE__ */ i(Qo, {})
|
|
9399
9403
|
}
|
|
9400
9404
|
),
|
|
@@ -9469,7 +9473,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9469
9473
|
}, hg = ".MuiDialog-paper", Xi = /* @__PURE__ */ n((e) => {
|
|
9470
9474
|
e.preventDefault();
|
|
9471
9475
|
}, "disableKeyboardEvents"), gg = /* @__PURE__ */ n(() => typeof document > "u" ? !1 : !!document.activeElement?.closest?.(hg), "isDialogInteraction"), bg = /* @__PURE__ */ n((e, t) => typeof e?.hide != "function" || !e?.open ? !1 : t ? !0 : gg() ? !!(e?.props?._popupKey || e?.props?.tipo === "vista") : !1, "canHideAsistentePopup"), Gc = /* @__PURE__ */ n((e) => {
|
|
9472
|
-
const t = Co(), o = dt(), r = xe(), a = Vt(), s = st(), c = It(), { estado: l, mutationOptions: d = {} } = Re(), p = d?._popupKey, u = l === "B" || o.state?.estado === "B", m = Pi({ borrar: u, ...e }),
|
|
9476
|
+
const t = Co(), o = dt(), r = xe(), a = Vt(), s = st(), c = It(), { estado: l, mutationOptions: d = {} } = Re(), p = d?._popupKey, u = l === "B" || o.state?.estado === "B", m = Pi({ borrar: u, ...e }), h = t.open || u, f = t.open ? fg : mg;
|
|
9473
9477
|
return /* @__PURE__ */ R(rt, { children: [
|
|
9474
9478
|
t.open && /* @__PURE__ */ i(
|
|
9475
9479
|
yo,
|
|
@@ -9488,14 +9492,14 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9488
9492
|
flexDirection: "column",
|
|
9489
9493
|
flex: 1,
|
|
9490
9494
|
minHeight: 0,
|
|
9491
|
-
opacity:
|
|
9492
|
-
pointerEvents:
|
|
9493
|
-
...
|
|
9495
|
+
opacity: h ? 0.6 : 1,
|
|
9496
|
+
pointerEvents: h ? "none" : "auto",
|
|
9497
|
+
...f
|
|
9494
9498
|
},
|
|
9495
|
-
onKeyDown:
|
|
9496
|
-
onKeyPress:
|
|
9497
|
-
onKeyUp:
|
|
9498
|
-
disabled:
|
|
9499
|
+
onKeyDown: h ? Xi : void 0,
|
|
9500
|
+
onKeyPress: h ? Xi : void 0,
|
|
9501
|
+
onKeyUp: h ? Xi : void 0,
|
|
9502
|
+
disabled: h,
|
|
9499
9503
|
children: e.children
|
|
9500
9504
|
}
|
|
9501
9505
|
),
|
|
@@ -9635,7 +9639,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9635
9639
|
fichaProps: { config: d = {} } = {}
|
|
9636
9640
|
} = Re(), p = Pi(e);
|
|
9637
9641
|
if (!c) return null;
|
|
9638
|
-
const { toolbar: u, ...m } = d,
|
|
9642
|
+
const { toolbar: u, ...m } = d, h = u !== void 0 ? u : a !== void 0 ? a : /* @__PURE__ */ i(Fi, { deleteButton: r });
|
|
9639
9643
|
return /* @__PURE__ */ i(Gl, { children: /* @__PURE__ */ i(Gc, { children: /* @__PURE__ */ i(
|
|
9640
9644
|
wg,
|
|
9641
9645
|
{
|
|
@@ -9648,7 +9652,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9648
9652
|
children: /* @__PURE__ */ R(
|
|
9649
9653
|
yg,
|
|
9650
9654
|
{
|
|
9651
|
-
toolbar:
|
|
9655
|
+
toolbar: h,
|
|
9652
9656
|
contentScroll: o,
|
|
9653
9657
|
children: [
|
|
9654
9658
|
t,
|
|
@@ -9716,10 +9720,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9716
9720
|
);
|
|
9717
9721
|
}) });
|
|
9718
9722
|
}, "renderMenu"), Mg = /* @__PURE__ */ n(({ dense: e = !1 }) => {
|
|
9719
|
-
const t = he(), [o, r] = te({ mnuPrueba: !1 }), a = mt((
|
|
9723
|
+
const t = he(), [o, r] = te({ mnuPrueba: !1 }), a = mt((h) => h.breakpoints.down("sm")), [s] = Xa(), c = JSON.parse(localStorage.getItem("menus")), m = Hc({
|
|
9720
9724
|
items: c,
|
|
9721
|
-
handleToggle: /* @__PURE__ */ n((
|
|
9722
|
-
r((
|
|
9725
|
+
handleToggle: /* @__PURE__ */ n((h) => {
|
|
9726
|
+
r((f) => ({ ...f, [h]: !f[h] }));
|
|
9723
9727
|
}, "handleToggle"),
|
|
9724
9728
|
state: o,
|
|
9725
9729
|
activeClassName: "",
|
|
@@ -9736,9 +9740,9 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9736
9740
|
width: s ? 230 : 50,
|
|
9737
9741
|
marginTop: 1,
|
|
9738
9742
|
marginBottom: 1,
|
|
9739
|
-
transition: /* @__PURE__ */ n((
|
|
9740
|
-
easing:
|
|
9741
|
-
duration:
|
|
9743
|
+
transition: /* @__PURE__ */ n((h) => h.transitions.create("width", {
|
|
9744
|
+
easing: h.transitions.easing.sharp,
|
|
9745
|
+
duration: h.transitions.duration.leavingScreen
|
|
9742
9746
|
}), "transition")
|
|
9743
9747
|
},
|
|
9744
9748
|
children: /* @__PURE__ */ R(pu, { children: [
|
|
@@ -9816,7 +9820,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9816
9820
|
jsBotonGrilla: d = Ig,
|
|
9817
9821
|
refresh: p = !0,
|
|
9818
9822
|
...u
|
|
9819
|
-
} = e, [m,
|
|
9823
|
+
} = e, [m, h] = v.useState(null), [f, g] = v.useState(null), [C, x] = v.useState({}), b = he(), P = oo(), { displayedFilters: S, filterValues: y, exporter: F, showFilter: M } = P, I = xe(e), { hasCreate: k } = no(e), _ = we(hu) || r, L = xi(e), W = we(Ye) || {}, {
|
|
9820
9824
|
props: {
|
|
9821
9825
|
hasCreate: j,
|
|
9822
9826
|
hasSeleccionMultiple: q,
|
|
@@ -9834,16 +9838,16 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9834
9838
|
}
|
|
9835
9839
|
} = Gt(), ee = !H && Q === "pivot" ? "grilla" : Q, { showCreate: $ } = qr({ resource: I }), J = mt((X) => X.breakpoints.down("md"));
|
|
9836
9840
|
Md(t, () => O.current);
|
|
9837
|
-
const fe = { ...L, ...
|
|
9838
|
-
|
|
9841
|
+
const fe = { ...L, ...P }, Se = /* @__PURE__ */ n((X) => {
|
|
9842
|
+
h(X.currentTarget);
|
|
9839
9843
|
}, "handleOpenMenu"), Ce = /* @__PURE__ */ n(() => {
|
|
9840
|
-
|
|
9844
|
+
h(null), g(null);
|
|
9841
9845
|
}, "handleCloseMenu"), De = /* @__PURE__ */ n((X) => {
|
|
9842
9846
|
g(X);
|
|
9843
9847
|
}, "handleOpenSubMenu"), me = /* @__PURE__ */ n((X) => {
|
|
9844
9848
|
X?.stopPropagation?.(), oe?.current?.showSidebar?.("pivot");
|
|
9845
9849
|
}, "handleOpenPivotPanel"), Te = /* @__PURE__ */ n((X, pe, re) => {
|
|
9846
|
-
re?.selectOnClick &&
|
|
9850
|
+
re?.selectOnClick && x((ke) => ({
|
|
9847
9851
|
...ke,
|
|
9848
9852
|
[pe]: { selectedOption: X }
|
|
9849
9853
|
})), Ce();
|
|
@@ -9914,13 +9918,13 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9914
9918
|
const pe = [
|
|
9915
9919
|
{
|
|
9916
9920
|
key: "grilla",
|
|
9917
|
-
label:
|
|
9921
|
+
label: b("pos.view_grid"),
|
|
9918
9922
|
icon: /* @__PURE__ */ i(Cs, {}),
|
|
9919
9923
|
onClick: /* @__PURE__ */ n(() => T("grilla"), "onClick")
|
|
9920
9924
|
},
|
|
9921
9925
|
{
|
|
9922
9926
|
key: "ficha",
|
|
9923
|
-
label:
|
|
9927
|
+
label: b("pos.view_card"),
|
|
9924
9928
|
icon: /* @__PURE__ */ i(wp, {}),
|
|
9925
9929
|
onClick: /* @__PURE__ */ n(() => T("ficha"), "onClick")
|
|
9926
9930
|
}
|
|
@@ -9932,7 +9936,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9932
9936
|
onClick: /* @__PURE__ */ n(() => T("pivot"), "onClick")
|
|
9933
9937
|
}), [{
|
|
9934
9938
|
type: "MenuButton",
|
|
9935
|
-
label: ee === "pivot" ? "Pivot" :
|
|
9939
|
+
label: ee === "pivot" ? "Pivot" : b(ee === "grilla" ? "pos.view_grid" : "pos.view_card"),
|
|
9936
9940
|
icon: /* @__PURE__ */ i(Cs, {}),
|
|
9937
9941
|
options: pe,
|
|
9938
9942
|
selectOnClick: !0,
|
|
@@ -9950,10 +9954,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9950
9954
|
H,
|
|
9951
9955
|
He,
|
|
9952
9956
|
T,
|
|
9953
|
-
|
|
9957
|
+
b
|
|
9954
9958
|
]);
|
|
9955
9959
|
return ie(() => {
|
|
9956
|
-
|
|
9960
|
+
x((X) => {
|
|
9957
9961
|
const pe = { ...X };
|
|
9958
9962
|
return Ue.forEach((re) => {
|
|
9959
9963
|
if (re.type === "MenuButton" && re.selectOnClick) {
|
|
@@ -9981,7 +9985,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9981
9985
|
resource: I,
|
|
9982
9986
|
showFilter: M,
|
|
9983
9987
|
displayedFilters: S,
|
|
9984
|
-
filterValues:
|
|
9988
|
+
filterValues: y,
|
|
9985
9989
|
context: "button"
|
|
9986
9990
|
}) : _ && /* @__PURE__ */ i(gu, {}),
|
|
9987
9991
|
k && j !== !1 && /* @__PURE__ */ i(
|
|
@@ -9993,7 +9997,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
9993
9997
|
children: /* @__PURE__ */ i(un, {})
|
|
9994
9998
|
}
|
|
9995
9999
|
),
|
|
9996
|
-
|
|
10000
|
+
F !== !1 && /* @__PURE__ */ i(
|
|
9997
10001
|
"div",
|
|
9998
10002
|
{
|
|
9999
10003
|
ref: O,
|
|
@@ -10002,7 +10006,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10002
10006
|
),
|
|
10003
10007
|
p !== !1 && /* @__PURE__ */ i(Fg, { resource: I }),
|
|
10004
10008
|
H && Z !== "custom" && ee === "pivot" && /* @__PURE__ */ i(lt, { onClick: me, children: /* @__PURE__ */ i(ti, {}) }),
|
|
10005
|
-
!l && Ue.length > 0 && /* @__PURE__ */ i(lt, { className: "metiri-grid-menu-button", "aria-label":
|
|
10009
|
+
!l && Ue.length > 0 && /* @__PURE__ */ i(lt, { className: "metiri-grid-menu-button", "aria-label": b("pos.grid_more_actions"), "aria-haspopup": "menu", "aria-expanded": !!m, onClick: Se, children: /* @__PURE__ */ i(pl, {}) }),
|
|
10006
10010
|
!l && Ue.length > 0 && /* @__PURE__ */ i(
|
|
10007
10011
|
go,
|
|
10008
10012
|
{
|
|
@@ -10075,7 +10079,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10075
10079
|
go,
|
|
10076
10080
|
{
|
|
10077
10081
|
anchorEl: m,
|
|
10078
|
-
open:
|
|
10082
|
+
open: f === X.index,
|
|
10079
10083
|
onClose: Ce,
|
|
10080
10084
|
anchorOrigin: {
|
|
10081
10085
|
vertical: "top",
|
|
@@ -10150,10 +10154,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10150
10154
|
})
|
|
10151
10155
|
}
|
|
10152
10156
|
),
|
|
10153
|
-
q && (!J || !
|
|
10157
|
+
q && (!J || !P.selectedIds?.length) && /* @__PURE__ */ i(
|
|
10154
10158
|
Od,
|
|
10155
10159
|
{
|
|
10156
|
-
title:
|
|
10160
|
+
title: b("pos.multiple_selection"),
|
|
10157
10161
|
size: "medium",
|
|
10158
10162
|
checked: D,
|
|
10159
10163
|
onChange: E
|
|
@@ -10165,23 +10169,23 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10165
10169
|
[
|
|
10166
10170
|
I,
|
|
10167
10171
|
S,
|
|
10168
|
-
|
|
10172
|
+
y,
|
|
10169
10173
|
r,
|
|
10170
10174
|
M,
|
|
10171
10175
|
_,
|
|
10172
10176
|
o,
|
|
10173
10177
|
c,
|
|
10174
10178
|
l,
|
|
10175
|
-
|
|
10179
|
+
F,
|
|
10176
10180
|
k,
|
|
10177
10181
|
j,
|
|
10178
10182
|
q,
|
|
10179
10183
|
D,
|
|
10180
10184
|
J,
|
|
10181
|
-
|
|
10185
|
+
P.selectedIds,
|
|
10182
10186
|
fe.data,
|
|
10183
10187
|
m,
|
|
10184
|
-
|
|
10188
|
+
f,
|
|
10185
10189
|
Ue,
|
|
10186
10190
|
C
|
|
10187
10191
|
]
|
|
@@ -10192,8 +10196,8 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10192
10196
|
nameSource: o = "username",
|
|
10193
10197
|
passwordSource: r = "password"
|
|
10194
10198
|
} = e, [a, s] = te(!1), c = he(), l = c("ra.auth.sign_in"), d = gt(), p = xu(), u = dt();
|
|
10195
|
-
return /* @__PURE__ */ i(Lo, { onSubmit: /* @__PURE__ */ n((
|
|
10196
|
-
s(!0), p(
|
|
10199
|
+
return /* @__PURE__ */ i(Lo, { onSubmit: /* @__PURE__ */ n((f) => {
|
|
10200
|
+
s(!0), p(f, u.state ? u.state.nextPathname : "/").catch(
|
|
10197
10201
|
(g) => {
|
|
10198
10202
|
s(!1), d(
|
|
10199
10203
|
typeof g == "string" ? g : typeof g > "u" || !g.message ? "ra.auth.sign_in_error" : g.message,
|
|
@@ -10206,9 +10210,9 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10206
10210
|
);
|
|
10207
10211
|
}
|
|
10208
10212
|
);
|
|
10209
|
-
}, "handleSubmit"), validate: /* @__PURE__ */ n((
|
|
10213
|
+
}, "handleSubmit"), validate: /* @__PURE__ */ n((f) => {
|
|
10210
10214
|
const g = {};
|
|
10211
|
-
return
|
|
10215
|
+
return f[o] || (g[o] = c("ra.validation.required")), f[r] || (g[r] = c("ra.validation.required")), g;
|
|
10212
10216
|
}, "validate"), children: /* @__PURE__ */ i(
|
|
10213
10217
|
Y,
|
|
10214
10218
|
{
|
|
@@ -10325,7 +10329,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10325
10329
|
// NUEVO (opcional): si querés forzar el tooltip del botón, aunque el seleccionado sea otro
|
|
10326
10330
|
title: s
|
|
10327
10331
|
// string
|
|
10328
|
-
} = e, [c, l] = te(!1), d = _e(), p = xe(e), u = we(Ye) || {}, { menuModel: m, leafOptions:
|
|
10332
|
+
} = e, [c, l] = te(!1), d = _e(), p = xe(e), u = we(Ye) || {}, { menuModel: m, leafOptions: h, menuVisible: f } = de(() => {
|
|
10329
10333
|
const M = [], I = [], k = t?.[a];
|
|
10330
10334
|
return to(u, k) ? ((t || []).forEach((_) => {
|
|
10331
10335
|
if (!to(u, _))
|
|
@@ -10362,37 +10366,37 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10362
10366
|
}), { menuModel: I, leafOptions: M, menuVisible: !0 }) : { menuModel: I, leafOptions: M, menuVisible: !1 };
|
|
10363
10367
|
}, [u, a, t]), g = Math.max(
|
|
10364
10368
|
0,
|
|
10365
|
-
Math.min(a, Math.max(
|
|
10366
|
-
), [C,
|
|
10369
|
+
Math.min(a, Math.max(h.length - 1, 0))
|
|
10370
|
+
), [C, x] = te(g);
|
|
10367
10371
|
ie(() => {
|
|
10368
|
-
|
|
10372
|
+
x(
|
|
10369
10373
|
(M) => Math.max(
|
|
10370
10374
|
0,
|
|
10371
|
-
Math.min(M, Math.max(
|
|
10375
|
+
Math.min(M, Math.max(h.length - 1, 0))
|
|
10372
10376
|
)
|
|
10373
10377
|
);
|
|
10374
|
-
}, [
|
|
10375
|
-
const
|
|
10378
|
+
}, [h.length]);
|
|
10379
|
+
const b = /* @__PURE__ */ n((M) => {
|
|
10376
10380
|
M.preventDefault(), l(!0), d.current = M.currentTarget;
|
|
10377
|
-
}, "handleToggle"),
|
|
10381
|
+
}, "handleToggle"), P = /* @__PURE__ */ n((M) => {
|
|
10378
10382
|
d.current && d.current.contains(M.target) || l(!1);
|
|
10379
10383
|
}, "handleClose"), S = /* @__PURE__ */ n((M, I) => {
|
|
10380
|
-
|
|
10381
|
-
}, "handleLeafClick"),
|
|
10382
|
-
return !
|
|
10383
|
-
/* @__PURE__ */ i(gi, { title: s ??
|
|
10384
|
+
x(I), l(!1);
|
|
10385
|
+
}, "handleLeafClick"), y = h[C], F = y?.icon || o;
|
|
10386
|
+
return !f || h.length === 0 ? null : /* @__PURE__ */ R(ut, { children: [
|
|
10387
|
+
/* @__PURE__ */ i(gi, { title: s ?? y?.label, children: /* @__PURE__ */ R(
|
|
10384
10388
|
xo,
|
|
10385
10389
|
{
|
|
10386
10390
|
color: "primary",
|
|
10387
10391
|
disabled: r,
|
|
10388
|
-
onClick:
|
|
10392
|
+
onClick: b,
|
|
10389
10393
|
children: [
|
|
10390
|
-
|
|
10394
|
+
F,
|
|
10391
10395
|
/* @__PURE__ */ i(bi, { fontSize: "small" })
|
|
10392
10396
|
]
|
|
10393
10397
|
}
|
|
10394
10398
|
) }),
|
|
10395
|
-
/* @__PURE__ */ i(Fp, { open: c, anchorEl: d.current, onClose:
|
|
10399
|
+
/* @__PURE__ */ i(Fp, { open: c, anchorEl: d.current, onClose: P, children: m.map((M) => {
|
|
10396
10400
|
if (M.type === "header")
|
|
10397
10401
|
return /* @__PURE__ */ R(ut, { children: [
|
|
10398
10402
|
/* @__PURE__ */ R(
|
|
@@ -10502,22 +10506,22 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10502
10506
|
)
|
|
10503
10507
|
] });
|
|
10504
10508
|
}, "MultiTextField"), kg = /* @__PURE__ */ n((e) => {
|
|
10505
|
-
const { children: t, fichaProps: o } = e, r = Cu(), [a, s] = te(null), c = dt(), l = Nt(), d = xe(e), { record: p, isFetching: u } = r, m = e.estado ?? (c?.state?.estado || "M"),
|
|
10509
|
+
const { children: t, fichaProps: o } = e, r = Cu(), [a, s] = te(null), c = dt(), l = Nt(), d = xe(e), { record: p, isFetching: u } = r, m = e.estado ?? (c?.state?.estado || "M"), h = p?.id ?? c?.state?.id ?? "show", f = `${d}:${m}:${h}`, g = de(
|
|
10506
10510
|
() => ({
|
|
10507
10511
|
estado: m,
|
|
10508
10512
|
initialValues: p,
|
|
10509
10513
|
isLoading: u,
|
|
10510
10514
|
fichaProps: o,
|
|
10511
|
-
scopeIdentity:
|
|
10515
|
+
scopeIdentity: f
|
|
10512
10516
|
}),
|
|
10513
|
-
[p, u, o, m,
|
|
10517
|
+
[p, u, o, m, f]
|
|
10514
10518
|
);
|
|
10515
10519
|
return ie(() => {
|
|
10516
10520
|
let C = !0;
|
|
10517
10521
|
return s(null), u ? () => {
|
|
10518
10522
|
C = !1;
|
|
10519
|
-
} : (l.getFichaConfig(d, { estado: "M" }).then((
|
|
10520
|
-
C && s(
|
|
10523
|
+
} : (l.getFichaConfig(d, { estado: "M" }).then((x) => {
|
|
10524
|
+
C && s(x.data);
|
|
10521
10525
|
}).catch(() => {
|
|
10522
10526
|
C && s({});
|
|
10523
10527
|
}), () => {
|
|
@@ -10640,17 +10644,17 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10640
10644
|
toolbar: d = zg,
|
|
10641
10645
|
onChange: p,
|
|
10642
10646
|
...u
|
|
10643
|
-
} = t, m = dt(),
|
|
10647
|
+
} = t, m = dt(), h = xe(t), [f, g] = te(0), C = Su(), { estado: x } = Re(), b = St(t), P = mt((D) => D.breakpoints.down("sm")), S = mt((D) => D.breakpoints.down("md")), y = _e(null), F = Pp(y, l.props.action);
|
|
10644
10648
|
ie(() => {
|
|
10645
|
-
|
|
10646
|
-
}, [
|
|
10649
|
+
y.current?.updateScrollButtons();
|
|
10650
|
+
}, [P, S]);
|
|
10647
10651
|
const M = /* @__PURE__ */ n((D, E) => {
|
|
10648
10652
|
c || (g(E), p && p(
|
|
10649
|
-
y,
|
|
10650
10653
|
b,
|
|
10654
|
+
x,
|
|
10651
10655
|
{
|
|
10652
10656
|
newTab: E,
|
|
10653
|
-
prevTab:
|
|
10657
|
+
prevTab: f,
|
|
10654
10658
|
setTab: g
|
|
10655
10659
|
},
|
|
10656
10660
|
D
|
|
@@ -10664,11 +10668,11 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10664
10668
|
`${C}/${O}`,
|
|
10665
10669
|
m.pathname
|
|
10666
10670
|
);
|
|
10667
|
-
}) : k.findIndex(({ tabIndex: D }) => D ===
|
|
10671
|
+
}) : k.findIndex(({ tabIndex: D }) => D === f), [
|
|
10668
10672
|
m.pathname,
|
|
10669
10673
|
C,
|
|
10670
10674
|
c,
|
|
10671
|
-
|
|
10675
|
+
f,
|
|
10672
10676
|
k
|
|
10673
10677
|
]), L = de(() => !c || _ >= 0 ? _ : k.length ? 0 : -1, [_, c, k.length]), W = de(() => {
|
|
10674
10678
|
if (c) {
|
|
@@ -10678,8 +10682,8 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10678
10682
|
D.tabIndex
|
|
10679
10683
|
) : !1;
|
|
10680
10684
|
}
|
|
10681
|
-
return
|
|
10682
|
-
}, [L, c, k,
|
|
10685
|
+
return f;
|
|
10686
|
+
}, [L, c, k, f]), j = de(
|
|
10683
10687
|
() => k.map(
|
|
10684
10688
|
({ tab: D, tabIndex: E }) => Ct(D, {
|
|
10685
10689
|
value: c ? _n(D, E) : E
|
|
@@ -10694,7 +10698,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10694
10698
|
qe.tabs
|
|
10695
10699
|
].filter(Boolean).join(" "),
|
|
10696
10700
|
onChange: M,
|
|
10697
|
-
action:
|
|
10701
|
+
action: F,
|
|
10698
10702
|
syncWithLocation: c,
|
|
10699
10703
|
url: s,
|
|
10700
10704
|
value: W,
|
|
@@ -10767,7 +10771,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10767
10771
|
},
|
|
10768
10772
|
[`& .${qe.navigation}`]: {
|
|
10769
10773
|
minWidth: 0,
|
|
10770
|
-
padding:
|
|
10774
|
+
padding: P ? 0 : D.spacing(0.125, 0.75)
|
|
10771
10775
|
},
|
|
10772
10776
|
[`& .${qe.headerDivider}`]: {
|
|
10773
10777
|
marginTop: D.spacing(0.25)
|
|
@@ -10814,10 +10818,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10814
10818
|
const O = _n(
|
|
10815
10819
|
E,
|
|
10816
10820
|
D
|
|
10817
|
-
), Q = !(c ? L === D :
|
|
10821
|
+
), Q = !(c ? L === D : f === D);
|
|
10818
10822
|
return Ct(E, {
|
|
10819
10823
|
intent: "content",
|
|
10820
|
-
resource:
|
|
10824
|
+
resource: h,
|
|
10821
10825
|
hidden: Q,
|
|
10822
10826
|
inert: Q ? "" : void 0,
|
|
10823
10827
|
// Mantener dimensiones para las grillas sin desmontar sus datos.
|
|
@@ -10930,32 +10934,32 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
10930
10934
|
initialValues: d,
|
|
10931
10935
|
scopeIdentity: p,
|
|
10932
10936
|
fichaProps: { config: u = {} } = {}
|
|
10933
|
-
} = Re(), m = Pi(e),
|
|
10937
|
+
} = Re(), m = Pi(e), h = $g();
|
|
10934
10938
|
if (!d) return null;
|
|
10935
10939
|
const {
|
|
10936
|
-
toolbar:
|
|
10940
|
+
toolbar: f,
|
|
10937
10941
|
tabs: g,
|
|
10938
10942
|
onChange: C,
|
|
10939
|
-
...
|
|
10940
|
-
} = u,
|
|
10943
|
+
...x
|
|
10944
|
+
} = u, b = f !== void 0 ? f : a !== void 0 ? a : /* @__PURE__ */ i(Fi, { deleteButton: r }), P = g !== void 0 ? g : s !== void 0 ? s : /* @__PURE__ */ i(Ja, {}), S = C !== void 0 ? C : c;
|
|
10941
10945
|
return /* @__PURE__ */ i(Gl, { children: /* @__PURE__ */ i(Gc, { children: /* @__PURE__ */ i(
|
|
10942
10946
|
Gg,
|
|
10943
10947
|
{
|
|
10944
10948
|
mode: "onBlur",
|
|
10945
|
-
formRootPathname:
|
|
10949
|
+
formRootPathname: h,
|
|
10946
10950
|
onSubmit: m,
|
|
10947
10951
|
defaultValues: d,
|
|
10948
|
-
...
|
|
10952
|
+
...x,
|
|
10949
10953
|
...l,
|
|
10950
10954
|
className: [l.className, "FichaVisual-root"].filter(Boolean).join(" "),
|
|
10951
10955
|
children: /* @__PURE__ */ R(
|
|
10952
10956
|
Vg,
|
|
10953
10957
|
{
|
|
10954
|
-
formRootPathname:
|
|
10958
|
+
formRootPathname: h,
|
|
10955
10959
|
syncWithLocation: o,
|
|
10956
10960
|
onChange: S,
|
|
10957
|
-
tabs:
|
|
10958
|
-
toolbar:
|
|
10961
|
+
tabs: P,
|
|
10962
|
+
toolbar: b,
|
|
10959
10963
|
children: [
|
|
10960
10964
|
t,
|
|
10961
10965
|
/* @__PURE__ */ i(Dc, {})
|
|
@@ -11070,32 +11074,32 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11070
11074
|
};
|
|
11071
11075
|
}, [a, d]);
|
|
11072
11076
|
const { hide: p, stack: u = [] } = a || {}, m = /* @__PURE__ */ n(({ botonesExtra: C }) => {
|
|
11073
|
-
const
|
|
11074
|
-
if (typeof
|
|
11077
|
+
const x = Ge(), b = /* @__PURE__ */ n((P) => (S) => {
|
|
11078
|
+
if (typeof P != "function")
|
|
11075
11079
|
return;
|
|
11076
|
-
const
|
|
11077
|
-
|
|
11080
|
+
const y = x?.getValues ? x.getValues() : void 0;
|
|
11081
|
+
P(y, S);
|
|
11078
11082
|
}, "getExtraClickHandler");
|
|
11079
11083
|
return (C || []).map(
|
|
11080
|
-
({ label:
|
|
11084
|
+
({ label: P = "", icon: S = /* @__PURE__ */ i(Ss, {}), handler: y }, F) => /* @__PURE__ */ i(
|
|
11081
11085
|
Ze,
|
|
11082
11086
|
{
|
|
11083
|
-
label:
|
|
11087
|
+
label: P,
|
|
11084
11088
|
disabled: t,
|
|
11085
|
-
onClick: y
|
|
11089
|
+
onClick: b(y),
|
|
11086
11090
|
children: S
|
|
11087
11091
|
},
|
|
11088
|
-
`extra_${
|
|
11092
|
+
`extra_${F}`
|
|
11089
11093
|
)
|
|
11090
11094
|
);
|
|
11091
|
-
}, "BotonesExtra"),
|
|
11095
|
+
}, "BotonesExtra"), h = /* @__PURE__ */ n(({
|
|
11092
11096
|
title: C,
|
|
11093
|
-
controles:
|
|
11094
|
-
botonesExtra:
|
|
11095
|
-
cancelar:
|
|
11097
|
+
controles: x,
|
|
11098
|
+
botonesExtra: b,
|
|
11099
|
+
cancelar: P,
|
|
11096
11100
|
showResetSize: S = !1,
|
|
11097
|
-
onResetSize:
|
|
11098
|
-
resetSizeTooltip:
|
|
11101
|
+
onResetSize: y,
|
|
11102
|
+
resetSizeTooltip: F = o("pos.reset_size"),
|
|
11099
11103
|
resetSizeAriaLabel: M = o("pos.reset_size")
|
|
11100
11104
|
}) => /* @__PURE__ */ R(
|
|
11101
11105
|
Y,
|
|
@@ -11124,15 +11128,15 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11124
11128
|
children: C
|
|
11125
11129
|
}
|
|
11126
11130
|
),
|
|
11127
|
-
/* @__PURE__ */ i(m, { botonesExtra:
|
|
11128
|
-
S && typeof
|
|
11131
|
+
/* @__PURE__ */ i(m, { botonesExtra: b }),
|
|
11132
|
+
S && typeof y == "function" && /* @__PURE__ */ i(wt, { title: F, children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
11129
11133
|
lt,
|
|
11130
11134
|
{
|
|
11131
11135
|
"aria-label": M,
|
|
11132
11136
|
color: "inherit",
|
|
11133
11137
|
size: "small",
|
|
11134
11138
|
disabled: t,
|
|
11135
|
-
onClick:
|
|
11139
|
+
onClick: y,
|
|
11136
11140
|
children: /* @__PURE__ */ i(Ip, { fontSize: "small" })
|
|
11137
11141
|
}
|
|
11138
11142
|
) }) }),
|
|
@@ -11141,7 +11145,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11141
11145
|
{
|
|
11142
11146
|
label: "ra.action.close",
|
|
11143
11147
|
disabled: t,
|
|
11144
|
-
onClick:
|
|
11148
|
+
onClick: P,
|
|
11145
11149
|
color: "inherit",
|
|
11146
11150
|
children: /* @__PURE__ */ i(Qo, {})
|
|
11147
11151
|
}
|
|
@@ -11221,19 +11225,19 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11221
11225
|
marginTop: /* @__PURE__ */ n((I) => I.spacing(1), "marginTop")
|
|
11222
11226
|
}
|
|
11223
11227
|
},
|
|
11224
|
-
children:
|
|
11228
|
+
children: x
|
|
11225
11229
|
}
|
|
11226
11230
|
)
|
|
11227
11231
|
]
|
|
11228
11232
|
}
|
|
11229
|
-
), "getDialogVista"),
|
|
11233
|
+
), "getDialogVista"), f = /* @__PURE__ */ n(({
|
|
11230
11234
|
title: C,
|
|
11231
|
-
controles:
|
|
11232
|
-
aceptar:
|
|
11233
|
-
cancelar:
|
|
11235
|
+
controles: x,
|
|
11236
|
+
aceptar: b,
|
|
11237
|
+
cancelar: P,
|
|
11234
11238
|
botonesExtra: S,
|
|
11235
|
-
showCancelar:
|
|
11236
|
-
showAceptar:
|
|
11239
|
+
showCancelar: y,
|
|
11240
|
+
showAceptar: F,
|
|
11237
11241
|
formDividers: M,
|
|
11238
11242
|
saveAlwaysEnable: I,
|
|
11239
11243
|
cancelLabel: k,
|
|
@@ -11256,7 +11260,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11256
11260
|
overflowX: "hidden",
|
|
11257
11261
|
overflowY: W === "contained" ? "hidden" : "auto"
|
|
11258
11262
|
},
|
|
11259
|
-
children: /* @__PURE__ */ i(li, { spacing: 2, useFlexGap: !0, sx: { flexShrink: 0 }, children:
|
|
11263
|
+
children: /* @__PURE__ */ i(li, { spacing: 2, useFlexGap: !0, sx: { flexShrink: 0 }, children: x })
|
|
11260
11264
|
}
|
|
11261
11265
|
),
|
|
11262
11266
|
/* @__PURE__ */ R(
|
|
@@ -11266,16 +11270,16 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11266
11270
|
sx: { flexShrink: 0 },
|
|
11267
11271
|
children: [
|
|
11268
11272
|
/* @__PURE__ */ i(m, { botonesExtra: S }),
|
|
11269
|
-
|
|
11273
|
+
y && /* @__PURE__ */ i(
|
|
11270
11274
|
Ze,
|
|
11271
11275
|
{
|
|
11272
11276
|
label: k,
|
|
11273
11277
|
disabled: t,
|
|
11274
|
-
onClick:
|
|
11278
|
+
onClick: P,
|
|
11275
11279
|
children: /* @__PURE__ */ i(Qo, {})
|
|
11276
11280
|
}
|
|
11277
11281
|
),
|
|
11278
|
-
!L &&
|
|
11282
|
+
!L && F && /* @__PURE__ */ i(
|
|
11279
11283
|
dn,
|
|
11280
11284
|
{
|
|
11281
11285
|
label: _,
|
|
@@ -11311,50 +11315,50 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11311
11315
|
minHeight: 0
|
|
11312
11316
|
}
|
|
11313
11317
|
},
|
|
11314
|
-
children: L ? j : /* @__PURE__ */ i(Lo, { resource: r, onSubmit:
|
|
11318
|
+
children: L ? j : /* @__PURE__ */ i(Lo, { resource: r, onSubmit: b, children: j })
|
|
11315
11319
|
}
|
|
11316
11320
|
)
|
|
11317
11321
|
] });
|
|
11318
11322
|
}, "getDialogForm"), g = /* @__PURE__ */ n(({
|
|
11319
11323
|
title: C,
|
|
11320
|
-
controles:
|
|
11321
|
-
aceptar:
|
|
11322
|
-
cancelar:
|
|
11324
|
+
controles: x,
|
|
11325
|
+
aceptar: b,
|
|
11326
|
+
cancelar: P,
|
|
11323
11327
|
cancelLabel: S,
|
|
11324
|
-
confirmLabel:
|
|
11325
|
-
botonesExtra:
|
|
11328
|
+
confirmLabel: y,
|
|
11329
|
+
botonesExtra: F,
|
|
11326
11330
|
showAceptar: M,
|
|
11327
11331
|
showCancelar: I
|
|
11328
11332
|
}) => /* @__PURE__ */ R(ut, { children: [
|
|
11329
11333
|
/* @__PURE__ */ i(or, { className: "Asistente-header", children: C || o("pos.attention") }),
|
|
11330
|
-
/* @__PURE__ */ i(nr, { className: "Asistente-content", sx: { pt: 1, pb: 0 }, children:
|
|
11334
|
+
/* @__PURE__ */ i(nr, { className: "Asistente-content", sx: { pt: 1, pb: 0 }, children: x }),
|
|
11331
11335
|
/* @__PURE__ */ R(hs, { className: "Asistente-actions", sx: { flexShrink: 0 }, children: [
|
|
11332
|
-
/* @__PURE__ */ i(m, { botonesExtra:
|
|
11336
|
+
/* @__PURE__ */ i(m, { botonesExtra: F }),
|
|
11333
11337
|
I !== !1 && /* @__PURE__ */ i(
|
|
11334
11338
|
Ze,
|
|
11335
11339
|
{
|
|
11336
11340
|
label: S,
|
|
11337
11341
|
disabled: t,
|
|
11338
|
-
onClick:
|
|
11342
|
+
onClick: P,
|
|
11339
11343
|
children: /* @__PURE__ */ i(Qo, {})
|
|
11340
11344
|
}
|
|
11341
11345
|
),
|
|
11342
11346
|
M !== !1 && /* @__PURE__ */ i(
|
|
11343
11347
|
Ze,
|
|
11344
11348
|
{
|
|
11345
|
-
label:
|
|
11349
|
+
label: y,
|
|
11346
11350
|
disabled: t,
|
|
11347
|
-
onClick:
|
|
11351
|
+
onClick: b,
|
|
11348
11352
|
children: /* @__PURE__ */ i(Ss, {})
|
|
11349
11353
|
}
|
|
11350
11354
|
)
|
|
11351
11355
|
] })
|
|
11352
11356
|
] }), "getConfirm");
|
|
11353
|
-
return s || !d ? null : /* @__PURE__ */ i(ya.Provider, { value: !0, children: u.map((C,
|
|
11354
|
-
const
|
|
11357
|
+
return s || !d ? null : /* @__PURE__ */ i(ya.Provider, { value: !0, children: u.map((C, x) => {
|
|
11358
|
+
const b = x === u.length - 1, P = C?.tipo === "confirm" && x > 0, {
|
|
11355
11359
|
title: S,
|
|
11356
|
-
controles:
|
|
11357
|
-
aceptar:
|
|
11360
|
+
controles: y,
|
|
11361
|
+
aceptar: F,
|
|
11358
11362
|
cancelar: M = /* @__PURE__ */ n(() => p(), "cancelar"),
|
|
11359
11363
|
tipo: I = "form",
|
|
11360
11364
|
botonesExtra: k = [],
|
|
@@ -11371,7 +11375,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11371
11375
|
contentScroll: Q = "dialog",
|
|
11372
11376
|
PaperProps: T = {},
|
|
11373
11377
|
...V
|
|
11374
|
-
} = O || {}, H =
|
|
11378
|
+
} = O || {}, H = P ? {
|
|
11375
11379
|
...Ug,
|
|
11376
11380
|
...V
|
|
11377
11381
|
} : V, Z = {
|
|
@@ -11386,7 +11390,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11386
11390
|
...T.sx || {}
|
|
11387
11391
|
}
|
|
11388
11392
|
}, ae = /* @__PURE__ */ n((ee, $) => {
|
|
11389
|
-
|
|
11393
|
+
b && $ !== "backdropClick" && M();
|
|
11390
11394
|
}, "handleClose");
|
|
11391
11395
|
return I === "confirm" ? /* @__PURE__ */ i(
|
|
11392
11396
|
Zn,
|
|
@@ -11402,10 +11406,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11402
11406
|
...Array.isArray(H.sx) ? H.sx : [H.sx]
|
|
11403
11407
|
],
|
|
11404
11408
|
PaperProps: oe,
|
|
11405
|
-
children: /* @__PURE__ */ i(cr.Provider, { value:
|
|
11409
|
+
children: /* @__PURE__ */ i(cr.Provider, { value: x + 1, children: g({
|
|
11406
11410
|
title: S,
|
|
11407
|
-
controles:
|
|
11408
|
-
aceptar:
|
|
11411
|
+
controles: y,
|
|
11412
|
+
aceptar: F,
|
|
11409
11413
|
cancelar: M,
|
|
11410
11414
|
cancelLabel: q,
|
|
11411
11415
|
confirmLabel: D,
|
|
@@ -11414,7 +11418,7 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11414
11418
|
showCancelar: L
|
|
11415
11419
|
}) })
|
|
11416
11420
|
},
|
|
11417
|
-
`asistente_${
|
|
11421
|
+
`asistente_${x}`
|
|
11418
11422
|
) : /* @__PURE__ */ i(
|
|
11419
11423
|
Zn,
|
|
11420
11424
|
{
|
|
@@ -11430,10 +11434,10 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11430
11434
|
...Array.isArray(H.sx) ? H.sx : [H.sx]
|
|
11431
11435
|
],
|
|
11432
11436
|
PaperProps: oe,
|
|
11433
|
-
children: /* @__PURE__ */ i(cr.Provider, { value:
|
|
11437
|
+
children: /* @__PURE__ */ i(cr.Provider, { value: x + 1, children: I === "form" ? f({
|
|
11434
11438
|
title: S,
|
|
11435
|
-
controles:
|
|
11436
|
-
aceptar:
|
|
11439
|
+
controles: y,
|
|
11440
|
+
aceptar: F,
|
|
11437
11441
|
cancelar: M,
|
|
11438
11442
|
botonesExtra: k,
|
|
11439
11443
|
showCancelar: L,
|
|
@@ -11444,18 +11448,18 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11444
11448
|
confirmLabel: D,
|
|
11445
11449
|
hasForm: E,
|
|
11446
11450
|
contentScroll: Q
|
|
11447
|
-
}) :
|
|
11451
|
+
}) : h({
|
|
11448
11452
|
title: S,
|
|
11449
|
-
controles:
|
|
11453
|
+
controles: y,
|
|
11450
11454
|
botonesExtra: k,
|
|
11451
11455
|
cancelar: M,
|
|
11452
|
-
showResetSize:
|
|
11456
|
+
showResetSize: b && I === "vista" && G?.showResetSize,
|
|
11453
11457
|
onResetSize: G?.onResetSize,
|
|
11454
11458
|
resetSizeTooltip: G?.resetSizeTooltip,
|
|
11455
11459
|
resetSizeAriaLabel: G?.resetSizeAriaLabel
|
|
11456
11460
|
}) })
|
|
11457
11461
|
},
|
|
11458
|
-
`asistente_${
|
|
11462
|
+
`asistente_${x}`
|
|
11459
11463
|
);
|
|
11460
11464
|
}) });
|
|
11461
11465
|
}, "Asistente"), Fy = /* @__PURE__ */ n((e) => {
|
|
@@ -11466,12 +11470,12 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11466
11470
|
incluyeAcciones: a = !1,
|
|
11467
11471
|
saveButtonProps: s,
|
|
11468
11472
|
...c
|
|
11469
|
-
} = e, [l, d] = te(!1), p = St(c), u = gt(), m = he(), { trigger:
|
|
11473
|
+
} = e, [l, d] = te(!1), p = St(c), u = gt(), m = he(), { trigger: h } = Ge(), { hidden: f } = Hl(), g = v.useContext(Ye) || {}, C = v.useMemo(
|
|
11470
11474
|
() => [...r || [], ...t?.buttons || []],
|
|
11471
11475
|
[r, t]
|
|
11472
|
-
),
|
|
11473
|
-
async (
|
|
11474
|
-
typeof t == "function" ? (S?.skipValidation ? !0 : await
|
|
11476
|
+
), x = ne(
|
|
11477
|
+
async (b, P, S) => {
|
|
11478
|
+
typeof t == "function" ? (S?.skipValidation ? !0 : await h()) ? (d(!0), t(p, P, S?.name, b).finally(
|
|
11475
11479
|
() => {
|
|
11476
11480
|
d(!1);
|
|
11477
11481
|
}
|
|
@@ -11479,24 +11483,24 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11479
11483
|
type: "error"
|
|
11480
11484
|
});
|
|
11481
11485
|
},
|
|
11482
|
-
[
|
|
11486
|
+
[h, t, p, u, m]
|
|
11483
11487
|
);
|
|
11484
11488
|
return /* @__PURE__ */ R(Ga, { sx: Ac, children: [
|
|
11485
11489
|
a ? /* @__PURE__ */ i(dn, { ...s, className: ["metiri-save-button", s?.className].filter(Boolean).join(" ") }) : null,
|
|
11486
11490
|
a && /* @__PURE__ */ i(_c, { disabled: l }),
|
|
11487
11491
|
C.filter(
|
|
11488
|
-
(
|
|
11489
|
-
).map((
|
|
11492
|
+
(b) => !f[b.name] && El(g, b.perbot)
|
|
11493
|
+
).map((b) => /* @__PURE__ */ i(
|
|
11490
11494
|
Ze,
|
|
11491
11495
|
{
|
|
11492
|
-
label:
|
|
11496
|
+
label: b.label,
|
|
11493
11497
|
disabled: l,
|
|
11494
|
-
onClick: /* @__PURE__ */ n(async (
|
|
11495
|
-
await
|
|
11498
|
+
onClick: /* @__PURE__ */ n(async (P) => {
|
|
11499
|
+
await x(P, o, b);
|
|
11496
11500
|
}, "onClick"),
|
|
11497
|
-
children:
|
|
11501
|
+
children: b.icon
|
|
11498
11502
|
},
|
|
11499
|
-
|
|
11503
|
+
b.name
|
|
11500
11504
|
))
|
|
11501
11505
|
] });
|
|
11502
11506
|
}, "FormToolbar"), Py = /* @__PURE__ */ n((e) => /* @__PURE__ */ i(yo, { timeout: 0, ...e }), "Loading"), Kg = {
|
|
@@ -11510,19 +11514,19 @@ const Dc = /* @__PURE__ */ n(() => {
|
|
|
11510
11514
|
ie(() => {
|
|
11511
11515
|
d || u(!0);
|
|
11512
11516
|
}, [d]);
|
|
11513
|
-
const m = p || !d,
|
|
11517
|
+
const m = p || !d, h = de(
|
|
11514
11518
|
() => ({
|
|
11515
11519
|
hidden: d,
|
|
11516
11520
|
isActive: !d,
|
|
11517
11521
|
hasBeenActive: m
|
|
11518
11522
|
}),
|
|
11519
11523
|
[m, d]
|
|
11520
|
-
),
|
|
11521
|
-
return /* @__PURE__ */ i(um, { value:
|
|
11524
|
+
), f = /* @__PURE__ */ i(wt, { title: l, children: /* @__PURE__ */ i(c, { fontSize: "medium" }) }), g = s && !t.metiri?.fichaVisual ? "" : /* @__PURE__ */ i(wt, { title: l, children: /* @__PURE__ */ i("span", { style: Kg, children: o }) });
|
|
11525
|
+
return /* @__PURE__ */ i(um, { value: h, children: /* @__PURE__ */ i(
|
|
11522
11526
|
vu,
|
|
11523
11527
|
{
|
|
11524
11528
|
"aria-label": o,
|
|
11525
|
-
icon:
|
|
11529
|
+
icon: f,
|
|
11526
11530
|
label: g,
|
|
11527
11531
|
iconPosition: t.metiri?.fichaVisual ? "start" : void 0,
|
|
11528
11532
|
...a
|
|
@@ -11725,19 +11729,19 @@ const Ty = {
|
|
|
11725
11729
|
}, "BooleanField"), Ca = /* @__PURE__ */ n((e) => {
|
|
11726
11730
|
const [t, o] = te(!1), [r, a] = te(!1), s = Ge(), c = gt(), l = _e(c), d = _e(null), p = _e(null), u = he(), {
|
|
11727
11731
|
field: m,
|
|
11728
|
-
sx:
|
|
11729
|
-
className:
|
|
11732
|
+
sx: h,
|
|
11733
|
+
className: f,
|
|
11730
11734
|
children: g,
|
|
11731
11735
|
directCamera: C = !1,
|
|
11732
|
-
label:
|
|
11733
|
-
} = e,
|
|
11734
|
-
const [
|
|
11735
|
-
|
|
11736
|
+
label: x = u("from_camera")
|
|
11737
|
+
} = e, b = !C && typeof navigator < "u" && /Android|iPhone|iPad|iPod/i.test(navigator.userAgent), P = /* @__PURE__ */ n(({ target: S }) => {
|
|
11738
|
+
const [y] = S.files;
|
|
11739
|
+
y && (s.setValue(
|
|
11736
11740
|
m,
|
|
11737
11741
|
{
|
|
11738
|
-
title:
|
|
11739
|
-
src: URL.createObjectURL(
|
|
11740
|
-
rawFile:
|
|
11742
|
+
title: y.name,
|
|
11743
|
+
src: URL.createObjectURL(y),
|
|
11744
|
+
rawFile: y
|
|
11741
11745
|
},
|
|
11742
11746
|
{ shouldDirty: !0, shouldValidate: !0 }
|
|
11743
11747
|
), S.value = "");
|
|
@@ -11747,25 +11751,25 @@ const Ty = {
|
|
|
11747
11751
|
}, [c]), ie(() => {
|
|
11748
11752
|
if (!t)
|
|
11749
11753
|
return;
|
|
11750
|
-
let S = !0,
|
|
11751
|
-
const
|
|
11754
|
+
let S = !0, y;
|
|
11755
|
+
const F = d.current;
|
|
11752
11756
|
return (/* @__PURE__ */ n(async () => {
|
|
11753
11757
|
try {
|
|
11754
|
-
if (
|
|
11758
|
+
if (y = await navigator.mediaDevices.getUserMedia({
|
|
11755
11759
|
video: !0,
|
|
11756
11760
|
audio: !1
|
|
11757
|
-
}), !S || !
|
|
11758
|
-
|
|
11761
|
+
}), !S || !F) {
|
|
11762
|
+
y.getTracks().forEach((I) => I.stop());
|
|
11759
11763
|
return;
|
|
11760
11764
|
}
|
|
11761
|
-
|
|
11765
|
+
F.srcObject = y;
|
|
11762
11766
|
} catch (I) {
|
|
11763
11767
|
if (!S)
|
|
11764
11768
|
return;
|
|
11765
11769
|
l.current(I.message, { type: "error" }), o(!1);
|
|
11766
11770
|
}
|
|
11767
11771
|
}, "openCamera"))(), () => {
|
|
11768
|
-
S = !1,
|
|
11772
|
+
S = !1, y?.getTracks().forEach((I) => I.stop()), F && F.srcObject === y && (F.srcObject = null);
|
|
11769
11773
|
};
|
|
11770
11774
|
}, [t]), /* @__PURE__ */ R(ut, { children: [
|
|
11771
11775
|
/* @__PURE__ */ i(
|
|
@@ -11781,13 +11785,13 @@ const Ty = {
|
|
|
11781
11785
|
tr,
|
|
11782
11786
|
{
|
|
11783
11787
|
onClick: /* @__PURE__ */ n(() => {
|
|
11784
|
-
const S = d.current,
|
|
11785
|
-
|
|
11788
|
+
const S = d.current, y = p.current;
|
|
11789
|
+
y.getContext("2d").drawImage(
|
|
11786
11790
|
S,
|
|
11787
11791
|
0,
|
|
11788
11792
|
0,
|
|
11789
|
-
|
|
11790
|
-
|
|
11793
|
+
y.width,
|
|
11794
|
+
y.height
|
|
11791
11795
|
), a(!0);
|
|
11792
11796
|
}, "onClick"),
|
|
11793
11797
|
startIcon: /* @__PURE__ */ i(Bp, {}),
|
|
@@ -11833,16 +11837,16 @@ const Ty = {
|
|
|
11833
11837
|
)
|
|
11834
11838
|
] }),
|
|
11835
11839
|
onConfirm: /* @__PURE__ */ n((S) => {
|
|
11836
|
-
r && p.current.toBlob(function(
|
|
11837
|
-
const
|
|
11840
|
+
r && p.current.toBlob(function(y) {
|
|
11841
|
+
const F = new File([y], `${m}-img.jpg`, {
|
|
11838
11842
|
type: "image/jpeg"
|
|
11839
|
-
}), M = URL.createObjectURL(
|
|
11843
|
+
}), M = URL.createObjectURL(F);
|
|
11840
11844
|
s.setValue(
|
|
11841
11845
|
m,
|
|
11842
11846
|
{
|
|
11843
|
-
title:
|
|
11847
|
+
title: F.name,
|
|
11844
11848
|
src: M,
|
|
11845
|
-
rawFile:
|
|
11849
|
+
rawFile: F
|
|
11846
11850
|
},
|
|
11847
11851
|
{ shouldDirty: !0, shouldValidate: !0 }
|
|
11848
11852
|
), s.trigger(m), a(!1), o(!1);
|
|
@@ -11853,25 +11857,25 @@ const Ty = {
|
|
|
11853
11857
|
}, "onClose")
|
|
11854
11858
|
}
|
|
11855
11859
|
),
|
|
11856
|
-
/* @__PURE__ */ i(gi, { title:
|
|
11860
|
+
/* @__PURE__ */ i(gi, { title: x, children: /* @__PURE__ */ R(
|
|
11857
11861
|
tr,
|
|
11858
11862
|
{
|
|
11859
|
-
component:
|
|
11863
|
+
component: b ? "label" : "button",
|
|
11860
11864
|
type: "button",
|
|
11861
|
-
className:
|
|
11862
|
-
"aria-label":
|
|
11863
|
-
sx:
|
|
11864
|
-
onClick:
|
|
11865
|
+
className: f,
|
|
11866
|
+
"aria-label": x,
|
|
11867
|
+
sx: h,
|
|
11868
|
+
onClick: b ? void 0 : () => o(!0),
|
|
11865
11869
|
children: [
|
|
11866
11870
|
g ?? /* @__PURE__ */ i(Lp, { fontSize: "medium" }),
|
|
11867
|
-
|
|
11871
|
+
b && /* @__PURE__ */ i(
|
|
11868
11872
|
"input",
|
|
11869
11873
|
{
|
|
11870
11874
|
hidden: !0,
|
|
11871
11875
|
type: "file",
|
|
11872
11876
|
accept: "image/*",
|
|
11873
11877
|
capture: "user",
|
|
11874
|
-
onChange:
|
|
11878
|
+
onChange: P
|
|
11875
11879
|
}
|
|
11876
11880
|
)
|
|
11877
11881
|
]
|
|
@@ -12094,101 +12098,101 @@ const Ty = {
|
|
|
12094
12098
|
rutaAsync: p,
|
|
12095
12099
|
accept: u,
|
|
12096
12100
|
download: m = !0,
|
|
12097
|
-
sx:
|
|
12098
|
-
...
|
|
12101
|
+
sx: h,
|
|
12102
|
+
...f
|
|
12099
12103
|
} = o, g = c === "image" ? Qg : typeof u == "string" || u && typeof u == "object" ? u : void 0, C = /* @__PURE__ */ n((L) => {
|
|
12100
12104
|
const W = (L.name || "").toLowerCase(), j = (L.type || "").toLowerCase();
|
|
12101
12105
|
return W.endsWith(".zip") || j === "application/zip" || j === "application/x-zip-compressed" ? null : Zg.some((q) => W.endsWith(q)) ? {
|
|
12102
12106
|
code: "file-executable-blocked",
|
|
12103
|
-
message:
|
|
12107
|
+
message: x("pos.executables_not_allowed")
|
|
12104
12108
|
} : eb.some((q) => j.startsWith(q)) ? {
|
|
12105
12109
|
code: "file-executable-blocked",
|
|
12106
|
-
message:
|
|
12110
|
+
message: x("pos.executables_zip_only")
|
|
12107
12111
|
} : null;
|
|
12108
|
-
}, "validatorNonImage"),
|
|
12109
|
-
|
|
12110
|
-
), k =
|
|
12112
|
+
}, "validatorNonImage"), x = he(), b = st(e), [P, S] = te(() => Date.now()), y = mt((L) => L.breakpoints.down("sm")), F = Ge(), [M, I] = te(
|
|
12113
|
+
b && d ? yr(`${d}/${b[f.source]}`, P) : void 0
|
|
12114
|
+
), k = F?.getValues()[f.source];
|
|
12111
12115
|
if (ie(() => {
|
|
12112
12116
|
S(Date.now());
|
|
12113
12117
|
}, [k]), ie(() => {
|
|
12114
12118
|
p && typeof k == "string" && k && p(k).then((L) => {
|
|
12115
|
-
I(yr(L,
|
|
12119
|
+
I(yr(L, P));
|
|
12116
12120
|
});
|
|
12117
|
-
}, [k,
|
|
12121
|
+
}, [k, P, p]), !F) return null;
|
|
12118
12122
|
const _ = /* @__PURE__ */ i(Jg, { download: m });
|
|
12119
12123
|
return !r && (c === "image" ? /* @__PURE__ */ R(
|
|
12120
12124
|
ar,
|
|
12121
12125
|
{
|
|
12122
|
-
"data-contnom":
|
|
12126
|
+
"data-contnom": f.source,
|
|
12123
12127
|
direction: "row",
|
|
12124
12128
|
alignItems: "flex-start",
|
|
12125
12129
|
justifyContent: "flex-start",
|
|
12126
|
-
sx: [va,
|
|
12130
|
+
sx: [va, h?.gridColumn ? h : {}],
|
|
12127
12131
|
children: [
|
|
12128
12132
|
/* @__PURE__ */ i(
|
|
12129
12133
|
Fu,
|
|
12130
12134
|
{
|
|
12131
|
-
id:
|
|
12135
|
+
id: f.source,
|
|
12132
12136
|
maxSize: 5e6,
|
|
12133
|
-
...
|
|
12137
|
+
...f,
|
|
12134
12138
|
readOnly: s,
|
|
12135
12139
|
options: { ...a, disabled: s || a.disabled },
|
|
12136
|
-
validateFileRemoval: s ? Sa :
|
|
12137
|
-
format: /* @__PURE__ */ n((L) => wa(L, d, M,
|
|
12138
|
-
placeholder:
|
|
12140
|
+
validateFileRemoval: s ? Sa : f.validateFileRemoval,
|
|
12141
|
+
format: /* @__PURE__ */ n((L) => wa(L, d, M, P), "format"),
|
|
12142
|
+
placeholder: x("ra.input.image.upload_single"),
|
|
12139
12143
|
accept: g,
|
|
12140
12144
|
multiple: !1,
|
|
12141
12145
|
inputProps: {
|
|
12142
12146
|
capture: "user"
|
|
12143
12147
|
},
|
|
12144
12148
|
sx: [
|
|
12145
|
-
...Array.isArray(
|
|
12149
|
+
...Array.isArray(h) ? h : [h],
|
|
12146
12150
|
s && {
|
|
12147
12151
|
"& .RaFileInputPreview-removeButton": { display: "none" }
|
|
12148
12152
|
}
|
|
12149
12153
|
],
|
|
12150
12154
|
children: /* @__PURE__ */ R(Me, { children: [
|
|
12151
|
-
/* @__PURE__ */ i(Pu, { source: "src", title: "" }, M ??
|
|
12155
|
+
/* @__PURE__ */ i(Pu, { source: "src", title: "" }, M ?? P),
|
|
12152
12156
|
_
|
|
12153
12157
|
] })
|
|
12154
12158
|
}
|
|
12155
12159
|
),
|
|
12156
|
-
!s && !
|
|
12160
|
+
!s && !y && /* @__PURE__ */ i(Ca, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
|
|
12157
12161
|
]
|
|
12158
12162
|
}
|
|
12159
12163
|
) : /* @__PURE__ */ R(
|
|
12160
12164
|
ar,
|
|
12161
12165
|
{
|
|
12162
|
-
"data-contnom":
|
|
12166
|
+
"data-contnom": f.source,
|
|
12163
12167
|
direction: "row",
|
|
12164
12168
|
alignItems: "flex-start",
|
|
12165
12169
|
justifyContent: "flex-start",
|
|
12166
|
-
sx: [va,
|
|
12170
|
+
sx: [va, h?.gridColumn ? h : {}],
|
|
12167
12171
|
children: [
|
|
12168
12172
|
/* @__PURE__ */ i(
|
|
12169
12173
|
Iu,
|
|
12170
12174
|
{
|
|
12171
|
-
id:
|
|
12175
|
+
id: f.source,
|
|
12172
12176
|
maxSize: 5e6,
|
|
12173
|
-
...
|
|
12177
|
+
...f,
|
|
12174
12178
|
readOnly: s,
|
|
12175
|
-
validateFileRemoval: s ? Sa :
|
|
12179
|
+
validateFileRemoval: s ? Sa : f.validateFileRemoval,
|
|
12176
12180
|
options: {
|
|
12177
12181
|
...c !== "image" ? { validator: C } : {},
|
|
12178
12182
|
onDropRejected: /* @__PURE__ */ n((L) => {
|
|
12179
12183
|
t(
|
|
12180
|
-
L?.[0]?.errors?.[0]?.message ??
|
|
12184
|
+
L?.[0]?.errors?.[0]?.message ?? x("pos.file_not_allowed"),
|
|
12181
12185
|
{ type: "error" }
|
|
12182
12186
|
);
|
|
12183
12187
|
}, "onDropRejected"),
|
|
12184
12188
|
...a,
|
|
12185
12189
|
disabled: s || a.disabled
|
|
12186
12190
|
},
|
|
12187
|
-
format: /* @__PURE__ */ n((L) => wa(L, d, M,
|
|
12188
|
-
placeholder:
|
|
12191
|
+
format: /* @__PURE__ */ n((L) => wa(L, d, M, P), "format"),
|
|
12192
|
+
placeholder: x("ra.input.file.upload_single"),
|
|
12189
12193
|
...g ? { accept: g } : {},
|
|
12190
12194
|
sx: [
|
|
12191
|
-
...Array.isArray(
|
|
12195
|
+
...Array.isArray(h) ? h : [h],
|
|
12192
12196
|
{
|
|
12193
12197
|
"& .previews": { width: "100%" },
|
|
12194
12198
|
"& .previews > div": {
|
|
@@ -12210,7 +12214,7 @@ const Ty = {
|
|
|
12210
12214
|
children: /* @__PURE__ */ i(Yg, { actions: _ })
|
|
12211
12215
|
}
|
|
12212
12216
|
),
|
|
12213
|
-
!s && l && /* @__PURE__ */ i(Ca, { className: "Camino-camera", sx: { mt: 3 }, field:
|
|
12217
|
+
!s && l && /* @__PURE__ */ i(Ca, { className: "Camino-camera", sx: { mt: 3 }, field: f.source })
|
|
12214
12218
|
]
|
|
12215
12219
|
}
|
|
12216
12220
|
));
|
|
@@ -12247,13 +12251,13 @@ const Ty = {
|
|
|
12247
12251
|
onConfirm: p,
|
|
12248
12252
|
contentResource: u,
|
|
12249
12253
|
translateOptions: m = {}
|
|
12250
|
-
} = e,
|
|
12251
|
-
(
|
|
12252
|
-
|
|
12254
|
+
} = e, h = he(), [f] = Za({ resource: u }), g = ne(
|
|
12255
|
+
(x, b) => {
|
|
12256
|
+
x.stopPropagation(), p(x, f);
|
|
12253
12257
|
},
|
|
12254
|
-
[
|
|
12255
|
-
), C = ne((
|
|
12256
|
-
|
|
12258
|
+
[f, p]
|
|
12259
|
+
), C = ne((x) => {
|
|
12260
|
+
x.stopPropagation();
|
|
12257
12261
|
}, []);
|
|
12258
12262
|
return /* @__PURE__ */ R(
|
|
12259
12263
|
pi,
|
|
@@ -12265,22 +12269,22 @@ const Ty = {
|
|
|
12265
12269
|
PaperComponent: tb,
|
|
12266
12270
|
"aria-labelledby": "draggable-dialog-title",
|
|
12267
12271
|
children: [
|
|
12268
|
-
/* @__PURE__ */ i(hi, { style: ob, id: "draggable-dialog-title", children:
|
|
12272
|
+
/* @__PURE__ */ i(hi, { style: ob, id: "draggable-dialog-title", children: h(r, { _: r, ...m }) }),
|
|
12269
12273
|
/* @__PURE__ */ i(fi, { dividers: !0, children: a }),
|
|
12270
12274
|
/* @__PURE__ */ R(mi, { children: [
|
|
12271
12275
|
/* @__PURE__ */ R(yt, { disabled: o, onClick: d, children: [
|
|
12272
12276
|
/* @__PURE__ */ i(l, { sx: { paddingRight: "0.5em" } }),
|
|
12273
|
-
|
|
12277
|
+
h(s, { _: s })
|
|
12274
12278
|
] }),
|
|
12275
12279
|
/* @__PURE__ */ R(
|
|
12276
12280
|
yt,
|
|
12277
12281
|
{
|
|
12278
12282
|
disabled: o,
|
|
12279
|
-
onClick: /* @__PURE__ */ n((
|
|
12283
|
+
onClick: /* @__PURE__ */ n((x) => g(x, "yes"), "onClick"),
|
|
12280
12284
|
autoFocus: !0,
|
|
12281
12285
|
children: [
|
|
12282
12286
|
/* @__PURE__ */ i(c, { sx: { paddingRight: "0.5em" } }),
|
|
12283
|
-
|
|
12287
|
+
h("ra.action.confirm")
|
|
12284
12288
|
]
|
|
12285
12289
|
}
|
|
12286
12290
|
)
|
|
@@ -12299,37 +12303,37 @@ const Ty = {
|
|
|
12299
12303
|
hidden: u,
|
|
12300
12304
|
propsContenido: {
|
|
12301
12305
|
readOnly: m,
|
|
12302
|
-
label:
|
|
12303
|
-
sx:
|
|
12306
|
+
label: h,
|
|
12307
|
+
sx: f,
|
|
12304
12308
|
onChange: g,
|
|
12305
12309
|
asistant: C,
|
|
12306
|
-
asistantResource:
|
|
12307
|
-
source:
|
|
12308
|
-
...
|
|
12310
|
+
asistantResource: x,
|
|
12311
|
+
source: b,
|
|
12312
|
+
...P
|
|
12309
12313
|
}
|
|
12310
12314
|
} = tt(e), S = Ge();
|
|
12311
12315
|
ie(() => {
|
|
12312
12316
|
d.current || (setTimeout(() => {
|
|
12313
|
-
S.setValue(
|
|
12317
|
+
S.setValue(b, rb);
|
|
12314
12318
|
}, 0), d.current = !0);
|
|
12315
|
-
}, [S,
|
|
12316
|
-
const
|
|
12319
|
+
}, [S, b]);
|
|
12320
|
+
const y = ne(() => {
|
|
12317
12321
|
r(!1), l(null);
|
|
12318
|
-
}, [r]),
|
|
12322
|
+
}, [r]), F = /* @__PURE__ */ n((k, _) => {
|
|
12319
12323
|
const L = Array.isArray(c) ? c : _;
|
|
12320
|
-
r(!1), S.setValue(
|
|
12324
|
+
r(!1), S.setValue(b, {
|
|
12321
12325
|
seleccion: L.join(","),
|
|
12322
12326
|
all: !1,
|
|
12323
12327
|
none: !1
|
|
12324
12328
|
}), g(k);
|
|
12325
12329
|
}, "handleConfirm"), M = /* @__PURE__ */ n((k) => {
|
|
12326
|
-
s(null), S.setValue(
|
|
12330
|
+
s(null), S.setValue(b, {
|
|
12327
12331
|
seleccion: "",
|
|
12328
12332
|
all: !1,
|
|
12329
12333
|
none: !0
|
|
12330
12334
|
}), g(k);
|
|
12331
12335
|
}, "handleNinguno"), I = /* @__PURE__ */ n((k) => {
|
|
12332
|
-
s(null), S.setValue(
|
|
12336
|
+
s(null), S.setValue(b, {
|
|
12333
12337
|
seleccion: "",
|
|
12334
12338
|
all: !0,
|
|
12335
12339
|
none: !1
|
|
@@ -12343,7 +12347,7 @@ const Ty = {
|
|
|
12343
12347
|
display: "flex",
|
|
12344
12348
|
alignItems: "center",
|
|
12345
12349
|
sx: {
|
|
12346
|
-
...
|
|
12350
|
+
...f,
|
|
12347
12351
|
display: "inline-flex",
|
|
12348
12352
|
width: { xs: "100%", md: "auto" },
|
|
12349
12353
|
minWidth: 0,
|
|
@@ -12352,9 +12356,9 @@ const Ty = {
|
|
|
12352
12356
|
children: /* @__PURE__ */ i(
|
|
12353
12357
|
$t,
|
|
12354
12358
|
{
|
|
12355
|
-
...
|
|
12356
|
-
source:
|
|
12357
|
-
label:
|
|
12359
|
+
...P,
|
|
12360
|
+
source: b,
|
|
12361
|
+
label: h,
|
|
12358
12362
|
readOnly: m,
|
|
12359
12363
|
disabled: m,
|
|
12360
12364
|
parse: ab,
|
|
@@ -12384,7 +12388,7 @@ const Ty = {
|
|
|
12384
12388
|
{
|
|
12385
12389
|
onClick: /* @__PURE__ */ n((k) => s(k.currentTarget), "onClick"),
|
|
12386
12390
|
disabled: m,
|
|
12387
|
-
"aria-label": `${
|
|
12391
|
+
"aria-label": `${h}: ${t("pos.selection")}`,
|
|
12388
12392
|
"aria-haspopup": "menu",
|
|
12389
12393
|
"aria-expanded": !!a,
|
|
12390
12394
|
size: "small",
|
|
@@ -12433,8 +12437,8 @@ const Ty = {
|
|
|
12433
12437
|
nb,
|
|
12434
12438
|
{
|
|
12435
12439
|
isOpen: o,
|
|
12436
|
-
title: t("pos.selection_of", { label:
|
|
12437
|
-
contentResource:
|
|
12440
|
+
title: t("pos.selection_of", { label: h }),
|
|
12441
|
+
contentResource: x,
|
|
12438
12442
|
content: v.createElement(C, {
|
|
12439
12443
|
panel: {
|
|
12440
12444
|
hasCreate: !1,
|
|
@@ -12452,7 +12456,7 @@ const Ty = {
|
|
|
12452
12456
|
hideViewModeMenu: !0,
|
|
12453
12457
|
hideGridToolbarActions: !0,
|
|
12454
12458
|
onSelectionChange: l,
|
|
12455
|
-
resource:
|
|
12459
|
+
resource: x
|
|
12456
12460
|
},
|
|
12457
12461
|
config: {
|
|
12458
12462
|
actionButtons: !1,
|
|
@@ -12460,8 +12464,8 @@ const Ty = {
|
|
|
12460
12464
|
hasEdit: !1
|
|
12461
12465
|
}
|
|
12462
12466
|
}),
|
|
12463
|
-
onConfirm:
|
|
12464
|
-
onClose:
|
|
12467
|
+
onConfirm: F,
|
|
12468
|
+
onClose: y
|
|
12465
12469
|
}
|
|
12466
12470
|
) : null
|
|
12467
12471
|
] });
|
|
@@ -12742,7 +12746,7 @@ const Ty = {
|
|
|
12742
12746
|
filterOptionKeys: p
|
|
12743
12747
|
} = e, u = de(() => !Array.isArray(p) || p.length === 0 ? Xo : Xo.filter(
|
|
12744
12748
|
($) => p.includes($.key)
|
|
12745
|
-
), [p]), [m,
|
|
12749
|
+
), [p]), [m, h] = te(xb), [f, g] = te([]), [C, x] = te(null), [b, P] = te(!0), [S, y] = te(!1), [F, M] = te(
|
|
12746
12750
|
u.find(($) => $.key === d) || u[0] || Xo[0]
|
|
12747
12751
|
), I = Nt(), k = fn(), _ = Bo(), L = ne(
|
|
12748
12752
|
($) => k.fetchQuery({
|
|
@@ -12759,22 +12763,22 @@ const Ty = {
|
|
|
12759
12763
|
), D = de(
|
|
12760
12764
|
() => ({
|
|
12761
12765
|
...r || {},
|
|
12762
|
-
...
|
|
12766
|
+
...F.getMeta()
|
|
12763
12767
|
}),
|
|
12764
|
-
[r,
|
|
12768
|
+
[r, F]
|
|
12765
12769
|
), E = de(
|
|
12766
12770
|
() => [
|
|
12767
|
-
|
|
12771
|
+
F.key,
|
|
12768
12772
|
JSON.stringify(m),
|
|
12769
12773
|
JSON.stringify(D)
|
|
12770
12774
|
].join("|"),
|
|
12771
|
-
[m,
|
|
12775
|
+
[m, F.key, D]
|
|
12772
12776
|
);
|
|
12773
12777
|
ie(() => {
|
|
12774
12778
|
const $ = u.find(
|
|
12775
12779
|
(J) => J.key === d
|
|
12776
12780
|
) || u[0] || Xo[0];
|
|
12777
|
-
M($),
|
|
12781
|
+
M($), P(!0);
|
|
12778
12782
|
}, [u, d]), ie(() => {
|
|
12779
12783
|
s && s({
|
|
12780
12784
|
filter: m,
|
|
@@ -12797,7 +12801,7 @@ const Ty = {
|
|
|
12797
12801
|
($, J) => {
|
|
12798
12802
|
if (String(J).endsWith("-placeholder"))
|
|
12799
12803
|
return;
|
|
12800
|
-
const fe = Cr(
|
|
12804
|
+
const fe = Cr(f, J), Se = J === Kn.id ? {
|
|
12801
12805
|
fillista: Fa("null", q),
|
|
12802
12806
|
mapId: ["funcod"]
|
|
12803
12807
|
} : {
|
|
@@ -12807,20 +12811,20 @@ const Ty = {
|
|
|
12807
12811
|
),
|
|
12808
12812
|
mapId: ["funcod"]
|
|
12809
12813
|
};
|
|
12810
|
-
|
|
12814
|
+
P(!0), h(Se), c?.({
|
|
12811
12815
|
filter: Se,
|
|
12812
12816
|
meta: D,
|
|
12813
12817
|
selectedNode: fe
|
|
12814
12818
|
});
|
|
12815
12819
|
},
|
|
12816
|
-
[q, D, c,
|
|
12820
|
+
[q, D, c, f]
|
|
12817
12821
|
), G = ne(
|
|
12818
12822
|
($) => {
|
|
12819
|
-
|
|
12823
|
+
P(!1), a && a($);
|
|
12820
12824
|
},
|
|
12821
12825
|
[a]
|
|
12822
12826
|
), Q = /* @__PURE__ */ n(async ($, J, fe) => {
|
|
12823
|
-
const Se = Cr(
|
|
12827
|
+
const Se = Cr(f, J);
|
|
12824
12828
|
if (!(!fe || !Se?.hasItems || Se.children.length > 0))
|
|
12825
12829
|
try {
|
|
12826
12830
|
const Ce = await L(J), De = /* @__PURE__ */ n((me) => me.map((Te) => String(Te.id) === String(J) ? Te.children.length > 0 ? Te : { ...Te, children: Ce } : Te.children.length > 0 ? { ...Te, children: De(Te.children) } : Te), "updateNodeChildren");
|
|
@@ -12879,14 +12883,14 @@ const Ty = {
|
|
|
12879
12883
|
},
|
|
12880
12884
|
J.id
|
|
12881
12885
|
)), "renderTreeItems"), H = /* @__PURE__ */ n(($) => {
|
|
12882
|
-
|
|
12886
|
+
x($.currentTarget);
|
|
12883
12887
|
}, "handleMenuOpen"), Z = /* @__PURE__ */ n(() => {
|
|
12884
|
-
|
|
12888
|
+
x(null);
|
|
12885
12889
|
}, "handleMenuClose"), oe = /* @__PURE__ */ n(($) => {
|
|
12886
|
-
|
|
12890
|
+
P(!0), M($), l?.($), Z();
|
|
12887
12891
|
}, "handleFiltroFuncionarios"), ae = /* @__PURE__ */ n(() => {
|
|
12888
|
-
|
|
12889
|
-
}, "toggleTreePanel"), ee =
|
|
12892
|
+
y(($) => !$);
|
|
12893
|
+
}, "toggleTreePanel"), ee = F.Icon;
|
|
12890
12894
|
return /* @__PURE__ */ R(
|
|
12891
12895
|
Y,
|
|
12892
12896
|
{
|
|
@@ -12961,7 +12965,7 @@ const Ty = {
|
|
|
12961
12965
|
onClick: H,
|
|
12962
12966
|
startIcon: /* @__PURE__ */ i(ee, {}),
|
|
12963
12967
|
endIcon: /* @__PURE__ */ i(bi, {}),
|
|
12964
|
-
children: t(
|
|
12968
|
+
children: t(F.label)
|
|
12965
12969
|
}
|
|
12966
12970
|
),
|
|
12967
12971
|
/* @__PURE__ */ i(
|
|
@@ -12975,7 +12979,7 @@ const Ty = {
|
|
|
12975
12979
|
return /* @__PURE__ */ R(
|
|
12976
12980
|
et,
|
|
12977
12981
|
{
|
|
12978
|
-
selected: $.key ===
|
|
12982
|
+
selected: $.key === F.key,
|
|
12979
12983
|
onClick: /* @__PURE__ */ n(() => oe($), "onClick"),
|
|
12980
12984
|
children: [
|
|
12981
12985
|
/* @__PURE__ */ i(
|
|
@@ -13011,7 +13015,7 @@ const Ty = {
|
|
|
13011
13015
|
fontSize: 18
|
|
13012
13016
|
}
|
|
13013
13017
|
},
|
|
13014
|
-
children: V(
|
|
13018
|
+
children: V(f)
|
|
13015
13019
|
}
|
|
13016
13020
|
)
|
|
13017
13021
|
]
|
|
@@ -13042,7 +13046,7 @@ const Ty = {
|
|
|
13042
13046
|
},
|
|
13043
13047
|
E
|
|
13044
13048
|
),
|
|
13045
|
-
|
|
13049
|
+
b ? /* @__PURE__ */ i(
|
|
13046
13050
|
Y,
|
|
13047
13051
|
{
|
|
13048
13052
|
sx: {
|
|
@@ -13090,13 +13094,13 @@ const Ty = {
|
|
|
13090
13094
|
translateOptions: p = {},
|
|
13091
13095
|
filgrilla: u,
|
|
13092
13096
|
meta: m,
|
|
13093
|
-
onStructureFilterChange:
|
|
13094
|
-
onStatusFilterChange:
|
|
13097
|
+
onStructureFilterChange: h,
|
|
13098
|
+
onStatusFilterChange: f,
|
|
13095
13099
|
initialFilterKey: g,
|
|
13096
13100
|
filterOptionKeys: C,
|
|
13097
|
-
dialogProps:
|
|
13098
|
-
} = e,
|
|
13099
|
-
|
|
13101
|
+
dialogProps: x
|
|
13102
|
+
} = e, b = Nt(), P = he(), [S] = Za({ resource: "form_224" }), [y, F] = te({}), [M, I] = te(null), [k, _] = te(!1), L = ne((q) => {
|
|
13103
|
+
F((D) => {
|
|
13100
13104
|
const E = { ...D };
|
|
13101
13105
|
return q.forEach((O) => {
|
|
13102
13106
|
E[String(O.id)] = O;
|
|
@@ -13106,13 +13110,13 @@ const Ty = {
|
|
|
13106
13110
|
async (q, D) => {
|
|
13107
13111
|
q.stopPropagation(), _(!0);
|
|
13108
13112
|
try {
|
|
13109
|
-
let E = { ...
|
|
13113
|
+
let E = { ...y };
|
|
13110
13114
|
const O = S.filter(
|
|
13111
13115
|
(T) => !E[String(T)]
|
|
13112
13116
|
);
|
|
13113
13117
|
if (O.length > 0 && M)
|
|
13114
13118
|
try {
|
|
13115
|
-
((await
|
|
13119
|
+
((await b.getList(
|
|
13116
13120
|
"form_224",
|
|
13117
13121
|
{
|
|
13118
13122
|
pagination: {
|
|
@@ -13147,7 +13151,7 @@ const Ty = {
|
|
|
13147
13151
|
_(!1);
|
|
13148
13152
|
}
|
|
13149
13153
|
},
|
|
13150
|
-
[
|
|
13154
|
+
[b, M, d, y, S]
|
|
13151
13155
|
), j = ne((q) => {
|
|
13152
13156
|
q.stopPropagation();
|
|
13153
13157
|
}, []);
|
|
@@ -13161,9 +13165,9 @@ const Ty = {
|
|
|
13161
13165
|
maxWidth: "lg",
|
|
13162
13166
|
PaperComponent: Cb,
|
|
13163
13167
|
"aria-labelledby": "draggable-dialog-title",
|
|
13164
|
-
...
|
|
13168
|
+
...x,
|
|
13165
13169
|
children: [
|
|
13166
|
-
/* @__PURE__ */ i(hi, { style: wb, id: "draggable-dialog-title", children:
|
|
13170
|
+
/* @__PURE__ */ i(hi, { style: wb, id: "draggable-dialog-title", children: P(r, { _: r, ...p }) }),
|
|
13167
13171
|
/* @__PURE__ */ i(fi, { dividers: !0, children: /* @__PURE__ */ i(
|
|
13168
13172
|
yb,
|
|
13169
13173
|
{
|
|
@@ -13171,8 +13175,8 @@ const Ty = {
|
|
|
13171
13175
|
meta: m,
|
|
13172
13176
|
onRecordsLoaded: L,
|
|
13173
13177
|
onListParamsChange: I,
|
|
13174
|
-
onStructureFilterChange:
|
|
13175
|
-
onStatusFilterChange:
|
|
13178
|
+
onStructureFilterChange: h,
|
|
13179
|
+
onStatusFilterChange: f,
|
|
13176
13180
|
initialFilterKey: g,
|
|
13177
13181
|
filterOptionKeys: C
|
|
13178
13182
|
}
|
|
@@ -13180,7 +13184,7 @@ const Ty = {
|
|
|
13180
13184
|
/* @__PURE__ */ R(mi, { children: [
|
|
13181
13185
|
/* @__PURE__ */ R(yt, { disabled: o || k, onClick: l, children: [
|
|
13182
13186
|
/* @__PURE__ */ i(c, { sx: { paddingRight: "0.5em" } }),
|
|
13183
|
-
|
|
13187
|
+
P(a, { _: a })
|
|
13184
13188
|
] }),
|
|
13185
13189
|
/* @__PURE__ */ R(
|
|
13186
13190
|
yt,
|
|
@@ -13190,7 +13194,7 @@ const Ty = {
|
|
|
13190
13194
|
autoFocus: !0,
|
|
13191
13195
|
children: [
|
|
13192
13196
|
/* @__PURE__ */ i(s, { sx: { paddingRight: "0.5em" } }),
|
|
13193
|
-
|
|
13197
|
+
P("ra.action.confirm")
|
|
13194
13198
|
]
|
|
13195
13199
|
}
|
|
13196
13200
|
)
|
|
@@ -13224,11 +13228,11 @@ const Ty = {
|
|
|
13224
13228
|
egresadosdosmeses: "E",
|
|
13225
13229
|
todos: "T"
|
|
13226
13230
|
}, Ey = /* @__PURE__ */ n((e) => {
|
|
13227
|
-
const { source: t, onChange: o, fullWidth: r = !1 } = e, [a, s] = te(!1), [c, l] = te(null), [d, p] = te(""), u = gn(), m = Nt(),
|
|
13231
|
+
const { source: t, onChange: o, fullWidth: r = !1 } = e, [a, s] = te(!1), [c, l] = te(null), [d, p] = te(""), u = gn(), m = Nt(), h = fn(), f = Bo(), g = he(), C = Ge(), { estado: x, fichaProps: b = {} } = Re(), P = _e(!1), {
|
|
13228
13232
|
hidden: S,
|
|
13229
13233
|
propsContenido: {
|
|
13230
|
-
readOnly:
|
|
13231
|
-
sx:
|
|
13234
|
+
readOnly: y,
|
|
13235
|
+
sx: F,
|
|
13232
13236
|
label: M = g("pos.employees"),
|
|
13233
13237
|
allowNone: I = !0,
|
|
13234
13238
|
allowAll: k = !0,
|
|
@@ -13259,7 +13263,7 @@ const Ty = {
|
|
|
13259
13263
|
name: t,
|
|
13260
13264
|
control: C.control,
|
|
13261
13265
|
rules: T
|
|
13262
|
-
}), { [t]: Z = {} } =
|
|
13266
|
+
}), { [t]: Z = {} } = b, oe = St(e), ae = Z.onChange === void 0 ? o : Z.onChange, ee = _ !== !1 && q !== !1, [$, J] = te(
|
|
13263
13267
|
mo(q)
|
|
13264
13268
|
), fe = de(
|
|
13265
13269
|
() => er.find((N) => N.value === $) || er[0],
|
|
@@ -13268,7 +13272,7 @@ const Ty = {
|
|
|
13268
13272
|
ie(() => {
|
|
13269
13273
|
J(mo(q));
|
|
13270
13274
|
}, [q]), ie(() => {
|
|
13271
|
-
|
|
13275
|
+
P.current || (setTimeout(() => {
|
|
13272
13276
|
const N = C.getValues(t);
|
|
13273
13277
|
if (ee ? Ma(N) : N == null || N === "") {
|
|
13274
13278
|
const B = qc({
|
|
@@ -13279,7 +13283,7 @@ const Ty = {
|
|
|
13279
13283
|
k === !1 ? { ...B, all: !1, none: !0 } : B
|
|
13280
13284
|
);
|
|
13281
13285
|
}
|
|
13282
|
-
}, 0),
|
|
13286
|
+
}, 0), P.current = !0);
|
|
13283
13287
|
}, [k, C, q, t, ee]);
|
|
13284
13288
|
const Se = ne(
|
|
13285
13289
|
(N) => {
|
|
@@ -13323,7 +13327,7 @@ const Ty = {
|
|
|
13323
13327
|
return (/* @__PURE__ */ n(async () => {
|
|
13324
13328
|
const $e = await Promise.all(
|
|
13325
13329
|
B.slice(0, 12).map(
|
|
13326
|
-
(Tt) => ub(m, Tt,
|
|
13330
|
+
(Tt) => ub(m, Tt, h)
|
|
13327
13331
|
)
|
|
13328
13332
|
);
|
|
13329
13333
|
z && He(
|
|
@@ -13335,12 +13339,12 @@ const Ty = {
|
|
|
13335
13339
|
}, "loadTooltip"))(), () => {
|
|
13336
13340
|
z = !1;
|
|
13337
13341
|
};
|
|
13338
|
-
}, [$, m, Ce,
|
|
13342
|
+
}, [$, m, Ce, h]);
|
|
13339
13343
|
const Ue = ne(
|
|
13340
13344
|
(N) => {
|
|
13341
|
-
ae && ae(oe,
|
|
13345
|
+
ae && ae(oe, x, N);
|
|
13342
13346
|
},
|
|
13343
|
-
[
|
|
13347
|
+
[x, ae, oe]
|
|
13344
13348
|
), X = ne(
|
|
13345
13349
|
(N) => {
|
|
13346
13350
|
const B = Un(C.getValues(t), {
|
|
@@ -13434,7 +13438,7 @@ const Ty = {
|
|
|
13434
13438
|
if (!L || B === "")
|
|
13435
13439
|
return;
|
|
13436
13440
|
let z = !1;
|
|
13437
|
-
W && (W(oe,
|
|
13441
|
+
W && (W(oe, x, N), z = !0);
|
|
13438
13442
|
let Ne = null;
|
|
13439
13443
|
try {
|
|
13440
13444
|
Ne = await db(
|
|
@@ -13446,12 +13450,12 @@ const Ty = {
|
|
|
13446
13450
|
Ne = null;
|
|
13447
13451
|
}
|
|
13448
13452
|
if (!Ne) {
|
|
13449
|
-
p(""),
|
|
13453
|
+
p(""), f(`El funcionario '${B}' no existe`, {
|
|
13450
13454
|
type: "error"
|
|
13451
|
-
}), z && j?.(oe,
|
|
13455
|
+
}), z && j?.(oe, x, N);
|
|
13452
13456
|
return;
|
|
13453
13457
|
}
|
|
13454
|
-
z && (j?.(oe,
|
|
13458
|
+
z && (j?.(oe, x, N), z = !1), re(N, {
|
|
13455
13459
|
seleccion: String(Ne.funcod || "").trim(),
|
|
13456
13460
|
all: !1,
|
|
13457
13461
|
none: !1
|
|
@@ -13461,9 +13465,9 @@ const Ty = {
|
|
|
13461
13465
|
L,
|
|
13462
13466
|
$,
|
|
13463
13467
|
m,
|
|
13464
|
-
|
|
13468
|
+
x,
|
|
13465
13469
|
d,
|
|
13466
|
-
|
|
13470
|
+
f,
|
|
13467
13471
|
j,
|
|
13468
13472
|
W,
|
|
13469
13473
|
re,
|
|
@@ -13479,7 +13483,7 @@ const Ty = {
|
|
|
13479
13483
|
display: "flex",
|
|
13480
13484
|
alignItems: "center",
|
|
13481
13485
|
sx: {
|
|
13482
|
-
...
|
|
13486
|
+
...F,
|
|
13483
13487
|
display: "inline-flex",
|
|
13484
13488
|
width: r ? "100%" : { xs: "100%", md: "auto" }
|
|
13485
13489
|
},
|
|
@@ -13509,7 +13513,7 @@ const Ty = {
|
|
|
13509
13513
|
}, "onKeyDown"),
|
|
13510
13514
|
error: !!H.error,
|
|
13511
13515
|
helperText: H.error?.message || "",
|
|
13512
|
-
disabled:
|
|
13516
|
+
disabled: y,
|
|
13513
13517
|
inputProps: {
|
|
13514
13518
|
// La selección se valida en RHF; este input sólo busca números.
|
|
13515
13519
|
required: !1,
|
|
@@ -13610,7 +13614,7 @@ const Ty = {
|
|
|
13610
13614
|
}
|
|
13611
13615
|
),
|
|
13612
13616
|
onClick: ot ? at : void 0,
|
|
13613
|
-
disabled:
|
|
13617
|
+
disabled: y,
|
|
13614
13618
|
"aria-label": `${M}: ${De}`,
|
|
13615
13619
|
"aria-haspopup": ot ? "menu" : void 0,
|
|
13616
13620
|
"aria-expanded": ot ? !!c : void 0,
|
|
@@ -13640,7 +13644,7 @@ const Ty = {
|
|
|
13640
13644
|
onClick: /* @__PURE__ */ n(() => {
|
|
13641
13645
|
u?.enabled || s(!0);
|
|
13642
13646
|
}, "onClick"),
|
|
13643
|
-
disabled:
|
|
13647
|
+
disabled: y,
|
|
13644
13648
|
"aria-label": g("pos.selection"),
|
|
13645
13649
|
size: "small",
|
|
13646
13650
|
title: g("pos.selection"),
|