@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
@@ -91,6 +91,7 @@ var cellMouseDown = 'cell-mouse-down';
91
91
  * Schedule common utilities
92
92
  */
93
93
  var WEEK_LENGTH = 7;
94
+ var DEFAULT_WEEKS = 6;
94
95
  var MS_PER_DAY = 86400000;
95
96
  var MS_PER_MINUTE = 60000;
96
97
  /**
@@ -1247,8 +1248,10 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1247
1248
  enableRtl: this.parent.enableRtl
1248
1249
  });
1249
1250
  var calendarView = this.getCalendarView();
1251
+ var isDisplayDate = this.parent.currentView === 'Month' &&
1252
+ !isNullOrUndefined(this.parent.activeViewOptions.displayDate) && !this.hasSelectedDate();
1250
1253
  this.headerCalendar = new Calendar({
1251
- value: this.parent.selectedDate,
1254
+ value: isDisplayDate ? this.parent.activeViewOptions.displayDate : this.parent.selectedDate,
1252
1255
  min: this.parent.minDate,
1253
1256
  max: this.parent.maxDate,
1254
1257
  firstDayOfWeek: this.parent.activeViewOptions.firstDayOfWeek,
@@ -1336,8 +1339,13 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1336
1339
  this.parent.changeView('TimelineYear', args.originalEvent, undefined, this.calculateViewIndex(args));
1337
1340
  break;
1338
1341
  case 'e-today':
1339
- if (this.parent.currentView === 'Agenda' || !this.parent.isSelectedDate(resetTime(this.parent.getCurrentTime()))) {
1340
- this.parent.changeDate(resetTime(this.parent.getCurrentTime()), args.originalEvent);
1342
+ var currentTime = resetTime(this.parent.getCurrentTime());
1343
+ if (this.parent.currentView === 'Agenda' || !this.parent.isSelectedDate(currentTime) ||
1344
+ this.parent.currentView === 'Month' && this.parent.activeViewOptions.displayDate && !this.hasSelectedDate() &&
1345
+ resetTime(this.parent.activeViewOptions.displayDate) !== currentTime || this.parent.currentView === 'Month' &&
1346
+ this.parent.activeViewOptions.numberOfWeeks > 0 && !this.hasSelectedDate()
1347
+ && resetTime(firstDateOfMonth(this.parent.selectedDate)) !== currentTime) {
1348
+ this.parent.changeDate(currentTime, args.originalEvent);
1341
1349
  }
1342
1350
  break;
1343
1351
  case 'e-prev':
@@ -1356,8 +1364,8 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1356
1364
  var slotCount = this.parent.activeViewOptions.timeScale.slotCount;
1357
1365
  var msInterval = (interval * MS_PER_MINUTE) / slotCount;
1358
1366
  var startTime = new Date(this.parent.selectedDate.getTime());
1359
- var currentTime = this.parent.getCurrentTime();
1360
- startTime.setHours(currentTime.getHours(), (Math.round(startTime.getMinutes() / msInterval) * msInterval), 0);
1367
+ var currentTime_1 = this.parent.getCurrentTime();
1368
+ startTime.setHours(currentTime_1.getHours(), (Math.round(startTime.getMinutes() / msInterval) * msInterval), 0);
1361
1369
  var endTime = new Date(new Date(startTime.getTime()).setMilliseconds(startTime.getMilliseconds() + msInterval));
1362
1370
  data = { startTime: startTime, endTime: endTime, isAllDay: false };
1363
1371
  }
@@ -1372,6 +1380,11 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1372
1380
  toolbarPopUp.ej2_instances[0].hide({ name: 'SlideUp', duration: 100 });
1373
1381
  }
1374
1382
  };
1383
+ HeaderRenderer.prototype.hasSelectedDate = function () {
1384
+ var selectedTime = resetTime(this.parent.selectedDate).getTime();
1385
+ return selectedTime >= this.parent.activeView.getStartDate().getTime() &&
1386
+ selectedTime <= this.parent.activeView.getEndDate().getTime();
1387
+ };
1375
1388
  HeaderRenderer.prototype.getHeaderElement = function () {
1376
1389
  return this.toolbarObj.element;
1377
1390
  };
@@ -1416,9 +1429,11 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1416
1429
  lastDate = addDays(firstDate, 7 * this.parent.activeViewOptions.interval);
1417
1430
  }
1418
1431
  if (this.parent.currentView === 'Month') {
1419
- firstDate = firstDateOfMonth(this.parent.selectedDate);
1420
- var lastMonthFirstDate = addMonths(firstDate, this.parent.activeViewOptions.interval - 1);
1421
- lastDate = lastDateOfMonth(lastMonthFirstDate);
1432
+ var isCustomMonth = !isNullOrUndefined(this.parent.activeViewOptions.displayDate) ||
1433
+ this.parent.activeViewOptions.numberOfWeeks > 0;
1434
+ firstDate = isCustomMonth ? this.parent.activeView.getStartDate() : firstDateOfMonth(this.parent.selectedDate);
1435
+ lastDate = isCustomMonth ? this.parent.activeView.getEndDate() :
1436
+ lastDateOfMonth(addMonths(firstDate, this.parent.activeViewOptions.interval - 1));
1422
1437
  }
1423
1438
  if (!isNullOrUndefined(prevNavEle)) {
1424
1439
  this.toolbarObj.enableItems(prevNavEle, firstDate > this.parent.minDate);
@@ -1954,6 +1969,9 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
1954
1969
  }
1955
1970
  var queryStr = '.' + WORK_CELLS_CLASS + ',.' + ALLDAY_CELLS_CLASS + ',.' + HEADER_CELLS_CLASS;
1956
1971
  var target = closest(e.target, queryStr);
1972
+ if (this.parent.currentView === 'TimelineYear' && target.classList.contains(OTHERMONTH_CLASS)) {
1973
+ return;
1974
+ }
1957
1975
  this.parent.activeCellsData = this.getSelectedElements(target);
1958
1976
  var cellData = {};
1959
1977
  if (this.parent.eventWindow) {
@@ -1977,6 +1995,9 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
1977
1995
  || this.isPreventAction(e)) {
1978
1996
  return;
1979
1997
  }
1998
+ if (this.parent.currentView === 'TimelineYear' && e.target.classList.contains(OTHERMONTH_CLASS)) {
1999
+ return;
2000
+ }
1980
2001
  var target = e.target;
1981
2002
  if (closest(target, '.' + POPUP_WRAPPER_CLASS)) {
1982
2003
  if (target.classList.contains(QUICK_POPUP_EVENT_DETAILS_CLASS) ||
@@ -2011,11 +2032,16 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2011
2032
  this.parent.notify(inlineClick, inlineArgs);
2012
2033
  }
2013
2034
  else {
2014
- this.parent.notify(cellClick, args);
2035
+ if (this.parent.currentView === 'Year') {
2036
+ target.click();
2037
+ }
2038
+ else {
2039
+ this.parent.notify(cellClick, args);
2040
+ }
2015
2041
  }
2016
2042
  return;
2017
2043
  }
2018
- if (target.classList.contains(INLINE_SUBJECT_CLASS)) {
2044
+ if (target.classList.contains(INLINE_SUBJECT_CLASS) && this.parent.inlineModule) {
2019
2045
  this.parent.inlineModule.inlineCrudActions(target);
2020
2046
  return;
2021
2047
  }
@@ -2047,7 +2073,9 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2047
2073
  };
2048
2074
  KeyboardInteraction.prototype.getCells = function (isInverseTable, start, end) {
2049
2075
  var tableEle = this.parent.getContentTable();
2050
- var cells = [].slice.call(tableEle.querySelectorAll('td'));
2076
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
2077
+ var query = isTimelineYear && !isInverseTable ? '.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')' : 'td';
2078
+ var cells = [].slice.call(tableEle.querySelectorAll(query));
2051
2079
  var maxRow = tableEle.rows.length;
2052
2080
  var maxColumn = tableEle.rows[0].cells.length;
2053
2081
  if (start && start.classList.contains(ALLDAY_CELLS_CLASS)) {
@@ -2062,7 +2090,11 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2062
2090
  if (isInverseTable) {
2063
2091
  for (var i = 0; i < maxColumn; i++) {
2064
2092
  for (var j = 0; j < maxRow; j++) {
2065
- inverseCells.push(cells[maxColumn * j + i]);
2093
+ var cell = cells[maxColumn * j + i];
2094
+ if (isTimelineYear && cell.classList.contains(OTHERMONTH_CLASS)) {
2095
+ continue;
2096
+ }
2097
+ inverseCells.push(cell);
2066
2098
  }
2067
2099
  }
2068
2100
  startIndex = inverseCells.indexOf(start);
@@ -2084,11 +2116,17 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2084
2116
  return;
2085
2117
  }
2086
2118
  this.parent.eventBase.removeSelectedAppointmentClass();
2087
- if (this.parent.activeView.isTimelineView()) {
2119
+ if (this.parent.activeView.isTimelineView() && this.parent.currentView !== 'TimelineYear') {
2088
2120
  var cell = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS +
2089
2121
  ' tr:not(.' + HIDDEN_CLASS + ') .' + WORK_CELLS_CLASS + ':not(.' + RESOURCE_GROUP_CELLS_CLASS + ')');
2090
2122
  this.selectCells(false, cell);
2091
2123
  }
2124
+ else if (this.parent.currentView.indexOf('Year') > -1) {
2125
+ var query = '.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')' + ':not(.' + RESOURCE_GROUP_CELLS_CLASS + ')';
2126
+ var isVerticalYear = this.parent.currentView === 'TimelineYear' && this.parent.activeViewOptions.orientation === 'Vertical';
2127
+ query += isVerticalYear ? '[data-date="' + this.parent.activeView.startDate().getTime() + '"]' : '';
2128
+ this.selectCells(false, this.parent.element.querySelector(query));
2129
+ }
2092
2130
  else {
2093
2131
  this.selectCells(false, this.parent.getWorkCellElements()[0]);
2094
2132
  }
@@ -2110,13 +2148,21 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2110
2148
  var target = (targetCell instanceof Array) ? targetCell.slice(-1)[0] : targetCell;
2111
2149
  if (isMultiple) {
2112
2150
  var initialId_1;
2113
- var views_1 = ['Day', 'Week', 'WorkWeek', 'Month', 'TimelineDay', 'TimelineWeek', 'TimelineWorkWeek', 'TimelineMonth'];
2151
+ var views_1 = ['Day', 'Week', 'WorkWeek', 'TimelineDay', 'TimelineWeek', 'TimelineWorkWeek', 'TimelineMonth', 'TimelineYear'];
2114
2152
  var args = { element: targetCell, requestType: 'mousemove', allowMultipleRow: true };
2115
2153
  this.parent.inlineModule.removeInlineAppointmentElement();
2116
2154
  this.parent.trigger(select, args, function (selectArgs) {
2117
2155
  var allowMultipleRow = (!selectArgs.allowMultipleRow) || (!_this.parent.allowMultiRowSelection);
2118
- if (allowMultipleRow && (views_1.indexOf(_this.parent.currentView) > -1)) {
2119
- target = target.parentElement.children[_this.initialTarget.cellIndex];
2156
+ if (allowMultipleRow) {
2157
+ var isTimelineYear = _this.parent.currentView === 'TimelineYear';
2158
+ if (isTimelineYear && _this.parent.activeViewOptions.orientation === 'Horizontal' || _this.parent.currentView === 'Month') {
2159
+ var isGroupYear = isTimelineYear && _this.parent.activeViewOptions.group.resources.length > 0;
2160
+ target = isGroupYear ? _this.initialTarget :
2161
+ _this.initialTarget.parentElement.children[target.cellIndex];
2162
+ }
2163
+ else if (views_1.indexOf(_this.parent.currentView) > -1) {
2164
+ target = target.parentElement.children[_this.initialTarget.cellIndex];
2165
+ }
2120
2166
  }
2121
2167
  var selectedCells = _this.getCells(_this.isInverseTableSelect(), _this.initialTarget, target);
2122
2168
  if (_this.parent.activeViewOptions.group.resources.length > 0) {
@@ -2252,8 +2298,20 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2252
2298
  }
2253
2299
  }
2254
2300
  };
2301
+ KeyboardInteraction.prototype.cancelUpDownAction = function (isTimelineYear) {
2302
+ var isVerticalYear = isTimelineYear && this.parent.activeViewOptions.orientation === 'Vertical';
2303
+ var isGroup = this.parent.activeViewOptions.group.resources.length > 0;
2304
+ if (isVerticalYear && isGroup || isTimelineYear && this.initialTarget.classList.contains(OTHERMONTH_CLASS)) {
2305
+ return true;
2306
+ }
2307
+ if (this.parent.activeView.isTimelineView() && !isTimelineYear || this.parent.currentView === 'MonthAgenda') {
2308
+ return true;
2309
+ }
2310
+ return false;
2311
+ };
2255
2312
  KeyboardInteraction.prototype.processUp = function (e, isMultiple) {
2256
- if ((isMultiple && (this.parent.activeView.isTimelineView() || this.parent.currentView === 'MonthAgenda'))) {
2313
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
2314
+ if (isMultiple && this.cancelUpDownAction(isTimelineYear)) {
2257
2315
  return;
2258
2316
  }
2259
2317
  var target = (e.target);
@@ -2276,8 +2334,22 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2276
2334
  if (target.classList.contains(WORK_CELLS_CLASS) && !this.parent.element.querySelector('.' + POPUP_OPEN)) {
2277
2335
  var tableRows = this.parent.getTableRows();
2278
2336
  var curRowIndex = tableRows.indexOf(target.parentElement);
2279
- if (curRowIndex > 0 && curRowIndex < tableRows.length) {
2280
- this.selectCells(isMultiple, (tableRows[curRowIndex - 1]).cells[target.cellIndex]);
2337
+ var targetCell = void 0;
2338
+ if (isTimelineYear && isMultiple && this.parent.activeViewOptions.group.resources.length === 0) {
2339
+ targetCell = this.isInverseTableSelect() ? this.getVerticalUpDownCell(tableRows, target, curRowIndex, true) :
2340
+ this.getHorizontalUpDownCell(tableRows, target, curRowIndex, true);
2341
+ }
2342
+ if ((curRowIndex > 0 || targetCell) && curRowIndex < tableRows.length) {
2343
+ targetCell = targetCell ? targetCell : (tableRows[curRowIndex - 1]).cells[target.cellIndex];
2344
+ if (this.parent.currentView === 'Year' && targetCell.classList.contains(OTHERMONTH_CLASS)) {
2345
+ if (this.parent.activeView.getStartDate().getTime() < +targetCell.getAttribute('data-date')) {
2346
+ targetCell = this.getYearUpDownCell(tableRows, curRowIndex - 1, target.cellIndex, true);
2347
+ }
2348
+ else {
2349
+ return;
2350
+ }
2351
+ }
2352
+ this.selectCells(isMultiple, targetCell);
2281
2353
  }
2282
2354
  }
2283
2355
  else if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
@@ -2285,7 +2357,8 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2285
2357
  }
2286
2358
  };
2287
2359
  KeyboardInteraction.prototype.processDown = function (e, isMultiple) {
2288
- if (isMultiple && (this.parent.activeView.isTimelineView() || this.parent.currentView === 'MonthAgenda')) {
2360
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
2361
+ if (isMultiple && this.cancelUpDownAction(isTimelineYear)) {
2289
2362
  return;
2290
2363
  }
2291
2364
  var target = (e.target);
@@ -2308,16 +2381,62 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2308
2381
  }
2309
2382
  if (target.classList.contains(WORK_CELLS_CLASS) && !this.parent.element.querySelector('.' + POPUP_OPEN)) {
2310
2383
  var curRowIndex = tableRows.indexOf(target.parentElement);
2311
- if (curRowIndex >= 0 && curRowIndex < tableRows.length - 1) {
2312
- this.selectCells(isMultiple, (tableRows[curRowIndex + 1]).cells[target.cellIndex]);
2384
+ var targetCell = void 0;
2385
+ if (isTimelineYear && isMultiple && this.parent.activeViewOptions.group.resources.length === 0) {
2386
+ targetCell = this.isInverseTableSelect() ? this.getVerticalUpDownCell(tableRows, target, curRowIndex, false)
2387
+ : this.getHorizontalUpDownCell(tableRows, target, curRowIndex, false);
2388
+ }
2389
+ if (curRowIndex >= 0 && ((curRowIndex < tableRows.length - 1) || targetCell)) {
2390
+ targetCell = targetCell ? targetCell : (tableRows[curRowIndex + 1]).cells[target.cellIndex];
2391
+ if (this.parent.currentView === 'Year' && targetCell.classList.contains(OTHERMONTH_CLASS)) {
2392
+ if (this.parent.activeView.getEndDate().getTime() > +targetCell.getAttribute('data-date')) {
2393
+ targetCell = this.getYearUpDownCell(tableRows, curRowIndex + 1, target.cellIndex, false);
2394
+ }
2395
+ else {
2396
+ return;
2397
+ }
2398
+ }
2399
+ this.selectCells(isMultiple, targetCell);
2313
2400
  }
2314
2401
  }
2315
2402
  else if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda') {
2316
2403
  this.selectAppointment(false, target);
2317
2404
  }
2318
2405
  };
2406
+ KeyboardInteraction.prototype.getYearUpDownCell = function (tableRows, rowIndex, cellIndex, isUp) {
2407
+ while (tableRows[rowIndex] && tableRows[rowIndex].cells[cellIndex].classList.contains(OTHERMONTH_CLASS)) {
2408
+ rowIndex = rowIndex + (isUp ? -1 : 1);
2409
+ }
2410
+ return tableRows[rowIndex].cells[cellIndex];
2411
+ };
2412
+ // eslint-disable-next-line max-len
2413
+ KeyboardInteraction.prototype.getHorizontalUpDownCell = function (tableRows, target, curRowIndex, isUp) {
2414
+ var row = tableRows[curRowIndex + (isUp ? -1 : 1)];
2415
+ var cell = row ? row.cells[target.cellIndex] : target;
2416
+ if (cell.classList.contains(OTHERMONTH_CLASS)) {
2417
+ var workCell = row.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
2418
+ var date = new Date(+workCell.getAttribute('data-date'));
2419
+ var query = '[data-date="' + new Date(date.getFullYear(), date.getMonth() + 1, 0).getTime() + '"]';
2420
+ cell = cell.cellIndex < workCell.cellIndex ? workCell : row.querySelector(query);
2421
+ }
2422
+ return cell;
2423
+ };
2424
+ // eslint-disable-next-line max-len
2425
+ KeyboardInteraction.prototype.getVerticalUpDownCell = function (tableRows, target, curRowIndex, isUp) {
2426
+ var hasRow = isUp && curRowIndex > 0 || !isUp && curRowIndex < tableRows.length - 1;
2427
+ var targetCell = hasRow ? tableRows[curRowIndex + (isUp ? -1 : 1)].cells[target.cellIndex] : undefined;
2428
+ if (!targetCell || targetCell.classList.contains(OTHERMONTH_CLASS)) {
2429
+ var column = tableRows[curRowIndex].cells[target.cellIndex - (isUp ? 1 : -1)];
2430
+ if (column) {
2431
+ var dateAttr = +target.getAttribute('data-date') - (isUp ? MS_PER_DAY : -MS_PER_DAY);
2432
+ return this.parent.getContentTable().querySelector('.' + WORK_CELLS_CLASS + '[data-date="' + dateAttr + '"]');
2433
+ }
2434
+ targetCell = target;
2435
+ }
2436
+ return targetCell;
2437
+ };
2319
2438
  KeyboardInteraction.prototype.processLeftRight = function (target) {
2320
- var tableEle = this.parent.getContentTable();
2439
+ var tableEle = (this.parent.currentView === 'Year' ? target.closest('tbody') : this.parent.getContentTable());
2321
2440
  var curRowIndex = target.parentNode.sectionRowIndex;
2322
2441
  var key = {
2323
2442
  element: tableEle,
@@ -2330,8 +2449,9 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2330
2449
  KeyboardInteraction.prototype.getQuickPopupElement = function () {
2331
2450
  return (this.parent.isAdaptive ? document.body : this.parent.element).querySelector('.' + POPUP_WRAPPER_CLASS);
2332
2451
  };
2333
- KeyboardInteraction.prototype.isCancelLeftRightAction = function (e, isMultiple) {
2334
- if (this.parent.currentView === 'Agenda' || (isMultiple && this.parent.currentView === 'MonthAgenda')) {
2452
+ KeyboardInteraction.prototype.isCancelLeftRightAction = function (e, isMultiple, isTimelineYear) {
2453
+ var prevent = this.parent.currentView === 'MonthAgenda' || isTimelineYear && this.initialTarget.classList.contains(OTHERMONTH_CLASS);
2454
+ if (this.parent.currentView === 'Agenda' || (isMultiple && prevent)) {
2335
2455
  return true;
2336
2456
  }
2337
2457
  if (this.isPreventAction(e) && isMultiple) {
@@ -2345,7 +2465,8 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2345
2465
  return false;
2346
2466
  };
2347
2467
  KeyboardInteraction.prototype.processRight = function (e, isMultiple) {
2348
- if (this.isCancelLeftRightAction(e, isMultiple)) {
2468
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
2469
+ if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
2349
2470
  return;
2350
2471
  }
2351
2472
  var selectedCells = this.parent.getSelectedElements();
@@ -2366,24 +2487,36 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2366
2487
  if (target.classList.contains(WORK_CELLS_CLASS) &&
2367
2488
  (e.target).classList.contains(WORK_CELLS_CLASS)) {
2368
2489
  var key = this.processLeftRight(target);
2369
- if (key.columnIndex >= 0 && key.columnIndex < key.maxIndex - 1) {
2490
+ var targetDate = new Date(+target.getAttribute('data-date'));
2491
+ var isMonthEnd = this.parent.currentView === 'Year' && targetDate.getTime() === lastDateOfMonth(targetDate).getTime();
2492
+ if (key.columnIndex >= 0 && key.columnIndex < key.maxIndex - 1 && !isMonthEnd) {
2370
2493
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex].cells[target.cellIndex + 1], 'right');
2494
+ if (isTimelineYear && isMultiple && targetCell.classList.contains(OTHERMONTH_CLASS)) {
2495
+ targetCell = this.getTimelineYearTargetCell(key, target, true);
2496
+ }
2371
2497
  if (!isNullOrUndefined(targetCell)) {
2372
2498
  this.selectCells(isMultiple, targetCell);
2373
2499
  }
2374
2500
  }
2375
- else if (key.columnIndex === key.maxIndex - 1) {
2376
- if (!this.isInverseTableSelect() && key.rowIndex < key.element.rows.length - 1) {
2501
+ else if (key.columnIndex === key.maxIndex - 1 || isMonthEnd) {
2502
+ if (!this.isInverseTableSelect() && key.rowIndex < key.element.rows.length - 1 && !isMonthEnd) {
2377
2503
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex + 1].cells[0], 'right');
2504
+ var changeTargetCell = isTimelineYear && isMultiple && targetCell.classList.contains(OTHERMONTH_CLASS);
2505
+ targetCell = changeTargetCell ? this.getHorizontalLeftRightCell(key, target, true) : targetCell;
2378
2506
  if (!isNullOrUndefined(targetCell)) {
2379
2507
  this.selectCells(isMultiple, targetCell);
2380
2508
  }
2381
2509
  }
2382
2510
  else if (!isMultiple) {
2511
+ if (isMonthEnd && targetDate.getTime() !== this.parent.activeView.getEndDate().getTime()) {
2512
+ this.selectCells(isMultiple, this.parent.element.querySelector(':not(.' + OTHERMONTH_CLASS + ')[data-date="' + (targetDate.getTime() + MS_PER_DAY) + '"]'));
2513
+ return;
2514
+ }
2383
2515
  var rowIndex = this.isInverseTableSelect() ? key.rowIndex : 0;
2384
2516
  this.parent.changeDate(this.parent.activeView.getNextPreviousDate('next'), e);
2385
2517
  var tableEle = this.parent.getContentTable();
2386
- this.selectCells(false, tableEle.rows[rowIndex].cells[0]);
2518
+ var cell = isMonthEnd ? tableEle.rows[rowIndex].querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')') : tableEle.rows[rowIndex].cells[0];
2519
+ this.selectCells(false, cell);
2387
2520
  }
2388
2521
  }
2389
2522
  }
@@ -2402,7 +2535,8 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2402
2535
  }
2403
2536
  };
2404
2537
  KeyboardInteraction.prototype.processLeft = function (e, isMultiple) {
2405
- if (this.isCancelLeftRightAction(e, isMultiple)) {
2538
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
2539
+ if (this.isCancelLeftRightAction(e, isMultiple, isTimelineYear)) {
2406
2540
  return;
2407
2541
  }
2408
2542
  var target = (e.target);
@@ -2423,24 +2557,40 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2423
2557
  if ((e.target).classList.contains(WORK_CELLS_CLASS) &&
2424
2558
  target.classList.contains(WORK_CELLS_CLASS)) {
2425
2559
  var key = this.processLeftRight(target);
2426
- if (key.columnIndex > 0 && key.columnIndex < key.maxIndex) {
2560
+ var targetDate = new Date(+target.getAttribute('data-date'));
2561
+ var isMonthStart = this.parent.currentView === 'Year' && targetDate.getTime() === firstDateOfMonth(targetDate).getTime();
2562
+ if (key.columnIndex > 0 && key.columnIndex < key.maxIndex && !isMonthStart) {
2427
2563
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex].cells[target.cellIndex - 1], 'left');
2564
+ if (isTimelineYear && isMultiple && targetCell.classList.contains(OTHERMONTH_CLASS)) {
2565
+ targetCell = this.getTimelineYearTargetCell(key, target, false);
2566
+ }
2428
2567
  if (!isNullOrUndefined(targetCell)) {
2429
2568
  this.selectCells(isMultiple, targetCell);
2430
2569
  }
2431
2570
  }
2432
- else if (key.columnIndex === 0) {
2571
+ else if (key.columnIndex === 0 || isMonthStart) {
2433
2572
  if (!this.isInverseTableSelect() && key.rowIndex > 0) {
2434
2573
  targetCell = this.calculateNextPrevDate(target, key.element.rows[key.rowIndex - 1].cells[key.maxIndex - 1], 'left');
2574
+ var otherMonthCell = isTimelineYear && isMultiple && targetCell.classList.contains(OTHERMONTH_CLASS);
2575
+ targetCell = otherMonthCell ? this.getHorizontalLeftRightCell(key, target, false) : targetCell;
2435
2576
  if (!isNullOrUndefined(targetCell)) {
2436
2577
  this.selectCells(isMultiple, targetCell);
2437
2578
  }
2438
2579
  }
2439
2580
  else if (!isMultiple) {
2581
+ if (isMonthStart && targetDate.getTime() !== this.parent.activeView.getStartDate().getTime()) {
2582
+ this.selectCells(isMultiple, this.parent.element.querySelector('[data-date="' + (targetDate.getTime() - MS_PER_DAY) + '"]'));
2583
+ return;
2584
+ }
2440
2585
  this.parent.changeDate(this.parent.activeView.getNextPreviousDate('previous'), e);
2441
2586
  var tableEle = this.parent.getContentTable();
2442
2587
  var rowIndex = this.isInverseTableSelect() ? key.rowIndex : tableEle.rows.length - 1;
2443
- this.selectCells(false, tableEle.rows[rowIndex].cells[key.maxIndex - 1]);
2588
+ var cell = tableEle.rows[rowIndex].cells[key.maxIndex - 1];
2589
+ if (isMonthStart) {
2590
+ var tbody = this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody');
2591
+ cell = tbody.item(tbody.length - 1).querySelector(':not(.' + OTHERMONTH_CLASS + ')[data-date="' + this.parent.activeView.getEndDate().getTime() + '"]');
2592
+ }
2593
+ this.selectCells(false, cell);
2444
2594
  }
2445
2595
  }
2446
2596
  }
@@ -2458,6 +2608,29 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2458
2608
  }
2459
2609
  }
2460
2610
  };
2611
+ KeyboardInteraction.prototype.getTimelineYearTargetCell = function (key, target, isRight) {
2612
+ return this.isInverseTableSelect() ? this.getVerticalLeftRightCell(target, isRight) :
2613
+ this.getHorizontalLeftRightCell(key, target, isRight);
2614
+ };
2615
+ KeyboardInteraction.prototype.getHorizontalLeftRightCell = function (key, target, isRight) {
2616
+ var row = key.element.rows[target.parentNode.sectionRowIndex + (isRight ? 1 : -1)];
2617
+ if (row) {
2618
+ var query = isRight ? '.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')'
2619
+ : '[data-date="' + ((+target.getAttribute('data-date')) - MS_PER_DAY) + '"]';
2620
+ return row.querySelector(query);
2621
+ }
2622
+ return target;
2623
+ };
2624
+ KeyboardInteraction.prototype.getVerticalLeftRightCell = function (target, isRight) {
2625
+ var date = new Date(+target.getAttribute('data-date'));
2626
+ var start = new Date(date.getFullYear(), date.getMonth() + (isRight ? 1 : -1), 1);
2627
+ var tableEle = this.parent.getContentTable();
2628
+ var targetCell = tableEle.querySelector('[data-date="' + start.getTime() + '"]');
2629
+ if (targetCell.parentNode.sectionRowIndex > target.parentNode.sectionRowIndex) {
2630
+ return targetCell;
2631
+ }
2632
+ return tableEle.querySelector('[data-date="' + new Date(start.getFullYear(), start.getMonth() + 1, 0).getTime() + '"]');
2633
+ };
2461
2634
  KeyboardInteraction.prototype.calculateNextPrevDate = function (currentCell, target, type) {
2462
2635
  var initialId = this.initialTarget.getAttribute('data-group-index');
2463
2636
  if (this.parent.activeViewOptions.group.resources.length > 0 && this.parent.currentView === 'Month') {
@@ -2502,6 +2675,16 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2502
2675
  };
2503
2676
  KeyboardInteraction.prototype.processTab = function (e, isReverse) {
2504
2677
  var target = e.target;
2678
+ if (target.classList.contains(INLINE_SUBJECT_CLASS) && this.parent.inlineModule) {
2679
+ target = target.closest('.e-appointment');
2680
+ this.parent.inlineModule.inlineCrudActions(e.target);
2681
+ }
2682
+ if (this.parent.currentView === 'TimelineYear' && target.classList.contains(OTHERMONTH_CLASS)) {
2683
+ if (target.classList.contains(SELECTED_CELL_CLASS)) {
2684
+ this.parent.removeSelectedClass();
2685
+ }
2686
+ return;
2687
+ }
2505
2688
  var popupWrapper = closest(target, '.' + POPUP_WRAPPER_CLASS + ',.' + MORE_POPUP_WRAPPER_CLASS);
2506
2689
  if (popupWrapper && popupWrapper.classList.contains(POPUP_OPEN)) {
2507
2690
  if (popupWrapper.classList.contains(MORE_POPUP_WRAPPER_CLASS)) {
@@ -2543,7 +2726,9 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2543
2726
  }
2544
2727
  if (target.classList.contains(APPOINTMENT_CLASS)) {
2545
2728
  var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
2546
- if (this.parent.activeView.isTimelineView() && this.parent.activeViewOptions.group.resources.length > 0) {
2729
+ var isTimelineYear = this.parent.currentView === 'TimelineYear';
2730
+ var isTimeline = this.parent.activeView.isTimelineView() && !isTimelineYear;
2731
+ if ((isTimeline || isTimelineYear && this.parent.activeViewOptions.orientation === 'Vertical') && this.parent.activeViewOptions.group.resources.length > 0) {
2547
2732
  var index = parseInt(target.getAttribute('data-group-index'), 10);
2548
2733
  appElements = [].slice.call(this.parent.element.querySelectorAll("." + APPOINTMENT_CLASS + "[data-group-index=\"" + index + "\"]"));
2549
2734
  var resCellSelector = "." + RESOURCE_CELLS_CLASS + "[data-group-index=\"" + (isReverse ? index : index + 1) + "\"]";
@@ -2592,7 +2777,6 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2592
2777
  this.processTabOnResourceCells(target, isReverse);
2593
2778
  }
2594
2779
  };
2595
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2596
2780
  KeyboardInteraction.prototype.processDelete = function (e) {
2597
2781
  var activeEle = document.activeElement;
2598
2782
  if (this.parent.currentView === 'MonthAgenda') {
@@ -2999,7 +3183,6 @@ var Islamic = /** @__PURE__ @class */ (function () {
2999
3183
  return Islamic;
3000
3184
  }());
