drapcode-constant 1.7.2 → 1.7.3

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 (39) hide show
  1. package/README.md +64 -0
  2. package/build/constants/FieldTypes.d.ts +12 -256
  3. package/build/constants/FieldTypes.js +131 -152
  4. package/build/constants/FieldTypes.js.map +1 -0
  5. package/build/constants/aiModel.js +1 -0
  6. package/build/constants/aiModel.js.map +1 -0
  7. package/build/constants/builder.d.ts +22 -1
  8. package/build/constants/builder.js +124 -78
  9. package/build/constants/builder.js.map +1 -0
  10. package/build/constants/collection.js +4 -3
  11. package/build/constants/collection.js.map +1 -0
  12. package/build/constants/exportCode.js +1 -0
  13. package/build/constants/exportCode.js.map +1 -0
  14. package/build/constants/externalApi.js +1 -0
  15. package/build/constants/externalApi.js.map +1 -0
  16. package/build/constants/images.d.ts +5 -0
  17. package/build/constants/images.js +50 -0
  18. package/build/constants/images.js.map +1 -0
  19. package/build/constants/loan.js +1 -0
  20. package/build/constants/loan.js.map +1 -0
  21. package/build/constants/messages.js +1 -0
  22. package/build/constants/messages.js.map +1 -0
  23. package/build/constants/permissions.js +131 -130
  24. package/build/constants/permissions.js.map +1 -0
  25. package/build/constants/plugins.js +1 -0
  26. package/build/constants/plugins.js.map +1 -0
  27. package/build/constants/query.d.ts +17 -0
  28. package/build/constants/query.js +28 -13
  29. package/build/constants/query.js.map +1 -0
  30. package/build/constants/redis.d.ts +8 -0
  31. package/build/constants/redis.js +11 -1
  32. package/build/constants/redis.js.map +1 -0
  33. package/build/index.d.ts +1 -0
  34. package/build/index.js +2 -0
  35. package/build/index.js.map +1 -0
  36. package/build/types/field.d.ts +30 -0
  37. package/build/types/field.js +3 -0
  38. package/build/types/field.js.map +1 -0
  39. package/package.json +15 -4
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # Drapcode Constants
2
+
3
+ A TypeScript library containing constant values used across Drapcode applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install drapcode-constant
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import {
15
+ // Import the constants you need
16
+ FieldTypes,
17
+ QueryConstants,
18
+ // ... other constants
19
+ } from 'drapcode-constant';
20
+ ```
21
+
22
+ ## Development
23
+
24
+ 1. Install dependencies:
25
+ ```bash
26
+ npm install
27
+ ```
28
+
29
+ 2. Run development mode:
30
+ ```bash
31
+ npm run dev
32
+ ```
33
+
34
+ 3. Build the project:
35
+ ```bash
36
+ npm run build
37
+ ```
38
+
39
+ 4. Run tests:
40
+ ```bash
41
+ npm test
42
+ ```
43
+
44
+ 5. Lint the code:
45
+ ```bash
46
+ npm run lint
47
+ ```
48
+
49
+ 6. Format the code:
50
+ ```bash
51
+ npm run format
52
+ ```
53
+
54
+ ## Contributing
55
+
56
+ 1. Fork the repository
57
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
58
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
59
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
60
+ 5. Open a Pull Request
61
+
62
+ ## License
63
+
64
+ This project is licensed under the ISC License.
@@ -1,261 +1,17 @@
1
- export declare const FieldTypes: {
2
- text: {
3
- id: string;
4
- name: string;
5
- validation: {
6
- min: number;
7
- max: number;
8
- };
9
- show: boolean;
10
- compositeKey: boolean;
11
- sortOrder: number;
12
- };
13
- large_text: {
14
- id: string;
15
- name: string;
16
- validation: {
17
- min: number;
18
- max: number;
19
- };
20
- show: boolean;
21
- compositeKey: boolean;
22
- sortOrder: number;
23
- };
24
- number: {
25
- id: string;
26
- name: string;
27
- validation: {
28
- min: number;
29
- max: number;
30
- };
31
- show: boolean;
32
- compositeKey: boolean;
33
- sortOrder: number;
34
- };
35
- date: {
36
- id: string;
37
- name: string;
38
- show: boolean;
39
- compositeKey: boolean;
40
- sortOrder: number;
41
- };
42
- password: {
43
- id: string;
44
- name: string;
45
- show: boolean;
46
- compositeKey: boolean;
47
- sortOrder: number;
48
- };
49
- color: {
50
- id: string;
51
- name: string;
52
- show: boolean;
53
- compositeKey: boolean;
54
- };
55
- file: {
56
- id: string;
57
- name: string;
58
- show: boolean;
59
- compositeKey: boolean;
60
- multipleTrueName: string;
61
- sortOrder: number;
62
- };
63
- reference: {
64
- id: string;
65
- name: string;
66
- show: boolean;
67
- compositeKey: boolean;
68
- multipleTrueName: string;
69
- sortOrder: number;
70
- };
71
- belongsTo: {
72
- id: string;
73
- name: string;
74
- show: boolean;
75
- compositeKey: boolean;
76
- sortOrder: number;
77
- };
78
- multi_reference: {
79
- id: string;
80
- name: string;
81
- show: boolean;
82
- compositeKey: boolean;
83
- };
84
- image: {
85
- id: string;
86
- name: string;
87
- show: boolean;
88
- compositeKey: boolean;
89
- };
90
- multi_image: {
91
- id: string;
92
- name: string;
93
- show: boolean;
94
- compositeKey: boolean;
95
- };
96
- video_link: {
97
- id: string;
98
- name: string;
99
- show: boolean;
100
- compositeKey: boolean;
101
- };
102
- url: {
103
- id: string;
104
- name: string;
105
- show: boolean;
106
- compositeKey: boolean;
107
- sortOrder: number;
108
- };
109
- tel: {
110
- id: string;
111
- name: string;
112
- show: boolean;
113
- compositeKey: boolean;
114
- sortOrder: number;
115
- };
116
- email: {
117
- id: string;
118
- name: string;
119
- show: boolean;
120
- compositeKey: boolean;
121
- sortOrder: number;
122
- };
123
- boolean: {
124
- id: string;
125
- name: string;
126
- show: boolean;
127
- compositeKey: boolean;
128
- sortOrder: number;
129
- };
130
- createdAt: {
131
- id: string;
132
- name: string;
133
- show: boolean;
134
- compositeKey: boolean;
135
- };
136
- updatedAt: {
137
- id: string;
138
- name: string;
139
- show: boolean;
140
- compositeKey: boolean;
141
- };
142
- createdBy: {
143
- id: string;
144
- name: string;
145
- show: boolean;
146
- compositeKey: boolean;
147
- };
148
- updatedBy: {
149
- id: string;
150
- name: string;
151
- show: boolean;
152
- compositeKey: boolean;
153
- };
154
- version: {
155
- id: string;
156
- name: string;
157
- show: boolean;
158
- compositeKey: boolean;
159
- };
160
- isDeleted: {
161
- id: string;
162
- name: string;
163
- show: boolean;
164
- compositeKey: boolean;
165
- };
166
- dynamic_option: {
167
- id: string;
168
- name: string;
169
- show: boolean;
170
- compositeKey: boolean;
171
- multipleTrueName: string;
172
- sortOrder: number;
173
- };
174
- static_option: {
175
- id: string;
176
- name: string;
177
- show: boolean;
178
- compositeKey: boolean;
179
- multipleTrueName: string;
180
- sortOrder: number;
181
- };
182
- uuid: {
183
- id: string;
184
- name: string;
185
- show: boolean;
186
- compositeKey: boolean;
187
- };
188
- custom_uuid: {
189
- id: string;
190
- name: string;
191
- prepend: string;
192
- append: string;
193
- algorithm: string;
194
- show: boolean;
195
- sortOrder: number;
196
- };
197
- object: {
198
- id: string;
199
- name: string;
200
- show: boolean;
201
- sortOrder: boolean;
202
- };
203
- unix_timestamp: {
204
- id: string;
205
- name: string;
206
- validation: {
207
- min: number;
208
- max: number;
209
- };
210
- miliSec: boolean;
211
- show: boolean;
212
- advancedOptions: boolean;
213
- advSortOrder: number;
214
- };
215
- time_slot: {
216
- id: string;
217
- name: string;
218
- show: boolean;
219
- advancedOptions: boolean;
220
- advSortOrder: number;
221
- };
222
- time_picker: {
223
- id: string;
224
- name: string;
225
- show: boolean;
226
- advancedOptions: boolean;
227
- advSortOrder: number;
228
- };
229
- slug: {
230
- id: string;
231
- name: string;
232
- show: boolean;
233
- advancedOptions: boolean;
234
- advSortOrder: number;
235
- };
236
- json: {
237
- id: string;
238
- name: string;
239
- show: boolean;
240
- advancedOptions: boolean;
241
- advSortOrder: number;
242
- };
243
- markdown: {
244
- id: string;
245
- name: string;
246
- show: boolean;
247
- advancedOptions: boolean;
248
- advSortOrder: number;
249
- };
250
- };
1
+ import { FieldTypesType } from "../types/field";
2
+ /**
3
+ * Collection of all available field types in the system
4
+ * Each field type defines its properties, validation rules, and display settings
5
+ */
6
+ export declare const FieldTypes: FieldTypesType;
251
7
  export declare const defaultFields: string[];
252
8
  export declare const crudKeys: string[];
253
9
  export declare const fieldType: (itemName: string, type: string) => string;
254
- export declare const filterFieldsForForm: (fields: any[]) => any[];
255
10
  /** TWO */
256
11
  export declare const OptionTypeFields: string[];
257
- export declare const onlyReferenceField: string[];
258
12
  export declare const childDataField: string[];
13
+ export declare const BelongsToReferenceField: string[];
14
+ export declare const ReferenceCreatedByFields: string[];
259
15
  export declare const ImageFields: string[];
260
16
  export declare const URLFields: string[];
261
17
  export declare const FileUrlFields: string[];
@@ -269,6 +25,7 @@ export declare const linkField: string[];
269
25
  export declare const passwordUrlField: string[];
270
26
  export declare const largeTextNumberField: string[];
271
27
  export declare const booleanUrlField: string[];
28
+ export declare const byFields: Set<string>;
272
29
  export declare const hiddenField: string[];
273
30
  export declare const passwordBooleanField: string[];
274
31
  export declare const timeSlotPicker: string[];
@@ -278,9 +35,6 @@ export declare const systemHideField: string[];
278
35
  export declare const hashCodeFieldText: string[];
279
36
  export declare const textEmailPasswordField: string[];
280
37
  export declare const ImageUrlFields: string[];
281
- export declare const BelongsToReferenceField: string[];
282
- export declare const referenceAndDynamicField: string[];
283
- export declare const ReferenceCreatedByFields: string[];
284
38
  export declare const SelectOptionFields: string[];
285
39
  export declare const MultiSelectOptionFields: string[];
286
40
  export declare const dateField: string[];
@@ -288,7 +42,6 @@ export declare const dateField: string[];
288
42
  export declare const TextTypeFields: string[];
289
43
  export declare const DefaultPrivateField: string[];
290
44
  export declare const BelongsCreatedByRefField: string[];
291
- export declare const NonBelongsSelectOptionFields: string[];
292
45
  export declare const BelongsSelectOptionFields: string[];
293
46
  /** FIVE */
294
47
  export declare const stringField: string[];
@@ -299,6 +52,7 @@ export declare const stringLinkField: string[];
299
52
  export declare const nonExportField: string[];
300
53
  export declare const notFieldForImport: string[];
301
54
  /** Usage of emailField */
55
+ export declare const textTypeAndColorField: string[];
302
56
  export declare const pureTextField: string[];
303
57
  export declare const simpleTextField: string[];
304
58
  export declare const NoRefFields: string[];
@@ -311,6 +65,7 @@ export declare const StringFields: string[];
311
65
  export declare const placeholderField: string[];
312
66
  /** Usage of systemDateField and systemHideField */
313
67
  export declare const systemAndRefField: string[];
68
+ export declare const belongsToAndHiddenField: string[];
314
69
  /** Usage of BelongsToReferenceField */
315
70
  export declare const level3ReferenceField2: string[];
316
71
  export declare const notFieldForExport: string[];
@@ -322,6 +77,7 @@ export declare const collectionDefaultFieldSortOrder: {
322
77
  order: number;
323
78
  field: string;
324
79
  }[];
80
+ export declare const filterFieldsForForm: (fields: any[]) => any[];
325
81
  export declare const filterFieldForCommandObj: () => string[];
326
82
  export declare const fieldToShow: (type: string) => boolean;
327
83
  export declare const filterFieldsForDataTable: (fields: any[]) => any[];