@zauru-sdk/redux 1.0.95 → 1.0.101
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.
|
@@ -29,7 +29,12 @@ const initialState = {
|
|
|
29
29
|
loading: false,
|
|
30
30
|
reFetch: false,
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
queueReceptions: {
|
|
33
|
+
data: [],
|
|
34
|
+
loading: false,
|
|
35
|
+
reFetch: false,
|
|
36
|
+
},
|
|
37
|
+
offlineQueueReceptions: {
|
|
33
38
|
data: [],
|
|
34
39
|
loading: false,
|
|
35
40
|
reFetch: false,
|
package/dist/cjs/store.js
CHANGED
|
@@ -36,7 +36,7 @@ const preloadedState = (() => {
|
|
|
36
36
|
// Ignorar los errores, se utiliza el estado inicial definido en cada reducer
|
|
37
37
|
}
|
|
38
38
|
})();
|
|
39
|
-
const cleanLocalStorage = () => {
|
|
39
|
+
const cleanLocalStorage = (whitelist = {}) => {
|
|
40
40
|
const savedState = localStorage.getItem(exports.LOCAL_STORAGE_REDUX_NAME);
|
|
41
41
|
const state = JSON.parse(savedState ?? "{}");
|
|
42
42
|
try {
|
|
@@ -69,10 +69,6 @@ const cleanLocalStorage = () => {
|
|
|
69
69
|
console.error(error);
|
|
70
70
|
}
|
|
71
71
|
try {
|
|
72
|
-
const whitelist = {
|
|
73
|
-
automaticNumbers: ["purchaseOrderIdNumber", "dischargeIdNumber"],
|
|
74
|
-
receptions: ["queueNewReceptions"],
|
|
75
|
-
};
|
|
76
72
|
if (!(typeof document === "undefined") && Object.keys(state)?.length > 0) {
|
|
77
73
|
const initialState = {
|
|
78
74
|
catalogs: (0, catalogs_slice_js_1.default)(undefined, { type: "" }),
|
|
@@ -29,7 +29,12 @@ const initialState = {
|
|
|
29
29
|
loading: false,
|
|
30
30
|
reFetch: false,
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
queueReceptions: {
|
|
33
|
+
data: [],
|
|
34
|
+
loading: false,
|
|
35
|
+
reFetch: false,
|
|
36
|
+
},
|
|
37
|
+
offlineQueueReceptions: {
|
|
33
38
|
data: [],
|
|
34
39
|
loading: false,
|
|
35
40
|
reFetch: false,
|
package/dist/esm/store.js
CHANGED
|
@@ -36,7 +36,7 @@ const preloadedState = (() => {
|
|
|
36
36
|
// Ignorar los errores, se utiliza el estado inicial definido en cada reducer
|
|
37
37
|
}
|
|
38
38
|
})();
|
|
39
|
-
const cleanLocalStorage = () => {
|
|
39
|
+
const cleanLocalStorage = (whitelist = {}) => {
|
|
40
40
|
const savedState = localStorage.getItem(exports.LOCAL_STORAGE_REDUX_NAME);
|
|
41
41
|
const state = JSON.parse(savedState ?? "{}");
|
|
42
42
|
try {
|
|
@@ -69,10 +69,6 @@ const cleanLocalStorage = () => {
|
|
|
69
69
|
console.error(error);
|
|
70
70
|
}
|
|
71
71
|
try {
|
|
72
|
-
const whitelist = {
|
|
73
|
-
automaticNumbers: ["purchaseOrderIdNumber", "dischargeIdNumber"],
|
|
74
|
-
receptions: ["queueNewReceptions"],
|
|
75
|
-
};
|
|
76
72
|
if (!(typeof document === "undefined") && Object.keys(state)?.length > 0) {
|
|
77
73
|
const initialState = {
|
|
78
74
|
catalogs: (0, catalogs_slice_js_1.default)(undefined, { type: "" }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ItemAssociatedLots, NewPurchaseOrderResponse, PurchaseOrderGeneralInfo, PurchaseOrderGraphQL, RejectionWebAppTableObject, WebAppRowGraphQL, QueueFormReceptionWebAppTable } from "@zauru-sdk/types";
|
|
2
|
-
export type RECEPTION_NAMES = "basketLots" | "rejectionInfo" | "newPurchaseOrderInfo" | "purchaseOrderGeneralInfo" | "poReceptions" | "
|
|
2
|
+
export type RECEPTION_NAMES = "basketLots" | "rejectionInfo" | "newPurchaseOrderInfo" | "purchaseOrderGeneralInfo" | "poReceptions" | "offlineQueueReceptions" | "queueReceptions";
|
|
3
3
|
export interface ReceptionState {
|
|
4
4
|
basketLots: {
|
|
5
5
|
loading: boolean;
|
|
@@ -26,7 +26,12 @@ export interface ReceptionState {
|
|
|
26
26
|
data: PurchaseOrderGraphQL[];
|
|
27
27
|
reFetch: boolean;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
queueReceptions: {
|
|
30
|
+
loading: boolean;
|
|
31
|
+
data: WebAppRowGraphQL<QueueFormReceptionWebAppTable>[];
|
|
32
|
+
reFetch: boolean;
|
|
33
|
+
};
|
|
34
|
+
offlineQueueReceptions: {
|
|
30
35
|
loading: boolean;
|
|
31
36
|
data: WebAppRowGraphQL<QueueFormReceptionWebAppTable>[];
|
|
32
37
|
reFetch: boolean;
|
package/dist/store.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { TypedUseSelectorHook } from "react-redux";
|
|
2
2
|
import { Tuple } from "@reduxjs/toolkit";
|
|
3
3
|
export declare const LOCAL_STORAGE_REDUX_NAME = "___redux__state__v2.1";
|
|
4
|
-
|
|
4
|
+
type Whitelist = {
|
|
5
|
+
[K in keyof RootState]?: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const cleanLocalStorage: (whitelist?: Whitelist) => void;
|
|
5
8
|
export declare const store: import("@reduxjs/toolkit").EnhancedStore<any, import("redux").UnknownAction, Tuple<[import("redux").StoreEnhancer<{
|
|
6
9
|
dispatch: {};
|
|
7
10
|
}>, import("redux").StoreEnhancer]>>;
|
|
@@ -16,3 +19,4 @@ export type ReduxParamsConfig = {
|
|
|
16
19
|
[key: string]: string;
|
|
17
20
|
};
|
|
18
21
|
};
|
|
22
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/redux",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.101",
|
|
4
4
|
"description": "Estructura de Redux propuesta para el desarrollo de webapps en Zauru.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@reduxjs/toolkit": "^2.2.1",
|
|
29
|
-
"@zauru-sdk/types": "^1.0.
|
|
29
|
+
"@zauru-sdk/types": "^1.0.98",
|
|
30
30
|
"react": "^18.2.0",
|
|
31
31
|
"react-dom": "^18.2.0",
|
|
32
32
|
"react-redux": "^9.1.0",
|
|
33
33
|
"react-select": "^5.8.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "52ba06a9573b657976cef7ccdaf8c8bb5ff9c201"
|
|
36
36
|
}
|