@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.
- package/dist/ej2-schedule.min.js +1 -10
- package/dist/ej2-schedule.umd.min.js +1 -10
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +31 -29
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +31 -30
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +1 -10
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +9 -10
- package/src/schedule/actions/drag.d.ts +1 -0
- package/src/schedule/actions/drag.js +26 -16
- package/src/schedule/base/schedule.js +0 -9
- package/src/schedule/renderer/month.js +1 -1
- package/src/schedule/renderer/timeline-view.js +1 -1
- package/src/schedule/renderer/timeline-year.js +1 -1
- package/src/schedule/renderer/vertical-view.js +2 -2
|
@@ -18711,9 +18711,6 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18711
18711
|
var selectedCells = this.getSelectedCells();
|
|
18712
18712
|
for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
|
|
18713
18713
|
var cell = selectedCells_1[_i];
|
|
18714
|
-
if (this.currentView !== 'Year') {
|
|
18715
|
-
cell.setAttribute('aria-selected', 'false');
|
|
18716
|
-
}
|
|
18717
18714
|
cell.removeAttribute('tabindex');
|
|
18718
18715
|
}
|
|
18719
18716
|
removeClass(selectedCells, SELECTED_CELL_CLASS);
|
|
@@ -18731,12 +18728,6 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
18731
18728
|
* @private
|
|
18732
18729
|
*/
|
|
18733
18730
|
Schedule.prototype.addSelectedClass = function (cells, focusCell, isPreventScroll) {
|
|
18734
|
-
if (this.currentView !== 'Year') {
|
|
18735
|
-
for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
|
|
18736
|
-
var cell = cells_1[_i];
|
|
18737
|
-
cell.setAttribute('aria-selected', 'true');
|
|
18738
|
-
}
|
|
18739
|
-
}
|
|
18740
18731
|
addClass(cells, SELECTED_CELL_CLASS);
|
|
18741
18732
|
if (focusCell) {
|
|
18742
18733
|
focusCell.setAttribute('tabindex', '0');
|
|
@@ -22834,15 +22825,15 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22834
22825
|
_this.isPreventMultiDrag = false;
|
|
22835
22826
|
_this.slotsUptoCursor = -1;
|
|
22836
22827
|
_this.eleTop = 0;
|
|
22828
|
+
_this.distanceUptoCursor = 0;
|
|
22837
22829
|
return _this;
|
|
22838
22830
|
}
|
|
22839
22831
|
DragAndDrop.prototype.wireDragEvent = function (element) {
|
|
22840
|
-
var isVerticalView = ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1;
|
|
22841
22832
|
new Draggable(element, {
|
|
22842
22833
|
abort: '.' + EVENT_RESIZE_CLASS,
|
|
22843
22834
|
clone: true,
|
|
22844
22835
|
isDragScroll: true,
|
|
22845
|
-
enableTailMode:
|
|
22836
|
+
enableTailMode: this.parent.eventDragArea ? true : false,
|
|
22846
22837
|
cursorAt: (this.parent.eventDragArea) ? { left: -20, top: -20 } : { left: 0, top: 0 },
|
|
22847
22838
|
dragArea: this.dragArea,
|
|
22848
22839
|
dragStart: this.dragStart.bind(this),
|
|
@@ -22866,8 +22857,12 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22866
22857
|
}
|
|
22867
22858
|
this.setDragActionDefaultValues();
|
|
22868
22859
|
this.actionObj.element = e.element;
|
|
22869
|
-
|
|
22870
|
-
|
|
22860
|
+
if (e.sender && ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1) {
|
|
22861
|
+
var eventArgs = this.parent.eventBase.getPageCoordinates(e.sender);
|
|
22862
|
+
this.distanceUptoCursor = eventArgs.clientY - this.actionObj.element.getBoundingClientRect().top;
|
|
22863
|
+
this.eleTop = parseFloat(this.actionObj.element.style.top);
|
|
22864
|
+
this.slotsUptoCursor = -1;
|
|
22865
|
+
}
|
|
22871
22866
|
this.actionObj.action = 'drag';
|
|
22872
22867
|
var elements = [];
|
|
22873
22868
|
if (!this.parent.allowMultiDrag || isNullOrUndefined(this.parent.selectedElements) || this.parent.selectedElements.length === 0 ||
|
|
@@ -22947,11 +22942,11 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22947
22942
|
var top_1 = parseInt(e.top, 10);
|
|
22948
22943
|
top_1 = top_1 < 0 ? 0 : top_1;
|
|
22949
22944
|
if (this.slotsUptoCursor < 0) {
|
|
22950
|
-
var cellsCountUptoCursor = Math.floor(
|
|
22945
|
+
var cellsCountUptoCursor = Math.floor((this.eleTop + this.distanceUptoCursor) / cellHeight);
|
|
22951
22946
|
var cellsCountUptoEleTop = Math.floor(this.eleTop / cellHeight);
|
|
22952
22947
|
this.slotsUptoCursor = cellsCountUptoCursor - cellsCountUptoEleTop;
|
|
22953
22948
|
}
|
|
22954
|
-
top_1 = (Math.floor((top_1 + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
|
|
22949
|
+
top_1 = (Math.floor((top_1 + this.distanceUptoCursor + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
|
|
22955
22950
|
topValue = formatUnit(top_1 < 0 ? 0 : top_1);
|
|
22956
22951
|
var scrollHeight = this.parent.element.querySelector('.e-content-wrap').scrollHeight;
|
|
22957
22952
|
var cloneBottom = parseInt(topValue, 10) + this.actionObj.clone.offsetHeight;
|
|
@@ -23038,7 +23033,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
23038
23033
|
rows[rows.length - 1].option !== 'Date';
|
|
23039
23034
|
_this.isTimelineDayProcess = !_this.parent.activeViewOptions.timeScale.enable || _this.isHeaderRows ||
|
|
23040
23035
|
_this.parent.currentView === 'TimelineMonth' || (rows.length > 0 && rows[rows.length - 1].option === 'Date');
|
|
23041
|
-
_this.
|
|
23036
|
+
_this.isAllDayDrag = !_this.isTimelineDayProcess && eventObj[_this.parent.eventFields.isAllDay];
|
|
23037
|
+
_this.isStepDragging = !_this.isTimelineDayProcess && !_this.isAllDayDrag &&
|
|
23038
|
+
(_this.actionObj.slotInterval !== _this.actionObj.interval);
|
|
23042
23039
|
if (_this.isTimelineDayProcess) {
|
|
23043
23040
|
_this.timelineEventModule = new TimelineEvent(_this.parent, 'day');
|
|
23044
23041
|
}
|
|
@@ -23108,9 +23105,11 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
23108
23105
|
this.heightUptoCursorPoint = (this.heightUptoCursorPoint === 0) ?
|
|
23109
23106
|
Math.ceil((Math.abs(this.actionObj.clone.getBoundingClientRect().top - this.actionObj.Y) / this.heightPerMinute)) *
|
|
23110
23107
|
this.heightPerMinute : this.heightUptoCursorPoint;
|
|
23111
|
-
|
|
23112
|
-
this.
|
|
23113
|
-
|
|
23108
|
+
if (['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1) {
|
|
23109
|
+
this.isAllDayDrag = (this.parent.activeViewOptions.timeScale.enable) ?
|
|
23110
|
+
this.actionObj.clone.classList.contains(ALLDAY_APPOINTMENT_CLASS) :
|
|
23111
|
+
this.actionObj.event[this.parent.eventFields.isAllDay];
|
|
23112
|
+
}
|
|
23114
23113
|
if (this.isStepDragging && this.minDiff === 0) {
|
|
23115
23114
|
this.calculateMinutesDiff(eventObj);
|
|
23116
23115
|
}
|
|
@@ -23881,6 +23880,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
23881
23880
|
index = index < 0 ? 0 : index;
|
|
23882
23881
|
var eventStart = this.isHeaderRows ? new Date(this.timelineEventModule.dateRender[parseInt(index.toString(), 10)].getTime()) :
|
|
23883
23882
|
this.parent.getDateFromElement(tr.children[parseInt(index.toString(), 10)]);
|
|
23883
|
+
eventStart = this.isAllDayDrag ? resetTime(eventStart) : eventStart;
|
|
23884
23884
|
if (this.isStepDragging) {
|
|
23885
23885
|
var widthDiff = this.getWidthDiff(tr, index);
|
|
23886
23886
|
if (widthDiff !== 0) {
|
|
@@ -23905,8 +23905,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
23905
23905
|
}
|
|
23906
23906
|
}
|
|
23907
23907
|
else {
|
|
23908
|
-
if (this.isCursorAhead || cursorDrag) {
|
|
23909
|
-
var minutes = this.isTimelineDayProcess ? MINUTES_PER_DAY : this.actionObj.slotInterval;
|
|
23908
|
+
if ((this.isCursorAhead || cursorDrag) && !this.isAllDayDrag) {
|
|
23909
|
+
var minutes = this.isTimelineDayProcess || this.isAllDayDrag ? MINUTES_PER_DAY : this.actionObj.slotInterval;
|
|
23910
23910
|
eventStart.setMinutes(eventStart.getMinutes() + minutes);
|
|
23911
23911
|
eventStart.setMilliseconds(-(eventDuration));
|
|
23912
23912
|
if (eventStart.getTime() === resetTime(eventStart).getTime() && eventStart.getMinutes() === 0 && eventDuration === 0) {
|
|
@@ -23914,14 +23914,14 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
23914
23914
|
}
|
|
23915
23915
|
}
|
|
23916
23916
|
else {
|
|
23917
|
-
eventStart.setMinutes(eventStart.getMinutes() -
|
|
23918
|
-
(this.
|
|
23917
|
+
eventStart.setMinutes(eventStart.getMinutes() - (this.cursorPointIndex *
|
|
23918
|
+
(this.isTimelineDayProcess || this.isAllDayDrag ? MINUTES_PER_DAY : this.actionObj.slotInterval)));
|
|
23919
23919
|
}
|
|
23920
23920
|
}
|
|
23921
23921
|
if (!this.isStepDragging) {
|
|
23922
23922
|
eventStart = this.calculateIntervalTime(eventStart);
|
|
23923
23923
|
}
|
|
23924
|
-
if (this.isTimelineDayProcess) {
|
|
23924
|
+
if (this.isTimelineDayProcess || this.isAllDayDrag) {
|
|
23925
23925
|
var eventSrt = eventObj[this.parent.eventFields.startTime];
|
|
23926
23926
|
eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds());
|
|
23927
23927
|
}
|
|
@@ -24055,12 +24055,13 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
24055
24055
|
var td = closest(e.target, '.e-work-cells');
|
|
24056
24056
|
if (!isNullOrUndefined(td) && !this.isMorePopupOpened) {
|
|
24057
24057
|
var targetDate = this.parent.getDateFromElement(td);
|
|
24058
|
+
targetDate = this.isAllDayDrag ? resetTime(targetDate) : targetDate;
|
|
24058
24059
|
if (this.isHeaderRows) {
|
|
24059
24060
|
var currentIndex = Math.floor(left / this.actionObj.cellWidth);
|
|
24060
24061
|
targetDate = new Date(this.timelineEventModule.dateRender[currentIndex + index].getTime());
|
|
24061
24062
|
}
|
|
24062
24063
|
var timeDiff = targetDate.getTime() - event[this.parent.eventFields.startTime].getTime();
|
|
24063
|
-
if (this.isTimelineDayProcess) {
|
|
24064
|
+
if (this.isTimelineDayProcess || this.isAllDayDrag) {
|
|
24064
24065
|
this.cursorPointIndex = Math.abs(Math.ceil(timeDiff / (MS_PER_DAY)));
|
|
24065
24066
|
}
|
|
24066
24067
|
else {
|
|
@@ -25362,7 +25363,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25362
25363
|
var ntr = trEle.cloneNode();
|
|
25363
25364
|
var appointmentExpandCollapse = createElement('div', {
|
|
25364
25365
|
attrs: {
|
|
25365
|
-
'tabindex': '0', 'role': '
|
|
25366
|
+
'tabindex': '0', 'role': 'button',
|
|
25366
25367
|
title: this.parent.localeObj.getConstant('expandAllDaySection'), 'aria-disabled': 'false',
|
|
25367
25368
|
'aria-label': this.parent.localeObj.getConstant('expandAllDaySection')
|
|
25368
25369
|
},
|
|
@@ -25497,7 +25498,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25497
25498
|
var _this = this;
|
|
25498
25499
|
var rows = [];
|
|
25499
25500
|
var tr = createElement('tr');
|
|
25500
|
-
var td = createElement('td'
|
|
25501
|
+
var td = createElement('td');
|
|
25501
25502
|
var existingGroupIndices = this.getGroupIndices();
|
|
25502
25503
|
var handler = function (r) {
|
|
25503
25504
|
var ntr = tr.cloneNode();
|
|
@@ -26305,7 +26306,7 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
26305
26306
|
Month.prototype.getContentRows = function () {
|
|
26306
26307
|
var trows = [];
|
|
26307
26308
|
var tr = createElement('tr');
|
|
26308
|
-
var td = createElement('td'
|
|
26309
|
+
var td = createElement('td');
|
|
26309
26310
|
var slotDatas = this.getContentSlots();
|
|
26310
26311
|
var isTimeline = this.parent.currentView === 'TimelineMonth';
|
|
26311
26312
|
var existingGroupIndices = isTimeline ? this.getGroupIndices() : [];
|
|
@@ -28464,7 +28465,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
28464
28465
|
TimelineViews.prototype.getContentRows = function () {
|
|
28465
28466
|
var rows = [];
|
|
28466
28467
|
var tr = createElement('tr');
|
|
28467
|
-
var td = createElement('td'
|
|
28468
|
+
var td = createElement('td');
|
|
28468
28469
|
var trCount = this.getRowCount();
|
|
28469
28470
|
var existingGroupIndices = this.getGroupIndices();
|
|
28470
28471
|
for (var i = 0; i < trCount; i++) {
|
|
@@ -28930,7 +28931,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
28930
28931
|
skeleton: 'full', calendar: this.parent.getCalendarMode()
|
|
28931
28932
|
});
|
|
28932
28933
|
var td = createElement('td', {
|
|
28933
|
-
className: WORK_CELLS_CLASS, attrs: { 'aria-
|
|
28934
|
+
className: WORK_CELLS_CLASS, attrs: { 'aria-label': announcementText }
|
|
28934
28935
|
});
|
|
28935
28936
|
contentTr.appendChild(td);
|
|
28936
28937
|
var dateHeader = createElement('div', {
|