@fctc/interface-logic 1.0.1 → 1.0.2
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/base-model-type-DvO53Lwi.d.mts +7 -0
- package/dist/base-model-type-DvO53Lwi.d.ts +7 -0
- package/dist/config.d.mts +16 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +2355 -0
- package/dist/config.mjs +2318 -0
- package/dist/constants.d.mts +128 -0
- package/dist/constants.d.ts +128 -0
- package/dist/constants.js +202 -0
- package/dist/constants.mjs +163 -0
- package/dist/context-type-D5XefoL-.d.mts +8 -0
- package/dist/context-type-D5XefoL-.d.ts +8 -0
- package/dist/environment.d.mts +41 -0
- package/dist/environment.d.ts +41 -0
- package/dist/environment.js +3061 -0
- package/dist/environment.mjs +3021 -0
- package/dist/hook.d.mts +292 -0
- package/dist/hook.d.ts +292 -0
- package/dist/hook.js +5683 -0
- package/dist/hook.mjs +5587 -0
- package/dist/index-C_nK1Mii.d.mts +19 -0
- package/dist/index-C_nK1Mii.d.ts +19 -0
- package/dist/index.d.mts +1 -1389
- package/dist/index.d.ts +1 -1389
- package/dist/index.js +0 -6856
- package/dist/index.mjs +0 -6629
- package/dist/model.d.mts +35 -0
- package/dist/model.d.ts +35 -0
- package/dist/model.js +3320 -0
- package/dist/model.mjs +3281 -0
- package/dist/provider.d.mts +15 -0
- package/dist/provider.d.ts +15 -0
- package/dist/provider.js +6566 -0
- package/dist/provider.mjs +6550 -0
- package/dist/services.d.mts +224 -0
- package/dist/services.d.ts +224 -0
- package/dist/services.js +4477 -0
- package/dist/services.mjs +4432 -0
- package/dist/session-storage-CxkkEmQh.d.mts +15 -0
- package/dist/session-storage-CxkkEmQh.d.ts +15 -0
- package/dist/store.d.mts +643 -0
- package/dist/store.d.ts +643 -0
- package/dist/store.js +814 -0
- package/dist/store.mjs +709 -0
- package/dist/types.d.mts +12 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/use-get-selection-QZu1jKqa.d.mts +15 -0
- package/dist/use-get-selection-QZu1jKqa.d.ts +15 -0
- package/dist/utils.d.mts +87 -0
- package/dist/utils.d.ts +87 -0
- package/dist/utils.js +2947 -0
- package/dist/utils.mjs +2881 -0
- package/dist/view-type-y6vtF3wg.d.mts +106 -0
- package/dist/view-type-y6vtF3wg.d.ts +106 -0
- package/package.json +53 -12
package/dist/store.mjs
ADDED
@@ -0,0 +1,709 @@
|
|
1
|
+
// src/store/index.ts
|
2
|
+
import { useDispatch, useSelector } from "react-redux";
|
3
|
+
|
4
|
+
// src/store/reducers/breadcrums-slice/index.ts
|
5
|
+
import { createSlice } from "@reduxjs/toolkit";
|
6
|
+
var initialState = {
|
7
|
+
breadCrumbs: []
|
8
|
+
};
|
9
|
+
var breadcrumbsSlice = createSlice({
|
10
|
+
name: "breadcrumbs",
|
11
|
+
initialState,
|
12
|
+
reducers: {
|
13
|
+
setBreadCrumbs: (state, action) => {
|
14
|
+
state.breadCrumbs = [...state.breadCrumbs, action.payload];
|
15
|
+
}
|
16
|
+
}
|
17
|
+
});
|
18
|
+
var { setBreadCrumbs } = breadcrumbsSlice.actions;
|
19
|
+
var selectBreadCrumbs = (state) => state.breadcrumbs;
|
20
|
+
var breadcrums_slice_default = breadcrumbsSlice.reducer;
|
21
|
+
|
22
|
+
// src/store/reducers/env-slice/index.ts
|
23
|
+
import { createSlice as createSlice2 } from "@reduxjs/toolkit";
|
24
|
+
var initialState2 = {
|
25
|
+
baseUrl: "",
|
26
|
+
requests: null,
|
27
|
+
companies: [],
|
28
|
+
user: {},
|
29
|
+
config: null,
|
30
|
+
envFile: null,
|
31
|
+
defaultCompany: {
|
32
|
+
id: null,
|
33
|
+
logo: "",
|
34
|
+
secondary_color: "",
|
35
|
+
primary_color: ""
|
36
|
+
},
|
37
|
+
context: {
|
38
|
+
uid: null,
|
39
|
+
allowed_company_ids: [],
|
40
|
+
lang: "vi_VN",
|
41
|
+
tz: "Asia/Saigon"
|
42
|
+
}
|
43
|
+
};
|
44
|
+
var envSlice = createSlice2({
|
45
|
+
name: "env",
|
46
|
+
initialState: initialState2,
|
47
|
+
reducers: {
|
48
|
+
setEnv: (state, action) => {
|
49
|
+
Object.assign(state, action.payload);
|
50
|
+
},
|
51
|
+
setUid: (state, action) => {
|
52
|
+
state.context.uid = action.payload;
|
53
|
+
},
|
54
|
+
setAllowCompanies: (state, action) => {
|
55
|
+
state.context.allowed_company_ids = action.payload;
|
56
|
+
},
|
57
|
+
setCompanies: (state, action) => {
|
58
|
+
state.companies = action.payload;
|
59
|
+
},
|
60
|
+
setDefaultCompany: (state, action) => {
|
61
|
+
state.defaultCompany = action.payload;
|
62
|
+
},
|
63
|
+
setLang: (state, action) => {
|
64
|
+
state.context.lang = action.payload;
|
65
|
+
},
|
66
|
+
setUser: (state, action) => {
|
67
|
+
state.user = action.payload;
|
68
|
+
},
|
69
|
+
setConfig: (state, action) => {
|
70
|
+
state.config = action.payload;
|
71
|
+
},
|
72
|
+
setEnvFile: (state, action) => {
|
73
|
+
state.envFile = action.payload;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
});
|
77
|
+
var {
|
78
|
+
setEnv,
|
79
|
+
setUid,
|
80
|
+
setLang,
|
81
|
+
setAllowCompanies,
|
82
|
+
setCompanies,
|
83
|
+
setDefaultCompany,
|
84
|
+
setUser,
|
85
|
+
setConfig,
|
86
|
+
setEnvFile
|
87
|
+
} = envSlice.actions;
|
88
|
+
var selectEnv = (state) => state.env;
|
89
|
+
var env_slice_default = envSlice.reducer;
|
90
|
+
|
91
|
+
// src/store/reducers/excel-slice/index.ts
|
92
|
+
import { createSlice as createSlice3 } from "@reduxjs/toolkit";
|
93
|
+
var initialState3 = {
|
94
|
+
dataParse: null,
|
95
|
+
idFile: null,
|
96
|
+
isFileLoaded: false,
|
97
|
+
loadingImport: false,
|
98
|
+
selectedFile: null,
|
99
|
+
errorData: null
|
100
|
+
};
|
101
|
+
var excelSlice = createSlice3({
|
102
|
+
name: "excel",
|
103
|
+
initialState: initialState3,
|
104
|
+
reducers: {
|
105
|
+
setDataParse: (state, action) => {
|
106
|
+
state.dataParse = action.payload;
|
107
|
+
},
|
108
|
+
setIdFile: (state, action) => {
|
109
|
+
state.idFile = action.payload;
|
110
|
+
},
|
111
|
+
setIsFileLoaded: (state, action) => {
|
112
|
+
state.isFileLoaded = action.payload;
|
113
|
+
},
|
114
|
+
setLoadingImport: (state, action) => {
|
115
|
+
state.loadingImport = action.payload;
|
116
|
+
},
|
117
|
+
setSelectedFile: (state, action) => {
|
118
|
+
state.selectedFile = action.payload;
|
119
|
+
},
|
120
|
+
setErrorData: (state, action) => {
|
121
|
+
state.errorData = action.payload;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
});
|
125
|
+
var {
|
126
|
+
setDataParse,
|
127
|
+
setIdFile,
|
128
|
+
setIsFileLoaded,
|
129
|
+
setLoadingImport,
|
130
|
+
setSelectedFile,
|
131
|
+
setErrorData
|
132
|
+
} = excelSlice.actions;
|
133
|
+
var selectExcel = (state) => state.excel;
|
134
|
+
var excel_slice_default = excelSlice.reducer;
|
135
|
+
|
136
|
+
// src/store/reducers/form-slice/index.ts
|
137
|
+
import { createSlice as createSlice4 } from "@reduxjs/toolkit";
|
138
|
+
var initialState4 = {
|
139
|
+
viewDataStore: {},
|
140
|
+
isShowingModalDetail: false,
|
141
|
+
isShowModalTranslate: false,
|
142
|
+
formSubmitComponent: {},
|
143
|
+
fieldTranslation: null,
|
144
|
+
listSubject: {},
|
145
|
+
dataUser: {}
|
146
|
+
};
|
147
|
+
var formSlice = createSlice4({
|
148
|
+
name: "form",
|
149
|
+
initialState: initialState4,
|
150
|
+
reducers: {
|
151
|
+
setViewDataStore: (state, action) => {
|
152
|
+
state.viewDataStore = action.payload;
|
153
|
+
},
|
154
|
+
setIsShowingModalDetail: (state, action) => {
|
155
|
+
state.isShowingModalDetail = action.payload;
|
156
|
+
},
|
157
|
+
setIsShowModalTranslate: (state, action) => {
|
158
|
+
state.isShowModalTranslate = action.payload;
|
159
|
+
},
|
160
|
+
setFormSubmitComponent: (state, action) => {
|
161
|
+
state.formSubmitComponent[action.payload.key] = action.payload.component;
|
162
|
+
},
|
163
|
+
setFieldTranslate: (state, action) => {
|
164
|
+
state.fieldTranslation = action.payload;
|
165
|
+
},
|
166
|
+
setListSubject: (state, action) => {
|
167
|
+
state.listSubject = action.payload;
|
168
|
+
},
|
169
|
+
setDataUser: (state, action) => {
|
170
|
+
state.dataUser = action.payload;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
});
|
174
|
+
var {
|
175
|
+
setViewDataStore,
|
176
|
+
setIsShowingModalDetail,
|
177
|
+
setIsShowModalTranslate,
|
178
|
+
setFormSubmitComponent,
|
179
|
+
setFieldTranslate,
|
180
|
+
setListSubject,
|
181
|
+
setDataUser
|
182
|
+
} = formSlice.actions;
|
183
|
+
var selectForm = (state) => state.form;
|
184
|
+
var form_slice_default = formSlice.reducer;
|
185
|
+
|
186
|
+
// src/store/reducers/header-slice/index.ts
|
187
|
+
import { createSlice as createSlice5 } from "@reduxjs/toolkit";
|
188
|
+
var headerSlice = createSlice5({
|
189
|
+
name: "header",
|
190
|
+
initialState: {
|
191
|
+
value: { allowedCompanyIds: [] }
|
192
|
+
},
|
193
|
+
reducers: {
|
194
|
+
setHeader: (state, action) => {
|
195
|
+
state.value = { ...state.value, ...action.payload };
|
196
|
+
},
|
197
|
+
setAllowedCompanyIds: (state, action) => {
|
198
|
+
state.value.allowedCompanyIds = action.payload;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
});
|
202
|
+
var { setAllowedCompanyIds, setHeader } = headerSlice.actions;
|
203
|
+
var selectHeader = (state) => state.header;
|
204
|
+
var header_slice_default = headerSlice.reducer;
|
205
|
+
|
206
|
+
// src/store/reducers/list-slice/index.ts
|
207
|
+
import { createSlice as createSlice6 } from "@reduxjs/toolkit";
|
208
|
+
var initialState5 = {
|
209
|
+
pageLimit: 10,
|
210
|
+
fields: {},
|
211
|
+
order: "",
|
212
|
+
selectedRowKeys: [],
|
213
|
+
selectedRadioKey: 0,
|
214
|
+
indexRowTableModal: -2,
|
215
|
+
isUpdateTableModal: false,
|
216
|
+
footerGroupTable: {},
|
217
|
+
transferDetail: null,
|
218
|
+
page: 0,
|
219
|
+
domainTable: []
|
220
|
+
};
|
221
|
+
var listSlice = createSlice6({
|
222
|
+
name: "list",
|
223
|
+
initialState: initialState5,
|
224
|
+
reducers: {
|
225
|
+
setPageLimit: (state, action) => {
|
226
|
+
state.pageLimit = action.payload;
|
227
|
+
},
|
228
|
+
setFields: (state, action) => {
|
229
|
+
state.fields = action.payload;
|
230
|
+
},
|
231
|
+
setOrder: (state, action) => {
|
232
|
+
state.order = action.payload;
|
233
|
+
},
|
234
|
+
setSelectedRowKeys: (state, action) => {
|
235
|
+
state.selectedRowKeys = action.payload;
|
236
|
+
},
|
237
|
+
setSelectedRadioKey: (state, action) => {
|
238
|
+
state.selectedRadioKey = action.payload;
|
239
|
+
},
|
240
|
+
setIndexRowTableModal: (state, action) => {
|
241
|
+
state.indexRowTableModal = action.payload;
|
242
|
+
},
|
243
|
+
setTransferDetail: (state, action) => {
|
244
|
+
state.transferDetail = action.payload;
|
245
|
+
},
|
246
|
+
setIsUpdateTableModal: (state, action) => {
|
247
|
+
state.isUpdateTableModal = action.payload;
|
248
|
+
},
|
249
|
+
setPage: (state, action) => {
|
250
|
+
state.page = action.payload;
|
251
|
+
},
|
252
|
+
setDomainTable: (state, action) => {
|
253
|
+
state.domainTable = action.payload;
|
254
|
+
}
|
255
|
+
}
|
256
|
+
});
|
257
|
+
var {
|
258
|
+
setPageLimit,
|
259
|
+
setFields,
|
260
|
+
setOrder,
|
261
|
+
setSelectedRowKeys,
|
262
|
+
setIndexRowTableModal,
|
263
|
+
setIsUpdateTableModal,
|
264
|
+
setPage,
|
265
|
+
setSelectedRadioKey,
|
266
|
+
setTransferDetail,
|
267
|
+
setDomainTable
|
268
|
+
} = listSlice.actions;
|
269
|
+
var selectList = (state) => state.list;
|
270
|
+
var list_slice_default = listSlice.reducer;
|
271
|
+
|
272
|
+
// src/store/reducers/login-slice/index.ts
|
273
|
+
import { createSlice as createSlice7 } from "@reduxjs/toolkit";
|
274
|
+
var initialState6 = {
|
275
|
+
db: "",
|
276
|
+
redirectTo: "/",
|
277
|
+
forgotPasswordUrl: "/"
|
278
|
+
};
|
279
|
+
var loginSlice = createSlice7({
|
280
|
+
name: "login",
|
281
|
+
initialState: initialState6,
|
282
|
+
reducers: {
|
283
|
+
setDb: (state, action) => {
|
284
|
+
state.db = action.payload;
|
285
|
+
},
|
286
|
+
setRedirectTo: (state, action) => {
|
287
|
+
state.redirectTo = action.payload;
|
288
|
+
},
|
289
|
+
setForgotPasswordUrl: (state, action) => {
|
290
|
+
state.forgotPasswordUrl = action.payload;
|
291
|
+
}
|
292
|
+
}
|
293
|
+
});
|
294
|
+
var { setDb, setRedirectTo, setForgotPasswordUrl } = loginSlice.actions;
|
295
|
+
var selectLogin = (state) => state.login;
|
296
|
+
var login_slice_default = loginSlice.reducer;
|
297
|
+
|
298
|
+
// src/store/reducers/navbar-slice/index.ts
|
299
|
+
import { createSlice as createSlice8 } from "@reduxjs/toolkit";
|
300
|
+
var initialState7 = {
|
301
|
+
menuFocus: {},
|
302
|
+
menuAction: {},
|
303
|
+
navbarWidth: 250,
|
304
|
+
menuList: []
|
305
|
+
};
|
306
|
+
var navbarSlice = createSlice8({
|
307
|
+
name: "navbar",
|
308
|
+
initialState: initialState7,
|
309
|
+
reducers: {
|
310
|
+
setMenuFocus: (state, action) => {
|
311
|
+
state.menuFocus = action.payload;
|
312
|
+
},
|
313
|
+
setMenuFocusAction: (state, action) => {
|
314
|
+
state.menuAction = action.payload;
|
315
|
+
},
|
316
|
+
setNavbarWidth: (state, action) => {
|
317
|
+
state.navbarWidth = action.payload;
|
318
|
+
},
|
319
|
+
setMenuList: (state, action) => {
|
320
|
+
state.menuList = action.payload;
|
321
|
+
}
|
322
|
+
}
|
323
|
+
});
|
324
|
+
var { setMenuFocus, setMenuFocusAction, setNavbarWidth, setMenuList } = navbarSlice.actions;
|
325
|
+
var selectNavbar = (state) => state.navbar;
|
326
|
+
var navbar_slice_default = navbarSlice.reducer;
|
327
|
+
|
328
|
+
// src/store/reducers/profile-slice/index.ts
|
329
|
+
import { createSlice as createSlice9 } from "@reduxjs/toolkit";
|
330
|
+
var initialState8 = {
|
331
|
+
profile: {}
|
332
|
+
};
|
333
|
+
var profileSlice = createSlice9({
|
334
|
+
name: "profile",
|
335
|
+
initialState: initialState8,
|
336
|
+
reducers: {
|
337
|
+
setProfile: (state, action) => {
|
338
|
+
state.profile = action.payload;
|
339
|
+
}
|
340
|
+
}
|
341
|
+
});
|
342
|
+
var { setProfile } = profileSlice.actions;
|
343
|
+
var selectProfile = (state) => state.profile;
|
344
|
+
var profile_slice_default = profileSlice.reducer;
|
345
|
+
|
346
|
+
// src/store/reducers/search-slice/index.ts
|
347
|
+
import { createSlice as createSlice10 } from "@reduxjs/toolkit";
|
348
|
+
var initialState9 = {
|
349
|
+
groupByDomain: null,
|
350
|
+
searchBy: [],
|
351
|
+
searchString: "",
|
352
|
+
hoveredIndexSearchList: null,
|
353
|
+
selectedTags: [],
|
354
|
+
firstDomain: null,
|
355
|
+
searchMap: {},
|
356
|
+
filterBy: [],
|
357
|
+
groupBy: []
|
358
|
+
};
|
359
|
+
var searchSlice = createSlice10({
|
360
|
+
name: "search",
|
361
|
+
initialState: initialState9,
|
362
|
+
reducers: {
|
363
|
+
setGroupByDomain: (state, action) => {
|
364
|
+
state.groupByDomain = action.payload;
|
365
|
+
},
|
366
|
+
setSearchBy: (state, action) => {
|
367
|
+
state.searchBy = action.payload;
|
368
|
+
},
|
369
|
+
setSearchString: (state, action) => {
|
370
|
+
state.searchString = action.payload;
|
371
|
+
},
|
372
|
+
setHoveredIndexSearchList: (state, action) => {
|
373
|
+
state.hoveredIndexSearchList = action.payload;
|
374
|
+
},
|
375
|
+
setSelectedTags: (state, action) => {
|
376
|
+
state.selectedTags = action.payload;
|
377
|
+
},
|
378
|
+
setFirstDomain: (state, action) => {
|
379
|
+
state.firstDomain = action.payload;
|
380
|
+
},
|
381
|
+
setFilterBy: (state, action) => {
|
382
|
+
state.filterBy = action.payload;
|
383
|
+
},
|
384
|
+
setGroupBy: (state, action) => {
|
385
|
+
state.groupBy = action.payload;
|
386
|
+
},
|
387
|
+
setSearchMap: (state, action) => {
|
388
|
+
state.searchMap = action.payload;
|
389
|
+
},
|
390
|
+
updateSearchMap: (state, action) => {
|
391
|
+
if (!state.searchMap[action.payload.key]) {
|
392
|
+
state.searchMap[action.payload.key] = [];
|
393
|
+
}
|
394
|
+
state.searchMap[action.payload.key].push(action.payload.value);
|
395
|
+
},
|
396
|
+
removeKeyFromSearchMap: (state, action) => {
|
397
|
+
const { key, item } = action.payload;
|
398
|
+
const values = state.searchMap[key];
|
399
|
+
if (!values) return;
|
400
|
+
if (item) {
|
401
|
+
const filtered = values.filter((value) => value.name !== item.name);
|
402
|
+
if (filtered.length > 0) {
|
403
|
+
state.searchMap[key] = filtered;
|
404
|
+
} else {
|
405
|
+
delete state.searchMap[key];
|
406
|
+
}
|
407
|
+
} else {
|
408
|
+
delete state.searchMap[key];
|
409
|
+
}
|
410
|
+
},
|
411
|
+
clearSearchMap: (state) => {
|
412
|
+
state.searchMap = {};
|
413
|
+
}
|
414
|
+
}
|
415
|
+
});
|
416
|
+
var {
|
417
|
+
setGroupByDomain,
|
418
|
+
setSelectedTags,
|
419
|
+
setSearchString,
|
420
|
+
setHoveredIndexSearchList,
|
421
|
+
setFirstDomain,
|
422
|
+
setSearchBy,
|
423
|
+
setFilterBy,
|
424
|
+
setSearchMap,
|
425
|
+
updateSearchMap,
|
426
|
+
removeKeyFromSearchMap,
|
427
|
+
setGroupBy,
|
428
|
+
clearSearchMap
|
429
|
+
} = searchSlice.actions;
|
430
|
+
var selectSearch = (state) => state.search;
|
431
|
+
var selectSearchMap = (state) => state.search.searchMap;
|
432
|
+
var search_slice_default = searchSlice.reducer;
|
433
|
+
|
434
|
+
// src/store/store.ts
|
435
|
+
import { configureStore } from "@reduxjs/toolkit";
|
436
|
+
|
437
|
+
// node_modules/redux/dist/redux.mjs
|
438
|
+
function formatProdErrorMessage(code) {
|
439
|
+
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. `;
|
440
|
+
}
|
441
|
+
var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
|
442
|
+
var ActionTypes = {
|
443
|
+
INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
|
444
|
+
REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
|
445
|
+
PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
|
446
|
+
};
|
447
|
+
var actionTypes_default = ActionTypes;
|
448
|
+
function isPlainObject(obj) {
|
449
|
+
if (typeof obj !== "object" || obj === null)
|
450
|
+
return false;
|
451
|
+
let proto = obj;
|
452
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
453
|
+
proto = Object.getPrototypeOf(proto);
|
454
|
+
}
|
455
|
+
return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
|
456
|
+
}
|
457
|
+
function miniKindOf(val) {
|
458
|
+
if (val === void 0)
|
459
|
+
return "undefined";
|
460
|
+
if (val === null)
|
461
|
+
return "null";
|
462
|
+
const type = typeof val;
|
463
|
+
switch (type) {
|
464
|
+
case "boolean":
|
465
|
+
case "string":
|
466
|
+
case "number":
|
467
|
+
case "symbol":
|
468
|
+
case "function": {
|
469
|
+
return type;
|
470
|
+
}
|
471
|
+
}
|
472
|
+
if (Array.isArray(val))
|
473
|
+
return "array";
|
474
|
+
if (isDate(val))
|
475
|
+
return "date";
|
476
|
+
if (isError(val))
|
477
|
+
return "error";
|
478
|
+
const constructorName = ctorName(val);
|
479
|
+
switch (constructorName) {
|
480
|
+
case "Symbol":
|
481
|
+
case "Promise":
|
482
|
+
case "WeakMap":
|
483
|
+
case "WeakSet":
|
484
|
+
case "Map":
|
485
|
+
case "Set":
|
486
|
+
return constructorName;
|
487
|
+
}
|
488
|
+
return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
|
489
|
+
}
|
490
|
+
function ctorName(val) {
|
491
|
+
return typeof val.constructor === "function" ? val.constructor.name : null;
|
492
|
+
}
|
493
|
+
function isError(val) {
|
494
|
+
return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
|
495
|
+
}
|
496
|
+
function isDate(val) {
|
497
|
+
if (val instanceof Date)
|
498
|
+
return true;
|
499
|
+
return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
|
500
|
+
}
|
501
|
+
function kindOf(val) {
|
502
|
+
let typeOfVal = typeof val;
|
503
|
+
if (process.env.NODE_ENV !== "production") {
|
504
|
+
typeOfVal = miniKindOf(val);
|
505
|
+
}
|
506
|
+
return typeOfVal;
|
507
|
+
}
|
508
|
+
function warning(message) {
|
509
|
+
if (typeof console !== "undefined" && typeof console.error === "function") {
|
510
|
+
console.error(message);
|
511
|
+
}
|
512
|
+
try {
|
513
|
+
throw new Error(message);
|
514
|
+
} catch (e) {
|
515
|
+
}
|
516
|
+
}
|
517
|
+
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
518
|
+
const reducerKeys = Object.keys(reducers);
|
519
|
+
const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
|
520
|
+
if (reducerKeys.length === 0) {
|
521
|
+
return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
|
522
|
+
}
|
523
|
+
if (!isPlainObject(inputState)) {
|
524
|
+
return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
|
525
|
+
}
|
526
|
+
const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
|
527
|
+
unexpectedKeys.forEach((key) => {
|
528
|
+
unexpectedKeyCache[key] = true;
|
529
|
+
});
|
530
|
+
if (action && action.type === actionTypes_default.REPLACE)
|
531
|
+
return;
|
532
|
+
if (unexpectedKeys.length > 0) {
|
533
|
+
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.`;
|
534
|
+
}
|
535
|
+
}
|
536
|
+
function assertReducerShape(reducers) {
|
537
|
+
Object.keys(reducers).forEach((key) => {
|
538
|
+
const reducer = reducers[key];
|
539
|
+
const initialState10 = reducer(void 0, {
|
540
|
+
type: actionTypes_default.INIT
|
541
|
+
});
|
542
|
+
if (typeof initialState10 === "undefined") {
|
543
|
+
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.`);
|
544
|
+
}
|
545
|
+
if (typeof reducer(void 0, {
|
546
|
+
type: actionTypes_default.PROBE_UNKNOWN_ACTION()
|
547
|
+
}) === "undefined") {
|
548
|
+
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.`);
|
549
|
+
}
|
550
|
+
});
|
551
|
+
}
|
552
|
+
function combineReducers(reducers) {
|
553
|
+
const reducerKeys = Object.keys(reducers);
|
554
|
+
const finalReducers = {};
|
555
|
+
for (let i = 0; i < reducerKeys.length; i++) {
|
556
|
+
const key = reducerKeys[i];
|
557
|
+
if (process.env.NODE_ENV !== "production") {
|
558
|
+
if (typeof reducers[key] === "undefined") {
|
559
|
+
warning(`No reducer provided for key "${key}"`);
|
560
|
+
}
|
561
|
+
}
|
562
|
+
if (typeof reducers[key] === "function") {
|
563
|
+
finalReducers[key] = reducers[key];
|
564
|
+
}
|
565
|
+
}
|
566
|
+
const finalReducerKeys = Object.keys(finalReducers);
|
567
|
+
let unexpectedKeyCache;
|
568
|
+
if (process.env.NODE_ENV !== "production") {
|
569
|
+
unexpectedKeyCache = {};
|
570
|
+
}
|
571
|
+
let shapeAssertionError;
|
572
|
+
try {
|
573
|
+
assertReducerShape(finalReducers);
|
574
|
+
} catch (e) {
|
575
|
+
shapeAssertionError = e;
|
576
|
+
}
|
577
|
+
return function combination(state = {}, action) {
|
578
|
+
if (shapeAssertionError) {
|
579
|
+
throw shapeAssertionError;
|
580
|
+
}
|
581
|
+
if (process.env.NODE_ENV !== "production") {
|
582
|
+
const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
583
|
+
if (warningMessage) {
|
584
|
+
warning(warningMessage);
|
585
|
+
}
|
586
|
+
}
|
587
|
+
let hasChanged = false;
|
588
|
+
const nextState = {};
|
589
|
+
for (let i = 0; i < finalReducerKeys.length; i++) {
|
590
|
+
const key = finalReducerKeys[i];
|
591
|
+
const reducer = finalReducers[key];
|
592
|
+
const previousStateForKey = state[key];
|
593
|
+
const nextStateForKey = reducer(previousStateForKey, action);
|
594
|
+
if (typeof nextStateForKey === "undefined") {
|
595
|
+
const actionType = action && action.type;
|
596
|
+
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.`);
|
597
|
+
}
|
598
|
+
nextState[key] = nextStateForKey;
|
599
|
+
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
600
|
+
}
|
601
|
+
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
|
602
|
+
return hasChanged ? nextState : state;
|
603
|
+
};
|
604
|
+
}
|
605
|
+
|
606
|
+
// src/store/store.ts
|
607
|
+
var rootReducer = combineReducers({
|
608
|
+
env: env_slice_default,
|
609
|
+
header: header_slice_default,
|
610
|
+
navbar: navbar_slice_default,
|
611
|
+
list: list_slice_default,
|
612
|
+
search: search_slice_default,
|
613
|
+
form: form_slice_default,
|
614
|
+
breadcrumbs: breadcrums_slice_default,
|
615
|
+
login: login_slice_default,
|
616
|
+
excel: excel_slice_default,
|
617
|
+
profile: profile_slice_default
|
618
|
+
});
|
619
|
+
var envStore = configureStore({
|
620
|
+
reducer: rootReducer,
|
621
|
+
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
622
|
+
serializableCheck: false
|
623
|
+
})
|
624
|
+
});
|
625
|
+
|
626
|
+
// src/store/index.ts
|
627
|
+
var useAppDispatch = useDispatch;
|
628
|
+
var useAppSelector = useSelector;
|
629
|
+
export {
|
630
|
+
breadcrumbsSlice,
|
631
|
+
clearSearchMap,
|
632
|
+
envSlice,
|
633
|
+
envStore,
|
634
|
+
excelSlice,
|
635
|
+
formSlice,
|
636
|
+
headerSlice,
|
637
|
+
listSlice,
|
638
|
+
loginSlice,
|
639
|
+
navbarSlice,
|
640
|
+
profileSlice,
|
641
|
+
removeKeyFromSearchMap,
|
642
|
+
searchSlice,
|
643
|
+
selectBreadCrumbs,
|
644
|
+
selectEnv,
|
645
|
+
selectExcel,
|
646
|
+
selectForm,
|
647
|
+
selectHeader,
|
648
|
+
selectList,
|
649
|
+
selectLogin,
|
650
|
+
selectNavbar,
|
651
|
+
selectProfile,
|
652
|
+
selectSearch,
|
653
|
+
selectSearchMap,
|
654
|
+
setAllowCompanies,
|
655
|
+
setAllowedCompanyIds,
|
656
|
+
setBreadCrumbs,
|
657
|
+
setCompanies,
|
658
|
+
setConfig,
|
659
|
+
setDataParse,
|
660
|
+
setDataUser,
|
661
|
+
setDb,
|
662
|
+
setDefaultCompany,
|
663
|
+
setDomainTable,
|
664
|
+
setEnv,
|
665
|
+
setEnvFile,
|
666
|
+
setErrorData,
|
667
|
+
setFieldTranslate,
|
668
|
+
setFields,
|
669
|
+
setFilterBy,
|
670
|
+
setFirstDomain,
|
671
|
+
setForgotPasswordUrl,
|
672
|
+
setFormSubmitComponent,
|
673
|
+
setGroupBy,
|
674
|
+
setGroupByDomain,
|
675
|
+
setHeader,
|
676
|
+
setHoveredIndexSearchList,
|
677
|
+
setIdFile,
|
678
|
+
setIndexRowTableModal,
|
679
|
+
setIsFileLoaded,
|
680
|
+
setIsShowModalTranslate,
|
681
|
+
setIsShowingModalDetail,
|
682
|
+
setIsUpdateTableModal,
|
683
|
+
setLang,
|
684
|
+
setListSubject,
|
685
|
+
setLoadingImport,
|
686
|
+
setMenuFocus,
|
687
|
+
setMenuFocusAction,
|
688
|
+
setMenuList,
|
689
|
+
setNavbarWidth,
|
690
|
+
setOrder,
|
691
|
+
setPage,
|
692
|
+
setPageLimit,
|
693
|
+
setProfile,
|
694
|
+
setRedirectTo,
|
695
|
+
setSearchBy,
|
696
|
+
setSearchMap,
|
697
|
+
setSearchString,
|
698
|
+
setSelectedFile,
|
699
|
+
setSelectedRadioKey,
|
700
|
+
setSelectedRowKeys,
|
701
|
+
setSelectedTags,
|
702
|
+
setTransferDetail,
|
703
|
+
setUid,
|
704
|
+
setUser,
|
705
|
+
setViewDataStore,
|
706
|
+
updateSearchMap,
|
707
|
+
useAppDispatch,
|
708
|
+
useAppSelector
|
709
|
+
};
|
package/dist/types.d.mts
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, V as View, f as ViewData, u as updatePasswordBody } from './view-type-y6vtF3wg.mjs';
|
2
|
+
export { B as BaseModelInit } from './base-model-type-DvO53Lwi.mjs';
|
3
|
+
export { C as Context } from './context-type-D5XefoL-.mjs';
|
4
|
+
|
5
|
+
interface Config {
|
6
|
+
baseUrl: string;
|
7
|
+
grantType: string;
|
8
|
+
clientId: string;
|
9
|
+
clientSecret: string;
|
10
|
+
}
|
11
|
+
|
12
|
+
export type { Config };
|