@syncfusion/ej2-schedule 21.1.35 → 21.1.37

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.
@@ -2318,7 +2318,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2318
2318
  nextAppEle = isReverse ? appointments[appointments.length - 1] : appointments[0];
2319
2319
  }
2320
2320
  if (nextAppEle) {
2321
- this.parent.eventBase.addSelectedAppointments([nextAppEle]);
2321
+ this.parent.eventBase.addSelectedAppointments([nextAppEle], true);
2322
2322
  nextAppEle.focus();
2323
2323
  addClass([nextAppEle], AGENDA_SELECTED_CELL);
2324
2324
  }
@@ -2345,7 +2345,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2345
2345
  if (filteredElements_1.length > 0) {
2346
2346
  var selectedElement = isReverse ? filteredElements_1[filteredElements_1.length - 1] : filteredElements_1[0];
2347
2347
  var focusElements = this.getAppointmentElementsByGuid(selectedElement.getAttribute('data-guid'));
2348
- this.parent.eventBase.addSelectedAppointments(focusElements);
2348
+ this.parent.eventBase.addSelectedAppointments(focusElements, true);
2349
2349
  (focusElements[focusElements.length - 1]).focus();
2350
2350
  }
2351
2351
  }
@@ -2804,7 +2804,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2804
2804
  if (appElements.length > 0) {
2805
2805
  this.parent.eventBase.removeSelectedAppointmentClass();
2806
2806
  var focusAppointment = isReverse ? appElements.slice(-1)[0] : appElements[0];
2807
- this.parent.eventBase.addSelectedAppointments([focusAppointment]);
2807
+ this.parent.eventBase.addSelectedAppointments([focusAppointment], true);
2808
2808
  focusAppointment.focus();
2809
2809
  e.preventDefault();
2810
2810
  }
@@ -2906,7 +2906,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2906
2906
  var nextAppEle = eventEle[0];
2907
2907
  if (nextAppEle) {
2908
2908
  this.parent.eventBase.removeSelectedAppointmentClass();
2909
- this.parent.eventBase.addSelectedAppointments([nextAppEle]);
2909
+ this.parent.eventBase.addSelectedAppointments([nextAppEle], true);
2910
2910
  nextAppEle.focus();
2911
2911
  }
2912
2912
  }
@@ -2918,7 +2918,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2918
2918
  if (appElements.length > 0) {
2919
2919
  this.parent.eventBase.removeSelectedAppointmentClass();
2920
2920
  var focusAppointment = appElements[0];
2921
- this.parent.eventBase.addSelectedAppointments([focusAppointment]);
2921
+ this.parent.eventBase.addSelectedAppointments([focusAppointment], true);
2922
2922
  focusAppointment.focus();
2923
2923
  e.preventDefault();
2924
2924
  }
@@ -5746,7 +5746,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
5746
5746
  }
5747
5747
  }
5748
5748
  if (target && this.parent.selectedElements.length > 0) {
5749
- this.addSelectedAppointments(this.parent.selectedElements);
5749
+ this.addSelectedAppointments(this.parent.selectedElements, false);
5750
5750
  }
5751
5751
  return this.parent.selectedElements;
5752
5752
  };
@@ -5776,12 +5776,12 @@ var EventBase = /** @__PURE__ @class */ (function () {
5776
5776
  removeClass(selectedAppointments, AGENDA_SELECTED_CELL);
5777
5777
  }
5778
5778
  };
5779
- EventBase.prototype.addSelectedAppointments = function (cells) {
5779
+ EventBase.prototype.addSelectedAppointments = function (cells, preventFocus) {
5780
5780
  if (this.parent.currentView !== 'MonthAgenda') {
5781
5781
  this.parent.removeSelectedClass();
5782
5782
  }
5783
5783
  addClass(cells, APPOINTMENT_BORDER);
5784
- if (cells.length > 0) {
5784
+ if (cells.length > 0 && !preventFocus) {
5785
5785
  cells[cells.length - 1].focus();
5786
5786
  }
5787
5787
  };
@@ -5805,6 +5805,10 @@ var EventBase = /** @__PURE__ @class */ (function () {
5805
5805
  }
5806
5806
  var selectedAppointments = this.getSelectedAppointments();
5807
5807
  if (selectedAppointments.length > 0) {
5808
+ if (this.parent.activeEventData && this.parent.activeEventData.element && selectedAppointments.indexOf(this.parent.activeEventData.element) > -1) {
5809
+ this.parent.activeEventData.element.focus();
5810
+ return;
5811
+ }
5808
5812
  selectedAppointments[selectedAppointments.length - 1].focus();
5809
5813
  return;
5810
5814
  }
@@ -6104,7 +6108,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
6104
6108
  var target = closest(eventData.target, '.' + APPOINTMENT_CLASS);
6105
6109
  var guid = target.getAttribute('data-guid');
6106
6110
  if (isMultiple) {
6107
- this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="' + guid + '"]')));
6111
+ this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="' + guid + '"]')), true);
6108
6112
  target.focus();
6109
6113
  }
6110
6114
  var eventObject = this.getEventByGuid(guid);
@@ -17126,6 +17130,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17126
17130
  if (_this.headerModule) {
17127
17131
  _this.headerModule.setCalendarDate(navigationArgs.currentDate);
17128
17132
  }
17133
+ if (_this.currentView === 'MonthAgenda' && _this.monthAgendaModule) {
17134
+ _this.monthAgendaModule.monthAgendaDate = new Date('' + _this.selectedDate);
17135
+ }
17129
17136
  _this.initializeView(_this.currentView);
17130
17137
  _this.animateLayout();
17131
17138
  args = { requestType: 'dateNavigate', cancel: false, event: event };
@@ -18027,6 +18034,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18027
18034
  this.changeDate(this.selectedDate);
18028
18035
  }
18029
18036
  else if (state.isLayout) {
18037
+ this.activeCellsData = null;
18030
18038
  this.initializeView(this.currentView);
18031
18039
  }
18032
18040
  else if (state.isDataManager && this.crudModule) {
@@ -19077,7 +19085,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
19077
19085
  var element = this.element.querySelector('div[data-guid="' + selectEvent.Guid + '"]');
19078
19086
  if (element) {
19079
19087
  this.eventBase.removeSelectedAppointmentClass();
19080
- this.eventBase.addSelectedAppointments([element]);
19088
+ this.eventBase.addSelectedAppointments([element], false);
19081
19089
  this.activeEventData = { event: selectEvent, element: element };
19082
19090
  if (this.currentView === 'Agenda' || this.currentView === 'MonthAgenda') {
19083
19091
  addClass([this.activeEventData.element], AGENDA_SELECTED_CELL);