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.umd.js
CHANGED
@@ -749,7 +749,8 @@
|
|
749
749
|
value = props.value,
|
750
750
|
_props$editable = props.editable,
|
751
751
|
editable = _props$editable === void 0 ? false : _props$editable,
|
752
|
-
onChange = props.onChange
|
752
|
+
onChange = props.onChange,
|
753
|
+
options = props.options;
|
753
754
|
|
754
755
|
function change(event) {
|
755
756
|
if (onChange) {
|
@@ -762,19 +763,26 @@
|
|
762
763
|
if (onChange) onChange(id, "");
|
763
764
|
}
|
764
765
|
|
766
|
+
var value2 = value || initial;
|
767
|
+
|
768
|
+
if (options) {
|
769
|
+
var opt = options.find(function (option) {
|
770
|
+
return option.value == value2;
|
771
|
+
});
|
772
|
+
if (opt) value2 = opt.label;
|
773
|
+
}
|
774
|
+
|
765
775
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
766
776
|
className: "property property-" + id + " " + className
|
767
777
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
768
778
|
className: "property-name"
|
769
|
-
}, name || label),
|
770
|
-
className: "property-value"
|
771
|
-
}, initial) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
779
|
+
}, name || label), /*#__PURE__*/React__default["default"].createElement("div", {
|
772
780
|
className: "property-value"
|
773
781
|
}, editable ? /*#__PURE__*/React__default["default"].createElement("input", {
|
774
782
|
type: "text",
|
775
|
-
value:
|
783
|
+
value: value2,
|
776
784
|
onChange: change
|
777
|
-
}) :
|
785
|
+
}) : value2, editable && value2.length > 0 ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
778
786
|
icon: "close",
|
779
787
|
size: "small",
|
780
788
|
clickable: true,
|
@@ -5993,7 +6001,8 @@
|
|
5993
6001
|
case TYPES.STRING:
|
5994
6002
|
return /*#__PURE__*/React__default["default"].createElement(Property, {
|
5995
6003
|
label: label,
|
5996
|
-
value: value
|
6004
|
+
value: value,
|
6005
|
+
options: field.options
|
5997
6006
|
});
|
5998
6007
|
|
5999
6008
|
case TYPES.ENTITY:
|