biblio-react 3.0.0-alpha193 → 3.0.0-alpha195

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