@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.
@@ -5716,20 +5716,12 @@ var EventBase = /** @__PURE__ @class */ (function () {
5716
5716
  };
5717
5717
  EventBase.prototype.removeSelectedAppointmentClass = function () {
5718
5718
  var selectedAppointments = this.getSelectedAppointments();
5719
- for (var _i = 0, selectedAppointments_1 = selectedAppointments; _i < selectedAppointments_1.length; _i++) {
5720
- var appointment = selectedAppointments_1[_i];
5721
- appointment.setAttribute('aria-pressed', 'false');
5722
- }
5723
5719
  removeClass(selectedAppointments, APPOINTMENT_BORDER);
5724
5720
  if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
5725
5721
  removeClass(selectedAppointments, AGENDA_SELECTED_CELL);
5726
5722
  }
5727
5723
  };
5728
5724
  EventBase.prototype.addSelectedAppointments = function (cells) {
5729
- for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
5730
- var cell = cells_1[_i];
5731
- cell.setAttribute('aria-pressed', 'true');
5732
- }
5733
5725
  if (this.parent.currentView !== 'MonthAgenda') {
5734
5726
  this.parent.removeSelectedClass();
5735
5727
  }
@@ -6293,7 +6285,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
6293
6285
  className: BLOCK_APPOINTMENT_CLASS,
6294
6286
  attrs: {
6295
6287
  'data-id': 'Appointment_' + record[this.parent.eventFields.id],
6296
- 'aria-disabled': 'true', 'aria-pressed': 'false'
6288
+ 'aria-disabled': 'true'
6297
6289
  }
6298
6290
  });
6299
6291
  var templateElement;
@@ -6814,7 +6806,6 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6814
6806
  'role': 'button',
6815
6807
  'tabindex': '0',
6816
6808
  'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
6817
- 'aria-pressed': 'false',
6818
6809
  'aria-label': this.parent.getAnnouncementString(record)
6819
6810
  }
6820
6811
  });
@@ -7758,7 +7749,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7758
7749
  var attrs = {
7759
7750
  'data-id': 'Appointment_' + record[this.fields.id],
7760
7751
  'role': 'button', 'tabindex': '0',
7761
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
7752
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
7762
7753
  'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
7763
7754
  };
7764
7755
  if (!isCloneElement) {
@@ -9282,7 +9273,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9282
9273
  'data-id': '' + eventData[fields.id],
9283
9274
  'data-guid': eventData.Guid, 'role': 'button', 'tabindex': '0',
9284
9275
  'aria-disabled': this_1.parent.eventBase.getReadonlyAttribute(eventData),
9285
- 'aria-pressed': 'false', 'aria-label': this_1.parent.getAnnouncementString(eventData)
9276
+ 'aria-label': this_1.parent.getAnnouncementString(eventData)
9286
9277
  }
9287
9278
  });
9288
9279
  var templateElement = void 0;
