ywana-core8 0.0.936 → 0.0.937
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 +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +15 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +15 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/incubator/planner.css +4 -0
- package/src/incubator/planner.js +8 -4
package/dist/index.umd.js
CHANGED
@@ -5736,7 +5736,8 @@
|
|
5736
5736
|
cellWidth = _ref$cellWidth === void 0 ? 10 : _ref$cellWidth,
|
5737
5737
|
_ref$rowHeaderWidth = _ref.rowHeaderWidth,
|
5738
5738
|
rowHeaderWidth = _ref$rowHeaderWidth === void 0 ? 10 : _ref$rowHeaderWidth,
|
5739
|
-
EventRenderer = _ref.EventRenderer
|
5739
|
+
EventRenderer = _ref.EventRenderer,
|
5740
|
+
onSelectCell = _ref.onSelectCell;
|
5740
5741
|
var _useState = React.useState([]),
|
5741
5742
|
days = _useState[0],
|
5742
5743
|
setDays = _useState[1];
|
@@ -5760,6 +5761,9 @@
|
|
5760
5761
|
}
|
5761
5762
|
setDays(nextDays);
|
5762
5763
|
}, [from, to]);
|
5764
|
+
function selectCell(cell) {
|
5765
|
+
if (onSelectCell) onSelectCell(cell);
|
5766
|
+
}
|
5763
5767
|
var uniqueMonths = Array.from(new Set(days.map(function (_ref2) {
|
5764
5768
|
var month = _ref2.month;
|
5765
5769
|
return month;
|
@@ -5788,7 +5792,7 @@
|
|
5788
5792
|
}), uniqueMonths.map(function (month, index) {
|
5789
5793
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
5790
5794
|
className: "month-cell",
|
5791
|
-
key: month,
|
5795
|
+
key: month + "-" + index,
|
5792
5796
|
style: {
|
5793
5797
|
fontWeight: 'bold',
|
5794
5798
|
minWidth: monthWidths[index]
|
@@ -5855,10 +5859,16 @@
|
|
5855
5859
|
minWidth: dayWidth,
|
5856
5860
|
maxWidth: dayWidth
|
5857
5861
|
},
|
5858
|
-
key: "content" + index + "_" + month + "-" + day
|
5859
|
-
|
5862
|
+
key: "content" + index + "_" + year + "-" + month + "-" + day,
|
5863
|
+
onClick: function onClick() {
|
5864
|
+
return selectCell({
|
5865
|
+
row: lane.id,
|
5866
|
+
date: dayDate
|
5867
|
+
});
|
5868
|
+
}
|
5869
|
+
}, dayEvents.map(function (event, index) {
|
5860
5870
|
return /*#__PURE__*/React__default["default"].createElement(EventRenderer, {
|
5861
|
-
key: event.id,
|
5871
|
+
key: event.id + "-" + index,
|
5862
5872
|
event: event
|
5863
5873
|
});
|
5864
5874
|
}));
|