@applica-software-guru/react-admin 1.5.256 → 1.5.257

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.
@@ -6492,7 +6492,7 @@ process.env.NODE_ENV !== "production" && (J2.propTypes = {
6492
6492
  styles: x.oneOfType([x.array, x.string, x.object, x.func])
6493
6493
  });
6494
6494
  /**
6495
- * @mui/styled-engine v5.16.4
6495
+ * @mui/styled-engine v5.16.6
6496
6496
  *
6497
6497
  * @license MIT
6498
6498
  * This source code is licensed under the MIT license found in the
@@ -23633,42 +23633,43 @@ function kne({
23633
23633
  disabled: n,
23634
23634
  showUser: r = !1,
23635
23635
  userResource: o = "entities/user",
23636
- ...a
23636
+ rootEntity: a = void 0,
23637
+ ...s
23637
23638
  }) {
23638
- const [s, c] = Be(null), u = sn(a), d = Bm(), p = ko(), h = Ae(
23639
- async (b) => {
23640
- b.preventDefault(), b.stopPropagation();
23641
- const C = yt.get(u, a == null ? void 0 : a.source), w = p.replace("entities/", ""), I = await d.getFile(
23642
- `/attachments/${w}/${e || (u == null ? void 0 : u.id)}/${t || (a == null ? void 0 : a.source)}/${(C == null ? void 0 : C.id) || (u == null ? void 0 : u.id)}`
23643
- ), M = document.createElement("a");
23644
- M.href = I, M.download = yt.get(u, (a == null ? void 0 : a.title) || (a == null ? void 0 : a.source)), M.click();
23639
+ const [c, u] = Be(null), d = sn(s), p = Bm(), h = ko(), g = Ae(
23640
+ async (C) => {
23641
+ C.preventDefault(), C.stopPropagation();
23642
+ const w = yt.get(d, s == null ? void 0 : s.source), I = a || h.replace("entities/", ""), M = await p.getFile(
23643
+ `/attachments/${I}/${e || (d == null ? void 0 : d.id)}/${t || (s == null ? void 0 : s.source)}/${(w == null ? void 0 : w.id) || (d == null ? void 0 : d.id)}`
23644
+ ), S = document.createElement("a");
23645
+ S.href = M, S.download = yt.get(d, (s == null ? void 0 : s.title) || (s == null ? void 0 : s.source)), S.click();
23645
23646
  },
23646
- [d, u, e, p, t, a == null ? void 0 : a.source, a == null ? void 0 : a.title]
23647
- ), g = Ue(
23647
+ [p, d, e, h, a, t, s == null ? void 0 : s.source, s == null ? void 0 : s.title]
23648
+ ), v = Ue(
23648
23649
  () => ({
23649
- ...u,
23650
- [a == null ? void 0 : a.source]: (u == null ? void 0 : u.src) || yt.get(u, a == null ? void 0 : a.source),
23651
- [a == null ? void 0 : a.title]: (u == null ? void 0 : u.title) || yt.get(u, (a == null ? void 0 : a.title) || (a == null ? void 0 : a.source))
23650
+ ...d,
23651
+ [s == null ? void 0 : s.source]: (d == null ? void 0 : d.src) || yt.get(d, s == null ? void 0 : s.source),
23652
+ [s == null ? void 0 : s.title]: (d == null ? void 0 : d.title) || yt.get(d, (s == null ? void 0 : s.title) || (s == null ? void 0 : s.source))
23652
23653
  }),
23653
- [u, a == null ? void 0 : a.source, a == null ? void 0 : a.title]
23654
- ), v = Ro();
23654
+ [d, s == null ? void 0 : s.source, s == null ? void 0 : s.title]
23655
+ ), b = Ro();
23655
23656
  return Pe(() => {
23656
- !u || !(u != null && u.userId) || r === !1 || d.getOne(o, { id: u == null ? void 0 : u.userId }).then(({ data: b }) => c(b)).catch(() => c(null));
23657
- }, [u, d, o, r]), /* @__PURE__ */ m(
23657
+ !d || !(d != null && d.userId) || r === !1 || p.getOne(o, { id: d == null ? void 0 : d.userId }).then(({ data: C }) => u(C)).catch(() => u(null));
23658
+ }, [d, p, o, r]), /* @__PURE__ */ m(
23658
23659
  Rne,
23659
23660
  {
23660
- ...a,
23661
+ ...s,
23661
23662
  disabled: n,
23662
- record: g,
23663
- onClick: h,
23663
+ record: v,
23664
+ onClick: g,
23664
23665
  title: /* @__PURE__ */ J(Le, { sx: { cursor: "pointer" }, children: [
23665
- /* @__PURE__ */ m(he, { variant: "subtitle1", children: yt.get(g, (a == null ? void 0 : a.title) || (a == null ? void 0 : a.source)) }),
23666
+ /* @__PURE__ */ m(he, { variant: "subtitle1", children: yt.get(v, (s == null ? void 0 : s.title) || (s == null ? void 0 : s.source)) }),
23666
23667
  /* @__PURE__ */ J(he, { variant: "caption", color: "secondary", children: [
23667
- yt.get(g, "sizeDescription"),
23668
- r && s ? " | " : null,
23669
- r && s ? v("ra.attachment.info", {
23670
- user: s == null ? void 0 : s.name,
23671
- created: ro(g == null ? void 0 : g.createdAt).format("DD/MM/YYYY HH:mm")
23668
+ yt.get(v, "sizeDescription"),
23669
+ r && c ? " | " : null,
23670
+ r && c ? b("ra.attachment.info", {
23671
+ user: c == null ? void 0 : c.name,
23672
+ created: ro(v == null ? void 0 : v.createdAt).format("DD/MM/YYYY HH:mm")
23672
23673
  }) : null
23673
23674
  ] })
23674
23675
  ] })