@builttocreate/engine-utils 2.6.0-beta.1 → 2.6.0-beta.11
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.
|
@@ -7,6 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
// Display Fields
|
|
8
8
|
var uniqueId = 'uniqueId';
|
|
9
9
|
var image = 'image';
|
|
10
|
+
var file = 'file';
|
|
10
11
|
var richText = 'richText';
|
|
11
12
|
var block = 'block'; // Data Fields
|
|
12
13
|
|
|
@@ -26,6 +27,7 @@ var chart = 'chart';
|
|
|
26
27
|
var types = {
|
|
27
28
|
uniqueId: uniqueId,
|
|
28
29
|
image: image,
|
|
30
|
+
file: file,
|
|
29
31
|
block: block,
|
|
30
32
|
richText: richText,
|
|
31
33
|
text: text,
|
|
@@ -46,6 +48,7 @@ types.all = Object.keys(types);
|
|
|
46
48
|
types.titles = {
|
|
47
49
|
uniqueId: 'Auto Number',
|
|
48
50
|
image: 'Image',
|
|
51
|
+
file: 'File',
|
|
49
52
|
block: 'Display Text',
|
|
50
53
|
richText: 'Rich Text',
|
|
51
54
|
text: 'Short Text',
|
package/dist/fieldHelper.js
CHANGED
|
@@ -292,6 +292,7 @@ var getTemplateWithLookups = function getTemplateWithLookups(template) {
|
|
|
292
292
|
exports.getTemplateWithLookups = getTemplateWithLookups;
|
|
293
293
|
|
|
294
294
|
var isFieldEmpty = function isFieldEmpty(fieldType, fieldValue, fieldOptions) {
|
|
295
|
+
console.log(' field helper logs fieldType, fieldValue', fieldType, fieldValue);
|
|
295
296
|
var isEmpty = false;
|
|
296
297
|
|
|
297
298
|
if (fieldType === _FieldTypes["default"].text && (!fieldValue || fieldValue && fieldValue.replace(/\s+/g, '').length === 0)) {
|
|
@@ -310,6 +311,8 @@ var isFieldEmpty = function isFieldEmpty(fieldType, fieldValue, fieldOptions) {
|
|
|
310
311
|
isEmpty = true;
|
|
311
312
|
} else if (fieldType === _FieldTypes["default"].image && (!fieldValue || fieldValue && fieldValue.length === 0)) {
|
|
312
313
|
isEmpty = true;
|
|
314
|
+
} else if (fieldType === _FieldTypes["default"].file && (!fieldValue || fieldValue && fieldValue.length === 0)) {
|
|
315
|
+
isEmpty = true;
|
|
313
316
|
} else if (fieldType === _FieldTypes["default"].chart && (!fieldValue || fieldValue && fieldValue.length === 0)) {
|
|
314
317
|
isEmpty = true;
|
|
315
318
|
} else if (fieldType === _FieldTypes["default"].table && (!fieldValue || fieldValue && fieldValue.filter(function (item) {
|