@syncfusion/ej2-schedule 21.2.4 → 21.2.6

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.
@@ -6547,6 +6547,7 @@ class VerticalEvent extends EventBase {
6547
6547
  removeClass(this.allDayElement, ALLDAY_ROW_ANIMATE_CLASS);
6548
6548
  this.slots.push(this.parent.activeView.renderDates.map((date) => +date));
6549
6549
  this.renderEvents('allDayEvents');
6550
+ this.animation.animate(this.allDayElement[0]);
6550
6551
  }
6551
6552
  this.parent.notify(contentReady, {});
6552
6553
  addClass(this.allDayElement, ALLDAY_ROW_ANIMATE_CLASS);
@@ -6647,6 +6648,8 @@ class VerticalEvent extends EventBase {
6647
6648
  const resources = this.getResourceList();
6648
6649
  let dateCount = this.getStartCount();
6649
6650
  let isRender;
6651
+ const appHeight = eventType === 'allDayEvents' ? getElementHeightFromClass(this.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS) : 0;
6652
+ const allDayRowTop = eventType === 'allDayEvents' && this.allDayElement.length > 0 ? this.allDayElement[0].offsetTop : 0;
6650
6653
  for (const resource of resources) {
6651
6654
  isRender = true;
6652
6655
  if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction && eventType !== 'allDayEvents'
@@ -6672,7 +6675,7 @@ class VerticalEvent extends EventBase {
6672
6675
  this.setValues(event, resource);
6673
6676
  }
6674
6677
  if (eventType === 'allDayEvents') {
6675
- this.renderAllDayEvents(event, day, resource, dateCount);
6678
+ this.renderAllDayEvents(event, day, resource, dateCount, false, allDayRowTop, appHeight);
6676
6679
  }
6677
6680
  else {
6678
6681
  if (this.isAllDayAppointment(event)) {
@@ -6901,7 +6904,8 @@ class VerticalEvent extends EventBase {
6901
6904
  }
6902
6905
  return true;
6903
6906
  }
6904
- renderAllDayEvents(eventObj, dayIndex, resource, dayCount, inline) {
6907
+ // eslint-disable-next-line max-len
6908
+ renderAllDayEvents(eventObj, dayIndex, resource, dayCount, inline, cellTop, eventHeight) {
6905
6909
  let currentDates = this.getRenderedDates(this.dateRender[parseInt(resource.toString(), 10)]) ||
6906
6910
  this.dateRender[parseInt(resource.toString(), 10)];
6907
6911
  if (this.parent.activeViewOptions.group.byDate) {
@@ -6909,8 +6913,6 @@ class VerticalEvent extends EventBase {
6909
6913
  currentDates = [this.dateRender[parseInt(resource.toString(), 10)][parseInt(dayIndex.toString(), 10)]];
6910
6914
  }
6911
6915
  const record = this.splitEvent(eventObj, currentDates)[0];
6912
- const allDayRowCell = this.element.querySelector('.' + ALLDAY_CELLS_CLASS + ':first-child');
6913
- const cellTop = allDayRowCell.offsetTop;
6914
6916
  const eStart = new Date(record[this.parent.eventFields.startTime].getTime());
6915
6917
  const eEnd = new Date(record[this.parent.eventFields.endTime].getTime());
6916
6918
  let appWidth = 0;
@@ -6959,8 +6961,7 @@ class VerticalEvent extends EventBase {
6959
6961
  this.parent.trigger(eventRendered, args, (eventArgs) => {
6960
6962
  if (!eventArgs.cancel) {
6961
6963
  eventWrapper.appendChild(appointmentElement);
6962
- const appHeight = appointmentElement.offsetHeight;
6963
- topValue += (allDayIndex === 0 ? cellTop : (cellTop + (allDayIndex * appHeight))) + 1;
6964
+ topValue += (allDayIndex === 0 ? cellTop : (cellTop + (allDayIndex * eventHeight))) + 1;
6964
6965
  setStyleAttribute(appointmentElement, { 'width': appWidth + '%', 'top': formatUnit(topValue) });
6965
6966
  if (allDayIndex > 1) {
6966
6967
  this.moreEvents.push(appointmentElement);
@@ -6968,9 +6969,9 @@ class VerticalEvent extends EventBase {
6968
6969
  this.createMoreIndicator(allDayRow, count, wIndex);
6969
6970
  }
6970
6971
  }
6971
- allDayRowCell.setAttribute('data-count', this.allDayLevel.toString());
6972
+ this.allDayElement[0].setAttribute('data-count', this.allDayLevel.toString());
6972
6973
  const allDayRowHeight = ((!this.parent.uiStateValues.expand && this.allDayLevel > 2) ?
6973
- (3 * appHeight) : ((this.allDayLevel + 1) * appHeight)) + 4;
6974
+ (3 * eventHeight) : ((this.allDayLevel + 1) * eventHeight)) + 4;
6974
6975
  this.setAllDayRowHeight(allDayRowHeight);
6975
6976
  this.addOrRemoveClass();
6976
6977
  this.wireAppointmentEvents(appointmentElement, eventObj);
@@ -7190,13 +7191,11 @@ class VerticalEvent extends EventBase {
7190
7191
  this.parent.eventBase.allDayExpandScroll(dateHeader);
7191
7192
  }
7192
7193
  else {
7193
- dateHeader.scrollTop = 0;
7194
7194
  for (const element of this.allDayElement) {
7195
7195
  element.style.height = (height / 12) + 'em';
7196
7196
  }
7197
7197
  removeClass([dateHeader], ALLDAY_APPOINTMENT_SCROLL);
7198
7198
  }
7199
- this.animation.animate(this.allDayElement[0]);
7200
7199
  }
7201
7200
  addOrRemoveClass() {
7202
7201
  this.moreEvents.filter((element) => {
@@ -7255,8 +7254,10 @@ class VerticalEvent extends EventBase {
7255
7254
  target.setAttribute('title', this.parent.localeObj.getConstant('expandAllDaySection'));
7256
7255
  target.setAttribute('aria-label', 'Expand section');
7257
7256
  rowHeight = (3 * this.getEventHeight()) + 4;
7257
+ this.parent.element.querySelector('.' + DATE_HEADER_WRAP_CLASS).scrollTop = 0;
7258
7258
  }
7259
7259
  this.setAllDayRowHeight(rowHeight);
7260
+ this.animation.animate(this.allDayElement[0]);
7260
7261
  this.addOrRemoveClass();
7261
7262
  this.animation.animate(target);
7262
7263
  }
@@ -8596,7 +8597,9 @@ class InlineEdit {
8596
8597
  allDayElements[0].offsetHeight) - 1;
8597
8598
  }
8598
8599
  verticalEvent.allDayLevel = allDayLevel;
8599
- verticalEvent.renderAllDayEvents(saveObj, index, resIndex, daysCount, this.parent.allowInline);
8600
+ const appHeight = getElementHeightFromClass(this.parent.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS);
8601
+ const cellTop = verticalEvent.allDayElement.length > 0 ? verticalEvent.allDayElement[0].offsetTop : 0;
8602
+ verticalEvent.renderAllDayEvents(saveObj, index, resIndex, daysCount, this.parent.allowInline, cellTop, appHeight);
8600
8603
  }
8601
8604
  else {
8602
8605
  verticalEvent.renderNormalEvents(saveObj, index, resIndex, daysCount, this.parent.allowInline);
@@ -9021,13 +9024,6 @@ class QuickPopups {
9021
9024
  this.quickDialog.content = this.l10n.getConstant('editContent');
9022
9025
  this.quickDialog.header = this.l10n.getConstant(this.parent.currentAction === 'Delete' ? 'deleteTitle' : 'editTitle');
9023
9026
  this.quickDialogClass('Recurrence');
9024
- const activeEvent = this.parent.activeEventData.event;
9025
- if (this.parent.eventSettings.editFollowingEvents && this.parent.currentAction === 'EditOccurrence'
9026
- && !isNullOrUndefined(activeEvent[this.parent.eventFields.recurrenceID]) && activeEvent[this.parent.eventFields.recurrenceID]
9027
- !== activeEvent[this.parent.eventFields.id]) {
9028
- const followingEventButton = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_FOLLOWING);
9029
- addClass([followingEventButton], DISABLE_CLASS);
9030
- }
9031
9027
  this.showQuickDialog('RecurrenceAlert');
9032
9028
  }
9033
9029
  openRecurrenceValidationAlert(type) {
@@ -24594,6 +24590,9 @@ class AgendaBase extends ViewBase {
24594
24590
  className.push(data.cssClass);
24595
24591
  }
24596
24592
  addClass([ntd], className);
24593
+ if (this.isCurrentDate(new Date(data.date.getTime()))) {
24594
+ addClass(ntd.childNodes, AGENDA_CURRENT_DAY_CLASS);
24595
+ }
24597
24596
  ntr.appendChild(ntd);
24598
24597
  }
24599
24598
  else if (data.type === 'eventColumn') {