@syncfusion/ej2-schedule 27.1.50 → 27.1.52
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 +10 -0
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +44 -19
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +44 -19
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/schedule/actions/drag.d.ts +2 -0
- package/src/schedule/actions/drag.js +15 -4
- package/src/schedule/actions/touch.js +3 -0
- package/src/schedule/event-renderer/vertical-view.d.ts +2 -1
- package/src/schedule/event-renderer/vertical-view.js +20 -13
- package/src/schedule/popups/event-tooltip.js +1 -1
- package/src/schedule/renderer/vertical-view.js +1 -1
- package/src/schedule/renderer/view-base.js +4 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.1.
|
|
3
|
+
* version : 27.1.52
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-schedule@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-schedule@27.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-schedule@27.1.51",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-tWoxWvJfAIU2htx1DrK3slTP2JUiQ1enkPZYB+tFAcYgy+zNWv9ypSpFDIbFKtk5cSZs+fSPNMGHW5cZYEYUjA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-schedule",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-schedule",
|
|
24
24
|
"/@syncfusion/ej2-vue-schedule"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-27.1.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-27.1.51.tgz",
|
|
27
|
+
"_shasum": "0f6618c8304d52cd417e3d37cda1c0af19d9b949",
|
|
28
28
|
"_spec": "@syncfusion/ej2-schedule@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~27.1.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~27.1.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~27.1.
|
|
41
|
-
"@syncfusion/ej2-data": "~27.1.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~27.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~27.1.52",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~27.1.51",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~27.1.52",
|
|
41
|
+
"@syncfusion/ej2-data": "~27.1.52",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~27.1.52",
|
|
43
43
|
"@syncfusion/ej2-excel-export": "~27.1.50",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~27.1.50",
|
|
45
45
|
"@syncfusion/ej2-lists": "~27.1.50",
|
|
46
|
-
"@syncfusion/ej2-navigations": "~27.1.
|
|
46
|
+
"@syncfusion/ej2-navigations": "~27.1.52",
|
|
47
47
|
"@syncfusion/ej2-popups": "~27.1.50"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
74
74
|
},
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "27.1.
|
|
76
|
+
"version": "27.1.52",
|
|
77
77
|
"sideEffects": false
|
|
78
78
|
}
|
|
@@ -26,6 +26,8 @@ export declare class DragAndDrop extends ActionBase {
|
|
|
26
26
|
private dragArea;
|
|
27
27
|
private enableCurrentViewDrag;
|
|
28
28
|
private isPreventMultiDrag;
|
|
29
|
+
private slotsUptoCursor;
|
|
30
|
+
private eleTop;
|
|
29
31
|
wireDragEvent(element: HTMLElement): void;
|
|
30
32
|
setDragArea(): void;
|
|
31
33
|
private dragHelper;
|
|
@@ -51,14 +51,17 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
51
51
|
_this.isCursorAhead = false;
|
|
52
52
|
_this.enableCurrentViewDrag = false;
|
|
53
53
|
_this.isPreventMultiDrag = false;
|
|
54
|
+
_this.slotsUptoCursor = -1;
|
|
55
|
+
_this.eleTop = 0;
|
|
54
56
|
return _this;
|
|
55
57
|
}
|
|
56
58
|
DragAndDrop.prototype.wireDragEvent = function (element) {
|
|
59
|
+
var isVerticalView = ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1;
|
|
57
60
|
new Draggable(element, {
|
|
58
61
|
abort: '.' + cls.EVENT_RESIZE_CLASS,
|
|
59
62
|
clone: true,
|
|
60
63
|
isDragScroll: true,
|
|
61
|
-
enableTailMode: (this.parent.eventDragArea) ? true : false,
|
|
64
|
+
enableTailMode: (this.parent.eventDragArea || isVerticalView) ? true : false,
|
|
62
65
|
cursorAt: (this.parent.eventDragArea) ? { left: -20, top: -20 } : { left: 0, top: 0 },
|
|
63
66
|
dragArea: this.dragArea,
|
|
64
67
|
dragStart: this.dragStart.bind(this),
|
|
@@ -82,6 +85,8 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
82
85
|
}
|
|
83
86
|
this.setDragActionDefaultValues();
|
|
84
87
|
this.actionObj.element = e.element;
|
|
88
|
+
this.eleTop = parseFloat(this.actionObj.element.style.top);
|
|
89
|
+
this.slotsUptoCursor = -1;
|
|
85
90
|
this.actionObj.action = 'drag';
|
|
86
91
|
var elements = [];
|
|
87
92
|
if (!this.parent.allowMultiDrag || isNullOrUndefined(this.parent.selectedElements) || this.parent.selectedElements.length === 0 ||
|
|
@@ -160,7 +165,13 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
160
165
|
}
|
|
161
166
|
var top_1 = parseInt(e.top, 10);
|
|
162
167
|
top_1 = top_1 < 0 ? 0 : top_1;
|
|
163
|
-
|
|
168
|
+
if (this.slotsUptoCursor < 0) {
|
|
169
|
+
var cellsCountUptoCursor = Math.floor(top_1 / cellHeight);
|
|
170
|
+
var cellsCountUptoEleTop = Math.floor(this.eleTop / cellHeight);
|
|
171
|
+
this.slotsUptoCursor = cellsCountUptoCursor - cellsCountUptoEleTop;
|
|
172
|
+
}
|
|
173
|
+
top_1 = (Math.floor((top_1 + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
|
|
174
|
+
topValue = formatUnit(top_1 < 0 ? 0 : top_1);
|
|
164
175
|
var scrollHeight = this.parent.element.querySelector('.e-content-wrap').scrollHeight;
|
|
165
176
|
var cloneBottom = parseInt(topValue, 10) + this.actionObj.clone.offsetHeight;
|
|
166
177
|
if (cloneBottom > scrollHeight) {
|
|
@@ -595,7 +606,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
595
606
|
(dragArea.scrollTop + dragArea.offsetHeight - this.actionObj.clone.offsetHeight + window.pageYOffset) +
|
|
596
607
|
(this.actionObj.clone.offsetHeight - this.heightUptoCursorPoint);
|
|
597
608
|
offsetTop = Math.round(offsetTop / this.actionObj.cellHeight) * this.actionObj.cellHeight;
|
|
598
|
-
if (dragArea.scrollTop > 0) {
|
|
609
|
+
if (dragArea.scrollTop > 0 && offsetTop < dragArea.scrollHeight) {
|
|
599
610
|
this.actionObj.clone.style.top = formatUnit(offsetTop);
|
|
600
611
|
}
|
|
601
612
|
}
|
|
@@ -843,7 +854,7 @@ var DragAndDrop = /** @class */ (function (_super) {
|
|
|
843
854
|
var appHeight = this.parent.activeViewOptions.timeScale.enable ? this.verticalEvent.getHeight(eStart, eEnd) :
|
|
844
855
|
this.actionObj.element.offsetHeight;
|
|
845
856
|
var topValue = this.parent.activeViewOptions.timeScale.enable ?
|
|
846
|
-
this.verticalEvent.getTopValue(eStart
|
|
857
|
+
this.verticalEvent.getTopValue(eStart) : this.actionObj.element.offsetTop;
|
|
847
858
|
if (isNullOrUndefined(index)) {
|
|
848
859
|
if (i === 0) {
|
|
849
860
|
this.actionObj.clone.style.top = formatUnit(topValue);
|
|
@@ -212,6 +212,9 @@ var ScheduleTouch = /** @class */ (function () {
|
|
|
212
212
|
this.element.style.transform = 'translatex(' + (this.parent.enableRtl ? prevWidth : -this.currentPanel.element.offsetLeft) + 'px)';
|
|
213
213
|
};
|
|
214
214
|
ScheduleTouch.prototype.onTransitionEnd = function () {
|
|
215
|
+
if (!isNullOrUndefined(this.element) && !this.element.classList.contains(cls.TRANSLATE_CLASS)) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
215
218
|
removeClass([this.element], cls.TRANSLATE_CLASS);
|
|
216
219
|
this.element.style.transitionDuration = '';
|
|
217
220
|
this.element.style.transform = '';
|
|
@@ -44,7 +44,8 @@ export declare class VerticalEvent extends EventBase {
|
|
|
44
44
|
renderNormalEvents(eventObj: Record<string, any>, dayIndex: number, resource: number, dayCount: number, inline?: boolean): void;
|
|
45
45
|
private getEventWidth;
|
|
46
46
|
private getEventLeft;
|
|
47
|
-
|
|
47
|
+
private getStartEndHours;
|
|
48
|
+
getTopValue(date: Date): number;
|
|
48
49
|
private getOverlapIndex;
|
|
49
50
|
private adjustOverlapElements;
|
|
50
51
|
private setAllDayRowHeight;
|
|
@@ -35,8 +35,8 @@ var VerticalEvent = /** @class */ (function (_super) {
|
|
|
35
35
|
_this.slotCount = _this.parent.activeViewOptions.timeScale.slotCount;
|
|
36
36
|
_this.interval = _this.parent.activeViewOptions.timeScale.interval;
|
|
37
37
|
_this.allDayLevel = 0;
|
|
38
|
-
_this.startHour = _this.parent.
|
|
39
|
-
_this.endHour = _this.parent.
|
|
38
|
+
_this.startHour = _this.getStartEndHours(_this.parent.activeViewOptions.startHour);
|
|
39
|
+
_this.endHour = _this.getStartEndHours(_this.parent.activeViewOptions.endHour);
|
|
40
40
|
_this.element = _this.parent.activeView.getPanel();
|
|
41
41
|
_this.fields = _this.parent.eventFields;
|
|
42
42
|
_this.animation = new Animation({ progress: _this.animationUiUpdate.bind(_this) });
|
|
@@ -170,7 +170,7 @@ var VerticalEvent = /** @class */ (function (_super) {
|
|
|
170
170
|
var renderDates = this.dateRender[parseInt(resource.toString(), 10)];
|
|
171
171
|
for (var day = 0, length_1 = renderDates.length; day < length_1; day++) {
|
|
172
172
|
var startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
173
|
-
var endDate = util.addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
173
|
+
var endDate = util.resetTime(util.addDays(renderDates[parseInt(day.toString(), 10)], 1));
|
|
174
174
|
var filterEvents = this.filterEvents(startDate, endDate, this.parent.blockProcessed, this.resources[parseInt(resource.toString(), 10)]);
|
|
175
175
|
for (var _a = 0, filterEvents_1 = filterEvents; _a < filterEvents_1.length; _a++) {
|
|
176
176
|
var event_1 = filterEvents_1[_a];
|
|
@@ -201,7 +201,7 @@ var VerticalEvent = /** @class */ (function (_super) {
|
|
|
201
201
|
}
|
|
202
202
|
else {
|
|
203
203
|
blockHeight = formatUnit(this.getHeight(eStart, eEnd));
|
|
204
|
-
blockTop = formatUnit(this.getTopValue(eStart
|
|
204
|
+
blockTop = formatUnit(this.getTopValue(eStart));
|
|
205
205
|
}
|
|
206
206
|
var appointmentElement = this.createBlockAppointmentElement(eventObj, resource, this.isResourceEventTemplate);
|
|
207
207
|
setStyleAttribute(appointmentElement, { 'width': '100%', 'height': blockHeight, 'top': blockTop });
|
|
@@ -234,7 +234,7 @@ var VerticalEvent = /** @class */ (function (_super) {
|
|
|
234
234
|
renderDates[parseInt(day.toString(), 10)] <= renderedDate[renderedDate.length - 1]; day++) {
|
|
235
235
|
this_1.renderedEvents = [];
|
|
236
236
|
var startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
237
|
-
var endDate = util.addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
237
|
+
var endDate = util.resetTime(util.addDays(renderDates[parseInt(day.toString(), 10)], 1));
|
|
238
238
|
var filterEvents = this_1.filterEvents(startDate, endDate, eventCollection, this_1.resources[parseInt(resource.toString(), 10)]);
|
|
239
239
|
if (isRender) {
|
|
240
240
|
for (var _i = 0, filterEvents_2 = filterEvents; _i < filterEvents_2.length; _i++) {
|
|
@@ -579,7 +579,7 @@ var VerticalEvent = /** @class */ (function (_super) {
|
|
|
579
579
|
if (eStart <= eEnd && isValidEvent && this.isWorkDayAvailable(resource, eStart)) {
|
|
580
580
|
var appHeight = record.isSpanned.isSameDuration ? this.cellHeight : this.getHeight(eStart, eEnd);
|
|
581
581
|
if (eStart.getTime() >= schedule.startHour.getTime()) {
|
|
582
|
-
topValue = this.getTopValue(eStart
|
|
582
|
+
topValue = this.getTopValue(eStart);
|
|
583
583
|
}
|
|
584
584
|
var appIndex = this.getOverlapIndex(record, dayIndex, false, resource);
|
|
585
585
|
record.Index = appIndex;
|
|
@@ -640,13 +640,20 @@ var VerticalEvent = /** @class */ (function (_super) {
|
|
|
640
640
|
var tempLeft = (parseFloat(appWidth) + 1) * index;
|
|
641
641
|
return (tempLeft > 99 ? 99 : tempLeft) + '%';
|
|
642
642
|
};
|
|
643
|
-
VerticalEvent.prototype.
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
643
|
+
VerticalEvent.prototype.getStartEndHours = function (startEndTime) {
|
|
644
|
+
if (!isNullOrUndefined(startEndTime) && startEndTime !== '') {
|
|
645
|
+
var startEndDate = new Date(2000, 0, 0, 0);
|
|
646
|
+
var timeString = startEndTime.split(':');
|
|
647
|
+
if (timeString.length === 2) {
|
|
648
|
+
startEndDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0);
|
|
649
|
+
}
|
|
650
|
+
return startEndDate;
|
|
651
|
+
}
|
|
652
|
+
return null;
|
|
653
|
+
};
|
|
654
|
+
VerticalEvent.prototype.getTopValue = function (date) {
|
|
655
|
+
var startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
656
|
+
var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
650
657
|
return (this.parent.activeViewOptions.timeScale.enable) ? ((diffInMinutes * this.cellHeight * this.slotCount) / this.interval) : 0;
|
|
651
658
|
};
|
|
652
659
|
VerticalEvent.prototype.getOverlapIndex = function (record, day, isAllDay, resource) {
|
|
@@ -136,7 +136,7 @@ var EventTooltip = /** @class */ (function () {
|
|
|
136
136
|
this.parent.resetTemplates(['tooltipTemplate', 'headerTooltipTemplate']);
|
|
137
137
|
};
|
|
138
138
|
EventTooltip.prototype.setContent = function (content) {
|
|
139
|
-
this.tooltipObj.setProperties({ content: content }, true);
|
|
139
|
+
this.tooltipObj.setProperties({ content: content, windowCollision: true }, true);
|
|
140
140
|
};
|
|
141
141
|
EventTooltip.prototype.close = function () {
|
|
142
142
|
this.tooltipObj.close();
|
|
@@ -369,7 +369,7 @@ var VerticalView = /** @class */ (function (_super) {
|
|
|
369
369
|
}
|
|
370
370
|
};
|
|
371
371
|
VerticalView.prototype.getTopFromDateTime = function (date) {
|
|
372
|
-
var startHour = this.
|
|
372
|
+
var startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
373
373
|
var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
374
374
|
return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) /
|
|
375
375
|
this.parent.activeViewOptions.timeScale.interval;
|
|
@@ -264,6 +264,10 @@ var ViewBase = /** @class */ (function () {
|
|
|
264
264
|
}
|
|
265
265
|
startHour.setMilliseconds(0);
|
|
266
266
|
endHour.setMilliseconds(0);
|
|
267
|
+
if (util.resetTime(date).getTime() !== util.resetTime(startHour).getTime()) {
|
|
268
|
+
startHour = new Date(2000, 0, 0, startHour.getHours(), startHour.getMinutes(), startHour.getMilliseconds());
|
|
269
|
+
endHour = new Date(2000, 0, 0, endHour.getHours(), endHour.getMinutes(), endHour.getMilliseconds());
|
|
270
|
+
}
|
|
267
271
|
return !(util.getDateInMs(date) < util.getDateInMs(startHour) || util.getDateInMs(date) >= util.getDateInMs(endHour) ||
|
|
268
272
|
!this.isWorkDay(date, workDays));
|
|
269
273
|
};
|