@applica-software-guru/react-admin 1.1.100 → 1.1.102

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.
Files changed (32) hide show
  1. package/dist/components/AuthWrapper.d.ts +3 -1
  2. package/dist/components/AuthWrapper.d.ts.map +1 -1
  3. package/dist/components/ra-forms/Create.d.ts.map +1 -1
  4. package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
  5. package/dist/components/ra-forms/Toolbar.d.ts.map +1 -1
  6. package/dist/components/ra-pages/ActivatePage.d.ts +1 -1
  7. package/dist/components/ra-pages/ActivatePage.d.ts.map +1 -1
  8. package/dist/components/ra-pages/LoginPage.d.ts +1 -1
  9. package/dist/components/ra-pages/LoginPage.d.ts.map +1 -1
  10. package/dist/components/ra-pages/RecoverPage.d.ts +1 -1
  11. package/dist/components/ra-pages/RecoverPage.d.ts.map +1 -1
  12. package/dist/components/ra-pages/RegisterPage.d.ts +1 -1
  13. package/dist/components/ra-pages/RegisterPage.d.ts.map +1 -1
  14. package/dist/components/ra-pages/types.d.ts +4 -0
  15. package/dist/components/ra-pages/types.d.ts.map +1 -1
  16. package/dist/react-admin.cjs.js +10 -10
  17. package/dist/react-admin.cjs.js.map +1 -1
  18. package/dist/react-admin.es.js +72 -68
  19. package/dist/react-admin.es.js.map +1 -1
  20. package/dist/react-admin.umd.js +2 -2
  21. package/dist/react-admin.umd.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/components/AuthWrapper.jsx +4 -3
  24. package/src/components/ra-fields/ReferenceManyField.jsx +1 -1
  25. package/src/components/ra-forms/Create.tsx +0 -3
  26. package/src/components/ra-forms/SimpleForm.tsx +8 -2
  27. package/src/components/ra-forms/Toolbar.jsx +1 -0
  28. package/src/components/ra-pages/ActivatePage.tsx +2 -2
  29. package/src/components/ra-pages/LoginPage.tsx +2 -2
  30. package/src/components/ra-pages/RecoverPage.tsx +2 -2
  31. package/src/components/ra-pages/RegisterPage.tsx +2 -2
  32. package/src/components/ra-pages/types.ts +4 -0
