@zauru-sdk/redux 1.0.11 → 1.0.15
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/CHANGELOG.md +16 -0
- package/dist/store.d.ts +10 -0
- package/dist/store.js +3 -0
- package/package.json +11 -5
- package/src/store.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.15](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.14...v1.0.15) (2024-03-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zauru-sdk/redux
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.13](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.12...v1.0.13) (2024-03-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @zauru-sdk/redux
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.0.11](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.10...v1.0.11) (2024-03-18)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @zauru-sdk/redux
|
package/dist/store.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TypedUseSelectorHook } from "react-redux";
|
|
1
2
|
import { Tuple } from "@reduxjs/toolkit";
|
|
2
3
|
export declare const LOCAL_STORAGE_REDUX_NAME = "___redux__state__v2";
|
|
3
4
|
export declare const cleanLocalStorage: () => void;
|
|
@@ -6,3 +7,12 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<any, import
|
|
|
6
7
|
}>, import("redux").StoreEnhancer]>>;
|
|
7
8
|
export type RootState = ReturnType<typeof store.getState>;
|
|
8
9
|
export type AppDispatch = typeof store.dispatch;
|
|
10
|
+
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
11
|
+
export declare const useAppDispatch: () => AppDispatch;
|
|
12
|
+
export type ReduxParamsConfig = {
|
|
13
|
+
online?: boolean;
|
|
14
|
+
wheres?: string[];
|
|
15
|
+
otherParams?: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
package/dist/store.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
1
2
|
import { Tuple, configureStore } from "@reduxjs/toolkit";
|
|
2
3
|
import catalogsReducer from "./slices/catalogs.slice.js";
|
|
3
4
|
import profilesReducer from "./slices/profile.slice.js";
|
|
@@ -123,3 +124,5 @@ export const store = configureStore({
|
|
|
123
124
|
preloadedState,
|
|
124
125
|
middleware: (getDefaultMiddleware) => new Tuple(persistanceLocalStorageMiddleware),
|
|
125
126
|
});
|
|
127
|
+
export const useAppSelector = useSelector;
|
|
128
|
+
export const useAppDispatch = useDispatch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/redux",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Estructura de Redux propuesta para el desarrollo de webapps en Zauru.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,17 +15,23 @@
|
|
|
15
15
|
"author": "Oscar Cuéllar",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"devDependencies": {
|
|
18
|
+
"@types/react": "^18.2.20",
|
|
19
|
+
"@types/react-dom": "^18.2.7",
|
|
18
20
|
"typescript": "^5.1.6"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
23
|
"@reduxjs/toolkit": "^2.2.1",
|
|
22
24
|
"@zauru-sdk/graphql": "^1.0.9",
|
|
23
|
-
"@zauru-sdk/services": "^1.0.
|
|
24
|
-
"@zauru-sdk/types": "^1.0.
|
|
25
|
-
"@zauru-sdk/utils": "^1.0.
|
|
25
|
+
"@zauru-sdk/services": "^1.0.15",
|
|
26
|
+
"@zauru-sdk/types": "^1.0.13",
|
|
27
|
+
"@zauru-sdk/utils": "^1.0.15",
|
|
28
|
+
"react": "^18.2.0",
|
|
29
|
+
"react-dom": "^18.2.0",
|
|
30
|
+
"react-redux": "^9.1.0",
|
|
31
|
+
"react-select": "^5.8.0"
|
|
26
32
|
},
|
|
27
33
|
"engines": {
|
|
28
34
|
"node": ">=18.0.0"
|
|
29
35
|
},
|
|
30
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "c1cd28eca731f106f531d766bc9703db7d1e750f"
|
|
31
37
|
}
|
package/src/store.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { TypedUseSelectorHook } from "react-redux";
|
|
2
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
1
3
|
import type { MiddlewareAPI } from "@reduxjs/toolkit";
|
|
2
4
|
import { Tuple, configureStore } from "@reduxjs/toolkit";
|
|
3
5
|
import catalogsReducer from "./slices/catalogs.slice.js";
|
|
@@ -150,3 +152,11 @@ export const store = configureStore({
|
|
|
150
152
|
|
|
151
153
|
export type RootState = ReturnType<typeof store.getState>;
|
|
152
154
|
export type AppDispatch = typeof store.dispatch;
|
|
155
|
+
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
|
156
|
+
export const useAppDispatch: () => AppDispatch = useDispatch;
|
|
157
|
+
|
|
158
|
+
export type ReduxParamsConfig = {
|
|
159
|
+
online?: boolean;
|
|
160
|
+
wheres?: string[];
|
|
161
|
+
otherParams?: { [key: string]: string };
|
|
162
|
+
};
|