@ukpc-lib/react 0.16.3-dev.24 → 0.16.3-dev.28
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/index.d.ts +4 -0
- package/dist/components/GlobalMenu/index.d.ts +5 -0
- package/dist/components/MenuTabs/index.d.ts +10 -0
- package/dist/components/Notification/Tabs/index.d.ts +1 -0
- package/dist/components/Topbar/icons/HamburgerIcon.d.ts +4 -0
- package/dist/components/Topbar/icons/SearchIcon.d.ts +7 -0
- package/dist/components/index.cjs +30 -18
- package/dist/components/index.js +2625 -2391
- package/dist/components/main.d.ts +1 -1
- package/dist/index.esm2017-3VZh0ET7.cjs +1078 -0
- package/dist/{index.esm2017-Caitdg72.js → index.esm2017-D50Frkuu.js} +13033 -12661
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +2 -2
- package/package.json +1 -1
- package/web-components-bundle/access-denied/index.js +2 -2
- package/web-components-bundle/base-breadcrumbs/index.js +1 -1
- package/web-components-bundle/favorite-menu/index.js +2 -2
- package/web-components-bundle/global-menu/index.js +4 -3
- package/web-components-bundle/global-topbar/index.js +2 -2
- package/web-components-bundle/has-permission/index.js +1 -1
- package/web-components-bundle/{index-Csm4KbjM.js → index-BoTC78z5.js} +24887 -24281
- package/web-components-bundle/{index-Dkof1OzO.js → index-pbpRN1TP.js} +5 -5
- package/dist/index.esm2017-Dd_pRw5E.cjs +0 -1078
package/dist/share/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index.esm2017-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index.esm2017-3VZh0ET7.cjs"),R=require("axios"),y=require("react"),U=require("react-router-dom"),g=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");require("react-query");require("react-dom");require("moment");const D=r=>{const[t,e]=y.useState([]);return y.useEffect(()=>{R.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(i=>e(i.data)).catch(i=>{console.error("Getting user permission error:",i)})},[r]),t},H=r=>{const t=U.useLocation();if(y.useEffect(()=>{var i,c;let e=t.pathname+t.search+t.hash;r&&!e.includes(r)&&(e=r+e),console.log("🚀 ~ PrivateLayout.tsx ~ fullPath:",e),(c=(i=window.top)==null?void 0:i.shellNavigate)==null||c.call(i,"/app"+e,{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 $({open:r,disabled:t}){y.useMemo(()=>{var e,i,c,u;t||(r?(i=(e=window.top)==null?void 0:e.HostBridge)==null||i.openBackdrop(!0):(u=(c=window.top)==null?void 0:c.HostBridge)==null||u.openBackdrop(!1))},[r,t])}const k=(r,t)=>(e,i)=>{const u=o.useUserPermissions({axiosInstance:t,baseUrl:r}).data;return u?i?e.every(f=>u==null?void 0:u.includes(f)):e.some(f=>u==null?void 0:u.includes(f)):!1},M=({baseUrl:r,accessWith:t,requireAll:e,children:i})=>k(r)(t,e)?g.jsx(g.Fragment,{children:i}):null,q=({accessWith:r,requireAll:t,baseUrl:e,children:i})=>k(e)(r,t)?g.jsx(g.Fragment,{children:i}):g.jsx(o.UnauthorizedPage,{});var p={},I;function z(){if(I)return p;I=1,Object.defineProperty(p,"__esModule",{value:!0}),p.parse=f,p.serialize=_;const r=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,e=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,c=Object.prototype.toString,u=(()=>{const s=function(){};return s.prototype=Object.create(null),s})();function f(s,l){const n=new u,h=s.length;if(h<2)return n;const w=(l==null?void 0:l.decode)||b;let a=0;do{const d=s.indexOf("=",a);if(d===-1)break;const E=s.indexOf(";",a),S=E===-1?h:E;if(d>S){a=s.lastIndexOf(";",d-1)+1;continue}const v=m(s,a,d),j=x(s,d,v),T=s.slice(v,j);if(n[T]===void 0){let P=m(s,d+1,S),L=x(s,S,P);const N=w(s.slice(P,L));n[T]=N}a=S+1}while(a<h);return n}function m(s,l,n){do{const h=s.charCodeAt(l);if(h!==32&&h!==9)return l}while(++l<n);return n}function x(s,l,n){for(;l>n;){const h=s.charCodeAt(--l);if(h!==32&&h!==9)return l+1}return n}function _(s,l,n){const h=(n==null?void 0:n.encode)||encodeURIComponent;if(!r.test(s))throw new TypeError(`argument name is invalid: ${s}`);const w=h(l);if(!t.test(w))throw new TypeError(`argument val is invalid: ${l}`);let a=s+"="+w;if(!n)return a;if(n.maxAge!==void 0){if(!Number.isInteger(n.maxAge))throw new TypeError(`option maxAge is invalid: ${n.maxAge}`);a+="; Max-Age="+n.maxAge}if(n.domain){if(!e.test(n.domain))throw new TypeError(`option domain is invalid: ${n.domain}`);a+="; Domain="+n.domain}if(n.path){if(!i.test(n.path))throw new TypeError(`option path is invalid: ${n.path}`);a+="; Path="+n.path}if(n.expires){if(!A(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.partitioned&&(a+="; Partitioned"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():void 0){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"none":a+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}return a}function b(s){if(s.indexOf("%")===-1)return s;try{return decodeURIComponent(s)}catch{return s}}function A(s){return c.call(s)==="[object Date]"}return p}var O=z();function B(){const r=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof r=="boolean"?r:typeof document=="object"&&typeof document.cookie=="string"}function K(r){return typeof r=="string"?O.parse(r):typeof r=="object"&&r!==null?r:{}}function C(r,t={}){const e=V(r);if(!t.doNotParse)try{return JSON.parse(e)}catch{}return r}function V(r){return r&&r[0]==="j"&&r[1]===":"?r.substr(2):r}class F{constructor(t,e={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const c=this.cookies;this.cookies=O.parse(document.cookie),this._checkChanges(c)};const i=typeof document>"u"?"":document.cookie;this.cookies=K(t||i),this.defaultSetOptions=e,this.HAS_DOCUMENT_COOKIE=B()}_emitChange(t){for(let e=0;e<this.changeListeners.length;++e)this.changeListeners[e](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(i=>{t[i]!==this.cookies[i]&&this._emitChange({name:i,value:C(this.cookies[i])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,e={}){return e.doNotUpdate||this.update(),C(this.cookies[t],e)}getAll(t={}){t.doNotUpdate||this.update();const e={};for(let i in this.cookies)e[i]=C(this.cookies[i],t);return e}set(t,e,i){i?i=Object.assign(Object.assign({},this.defaultSetOptions),i):i=this.defaultSetOptions;const c=typeof e=="string"?e:JSON.stringify(e);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:c}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=O.serialize(t,c,i)),this._emitChange({name:t,value:e,options:i})}remove(t,e){const i=e=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),e),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=O.serialize(t,"",i)),this._emitChange({name:t,value:void 0,options:e})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const e=this.changeListeners.indexOf(t);e>=0&&this.changeListeners.splice(e,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}removeAllChangeListeners(){for(;this.changeListeners.length>0;)this.removeChangeListener(this.changeListeners[0])}}const G=r=>{const t=new F;let i=new URLSearchParams(window.location.search).get("tenantId")||t.get("tenantId");const c=t.get("accessToken")||null;if(console.log("ThemeProvider1:tenantId",i),!i&&c){const f=atob(c.split(".")[1]),m=JSON.parse(f);i=m.tenantId?m.tenantId.toString():null}console.log("ThemeProvider2:tenantId",i);const u=r.isBrand||i!=null?r.viteThemeUrl:"";return console.log("themeUrl",u),g.jsx(o.SaasThemeProvider,{brandTheme:{enabled:!!u,url:u},children:r.children})};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=M;exports.PermissionRoute=q;exports.ThemeProvider=G;exports.getUseHasPermission=k;exports.useGetPermission=D;exports.useSyncBackdrop=$;exports.useSyncRouter=H;
|
package/dist/share/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { V as U, R as D, W as R } from "../index.esm2017-D50Frkuu.js";
|
|
2
|
+
import { X as he, Y as de, Z as fe, a5 as ge, a as me, c as pe, a6 as we, a1 as Oe, $ as Se, a0 as ye, a2 as ke, y as Ce, a7 as xe, s as Ee, t as ve, a3 as Ie, g as Te, u as _e, m as be, a4 as Pe } from "../index.esm2017-D50Frkuu.js";
|
|
3
3
|
import $ from "axios";
|
|
4
4
|
import { useState as H, useEffect as I, useMemo as M } from "react";
|
|
5
5
|
import { useLocation as z } from "react-router-dom";
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { U as d } from "../index-
|
|
2
|
+
import { U as d } from "../index-BoTC78z5.js";
|
|
3
3
|
import "../react-toastify.esm-H_Xdunfj.js";
|
|
4
4
|
import "../toast-config/index.js";
|
|
5
5
|
import "../toast-config-notification/index.js";
|
|
6
6
|
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
7
7
|
import "../index-N6zjI_u_.js";
|
|
8
|
-
import "../index-
|
|
8
|
+
import "../index-pbpRN1TP.js";
|
|
9
9
|
export {
|
|
10
10
|
d as UnauthorizedPage
|
|
11
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { F as u, u as F } from "../index-
|
|
2
|
+
import { F as u, u as F } from "../index-BoTC78z5.js";
|
|
3
3
|
import "../index-N6zjI_u_.js";
|
|
4
|
-
import "../index-
|
|
4
|
+
import "../index-pbpRN1TP.js";
|
|
5
5
|
import "../react-toastify.esm-H_Xdunfj.js";
|
|
6
6
|
import "../toast-config/index.js";
|
|
7
7
|
import "../toast-config-notification/index.js";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { G as a } from "../index-
|
|
2
|
+
import { G as i, a as e } from "../index-BoTC78z5.js";
|
|
3
3
|
import "../index-N6zjI_u_.js";
|
|
4
|
-
import "../index-
|
|
4
|
+
import "../index-pbpRN1TP.js";
|
|
5
5
|
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
i as GlobalMenu,
|
|
8
|
+
e as LanguageDropdown
|
|
8
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { L as n, T as s } from "../index-
|
|
2
|
+
import { L as n, T as s } from "../index-BoTC78z5.js";
|
|
3
3
|
import "../index-N6zjI_u_.js";
|
|
4
|
-
import "../index-
|
|
4
|
+
import "../index-pbpRN1TP.js";
|
|
5
5
|
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
6
6
|
import "../react-toastify.esm-H_Xdunfj.js";
|
|
7
7
|
import "../toast-config/index.js";
|