react-luminus-components 1.5.4 → 1.5.6

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 (60) hide show
  1. package/README.md +349 -349
  2. package/dist/.vite/manifest.json +36 -36
  3. package/dist/{FormDisabledProvider-Dko54lPr.js → FormDisabledProvider-CB-JXGnI.js} +5 -5
  4. package/dist/FormDisabledProvider-DtQ7YOqf.cjs +1 -0
  5. package/dist/ShortcutLinksContext-AgOPPcPf.cjs +281 -0
  6. package/dist/{nivo-bar.es-CTjPolEf.js → ShortcutLinksContext-CNZMOV_j.js} +6925 -6887
  7. package/dist/components/ShortcutLinks/ShortcutLinksSetup/comps/ShortcutLinkSetupItem/comps/ShortcutLinkItemEdit/ShortcutLinkItemEdit.d.ts +2 -1
  8. package/dist/components/UserSettings/FileDownloadUS/FileDownloadUS.d.ts +1 -3
  9. package/dist/components/common/Approvals/Approvals/Approvals.d.ts +17 -0
  10. package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/ApprovalDetail.d.ts +12 -0
  11. package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalDelegations/ApprovalDelegations.d.ts +9 -0
  12. package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalLevel/ApprovalLevel.d.ts +11 -0
  13. package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalLevel/comps/ChangeEmployeeModal/ChangeEmployeeModal.d.ts +13 -0
  14. package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/ApprovalLevel/comps/index.d.ts +1 -0
  15. package/dist/components/common/Approvals/Approvals/comps/ApprovalDetail/comps/index.d.ts +2 -0
  16. package/dist/components/common/Approvals/Approvals/comps/index.d.ts +1 -0
  17. package/dist/components/common/Approvals/Delegations/ApprovalsDelegations.d.ts +16 -0
  18. package/dist/components/common/Approvals/Delegations/comps/DelegationModal/DelegationModal.d.ts +14 -0
  19. package/dist/components/common/Approvals/Delegations/comps/DelegationModal/hooks/useDelegationModalApi.d.ts +8 -0
  20. package/dist/components/common/Approvals/Delegations/comps/DelegationsTable/DelegationsTable.d.ts +10 -0
  21. package/dist/components/common/Approvals/Delegations/comps/index.d.ts +2 -0
  22. package/dist/components/common/SettingsFormPicker/SettingsFormPicker.d.ts +4 -3
  23. package/dist/components/common/index.d.ts +2 -0
  24. package/dist/contexts.cjs.js +1 -1
  25. package/dist/contexts.es.js +64 -64
  26. package/dist/hooks.cjs.js +1 -1
  27. package/dist/hooks.es.js +47 -47
  28. package/dist/layout.cjs.js +1 -1
  29. package/dist/layout.es.js +23 -23
  30. package/dist/localStorageUtils-CBQuZzg0.cjs +1 -0
  31. package/dist/localStorageUtils-DBNNyBcc.js +57 -0
  32. package/dist/main.cjs.js +60 -60
  33. package/dist/main.d.ts +1 -0
  34. package/dist/main.es.js +9679 -9408
  35. package/dist/models/api/approval/ApprovalDefinitionIndexModel.d.ts +6 -0
  36. package/dist/models/api/approval/ApprovalDefinitionLevelApproverModel.d.ts +7 -0
  37. package/dist/models/api/approval/ApprovalDefinitionLevelModel.d.ts +8 -0
  38. package/dist/models/api/approval/ApprovalDefinitionModel.d.ts +8 -0
  39. package/dist/models/api/approval/ApprovalDelegationModel.d.ts +12 -0
  40. package/dist/models/index.d.ts +7 -1
  41. package/dist/models/texts/ApprovalTexts.d.ts +44 -0
  42. package/dist/models/types/EmployeePickerBaseProps.d.ts +8 -0
  43. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormGroup.d.ts +1 -1
  44. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +0 -1
  45. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItemWithGroup.d.ts +6 -0
  46. package/dist/models/types/dynamicForms/index.d.ts +1 -0
  47. package/dist/style.css +1 -1
  48. package/dist/useLocalStorageState-B_unZcbQ.cjs +1 -0
  49. package/dist/{useLocalStorageState-BpK3wMPU.js → useLocalStorageState-Uqlj_lt1.js} +10 -10
  50. package/dist/utils/constants/CommonLuminusIconsArray.d.ts +1 -1
  51. package/dist/utils/file/fileUtils.d.ts +2 -0
  52. package/dist/utils.cjs.js +1 -1
  53. package/dist/utils.es.js +80 -85
  54. package/dist/variables.scss +165 -165
  55. package/package.json +123 -123
  56. package/dist/FormDisabledProvider-DEnF17ZC.cjs +0 -1
  57. package/dist/localStorageUtils-CHdu9Xvf.js +0 -46
  58. package/dist/localStorageUtils-DUQHXXBp.cjs +0 -1
  59. package/dist/nivo-bar.es-BBwBFH2s.cjs +0 -281
  60. package/dist/useLocalStorageState-BrwcXD6Y.cjs +0 -1
