ywana-core8 0.0.447 → 0.0.448
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 +4 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +4 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +4 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentType.js +4 -1
- package/src/domain/ContentViewer.js +2 -3
package/dist/index.modern.js
CHANGED
@@ -1328,7 +1328,8 @@ var ContentType = /*#__PURE__*/function () {
|
|
1328
1328
|
var name = _ref5[0],
|
1329
1329
|
field = _ref5[1];
|
1330
1330
|
var type = field.type,
|
1331
|
-
item = field.item
|
1331
|
+
item = field.item,
|
1332
|
+
optional = field.optional;
|
1332
1333
|
var entryData = data ? data[name] : null;
|
1333
1334
|
|
1334
1335
|
switch (type) {
|
@@ -1345,6 +1346,7 @@ var ContentType = /*#__PURE__*/function () {
|
|
1345
1346
|
break;
|
1346
1347
|
|
1347
1348
|
case TYPES.ENTITY:
|
1349
|
+
if (optional === true && entryData === null) break;
|
1348
1350
|
var child1 = new ContentType(item);
|
1349
1351
|
next[name] = child1.value(entryData);
|
1350
1352
|
break;
|
@@ -5238,11 +5240,8 @@ var FieldViewer = function FieldViewer(props) {
|
|
5238
5240
|
item = field.item,
|
5239
5241
|
label = field.label,
|
5240
5242
|
_field$visible = field.visible,
|
5241
|
-
visible = _field$visible === void 0 ? true : _field$visible
|
5242
|
-
optional = field.optional;
|
5243
|
+
visible = _field$visible === void 0 ? true : _field$visible;
|
5243
5244
|
if (!visible) return null;
|
5244
|
-
if (optional && !value) return null;
|
5245
|
-
console.log('contentviewer>fieldViewer', field, optional, value, optional && !value);
|
5246
5245
|
|
5247
5246
|
switch (type) {
|
5248
5247
|
case TYPES.STRING:
|