biblio-react 3.0.0-alpha194 → 3.0.0-alpha196

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