@ukpc-lib/react 0.9.7 → 0.9.8

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.
@@ -5345,7 +5345,7 @@ const uy = {
5345
5345
  }
5346
5346
  )
5347
5347
  }
5348
- ), OT = (e) => {
5348
+ ), OT = (e, t) => {
5349
5349
  Dn.success(e, {
5350
5350
  icon: /* @__PURE__ */ rt(zL, {}),
5351
5351
  bodyStyle: {},
@@ -5355,9 +5355,10 @@ const uy = {
5355
5355
  background: _i.successLight,
5356
5356
  borderColor: _i.success,
5357
5357
  color: _i.success
5358
- }
5358
+ },
5359
+ ...t
5359
5360
  });
5360
- }, zp = (e) => {
5361
+ }, zp = (e, t) => {
5361
5362
  Dn.error(e, {
5362
5363
  icon: /* @__PURE__ */ rt(WL, {}),
5363
5364
  position: "bottom-right",
@@ -5366,9 +5367,10 @@ const uy = {
5366
5367
  background: _i.dangerLight,
5367
5368
  borderColor: _i.danger,
5368
5369
  color: _i.danger
5369
- }
5370
+ },
5371
+ ...t
5370
5372
  });
5371
- }, r7 = (e) => {
5373
+ }, r7 = (e, t) => {
5372
5374
  Dn.error(e, {
5373
5375
  icon: /* @__PURE__ */ rt(YL, {}),
5374
5376
  position: "bottom-right",
@@ -5377,7 +5379,8 @@ const uy = {
5377
5379
  background: _i.warningLight,
5378
5380
  borderColor: _i.warning,
5379
5381
  color: _i.warning
5380
- }
5382
+ },
5383
+ ...t
5381
5384
  });
5382
5385
  }, i7 = (e) => {
5383
5386
  Dn(e, {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.module-6d60e484.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.module-1418394f.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;
@@ -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-46a42fa7.js";
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-242ff528.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ukpc-lib/react",
3
3
  "private": false,
4
- "version": "0.9.7",
4
+ "version": "0.9.8",
5
5
  "type": "module",
6
6
  "main": "./dist/",
7
7
  "module": "./dist/",
@@ -1,5 +1,5 @@
1
1
  import "../index-0de70dab.js";
2
- import { F as o, u as r } from "../index-e58f711d.js";
2
+ import { F as o, u as r } from "../index-dee8a2ec.js";
3
3
  export {
4
4
  o as FavoriteMenu,
5
5
  r as updateFavoriteItems
@@ -1,5 +1,5 @@
1
1
  import "../index-0de70dab.js";
2
- import { G as e } from "../index-e58f711d.js";
2
+ import { G as e } from "../index-dee8a2ec.js";
3
3
  export {
4
4
  e as GlobalMenu
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import "../index-0de70dab.js";
2
- import { L as p, T as e } from "../index-e58f711d.js";
2
+ import { L as p, T as e } from "../index-dee8a2ec.js";
3
3
  export {
4
4
  p as LanguageDropdown,
5
5
  e as TopBar
@@ -1,5 +1,5 @@
1
1
  import "../index-0de70dab.js";
2
- import { H as o, g as r } from "../index-e58f711d.js";
2
+ import { H as o, g as r } from "../index-dee8a2ec.js";
3
3
  export {
4
4
  o as HasPermission,
5
5
  r as getUseHasPermission