ywana-core8 0.0.448 → 0.0.451
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 +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +6 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +6 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentType.js +2 -1
- package/src/domain/ContentViewer.js +5 -2
package/dist/index.cjs
CHANGED
@@ -1354,7 +1354,8 @@ var ContentType = /*#__PURE__*/function () {
|
|
1354
1354
|
break;
|
1355
1355
|
|
1356
1356
|
case TYPES.ENTITY:
|
1357
|
-
if (optional === true
|
1357
|
+
if (optional === true) console.log('OPTIONAL', field, !entryData);
|
1358
|
+
if (optional === true && !entryData) break;
|
1358
1359
|
var child1 = new ContentType(item);
|
1359
1360
|
next[name] = child1.value(entryData);
|
1360
1361
|
break;
|
@@ -5248,8 +5249,11 @@ var FieldViewer = function FieldViewer(props) {
|
|
5248
5249
|
item = field.item,
|
5249
5250
|
label = field.label,
|
5250
5251
|
_field$visible = field.visible,
|
5251
|
-
visible = _field$visible === void 0 ? true : _field$visible
|
5252
|
+
visible = _field$visible === void 0 ? true : _field$visible,
|
5253
|
+
optional = field.optional;
|
5252
5254
|
if (!visible) return null;
|
5255
|
+
console.log("FieldViewer Optional", field, optional && value === null);
|
5256
|
+
if (optional && value === null) return null;
|
5253
5257
|
|
5254
5258
|
switch (type) {
|
5255
5259
|
case TYPES.STRING:
|