@zauru-sdk/redux 1.0.50 → 1.0.52

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 (51) hide show
  1. package/dist/cjs/index.js +18 -0
  2. package/dist/{slices → cjs/slices}/agency.slice.js +8 -4
  3. package/dist/{slices → cjs/slices}/automaticNumbers.slice.js +8 -4
  4. package/dist/{slices → cjs/slices}/catalogs.slice.js +8 -4
  5. package/dist/cjs/slices/formValidation.slice.js +19 -0
  6. package/dist/cjs/slices/index.js +27 -0
  7. package/dist/{slices → cjs/slices}/profile.slice.js +8 -4
  8. package/dist/{slices → cjs/slices}/reception.slice.js +8 -4
  9. package/dist/cjs/slices/session.slice.js +16 -0
  10. package/dist/cjs/slices/tables.slice.js +20 -0
  11. package/dist/{slices → cjs/slices}/templates.slice.js +8 -4
  12. package/dist/{slices → cjs/slices}/user.slice.js +8 -4
  13. package/dist/cjs/slices/webapp-tables.slice.js +24 -0
  14. package/dist/{store.js → cjs/store.js} +46 -39
  15. package/dist/esm/index.js +18 -0
  16. package/dist/esm/slices/agency.slice.js +24 -0
  17. package/dist/esm/slices/automaticNumbers.slice.js +24 -0
  18. package/dist/esm/slices/catalogs.slice.js +65 -0
  19. package/dist/esm/slices/formValidation.slice.js +19 -0
  20. package/dist/esm/slices/index.js +27 -0
  21. package/dist/esm/slices/profile.slice.js +26 -0
  22. package/dist/esm/slices/reception.slice.js +61 -0
  23. package/dist/esm/slices/session.slice.js +16 -0
  24. package/dist/esm/slices/tables.slice.js +20 -0
  25. package/dist/esm/slices/templates.slice.js +23 -0
  26. package/dist/esm/slices/user.slice.js +42 -0
  27. package/dist/esm/slices/webapp-tables.slice.js +24 -0
  28. package/dist/esm/store.js +135 -0
  29. package/package.json +13 -11
  30. package/CHANGELOG.md +0 -192
  31. package/dist/index.js +0 -2
  32. package/dist/slices/formValidation.slice.js +0 -16
  33. package/dist/slices/index.js +0 -11
  34. package/dist/slices/session.slice.js +0 -13
  35. package/dist/slices/tables.slice.js +0 -17
  36. package/dist/slices/webapp-tables.slice.js +0 -20
  37. package/src/index.ts +0 -3
  38. package/src/slices/agency.slice.ts +0 -32
  39. package/src/slices/automaticNumbers.slice.ts +0 -41
  40. package/src/slices/catalogs.slice.ts +0 -178
  41. package/src/slices/formValidation.slice.ts +0 -32
  42. package/src/slices/index.ts +0 -11
  43. package/src/slices/profile.slice.ts +0 -49
  44. package/src/slices/reception.slice.ts +0 -118
  45. package/src/slices/session.slice.ts +0 -25
  46. package/src/slices/tables.slice.ts +0 -33
  47. package/src/slices/templates.slice.ts +0 -34
  48. package/src/slices/user.slice.ts +0 -64
  49. package/src/slices/webapp-tables.slice.ts +0 -35
  50. package/src/store.ts +0 -162
  51. package/tsconfig.json +0 -24
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.profileFetchSuccess = exports.profileFetchStart = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const initialState = {
7
+ userProfile: { data: {}, loading: false },
8
+ oauthProfile: { data: {}, loading: false },
9
+ employeeProfile: { data: {}, loading: false },
10
+ agencyProfile: { data: {}, loading: false },
11
+ };
12
+ const profileSlice = (0, toolkit_1.createSlice)({
13
+ name: "profile",
14
+ initialState,
15
+ reducers: {
16
+ profileFetchStart: (state, action) => {
17
+ state[action.payload].loading = true;
18
+ },
19
+ profileFetchSuccess: (state, action) => {
20
+ state[action.payload.name].data = action.payload.data;
21
+ state[action.payload.name].loading = false;
22
+ },
23
+ },
24
+ });
25
+ _a = profileSlice.actions, exports.profileFetchStart = _a.profileFetchStart, exports.profileFetchSuccess = _a.profileFetchSuccess;
26
+ exports.default = profileSlice.reducer;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.receptionConcatToArray = exports.receptionFetchSuccess = exports.receptionFetchStart = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const initialState = {
7
+ basketLots: {
8
+ data: {},
9
+ loading: false,
10
+ reFetch: false,
11
+ },
12
+ rejectionInfo: {
13
+ data: {},
14
+ loading: false,
15
+ reFetch: false,
16
+ },
17
+ newPurchaseOrderInfo: {
18
+ data: {},
19
+ loading: false,
20
+ reFetch: false,
21
+ },
22
+ purchaseOrderGeneralInfo: {
23
+ data: {},
24
+ loading: false,
25
+ reFetch: false,
26
+ },
27
+ poReceptions: {
28
+ data: [],
29
+ loading: false,
30
+ reFetch: false,
31
+ },
32
+ queueNewReceptions: {
33
+ data: [],
34
+ loading: false,
35
+ reFetch: false,
36
+ },
37
+ };
38
+ const receptionSlice = (0, toolkit_1.createSlice)({
39
+ name: "reception",
40
+ initialState,
41
+ reducers: {
42
+ receptionFetchStart: (state, action) => {
43
+ state[action.payload].loading = true;
44
+ },
45
+ receptionFetchSuccess: (state, action) => {
46
+ state[action.payload.name].data = action.payload.data;
47
+ state[action.payload.name].loading = false;
48
+ },
49
+ receptionConcatToArray: (state, action) => {
50
+ if (Array.isArray(state[action.payload.name].data)) {
51
+ state[action.payload.name].data = [
52
+ ...state[action.payload.name].data,
53
+ action.payload.data,
54
+ ];
55
+ }
56
+ state[action.payload.name].loading = false;
57
+ },
58
+ },
59
+ });
60
+ _a = receptionSlice.actions, exports.receptionFetchStart = _a.receptionFetchStart, exports.receptionFetchSuccess = _a.receptionFetchSuccess, exports.receptionConcatToArray = _a.receptionConcatToArray;
61
+ exports.default = receptionSlice.reducer;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setSessionValue = void 0;
4
+ const toolkit_1 = require("@reduxjs/toolkit");
5
+ const initialState = {};
6
+ const sessionSlice = (0, toolkit_1.createSlice)({
7
+ name: "session",
8
+ initialState,
9
+ reducers: {
10
+ setSessionValue: (state, action) => {
11
+ state[action.payload.name] = action.payload.data;
12
+ },
13
+ },
14
+ });
15
+ exports.setSessionValue = sessionSlice.actions.setSessionValue;
16
+ exports.default = sessionSlice.reducer;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tableSetPage = void 0;
4
+ const toolkit_1 = require("@reduxjs/toolkit");
5
+ const initialState = {
6
+ pageTable1: 1,
7
+ pageTable2: 1,
8
+ pageTable3: 1,
9
+ };
10
+ const tableSlice = (0, toolkit_1.createSlice)({
11
+ name: "table",
12
+ initialState,
13
+ reducers: {
14
+ tableSetPage: (state, action) => {
15
+ state[action.payload.name] = action.payload.data;
16
+ },
17
+ },
18
+ });
19
+ exports.tableSetPage = tableSlice.actions.tableSetPage;
20
+ exports.default = tableSlice.reducer;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.templateFetchSuccess = exports.templateFetchStart = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const initialState = {
7
+ receptionTemplate: { data: "", loading: false },
8
+ };
9
+ const templateSlice = (0, toolkit_1.createSlice)({
10
+ name: "template",
11
+ initialState,
12
+ reducers: {
13
+ templateFetchStart: (state, action) => {
14
+ state[action.payload].loading = true;
15
+ },
16
+ templateFetchSuccess: (state, action) => {
17
+ state[action.payload.name].data = action.payload.data;
18
+ state[action.payload.name].loading = false;
19
+ },
20
+ },
21
+ });
22
+ _a = templateSlice.actions, exports.templateFetchStart = _a.templateFetchStart, exports.templateFetchSuccess = _a.templateFetchSuccess;
23
+ exports.default = templateSlice.reducer;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.setLoadingUserProfile = exports.setLoadingOauthProfile = exports.setLoadingEmployeeProfile = exports.setOauthProfile = exports.setEmployeeProfile = exports.setUserProfile = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const initialState = {
7
+ userProfile: {},
8
+ loadingUserProfile: false,
9
+ oauthProfile: {},
10
+ loadingOauthProfile: false,
11
+ employeeProfile: {},
12
+ loadingEmployeeInfo: false,
13
+ };
14
+ const userSlice = (0, toolkit_1.createSlice)({
15
+ name: "user",
16
+ initialState,
17
+ reducers: {
18
+ setUserProfile: (state, action) => {
19
+ state.userProfile = action.payload;
20
+ state.loadingUserProfile = false;
21
+ },
22
+ setLoadingUserProfile: (state, action) => {
23
+ state.loadingUserProfile = action.payload;
24
+ },
25
+ setOauthProfile: (state, action) => {
26
+ state.oauthProfile = action.payload;
27
+ state.loadingOauthProfile = false;
28
+ },
29
+ setLoadingOauthProfile: (state, action) => {
30
+ state.loadingOauthProfile = action.payload;
31
+ },
32
+ setEmployeeProfile: (state, action) => {
33
+ state.employeeProfile = action.payload;
34
+ state.loadingEmployeeInfo = false;
35
+ },
36
+ setLoadingEmployeeProfile: (state, action) => {
37
+ state.loadingEmployeeInfo = action.payload;
38
+ },
39
+ },
40
+ });
41
+ _a = userSlice.actions, exports.setUserProfile = _a.setUserProfile, exports.setEmployeeProfile = _a.setEmployeeProfile, exports.setOauthProfile = _a.setOauthProfile, exports.setLoadingEmployeeProfile = _a.setLoadingEmployeeProfile, exports.setLoadingOauthProfile = _a.setLoadingOauthProfile, exports.setLoadingUserProfile = _a.setLoadingUserProfile;
42
+ exports.default = userSlice.reducer;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.setSpecialItems = exports.setLoadingSpecialItems = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const initialState = {
7
+ specialItems: [],
8
+ loadingSpecialItems: false,
9
+ };
10
+ const webappTablesSlice = (0, toolkit_1.createSlice)({
11
+ name: "webappTables",
12
+ initialState,
13
+ reducers: {
14
+ setLoadingSpecialItems: (state, action) => {
15
+ state.loadingSpecialItems = action.payload;
16
+ },
17
+ setSpecialItems: (state, action) => {
18
+ state.specialItems = action.payload;
19
+ state.loadingSpecialItems = false;
20
+ },
21
+ },
22
+ });
23
+ _a = webappTablesSlice.actions, exports.setLoadingSpecialItems = _a.setLoadingSpecialItems, exports.setSpecialItems = _a.setSpecialItems;
24
+ exports.default = webappTablesSlice.reducer;
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useAppDispatch = exports.useAppSelector = exports.store = exports.cleanLocalStorage = exports.LOCAL_STORAGE_REDUX_NAME = void 0;
7
+ const react_redux_1 = require("react-redux");
8
+ const toolkit_1 = require("@reduxjs/toolkit");
9
+ const catalogs_slice_js_1 = __importDefault(require("./slices/catalogs.slice.js"));
10
+ const profile_slice_js_1 = __importDefault(require("./slices/profile.slice.js"));
11
+ const webapp_tables_slice_js_1 = __importDefault(require("./slices/webapp-tables.slice.js"));
12
+ const reception_slice_js_1 = __importDefault(require("./slices/reception.slice.js"));
13
+ const session_slice_js_1 = __importDefault(require("./slices/session.slice.js"));
14
+ const templates_slice_js_1 = __importDefault(require("./slices/templates.slice.js"));
15
+ const automaticNumbers_slice_js_1 = __importDefault(require("./slices/automaticNumbers.slice.js"));
16
+ const tables_slice_js_1 = __importDefault(require("./slices/tables.slice.js"));
17
+ const formValidation_slice_js_1 = __importDefault(require("./slices/formValidation.slice.js"));
18
+ exports.LOCAL_STORAGE_REDUX_NAME = "___redux__state__v2";
19
+ const persistanceLocalStorageMiddleware = (store) => (next) => (action) => {
20
+ const result = next(action);
21
+ if (!(typeof document === "undefined")) {
22
+ localStorage.setItem(exports.LOCAL_STORAGE_REDUX_NAME, JSON.stringify(store.getState()));
23
+ }
24
+ return result;
25
+ };
26
+ const preloadedState = (() => {
27
+ try {
28
+ if (!(typeof document === "undefined")) {
29
+ const savedState = localStorage.getItem(exports.LOCAL_STORAGE_REDUX_NAME);
30
+ if (savedState) {
31
+ return JSON.parse(savedState);
32
+ }
33
+ }
34
+ }
35
+ catch (e) {
36
+ // Ignorar los errores, se utiliza el estado inicial definido en cada reducer
37
+ }
38
+ })();
39
+ const cleanLocalStorage = () => {
40
+ const savedState = localStorage.getItem(exports.LOCAL_STORAGE_REDUX_NAME);
41
+ const state = JSON.parse(savedState ?? "{}");
42
+ try {
43
+ //delete all cookies
44
+ // const deleteAllCookies = () => {
45
+ // const cookies = document.cookie.split(";");
46
+ // for (const cookie of cookies) {
47
+ // const eqPos = cookie.indexOf("=");
48
+ // const name = eqPos > -1 ? cookie.substring(0, eqPos) : cookie;
49
+ // document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
50
+ // }
51
+ // };
52
+ // deleteAllCookies();
53
+ // //delete caché
54
+ // caches.keys().then((names) => {
55
+ // for (const name of names) {
56
+ // caches.delete(name);
57
+ // }
58
+ // });
59
+ //unregister service workers
60
+ // navigator.serviceWorker.getRegistrations().then((registrations) => {
61
+ // for (const registration of registrations) {
62
+ // registration.unregister();
63
+ // }
64
+ // });
65
+ // Limpiar todo el localStorage
66
+ localStorage.clear();
67
+ }
68
+ catch (error) {
69
+ console.error(error);
70
+ }
71
+ try {
72
+ const whitelist = {
73
+ automaticNumbers: ["purchaseOrderIdNumber", "dischargeIdNumber"],
74
+ receptions: ["queueNewReceptions"],
75
+ };
76
+ if (!(typeof document === "undefined") && Object.keys(state)?.length > 0) {
77
+ const initialState = {
78
+ catalogs: (0, catalogs_slice_js_1.default)(undefined, { type: "" }),
79
+ profiles: (0, profile_slice_js_1.default)(undefined, { type: "" }),
80
+ webappTables: (0, webapp_tables_slice_js_1.default)(undefined, { type: "" }),
81
+ receptions: (0, reception_slice_js_1.default)(undefined, { type: "" }),
82
+ session: (0, session_slice_js_1.default)(undefined, { type: "" }),
83
+ templates: (0, templates_slice_js_1.default)(undefined, { type: "" }),
84
+ automaticNumbers: (0, automaticNumbers_slice_js_1.default)(undefined, { type: "" }),
85
+ tables: (0, tables_slice_js_1.default)(undefined, { type: "" }),
86
+ formValidation: (0, formValidation_slice_js_1.default)(undefined, { type: "" }),
87
+ };
88
+ const newState = { ...initialState };
89
+ for (const reducerName in whitelist) {
90
+ if (state.hasOwnProperty(reducerName)) {
91
+ const key = reducerName;
92
+ const reducerState = state[key];
93
+ const whitelistKey = whitelist[key];
94
+ if (whitelistKey && whitelistKey.length > 0) {
95
+ newState[key] = newState[key] ? { ...newState[key] } : {};
96
+ for (const propertyName of whitelistKey) {
97
+ if (reducerState?.hasOwnProperty(propertyName)) {
98
+ const propKey = propertyName;
99
+ if (newState[key] && reducerState) {
100
+ newState[key][propKey] = reducerState[propKey];
101
+ }
102
+ }
103
+ }
104
+ }
105
+ else if (reducerState) {
106
+ newState[key] = reducerState;
107
+ }
108
+ }
109
+ }
110
+ // Guarda el nuevo estado en el almacenamiento local
111
+ localStorage.setItem(exports.LOCAL_STORAGE_REDUX_NAME, JSON.stringify(newState));
112
+ }
113
+ }
114
+ catch (e) {
115
+ console.error("Ocurrió un error al clonar y eliminar el viejo localStorage");
116
+ }
117
+ };
118
+ exports.cleanLocalStorage = cleanLocalStorage;
119
+ exports.store = (0, toolkit_1.configureStore)({
120
+ reducer: {
121
+ catalogs: catalogs_slice_js_1.default,
122
+ profiles: profile_slice_js_1.default,
123
+ webappTables: webapp_tables_slice_js_1.default,
124
+ receptions: reception_slice_js_1.default,
125
+ session: session_slice_js_1.default,
126
+ templates: templates_slice_js_1.default,
127
+ automaticNumbers: automaticNumbers_slice_js_1.default,
128
+ tables: tables_slice_js_1.default,
129
+ formValidation: formValidation_slice_js_1.default,
130
+ },
131
+ preloadedState,
132
+ middleware: (getDefaultMiddleware) => new toolkit_1.Tuple(persistanceLocalStorageMiddleware),
133
+ });
134
+ exports.useAppSelector = react_redux_1.useSelector;
135
+ exports.useAppDispatch = react_redux_1.useDispatch;
package/package.json CHANGED
@@ -1,17 +1,22 @@
1
1
  {
2
2
  "name": "@zauru-sdk/redux",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
4
4
  "description": "Estructura de Redux propuesta para el desarrollo de webapps en Zauru.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "type": "module",
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/esm/index.js",
7
+ "types": "./dist/index.d.ts",
8
8
  "publishConfig": {
9
9
  "access": "public"
10
10
  },
11
11
  "scripts": {
12
- "build": "tsc",
12
+ "build": "npm run build:cjs && npm run build:esm",
13
+ "build:cjs": "tsc -p tsconfig.cjs.json",
14
+ "build:esm": "tsc -p tsconfig.esm.json",
13
15
  "test": "echo \"Error: no test specified\" && exit 1"
14
16
  },
17
+ "files": [
18
+ "dist"
19
+ ],
15
20
  "author": "Oscar Cuéllar",
16
21
  "license": "MIT",
17
22
  "devDependencies": {
@@ -22,16 +27,13 @@
22
27
  "dependencies": {
23
28
  "@reduxjs/toolkit": "^2.2.1",
24
29
  "@zauru-sdk/graphql": "^1.0.48",
25
- "@zauru-sdk/services": "^1.0.50",
30
+ "@zauru-sdk/services": "^1.0.52",
26
31
  "@zauru-sdk/types": "^1.0.49",
27
- "@zauru-sdk/utils": "^1.0.50",
32
+ "@zauru-sdk/utils": "^1.0.52",
28
33
  "react": "^18.2.0",
29
34
  "react-dom": "^18.2.0",
30
35
  "react-redux": "^9.1.0",
31
36
  "react-select": "^5.8.0"
32
37
  },
33
- "engines": {
34
- "node": ">=18.0.0"
35
- },
36
- "gitHead": "e3705ad637542bb4a7d22b01f0e7f837f332c6de"
38
+ "gitHead": "f5c0e92ea8dbca13f636f8bdeaf3976a0b294424"
37
39
  }
package/CHANGELOG.md DELETED
@@ -1,192 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [1.0.50](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.49...v1.0.50) (2024-04-02)
7
-
8
- **Note:** Version bump only for package @zauru-sdk/redux
9
-
10
-
11
-
12
-
13
-
14
- ## [1.0.49](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.48...v1.0.49) (2024-04-02)
15
-
16
- **Note:** Version bump only for package @zauru-sdk/redux
17
-
18
-
19
-
20
-
21
-
22
- ## [1.0.48](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.47...v1.0.48) (2024-04-02)
23
-
24
- **Note:** Version bump only for package @zauru-sdk/redux
25
-
26
-
27
-
28
-
29
-
30
- ## [1.0.47](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.46...v1.0.47) (2024-04-02)
31
-
32
- **Note:** Version bump only for package @zauru-sdk/redux
33
-
34
-
35
-
36
-
37
-
38
- ## [1.0.46](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.45...v1.0.46) (2024-04-02)
39
-
40
- **Note:** Version bump only for package @zauru-sdk/redux
41
-
42
-
43
-
44
-
45
-
46
- ## [1.0.45](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.44...v1.0.45) (2024-04-01)
47
-
48
- **Note:** Version bump only for package @zauru-sdk/redux
49
-
50
-
51
-
52
-
53
-
54
- ## [1.0.44](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.43...v1.0.44) (2024-04-01)
55
-
56
- **Note:** Version bump only for package @zauru-sdk/redux
57
-
58
-
59
-
60
-
61
-
62
- ## [1.0.33](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.32...v1.0.33) (2024-03-25)
63
-
64
- **Note:** Version bump only for package @zauru-sdk/redux
65
-
66
-
67
-
68
-
69
-
70
- ## [1.0.32](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.31...v1.0.32) (2024-03-25)
71
-
72
- **Note:** Version bump only for package @zauru-sdk/redux
73
-
74
-
75
-
76
-
77
-
78
- ## [1.0.31](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.30...v1.0.31) (2024-03-25)
79
-
80
- **Note:** Version bump only for package @zauru-sdk/redux
81
-
82
-
83
-
84
-
85
-
86
- ## [1.0.30](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.29...v1.0.30) (2024-03-25)
87
-
88
- **Note:** Version bump only for package @zauru-sdk/redux
89
-
90
-
91
-
92
-
93
-
94
- ## [1.0.29](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.28...v1.0.29) (2024-03-25)
95
-
96
- **Note:** Version bump only for package @zauru-sdk/redux
97
-
98
-
99
-
100
-
101
-
102
- ## [1.0.26](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.25...v1.0.26) (2024-03-25)
103
-
104
- **Note:** Version bump only for package @zauru-sdk/redux
105
-
106
-
107
-
108
-
109
-
110
- ## [1.0.25](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.24...v1.0.25) (2024-03-25)
111
-
112
- **Note:** Version bump only for package @zauru-sdk/redux
113
-
114
-
115
-
116
-
117
-
118
- ## [1.0.24](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.23...v1.0.24) (2024-03-25)
119
-
120
- **Note:** Version bump only for package @zauru-sdk/redux
121
-
122
-
123
-
124
-
125
-
126
- ## [1.0.23](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.22...v1.0.23) (2024-03-22)
127
-
128
- **Note:** Version bump only for package @zauru-sdk/redux
129
-
130
-
131
-
132
-
133
-
134
- ## [1.0.20](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.19...v1.0.20) (2024-03-22)
135
-
136
- **Note:** Version bump only for package @zauru-sdk/redux
137
-
138
-
139
-
140
-
141
-
142
- ## [1.0.18](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.17...v1.0.18) (2024-03-22)
143
-
144
- **Note:** Version bump only for package @zauru-sdk/redux
145
-
146
-
147
-
148
-
149
-
150
- ## [1.0.17](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.16...v1.0.17) (2024-03-21)
151
-
152
- **Note:** Version bump only for package @zauru-sdk/redux
153
-
154
-
155
-
156
-
157
-
158
- ## [1.0.16](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.15...v1.0.16) (2024-03-21)
159
-
160
- **Note:** Version bump only for package @zauru-sdk/redux
161
-
162
-
163
-
164
-
165
-
166
- ## [1.0.15](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.14...v1.0.15) (2024-03-21)
167
-
168
- **Note:** Version bump only for package @zauru-sdk/redux
169
-
170
-
171
-
172
-
173
-
174
- ## [1.0.13](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.12...v1.0.13) (2024-03-21)
175
-
176
- **Note:** Version bump only for package @zauru-sdk/redux
177
-
178
-
179
-
180
-
181
-
182
- ## [1.0.11](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.10...v1.0.11) (2024-03-18)
183
-
184
- **Note:** Version bump only for package @zauru-sdk/redux
185
-
186
-
187
-
188
-
189
-
190
- ## [1.0.10](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.9...v1.0.10) (2024-03-17)
191
-
192
- **Note:** Version bump only for package @zauru-sdk/redux
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "./slices/index.js";
2
- export * from "./store.js";
@@ -1,16 +0,0 @@
1
- import { createSlice } from "@reduxjs/toolkit";
2
- const initialState = {
3
- formValidations: {},
4
- };
5
- const formValidationsSlice = createSlice({
6
- name: "formValidations",
7
- initialState,
8
- reducers: {
9
- setFieldError: (state, action) => {
10
- state.formValidations[action.payload.formName][action.payload.name] =
11
- action.payload.error;
12
- },
13
- },
14
- });
15
- export const { setFieldError } = formValidationsSlice.actions;
16
- export default formValidationsSlice.reducer;
@@ -1,11 +0,0 @@
1
- export * from "./agency.slice.js";
2
- export * from "./automaticNumbers.slice.js";
3
- export * from "./catalogs.slice.js";
4
- export * from "./formValidation.slice.js";
5
- export * from "./profile.slice.js";
6
- export * from "./reception.slice.js";
7
- export * from "./session.slice.js";
8
- export * from "./tables.slice.js";
9
- export * from "./templates.slice.js";
10
- export * from "./user.slice.js";
11
- export * from "./webapp-tables.slice.js";
@@ -1,13 +0,0 @@
1
- import { createSlice } from "@reduxjs/toolkit";
2
- const initialState = {};
3
- const sessionSlice = createSlice({
4
- name: "session",
5
- initialState,
6
- reducers: {
7
- setSessionValue: (state, action) => {
8
- state[action.payload.name] = action.payload.data;
9
- },
10
- },
11
- });
12
- export const { setSessionValue } = sessionSlice.actions;
13
- export default sessionSlice.reducer;
@@ -1,17 +0,0 @@
1
- import { createSlice } from "@reduxjs/toolkit";
2
- const initialState = {
3
- pageTable1: 1,
4
- pageTable2: 1,
5
- pageTable3: 1,
6
- };
7
- const tableSlice = createSlice({
8
- name: "table",
9
- initialState,
10
- reducers: {
11
- tableSetPage: (state, action) => {
12
- state[action.payload.name] = action.payload.data;
13
- },
14
- },
15
- });
16
- export const { tableSetPage } = tableSlice.actions;
17
- export default tableSlice.reducer;
@@ -1,20 +0,0 @@
1
- import { createSlice } from "@reduxjs/toolkit";
2
- const initialState = {
3
- specialItems: [],
4
- loadingSpecialItems: false,
5
- };
6
- const webappTablesSlice = createSlice({
7
- name: "webappTables",
8
- initialState,
9
- reducers: {
10
- setLoadingSpecialItems: (state, action) => {
11
- state.loadingSpecialItems = action.payload;
12
- },
13
- setSpecialItems: (state, action) => {
14
- state.specialItems = action.payload;
15
- state.loadingSpecialItems = false;
16
- },
17
- },
18
- });
19
- export const { setLoadingSpecialItems, setSpecialItems } = webappTablesSlice.actions;
20
- export default webappTablesSlice.reducer;