nurseitaly-components 0.0.10 → 0.0.12
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useContext, useEffect } from 'react';
|
|
2
|
+
import CommonContext from './CommonContext';
|
|
3
|
+
import { registerCommonDispatch } from './commonDispatch';
|
|
4
|
+
/** Registers CommonContext.dispatch for non-React callers (e.g. axios interceptors). */
|
|
5
|
+
export default function CommonDispatchBridge() {
|
|
6
|
+
const { dispatch } = useContext(CommonContext);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
registerCommonDispatch(dispatch);
|
|
9
|
+
return () => registerCommonDispatch(() => undefined);
|
|
10
|
+
}, [dispatch]);
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SessionAction } from './sessionTypes';
|
|
2
|
+
type CommonDispatch = (action: SessionAction) => void;
|
|
3
|
+
export declare function registerCommonDispatch(dispatch: CommonDispatch): void;
|
|
4
|
+
export declare function getCommonDispatch(): CommonDispatch | null;
|
|
5
|
+
export {};
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as CommonContext, CommonProvider } from './CommonContext';
|
|
2
|
+
export { default as CommonDispatchBridge } from './CommonDispatchBridge';
|
|
3
|
+
export { getCommonDispatch, registerCommonDispatch, } from './commonDispatch';
|
|
2
4
|
export { default as CookieStorage } from './CookieStorage';
|
|
3
5
|
export { commonLocalization, commonResources, featureResources, mergeResources, } from './Localization';
|
|
4
6
|
export { default as ProfileService } from './services/ProfileService';
|
package/dist/configs/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as CommonContext, CommonProvider } from './CommonContext';
|
|
2
|
+
export { default as CommonDispatchBridge } from './CommonDispatchBridge';
|
|
3
|
+
export { getCommonDispatch, registerCommonDispatch, } from './commonDispatch';
|
|
2
4
|
export { default as CookieStorage } from './CookieStorage';
|
|
3
5
|
export { commonLocalization, commonResources, featureResources, mergeResources, } from './Localization';
|
|
4
6
|
export { default as ProfileService } from './services/ProfileService';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nurseitaly-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@mui/x-date-pickers": "^8.15.0",
|
|
48
48
|
"@mui/x-date-pickers-pro": "^8.15.0",
|
|
49
49
|
"@tanstack/react-table": "^8.20.6",
|
|
50
|
-
"axios": "^1.
|
|
50
|
+
"axios": "^1.19.0",
|
|
51
51
|
"classnames": "^2.5.1",
|
|
52
52
|
"date-fns": "^4.1.0",
|
|
53
53
|
"date-fns-tz": "^3.2.0",
|
|
@@ -56,23 +56,27 @@
|
|
|
56
56
|
"react-draggable": "^4.4.6",
|
|
57
57
|
"react-dropzone": "^14.3.5",
|
|
58
58
|
"react-loading": "^2.0.3",
|
|
59
|
-
"yup": "^1.
|
|
59
|
+
"yup": "^1.7.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@emotion/react": "^11.
|
|
63
|
-
"@emotion/styled": "^11.
|
|
62
|
+
"@emotion/react": "^11.14.0",
|
|
63
|
+
"@emotion/styled": "^11.14.1",
|
|
64
64
|
"@mui/icons-material": "7.3.0",
|
|
65
65
|
"@mui/material": "7.3.0",
|
|
66
|
-
"i18next": "^
|
|
67
|
-
"i18next-browser-languagedetector": "^
|
|
66
|
+
"i18next": "^25.5.2",
|
|
67
|
+
"i18next-browser-languagedetector": "^8.2.0",
|
|
68
68
|
"react": ">=17 <19",
|
|
69
69
|
"react-dom": ">=17 <19",
|
|
70
70
|
"react-hook-form": "7.78.0",
|
|
71
|
-
"react-i18next": "^
|
|
72
|
-
"react-router-dom": "^
|
|
73
|
-
"react-toastify": "^
|
|
71
|
+
"react-i18next": "^16.0.0",
|
|
72
|
+
"react-router-dom": "^7.9.3",
|
|
73
|
+
"react-toastify": "^11.0.5"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
+
"@emotion/react": "^11.14.0",
|
|
77
|
+
"@emotion/styled": "^11.14.1",
|
|
78
|
+
"@mui/icons-material": "7.3.0",
|
|
79
|
+
"@mui/material": "7.3.0",
|
|
76
80
|
"@storybook/addon-docs": "^10.5.8",
|
|
77
81
|
"@storybook/addon-onboarding": "^10.5.8",
|
|
78
82
|
"@storybook/cli": "^10.5.8",
|
|
@@ -80,32 +84,28 @@
|
|
|
80
84
|
"@storybook/react-vite": "^10.5.8",
|
|
81
85
|
"@storybook/testing-library": "^0.2.2",
|
|
82
86
|
"@types/js-cookie": "^3.0.6",
|
|
83
|
-
"@types/react": "^18.2.
|
|
84
|
-
"@types/react-dom": "^18.2.
|
|
85
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
86
|
-
"@typescript-eslint/parser": "^
|
|
87
|
-
"@vitejs/plugin-react": "^5.0.
|
|
88
|
-
"eslint": "^
|
|
89
|
-
"eslint-plugin-react-hooks": "^
|
|
90
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
87
|
+
"@types/react": "^18.2.14",
|
|
88
|
+
"@types/react-dom": "^18.2.6",
|
|
89
|
+
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
|
90
|
+
"@typescript-eslint/parser": "^8.45.0",
|
|
91
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
92
|
+
"eslint": "^9.36.0",
|
|
93
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
94
|
+
"eslint-plugin-react-refresh": "^0.4.22",
|
|
91
95
|
"eslint-plugin-storybook": "^0.11.2",
|
|
92
|
-
"i18next": "^
|
|
93
|
-
"i18next-browser-languagedetector": "^
|
|
96
|
+
"i18next": "^25.5.2",
|
|
97
|
+
"i18next-browser-languagedetector": "^8.2.0",
|
|
94
98
|
"react": "^18.2.0",
|
|
95
99
|
"react-dom": "^18.2.0",
|
|
96
100
|
"react-hook-form": "7.78.0",
|
|
97
|
-
"react-i18next": "^
|
|
98
|
-
"react-router-dom": "^
|
|
99
|
-
"react-toastify": "^
|
|
101
|
+
"react-i18next": "^16.0.0",
|
|
102
|
+
"react-router-dom": "^7.9.3",
|
|
103
|
+
"react-toastify": "^11.0.5",
|
|
100
104
|
"sass-embedded": "^1.97.2",
|
|
101
105
|
"storybook": "^10.5.8",
|
|
102
|
-
"typescript": "^5.
|
|
103
|
-
"vite": "^7.
|
|
104
|
-
"vitest": "^3.2.6"
|
|
105
|
-
"@emotion/react": "^11.13.3",
|
|
106
|
-
"@emotion/styled": "^11.13.0",
|
|
107
|
-
"@mui/icons-material": "7.3.0",
|
|
108
|
-
"@mui/material": "7.3.0"
|
|
106
|
+
"typescript": "^5.9.3",
|
|
107
|
+
"vite": "^7.1.7",
|
|
108
|
+
"vitest": "^3.2.6"
|
|
109
109
|
},
|
|
110
110
|
"scripts": {
|
|
111
111
|
"start": "storybook dev -p 6006",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"build": "tsc && node scripts/copy-package-json.js && npm run copy-css",
|
|
114
114
|
"build-publish": "tsc && npm run copy-css",
|
|
115
115
|
"copy-css": "node scripts/copy-css.js",
|
|
116
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\" --report-unused-disable-directives --max-warnings 0",
|
|
116
117
|
"test": "vitest run"
|
|
117
118
|
}
|
|
118
119
|
}
|