biblio-react 3.0.0-alpha193 → 3.0.0-alpha194

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 CHANGED
@@ -33488,54 +33488,58 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33488
33488
  )
33489
33489
  }
33490
33490
  ), "AsistenteList"), qH = { fillista: "empcod=-1", mapId: ["funnro"] }, GH = /* @__PURE__ */ a((e) => {
33491
- const [t, r] = Be(qH), [n, o] = Be([]), i = Ja();
33491
+ const { filgrilla: t = {} } = e, [r, n] = Be(qH), [o, i] = Be([]), s = Ja();
33492
33492
  Ge(() => {
33493
33493
  (/* @__PURE__ */ a(async () => {
33494
- const f = await l("");
33495
- o(f);
33494
+ const h = await u("");
33495
+ i(h);
33496
33496
  }, "loadInitialData"))();
33497
33497
  }, []);
33498
- const s = et(
33499
- (p, f) => {
33500
- r({ fillista: f, mapId: ["funnro"] });
33498
+ const l = et(
33499
+ (f, h) => {
33500
+ n({
33501
+ fillista: h,
33502
+ mapId: ["funnro"],
33503
+ ...t
33504
+ });
33501
33505
  },
33502
- [r]
33503
- ), l = /* @__PURE__ */ a(async (p) => {
33506
+ [n]
33507
+ ), u = /* @__PURE__ */ a(async (f) => {
33504
33508
  try {
33505
- return (await i.getChildNodes("form_224", {
33506
- parentId: p
33507
- })).data.map((h) => ({
33508
- ...h,
33509
- children: h.children || [],
33510
- hasItems: h.hasItems
33509
+ return (await s.getChildNodes("form_224", {
33510
+ parentId: f
33511
+ })).data.map((g) => ({
33512
+ ...g,
33513
+ children: g.children || [],
33514
+ hasItems: g.hasItems
33511
33515
  // Asegúrate de que este atributo esté presente
33512
33516
  }));
33513
33517
  } catch {
33514
33518
  throw new Error("Data Loading Error");
33515
33519
  }
33516
- }, "fetchData"), u = /* @__PURE__ */ a(async (p, f) => {
33517
- const h = /* @__PURE__ */ a(async (m) => Promise.all(
33518
- m.map(async (b) => {
33519
- if (b.id === f && b.children.length === 0 && b.hasItems) {
33520
- const y = await l(f);
33521
- return { ...b, children: y };
33522
- } else if (b.children.length > 0)
33520
+ }, "fetchData"), d = /* @__PURE__ */ a(async (f, h) => {
33521
+ const g = /* @__PURE__ */ a(async (b) => Promise.all(
33522
+ b.map(async (y) => {
33523
+ if (y.id === h && y.children.length === 0 && y.hasItems) {
33524
+ const x = await u(h);
33525
+ return { ...y, children: x };
33526
+ } else if (y.children.length > 0)
33523
33527
  return {
33524
- ...b,
33525
- children: await h(b.children)
33528
+ ...y,
33529
+ children: await g(y.children)
33526
33530
  };
33527
- return b;
33531
+ return y;
33528
33532
  })
33529
- ), "updateNodeChildren"), g = await h(n);
33530
- o(g);
33531
- }, "handleItemExpansionToggle"), d = /* @__PURE__ */ a((p) => p.map((f) => /* @__PURE__ */ v(Tv, { itemId: f.id, label: f.text, children: f.children.length > 0 ? d(f.children) : f.hasItems ? /* @__PURE__ */ v(
33533
+ ), "updateNodeChildren"), m = await g(o);
33534
+ i(m);
33535
+ }, "handleItemExpansionToggle"), p = /* @__PURE__ */ a((f) => f.map((h) => /* @__PURE__ */ v(Tv, { itemId: h.id, label: h.text, children: h.children.length > 0 ? p(h.children) : h.hasItems ? /* @__PURE__ */ v(
33532
33536
  Tv,
33533
33537
  {
33534
- itemId: `${f.id}-placeholder`,
33538
+ itemId: `${h.id}-placeholder`,
33535
33539
  label: "Cargando..."
33536
33540
  },
33537
- `${f.id}-placeholder`
33538
- ) : null }, f.id)), "renderTreeItems");
33541
+ `${h.id}-placeholder`
33542
+ ) : null }, h.id)), "renderTreeItems");
33539
33543
  return /* @__PURE__ */ W(
33540
33544
  st,
33541
33545
  {
@@ -33560,10 +33564,10 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33560
33564
  vM,
33561
33565
  {
33562
33566
  id: "funcionarios-treeview",
33563
- onItemExpansionToggle: u,
33564
- onItemSelectionToggle: s,
33565
- getItemId: /* @__PURE__ */ a((p) => p.id, "getItemId"),
33566
- children: d(n)
33567
+ onItemExpansionToggle: d,
33568
+ onItemSelectionToggle: l,
33569
+ getItemId: /* @__PURE__ */ a((f) => f.id, "getItemId"),
33570
+ children: p(o)
33567
33571
  }
33568
33572
  )
33569
33573
  }
@@ -33578,7 +33582,7 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33578
33582
  height: { md: "70vh" },
33579
33583
  width: { xs: "100%", md: "auto" }
33580
33584
  },
33581
- children: /* @__PURE__ */ v(UH, { resource: "form_224", filter: t })
33585
+ children: /* @__PURE__ */ v(UH, { resource: "form_224", filter: r })
33582
33586
  }
33583
33587
  )
33584
33588
  ]
@@ -33601,42 +33605,43 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33601
33605
  CancelIcon: s = xb,
33602
33606
  onClose: l,
33603
33607
  onConfirm: u,
33604
- translateOptions: d = {}
33605
- } = e, p = Lt(), f = et(
33606
- (g, m) => {
33607
- g.stopPropagation(), u(g, m);
33608
+ translateOptions: d = {},
33609
+ filgrilla: p
33610
+ } = e, f = Lt(), h = et(
33611
+ (m, b) => {
33612
+ m.stopPropagation(), u(m, b);
33608
33613
  },
33609
33614
  [u]
33610
- ), h = et((g) => {
33611
- g.stopPropagation();
33615
+ ), g = et((m) => {
33616
+ m.stopPropagation();
33612
33617
  }, []);
33613
33618
  return /* @__PURE__ */ W(
33614
33619
  Hl,
33615
33620
  {
33616
33621
  open: t,
33617
33622
  onClose: l,
33618
- onClick: h,
33623
+ onClick: g,
33619
33624
  fullWidth: !0,
33620
33625
  maxWidth: "lg",
33621
33626
  PaperComponent: KH,
33622
33627
  "aria-labelledby": "draggable-dialog-title",
33623
33628
  children: [
33624
- /* @__PURE__ */ v(ql, { style: JH, id: "draggable-dialog-title", children: p(n, { _: n, ...d }) }),
33625
- /* @__PURE__ */ v(Ul, { dividers: !0, children: /* @__PURE__ */ v(GH, {}) }),
33629
+ /* @__PURE__ */ v(ql, { style: JH, id: "draggable-dialog-title", children: f(n, { _: n, ...d }) }),
33630
+ /* @__PURE__ */ v(Ul, { dividers: !0, children: /* @__PURE__ */ v(GH, { filgrilla: p }) }),
33626
33631
  /* @__PURE__ */ W(Wl, { children: [
33627
33632
  /* @__PURE__ */ W(Tn, { disabled: r, onClick: l, children: [
33628
33633
  /* @__PURE__ */ v(s, { sx: { paddingRight: "0.5em" } }),
33629
- p(o, { _: o })
33634
+ f(o, { _: o })
33630
33635
  ] }),
33631
33636
  /* @__PURE__ */ W(
33632
33637
  Tn,
33633
33638
  {
33634
33639
  disabled: r,
33635
- onClick: /* @__PURE__ */ a((g) => f(g, "yes"), "onClick"),
33640
+ onClick: /* @__PURE__ */ a((m) => h(m, "yes"), "onClick"),
33636
33641
  autoFocus: !0,
33637
33642
  children: [
33638
33643
  /* @__PURE__ */ v(i, { sx: { paddingRight: "0.5em" } }),
33639
- p("ra.action.confirm")
33644
+ f("ra.action.confirm")
33640
33645
  ]
33641
33646
  }
33642
33647
  )
@@ -33657,34 +33662,35 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33657
33662
  label: g = "Funcionarios",
33658
33663
  allowNone: m = !0,
33659
33664
  allowAll: b = !0,
33660
- ...y
33665
+ filgrilla: y,
33666
+ ...x
33661
33667
  }
33662
- } = xr(e), { [t]: x = {} } = u, k = cn(e), T = x.onChange === void 0 ? r : x.onChange;
33668
+ } = xr(e), { [t]: k = {} } = u, T = cn(e), C = k.onChange === void 0 ? r : k.onChange;
33663
33669
  Ge(() => {
33664
33670
  d.current || (setTimeout(() => {
33665
33671
  s.setValue(t, QH);
33666
33672
  }, 0), d.current = !0);
33667
33673
  }, [s, t]);
33668
- const C = et(() => {
33674
+ const S = et(() => {
33669
33675
  i(!1);
33670
- }, [i]), S = /* @__PURE__ */ a((F, $) => {
33676
+ }, [i]), w = /* @__PURE__ */ a(($, A) => {
33671
33677
  i(!1), s.setValue(t, {
33672
33678
  seleccion: n.join(",").replaceAll("funnro=", ""),
33673
33679
  all: !1,
33674
33680
  none: !1
33675
- }), T && T(k, l, F);
33676
- }, "handleConfirm"), w = /* @__PURE__ */ a((F) => {
33681
+ }), C && C(T, l, $);
33682
+ }, "handleConfirm"), P = /* @__PURE__ */ a(($) => {
33677
33683
  s.setValue(t, {
33678
33684
  seleccion: "",
33679
33685
  all: !1,
33680
33686
  none: !0
33681
- }), T && T(k, l, F);
33682
- }, "handleNinguno"), P = /* @__PURE__ */ a((F) => {
33687
+ }), C && C(T, l, $);
33688
+ }, "handleNinguno"), F = /* @__PURE__ */ a(($) => {
33683
33689
  s.setValue(t, {
33684
33690
  seleccion: "",
33685
33691
  all: !0,
33686
33692
  none: !1
33687
- }), T && T(k, l, F);
33693
+ }), C && C(T, l, $);
33688
33694
  }, "handleTodos");
33689
33695
  return p ? null : /* @__PURE__ */ W(Ur, { children: [
33690
33696
  /* @__PURE__ */ v(
@@ -33700,7 +33706,7 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33700
33706
  children: /* @__PURE__ */ v(
33701
33707
  En,
33702
33708
  {
33703
- ...y,
33709
+ ...x,
33704
33710
  source: t,
33705
33711
  label: g,
33706
33712
  readOnly: !0,
@@ -33712,7 +33718,7 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33712
33718
  m && /* @__PURE__ */ v(
33713
33719
  jr,
33714
33720
  {
33715
- onClick: w,
33721
+ onClick: P,
33716
33722
  disabled: f,
33717
33723
  "aria-label": "Ninguno",
33718
33724
  size: "small",
@@ -33723,7 +33729,7 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33723
33729
  b && /* @__PURE__ */ v(
33724
33730
  jr,
33725
33731
  {
33726
- onClick: P,
33732
+ onClick: F,
33727
33733
  disabled: f,
33728
33734
  "aria-label": "Todos",
33729
33735
  size: "small",
@@ -33734,7 +33740,7 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33734
33740
  /* @__PURE__ */ v(
33735
33741
  jr,
33736
33742
  {
33737
- onClick: /* @__PURE__ */ a((F) => i(!0), "onClick"),
33743
+ onClick: /* @__PURE__ */ a(($) => i(!0), "onClick"),
33738
33744
  disabled: f,
33739
33745
  "aria-label": "Selección",
33740
33746
  size: "small",
@@ -33753,8 +33759,9 @@ const _H = /* @__PURE__ */ a((e) => /* @__PURE__ */ v(
33753
33759
  {
33754
33760
  isOpen: o,
33755
33761
  title: `Selección de ${g}`,
33756
- onConfirm: S,
33757
- onClose: C
33762
+ onConfirm: w,
33763
+ onClose: S,
33764
+ filgrilla: y
33758
33765
  }
33759
33766
  )
33760
33767
  ] });