@syncfusion/ej2-schedule 20.4.40 → 20.4.43

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.
@@ -5651,18 +5651,12 @@ class EventBase {
5651
5651
  }
5652
5652
  removeSelectedAppointmentClass() {
5653
5653
  const selectedAppointments = this.getSelectedAppointments();
5654
- for (const appointment of selectedAppointments) {
5655
- appointment.setAttribute('aria-pressed', 'false');
5656
- }
5657
5654
  removeClass(selectedAppointments, APPOINTMENT_BORDER);
5658
5655
  if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
5659
5656
  removeClass(selectedAppointments, AGENDA_SELECTED_CELL);
5660
5657
  }
5661
5658
  }
5662
5659
  addSelectedAppointments(cells) {
5663
- for (const cell of cells) {
5664
- cell.setAttribute('aria-pressed', 'true');
5665
- }
5666
5660
  if (this.parent.currentView !== 'MonthAgenda') {
5667
5661
  this.parent.removeSelectedClass();
5668
5662
  }
@@ -6193,7 +6187,7 @@ class EventBase {
6193
6187
  className: BLOCK_APPOINTMENT_CLASS,
6194
6188
  attrs: {
6195
6189
  'data-id': 'Appointment_' + record[this.parent.eventFields.id],
6196
- 'aria-disabled': 'true', 'aria-pressed': 'false'
6190
+ 'aria-disabled': 'true'
6197
6191
  }
6198
6192
  });
6199
6193
  let templateElement;
@@ -6679,7 +6673,6 @@ class VerticalEvent extends EventBase {
6679
6673
  'role': 'button',
6680
6674
  'tabindex': '0',
6681
6675
  'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
6682
- 'aria-pressed': 'false',
6683
6676
  'aria-label': this.parent.getAnnouncementString(record)
6684
6677
  }
6685
6678
  });
@@ -7581,7 +7574,7 @@ class MonthEvent extends EventBase {
7581
7574
  const attrs = {
7582
7575
  'data-id': 'Appointment_' + record[this.fields.id],
7583
7576
  'role': 'button', 'tabindex': '0',
7584
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
7577
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
7585
7578
  'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
7586
7579
  };
7587
7580
  if (!isCloneElement) {
@@ -9067,7 +9060,7 @@ class QuickPopups {
9067
9060
  'data-id': '' + eventData[fields.id],
9068
9061
  'data-guid': eventData.Guid, 'role': 'button', 'tabindex': '0',
9069
9062
  'aria-disabled': this.parent.eventBase.getReadonlyAttribute(eventData),
9070
- 'aria-pressed': 'false', 'aria-label': this.parent.getAnnouncementString(eventData)
9063
+ 'aria-label': this.parent.getAnnouncementString(eventData)
9071
9064
  }
9072
9065
  });
9073
9066
  let templateElement;