3001
3185
 
3002
- /* eslint-disable @typescript-eslint/no-explicit-any */
3003
3186
  /**
3004
3187
  * Time zone
3005
3188
  */
@@ -3577,8 +3760,8 @@ function weeklyType(startDate, endDate, data, ruleObject) {
3577
3760
  var weekstartDate = addDays(tempDate, -startDateDiff);
3578
3761
  var weekendDate = addDays(weekstartDate, 6);
3579
3762
  var compareTempDate = new Date(tempDate.getTime());
3580
- resetTime(weekendDate);
3581
- resetTime(compareTempDate);
3763
+ weekendDate = resetTime(weekendDate);
3764
+ compareTempDate = resetTime(compareTempDate);
3582
3765
  while (weekendDate >= compareTempDate) {
3583
3766
  if (expectedDays.indexOf(DAYINDEX[tempDate.getDay()]) > -1) {
3584
3767
  weekCollection.push([tempDate.getTime()]);
@@ -3588,7 +3771,7 @@ function weeklyType(startDate, endDate, data, ruleObject) {
3588
3771
  }
3589
3772
  tempDate.setDate(tempDate.getDate() + 1);
3590
3773
  compareTempDate = new Date(tempDate.getTime());
3591
- resetTime(compareTempDate);
3774
+ compareTempDate = resetTime(compareTempDate);
3592
3775
  }
3593
3776
  tempDate.setDate(tempDate.getDate() - 1);
3594
3777
  if (expectedCount && (data.length + ruleObject.recExceptionCount) >= expectedCount) {
@@ -4958,12 +5141,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
4958
5141
  if (generateID) {
4959
5142
  event_1[fields.id] = temp++;
4960
5143
  }
4961
- if (typeof event_1[fields.startTime] === 'string') {
4962
- event_1[fields.startTime] = getDateFromString(event_1[fields.startTime]);
4963
- }
4964
- if (typeof event_1[fields.endTime] === 'string') {
4965
- event_1[fields.endTime] = getDateFromString(event_1[fields.endTime]);
4966
- }
5144
+ event_1 = this_1.updateEventDateTime(event_1);
4967
5145
  if (timeZonePropChanged) {
4968
5146
  this_1.processTimezoneChange(event_1, oldTimezone);
4969
5147
  }
@@ -5040,6 +5218,15 @@ var EventBase = /** @__PURE__ @class */ (function () {
5040
5218
  this.parent.blockProcessed = blockData;
5041
5219
  return eventData;
5042
5220
  };
5221
+ EventBase.prototype.updateEventDateTime = function (eventData) {
5222
+ if (typeof eventData[this.parent.eventFields.startTime] === 'string') {
5223
+ eventData[this.parent.eventFields.startTime] = getDateFromString(eventData[this.parent.eventFields.startTime]);
5224
+ }
5225
+ if (typeof eventData[this.parent.eventFields.endTime] === 'string') {
5226
+ eventData[this.parent.eventFields.endTime] = getDateFromString(eventData[this.parent.eventFields.endTime]);
5227
+ }
5228
+ return eventData;
5229
+ };
5043
5230
  EventBase.prototype.getProcessedEvents = function (eventCollection) {
5044
5231
  if (eventCollection === void 0) { eventCollection = this.parent.eventsData; }
5045
5232
  var processed = [];
@@ -5557,7 +5744,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
5557
5744
  var isAllDay = event[fieldMapping.isAllDay];
5558
5745
  var isFullDay = ((event[fieldMapping.endTime].getTime() - event[fieldMapping.startTime].getTime())
5559
5746
  / MS_PER_DAY) >= 1;
5560
- return (isAllDay || isFullDay) ? true : false;
5747
+ return (isAllDay || (this.parent.eventSettings.spannedEventPlacement !== 'TimeSlot' && isFullDay)) ? true : false;
5561
5748
  };
5562
5749
  EventBase.prototype.addEventListener = function () {
5563
5750
  this.parent.on(documentClick, this.appointmentBorderRemove, this);
@@ -5647,7 +5834,8 @@ var EventBase = /** @__PURE__ @class */ (function () {
5647
5834
  EventBase.prototype.eventClick = function (eventData) {
5648
5835
  var _this = this;
5649
5836
  var target = eventData.target;
5650
- if (target.classList.contains(DRAG_CLONE_CLASS) || target.classList.contains(RESIZE_CLONE_CLASS)) {
5837
+ if (target.classList.contains(DRAG_CLONE_CLASS) || target.classList.contains(RESIZE_CLONE_CLASS) ||
5838
+ target.classList.contains(INLINE_SUBJECT_CLASS)) {
5651
5839
  return;
5652
5840
  }
5653
5841
  if ((eventData.ctrlKey || eventData.metaKey) && eventData.which === 1 && this.parent.keyboardInteractionModule) {
@@ -6128,13 +6316,28 @@ var EventBase = /** @__PURE__ @class */ (function () {
6128
6316
  indentHeight = dateHeader.offsetHeight - indentHeight;
6129
6317
  this.parent.element.querySelector('.' + ALLDAY_CELLS_CLASS).style.height = (indentHeight / 12) + 'em';
6130
6318
  var content = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
6131
- if (this.parent.uiStateValues.expand && (content.offsetWidth - content.clientWidth > 0 || heightPropChanged)) {
6319
+ if (this.parent.uiStateValues.expand && (content.offsetWidth - content.clientWidth > 0 || heightPropChanged || this.parent.element.classList.contains(DEVICE_CLASS))) {
6132
6320
  addClass([dateHeader], ALLDAY_APPOINTMENT_SCROLL);
6133
6321
  }
6134
6322
  else {
6135
6323
  removeClass([dateHeader], ALLDAY_APPOINTMENT_SCROLL);
6136
6324
  }
6137
6325
  };
6326
+ EventBase.prototype.updateEventMinimumDuration = function (startEndHours, startTime, endTime) {
6327
+ var eventDuration = (getUniversalTime(endTime) - getUniversalTime(startTime)) / MS_PER_MINUTE;
6328
+ if (eventDuration < this.parent.eventSettings.minimumEventDuration) {
6329
+ var tempEnd = new Date(startTime);
6330
+ tempEnd.setMinutes(tempEnd.getMinutes() + this.parent.eventSettings.minimumEventDuration);
6331
+ endTime = tempEnd;
6332
+ if (endTime.getTime() > startEndHours.endHour.getTime()) {
6333
+ var tempStart = new Date(startEndHours.endHour.getTime());
6334
+ tempStart.setMinutes(tempStart.getMinutes() - this.parent.eventSettings.minimumEventDuration);
6335
+ startTime = tempStart;
6336
+ endTime = startEndHours.endHour;
6337
+ }
6338
+ }
6339
+ return { startDate: startTime, endDate: endTime };
6340
+ };
6138
6341
  EventBase.prototype.unWireEvents = function () {
6139
6342
  var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
6140
6343
  for (var _i = 0, appElements_1 = appElements; _i < appElements_1.length; _i++) {
@@ -6565,18 +6768,21 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6565
6768
  if (currentDay.length === 0) {
6566
6769
  currentDate = resetTime(renderedDate[0]);
6567
6770
  }
6568
- var fieldMapping = this.parent.eventFields;
6569
- var startEndHours = getStartEndHours(currentDate, this.startHour, this.endHour);
6771
+ var field = this.parent.eventFields;
6772
+ var schedule = getStartEndHours(currentDate, this.startHour, this.endHour);
6570
6773
  var event = extend({}, record, null, true);
6571
6774
  event.isSpanned = { isBottom: false, isTop: false };
6572
- if (record[fieldMapping.startTime].getTime() < startEndHours.startHour.getTime()) {
6573
- event[fieldMapping.startTime] = startEndHours.startHour;
6775
+ if (record[field.startTime].getTime() < schedule.startHour.getTime()) {
6776
+ event[field.startTime] = schedule.startHour;
6574
6777
  event.isSpanned.isTop = true;
6575
6778
  }
6576
- if (record[fieldMapping.endTime].getTime() > startEndHours.endHour.getTime()) {
6577
- event[fieldMapping.endTime] = startEndHours.endHour;
6779
+ if (record[field.endTime].getTime() > schedule.endHour.getTime()) {
6780
+ event[field.endTime] = schedule.endHour;
6578
6781
  event.isSpanned.isBottom = true;
6579
6782
  }
6783
+ var eventDates = this.updateEventMinimumDuration(schedule, event[field.startTime], event[field.endTime]);
6784
+ event[field.startTime] = eventDates.startDate;
6785
+ event[field.endTime] = eventDates.endDate;
6580
6786
  return event;
6581
6787
  };
6582
6788
  VerticalEvent.prototype.renderAllDayEvents = function (eventObj, dayIndex, resource, dayCount, inline) {
@@ -7094,10 +7300,10 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7094
7300
  this.parent.virtualScrollModule.updateVirtualScrollHeight();
7095
7301
  }
7096
7302
  }
7097
- this.parent.notify(scrollUiUpdate, data);
7098
7303
  if (!this.parent.enablePersistence) {
7099
7304
  this.parent.notify(contentReady, {});
7100
7305
  }
7306
+ this.parent.notify(scrollUiUpdate, data);
7101
7307
  if (this.parent.currentView === 'Month' && this.parent.showWeekNumber) {
7102
7308
  var totalCells_1 = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
7103
7309
  var weekNumberCells = [].slice.call(this.parent.element.querySelectorAll('.' + WEEK_NUMBER_CLASS));
@@ -7145,7 +7351,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7145
7351
  this.cellHeight = cellDetail.height;
7146
7352
  this.dateRender = dateRender;
7147
7353
  var filteredDates = this.getRenderedDates(dateRender);
7148
- this.getSlotDates(workDays);
7354
+ this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
7149
7355
  this.processBlockEvents(blockList, resIndex, resData);
7150
7356
  for (var _i = 0, eventsList_1 = eventsList; _i < eventsList_1.length; _i++) {
7151
7357
  var event_1 = eventsList_1[_i];
@@ -7803,6 +8009,10 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
7803
8009
  var eventData = event.data;
7804
8010
  startTime = this.getStartTime(event, eventData);
7805
8011
  endTime = this.getEndTime(event, eventData);
8012
+ var startEndHours = getStartEndHours(event[this.fields.startTime], this.startHour, this.endHour);
8013
+ var eventDates = this.updateEventMinimumDuration(startEndHours, startTime, endTime);
8014
+ startTime = eventDates.startDate;
8015
+ endTime = eventDates.endDate;
7806
8016
  this.day = this.parent.getIndexOfDate(this.dateRender, resetTime(new Date(startTime.getTime())));
7807
8017
  if (this.day < 0) {
7808
8018
  return;
@@ -8192,11 +8402,11 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
8192
8402
  if (this.parent.quickPopup) {
8193
8403
  this.parent.quickPopup.quickPopupHide();
8194
8404
  }
8195
- var moreWrapper = this.parent.element.querySelector('.e-more-popup-wrapper ');
8196
- if (moreWrapper && moreWrapper.classList.contains(POPUP_OPEN)) {
8197
- this.parent.quickPopup.morePopup.hide();
8198
- }
8199
8405
  if (args.type === 'Cell') {
8406
+ var moreWrapper = this.parent.element.querySelector('.' + MORE_POPUP_WRAPPER_CLASS);
8407
+ if (moreWrapper && moreWrapper.classList.contains(POPUP_OPEN)) {
8408
+ this.parent.quickPopup.morePopup.hide();
8409
+ }
8200
8410
  this.removeInlineAppointmentElement();
8201
8411
  this.cellEdit(args);
8202
8412
  }
@@ -8259,8 +8469,8 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
8259
8469
  '.e-inner-wrap' : '.e-appointment-details';
8260
8470
  args.element.querySelector(elementSelector).insertBefore(inlineSubject, timeEle);
8261
8471
  }
8472
+ inlineSubject.focus();
8262
8473
  }
8263
- inlineSubject.focus();
8264
8474
  inlineSubject.setSelectionRange(subject.length, subject.length);
8265
8475
  };
8266
8476
  InlineEdit.prototype.createVerticalViewInline = function (saveObj, dayIndex, resIndex, daysCount) {
@@ -8356,6 +8566,9 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
8356
8566
  if (target && target.value !== '') {
8357
8567
  this.inlineCrudActions(target);
8358
8568
  }
8569
+ else {
8570
+ this.removeInlineAppointmentElement();
8571
+ }
8359
8572
  };
8360
8573
  InlineEdit.prototype.inlineCrudActions = function (target) {
8361
8574
  if (closest(target, '.' + INLINE_APPOINTMENT_CLASS)) {
@@ -8454,6 +8667,9 @@ var FieldValidator = /** @__PURE__ @class */ (function () {
8454
8667
  if (!elem && !this.ignoreError) {
8455
8668
  this.createTooltip(inputElement, error, id, '');
8456
8669
  }
8670
+ if (!isNullOrUndefined(elem)) {
8671
+ elem.querySelector('.e-error').innerHTML = error.innerHTML;
8672
+ }
8457
8673
  };
8458
8674
  FieldValidator.prototype.createTooltip = function (element, error, name, display) {
8459
8675
  var dlgContent;
@@ -9406,6 +9622,9 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9406
9622
  };
9407
9623
  QuickPopups.prototype.closeClick = function (event) {
9408
9624
  this.dialogEvent = event;
9625
+ if (this.parent.currentView === 'Year' && this.parent.activeCellsData && this.parent.activeCellsData.element) {
9626
+ this.parent.selectCell(this.parent.activeCellsData.element);
9627
+ }
9409
9628
  this.quickPopupHide();
9410
9629
  this.morePopup.hide();
9411
9630
  };
@@ -10008,6 +10227,7 @@ var INTERVALCLASS = 'e-interval';
10008
10227
  var DAYWRAPPER = 'e-days';
10009
10228
  var WEEKWRAPPER = 'e-non-week';
10010
10229
  var WEEKPOSITION = 'e-week-position';
10230
+ var DAYPOSITION = 'e-day-position';
10011
10231
  var YEAREXPANDERWRAPPER = 'e-year-expander';
10012
10232
  var YEAREXPANDERELEMENT = 'e-year-expander-element';
10013
10233
  var MONETHEXPANDERWRAPPER = 'e-month-expander';
@@ -10360,7 +10580,6 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
10360
10580
  }
10361
10581
  });
10362
10582
  this.endType.appendTo(this.element.querySelector('.' + ENDONELEMENT));
10363
- // eslint-disable-next-line @typescript-eslint/ban-types
10364
10583
  var renderDropDownList = function (dropDownData) {
10365
10584
  return new DropDownList({
10366
10585
  dataSource: dropDownData,
@@ -10728,7 +10947,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
10728
10947
  '<td><div class="' + INPUTWARAPPER + ' ' + WEEKPOSITION + '" >' +
10729
10948
  '<input type="text" tabindex="0" class="' + MONTHPOS + '"title="' + this.localeObj.getConstant('monthPosition') + '" />' +
10730
10949
  '</div></td>' +
10731
- '<td><div class="' + INPUTWARAPPER + '" style="min-width: 120px;">' +
10950
+ '<td><div class="' + INPUTWARAPPER + ' ' + DAYPOSITION + '">' +
10732
10951
  '<input type="text" tabindex="0" class="' + MONTHWEEK + '"title="' + this.localeObj.getConstant('monthWeek') + '" />' +
10733
10952
  '</div></td></tr></table>' +
10734
10953
  '</div></div>' +
@@ -11115,7 +11334,6 @@ var EventWindow = /** @__PURE__ @class */ (function () {
11115
11334
  this.parent = parent;
11116
11335
  this.l10n = this.parent.localeObj;
11117
11336
  this.fields = this.parent.eventFields;
11118
- this.timezoneData = this.parent.tzModule.timezoneData;
11119
11337
  this.eventWindowTime = { startTime: new Date(), endTime: new Date() };
11120
11338
  this.renderEventWindow();
11121
11339
  }
@@ -11553,14 +11771,15 @@ var EventWindow = /** @__PURE__ @class */ (function () {
11553
11771
  allowFiltering: true,
11554
11772
  change: this.onTimezoneChange.bind(this),
11555
11773
  cssClass: this.parent.cssClass || '',
11556
- dataSource: this.timezoneData,
11774
+ dataSource: this.parent.timezoneDataSource,
11557
11775
  enableRtl: this.parent.enableRtl,
11558
11776
  fields: { text: 'Text', value: 'Value' },
11559
- filterBarPlaceholder: 'Search Timezone',
11777
+ filterBarPlaceholder: this.parent.localeObj.getConstant('searchTimezone'),
11778
+ noRecordsTemplate: this.parent.localeObj.getConstant('noRecords'),
11560
11779
  filtering: function (e) {
11561
11780
  var query = new Query();
11562
11781
  query = (e.text !== '') ? query.where('Text', 'contains', e.text, true) : query;
11563
- e.updateData(_this.timezoneData, query);
11782
+ e.updateData(_this.parent.timezoneDataSource, query);
11564
11783
  },
11565
11784
  htmlAttributes: { 'title': this.getFieldLabel(value), 'name': fieldName },
11566
11785
  floatLabelType: 'Always',
@@ -12886,7 +13105,6 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12886
13105
  this.fields = null;
12887
13106
  this.buttonObj = null;
12888
13107
  this.repeatStatus = null;
12889
- this.timezoneData = null;
12890
13108
  this.eventWindowTime = null;
12891
13109
  }
12892
13110
  };
@@ -13566,6 +13784,7 @@ var Crud = /** @__PURE__ @class */ (function () {
13566
13784
  if (addArgs.addedRecords instanceof Array) {
13567
13785
  for (var _i = 0, _a = addArgs.addedRecords; _i < _a.length; _i++) {
13568
13786
  var event_1 = _a[_i];
13787
+ event_1 = _this.parent.eventBase.updateEventDateTime(event_1);
13569
13788
  var eventData_1 = extend({}, _this.parent.eventBase.processTimezone(event_1, true), null, true);
13570
13789
  editParams.addedRecords.push(eventData_1);
13571
13790
  }
@@ -13623,6 +13842,7 @@ var Crud = /** @__PURE__ @class */ (function () {
13623
13842
  if (saveArgs.changedRecords instanceof Array) {
13624
13843
  for (var _i = 0, _a = saveArgs.changedRecords; _i < _a.length; _i++) {
13625
13844
  var event_3 = _a[_i];
13845
+ event_3 = _this.parent.eventBase.updateEventDateTime(event_3);
13626
13846
  var eventData_2 = extend({}, _this.parent.eventBase.processTimezone(event_3, true), null, true);
13627
13847
  editParams.changedRecords.push(eventData_2);
13628
13848
  }
@@ -14403,6 +14623,12 @@ var EventSettings = /** @__PURE__ @class */ (function (_super) {
14403
14623
  __decorate$6([
14404
14624
  Property(false)
14405
14625
  ], EventSettings.prototype, "enableTooltip", void 0);
14626
+ __decorate$6([
14627
+ Property('AllDayRow')
14628
+ ], EventSettings.prototype, "spannedEventPlacement", void 0);
14629
+ __decorate$6([
14630
+ Property(1)
14631
+ ], EventSettings.prototype, "minimumEventDuration", void 0);
14406
14632
  __decorate$6([
14407
14633
  Property()
14408
14634
  ], EventSettings.prototype, "tooltipTemplate", void 0);
@@ -14894,6 +15120,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
14894
15120
  targetType: 'relative',
14895
15121
  actionOnScroll: 'none',
14896
15122
  content: this.treeViewObj.element,
15123
+ relateTo: this.parent.element.querySelector('.' + TABLE_CONTAINER_CLASS),
14897
15124
  enableRtl: this.parent.enableRtl,
14898
15125
  hideAnimation: { name: 'SlideLeftOut', duration: 500 },
14899
15126
  showAnimation: { name: 'SlideLeftIn', duration: 500 },
@@ -15863,13 +16090,19 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
15863
16090
  timeFormat: this.internalTimeFormat,
15864
16091
  group: group,
15865
16092
  headerRows: this.headerRows,
15866
- orientation: 'Horizontal'
16093
+ orientation: 'Horizontal',
16094
+ numberOfWeeks: 0,
16095
+ displayDate: null
15867
16096
  };
15868
16097
  var viewOptions = this.viewCollections[this.viewIndex];
15869
16098
  var viewsData = extend(scheduleOptions, viewOptions, undefined, true);
15870
16099
  if (this.firstDayOfWeek !== 0 && viewOptions.firstDayOfWeek && this.firstDayOfWeek !== viewOptions.firstDayOfWeek) {
15871
16100
  viewsData.firstDayOfWeek = this.firstDayOfWeek;
15872
16101
  }
16102
+ if (viewsData.displayDate) {
16103
+ viewsData.displayDate = viewsData.displayDate instanceof Date ? new Date(viewsData.displayDate.getTime()) :
16104
+ new Date(viewsData.displayDate);
16105
+ }
15873
16106
  return viewsData;
15874
16107
  };
15875
16108
  Schedule.prototype.initializeDataModule = function () {
@@ -16182,7 +16415,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16182
16415
  if (this && isNullOrUndefined(this.uiStateValues) || !(this.enablePersistence)) {
16183
16416
  this.uiStateValues = {
16184
16417
  expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
16185
- isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false
16418
+ isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true
16186
16419
  };
16187
16420
  }
16188
16421
  this.activeCellsData = { startTime: this.getCurrentTime(), endTime: this.getCurrentTime(), isAllDay: false };
@@ -16281,7 +16514,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16281
16514
  beginFrom: 'Begin From',
16282
16515
  endAt: 'Ends At',
16283
16516
  expandAllDaySection: 'Expand-all-day-section',
16284
- collapseAllDaySection: 'Collapse-all-day-section'
16517
+ collapseAllDaySection: 'Collapse-all-day-section',
16518
+ searchTimezone: 'Search Timezone',
16519
+ noRecords: 'No records found'
16285
16520
  };
16286
16521
  };
16287
16522
  Schedule.prototype.wireEvents = function () {
@@ -17000,6 +17235,11 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17000
17235
  this.keyboardInteractionModule = new KeyboardInteraction(this);
17001
17236
  }
17002
17237
  break;
17238
+ case 'timezoneDataSource':
17239
+ if (this.eventWindow) {
17240
+ this.eventWindow.refresh();
17241
+ }
17242
+ break;
17003
17243
  case 'editorTemplate':
17004
17244
  if (!isNullOrUndefined(this.editorTemplate)) {
17005
17245
  this.editorTemplateFn = this.templateParser(this.editorTemplate);
@@ -17143,6 +17383,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17143
17383
  this.eventWindow.refresh();
17144
17384
  }
17145
17385
  break;
17386
+ case 'spannedEventPlacement':
17387
+ case 'minimumEventDuration':
17146
17388
  case 'enableMaxHeight':
17147
17389
  case 'enableIndicator':
17148
17390
  this.refreshEvents(false);
@@ -17517,7 +17759,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17517
17759
  */
17518
17760
  Schedule.prototype.exportToExcel = function (excelExportOptions) {
17519
17761
  if (this.excelExportModule) {
17520
- this.excelExportModule.initializeExcelExport(excelExportOptions || {});
17762
+ this.excelExportModule.initializeExcelExport(excelExportOptions);
17521
17763
  }
17522
17764
  else {
17523
17765
  throw Error('Inject ExcelExport module');
@@ -17702,6 +17944,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17702
17944
  this.crudModule.refreshDataManager();
17703
17945
  }
17704
17946
  else {
17947
+ if (this.activeViewOptions && this.activeViewOptions.eventTemplate) {
17948
+ this.resetTemplates(['eventTemplate']);
17949
+ }
17705
17950
  var eventsData = this.eventsData || [];
17706
17951
  var blockData = this.blockData || [];
17707
17952
  var data = eventsData.concat(blockData);
@@ -17959,6 +18204,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17959
18204
  this.eventTooltip = null;
17960
18205
  }
17961
18206
  this.destroyPopups();
18207
+ this.hideSpinner();
17962
18208
  this.unWireEvents();
17963
18209
  this.destroyHeaderModule();
17964
18210
  if (this.eventTooltip) {
@@ -18170,6 +18416,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18170
18416
  __decorate([
18171
18417
  Complex({}, EventSettings)
18172
18418
  ], Schedule.prototype, "eventSettings", void 0);
18419
+ __decorate([
18420
+ Property(timezoneData)
18421
+ ], Schedule.prototype, "timezoneDataSource", void 0);
18173
18422
  __decorate([
18174
18423
  Property()
18175
18424
  ], Schedule.prototype, "resourceHeaderTemplate", void 0);
@@ -19780,7 +20029,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
19780
20029
  }
19781
20030
  }
19782
20031
  else {
19783
- if (((resetTime(appStart).getTime() <= dateStart) && (resetTime(appEnd).getTime() > dateStart)) ||
20032
+ if (((resetTime(appStart).getTime() <= dateStart) && (resetTime(appEnd).getTime() >= dateStart)) ||
19784
20033
  (resetTime(appStart).getTime() >= dateStart) && (resetTime(appEnd).getTime() <= dateEnd)) {
19785
20034
  appointmentsList.push(app);
19786
20035
  }
@@ -19980,7 +20229,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
19980
20229
  var eventGuid = this.actionObj.element.getAttribute('data-guid');
19981
20230
  this.actionObj.event = this.parent.eventBase.getEventByGuid(eventGuid);
19982
20231
  var eventObj = extend({}, this.actionObj.event, null, true);
19983
- this.startTime = eventObj[this.parent.eventFields.startTime].getTime();
20232
+ if (!isNullOrUndefined(eventObj)) {
20233
+ this.startTime = eventObj[this.parent.eventFields.startTime].getTime();
20234
+ }
19984
20235
  var dragArgs = {
19985
20236
  cancel: false,
19986
20237
  data: eventObj,
@@ -20402,7 +20653,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20402
20653
  return;
20403
20654
  }
20404
20655
  var td = tr.children[colIndex];
20405
- if (this.parent.activeViewOptions.group.resources.length > 0) {
20656
+ if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
20406
20657
  this.actionObj.groupIndex = parseInt(td.getAttribute('data-group-index'), 10);
20407
20658
  }
20408
20659
  var dragStart$$1;
@@ -20488,18 +20739,20 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20488
20739
  var eventData = [];
20489
20740
  var startTime = event[eventFields.startTime];
20490
20741
  var endTime = event[eventFields.endTime];
20491
- var isDifferentDate = resetTime(new Date(startTime.getTime())) < resetTime(new Date(endTime.getTime()));
20492
- if (isDifferentDate) {
20493
- var scheduleStartHour = this.parent.activeView.getStartHour();
20494
- var scheduleEndHour = this.parent.activeView.getEndHour();
20495
- var startDate = getStartEndHours(resetTime(startTime), scheduleStartHour, scheduleEndHour);
20496
- var endDate = getStartEndHours(resetTime(endTime), scheduleStartHour, scheduleEndHour);
20497
- var firstEventObj = extend({}, event, null, true);
20498
- firstEventObj[eventFields.endTime] = startDate.endHour;
20499
- eventData.push(firstEventObj);
20500
- var secondEventObj = extend({}, event, null, true);
20501
- secondEventObj[eventFields.startTime] = endDate.startHour;
20502
- eventData.push(secondEventObj);
20742
+ if (resetTime(new Date(startTime.getTime())) < resetTime(new Date(endTime.getTime()))) {
20743
+ var startReferenceDate = resetTime(new Date(startTime.getTime()));
20744
+ var endReferenceDate = new Date(startReferenceDate.getTime());
20745
+ for (var i = 0; startReferenceDate < new Date(endTime.getTime()); i++) {
20746
+ endReferenceDate = new Date(endReferenceDate.setDate(startReferenceDate.getDate() + 1));
20747
+ var eventObj = extend({}, event, null, true);
20748
+ eventObj[eventFields.startTime] = new Date(startReferenceDate);
20749
+ eventObj[eventFields.endTime] = new Date(endReferenceDate);
20750
+ startReferenceDate = new Date(startReferenceDate.setDate(startReferenceDate.getDate() + 1));
20751
+ eventData.push(eventObj);
20752
+ }
20753
+ var index = eventData.length - 1;
20754
+ eventData[0][eventFields.startTime] = startTime;
20755
+ eventData[index][eventFields.endTime] = endTime;
20503
20756
  }
20504
20757
  else {
20505
20758
  eventData.push(event);
@@ -20570,8 +20823,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20570
20823
  // eslint-disable-next-line max-len
20571
20824
  this.parent.getDateFromElement(isNullOrUndefined(index) ? this.actionObj.target : this.targetTd)));
20572
20825
  var splitEvents = this.splitEvent(event);
20573
- var events_1 = event[this.parent.eventFields.isAllDay] ||
20574
- this.parent.eventBase.isAllDayAppointment(event) || splitEvents.length > 2 ? [event] : splitEvents;
20826
+ var events_1 = this.parent.eventBase.isAllDayAppointment(event) || splitEvents.length > 2 ||
20827
+ this.parent.eventSettings.spannedEventPlacement !== 'TimeSlot' ? [event] : splitEvents;
20575
20828
  for (var i = 0; i < events_1.length; i++) {
20576
20829
  if (i > 0) {
20577
20830
  var filterQuery = ".e-day-wrapper[data-date=\"" + resetTime(events_1[i][this.parent.eventFields.startTime]).getTime() + "\"]";
@@ -20669,7 +20922,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20669
20922
  var renderDates = this.getRenderedDates();
20670
20923
  var events = this.parent.eventBase.splitEvent(event, renderDates);
20671
20924
  var query = ".e-all-day-cells[data-date=\"" + events[0][this.parent.eventFields.startTime].getTime() + "\"]";
20672
- if (this.parent.activeViewOptions.group.resources.length > 0) {
20925
+ if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
20673
20926
  query = query.concat('[data-group-index = "' + this.actionObj.groupIndex + '"]');
20674
20927
  }
20675
20928
  var cell = [].slice.call(this.parent.element.querySelectorAll(query));
@@ -20869,7 +21122,13 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20869
21122
  if (this.parent.eventDragArea) {
20870
21123
  var targetDate = this.parent.getDateFromElement(e.target);
20871
21124
  if (!isNullOrUndefined(targetDate)) {
20872
- eventStart = targetDate;
21125
+ if (!this.parent.activeViewOptions.timeScale.enable || (this.parent.currentView == "TimelineMonth")) {
21126
+ var eventSrt = eventObj[this.parent.eventFields.startTime];
21127
+ eventStart = new Date(eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds()));
21128
+ }
21129
+ else {
21130
+ eventStart = targetDate;
21131
+ }
20873
21132
  }
20874
21133
  }
20875
21134
  var eventEnd = new Date(eventStart.getTime());
@@ -21304,6 +21563,10 @@ var ViewBase = /** @__PURE__ @class */ (function () {
21304
21563
  return date.setHours(0, 0, 0, 0) === this.parent.getCurrentTime().setHours(0, 0, 0, 0);
21305
21564
  };
21306
21565
  ViewBase.prototype.isCurrentMonth = function (date) {
21566
+ if (this.parent.activeViewOptions.displayDate || this.parent.activeViewOptions.numberOfWeeks > 0) {
21567
+ return this.parent.activeView.getStartDate().getTime() <= this.parent.getCurrentTime().getTime() &&
21568
+ this.parent.activeView.getEndDate().getTime() >= this.parent.getCurrentTime().getTime();
21569
+ }
21307
21570
  return date.getFullYear() ===
21308
21571
  this.parent.getCurrentTime().getFullYear() && date.getMonth() === this.parent.getCurrentTime().getMonth();
21309
21572
  };
@@ -21536,6 +21799,11 @@ var ViewBase = /** @__PURE__ @class */ (function () {
21536
21799
  setStyleAttribute(resourceColumn, { 'height': formatUnit(content.clientHeight) });
21537
21800
  }
21538
21801
  }
21802
+ var headerCellElements = [].slice.call(this.element.querySelectorAll('.' + HEADER_CELLS_CLASS));
21803
+ headerCellElements.forEach(function (ele) {
21804
+ var headerCellColSpan = parseInt(ele.getAttribute('colspan'), 10);
21805
+ setStyleAttribute(ele, { 'width': formatUnit(colWidth_1 * headerCellColSpan) });
21806
+ });
21539
21807
  }
21540
21808
  };
21541
21809
  ViewBase.prototype.resetColWidth = function () {
@@ -22667,10 +22935,11 @@ var Month = /** @__PURE__ @class */ (function (_super) {
22667
22935
  Month.prototype.getDateSlots = function (renderDates, workDays) {
22668
22936
  var count = this.parent.activeViewOptions.showWeekend ? WEEK_LENGTH : workDays.length;
22669
22937
  var dateSlots = [];
22938
+ var isCurrentMonth = this.isCurrentMonth(this.parent.selectedDate);
22670
22939
  for (var col = 0; col < count; col++) {
22671
22940
  var classList$$1 = [HEADER_CELLS_CLASS];
22672
22941
  var currentDateIndex = renderDates.slice(0, count).map(function (date) { return date.getDay(); });
22673
- if (this.isCurrentMonth(this.parent.selectedDate) && currentDateIndex.indexOf(this.parent.getCurrentTime().getDay()) === col) {
22942
+ if (isCurrentMonth && currentDateIndex.indexOf(this.parent.getCurrentTime().getDay()) === col) {
22674
22943
  classList$$1.push(CURRENT_DAY_CLASS);
22675
22944
  }
22676
22945
  dateSlots.push({ date: renderDates[col], type: 'monthDay', className: classList$$1, colSpan: 1, workDays: workDays });
@@ -22709,6 +22978,9 @@ var Month = /** @__PURE__ @class */ (function (_super) {
22709
22978
  this.renderResourceMobileLayout();
22710
22979
  }
22711
22980
  this.parent.notify(contentReady, {});
22981
+ if (this.parent.uiStateValues.isCustomMonth) {
22982
+ this.parent.uiStateValues.isCustomMonth = false;
22983
+ }
22712
22984
  };
22713
22985
  Month.prototype.refreshHeader = function () {
22714
22986
  remove(this.element.querySelector('tbody tr'));
@@ -22894,7 +23166,7 @@ var Month = /** @__PURE__ @class */ (function (_super) {
22894
23166
  return slotDatas;
22895
23167
  };
22896
23168
  Month.prototype.updateClassList = function (data) {
22897
- if (this.isOtherMonth(data.date)) {
23169
+ if (!this.isCustomMonth() && this.isOtherMonth(data.date)) {
22898
23170
  data.className.push(OTHERMONTH_CLASS);
22899
23171
  }
22900
23172
  if (!this.parent.isMinMaxDate(data.date)) {
@@ -23003,15 +23275,33 @@ var Month = /** @__PURE__ @class */ (function (_super) {
23003
23275
  }
23004
23276
  };
23005
23277
  Month.prototype.getMonthStart = function (currentDate) {
23006
- var monthStart = getWeekFirstDate(this.parent.calendarUtil.firstDateOfMonth(currentDate), this.parent.activeViewOptions.firstDayOfWeek);
23007
- var start = new Date(monthStart.getFullYear(), monthStart.getMonth(), monthStart.getDate());
23008
- return start;
23278
+ var useDisplayDate = this.parent.currentView === 'Month' && !isNullOrUndefined(this.parent.activeViewOptions.displayDate) && (this.parent.uiStateValues.isCustomMonth || this.isCustomRange());
23279
+ var date = useDisplayDate ? this.parent.activeViewOptions.displayDate : !(this.parent.uiStateValues.isCustomMonth ||
23280
+ this.isCustomRange()) && this.isCustomMonth() ? currentDate : this.parent.calendarUtil.firstDateOfMonth(currentDate);
23281
+ var monthStart = getWeekFirstDate(date, this.parent.activeViewOptions.firstDayOfWeek);
23282
+ return new Date(monthStart.getFullYear(), monthStart.getMonth(), monthStart.getDate());
23009
23283
  };
23010
23284
  Month.prototype.getMonthEnd = function (currentDate) {
23011
- var endDate = addMonths(currentDate, this.parent.activeViewOptions.interval - 1);
23012
- var lastWeekOfMonth = getWeekFirstDate(this.parent.calendarUtil.lastDateOfMonth(endDate), this.parent.activeViewOptions.firstDayOfWeek);
23013
- var monthEnd = addDays(lastWeekOfMonth, WEEK_LENGTH - 1);
23014
- return monthEnd;
23285
+ if (this.isCustomMonth()) {
23286
+ var start = this.getMonthStart(currentDate);
23287
+ var numberOfDays = WEEK_LENGTH * (this.parent.activeViewOptions.numberOfWeeks > 0 ?
23288
+ this.parent.activeViewOptions.numberOfWeeks : DEFAULT_WEEKS);
23289
+ return addDays(start, (numberOfDays - 1));
23290
+ }
23291
+ else {
23292
+ var endDate = addMonths(currentDate, this.parent.activeViewOptions.interval - 1);
23293
+ var lastWeekOfMonth = getWeekFirstDate(this.parent.calendarUtil.lastDateOfMonth(endDate), this.parent.activeViewOptions.firstDayOfWeek);
23294
+ return addDays(lastWeekOfMonth, WEEK_LENGTH - 1);
23295
+ }
23296
+ };
23297
+ Month.prototype.isCustomRange = function () {
23298
+ var dates = this.parent.getCurrentViewDates();
23299
+ if (dates && dates.length > 0) {
23300
+ var selectedTime = resetTime(this.parent.selectedDate).getTime();
23301
+ return !(selectedTime >= getWeekFirstDate(dates[0], this.parent.activeViewOptions.firstDayOfWeek).getTime() &&
23302
+ selectedTime <= addDays(getWeekFirstDate(dates[dates.length - 1], this.parent.activeViewOptions.firstDayOfWeek), 6).getTime());
23303
+ }
23304
+ return false;
23015
23305
  };
23016
23306
  Month.prototype.getRenderDates = function (workDays) {
23017
23307
  var renderDates = [];
@@ -23041,34 +23331,57 @@ var Month = /** @__PURE__ @class */ (function (_super) {
23041
23331
  return renderDates;
23042
23332
  };
23043
23333
  Month.prototype.getNextPreviousDate = function (type) {
23044
- if (type === 'next') {
23045
- return addMonths(this.parent.selectedDate, this.parent.activeViewOptions.interval);
23334
+ if (this.isCustomMonth()) {
23335
+ var dates = this.parent.getCurrentViewDates();
23336
+ var date = getWeekFirstDate(type === 'next' ? dates[dates.length - 1]
23337
+ : dates[0], this.parent.activeViewOptions.firstDayOfWeek);
23338
+ return addDays(date, type === 'next' ? WEEK_LENGTH : -(this.parent.activeViewOptions.numberOfWeeks > 0 ?
23339
+ this.parent.activeViewOptions.numberOfWeeks : DEFAULT_WEEKS) * WEEK_LENGTH);
23046
23340
  }
23047
23341
  else {
23048
- return addMonths(this.parent.selectedDate, -(this.parent.activeViewOptions.interval));
23342
+ return addMonths(this.parent.selectedDate, ((type === 'next' ? 1 : -1) * this.parent.activeViewOptions.interval));
23049
23343
  }
23050
23344
  };
23345
+ Month.prototype.getStartDate = function () {
23346
+ return this.getMonthStart(this.parent.selectedDate);
23347
+ };
23348
+ Month.prototype.getEndDate = function () {
23349
+ return this.getMonthEnd(this.parent.selectedDate);
23350
+ };
23051
23351
  Month.prototype.getEndDateFromStartDate = function (start) {
23052
23352
  return addDays(new Date(start.getTime()), 1);
23053
23353
  };
23054
23354
  Month.prototype.getDateRangeText = function () {
23055
23355
  if (this.parent.isAdaptive || isNullOrUndefined(this.parent.activeViewOptions.dateFormat)) {
23056
- if (this.parent.activeViewOptions.interval > 1) {
23057
- var endDate = addMonths(lastDateOfMonth(this.parent.selectedDate), this.parent.activeViewOptions.interval - 1);
23058
- if (this.parent.selectedDate.getFullYear() === endDate.getFullYear()) {
23059
- var monthNames = (this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM', calendar: this.parent.getCalendarMode() })) + ' - ' +
23356
+ var startDate = this.parent.selectedDate;
23357
+ var endDate = void 0;
23358
+ var updateCustomRange = false;
23359
+ if (this.isCustomMonth()) {
23360
+ var dates = this.parent.getCurrentViewDates();
23361
+ updateCustomRange = dates[0].getMonth() !== dates[dates.length - 1].getMonth() ||
23362
+ dates[0].getFullYear() !== dates[dates.length - 1].getFullYear();
23363
+ if (updateCustomRange) {
23364
+ startDate = dates[0];
23365
+ endDate = dates[dates.length - 1];
23366
+ }
23367
+ }
23368
+ var isUpdateDateRange = (this.parent.currentView !== 'Month' || !this.isCustomMonth());
23369
+ if (this.parent.activeViewOptions.interval > 1 && isUpdateDateRange || updateCustomRange) {
23370
+ endDate = endDate ? endDate : addMonths(lastDateOfMonth(startDate), this.parent.activeViewOptions.interval - 1);
23371
+ if (startDate.getFullYear() === endDate.getFullYear()) {
23372
+ var monthNames = (this.parent.globalize.formatDate(startDate, { format: 'MMMM', calendar: this.parent.getCalendarMode() })) + ' - ' +
23060
23373
  (this.parent.globalize.formatDate(endDate, { format: 'MMMM ', calendar: this.parent.getCalendarMode() })) +
23061
23374
  this.parent.globalize.formatDate(endDate, { skeleton: 'y', calendar: this.parent.getCalendarMode() });
23062
23375
  return capitalizeFirstWord(monthNames, 'single');
23063
23376
  }
23064
- var text = (this.parent.globalize.formatDate(this.parent.selectedDate, { format: 'MMMM', calendar: this.parent.getCalendarMode() })) + ' ' +
23065
- this.parent.selectedDate.getFullYear() + ' - ' +
23377
+ var text = (this.parent.globalize.formatDate(startDate, { format: 'MMMM', calendar: this.parent.getCalendarMode() })) + ' ' +
23378
+ startDate.getFullYear() + ' - ' +
23066
23379
  this.parent.globalize.formatDate(endDate, { format: 'MMMM ', calendar: this.parent.getCalendarMode() }) +
23067
23380
  this.parent.globalize.formatDate(endDate, { skeleton: 'y', calendar: this.parent.getCalendarMode() });
23068
23381
  return capitalizeFirstWord(text, 'single');
23069
23382
  }
23070
23383
  var format = (this.parent.activeViewOptions.dateFormat) ? this.parent.activeViewOptions.dateFormat : 'MMMM y';
23071
- return capitalizeFirstWord(this.parent.globalize.formatDate(this.parent.selectedDate, { format: format, calendar: this.parent.getCalendarMode() }), 'single');
23384
+ return capitalizeFirstWord(this.parent.globalize.formatDate(startDate, { format: format, calendar: this.parent.getCalendarMode() }), 'single');
23072
23385
  }
23073
23386
  return this.formatDateRange(this.parent.selectedDate);
23074
23387
  };
@@ -23093,6 +23406,10 @@ var Month = /** @__PURE__ @class */ (function (_super) {
23093
23406
  EventHandler.remove(contentScrollableEle, 'scroll', this.onContentScroll);
23094
23407
  }
23095
23408
  };
23409
+ Month.prototype.isCustomMonth = function () {
23410
+ return this.parent.currentView === 'Month' &&
23411
+ (!isNullOrUndefined(this.parent.activeViewOptions.displayDate) || this.parent.activeViewOptions.numberOfWeeks > 0);
23412
+ };
23096
23413
  Month.prototype.getModuleName = function () {
23097
23414
  return 'month';
23098
23415
  };
@@ -23350,10 +23667,27 @@ var Year = /** @__PURE__ @class */ (function (_super) {
23350
23667
  Year.prototype.onCellClick = function (e) {
23351
23668
  var target = closest(e.target, '.' + WORK_CELLS_CLASS);
23352
23669
  var startDate = this.parent.getDateFromElement(target);
23353
- var endDate = addDays(new Date(startDate.getTime()), 1);
23354
- var filteredEvents = this.parent.eventBase.filterEvents(startDate, endDate);
23355
- var moreEventArgs = { date: startDate, event: filteredEvents, element: e.target };
23356
- this.parent.quickPopup.moreEventClick(moreEventArgs, endDate);
23670
+ this.parent.activeCellsData = this.parent.getCellDetails(target);
23671
+ var isPrevious = startDate.getTime() < this.getStartDate().getTime();
23672
+ if (isPrevious || startDate.getTime() > this.getEndDate().getTime()) {
23673
+ this.parent.changeDate(this.parent.activeView.getNextPreviousDate(isPrevious ? 'previous' : 'next'), e);
23674
+ var activeDate = this.parent.activeCellsData.startTime.getTime();
23675
+ var inRange = activeDate >= this.getStartDate().getTime() && activeDate <= this.getEndDate().getTime();
23676
+ var dateAttr = inRange ? activeDate : (isPrevious ? this.getEndDate() : this.getStartDate()).getTime();
23677
+ var selectedCell = this.parent.element.querySelector(':not(.' + OTHERMONTH_CLASS + ')[data-date="' + dateAttr + '"]');
23678
+ this.parent.selectCell(selectedCell);
23679
+ this.parent.activeCellsData = this.parent.getCellDetails(selectedCell);
23680
+ }
23681
+ else {
23682
+ var endDate = addDays(new Date(startDate.getTime()), 1);
23683
+ var filteredEvents = this.parent.eventBase.filterEvents(startDate, endDate);
23684
+ var moreEventArgs = { date: startDate, event: filteredEvents, element: e.target };
23685
+ if (target.classList.contains(OTHERMONTH_CLASS)) {
23686
+ target = this.parent.element.querySelector(':not(.' + OTHERMONTH_CLASS + ')[data-date="' + target.getAttribute('data-date') + '"]');
23687
+ }
23688
+ this.parent.activeCellsData = this.parent.getCellDetails(target);
23689
+ this.parent.quickPopup.moreEventClick(moreEventArgs, endDate);
23690
+ }
23357
23691
  };
23358
23692
  Year.prototype.onContentScroll = function (e) {
23359
23693
  var target = e.target;
@@ -23405,10 +23739,10 @@ var Year = /** @__PURE__ @class */ (function (_super) {
23405
23739
  return addDays(addMonths(this.getStartDate(), this.parent.monthsCount), -1);
23406
23740
  };
23407
23741
  Year.prototype.startDate = function () {
23408
- return getWeekFirstDate(this.getStartDate(), this.parent.firstDayOfWeek);
23742
+ return this.parent.currentView === 'Year' ? getWeekFirstDate(this.getStartDate(), this.parent.firstDayOfWeek) : this.getStartDate();
23409
23743
  };
23410
23744
  Year.prototype.endDate = function () {
23411
- return addDays(getWeekLastDate(this.getEndDate(), this.parent.firstDayOfWeek), 1);
23745
+ return this.parent.currentView === 'Year' ? addDays(getWeekLastDate(this.getEndDate(), this.parent.firstDayOfWeek), 1) : this.getEndDate();
23412
23746
  };
23413
23747
  Year.prototype.getEndDateFromStartDate = function (start) {
23414
23748
  var date = new Date(start.getTime());
@@ -23451,6 +23785,7 @@ var Year = /** @__PURE__ @class */ (function (_super) {
23451
23785
  EventHandler.add(element, 'click', this.onCellClick, this);
23452
23786
  }
23453
23787
  else {
23788
+ EventHandler.add(element, 'mousedown', this.parent.workCellAction.cellMouseDown, this.parent.workCellAction);
23454
23789
  EventHandler.add(element, 'click', this.parent.workCellAction.cellClick, this.parent.workCellAction);
23455
23790
  if (!this.parent.isAdaptive) {
23456
23791
  EventHandler.add(element, 'dblclick', this.parent.workCellAction.cellDblClick, this.parent.workCellAction);
@@ -23923,7 +24258,8 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
23923
24258
  var event_1 = _a[_i];
23924
24259
  delete event_1.generatedDates;
23925
24260
  }
23926
- var eventCollection = args.processedData;
24261
+ var eventCollection = this.parent.activeViewOptions.allowVirtualScrolling ?
24262
+ args.processedData : this.parent.eventsProcessed;
23927
24263
  if (this.parent.uiStateValues.isGroupAdaptive) {
23928
24264
  var resource = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];
23929
24265
  this.dataSource = this.parent.eventBase.filterEventsByResource(resource, this.dataSource);
@@ -24027,6 +24363,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
24027
24363
  var filterData = this.appointmentFiltering(agendaDate);
24028
24364
  var nTr = this.createTableRowElement(agendaDate, 'data');
24029
24365
  if (this.element.querySelector('tr[aria-rowindex="' + parseInt(nTr.getAttribute('aria-rowindex'), 10) + '"]')) {
24366
+ agendaDate = addDays(agendaDate, 1);
24030
24367
  continue;
24031
24368
  }
24032
24369
  var dTd = nTr.children[0];
@@ -25057,6 +25394,9 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
25057
25394
  tr.appendChild(leftHeaderCells);
25058
25395
  leftHeaderCells.appendChild(this.renderResourceHeader(LEFT_INDENT_WRAP_CLASS));
25059
25396
  }
25397
+ var isHorizontal = this.parent.activeViewOptions.orientation === 'Horizontal';
25398
+ var isGroup = this.parent.activeViewOptions.group.resources.length > 0;
25399
+ this.isInverseTableSelect = isHorizontal && !isGroup ? false : true;
25060
25400
  var td = createElement('td');
25061
25401
  tr.appendChild(td);
25062
25402
  var container = createElement('div', { className: DATE_HEADER_CONTAINER_CLASS });
@@ -25745,10 +26085,8 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
25745
26085
  this.parent = parent;
25746
26086
  }
25747
26087
  ExcelExport.prototype.initializeExcelExport = function (excelExportOptions) {
25748
- var _this = this;
25749
- var exportFields = excelExportOptions.fields || Object.keys(this.parent.eventFields).map(function (field) {
25750
- return _this.parent.eventFields[field];
25751
- });
26088
+ if (excelExportOptions === void 0) { excelExportOptions = {}; }
26089
+ var exportColumns = this.getExportColumns(excelExportOptions);
25752
26090
  var exportName = excelExportOptions.fileName || 'Schedule';
25753
26091
  var exportType = excelExportOptions.exportType || 'xlsx';
25754
26092
  var isIncludeOccurrences = excelExportOptions.includeOccurrences || false;
@@ -25760,39 +26098,44 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
25760
26098
  else {
25761
26099
  eventCollection = !isIncludeOccurrences ? this.parent.eventsData : this.parent.eventsProcessed;
25762
26100
  }
25763
- this.processWorkbook(exportFields, exportName, exportType, eventCollection);
26101
+ this.processWorkbook(exportColumns, exportName, exportType, eventCollection);
25764
26102
  };
25765
26103
  ExcelExport.prototype.processWorkbook = function (fields, name, type, eventCollection) {
25766
26104
  var _this = this;
25767
26105
  var columns = [];
25768
26106
  var rows = [];
25769
26107
  var columnHeader = [];
25770
- fields.forEach(function (field, i) { return columns.push({ index: i + 1, width: (field === 'Id' ? 20 : 150) }); });
26108
+ fields.forEach(function (field, i) { columns.push({ index: i + 1, width: (field.name === 'Id' ? 50 : 150) }); });
25771
26109
  var style = { fontSize: 12, borders: { color: '#E0E0E0' }, bold: true };
25772
- fields.forEach(function (field, i) { return columnHeader.push({ index: i + 1, value: field, style: style }); });
26110
+ fields.forEach(function (field, i) { columnHeader.push({ index: i + 1, value: field.text, style: style }); });
25773
26111
  rows.push({ index: 1, cells: columnHeader });
25774
- var i = 2;
25775
- var _loop_1 = function (event_1) {
26112
+ eventCollection.forEach(function (event, i) {
25776
26113
  var columnData = [];
25777
26114
  fields.forEach(function (field, n) {
25778
- var columnRule = { index: n + 1, value: event_1[field] || '' };
25779
- if (field === _this.parent.eventFields.startTime || field === _this.parent.eventFields.endTime) {
26115
+ var columnRule = { index: n + 1, value: event[field.name] || '' };
26116
+ if (field.name === _this.parent.eventFields.startTime || field.name === _this.parent.eventFields.endTime) {
25780
26117
  var styleRule = { fontSize: 12, numberFormat: 'm/d/yyyy h:mm AM/PM' };
25781
26118
  columnRule = extend({}, columnRule, { style: styleRule }, true);
25782
26119
  }
25783
26120
  columnData.push(columnRule);
25784
26121
  });
25785
- rows.push({ index: i, cells: columnData });
25786
- i++;
25787
- };
25788
- for (var _i = 0, eventCollection_1 = eventCollection; _i < eventCollection_1.length; _i++) {
25789
- var event_1 = eventCollection_1[_i];
25790
- _loop_1(event_1);
25791
- }
26122
+ rows.push({ index: i + 2, cells: columnData });
26123
+ });
25792
26124
  var workSheet = [{ columns: columns, rows: rows }];
25793
26125
  var book = new Workbook({ worksheets: workSheet }, type, this.parent.locale);
25794
26126
  book.save(name + '.' + type);
25795
26127
  };
26128
+ ExcelExport.prototype.getExportColumns = function (exportOptions) {
26129
+ var _this = this;
26130
+ var exportColumns = exportOptions.fieldsInfo || [];
26131
+ if (exportColumns.length === 0) {
26132
+ var fields = exportOptions.fields || Object.keys(this.parent.eventFields).map(function (field) {
26133
+ return _this.parent.eventFields[field];
26134
+ });
26135
+ fields.forEach(function (field) { exportColumns.push({ name: field, text: field }); });
26136
+ }
26137
+ return exportColumns;
26138
+ };
25796
26139
  ExcelExport.prototype.getModuleName = function () {
25797
26140
  return 'excelExport';
25798
26141
  };
@@ -25942,5 +26285,5 @@ var Print = /** @__PURE__ @class */ (function () {
25942
26285
  * Export Schedule components
25943
26286
  */
25944
26287
 
25945
- export { Schedule, cellClick, cellDoubleClick, moreEventsClick, select, hover, actionBegin, actionComplete, actionFailure, navigating, renderCell, eventClick, eventRendered, dataBinding, dataBound, popupOpen, popupClose, dragStart, drag, dragStop, resizeStart, resizing, resizeStop, inlineClick, initialLoad, initialEnd, print$1 as print, dataReady, eventsLoaded, contentReady, scroll, virtualScroll, scrollUiUpdate, uiUpdate, documentClick, cellMouseDown, WEEK_LENGTH, MS_PER_DAY, MS_PER_MINUTE, getElementHeightFromClass, getTranslateY, getWeekFirstDate, getWeekLastDate, firstDateOfMonth, lastDateOfMonth, getWeekNumber, getWeekMiddleDate, setTime, resetTime, getDateInMs, getDateCount, addDays, addMonths, addYears, getStartEndHours, getMaxDays, getDaysCount, getDateFromString, getScrollBarWidth, findIndexInData, getOuterHeight, removeChildren, isDaylightSavingTime, getUniversalTime, isMobile, isIPadDevice, capitalizeFirstWord, Resize, DragAndDrop, HeaderRenderer, ViewBase, Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineViews, TimelineMonth, TimelineYear, Timezone, timezoneData, ICalendarExport, ICalendarImport, ExcelExport, Print, RecurrenceEditor, generateSummary, generate, getDateFromRecurrenceDateString, extractObjectFromRule, getCalendarUtil, getRecurrenceStringFromDate, Gregorian, Islamic };
26288
+ export { Schedule, cellClick, cellDoubleClick, moreEventsClick, select, hover, actionBegin, actionComplete, actionFailure, navigating, renderCell, eventClick, eventRendered, dataBinding, dataBound, popupOpen, popupClose, dragStart, drag, dragStop, resizeStart, resizing, resizeStop, inlineClick, initialLoad, initialEnd, print$1 as print, dataReady, eventsLoaded, contentReady, scroll, virtualScroll, scrollUiUpdate, uiUpdate, documentClick, cellMouseDown, WEEK_LENGTH, DEFAULT_WEEKS, MS_PER_DAY, MS_PER_MINUTE, getElementHeightFromClass, getTranslateY, getWeekFirstDate, getWeekLastDate, firstDateOfMonth, lastDateOfMonth, getWeekNumber, getWeekMiddleDate, setTime, resetTime, getDateInMs, getDateCount, addDays, addMonths, addYears, getStartEndHours, getMaxDays, getDaysCount, getDateFromString, getScrollBarWidth, findIndexInData, getOuterHeight, removeChildren, isDaylightSavingTime, getUniversalTime, isMobile, isIPadDevice, capitalizeFirstWord, Resize, DragAndDrop, HeaderRenderer, ViewBase, Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineViews, TimelineMonth, TimelineYear, Timezone, timezoneData, ICalendarExport, ICalendarImport, ExcelExport, Print, RecurrenceEditor, generateSummary, generate, getDateFromRecurrenceDateString, extractObjectFromRule, getCalendarUtil, getRecurrenceStringFromDate, Gregorian, Islamic };
25946
26289
  //# sourceMappingURL=ej2-schedule.es5.js.map