@syncfusion/ej2-schedule 28.1.33 → 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.
@@ -1,12 +1,3 @@
1
- /*!
2
- * filename: index.d.ts
3
- * version : 28.1.33
4
- * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
- * Use of this code is subject to the terms of our license.
6
- * A copy of the current license can be obtained at any time by e-mailing
7
- * licensing@syncfusion.com. Any infringement will be prosecuted under
8
- * applicable laws.
9
- */
10
1
  import * as _schedule from '@syncfusion/ej2-schedule';
11
2
 
12
3
  export declare namespace ej {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-schedule@*",
3
- "_id": "@syncfusion/ej2-schedule@22.9.0",
3
+ "_id": "@syncfusion/ej2-schedule@28.1.35",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-cR+XC2J8vmAcNH8/zygg6BgJ4xkhOm2Zsg13yKOgitQV035CAkGjxmTWONHlkL5Wsw8wWWojH2HL9dVxe6kiug==",
5
+ "_integrity": "sha512-kKUjjxjl1Em+f3GyWIIQNxuXbmCK5MDPYIQSoCQwxQLuhcsziojMDiqqLE8jfOc3fQUqN0dSoFsX7CXFXEBWiw==",
6
6
  "_location": "/@syncfusion/ej2-schedule",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -18,13 +18,12 @@
18
18
  },
19
19
  "_requiredBy": [
20
20
  "/",
21
- "/@syncfusion/ej2",
22
21
  "/@syncfusion/ej2-angular-schedule",
23
22
  "/@syncfusion/ej2-react-schedule",
24
23
  "/@syncfusion/ej2-vue-schedule"
25
24
  ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-schedule/-/ej2-schedule-22.9.0.tgz",
27
- "_shasum": "2d61fb6d43051fddd4eb521a0a0f658de274c6ff",
25
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-28.1.35.tgz",
26
+ "_shasum": "e49e7a6f5050d918a5e1780dff4417d1887ff231",
28
27
  "_spec": "@syncfusion/ej2-schedule@*",
29
28
  "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
30
29
  "author": {
@@ -36,14 +35,14 @@
36
35
  "bundleDependencies": false,
37
36
  "dependencies": {
38
37
  "@syncfusion/ej2-base": "~28.1.33",
39
- "@syncfusion/ej2-buttons": "~28.1.33",
40
- "@syncfusion/ej2-calendars": "~28.1.33",
38
+ "@syncfusion/ej2-buttons": "~28.1.36",
39
+ "@syncfusion/ej2-calendars": "~28.1.36",
41
40
  "@syncfusion/ej2-data": "~28.1.33",
42
- "@syncfusion/ej2-dropdowns": "~28.1.33",
41
+ "@syncfusion/ej2-dropdowns": "~28.1.36",
43
42
  "@syncfusion/ej2-excel-export": "~28.1.33",
44
43
  "@syncfusion/ej2-inputs": "~28.1.33",
45
44
  "@syncfusion/ej2-lists": "~28.1.33",
46
- "@syncfusion/ej2-navigations": "~28.1.33",
45
+ "@syncfusion/ej2-navigations": "~28.1.36",
47
46
  "@syncfusion/ej2-popups": "~28.1.33"
48
47
  },
49
48
  "deprecated": false,
@@ -73,6 +72,6 @@
73
72
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
74
73
  },
75
74
  "typings": "index.d.ts",
76
- "version": "28.1.33",
75
+ "version": "28.1.36",
77
76
  "sideEffects": false
78
77
  }
