@syncfusion/ej2-schedule 20.2.40 → 20.2.43
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/CHANGELOG.md +8 -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 +54 -11
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +54 -11
- 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 +15 -15
- package/src/schedule/renderer/agenda.d.ts +1 -0
- package/src/schedule/renderer/agenda.js +14 -0
- package/src/schedule/renderer/timeline-view.js +14 -5
- package/src/schedule/renderer/timeline-year.js +18 -6
- package/src/schedule/renderer/year.d.ts +1 -0
- package/src/schedule/renderer/year.js +8 -0
|
@@ -24108,6 +24108,14 @@ var Year = /** @__PURE__ @class */ (function (_super) {
|
|
|
24108
24108
|
EventHandler.add(element, 'scroll', this.onContentScroll, this);
|
|
24109
24109
|
}
|
|
24110
24110
|
};
|
|
24111
|
+
Year.prototype.scrollToDate = function (scrollDate) {
|
|
24112
|
+
var date = +new Date(resetTime(scrollDate));
|
|
24113
|
+
var element = this.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')[data-date="' + date + '"]');
|
|
24114
|
+
if (element) {
|
|
24115
|
+
element = closest(element, '.e-month-calendar');
|
|
24116
|
+
this.getContentAreaElement().scrollTop = element.offsetTop;
|
|
24117
|
+
}
|
|
24118
|
+
};
|
|
24111
24119
|
Year.prototype.destroy = function () {
|
|
24112
24120
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
24113
24121
|
return;
|
|
@@ -24942,6 +24950,20 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
24942
24950
|
contentArea.style.height = formatUnit(this.parent.element.offsetHeight - headerHeight);
|
|
24943
24951
|
}
|
|
24944
24952
|
};
|
|
24953
|
+
Agenda.prototype.scrollToDate = function (scrollDate) {
|
|
24954
|
+
var date = new Date(+resetTime(scrollDate));
|
|
24955
|
+
if (this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
24956
|
+
if (!this.parent.hideEmptyAgendaDays || this.parent.getEvents(date, addDays(date, 1), true).length > 0) {
|
|
24957
|
+
this.parent.changeDate(date);
|
|
24958
|
+
}
|
|
24959
|
+
}
|
|
24960
|
+
else {
|
|
24961
|
+
var dateElement = this.element.querySelector('.' + AGENDA_CELLS_CLASS + '[data-date="' + date.getTime() + '"]');
|
|
24962
|
+
if (dateElement) {
|
|
24963
|
+
this.getContentAreaElement().scrollTop = dateElement.offsetTop;
|
|
24964
|
+
}
|
|
24965
|
+
}
|
|
24966
|
+
};
|
|
24945
24967
|
Agenda.prototype.destroy = function () {
|
|
24946
24968
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
24947
24969
|
return;
|
|
@@ -25303,9 +25325,12 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
25303
25325
|
if (scrollDate) {
|
|
25304
25326
|
index = this.parent.getIndexOfDate(this.renderDates, resetTime(scrollDate));
|
|
25305
25327
|
if (index >= 0) {
|
|
25306
|
-
|
|
25307
|
-
if (
|
|
25308
|
-
|
|
25328
|
+
date = scrollDate;
|
|
25329
|
+
if (!isNullOrUndefined(hour)) {
|
|
25330
|
+
var timeString = hour.split(':');
|
|
25331
|
+
if (timeString.length === 2) {
|
|
25332
|
+
date = new Date(scrollDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0));
|
|
25333
|
+
}
|
|
25309
25334
|
}
|
|
25310
25335
|
}
|
|
25311
25336
|
}
|
|
@@ -25313,8 +25338,14 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
25313
25338
|
if (isNullOrUndefined(date)) {
|
|
25314
25339
|
return;
|
|
25315
25340
|
}
|
|
25316
|
-
var scrollLeft
|
|
25317
|
-
|
|
25341
|
+
var scrollLeft;
|
|
25342
|
+
if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
|
|
25343
|
+
scrollLeft = index * this.getWorkCellWidth();
|
|
25344
|
+
}
|
|
25345
|
+
else {
|
|
25346
|
+
scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
|
|
25347
|
+
this.getLeftFromDateTime([index], date);
|
|
25348
|
+
}
|
|
25318
25349
|
this.getScrollableElement().scrollLeft = !this.parent.enableRtl ? scrollLeft : -scrollLeft;
|
|
25319
25350
|
};
|
|
25320
25351
|
TimelineViews.prototype.generateColumnLevels = function () {
|
|
@@ -26111,13 +26142,25 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
26111
26142
|
append(cellTemplate, td);
|
|
26112
26143
|
};
|
|
26113
26144
|
TimelineYear.prototype.scrollToDate = function (scrollDate) {
|
|
26114
|
-
|
|
26115
|
-
|
|
26116
|
-
|
|
26117
|
-
|
|
26118
|
-
|
|
26119
|
-
|
|
26145
|
+
var date;
|
|
26146
|
+
if (this.parent.activeViewOptions.group.resources !== null && this.parent.activeViewOptions.group.resources.length > 0 &&
|
|
26147
|
+
!this.parent.uiStateValues.isGroupAdaptive) {
|
|
26148
|
+
date = +new Date(resetTime(firstDateOfMonth(scrollDate)));
|
|
26149
|
+
}
|
|
26150
|
+
else {
|
|
26151
|
+
date = +new Date(resetTime(scrollDate));
|
|
26152
|
+
}
|
|
26153
|
+
var element = this.element.querySelector('[data-date="' + date + '"]');
|
|
26154
|
+
if (element) {
|
|
26155
|
+
var wrap = this.getScrollableElement();
|
|
26156
|
+
if (this.parent.enableRtl) {
|
|
26157
|
+
var conTable = this.element.querySelector('.' + CONTENT_TABLE_CLASS);
|
|
26158
|
+
wrap.scrollLeft = -(conTable.offsetWidth - element.offsetLeft - element.offsetWidth);
|
|
26159
|
+
}
|
|
26160
|
+
else {
|
|
26161
|
+
wrap.scrollLeft = element.offsetLeft;
|
|
26120
26162
|
}
|
|
26163
|
+
wrap.scrollTop = element.offsetTop;
|
|
26121
26164
|
}
|
|
26122
26165
|
};
|
|
26123
26166
|
TimelineYear.prototype.getScrollableElement = function () {
|