@@ -15985,7 +15985,13 @@ const S9 = ha(nI, {
15985
15985
  title: u,
15986
15986
  subheader: r,
15987
15987
  secondary: A != null && A.id ? i : null,
15988
- sx: s,
15988
+ sx: {
15989
+ ...s,
15990
+ "& .MuiToolbar-root": {
15991
+ paddingLeft: "20px !important",
15992
+ paddingRight: "20px !important"
15993
+ }
15994
+ },
15989
15995
  border: !t,
15990
15996
  divider: !0,
15991
15997
  children: /* @__PURE__ */ C(S9, { toolbar: /* @__PURE__ */ C(Mo, {}), ...l })
@@ -16736,7 +16742,7 @@ const H9 = ha("div", {
16736
16742
  marginTop: `-${e.spacing(2)}`,
16737
16743
  marginBottom: e.spacing(t ? 0 : 1),
16738
16744
  marginLeft: e.spacing(t ? 1 : 2),
16739
- marginRight: e.spacing(t ? 1 : 2.5),
16745
+ marginRight: e.spacing(t ? 1 : 2),
16740
16746
  width: t ? "auto" : `calc(100% - ${e.spacing(5)})`
16741
16747
  },
16742
16748
  [e.breakpoints.down("md")]: {
@@ -17416,9 +17422,6 @@ const ky = ({ onSuccess: e, firstAccess: t }) => {
17416
17422
  })(({ theme: e }) => ({
17417
17423
  "& .RaCreate-card, & > div > div > form": {
17418
17424
  backgroundColor: e.palette.background.default
17419
- // '& .RaToolbar-mobileToolbar': {
17420
- // backgroundColor: 'yellow'
17421
- // }
17422
17425
  },
17423
17426
  "& .RaCreate-main>.MuiPaper-root:first-of-type": {
17424
17427
  overflow: "visible"
@@ -26157,8 +26160,8 @@ const Wb = () => {
26157
26160
  Ub.propTypes = {
26158
26161
  children: c.node
26159
26162
  };
26160
- const Xs = ({ version: e, name: t, children: n, background: r = Wb }) => /* @__PURE__ */ Z(ke, { sx: { minHeight: "100vh" }, children: [
26161
- we.isValidElement(r) ? r : we.createElement(r),
26163
+ const Xs = ({ version: e, name: t, copy: n, children: r, background: i = Wb }) => /* @__PURE__ */ Z(ke, { sx: { minHeight: "100vh" }, children: [
26164
+ we.isValidElement(i) ? i : we.createElement(i),
26162
26165
  /* @__PURE__ */ Z(
26163
26166
  ve,
26164
26167
  {
@@ -26180,10 +26183,10 @@ const Xs = ({ version: e, name: t, children: n, background: r = Wb }) => /* @__P
26180
26183
  justifyContent: "center",
26181
26184
  alignItems: "center",
26182
26185
  sx: { minHeight: { xs: "calc(100vh - 210px)", sm: "calc(100vh - 134px)", md: "calc(100vh - 112px)" } },
26183
- children: /* @__PURE__ */ C(ve, { item: !0, children: /* @__PURE__ */ C(Ub, { children: n }) })
26186
+ children: /* @__PURE__ */ C(ve, { item: !0, children: /* @__PURE__ */ C(Ub, { children: r }) })
26184
26187
  }
26185
26188
  ),
26186
- /* @__PURE__ */ C(ve, { item: !0, sx: { pb: 1 }, children: /* @__PURE__ */ C(Lu, { name: t, version: e }) })
26189
+ /* @__PURE__ */ C(ve, { item: !0, sx: { pb: 1 }, children: /* @__PURE__ */ C(Lu, { name: t, copy: n, version: e }) })
26187
26190
  ] })
26188
26191
  ]
26189
26192
  }
@@ -26193,24 +26196,25 @@ Xs.propTypes = {
26193
26196
  children: c.node,
26194
26197
  version: c.string,
26195
26198
  name: c.string,
26199
+ copy: c.string,
26196
26200
  background: c.oneOfType([c.node, c.func, c.object])
26197
26201
  };
26198
- const _Y = ({ name: e, version: t, background: n }) => {
26199
- const r = or(), i = Fs(), s = da(), l = tg(), { token: u } = xS();
26202
+ const _Y = ({ name: e, copy: t, version: n, background: r }) => {
26203
+ const i = or(), s = Fs(), l = da(), u = tg(), { token: A } = xS();
26200
26204
  return ft(() => {
26201
- if (typeof i.activate != "function")
26205
+ if (typeof s.activate != "function")
26202
26206
  throw new Error("The authProvider used for the ActivatePage must define an activate() method");
26203
- i.activate(u).then(() => {
26204
- s("ra.auth.activate_success", { type: "info" }), wt.delay(() => l("/login"), 1e3);
26205
- }).catch((A) => {
26206
- s(A, { type: "error" }), wt.delay(() => l("/login"), 1e3);
26207
+ s.activate(A).then(() => {
26208
+ l("ra.auth.activate_success", { type: "info" }), wt.delay(() => u("/login"), 1e3);
26209
+ }).catch((f) => {
26210
+ l(f, { type: "error" }), wt.delay(() => u("/login"), 1e3);
26207
26211
  });
26208
- }, [u]), /* @__PURE__ */ C(Xs, { name: e, version: t, background: n, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26212
+ }, [A]), /* @__PURE__ */ C(Xs, { name: e, copy: t, version: n, background: r, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26209
26213
  /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Jt, { direction: "row", justifyContent: "space-between", alignItems: "baseline", sx: { mb: { xs: -0.5, sm: 0.5 } }, children: [
26210
- /* @__PURE__ */ C(Ie, { variant: "h3", children: r("ra.auth.activate") }),
26211
- /* @__PURE__ */ C(Ie, { component: In, to: "/login", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: r("ra.auth.back_to_login") })
26214
+ /* @__PURE__ */ C(Ie, { variant: "h3", children: i("ra.auth.activate") }),
26215
+ /* @__PURE__ */ C(Ie, { component: In, to: "/login", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: i("ra.auth.back_to_login") })
26212
26216
  ] }) }),
26213
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: r("ra.auth.activate_pending") })
26217
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: i("ra.auth.activate_pending") })
26214
26218
  ] }) });
26215
26219
  };
26216
26220
  _Y.propTypes = {
@@ -26218,42 +26222,42 @@ _Y.propTypes = {
26218
26222
  version: c.string.isRequired,
26219
26223
  background: c.node
26220
26224
  };
26221
- const Sp = ({ version: e, name: t, enablePasswordRecover: n, enableRegistration: r, redirectTo: i, background: s }) => {
26222
- const [l, u] = XS(!1), A = ZS(), f = or(), g = da(), h = eO(), p = tg();
26225
+ const Sp = ({ version: e, name: t, copy: n, enablePasswordRecover: r, enableRegistration: i, redirectTo: s, background: l }) => {
26226
+ const [u, A] = XS(!1), f = ZS(), g = or(), h = da(), p = eO(), m = tg();
26223
26227
  ft(() => {
26224
- h({}, !1).then(() => {
26225
- p("/");
26228
+ p({}, !1).then(() => {
26229
+ m("/");
26226
26230
  }).catch(() => {
26227
26231
  });
26228
- }, [h, p]);
26229
- const m = (I) => {
26230
- u(!0), A(I, i).then(() => {
26231
- u(!1);
26232
- }).catch((B) => {
26233
- u(!1), g(
26234
- typeof B == "string" ? B : typeof B > "u" || !B.message ? "ra.auth.sign_in_error" : B.message,
26232
+ }, [p, m]);
26233
+ const I = (B) => {
26234
+ A(!0), f(B, s).then(() => {
26235
+ A(!1);
26236
+ }).catch((y) => {
26237
+ A(!1), h(
26238
+ typeof y == "string" ? y : typeof y > "u" || !y.message ? "ra.auth.sign_in_error" : y.message,
26235
26239
  {
26236
26240
  type: "error",
26237
26241
  messageArgs: {
26238
- _: typeof B == "string" ? B : B && B.message ? B.message : void 0
26242
+ _: typeof y == "string" ? y : y && y.message ? y.message : void 0
26239
26243
  }
26240
26244
  }
26241
26245
  );
26242
26246
  });
26243
26247
  };
26244
- return /* @__PURE__ */ C(Xs, { name: t, version: e, background: s, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26248
+ return /* @__PURE__ */ C(Xs, { name: t, version: e, copy: n, background: l, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26245
26249
  /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Jt, { direction: "row", justifyContent: "space-between", alignItems: "baseline", sx: { mb: { xs: -0.5, sm: 0.5 } }, children: [
26246
26250
  /* @__PURE__ */ C(Ie, { variant: "h3", children: "Login" }),
26247
- r && /* @__PURE__ */ C(Ie, { component: In, to: "/register", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: f("ra.auth.register") })
26251
+ i && /* @__PURE__ */ C(Ie, { component: In, to: "/register", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: g("ra.auth.register") })
26248
26252
  ] }) }),
26249
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(tO, { onSubmit: m, children: [
26253
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(tO, { onSubmit: I, children: [
26250
26254
  /* @__PURE__ */ Z(ve, { container: !0, children: [
26251
26255
  /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mb: 2 }, children: /* @__PURE__ */ C(
26252
26256
  Cr,
26253
26257
  {
26254
26258
  autoFocus: !0,
26255
26259
  source: "username",
26256
- label: f("ra.auth.username"),
26260
+ label: g("ra.auth.username"),
26257
26261
  autoComplete: "username",
26258
26262
  validate: bo(),
26259
26263
  placeholder: "user@company.name",
@@ -26264,17 +26268,17 @@ const Sp = ({ version: e, name: t, enablePasswordRecover: n, enableRegistration:
26264
26268
  Cr,
26265
26269
  {
26266
26270
  source: "password",
26267
- label: f("ra.auth.password"),
26271
+ label: g("ra.auth.password"),
26268
26272
  type: "password",
26269
26273
  autoComplete: "current-password",
26270
26274
  validate: bo(),
26271
- placeholder: f("ra.auth.password_placeholder"),
26275
+ placeholder: g("ra.auth.password_placeholder"),
26272
26276
  fullWidth: !0
26273
26277
  }
26274
26278
  ) })
26275
26279
  ] }),
26276
- n && /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(Jt, { direction: "row", justifyContent: "flex-end", alignItems: "flex-end", spacing: 2, children: /* @__PURE__ */ C(aS, { variant: "h6", component: In, to: "/recover", color: "text.primary", children: f("ra.auth.forgot_password") }) }) }),
26277
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(su, { variant: "contained", type: "submit", color: "primary", disabled: l, fullWidth: !0, children: l ? /* @__PURE__ */ C(Zi, { size: 19, thickness: 3 }) : f("ra.auth.sign_in") }) })
26280
+ r && /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(Jt, { direction: "row", justifyContent: "flex-end", alignItems: "flex-end", spacing: 2, children: /* @__PURE__ */ C(aS, { variant: "h6", component: In, to: "/recover", color: "text.primary", children: g("ra.auth.forgot_password") }) }) }),
26281
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(su, { variant: "contained", type: "submit", color: "primary", disabled: u, fullWidth: !0, children: u ? /* @__PURE__ */ C(Zi, { size: 19, thickness: 3 }) : g("ra.auth.sign_in") }) })
26278
26282
  ] }) })
26279
26283
  ] }) });
