@applica-software-guru/react-admin 1.4.0-beta.5 → 1.4.0-beta.7
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/components/Layout/Header/Profile/buttons/StopImpersonateButton.d.ts.map +1 -1
- package/dist/components/Layout/Provider.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +1 -1
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +10 -2
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +1 -1
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Layout/Header/Profile/buttons/StopImpersonateButton.tsx +2 -0
- package/src/components/Layout/Provider.tsx +7 -1
package/dist/react-admin.es.js
CHANGED
|
@@ -20472,7 +20472,11 @@ function mU(e) {
|
|
|
20472
20472
|
}
|
|
20473
20473
|
});
|
|
20474
20474
|
}, [r.palette.mode]), Pe(() => {
|
|
20475
|
-
t.isImpersonating
|
|
20475
|
+
if (!t.isImpersonating) {
|
|
20476
|
+
console.warn("authProvider does not contain a method called isImpersonating", t);
|
|
20477
|
+
return;
|
|
20478
|
+
}
|
|
20479
|
+
t == null || t.isImpersonating().then((X) => {
|
|
20476
20480
|
var z;
|
|
20477
20481
|
v(!X && ((z = n == null ? void 0 : n.data) == null ? void 0 : z.needToChangePassword) === !0);
|
|
20478
20482
|
});
|
|
@@ -20737,7 +20741,11 @@ const SU = () => {
|
|
|
20737
20741
|
[t == null ? void 0 : t.stopImpersonating]
|
|
20738
20742
|
), [r, o] = je(!1);
|
|
20739
20743
|
return Pe(() => {
|
|
20740
|
-
|
|
20744
|
+
if (!t.isImpersonating) {
|
|
20745
|
+
console.warn("The authProvider does not support the isImpersonating feature", t);
|
|
20746
|
+
return;
|
|
20747
|
+
}
|
|
20748
|
+
t.isImpersonating().then((a) => o(a));
|
|
20741
20749
|
}, [t, o]), r ? /* @__PURE__ */ h(vo, { children: /* @__PURE__ */ $(Dr, { onClick: n, children: [
|
|
20742
20750
|
/* @__PURE__ */ h(Pr, { children: /* @__PURE__ */ h(nv, {}) }),
|
|
20743
20751
|
/* @__PURE__ */ h(Gn, { primary: e("ra.auth.stop_impersonate") })
|