@syncfusion/ej2-schedule 28.1.35 → 28.1.36

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.
@@ -18027,9 +18027,6 @@ let Schedule = class Schedule extends Component {
18027
18027
  removeSelectedClass() {
18028
18028
  const selectedCells = this.getSelectedCells();
18029
18029
  for (const cell of selectedCells) {
18030
- if (this.currentView !== 'Year') {
18031
- cell.setAttribute('aria-selected', 'false');
18032
- }
18033
18030
  cell.removeAttribute('tabindex');
18034
18031
  }
18035
18032
  removeClass(selectedCells, SELECTED_CELL_CLASS);
@@ -18047,11 +18044,6 @@ let Schedule = class Schedule extends Component {
18047
18044
  * @private
18048
18045
  */
18049
18046
  addSelectedClass(cells, focusCell, isPreventScroll) {
18050
- if (this.currentView !== 'Year') {
18051
- for (const cell of cells) {
18052
- cell.setAttribute('aria-selected', 'true');
18053
- }
18054
- }
18055
18047
  addClass(cells, SELECTED_CELL_CLASS);
18056
18048
  if (focusCell) {
18057
18049
  focusCell.setAttribute('tabindex', '0');
@@ -22234,7 +22226,9 @@ class DragAndDrop extends ActionBase {
22234
22226
  rows[rows.length - 1].option !== 'Date';
22235
22227
  this.isTimelineDayProcess = !this.parent.activeViewOptions.timeScale.enable || this.isHeaderRows ||
22236
22228
  this.parent.currentView === 'TimelineMonth' || (rows.length > 0 && rows[rows.length - 1].option === 'Date');
22237
- this.isStepDragging = !this.isTimelineDayProcess && (this.actionObj.slotInterval !== this.actionObj.interval);
22229
+ this.isAllDayDrag = !this.isTimelineDayProcess && eventObj[this.parent.eventFields.isAllDay];
22230
+ this.isStepDragging = !this.isTimelineDayProcess && !this.isAllDayDrag &&
22231
+ (this.actionObj.slotInterval !== this.actionObj.interval);
22238
22232
  if (this.isTimelineDayProcess) {
22239
22233
  this.timelineEventModule = new TimelineEvent(this.parent, 'day');
22240
22234
  }
@@ -22303,9 +22297,11 @@ class DragAndDrop extends ActionBase {
22303
22297
  this.heightUptoCursorPoint = (this.heightUptoCursorPoint === 0) ?
22304
22298
  Math.ceil((Math.abs(this.actionObj.clone.getBoundingClientRect().top - this.actionObj.Y) / this.heightPerMinute)) *
22305
22299
  this.heightPerMinute : this.heightUptoCursorPoint;
22306
- this.isAllDayDrag = (this.parent.activeViewOptions.timeScale.enable) ?
22307
- this.actionObj.clone.classList.contains(ALLDAY_APPOINTMENT_CLASS) :
22308
- this.actionObj.event[this.parent.eventFields.isAllDay];
22300
+ if (['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1) {
22301
+ this.isAllDayDrag = (this.parent.activeViewOptions.timeScale.enable) ?
22302
+ this.actionObj.clone.classList.contains(ALLDAY_APPOINTMENT_CLASS) :
22303
+ this.actionObj.event[this.parent.eventFields.isAllDay];
22304
+ }
22309
22305
  if (this.isStepDragging && this.minDiff === 0) {
22310
22306
  this.calculateMinutesDiff(eventObj);
22311
22307
  }
@@ -23067,6 +23063,7 @@ class DragAndDrop extends ActionBase {
23067
23063
  index = index < 0 ? 0 : index;
23068
23064
  let eventStart = this.isHeaderRows ? new Date(this.timelineEventModule.dateRender[parseInt(index.toString(), 10)].getTime()) :
23069
23065
  this.parent.getDateFromElement(tr.children[parseInt(index.toString(), 10)]);
23066
+ eventStart = this.isAllDayDrag ? resetTime(eventStart) : eventStart;
23070
23067
  if (this.isStepDragging) {
23071
23068
  const widthDiff = this.getWidthDiff(tr, index);
23072
23069
  if (widthDiff !== 0) {
@@ -23091,8 +23088,8 @@ class DragAndDrop extends ActionBase {
23091
23088
  }
23092
23089
  }
23093
23090
  else {
23094
- if (this.isCursorAhead || cursorDrag) {
23095
- const minutes = this.isTimelineDayProcess ? MINUTES_PER_DAY : this.actionObj.slotInterval;
23091
+ if ((this.isCursorAhead || cursorDrag) && !this.isAllDayDrag) {
23092
+ const minutes = this.isTimelineDayProcess || this.isAllDayDrag ? MINUTES_PER_DAY : this.actionObj.slotInterval;
23096
23093
  eventStart.setMinutes(eventStart.getMinutes() + minutes);
23097
23094
  eventStart.setMilliseconds(-(eventDuration));
23098
23095
  if (eventStart.getTime() === resetTime(eventStart).getTime() && eventStart.getMinutes() === 0 && eventDuration === 0) {
@@ -23100,14 +23097,14 @@ class DragAndDrop extends ActionBase {
23100
23097
  }
23101
23098
  }
23102
23099
  else {
23103
- eventStart.setMinutes(eventStart.getMinutes() -
23104
- (this.cursorPointIndex * (this.isTimelineDayProcess ? MINUTES_PER_DAY : this.actionObj.slotInterval)));
23100
+ eventStart.setMinutes(eventStart.getMinutes() - (this.cursorPointIndex *
23101
+ (this.isTimelineDayProcess || this.isAllDayDrag ? MINUTES_PER_DAY : this.actionObj.slotInterval)));
23105
23102
  }
23106
23103
  }
23107
23104
  if (!this.isStepDragging) {
23108
23105
  eventStart = this.calculateIntervalTime(eventStart);
23109
23106
  }
23110
- if (this.isTimelineDayProcess) {
23107
+ if (this.isTimelineDayProcess || this.isAllDayDrag) {
23111
23108
  const eventSrt = eventObj[this.parent.eventFields.startTime];
23112
23109
  eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds());
23113
23110
  }
@@ -23241,12 +23238,13 @@ class DragAndDrop extends ActionBase {
23241
23238
  const td = closest(e.target, '.e-work-cells');
23242
23239
  if (!isNullOrUndefined(td) && !this.isMorePopupOpened) {
23243
23240
  let targetDate = this.parent.getDateFromElement(td);
23241
+ targetDate = this.isAllDayDrag ? resetTime(targetDate) : targetDate;
23244
23242
  if (this.isHeaderRows) {
23245
23243
  const currentIndex = Math.floor(left / this.actionObj.cellWidth);
23246
23244
  targetDate = new Date(this.timelineEventModule.dateRender[currentIndex + index].getTime());
23247
23245
  }
23248
23246
  const timeDiff = targetDate.getTime() - event[this.parent.eventFields.startTime].getTime();
23249
- if (this.isTimelineDayProcess) {
23247
+ if (this.isTimelineDayProcess || this.isAllDayDrag) {
23250
23248
  this.cursorPointIndex = Math.abs(Math.ceil(timeDiff / (MS_PER_DAY)));
23251
23249
  }
23252
23250
  else {
@@ -24510,7 +24508,7 @@ class VerticalView extends ViewBase {
24510
24508
  const ntr = trEle.cloneNode();
24511
24509
  const appointmentExpandCollapse = createElement('div', {
24512
24510
  attrs: {
24513
- 'tabindex': '0', 'role': 'list',
24511
+ 'tabindex': '0', 'role': 'button',
24514
24512
  title: this.parent.localeObj.getConstant('expandAllDaySection'), 'aria-disabled': 'false',
24515
24513
  'aria-label': this.parent.localeObj.getConstant('expandAllDaySection')
24516
24514
  },
@@ -24643,7 +24641,7 @@ class VerticalView extends ViewBase {
24643
24641
  getContentRows() {
24644
24642
  const rows = [];
24645
24643
  const tr = createElement('tr');
24646
- const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
24644
+ const td = createElement('td');
24647
24645
  const existingGroupIndices = this.getGroupIndices();
24648
24646
  const handler = (r) => {
24649
24647
  const ntr = tr.cloneNode();
@@ -25377,7 +25375,7 @@ class Month extends ViewBase {
25377
25375
  getContentRows() {
25378
25376
  const trows = [];
25379
25377
  const tr = createElement('tr');
25380
- const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
25378
+ const td = createElement('td');
25381
25379
  const slotDatas = this.getContentSlots();
25382
25380
  const isTimeline = this.parent.currentView === 'TimelineMonth';
25383
25381
  const existingGroupIndices = isTimeline ? this.getGroupIndices() : [];
@@ -27422,7 +27420,7 @@ class TimelineViews extends VerticalView {
27422
27420
  getContentRows() {
27423
27421
  const rows = [];
27424
27422
  const tr = createElement('tr');
27425
- const td = createElement('td', { attrs: { 'aria-selected': 'false' } });
27423
+ const td = createElement('td');
27426
27424
  const trCount = this.getRowCount();
27427
27425
  const existingGroupIndices = this.getGroupIndices();
27428
27426
  for (let i = 0; i < trCount; i++) {
@@ -27852,7 +27850,7 @@ class TimelineYear extends Year {
27852
27850
  skeleton: 'full', calendar: this.parent.getCalendarMode()
27853
27851
  });
27854
27852
  const td = createElement('td', {
27855
- className: WORK_CELLS_CLASS, attrs: { 'aria-selected': 'false', 'aria-label': announcementText }
27853
+ className: WORK_CELLS_CLASS, attrs: { 'aria-label': announcementText }
27856
27854
  });
27857
27855
  contentTr.appendChild(td);
27858
27856
  const dateHeader = createElement('div', {