26280
26284
  };
@@ -26290,24 +26294,24 @@ Sp.defaultProps = {
26290
26294
  enableRegister: !1,
26291
26295
  background: /* @__PURE__ */ C(Wb, {})
26292
26296
  };
26293
- const qY = ({ name: e, version: t, background: n }) => {
26294
- const [r, i] = Ze(!1), s = or(), l = ig(), u = da(), A = Fs(), f = ({ email: g }) => {
26295
- i(!0), A.recover(g).then((h) => {
26296
- const p = `ra.auth.recover_${h.responseCode}`, m = h.responseCode === "ok" ? "info" : "error";
26297
- u(p, { type: m }), l("/login");
26298
- }).catch((h) => {
26299
- u(h, { type: "error" });
26300
- }).finally(() => i(!1));
26297
+ const qY = ({ name: e, copy: t, version: n, background: r }) => {
26298
+ const [i, s] = Ze(!1), l = or(), u = ig(), A = da(), f = Fs(), g = ({ email: h }) => {
26299
+ s(!0), f.recover(h).then((p) => {
26300
+ const m = `ra.auth.recover_${p.responseCode}`, I = p.responseCode === "ok" ? "info" : "error";
26301
+ A(m, { type: I }), u("/login");
26302
+ }).catch((p) => {
26303
+ A(p, { type: "error" });
26304
+ }).finally(() => s(!1));
26301
26305
  };
26302
- return /* @__PURE__ */ C(Xs, { name: e, version: t, background: n, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26306
+ return /* @__PURE__ */ C(Xs, { name: e, copy: t, version: n, background: r, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26303
26307
  /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Jt, { direction: "row", justifyContent: "space-between", alignItems: "baseline", sx: { mb: { xs: -0.5, sm: 0.5 } }, children: [
26304
- /* @__PURE__ */ C(Ie, { variant: "h3", children: s("ra.auth.recover.title") }),
26305
- /* @__PURE__ */ C(Ie, { component: In, to: "/login", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: s("ra.auth.back_to_login") })
26308
+ /* @__PURE__ */ C(Ie, { variant: "h3", children: l("ra.auth.recover.title") }),
26309
+ /* @__PURE__ */ C(Ie, { component: In, to: "/login", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: l("ra.auth.back_to_login") })
26306
26310
  ] }) }),
26307
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Rs, { onSubmit: f, children: [
26311
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Rs, { onSubmit: g, children: [
26308
26312
  /* @__PURE__ */ C(ve, { container: !0, children: /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mb: 1 }, children: /* @__PURE__ */ C(Cr, { source: "email", validate: [bo(), OI()] }) }) }),
26309
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1, mb: 1 }, children: /* @__PURE__ */ C(Ie, { variant: "caption", children: s("ra.auth.recover.inbox_help") }) }),
26310
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(su, { variant: "contained", type: "submit", color: "primary", disabled: r, fullWidth: !0, children: r ? /* @__PURE__ */ C(Zi, { size: 19, thickness: 3 }) : s("ra.auth.recover") }) })
26313
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1, mb: 1 }, children: /* @__PURE__ */ C(Ie, { variant: "caption", children: l("ra.auth.recover.inbox_help") }) }),
26314
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(su, { variant: "contained", type: "submit", color: "primary", disabled: i, fullWidth: !0, children: i ? /* @__PURE__ */ C(Zi, { size: 19, thickness: 3 }) : l("ra.auth.recover") }) })
26311
26315
  ] }) })
