@ukpc-lib/react 0.13.1-dev.2 → 0.13.1-dev.21

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.
Files changed (41) hide show
  1. package/dist/components/FavoriteMenu/components/MenuItem.d.ts +1 -0
  2. package/dist/components/GlobalMenu/data.json.d.ts +2627 -2582
  3. package/dist/components/Notification/NotificationList/components/NotitficationItem.d.ts +5 -2
  4. package/dist/components/Notification/NotificationList/components/query.d.ts +1 -1
  5. package/dist/components/Notification/models/NotiticationDto.d.ts +2 -2
  6. package/dist/components/PopUp/types.d.ts +1 -1
  7. package/dist/components/Topbar/index.d.ts +2 -0
  8. package/dist/components/index.cjs +21 -21
  9. package/dist/components/index.js +3282 -3303
  10. package/dist/components/main.d.ts +1 -0
  11. package/dist/index.esm2017-C_B_8-Rt.cjs +1078 -0
  12. package/dist/{index.esm2017-gn4YavpL.js → index.esm2017-DVluJw-p.js} +16555 -16215
  13. package/dist/share/AuthProvider/index.d.ts +4 -1
  14. package/dist/share/helpers/index.d.ts +1 -0
  15. package/dist/share/hooks/index.d.ts +1 -0
  16. package/dist/share/hooks/useSyncBackdrop.d.ts +4 -0
  17. package/dist/share/hooks/useSyncRouter.d.ts +1 -1
  18. package/dist/share/index.cjs +1 -1
  19. package/dist/share/index.js +86 -63
  20. package/package.json +1 -1
  21. package/web-components-bundle/SaasThemeProvider-8W2MaSUF.js +242 -0
  22. package/web-components-bundle/access-denied/index.js +2 -2
  23. package/web-components-bundle/base-breadcrumbs/index.js +4 -3
  24. package/web-components-bundle/favorite-menu/index.js +7 -6
  25. package/web-components-bundle/global-menu/index.js +6 -5
  26. package/web-components-bundle/global-topbar/index.js +9 -8
  27. package/web-components-bundle/has-permission/index.js +3 -3
  28. package/web-components-bundle/helpers/index.js +14 -0
  29. package/web-components-bundle/{index-Cx0zTfOC.js → index-BtUzqnTK.js} +11 -9
  30. package/web-components-bundle/{index-B8-7QZsi.js → index-CAmMT_XN.js} +1748 -1980
  31. package/web-components-bundle/{index-BbpYFIqc.js → index-CNRqfpBd.js} +25005 -24314
  32. package/web-components-bundle/{index-B2-j-GrO.js → index-DSTem_oO.js} +5 -4
  33. package/web-components-bundle/index.css +1 -0
  34. package/web-components-bundle/index2.css +1 -0
  35. package/web-components-bundle/page-not-found/index.js +4 -4
  36. package/web-components-bundle/{react-to-web-component-D7SoYMky.js → react-to-web-component-CXwKHjZr.js} +1527 -1535
  37. package/web-components-bundle/{react-toastify.esm-Y1WvK90L.js → react-toastify.esm-CrTD7cpE.js} +1 -1
  38. package/web-components-bundle/{setPrototypeOf-BVKdEITT.js → setPrototypeOf-CP0c5ut2.js} +2 -2
  39. package/web-components-bundle/toast-config/index.js +2 -2
  40. package/web-components-bundle/toast-config-notification/index.js +2 -2
  41. package/dist/index.esm2017-D_jfQoO6.cjs +0 -1078
@@ -32,9 +32,12 @@ type AuthContext = {
32
32
  login: () => void;
33
33
  logout: () => void;
34
34
  permissions: string[];
35
+ hasPermission: boolean;
35
36
  };
36
37
  export declare const AuthContext: import('react').Context<AuthContext>;
37
- type AuthProviderProps = PropsWithChildren<UseUserProps>;
38
+ type AuthProviderProps = PropsWithChildren<UseUserProps> & {
39
+ requiredPermissions?: string[];
40
+ };
38
41
  export declare const AuthProvider: (props: AuthProviderProps) => import("react/jsx-runtime").JSX.Element;
39
42
  export declare const useAuth: () => AuthContext;
40
43
  export {};
@@ -1 +1,2 @@
1
1
  export declare function search<T>(option: T, searchText: string, fields: Array<keyof T>): boolean;
