drapcode-constant 2.0.8 → 2.1.0-sandbox.1
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/README.md +8 -2
- package/build/constants/FieldTypes.d.ts +2 -1
- package/build/constants/FieldTypes.d.ts.map +1 -0
- package/build/constants/FieldTypes.js +136 -181
- package/build/constants/FieldTypes.js.map +1 -1
- package/build/constants/aiModel.d.ts +1 -0
- package/build/constants/aiModel.d.ts.map +1 -0
- package/build/constants/aiModel.js +14 -14
- package/build/constants/builder.d.ts +2 -1
- package/build/constants/builder.d.ts.map +1 -0
- package/build/constants/builder.js +190 -188
- package/build/constants/builder.js.map +1 -1
- package/build/constants/collection.d.ts +1 -0
- package/build/constants/collection.d.ts.map +1 -0
- package/build/constants/collection.js +2 -9
- package/build/constants/collection.js.map +1 -1
- package/build/constants/exportCode.d.ts +1 -0
- package/build/constants/exportCode.d.ts.map +1 -0
- package/build/constants/exportCode.js +14 -14
- package/build/constants/externalApi.d.ts +1 -0
- package/build/constants/externalApi.d.ts.map +1 -0
- package/build/constants/externalApi.js +58 -58
- package/build/constants/externalApi.js.map +1 -1
- package/build/constants/images.d.ts +1 -0
- package/build/constants/images.d.ts.map +1 -0
- package/build/constants/images.js +26 -32
- package/build/constants/images.js.map +1 -1
- package/build/constants/loan.d.ts +1 -0
- package/build/constants/loan.d.ts.map +1 -0
- package/build/constants/loan.js +3 -3
- package/build/constants/messages.d.ts +1 -0
- package/build/constants/messages.d.ts.map +1 -0
- package/build/constants/messages.js +13 -13
- package/build/constants/messages.js.map +1 -1
- package/build/constants/permissions.d.ts +1 -0
- package/build/constants/permissions.d.ts.map +1 -0
- package/build/constants/permissions.js +88 -88
- package/build/constants/permissions.js.map +1 -1
- package/build/constants/plugins.d.ts +1 -0
- package/build/constants/plugins.d.ts.map +1 -0
- package/build/constants/plugins.js +80 -80
- package/build/constants/query.d.ts +2 -0
- package/build/constants/query.d.ts.map +1 -0
- package/build/constants/query.js +39 -48
- package/build/constants/query.js.map +1 -1
- package/build/constants/redis.d.ts +1 -0
- package/build/constants/redis.d.ts.map +1 -0
- package/build/constants/redis.js +25 -25
- package/build/constants/redis.js.map +1 -1
- package/build/index.d.ts +14 -13
- package/build/index.d.ts.map +1 -0
- package/build/types/field.d.ts +1 -0
- package/build/types/field.d.ts.map +1 -0
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm install drapcode-constant
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
15
|
// Import the constants you need
|
|
16
16
|
FieldTypes,
|
|
17
17
|
QueryConstants,
|
|
@@ -22,31 +22,37 @@ import {
|
|
|
22
22
|
## Development
|
|
23
23
|
|
|
24
24
|
1. Install dependencies:
|
|
25
|
+
|
|
25
26
|
```bash
|
|
26
27
|
npm install
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
2. Run development mode:
|
|
31
|
+
|
|
30
32
|
```bash
|
|
31
33
|
npm run dev
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
3. Build the project:
|
|
37
|
+
|
|
35
38
|
```bash
|
|
36
39
|
npm run build
|
|
37
40
|
```
|
|
38
41
|
|
|
39
42
|
4. Run tests:
|
|
43
|
+
|
|
40
44
|
```bash
|
|
41
45
|
npm test
|
|
42
46
|
```
|
|
43
47
|
|
|
44
48
|
5. Lint the code:
|
|
49
|
+
|
|
45
50
|
```bash
|
|
46
51
|
npm run lint
|
|
47
52
|
```
|
|
48
53
|
|
|
49
54
|
6. Format the code:
|
|
55
|
+
|
|
50
56
|
```bash
|
|
51
57
|
npm run format
|
|
52
58
|
```
|
|
@@ -61,4 +67,4 @@ npm run format
|
|
|
61
67
|
|
|
62
68
|
## License
|
|
63
69
|
|
|
64
|
-
This project is licensed under the ISC License.
|
|
70
|
+
This project is licensed under the ISC License.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldTypesType } from
|
|
1
|
+
import { FieldTypesType } from '../types/field';
|
|
2
2
|
/**
|
|
3
3
|
* Collection of all available field types in the system
|
|
4
4
|
* Each field type defines its properties, validation rules, and display settings
|
|
@@ -94,3 +94,4 @@ export declare const filterFieldForItemTemplate: (fieldName: string) => boolean;
|
|
|
94
94
|
export declare const filterFieldsForItemTemplate: (fields: any[]) => any[];
|
|
95
95
|
export declare const filterFieldsForPlaceholderModal: (fields: any[]) => any[];
|
|
96
96
|
export declare const filterIndexFields: (fields: any[]) => any[];
|
|
97
|
+
//# sourceMappingURL=FieldTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldTypes.d.ts","sourceRoot":"","sources":["../../src/constants/FieldTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,cA8OxB,CAAC;AAsCF,eAAO,MAAM,aAAa,UAsBzB,CAAC;AAEF,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,SAAS,SAAS,CAAC;AAChC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,QAAQ,UAAkE,CAAC;AAExF,eAAO,MAAM,SAAS,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,WAsCvD,CAAC;AAEF,UAAU;AACV,eAAO,MAAM,gBAAgB,UAAwC,CAAC;AAEtE,eAAO,MAAM,cAAc,UAAoC,CAAC;AAChE,eAAO,MAAM,uBAAuB,UAA+B,CAAC;AACpE,eAAO,MAAM,wBAAwB,UAA+B,CAAC;AACrE,eAAO,MAAM,WAAW,UAA6B,CAAC;AACtD,eAAO,MAAM,SAAS,UAAsB,CAAC;AAC7C,eAAO,MAAM,aAAa,UAAoB,CAAC;AAC/C,eAAO,MAAM,eAAe,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AE,UAEjE,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,WAAW,MAAM,YACY,CAAC;AAEzE,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,EAAE,UAIxD,CAAC;AACF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,EAAE,UAI5D,CAAC;AACF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,GAAG,EAAE,UAM9C,CAAC"}
|
|
@@ -8,196 +8,196 @@ exports.filterIndexFields = exports.filterFieldsForPlaceholderModal = exports.fi
|
|
|
8
8
|
*/
|
|
9
9
|
exports.FieldTypes = {
|
|
10
10
|
text: {
|
|
11
|
-
id:
|
|
12
|
-
name:
|
|
11
|
+
id: 'text',
|
|
12
|
+
name: 'Text',
|
|
13
13
|
validation: { min: 1, max: 20 },
|
|
14
14
|
show: true,
|
|
15
15
|
compositeKey: true,
|
|
16
16
|
sortOrder: 0,
|
|
17
17
|
},
|
|
18
18
|
large_text: {
|
|
19
|
-
id:
|
|
20
|
-
name:
|
|
19
|
+
id: 'large_text',
|
|
20
|
+
name: 'Large Text',
|
|
21
21
|
validation: { min: 20, max: 140 },
|
|
22
22
|
show: true,
|
|
23
23
|
compositeKey: false,
|
|
24
24
|
sortOrder: 3,
|
|
25
25
|
},
|
|
26
26
|
number: {
|
|
27
|
-
id:
|
|
28
|
-
name:
|
|
27
|
+
id: 'number',
|
|
28
|
+
name: 'Number',
|
|
29
29
|
validation: { min: 20, max: 140 },
|
|
30
30
|
show: true,
|
|
31
31
|
compositeKey: true,
|
|
32
32
|
sortOrder: 1,
|
|
33
33
|
},
|
|
34
34
|
date: {
|
|
35
|
-
id:
|
|
36
|
-
name:
|
|
35
|
+
id: 'date',
|
|
36
|
+
name: 'Date',
|
|
37
37
|
show: true,
|
|
38
38
|
compositeKey: true,
|
|
39
39
|
sortOrder: 2,
|
|
40
40
|
},
|
|
41
41
|
password: {
|
|
42
|
-
id:
|
|
43
|
-
name:
|
|
42
|
+
id: 'password',
|
|
43
|
+
name: 'Password',
|
|
44
44
|
show: true,
|
|
45
45
|
compositeKey: false,
|
|
46
46
|
sortOrder: 5,
|
|
47
47
|
},
|
|
48
48
|
color: {
|
|
49
|
-
id:
|
|
50
|
-
name:
|
|
49
|
+
id: 'color',
|
|
50
|
+
name: 'Color',
|
|
51
51
|
show: true,
|
|
52
52
|
compositeKey: false,
|
|
53
53
|
},
|
|
54
54
|
file: {
|
|
55
|
-
id:
|
|
56
|
-
name:
|
|
55
|
+
id: 'file',
|
|
56
|
+
name: 'File',
|
|
57
57
|
show: true,
|
|
58
58
|
compositeKey: false,
|
|
59
|
-
multipleTrueName:
|
|
59
|
+
multipleTrueName: 'Files/Images',
|
|
60
60
|
sortOrder: 9,
|
|
61
61
|
},
|
|
62
62
|
reference: {
|
|
63
|
-
id:
|
|
64
|
-
name:
|
|
63
|
+
id: 'reference',
|
|
64
|
+
name: 'Reference',
|
|
65
65
|
show: true,
|
|
66
66
|
compositeKey: true,
|
|
67
|
-
multipleTrueName:
|
|
67
|
+
multipleTrueName: 'Multi Reference',
|
|
68
68
|
sortOrder: 10,
|
|
69
69
|
},
|
|
70
70
|
belongsTo: {
|
|
71
|
-
id:
|
|
72
|
-
name:
|
|
71
|
+
id: 'belongsTo',
|
|
72
|
+
name: 'Child Of',
|
|
73
73
|
show: true,
|
|
74
74
|
compositeKey: true,
|
|
75
75
|
sortOrder: 11,
|
|
76
76
|
},
|
|
77
77
|
image: {
|
|
78
|
-
id:
|
|
79
|
-
name:
|
|
78
|
+
id: 'image',
|
|
79
|
+
name: 'Image',
|
|
80
80
|
show: false,
|
|
81
81
|
compositeKey: false,
|
|
82
82
|
},
|
|
83
83
|
multi_image: {
|
|
84
|
-
id:
|
|
85
|
-
name:
|
|
84
|
+
id: 'multi_image',
|
|
85
|
+
name: 'Multi-image',
|
|
86
86
|
show: false,
|
|
87
87
|
compositeKey: false,
|
|
88
88
|
},
|
|
89
89
|
video_link: {
|
|
90
|
-
id:
|
|
91
|
-
name:
|
|
90
|
+
id: 'video_link',
|
|
91
|
+
name: 'Video link',
|
|
92
92
|
show: false,
|
|
93
93
|
compositeKey: false,
|
|
94
94
|
},
|
|
95
95
|
url: {
|
|
96
|
-
id:
|
|
97
|
-
name:
|
|
96
|
+
id: 'url',
|
|
97
|
+
name: 'URL',
|
|
98
98
|
show: true,
|
|
99
99
|
compositeKey: true,
|
|
100
100
|
sortOrder: 8,
|
|
101
101
|
},
|
|
102
102
|
tel: {
|
|
103
|
-
id:
|
|
104
|
-
name:
|
|
103
|
+
id: 'tel',
|
|
104
|
+
name: 'Phone Number',
|
|
105
105
|
show: true,
|
|
106
106
|
compositeKey: true,
|
|
107
107
|
sortOrder: 6,
|
|
108
108
|
},
|
|
109
109
|
email: {
|
|
110
|
-
id:
|
|
111
|
-
name:
|
|
110
|
+
id: 'email',
|
|
111
|
+
name: 'Email',
|
|
112
112
|
show: true,
|
|
113
113
|
compositeKey: true,
|
|
114
114
|
sortOrder: 7,
|
|
115
115
|
},
|
|
116
116
|
boolean: {
|
|
117
|
-
id:
|
|
118
|
-
name:
|
|
117
|
+
id: 'boolean',
|
|
118
|
+
name: 'Boolean',
|
|
119
119
|
show: true,
|
|
120
120
|
compositeKey: false,
|
|
121
121
|
sortOrder: 4,
|
|
122
122
|
},
|
|
123
123
|
createdAt: {
|
|
124
|
-
id:
|
|
125
|
-
name:
|
|
124
|
+
id: 'createdAt',
|
|
125
|
+
name: 'Created At',
|
|
126
126
|
show: false,
|
|
127
127
|
compositeKey: false,
|
|
128
128
|
},
|
|
129
129
|
updatedAt: {
|
|
130
|
-
id:
|
|
131
|
-
name:
|
|
130
|
+
id: 'updatedAt',
|
|
131
|
+
name: 'Updated At',
|
|
132
132
|
show: false,
|
|
133
133
|
compositeKey: false,
|
|
134
134
|
},
|
|
135
135
|
createdBy: {
|
|
136
|
-
id:
|
|
137
|
-
name:
|
|
136
|
+
id: 'createdBy',
|
|
137
|
+
name: 'Created By',
|
|
138
138
|
show: false,
|
|
139
139
|
compositeKey: true,
|
|
140
140
|
},
|
|
141
141
|
updatedBy: {
|
|
142
|
-
id:
|
|
143
|
-
name:
|
|
142
|
+
id: 'updatedBy',
|
|
143
|
+
name: 'Updated By',
|
|
144
144
|
show: false,
|
|
145
145
|
compositeKey: true,
|
|
146
146
|
},
|
|
147
147
|
version: {
|
|
148
|
-
id:
|
|
149
|
-
name:
|
|
148
|
+
id: 'version',
|
|
149
|
+
name: 'Version',
|
|
150
150
|
show: false,
|
|
151
151
|
compositeKey: true,
|
|
152
152
|
},
|
|
153
153
|
isDeleted: {
|
|
154
|
-
id:
|
|
155
|
-
name:
|
|
154
|
+
id: 'isDeleted',
|
|
155
|
+
name: 'Is deleted',
|
|
156
156
|
show: false,
|
|
157
157
|
compositeKey: false,
|
|
158
158
|
},
|
|
159
159
|
dynamic_option: {
|
|
160
|
-
id:
|
|
161
|
-
name:
|
|
160
|
+
id: 'dynamic_option',
|
|
161
|
+
name: 'Dynamic Option',
|
|
162
162
|
show: true,
|
|
163
163
|
compositeKey: true,
|
|
164
|
-
multipleTrueName:
|
|
164
|
+
multipleTrueName: 'Multiple Dynamic Options',
|
|
165
165
|
sortOrder: 14,
|
|
166
166
|
},
|
|
167
167
|
static_option: {
|
|
168
|
-
id:
|
|
169
|
-
name:
|
|
168
|
+
id: 'static_option',
|
|
169
|
+
name: 'Static Option',
|
|
170
170
|
show: true,
|
|
171
171
|
compositeKey: true,
|
|
172
|
-
multipleTrueName:
|
|
172
|
+
multipleTrueName: 'Multiple Static Options',
|
|
173
173
|
sortOrder: 15,
|
|
174
174
|
},
|
|
175
175
|
uuid: {
|
|
176
|
-
id:
|
|
177
|
-
name:
|
|
176
|
+
id: 'uuid',
|
|
177
|
+
name: 'Id',
|
|
178
178
|
show: false,
|
|
179
179
|
compositeKey: false,
|
|
180
180
|
},
|
|
181
181
|
custom_uuid: {
|
|
182
|
-
id:
|
|
183
|
-
name:
|
|
184
|
-
prepend:
|
|
185
|
-
append:
|
|
186
|
-
algorithm:
|
|
182
|
+
id: 'custom_uuid',
|
|
183
|
+
name: 'Custom UUID',
|
|
184
|
+
prepend: '',
|
|
185
|
+
append: '',
|
|
186
|
+
algorithm: '',
|
|
187
187
|
show: true,
|
|
188
188
|
sortOrder: 12,
|
|
189
189
|
compositeKey: false,
|
|
190
190
|
},
|
|
191
191
|
object: {
|
|
192
|
-
id:
|
|
193
|
-
name:
|
|
192
|
+
id: 'object',
|
|
193
|
+
name: 'Object',
|
|
194
194
|
show: false,
|
|
195
195
|
sortOrder: 0,
|
|
196
196
|
compositeKey: false,
|
|
197
197
|
},
|
|
198
198
|
unix_timestamp: {
|
|
199
|
-
id:
|
|
200
|
-
name:
|
|
199
|
+
id: 'unix_timestamp',
|
|
200
|
+
name: 'Unix Timestamp',
|
|
201
201
|
validation: { min: 20, max: 140 },
|
|
202
202
|
show: false,
|
|
203
203
|
advancedOptions: true,
|
|
@@ -205,40 +205,40 @@ exports.FieldTypes = {
|
|
|
205
205
|
advSortOrder: 1,
|
|
206
206
|
},
|
|
207
207
|
time_slot: {
|
|
208
|
-
id:
|
|
209
|
-
name:
|
|
208
|
+
id: 'time_slot',
|
|
209
|
+
name: 'Time Slot',
|
|
210
210
|
show: false,
|
|
211
211
|
advancedOptions: true,
|
|
212
212
|
compositeKey: false,
|
|
213
213
|
advSortOrder: 2,
|
|
214
214
|
},
|
|
215
215
|
time_picker: {
|
|
216
|
-
id:
|
|
217
|
-
name:
|
|
216
|
+
id: 'time_picker',
|
|
217
|
+
name: 'Timepicker',
|
|
218
218
|
show: false,
|
|
219
219
|
advancedOptions: true,
|
|
220
220
|
compositeKey: false,
|
|
221
221
|
advSortOrder: 3,
|
|
222
222
|
},
|
|
223
223
|
slug: {
|
|
224
|
-
id:
|
|
225
|
-
name:
|
|
224
|
+
id: 'slug',
|
|
225
|
+
name: 'Slug',
|
|
226
226
|
show: false,
|
|
227
227
|
advancedOptions: true,
|
|
228
228
|
compositeKey: false,
|
|
229
229
|
advSortOrder: 4,
|
|
230
230
|
},
|
|
231
231
|
json: {
|
|
232
|
-
id:
|
|
233
|
-
name:
|
|
232
|
+
id: 'json',
|
|
233
|
+
name: 'JSON',
|
|
234
234
|
show: false,
|
|
235
235
|
advancedOptions: true,
|
|
236
236
|
compositeKey: false,
|
|
237
237
|
advSortOrder: 5,
|
|
238
238
|
},
|
|
239
239
|
markdown: {
|
|
240
|
-
id:
|
|
241
|
-
name:
|
|
240
|
+
id: 'markdown',
|
|
241
|
+
name: 'Markdown',
|
|
242
242
|
show: false,
|
|
243
243
|
advancedOptions: true,
|
|
244
244
|
compositeKey: false,
|
|
@@ -251,66 +251,66 @@ const { belongsTo, boolean, color, createdAt, createdBy, custom_uuid, date, dyna
|
|
|
251
251
|
// markdown,
|
|
252
252
|
time_picker, time_slot, updatedBy, version, } = exports.FieldTypes;
|
|
253
253
|
exports.defaultFields = [
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
254
|
+
'id',
|
|
255
|
+
'uuid',
|
|
256
|
+
'UUID',
|
|
257
|
+
'created_at',
|
|
258
|
+
'createdat',
|
|
259
|
+
'createdAt',
|
|
260
|
+
'created',
|
|
261
|
+
'created time',
|
|
262
|
+
'updated_at',
|
|
263
|
+
'updatedat',
|
|
264
|
+
'updatedAt',
|
|
265
|
+
'updated',
|
|
266
|
+
'last edited time',
|
|
267
|
+
'created by',
|
|
268
|
+
'isdeleted',
|
|
269
|
+
'is_deleted',
|
|
270
|
+
'is_delete',
|
|
271
|
+
'isdelete',
|
|
272
|
+
'delete',
|
|
273
|
+
'updatedBy',
|
|
274
|
+
'version',
|
|
275
275
|
];
|
|
276
|
-
exports.CRUD_CREATE =
|
|
277
|
-
exports.CRUD_UPDATE =
|
|
278
|
-
exports.CRUD_DETAIL =
|
|
279
|
-
exports.CRUD_LIST =
|
|
280
|
-
exports.CRUD_DELETE =
|
|
276
|
+
exports.CRUD_CREATE = 'create';
|
|
277
|
+
exports.CRUD_UPDATE = 'update';
|
|
278
|
+
exports.CRUD_DETAIL = 'detail';
|
|
279
|
+
exports.CRUD_LIST = 'list';
|
|
280
|
+
exports.CRUD_DELETE = 'delete';
|
|
281
281
|
exports.crudKeys = [exports.CRUD_CREATE, exports.CRUD_UPDATE, exports.CRUD_DETAIL, exports.CRUD_LIST, exports.CRUD_DELETE];
|
|
282
282
|
const fieldType = (itemName, type) => {
|
|
283
|
-
if (itemName ===
|
|
284
|
-
return
|
|
283
|
+
if (itemName === 'custom_uuid') {
|
|
284
|
+
return 'uuid';
|
|
285
285
|
}
|
|
286
286
|
switch (type) {
|
|
287
|
-
case
|
|
288
|
-
case
|
|
289
|
-
case
|
|
290
|
-
case
|
|
291
|
-
type =
|
|
287
|
+
case 'integer':
|
|
288
|
+
case 'autoNumber':
|
|
289
|
+
case 'phoneNumber':
|
|
290
|
+
case 'phone_number':
|
|
291
|
+
type = 'number';
|
|
292
292
|
break;
|
|
293
|
-
case
|
|
294
|
-
case
|
|
295
|
-
case
|
|
296
|
-
case
|
|
297
|
-
case
|
|
298
|
-
case
|
|
299
|
-
case
|
|
300
|
-
type =
|
|
293
|
+
case 'string':
|
|
294
|
+
case 'singleLineText':
|
|
295
|
+
case 'rich_text':
|
|
296
|
+
case 'title':
|
|
297
|
+
case 'multilineText':
|
|
298
|
+
case 'url':
|
|
299
|
+
case 'multipleAttachments':
|
|
300
|
+
type = 'text';
|
|
301
301
|
break;
|
|
302
|
-
case
|
|
303
|
-
type =
|
|
302
|
+
case 'checkbox':
|
|
303
|
+
type = 'boolean';
|
|
304
304
|
break;
|
|
305
|
-
case
|
|
306
|
-
case
|
|
307
|
-
case
|
|
308
|
-
case
|
|
309
|
-
case
|
|
310
|
-
type =
|
|
305
|
+
case 'multipleSelects':
|
|
306
|
+
case 'multi_select':
|
|
307
|
+
case 'status':
|
|
308
|
+
case 'select':
|
|
309
|
+
case 'singleSelect':
|
|
310
|
+
type = 'static_option';
|
|
311
311
|
break;
|
|
312
|
-
case
|
|
313
|
-
type =
|
|
312
|
+
case 'date':
|
|
313
|
+
type = 'date';
|
|
314
314
|
break;
|
|
315
315
|
default:
|
|
316
316
|
break;
|
|
@@ -338,12 +338,7 @@ exports.passwordUrlField = [password.id, url.id];
|
|
|
338
338
|
exports.largeTextNumberField = [large_text.id, number.id];
|
|
339
339
|
exports.booleanUrlField = [boolean.id, url.id];
|
|
340
340
|
exports.byFields = new Set([createdBy.id, updatedBy.id]);
|
|
341
|
-
exports.hiddenField = [
|
|
342
|
-
createdBy.id,
|
|
343
|
-
isDeleted.id,
|
|
344
|
-
updatedBy.id,
|
|
345
|
-
version.id,
|
|
346
|
-
];
|
|
341
|
+
exports.hiddenField = [createdBy.id, isDeleted.id, updatedBy.id, version.id];
|
|
347
342
|
exports.passwordBooleanField = [boolean.id, password.id];
|
|
348
343
|
exports.timeSlotPicker = [time_picker.id, time_slot.id];
|
|
349
344
|
exports.textNumberField = [text.id, number.id];
|
|
@@ -353,31 +348,15 @@ exports.hashCodeFieldText = [color.id, uuid.id, custom_uuid.id];
|
|
|
353
348
|
exports.textEmailPasswordField = [...exports.emailField, password.id];
|
|
354
349
|
exports.ImageUrlFields = [...exports.ImageFields, file.id];
|
|
355
350
|
exports.SelectOptionFields = [...exports.OptionTypeFields, reference.id];
|
|
356
|
-
exports.MultiSelectOptionFields = [
|
|
357
|
-
...exports.OptionTypeFields,
|
|
358
|
-
belongsTo.id,
|
|
359
|
-
...exports.byFields,
|
|
360
|
-
];
|
|
351
|
+
exports.MultiSelectOptionFields = [...exports.OptionTypeFields, belongsTo.id, ...exports.byFields];
|
|
361
352
|
exports.dateField = [...exports.systemDateField, date.id];
|
|
362
353
|
/** FOUR */
|
|
363
354
|
exports.TextTypeFields = [...exports.emailField, ...exports.numberTextField];
|
|
364
355
|
exports.DefaultPrivateField = [...exports.systemHideField, password.id];
|
|
365
|
-
exports.SystemPrivateFields = [
|
|
366
|
-
|
|
367
|
-
version.id,
|
|
368
|
-
uuid.id,
|
|
369
|
-
password.id,
|
|
370
|
-
];
|
|
371
|
-
exports.BelongsCreatedByRefField = [
|
|
372
|
-
...exports.BelongsToReferenceField,
|
|
373
|
-
createdBy.id,
|
|
374
|
-
];
|
|
356
|
+
exports.SystemPrivateFields = [isDeleted.id, version.id, uuid.id, password.id];
|
|
357
|
+
exports.BelongsCreatedByRefField = [...exports.BelongsToReferenceField, createdBy.id];
|
|
375
358
|
exports.BelongsRefByFields = [...exports.BelongsToReferenceField, ...exports.byFields];
|
|
376
|
-
exports.BelongsSelectOptionFields = [
|
|
377
|
-
...exports.SelectOptionFields,
|
|
378
|
-
...exports.byFields,
|
|
379
|
-
belongsTo.id,
|
|
380
|
-
];
|
|
359
|
+
exports.BelongsSelectOptionFields = [...exports.SelectOptionFields, ...exports.byFields, belongsTo.id];
|
|
381
360
|
/** FIVE */
|
|
382
361
|
exports.stringField = [...exports.emailField, ...exports.hashCodeFieldText];
|
|
383
362
|
exports.hiddenFormField = [...exports.systemHideField, ...exports.systemDateField];
|
|
@@ -390,19 +369,11 @@ exports.mixedField = [
|
|
|
390
369
|
];
|
|
391
370
|
exports.stringLinkField = [...exports.stringField, ...exports.linkField];
|
|
392
371
|
exports.nonExportField = [...exports.systemDateField, ...exports.exportHideField];
|
|
393
|
-
exports.notFieldForImport = [
|
|
394
|
-
...exports.hiddenFormField,
|
|
395
|
-
...exports.ImageFields,
|
|
396
|
-
password.id,
|
|
397
|
-
];
|
|
372
|
+
exports.notFieldForImport = [...exports.hiddenFormField, ...exports.ImageFields, password.id];
|
|
398
373
|
/** Usage of emailField */
|
|
399
374
|
exports.textTypeAndColorField = [...exports.TextTypeFields, color.id];
|
|
400
375
|
exports.pureTextField = [...exports.textTypeAndColorField, ...exports.linkField];
|
|
401
|
-
exports.simpleTextField = [
|
|
402
|
-
...exports.emailField,
|
|
403
|
-
...exports.largeTextNumberField,
|
|
404
|
-
...exports.booleanUrlField,
|
|
405
|
-
];
|
|
376
|
+
exports.simpleTextField = [...exports.emailField, ...exports.largeTextNumberField, ...exports.booleanUrlField];
|
|
406
377
|
exports.NoRefFields = [...exports.textTypeAndColorField, boolean.id];
|
|
407
378
|
exports.textField1 = [...exports.TextTypeFields, ...exports.booleanUrlField];
|
|
408
379
|
/** Usage of uuidField */
|
|
@@ -415,29 +386,14 @@ exports.pageCollectionFields = [
|
|
|
415
386
|
exports.referenceTextField = [...exports.uuidField, ...exports.childDataField, number.id];
|
|
416
387
|
/** Usage of textEmailPasswordField */
|
|
417
388
|
exports.StringFields = [...exports.textEmailPasswordField, ...exports.linkField];
|
|
418
|
-
exports.placeholderField = [
|
|
419
|
-
reference.id,
|
|
420
|
-
...exports.systemDateField,
|
|
421
|
-
...exports.hiddenField,
|
|
422
|
-
password.id,
|
|
423
|
-
];
|
|
389
|
+
exports.placeholderField = [reference.id, ...exports.systemDateField, ...exports.hiddenField, password.id];
|
|
424
390
|
/** Usage of systemDateField and systemHideField */
|
|
425
391
|
exports.systemAndRefField = [...exports.systemHideField, ...exports.childDataField];
|
|
426
|
-
exports.belongsToAndHiddenField = [
|
|
427
|
-
...exports.BelongsToReferenceField,
|
|
428
|
-
...exports.hiddenFormField,
|
|
429
|
-
];
|
|
392
|
+
exports.belongsToAndHiddenField = [...exports.BelongsToReferenceField, ...exports.hiddenFormField];
|
|
430
393
|
/** Usage of BelongsToReferenceField */
|
|
431
|
-
exports.level3ReferenceField2 = [
|
|
432
|
-
...exports.belongsToAndHiddenField,
|
|
433
|
-
...exports.exportHideField,
|
|
434
|
-
];
|
|
394
|
+
exports.level3ReferenceField2 = [...exports.belongsToAndHiddenField, ...exports.exportHideField];
|
|
435
395
|
exports.notFieldForExport = [...exports.nonExportField, ...exports.hiddenField, object.id];
|
|
436
|
-
exports.level3ReferenceField = [
|
|
437
|
-
...exports.BelongsCreatedByRefField,
|
|
438
|
-
...exports.nonExportField,
|
|
439
|
-
isDeleted.id,
|
|
440
|
-
];
|
|
396
|
+
exports.level3ReferenceField = [...exports.BelongsCreatedByRefField, ...exports.nonExportField, isDeleted.id];
|
|
441
397
|
/** Usage of OptionTypeFields */
|
|
442
398
|
exports.nonReferenceField = [
|
|
443
399
|
...exports.stringLinkField,
|
|
@@ -483,8 +439,7 @@ const fieldToShow = (type) => {
|
|
|
483
439
|
};
|
|
484
440
|
exports.fieldToShow = fieldToShow;
|
|
485
441
|
const filterFieldsForDataTable = (fields) => {
|
|
486
|
-
return fields.filter((field) => ![...exports.belongsToAndHiddenField,
|
|
487
|
-
field.id !== "");
|
|
442
|
+
return fields.filter((field) => ![...exports.belongsToAndHiddenField, 'utility'].includes(field.type) && field.id !== '');
|
|
488
443
|
};
|
|
489
444
|
exports.filterFieldsForDataTable = filterFieldsForDataTable;
|
|
490
445
|
const filterFieldsForItemList = (fields) => {
|