@@ -10183,13 +10176,8 @@ class EventTooltip {
10183
10176
  startMonthDate = capitalizeFirstWord(startMonthDate, 'single');
10184
10177
  startMonthYearDate = capitalizeFirstWord(startMonthYearDate, 'single');
10185
10178
  endMonthYearDate = capitalizeFirstWord(endMonthYearDate, 'single');
10186
- const skeleton = 'short';
10187
- const startTime = globalize.formatDate(eventStart, {
10188
- type: 'time', skeleton: skeleton, calendar: this.parent.getCalendarMode()
10189
- });
10190
- const endTime = globalize.formatDate(eventEnd, {
10191
- type: 'time', skeleton: skeleton, calendar: this.parent.getCalendarMode()
10192
- });
10179
+ const startTime = this.parent.getTimeString(eventStart);
10180
+ const endTime = this.parent.getTimeString(eventEnd);
10193
10181
  let tooltipDetails;
10194
10182
  if (startDate.getTime() === endDate.getTime()) {
10195
10183
  tooltipDetails =
@@ -19186,8 +19174,17 @@ class Resize extends ActionBase {
19186
19174
  return;
19187
19175
  }
19188
19176
  const pages = this.getPageCoordinates(e);
19189
- this.actionObj.pageX = pages.pageX;
19190
- this.actionObj.pageY = pages.pageY;
19177
+ if (this.parent.currentView === 'Month' || this.parent.currentView === 'TimelineYear') {
19178
+ const doc = document.documentElement;
19179
+ const left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
19180
+ const top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
19181
+ this.actionObj.pageX = pages.pageX - left;
19182
+ this.actionObj.pageY = pages.pageY - top;
19183
+ }
19184
+ else {
19185
+ this.actionObj.pageX = pages.pageX;
19186
+ this.actionObj.pageY = pages.pageY;
19187
+ }
19191
19188
  this.updateScrollPosition(e);
19192
19189
  this.updateResizingDirection(e);
19193
19190
  const eventObj = extend({}, this.actionObj.event, null, true);
@@ -19525,6 +19522,9 @@ class Resize extends ActionBase {
19525
19522
  clnTop = isTop ? Math.floor(clnTop / slotInterval) * slotInterval : clnTop;
19526
19523
  clnHeight = clnTop + clnHeight >= viewElement.scrollHeight ? viewElement.scrollHeight - clnTop :
19527
19524
  Math.ceil(clnHeight / slotInterval) * slotInterval;
19525
+ if (!isTop && this.actionObj.clone.offsetTop + clnHeight >= this.parent.getContentTable().offsetHeight) {
19526
+ clnHeight = this.parent.getContentTable().offsetHeight - this.actionObj.clone.offsetTop;
19527
+ }
19528
19528
  const styles = {
19529
19529
  height: formatUnit(clnHeight < this.actionObj.cellHeight ? Math.floor(clnHeight / slotInterval) * slotInterval : clnHeight),
19530
19530
  top: formatUnit((clnHeight < this.actionObj.cellHeight && isTop) ? Math.ceil(clnTop / slotInterval) * slotInterval : clnTop),
@@ -19981,7 +19981,7 @@ class YearEvent extends TimelineEvent {
19981
19981
  'data-id': 'Appointment_' + record[this.fields.id],
19982
19982
  'data-guid': record.Guid,
19983
19983
  'role': 'button', 'tabindex': '0',
19984
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
19984
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
19985
19985
  'aria-label': this.parent.getAnnouncementString(record)
19986
19986
  }
19987
19987
  });
@@ -21109,7 +21109,7 @@ class DragAndDrop extends ActionBase {
21109
21109
  getUniversalTime(eventObj[this.parent.eventFields.startTime]);
21110
21110
  let offsetLeft = this.parent.enableRtl ? Math.abs(this.actionObj.clone.offsetLeft) - this.actionObj.clone.offsetWidth :
21111
21111
  parseInt(this.actionObj.clone.style.left, 10);
21112
- offsetLeft = Math.floor(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth;
21112
+ offsetLeft = Math.floor(offsetLeft / Math.trunc(this.actionObj.cellWidth)) * this.actionObj.cellWidth;
21113
21113
  let rightOffset;
21114
21114
  if (this.parent.enableRtl) {
21115
21115
  rightOffset = Math.abs(parseInt(this.actionObj.clone.style.right, 10));
@@ -21195,25 +21195,27 @@ class DragAndDrop extends ActionBase {
21195
21195
  eventsData = this.updatedData;
21196
21196
  }
21197
21197
  for (let dataIndex = 0; dataIndex < eventsData.length; dataIndex++) {
21198
- const events = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
21199
- const eventData = events[0].data;
21200
- const startTime = this.timelineEventModule.getStartTime(events[0], eventData);
21201
- const endTime = this.timelineEventModule.getEndTime(events[0], eventData);
21202
- // eslint-disable-next-line max-len
21203
- const width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
21204
- // eslint-disable-next-line max-len
21205
- let day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
21206
- day = day < 0 ? 0 : day;
21207
- const left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
21208
21198
  const cloneElement = this.multiData.length > 0 ? this.actionObj.cloneElement[parseInt(dataIndex.toString(), 10)] : this.actionObj.clone;
21209
- if (this.parent.enableRtl) {
21210
- cloneElement.style.right = formatUnit(left);
21211
- }
21212
- else {
21213
- cloneElement.style.left = formatUnit(left);
21214
- }
21215
- if (!this.isMorePopupOpened) {
21216
- cloneElement.style.width = formatUnit(width);
21199
+ if (isNullOrUndefined(this.parent.eventDragArea)) {
21200
+ const events = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
21201
+ const eventData = events[0].data;
21202
+ const startTime = this.timelineEventModule.getStartTime(events[0], eventData);
21203
+ const endTime = this.timelineEventModule.getEndTime(events[0], eventData);
21204
+ // eslint-disable-next-line max-len
21205
+ const width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
21206
+ // eslint-disable-next-line max-len
21207
+ let day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
21208
+ day = day < 0 ? 0 : day;
21209
+ const left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
21210
+ if (this.parent.enableRtl) {
21211
+ cloneElement.style.right = formatUnit(left);
21212
+ }
21213
+ else {
21214
+ cloneElement.style.left = formatUnit(left);
21215
+ }
21216
+ if (!this.isMorePopupOpened) {
21217
+ cloneElement.style.width = formatUnit(width);
21218
+ }
21217
21219
  }
21218
21220
  if (this.parent.activeViewOptions.group.resources.length > 0) {
21219
21221
  this.calculateResourceGroupingPosition(e, cloneElement);
@@ -21240,7 +21242,9 @@ class DragAndDrop extends ActionBase {
21240
21242
  rightOffset = (viewEle.scrollLeft - viewEle.scrollWidth);
21241
21243
  }
21242
21244
  }
21243
- this.actionObj.clone.style.left = formatUnit(rightOffset);
21245
+ if (isNullOrUndefined(this.parent.eventDragArea)) {
21246
+ this.actionObj.clone.style.left = formatUnit(rightOffset);
21247
+ }
21244
21248
  }
21245
21249
  else {
21246
21250
  if (this.scrollEdges.left) {
@@ -21257,7 +21261,9 @@ class DragAndDrop extends ActionBase {
21257
21261
  this.actionObj.clone.offsetWidth) + (this.actionObj.clone.offsetWidth - this.widthUptoCursorPoint);
21258
21262
  }
21259
21263
  offsetLeft = offsetLeft < 0 ? 0 : offsetLeft;
21260
- this.actionObj.clone.style.left = formatUnit(offsetLeft);
21264
+ if (isNullOrUndefined(this.parent.eventDragArea)) {
21265
+ this.actionObj.clone.style.left = formatUnit(offsetLeft);
21266
+ }
21261
21267
  }
21262
21268
  }
21263
21269
  return offsetLeft;
@@ -21335,6 +21341,9 @@ class DragAndDrop extends ActionBase {
21335
21341
  const td = closest(this.actionObj.target, 'td');
21336
21342
  this.actionObj.groupIndex = (td && !isNaN(parseInt(td.getAttribute('data-group-index'), 10)))
21337
21343
  ? parseInt(td.getAttribute('data-group-index'), 10) : this.actionObj.groupIndex;
21344
+ if (!isNullOrUndefined(this.parent.eventDragArea)) {
21345
+ return;
21346
+ }
21338
21347
  let top = trCollection[parseInt(rowIndex.toString(), 10)].getBoundingClientRect().height * rowIndex;
21339
21348
  if (this.parent.rowAutoHeight) {
21340
21349
  const cursorElement = this.getCursorElement(e);
@@ -24000,7 +24009,6 @@ class AgendaBase extends ViewBase {
24000
24009
  'role': 'button',
24001
24010
  'tabindex': '0',
24002
24011
  'aria-disabled': this.parent.eventBase.getReadonlyAttribute(listData[parseInt(li.toString(), 10)]),
24003
- 'aria-pressed': 'false',
24004
24012
  'aria-label': this.parent.getAnnouncementString(listData[parseInt(li.toString(), 10)])
24005
24013
  }
24006
24014
  });