@fctc/edu-logic-lib 1.0.3 → 1.0.5

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 (53) hide show
  1. package/dist/index.d.mts +1294 -23
  2. package/dist/index.d.ts +1294 -23
  3. package/package.json +96 -96
  4. package/dist/base-model-type-DvO53Lwi.d.mts +0 -7
  5. package/dist/base-model-type-DvO53Lwi.d.ts +0 -7
  6. package/dist/config.d.mts +0 -15
  7. package/dist/config.d.ts +0 -15
  8. package/dist/config.js +0 -262
  9. package/dist/config.mjs +0 -256
  10. package/dist/constants.d.mts +0 -120
  11. package/dist/constants.d.ts +0 -120
  12. package/dist/constants.js +0 -154
  13. package/dist/constants.mjs +0 -141
  14. package/dist/context-type-D5XefoL-.d.mts +0 -8
  15. package/dist/context-type-D5XefoL-.d.ts +0 -8
  16. package/dist/environment.d.mts +0 -37
  17. package/dist/environment.d.ts +0 -37
  18. package/dist/environment.js +0 -849
  19. package/dist/environment.mjs +0 -841
  20. package/dist/hooks.d.mts +0 -218
  21. package/dist/hooks.d.ts +0 -218
  22. package/dist/hooks.js +0 -4865
  23. package/dist/hooks.mjs +0 -4814
  24. package/dist/index-C_nK1Mii.d.mts +0 -19
  25. package/dist/index-C_nK1Mii.d.ts +0 -19
  26. package/dist/models.d.mts +0 -35
  27. package/dist/models.d.ts +0 -35
  28. package/dist/models.js +0 -3225
  29. package/dist/models.mjs +0 -3217
  30. package/dist/provider.d.mts +0 -16
  31. package/dist/provider.d.ts +0 -16
  32. package/dist/provider.js +0 -3232
  33. package/dist/provider.mjs +0 -3224
  34. package/dist/services.d.mts +0 -160
  35. package/dist/services.d.ts +0 -160
  36. package/dist/services.js +0 -4045
  37. package/dist/services.mjs +0 -4032
  38. package/dist/store.d.mts +0 -505
  39. package/dist/store.d.ts +0 -505
  40. package/dist/store.js +0 -582
  41. package/dist/store.mjs +0 -519
  42. package/dist/types.d.mts +0 -12
  43. package/dist/types.d.ts +0 -12
  44. package/dist/types.js +0 -2
  45. package/dist/types.mjs +0 -1
  46. package/dist/use-get-selection-DFh6sc49.d.mts +0 -26
  47. package/dist/use-get-selection-DFh6sc49.d.ts +0 -26
  48. package/dist/utils.d.mts +0 -52
  49. package/dist/utils.d.ts +0 -52
  50. package/dist/utils.js +0 -2360
  51. package/dist/utils.mjs +0 -2344
  52. package/dist/view-type-BTzRpkT7.d.mts +0 -106
  53. package/dist/view-type-BTzRpkT7.d.ts +0 -106
