@ukpc-lib/react 0.9.13 → 0.10.1

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 e=require("../index.module-8d2829d5.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-7e4f51f2.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-5c6646b7.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-eda9cb3b.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,111 +1,111 @@
1
1
  {
2
- "name": "@ukpc-lib/react",
3
- "private": false,
4
- "version": "0.9.13",
5
- "type": "module",
6
- "main": "./dist/",
7
- "module": "./dist/",
8
- "exports": {
9
- "./components": {
10
- "import": "./dist/components/index.js",
11
- "require": "./dist/components/index.cjs",
12
- "types": "./dist/components/index.d.ts"
2
+ "name": "@ukpc-lib/react",
3
+ "private": false,
4
+ "version": "0.10.1",
5
+ "type": "module",
6
+ "main": "./dist/",
7
+ "module": "./dist/",
8
+ "exports": {
9
+ "./components": {
10
+ "import": "./dist/components/index.js",
11
+ "require": "./dist/components/index.cjs",
12
+ "types": "./dist/components/index.d.ts"
13
+ },
14
+ "./share": {
15
+ "import": "./dist/share/index.js",
16
+ "require": "./dist/share/index.cjs",
17
+ "types": "./dist/share/index.d.ts"
18
+ }
13
19
  },
14
- "./share": {
15
- "import": "./dist/share/index.js",
16
- "require": "./dist/share/index.cjs",
17
- "types": "./dist/share/index.d.ts"
18
- }
19
- },
20
- "typesVersions": {
21
- "*": {
22
- "*": [
23
- "./dist/*/index.d.ts"
24
- ]
25
- }
26
- },
27
- "files": [
28
- "dist",
29
- "web-components-bundle"
30
- ],
31
- "scripts": {
32
- "dev": "vite --open --port 3000",
33
- "build": "npm run build-react && npm run build-wc",
34
- "build-react": "tsc && vite build --config vite.config.react.ts",
35
- "build-wc": "tsc && vite build --config vite.config.wc.ts --mode production",
36
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
37
- "preview": "vite preview",
38
- "publish": "npm publish --access public",
39
- "build-publish": "npm run build && npm version patch && npm run build && npm run publish && git push"
40
- },
41
- "dependencies": {
42
- "@emotion/react": "^11.11.3",
43
- "@emotion/styled": "^11.11.0",
44
- "@minoru/react-dnd-treeview": "^3.4.4",
45
- "@mui/icons-material": "^5.15.4",
46
- "@mui/material": "^5.15.4",
47
- "@r2wc/react-to-web-component": "^2.0.3",
48
- "@rollup/plugin-replace": "^5.0.5",
49
- "axios": "1.6.2",
50
- "bootstrap-daterangepicker": "^3.1.0",
51
- "cssnano": "^6.0.3",
52
- "firebase": "^10.8.1",
53
- "framer-motion": "^10.18.0",
54
- "i18n": "^0.15.1",
55
- "i18next": "^22.5.1",
56
- "i18next-browser-languagedetector": "^7.2.0",
57
- "i18next-chained-backend": "^4.6.2",
58
- "i18next-http-backend": "^2.5.0",
59
- "jquery": "^3.7.1",
60
- "moment": "^2.30.1",
61
- "react-bootstrap-daterangepicker": "^8.0.0",
62
- "react-dnd": "^16.0.1",
63
- "react-i18next": "^12.3.1",
64
- "react-loading-skeleton": "^3.4.0",
65
- "react-query": "^3.39.3",
66
- "react-router-dom": "^6.21.3",
67
- "react-shadow": "^20.4.0",
68
- "react-svg": "^16.1.32",
69
- "react-toastify": "^10.0.4",
70
- "react-window": "^1.8.10",
71
- "react-window-infinite-loader": "^1.0.9",
72
- "simplebar-react": "^3.2.4",
73
- "usehooks-ts": "^2.15.1",
74
- "vite-plugin-css-injected-by-js": "^3.3.1"
75
- },
76
- "devDependencies": {
77
- "@types/node": "^20.8.10",
78
- "@types/react": "^18.2.15",
79
- "@types/react-dom": "^18.2.7",
80
- "@types/react-window-infinite-loader": "^1.0.9",
81
- "@typescript-eslint/eslint-plugin": "^6.0.0",
82
- "@typescript-eslint/parser": "^6.0.0",
83
- "@vitejs/plugin-react-swc": "^3.3.2",
84
- "autoprefixer": "^10.4.16",
85
- "eslint": "^8.45.0",
86
- "eslint-plugin-react-hooks": "^4.6.0",
87
- "eslint-plugin-react-refresh": "^0.4.3",
88
- "postcss": "^8.4.33",
89
- "prettier": "^3.0.3",
90
- "react": "^18.2.0",
91
- "react-dom": "^18.2.0",
92
- "tailwindcss": "^3.4.1",
93
- "typescript": "^5.0.2",
94
- "vite": "^4.5.1",
95
- "vite-plugin-css-injected-by-js": "^3.3.1",
96
- "vite-plugin-dts": "^3.7.0",
97
- "vite-plugin-lib-inject-css": "^1.3.0"
98
- },
99
- "peerDependencies": {
100
- "@mui/material": "^5.15.4",
101
- "react": "^18.2.0",
102
- "react-dom": "^18.2.0",
103
- "react-icons": "^5.0.1",
104
- "react-query": "^3.39.3",
105
- "react-router-dom": "^6.21.3",
106
- "tailwindcss": "^3.4.1"
107
- },
108
- "author": "Thinh Phung",
109
- "description": "React components library",
110
- "license": "ISC"
20
+ "typesVersions": {
21
+ "*": {
22
+ "*": [
23
+ "./dist/*/index.d.ts"
24
+ ]
25
+ }
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "web-components-bundle"
30
+ ],
31
+ "scripts": {
32
+ "dev": "vite --open --port 3000",
33
+ "build": "npm run build-react && npm run build-wc",
34
+ "build-react": "tsc && vite build --config vite.config.react.ts",
35
+ "build-wc": "tsc && vite build --config vite.config.wc.ts --mode production",
36
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
37
+ "preview": "vite preview",
38
+ "publish": "npm publish --access public",
39
+ "build-publish": "npm run build && npm version patch && npm run build && npm run publish && git push"
40
+ },
41
+ "dependencies": {
42
+ "@emotion/react": "^11.11.3",
43
+ "@emotion/styled": "^11.11.0",
44
+ "@minoru/react-dnd-treeview": "^3.4.4",
45
+ "@mui/icons-material": "^5.15.4",
46
+ "@mui/material": "^5.15.4",
47
+ "@r2wc/react-to-web-component": "^2.0.3",
48
+ "@rollup/plugin-replace": "^5.0.5",
49
+ "axios": "1.6.2",
50
+ "bootstrap-daterangepicker": "^3.1.0",
51
+ "cssnano": "^6.0.3",
52
+ "firebase": "^10.8.1",
53
+ "framer-motion": "^10.18.0",
54
+ "i18n": "^0.15.1",
55
+ "i18next": "^22.5.1",
56
+ "i18next-browser-languagedetector": "^7.2.0",
57
+ "i18next-chained-backend": "^4.6.2",
58
+ "i18next-http-backend": "^2.5.0",
59
+ "jquery": "^3.7.1",
60
+ "moment": "^2.30.1",
61
+ "react-bootstrap-daterangepicker": "^8.0.0",
62
+ "react-dnd": "^16.0.1",
63
+ "react-i18next": "^12.3.1",
64
+ "react-loading-skeleton": "^3.4.0",
65
+ "react-query": "^3.39.3",
66
+ "react-router-dom": "^6.21.3",
67
+ "react-shadow": "^20.4.0",
68
+ "react-svg": "^16.1.32",
69
+ "react-toastify": "^10.0.4",
70
+ "react-window": "^1.8.10",
71
+ "react-window-infinite-loader": "^1.0.9",
72
+ "simplebar-react": "^3.2.4",
73
+ "usehooks-ts": "^2.15.1",
74
+ "vite-plugin-css-injected-by-js": "^3.3.1"
75
+ },
76
+ "devDependencies": {
77
+ "@types/node": "^20.8.10",
78
+ "@types/react": "^18.2.15",
79
+ "@types/react-dom": "^18.2.7",
80
+ "@types/react-window-infinite-loader": "^1.0.9",
81
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
82
+ "@typescript-eslint/parser": "^6.0.0",
83
+ "@vitejs/plugin-react-swc": "^3.3.2",
84
+ "autoprefixer": "^10.4.16",
85
+ "eslint": "^8.45.0",
86
+ "eslint-plugin-react-hooks": "^4.6.0",
87
+ "eslint-plugin-react-refresh": "^0.4.3",
88
+ "postcss": "^8.4.33",
89
+ "prettier": "^3.0.3",
90
+ "react": "^18.2.0",
91
+ "react-dom": "^18.2.0",
92
+ "tailwindcss": "^3.4.1",
93
+ "typescript": "^5.0.2",
94
+ "vite": "^4.5.1",
95
+ "vite-plugin-css-injected-by-js": "^3.3.1",
96
+ "vite-plugin-dts": "^3.7.0",
97
+ "vite-plugin-lib-inject-css": "^1.3.0"
98
+ },
99
+ "peerDependencies": {
100
+ "@mui/material": "^5.15.4",
101
+ "react": "^18.2.0",
102
+ "react-dom": "^18.2.0",
103
+ "react-icons": "^5.0.1",
104
+ "react-query": "^3.39.3",
105
+ "react-router-dom": "^6.21.3",
106
+ "tailwindcss": "^3.4.1"
107
+ },
108
+ "author": "Thinh Phung",
109
+ "description": "React components library",
110
+ "license": "ISC"
111
111
  }
@@ -1,5 +1,5 @@
1
1
  import "../index-0de70dab.js";
2
- import { F as o, u as r } from "../index-9bece117.js";
2
+ import { F as o, u as r } from "../index-c429861b.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-9bece117.js";
2
+ import { G as e } from "../index-c429861b.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-9bece117.js";
2
+ import { L as p, T as e } from "../index-c429861b.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-9bece117.js";
2
+ import { H as o, g as r } from "../index-c429861b.js";
3
3
  export {
4
4
  o as HasPermission,
5
5
  r as getUseHasPermission