@ukpc-lib/react 0.16.4 → 0.16.5-sandbox.poms-1875.patch-1
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-wbO-V0pr.cjs → index.esm2017-DEvwglYk.cjs} +101 -101
- package/dist/{index.esm2017-BTpFyXKl.js → index.esm2017-Dwmyl50e.js} +5073 -5045
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +40 -39
- package/dist/share/interceptor/index.d.ts +2 -1
- package/package.json +1 -1
- package/web-components-bundle/{SaasThemeProvider-DUpoV8xb.js → SaasThemeProvider-A_eMJWqw.js} +1 -1
- package/web-components-bundle/access-denied/index.js +2 -2
- package/web-components-bundle/base-breadcrumbs/index.js +3 -3
- package/web-components-bundle/favorite-menu/index.js +7 -7
- package/web-components-bundle/global-menu/index.js +6 -6
- package/web-components-bundle/global-topbar/index.js +7 -7
- package/web-components-bundle/has-permission/index.js +2 -2
- package/web-components-bundle/{index-BBl8HzU3.js → index-760z9lEs.js} +565 -565
- package/web-components-bundle/{index-N6zjI_u_.js → index-BwEhsh9S.js} +2 -2
- package/web-components-bundle/{index-Ch-015PG.js → index-CiYHK3Rq.js} +1 -1
- package/web-components-bundle/{index-6y9D_tfG.js → index-DaCSdxEj.js} +7362 -7334
- package/web-components-bundle/page-not-found/index.js +3 -3
- package/web-components-bundle/{react-to-web-component-w5r1Fs9q.js → react-to-web-component-BOygDorD.js} +1535 -1527
- package/web-components-bundle/{react-toastify.esm-H_Xdunfj.js → react-toastify.esm-DnABvuky.js} +1 -1
- package/web-components-bundle/toast-config/index.js +2 -2
- package/web-components-bundle/toast-config-notification/index.js +2 -2
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-DEvwglYk.cjs"),g=require("axios"),c=require("react"),d=require("react-router-dom"),u=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");require("react-query");require("react-dom");require("moment");const h=r=>{const[i,t]=c.useState([]);return c.useEffect(()=>{g.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(s=>t(s.data)).catch(s=>{console.error("Getting user permission error:",s)})},[r]),i},f=r=>{const i=d.useNavigate(),t=d.useLocation();console.log(" useSyncRouter.tsx ~ location1:",t,window.location.pathname);const s=(n=t)=>(r||"")+n.pathname+n.search+n.hash;if(c.useEffect(()=>{const n={changeRoute:o=>{const a=s();if(typeof o=="string"&&a!==o){console.log(" useSyncRouter.tsx ~ location2:",a,o);const m=r&&o.startsWith(r)?o.substring(r.length):o;i(m)}}};window.MicrofeBridge=n},[i,t]),c.useEffect(()=>{var o,a;const n=s();console.log("fullPath1",window.location.pathname,n),(a=(o=window.parent)==null?void 0:o.HostBridge)==null||a.childRouteChange(n)},[t]),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 P({open:r,disabled:i}){c.useMemo(()=>{var t,s,n,o;i||(r?(s=(t=window.top)==null?void 0:t.HostBridge)==null||s.openBackdrop(!0):(o=(n=window.top)==null?void 0:n.HostBridge)==null||o.openBackdrop(!1))},[r,i])}const l=(r,i)=>(t,s)=>{const o=e.useUserPermissions({axiosInstance:i,baseUrl:r}).data;return o?s?t.every(a=>o==null?void 0:o.includes(a)):t.some(a=>o==null?void 0:o.includes(a)):!1},w=({baseUrl:r,accessWith:i,requireAll:t,children:s})=>l(r)(i,t)?u.jsx(u.Fragment,{children:s}):null,p=({accessWith:r,requireAll:i,baseUrl:t,children:s})=>l(t)(r,i)?u.jsx(u.Fragment,{children:s}):u.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.axiosInstance=e.axiosInstance;exports.color=e.color;exports.createCustomTheme=e.createCustomTheme;exports.handleErrorAxios=e.handleErrorAxios;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=w;exports.PermissionRoute=p;exports.getUseHasPermission=l;exports.useGetPermission=h;exports.useSyncBackdrop=P;exports.useSyncRouter=f;
|
package/dist/share/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { K as d, U as
|
|
2
|
-
import { M as
|
|
3
|
-
import
|
|
1
|
+
import { K as d, U as p } from "../index.esm2017-Dwmyl50e.js";
|
|
2
|
+
import { M as $, O as z, R as D, a3 as N, a0 as O, a as j, c as q, a1 as K, W as L, T as V, V as W, Y as X, X as Y, r as Z, a2 as _, s as J, t as Q, Z as b, e as oo, u as eo, i as so, $ as to } from "../index.esm2017-Dwmyl50e.js";
|
|
3
|
+
import g from "axios";
|
|
4
4
|
import { useState as f, useEffect as a, useMemo as h } from "react";
|
|
5
5
|
import { useNavigate as w, useLocation as P } from "react-router-dom";
|
|
6
6
|
import { jsx as u, Fragment as c } from "react/jsx-runtime";
|
|
@@ -10,38 +10,38 @@ import "react-query";
|
|
|
10
10
|
import "react-dom";
|
|
11
11
|
import "moment";
|
|
12
12
|
const H = (e) => {
|
|
13
|
-
const [
|
|
13
|
+
const [n, s] = f([]);
|
|
14
14
|
return a(() => {
|
|
15
|
-
|
|
15
|
+
g.get(`${e}/user-management/api/v1/users/my-account/permissions`, {
|
|
16
16
|
withCredentials: !0
|
|
17
17
|
}).then((t) => s(t.data)).catch((t) => {
|
|
18
18
|
console.error("Getting user permission error:", t);
|
|
19
19
|
});
|
|
20
|
-
}, [e]),
|
|
20
|
+
}, [e]), n;
|
|
21
21
|
}, M = (e) => {
|
|
22
|
-
const
|
|
22
|
+
const n = w(), s = P();
|
|
23
23
|
console.log(
|
|
24
24
|
" useSyncRouter.tsx ~ location1:",
|
|
25
25
|
s,
|
|
26
26
|
window.location.pathname
|
|
27
27
|
);
|
|
28
|
-
const t = (
|
|
28
|
+
const t = (r = s) => (e || "") + r.pathname + r.search + r.hash;
|
|
29
29
|
if (a(() => {
|
|
30
|
-
const
|
|
30
|
+
const r = {
|
|
31
31
|
changeRoute: (o) => {
|
|
32
32
|
const i = t();
|
|
33
33
|
if (typeof o == "string" && i !== o) {
|
|
34
34
|
console.log(" useSyncRouter.tsx ~ location2:", i, o);
|
|
35
35
|
const m = e && o.startsWith(e) ? o.substring(e.length) : o;
|
|
36
|
-
|
|
36
|
+
n(m);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
window.MicrofeBridge =
|
|
41
|
-
}, [
|
|
40
|
+
window.MicrofeBridge = r;
|
|
41
|
+
}, [n, s]), a(() => {
|
|
42
42
|
var o, i;
|
|
43
|
-
const
|
|
44
|
-
console.log("fullPath1", window.location.pathname,
|
|
43
|
+
const r = t();
|
|
44
|
+
console.log("fullPath1", window.location.pathname, r), (i = (o = window.parent) == null ? void 0 : o.HostBridge) == null || i.childRouteChange(r);
|
|
45
45
|
}, [s]), window.self === window.top) {
|
|
46
46
|
console.log("useSyncRouter: Navigate to /app path"), window.location.href = window.location.href.replace(
|
|
47
47
|
window.origin,
|
|
@@ -52,16 +52,16 @@ const H = (e) => {
|
|
|
52
52
|
};
|
|
53
53
|
function k({
|
|
54
54
|
open: e,
|
|
55
|
-
disabled:
|
|
55
|
+
disabled: n
|
|
56
56
|
}) {
|
|
57
57
|
h(() => {
|
|
58
|
-
var s, t,
|
|
59
|
-
|
|
60
|
-
}, [e,
|
|
58
|
+
var s, t, r, o;
|
|
59
|
+
n || (e ? (t = (s = window.top) == null ? void 0 : s.HostBridge) == null || t.openBackdrop(!0) : (o = (r = window.top) == null ? void 0 : r.HostBridge) == null || o.openBackdrop(!1));
|
|
60
|
+
}, [e, n]);
|
|
61
61
|
}
|
|
62
|
-
const l = (e,
|
|
62
|
+
const l = (e, n) => (s, t) => {
|
|
63
63
|
const o = d({
|
|
64
|
-
axiosInstance:
|
|
64
|
+
axiosInstance: n,
|
|
65
65
|
baseUrl: e
|
|
66
66
|
}).data;
|
|
67
67
|
return o ? t ? s.every(
|
|
@@ -71,41 +71,42 @@ const l = (e, r) => (s, t) => {
|
|
|
71
71
|
) : !1;
|
|
72
72
|
}, F = ({
|
|
73
73
|
baseUrl: e,
|
|
74
|
-
accessWith:
|
|
74
|
+
accessWith: n,
|
|
75
75
|
requireAll: s,
|
|
76
76
|
children: t
|
|
77
|
-
}) => l(e)(
|
|
77
|
+
}) => l(e)(n, s) ? /* @__PURE__ */ u(c, { children: t }) : null, G = ({
|
|
78
78
|
accessWith: e,
|
|
79
|
-
requireAll:
|
|
79
|
+
requireAll: n,
|
|
80
80
|
baseUrl: s,
|
|
81
81
|
children: t
|
|
82
|
-
}) => l(s)(e,
|
|
82
|
+
}) => l(s)(e, n) ? /* @__PURE__ */ u(c, { children: t }) : /* @__PURE__ */ u(p, {});
|
|
83
83
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
$ as AuthContext,
|
|
85
|
+
z as AuthProvider,
|
|
86
|
+
D as ERROR_MESSAGE,
|
|
87
87
|
F as HasPermission,
|
|
88
88
|
G as PermissionRoute,
|
|
89
89
|
N as SaasThemeProvider,
|
|
90
90
|
O as TranslationProvider,
|
|
91
91
|
j as axiosInstance,
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
q as color,
|
|
93
|
+
K as createCustomTheme,
|
|
94
94
|
l as getUseHasPermission,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
L as handleErrorAxios,
|
|
96
|
+
V as login,
|
|
97
|
+
W as logout,
|
|
98
|
+
X as requestInterceptor,
|
|
98
99
|
Y as responseInterceptor,
|
|
99
100
|
Z as search,
|
|
100
101
|
_ as setFavicon,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
J as setShellBackdrop,
|
|
103
|
+
Q as translate,
|
|
104
|
+
b as translationConfig,
|
|
105
|
+
oo as useAuth,
|
|
106
|
+
eo as useCustomTranslation,
|
|
106
107
|
H as useGetPermission,
|
|
107
108
|
k as useSyncBackdrop,
|
|
108
109
|
M as useSyncRouter,
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
so as useTheme,
|
|
111
|
+
to as useTranslation
|
|
111
112
|
};
|
|
@@ -11,5 +11,6 @@ export type HandleErrorOptions = {
|
|
|
11
11
|
disabledPushNotify?: boolean;
|
|
12
12
|
};
|
|
13
13
|
export declare function handleErrorAxios(error: any, options?: HandleErrorOptions): void | Promise<import('axios').AxiosResponse<any, any>>;
|
|
14
|
+
declare const requestInterceptor: number;
|
|
14
15
|
declare const responseInterceptor: number;
|
|
15
|
-
export { axiosInstance, responseInterceptor };
|
|
16
|
+
export { axiosInstance, responseInterceptor, requestInterceptor };
|
package/package.json
CHANGED
package/web-components-bundle/{SaasThemeProvider-DUpoV8xb.js → SaasThemeProvider-A_eMJWqw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as j, r as b } from "./react-to-web-component-
|
|
1
|
+
import { a as j, r as b } from "./react-to-web-component-BOygDorD.js";
|
|
2
2
|
function c() {
|
|
3
3
|
return c = Object.assign ? Object.assign.bind() : function(t) {
|
|
4
4
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { V as e } from "../index-
|
|
3
|
-
import "../SaasThemeProvider-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { V as e } from "../index-760z9lEs.js";
|
|
3
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
4
4
|
export {
|
|
5
5
|
e as BaseBreadcrumbs
|
|
6
6
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { F, u as v } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../react-toastify.esm-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { F, u as v } from "../index-DaCSdxEj.js";
|
|
3
|
+
import "../index-BwEhsh9S.js";
|
|
4
|
+
import "../index-760z9lEs.js";
|
|
5
|
+
import "../react-toastify.esm-DnABvuky.js";
|
|
6
6
|
import "../toast-config/index.js";
|
|
7
7
|
import "../toast-config-notification/index.js";
|
|
8
|
-
import "../SaasThemeProvider-
|
|
9
|
-
import "../index-
|
|
8
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
9
|
+
import "../index-CiYHK3Rq.js";
|
|
10
10
|
export {
|
|
11
11
|
F as FavoriteMenu,
|
|
12
12
|
v as updateFavoriteItems
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { G as e } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../SaasThemeProvider-
|
|
6
|
-
import "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { G as e } from "../index-DaCSdxEj.js";
|
|
3
|
+
import "../index-BwEhsh9S.js";
|
|
4
|
+
import "../index-760z9lEs.js";
|
|
5
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
6
|
+
import "../index-CiYHK3Rq.js";
|
|
7
7
|
export {
|
|
8
8
|
e as GlobalMenu
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { L as s, T as L } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../index-
|
|
6
|
-
import "../SaasThemeProvider-
|
|
7
|
-
import "../react-toastify.esm-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { L as s, T as L } from "../index-DaCSdxEj.js";
|
|
3
|
+
import "../index-BwEhsh9S.js";
|
|
4
|
+
import "../index-CiYHK3Rq.js";
|
|
5
|
+
import "../index-760z9lEs.js";
|
|
6
|
+
import "../SaasThemeProvider-A_eMJWqw.js";
|
|
7
|
+
import "../react-toastify.esm-DnABvuky.js";
|
|
8
8
|
import "../toast-config/index.js";
|
|
9
9
|
import "../toast-config-notification/index.js";
|
|
10
10
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { H as o, g as r } from "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { H as o, g as r } from "../index-DaCSdxEj.js";
|
|
3
3
|
export {
|
|
4
4
|
o as HasPermission,
|
|
5
5
|
r as getUseHasPermission
|