ywana-core8 0.0.446 → 0.0.449
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/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentType.js +5 -1
- package/src/domain/ContentViewer.js +2 -3
package/dist/index.umd.js
CHANGED
@@ -1331,7 +1331,8 @@
|
|
1331
1331
|
var name = _ref5[0],
|
1332
1332
|
field = _ref5[1];
|
1333
1333
|
var type = field.type,
|
1334
|
-
item = field.item
|
1334
|
+
item = field.item,
|
1335
|
+
optional = field.optional;
|
1335
1336
|
var entryData = data ? data[name] : null;
|
1336
1337
|
|
1337
1338
|
switch (type) {
|
@@ -1348,6 +1349,8 @@
|
|
1348
1349
|
break;
|
1349
1350
|
|
1350
1351
|
case TYPES.ENTITY:
|
1352
|
+
if (optional === true) console.log('OPTIONAL', field, entryData);
|
1353
|
+
if (optional === true && entryData === null) break;
|
1351
1354
|
var child1 = new ContentType(item);
|
1352
1355
|
next[name] = child1.value(entryData);
|
1353
1356
|
break;
|
@@ -5241,11 +5244,8 @@
|
|
5241
5244
|
item = field.item,
|
5242
5245
|
label = field.label,
|
5243
5246
|
_field$visible = field.visible,
|
5244
|
-
visible = _field$visible === void 0 ? true : _field$visible
|
5245
|
-
optional = field.optional;
|
5247
|
+
visible = _field$visible === void 0 ? true : _field$visible;
|
5246
5248
|
if (!visible) return null;
|
5247
|
-
if (optional && !value) return null;
|
5248
|
-
console.log('contentviewer>fieldViewer', field, optional, !value);
|
5249
5249
|
|
5250
5250
|
switch (type) {
|
5251
5251
|
case TYPES.STRING:
|