@ukpc-lib/react 0.16.3-dev.30 → 0.16.3-dev.31

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index.esm2017-OCkmXXXW.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index.esm2017-B2aVWYj3.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;
@@ -1,5 +1,5 @@
1
- import { V as U, R as D, W as R } from "../index.esm2017-xDlxTltM.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-xDlxTltM.js";
1
+ import { V as U, R as D, W as R } from "../index.esm2017-C6M7ujmD.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-C6M7ujmD.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@ukpc-lib/react",
3
3
  "private": false,
4
- "version": "0.16.3-dev.30",
4
+ "version": "0.16.3-dev.31",
5
5
  "type": "module",
6
6
  "main": "./dist/",
7
7
  "module": "./dist/",
@@ -1,4 +1,4 @@
1
- import { a as j, r as b } from "./react-to-web-component-w5r1Fs9q.js";
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,11 +1,11 @@
1
- import "../react-to-web-component-w5r1Fs9q.js";
2
- import { U as d } from "../index-DExLfEsI.js";
3
- import "../react-toastify.esm-H_Xdunfj.js";
1
+ import "../react-to-web-component-BOygDorD.js";
2
+ import { U as d } from "../index-BGG_-9rl.js";
3
+ import "../react-toastify.esm-DnABvuky.js";
4
4
  import "../toast-config/index.js";
5
5
  import "../toast-config-notification/index.js";
6
- import "../SaasThemeProvider-DUpoV8xb.js";
7
- import "../index-N6zjI_u_.js";
8
- import "../index-pbpRN1TP.js";
6
+ import "../SaasThemeProvider-A_eMJWqw.js";
7
+ import "../index-BwEhsh9S.js";
8
+ import "../index-DnQ4tn_A.js";
9
9
  export {
10
10
  d as UnauthorizedPage
11
11
  };
@@ -1,6 +1,6 @@
1
- import "../react-to-web-component-w5r1Fs9q.js";
2
- import { X as e } from "../index-pbpRN1TP.js";
3
- import "../SaasThemeProvider-DUpoV8xb.js";
1
+ import "../react-to-web-component-BOygDorD.js";
2
+ import { X as e } from "../index-DnQ4tn_A.js";
3
+ import "../SaasThemeProvider-A_eMJWqw.js";
4
4
  export {
5
5
  e as BaseBreadcrumbs
6
6
  };
