@fctc/edu-logic-lib 1.0.6 → 1.0.8

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 (79) hide show
  1. package/dist/base-model-type-DvO53Lwi.d.mts +7 -0
  2. package/dist/base-model-type-DvO53Lwi.d.ts +7 -0
  3. package/dist/chunk-4K3QAEZ6.js +90 -0
  4. package/dist/chunk-6BLY7NZ6.mjs +120 -0
  5. package/dist/chunk-6QXB3XX7.mjs +256 -0
  6. package/dist/chunk-7JD5GMIZ.js +2 -0
  7. package/dist/chunk-AYUH66EE.mjs +62 -0
  8. package/dist/chunk-CZHZLKNA.mjs +585 -0
  9. package/dist/chunk-EK43MEN4.js +635 -0
  10. package/dist/chunk-ELARQVCE.mjs +2344 -0
  11. package/dist/chunk-FVGPSTJ7.js +122 -0
  12. package/dist/chunk-GGOFXFSX.js +2362 -0
  13. package/dist/chunk-IXDDYGKE.js +61 -0
  14. package/dist/chunk-MLJQPO4Q.mjs +57 -0
  15. package/dist/chunk-OADBRQ4A.js +32 -0
  16. package/dist/chunk-OBR6UTC5.mjs +1 -0
  17. package/dist/chunk-OFUXC2LA.mjs +86 -0
  18. package/dist/chunk-P2IGWJDZ.js +1068 -0
  19. package/dist/chunk-QLUONJPQ.mjs +519 -0
  20. package/dist/chunk-RWRHCIQI.mjs +1059 -0
  21. package/dist/chunk-RZBHZYXG.js +582 -0
  22. package/dist/chunk-S7B3VKMJ.mjs +85 -0
  23. package/dist/chunk-S7YF2I23.js +95 -0
  24. package/dist/chunk-UY6GNZNB.js +262 -0
  25. package/dist/chunk-XYVK476U.mjs +29 -0
  26. package/dist/chunk-YOV6KAT2.js +66 -0
  27. package/dist/config.d.mts +15 -0
  28. package/dist/config.d.ts +15 -0
  29. package/dist/config.js +11 -0
  30. package/dist/config.mjs +2 -0
  31. package/dist/constants.d.mts +120 -0
  32. package/dist/constants.d.ts +120 -0
  33. package/dist/constants.js +55 -0
  34. package/dist/constants.mjs +2 -0
  35. package/dist/context-type-D5XefoL-.d.mts +8 -0
  36. package/dist/context-type-D5XefoL-.d.ts +8 -0
  37. package/dist/environment.d.mts +37 -0
  38. package/dist/environment.d.ts +37 -0
  39. package/dist/environment.js +25 -0
  40. package/dist/environment.mjs +4 -0
  41. package/dist/hooks.d.mts +218 -0
  42. package/dist/hooks.d.ts +218 -0
  43. package/dist/hooks.js +194 -0
  44. package/dist/hooks.mjs +9 -0
  45. package/dist/index-C_nK1Mii.d.mts +19 -0
  46. package/dist/index-C_nK1Mii.d.ts +19 -0
  47. package/dist/index.d.mts +23 -1294
  48. package/dist/index.d.ts +23 -1294
  49. package/dist/index.js +626 -5320
  50. package/dist/index.mjs +12 -5165
  51. package/dist/models.d.mts +35 -0
  52. package/dist/models.d.ts +35 -0
  53. package/dist/models.js +26 -0
  54. package/dist/models.mjs +9 -0
  55. package/dist/provider.d.mts +16 -0
  56. package/dist/provider.d.ts +16 -0
  57. package/dist/provider.js +25 -0
  58. package/dist/provider.mjs +8 -0
  59. package/dist/services.d.mts +160 -0
  60. package/dist/services.d.ts +160 -0
  61. package/dist/services.js +44 -0
  62. package/dist/services.mjs +7 -0
  63. package/dist/store.d.mts +505 -0
  64. package/dist/store.d.ts +505 -0
  65. package/dist/store.js +254 -0
  66. package/dist/store.mjs +1 -0
  67. package/dist/types.d.mts +12 -0
  68. package/dist/types.d.ts +12 -0
  69. package/dist/types.js +4 -0
  70. package/dist/types.mjs +1 -0
  71. package/dist/use-get-selection-DFh6sc49.d.mts +26 -0
  72. package/dist/use-get-selection-DFh6sc49.d.ts +26 -0
  73. package/dist/utils.d.mts +52 -0
  74. package/dist/utils.d.ts +52 -0
  75. package/dist/utils.js +66 -0
  76. package/dist/utils.mjs +1 -0
  77. package/dist/view-type-BTzRpkT7.d.mts +106 -0
  78. package/dist/view-type-BTzRpkT7.d.ts +106 -0
  79. package/package.json +68 -31
