@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.2.40
3
+ * version : 20.2.43
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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@20.2.38",
3
+ "_id": "@syncfusion/ej2-schedule@20.2.40",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-s+5eDIEW2jFb3ZdLOeIVeir04qKIG0GGm+FlC/TwA8n04MQIdr938y9+Zmd+EF2Mf4CFSPeDhFBiKTLYbrD6jA==",
5
+ "_integrity": "sha512-kU/0Be1pH5yFXhucutY7aGY+0JD6l+S/dOwICMpItjm794B1hhepBKqgexfw9BuGB0hDGOnNHsQEwVnZ+yXt+w==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.2.38.tgz",
27
- "_shasum": "653052b4e14e1bbbc8b0efb5c9fe8894a334421e",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-20.2.40.tgz",
27
+ "_shasum": "d9b88f81c4941440ba79cefcb0ec412a5b581ccb",
28
28
  "_spec": "@syncfusion/ej2-schedule@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.2.39",
39
- "@syncfusion/ej2-buttons": "~20.2.38",
40
- "@syncfusion/ej2-calendars": "~20.2.40",
41
- "@syncfusion/ej2-data": "~20.2.38",
42
- "@syncfusion/ej2-dropdowns": "~20.2.40",
43
- "@syncfusion/ej2-excel-export": "~20.2.39",
44
- "@syncfusion/ej2-inputs": "~20.2.38",
45
- "@syncfusion/ej2-lists": "~20.2.39",
46
- "@syncfusion/ej2-navigations": "~20.2.39",
47
- "@syncfusion/ej2-popups": "~20.2.40"
38
+ "@syncfusion/ej2-base": "~20.2.43",
39
+ "@syncfusion/ej2-buttons": "~20.2.43",
40
+ "@syncfusion/ej2-calendars": "~20.2.43",
41
+ "@syncfusion/ej2-data": "~20.2.43",
42
+ "@syncfusion/ej2-dropdowns": "~20.2.43",
43
+ "@syncfusion/ej2-excel-export": "~20.2.43",
44
+ "@syncfusion/ej2-inputs": "~20.2.43",
45
+ "@syncfusion/ej2-lists": "~20.2.43",
46
+ "@syncfusion/ej2-navigations": "~20.2.43",
47
+ "@syncfusion/ej2-popups": "~20.2.43"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.",
@@ -81,6 +81,6 @@
81
81
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
82
82
  },
83
83
  "typings": "index.d.ts",
84
- "version": "20.2.40",
84
+ "version": "20.2.43",
85
85
  "sideEffects": false
86
86
  }
@@ -38,5 +38,6 @@ export declare class Agenda extends AgendaBase implements IRenderer {
38
38
  addEventListener(): void;
39
39
  removeEventListener(): void;
40
40
  private onAgendaScrollUiUpdate;
41
+ scrollToDate(scrollDate: Date): void;
41
42
  destroy(): void;
42
43
  }
@@ -436,6 +436,20 @@ var Agenda = /** @class */ (function (_super) {
436
436
  contentArea.style.height = formatUnit(this.parent.element.offsetHeight - headerHeight);
437
437
  }
438
438
  };
