ywana-core8 0.0.554 → 0.0.555
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 +16 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +16 -7
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +16 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentViewer.js +1 -1
- package/src/html/property.js +10 -4
package/dist/index.modern.js
CHANGED
@@ -747,7 +747,8 @@ var Property = function Property(props) {
|
|
747
747
|
value = props.value,
|
748
748
|
_props$editable = props.editable,
|
749
749
|
editable = _props$editable === void 0 ? false : _props$editable,
|
750
|
-
onChange = props.onChange
|
750
|
+
onChange = props.onChange,
|
751
|
+
options = props.options;
|
751
752
|
|
752
753
|
function change(event) {
|
753
754
|
if (onChange) {
|
@@ -760,19 +761,26 @@ var Property = function Property(props) {
|
|
760
761
|
if (onChange) onChange(id, "");
|
761
762
|
}
|
762
763
|
|
764
|
+
var value2 = value || initial;
|
765
|
+
|
766
|
+
if (options) {
|
767
|
+
var opt = options.find(function (option) {
|
768
|
+
return option.value == value2;
|
769
|
+
});
|
770
|
+
if (opt) value2 = opt.label;
|
771
|
+
}
|
772
|
+
|
763
773
|
return /*#__PURE__*/React.createElement("div", {
|
764
774
|
className: "property property-" + id + " " + className
|
765
775
|
}, /*#__PURE__*/React.createElement("div", {
|
766
776
|
className: "property-name"
|
767
|
-
}, name || label),
|
768
|
-
className: "property-value"
|
769
|
-
}, initial) : null, /*#__PURE__*/React.createElement("div", {
|
777
|
+
}, name || label), /*#__PURE__*/React.createElement("div", {
|
770
778
|
className: "property-value"
|
771
779
|
}, editable ? /*#__PURE__*/React.createElement("input", {
|
772
780
|
type: "text",
|
773
|
-
value:
|
781
|
+
value: value2,
|
774
782
|
onChange: change
|
775
|
-
}) :
|
783
|
+
}) : value2, editable && value2.length > 0 ? /*#__PURE__*/React.createElement(Icon, {
|
776
784
|
icon: "close",
|
777
785
|
size: "small",
|
778
786
|
clickable: true,
|
@@ -5991,7 +5999,8 @@ var FieldViewer = function FieldViewer(props) {
|
|
5991
5999
|
case TYPES.STRING:
|
5992
6000
|
return /*#__PURE__*/React.createElement(Property, {
|
5993
6001
|
label: label,
|
5994
|
-
value: value
|
6002
|
+
value: value,
|
6003
|
+
options: field.options
|
5995
6004
|
});
|
5996
6005
|
|
5997
6006
|
case TYPES.ENTITY:
|