@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
|
@@ -2028,6 +2028,9 @@ var ScheduleTouch = /** @__PURE__ @class */ (function () {
|
|
|
2028
2028
|
this.element.style.transform = 'translatex(' + (this.parent.enableRtl ? prevWidth : -this.currentPanel.element.offsetLeft) + 'px)';
|
|
2029
2029
|
};
|
|
2030
2030
|
ScheduleTouch.prototype.onTransitionEnd = function () {
|
|
2031
|
+
if (!isNullOrUndefined(this.element) && !this.element.classList.contains(TRANSLATE_CLASS)) {
|
|
2032
|
+
return;
|
|
2033
|
+
}
|
|
2031
2034
|
removeClass([this.element], TRANSLATE_CLASS);
|
|
2032
2035
|
this.element.style.transitionDuration = '';
|
|
2033
2036
|
this.element.style.transform = '';
|
|
@@ -6972,8 +6975,8 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6972
6975
|
_this.slotCount = _this.parent.activeViewOptions.timeScale.slotCount;
|
|
6973
6976
|
_this.interval = _this.parent.activeViewOptions.timeScale.interval;
|
|
6974
6977
|
_this.allDayLevel = 0;
|
|
6975
|
-
_this.startHour = _this.parent.
|
|
6976
|
-
_this.endHour = _this.parent.
|
|
6978
|
+
_this.startHour = _this.getStartEndHours(_this.parent.activeViewOptions.startHour);
|
|
6979
|
+
_this.endHour = _this.getStartEndHours(_this.parent.activeViewOptions.endHour);
|
|
6977
6980
|
_this.element = _this.parent.activeView.getPanel();
|
|
6978
6981
|
_this.fields = _this.parent.eventFields;
|
|
6979
6982
|
_this.animation = new Animation({ progress: _this.animationUiUpdate.bind(_this) });
|
|
@@ -7107,7 +7110,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7107
7110
|
var renderDates = this.dateRender[parseInt(resource.toString(), 10)];
|
|
7108
7111
|
for (var day = 0, length_1 = renderDates.length; day < length_1; day++) {
|
|
7109
7112
|
var startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
7110
|
-
var endDate = addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
7113
|
+
var endDate = resetTime(addDays(renderDates[parseInt(day.toString(), 10)], 1));
|
|
7111
7114
|
var filterEvents = this.filterEvents(startDate, endDate, this.parent.blockProcessed, this.resources[parseInt(resource.toString(), 10)]);
|
|
7112
7115
|
for (var _a = 0, filterEvents_1 = filterEvents; _a < filterEvents_1.length; _a++) {
|
|
7113
7116
|
var event_1 = filterEvents_1[_a];
|
|
@@ -7138,7 +7141,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7138
7141
|
}
|
|
7139
7142
|
else {
|
|
7140
7143
|
blockHeight = formatUnit(this.getHeight(eStart, eEnd));
|
|
7141
|
-
blockTop = formatUnit(this.getTopValue(eStart
|
|
7144
|
+
blockTop = formatUnit(this.getTopValue(eStart));
|
|
7142
7145
|
}
|
|
7143
7146
|
var appointmentElement = this.createBlockAppointmentElement(eventObj, resource, this.isResourceEventTemplate);
|
|
7144
7147
|
setStyleAttribute(appointmentElement, { 'width': '100%', 'height': blockHeight, 'top': blockTop });
|
|
@@ -7171,7 +7174,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7171
7174
|
renderDates[parseInt(day.toString(), 10)] <= renderedDate[renderedDate.length - 1]; day++) {
|
|
7172
7175
|
this_1.renderedEvents = [];
|
|
7173
7176
|
var startDate = new Date(renderDates[parseInt(day.toString(), 10)].getTime());
|
|
7174
|
-
var endDate = addDays(renderDates[parseInt(day.toString(), 10)], 1);
|
|
7177
|
+
var endDate = resetTime(addDays(renderDates[parseInt(day.toString(), 10)], 1));
|
|
7175
7178
|
var filterEvents = this_1.filterEvents(startDate, endDate, eventCollection, this_1.resources[parseInt(resource.toString(), 10)]);
|
|
7176
7179
|
if (isRender) {
|
|
7177
7180
|
for (var _i = 0, filterEvents_2 = filterEvents; _i < filterEvents_2.length; _i++) {
|
|
@@ -7516,7 +7519,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7516
7519
|
if (eStart <= eEnd && isValidEvent && this.isWorkDayAvailable(resource, eStart)) {
|
|
7517
7520
|
var appHeight = record.isSpanned.isSameDuration ? this.cellHeight : this.getHeight(eStart, eEnd);
|
|
7518
7521
|
if (eStart.getTime() >= schedule.startHour.getTime()) {
|
|
7519
|
-
topValue = this.getTopValue(eStart
|
|
7522
|
+
topValue = this.getTopValue(eStart);
|
|
7520
7523
|
}
|
|
7521
7524
|
var appIndex = this.getOverlapIndex(record, dayIndex, false, resource);
|
|
7522
7525
|
record.Index = appIndex;
|
|
@@ -7577,13 +7580,20 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7577
7580
|
var tempLeft = (parseFloat(appWidth) + 1) * index;
|
|
7578
7581
|
return (tempLeft > 99 ? 99 : tempLeft) + '%';
|
|
7579
7582
|
};
|
|
7580
|
-
VerticalEvent.prototype.
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7583
|
+
VerticalEvent.prototype.getStartEndHours = function (startEndTime) {
|
|
7584
|
+
if (!isNullOrUndefined(startEndTime) && startEndTime !== '') {
|
|
7585
|
+
var startEndDate = new Date(2000, 0, 0, 0);
|
|
7586
|
+
var timeString = startEndTime.split(':');
|
|
7587
|
+
if (timeString.length === 2) {
|
|
7588
|
+
startEndDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0);
|
|
7589
|
+
}
|
|
7590
|
+
return startEndDate;
|
|
7591
|
+
}
|
|
7592
|
+
return null;
|
|
7593
|
+
};
|
|
7594
|
+
VerticalEvent.prototype.getTopValue = function (date) {
|
|
7595
|
+
var startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
7596
|
+
var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
7587
7597
|
return (this.parent.activeViewOptions.timeScale.enable) ? ((diffInMinutes * this.cellHeight * this.slotCount) / this.interval) : 0;
|
|
7588
7598
|
};
|
|
7589
7599
|
VerticalEvent.prototype.getOverlapIndex = function (record, day, isAllDay, resource) {
|
|
@@ -11040,7 +11050,7 @@ var EventTooltip = /** @__PURE__ @class */ (function () {
|
|
|
11040
11050
|
this.parent.resetTemplates(['tooltipTemplate', 'headerTooltipTemplate']);
|
|
11041
11051
|
};
|
|
11042
11052
|
EventTooltip.prototype.setContent = function (content) {
|
|
11043
|
-
this.tooltipObj.setProperties({ content: content }, true);
|
|
11053
|
+
this.tooltipObj.setProperties({ content: content, windowCollision: true }, true);
|
|
11044
11054
|
};
|
|
11045
11055
|
EventTooltip.prototype.close = function () {
|
|
11046
11056
|
this.tooltipObj.close();
|
|
@@ -22345,14 +22355,17 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22345
22355
|
_this.isCursorAhead = false;
|
|
22346
22356
|
_this.enableCurrentViewDrag = false;
|
|
22347
22357
|
_this.isPreventMultiDrag = false;
|
|
22358
|
+
_this.slotsUptoCursor = -1;
|
|
22359
|
+
_this.eleTop = 0;
|
|
22348
22360
|
return _this;
|
|
22349
22361
|
}
|
|
22350
22362
|
DragAndDrop.prototype.wireDragEvent = function (element) {
|
|
22363
|
+
var isVerticalView = ['Day', 'Week', 'WorkWeek'].indexOf(this.parent.currentView) > -1;
|
|
22351
22364
|
new Draggable(element, {
|
|
22352
22365
|
abort: '.' + EVENT_RESIZE_CLASS,
|
|
22353
22366
|
clone: true,
|
|
22354
22367
|
isDragScroll: true,
|
|
22355
|
-
enableTailMode: (this.parent.eventDragArea) ? true : false,
|
|
22368
|
+
enableTailMode: (this.parent.eventDragArea || isVerticalView) ? true : false,
|
|
22356
22369
|
cursorAt: (this.parent.eventDragArea) ? { left: -20, top: -20 } : { left: 0, top: 0 },
|
|
22357
22370
|
dragArea: this.dragArea,
|
|
22358
22371
|
dragStart: this.dragStart.bind(this),
|
|
@@ -22376,6 +22389,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22376
22389
|
}
|
|
22377
22390
|
this.setDragActionDefaultValues();
|
|
22378
22391
|
this.actionObj.element = e.element;
|
|
22392
|
+
this.eleTop = parseFloat(this.actionObj.element.style.top);
|
|
22393
|
+
this.slotsUptoCursor = -1;
|
|
22379
22394
|
this.actionObj.action = 'drag';
|
|
22380
22395
|
var elements = [];
|
|
22381
22396
|
if (!this.parent.allowMultiDrag || isNullOrUndefined(this.parent.selectedElements) || this.parent.selectedElements.length === 0 ||
|
|
@@ -22454,7 +22469,13 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22454
22469
|
}
|
|
22455
22470
|
var top_1 = parseInt(e.top, 10);
|
|
22456
22471
|
top_1 = top_1 < 0 ? 0 : top_1;
|
|
22457
|
-
|
|
22472
|
+
if (this.slotsUptoCursor < 0) {
|
|
22473
|
+
var cellsCountUptoCursor = Math.floor(top_1 / cellHeight);
|
|
22474
|
+
var cellsCountUptoEleTop = Math.floor(this.eleTop / cellHeight);
|
|
22475
|
+
this.slotsUptoCursor = cellsCountUptoCursor - cellsCountUptoEleTop;
|
|
22476
|
+
}
|
|
22477
|
+
top_1 = (Math.floor((top_1 + 1) / cellHeight) - this.slotsUptoCursor) * cellHeight;
|
|
22478
|
+
topValue = formatUnit(top_1 < 0 ? 0 : top_1);
|
|
22458
22479
|
var scrollHeight = this.parent.element.querySelector('.e-content-wrap').scrollHeight;
|
|
22459
22480
|
var cloneBottom = parseInt(topValue, 10) + this.actionObj.clone.offsetHeight;
|
|
22460
22481
|
if (cloneBottom > scrollHeight) {
|
|
@@ -22889,7 +22910,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
22889
22910
|
(dragArea.scrollTop + dragArea.offsetHeight - this.actionObj.clone.offsetHeight + window.pageYOffset) +
|
|
22890
22911
|
(this.actionObj.clone.offsetHeight - this.heightUptoCursorPoint);
|
|
22891
22912
|
offsetTop = Math.round(offsetTop / this.actionObj.cellHeight) * this.actionObj.cellHeight;
|
|
22892
|
-
if (dragArea.scrollTop > 0) {
|
|
22913
|
+
if (dragArea.scrollTop > 0 && offsetTop < dragArea.scrollHeight) {
|
|
22893
22914
|
this.actionObj.clone.style.top = formatUnit(offsetTop);
|
|
22894
22915
|
}
|
|
22895
22916
|
}
|
|
@@ -23137,7 +23158,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
23137
23158
|
var appHeight = this.parent.activeViewOptions.timeScale.enable ? this.verticalEvent.getHeight(eStart, eEnd) :
|
|
23138
23159
|
this.actionObj.element.offsetHeight;
|
|
23139
23160
|
var topValue = this.parent.activeViewOptions.timeScale.enable ?
|
|
23140
|
-
this.verticalEvent.getTopValue(eStart
|
|
23161
|
+
this.verticalEvent.getTopValue(eStart) : this.actionObj.element.offsetTop;
|
|
23141
23162
|
if (isNullOrUndefined(index)) {
|
|
23142
23163
|
if (i === 0) {
|
|
23143
23164
|
this.actionObj.clone.style.top = formatUnit(topValue);
|
|
@@ -23936,6 +23957,10 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
23936
23957
|
}
|
|
23937
23958
|
startHour.setMilliseconds(0);
|
|
23938
23959
|
endHour.setMilliseconds(0);
|
|
23960
|
+
if (resetTime(date).getTime() !== resetTime(startHour).getTime()) {
|
|
23961
|
+
startHour = new Date(2000, 0, 0, startHour.getHours(), startHour.getMinutes(), startHour.getMilliseconds());
|
|
23962
|
+
endHour = new Date(2000, 0, 0, endHour.getHours(), endHour.getMinutes(), endHour.getMilliseconds());
|
|
23963
|
+
}
|
|
23939
23964
|
return !(getDateInMs(date) < getDateInMs(startHour) || getDateInMs(date) >= getDateInMs(endHour) ||
|
|
23940
23965
|
!this.isWorkDay(date, workDays));
|
|
23941
23966
|
};
|
|
@@ -24680,7 +24705,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
24680
24705
|
}
|
|
24681
24706
|
};
|
|
24682
24707
|
VerticalView.prototype.getTopFromDateTime = function (date) {
|
|
24683
|
-
var startHour = this.
|
|
24708
|
+
var startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
|
|
24684
24709
|
var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
|
|
24685
24710
|
return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) /
|
|
24686
24711
|
this.parent.activeViewOptions.timeScale.interval;
|