@ukpc-lib/react 0.10.4 → 0.10.5
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 +2 -2
- package/dist/components/index.js +12 -9
- package/dist/{index.module-d6a9a883.js → index.module-0d16ee2f.js} +7174 -7177
- package/dist/{index.module-a430742c.cjs → index.module-9fbc52eb.cjs} +87 -87
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +1 -1
- 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-bb27c011.js → index-54d2e9b8.js} +10 -7
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-9fbc52eb.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=r=>{const[t,o]=u.useState([]);return u.useEffect(()=>{m.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(s=>o(s.data)).catch(s=>{console.error("Getting user permission error:",s)})},[r]),t},a=r=>(t,o)=>{const s=c(r);return o?t.every(n=>s==null?void 0:s.includes(n)):t.some(n=>s==null?void 0:s.includes(n))},h=({baseUrl:r,accessWith:t,requireAll:o,children:s})=>a(r)(t,o)?i.jsx(i.Fragment,{children:s}):null,P=({accessWith:r,requireAll:t,baseUrl:o,unAuthorizedPath:s,children:n})=>a(o)(r,t)?i.jsx(i.Fragment,{children:n}):i.jsx(l.Navigate,{to:s,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.setFavicon=e.setFavicon;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 { M as R, N as S, O as G, a1 as y, Z as F, a as H, c as I, $ as M, U as N, R as O, T as $, V as j, t as w, a0 as U, X as V, W as X, b as Y, u as Z, g as _, Y as b } from "../index.module-
|
|
1
|
+
import { M as R, N as S, O as G, a1 as y, Z as F, a as H, c as I, $ as M, U as N, R as O, T as $, V as j, t as w, a0 as U, X as V, W as X, b as Y, u as Z, g as _, Y as b } from "../index.module-0d16ee2f.js";
|
|
2
2
|
import u from "axios";
|
|
3
3
|
import { useState as m, useEffect as c } from "react";
|
|
4
4
|
import { jsx as a, Fragment as n } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -16053,14 +16053,14 @@ function ute({
|
|
|
16053
16053
|
["a", "e", "t"].includes(M.key.toLowerCase()) && (I[0].addEventListener(
|
|
16054
16054
|
"click",
|
|
16055
16055
|
(B) => {
|
|
16056
|
-
const
|
|
16056
|
+
const b = document.querySelector("global-topbar"), z = b != null ? b.shadowRoot : document, H = z.getElementById("GlobalSearchInput");
|
|
16057
16057
|
z.activeElement === H ? (B.preventDefault(), B.stopPropagation(), console.log("Shadow DOM keydown:", B.key)) : B.click();
|
|
16058
16058
|
},
|
|
16059
16059
|
!0
|
|
16060
16060
|
), k != null && k.addEventListener(
|
|
16061
16061
|
"click",
|
|
16062
16062
|
(B) => {
|
|
16063
|
-
const
|
|
16063
|
+
const b = document.querySelector("global-topbar"), z = b != null ? b.shadowRoot : document, H = z.getElementById("GlobalSearchInput");
|
|
16064
16064
|
z.activeElement === H ? (B.preventDefault(), B.stopPropagation(), console.log("Shadow DOM keydown:", B.key)) : B.click();
|
|
16065
16065
|
},
|
|
16066
16066
|
!0
|
|
@@ -16086,11 +16086,14 @@ function ute({
|
|
|
16086
16086
|
autoFocus: i,
|
|
16087
16087
|
onBlur: () => r(),
|
|
16088
16088
|
onKeyDown: (E) => {
|
|
16089
|
-
if (E.key === "Enter"
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16089
|
+
if (E.key === "Enter") {
|
|
16090
|
+
const M = document.querySelector("global-topbar");
|
|
16091
|
+
if ((M != null ? M.shadowRoot : document).getElementById("selectedSearch") === null) {
|
|
16092
|
+
console.log("enter", E);
|
|
16093
|
+
const I = E.currentTarget.value;
|
|
16094
|
+
window.location.href = `${p}/stella/page/Search/Index?Term=${I}`;
|
|
16095
|
+
return;
|
|
16096
|
+
}
|
|
16094
16097
|
}
|
|
16095
16098
|
n({ event: E });
|
|
16096
16099
|
},
|