react-luminus-components 1.5.36 → 1.5.38

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/package.json CHANGED
@@ -1,123 +1,123 @@
1
- {
2
- "name": "react-luminus-components",
3
- "version": "1.5.36",
4
- "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
- "type": "module",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/BenefitCZ/react-luminus-components.git"
9
- },
10
- "author": "triskacik",
11
- "homepage": "https://github.com/BenefitCZ/react-luminus-components#readme",
12
- "main": "./dist/main.cjs.js",
13
- "module": "./dist/main.es.js",
14
- "typings": "./dist/main.d.ts",
15
- "exports": {
16
- ".": {
17
- "import": "./dist/main.es.js",
18
- "require": "./dist/main.cjs.js",
19
- "types": "./dist/main.d.ts"
20
- },
21
- "./layout": {
22
- "import": "./dist/layout.es.js",
23
- "require": "./dist/layout.cjs.js",
24
- "types": "./dist/layout.d.ts"
25
- },
26
- "./contexts": {
27
- "import": "./dist/contexts.es.js",
28
- "require": "./dist/contexts.cjs.js",
29
- "types": "./dist/contexts.d.ts"
30
- },
31
- "./hooks": {
32
- "import": "./dist/hooks.es.js",
33
- "require": "./dist/hooks.cjs.js",
34
- "types": "./dist/hooks.d.ts"
35
- },
36
- "./utils": {
37
- "import": "./dist/utils.es.js",
38
- "require": "./dist/utils.cjs.js",
39
- "types": "./dist/utils.d.ts"
40
- },
41
- "./types": "./dist/models/index.d.ts",
42
- "./styles": "./dist/style.css"
43
- },
44
- "files": [
45
- "dist"
46
- ],
47
- "scripts": {
48
- "build": "tsc && vite build",
49
- "build:watch": "tsc && vite build --watch",
50
- "dev": "vite",
51
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --cache",
52
- "compile": "tsc --noEmit",
53
- "deploy": "npm version patch -m \"chore: bump version to %s\" && npm ci && npm run build && npm publish && git push && git push --tags"
54
- },
55
- "peerDependencies": {
56
- "@azure/msal-browser": "^3.14.0",
57
- "@azure/msal-react": "^2.0.16",
58
- "@hookform/resolvers": "^3.3.4",
59
- "axios": "^1.6.8",
60
- "bootstrap": "^5.3.5",
61
- "flexmonster": "2.9.95",
62
- "react": ">=18",
63
- "react-bnf-table": "^1.4.19",
64
- "react-bootstrap": ">=2",
65
- "react-dom": ">=18",
66
- "react-flexmonster": "2.9.95",
67
- "react-hook-form": ">=7",
68
- "react-icons": "^5.0.1",
69
- "react-qrcode-logo": "^3.0.0",
70
- "react-responsive": "^10.0.0",
71
- "react-router-dom": ">=6",
72
- "zod": ">=3.22.4"
73
- },
74
- "dependencies": {
75
- "@nivo/bar": "^0.87.0",
76
- "@nivo/core": "^0.87.0",
77
- "@nivo/line": "^0.87.0",
78
- "@nivo/pie": "^0.87.0",
79
- "classnames": "^2.5.1",
80
- "date-fns": "^3.6.0",
81
- "latinize": "^2.0.0",
82
- "react-beautiful-dnd": "^13.1.1",
83
- "react-cookie": "^7.1.4",
84
- "react-helmet-async": "^2.0.5",
85
- "react-hot-toast": "^2.4.1",
86
- "react-number-format": "^5.4.0",
87
- "react-portal": "^4.2.2",
88
- "react-swipeable": "^7.0.2",
89
- "use-debounce": "^10.0.0",
90
- "uuid": "^9.0.1"
91
- },
92
- "devDependencies": {
93
- "@rollup/plugin-typescript": "^11.1.6",
94
- "@types/latinize": "^0.2.18",
95
- "@types/node": "^20.11.29",
96
- "@types/react": "^18.2.56",
97
- "@types/react-beautiful-dnd": "^13.1.8",
98
- "@types/react-dom": "^18.2.19",
99
- "@types/react-portal": "^4.0.7",
100
- "@types/uuid": "^9.0.8",
101
- "@typescript-eslint/eslint-plugin": "^7.3.1",
102
- "@typescript-eslint/parser": "^7.3.1",
103
- "@vitejs/plugin-react": "^4.2.1",
104
- "eslint": "^8.57.0",
105
- "eslint-config-airbnb": "^19.0.4",
106
- "eslint-config-airbnb-typescript": "^18.0.0",
107
- "eslint-config-prettier": "^9.1.0",
108
- "eslint-plugin-import": "^2.29.1",
109
- "eslint-plugin-jsx-a11y": "^6.8.0",
110
- "eslint-plugin-prettier": "^5.1.3",
111
- "eslint-plugin-react": "^7.34.1",
112
- "eslint-plugin-react-hooks": "^4.6.0",
113
- "eslint-plugin-react-refresh": "^0.4.6",
114
- "prettier": "^3.2.5",
115
- "rollup-plugin-typescript-paths": "^1.5.0",
116
- "sass-embedded": "^1.81.0",
117
- "sass-loader": "^14.1.1",
118
- "tslib": "^2.6.2",
119
- "typescript": "^5.2.2",
120
- "vite": "^5.1.4",
121
- "vite-plugin-dts": "^3.7.3"
122
- }
123
- }
1
+ {
2
+ "name": "react-luminus-components",
3
+ "version": "1.5.38",
4
+ "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/BenefitCZ/react-luminus-components.git"
9
+ },
10
+ "author": "triskacik",
11
+ "homepage": "https://github.com/BenefitCZ/react-luminus-components#readme",
12
+ "main": "./dist/main.cjs.js",
13
+ "module": "./dist/main.es.js",
14
+ "typings": "./dist/main.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/main.es.js",
18
+ "require": "./dist/main.cjs.js",
19
+ "types": "./dist/main.d.ts"
20
+ },
21
+ "./layout": {
22
+ "import": "./dist/layout.es.js",
23
+ "require": "./dist/layout.cjs.js",
24
+ "types": "./dist/layout.d.ts"
25
+ },
26
+ "./contexts": {
27
+ "import": "./dist/contexts.es.js",
28
+ "require": "./dist/contexts.cjs.js",
29
+ "types": "./dist/contexts.d.ts"
30
+ },
31
+ "./hooks": {
32
+ "import": "./dist/hooks.es.js",
33
+ "require": "./dist/hooks.cjs.js",
34
+ "types": "./dist/hooks.d.ts"
35
+ },
36
+ "./utils": {
37
+ "import": "./dist/utils.es.js",
38
+ "require": "./dist/utils.cjs.js",
39
+ "types": "./dist/utils.d.ts"
40
+ },
41
+ "./types": "./dist/models/index.d.ts",
42
+ "./styles": "./dist/style.css"
43
+ },
44
+ "files": [
45
+ "dist"
46
+ ],
47
+ "scripts": {
48
+ "build": "tsc && vite build",
49
+ "build:watch": "tsc && vite build --watch",
50
+ "dev": "vite",
51
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --cache",
52
+ "compile": "tsc --noEmit",
53
+ "deploy": "npm version patch -m \"chore: bump version to %s\" && npm ci && npm run build && npm publish && git push && git push --tags"
54
+ },
55
+ "peerDependencies": {
56
+ "@azure/msal-browser": "^3.14.0",
57
+ "@azure/msal-react": "^2.0.16",
58
+ "@hookform/resolvers": "^3.3.4",
59
+ "axios": "^1.6.8",
60
+ "bootstrap": "^5.3.5",
61
+ "flexmonster": "2.9.95",
62
+ "react": ">=18",
63
+ "react-bnf-table": "^1.4.19",
64
+ "react-bootstrap": ">=2",
65
+ "react-dom": ">=18",
66
+ "react-flexmonster": "2.9.95",
67
+ "react-hook-form": ">=7",
68
+ "react-icons": "^5.0.1",
69
+ "react-qrcode-logo": "^3.0.0",
70
+ "react-responsive": "^10.0.0",
71
+ "react-router-dom": ">=6",
72
+ "zod": ">=3.22.4"
73
+ },
74
+ "dependencies": {
75
+ "@nivo/bar": "^0.87.0",
76
+ "@nivo/core": "^0.87.0",
77
+ "@nivo/line": "^0.87.0",
78
+ "@nivo/pie": "^0.87.0",
79
+ "classnames": "^2.5.1",
80
+ "date-fns": "^3.6.0",
81
+ "latinize": "^2.0.0",
82
+ "react-beautiful-dnd": "^13.1.1",
83
+ "react-cookie": "^7.1.4",
84
+ "react-helmet-async": "^2.0.5",
85
+ "react-hot-toast": "^2.4.1",
86
+ "react-number-format": "^5.4.0",
87
+ "react-portal": "^4.2.2",
88
+ "react-swipeable": "^7.0.2",
89
+ "use-debounce": "^10.0.0",
90
+ "uuid": "^9.0.1"
91
+ },
92
+ "devDependencies": {
93
+ "@rollup/plugin-typescript": "^11.1.6",
94
+ "@types/latinize": "^0.2.18",
95
+ "@types/node": "^20.11.29",
96
+ "@types/react": "^18.2.56",
97
+ "@types/react-beautiful-dnd": "^13.1.8",
98
+ "@types/react-dom": "^18.2.19",
99
+ "@types/react-portal": "^4.0.7",
100
+ "@types/uuid": "^9.0.8",
101
+ "@typescript-eslint/eslint-plugin": "^7.3.1",
102
+ "@typescript-eslint/parser": "^7.3.1",
103
+ "@vitejs/plugin-react": "^4.2.1",
104
+ "eslint": "^8.57.0",
105
+ "eslint-config-airbnb": "^19.0.4",
106
+ "eslint-config-airbnb-typescript": "^18.0.0",
107
+ "eslint-config-prettier": "^9.1.0",
108
+ "eslint-plugin-import": "^2.29.1",
109
+ "eslint-plugin-jsx-a11y": "^6.8.0",
110
+ "eslint-plugin-prettier": "^5.1.3",
111
+ "eslint-plugin-react": "^7.34.1",
112
+ "eslint-plugin-react-hooks": "^4.6.0",
113
+ "eslint-plugin-react-refresh": "^0.4.6",
114
+ "prettier": "^3.2.5",
115
+ "rollup-plugin-typescript-paths": "^1.5.0",
116
+ "sass-embedded": "^1.81.0",
117
+ "sass-loader": "^14.1.1",
118
+ "tslib": "^2.6.2",
119
+ "typescript": "^5.2.2",
120
+ "vite": "^5.1.4",
121
+ "vite-plugin-dts": "^3.7.3"
122
+ }
123
+ }
@@ -1 +0,0 @@
1
- "use strict";const s=require("./ShortcutLinksContext-DL1kqHiR.cjs"),l="_loading_obchl_1",d="_spinner-grow_obchl_10",u="_second_obchl_14",_="_third_obchl_17",g="_loadingBlock_obchl_21",h="_sizeLine_obchl_29",m="_sizeFill_obchl_36",o={loading:l,"spinner-grow":"_spinner-grow_obchl_10",spinnerGrow:d,second:u,third:_,loadingBlock:g,sizeLine:h,sizeFill:m},x=()=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("luminus-loading",o.loading),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",o.spinnerGrow,"text-primary"),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",o.spinnerGrow,"text-primary",o.second),role:"status"}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("spinner-grow",o.spinnerGrow,"text-primary",o.third),role:"status"})]});function a(e,n){const t=s.toDate(e);if(isNaN(n))return s.constructFrom(e,NaN);if(!n)return t;const i=t.getDate(),r=s.constructFrom(e,t.getTime());r.setMonth(t.getMonth()+n+1,0);const c=r.getDate();return i>=c?r:(t.setFullYear(r.getFullYear(),r.getMonth(),i),t)}function p(e,n){return a(e,n*12)}const N=({children:e,disabled:n})=>s.jsxRuntimeExports.jsx(s.FormDisabledContext.Provider,{value:n,children:e});exports.FormDisabledProvider=N;exports.Loading=x;exports.addMonths=a;exports.addYears=p;exports.classes=o;
@@ -1 +0,0 @@
1
- "use strict";const S=require("./ShortcutLinksContext-DL1kqHiR.cjs"),t=require("react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const l={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},y=(e,{loadOnInit:s=l.loadOnInit,enabled:o=l.enabled,silent:a=l.silent,nullStateBeforeLoad:c=l.nullStateBeforeLoad,nullStateOnFail:i=l.nullStateOnFail,customApiUrl:r,customBearerToken:R,dataTransformer:g}=l)=>{const C=S.useAxios({silent:a,customToken:R,differentBaseUrl:r}),[k,L]=t.useState(0),{startLoading:D,stopLoading:b}=t.useContext(S.LoadingContext),I=t.useRef(0),{isAuthenticated:q}=S.useAuth(),[O,d]=t.useState(null),h=t.useRef(s??!1),u=t.useCallback(async(f,x)=>{if(!q()||o===!1)return null;L(n=>n+1),!a&&D(`loadData-${e}-${x}`),c&&d(null);let p;try{const n=await C.get(e,{signal:f}),A=g?g(n.data):n.data;d(A),p=A}catch(n){throw i&&d(null),n}finally{h.current=!1,L(n=>n-1),!a&&b(`loadData-${e}-${x}`)}return p},[q,o,a,D,e,c,C,g,i,b]),$=t.useCallback(async()=>{u()},[u]),w=t.useCallback(async()=>u(),[u]);return t.useEffect(()=>{if(s===!1)return;const f=new AbortController;return u(f.signal,++I.current),()=>{f.abort()}},[u,s]),{data:O,setData:d,reloadData:$,isLoading:h.current||k>0,reloadDataWithReturn:w}},m=(e,s)=>{const o=t.useCallback(()=>{const r=localStorage.getItem(e);return r!=null&&r!=="undefined"?JSON.parse(r):s},[s,e]),[a,c]=t.useState(o);t.useEffect(()=>{localStorage.setItem(e,JSON.stringify(a))},[e,a]);const i=t.useCallback(()=>{c(o)},[o]);return[a,c,i]};exports.useGetApiData=y;exports.useLocalStorageState=m;