@syncfusion/ej2-schedule 19.3.55 → 19.4.38

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.
Files changed (117) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +63 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +39 -0
  3. package/CHANGELOG.md +24 -1
  4. package/dist/ej2-schedule.umd.min.js +2 -2
  5. package/dist/ej2-schedule.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-schedule.es2015.js +423 -101
  7. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  8. package/dist/es6/ej2-schedule.es5.js +427 -108
  9. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  10. package/dist/global/ej2-schedule.min.js +2 -2
  11. package/dist/global/ej2-schedule.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +15 -15
  14. package/src/recurrence-editor/recurrence-editor.js +2 -2
  15. package/src/schedule/actions/drag.js +12 -4
  16. package/src/schedule/actions/keyboard.d.ts +7 -0
  17. package/src/schedule/actions/keyboard.js +197 -28
  18. package/src/schedule/base/interface.d.ts +12 -0
  19. package/src/schedule/base/resource.js +1 -0
  20. package/src/schedule/base/schedule-model.d.ts +89 -20
  21. package/src/schedule/base/schedule.d.ts +88 -19
  22. package/src/schedule/base/schedule.js +14 -3
  23. package/src/schedule/base/util.d.ts +1 -0
  24. package/src/schedule/base/util.js +1 -0
  25. package/src/schedule/event-renderer/event-base.d.ts +1 -0
  26. package/src/schedule/event-renderer/event-base.js +18 -2
  27. package/src/schedule/event-renderer/inline-edit.js +8 -5
  28. package/src/schedule/event-renderer/month.js +1 -1
  29. package/src/schedule/event-renderer/timeline-view.js +4 -0
  30. package/src/schedule/event-renderer/vertical-view.js +9 -6
  31. package/src/schedule/event-renderer/year.js +1 -1
  32. package/src/schedule/exports/excel-export.d.ts +2 -1
  33. package/src/schedule/exports/excel-export.js +21 -18
  34. package/src/schedule/models/event-settings-model.d.ts +17 -9
  35. package/src/schedule/models/event-settings.d.ts +15 -8
  36. package/src/schedule/models/event-settings.js +6 -3
  37. package/src/schedule/models/views-model.d.ts +19 -0
  38. package/src/schedule/models/views.d.ts +17 -0
  39. package/src/schedule/models/views.js +6 -0
  40. package/src/schedule/popups/quick-popups.js +3 -0
  41. package/src/schedule/renderer/agenda.js +2 -1
  42. package/src/schedule/renderer/header-renderer.d.ts +1 -0
  43. package/src/schedule/renderer/header-renderer.js +22 -8
  44. package/src/schedule/renderer/month.d.ts +4 -0
  45. package/src/schedule/renderer/month.js +68 -19
  46. package/src/schedule/renderer/timeline-year.js +3 -0
  47. package/src/schedule/renderer/view-base.js +9 -0
  48. package/src/schedule/renderer/year.d.ts +2 -2
  49. package/src/schedule/renderer/year.js +24 -6
  50. package/styles/bootstrap-dark.css +108 -27
  51. package/styles/bootstrap.css +105 -27
  52. package/styles/bootstrap4.css +117 -62
  53. package/styles/bootstrap5-dark.css +118 -67
  54. package/styles/bootstrap5.css +118 -67
  55. package/styles/fabric-dark.css +108 -26
  56. package/styles/fabric.css +109 -26
  57. package/styles/highcontrast-light.css +104 -26
  58. package/styles/highcontrast.css +109 -28
  59. package/styles/material-dark.css +110 -32
  60. package/styles/material.css +103 -25
  61. package/styles/recurrence-editor/_bootstrap-dark-definition.scss +7 -0
  62. package/styles/recurrence-editor/_bootstrap-definition.scss +7 -0
  63. package/styles/recurrence-editor/_bootstrap4-definition.scss +7 -0
  64. package/styles/recurrence-editor/_bootstrap5-definition.scss +7 -0
  65. package/styles/recurrence-editor/_fabric-dark-definition.scss +8 -0
  66. package/styles/recurrence-editor/_fabric-definition.scss +7 -0
  67. package/styles/recurrence-editor/_fluent-definition.scss +15 -0
  68. package/styles/recurrence-editor/_highcontrast-definition.scss +7 -0
  69. package/styles/recurrence-editor/_highcontrast-light-definition.scss +7 -0
  70. package/styles/recurrence-editor/_layout.scss +20 -4
  71. package/styles/recurrence-editor/_material-dark-definition.scss +7 -0
  72. package/styles/recurrence-editor/_material-definition.scss +7 -0
  73. package/styles/recurrence-editor/_tailwind-definition.scss +15 -8
  74. package/styles/recurrence-editor/bootstrap-dark.css +20 -4
  75. package/styles/recurrence-editor/bootstrap.css +20 -4
  76. package/styles/recurrence-editor/bootstrap4.css +20 -4
  77. package/styles/recurrence-editor/bootstrap5-dark.css +20 -4
  78. package/styles/recurrence-editor/bootstrap5.css +20 -4
  79. package/styles/recurrence-editor/fabric-dark.css +20 -4
  80. package/styles/recurrence-editor/fabric.css +20 -4
  81. package/styles/recurrence-editor/highcontrast-light.css +20 -4
  82. package/styles/recurrence-editor/highcontrast.css +20 -4
  83. package/styles/recurrence-editor/material-dark.css +20 -4
  84. package/styles/recurrence-editor/material.css +20 -4
  85. package/styles/recurrence-editor/tailwind-dark.css +20 -4
  86. package/styles/recurrence-editor/tailwind.css +20 -4
  87. package/styles/schedule/_bootstrap-dark-definition.scss +22 -1
  88. package/styles/schedule/_bootstrap-definition.scss +22 -1
  89. package/styles/schedule/_bootstrap4-definition.scss +23 -1
  90. package/styles/schedule/_bootstrap5-definition.scss +145 -119
  91. package/styles/schedule/_fabric-dark-definition.scss +22 -1
  92. package/styles/schedule/_fabric-definition.scss +22 -1
  93. package/styles/schedule/_fluent-definition.scss +218 -0
  94. package/styles/schedule/_highcontrast-definition.scss +22 -1
  95. package/styles/schedule/_highcontrast-light-definition.scss +22 -1
  96. package/styles/schedule/_layout.scss +95 -158
  97. package/styles/schedule/_material-dark-definition.scss +22 -1
  98. package/styles/schedule/_material-definition.scss +21 -0
  99. package/styles/schedule/_tailwind-definition.scss +216 -195
  100. package/styles/schedule/_theme.scss +1 -1
  101. package/styles/schedule/bootstrap-dark.css +88 -23
  102. package/styles/schedule/bootstrap.css +85 -23
  103. package/styles/schedule/bootstrap4.css +97 -58
  104. package/styles/schedule/bootstrap5-dark.css +98 -63
  105. package/styles/schedule/bootstrap5.css +98 -63
  106. package/styles/schedule/fabric-dark.css +88 -22
  107. package/styles/schedule/fabric.css +89 -22
  108. package/styles/schedule/highcontrast-light.css +84 -22
  109. package/styles/schedule/highcontrast.css +89 -24
  110. package/styles/schedule/icons/_fluent.scss +231 -0
  111. package/styles/schedule/icons/_tailwind.scss +231 -231
  112. package/styles/schedule/material-dark.css +90 -28
  113. package/styles/schedule/material.css +83 -21
  114. package/styles/schedule/tailwind-dark.css +94 -52
  115. package/styles/schedule/tailwind.css +94 -52
  116. package/styles/tailwind-dark.css +114 -56
  117. package/styles/tailwind.css +114 -56
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.3.55
3
+ * version : 19.4.38
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@19.3.53",
3
+ "_id": "@syncfusion/ej2-schedule@19.16.6",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-l9SFCIS0AjYdIx4gQVYoSLVZ5wJoLlbx5ojoPG5bJOz04xTOpuCZYqQK17JjFvLU0YcxVfLC/mGt9rBpnGfqdg==",
5
+ "_integrity": "sha512-0SnaOgJ9xx+DcnPMjdAU4NBzn5fevPp4PZpE58zbNf2WOEYQ4ZlUJc7NxT0jCmP8Ow84wth54gKJrfc0tTONqg==",
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/@syncfusion/ej2-schedule/-/ej2-schedule-19.3.53.tgz",
27
- "_shasum": "1b65095a4c89600df4cc0a6a3763dcafcd38d8d1",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-schedule/-/ej2-schedule-19.16.6.tgz",
27
+ "_shasum": "f8b12396e75367b8831936fc6caa778f7c39e461",
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": "~19.3.54",
39
- "@syncfusion/ej2-buttons": "~19.3.53",
40
- "@syncfusion/ej2-calendars": "~19.3.55",
41
- "@syncfusion/ej2-data": "~19.3.53",
42
- "@syncfusion/ej2-dropdowns": "~19.3.55",
43
- "@syncfusion/ej2-excel-export": "~19.3.53",
44
- "@syncfusion/ej2-inputs": "~19.3.53",
45
- "@syncfusion/ej2-lists": "~19.3.53",
46
- "@syncfusion/ej2-navigations": "~19.3.54",
47
- "@syncfusion/ej2-popups": "~19.3.53"
38
+ "@syncfusion/ej2-base": "~19.4.38",
39
+ "@syncfusion/ej2-buttons": "~19.4.38",
40
+ "@syncfusion/ej2-calendars": "~19.4.38",
41
+ "@syncfusion/ej2-data": "~19.4.38",
42
+ "@syncfusion/ej2-dropdowns": "~19.4.38",
43
+ "@syncfusion/ej2-excel-export": "~19.4.38",
44
+ "@syncfusion/ej2-inputs": "~19.4.38",
45
+ "@syncfusion/ej2-lists": "~19.4.38",
46
+ "@syncfusion/ej2-navigations": "~19.4.38",
47
+ "@syncfusion/ej2-popups": "~19.4.38"
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": "19.3.55",
84
+ "version": "19.4.38",
85
85
  "sideEffects": false