package/dist/store.mjs DELETED
@@ -1,519 +0,0 @@
1
- import { useDispatch, useSelector } from 'react-redux';
2
- import { createSlice, configureStore } from '@reduxjs/toolkit';
3
-
4
- // src/store/index.ts
5
- var initialState = {
6
- baseUrl: "",
7
- requests: null,
8
- companies: [],
9
- user: {},
10
- envFile: null,
11
- defaultCompany: {
12
- id: null,
13
- logo: "",
14
- secondary_color: "",
15
- primary_color: ""
16
- },
17
- context: {
18
- uid: null,
19
- allowed_company_ids: [],
20
- lang: "vi_VN",
21
- tz: "Asia/Saigon"
22
- }
23
- };
24
- var envSlice = createSlice({
25
- name: "env",
26
- initialState,
27
- reducers: {
28
- setEnv: (state, action) => {
29
- Object.assign(state, action.payload);
30
- },
31
- setUid: (state, action) => {
32
- state.context.uid = action.payload;
33
- },
34
- setAllowCompanies: (state, action) => {
35
- state.context.allowed_company_ids = action.payload;
36
- },
37
- setCompanies: (state, action) => {
38
- state.companies = action.payload;
39
- },
40
- setDefaultCompany: (state, action) => {
41
- state.defaultCompany = action.payload;
42
- },
43
- setLang: (state, action) => {
44
- state.context.lang = action.payload;
45
- },
46
- setUser: (state, action) => {
47
- state.user = action.payload;
48
- },
49
- setEnvFile: (state, action) => {
50
- state.envFile = action.payload;
51
- }
52
- }
53
- });
54
- var {
55
- setEnv,
56
- setUid,
57
- setLang,
58
- setAllowCompanies,
59
- setCompanies,
60
- setDefaultCompany,
61
- setUser,
62
- setEnvFile
63
- } = envSlice.actions;
64
- var selectEnv = (state) => state.env;
65
- var env_slice_default = envSlice.reducer;
66
- var initialState2 = {
67
- dataParse: null,
68
- idFile: null,
69
- isFileLoaded: false,
70
- loadingImport: false,
71
- selectedFile: null,
72
- errorData: null
73
- };
74
- var excelSlice = createSlice({
75
- name: "excel",
76
- initialState: initialState2,
77
- reducers: {
78
- setDataParse: (state, action) => {
79
- state.dataParse = action.payload;
80
- },
81
- setIdFile: (state, action) => {
82
- state.idFile = action.payload;
83
- },
84
- setIsFileLoaded: (state, action) => {
85
- state.isFileLoaded = action.payload;
86
- },
87
- setLoadingImport: (state, action) => {
88
- state.loadingImport = action.payload;
89
- },
90
- setSelectedFile: (state, action) => {
91
- state.selectedFile = action.payload;
92
- },
93
- setErrorData: (state, action) => {
94
- state.errorData = action.payload;
95
- }
96
- }
97
- });
98
- var {
99
- setDataParse,
100
- setIdFile,
101
- setIsFileLoaded,
102
- setLoadingImport,
103
- setSelectedFile,
104
- setErrorData
105
- } = excelSlice.actions;
106
- var selectExcel = (state) => state.excel;
107
- var excel_slice_default = excelSlice.reducer;
108
- var initialState3 = {
109
- viewDataStore: {},
110
- isShowingModalDetail: false,
111
- isShowModalTranslate: false,
112
- formSubmitComponent: {},
113
- fieldTranslation: null,
114
- listSubject: {},
115
- dataUser: {}
116
- };
117
- var formSlice = createSlice({
118
- name: "form",
119
- initialState: initialState3,
120
- reducers: {
121
- setViewDataStore: (state, action) => {
122
- state.viewDataStore = action.payload;
123
- },
124
- setIsShowingModalDetail: (state, action) => {
125
- state.isShowingModalDetail = action.payload;
126
- },
127
- setIsShowModalTranslate: (state, action) => {
128
- state.isShowModalTranslate = action.payload;
129
- },
130
- setFormSubmitComponent: (state, action) => {
131
- state.formSubmitComponent[action.payload.key] = action.payload.component;
132
- },
133
- setFieldTranslate: (state, action) => {
134
- state.fieldTranslation = action.payload;
135
- },
136
- setListSubject: (state, action) => {
137
- state.listSubject = action.payload;
138
- },
139
- setDataUser: (state, action) => {
140
- state.dataUser = action.payload;
141
- }
142
- }
143
- });
144
- var {
145
- setViewDataStore,
146
- setIsShowingModalDetail,
147
- setIsShowModalTranslate,
148
- setFormSubmitComponent,
149
- setFieldTranslate,
150
- setListSubject,
151
- setDataUser
152
- } = formSlice.actions;
153
- var selectForm = (state) => state.form;
154
- var form_slice_default = formSlice.reducer;
155
- var initialState4 = {
156
- pageLimit: 10,
157
- fields: {},
158
- order: "",
159
- selectedRowKeys: [],
160
- indexRowTableModal: -2,
161
- footerGroupTable: {},
162
- page: 0,
163
- domainTable: []
164
- };
165
- var listSlice = createSlice({
166
- name: "list",
167
- initialState: initialState4,
168
- reducers: {
169
- setPageLimit: (state, action) => {
170
- state.pageLimit = action.payload;
171
- },
172
- setFields: (state, action) => {
173
- state.fields = action.payload;
174
- },
175
- setOrder: (state, action) => {
176
- state.order = action.payload;
177
- },
178
- setSelectedRowKeys: (state, action) => {
179
- state.selectedRowKeys = action.payload;
180
- },
181
- setIndexRowTableModal: (state, action) => {
182
- state.indexRowTableModal = action.payload;
183
- },
184
- setPage: (state, action) => {
185
- state.page = action.payload;
186
- },
187
- setDomainTable: (state, action) => {
188
- state.domainTable = action.payload;
189
- }
190
- }
191
- });
192
- var {
193
- setPageLimit,
194
- setFields,
195
- setOrder,
196
- setSelectedRowKeys,
197
- setIndexRowTableModal,
198
- setPage,
199
- setDomainTable
200
- } = listSlice.actions;
201
- var selectList = (state) => state.list;
202
- var list_slice_default = listSlice.reducer;
203
- var initialState5 = {
204
- menuList: []
205
- };
206
- var navbarSlice = createSlice({
207
- name: "navbar",
208
- initialState: initialState5,
209
- reducers: {
210
- setMenuList: (state, action) => {
211
- state.menuList = action.payload;
212
- }
213
- }
214
- });
215
- var { setMenuList } = navbarSlice.actions;
216
- var selectNavbar = (state) => state.navbar;
217
- var navbar_slice_default = navbarSlice.reducer;
218
- var initialState6 = {
219
- profile: {}
220
- };
221
- var profileSlice = createSlice({
222
- name: "profile",
223
- initialState: initialState6,
224
- reducers: {
225
- setProfile: (state, action) => {
226
- state.profile = action.payload;
227
- }
228
- }
229
- });
230
- var { setProfile } = profileSlice.actions;
231
- var selectProfile = (state) => state.profile;
232
- var profile_slice_default = profileSlice.reducer;
233
- var initialState7 = {
234
- groupByDomain: null,
235
- tableHead: [],
236
- searchString: "",
237
- hoveredIndexSearchList: null,
238
- selectedTags: [],
239
- firstDomain: null,
240
- searchMap: {},
241
- typeFieldsSearch: "",
242
- modelSearch: "",
243
- filterBy: [],
244
- groupBy: []
245
- };
246
- var searchSlice = createSlice({
247
- name: "search",
248
- initialState: initialState7,
249
- reducers: {
250
- setGroupByDomain: (state, action) => {
251
- state.groupByDomain = action.payload;
252
- },
253
- setTableHead: (state, action) => {
254
- state.tableHead = action.payload;
255
- },
256
- setSearchString: (state, action) => {
257
- state.searchString = action.payload;
258
- },
259
- setHoveredIndexSearchList: (state, action) => {
260
- state.hoveredIndexSearchList = action.payload;
261
- },
262
- setSelectedTags: (state, action) => {
263
- state.selectedTags = action.payload;
264
- },
265
- setFirstDomain: (state, action) => {
266
- state.firstDomain = action.payload;
267
- },
268
- setTypeFieldsSearch: (state, action) => {
269
- state.typeFieldsSearch = action.payload;
270
- },
271
- setModelSearch: (state, action) => {
272
- state.modelSearch = action.payload;
273
- },
274
- setFilterBy: (state, action) => {
275
- state.filterBy = action.payload;
276
- },
277
- setGroupBy: (state, action) => {
278
- state.groupBy = action.payload;
279
- },
280
- setSearchMap: (state, action) => {
281
- state.searchMap = action.payload;
282
- },
283
- updateSearchMap: (state, action) => {
284
- if (!state.searchMap[action.payload.key]) {
285
- state.searchMap[action.payload.key] = [];
286
- }
287
- state.searchMap[action.payload.key].push(action.payload.value);
288
- },
289
- removeKeyFromSearchMap: (state, action) => {
290
- const { key, item } = action.payload;
291
- const values = state.searchMap[key];
292
- if (!values) return;
293
- if (item) {
294
- const filtered = values.filter((value) => value.name !== item.name);
295
- if (filtered.length > 0) {
296
- state.searchMap[key] = filtered;
297
- } else {
298
- delete state.searchMap[key];
299
- }
300
- } else {
301
- delete state.searchMap[key];
302
- }
303
- },
304
- clearSearchMap: (state) => {
305
- state.searchMap = {};
306
- }
307
- }
308
- });
309
- var {
310
- setGroupByDomain,
311
- setSelectedTags,
312
- setSearchString,
313
- setHoveredIndexSearchList,
314
- setFirstDomain,
315
- setTableHead,
316
- setFilterBy,
317
- setTypeFieldsSearch,
318
- setModelSearch,
319
- setSearchMap,
320
- updateSearchMap,
321
- removeKeyFromSearchMap,
322
- setGroupBy,
323
- clearSearchMap
324
- } = searchSlice.actions;
325
- var selectSearch = (state) => state.search;
326
- var selectSearchMap = (state) => state.search.searchMap;
327
- var search_slice_default = searchSlice.reducer;
328
-
329
- // node_modules/redux/dist/redux.mjs
330
- function formatProdErrorMessage(code) {
331
- 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. `;
332
- }
333
- var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
334
- var ActionTypes = {
335
- INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
336
- REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
337
- PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
338
- };
339
- var actionTypes_default = ActionTypes;
340
- function isPlainObject(obj) {
341
- if (typeof obj !== "object" || obj === null)
342
- return false;
343
- let proto = obj;
344
- while (Object.getPrototypeOf(proto) !== null) {
345
- proto = Object.getPrototypeOf(proto);
346
- }
347
- return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
348
- }
349
- function miniKindOf(val) {
350
- if (val === void 0)
351
- return "undefined";
352
- if (val === null)
353
- return "null";
354
- const type = typeof val;
355
- switch (type) {
356
- case "boolean":
357
- case "string":
358
- case "number":
359
- case "symbol":
360
- case "function": {
361
- return type;
362
- }
363
- }
364
- if (Array.isArray(val))
365
- return "array";
366
- if (isDate(val))
367
- return "date";
368
- if (isError(val))
369
- return "error";
370
- const constructorName = ctorName(val);
371
- switch (constructorName) {
372
- case "Symbol":
373
- case "Promise":
374
- case "WeakMap":
375
- case "WeakSet":
376
- case "Map":
377
- case "Set":
378
- return constructorName;
379
- }
380
- return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
381
- }
382
- function ctorName(val) {
383
- return typeof val.constructor === "function" ? val.constructor.name : null;
384
- }
385
- function isError(val) {
386
- return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
387
- }
388
- function isDate(val) {
389
- if (val instanceof Date)
390
- return true;
391
- return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
392
- }
393
- function kindOf(val) {
394
- let typeOfVal = typeof val;
395
- if (process.env.NODE_ENV !== "production") {
396
- typeOfVal = miniKindOf(val);
397
- }
398
- return typeOfVal;
399
- }
400
- function warning(message) {
401
- if (typeof console !== "undefined" && typeof console.error === "function") {
402
- console.error(message);
403
- }
404
- try {
405
- throw new Error(message);
406
- } catch (e) {
407
- }
408
- }
409
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
410
- const reducerKeys = Object.keys(reducers);
411
- const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
412
- if (reducerKeys.length === 0) {
413
- return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
414
- }
415
- if (!isPlainObject(inputState)) {
416
- return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`;
417
- }
418
- const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
419
- unexpectedKeys.forEach((key) => {
420
- unexpectedKeyCache[key] = true;
421
- });
422
- if (action && action.type === actionTypes_default.REPLACE)
423
- return;
424
- if (unexpectedKeys.length > 0) {
425
- 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.`;
426
- }
427
- }
428
- function assertReducerShape(reducers) {
429
- Object.keys(reducers).forEach((key) => {
430
- const reducer = reducers[key];
431
- const initialState8 = reducer(void 0, {
432
- type: actionTypes_default.INIT
433
- });
434
- if (typeof initialState8 === "undefined") {
435
- 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.`);
436
- }
437
- if (typeof reducer(void 0, {
438
- type: actionTypes_default.PROBE_UNKNOWN_ACTION()
439
- }) === "undefined") {
440
- 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.`);
441
- }
442
- });
443
- }
444
- function combineReducers(reducers) {
445
- const reducerKeys = Object.keys(reducers);
446
- const finalReducers = {};
447
- for (let i = 0; i < reducerKeys.length; i++) {
448
- const key = reducerKeys[i];
449
- if (process.env.NODE_ENV !== "production") {
450
- if (typeof reducers[key] === "undefined") {
451
- warning(`No reducer provided for key "${key}"`);
452
- }
453
- }
454
- if (typeof reducers[key] === "function") {
455
- finalReducers[key] = reducers[key];
456
- }
457
- }
458
- const finalReducerKeys = Object.keys(finalReducers);
459
- let unexpectedKeyCache;
460
- if (process.env.NODE_ENV !== "production") {
461
- unexpectedKeyCache = {};
462
- }
463
- let shapeAssertionError;
464
- try {
465
- assertReducerShape(finalReducers);
466
- } catch (e) {
467
- shapeAssertionError = e;
468
- }
469
- return function combination(state = {}, action) {
470
- if (shapeAssertionError) {
471
- throw shapeAssertionError;
472
- }
473
- if (process.env.NODE_ENV !== "production") {
474
- const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
475
- if (warningMessage) {
476
- warning(warningMessage);
477
- }
478
- }
479
- let hasChanged = false;
480
- const nextState = {};
481
- for (let i = 0; i < finalReducerKeys.length; i++) {
482
- const key = finalReducerKeys[i];
483
- const reducer = finalReducers[key];
484
- const previousStateForKey = state[key];
485
- const nextStateForKey = reducer(previousStateForKey, action);
486
- if (typeof nextStateForKey === "undefined") {
487
- const actionType = action && action.type;
488
- 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.`);
489
- }
490
- nextState[key] = nextStateForKey;
491
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
492
- }
493
- hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
494
- return hasChanged ? nextState : state;
495
- };
496
- }
497
-
498
- // src/store/store.ts
499
- var rootReducer = combineReducers({
500
- env: env_slice_default,
501
- navbar: navbar_slice_default,
502
- list: list_slice_default,
503
- search: search_slice_default,
504
- form: form_slice_default,
505
- excel: excel_slice_default,
506
- profile: profile_slice_default
507
- });
508
- var envStore = configureStore({
509
- reducer: rootReducer,
510
- middleware: (getDefaultMiddleware) => getDefaultMiddleware({
511
- serializableCheck: false
512
- })
513
- });
514
-
515
- // src/store/index.ts
516
- var useAppDispatch = useDispatch;
517
- var useAppSelector = useSelector;
518
-
519
- export { clearSearchMap, envSlice, envStore, excelSlice, formSlice, listSlice, navbarSlice, profileSlice, removeKeyFromSearchMap, searchSlice, selectEnv, selectExcel, selectForm, selectList, selectNavbar, selectProfile, selectSearch, selectSearchMap, setAllowCompanies, setCompanies, setDataParse, setDataUser, setDefaultCompany, setDomainTable, setEnv, setEnvFile, setErrorData, setFieldTranslate, setFields, setFilterBy, setFirstDomain, setFormSubmitComponent, setGroupBy, setGroupByDomain, setHoveredIndexSearchList, setIdFile, setIndexRowTableModal, setIsFileLoaded, setIsShowModalTranslate, setIsShowingModalDetail, setLang, setListSubject, setLoadingImport, setMenuList, setModelSearch, setOrder, setPage, setPageLimit, setProfile, setSearchMap, setSearchString, setSelectedFile, setSelectedRowKeys, setSelectedTags, setTableHead, setTypeFieldsSearch, setUid, setUser, setViewDataStore, updateSearchMap, useAppDispatch, useAppSelector };
package/dist/types.d.mts DELETED
@@ -1,12 +0,0 @@
1
- export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, e as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, c as SocialTokenBody, d as Specification, U as UpdatePasswordRequest, f as View, V as ViewData, u as updatePasswordBody } from './view-type-BTzRpkT7.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 };
package/dist/types.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, e as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, c as SocialTokenBody, d as Specification, U as UpdatePasswordRequest, f as View, V as ViewData, u as updatePasswordBody } from './view-type-BTzRpkT7.js';
2
- export { B as BaseModelInit } from './base-model-type-DvO53Lwi.js';
3
- export { C as Context } from './context-type-D5XefoL-.js';
4
-
5
- interface Config {
6
- baseUrl: string;
7
- grantType: string;
8
- clientId: string;
9
- clientSecret: string;
10
- }
11
-
12
- export type { Config };
package/dist/types.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
package/dist/types.mjs DELETED
@@ -1 +0,0 @@
1
-
@@ -1,26 +0,0 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
-
3
- type TFormView = {
4
- model: string;
5
- id?: number | null;
6
- context?: any;
7
- };
8
- declare const useGetFormView: ({ data, queryKey, enabled, }: {
9
- data: TFormView;
10
- queryKey?: any;
11
- enabled?: any;
12
- }) => _tanstack_react_query.UseQueryResult<any, Error>;
13
-
14
- type GetSelectionType = {
15
- domain: any;
16
- context: any;
17
- model: string;
18
- specification?: any;
19
- };
20
- declare const useGetSelection: ({ data, queryKey, enabled, }: {
21
- data: GetSelectionType;
22
- queryKey: any[];
23
- enabled?: boolean;
24
- }) => _tanstack_react_query.UseQueryResult<any, Error>;
25
-
26
- export { type GetSelectionType as G, type TFormView as T, useGetSelection as a, useGetFormView as u };
@@ -1,26 +0,0 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
-
3
- type TFormView = {
4
- model: string;
5
- id?: number | null;
6
- context?: any;
7
- };
8
- declare const useGetFormView: ({ data, queryKey, enabled, }: {
9
- data: TFormView;
10
- queryKey?: any;
11
- enabled?: any;
12
- }) => _tanstack_react_query.UseQueryResult<any, Error>;
13
-
14
- type GetSelectionType = {
15
- domain: any;
16
- context: any;
17
- model: string;
18
- specification?: any;
19
- };
20
- declare const useGetSelection: ({ data, queryKey, enabled, }: {
21
- data: GetSelectionType;
22
- queryKey: any[];
23
- enabled?: boolean;
24
- }) => _tanstack_react_query.UseQueryResult<any, Error>;
25
-
26
- export { type GetSelectionType as G, type TFormView as T, useGetSelection as a, useGetFormView as u };
package/dist/utils.d.mts DELETED
@@ -1,52 +0,0 @@
1
- import { C as Context } from './context-type-D5XefoL-.mjs';
2
-
3
- type AST = {
4
- type: number;
5
- value: any;
6
- };
7
- type Condition = [string | 0 | 1, string, any];
8
- type DomainListRepr = ('&' | '|' | '!' | Condition)[];
9
- type DomainRepr = DomainListRepr | string | Domain;
10
- declare class Domain {
11
- ast: AST;
12
- static TRUE: Domain;
13
- static FALSE: Domain;
14
- static combine(domains: DomainRepr[], operator: 'AND' | 'OR'): Domain;
15
- static and(domains: DomainRepr[]): Domain;
16
- static or(domains: DomainRepr[]): Domain;
17
- static not(domain: DomainRepr): Domain;
18
- static removeDomainLeaves(domain: DomainRepr, keysToRemove: string[]): Domain;
19
- constructor(descr?: DomainRepr);
20
- contains(record: any): boolean;
21
- toString(): string;
22
- toList(context: Record<string, any>): DomainListRepr;
23
- toJson(): DomainListRepr | string;
24
- }
25
-
26
- declare const evalJSONContext: (_context: any, context?: {}) => Context | null;
27
- declare const evalJSONDomain: (domain: any, context: any) => any;
28
- declare const formatSortingString: (input: string | null | undefined) => string | null;
29
- declare const domainHelper: {
30
- checkDomain: (context: any, domain: any) => boolean;
31
- matchDomains: (context: any, domains: any) => boolean;
32
- Domain: typeof Domain;
33
- };
34
- declare const toQueryString: (params: Record<string, string | number | boolean>) => string;
35
- declare const stringToColor: (name: string, id: number) => string;
36
- declare const getFieldsOnChange: (fields: any) => any;
37
- declare const formatUrlPath: ({ viewType, aid, model, id, actionPath, }: {
38
- viewType: "list" | "form" | "kanban" | any;
39
- actionPath: string;
40
- aid: string | number;
41
- model: string;
42
- id?: string | number;
43
- }) => string;
44
- declare const removeUndefinedFields: <T extends Record<string, any>>(obj: T) => Partial<T>;
45
- declare const useTabModel: (viewData: any, onchangeData: any) => any;
46
- declare const isBase64File: (str: any) => boolean;
47
- declare const isBase64Image: (str: any) => boolean;
48
- declare const checkIsImageLink: (url: any) => boolean;
49
- declare const formatFileSize: (size: any) => string;
50
- declare const getSubdomain: (url?: string) => string | null;
51
-
52
- export { checkIsImageLink, domainHelper, evalJSONContext, evalJSONDomain, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getSubdomain, isBase64File, isBase64Image, removeUndefinedFields, stringToColor, toQueryString, useTabModel };