ywana-core8 0.0.595 → 0.0.596
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 +31 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +31 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +31 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentViewer.js +22 -4
package/dist/index.modern.js
CHANGED
@@ -5209,10 +5209,9 @@ var FieldViewer = function FieldViewer(props) {
|
|
5209
5209
|
|
5210
5210
|
switch (type) {
|
5211
5211
|
case TYPES.STRING:
|
5212
|
-
return /*#__PURE__*/React.createElement(
|
5213
|
-
|
5214
|
-
value: value
|
5215
|
-
options: field.options
|
5212
|
+
return /*#__PURE__*/React.createElement(StringViewer, {
|
5213
|
+
field: field,
|
5214
|
+
value: value
|
5216
5215
|
});
|
5217
5216
|
|
5218
5217
|
case TYPES.ENTITY:
|
@@ -5256,6 +5255,34 @@ var EntityViewer = function EntityViewer(props) {
|
|
5256
5255
|
});
|
5257
5256
|
})));
|
5258
5257
|
};
|
5258
|
+
/**
|
5259
|
+
* StringViewer
|
5260
|
+
*/
|
5261
|
+
|
5262
|
+
|
5263
|
+
var StringViewer = function StringViewer(props) {
|
5264
|
+
var field = props.field,
|
5265
|
+
value = props.value;
|
5266
|
+
var format = field.format,
|
5267
|
+
label = field.label,
|
5268
|
+
options = field.options;
|
5269
|
+
|
5270
|
+
switch (format) {
|
5271
|
+
case FORMATS.IMG:
|
5272
|
+
return /*#__PURE__*/React.createElement("div", {
|
5273
|
+
className: "img-field"
|
5274
|
+
}, /*#__PURE__*/React.createElement("img", {
|
5275
|
+
src: value
|
5276
|
+
}));
|
5277
|
+
|
5278
|
+
default:
|
5279
|
+
return /*#__PURE__*/React.createElement(Property, {
|
5280
|
+
label: label,
|
5281
|
+
value: value,
|
5282
|
+
options: options
|
5283
|
+
});
|
5284
|
+
}
|
5285
|
+
};
|
5259
5286
|
/**
|
5260
5287
|
* Array Viewer
|
5261
5288
|
*/
|