@syncfusion/ej2-schedule 19.3.46 → 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 (125) 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 +49 -5
  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 +479 -133
  7. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  8. package/dist/es6/ej2-schedule.es5.js +480 -137
  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/date-generator.js +3 -3
  15. package/src/recurrence-editor/recurrence-editor.js +2 -2
  16. package/src/schedule/actions/crud.js +2 -0
  17. package/src/schedule/actions/drag.js +28 -18
  18. package/src/schedule/actions/keyboard.d.ts +7 -0
  19. package/src/schedule/actions/keyboard.js +197 -28
  20. package/src/schedule/base/interface.d.ts +19 -0
  21. package/src/schedule/base/resource.js +1 -0
  22. package/src/schedule/base/schedule-model.d.ts +97 -20
  23. package/src/schedule/base/schedule.d.ts +97 -21
  24. package/src/schedule/base/schedule.js +27 -5
  25. package/src/schedule/base/type.d.ts +4 -0
  26. package/src/schedule/base/util.d.ts +1 -0
  27. package/src/schedule/base/util.js +1 -0
  28. package/src/schedule/event-renderer/event-base.d.ts +2 -0
  29. package/src/schedule/event-renderer/event-base.js +29 -9
  30. package/src/schedule/event-renderer/inline-edit.js +8 -5
  31. package/src/schedule/event-renderer/month.js +2 -2
  32. package/src/schedule/event-renderer/timeline-view.js +4 -0
  33. package/src/schedule/event-renderer/vertical-view.js +9 -6
  34. package/src/schedule/event-renderer/year.js +1 -1
  35. package/src/schedule/exports/excel-export.d.ts +2 -1
  36. package/src/schedule/exports/excel-export.js +21 -18
  37. package/src/schedule/models/event-settings-model.d.ts +20 -1
  38. package/src/schedule/models/event-settings.d.ts +18 -0
  39. package/src/schedule/models/event-settings.js +6 -0
  40. package/src/schedule/models/views-model.d.ts +19 -0
  41. package/src/schedule/models/views.d.ts +17 -0
  42. package/src/schedule/models/views.js +6 -0
  43. package/src/schedule/popups/event-window.d.ts +0 -1
  44. package/src/schedule/popups/event-window.js +4 -5
  45. package/src/schedule/popups/form-validator.js +4 -1
  46. package/src/schedule/popups/quick-popups.js +3 -0
  47. package/src/schedule/renderer/agenda.js +3 -1
  48. package/src/schedule/renderer/header-renderer.d.ts +1 -0
  49. package/src/schedule/renderer/header-renderer.js +22 -8
  50. package/src/schedule/renderer/month.d.ts +4 -0
  51. package/src/schedule/renderer/month.js +68 -19
  52. package/src/schedule/renderer/timeline-year.js +3 -0
  53. package/src/schedule/renderer/view-base.js +9 -0
  54. package/src/schedule/renderer/year.d.ts +2 -2
  55. package/src/schedule/renderer/year.js +24 -6
  56. package/src/schedule/timezone/timezone.d.ts +3 -2
  57. package/src/schedule/timezone/timezone.js +0 -1
  58. package/styles/bootstrap-dark.css +108 -27
  59. package/styles/bootstrap.css +105 -27
  60. package/styles/bootstrap4.css +117 -62
  61. package/styles/bootstrap5-dark.css +118 -67
  62. package/styles/bootstrap5.css +118 -67
  63. package/styles/fabric-dark.css +108 -26
  64. package/styles/fabric.css +109 -26
  65. package/styles/highcontrast-light.css +104 -26
  66. package/styles/highcontrast.css +109 -28
  67. package/styles/material-dark.css +110 -32
  68. package/styles/material.css +103 -25
  69. package/styles/recurrence-editor/_bootstrap-dark-definition.scss +7 -0
  70. package/styles/recurrence-editor/_bootstrap-definition.scss +7 -0
  71. package/styles/recurrence-editor/_bootstrap4-definition.scss +7 -0
  72. package/styles/recurrence-editor/_bootstrap5-definition.scss +7 -0
  73. package/styles/recurrence-editor/_fabric-dark-definition.scss +8 -0
  74. package/styles/recurrence-editor/_fabric-definition.scss +7 -0
  75. package/styles/recurrence-editor/_fluent-definition.scss +15 -0
  76. package/styles/recurrence-editor/_highcontrast-definition.scss +7 -0
  77. package/styles/recurrence-editor/_highcontrast-light-definition.scss +7 -0
  78. package/styles/recurrence-editor/_layout.scss +20 -4
  79. package/styles/recurrence-editor/_material-dark-definition.scss +7 -0
  80. package/styles/recurrence-editor/_material-definition.scss +7 -0
  81. package/styles/recurrence-editor/_tailwind-definition.scss +15 -8
  82. package/styles/recurrence-editor/bootstrap-dark.css +20 -4
  83. package/styles/recurrence-editor/bootstrap.css +20 -4
  84. package/styles/recurrence-editor/bootstrap4.css +20 -4
  85. package/styles/recurrence-editor/bootstrap5-dark.css +20 -4
  86. package/styles/recurrence-editor/bootstrap5.css +20 -4
  87. package/styles/recurrence-editor/fabric-dark.css +20 -4
  88. package/styles/recurrence-editor/fabric.css +20 -4
  89. package/styles/recurrence-editor/highcontrast-light.css +20 -4
  90. package/styles/recurrence-editor/highcontrast.css +20 -4
  91. package/styles/recurrence-editor/material-dark.css +20 -4
  92. package/styles/recurrence-editor/material.css +20 -4
  93. package/styles/recurrence-editor/tailwind-dark.css +20 -4
  94. package/styles/recurrence-editor/tailwind.css +20 -4
  95. package/styles/schedule/_bootstrap-dark-definition.scss +22 -1
  96. package/styles/schedule/_bootstrap-definition.scss +22 -1
  97. package/styles/schedule/_bootstrap4-definition.scss +23 -1
  98. package/styles/schedule/_bootstrap5-definition.scss +145 -119
  99. package/styles/schedule/_fabric-dark-definition.scss +22 -1
  100. package/styles/schedule/_fabric-definition.scss +22 -1
  101. package/styles/schedule/_fluent-definition.scss +218 -0
  102. package/styles/schedule/_highcontrast-definition.scss +22 -1
  103. package/styles/schedule/_highcontrast-light-definition.scss +22 -1
  104. package/styles/schedule/_layout.scss +95 -158
  105. package/styles/schedule/_material-dark-definition.scss +22 -1
  106. package/styles/schedule/_material-definition.scss +21 -0
  107. package/styles/schedule/_tailwind-definition.scss +216 -195
  108. package/styles/schedule/_theme.scss +1 -1
  109. package/styles/schedule/bootstrap-dark.css +88 -23
  110. package/styles/schedule/bootstrap.css +85 -23
  111. package/styles/schedule/bootstrap4.css +97 -58
  112. package/styles/schedule/bootstrap5-dark.css +98 -63
  113. package/styles/schedule/bootstrap5.css +98 -63
  114. package/styles/schedule/fabric-dark.css +88 -22
  115. package/styles/schedule/fabric.css +89 -22
  116. package/styles/schedule/highcontrast-light.css +84 -22
  117. package/styles/schedule/highcontrast.css +89 -24
  118. package/styles/schedule/icons/_fluent.scss +231 -0
  119. package/styles/schedule/icons/_tailwind.scss +231 -231
  120. package/styles/schedule/material-dark.css +90 -28
  121. package/styles/schedule/material.css +83 -21
  122. package/styles/schedule/tailwind-dark.css +94 -52
  123. package/styles/schedule/tailwind.css +94 -52
  124. package/styles/tailwind-dark.css +114 -56
  125. package/styles/tailwind.css +114 -56
