drapcode-constant 1.6.5 → 1.6.6

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.
@@ -145,6 +145,18 @@ export declare const FieldTypes: {
145
145
  show: boolean;
146
146
  compositeKey: boolean;
147
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
+ };
148
160
  isDeleted: {
149
161
  id: string;
150
162
  name: string;
@@ -149,6 +149,18 @@ exports.FieldTypes = {
149
149
  show: false,
150
150
  compositeKey: true,
151
151
  },
152
+ updatedBy: {
153
+ id: "updatedBy",
154
+ name: "Updated By",
155
+ show: false,
156
+ compositeKey: true,
157
+ },
158
+ version: {
159
+ id: "version",
160
+ name: "Version",
161
+ show: false,
162
+ compositeKey: true,
163
+ },
152
164
  isDeleted: {
153
165
  id: "isDeleted",
154
166
  name: "Is deleted",
@@ -241,7 +253,7 @@ var belongsTo = exports.FieldTypes.belongsTo, boolean = exports.FieldTypes.boole
241
253
  // slug,
242
254
  // json,
243
255
  // markdown,
244
- time_picker = exports.FieldTypes.time_picker, time_slot = exports.FieldTypes.time_slot;
256
+ time_picker = exports.FieldTypes.time_picker, time_slot = exports.FieldTypes.time_slot, updatedBy = exports.FieldTypes.updatedBy, version = exports.FieldTypes.version;
245
257
  exports.defaultFields = [
246
258
  "id",
247
259
  "uuid",
@@ -262,6 +274,8 @@ exports.defaultFields = [
262
274
  "is_delete",
263
275
  "isdelete",
264
276
  "delete",
277
+ "updatedBy",
278
+ "version",
265
279
  ];
266
280
  exports.crudKeys = ["create", "update", "detail", "list", "delete"];
267
281
  var fieldType = function (itemName, type) {
@@ -306,6 +320,8 @@ exports.fieldType = fieldType;
306
320
  var filterFieldsForForm = function (fields) {
307
321
  return fields.filter(function (field) {
308
322
  return (field.type !== createdBy.id &&
323
+ field.type !== updatedBy.id &&
324
+ field.type !== version.id &&
309
325
  field.type !== uuid.id &&
310
326
  field.type !== updatedAt.id &&
311
327
  field.type !== createdAt.id &&
@@ -330,7 +346,7 @@ exports.linkField = [tel.id, url.id];
330
346
  exports.passwordUrlField = [password.id, url.id]; //N
331
347
  exports.largeTextNumberField = [large_text.id, number.id]; //N
332
348
  exports.booleanUrlField = [boolean.id, url.id]; //N
333
- exports.hiddenField = [createdBy.id, isDeleted.id]; //N
349
+ exports.hiddenField = [createdBy.id, isDeleted.id, updatedBy.id]; //N
334
350
  exports.passwordBooleanField = [boolean.id, password.id]; //N
335
351
  exports.timeSlotPicker = [time_picker.id, time_slot.id]; //N
336
352
  exports.textNumberField = [text.id, number.id]; //N
@@ -429,6 +445,8 @@ var filterFieldsForDataTable = function (fields) {
429
445
  return fields.filter(function (field) {
430
446
  return (field.type !== "utility" &&
431
447
  field.type !== createdBy.id &&
448
+ field.type !== updatedBy.id &&
449
+ field.type !== version.id &&
432
450
  field.type !== uuid.id &&
433
451
  field.type !== updatedAt.id &&
434
452
  field.type !== createdAt.id &&
@@ -443,6 +461,8 @@ exports.filterFieldsForDataTable = filterFieldsForDataTable;
443
461
  var filterFieldsForItemList = function (fields) {
444
462
  return fields.filter(function (field) {
445
463
  return (field.type !== createdBy.id &&
464
+ field.type !== updatedBy.id &&
465
+ field.type !== version.id &&
446
466
  field.type !== uuid.id &&
447
467
  field.type !== isDeleted.id &&
448
468
  field.type !== password.id);
@@ -455,6 +475,8 @@ var filterSystemCreatedFieldsForItemList = function (fields) {
455
475
  exports.filterSystemCreatedFieldsForItemList = filterSystemCreatedFieldsForItemList;
456
476
  var filterFieldForItemTemplate = function (fieldName) {
457
477
  return (fieldName !== createdBy.id &&
478
+ fieldName !== updatedBy.id &&
479
+ fieldName !== version.id &&
458
480
  fieldName !== createdAt.id &&
459
481
  fieldName !== updatedAt.id &&
460
482
  fieldName !== uuid.id &&
@@ -468,6 +490,8 @@ exports.filterFieldForItemTemplate = filterFieldForItemTemplate;
468
490
  var filterFieldsForItemTemplate = function (fields) {
469
491
  return fields.filter(function (field) {
470
492
  return (field.type !== createdBy.id &&
493
+ field.type !== updatedBy.id &&
494
+ field.type !== version.id &&
471
495
  field.type !== createdAt.id &&
472
496
  field.type !== updatedAt.id &&
473
497
  field.type !== uuid.id &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-constant",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "Drapcode Constants",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",