@@ -1,11 +1,11 @@
1
- import "../react-to-web-component-w5r1Fs9q.js";
2
- import { F as u, u as F } from "../index-DExLfEsI.js";
3
- import "../index-N6zjI_u_.js";
4
- import "../index-pbpRN1TP.js";
5
- import "../react-toastify.esm-H_Xdunfj.js";
1
+ import "../react-to-web-component-BOygDorD.js";
2
+ import { F as u, u as F } from "../index-BGG_-9rl.js";
3
+ import "../index-BwEhsh9S.js";
4
+ import "../index-DnQ4tn_A.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-DUpoV8xb.js";
8
+ import "../SaasThemeProvider-A_eMJWqw.js";
9
9
  export {
10
10
  u as FavoriteMenu,
11
11
  F as updateFavoriteItems
@@ -1,8 +1,8 @@
1
- import "../react-to-web-component-w5r1Fs9q.js";
2
- import { G as i, a as e } from "../index-DExLfEsI.js";
3
- import "../index-N6zjI_u_.js";
4
- import "../index-pbpRN1TP.js";
5
- import "../SaasThemeProvider-DUpoV8xb.js";
1
+ import "../react-to-web-component-BOygDorD.js";
2
+ import { G as i, a as e } from "../index-BGG_-9rl.js";
3
+ import "../index-BwEhsh9S.js";
4
+ import "../index-DnQ4tn_A.js";
5
+ import "../SaasThemeProvider-A_eMJWqw.js";
6
6
  export {
7
7
  i as GlobalMenu,
8
8
  e as LanguageDropdown
@@ -1,9 +1,9 @@
1
- import "../react-to-web-component-w5r1Fs9q.js";
2
- import { L as n, T as s } from "../index-DExLfEsI.js";
3
- import "../index-N6zjI_u_.js";
4
- import "../index-pbpRN1TP.js";
5
- import "../SaasThemeProvider-DUpoV8xb.js";
6
- import "../react-toastify.esm-H_Xdunfj.js";
1
+ import "../react-to-web-component-BOygDorD.js";
2
+ import { L as n, T as s } from "../index-BGG_-9rl.js";
3
+ import "../index-BwEhsh9S.js";
4
+ import "../index-DnQ4tn_A.js";
5
+ import "../SaasThemeProvider-A_eMJWqw.js";
6
+ import "../react-toastify.esm-DnABvuky.js";
7
7
  import "../toast-config/index.js";
8
8
  import "../toast-config-notification/index.js";
9
9
  export {
@@ -1,5 +1,5 @@
1
- import "../react-to-web-component-w5r1Fs9q.js";
2
- import { H as o, g as r } from "../index-DExLfEsI.js";
1
+ import "../react-to-web-component-BOygDorD.js";
2
+ import { H as o, g as r } from "../index-BGG_-9rl.js";
3
3
  export {
4
4
  o as HasPermission,
5
5
  r as getUseHasPermission
@@ -1,12 +1,12 @@
1
1
  var b5 = Object.defineProperty;
2
2
  var w5 = (e, t, n) => t in e ? b5(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var wh = (e, t, n) => (w5(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { c as Yn, g as xl, r as A, j as R, R as Ve, a as xh, b as Eg, s as Qf, d as x5 } from "./react-to-web-component-w5r1Fs9q.js";
5
- import { _ as S5, a as vs, b as da, T as Rk, c as C5, s as T5, d as _5, e as Ik, f as kr, D as E5, g as kp, h as O5, i as Lk, r as D5, u as Tf, j as Pp, k as cC, l as ju, m as Sl, o as fC, n as k5, p as Fu, q as Zf, t as ur, C as P5, v as Nk, w as $k, x as Xr, B as M5, y as A5, z as jk, A as Fk, E as Og, F as Yb, G as Gc, H as R5, I as dC, J as I5, K as Sh, L as L5, M as Mp, N as N5, O as $5, P as Dn, Q as j5, R as n0, S as qb, U as Gb, V as F5, W as B5 } from "./index-pbpRN1TP.js";
6
- import { i as Ap, s as V5, _ as Oe, a as r0, f as U5, r as i0, n as Wn, t as Bk, e as H5, g as Vk, b as an, c as Rp, h as Uk, p as Yo, m as hC, d as pC, j as Zh, k as Ch, l as gC, o as W5 } from "./SaasThemeProvider-DUpoV8xb.js";
4
+ import { c as Yn, g as xl, r as A, j as R, R as Ve, a as xh, b as Eg, s as Qf, d as x5 } from "./react-to-web-component-BOygDorD.js";
5
+ import { _ as S5, a as vs, b as da, T as Rk, c as C5, s as T5, d as _5, e as Ik, f as kr, D as E5, g as kp, h as O5, i as Lk, r as D5, u as Tf, j as Pp, k as cC, l as ju, m as Sl, o as fC, n as k5, p as Fu, q as Zf, t as ur, C as P5, v as Nk, w as $k, x as Xr, B as M5, y as A5, z as jk, A as Fk, E as Og, F as Yb, G as Gc, H as R5, I as dC, J as I5, K as Sh, L as L5, M as Mp, N as N5, O as $5, P as Dn, Q as j5, R as n0, S as qb, U as Gb, V as F5, W as B5 } from "./index-DnQ4tn_A.js";
6
+ import { i as Ap, s as V5, _ as Oe, a as r0, f as U5, r as i0, n as Wn, t as Bk, e as H5, g as Vk, b as an, c as Rp, h as Uk, p as Yo, m as hC, d as pC, j as Zh, k as Ch, l as gC, o as W5 } from "./SaasThemeProvider-A_eMJWqw.js";
7
7
  import { c as Ks } from "./clsx-DB4S2d7J.js";
8
- import { S as Dg } from "./index-N6zjI_u_.js";
9
- import { B as Kb } from "./react-toastify.esm-H_Xdunfj.js";
8
+ import { S as Dg } from "./index-BwEhsh9S.js";
9
+ import { B as Kb } from "./react-toastify.esm-DnABvuky.js";
10
10
  import "./toast-config/index.js";
11
11
  import "./toast-config-notification/index.js";
12
12
  function z5(e, t) {
@@ -44444,9 +44444,7 @@ function bpe(e) {
44444
44444
  window.dispatchEvent(t);
44445
44445
  }
44446
44446
  function wpe(e) {
44447
- const t = Gb(), { user: n } = rM(), [r, i] = A.useState([]), s = r.map((ie) => ie.data), [o, a] = A.useState(!1), [u, f] = A.useState([]), [d, p] = A.useState(
44448
- Dp === null ? !0 : Dp === "true"
44449
- ), [v, y] = A.useState(window.innerWidth < 767), [S, w] = A.useState(!1), [E, _] = A.useState(window.location.href), P = A.useRef(null);
44447
+ const t = Gb(), { user: n } = rM(), [r, i] = A.useState([]), s = r.map((ie) => ie.data), [o, a] = A.useState(!1), [u, f] = A.useState([]), [d, p] = A.useState(window.innerWidth < 767), [v, y] = A.useState(() => window.innerWidth < 767 ? !1 : Dp === null ? !0 : Dp === "true"), [S, w] = A.useState(!1), [E, _] = A.useState(window.location.href), P = A.useRef(null);
44450
44448
  A.useEffect(() => {
44451
44449
  var ie;
44452
44450
  (ie = e.handleCallback) == null || ie.call(e, s);
@@ -44460,23 +44458,25 @@ function wpe(e) {
44460
44458
  );
44461
44459
  }, [t]), A.useEffect(() => {
44462
44460
  const ie = () => {
44463
- y(window.innerWidth < 767);
44461
+ const me = window.innerWidth < 767;
44462
+ p(me), me && v ? y(!1) : !me && !v && localStorage.getItem("isCollapsed") === "true" && y(!0);
44464
44463
  };
44465
44464
  return window.addEventListener("resize", ie), () => window.removeEventListener("resize", ie);
44466
- }, []), A.useEffect(() => {
44467
- c$(d, v);
44468
- }, [d, v]);
44465
+ }, [v]), A.useEffect(() => {
44466
+ c$(v, d);
44467
+ }, [v, d]);
44469
44468
  const D = Ak(s, E), [j, N] = ype({
44470
44469
  initOpenIds: e.initOpenIds
44471
44470
  }), B = () => {
44472
44471
  var ie, me;
44473
- if (p(!d), localStorage.setItem("isCollapsed", JSON.stringify(!d)), d)
44474
- j && ((ie = P.current) == null || ie.open(j));
44475
- else {
44476
- const _e = r.filter((Se) => Se.parent === 0).map((Se) => Se.id);
44477
- console.log("closeIds:", _e), (me = P.current) == null || me.close(_e);
44478
- }
44479
- }, [b, H] = A.useState(!1), U = d && !v ? "collapsed" : "expanded", Z = (ie) => `${ie} ${U}`, ce = A.useRef(null);
44472
+ if (!d)
44473
+ if (y(!v), localStorage.setItem("isCollapsed", JSON.stringify(!v)), v)
44474
+ j && ((ie = P.current) == null || ie.open(j));
44475
+ else {
44476
+ const _e = r.filter((Se) => Se.parent === 0).map((Se) => Se.id);
44477
+ console.log("closeIds:", _e), (me = P.current) == null || me.close(_e);
44478
+ }
44479
+ }, [b, H] = A.useState(!1), U = v && !d ? "collapsed" : "expanded", Z = (ie) => `${ie} ${U}`, ce = A.useRef(null);
44480
44480
  A.useLayoutEffect(() => {
44481
44481
  (async () => {
44482
44482
  var me, _e, Se;
@@ -44575,7 +44575,7 @@ function wpe(e) {
44575
44575
  const ie = (me) => {
44576
44576
  var qe;
44577
44577
  const _e = me, { path: Se } = _e.detail, We = Ak(s, Se).map((Be) => Be.id), Fe = ee.current.filter((Be) => We.includes(Be) ? !1 : !We.some((ke) => Y(s, Be, ke)));
44578
- console.log("idsToClose:", Fe), d || (qe = P.current) == null || qe.open(We), setTimeout(() => {
44578
+ console.log("idsToClose:", Fe), v || (qe = P.current) == null || qe.open(We), setTimeout(() => {
44579
44579
  var Be;
44580
44580
  (Be = P.current) == null || Be.close(Fe);
44581
44581
  }, 0), N(We);
@@ -44656,7 +44656,7 @@ function wpe(e) {
44656
44656
  {
44657
44657
  className: Z(
44658
44658
  // `side-bar`,
44659
- `side-bar${v ? " is-mobile" : ""}`
44659
+ `side-bar${d ? " is-mobile" : ""}`
44660
44660
  ),
44661
44661
  style: e.inlineMode ? {
44662
44662
  position: "relative",
@@ -44670,12 +44670,12 @@ function wpe(e) {
44670
44670
  flexDirection: "column"
44671
44671
  } : void 0,
44672
44672
  children: [
44673
- !v && /* @__PURE__ */ R.jsx("div", { className: Z("wrap-section side-bar__wrapper-toggle-btn"), children: /* @__PURE__ */ R.jsx(
44673
+ !d && /* @__PURE__ */ R.jsx("div", { className: Z("wrap-section side-bar__wrapper-toggle-btn"), children: /* @__PURE__ */ R.jsx(
44674
44674
  "button",
44675
44675
  {
44676
44676
  className: "icon-btn side-bar__toggle-btn",
44677
44677
  onClick: B,
44678
- children: d ? /* @__PURE__ */ R.jsx(hpe, {}) : /* @__PURE__ */ R.jsx(dpe, {})
44678
+ children: v ? /* @__PURE__ */ R.jsx(hpe, {}) : /* @__PURE__ */ R.jsx(dpe, {})
44679
44679
  }
44680
44680
  ) }),
44681
44681
  /* @__PURE__ */ R.jsx(
@@ -44689,7 +44689,7 @@ function wpe(e) {
44689
44689
  ref: ce,
44690
44690
  className: Z("wrap-section side-bar__menu"),
44691
44691
  style: {
44692
- marginTop: v ? 0 : 24,
44692
+ marginTop: d ? 0 : 24,
44693
44693
  flex: 1,
44694
44694
  overflow: "auto",
44695
44695
  height: "100%",
@@ -44742,7 +44742,7 @@ function wpe(e) {
44742
44742
  onClickItem: e.onClickItem,
44743
44743
  isInternalApp: e.isInternalApp,
44744
44744
  isActive: De,
44745
- isCollapsed: d,
44745
+ isCollapsed: v,
44746
44746
  replacePath: e.replacePath,
44747
44747
  ssr: e.ssr,
44748
44748
  brandColors: e.brandColors,
@@ -44779,7 +44779,7 @@ function wpe(e) {
44779
44779
  node: ie,
44780
44780
  depth: me,
44781
44781
  color: (_e = e.brandColors) == null ? void 0 : _e.primary300,
44782
- isCollapsed: d
44782
+ isCollapsed: v
44783
44783
  }
44784
44784
  );
44785
44785
  },
@@ -1,5 +1,5 @@
1
- import { j as e, s as a } from "./react-to-web-component-w5r1Fs9q.js";
2
- import { u as s } from "./SaasThemeProvider-DUpoV8xb.js";
1
+ import { j as e, s as a } from "./react-to-web-component-BOygDorD.js";
2
+ import { u as s } from "./SaasThemeProvider-A_eMJWqw.js";
3
3
  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}";
4
4
  function d({ children: t, styles: o = [], ...i }) {
5
5
  return /* @__PURE__ */ e.jsxs("div", { ...i, children: [