@@ -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. */
@@ -295,6 +304,13 @@ export interface ResourceDetails {
295
304
  /** It returns the Name of current resource in compact mode. */
296
305
  resourceName?: string;
297
306
  }
307
+ /** An interface that represents time zone and display text for scheduler. */
308
+ export interface TimezoneFields {
309
+ /** Assigns the timezone display text. */
310
+ Text: string;
311
+ /** Assigns the IANA timezone value. */
312
+ Value: string;
313
+ }
298
314
  /** An interface that holds options of events once it bound to scheduler. */
299
315
  export interface DataBoundEventArgs extends BaseEventArgs {
300
316
  result: Record<string, any>[];
@@ -367,6 +383,8 @@ export interface IRenderer {
367
383
  isCurrentDate(date: Date): boolean;
368
384
  startDate(): Date;
369
385
  endDate(): Date;
386
+ getStartDate?(): Date;
387
+ getEndDate?(): Date;
370
388
  scrollToHour?(hour: string, scrollDate?: Date): void;
371
389
  scrollToDate?(scrollDate?: Date): void;
372
390
  highlightCurrentTime?(): void;
@@ -467,6 +485,7 @@ export interface UIStateArgs {
467
485
  groupIndex?: number;
468
486
  action?: boolean;
469
487
  isBlock?: boolean;
488
+ isCustomMonth?: boolean;
470
489
  }
471
490
  /**
472
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 },