@applica-software-guru/react-admin 1.5.341 → 1.5.343

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.
@@ -13964,26 +13964,36 @@ const hG = { width: "100%", justifyContent: "flex-start" }, gG = oi("div", {
13964
13964
  }
13965
13965
  }
13966
13966
  }));
13967
- function Sa({ horizontal: e = !1, children: t }) {
13968
- const [n, r] = Re(null), o = we.useRef(null);
13969
- function i(u) {
13970
- u.stopPropagation(), u.preventDefault(), r(u.currentTarget), o.current = u.currentTarget;
13967
+ function Sa({ horizontal: e = !1, disabled: t = !1, children: n }) {
13968
+ const [r, o] = Re(null), i = we.useRef(null);
13969
+ function a(d) {
13970
+ d.stopPropagation(), d.preventDefault(), o(d.currentTarget), i.current = d.currentTarget;
13971
13971
  }
13972
- const a = me((u) => {
13973
- u.stopPropagation(), u.preventDefault(), r(null);
13974
- }, []), l = me((u) => {
13975
- var d;
13976
- r(null), typeof ((d = u.currentTarget) == null ? void 0 : d.onClick) == "function" && u.currentTarget.onClick(u);
13972
+ const l = me((d) => {
13973
+ d.stopPropagation(), d.preventDefault(), o(null);
13974
+ }, []), u = me((d) => {
13975
+ var f;
13976
+ o(null), typeof ((f = d.currentTarget) == null ? void 0 : f.onClick) == "function" && d.currentTarget.onClick(d);
13977
13977
  }, []);
13978
- return !t || we.Children.count(t) === 0 || // @ts-ignore
13979
- t != null && t.filter && (t == null ? void 0 : t.filter((u) => we.isValidElement(u)).length) === 0 ? null : /* @__PURE__ */ ee(gG, { children: [
13980
- /* @__PURE__ */ y(nc, { "aria-label": "more", "aria-haspopup": "true", onClick: i, color: n ? "inherit" : "default", children: e ? /* @__PURE__ */ y(XM, {}) : /* @__PURE__ */ y(ZM, {}) }),
13981
- /* @__PURE__ */ y(mG, { open: n, onClose: a, arrow: "right-top", children: Yt.map(
13982
- t,
13983
- (u, d) => we.isValidElement(u) && /* @__PURE__ */ y(Cm, { onClick: l, children: we.cloneElement(u, {
13978
+ return !n || we.Children.count(n) === 0 || // @ts-ignore
13979
+ n != null && n.filter && (n == null ? void 0 : n.filter((d) => we.isValidElement(d)).length) === 0 ? null : /* @__PURE__ */ ee(gG, { children: [
13980
+ /* @__PURE__ */ y(
13981
+ nc,
13982
+ {
13983
+ "aria-label": "more",
13984
+ "aria-haspopup": "true",
13985
+ onClick: a,
13986
+ color: r ? "inherit" : "default",
13987
+ disabled: t,
13988
+ children: e ? /* @__PURE__ */ y(XM, {}) : /* @__PURE__ */ y(ZM, {})
13989
+ }
13990
+ ),
13991
+ /* @__PURE__ */ y(mG, { open: r, onClose: l, arrow: "right-top", children: Yt.map(
13992
+ n,
13993
+ (d, f) => we.isValidElement(d) && /* @__PURE__ */ y(Cm, { onClick: u, children: we.cloneElement(d, {
13984
13994
  // @ts-ignore
13985
13995
  style: { ...hG }
13986
- }) }, d)
13996
+ }) }, f)
13987
13997
  ) })
13988
13998
  ] });
13989
13999
  }
@@ -30855,24 +30865,28 @@ function ile({ setLoading: e }) {
30855
30865
  }
30856
30866
  return /* @__PURE__ */ y(Ae, { sx: { colorScheme: n ? "light" : "dark", width: "100%" }, ref: u, children: /* @__PURE__ */ y(ole, { theme: "outline", width: a, onSuccess: d, onError: f }) });
30857
30867
  }
30858
- function $ge({ label: e = "ra.auth.sign_in", ...t }) {
30859
- const n = mn(), [r, o] = Re(!1), i = z_(), a = me(
30860
- (l) => {
30861
- l.stopPropagation(), l.preventDefault(), o(!0), i.impersonate(n == null ? void 0 : n.id).then(() => {
30862
- o(!1), document.location.href = "/";
30868
+ function $ge({
30869
+ label: e = "ra.auth.sign_in",
30870
+ redirect: t = "/",
30871
+ ...n
30872
+ }) {
30873
+ const r = mn(), [o, i] = Re(!1), a = z_(), l = me(
30874
+ (u) => {
30875
+ u.stopPropagation(), u.preventDefault(), i(!0), a.impersonate(r == null ? void 0 : r.id).then(() => {
30876
+ i(!1), document.location.href = t;
30863
30877
  });
30864
30878
  },
30865
- [i, n == null ? void 0 : n.id]
30879
+ [a, r == null ? void 0 : r.id, t]
30866
30880
  );
30867
30881
  return /* @__PURE__ */ y(
30868
30882
  zs,
30869
30883
  {
30870
- disabled: r || i.impersonate === void 0,
30884
+ disabled: o || a.impersonate === void 0,
30871
30885
  color: "primary",
30872
30886
  variant: "text",
30873
30887
  label: e,
30874
- onClick: a,
30875
- ...t,
30888
+ onClick: l,
30889
+ ...n,
30876
30890
  children: /* @__PURE__ */ y(JM, {})
30877
30891
  }
30878
30892
  );
Binary file