26312
26316
  ] }) });
26313
26317
  };
@@ -26316,27 +26320,27 @@ qY.propTypes = {
26316
26320
  version: c.string.isRequired,
26317
26321
  background: c.node
26318
26322
  };
26319
- const JY = ({ name: e, version: t }) => {
26320
- const [n, r] = Ze(!1), i = or(), s = ig(), l = da(), u = Fs(), A = (f) => {
26321
- r(!0), u.register(f).then((g) => {
26322
- const h = `ra.auth.register_${g.responseCode}`, p = g.responseCode === "ok" ? "info" : "error";
26323
- l(h, { type: p }), s("/login");
26324
- }).catch((g) => {
26325
- l(g, { type: "error" });
26326
- }).finally(() => r(!1));
26323
+ const JY = ({ name: e, copy: t, version: n }) => {
26324
+ const [r, i] = Ze(!1), s = or(), l = ig(), u = da(), A = Fs(), f = (g) => {
26325
+ i(!0), A.register(g).then((h) => {
26326
+ const p = `ra.auth.register_${h.responseCode}`, m = h.responseCode === "ok" ? "info" : "error";
26327
+ u(p, { type: m }), l("/login");
26328
+ }).catch((h) => {
26329
+ u(h, { type: "error" });
26330
+ }).finally(() => i(!1));
26327
26331
  };
26328
- return /* @__PURE__ */ C(Xs, { name: e, version: t, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26332
+ return /* @__PURE__ */ C(Xs, { name: e, copy: t, version: n, children: /* @__PURE__ */ Z(ve, { container: !0, spacing: 3, children: [
26329
26333
  /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Jt, { direction: "row", justifyContent: "space-between", alignItems: "baseline", sx: { mb: { xs: -0.5, sm: 0.5 } }, children: [
26330
- /* @__PURE__ */ C(Ie, { variant: "h3", children: i("ra.auth.register.title") }),
26331
- /* @__PURE__ */ C(Ie, { component: In, to: "/login", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: i("ra.auth.already_have_account") })
26334
+ /* @__PURE__ */ C(Ie, { variant: "h3", children: s("ra.auth.register.title") }),
26335
+ /* @__PURE__ */ C(Ie, { component: In, to: "/login", variant: "body1", sx: { textDecoration: "none" }, color: "primary", children: s("ra.auth.already_have_account") })
26332
26336
  ] }) }),
26333
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Rs, { onSubmit: A, children: [
26337
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, children: /* @__PURE__ */ Z(Rs, { onSubmit: f, children: [
26334
26338
  /* @__PURE__ */ Z(ve, { container: !0, children: [
26335
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mb: 1 }, children: /* @__PURE__ */ C(Cr, { source: "name", label: i("ra.register.name"), validate: bo() }) }),
26339
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mb: 1 }, children: /* @__PURE__ */ C(Cr, { source: "name", label: s("ra.register.name"), validate: bo() }) }),
26336
26340
  /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mb: 1 }, children: /* @__PURE__ */ C(Cr, { source: "email", type: "email", validate: [bo(), OI()] }) }),
26337
26341
  /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mb: 1 }, children: /* @__PURE__ */ C(Cr, { source: "password", type: "password", validate: bo() }) })
26338
26342
  ] }),
26339
- /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(su, { variant: "contained", type: "submit", color: "primary", disabled: n, fullWidth: !0, children: n ? /* @__PURE__ */ C(Zi, { size: 19, thickness: 3 }) : i("ra.auth.create_account") }) })
26343
+ /* @__PURE__ */ C(ve, { item: !0, xs: 12, sx: { mt: 1 }, children: /* @__PURE__ */ C(su, { variant: "contained", type: "submit", color: "primary", disabled: r, fullWidth: !0, children: r ? /* @__PURE__ */ C(Zi, { size: 19, thickness: 3 }) : s("ra.auth.create_account") }) })
26340
26344
  ] }) })
26341
26345
  ] }) });
26342
26346
  };