@ukpc-lib/react 0.16.3-sandbox.saas-9356-and-saas-9249.patch-7 → 0.16.3-sandbox.saas-9356-and-saas-9249.patch-8
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/share/hooks/useSyncRouter.d.ts +1 -1
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +67 -66
- package/package.json +1 -1
- package/web-components-bundle/access-denied/index.js +3 -3
- package/web-components-bundle/base-breadcrumbs/index.js +2 -2
- package/web-components-bundle/favorite-menu/index.js +4 -4
- package/web-components-bundle/global-menu/index.js +4 -4
- package/web-components-bundle/global-topbar/index.js +5 -5
- package/web-components-bundle/has-permission/index.js +3 -3
- package/web-components-bundle/{index-DqxmsDJs.js → index-BUE-pz1x.js} +1 -1
- package/web-components-bundle/{index-DBpqFdvL.js → index-Giq9sshx.js} +4 -4
- package/web-components-bundle/{index-UUkm_4Gc.js → index-omnj2VPv.js} +595 -595
- package/web-components-bundle/page-not-found/index.js +2 -2
- 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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index.esm2017-Bmj_1y8w.cjs"),d=require("axios"),a=require("react"),l=require("react-router-dom"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");const m=r=>{const[t,s]=a.useState([]);return a.useEffect(()=>{d.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(e=>s(e.data)).catch(e=>{console.error("Getting user permission error:",e)})},[r]),t},h=r=>{const t=l.useLocation();if(a.useEffect(()=>{var e,n;let s=t.pathname+t.search+t.hash;r&&!s.includes(r)&&(s=r+s),console.log("🚀 ~ PrivateLayout.tsx ~ fullPath:",s),(n=(e=window.top)==null?void 0:e.shellNavigate)==null||n.call(e,"/app"+s,{replace:!0})},[t,r]),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:t}){a.useMemo(()=>{var s,e,n,u;t||(r?(e=(s=window.top)==null?void 0:s.HostBridge)==null||e.openBackdrop(!0):(u=(n=window.top)==null?void 0:n.HostBridge)==null||u.openBackdrop(!1))},[r,t])}const c=r=>(t,s)=>{const e=m(r);return s?t.every(n=>e==null?void 0:e.includes(n)):t.some(n=>e==null?void 0:e.includes(n))},g=({baseUrl:r,accessWith:t,requireAll:s,children:e})=>c(r)(t,s)?i.jsx(i.Fragment,{children:e}):null,f=({accessWith:r,requireAll:t,baseUrl:s,unAuthorizedPath:e,children:n})=>c(s)(r,t)?i.jsx(i.Fragment,{children:n}):i.jsx(l.Navigate,{to:e,replace:!0});exports.AuthContext=o.AuthContext;exports.AuthProvider=o.AuthProvider;exports.ERROR_MESSAGE=o.ERROR_MESSAGE;exports.SaasThemeProvider=o.SaasThemeProvider;exports.TranslationProvider=o.TranslationProvider;exports.axiosInstance=o.axiosInstance;exports.color=o.color;exports.createCustomTheme=o.createCustomTheme;exports.handleErrorAxios=o.handleErrorAxios;exports.login=o.login;exports.logout=o.logout;exports.responseInterceptor=o.responseInterceptor;exports.search=o.search;exports.setFavicon=o.setFavicon;exports.setShellBackdrop=o.setShellBackdrop;exports.translate=o.translate;exports.translationConfig=o.translationConfig;exports.useAuth=o.useAuth;exports.useCustomTranslation=o.useCustomTranslation;exports.useTheme=o.useTheme;exports.useTranslation=o.useTranslation;exports.HasPermission=g;exports.PermissionRoute=f;exports.getUseHasPermission=c;exports.useGetPermission=m;exports.useSyncBackdrop=p;exports.useSyncRouter=h;
|
package/dist/share/index.js
CHANGED
|
@@ -1,86 +1,87 @@
|
|
|
1
|
-
import { M as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as
|
|
1
|
+
import { M as E, O as k, R as H, a1 as G, Z as M, a as N, c as $, $ as F, V as I, T as L, U as O, W as j, v as U, a0 as V, s as X, t as Y, X as Z, e as _, u as q, i as z, Y as D } from "../index.esm2017-YfeFmA6k.js";
|
|
2
|
+
import l from "axios";
|
|
3
|
+
import { useState as m, useEffect as i, useMemo as p } from "react";
|
|
4
|
+
import { useLocation as d, Navigate as f } from "react-router-dom";
|
|
5
|
+
import { jsx as a, Fragment as u } from "react/jsx-runtime";
|
|
6
6
|
import "@r2wc/react-to-web-component";
|
|
7
7
|
import "@mui/material";
|
|
8
|
-
const
|
|
9
|
-
const [
|
|
10
|
-
return
|
|
11
|
-
|
|
8
|
+
const h = (o) => {
|
|
9
|
+
const [s, r] = m([]);
|
|
10
|
+
return i(() => {
|
|
11
|
+
l.get(`${o}/user-management/api/v1/users/my-account/permissions`, {
|
|
12
12
|
withCredentials: !0
|
|
13
|
-
}).then((e) =>
|
|
13
|
+
}).then((e) => r(e.data)).catch((e) => {
|
|
14
14
|
console.error("Getting user permission error:", e);
|
|
15
15
|
});
|
|
16
|
-
}, [
|
|
17
|
-
},
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
}, [o]), s;
|
|
17
|
+
}, R = (o) => {
|
|
18
|
+
const s = d();
|
|
19
|
+
if (i(() => {
|
|
20
|
+
var e, t;
|
|
21
|
+
let r = s.pathname + s.search + s.hash;
|
|
22
|
+
o && !r.includes(o) && (r = o + r), console.log("🚀 ~ PrivateLayout.tsx ~ fullPath:", r), (t = (e = window.top) == null ? void 0 : e.shellNavigate) == null || t.call(e, "/app" + r, { replace: !0 });
|
|
23
|
+
}, [s, o]), window.self === window.top) {
|
|
24
|
+
console.log("useSyncRouter: Navigate to /app path"), window.location.href = window.location.href.replace(
|
|
25
|
+
window.origin,
|
|
26
|
+
`${window.origin}/app`
|
|
27
|
+
);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
29
30
|
};
|
|
30
|
-
function
|
|
31
|
-
open:
|
|
32
|
-
disabled:
|
|
31
|
+
function T({
|
|
32
|
+
open: o,
|
|
33
|
+
disabled: s
|
|
33
34
|
}) {
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
}, [
|
|
35
|
+
p(() => {
|
|
36
|
+
var r, e, t, n;
|
|
37
|
+
s || (o ? (e = (r = window.top) == null ? void 0 : r.HostBridge) == null || e.openBackdrop(!0) : (n = (t = window.top) == null ? void 0 : t.HostBridge) == null || n.openBackdrop(!1));
|
|
38
|
+
}, [o, s]);
|
|
38
39
|
}
|
|
39
|
-
const c = (
|
|
40
|
-
const e =
|
|
41
|
-
return
|
|
40
|
+
const c = (o) => (s, r) => {
|
|
41
|
+
const e = h(o);
|
|
42
|
+
return r ? s.every(
|
|
42
43
|
(t) => e == null ? void 0 : e.includes(t)
|
|
43
|
-
) :
|
|
44
|
+
) : s.some(
|
|
44
45
|
(t) => e == null ? void 0 : e.includes(t)
|
|
45
46
|
);
|
|
46
|
-
},
|
|
47
|
-
baseUrl:
|
|
48
|
-
accessWith:
|
|
49
|
-
requireAll:
|
|
47
|
+
}, y = ({
|
|
48
|
+
baseUrl: o,
|
|
49
|
+
accessWith: s,
|
|
50
|
+
requireAll: r,
|
|
50
51
|
children: e
|
|
51
|
-
}) => c(
|
|
52
|
-
accessWith:
|
|
53
|
-
requireAll:
|
|
54
|
-
baseUrl:
|
|
52
|
+
}) => c(o)(s, r) ? /* @__PURE__ */ a(u, { children: e }) : null, B = ({
|
|
53
|
+
accessWith: o,
|
|
54
|
+
requireAll: s,
|
|
55
|
+
baseUrl: r,
|
|
55
56
|
unAuthorizedPath: e,
|
|
56
57
|
children: t
|
|
57
|
-
}) => c(
|
|
58
|
+
}) => c(r)(o, s) ? /* @__PURE__ */ a(u, { children: t }) : /* @__PURE__ */ a(f, { to: e, replace: !0 });
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
E as AuthContext,
|
|
61
|
+
k as AuthProvider,
|
|
61
62
|
H as ERROR_MESSAGE,
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
y as HasPermission,
|
|
64
|
+
B as PermissionRoute,
|
|
64
65
|
G as SaasThemeProvider,
|
|
65
66
|
M as TranslationProvider,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
N as axiosInstance,
|
|
68
|
+
$ as color,
|
|
69
|
+
F as createCustomTheme,
|
|
69
70
|
c as getUseHasPermission,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
71
|
+
I as handleErrorAxios,
|
|
72
|
+
L as login,
|
|
73
|
+
O as logout,
|
|
74
|
+
j as responseInterceptor,
|
|
75
|
+
U as search,
|
|
76
|
+
V as setFavicon,
|
|
77
|
+
X as setShellBackdrop,
|
|
78
|
+
Y as translate,
|
|
79
|
+
Z as translationConfig,
|
|
80
|
+
_ as useAuth,
|
|
81
|
+
q as useCustomTranslation,
|
|
82
|
+
h as useGetPermission,
|
|
83
|
+
T as useSyncBackdrop,
|
|
84
|
+
R as useSyncRouter,
|
|
85
|
+
z as useTheme,
|
|
86
|
+
D as useTranslation
|
|
86
87
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { U as e } from "../index-
|
|
3
|
-
import "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { U as e } from "../index-Giq9sshx.js";
|
|
3
|
+
import "../index-omnj2VPv.js";
|
|
4
4
|
export {
|
|
5
5
|
e as UnauthorizedPage
|
|
6
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { F as i, u as m } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { F as i, u as m } from "../index-Giq9sshx.js";
|
|
3
|
+
import "../index-BUE-pz1x.js";
|
|
4
|
+
import "../index-omnj2VPv.js";
|
|
5
5
|
export {
|
|
6
6
|
i as FavoriteMenu,
|
|
7
7
|
m as updateFavoriteItems
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { G as i } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { G as i } from "../index-Giq9sshx.js";
|
|
3
|
+
import "../index-BUE-pz1x.js";
|
|
4
|
+
import "../index-omnj2VPv.js";
|
|
5
5
|
export {
|
|
6
6
|
i as GlobalMenu
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { L as g, T as n } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../react-toastify.esm-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { L as g, T as n } from "../index-Giq9sshx.js";
|
|
3
|
+
import "../index-BUE-pz1x.js";
|
|
4
|
+
import "../index-omnj2VPv.js";
|
|
5
|
+
import "../react-toastify.esm-DnABvuky.js";
|
|
6
6
|
import "../toast-config/index.js";
|
|
7
7
|
import "../toast-config-notification/index.js";
|
|
8
8
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { H as e, g as m } from "../index-
|
|
3
|
-
import "../index-
|
|
1
|
+
import "../react-to-web-component-BOygDorD.js";
|
|
2
|
+
import { H as e, g as m } from "../index-Giq9sshx.js";
|
|
3
|
+
import "../index-omnj2VPv.js";
|
|
4
4
|
export {
|
|
5
5
|
e as HasPermission,
|
|
6
6
|
m as getUseHasPermission
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e, s as a } from "./react-to-web-component-
|
|
1
|
+
import { j as e, s as a } from "./react-to-web-component-BOygDorD.js";
|
|
2
2
|
const l = "*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}";
|
|
3
3
|
function s({ children: t, styles: o = [], ...i }) {
|
|
4
4
|
return /* @__PURE__ */ e.jsxs("div", { ...i, children: [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var z3 = Object.defineProperty;
|
|
2
2
|
var Y3 = (e, t, n) => t in e ? z3(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var bh = (e, t, n) => (Y3(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
-
import { c as Yn, g as xl, r as M, R as je, j as I, a as wh, b as Tg, s as Xf, d as q3 } from "./react-to-web-component-
|
|
5
|
-
import { _ as G3, a as vs, b as da, i as Dp, s as K3, c as Te, d as Xy, f as X3, r as Qy, n as Wn, t as gk, e as Q3, g as mk, h as ln, j as kp, k as vk, p as Yo, m as JS, l as eC, o as Qh, q as xh, u as tC, v as Z3, T as yk, w as J3, x as eU, y as tU, z as bk, A as kr, D as nU, B as Pp, C as rU, E as wk, F as iU, G as Cf, H as Ap, I as nC, J as $u, K as Sl, L as rC, M as sU, N as Fu, O as Qf, P as ur, Q as oU, R as xk, S as Sk, U as Xr, V as aU, W as lU, X as Ck, Y as Tk, Z as _g, $ as Nb, a0 as qc, a1 as uU, a2 as iC, a3 as cU, a4 as Sh, a5 as fU, a6 as Rp, a7 as dU, a8 as hU, a9 as Dn, aa as pU, ab as gU, ac as mU, ad as _k, ae as Ek, af as Ok } from "./index-
|
|
4
|
+
import { c as Yn, g as xl, r as M, R as je, j as I, a as wh, b as Tg, s as Xf, d as q3 } from "./react-to-web-component-BOygDorD.js";
|
|
5
|
+
import { _ as G3, a as vs, b as da, i as Dp, s as K3, c as Te, d as Xy, f as X3, r as Qy, n as Wn, t as gk, e as Q3, g as mk, h as ln, j as kp, k as vk, p as Yo, m as JS, l as eC, o as Qh, q as xh, u as tC, v as Z3, T as yk, w as J3, x as eU, y as tU, z as bk, A as kr, D as nU, B as Pp, C as rU, E as wk, F as iU, G as Cf, H as Ap, I as nC, J as $u, K as Sl, L as rC, M as sU, N as Fu, O as Qf, P as ur, Q as oU, R as xk, S as Sk, U as Xr, V as aU, W as lU, X as Ck, Y as Tk, Z as _g, $ as Nb, a0 as qc, a1 as uU, a2 as iC, a3 as cU, a4 as Sh, a5 as fU, a6 as Rp, a7 as dU, a8 as hU, a9 as Dn, aa as pU, ab as gU, ac as mU, ad as _k, ae as Ek, af as Ok } from "./index-omnj2VPv.js";
|
|
6
6
|
import { c as Gs } from "./clsx-DB4S2d7J.js";
|
|
7
|
-
import { S as $b } from "./index-
|
|
8
|
-
import { B as Fb } from "./react-toastify.esm-
|
|
7
|
+
import { S as $b } from "./index-BUE-pz1x.js";
|
|
8
|
+
import { B as Fb } from "./react-toastify.esm-DnABvuky.js";
|
|
9
9
|
import "./toast-config/index.js";
|
|
10
10
|
import "./toast-config-notification/index.js";
|
|
11
11
|
function vU(e, t) {
|