@ukpc-lib/react 0.16.12-sandbox.saas-10152.patch-2 → 0.16.12
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/index.cjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/{index.esm2017-C5jsr03-.js → index.esm2017-COV7k9My.js} +1 -3
- package/dist/{index.esm2017-BHHaOjiS.cjs → index.esm2017-CYB2aPUE.cjs} +50 -50
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +2 -2
- package/package.json +1 -1
- package/web-components-bundle/favorite-menu/index.js +1 -1
- package/web-components-bundle/global-menu/index.js +1 -1
- package/web-components-bundle/global-topbar/index.js +1 -1
- package/web-components-bundle/has-permission/index.js +1 -1
- package/web-components-bundle/{index-CSXpzYup.js → index-BDZ8MtDY.js} +1 -3
package/dist/share/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-CYB2aPUE.cjs"),m=require("axios"),u=require("react"),d=require("react-router-dom"),a=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");require("react-query");require("react-dom");require("moment");const h=s=>{const[t,r]=u.useState([]);return u.useEffect(()=>{m.get(`${s}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(o=>r(o.data)).catch(o=>{console.error("Getting user permission error:",o)})},[s]),t},p=s=>{const t=d.useLocation();if(u.useEffect(()=>{var o,i;let r=t.pathname+t.search+t.hash;s&&!r.includes(s)&&(r=s+r),console.log("🚀 ~ PrivateLayout.tsx ~ fullPath:",r),(i=(o=window.top)==null?void 0:o.shellNavigate)==null||i.call(o,"/app"+r,{replace:!0})},[t,s]),window.self===window.top){console.log("useSyncRouter: Navigate to /app path"),window.location.href=window.location.href.replace(window.origin,`${window.origin}/app`);return}};function g({open:s,disabled:t}){u.useMemo(()=>{var r,o,i,n;t||(s?(o=(r=window.top)==null?void 0:r.HostBridge)==null||o.openBackdrop(!0):(n=(i=window.top)==null?void 0:i.HostBridge)==null||n.openBackdrop(!1))},[s,t])}const l=(s,t)=>(r,o)=>{const n=e.useUserPermissions({axiosInstance:t,baseUrl:s}).data;return n?o?r.every(c=>n==null?void 0:n.includes(c)):r.some(c=>n==null?void 0:n.includes(c)):!1},f=({baseUrl:s,accessWith:t,requireAll:r,children:o})=>l(s)(t,r)?a.jsx(a.Fragment,{children:o}):null,P=({accessWith:s,requireAll:t,baseUrl:r,children:o})=>l(r)(s,t)?a.jsx(a.Fragment,{children:o}):a.jsx(e.UnauthorizedPage,{});exports.AuthContext=e.AuthContext;exports.AuthProvider=e.AuthProvider;exports.ERROR_MESSAGE=e.ERROR_MESSAGE;exports.SaasThemeProvider=e.SaasThemeProvider;exports.TranslationProvider=e.TranslationProvider;exports.X_AUTO_CANCEL=e.X_AUTO_CANCEL;exports.axiosInstance=e.axiosInstance;exports.color=e.color;exports.createCustomTheme=e.createCustomTheme;exports.handleErrorAxios=e.handleErrorAxios;exports.isCanceledError=e.isCanceledError;exports.login=e.login;exports.logout=e.logout;exports.requestInterceptor=e.requestInterceptor;exports.responseInterceptor=e.responseInterceptor;exports.search=e.search;exports.setFavicon=e.setFavicon;exports.setShellBackdrop=e.setShellBackdrop;exports.translate=e.translate;exports.translationConfig=e.translationConfig;exports.useAuth=e.useAuth;exports.useCustomTranslation=e.useCustomTranslation;exports.useTheme=e.useTheme;exports.useTranslation=e.useTranslation;exports.HasPermission=f;exports.PermissionRoute=P;exports.getUseHasPermission=l;exports.useGetPermission=h;exports.useSyncBackdrop=g;exports.useSyncRouter=p;
|
package/dist/share/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as p, U as l } from "../index.esm2017-
|
|
2
|
-
import { M as L, O as M, R as N, a5 as O, a2 as _, X as $, a as D, c as F, a3 as X, W as j, Y as q, T as z, V as K, $ as V, Z as Y, r as Z, a4 as J, s as Q, t as W, a0 as b, e as ee, u as se, i as oe, a1 as re } from "../index.esm2017-
|
|
1
|
+
import { K as p, U as l } from "../index.esm2017-COV7k9My.js";
|
|
2
|
+
import { M as L, O as M, R as N, a5 as O, a2 as _, X as $, a as D, c as F, a3 as X, W as j, Y as q, T as z, V as K, $ as V, Z as Y, r as Z, a4 as J, s as Q, t as W, a0 as b, e as ee, u as se, i as oe, a1 as re } from "../index.esm2017-COV7k9My.js";
|
|
3
3
|
import d from "axios";
|
|
4
4
|
import { useState as f, useEffect as u, useMemo as h } from "react";
|
|
5
5
|
import { useLocation as w } from "react-router-dom";
|
package/package.json
CHANGED
|
@@ -17120,9 +17120,7 @@ function iA({ ...e }) {
|
|
|
17120
17120
|
var le, ve, fe;
|
|
17121
17121
|
const t = e.item, n = e.level || 0, r = !!((le = e.item.children) != null && le.length), i = `level-${n}`, s = (de, we = i) => `${de} ${we} `, [o, l] = A.useState(!1), [c, d] = A.useState(t.isFavorite || !1), h = A.useRef(), p = A.useRef();
|
|
17122
17122
|
p != null && p.current && ((ve = p == null ? void 0 : p.current) == null ? void 0 : ve.scrollWidth) > ((fe = p == null ? void 0 : p.current) == null ? void 0 : fe.clientWidth);
|
|
17123
|
-
const y = window.location.origin, b = t.path && t.path.includes("http") ? new URL(t.path) : { origin: "", pathname: "" }, C = window.location.pathname.split("/")[1], w = b.pathname.split("/")[1], E = e.ssr || !y.includes("local") && y !== b.origin || w !== C, _ = r || n === 0 ? "div" : e.item.redirectUrl ? vy : E ? "a" : vy, I = rA(t)
|
|
17124
|
-
console.log("🚀 ~ FavMenuItem ~ path:", I);
|
|
17125
|
-
const P = n + 1, V = r && o && n > 0, $ = () => {
|
|
17123
|
+
const y = window.location.origin, b = t.path && t.path.includes("http") ? new URL(t.path) : { origin: "", pathname: "" }, C = window.location.pathname.split("/")[1], w = b.pathname.split("/")[1], E = e.ssr || !y.includes("local") && y !== b.origin || w !== C, _ = r || n === 0 ? "div" : e.item.redirectUrl ? vy : E ? "a" : vy, I = rA(t), P = n + 1, V = r && o && n > 0, $ = () => {
|
|
17126
17124
|
e.isDrop || l(!0);
|
|
17127
17125
|
}, j = () => {
|
|
17128
17126
|
l(!1);
|