@ukpc-lib/react 0.7.5 → 0.7.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/FavoriteMenu/components/MenuIconComponent.d.ts +6 -0
- package/dist/components/FavoriteMenu/components/MenuItem.d.ts +0 -5
- package/dist/components/index.cjs +22 -22
- package/dist/components/index.js +507 -534
- package/dist/{index.module-eec974f6.cjs → index.module-088c3cbc.cjs} +118 -118
- package/dist/{index.module-38bd66dc.js → index.module-6b3abe9f.js} +20794 -20730
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +7 -7
- 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-e5c23c52.js → index-a7f8f3fa.js} +17583 -17547
package/dist/share/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.module-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.module-088c3cbc.cjs"),m=require("axios"),u=require("react"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");const l=require("react-router-dom");require("@mui/material");const c=s=>{const[t,o]=u.useState([]);return u.useEffect(()=>{m.get(`${s}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(r=>o(r.data)).catch(r=>{console.error("Getting user permission error:",r)})},[s]),t},a=s=>(t,o)=>{const r=c(s);return o?t.every(n=>r==null?void 0:r.includes(n)):t.some(n=>r==null?void 0:r.includes(n))},h=({baseUrl:s,accessWith:t,requireAll:o,children:r})=>a(s)(t,o)?i.jsx(i.Fragment,{children:r}):null,P=({accessWith:s,requireAll:t,baseUrl:o,unAuthorizedPath:r,children:n})=>a(o)(s,t)?i.jsx(i.Fragment,{children:n}):i.jsx(l.Navigate,{to:r,replace:!0});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.responseInterceptor=e.responseInterceptor;exports.search=e.search;exports.translate=e.translate;exports.translationConfig=e.translationConfig;exports.useAuth=e.useAuth;exports.useCustomTranslation=e.useCustomTranslation;exports.useTheme=e.useTheme;exports.useTranslation=e.useTranslation$1;exports.HasPermission=h;exports.PermissionRoute=P;exports.getUseHasPermission=a;exports.useGetPermission=c;
|
package/dist/share/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as R, V as S, W as G, a5 as y, a3 as H, a as I, c as $, a4 as j, Z as
|
|
1
|
+
import { U as R, V as S, W as G, a5 as y, a3 as H, a as I, c as $, a4 as j, Z as w, X as B, Y as F, $ as M, B as N, a1 as O, a0 as U, u as V, e as X, l as Y, a2 as Z } from "../index.module-6b3abe9f.js";
|
|
2
2
|
import u from "axios";
|
|
3
3
|
import { useState as m, useEffect as c } from "react";
|
|
4
4
|
import { jsx as o, Fragment as n } from "react/jsx-runtime";
|
|
@@ -21,12 +21,12 @@ const h = (e) => {
|
|
|
21
21
|
) : r.some(
|
|
22
22
|
(a) => s == null ? void 0 : s.includes(a)
|
|
23
23
|
);
|
|
24
|
-
},
|
|
24
|
+
}, T = ({
|
|
25
25
|
baseUrl: e,
|
|
26
26
|
accessWith: r,
|
|
27
27
|
requireAll: t,
|
|
28
28
|
children: s
|
|
29
|
-
}) => i(e)(r, t) ? /* @__PURE__ */ o(n, { children: s }) : null,
|
|
29
|
+
}) => i(e)(r, t) ? /* @__PURE__ */ o(n, { children: s }) : null, A = ({
|
|
30
30
|
accessWith: e,
|
|
31
31
|
requireAll: r,
|
|
32
32
|
baseUrl: t,
|
|
@@ -37,16 +37,16 @@ export {
|
|
|
37
37
|
R as AuthContext,
|
|
38
38
|
S as AuthProvider,
|
|
39
39
|
G as ERROR_MESSAGE,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
T as HasPermission,
|
|
41
|
+
A as PermissionRoute,
|
|
42
42
|
y as SaasThemeProvider,
|
|
43
43
|
H as TranslationProvider,
|
|
44
44
|
I as axiosInstance,
|
|
45
45
|
$ as color,
|
|
46
46
|
j as createCustomTheme,
|
|
47
47
|
i as getUseHasPermission,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
w as handleErrorAxios,
|
|
49
|
+
B as login,
|
|
50
50
|
F as logout,
|
|
51
51
|
M as responseInterceptor,
|
|
52
52
|
N as search,
|
package/package.json
CHANGED