@@ -28,6 +28,7 @@ export declare class DragAndDrop extends ActionBase {
28
28
  private isPreventMultiDrag;
29
29
  private slotsUptoCursor;
30
30
  private eleTop;
31
+ private distanceUptoCursor;
31
32
  wireDragEvent(element: HTMLElement): void;
32
33
  setDragArea(): void;
33
34
  private dragHelper;
@@ -53,15 +53,15 @@ var DragAndDrop = /** @class */ (function (_super) {
53
53
  _this.isPreventMultiDrag = false;
54
54
  _this.slotsUptoCursor = -1;
55
55
  _this.eleTop = 0;
56
+ _this.distanceUptoCursor = 0;
56
57
  return _this;
57
58
  }
58
59
  DragAndDrop.prototype.wireDragEvent = function (element) {
59
- var isVerticalView = ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1;
60
60
  new Draggable(element, {
61
61
  abort: '.' + cls.EVENT_RESIZE_CLASS,
62
62
  clone: true,
63
63
  isDragScroll: true,
64
- enableTailMode: (this.parent.eventDragArea || isVerticalView) ? true : false,
64
+ enableTailMode: this.parent.eventDragArea ? true : false,
65
65
  cursorAt: (this.parent.eventDragArea) ? { left: -20, top: -20 } : { left: 0, top: 0 },
66
66
  dragArea: this.dragArea,
67
67
  dragStart: this.dragStart.bind(this),
@@ -85,8 +85,12 @@ var DragAndDrop = /** @class */ (function (_super) {
85
85
  }
86
86
  this.setDragActionDefaultValues();
87
87
  this.actionObj.element = e.element;
88
- this.eleTop = parseFloat(this.actionObj.element.style.top);
89
- this.slotsUptoCursor = -1;
88
+ if (e.sender && ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1) {
89
+ var eventArgs = this.parent.eventBase.getPageCoordinates(e.sender);
90
+ this.distanceUptoCursor = eventArgs.clientY - this.actionObj.element.getBoundingClientRect().top;
91
+ this.eleTop = parseFloat(this.actionObj.element.style.top);
92
+ this.slotsUptoCursor = -1;
93
+ }
90
94
  this.actionObj.action = 'drag';
91
95
  var elements = [];
92
96
  if (!this.parent.allowMultiDrag || isNullOrUndefined(this.parent.selectedElements) || this.parent.selectedElements.length === 0 ||
@@ -166,11 +170,11 @@ var DragAndDrop = /** @class */ (function (_super) {
166
170
  var top_1 = parseInt(e.top, 10);
167
171
  top_1 = top_1 < 0 ? 0 : top_1;
168
172
  if (this.slotsUptoCursor < 0) {
169
- var cellsCountUptoCursor = Math.floor(top_1 / cellHeight);
173
+ var cellsCountUptoCursor = Math.floor((this.eleTop + this.distanceUptoCursor) / cellHeight);
170
174
  var cellsCountUptoEleTop = Math.floor(this.eleTop / cellHeight);
171
175
  this.slotsUptoCursor = cellsCountUptoCursor - cellsCountUptoEleTop;
172
176
  }
173
- top_1 = (Math.floor((top_1 + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
177
+ top_1 = (Math.floor((top_1 + this.distanceUptoCursor + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
174
178
  topValue = formatUnit(top_1 < 0 ? 0 : top_1);
175
179
  var scrollHeight = this.parent.element.querySelector('.e-content-wrap').scrollHeight;
176
180
  var cloneBottom = parseInt(topValue, 10) + this.actionObj.clone.offsetHeight;
@@ -257,7 +261,9 @@ var DragAndDrop = /** @class */ (function (_super) {
257
261
  rows[rows.length - 1].option !== 'Date';
258
262
  _this.isTimelineDayProcess = !_this.parent.activeViewOptions.timeScale.enable || _this.isHeaderRows ||
259
263
  _this.parent.currentView === 'TimelineMonth' || (rows.length > 0 && rows[rows.length - 1].option === 'Date');
260
- _this.isStepDragging = !_this.isTimelineDayProcess && (_this.actionObj.slotInterval !== _this.actionObj.interval);
264
+ _this.isAllDayDrag = !_this.isTimelineDayProcess && eventObj[_this.parent.eventFields.isAllDay];
265
+ _this.isStepDragging = !_this.isTimelineDayProcess && !_this.isAllDayDrag &&
266
+ (_this.actionObj.slotInterval !== _this.actionObj.interval);
261
267
  if (_this.isTimelineDayProcess) {
262
268
  _this.timelineEventModule = new TimelineEvent(_this.parent, 'day');
263
269
  }
@@ -327,9 +333,11 @@ var DragAndDrop = /** @class */ (function (_super) {
327
333
  this.heightUptoCursorPoint = (this.heightUptoCursorPoint === 0) ?
328
334
  Math.ceil((Math.abs(this.actionObj.clone.getBoundingClientRect().top - this.actionObj.Y) / this.heightPerMinute)) *
329
335
  this.heightPerMinute : this.heightUptoCursorPoint;
330
- this.isAllDayDrag = (this.parent.activeViewOptions.timeScale.enable) ?
331
- this.actionObj.clone.classList.contains(cls.ALLDAY_APPOINTMENT_CLASS) :
332
- this.actionObj.event[this.parent.eventFields.isAllDay];
336
+ if (['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1) {
337
+ this.isAllDayDrag = (this.parent.activeViewOptions.timeScale.enable) ?
338
+ this.actionObj.clone.classList.contains(cls.ALLDAY_APPOINTMENT_CLASS) :
339
+ this.actionObj.event[this.parent.eventFields.isAllDay];
340
+ }
333
341
  if (this.isStepDragging && this.minDiff === 0) {
334
342
  this.calculateMinutesDiff(eventObj);
335
343
  }
@@ -1100,6 +1108,7 @@ var DragAndDrop = /** @class */ (function (_super) {
1100
1108
  index = index < 0 ? 0 : index;
1101
1109
  var eventStart = this.isHeaderRows ? new Date(this.timelineEventModule.dateRender[parseInt(index.toString(), 10)].getTime()) :
1102
1110
  this.parent.getDateFromElement(tr.children[parseInt(index.toString(), 10)]);
1111
+ eventStart = this.isAllDayDrag ? util.resetTime(eventStart) : eventStart;
1103
1112
  if (this.isStepDragging) {
1104
1113
  var widthDiff = this.getWidthDiff(tr, index);
1105
1114
  if (widthDiff !== 0) {
@@ -1124,8 +1133,8 @@ var DragAndDrop = /** @class */ (function (_super) {
1124
1133
  }
1125
1134
  }
1126
1135
  else {
1127
- if (this.isCursorAhead || cursorDrag) {
1128
- var minutes = this.isTimelineDayProcess ? MINUTES_PER_DAY : this.actionObj.slotInterval;
1136
+ if ((this.isCursorAhead || cursorDrag) && !this.isAllDayDrag) {
1137
+ var minutes = this.isTimelineDayProcess || this.isAllDayDrag ? MINUTES_PER_DAY : this.actionObj.slotInterval;
1129
1138
  eventStart.setMinutes(eventStart.getMinutes() + minutes);
1130
1139
  eventStart.setMilliseconds(-(eventDuration));
1131
1140
  if (eventStart.getTime() === util.resetTime(eventStart).getTime() && eventStart.getMinutes() === 0 && eventDuration === 0) {
@@ -1133,14 +1142,14 @@ var DragAndDrop = /** @class */ (function (_super) {
1133
1142
  }
1134
1143
  }
1135
1144
  else {
1136
- eventStart.setMinutes(eventStart.getMinutes() -
1137
- (this.cursorPointIndex * (this.isTimelineDayProcess ? MINUTES_PER_DAY : this.actionObj.slotInterval)));
1145
+ eventStart.setMinutes(eventStart.getMinutes() - (this.cursorPointIndex *
1146
+ (this.isTimelineDayProcess || this.isAllDayDrag ? MINUTES_PER_DAY : this.actionObj.slotInterval)));
1138
1147
  }
1139
1148
  }
1140
1149
  if (!this.isStepDragging) {
1141
1150
  eventStart = this.calculateIntervalTime(eventStart);
1142
1151
  }
1143
- if (this.isTimelineDayProcess) {
1152
+ if (this.isTimelineDayProcess || this.isAllDayDrag) {
1144
1153
  var eventSrt = eventObj[this.parent.eventFields.startTime];
1145
1154
  eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds());
1146
1155
  }
@@ -1274,12 +1283,13 @@ var DragAndDrop = /** @class */ (function (_super) {
1274
1283
  var td = closest(e.target, '.e-work-cells');
1275
1284
  if (!isNullOrUndefined(td) && !this.isMorePopupOpened) {
1276
1285
  var targetDate = this.parent.getDateFromElement(td);
1286
+ targetDate = this.isAllDayDrag ? util.resetTime(targetDate) : targetDate;
1277
1287
  if (this.isHeaderRows) {
1278
1288
  var currentIndex = Math.floor(left / this.actionObj.cellWidth);
1279
1289
  targetDate = new Date(this.timelineEventModule.dateRender[currentIndex + index].getTime());
1280
1290
  }
1281
1291
  var timeDiff = targetDate.getTime() - event[this.parent.eventFields.startTime].getTime();
1282
- if (this.isTimelineDayProcess) {
1292
+ if (this.isTimelineDayProcess || this.isAllDayDrag) {
1283
1293
  this.cursorPointIndex = Math.abs(Math.ceil(timeDiff / (util.MS_PER_DAY)));
1284
1294
  }
1285
1295
  else {
@@ -894,9 +894,6 @@ var Schedule = /** @class */ (function (_super) {
894
894
  var selectedCells = this.getSelectedCells();
895
895
  for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
896
896
  var cell = selectedCells_1[_i];
897
- if (this.currentView !== 'Year') {
898
- cell.setAttribute('aria-selected', 'false');
899
- }
900
897
  cell.removeAttribute('tabindex');
901
898
  }
902
899
  removeClass(selectedCells, cls.SELECTED_CELL_CLASS);
@@ -914,12 +911,6 @@ var Schedule = /** @class */ (function (_super) {
914
911
  * @private
915
912
  */
916
913
  Schedule.prototype.addSelectedClass = function (cells, focusCell, isPreventScroll) {
917
- if (this.currentView !== 'Year') {
918
- for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
919
- var cell = cells_1[_i];
920
- cell.setAttribute('aria-selected', 'true');
921
- }
922
- }
923
914
  addClass(cells, cls.SELECTED_CELL_CLASS);
924
915
  if (focusCell) {
925
916
  focusCell.setAttribute('tabindex', '0');
@@ -481,7 +481,7 @@ var Month = /** @class */ (function (_super) {
481
481
  Month.prototype.getContentRows = function () {
482
482
  var trows = [];
483
483
  var tr = createElement('tr');
484
- var td = createElement('td', { attrs: { 'aria-selected': 'false' } });
484
+ var td = createElement('td');
485
485
  var slotDatas = this.getContentSlots();
486
486
  var isTimeline = this.parent.currentView === 'TimelineMonth';
487
487
  var existingGroupIndices = isTimeline ? this.getGroupIndices() : [];
@@ -240,7 +240,7 @@ var TimelineViews = /** @class */ (function (_super) {
240
240
  TimelineViews.prototype.getContentRows = function () {
241
241
  var rows = [];
242
242
  var tr = createElement('tr');
243
- var td = createElement('td', { attrs: { 'aria-selected': 'false' } });
243
+ var td = createElement('td');
244
244
  var trCount = this.getRowCount();
245
245
  var existingGroupIndices = this.getGroupIndices();
246
246
  for (var i = 0; i < trCount; i++) {
@@ -240,7 +240,7 @@ var TimelineYear = /** @class */ (function (_super) {
240
240
  skeleton: 'full', calendar: this.parent.getCalendarMode()
241
241
  });
242
242
  var td = createElement('td', {
243
- className: cls.WORK_CELLS_CLASS, attrs: { 'aria-selected': 'false', 'aria-label': announcementText }
243
+ className: cls.WORK_CELLS_CLASS, attrs: { 'aria-label': announcementText }
244
244
  });
245
245
  contentTr.appendChild(td);
246
246
  var dateHeader = createElement('div', {
@@ -546,7 +546,7 @@ var VerticalView = /** @class */ (function (_super) {
546
546
  var ntr = trEle.cloneNode();
547
547
  var appointmentExpandCollapse = createElement('div', {
548
548
  attrs: {
549
- 'tabindex': '0', 'role': 'list',
549
+ 'tabindex': '0', 'role': 'button',
550
550
  title: this.parent.localeObj.getConstant('expandAllDaySection'), 'aria-disabled': 'false',
551
551
  'aria-label': this.parent.localeObj.getConstant('expandAllDaySection')
552
552
  },
@@ -681,7 +681,7 @@ var VerticalView = /** @class */ (function (_super) {
681
681
  var _this = this;
682
682
  var rows = [];
683
683
  var tr = createElement('tr');
684
- var td = createElement('td', { attrs: { 'aria-selected': 'false' } });
684
+ var td = createElement('td');
685
685
  var existingGroupIndices = this.getGroupIndices();
686
686
  var handler = function (r) {
687
687
  var ntr = tr.cloneNode();