2
+ export declare function setShellBackdrop(open: boolean): void;
@@ -1,2 +1,3 @@
1
1
  export * from './useGetPermission';
2
2
  export * from './useSyncRouter';
3
+ export * from './useSyncBackdrop';
@@ -0,0 +1,4 @@
1
+ export declare function useSyncBackdrop({ open, disabled, }: {
2
+ open: boolean;
3
+ disabled?: boolean;
4
+ }): void;
@@ -4,4 +4,4 @@ declare global {
4
4
  HostBridge?: any;
5
5
  }
6
6
  }
7
- export declare const useSyncRouter: () => void;
7
+ export declare const useSyncRouter: (basepath?: string) => void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index.esm2017-D_jfQoO6.cjs"),h=require("axios"),a=require("react"),u=require("react-router-dom"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");const l=o=>{const[s,t]=a.useState([]);return a.useEffect(()=>{h.get(`${o}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(e=>t(e.data)).catch(e=>{console.error("Getting user permission error:",e)})},[o]),s},m=()=>{const o=u.useNavigate(),s=u.useLocation();if(a.useEffect(()=>{const t={changeRoute:e=>{typeof e=="string"&&s.pathname+s.search+s.hash!==e&&o(e)}};window.MicrofeBridge=t},[o,s]),a.useEffect(()=>{var e,n;const t=s.pathname+s.search+s.hash;(n=(e=window.parent)==null?void 0:e.HostBridge)==null||n.childRouteChange(t)},[s]),window.self===window.top){console.log("useSyncRouter: Navigate to /app path"),window.location.href=window.location.href.replace(window.origin,`${window.origin}/app`);return}},c=o=>(s,t)=>{const e=l(o);return t?s.every(n=>e==null?void 0:e.includes(n)):s.some(n=>e==null?void 0:e.includes(n))},g=({baseUrl:o,accessWith:s,requireAll:t,children:e})=>c(o)(s,t)?i.jsx(i.Fragment,{children:e}):null,d=({accessWith:o,requireAll:s,baseUrl:t,unAuthorizedPath:e,children:n})=>c(t)(o,s)?i.jsx(i.Fragment,{children:n}):i.jsx(u.Navigate,{to:e,replace:!0});exports.AuthContext=r.AuthContext;exports.AuthProvider=r.AuthProvider;exports.ERROR_MESSAGE=r.ERROR_MESSAGE;exports.SaasThemeProvider=r.SaasThemeProvider;exports.TranslationProvider=r.TranslationProvider;exports.axiosInstance=r.axiosInstance;exports.color=r.color;exports.createCustomTheme=r.createCustomTheme;exports.handleErrorAxios=r.handleErrorAxios;exports.login=r.login;exports.logout=r.logout;exports.responseInterceptor=r.responseInterceptor;exports.search=r.search;exports.setFavicon=r.setFavicon;exports.translate=r.translate;exports.translationConfig=r.translationConfig;exports.useAuth=r.useAuth;exports.useCustomTranslation=r.useCustomTranslation;exports.useTheme=r.useTheme;exports.useTranslation=r.useTranslation$1;exports.HasPermission=g;exports.PermissionRoute=d;exports.getUseHasPermission=c;exports.useGetPermission=l;exports.useSyncRouter=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-C_B_8-Rt.cjs"),h=require("axios"),c=require("react"),l=require("react-router-dom"),u=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");const m=n=>{const[s,r]=c.useState([]);return c.useEffect(()=>{h.get(`${n}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(o=>r(o.data)).catch(o=>{console.error("Getting user permission error:",o)})},[n]),s},f=n=>{const s=l.useNavigate(),r=l.useLocation();console.log(" useSyncRouter.tsx ~ location1:",r,window.location.pathname);const o=(t=r)=>(n||"")+t.pathname+t.search+t.hash;if(c.useEffect(()=>{const t={changeRoute:i=>{const a=o();if(typeof i=="string"&&a!==i){console.log(" useSyncRouter.tsx ~ location2:",a,i);const g=n&&i.startsWith(n)?i.substring(n.length):i;s(g)}}};window.MicrofeBridge=t},[s,r]),c.useEffect(()=>{var i,a;const t=o();console.log("fullPath1",window.location.pathname,t),(a=(i=window.parent)==null?void 0:i.HostBridge)==null||a.childRouteChange(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 w({open:n,disabled:s}){c.useMemo(()=>{var r,o,t,i;s||(n?(o=(r=window.top)==null?void 0:r.HostBridge)==null||o.openBackdrop(!0):(i=(t=window.top)==null?void 0:t.HostBridge)==null||i.openBackdrop(!1))},[n,s])}const d=n=>(s,r)=>{const o=m(n);return r?s.every(t=>o==null?void 0:o.includes(t)):s.some(t=>o==null?void 0:o.includes(t))},P=({baseUrl:n,accessWith:s,requireAll:r,children:o})=>d(n)(s,r)?u.jsx(u.Fragment,{children:o}):null,p=({accessWith:n,requireAll:s,baseUrl:r,unAuthorizedPath:o,children:t})=>d(r)(n,s)?u.jsx(u.Fragment,{children:t}):u.jsx(l.Navigate,{to:o,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.setShellBackdrop=e.setShellBackdrop;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=P;exports.PermissionRoute=p;exports.getUseHasPermission=d;exports.useGetPermission=m;exports.useSyncBackdrop=w;exports.useSyncRouter=f;
@@ -1,82 +1,105 @@
1
- import { M as E, N as M, O as N, a0 as B, Y as G, a as H, c as $, Z as F, U as I, R as O, T as j, V as L, v as U, $ as V, t as X, W as Y, b as Z, u as _, g as b, X as k } from "../index.esm2017-gn4YavpL.js";
2
- import c from "axios";
3
- import { useState as m, useEffect as n } from "react";
4
- import { useNavigate as h, useLocation as l, Navigate as g } from "react-router-dom";
5
- import { jsx as a, Fragment as i } from "react/jsx-runtime";
1
+ import { O as F, R as M, T as G, a2 as N, $, a as I, c as O, a0 as j, W as z, U as L, V as U, X as V, v as W, a1 as X, s as Y, E as Z, Y as _, e as q, u as D, i as J, Z as K } from "../index.esm2017-DVluJw-p.js";
2
+ import d from "axios";
3
+ import { useState as g, useEffect as i, useMemo as h } from "react";
4
+ import { useNavigate as f, useLocation as w, Navigate as p } from "react-router-dom";
5
+ import { jsx as c, Fragment as u } from "react/jsx-runtime";
6
6
  import "@r2wc/react-to-web-component";
7
7
  import "@mui/material";
8
- const p = (o) => {
9
- const [s, t] = m([]);
10
- return n(() => {
11
- c.get(`${o}/user-management/api/v1/users/my-account/permissions`, {
8
+ const P = (s) => {
9
+ const [n, t] = g([]);
10
+ return i(() => {
11
+ d.get(`${s}/user-management/api/v1/users/my-account/permissions`, {
12
12
  withCredentials: !0
13
- }).then((e) => t(e.data)).catch((e) => {
14
- console.error("Getting user permission error:", e);
13
+ }).then((o) => t(o.data)).catch((o) => {
14
+ console.error("Getting user permission error:", o);
15
15
  });
16
- }, [o]), s;
17
- }, T = () => {
18
- const o = h(), s = l();
19
- if (n(() => {
20
- const t = {
21
- changeRoute: (e) => {
22
- typeof e == "string" && s.pathname + s.search + s.hash !== e && o(e);
16
+ }, [s]), n;
17
+ }, T = (s) => {
18
+ const n = f(), t = w();
19
+ console.log(
20
+ " useSyncRouter.tsx ~ location1:",
21
+ t,
22
+ window.location.pathname
23
+ );
24
+ const o = (e = t) => (s || "") + e.pathname + e.search + e.hash;
25
+ if (i(() => {
26
+ const e = {
27
+ changeRoute: (r) => {
28
+ const a = o();
29
+ if (typeof r == "string" && a !== r) {
30
+ console.log(" useSyncRouter.tsx ~ location2:", a, r);
31
+ const m = s && r.startsWith(s) ? r.substring(s.length) : r;
32
+ n(m);
33
+ }
23
34
  }
24
35
  };
25
- window.MicrofeBridge = t;
26
- }, [o, s]), n(() => {
27
- var e, r;
28
- const t = s.pathname + s.search + s.hash;
29
- (r = (e = window.parent) == null ? void 0 : e.HostBridge) == null || r.childRouteChange(t);
30
- }, [s]), window.self === window.top) {
36
+ window.MicrofeBridge = e;
37
+ }, [n, t]), i(() => {
38
+ var r, a;
39
+ const e = o();
40
+ console.log("fullPath1", window.location.pathname, e), (a = (r = window.parent) == null ? void 0 : r.HostBridge) == null || a.childRouteChange(e);
41
+ }, [t]), window.self === window.top) {
31
42
  console.log("useSyncRouter: Navigate to /app path"), window.location.href = window.location.href.replace(
32
43
  window.origin,
33
44
  `${window.origin}/app`
34
45
  );
35
46
  return;
36
47
  }
37
- }, u = (o) => (s, t) => {
38
- const e = p(o);
39
- return t ? s.every(
40
- (r) => e == null ? void 0 : e.includes(r)
41
- ) : s.some(
42
- (r) => e == null ? void 0 : e.includes(r)
48
+ };
49
+ function C({
50
+ open: s,
51
+ disabled: n
52
+ }) {
53
+ h(() => {
54
+ var t, o, e, r;
55
+ n || (s ? (o = (t = window.top) == null ? void 0 : t.HostBridge) == null || o.openBackdrop(!0) : (r = (e = window.top) == null ? void 0 : e.HostBridge) == null || r.openBackdrop(!1));
56
+ }, [s, n]);
57
+ }
58
+ const l = (s) => (n, t) => {
59
+ const o = P(s);
60
+ return t ? n.every(
61
+ (e) => o == null ? void 0 : o.includes(e)
62
+ ) : n.some(
63
+ (e) => o == null ? void 0 : o.includes(e)
43
64
  );
44
- }, C = ({
45
- baseUrl: o,
46
- accessWith: s,
65
+ }, E = ({
66
+ baseUrl: s,
67
+ accessWith: n,
47
68
  requireAll: t,
48
- children: e
49
- }) => u(o)(s, t) ? /* @__PURE__ */ a(i, { children: e }) : null, S = ({
50
- accessWith: o,
51
- requireAll: s,
69
+ children: o
70
+ }) => l(s)(n, t) ? /* @__PURE__ */ c(u, { children: o }) : null, A = ({
71
+ accessWith: s,
72
+ requireAll: n,
52
73
  baseUrl: t,
53
- unAuthorizedPath: e,
54
- children: r
55
- }) => u(t)(o, s) ? /* @__PURE__ */ a(i, { children: r }) : /* @__PURE__ */ a(g, { to: e, replace: !0 });
74
+ unAuthorizedPath: o,
75
+ children: e
76
+ }) => l(t)(s, n) ? /* @__PURE__ */ c(u, { children: e }) : /* @__PURE__ */ c(p, { to: o, replace: !0 });
56
77
  export {
57
- E as AuthContext,
78
+ F as AuthContext,
58
79
  M as AuthProvider,
59
- N as ERROR_MESSAGE,
60
- C as HasPermission,
61
- S as PermissionRoute,
62
- B as SaasThemeProvider,
63
- G as TranslationProvider,
64
- H as axiosInstance,
65
- $ as color,
66
- F as createCustomTheme,
67
- u as getUseHasPermission,
68
- I as handleErrorAxios,
69
- O as login,
70
- j as logout,
71
- L as responseInterceptor,
72
- U as search,
73
- V as setFavicon,
74
- X as translate,
75
- Y as translationConfig,
76
- Z as useAuth,
77
- _ as useCustomTranslation,
78
- p as useGetPermission,
80
+ G as ERROR_MESSAGE,
81
+ E as HasPermission,
82
+ A as PermissionRoute,
83
+ N as SaasThemeProvider,
84
+ $ as TranslationProvider,
85
+ I as axiosInstance,
86
+ O as color,
87
+ j as createCustomTheme,
88
+ l as getUseHasPermission,
89
+ z as handleErrorAxios,
90
+ L as login,
91
+ U as logout,
92
+ V as responseInterceptor,
93
+ W as search,
94
+ X as setFavicon,
95
+ Y as setShellBackdrop,
96
+ Z as translate,
97
+ _ as translationConfig,
98
+ q as useAuth,
99
+ D as useCustomTranslation,
100
+ P as useGetPermission,
101
+ C as useSyncBackdrop,
79
102
  T as useSyncRouter,
80
- b as useTheme,
81
- k as useTranslation
103
+ J as useTheme,
104
+ K as useTranslation
82
105
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ukpc-lib/react",
3
3
  "private": false,
4
- "version": "0.13.1-dev.2",
4
+ "version": "0.13.1-dev.21",
5
5
  "type": "module",
6
6
  "main": "./dist/",
7
7
  "module": "./dist/",
@@ -0,0 +1,242 @@
1
+ import { R as j, r as b } from "./react-to-web-component-CXwKHjZr.js";
2
+ function c() {
3
+ return c = Object.assign ? Object.assign.bind() : function(t) {
4
+ for (var e = 1; e < arguments.length; e++) {
5
+ var n = arguments[e];
6
+ for (var r in n)
7
+ ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
8
+ }
9
+ return t;
10
+ }, c.apply(null, arguments);
11
+ }
12
+ const S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
+ __proto__: null,
14
+ get default() {
15
+ return c;
16
+ }
17
+ }, Symbol.toStringTag, { value: "Module" }));
18
+ var T = typeof window > "u";
19
+ function E() {
20
+ }
21
+ function B(t, e) {
22
+ return typeof t == "function" ? t(e) : t;
23
+ }
24
+ function D(t) {
25
+ return typeof t == "number" && t >= 0 && t !== 1 / 0;
26
+ }
27
+ function y(t) {
28
+ return Array.isArray(t) ? t : [t];
29
+ }
30
+ function U(t, e) {
31
+ return Math.max(t + (e || 0) - Date.now(), 0);
32
+ }
33
+ function H(t, e, n) {
34
+ return l(t) ? typeof e == "function" ? c({}, n, {
35
+ queryKey: t,
36
+ queryFn: e
37
+ }) : c({}, e, {
38
+ queryKey: t
39
+ }) : t;
40
+ }
41
+ function L(t, e, n) {
42
+ return l(t) ? [c({}, e, {
43
+ queryKey: t
44
+ }), n] : [t || {}, e];
45
+ }
46
+ function K(t, e) {
47
+ if (t === !0 && e === !0 || t == null && e == null)
48
+ return "all";
49
+ if (t === !1 && e === !1)
50
+ return "none";
51
+ var n = t ?? !e;
52
+ return n ? "active" : "inactive";
53
+ }
54
+ function R(t, e) {
55
+ var n = t.active, r = t.exact, i = t.fetching, o = t.inactive, s = t.predicate, u = t.queryKey, f = t.stale;
56
+ if (l(u)) {
57
+ if (r) {
58
+ if (e.queryHash !== A(u, e.options))
59
+ return !1;
60
+ } else if (!m(e.queryKey, u))
61
+ return !1;
62
+ }
63
+ var a = K(n, o);
64
+ if (a === "none")
65
+ return !1;
66
+ if (a !== "all") {
67
+ var g = e.isActive();
68
+ if (a === "active" && !g || a === "inactive" && g)
69
+ return !1;
70
+ }
71
+ return !(typeof f == "boolean" && e.isStale() !== f || typeof i == "boolean" && e.isFetching() !== i || s && !s(e));
72
+ }
73
+ function V(t, e) {
74
+ var n = t.exact, r = t.fetching, i = t.predicate, o = t.mutationKey;
75
+ if (l(o)) {
76
+ if (!e.options.mutationKey)
77
+ return !1;
78
+ if (n) {
79
+ if (h(e.options.mutationKey) !== h(o))
80
+ return !1;
81
+ } else if (!m(e.options.mutationKey, o))
82
+ return !1;
83
+ }
84
+ return !(typeof r == "boolean" && e.state.status === "loading" !== r || i && !i(e));
85
+ }
86
+ function A(t, e) {
87
+ var n = (e == null ? void 0 : e.queryKeyHashFn) || h;
88
+ return n(t);
89
+ }
90
+ function h(t) {
91
+ var e = y(t);
92
+ return q(e);
93
+ }
94
+ function q(t) {
95
+ return JSON.stringify(t, function(e, n) {
96
+ return p(n) ? Object.keys(n).sort().reduce(function(r, i) {
97
+ return r[i] = n[i], r;
98
+ }, {}) : n;
99
+ });
100
+ }
101
+ function m(t, e) {
102
+ return F(y(t), y(e));
103
+ }
104
+ function F(t, e) {
105
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some(function(n) {
106
+ return !F(t[n], e[n]);
107
+ }) : !1;
108
+ }
109
+ function x(t, e) {
110
+ if (t === e)
111
+ return t;
112
+ var n = Array.isArray(t) && Array.isArray(e);
113
+ if (n || p(t) && p(e)) {
114
+ for (var r = n ? t.length : Object.keys(t).length, i = n ? e : Object.keys(e), o = i.length, s = n ? [] : {}, u = 0, f = 0; f < o; f++) {
115
+ var a = n ? f : i[f];
116
+ s[a] = x(t[a], e[a]), s[a] === t[a] && u++;
117
+ }
118
+ return r === o && u === r ? t : s;
119
+ }
120
+ return e;
121
+ }
122
+ function $(t, e) {
123
+ if (t && !e || e && !t)
124
+ return !1;
125
+ for (var n in t)
126
+ if (t[n] !== e[n])
127
+ return !1;
128
+ return !0;
129
+ }
130
+ function p(t) {
131
+ if (!v(t))
132
+ return !1;
133
+ var e = t.constructor;
134
+ if (typeof e > "u")
135
+ return !0;
136
+ var n = e.prototype;
137
+ return !(!v(n) || !n.hasOwnProperty("isPrototypeOf"));
138
+ }
139
+ function v(t) {
140
+ return Object.prototype.toString.call(t) === "[object Object]";
141
+ }
142
+ function l(t) {
143
+ return typeof t == "string" || Array.isArray(t);
144
+ }
145
+ function J(t) {
146
+ return new Promise(function(e) {
147
+ setTimeout(e, t);
148
+ });
149
+ }
150
+ function d(t) {
151
+ Promise.resolve().then(t).catch(function(e) {
152
+ return setTimeout(function() {
153
+ throw e;
154
+ });
155
+ });
156
+ }
157
+ function G() {
158
+ if (typeof AbortController == "function")
159
+ return new AbortController();
160
+ }
161
+ var w = /* @__PURE__ */ function() {
162
+ function t() {
163
+ this.queue = [], this.transactions = 0, this.notifyFn = function(n) {
164
+ n();
165
+ }, this.batchNotifyFn = function(n) {
166
+ n();
167
+ };
168
+ }
169
+ var e = t.prototype;
170
+ return e.batch = function(r) {
171
+ var i;
172
+ this.transactions++;
173
+ try {
174
+ i = r();
175
+ } finally {
176
+ this.transactions--, this.transactions || this.flush();
177
+ }
178
+ return i;
179
+ }, e.schedule = function(r) {
180
+ var i = this;
181
+ this.transactions ? this.queue.push(r) : d(function() {
182
+ i.notifyFn(r);
183
+ });
184
+ }, e.batchCalls = function(r) {
185
+ var i = this;
186
+ return function() {
187
+ for (var o = arguments.length, s = new Array(o), u = 0; u < o; u++)
188
+ s[u] = arguments[u];
189
+ i.schedule(function() {
190
+ r.apply(void 0, s);
191
+ });
192
+ };
193
+ }, e.flush = function() {
194
+ var r = this, i = this.queue;
195
+ this.queue = [], i.length && d(function() {
196
+ r.batchNotifyFn(function() {
197
+ i.forEach(function(o) {
198
+ r.notifyFn(o);
199
+ });
200
+ });
201
+ });
202
+ }, e.setNotifyFunction = function(r) {
203
+ this.notifyFn = r;
204
+ }, e.setBatchNotifyFunction = function(r) {
205
+ this.batchNotifyFn = r;
206
+ }, t;
207
+ }(), N = new w(), O = console;
208
+ function W() {
209
+ return O;
210
+ }
211
+ function _(t) {
212
+ O = t;
213
+ }
214
+ var M = j.unstable_batchedUpdates;
215
+ N.setBatchNotifyFunction(M);
216
+ var C = console;
217
+ _(C);
218
+ const P = b.createContext({}), X = () => b.useContext(P);
219
+ export {
220
+ c as _,
221
+ D as a,
222
+ N as b,
223
+ W as c,
224
+ V as d,
225
+ y as e,
226
+ B as f,
227
+ G as g,
228
+ A as h,
229
+ T as i,
230
+ H as j,
231
+ h as k,
232
+ m as l,
233
+ R as m,
234
+ E as n,
235
+ $ as o,
236
+ L as p,
237
+ S as q,
238
+ x as r,
239
+ J as s,
240
+ U as t,
241
+ X as u
242
+ };
@@ -1,5 +1,5 @@
1
- import "../react-to-web-component-D7SoYMky.js";
2
- import { U as e } from "../index-B2-j-GrO.js";
1
+ import "../react-to-web-component-CXwKHjZr.js";
2
+ import { U as e } from "../index-DSTem_oO.js";
3
3
  export {
4
4
  e as UnauthorizedPage
5
5
  };
@@ -1,5 +1,6 @@
1
- import "../react-to-web-component-D7SoYMky.js";
2
- import { aa as m } from "../index-B8-7QZsi.js";
1
+ import "../react-to-web-component-CXwKHjZr.js";
2
+ import { V as e } from "../index-CAmMT_XN.js";
3
+ import "../SaasThemeProvider-8W2MaSUF.js";
3
4
  export {
4
- m as BaseBreadcrumbs
5
+ e as BaseBreadcrumbs
5
6
  };
@@ -1,8 +1,9 @@
1
- import "../react-to-web-component-D7SoYMky.js";
2
- import { F as i, u as m } from "../index-BbpYFIqc.js";
3
- import "../index-Cx0zTfOC.js";
4
- import "../index-B8-7QZsi.js";
1
+ import "../react-to-web-component-CXwKHjZr.js";
2
+ import { F as p, u as a } from "../index-CNRqfpBd.js";
3
+ import "../index-BtUzqnTK.js";
4
+ import "../index-CAmMT_XN.js";
5
+ import "../SaasThemeProvider-8W2MaSUF.js";
5
6
  export {
6
- i as FavoriteMenu,
7
- m as updateFavoriteItems
7
+ p as FavoriteMenu,
8
+ a as updateFavoriteItems
8
9
  };
@@ -1,7 +1,8 @@
1
- import "../react-to-web-component-D7SoYMky.js";
2
- import { G as i } from "../index-BbpYFIqc.js";
3
- import "../index-Cx0zTfOC.js";
4
- import "../index-B8-7QZsi.js";
1
+ import "../react-to-web-component-CXwKHjZr.js";
2
+ import { G as a } from "../index-CNRqfpBd.js";
3
+ import "../index-BtUzqnTK.js";
4
+ import "../index-CAmMT_XN.js";
5
+ import "../SaasThemeProvider-8W2MaSUF.js";
5
6
  export {
6
- i as GlobalMenu
7
+ a as GlobalMenu
7
8
  };
@@ -1,12 +1,13 @@
1
- import "../react-to-web-component-D7SoYMky.js";
2
- import { L as n, T as s } from "../index-BbpYFIqc.js";
3
- import "../index-Cx0zTfOC.js";
4
- import "../index-B2-j-GrO.js";
5
- import "../index-B8-7QZsi.js";
6
- import "../react-toastify.esm-Y1WvK90L.js";
1
+ import "../react-to-web-component-CXwKHjZr.js";
2
+ import { L as s, T as L } from "../index-CNRqfpBd.js";
3
+ import "../index-BtUzqnTK.js";
4
+ import "../index-DSTem_oO.js";
5
+ import "../index-CAmMT_XN.js";
6
+ import "../SaasThemeProvider-8W2MaSUF.js";
7
+ import "../react-toastify.esm-CrTD7cpE.js";
7
8
  import "../toast-config/index.js";
8
9
  import "../toast-config-notification/index.js";
9
10
  export {
10
- n as LanguageDropdown,
11
- s as TopBar
11
+ s as LanguageDropdown,
12
+ L as TopBar
12
13
  };
@@ -1,6 +1,6 @@
1
- import "../react-to-web-component-D7SoYMky.js";
2
- import { H as e, g as m } from "../index-BbpYFIqc.js";
3
- import "../index-B8-7QZsi.js";
1
+ import "../react-to-web-component-CXwKHjZr.js";
2
+ import { H as e, g as m } from "../index-CNRqfpBd.js";
3
+ import "../SaasThemeProvider-8W2MaSUF.js";
4
4
  export {
5
5
  e as HasPermission,
6
6
  m as getUseHasPermission
@@ -0,0 +1,14 @@
1
+ function s(r, e, o) {
2
+ return o.some((t) => {
3
+ const n = r[t];
4
+ return String(n).toLowerCase().includes(e.toLowerCase());
5
+ });
6
+ }
7
+ function c(r) {
8
+ var e, o;
9
+ (o = (e = window.top) == null ? void 0 : e.HostBridge) == null || o.openBackdrop(r);
10
+ }
11
+ export {
12
+ s as search,
13
+ c as setShellBackdrop
14
+ };
@@ -1,16 +1,17 @@
1
- import { j as e, s as a } from "./react-to-web-component-D7SoYMky.js";
1
+ import { j as e, s as a } from "./react-to-web-component-CXwKHjZr.js";
2
+ import { u as s } from "./SaasThemeProvider-8W2MaSUF.js";
2
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}";
3
- function s({ children: t, styles: o = [], ...i }) {
4
+ function d({ children: t, styles: o = [], ...i }) {
4
5
  return /* @__PURE__ */ e.jsxs("div", { ...i, children: [
5
6
  [l, ...o].map((n, r) => /* @__PURE__ */ e.jsx("style", { type: "text/css", children: n }, r)),
6
7
  t
7
8
  ] });
8
9
  }
9
- const d = ".pnf-button-primary{font-size:14px;background-color:var(--primary300);color:var(--buttonText);padding:8px 24px;border-radius:4px;border:none;cursor:pointer;transition:background-color .25s cubic-bezier(.4,0,.2,1),box-shadow .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1),color .25s cubic-bezier(.4,0,.2,1)}.pnf-button-primary:hover{background-color:var(--buttonHover)}.pnf-container{padding-top:16px;padding-bottom:16px;gap:16px;display:flex;flex-direction:column;align-items:center;font-family:inherit}.pnf-content-wrapper{display:flex;flex-direction:column;gap:8px;align-items:center}.pnf-title{text-align:center;font-size:1.25rem;font-weight:500;margin:0}.pnf-description{text-align:center;color:#85858a;font-size:.875rem;font-weight:400;margin:0}", c = () => {
10
+ const c = ".pnf-button-primary{font-size:14px;background-color:var(--primary300);color:var(--buttonText);padding:8px 24px;border-radius:4px;border:none;cursor:pointer;transition:background-color .25s cubic-bezier(.4,0,.2,1),box-shadow .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1),color .25s cubic-bezier(.4,0,.2,1)}.pnf-button-primary:hover{background-color:var(--buttonHover)}.pnf-container{padding-top:16px;padding-bottom:16px;gap:16px;display:flex;flex-direction:column;align-items:center;font-family:inherit}.pnf-content-wrapper{display:flex;flex-direction:column;gap:8px;align-items:center}.pnf-title{text-align:center;font-size:1.25rem;font-weight:500;margin:0}.pnf-description{text-align:center;color:#85858a;font-size:.875rem;font-weight:400;margin:0}", p = () => {
10
11
  const t = () => {
11
12
  window.location.href = `${window.location.origin}/home`;
12
- };
13
- return console.log("window.location.origin", window.location.origin), /* @__PURE__ */ e.jsx(s, { styles: [d], children: /* @__PURE__ */ e.jsxs("div", { className: "pnf-container", children: [
13
+ }, { colors: o } = s();
14
+ return /* @__PURE__ */ e.jsx(d, { styles: [c], children: /* @__PURE__ */ e.jsxs("div", { className: "pnf-container", children: [
14
15
  /* @__PURE__ */ e.jsx(
15
16
  "img",
16
17
  {
@@ -31,18 +32,19 @@ const d = ".pnf-button-primary{font-size:14px;background-color:var(--primary300)
31
32
  "button",
32
33
  {
33
34
  className: "pnf-button-primary",
35
+ style: { backgroundColor: `${o.primary300}` },
34
36
  onClick: t,
35
37
  children: "Go to homepage"
36
38
  }
37
39
  )
38
40
  ] })
39
41
  ] }) });
40
- }, p = () => /* @__PURE__ */ e.jsx(c, {});
42
+ }, h = () => /* @__PURE__ */ e.jsx(p, {});
41
43
  {
42
- const t = a(p);
44
+ const t = a(h);
43
45
  customElements.define("page-not-found", t);
44
46
  }
45
47
  export {
46
- c as P,
47
- s as S
48
+ p as P,
49
+ d as S
48
50
  };