drapcode-constant 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,483 @@
1
+ "use strict";
2
+ var __spreadArrays = (this && this.__spreadArrays) || function () {
3
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
5
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6
+ r[k] = a[j];
7
+ return r;
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.filterFieldsForDataTable = exports.fieldToShow = exports.filterFieldForCommandObj = exports.collectionDefaultFieldSortOrder = exports.AllSelectOptionFields = exports.nonReferenceField = exports.NonBelongsSelectOptionFields = exports.MultiSelectOptionFields = exports.SelectOptionFields = exports.level3ReferenceField = exports.level3ReferenceField2 = exports.BelongsCreatedByRefField = exports.notFieldForImport = exports.notFieldForExport = exports.hiddenFormField = exports.DefaultPrivateField = exports.systemAndRefField = exports.placeholderField = exports.ReferenceCreatedByFields = exports.referenceAndDynamicField = exports.BelongsToReferenceField = exports.ImageUrlFields = exports.StringFields = exports.referenceTextField = exports.pageCollectionFields = exports.textField1 = exports.NoRefFields = exports.textEmailPasswordField = exports.simpleTextFeild = exports.pureTextField = exports.mixedField = exports.systemHideField = exports.linkField = exports.numberTextField = exports.exportHideField = exports.uuidField = exports.passwordField = exports.emailField = exports.systemDateField = exports.FileUrlFields = exports.URLFields = exports.ImageFields = exports.childDataField = exports.onlyReferenceField = exports.OptionTypeFields = exports.filterFieldsForForm = exports.fieldType = exports.crudKeys = exports.defaultFields = exports.FieldTypes = void 0;
11
+ exports.filterIndexFields = exports.filterFieldsForPlaceholderModal = exports.filterFieldsForItemTemplate = exports.filterFieldForItemTemplate = exports.filterSystemCreatedFieldsForItemList = exports.filterFieldsForItemList = void 0;
12
+ exports.FieldTypes = {
13
+ text: {
14
+ id: "text",
15
+ name: "Text",
16
+ validation: { min: 1, max: 20 },
17
+ show: true,
18
+ compositeKey: true,
19
+ sortOrder: 0,
20
+ },
21
+ large_text: {
22
+ id: "large_text",
23
+ name: "Large Text",
24
+ validation: { min: 20, max: 140 },
25
+ show: true,
26
+ compositeKey: false,
27
+ sortOrder: 3,
28
+ },
29
+ number: {
30
+ id: "number",
31
+ name: "Number",
32
+ validation: { min: 20, max: 140 },
33
+ show: true,
34
+ compositeKey: true,
35
+ sortOrder: 1,
36
+ },
37
+ date: {
38
+ id: "date",
39
+ name: "Date",
40
+ show: true,
41
+ compositeKey: true,
42
+ sortOrder: 2,
43
+ },
44
+ password: {
45
+ id: "password",
46
+ name: "Password",
47
+ show: true,
48
+ compositeKey: false,
49
+ sortOrder: 5,
50
+ },
51
+ color: {
52
+ id: "color",
53
+ name: "Color",
54
+ show: false,
55
+ compositeKey: false,
56
+ },
57
+ file: {
58
+ id: "file",
59
+ name: "File",
60
+ show: true,
61
+ compositeKey: false,
62
+ multipleTrueName: "Files/Images",
63
+ sortOrder: 9,
64
+ },
65
+ reference: {
66
+ id: "reference",
67
+ name: "Reference",
68
+ show: true,
69
+ compositeKey: true,
70
+ multipleTrueName: "Multi Reference",
71
+ sortOrder: 10,
72
+ },
73
+ belongsTo: {
74
+ id: "belongsTo",
75
+ name: "Child Of",
76
+ show: true,
77
+ compositeKey: true,
78
+ sortOrder: 11,
79
+ },
80
+ multi_reference: {
81
+ id: "multi_reference",
82
+ name: "Multi-reference",
83
+ show: false,
84
+ compositeKey: false,
85
+ },
86
+ image: {
87
+ id: "image",
88
+ name: "Image",
89
+ show: false,
90
+ compositeKey: false,
91
+ },
92
+ multi_image: {
93
+ id: "multi_image",
94
+ name: "Multi-image",
95
+ show: false,
96
+ compositeKey: false,
97
+ },
98
+ video_link: {
99
+ id: "video_link",
100
+ name: "Video link",
101
+ show: false,
102
+ compositeKey: false,
103
+ },
104
+ url: {
105
+ id: "url",
106
+ name: "URL",
107
+ show: true,
108
+ compositeKey: true,
109
+ sortOrder: 8,
110
+ },
111
+ tel: {
112
+ id: "tel",
113
+ name: "Phone Number",
114
+ show: true,
115
+ compositeKey: true,
116
+ sortOrder: 6,
117
+ },
118
+ email: {
119
+ id: "email",
120
+ name: "Email",
121
+ show: true,
122
+ compositeKey: true,
123
+ sortOrder: 7,
124
+ },
125
+ boolean: {
126
+ id: "boolean",
127
+ name: "Boolean",
128
+ show: true,
129
+ compositeKey: false,
130
+ sortOrder: 4,
131
+ },
132
+ createdAt: {
133
+ id: "createdAt",
134
+ name: "Created At",
135
+ show: false,
136
+ compositeKey: false,
137
+ },
138
+ updatedAt: {
139
+ id: "updatedAt",
140
+ name: "Updated At",
141
+ show: false,
142
+ compositeKey: false,
143
+ },
144
+ createdBy: {
145
+ id: "createdBy",
146
+ name: "Created By",
147
+ show: false,
148
+ compositeKey: true,
149
+ },
150
+ isDeleted: {
151
+ id: "isDeleted",
152
+ name: "Is deleted",
153
+ show: false,
154
+ compositeKey: false,
155
+ },
156
+ dynamic_option: {
157
+ id: "dynamic_option",
158
+ name: "Dynamic Option",
159
+ show: true,
160
+ compositeKey: true,
161
+ multipleTrueName: "Multiple Dynamic Options",
162
+ sortOrder: 14,
163
+ },
164
+ static_option: {
165
+ id: "static_option",
166
+ name: "Static Option",
167
+ show: true,
168
+ compositeKey: true,
169
+ multipleTrueName: "Multiple Static Options",
170
+ sortOrder: 15,
171
+ },
172
+ uuid: {
173
+ id: "uuid",
174
+ name: "Id",
175
+ show: false,
176
+ compositeKey: false,
177
+ },
178
+ custom_uuid: {
179
+ id: "custom_uuid",
180
+ name: "Custom UUID",
181
+ prepend: "",
182
+ append: "",
183
+ algorithm: "",
184
+ show: true,
185
+ sortOrder: 12,
186
+ },
187
+ object: {
188
+ id: "object",
189
+ name: "Object",
190
+ show: false,
191
+ sortOrder: false,
192
+ },
193
+ unix_timestamp: {
194
+ id: "unix_timestamp",
195
+ name: "Unix Timestamp",
196
+ validation: { min: 20, max: 140 },
197
+ miliSec: true,
198
+ show: false,
199
+ advancedOptions: true,
200
+ advSortOrder: 1,
201
+ },
202
+ };
203
+ var createdBy = exports.FieldTypes.createdBy, uuid = exports.FieldTypes.uuid, createdAt = exports.FieldTypes.createdAt, isDeleted = exports.FieldTypes.isDeleted, reference = exports.FieldTypes.reference, multi_reference = exports.FieldTypes.multi_reference, belongsTo = exports.FieldTypes.belongsTo, dynamic_option = exports.FieldTypes.dynamic_option, updatedAt = exports.FieldTypes.updatedAt, color = exports.FieldTypes.color, file = exports.FieldTypes.file, image = exports.FieldTypes.image, multi_image = exports.FieldTypes.multi_image, static_option = exports.FieldTypes.static_option, password = exports.FieldTypes.password, large_text = exports.FieldTypes.large_text, number = exports.FieldTypes.number, url = exports.FieldTypes.url, text = exports.FieldTypes.text, email = exports.FieldTypes.email, custom_uuid = exports.FieldTypes.custom_uuid, date = exports.FieldTypes.date, tel = exports.FieldTypes.tel, boolean = exports.FieldTypes.boolean, unix_timestamp = exports.FieldTypes.unix_timestamp, object = exports.FieldTypes.object, video_link = exports.FieldTypes.video_link;
204
+ exports.defaultFields = [
205
+ "id",
206
+ "uuid",
207
+ "UUID",
208
+ "created_at",
209
+ "createdat",
210
+ "createdAt",
211
+ "created",
212
+ "created time",
213
+ "updated_at",
214
+ "updatedat",
215
+ "updatedAt",
216
+ "updated",
217
+ "last edited time",
218
+ "created by",
219
+ "isdeleted",
220
+ "is_deleted",
221
+ "is_delete",
222
+ "isdelete",
223
+ "delete",
224
+ ];
225
+ exports.crudKeys = ["create", "update", "detail", "list", "delete"];
226
+ var fieldType = function (itemName, type) {
227
+ if (itemName === "custom_uuid") {
228
+ return "uuid";
229
+ }
230
+ switch (type) {
231
+ case "integer":
232
+ case "autoNumber":
233
+ case "phoneNumber":
234
+ case "phone_number":
235
+ type = "number";
236
+ break;
237
+ case "string":
238
+ case "singleLineText":
239
+ case "rich_text":
240
+ case "title":
241
+ case "multilineText":
242
+ case "url":
243
+ case "multipleAttachments":
244
+ type = "text";
245
+ break;
246
+ case "checkbox":
247
+ type = "boolean";
248
+ break;
249
+ case "multipleSelects":
250
+ case "multi_select":
251
+ case "status":
252
+ case "select":
253
+ case "singleSelect":
254
+ type = "static_option";
255
+ break;
256
+ case "date":
257
+ type = "date";
258
+ break;
259
+ default:
260
+ break;
261
+ }
262
+ return type;
263
+ };
264
+ exports.fieldType = fieldType;
265
+ var filterFieldsForForm = function (fields) {
266
+ return fields.filter(function (field) {
267
+ return (field.type !== createdBy.id &&
268
+ field.type !== uuid.id &&
269
+ field.type !== updatedAt.id &&
270
+ field.type !== createdAt.id &&
271
+ field.type !== isDeleted.id);
272
+ });
273
+ };
274
+ exports.filterFieldsForForm = filterFieldsForForm;
275
+ /** TWO */
276
+ exports.OptionTypeFields = [static_option.id, dynamic_option.id];
277
+ exports.onlyReferenceField = [reference.id, multi_reference.id];
278
+ exports.childDataField = [reference.id, dynamic_option.id];
279
+ exports.ImageFields = [image.id, multi_image.id];
280
+ exports.URLFields = [image.id, file.id];
281
+ exports.FileUrlFields = [file.id, url.id];
282
+ exports.systemDateField = [updatedAt.id, createdAt.id];
283
+ exports.emailField = [text.id, email.id];
284
+ exports.passwordField = [text.id, password.id];
285
+ exports.uuidField = [text.id, uuid.id];
286
+ exports.exportHideField = [password.id, file.id];
287
+ exports.numberTextField = [number.id, tel.id];
288
+ exports.linkField = [tel.id, url.id];
289
+ /** THREE */
290
+ exports.systemHideField = [createdBy.id, uuid.id, isDeleted.id];
291
+ exports.mixedField = [
292
+ color.id,
293
+ uuid.id,
294
+ custom_uuid.id,
295
+ large_text.id,
296
+ number.id,
297
+ video_link.id,
298
+ boolean.id,
299
+ ];
300
+ /** Usage of emailField */
301
+ var stringField = __spreadArrays(exports.emailField, [color.id, uuid.id, custom_uuid.id]);
302
+ exports.pureTextField = __spreadArrays(exports.emailField, exports.numberTextField, exports.linkField, [
303
+ color.id,
304
+ ]);
305
+ exports.simpleTextFeild = __spreadArrays(exports.emailField, [
306
+ boolean.id,
307
+ url.id,
308
+ large_text.id,
309
+ number.id,
310
+ ]);
311
+ exports.textEmailPasswordField = __spreadArrays(exports.emailField, [password.id]);
312
+ exports.NoRefFields = __spreadArrays(exports.emailField, exports.numberTextField, [
313
+ color.id,
314
+ boolean.id,
315
+ ]);
316
+ exports.textField1 = __spreadArrays(exports.emailField, exports.numberTextField, [
317
+ boolean.id,
318
+ url.id,
319
+ ]);
320
+ /** Usage of uuidField */
321
+ exports.pageCollectionFields = __spreadArrays(exports.uuidField, [
322
+ large_text.id,
323
+ createdAt.id,
324
+ number.id,
325
+ boolean.id,
326
+ ]);
327
+ exports.referenceTextField = __spreadArrays(exports.uuidField, exports.childDataField, [number.id]);
328
+ /** Usage of textEmailPasswordField */
329
+ exports.StringFields = __spreadArrays(exports.textEmailPasswordField, exports.linkField);
330
+ /** Usage of ImageFields */
331
+ exports.ImageUrlFields = __spreadArrays(exports.ImageFields, [file.id]);
332
+ /** Usage of onlyReferenceField */
333
+ exports.BelongsToReferenceField = __spreadArrays(exports.onlyReferenceField, [belongsTo.id]);
334
+ exports.referenceAndDynamicField = __spreadArrays(exports.onlyReferenceField, [dynamic_option.id]);
335
+ exports.ReferenceCreatedByFields = __spreadArrays(exports.onlyReferenceField, [createdBy.id]);
336
+ exports.placeholderField = __spreadArrays(exports.onlyReferenceField, exports.systemDateField, [
337
+ createdBy.id,
338
+ isDeleted.id,
339
+ password.id,
340
+ ]);
341
+ /** Usage of systemDateField and systemHideField */
342
+ exports.systemAndRefField = __spreadArrays(exports.systemHideField, exports.referenceAndDynamicField);
343
+ exports.DefaultPrivateField = __spreadArrays(exports.systemHideField, [password.id]);
344
+ exports.hiddenFormField = __spreadArrays(exports.systemHideField, exports.systemDateField);
345
+ exports.notFieldForExport = __spreadArrays(exports.systemDateField, exports.exportHideField, [
346
+ isDeleted.id,
347
+ object.id,
348
+ createdBy.id,
349
+ ]);
350
+ exports.notFieldForImport = __spreadArrays(exports.systemDateField, exports.systemHideField, exports.ImageFields, [
351
+ password.id,
352
+ ]);
353
+ /** Usage of BelongsToReferenceField */
354
+ exports.BelongsCreatedByRefField = __spreadArrays(exports.BelongsToReferenceField, [
355
+ createdBy.id,
356
+ ]);
357
+ exports.level3ReferenceField2 = __spreadArrays(exports.BelongsToReferenceField, exports.hiddenFormField, exports.exportHideField);
358
+ exports.level3ReferenceField = __spreadArrays(exports.BelongsCreatedByRefField, exports.systemDateField, exports.exportHideField, [
359
+ isDeleted.id,
360
+ ]);
361
+ /** Usage of OptionTypeFields */
362
+ exports.SelectOptionFields = __spreadArrays(exports.OptionTypeFields, [reference.id]);
363
+ exports.MultiSelectOptionFields = __spreadArrays(exports.OptionTypeFields, [belongsTo.id]);
364
+ exports.NonBelongsSelectOptionFields = __spreadArrays(exports.OptionTypeFields, exports.onlyReferenceField);
365
+ exports.nonReferenceField = __spreadArrays(stringField, exports.linkField, [
366
+ large_text.id,
367
+ number.id,
368
+ password.id,
369
+ video_link.id,
370
+ boolean.id,
371
+ ]);
372
+ exports.AllSelectOptionFields = __spreadArrays(exports.onlyReferenceField, exports.MultiSelectOptionFields);
373
+ var textField = __spreadArrays(exports.linkField, stringField, [
374
+ number.id,
375
+ date.id,
376
+ boolean.id,
377
+ unix_timestamp.id,
378
+ password.id,
379
+ ]);
380
+ exports.collectionDefaultFieldSortOrder = [
381
+ { order: 1, field: uuid.id },
382
+ { order: 2, field: createdAt.id },
383
+ { order: 3, field: createdBy.id },
384
+ { order: 4, field: updatedAt.id },
385
+ ];
386
+ var filterFieldForCommandObj = function () {
387
+ return Object.keys(exports.FieldTypes).filter(function (field) {
388
+ // return (
389
+ // field != createdBy.id &&
390
+ // field != uuid.id &&
391
+ // field != createdAt.id &&
392
+ // field != isDeleted.id &&
393
+ // field != reference.id &&
394
+ // field != multi_reference.id &&
395
+ // field != belongsTo.id &&
396
+ // field != dynamic_option.id &&
397
+ // field != updatedAt.id &&
398
+ // field != color.id &&
399
+ // field != file.id &&
400
+ // field != image.id &&
401
+ // field != static_option.id &&
402
+ // field != multi_image.id
403
+ // );
404
+ return !__spreadArrays(exports.systemDateField, exports.systemAndRefField, exports.ImageUrlFields, [
405
+ belongsTo.id,
406
+ static_option.id,
407
+ color.id,
408
+ ]).includes(field);
409
+ });
410
+ };
411
+ exports.filterFieldForCommandObj = filterFieldForCommandObj;
412
+ var fieldToShow = function (type) {
413
+ return !exports.systemAndRefField.includes(type);
414
+ };
415
+ exports.fieldToShow = fieldToShow;
416
+ var filterFieldsForDataTable = function (fields) {
417
+ return fields.filter(function (field) {
418
+ return (field.type !== "utility" &&
419
+ field.type !== createdBy.id &&
420
+ field.type !== uuid.id &&
421
+ field.type !== updatedAt.id &&
422
+ field.type !== createdAt.id &&
423
+ field.type !== reference.id &&
424
+ field.type !== multi_reference.id &&
425
+ field.type !== isDeleted.id &&
426
+ field.type !== belongsTo.id &&
427
+ field.id !== "");
428
+ });
429
+ };
430
+ exports.filterFieldsForDataTable = filterFieldsForDataTable;
431
+ var filterFieldsForItemList = function (fields) {
432
+ return fields.filter(function (field) {
433
+ return (field.type !== createdBy.id &&
434
+ field.type !== uuid.id &&
435
+ field.type !== isDeleted.id &&
436
+ field.type !== password.id);
437
+ });
438
+ };
439
+ exports.filterFieldsForItemList = filterFieldsForItemList;
440
+ var filterSystemCreatedFieldsForItemList = function (fields) {
441
+ return fields.filter(function (field) { return field.type === createdAt.id; });
442
+ };
443
+ exports.filterSystemCreatedFieldsForItemList = filterSystemCreatedFieldsForItemList;
444
+ var filterFieldForItemTemplate = function (fieldName) {
445
+ return (fieldName !== createdBy.id &&
446
+ fieldName !== createdAt.id &&
447
+ fieldName !== updatedAt.id &&
448
+ fieldName !== uuid.id &&
449
+ fieldName !== image.id &&
450
+ fieldName !== multi_image.id &&
451
+ fieldName !== reference.id &&
452
+ fieldName !== multi_reference.id &&
453
+ fieldName !== isDeleted.id);
454
+ };
455
+ exports.filterFieldForItemTemplate = filterFieldForItemTemplate;
456
+ var filterFieldsForItemTemplate = function (fields) {
457
+ return fields.filter(function (field) {
458
+ return (field.type !== createdBy.id &&
459
+ field.type !== createdAt.id &&
460
+ field.type !== updatedAt.id &&
461
+ field.type !== uuid.id &&
462
+ field.type !== isDeleted.id &&
463
+ field.type !== image.id &&
464
+ field.type !== multi_image.id &&
465
+ field.type !== reference.id &&
466
+ field.type !== multi_reference.id &&
467
+ field.type !== password.id);
468
+ });
469
+ };
470
+ exports.filterFieldsForItemTemplate = filterFieldsForItemTemplate;
471
+ var filterFieldsForPlaceholderModal = function (fields) {
472
+ return fields.filter(function (field) {
473
+ return !exports.placeholderField.includes(field.type);
474
+ });
475
+ };
476
+ exports.filterFieldsForPlaceholderModal = filterFieldsForPlaceholderModal;
477
+ var filterIndexFields = function (fields) {
478
+ if (!fields || fields.length === 0) {
479
+ return [];
480
+ }
481
+ return fields.filter(function (field) { return textField.includes(field.type); });
482
+ };
483
+ exports.filterIndexFields = filterIndexFields;
@@ -0,0 +1,12 @@
1
+ export declare const pageNotFound: () => string;
2
+ export declare const getTimezoneOffset: (time?: string) => number;
3
+ export declare const replaceNbsps: (str: string) => string;
4
+ export declare const defaultMetaTags: string[];
5
+ export declare const getAssetLink: (path: string) => string;
6
+ export declare const getScriptTag: (paths: Array<string>, isDefer?: boolean) => string[];
7
+ export declare const getCssTag: (paths: Array<string>, loadAsync?: boolean) => string[];
8
+ export declare const defaultHeaderJS: string[];
9
+ export declare const defaultHeaderCSS: string[];
10
+ export declare const defaultFonts: string[];
11
+ export declare const brandMessage: (brand_msg: string) => string;
12
+ export declare const primaryBodyJS: string[];
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ var __spreadArrays = (this && this.__spreadArrays) || function () {
3
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
5
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6
+ r[k] = a[j];
7
+ return r;
8
+ };
9
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.primaryBodyJS = exports.brandMessage = exports.defaultFonts = exports.defaultHeaderCSS = exports.defaultHeaderJS = exports.getCssTag = exports.getScriptTag = exports.getAssetLink = exports.defaultMetaTags = exports.replaceNbsps = exports.getTimezoneOffset = exports.pageNotFound = void 0;
14
+ var moment_1 = __importDefault(require("moment"));
15
+ var pageNotFound = function () { return "\n<div data-js=\"drapcode-sections\" id=\"ioob\" class=\"dc-sections\"> \n<div id=\"i45i\" class=\"container\">\n<div id=\"ip9d\" class=\"row\">\n <div id=\"i5t6\" class=\"col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12\"> \n <div id=\"ipmr\" class=\"container\">\n <div id=\"iwzs\" class=\"row\">\n <div id=\"i8j4\" class=\"col\">\n <h1 id=\"il68\" class=\"display-1\">204</h1>\n </div>\n </div>\n <div id=\"ic9ma\" class=\"row\">\n <div id=\"iz54g\" class=\"col\">\n <h3 id=\"igrlf\">No Content<br/></h3>\n <p id=\"iwq91\">There's no page content available<br/></p>\n </div>\n </div>\n </div>\n </div>\n</div>\n</div>\n</div>"; };
16
+ exports.pageNotFound = pageNotFound;
17
+ var getTimezoneOffset = function (time) {
18
+ if (time === void 0) { time = "(GMT+5:30)"; }
19
+ if (!time) {
20
+ time = "(GMT+5:30)";
21
+ }
22
+ var str = time.substring(4, 10);
23
+ return moment_1.default().utcOffset(str).utcOffset();
24
+ };
25
+ exports.getTimezoneOffset = getTimezoneOffset;
26
+ var replaceNbsps = function (str) {
27
+ var re = new RegExp(String.fromCharCode(160), "g");
28
+ return str.replace(re, " ");
29
+ };
30
+ exports.replaceNbsps = replaceNbsps;
31
+ exports.defaultMetaTags = [
32
+ '<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">',
33
+ ];
34
+ var getAssetLink = function (path) {
35
+ return "https://asset.drapcode.com/" + path;
36
+ };
37
+ exports.getAssetLink = getAssetLink;
38
+ var getScriptTag = function (paths, isDefer) {
39
+ if (isDefer === void 0) { isDefer = false; }
40
+ return paths.map(function (path) {
41
+ return "<script type=\"text/javascript\" src=\"" + exports.getAssetLink("js/" + path) + "\" " + (isDefer ? 'defer' : '') + "></script>";
42
+ });
43
+ };
44
+ exports.getScriptTag = getScriptTag;
45
+ var getCssTag = function (paths, loadAsync) {
46
+ if (loadAsync === void 0) { loadAsync = false; }
47
+ if (loadAsync) {
48
+ return paths.map(function (path) {
49
+ return "<link rel=\"preload\" href=\"" + exports.getAssetLink("css/" + path) + "\" as=\"style\" onload=\"this.onload=null;this.rel='stylesheet'\">\n <noscript><link rel=\"stylesheet\" href=\"" + exports.getAssetLink("css/" + path) + "\"></noscript>";
50
+ });
51
+ }
52
+ else {
53
+ return paths.map(function (path) {
54
+ return "<link rel='stylesheet' type='text/css' href=\"" + exports.getAssetLink("css/" + path) + "\">";
55
+ });
56
+ }
57
+ };
58
+ exports.getCssTag = getCssTag;
59
+ exports.defaultHeaderJS = __spreadArrays(exports.getScriptTag(["popper.min.js", "bootstrap.min.js", "feather.min.js"], true), [
60
+ '<script type="text/javascript" src="https://polyfill.io/v3/polyfill.min.js?features=default" defer></script>',
61
+ ]);
62
+ exports.defaultHeaderCSS = __spreadArrays(exports.getCssTag([
63
+ "bootstrap.min.css",
64
+ "toastr.min.css",
65
+ "sweetalert2.min.css",
66
+ "select2.min.css",
67
+ "summernote-bs4.css",
68
+ "flatpickr.min.css",
69
+ "loader.css",
70
+ "all.min.css",
71
+ 'dc-custom.min.css',
72
+ ], true), [
73
+ "<link rel='stylesheet' type='text/css' href='" + exports.getAssetLink("intl-tel-input/intlTelInput.min.css") + "'>",
74
+ "<link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css'>",
75
+ "<link rel='stylesheet' type='text/css' href='https://unpkg.com/dropzone@5/dist/min/dropzone.min.css'>",
76
+ "<link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css'>",
77
+ ]);
78
+ exports.defaultFonts = __spreadArrays([
79
+ '<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>'
80
+ ], exports.getCssTag(["googlefonts.css"], true));
81
+ var brandMessage = function (brand_msg) {
82
+ return "<div style=\"background-color:white;padding:5px; position: fixed;right: 15px;bottom: 15px;font-size: 15px;font-weight: 600;border-radius: 5px;border: 1px solid #223049;z-index:9999;\">\n <a target=\"_blank\" href=\"https://drapcode.com\" style=\"text-decoration: none;color: #223049;display: flex;align-items: center\">\n <img src=\"https://drapcode.com/favicon.png\" alt=\"DrapCode\" style=\"object-fit: contain;width: 20px\"/> &nbsp;\n " + brand_msg + "\n </a>\n </div>";
83
+ };
84
+ exports.brandMessage = brandMessage;
85
+ exports.primaryBodyJS = __spreadArrays([
86
+ '<script type="text/javascript" src="/resources/constant.js"></script>',
87
+ '<script type="text/javascript" src="/resources/drapcode.min.js"></script>'
88
+ ], exports.getScriptTag([
89
+ "jquery.validate.min.js",
90
+ "math.min.js",
91
+ "moment.js",
92
+ "numeral.min.js",
93
+ "voca.min.js",
94
+ "additional-methods.min.js",
95
+ "select2.min.js",
96
+ "bootbox.min.js",
97
+ "papaparse.min.js",
98
+ "summernote-bs4.min.js",
99
+ "flatpickr.min.js",
100
+ "toastr.min.js",
101
+ "axios.js",
102
+ "sweetalert2.all.min.js",
103
+ ]), [
104
+ "<script type=\"text/javascript\" src=\"" + exports.getAssetLink("intl-tel-input/intlTelInput-jquery.min.js") + "\"></script>",
105
+ '<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/apexcharts"></script>',
106
+ '<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>',
107
+ '<script type="text/javascript" src="https://unpkg.com/dropzone@5/dist/min/dropzone.min.js"></script>',
108
+ '<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script>',
109
+ '<script type="text/javascript" src="/resources/action/emailActions.js"></script>',
110
+ '<script type="text/javascript" src="/resources/action/fileUploadActions.js"></script>',
111
+ '<script type="text/javascript" src="/resources/action/modalActions.js"></script>',
112
+ '<script type="text/javascript" src="/resources/action/dataSourceActions.js"></script>',
113
+ '<script type="text/javascript" src="/resources/webconnect.js"></script>',
114
+ '<script type="text/javascript" src="/resources/dataLoader.min.js"></script>',
115
+ '<script type="text/javascript" src="/resources/drapcode.body.min.js"></script>',
116
+ '<script type="text/javascript" src="/resources/drapcode.modal.min.js"></script>',
117
+ ]);
@@ -0,0 +1,2 @@
1
+ export declare const sourceOfCollection: string[];
2
+ export declare const ConstantType: string[];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConstantType = exports.sourceOfCollection = void 0;
4
+ var plugins_1 = require("./plugins");
5
+ var DEFAULT = "DEFAULT";
6
+ exports.sourceOfCollection = [
7
+ DEFAULT,
8
+ plugins_1.pluginCode.XANO,
9
+ plugins_1.pluginCode.SUPABASE,
10
+ plugins_1.pluginCode.AIRTABLE,
11
+ plugins_1.pluginCode.FIREBASE,
12
+ plugins_1.pluginCode.FIRESTORE,
13
+ plugins_1.pluginCode.NOTION,
14
+ plugins_1.pluginCode.APPWRITE,
15
+ ];
16
+ exports.ConstantType = [
17
+ "DATE",
18
+ "BOOLEAN",
19
+ "STRING",
20
+ "NUMBER",
21
+ "LIST",
22
+ "EMAIL",
23
+ ];
File without changes
@@ -0,0 +1 @@
1
+ "use strict";