package/package.json CHANGED
@@ -1,123 +1,123 @@
1
- {
2
- "name": "react-luminus-components",
3
- "version": "1.5.4",
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 run build && npm version patch -m \"chore: bump version to %s\" && 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.6",
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 run build && npm version patch -m \"chore: bump version to %s\" && 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("./nivo-bar.es-BBwBFH2s.cjs"),c="_loading_obchl_1",d="_spinner-grow_obchl_10",_="_second_obchl_14",u="_third_obchl_17",g="_loadingBlock_obchl_21",h="_sizeLine_obchl_29",m="_sizeFill_obchl_36",o={loading:c,"spinner-grow":"_spinner-grow_obchl_10",spinnerGrow:d,second:_,third:u,loadingBlock:g,sizeLine:h,sizeFill:m},p=()=>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 r=s.toDate(e);if(isNaN(n))return s.constructFrom(e,NaN);if(!n)return r;const i=r.getDate(),t=s.constructFrom(e,r.getTime());t.setMonth(r.getMonth()+n+1,0);const l=t.getDate();return i>=l?t:(r.setFullYear(t.getFullYear(),t.getMonth(),i),r)}function x(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=p;exports.addMonths=a;exports.addYears=x;exports.classes=o;
@@ -1,46 +0,0 @@
1
- import { generatePath as u } from "react-router-dom";
2
- const S = (o, t, r) => {
3
- let e = o;
4
- return t !== void 0 && (e = Math.max(e, t)), r !== void 0 && (e = Math.min(e, r)), e;
5
- }, i = (o, t, r = !0) => Object.keys(o).reduce((e, n) => {
6
- const c = o[n];
7
- return r && (c == null || c === "") || (e[n] = t(c, n)), e;
8
- }, {}), g = (o, t) => {
9
- const r = t != null && t.query ? new URLSearchParams(i(t.query, (e) => (e == null ? void 0 : e.toString()) ?? "")) : null;
10
- return `${u(o, t != null && t.path ? i(t.path, (e) => (e == null ? void 0 : e.toString()) ?? null) : void 0)}${r && r.size > 0 ? `?${r.toString()}` : ""}`;
11
- }, l = [
12
- { key: "msal", mode: "includes" },
13
- { key: "token", mode: "exact" },
14
- { key: "user", mode: "exact" },
15
- { key: "user-delegation", mode: "exact" }
16
- ], a = (o = !0) => {
17
- const t = {};
18
- for (let r = 0; r < localStorage.length; r++) {
19
- const e = localStorage.key(r);
20
- if (e && !(o && l.some(({ key: n, mode: c }) => c === "includes" ? e.includes(n) : e === n)))
21
- try {
22
- t[e] = JSON.parse(localStorage.getItem(e));
23
- } catch {
24
- t[e] = localStorage.getItem(e);
25
- }
26
- }
27
- return t;
28
- }, d = (o) => {
29
- try {
30
- const t = JSON.parse(o);
31
- if (typeof t != "object" || t === null)
32
- return !1;
33
- Object.entries(t).forEach(([r, e]) => {
34
- localStorage.setItem(r, JSON.stringify(e));
35
- });
36
- } catch {
37
- return !1;
38
- }
39
- return !0;
40
- };
41
- export {
42
- a as d,
43
- g,
44
- S as l,
45
- d as r
46
- };
@@ -1 +0,0 @@
1
- "use strict";const i=require("react-router-dom"),l=(o,t,r)=>{let e=o;return t!==void 0&&(e=Math.max(e,t)),r!==void 0&&(e=Math.min(e,r)),e},u=(o,t,r=!0)=>Object.keys(o).reduce((e,n)=>{const c=o[n];return r&&(c==null||c==="")||(e[n]=t(c,n)),e},{}),s=(o,t)=>{const r=t!=null&&t.query?new URLSearchParams(u(t.query,e=>(e==null?void 0:e.toString())??"")):null;return`${i.generatePath(o,t!=null&&t.path?u(t.path,e=>(e==null?void 0:e.toString())??null):void 0)}${r&&r.size>0?`?${r.toString()}`:""}`},S=[{key:"msal",mode:"includes"},{key:"token",mode:"exact"},{key:"user",mode:"exact"},{key:"user-delegation",mode:"exact"}],g=(o=!0)=>{const t={};for(let r=0;r<localStorage.length;r++){const e=localStorage.key(r);if(e&&!(o&&S.some(({key:n,mode:c})=>c==="includes"?e.includes(n):e===n)))try{t[e]=JSON.parse(localStorage.getItem(e))}catch{t[e]=localStorage.getItem(e)}}return t},a=o=>{try{const t=JSON.parse(o);if(typeof t!="object"||t===null)return!1;Object.entries(t).forEach(([r,e])=>{localStorage.setItem(r,JSON.stringify(e))})}catch{return!1}return!0};exports.dumpLocalStorage=g;exports.generateApiPath=s;exports.limitNumber=l;exports.restoreLocalStorage=a;