ywana-core8 0.0.941 → 0.0.943

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.
@@ -1061,7 +1061,10 @@ var Tabs = function Tabs(props) {
1061
1061
  fillLeft = _props$fillLeft === void 0 ? false : _props$fillLeft,
1062
1062
  _props$fillRight = props.fillRight,
1063
1063
  fillRight = _props$fillRight === void 0 ? true : _props$fillRight;
1064
- var tabs = React.Children.map(children, function (child, index) {
1064
+ var notNullChildren = React.Children.toArray(children).filter(function (child) {
1065
+ return child !== null;
1066
+ });
1067
+ var tabs = notNullChildren.map(function (child, index) {
1065
1068
  function select(id) {
1066
1069
  if (onChange) onChange(id || index);
1067
1070
  }
@@ -1111,7 +1114,10 @@ var Tab = function Tab(props) {
1111
1114
  var Stack = function Stack(props) {
1112
1115
  var _props$selected = props.selected,
1113
1116
  selected = _props$selected === void 0 ? 0 : _props$selected;
1114
- var child = React.Children.toArray(props.children).filter(function (child, index) {
1117
+ var notNullChildren = React.Children.toArray(props.children).filter(function (child) {
1118
+ return child !== null;
1119
+ });
1120
+ var child = notNullChildren.filter(function (child, index) {
1115
1121
  return index === selected;
1116
1122
  })[0];
1117
1123
  return /*#__PURE__*/React.createElement(Fragment, null, child);
@@ -3227,12 +3233,14 @@ var Calendar = function Calendar(props) {
3227
3233
  var _props$events = props.events,
3228
3234
  events = _props$events === void 0 ? [] : _props$events,
3229
3235
  children = props.children,
3230
- onChange = props.onChange;
3236
+ onChange = props.onChange,
3237
+ onRange = props.onRange;
3231
3238
  var _useState = useState(props.range || "year"),
3232
3239
  range = _useState[0],
3233
3240
  setRange = _useState[1];
3234
3241
  function onChangeRange(range) {
3235
3242
  setRange(range);
3243
+ if (onRange) onRange(range);
3236
3244
  }
3237
3245
  return /*#__PURE__*/React.createElement("div", {
3238
3246
  className: "calendar"
@@ -5777,6 +5785,9 @@ var Planner2 = function Planner2(_ref) {
5777
5785
  function selectCell(cell) {
5778
5786
  if (onSelectCell) onSelectCell(cell);
5779
5787
  }
5788
+ function drop() {
5789
+ //TODO
5790
+ }
5780
5791
  var uniqueMonths = Array.from(new Set(days.map(function (_ref2) {
5781
5792
  var month = _ref2.month;
5782
5793
  return month;
@@ -5877,18 +5888,19 @@ var Planner2 = function Planner2(_ref) {
5877
5888
  });
5878
5889
  var weekendClass = isWeekend ? 'weekend' : '';
5879
5890
  return /*#__PURE__*/React.createElement("div", {
5891
+ key: "content" + index + "_" + year + "-" + month + "-" + day,
5880
5892
  className: "content-cell " + weekendClass,
5881
5893
  style: {
5882
5894
  minWidth: dayWidth,
5883
5895
  maxWidth: dayWidth
5884
5896
  },
5885
- key: "content" + index + "_" + year + "-" + month + "-" + day,
5886
5897
  onClick: function onClick() {
5887
5898
  return selectCell({
5888
5899
  lane: lane.id,
5889
5900
  date: dayDate
5890
5901
  });
5891
- }
5902
+ },
5903
+ onDrop: drop
5892
5904
  }, dayEvents.map(function (event, index) {
5893
5905
  return /*#__PURE__*/React.createElement(EventRenderer, {
5894
5906
  key: event.id + "-" + index,