439
+ Agenda.prototype.scrollToDate = function (scrollDate) {
440
+ var date = new Date(+util.resetTime(scrollDate));
441
+ if (this.parent.activeViewOptions.allowVirtualScrolling) {
442
+ if (!this.parent.hideEmptyAgendaDays || this.parent.getEvents(date, util.addDays(date, 1), true).length > 0) {
443
+ this.parent.changeDate(date);
444
+ }
445
+ }
446
+ else {
447
+ var dateElement = this.element.querySelector('.' + cls.AGENDA_CELLS_CLASS + '[data-date="' + date.getTime() + '"]');
448
+ if (dateElement) {
449
+ this.getContentAreaElement().scrollTop = dateElement.offsetTop;
450
+ }
451
+ }
452
+ };
439
453
  Agenda.prototype.destroy = function () {
440
454
  if (!this.parent || this.parent && this.parent.isDestroyed) {
441
455
  return;
@@ -57,9 +57,12 @@ var TimelineViews = /** @class */ (function (_super) {
57
57
  if (scrollDate) {
58
58
  index = this.parent.getIndexOfDate(this.renderDates, util.resetTime(scrollDate));
59
59
  if (index >= 0) {
60
- var timeString = hour.split(':');
61
- if (timeString.length === 2) {
62
- date = new Date(scrollDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0));
60
+ date = scrollDate;
61
+ if (!isNullOrUndefined(hour)) {
62
+ var timeString = hour.split(':');
63
+ if (timeString.length === 2) {
64
+ date = new Date(scrollDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0));
65
+ }
63
66
  }
64
67
  }
65
68
  }
@@ -67,8 +70,14 @@ var TimelineViews = /** @class */ (function (_super) {
67
70
  if (isNullOrUndefined(date)) {
68
71
  return;
69
72
  }
70
- var scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
71
- this.getLeftFromDateTime([index], date);
73
+ var scrollLeft;
74
+ if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
75
+ scrollLeft = index * this.getWorkCellWidth();
76
+ }
77
+ else {
78
+ scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
79
+ this.getLeftFromDateTime([index], date);
80
+ }
72
81
  this.getScrollableElement().scrollLeft = !this.parent.enableRtl ? scrollLeft : -scrollLeft;
73
82
  };
74
83
  TimelineViews.prototype.generateColumnLevels = function () {
@@ -422,13 +422,25 @@ var TimelineYear = /** @class */ (function (_super) {
422
422
  append(cellTemplate, td);
423
423
  };
424
424
  TimelineYear.prototype.scrollToDate = function (scrollDate) {
425
- if (this.parent.activeViewOptions.group.resources.length === 0) {
426
- var date = +new Date(util.resetTime(scrollDate));
427
- var element = this.element.querySelector('[data-date="' + date + '"]');
428
- if (element) {
429
- this.getScrollableElement().scrollLeft = element.offsetLeft;
430
- this.getScrollableElement().scrollTop = element.offsetTop;
425
+ var date;
426
+ if (this.parent.activeViewOptions.group.resources !== null && this.parent.activeViewOptions.group.resources.length > 0 &&
427
+ !this.parent.uiStateValues.isGroupAdaptive) {
428
+ date = +new Date(util.resetTime(util.firstDateOfMonth(scrollDate)));
429
+ }
430
+ else {
431
+ date = +new Date(util.resetTime(scrollDate));
432
+ }
433
+ var element = this.element.querySelector('[data-date="' + date + '"]');
434
+ if (element) {
435
+ var wrap = this.getScrollableElement();
436
+ if (this.parent.enableRtl) {
437
+ var conTable = this.element.querySelector('.' + cls.CONTENT_TABLE_CLASS);
438
+ wrap.scrollLeft = -(conTable.offsetWidth - element.offsetLeft - element.offsetWidth);
439
+ }
440
+ else {
441
+ wrap.scrollLeft = element.offsetLeft;
431
442
  }
443
+ wrap.scrollTop = element.offsetTop;
432
444
  }
433
445
  };
434
446
  TimelineYear.prototype.getScrollableElement = function () {
@@ -40,5 +40,6 @@ export declare class Year extends ViewBase implements IRenderer {
40
40
  removeEventListener(): void;
41
41
  onDataReady(args: NotifyEventArgs): void;
42
42
  wireEvents(element: HTMLElement, type: string): void;
43
+ scrollToDate(scrollDate: Date): void;
43
44
  destroy(): void;
44
45
  }
@@ -386,6 +386,14 @@ var Year = /** @class */ (function (_super) {
386
386
  EventHandler.add(element, 'scroll', this.onContentScroll, this);
387
387
  }
388
388
  };
389
+ Year.prototype.scrollToDate = function (scrollDate) {
390
+ var date = +new Date(util.resetTime(scrollDate));
391
+ var element = this.element.querySelector('.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')[data-date="' + date + '"]');
392
+ if (element) {
393
+ element = closest(element, '.e-month-calendar');
394
+ this.getContentAreaElement().scrollTop = element.offsetTop;
395
+ }
396
+ };
389
397
  Year.prototype.destroy = function () {
390
398
  if (!this.parent || this.parent && this.parent.isDestroyed) {
391
399
  return;