@@ -10415,13 +10406,8 @@ var EventTooltip = /** @__PURE__ @class */ (function () {
10415
10406
  startMonthDate = capitalizeFirstWord(startMonthDate, 'single');
10416
10407
  startMonthYearDate = capitalizeFirstWord(startMonthYearDate, 'single');
10417
10408
  endMonthYearDate = capitalizeFirstWord(endMonthYearDate, 'single');
10418
- var skeleton = 'short';
10419
- var startTime = globalize.formatDate(eventStart, {
10420
- type: 'time', skeleton: skeleton, calendar: this.parent.getCalendarMode()
10421
- });
10422
- var endTime = globalize.formatDate(eventEnd, {
10423
- type: 'time', skeleton: skeleton, calendar: this.parent.getCalendarMode()
10424
- });
10409
+ var startTime = this.parent.getTimeString(eventStart);
10410
+ var endTime = this.parent.getTimeString(eventEnd);
10425
10411
  var tooltipDetails = void 0;
10426
10412
  if (startDate.getTime() === endDate.getTime()) {
10427
10413
  tooltipDetails =
@@ -19864,8 +19850,17 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
19864
19850
  return;
19865
19851
  }
19866
19852
  var pages = this.getPageCoordinates(e);
19867
- this.actionObj.pageX = pages.pageX;
19868
- this.actionObj.pageY = pages.pageY;
19853
+ if (this.parent.currentView === 'Month' || this.parent.currentView === 'TimelineYear') {
19854
+ var doc = document.documentElement;
19855
+ var left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
19856
+ var top_1 = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
19857
+ this.actionObj.pageX = pages.pageX - left;
19858
+ this.actionObj.pageY = pages.pageY - top_1;
19859
+ }
19860
+ else {
19861
+ this.actionObj.pageX = pages.pageX;
19862
+ this.actionObj.pageY = pages.pageY;
19863
+ }
19869
19864
  this.updateScrollPosition(e);
19870
19865
  this.updateResizingDirection(e);
19871
19866
  var eventObj = extend({}, this.actionObj.event, null, true);
@@ -20210,6 +20205,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
20210
20205
  clnTop = isTop ? Math.floor(clnTop / slotInterval) * slotInterval : clnTop;
20211
20206
  clnHeight = clnTop + clnHeight >= viewElement.scrollHeight ? viewElement.scrollHeight - clnTop :
20212
20207
  Math.ceil(clnHeight / slotInterval) * slotInterval;
20208
+ if (!isTop && this.actionObj.clone.offsetTop + clnHeight >= this.parent.getContentTable().offsetHeight) {
20209
+ clnHeight = this.parent.getContentTable().offsetHeight - this.actionObj.clone.offsetTop;
20210
+ }
20213
20211
  var styles = {
20214
20212
  height: formatUnit(clnHeight < this.actionObj.cellHeight ? Math.floor(clnHeight / slotInterval) * slotInterval : clnHeight),
20215
20213
  top: formatUnit((clnHeight < this.actionObj.cellHeight && isTop) ? Math.ceil(clnTop / slotInterval) * slotInterval : clnTop),
@@ -20693,7 +20691,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
20693
20691
  'data-id': 'Appointment_' + record[this.fields.id],
20694
20692
  'data-guid': record.Guid,
20695
20693
  'role': 'button', 'tabindex': '0',
20696
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
20694
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
20697
20695
  'aria-label': this.parent.getAnnouncementString(record)
20698
20696
  }
20699
20697
  });
@@ -21854,7 +21852,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
21854
21852
  getUniversalTime(eventObj[this.parent.eventFields.startTime]);
21855
21853
  var offsetLeft = this.parent.enableRtl ? Math.abs(this.actionObj.clone.offsetLeft) - this.actionObj.clone.offsetWidth :
21856
21854
  parseInt(this.actionObj.clone.style.left, 10);
