ywana-core8 0.0.552 → 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 +22 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +22 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +22 -9
- 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/src/site/view.js +6 -2
- package/src/widgets/calendar/Calendar.js +1 -1
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,
|
@@ -2621,7 +2629,7 @@
|
|
2621
2629
|
setPosition(today);
|
2622
2630
|
}, []);
|
2623
2631
|
React.useEffect(function () {
|
2624
|
-
if (onChange) {
|
2632
|
+
if (position && onChange) {
|
2625
2633
|
var _firstDayOfMonth = position.clone().startOf('month');
|
2626
2634
|
|
2627
2635
|
var _firstDayOfRange = _firstDayOfMonth.clone().startOf('isoweek');
|
@@ -3788,7 +3796,8 @@
|
|
3788
3796
|
};
|
3789
3797
|
var TabbedView = function TabbedView(props) {
|
3790
3798
|
var title = props.title,
|
3791
|
-
className = props.className
|
3799
|
+
className = props.className,
|
3800
|
+
selected = props.selected;
|
3792
3801
|
|
3793
3802
|
var _useState2 = React.useState(0),
|
3794
3803
|
tab = _useState2[0],
|
@@ -3801,6 +3810,9 @@
|
|
3801
3810
|
label: child.props.label
|
3802
3811
|
});
|
3803
3812
|
});
|
3813
|
+
React.useEffect(function () {
|
3814
|
+
if (selected && selected !== tab) setTab(selected);
|
3815
|
+
}, [selected]);
|
3804
3816
|
var toolbar = /*#__PURE__*/React__default["default"].createElement(Tabs, {
|
3805
3817
|
selected: tab,
|
3806
3818
|
onChange: function onChange(tab) {
|
@@ -5989,7 +6001,8 @@
|
|
5989
6001
|
case TYPES.STRING:
|
5990
6002
|
return /*#__PURE__*/React__default["default"].createElement(Property, {
|
5991
6003
|
label: label,
|
5992
|
-
value: value
|
6004
|
+
value: value,
|
6005
|
+
options: field.options
|
5993
6006
|
});
|
5994
6007
|
|
5995
6008
|
case TYPES.ENTITY:
|