@fctc/edu-logic-lib 1.0.3 → 1.0.4
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/dist/index.d.mts +1076 -23
- package/dist/index.d.ts +1076 -23
- package/dist/index.js +4 -618
- package/dist/index.mjs +3 -572
- package/package.json +1 -1
- package/dist/base-model-type-DvO53Lwi.d.mts +0 -7
- package/dist/base-model-type-DvO53Lwi.d.ts +0 -7
- package/dist/config.d.mts +0 -15
- package/dist/config.d.ts +0 -15
- package/dist/config.js +0 -262
- package/dist/config.mjs +0 -256
- package/dist/constants.d.mts +0 -120
- package/dist/constants.d.ts +0 -120
- package/dist/constants.js +0 -154
- package/dist/constants.mjs +0 -141
- package/dist/context-type-D5XefoL-.d.mts +0 -8
- package/dist/context-type-D5XefoL-.d.ts +0 -8
- package/dist/environment.d.mts +0 -37
- package/dist/environment.d.ts +0 -37
- package/dist/environment.js +0 -849
- package/dist/environment.mjs +0 -841
- package/dist/hooks.d.mts +0 -218
- package/dist/hooks.d.ts +0 -218
- package/dist/hooks.js +0 -4865
- package/dist/hooks.mjs +0 -4814
- package/dist/index-C_nK1Mii.d.mts +0 -19
- package/dist/index-C_nK1Mii.d.ts +0 -19
- package/dist/models.d.mts +0 -35
- package/dist/models.d.ts +0 -35
- package/dist/models.js +0 -3225
- package/dist/models.mjs +0 -3217
- package/dist/provider.d.mts +0 -16
- package/dist/provider.d.ts +0 -16
- package/dist/provider.js +0 -3232
- package/dist/provider.mjs +0 -3224
- package/dist/services.d.mts +0 -160
- package/dist/services.d.ts +0 -160
- package/dist/services.js +0 -4045
- package/dist/services.mjs +0 -4032
- package/dist/store.d.mts +0 -505
- package/dist/store.d.ts +0 -505
- package/dist/store.js +0 -582
- package/dist/store.mjs +0 -519
- package/dist/types.d.mts +0 -12
- package/dist/types.d.ts +0 -12
- package/dist/types.js +0 -2
- package/dist/types.mjs +0 -1
- package/dist/use-get-selection-DFh6sc49.d.mts +0 -26
- package/dist/use-get-selection-DFh6sc49.d.ts +0 -26
- package/dist/utils.d.mts +0 -52
- package/dist/utils.d.ts +0 -52
- package/dist/utils.js +0 -2360
- package/dist/utils.mjs +0 -2344
- package/dist/view-type-BTzRpkT7.d.mts +0 -106
- package/dist/view-type-BTzRpkT7.d.ts +0 -106
package/dist/store.js
DELETED
|
@@ -1,582 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactRedux = require('react-redux');
|
|
4
|
-
var toolkit = require('@reduxjs/toolkit');
|
|
5
|
-
|
|
6
|
-
// src/store/index.ts
|
|
7
|
-
var initialState = {
|
|
8
|
-
baseUrl: "",
|
|
9
|
-
requests: null,
|
|
10
|
-
companies: [],
|
|
11
|
-
user: {},
|
|
12
|
-
envFile: null,
|
|
13
|
-
defaultCompany: {
|
|
14
|
-
id: null,
|
|
15
|
-
logo: "",
|
|
16
|
-
secondary_color: "",
|
|
17
|
-
primary_color: ""
|
|
18
|
-
},
|
|
19
|
-
context: {
|
|
20
|
-
uid: null,
|
|
21
|
-
allowed_company_ids: [],
|
|
22
|
-
lang: "vi_VN",
|
|
23
|
-
tz: "Asia/Saigon"
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
var envSlice = toolkit.createSlice({
|
|
27
|
-
name: "env",
|
|
28
|
-
initialState,
|
|
29
|
-
reducers: {
|
|
30
|
-
setEnv: (state, action) => {
|
|
31
|
-
Object.assign(state, action.payload);
|
|
32
|
-
},
|
|
33
|
-
setUid: (state, action) => {
|
|
34
|
-
state.context.uid = action.payload;
|
|
35
|
-
},
|
|
36
|
-
setAllowCompanies: (state, action) => {
|
|
37
|
-
state.context.allowed_company_ids = action.payload;
|
|
38
|
-
},
|
|
39
|
-
setCompanies: (state, action) => {
|
|
40
|
-
state.companies = action.payload;
|
|
41
|
-
},
|
|
42
|
-
setDefaultCompany: (state, action) => {
|
|
43
|
-
state.defaultCompany = action.payload;
|
|
44
|
-
},
|
|
45
|
-
setLang: (state, action) => {
|
|
46
|
-
state.context.lang = action.payload;
|
|
47
|
-
},
|
|
48
|
-
setUser: (state, action) => {
|
|
49
|
-
state.user = action.payload;
|
|
50
|
-
},
|
|
51
|
-
setEnvFile: (state, action) => {
|
|
52
|
-
state.envFile = action.payload;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
var {
|
|
57
|
-
setEnv,
|
|
58
|
-
setUid,
|
|
59
|
-
setLang,
|
|
60
|
-
setAllowCompanies,
|
|
61
|
-
setCompanies,
|
|
62
|
-
setDefaultCompany,
|
|
63
|
-
setUser,
|
|
64
|
-
setEnvFile
|
|
65
|
-
} = envSlice.actions;
|
|
66
|
-
var selectEnv = (state) => state.env;
|
|
67
|
-
var env_slice_default = envSlice.reducer;
|
|
68
|
-
var initialState2 = {
|
|
69
|
-
dataParse: null,
|
|
70
|
-
idFile: null,
|
|
71
|
-
isFileLoaded: false,
|
|
72
|
-
loadingImport: false,
|
|
73
|
-
selectedFile: null,
|
|
74
|
-
errorData: null
|
|
75
|
-
};
|
|
76
|
-
var excelSlice = toolkit.createSlice({
|
|
77
|
-
name: "excel",
|
|
78
|
-
initialState: initialState2,
|
|
79
|
-
reducers: {
|
|
80
|
-
setDataParse: (state, action) => {
|
|
81
|
-
state.dataParse = action.payload;
|
|
82
|
-
},
|
|
83
|
-
setIdFile: (state, action) => {
|
|
84
|
-
state.idFile = action.payload;
|
|
85
|
-
},
|
|
86
|
-
setIsFileLoaded: (state, action) => {
|
|
87
|
-
state.isFileLoaded = action.payload;
|
|
88
|
-
},
|
|
89
|
-
setLoadingImport: (state, action) => {
|
|
90
|
-
state.loadingImport = action.payload;
|
|
91
|
-
},
|
|
92
|
-
setSelectedFile: (state, action) => {
|
|
93
|
-
state.selectedFile = action.payload;
|
|
94
|
-
},
|
|
95
|
-
setErrorData: (state, action) => {
|
|
96
|
-
state.errorData = action.payload;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
var {
|
|
101
|
-
setDataParse,
|
|
102
|
-
setIdFile,
|
|
103
|
-
setIsFileLoaded,
|
|
104
|
-
setLoadingImport,
|
|
105
|
-
setSelectedFile,
|
|
106
|
-
setErrorData
|
|
107
|
-
} = excelSlice.actions;
|
|
108
|
-
var selectExcel = (state) => state.excel;
|
|
109
|
-
var excel_slice_default = excelSlice.reducer;
|
|
110
|
-
var initialState3 = {
|
|
111
|
-
viewDataStore: {},
|
|
112
|
-
isShowingModalDetail: false,
|
|
113
|
-
isShowModalTranslate: false,
|
|
114
|
-
formSubmitComponent: {},
|
|
115
|
-
fieldTranslation: null,
|
|
116
|
-
listSubject: {},
|
|
117
|
-
dataUser: {}
|
|
118
|
-
};
|
|
119
|
-
var formSlice = toolkit.createSlice({
|
|
120
|
-
name: "form",
|
|
121
|
-
initialState: initialState3,
|
|
122
|
-
reducers: {
|
|
123
|
-
setViewDataStore: (state, action) => {
|
|
124
|
-
state.viewDataStore = action.payload;
|
|
125
|
-
},
|
|
126
|
-
setIsShowingModalDetail: (state, action) => {
|
|
127
|
-
state.isShowingModalDetail = action.payload;
|
|
128
|
-
},
|
|
129
|
-
setIsShowModalTranslate: (state, action) => {
|
|
130
|
-
state.isShowModalTranslate = action.payload;
|
|
131
|
-
},
|
|
132
|
-
setFormSubmitComponent: (state, action) => {
|
|
133
|
-
state.formSubmitComponent[action.payload.key] = action.payload.component;
|
|
134
|
-
},
|
|
135
|
-
setFieldTranslate: (state, action) => {
|
|
136
|
-
state.fieldTranslation = action.payload;
|
|
137
|
-
},
|
|
138
|
-
setListSubject: (state, action) => {
|
|
139
|
-
state.listSubject = action.payload;
|
|
140
|
-
},
|
|
141
|
-
setDataUser: (state, action) => {
|
|
142
|
-
state.dataUser = action.payload;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
var {
|
|
147
|
-
setViewDataStore,
|
|
148
|
-
setIsShowingModalDetail,
|
|
149
|
-
setIsShowModalTranslate,
|
|
150
|
-
setFormSubmitComponent,
|
|
151
|
-
setFieldTranslate,
|
|
152
|
-
setListSubject,
|
|
153
|
-
setDataUser
|
|
154
|
-
} = formSlice.actions;
|
|
155
|
-
var selectForm = (state) => state.form;
|
|
156
|
-
var form_slice_default = formSlice.reducer;
|
|
157
|
-
var initialState4 = {
|
|
158
|
-
pageLimit: 10,
|
|
159
|
-
fields: {},
|
|
160
|
-
order: "",
|
|
161
|
-
selectedRowKeys: [],
|
|
162
|
-
indexRowTableModal: -2,
|
|
163
|
-
footerGroupTable: {},
|
|
164
|
-
page: 0,
|
|
165
|
-
domainTable: []
|
|
166
|
-
};
|
|
167
|
-
var listSlice = toolkit.createSlice({
|
|
168
|
-
name: "list",
|
|
169
|
-
initialState: initialState4,
|
|
170
|
-
reducers: {
|
|
171
|
-
setPageLimit: (state, action) => {
|
|
172
|
-
state.pageLimit = action.payload;
|
|
173
|
-
},
|
|
174
|
-
setFields: (state, action) => {
|
|
175
|
-
state.fields = action.payload;
|
|
176
|
-
},
|
|
177
|
-
setOrder: (state, action) => {
|
|
178
|
-
state.order = action.payload;
|
|
179
|
-
},
|
|
180
|
-
setSelectedRowKeys: (state, action) => {
|
|
181
|
-
state.selectedRowKeys = action.payload;
|
|
182
|
-
},
|
|
183
|
-
setIndexRowTableModal: (state, action) => {
|
|
184
|
-
state.indexRowTableModal = action.payload;
|
|
185
|
-
},
|
|
186
|
-
setPage: (state, action) => {
|
|
187
|
-
state.page = action.payload;
|
|
188
|
-
},
|
|
189
|
-
setDomainTable: (state, action) => {
|
|
190
|
-
state.domainTable = action.payload;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
var {
|
|
195
|
-
setPageLimit,
|
|
196
|
-
setFields,
|
|
197
|
-
setOrder,
|
|
198
|
-
setSelectedRowKeys,
|
|
199
|
-
setIndexRowTableModal,
|
|
200
|
-
setPage,
|
|
201
|
-
setDomainTable
|
|
202
|
-
} = listSlice.actions;
|
|
203
|
-
var selectList = (state) => state.list;
|
|
204
|
-
var list_slice_default = listSlice.reducer;
|
|
205
|
-
var initialState5 = {
|
|
206
|
-
menuList: []
|
|
207
|
-
};
|
|
208
|
-
var navbarSlice = toolkit.createSlice({
|
|
209
|
-
name: "navbar",
|
|
210
|
-
initialState: initialState5,
|
|
211
|
-
reducers: {
|
|
212
|
-
setMenuList: (state, action) => {
|
|
213
|
-
state.menuList = action.payload;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
var { setMenuList } = navbarSlice.actions;
|
|
218
|
-
var selectNavbar = (state) => state.navbar;
|
|
219
|
-
var navbar_slice_default = navbarSlice.reducer;
|
|
220
|
-
var initialState6 = {
|
|
221
|
-
profile: {}
|
|
222
|
-
};
|
|
223
|
-
var profileSlice = toolkit.createSlice({
|
|
224
|
-
name: "profile",
|
|
225
|
-
initialState: initialState6,
|
|
226
|
-
reducers: {
|
|
227
|
-
setProfile: (state, action) => {
|
|
228
|
-
state.profile = action.payload;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
var { setProfile } = profileSlice.actions;
|
|
233
|
-
var selectProfile = (state) => state.profile;
|
|
234
|
-
var profile_slice_default = profileSlice.reducer;
|
|
235
|
-
var initialState7 = {
|
|
236
|
-
groupByDomain: null,
|
|
237
|
-
tableHead: [],
|
|
238
|
-
searchString: "",
|
|
239
|
-
hoveredIndexSearchList: null,
|
|
240
|
-
selectedTags: [],
|
|
241
|
-
firstDomain: null,
|
|
242
|
-
searchMap: {},
|
|
243
|
-
typeFieldsSearch: "",
|
|
244
|
-
modelSearch: "",
|
|
245
|
-
filterBy: [],
|
|
246
|
-
groupBy: []
|
|
247
|
-
};
|
|
248
|
-
var searchSlice = toolkit.createSlice({
|
|
249
|
-
name: "search",
|
|
250
|
-
initialState: initialState7,
|
|
251
|
-
reducers: {
|
|
252
|
-
setGroupByDomain: (state, action) => {
|
|
253
|
-
state.groupByDomain = action.payload;
|
|
254
|
-
},
|
|
255
|
-
setTableHead: (state, action) => {
|
|
256
|
-
state.tableHead = action.payload;
|
|
257
|
-
},
|
|
258
|
-
setSearchString: (state, action) => {
|
|
259
|
-
state.searchString = action.payload;
|
|
260
|
-
},
|
|
261
|
-
setHoveredIndexSearchList: (state, action) => {
|
|
262
|
-
state.hoveredIndexSearchList = action.payload;
|
|
263
|
-
},
|
|
264
|
-
setSelectedTags: (state, action) => {
|
|
265
|
-
state.selectedTags = action.payload;
|
|
266
|
-
},
|
|
267
|
-
setFirstDomain: (state, action) => {
|
|
268
|
-
state.firstDomain = action.payload;
|
|
269
|
-
},
|
|
270
|
-
setTypeFieldsSearch: (state, action) => {
|
|
271
|
-
state.typeFieldsSearch = action.payload;
|
|
272
|
-
},
|
|
273
|
-
setModelSearch: (state, action) => {
|
|
274
|
-
state.modelSearch = action.payload;
|
|
275
|
-
},
|
|
276
|
-
setFilterBy: (state, action) => {
|
|
277
|
-
state.filterBy = action.payload;
|
|
278
|
-
},
|
|
279
|
-
setGroupBy: (state, action) => {
|
|
280
|
-
state.groupBy = action.payload;
|
|
281
|
-
},
|
|
282
|
-
setSearchMap: (state, action) => {
|
|
283
|
-
state.searchMap = action.payload;
|
|
284
|
-
},
|
|
285
|
-
updateSearchMap: (state, action) => {
|
|
286
|
-
if (!state.searchMap[action.payload.key]) {
|
|
287
|
-
state.searchMap[action.payload.key] = [];
|
|
288
|
-
}
|
|
289
|
-
state.searchMap[action.payload.key].push(action.payload.value);
|
|
290
|
-
},
|
|
291
|
-
removeKeyFromSearchMap: (state, action) => {
|
|
292
|
-
const { key, item } = action.payload;
|
|
293
|
-
const values = state.searchMap[key];
|
|
294
|
-
if (!values) return;
|
|
295
|
-
if (item) {
|
|
296
|
-
const filtered = values.filter((value) => value.name !== item.name);
|
|
297
|
-
if (filtered.length > 0) {
|
|
298
|
-
state.searchMap[key] = filtered;
|
|
299
|
-
} else {
|
|
300
|
-
delete state.searchMap[key];
|
|
301
|
-
}
|
|
302
|
-
} else {
|
|
303
|
-
delete state.searchMap[key];
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
clearSearchMap: (state) => {
|
|
307
|
-
state.searchMap = {};
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
var {
|
|
312
|
-
setGroupByDomain,
|
|
313
|
-
setSelectedTags,
|
|
314
|
-
setSearchString,
|
|
315
|
-
setHoveredIndexSearchList,
|
|
316
|
-
setFirstDomain,
|
|
317
|
-
setTableHead,
|
|
318
|
-
setFilterBy,
|
|
319
|
-
setTypeFieldsSearch,
|
|
320
|
-
setModelSearch,
|
|
321
|
-
setSearchMap,
|
|
322
|
-
updateSearchMap,
|
|
323
|
-
removeKeyFromSearchMap,
|
|
324
|
-
setGroupBy,
|
|
325
|
-
clearSearchMap
|
|
326
|
-
} = searchSlice.actions;
|
|
327
|
-
var selectSearch = (state) => state.search;
|
|
328
|
-
var selectSearchMap = (state) => state.search.searchMap;
|
|
329
|
-
var search_slice_default = searchSlice.reducer;
|
|
330
|
-
|
|
331
|
-
// node_modules/redux/dist/redux.mjs
|
|
332
|
-
function formatProdErrorMessage(code) {
|
|
333
|
-
return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
|
|
334
|
-
}
|
|
335
|
-
var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
|
|
336
|
-
var ActionTypes = {
|
|
337
|
-
INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
|
|
338
|
-
REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
|
|
339
|
-
PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
|
|
340
|
-
};
|
|
341
|
-
var actionTypes_default = ActionTypes;
|
|
342
|
-
function isPlainObject(obj) {
|
|
343
|
-
if (typeof obj !== "object" || obj === null)
|
|
344
|
-
return false;
|
|
345
|
-
let proto = obj;
|
|
346
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
347
|
-
proto = Object.getPrototypeOf(proto);
|
|
348
|
-
}
|
|
349
|
-
return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
|
|
350
|
-
}
|
|
351
|
-
function miniKindOf(val) {
|
|
352
|
-
if (val === void 0)
|
|
353
|
-
return "undefined";
|
|
354
|
-
if (val === null)
|
|
355
|
-
return "null";
|
|
356
|
-
const type = typeof val;
|
|
357
|
-
switch (type) {
|
|
358
|
-
case "boolean":
|
|
359
|
-
case "string":
|
|
360
|
-
case "number":
|
|
361
|
-
case "symbol":
|
|
362
|
-
case "function": {
|
|
363
|
-
return type;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
if (Array.isArray(val))
|
|
367
|
-
return "array";
|
|
368
|
-
if (isDate(val))
|
|
369
|
-
return "date";
|
|
370
|
-
if (isError(val))
|
|
371
|
-
return "error";
|
|
372
|
-
const constructorName = ctorName(val);
|
|
373
|
-
switch (constructorName) {
|
|
374
|
-
case "Symbol":
|
|
375
|
-
case "Promise":
|
|
376
|
-
case "WeakMap":
|
|
377
|
-
case "WeakSet":
|
|
378
|
-
case "Map":
|
|
379
|
-
case "Set":
|
|
380
|
-
return constructorName;
|
|
381
|
-
}
|
|
382
|
-
return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
|
|
383
|
-
}
|
|
384
|
-
function ctorName(val) {
|
|
385
|
-
return typeof val.constructor === "function" ? val.constructor.name : null;
|
|
386
|
-
}
|
|
387
|
-
function isError(val) {
|
|
388
|
-
return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
|
|
389
|
-
}
|
|
390
|
-
function isDate(val) {
|
|
391
|
-
if (val instanceof Date)
|
|
392
|
-
return true;
|
|
393
|
-
return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
|
|
394
|
-
}
|
|
395
|
-
function kindOf(val) {
|
|
396
|
-
let typeOfVal = typeof val;
|
|
397
|
-
if (process.env.NODE_ENV !== "production") {
|
|
398
|
-
typeOfVal = miniKindOf(val);
|
|
399
|
-
}
|
|
400
|
-
return typeOfVal;
|
|
401
|
-
}
|
|
402
|
-
function warning(message) {
|
|
403
|
-
if (typeof console !== "undefined" && typeof console.error === "function") {
|
|
404
|
-
console.error(message);
|
|
405
|
-
}
|
|
406
|
-
try {
|
|
407
|
-
throw new Error(message);
|
|
408
|
-
} catch (e) {
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
|
412
|
-
const reducerKeys = Object.keys(reducers);
|
|
413
|
-
const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
|
|
414
|
-
if (reducerKeys.length === 0) {
|
|
415
|
-
return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
|
|
416
|
-
}
|
|
417
|
-
if (!isPlainObject(inputState)) {
|
|
418
|
-
return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
|
|
419
|
-
}
|
|
420
|
-
const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
|
|
421
|
-
unexpectedKeys.forEach((key) => {
|
|
422
|
-
unexpectedKeyCache[key] = true;
|
|
423
|
-
});
|
|
424
|
-
if (action && action.type === actionTypes_default.REPLACE)
|
|
425
|
-
return;
|
|
426
|
-
if (unexpectedKeys.length > 0) {
|
|
427
|
-
return `Unexpected ${unexpectedKeys.length > 1 ? "keys" : "key"} "${unexpectedKeys.join('", "')}" found in ${argumentName}. Expected to find one of the known reducer keys instead: "${reducerKeys.join('", "')}". Unexpected keys will be ignored.`;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
function assertReducerShape(reducers) {
|
|
431
|
-
Object.keys(reducers).forEach((key) => {
|
|
432
|
-
const reducer = reducers[key];
|
|
433
|
-
const initialState8 = reducer(void 0, {
|
|
434
|
-
type: actionTypes_default.INIT
|
|
435
|
-
});
|
|
436
|
-
if (typeof initialState8 === "undefined") {
|
|
437
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(12) : `The slice reducer for key "${key}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);
|
|
438
|
-
}
|
|
439
|
-
if (typeof reducer(void 0, {
|
|
440
|
-
type: actionTypes_default.PROBE_UNKNOWN_ACTION()
|
|
441
|
-
}) === "undefined") {
|
|
442
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(13) : `The slice reducer for key "${key}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
function combineReducers(reducers) {
|
|
447
|
-
const reducerKeys = Object.keys(reducers);
|
|
448
|
-
const finalReducers = {};
|
|
449
|
-
for (let i = 0; i < reducerKeys.length; i++) {
|
|
450
|
-
const key = reducerKeys[i];
|
|
451
|
-
if (process.env.NODE_ENV !== "production") {
|
|
452
|
-
if (typeof reducers[key] === "undefined") {
|
|
453
|
-
warning(`No reducer provided for key "${key}"`);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
if (typeof reducers[key] === "function") {
|
|
457
|
-
finalReducers[key] = reducers[key];
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
const finalReducerKeys = Object.keys(finalReducers);
|
|
461
|
-
let unexpectedKeyCache;
|
|
462
|
-
if (process.env.NODE_ENV !== "production") {
|
|
463
|
-
unexpectedKeyCache = {};
|
|
464
|
-
}
|
|
465
|
-
let shapeAssertionError;
|
|
466
|
-
try {
|
|
467
|
-
assertReducerShape(finalReducers);
|
|
468
|
-
} catch (e) {
|
|
469
|
-
shapeAssertionError = e;
|
|
470
|
-
}
|
|
471
|
-
return function combination(state = {}, action) {
|
|
472
|
-
if (shapeAssertionError) {
|
|
473
|
-
throw shapeAssertionError;
|
|
474
|
-
}
|
|
475
|
-
if (process.env.NODE_ENV !== "production") {
|
|
476
|
-
const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
|
477
|
-
if (warningMessage) {
|
|
478
|
-
warning(warningMessage);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
let hasChanged = false;
|
|
482
|
-
const nextState = {};
|
|
483
|
-
for (let i = 0; i < finalReducerKeys.length; i++) {
|
|
484
|
-
const key = finalReducerKeys[i];
|
|
485
|
-
const reducer = finalReducers[key];
|
|
486
|
-
const previousStateForKey = state[key];
|
|
487
|
-
const nextStateForKey = reducer(previousStateForKey, action);
|
|
488
|
-
if (typeof nextStateForKey === "undefined") {
|
|
489
|
-
const actionType = action && action.type;
|
|
490
|
-
throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(14) : `When called with an action of type ${actionType ? `"${String(actionType)}"` : "(unknown type)"}, the slice reducer for key "${key}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);
|
|
491
|
-
}
|
|
492
|
-
nextState[key] = nextStateForKey;
|
|
493
|
-
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
|
494
|
-
}
|
|
495
|
-
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
|
|
496
|
-
return hasChanged ? nextState : state;
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
// src/store/store.ts
|
|
501
|
-
var rootReducer = combineReducers({
|
|
502
|
-
env: env_slice_default,
|
|
503
|
-
navbar: navbar_slice_default,
|
|
504
|
-
list: list_slice_default,
|
|
505
|
-
search: search_slice_default,
|
|
506
|
-
form: form_slice_default,
|
|
507
|
-
excel: excel_slice_default,
|
|
508
|
-
profile: profile_slice_default
|
|
509
|
-
});
|
|
510
|
-
var envStore = toolkit.configureStore({
|
|
511
|
-
reducer: rootReducer,
|
|
512
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
513
|
-
serializableCheck: false
|
|
514
|
-
})
|
|
515
|
-
});
|
|
516
|
-
|
|
517
|
-
// src/store/index.ts
|
|
518
|
-
var useAppDispatch = reactRedux.useDispatch;
|
|
519
|
-
var useAppSelector = reactRedux.useSelector;
|
|
520
|
-
|
|
521
|
-
exports.clearSearchMap = clearSearchMap;
|
|
522
|
-
exports.envSlice = envSlice;
|
|
523
|
-
exports.envStore = envStore;
|
|
524
|
-
exports.excelSlice = excelSlice;
|
|
525
|
-
exports.formSlice = formSlice;
|
|
526
|
-
exports.listSlice = listSlice;
|
|
527
|
-
exports.navbarSlice = navbarSlice;
|
|
528
|
-
exports.profileSlice = profileSlice;
|
|
529
|
-
exports.removeKeyFromSearchMap = removeKeyFromSearchMap;
|
|
530
|
-
exports.searchSlice = searchSlice;
|
|
531
|
-
exports.selectEnv = selectEnv;
|
|
532
|
-
exports.selectExcel = selectExcel;
|
|
533
|
-
exports.selectForm = selectForm;
|
|
534
|
-
exports.selectList = selectList;
|
|
535
|
-
exports.selectNavbar = selectNavbar;
|
|
536
|
-
exports.selectProfile = selectProfile;
|
|
537
|
-
exports.selectSearch = selectSearch;
|
|
538
|
-
exports.selectSearchMap = selectSearchMap;
|
|
539
|
-
exports.setAllowCompanies = setAllowCompanies;
|
|
540
|
-
exports.setCompanies = setCompanies;
|
|
541
|
-
exports.setDataParse = setDataParse;
|
|
542
|
-
exports.setDataUser = setDataUser;
|
|
543
|
-
exports.setDefaultCompany = setDefaultCompany;
|
|
544
|
-
exports.setDomainTable = setDomainTable;
|
|
545
|
-
exports.setEnv = setEnv;
|
|
546
|
-
exports.setEnvFile = setEnvFile;
|
|
547
|
-
exports.setErrorData = setErrorData;
|
|
548
|
-
exports.setFieldTranslate = setFieldTranslate;
|
|
549
|
-
exports.setFields = setFields;
|
|
550
|
-
exports.setFilterBy = setFilterBy;
|
|
551
|
-
exports.setFirstDomain = setFirstDomain;
|
|
552
|
-
exports.setFormSubmitComponent = setFormSubmitComponent;
|
|
553
|
-
exports.setGroupBy = setGroupBy;
|
|
554
|
-
exports.setGroupByDomain = setGroupByDomain;
|
|
555
|
-
exports.setHoveredIndexSearchList = setHoveredIndexSearchList;
|
|
556
|
-
exports.setIdFile = setIdFile;
|
|
557
|
-
exports.setIndexRowTableModal = setIndexRowTableModal;
|
|
558
|
-
exports.setIsFileLoaded = setIsFileLoaded;
|
|
559
|
-
exports.setIsShowModalTranslate = setIsShowModalTranslate;
|
|
560
|
-
exports.setIsShowingModalDetail = setIsShowingModalDetail;
|
|
561
|
-
exports.setLang = setLang;
|
|
562
|
-
exports.setListSubject = setListSubject;
|
|
563
|
-
exports.setLoadingImport = setLoadingImport;
|
|
564
|
-
exports.setMenuList = setMenuList;
|
|
565
|
-
exports.setModelSearch = setModelSearch;
|
|
566
|
-
exports.setOrder = setOrder;
|
|
567
|
-
exports.setPage = setPage;
|
|
568
|
-
exports.setPageLimit = setPageLimit;
|
|
569
|
-
exports.setProfile = setProfile;
|
|
570
|
-
exports.setSearchMap = setSearchMap;
|
|
571
|
-
exports.setSearchString = setSearchString;
|
|
572
|
-
exports.setSelectedFile = setSelectedFile;
|
|
573
|
-
exports.setSelectedRowKeys = setSelectedRowKeys;
|
|
574
|
-
exports.setSelectedTags = setSelectedTags;
|
|
575
|
-
exports.setTableHead = setTableHead;
|
|
576
|
-
exports.setTypeFieldsSearch = setTypeFieldsSearch;
|
|
577
|
-
exports.setUid = setUid;
|
|
578
|
-
exports.setUser = setUser;
|
|
579
|
-
exports.setViewDataStore = setViewDataStore;
|
|
580
|
-
exports.updateSearchMap = updateSearchMap;
|
|
581
|
-
exports.useAppDispatch = useAppDispatch;
|
|
582
|
-
exports.useAppSelector = useAppSelector;
|