21857
- offsetLeft = Math.floor(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth;
21855
+ offsetLeft = Math.floor(offsetLeft / Math.trunc(this.actionObj.cellWidth)) * this.actionObj.cellWidth;
21858
21856
  var rightOffset;
21859
21857
  if (this.parent.enableRtl) {
21860
21858
  rightOffset = Math.abs(parseInt(this.actionObj.clone.style.right, 10));
@@ -21940,25 +21938,27 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
21940
21938
  eventsData = this.updatedData;
21941
21939
  }
21942
21940
  for (var dataIndex = 0; dataIndex < eventsData.length; dataIndex++) {
21943
- var events_2 = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
21944
- var eventData = events_2[0].data;
21945
- var startTime = this.timelineEventModule.getStartTime(events_2[0], eventData);
21946
- var endTime = this.timelineEventModule.getEndTime(events_2[0], eventData);
21947
- // eslint-disable-next-line max-len
21948
- var width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
21949
- // eslint-disable-next-line max-len
21950
- var day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
21951
- day = day < 0 ? 0 : day;
21952
- var left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
21953
21941
  var cloneElement = this.multiData.length > 0 ? this.actionObj.cloneElement[parseInt(dataIndex.toString(), 10)] : this.actionObj.clone;
21954
- if (this.parent.enableRtl) {
21955
- cloneElement.style.right = formatUnit(left);
21956
- }
21957
- else {
21958
- cloneElement.style.left = formatUnit(left);
21959
- }
21960
- if (!this.isMorePopupOpened) {
21961
- cloneElement.style.width = formatUnit(width);
21942
+ if (isNullOrUndefined(this.parent.eventDragArea)) {
21943
+ var events_2 = this.timelineEventModule.splitEvent(eventsData[parseInt(dataIndex.toString(), 10)], this.timelineEventModule.dateRender);
21944
+ var eventData = events_2[0].data;
21945
+ var startTime = this.timelineEventModule.getStartTime(events_2[0], eventData);
21946
+ var endTime = this.timelineEventModule.getEndTime(events_2[0], eventData);
21947
+ // eslint-disable-next-line max-len
21948
+ var width = this.timelineEventModule.getEventWidth(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], eventData.count);
21949
+ // eslint-disable-next-line max-len
21950
+ var day = this.parent.getIndexOfDate(this.timelineEventModule.dateRender, resetTime(new Date(startTime.getTime())));
21951
+ day = day < 0 ? 0 : day;
21952
+ var left = this.timelineEventModule.getPosition(startTime, endTime, eventObj[this.parent.eventFields.isAllDay], day);
21953
+ if (this.parent.enableRtl) {
21954
+ cloneElement.style.right = formatUnit(left);
21955
+ }
21956
+ else {
21957
+ cloneElement.style.left = formatUnit(left);
21958
+ }
21959
+ if (!this.isMorePopupOpened) {
21960
+ cloneElement.style.width = formatUnit(width);
21961
+ }
21962
21962
  }
21963
21963
  if (this.parent.activeViewOptions.group.resources.length > 0) {
21964
21964
  this.calculateResourceGroupingPosition(e, cloneElement);
@@ -21985,7 +21985,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
21985
21985
  rightOffset = (viewEle.scrollLeft - viewEle.scrollWidth);
21986
21986
  }
21987
21987
  }
21988
- this.actionObj.clone.style.left = formatUnit(rightOffset);
21988
+ if (isNullOrUndefined(this.parent.eventDragArea)) {
21989
+ this.actionObj.clone.style.left = formatUnit(rightOffset);
21990
+ }
21989
21991
  }
21990
21992
  else {
21991
21993
  if (this.scrollEdges.left) {
@@ -22002,7 +22004,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22002
22004
  this.actionObj.clone.offsetWidth) + (this.actionObj.clone.offsetWidth - this.widthUptoCursorPoint);
22003
22005
  }
22004
22006
  offsetLeft = offsetLeft < 0 ? 0 : offsetLeft;
22005
- this.actionObj.clone.style.left = formatUnit(offsetLeft);
22007
+ if (isNullOrUndefined(this.parent.eventDragArea)) {
22008
+ this.actionObj.clone.style.left = formatUnit(offsetLeft);
22009
+ }
22006
22010
  }
22007
22011
  }
22008
22012
  return offsetLeft;
@@ -22080,6 +22084,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22080
22084
  var td = closest(this.actionObj.target, 'td');
22081
22085
  this.actionObj.groupIndex = (td && !isNaN(parseInt(td.getAttribute('data-group-index'), 10)))
22082
22086
  ? parseInt(td.getAttribute('data-group-index'), 10) : this.actionObj.groupIndex;
22087
+ if (!isNullOrUndefined(this.parent.eventDragArea)) {
22088
+ return;
22089
+ }
22083
22090
  var top = trCollection[parseInt(rowIndex.toString(), 10)].getBoundingClientRect().height * rowIndex;
22084
22091
  if (this.parent.rowAutoHeight) {
22085
22092
  var cursorElement = this.getCursorElement(e);
@@ -24897,7 +24904,6 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
24897
24904
  'role': 'button',
24898
24905
  'tabindex': '0',
24899
24906
  'aria-disabled': _this.parent.eventBase.getReadonlyAttribute(listData[parseInt(li.toString(), 10)]),
24900
- 'aria-pressed': 'false',
24901
24907
  'aria-label': _this.parent.getAnnouncementString(listData[parseInt(li.toString(), 10)])
24902
24908
  }
24903
24909
  });