package/dist/store.js ADDED
@@ -0,0 +1,254 @@
1
+ 'use strict';
2
+
3
+ var chunkRZBHZYXG_js = require('./chunk-RZBHZYXG.js');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "clearSearchMap", {
8
+ enumerable: true,
9
+ get: function () { return chunkRZBHZYXG_js.clearSearchMap; }
10
+ });
11
+ Object.defineProperty(exports, "envSlice", {
12
+ enumerable: true,
13
+ get: function () { return chunkRZBHZYXG_js.envSlice; }
14
+ });
15
+ Object.defineProperty(exports, "envStore", {
16
+ enumerable: true,
17
+ get: function () { return chunkRZBHZYXG_js.envStore; }
18
+ });
19
+ Object.defineProperty(exports, "excelSlice", {
20
+ enumerable: true,
21
+ get: function () { return chunkRZBHZYXG_js.excelSlice; }
22
+ });
23
+ Object.defineProperty(exports, "formSlice", {
24
+ enumerable: true,
25
+ get: function () { return chunkRZBHZYXG_js.formSlice; }
26
+ });
27
+ Object.defineProperty(exports, "listSlice", {
28
+ enumerable: true,
29
+ get: function () { return chunkRZBHZYXG_js.listSlice; }
30
+ });
31
+ Object.defineProperty(exports, "navbarSlice", {
32
+ enumerable: true,
33
+ get: function () { return chunkRZBHZYXG_js.navbarSlice; }
34
+ });
35
+ Object.defineProperty(exports, "profileSlice", {
36
+ enumerable: true,
37
+ get: function () { return chunkRZBHZYXG_js.profileSlice; }
38
+ });
39
+ Object.defineProperty(exports, "removeKeyFromSearchMap", {
40
+ enumerable: true,
41
+ get: function () { return chunkRZBHZYXG_js.removeKeyFromSearchMap; }
42
+ });
43
+ Object.defineProperty(exports, "searchSlice", {
44
+ enumerable: true,
45
+ get: function () { return chunkRZBHZYXG_js.searchSlice; }
46
+ });
47
+ Object.defineProperty(exports, "selectEnv", {
48
+ enumerable: true,
49
+ get: function () { return chunkRZBHZYXG_js.selectEnv; }
50
+ });
51
+ Object.defineProperty(exports, "selectExcel", {
52
+ enumerable: true,
53
+ get: function () { return chunkRZBHZYXG_js.selectExcel; }
54
+ });
55
+ Object.defineProperty(exports, "selectForm", {
56
+ enumerable: true,
57
+ get: function () { return chunkRZBHZYXG_js.selectForm; }
58
+ });
59
+ Object.defineProperty(exports, "selectList", {
60
+ enumerable: true,
61
+ get: function () { return chunkRZBHZYXG_js.selectList; }
62
+ });
63
+ Object.defineProperty(exports, "selectNavbar", {
64
+ enumerable: true,
65
+ get: function () { return chunkRZBHZYXG_js.selectNavbar; }
66
+ });
67
+ Object.defineProperty(exports, "selectProfile", {
68
+ enumerable: true,
69
+ get: function () { return chunkRZBHZYXG_js.selectProfile; }
70
+ });
71
+ Object.defineProperty(exports, "selectSearch", {
72
+ enumerable: true,
73
+ get: function () { return chunkRZBHZYXG_js.selectSearch; }
74
+ });
75
+ Object.defineProperty(exports, "selectSearchMap", {
76
+ enumerable: true,
77
+ get: function () { return chunkRZBHZYXG_js.selectSearchMap; }
78
+ });
79
+ Object.defineProperty(exports, "setAllowCompanies", {
80
+ enumerable: true,
81
+ get: function () { return chunkRZBHZYXG_js.setAllowCompanies; }
82
+ });
83
+ Object.defineProperty(exports, "setCompanies", {
84
+ enumerable: true,
85
+ get: function () { return chunkRZBHZYXG_js.setCompanies; }
86
+ });
87
+ Object.defineProperty(exports, "setDataParse", {
88
+ enumerable: true,
89
+ get: function () { return chunkRZBHZYXG_js.setDataParse; }
90
+ });
91
+ Object.defineProperty(exports, "setDataUser", {
92
+ enumerable: true,
93
+ get: function () { return chunkRZBHZYXG_js.setDataUser; }
94
+ });
95
+ Object.defineProperty(exports, "setDefaultCompany", {
96
+ enumerable: true,
97
+ get: function () { return chunkRZBHZYXG_js.setDefaultCompany; }
98
+ });
99
+ Object.defineProperty(exports, "setDomainTable", {
100
+ enumerable: true,
101
+ get: function () { return chunkRZBHZYXG_js.setDomainTable; }
102
+ });
103
+ Object.defineProperty(exports, "setEnv", {
104
+ enumerable: true,
105
+ get: function () { return chunkRZBHZYXG_js.setEnv; }
106
+ });
107
+ Object.defineProperty(exports, "setEnvFile", {
108
+ enumerable: true,
109
+ get: function () { return chunkRZBHZYXG_js.setEnvFile; }
110
+ });
111
+ Object.defineProperty(exports, "setErrorData", {
112
+ enumerable: true,
113
+ get: function () { return chunkRZBHZYXG_js.setErrorData; }
114
+ });
115
+ Object.defineProperty(exports, "setFieldTranslate", {
116
+ enumerable: true,
117
+ get: function () { return chunkRZBHZYXG_js.setFieldTranslate; }
118
+ });
119
+ Object.defineProperty(exports, "setFields", {
120
+ enumerable: true,
121
+ get: function () { return chunkRZBHZYXG_js.setFields; }
122
+ });
123
+ Object.defineProperty(exports, "setFilterBy", {
124
+ enumerable: true,
125
+ get: function () { return chunkRZBHZYXG_js.setFilterBy; }
126
+ });
127
+ Object.defineProperty(exports, "setFirstDomain", {
128
+ enumerable: true,
129
+ get: function () { return chunkRZBHZYXG_js.setFirstDomain; }
130
+ });
131
+ Object.defineProperty(exports, "setFormSubmitComponent", {
132
+ enumerable: true,
133
+ get: function () { return chunkRZBHZYXG_js.setFormSubmitComponent; }
134
+ });
135
+ Object.defineProperty(exports, "setGroupBy", {
136
+ enumerable: true,
137
+ get: function () { return chunkRZBHZYXG_js.setGroupBy; }
138
+ });
139
+ Object.defineProperty(exports, "setGroupByDomain", {
140
+ enumerable: true,
141
+ get: function () { return chunkRZBHZYXG_js.setGroupByDomain; }
142
+ });
143
+ Object.defineProperty(exports, "setHoveredIndexSearchList", {
144
+ enumerable: true,
145
+ get: function () { return chunkRZBHZYXG_js.setHoveredIndexSearchList; }
146
+ });
147
+ Object.defineProperty(exports, "setIdFile", {
148
+ enumerable: true,
149
+ get: function () { return chunkRZBHZYXG_js.setIdFile; }
150
+ });
151
+ Object.defineProperty(exports, "setIndexRowTableModal", {
152
+ enumerable: true,
153
+ get: function () { return chunkRZBHZYXG_js.setIndexRowTableModal; }
154
+ });
155
+ Object.defineProperty(exports, "setIsFileLoaded", {
156
+ enumerable: true,
157
+ get: function () { return chunkRZBHZYXG_js.setIsFileLoaded; }
158
+ });
159
+ Object.defineProperty(exports, "setIsShowModalTranslate", {
160
+ enumerable: true,
161
+ get: function () { return chunkRZBHZYXG_js.setIsShowModalTranslate; }
162
+ });
163
+ Object.defineProperty(exports, "setIsShowingModalDetail", {
164
+ enumerable: true,
165
+ get: function () { return chunkRZBHZYXG_js.setIsShowingModalDetail; }
166
+ });
167
+ Object.defineProperty(exports, "setLang", {
168
+ enumerable: true,
169
+ get: function () { return chunkRZBHZYXG_js.setLang; }
170
+ });
171
+ Object.defineProperty(exports, "setListSubject", {
172
+ enumerable: true,
173
+ get: function () { return chunkRZBHZYXG_js.setListSubject; }
174
+ });
175
+ Object.defineProperty(exports, "setLoadingImport", {
176
+ enumerable: true,
177
+ get: function () { return chunkRZBHZYXG_js.setLoadingImport; }
178
+ });
179
+ Object.defineProperty(exports, "setMenuList", {
180
+ enumerable: true,
181
+ get: function () { return chunkRZBHZYXG_js.setMenuList; }
182
+ });
183
+ Object.defineProperty(exports, "setModelSearch", {
184
+ enumerable: true,
185
+ get: function () { return chunkRZBHZYXG_js.setModelSearch; }
186
+ });
187
+ Object.defineProperty(exports, "setOrder", {
188
+ enumerable: true,
189
+ get: function () { return chunkRZBHZYXG_js.setOrder; }
190
+ });
191
+ Object.defineProperty(exports, "setPage", {
192
+ enumerable: true,
193
+ get: function () { return chunkRZBHZYXG_js.setPage; }
194
+ });
195
+ Object.defineProperty(exports, "setPageLimit", {
196
+ enumerable: true,
197
+ get: function () { return chunkRZBHZYXG_js.setPageLimit; }
198
+ });
199
+ Object.defineProperty(exports, "setProfile", {
200
+ enumerable: true,
201
+ get: function () { return chunkRZBHZYXG_js.setProfile; }
202
+ });
203
+ Object.defineProperty(exports, "setSearchMap", {
204
+ enumerable: true,
205
+ get: function () { return chunkRZBHZYXG_js.setSearchMap; }
206
+ });
207
+ Object.defineProperty(exports, "setSearchString", {
208
+ enumerable: true,
209
+ get: function () { return chunkRZBHZYXG_js.setSearchString; }
210
+ });
211
+ Object.defineProperty(exports, "setSelectedFile", {
212
+ enumerable: true,
213
+ get: function () { return chunkRZBHZYXG_js.setSelectedFile; }
214
+ });
215
+ Object.defineProperty(exports, "setSelectedRowKeys", {
216
+ enumerable: true,
217
+ get: function () { return chunkRZBHZYXG_js.setSelectedRowKeys; }
218
+ });
219
+ Object.defineProperty(exports, "setSelectedTags", {
220
+ enumerable: true,
221
+ get: function () { return chunkRZBHZYXG_js.setSelectedTags; }
222
+ });
223
+ Object.defineProperty(exports, "setTableHead", {
224
+ enumerable: true,
225
+ get: function () { return chunkRZBHZYXG_js.setTableHead; }
226
+ });
227
+ Object.defineProperty(exports, "setTypeFieldsSearch", {
228
+ enumerable: true,
229
+ get: function () { return chunkRZBHZYXG_js.setTypeFieldsSearch; }
230
+ });
231
+ Object.defineProperty(exports, "setUid", {
232
+ enumerable: true,
233
+ get: function () { return chunkRZBHZYXG_js.setUid; }
234
+ });
235
+ Object.defineProperty(exports, "setUser", {
236
+ enumerable: true,
237
+ get: function () { return chunkRZBHZYXG_js.setUser; }
238
+ });
239
+ Object.defineProperty(exports, "setViewDataStore", {
240
+ enumerable: true,
241
+ get: function () { return chunkRZBHZYXG_js.setViewDataStore; }
242
+ });
243
+ Object.defineProperty(exports, "updateSearchMap", {
244
+ enumerable: true,
245
+ get: function () { return chunkRZBHZYXG_js.updateSearchMap; }
246
+ });
247
+ Object.defineProperty(exports, "useAppDispatch", {
248
+ enumerable: true,
249
+ get: function () { return chunkRZBHZYXG_js.useAppDispatch; }
250
+ });
251
+ Object.defineProperty(exports, "useAppSelector", {
252
+ enumerable: true,
253
+ get: function () { return chunkRZBHZYXG_js.useAppSelector; }
254
+ });
package/dist/store.mjs ADDED
@@ -0,0 +1 @@
1
+ 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 } from './chunk-QLUONJPQ.mjs';
@@ -0,0 +1,12 @@
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 };
@@ -0,0 +1,12 @@
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 ADDED
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ require('./chunk-7JD5GMIZ.js');
4
+
package/dist/types.mjs ADDED
@@ -0,0 +1 @@
1
+ import './chunk-OBR6UTC5.mjs';
@@ -0,0 +1,26 @@
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 };
@@ -0,0 +1,26 @@
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 };
@@ -0,0 +1,52 @@
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 };
@@ -0,0 +1,52 @@
1
+ import { C as Context } from './context-type-D5XefoL-.js';
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 };
package/dist/utils.js ADDED
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ var chunkGGOFXFSX_js = require('./chunk-GGOFXFSX.js');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "checkIsImageLink", {
8
+ enumerable: true,
9
+ get: function () { return chunkGGOFXFSX_js.checkIsImageLink; }
10
+ });
11
+ Object.defineProperty(exports, "domainHelper", {
12
+ enumerable: true,
13
+ get: function () { return chunkGGOFXFSX_js.domainHelper; }
14
+ });
15
+ Object.defineProperty(exports, "evalJSONContext", {
16
+ enumerable: true,
17
+ get: function () { return chunkGGOFXFSX_js.evalJSONContext; }
18
+ });
19
+ Object.defineProperty(exports, "evalJSONDomain", {
20
+ enumerable: true,
21
+ get: function () { return chunkGGOFXFSX_js.evalJSONDomain; }
22
+ });
23
+ Object.defineProperty(exports, "formatFileSize", {
24
+ enumerable: true,
25
+ get: function () { return chunkGGOFXFSX_js.formatFileSize; }
26
+ });
27
+ Object.defineProperty(exports, "formatSortingString", {
28
+ enumerable: true,
29
+ get: function () { return chunkGGOFXFSX_js.formatSortingString; }
30
+ });
31
+ Object.defineProperty(exports, "formatUrlPath", {
32
+ enumerable: true,
33
+ get: function () { return chunkGGOFXFSX_js.formatUrlPath; }
34
+ });
35
+ Object.defineProperty(exports, "getFieldsOnChange", {
36
+ enumerable: true,
37
+ get: function () { return chunkGGOFXFSX_js.getFieldsOnChange; }
38
+ });
39
+ Object.defineProperty(exports, "getSubdomain", {
40
+ enumerable: true,
41
+ get: function () { return chunkGGOFXFSX_js.getSubdomain; }
42
+ });
43
+ Object.defineProperty(exports, "isBase64File", {
44
+ enumerable: true,
45
+ get: function () { return chunkGGOFXFSX_js.isBase64File; }
46
+ });
47
+ Object.defineProperty(exports, "isBase64Image", {
48
+ enumerable: true,
49
+ get: function () { return chunkGGOFXFSX_js.isBase64Image; }
50
+ });
51
+ Object.defineProperty(exports, "removeUndefinedFields", {
52
+ enumerable: true,
53
+ get: function () { return chunkGGOFXFSX_js.removeUndefinedFields; }
54
+ });
55
+ Object.defineProperty(exports, "stringToColor", {
56
+ enumerable: true,
57
+ get: function () { return chunkGGOFXFSX_js.stringToColor; }
58
+ });
59
+ Object.defineProperty(exports, "toQueryString", {
60
+ enumerable: true,
61
+ get: function () { return chunkGGOFXFSX_js.toQueryString; }
62
+ });
63
+ Object.defineProperty(exports, "useTabModel", {
64
+ enumerable: true,
65
+ get: function () { return chunkGGOFXFSX_js.useTabModel; }
66
+ });
package/dist/utils.mjs ADDED
@@ -0,0 +1 @@
1
+ export { checkIsImageLink, domainHelper, evalJSONContext, evalJSONDomain, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getSubdomain, isBase64File, isBase64Image, removeUndefinedFields, stringToColor, toQueryString, useTabModel } from './chunk-ELARQVCE.mjs';
@@ -0,0 +1,106 @@
1
+ interface Specification {
2
+ [key: string]: any;
3
+ }
4
+ interface ContextApi {
5
+ [key: string]: any;
6
+ }
7
+ interface GetAllParams {
8
+ model?: string;
9
+ ids?: number[];
10
+ specification: Specification;
11
+ domain?: any[];
12
+ offset?: number;
13
+ sort: any;
14
+ fields: any;
15
+ groupby: any;
16
+ context?: ContextApi;
17
+ limit?: number;
18
+ }
19
+ interface GetListParams {
20
+ model: string;
21
+ ids?: number[];
22
+ specification?: Specification;
23
+ domain?: any[];
24
+ offset?: number;
25
+ order?: string;
26
+ context?: ContextApi;
27
+ limit?: number;
28
+ }
29
+ interface GetDetailParams {
30
+ ids?: number[];
31
+ model?: string;
32
+ specification?: Specification;
33
+ context?: ContextApi;
34
+ }
35
+ interface SaveParams {
36
+ model: string;
37
+ ids?: number[] | [];
38
+ data?: Record<string, any>;
39
+ specification?: Specification;
40
+ context?: ContextApi;
41
+ }
42
+ interface DeleteParams {
43
+ ids?: number[];
44
+ model: string;
45
+ }
46
+ interface OnChangeParams {
47
+ ids?: number[];
48
+ model: string;
49
+ object?: Record<string, any>;
50
+ specification: Specification;
51
+ context?: ContextApi;
52
+ fieldChange?: string[];
53
+ }
54
+ interface ViewData {
55
+ models?: {
56
+ [key: string]: {
57
+ [key: string]: {
58
+ type: string;
59
+ relation?: string;
60
+ };
61
+ };
62
+ };
63
+ }
64
+
65
+ interface LoginCredentialBody {
66
+ email: string;
67
+ password: string;
68
+ path?: string;
69
+ }
70
+ interface ResetPasswordRequest {
71
+ password: string;
72
+ confirmPassword: string;
73
+ }
74
+ interface UpdatePasswordRequest {
75
+ newPassword: string;
76
+ oldPassword: string;
77
+ }
78
+ interface ForgotPasswordBody {
79
+ data: ResetPasswordRequest;
80
+ token: string | null;
81
+ }
82
+ interface updatePasswordBody {
83
+ data: UpdatePasswordRequest;
84
+ token: string | null;
85
+ }
86
+ interface SocialTokenBody {
87
+ state: object;
88
+ access_token: string;
89
+ db: string;
90
+ }
91
+
92
+ type View = [number | boolean, string];
93
+ type Option = {
94
+ action_id?: number;
95
+ load_filters?: boolean;
96
+ toolbar?: boolean;
97
+ };
98
+ interface GetViewParams {
99
+ model?: string;
100
+ views?: View[];
101
+ context?: Record<string, any>;
102
+ options?: Option;
103
+ aid?: number | string | null | boolean;
104
+ }
105
+
106
+ export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, SocialTokenBody as c, Specification as d, GetViewParams as e, View as f, updatePasswordBody as u };