@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
|
@@ -23258,6 +23258,14 @@ class Year extends ViewBase {
|
|
|
23258
23258
|
EventHandler.add(element, 'scroll', this.onContentScroll, this);
|
|
23259
23259
|
}
|
|
23260
23260
|
}
|
|
23261
|
+
scrollToDate(scrollDate) {
|
|
23262
|
+
const date = +new Date(resetTime(scrollDate));
|
|
23263
|
+
let element = this.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')[data-date="' + date + '"]');
|
|
23264
|
+
if (element) {
|
|
23265
|
+
element = closest(element, '.e-month-calendar');
|
|
23266
|
+
this.getContentAreaElement().scrollTop = element.offsetTop;
|
|
23267
|
+
}
|
|
23268
|
+
}
|
|
23261
23269
|
destroy() {
|
|
23262
23270
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
23263
23271
|
return;
|
|
@@ -24050,6 +24058,20 @@ class Agenda extends AgendaBase {
|
|
|
24050
24058
|
contentArea.style.height = formatUnit(this.parent.element.offsetHeight - headerHeight);
|
|
24051
24059
|
}
|
|
24052
24060
|
}
|
|
24061
|
+
scrollToDate(scrollDate) {
|
|
24062
|
+
const date = new Date(+resetTime(scrollDate));
|
|
24063
|
+
if (this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
24064
|
+
if (!this.parent.hideEmptyAgendaDays || this.parent.getEvents(date, addDays(date, 1), true).length > 0) {
|
|
24065
|
+
this.parent.changeDate(date);
|
|
24066
|
+
}
|
|
24067
|
+
}
|
|
24068
|
+
else {
|
|
24069
|
+
const dateElement = this.element.querySelector('.' + AGENDA_CELLS_CLASS + '[data-date="' + date.getTime() + '"]');
|
|
24070
|
+
if (dateElement) {
|
|
24071
|
+
this.getContentAreaElement().scrollTop = dateElement.offsetTop;
|
|
24072
|
+
}
|
|
24073
|
+
}
|
|
24074
|
+
}
|
|
24053
24075
|
destroy() {
|
|
24054
24076
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
24055
24077
|
return;
|
|
@@ -24369,9 +24391,12 @@ class TimelineViews extends VerticalView {
|
|
|
24369
24391
|
if (scrollDate) {
|
|
24370
24392
|
index = this.parent.getIndexOfDate(this.renderDates, resetTime(scrollDate));
|
|
24371
24393
|
if (index >= 0) {
|
|
24372
|
-
|
|
24373
|
-
if (
|
|
24374
|
-
|
|
24394
|
+
date = scrollDate;
|
|
24395
|
+
if (!isNullOrUndefined(hour)) {
|
|
24396
|
+
const timeString = hour.split(':');
|
|
24397
|
+
if (timeString.length === 2) {
|
|
24398
|
+
date = new Date(scrollDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0));
|
|
24399
|
+
}
|
|
24375
24400
|
}
|
|
24376
24401
|
}
|
|
24377
24402
|
}
|
|
@@ -24379,8 +24404,14 @@ class TimelineViews extends VerticalView {
|
|
|
24379
24404
|
if (isNullOrUndefined(date)) {
|
|
24380
24405
|
return;
|
|
24381
24406
|
}
|
|
24382
|
-
|
|
24383
|
-
|
|
24407
|
+
let scrollLeft;
|
|
24408
|
+
if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
|
|
24409
|
+
scrollLeft = index * this.getWorkCellWidth();
|
|
24410
|
+
}
|
|
24411
|
+
else {
|
|
24412
|
+
scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
|
|
24413
|
+
this.getLeftFromDateTime([index], date);
|
|
24414
|
+
}
|
|
24384
24415
|
this.getScrollableElement().scrollLeft = !this.parent.enableRtl ? scrollLeft : -scrollLeft;
|
|
24385
24416
|
}
|
|
24386
24417
|
generateColumnLevels() {
|
|
@@ -25137,13 +25168,25 @@ class TimelineYear extends Year {
|
|
|
25137
25168
|
append(cellTemplate, td);
|
|
25138
25169
|
}
|
|
25139
25170
|
scrollToDate(scrollDate) {
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
25145
|
-
|
|
25171
|
+
let date;
|
|
25172
|
+
if (this.parent.activeViewOptions.group.resources !== null && this.parent.activeViewOptions.group.resources.length > 0 &&
|
|
25173
|
+
!this.parent.uiStateValues.isGroupAdaptive) {
|
|
25174
|
+
date = +new Date(resetTime(firstDateOfMonth(scrollDate)));
|
|
25175
|
+
}
|
|
25176
|
+
else {
|
|
25177
|
+
date = +new Date(resetTime(scrollDate));
|
|
25178
|
+
}
|
|
25179
|
+
const element = this.element.querySelector('[data-date="' + date + '"]');
|
|
25180
|
+
if (element) {
|
|
25181
|
+
const wrap = this.getScrollableElement();
|
|
25182
|
+
if (this.parent.enableRtl) {
|
|
25183
|
+
const conTable = this.element.querySelector('.' + CONTENT_TABLE_CLASS);
|
|
25184
|
+
wrap.scrollLeft = -(conTable.offsetWidth - element.offsetLeft - element.offsetWidth);
|
|
25185
|
+
}
|
|
25186
|
+
else {
|
|
25187
|
+
wrap.scrollLeft = element.offsetLeft;
|
|
25146
25188
|
}
|
|
25189
|
+
wrap.scrollTop = element.offsetTop;
|
|
25147
25190
|
}
|
|
25148
25191
|
}
|
|
25149
25192
|
getScrollableElement() {
|