86
86
  }
@@ -35,6 +35,7 @@ var INTERVALCLASS = 'e-interval';
35
35
  var DAYWRAPPER = 'e-days';
36
36
  var WEEKWRAPPER = 'e-non-week';
37
37
  var WEEKPOSITION = 'e-week-position';
38
+ var DAYPOSITION = 'e-day-position';
38
39
  var YEAREXPANDERWRAPPER = 'e-year-expander';
39
40
  var YEAREXPANDERELEMENT = 'e-year-expander-element';
40
41
  var MONETHEXPANDERWRAPPER = 'e-month-expander';
@@ -387,7 +388,6 @@ var RecurrenceEditor = /** @class */ (function (_super) {
387
388
  }
388
389
  });
389
390
  this.endType.appendTo(this.element.querySelector('.' + ENDONELEMENT));
390
- // eslint-disable-next-line @typescript-eslint/ban-types
391
391
  var renderDropDownList = function (dropDownData) {
392
392
  return new DropDownList({
393
393
  dataSource: dropDownData,
@@ -755,7 +755,7 @@ var RecurrenceEditor = /** @class */ (function (_super) {
755
755
  '<td><div class="' + INPUTWARAPPER + ' ' + WEEKPOSITION + '" >' +
756
756
  '<input type="text" tabindex="0" class="' + MONTHPOS + '"title="' + this.localeObj.getConstant('monthPosition') + '" />' +
757
757
  '</div></td>' +
758
- '<td><div class="' + INPUTWARAPPER + '" style="min-width: 120px;">' +
758
+ '<td><div class="' + INPUTWARAPPER + ' ' + DAYPOSITION + '">' +
759
759
  '<input type="text" tabindex="0" class="' + MONTHWEEK + '"title="' + this.localeObj.getConstant('monthWeek') + '" />' +
760
760
  '</div></td></tr></table>' +
761
761
  '</div></div>' +
@@ -178,7 +178,9 @@ var DragAndDrop = /** @class */ (function (_super) {
178
178
  var eventGuid = this.actionObj.element.getAttribute('data-guid');
179
179
  this.actionObj.event = this.parent.eventBase.getEventByGuid(eventGuid);
180
180
  var eventObj = extend({}, this.actionObj.event, null, true);
181
- this.startTime = eventObj[this.parent.eventFields.startTime].getTime();
181
+ if (!isNullOrUndefined(eventObj)) {
182
+ this.startTime = eventObj[this.parent.eventFields.startTime].getTime();
183
+ }
182
184
  var dragArgs = {
183
185
  cancel: false,
184
186
  data: eventObj,
@@ -600,7 +602,7 @@ var DragAndDrop = /** @class */ (function (_super) {
600
602
  return;
601
603
  }
602
604
  var td = tr.children[colIndex];
603
- if (this.parent.activeViewOptions.group.resources.length > 0) {
605
+ if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
604
606
  this.actionObj.groupIndex = parseInt(td.getAttribute('data-group-index'), 10);
605
607
  }
606
608
  var dragStart;
@@ -869,7 +871,7 @@ var DragAndDrop = /** @class */ (function (_super) {
869
871
  var renderDates = this.getRenderedDates();
870
872
  var events = this.parent.eventBase.splitEvent(event, renderDates);
871
873
  var query = ".e-all-day-cells[data-date=\"" + events[0][this.parent.eventFields.startTime].getTime() + "\"]";
872
- if (this.parent.activeViewOptions.group.resources.length > 0) {
874
+ if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
873
875
  query = query.concat('[data-group-index = "' + this.actionObj.groupIndex + '"]');
874
876
  }
875
877
  var cell = [].slice.call(this.parent.element.querySelectorAll(query));
@@ -1069,7 +1071,13 @@ var DragAndDrop = /** @class */ (function (_super) {
1069
1071
  if (this.parent.eventDragArea) {
1070
1072
  var targetDate = this.parent.getDateFromElement(e.target);
1071
1073
  if (!isNullOrUndefined(targetDate)) {
1072
- eventStart = targetDate;
1074
+ if (!this.parent.activeViewOptions.timeScale.enable || (this.parent.currentView == "TimelineMonth")) {
1075
+ var eventSrt = eventObj[this.parent.eventFields.startTime];
1076
+ eventStart = new Date(eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds()));
1077
+ }
1078
+ else {
1079
+ eventStart = targetDate;
1080
+ }
1073
1081
  }
1074
1082
  }
1075
1083
  var eventEnd = new Date(eventStart.getTime());
@@ -41,13 +41,20 @@ export declare class KeyboardInteraction {
41
41
  private getUniqueAppointmentElements;
42
42
  private getWorkCellFromAppointmentElement;
43
43
  private processViewNavigation;
44
+ private cancelUpDownAction;
44
45
  private processUp;
45
46
  private processDown;
47
+ private getYearUpDownCell;
48
+ private getHorizontalUpDownCell;
49
+ private getVerticalUpDownCell;
46
50
  private processLeftRight;
47
51
  private getQuickPopupElement;
48
52
  private isCancelLeftRightAction;
49
53
  private processRight;
50
54
  private processLeft;
55
+ private getTimelineYearTargetCell;
56
+ private getHorizontalLeftRightCell;
57
+ private getVerticalLeftRightCell;
51
58
  private calculateNextPrevDate;
52
59
  private getFocusableElements;
53
60
  private processTabOnPopup;
@@ -185,6 +185,9 @@ var KeyboardInteraction = /** @class */ (function () {
185
185
  }
186
186
  var queryStr = '.' + cls.WORK_CELLS_CLASS + ',.' + cls.ALLDAY_CELLS_CLASS + ',.' + cls.HEADER_CELLS_CLASS;
187
187
  var target = closest(e.target, queryStr);
188
+ if (this.parent.currentView === 'TimelineYear' && target.classList.contains(cls.OTHERMONTH_CLASS)) {
189
+ return;
190
+ }
188
191
  this.parent.activeCellsData = this.getSelectedElements(target);
189
192
  var cellData = {};
190
193
  if (this.parent.eventWindow) {
@@ -208,6 +211,9 @@ var KeyboardInteraction = /** @class */ (function () {
208
211
  || this.isPreventAction(e)) {
209
212
  return;
210
213
  }
214
+ if (this.parent.currentView === 'TimelineYear' && e.target.classList.contains(cls.OTHERMONTH_CLASS)) {
215
+ return;
216
+ }
211
217
  var target = e.target;
212
218
  if (closest(target, '.' + cls.POPUP_WRAPPER_CLASS)) {
213
219
  if (target.classList.contains(cls.QUICK_POPUP_EVENT_DETAILS_CLASS) ||
@@ -242,11 +248,16 @@ var KeyboardInteraction = /** @class */ (function () {
242
248
  this.parent.notify(event.inlineClick, inlineArgs);
243
249
  }
244
250
  else {
245
- this.parent.notify(event.cellClick, args);
251
+ if (this.parent.currentView === 'Year') {
252
+ target.click();
253
+ }
254
+ else {
255
+ this.parent.notify(event.cellClick, args);
256
+ }
246
257
  }
247
258
  return;
248
259
  }
249
- if (target.classList.contains(cls.INLINE_SUBJECT_CLASS)) {
260
+ if (target.classList.contains(cls.INLINE_SUBJECT_CLASS) && this.parent.inlineModule) {
250
261
  this.parent.inlineModule.inlineCrudActions(target);
251
262
  return;
252
263
  }
@@ -278,7 +289,9 @@ var KeyboardInteraction = /** @class */ (function () {
278
289
  };
279
290
  KeyboardInteraction.prototype.getCells = function (isInverseTable, start, end) {
280
291
  var tableEle = this.parent.getContentTable();
281
- var cells = [].slice.call(tableEle.querySelectorAll('td'));
292
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
293
+ var query = isTimelineYear && !isInverseTable ? '.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')' : 'td';
294
+ var cells = [].slice.call(tableEle.querySelectorAll(query));
282
295
  var maxRow = tableEle.rows.length;
283
296
  var maxColumn = tableEle.rows[0].cells.length;
284
297
  if (start && start.classList.contains(cls.ALLDAY_CELLS_CLASS)) {
@@ -293,7 +306,11 @@ var KeyboardInteraction = /** @class */ (function () {
293
306
  if (isInverseTable) {
294
307
  for (var i = 0; i < maxColumn; i++) {
295
308
  for (var j = 0; j < maxRow; j++) {
296
- inverseCells.push(cells[maxColumn * j + i]);
309
+ var cell = cells[maxColumn * j + i];
310
+ if (isTimelineYear && cell.classList.contains(cls.OTHERMONTH_CLASS)) {
311
+ continue;
312
+ }
313
+ inverseCells.push(cell);
297
314
  }
298
315
  }
299
316
  startIndex = inverseCells.indexOf(start);
@@ -315,11 +332,17 @@ var KeyboardInteraction = /** @class */ (function () {
315
332
  return;
316
333
  }
317
334
  this.parent.eventBase.removeSelectedAppointmentClass();
318
- if (this.parent.activeView.isTimelineView()) {
335
+ if (this.parent.activeView.isTimelineView() && this.parent.currentView !== 'TimelineYear') {
319
336
  var cell = this.parent.element.querySelector('.' + cls.CONTENT_TABLE_CLASS +
320
337
  ' tr:not(.' + cls.HIDDEN_CLASS + ') .' + cls.WORK_CELLS_CLASS + ':not(.' + cls.RESOURCE_GROUP_CELLS_CLASS + ')');
321
338
  this.selectCells(false, cell);
322
339
  }
340
+ else if (this.parent.currentView.indexOf('Year') > -1) {
341
+ var query = '.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')' + ':not(.' + cls.RESOURCE_GROUP_CELLS_CLASS + ')';
342
+ var isVerticalYear = this.parent.currentView === 'TimelineYear' && this.parent.activeViewOptions.orientation === 'Vertical';
343
+ query += isVerticalYear ? '[data-date="' + this.parent.activeView.startDate().getTime() + '"]' : '';
344
+ this.selectCells(false, this.parent.element.querySelector(query));
345
+ }
323
346
  else {
324
347
  this.selectCells(false, this.parent.getWorkCellElements()[0]);
325
348
  }
@@ -341,13 +364,21 @@ var KeyboardInteraction = /** @class */ (function () {
341
364
  var target = (targetCell instanceof Array) ? targetCell.slice(-1)[0] : targetCell;
342
365
  if (isMultiple) {
343
366
  var initialId_1;
344
- var views_1 = ['Day', 'Week', 'WorkWeek', 'Month', 'TimelineDay', 'TimelineWeek', 'TimelineWorkWeek', 'TimelineMonth'];
367
+ var views_1 = ['Day', 'Week', 'WorkWeek', 'TimelineDay', 'TimelineWeek', 'TimelineWorkWeek', 'TimelineMonth', 'TimelineYear'];
345
368
  var args = { element: targetCell, requestType: 'mousemove', allowMultipleRow: true };
346
369
  this.parent.inlineModule.removeInlineAppointmentElement();
347
370
  this.parent.trigger(event.select, args, function (selectArgs) {
348
371
  var allowMultipleRow = (!selectArgs.allowMultipleRow) || (!_this.parent.allowMultiRowSelection);
349
- if (allowMultipleRow && (views_1.indexOf(_this.parent.currentView) > -1)) {
350
- target = target.parentElement.children[_this.initialTarget.cellIndex];
372
+ if (allowMultipleRow) {
373
+ var isTimelineYear = _this.parent.currentView === 'TimelineYear';
374
+ if (isTimelineYear && _this.parent.activeViewOptions.orientation === 'Horizontal' || _this.parent.currentView === 'Month') {
375
+ var isGroupYear = isTimelineYear && _this.parent.activeViewOptions.group.resources.length > 0;
376
+ target = isGroupYear ? _this.initialTarget :
377
+ _this.initialTarget.parentElement.children[target.cellIndex];
378
+ }
379
+ else if (views_1.indexOf(_this.parent.currentView) > -1) {
380
+ target = target.parentElement.children[_this.initialTarget.cellIndex];
381
+ }
351
382
  }
352
383
  var selectedCells = _this.getCells(_this.isInverseTableSelect(), _this.initialTarget, target);
353
384
  if (_this.parent.activeViewOptions.group.resources.length > 0) {
@@ -483,8 +514,20 @@ var KeyboardInteraction = /** @class */ (function () {
483
514
  }
484
515
  }
485
516
  };
517
+ KeyboardInteraction.prototype.cancelUpDownAction = function (isTimelineYear) {
518
+ var isVerticalYear = isTimelineYear && this.parent.activeViewOptions.orientation === 'Vertical';
519
+ var isGroup = this.parent.activeViewOptions.group.resources.length > 0;
520
+ if (isVerticalYear && isGroup || isTimelineYear && this.initialTarget.classList.contains(cls.OTHERMONTH_CLASS)) {
521
+ return true;
522
+ }
523
+ if (this.parent.activeView.isTimelineView() && !isTimelineYear || this.parent.currentView === 'MonthAgenda') {
524
+ return true;
525
+ }
526
+ return false;
527
+ };
486
528
  KeyboardInteraction.prototype.processUp = function (e, isMultiple) {
487
- if ((isMultiple && (this.parent.activeView.isTimelineView() || this.parent.currentView === 'MonthAgenda'))) {
529
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
530
+ if (isMultiple && this.cancelUpDownAction(isTimelineYear)) {
488
531
  return;
489
532
  }
490
533
  var target = (e.target);
@@ -507,8 +550,22 @@ var KeyboardInteraction = /** @class */ (function () {
507
550
  if (target.classList.contains(cls.WORK_CELLS_CLASS) && !this.parent.element.querySelector('.' + cls.POPUP_OPEN)) {
508
551
  var tableRows = this.parent.getTableRows();
509
552
  var curRowIndex = tableRows.indexOf(target.parentElement);
510
- if (curRowIndex > 0 && curRowIndex < tableRows.length) {
511
- this.selectCells(isMultiple, (tableRows[curRowIndex - 1]).cells[target.cellIndex]);
553
+ var targetCell = void 0;
554
+ if (isTimelineYear && isMultiple && this.parent.activeViewOptions.group.resources.length === 0) {
555
+ targetCell = this.isInverseTableSelect() ? this.getVerticalUpDownCell(tableRows, target, curRowIndex, true) :
556
+ this.getHorizontalUpDownCell(tableRows, target, curRowIndex, true);
557
+ }
558
+ if ((curRowIndex > 0 || targetCell) && curRowIndex < tableRows.length) {
559
+ targetCell = targetCell ? targetCell : (tableRows[curRowIndex - 1]).cells[target.cellIndex];
560
+ if (this.parent.currentView === 'Year' && targetCell.classList.contains(cls.OTHERMONTH_CLASS)) {
561
+ if (this.parent.activeView.getStartDate().getTime() < +targetCell.getAttribute('data-date')) {
562
+ targetCell = this.getYearUpDownCell(tableRows, curRowIndex - 1, target.cellIndex, true);
563
+ }
564
+ else {
565
+ return;
566
+ }
567
+ }
568
+ this.selectCells(isMultiple, targetCell);
512
569
  }
513
570
  }
514
571
  else if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
@@ -516,7 +573,8 @@ var KeyboardInteraction = /** @class */ (function () {
516
573
  }
517
574
  };
518
575
  KeyboardInteraction.prototype.processDown = function (e, isMultiple) {
519
- if (isMultiple && (this.parent.activeView.isTimelineView() || this.parent.currentView === 'MonthAgenda')) {
576
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
577
+ if (isMultiple && this.cancelUpDownAction(isTimelineYear)) {
520
578
  return;
521
579
  }
522
580
  var target = (e.target);
@@ -539,16 +597,62 @@ var KeyboardInteraction = /** @class */ (function () {
539
597
  }
540
598
  if (target.classList.contains(cls.WORK_CELLS_CLASS) && !this.parent.element.querySelector('.' + cls.POPUP_OPEN)) {
541
599
  var curRowIndex = tableRows.indexOf(target.parentElement);
542
- if (curRowIndex >= 0 && curRowIndex < tableRows.length - 1) {
543
- this.selectCells(isMultiple, (tableRows[curRowIndex + 1]).cells[target.cellIndex]);
600
+ var targetCell = void 0;
601
+ if (isTimelineYear && isMultiple && this.parent.activeViewOptions.group.resources.length === 0) {
602
+ targetCell = this.isInverseTableSelect() ? this.getVerticalUpDownCell(tableRows, target, curRowIndex, false)
603
+ : this.getHorizontalUpDownCell(tableRows, target, curRowIndex, false);
604
+ }
605
+ if (curRowIndex >= 0 && ((curRowIndex < tableRows.length - 1) || targetCell)) {
606
+ targetCell = targetCell ? targetCell : (tableRows[curRowIndex + 1]).cells[target.cellIndex];
607
+ if (this.parent.currentView === 'Year' && targetCell.classList.contains(cls.OTHERMONTH_CLASS)) {
608
+ if (this.parent.activeView.getEndDate().getTime() > +targetCell.getAttribute('data-date')) {
609
+ targetCell = this.getYearUpDownCell(tableRows, curRowIndex + 1, target.cellIndex, false);
610
+ }
611
+ else {
612
+ return;
613
+ }
614
+ }
615
+ this.selectCells(isMultiple, targetCell);
544
616
  }
545
617
  }
546
618
  else if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
547
619
  this.selectAppointment(false, target);
548
620
  }
549
621
  };
622
+ KeyboardInteraction.prototype.getYearUpDownCell = function (tableRows, rowIndex, cellIndex, isUp) {
623
+ while (tableRows[rowIndex] && tableRows[rowIndex].cells[cellIndex].classList.contains(cls.OTHERMONTH_CLASS)) {
624
+ rowIndex = rowIndex + (isUp ? -1 : 1);
625
+ }
626
+ return tableRows[rowIndex].cells[cellIndex];
627
+ };
628
+ // eslint-disable-next-line max-len
629
+ KeyboardInteraction.prototype.getHorizontalUpDownCell = function (tableRows, target, curRowIndex, isUp) {
630
+ var row = tableRows[curRowIndex + (isUp ? -1 : 1)];
631
+ var cell = row ? row.cells[target.cellIndex] : target;
632
+ if (cell.classList.contains(cls.OTHERMONTH_CLASS)) {
633
+ var workCell = row.querySelector('.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')');
634
+ var date = new Date(+workCell.getAttribute('data-date'));
635
+ var query = '[data-date="' + new Date(date.getFullYear(), date.getMonth() + 1, 0).getTime() + '"]';
636
+ cell = cell.cellIndex < workCell.cellIndex ? workCell : row.querySelector(query);
637
+ }
638
+ return cell;
639
+ };
640
+ // eslint-disable-next-line max-len
641
+ KeyboardInteraction.prototype.getVerticalUpDownCell = function (tableRows, target, curRowIndex, isUp) {
642
+ var hasRow = isUp && curRowIndex > 0 || !isUp && curRowIndex < tableRows.length - 1;
643
+ var targetCell = hasRow ? tableRows[curRowIndex + (isUp ? -1 : 1)].cells[target.cellIndex] : undefined;
644
+ if (!targetCell || targetCell.classList.contains(cls.OTHERMONTH_CLASS)) {
645
+ var column = tableRows[curRowIndex].cells[target.cellIndex - (isUp ? 1 : -1)];
646
+ if (column) {
647
+ var dateAttr = +target.getAttribute('data-date') - (isUp ? util.MS_PER_DAY : -util.MS_PER_DAY);
648
+ return this.parent.getContentTable().querySelector('.' + cls.WORK_CELLS_CLASS + '[data-date="' + dateAttr + '"]');
649
+ }
650
+ targetCell = target;
651
+ }
652
+ return targetCell;
653
+ };
550
654
  KeyboardInteraction.prototype.processLeftRight = function (target) {
551
- var tableEle = this.parent.getContentTable();
655
+ var tableEle = (this.parent.currentView === 'Year' ? target.closest('tbody') : this.parent.getContentTable());
552
656
  var curRowIndex = target.parentNode.sectionRowIndex;
553
657
  var key = {
554
658
  element: tableEle,
@@ -561,8 +665,9 @@ var KeyboardInteraction = /** @class */ (function () {
561
665
  KeyboardInteraction.prototype.getQuickPopupElement = function () {
562
666
  return (this.parent.isAdaptive ? document.body : this.parent.element).querySelector('.' + cls.POPUP_WRAPPER_CLASS);
563
667
  };
564
- KeyboardInteraction.prototype.isCancelLeftRightAction = function (e, isMultiple) {
565
- if (this.parent.currentView === 'Agenda' || (isMultiple && this.parent.currentView === 'MonthAgenda')) {
668
+ KeyboardInteraction.prototype.isCancelLeftRightAction = function (e, isMultiple, isTimelineYear) {
669
+ var prevent = this.parent.currentView === 'MonthAgenda' || isTimelineYear && this.initialTarget.classList.contains(cls.OTHERMONTH_CLASS);
670
+ if (this.parent.currentView === 'Agenda' || (isMultiple && prevent)) {
566
671
  return true;
567
672
  }
568
673
  if (this.isPreventAction(e) && isMultiple) {
@@ -576,7 +681,8 @@ var KeyboardInteraction = /** @class */ (function () {
576
681
  return false;
577
682
  };
578
683
  KeyboardInteraction.prototype.processRight = function (e, isMultiple) {
579
- if (this.isCancelLeftRightAction(e, isMultiple)) {
684
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
685
+ if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
580
686
  return;
581
687
  }
582
688
  var selectedCells = this.parent.getSelectedElements();
@@ -597,24 +703,36 @@ var KeyboardInteraction = /** @class */ (function () {
597
703
  if (target.classList.contains(cls.WORK_CELLS_CLASS) &&
598
704
  (e.target).classList.contains(cls.WORK_CELLS_CLASS)) {
599
705
  var key = this.processLeftRight(target);
600
- if (key.columnIndex >= 0 && key.columnIndex < key.maxIndex - 1) {
706
+ var targetDate = new Date(+target.getAttribute('data-date'));
707
+ var isMonthEnd = this.parent.currentView === 'Year' && targetDate.getTime() === util.lastDateOfMonth(targetDate).getTime();
708
+ if (key.columnIndex >= 0 && key.columnIndex < key.maxIndex - 1 && !isMonthEnd) {
601
709
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex].cells[target.cellIndex + 1], 'right');
710
+ if (isTimelineYear && isMultiple && targetCell.classList.contains(cls.OTHERMONTH_CLASS)) {
711
+ targetCell = this.getTimelineYearTargetCell(key, target, true);
712
+ }
602
713
  if (!isNullOrUndefined(targetCell)) {
603
714
  this.selectCells(isMultiple, targetCell);
604
715
  }
605
716
  }
606
- else if (key.columnIndex === key.maxIndex - 1) {
607
- if (!this.isInverseTableSelect() && key.rowIndex < key.element.rows.length - 1) {
717
+ else if (key.columnIndex === key.maxIndex - 1 || isMonthEnd) {
718
+ if (!this.isInverseTableSelect() && key.rowIndex < key.element.rows.length - 1 && !isMonthEnd) {
608
719
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex + 1].cells[0], 'right');
720
+ var changeTargetCell = isTimelineYear && isMultiple && targetCell.classList.contains(cls.OTHERMONTH_CLASS);
721
+ targetCell = changeTargetCell ? this.getHorizontalLeftRightCell(key, target, true) : targetCell;
609
722
  if (!isNullOrUndefined(targetCell)) {
610
723
  this.selectCells(isMultiple, targetCell);
611
724
  }
612
725
  }
613
726
  else if (!isMultiple) {
727
+ if (isMonthEnd && targetDate.getTime() !== this.parent.activeView.getEndDate().getTime()) {
728
+ this.selectCells(isMultiple, this.parent.element.querySelector(':not(.' + cls.OTHERMONTH_CLASS + ')[data-date="' + (targetDate.getTime() + util.MS_PER_DAY) + '"]'));
729
+ return;
730
+ }
614
731
  var rowIndex = this.isInverseTableSelect() ? key.rowIndex : 0;
615
732
  this.parent.changeDate(this.parent.activeView.getNextPreviousDate('next'), e);
616
733
  var tableEle = this.parent.getContentTable();
617
- this.selectCells(false, tableEle.rows[rowIndex].cells[0]);
734
+ var cell = isMonthEnd ? tableEle.rows[rowIndex].querySelector('.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')') : tableEle.rows[rowIndex].cells[0];
735
+ this.selectCells(false, cell);
618
736
  }
619
737
  }
620
738
  }
@@ -633,7 +751,8 @@ var KeyboardInteraction = /** @class */ (function () {
633
751
  }
634
752
  };
635
753
  KeyboardInteraction.prototype.processLeft = function (e, isMultiple) {
636
- if (this.isCancelLeftRightAction(e, isMultiple)) {
754
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
755
+ if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
637
756
  return;
638
757
  }
639
758
  var target = (e.target);
@@ -654,24 +773,40 @@ var KeyboardInteraction = /** @class */ (function () {
654
773
  if ((e.target).classList.contains(cls.WORK_CELLS_CLASS) &&
655
774
  target.classList.contains(cls.WORK_CELLS_CLASS)) {
656
775
  var key = this.processLeftRight(target);
657
- if (key.columnIndex > 0 && key.columnIndex < key.maxIndex) {
776
+ var targetDate = new Date(+target.getAttribute('data-date'));
777
+ var isMonthStart = this.parent.currentView === 'Year' && targetDate.getTime() === util.firstDateOfMonth(targetDate).getTime();
778
+ if (key.columnIndex > 0 && key.columnIndex < key.maxIndex && !isMonthStart) {
658
779
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex].cells[target.cellIndex - 1], 'left');
780
+ if (isTimelineYear && isMultiple && targetCell.classList.contains(cls.OTHERMONTH_CLASS)) {
781
+ targetCell = this.getTimelineYearTargetCell(key, target, false);
782
+ }
659
783
  if (!isNullOrUndefined(targetCell)) {
660
784
  this.selectCells(isMultiple, targetCell);
661
785
  }
662
786
  }
663
- else if (key.columnIndex === 0) {
787
+ else if (key.columnIndex === 0 || isMonthStart) {
664
788
  if (!this.isInverseTableSelect() && key.rowIndex > 0) {
665
789
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex - 1].cells[key.maxIndex - 1], 'left');
790
+ var otherMonthCell = isTimelineYear && isMultiple && targetCell.classList.contains(cls.OTHERMONTH_CLASS);
791
+ targetCell = otherMonthCell ? this.getHorizontalLeftRightCell(key, target, false) : targetCell;
666
792
  if (!isNullOrUndefined(targetCell)) {
667
793
  this.selectCells(isMultiple, targetCell);
668
794
  }
669
795
  }
670
796
  else if (!isMultiple) {
797
+ if (isMonthStart && targetDate.getTime() !== this.parent.activeView.getStartDate().getTime()) {
798
+ this.selectCells(isMultiple, this.parent.element.querySelector('[data-date="' + (targetDate.getTime() - util.MS_PER_DAY) + '"]'));
799
+ return;
800
+ }
671
801
  this.parent.changeDate(this.parent.activeView.getNextPreviousDate('previous'), e);
672
802
  var tableEle = this.parent.getContentTable();
673
803
  var rowIndex = this.isInverseTableSelect() ? key.rowIndex : tableEle.rows.length - 1;
674
- this.selectCells(false, tableEle.rows[rowIndex].cells[key.maxIndex - 1]);
804
+ var cell = tableEle.rows[rowIndex].cells[key.maxIndex - 1];
805
+ if (isMonthStart) {
806
+ var tbody = this.parent.element.querySelectorAll('.' + cls.CONTENT_TABLE_CLASS + ' tbody');
807
+ cell = tbody.item(tbody.length - 1).querySelector(':not(.' + cls.OTHERMONTH_CLASS + ')[data-date="' + this.parent.activeView.getEndDate().getTime() + '"]');
808
+ }
809
+ this.selectCells(false, cell);
675
810
  }
676
811
  }
677
812
  }
@@ -689,6 +824,29 @@ var KeyboardInteraction = /** @class */ (function () {
689
824
  }
690
825
  }
691
826
  };
827
+ KeyboardInteraction.prototype.getTimelineYearTargetCell = function (key, target, isRight) {
828
+ return this.isInverseTableSelect() ? this.getVerticalLeftRightCell(target, isRight) :
829
+ this.getHorizontalLeftRightCell(key, target, isRight);
830
+ };
831
+ KeyboardInteraction.prototype.getHorizontalLeftRightCell = function (key, target, isRight) {
832
+ var row = key.element.rows[target.parentNode.sectionRowIndex + (isRight ? 1 : -1)];
833
+ if (row) {
834
+ var query = isRight ? '.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')'
835
+ : '[data-date="' + ((+target.getAttribute('data-date')) - util.MS_PER_DAY) + '"]';
836
+ return row.querySelector(query);
837
+ }
838
+ return target;
839
+ };
840
+ KeyboardInteraction.prototype.getVerticalLeftRightCell = function (target, isRight) {
841
+ var date = new Date(+target.getAttribute('data-date'));
842
+ var start = new Date(date.getFullYear(), date.getMonth() + (isRight ? 1 : -1), 1);
843
+ var tableEle = this.parent.getContentTable();
844
+ var targetCell = tableEle.querySelector('[data-date="' + start.getTime() + '"]');
845
+ if (targetCell.parentNode.sectionRowIndex > target.parentNode.sectionRowIndex) {
846
+ return targetCell;
847
+ }
848
+ return tableEle.querySelector('[data-date="' + new Date(start.getFullYear(), start.getMonth() + 1, 0).getTime() + '"]');
849
+ };
692
850
  KeyboardInteraction.prototype.calculateNextPrevDate = function (currentCell, target, type) {
693
851
  var initialId = this.initialTarget.getAttribute('data-group-index');
694
852
  if (this.parent.activeViewOptions.group.resources.length > 0 && this.parent.currentView === 'Month') {
@@ -733,6 +891,16 @@ var KeyboardInteraction = /** @class */ (function () {
733
891
  };
734
892
  KeyboardInteraction.prototype.processTab = function (e, isReverse) {
735
893
  var target = e.target;
894
+ if (target.classList.contains(cls.INLINE_SUBJECT_CLASS) && this.parent.inlineModule) {
895
+ target = target.closest('.e-appointment');
896
+ this.parent.inlineModule.inlineCrudActions(e.target);
897
+ }
898
+ if (this.parent.currentView === 'TimelineYear' && target.classList.contains(cls.OTHERMONTH_CLASS)) {
899
+ if (target.classList.contains(cls.SELECTED_CELL_CLASS)) {
900
+ this.parent.removeSelectedClass();
901
+ }
902
+ return;
903
+ }
736
904
  var popupWrapper = closest(target, '.' + cls.POPUP_WRAPPER_CLASS + ',.' + cls.MORE_POPUP_WRAPPER_CLASS);
737
905
  if (popupWrapper && popupWrapper.classList.contains(cls.POPUP_OPEN)) {
738
906
  if (popupWrapper.classList.contains(cls.MORE_POPUP_WRAPPER_CLASS)) {
@@ -774,7 +942,9 @@ var KeyboardInteraction = /** @class */ (function () {
774
942
  }
775
943
  if (target.classList.contains(cls.APPOINTMENT_CLASS)) {
776
944
  var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
777
- if (this.parent.activeView.isTimelineView() && this.parent.activeViewOptions.group.resources.length > 0) {
945
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
946
+ var isTimeline = this.parent.activeView.isTimelineView() && !isTimelineYear;
947
+ if ((isTimeline || isTimelineYear && this.parent.activeViewOptions.orientation === 'Vertical') && this.parent.activeViewOptions.group.resources.length > 0) {
778
948
  var index = parseInt(target.getAttribute('data-group-index'), 10);
779
949
  appElements = [].slice.call(this.parent.element.querySelectorAll("." + cls.APPOINTMENT_CLASS + "[data-group-index=\"" + index + "\"]"));
780
950
  var resCellSelector = "." + cls.RESOURCE_CELLS_CLASS + "[data-group-index=\"" + (isReverse ? index : index + 1) + "\"]";
@@ -823,7 +993,6 @@ var KeyboardInteraction = /** @class */ (function () {
823
993
  this.processTabOnResourceCells(target, isReverse);
824
994
  }
825
995
  };
826
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
827
996
  KeyboardInteraction.prototype.processDelete = function (e) {
828
997
  var activeEle = document.activeElement;
829
998
  if (this.parent.currentView === 'MonthAgenda') {
@@ -272,6 +272,8 @@ export interface ExportOptions {
272
272
  exportType?: ExcelFormat;
273
273
  /** The custom or specific field collection of event dataSource to be exported can be provided through fields option. */
274
274
  fields?: string[];
275
+ /** Specifies the collection of field name and its header text to export to excel. If this list is empty, the scheduler exports based on fields. If both fieldsInfo and fields are empty then the scheduler exported all the fields. */
276
+ fieldsInfo?: ExportFieldInfo[];
275
277
  /** The custom data collection can be exported by passing them through the customData option. */
276
278
  customData?: Record<string, any>[];
277
279
  /** There also exists option to export each individual instances of the recurring events to an Excel file,
@@ -280,6 +282,13 @@ export interface ExportOptions {
280
282
  */
281
283
  includeOccurrences?: boolean;
282
284
  }
285
+ /** An interface that holds the field name and its header text to export to excel. */
286
+ export interface ExportFieldInfo {
287
+ /** Defines the header display text. */
288
+ text: string;
289
+ /** Defines the field name to export. */
290
+ name: string;
291
+ }
283
292
  /** An interface that holds the details of a resource. */
284
293
  export interface ResourceDetails {
285
294
  /** Returns the resource model data such as the field mapping options used within it. */
@@ -374,6 +383,8 @@ export interface IRenderer {
374
383
  isCurrentDate(date: Date): boolean;
375
384
  startDate(): Date;
376
385
  endDate(): Date;
386
+ getStartDate?(): Date;
387
+ getEndDate?(): Date;
377
388
  scrollToHour?(hour: string, scrollDate?: Date): void;
378
389
  scrollToDate?(scrollDate?: Date): void;
379
390
  highlightCurrentTime?(): void;
@@ -474,6 +485,7 @@ export interface UIStateArgs {
474
485
  groupIndex?: number;
475
486
  action?: boolean;
476
487
  isBlock?: boolean;
488
+ isCustomMonth?: boolean;
477
489
  }
478
490
  /**
479
491
  * @private
@@ -340,6 +340,7 @@ var ResourceBase = /** @class */ (function () {
340
340
  targetType: 'relative',
341
341
  actionOnScroll: 'none',
342
342
  content: this.treeViewObj.element,
343
+ relateTo: this.parent.element.querySelector('.' + cls.TABLE_CONTAINER_CLASS),
343
344
  enableRtl: this.parent.enableRtl,
344
345
  hideAnimation: { name: 'SlideLeftOut', duration: 500 },
345
346
  showAnimation: { name: 'SlideLeftIn', duration: 500 },