@syncfusion/ej2-schedule 19.2.60 → 19.3.48

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/.eslintrc.json +1 -1
  2. package/CHANGELOG.md +65 -0
  3. package/dist/ej2-schedule.umd.min.js +2 -2
  4. package/dist/ej2-schedule.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-schedule.es2015.js +445 -164
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +456 -172
  8. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  9. package/dist/global/ej2-schedule.min.js +2 -2
  10. package/dist/global/ej2-schedule.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +15 -15
  13. package/src/schedule/actions/action-base.js +1 -1
  14. package/src/schedule/actions/crud.js +3 -2
  15. package/src/schedule/actions/drag.d.ts +2 -0
  16. package/src/schedule/actions/drag.js +27 -17
  17. package/src/schedule/actions/keyboard.js +5 -5
  18. package/src/schedule/actions/resize.js +17 -10
  19. package/src/schedule/actions/virtual-scroll.js +2 -1
  20. package/src/schedule/base/interface.d.ts +9 -0
  21. package/src/schedule/base/resource.js +12 -3
  22. package/src/schedule/base/schedule-model.d.ts +13 -1
  23. package/src/schedule/base/schedule.d.ts +45 -2
  24. package/src/schedule/base/schedule.js +139 -14
  25. package/src/schedule/base/type.d.ts +4 -0
  26. package/src/schedule/event-renderer/event-base.d.ts +2 -1
  27. package/src/schedule/event-renderer/event-base.js +42 -28
  28. package/src/schedule/event-renderer/month.d.ts +0 -1
  29. package/src/schedule/event-renderer/month.js +32 -33
  30. package/src/schedule/event-renderer/timeline-view.d.ts +2 -0
  31. package/src/schedule/event-renderer/timeline-view.js +31 -1
  32. package/src/schedule/event-renderer/vertical-view.js +26 -19
  33. package/src/schedule/event-renderer/year.js +4 -1
  34. package/src/schedule/models/event-settings-model.d.ts +21 -1
  35. package/src/schedule/models/event-settings.d.ts +20 -0
  36. package/src/schedule/models/event-settings.js +6 -0
  37. package/src/schedule/models/views-model.d.ts +9 -0
  38. package/src/schedule/models/views.d.ts +8 -0
  39. package/src/schedule/models/views.js +3 -0
  40. package/src/schedule/popups/event-window.d.ts +3 -2
  41. package/src/schedule/popups/event-window.js +7 -3
  42. package/src/schedule/popups/form-validator.js +4 -1
  43. package/src/schedule/popups/quick-popups.d.ts +3 -2
  44. package/src/schedule/popups/quick-popups.js +32 -13
  45. package/src/schedule/renderer/agenda.d.ts +1 -0
  46. package/src/schedule/renderer/agenda.js +20 -3
  47. package/src/schedule/renderer/header-renderer.d.ts +1 -0
  48. package/src/schedule/renderer/header-renderer.js +6 -1
  49. package/src/schedule/renderer/month.d.ts +1 -0
  50. package/src/schedule/renderer/month.js +7 -7
  51. package/src/schedule/renderer/timeline-year.js +8 -2
  52. package/src/schedule/renderer/vertical-view.d.ts +2 -0
  53. package/src/schedule/renderer/vertical-view.js +19 -8
  54. package/src/schedule/renderer/view-base.d.ts +2 -1
  55. package/src/schedule/renderer/view-base.js +11 -3
  56. package/styles/bootstrap-dark.css +48 -66
  57. package/styles/bootstrap.css +28 -45
  58. package/styles/bootstrap4.css +28 -44
  59. package/styles/bootstrap5-dark.css +5172 -0
  60. package/styles/bootstrap5-dark.scss +2 -0
  61. package/styles/bootstrap5.css +5173 -0
  62. package/styles/bootstrap5.scss +2 -0
  63. package/styles/fabric-dark.css +29 -61
  64. package/styles/fabric.css +28 -45
  65. package/styles/highcontrast-light.css +28 -76
  66. package/styles/highcontrast.css +30 -49
  67. package/styles/material-dark.css +72 -79
  68. package/styles/material.css +32 -45
  69. package/styles/recurrence-editor/_bootstrap5-dark-definition.scss +1 -0
  70. package/styles/recurrence-editor/_bootstrap5-definition.scss +8 -0
  71. package/styles/recurrence-editor/_layout.scss +0 -4
  72. package/styles/recurrence-editor/_tailwind-dark-definition.scss +1 -8
  73. package/styles/recurrence-editor/_tailwind-definition.scss +8 -8
  74. package/styles/recurrence-editor/bootstrap-dark.css +0 -4
  75. package/styles/recurrence-editor/bootstrap.css +0 -4
  76. package/styles/recurrence-editor/bootstrap4.css +0 -4
  77. package/styles/recurrence-editor/bootstrap5-dark.css +479 -0
  78. package/styles/recurrence-editor/bootstrap5-dark.scss +3 -0
  79. package/styles/recurrence-editor/bootstrap5.css +479 -0
  80. package/styles/recurrence-editor/bootstrap5.scss +3 -0
  81. package/styles/recurrence-editor/fabric-dark.css +0 -4
  82. package/styles/recurrence-editor/fabric.css +0 -4
  83. package/styles/recurrence-editor/highcontrast-light.css +0 -4
  84. package/styles/recurrence-editor/highcontrast.css +0 -4
  85. package/styles/recurrence-editor/material-dark.css +0 -4
  86. package/styles/recurrence-editor/material.css +0 -4
  87. package/styles/recurrence-editor/tailwind-dark.css +0 -4
  88. package/styles/recurrence-editor/tailwind.css +0 -4
  89. package/styles/schedule/_bootstrap-dark-definition.scss +6 -6
  90. package/styles/schedule/_bootstrap-definition.scss +2 -2
  91. package/styles/schedule/_bootstrap4-definition.scss +6 -5
  92. package/styles/schedule/_bootstrap5-dark-definition.scss +1 -0
  93. package/styles/schedule/_bootstrap5-definition.scss +198 -0
  94. package/styles/schedule/_fabric-dark-definition.scss +3 -3
  95. package/styles/schedule/_fabric-definition.scss +2 -2
  96. package/styles/schedule/_highcontrast-definition.scss +3 -3
  97. package/styles/schedule/_highcontrast-light-definition.scss +2 -2
  98. package/styles/schedule/_layout.scss +97 -120
  99. package/styles/schedule/_material-dark-definition.scss +2 -2
  100. package/styles/schedule/_material-definition.scss +2 -2
  101. package/styles/schedule/_tailwind-dark-definition.scss +1 -196
  102. package/styles/schedule/_tailwind-definition.scss +195 -196
  103. package/styles/schedule/_theme.scss +33 -7
  104. package/styles/schedule/bootstrap-dark.css +48 -62
  105. package/styles/schedule/bootstrap.css +28 -41
  106. package/styles/schedule/bootstrap4.css +28 -40
  107. package/styles/schedule/bootstrap5-dark.css +4692 -0
  108. package/styles/schedule/bootstrap5-dark.scss +4 -0
  109. package/styles/schedule/bootstrap5.css +4693 -0
  110. package/styles/schedule/bootstrap5.scss +5 -0
  111. package/styles/schedule/fabric-dark.css +29 -57
  112. package/styles/schedule/fabric.css +28 -41
  113. package/styles/schedule/highcontrast-light.css +28 -72
  114. package/styles/schedule/highcontrast.css +30 -45
  115. package/styles/schedule/icons/_bootstrap5-dark.scss +1 -0
  116. package/styles/schedule/icons/_bootstrap5.scss +232 -0
  117. package/styles/schedule/icons/_tailwind-dark.scss +1 -231
  118. package/styles/schedule/icons/_tailwind.scss +231 -231
  119. package/styles/schedule/material-dark.css +72 -75
  120. package/styles/schedule/material.css +32 -41
  121. package/styles/schedule/tailwind-dark.css +53 -71
  122. package/styles/schedule/tailwind-dark.scss +0 -1
  123. package/styles/schedule/tailwind.css +53 -70
  124. package/styles/tailwind-dark.css +53 -75
  125. package/styles/tailwind.css +53 -74
@@ -1076,6 +1076,11 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1076
1076
  if (selEle) {
1077
1077
  selEle.setAttribute('aria-label', text);
1078
1078
  selEle.querySelector('.e-tbar-btn-text').innerHTML = text;
1079
+ this.refresh();
1080
+ }
1081
+ };
1082
+ HeaderRenderer.prototype.refresh = function () {
1083
+ if (this.toolbarObj) {
1079
1084
  this.toolbarObj.refreshOverflow();
1080
1085
  }
1081
1086
  };
@@ -1331,7 +1336,7 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1331
1336
  this.parent.changeView('TimelineYear', args.originalEvent, undefined, this.calculateViewIndex(args));
1332
1337
  break;
1333
1338
  case 'e-today':
1334
- if (!this.parent.isSelectedDate(resetTime(this.parent.getCurrentTime()))) {
1339
+ if (this.parent.currentView === 'Agenda' || !this.parent.isSelectedDate(resetTime(this.parent.getCurrentTime()))) {
1335
1340
  this.parent.changeDate(resetTime(this.parent.getCurrentTime()), args.originalEvent);
1336
1341
  }
1337
1342
  break;
@@ -1877,7 +1882,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
1877
1882
  this.processCtrlShiftNavigationArrows(e);
1878
1883
  break;
1879
1884
  case 'escape':
1880
- this.processEscape();
1885
+ this.processEscape(e);
1881
1886
  }
1882
1887
  };
1883
1888
  KeyboardInteraction.prototype.addEventListener = function () {
@@ -2022,7 +2027,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2022
2027
  if (target.classList.contains(MORE_EVENT_HEADER_DATE_CLASS)) {
2023
2028
  this.parent.setProperties({ selectedDate: this.parent.getDateFromElement(target) }, true);
2024
2029
  this.parent.changeView(this.parent.getNavigateView(), e);
2025
- this.processEscape();
2030
+ this.processEscape(e);
2026
2031
  return;
2027
2032
  }
2028
2033
  };
@@ -2601,7 +2606,7 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2601
2606
  !this.parent.eventSettings.allowDeleting) {
2602
2607
  return;
2603
2608
  }
2604
- this.parent.quickPopup.deleteClick();
2609
+ this.parent.quickPopup.deleteClick(e);
2605
2610
  }
2606
2611
  };
2607
2612
  KeyboardInteraction.prototype.processCtrlShiftNavigationArrows = function (e) {
@@ -2636,8 +2641,8 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
2636
2641
  }
2637
2642
  }
2638
2643
  };
2639
- KeyboardInteraction.prototype.processEscape = function () {
2640
- this.parent.quickPopup.onClosePopup();
2644
+ KeyboardInteraction.prototype.processEscape = function (event) {
2645
+ this.parent.quickPopup.onClosePopup(event);
2641
2646
  this.parent.quickPopup.morePopup.hide();
2642
2647
  if (this.parent.headerModule) {
2643
2648
  this.parent.headerModule.hideHeaderPopup();
@@ -4953,12 +4958,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
4953
4958
  if (generateID) {
4954
4959
  event_1[fields.id] = temp++;
4955
4960
  }
4956
- if (typeof event_1[fields.startTime] === 'string') {
4957
- event_1[fields.startTime] = getDateFromString(event_1[fields.startTime]);
4958
- }
4959
- if (typeof event_1[fields.endTime] === 'string') {
4960
- event_1[fields.endTime] = getDateFromString(event_1[fields.endTime]);
4961
- }
4961
+ event_1 = this_1.updateEventDateTime(event_1);
4962
4962
  if (timeZonePropChanged) {
4963
4963
  this_1.processTimezoneChange(event_1, oldTimezone);
4964
4964
  }
@@ -5035,6 +5035,15 @@ var EventBase = /** @__PURE__ @class */ (function () {
5035
5035
  this.parent.blockProcessed = blockData;
5036
5036
  return eventData;
5037
5037
  };
5038
+ EventBase.prototype.updateEventDateTime = function (eventData) {
5039
+ if (typeof eventData[this.parent.eventFields.startTime] === 'string') {
5040
+ eventData[this.parent.eventFields.startTime] = getDateFromString(eventData[this.parent.eventFields.startTime]);
5041
+ }
5042
+ if (typeof eventData[this.parent.eventFields.endTime] === 'string') {
5043
+ eventData[this.parent.eventFields.endTime] = getDateFromString(eventData[this.parent.eventFields.endTime]);
5044
+ }
5045
+ return eventData;
5046
+ };
5038
5047
  EventBase.prototype.getProcessedEvents = function (eventCollection) {
5039
5048
  if (eventCollection === void 0) { eventCollection = this.parent.eventsData; }
5040
5049
  var processed = [];
@@ -5195,26 +5204,36 @@ var EventBase = /** @__PURE__ @class */ (function () {
5195
5204
  }); });
5196
5205
  return filteredCollection;
5197
5206
  };
5198
- EventBase.prototype.sortByTime = function (appointments) {
5199
- var fieldMapping = this.parent.eventFields;
5200
- appointments.sort(function (a, b) {
5201
- var d1 = a[fieldMapping.startTime];
5202
- var d2 = b[fieldMapping.startTime];
5203
- return d1.getTime() - d2.getTime();
5204
- });
5205
- return appointments;
5207
+ EventBase.prototype.sortByTime = function (appointmentsCollection) {
5208
+ if (this.parent.eventSettings.sortComparer) {
5209
+ appointmentsCollection = this.parent.eventSettings.sortComparer.call(this.parent, appointmentsCollection);
5210
+ }
5211
+ else {
5212
+ var fieldMappings_1 = this.parent.eventFields;
5213
+ appointmentsCollection.sort(function (a, b) {
5214
+ var d1 = a[fieldMappings_1.startTime];
5215
+ var d2 = b[fieldMappings_1.startTime];
5216
+ return d1.getTime() - d2.getTime();
5217
+ });
5218
+ }
5219
+ return appointmentsCollection;
5206
5220
  };
5207
5221
  EventBase.prototype.sortByDateTime = function (appointments) {
5208
- var fieldMapping = this.parent.eventFields;
5209
- appointments.sort(function (object1, object2) {
5210
- var d3 = object1[fieldMapping.startTime];
5211
- var d4 = object2[fieldMapping.startTime];
5212
- var d5 = object1[fieldMapping.endTime];
5213
- var d6 = object2[fieldMapping.endTime];
5214
- var d1 = d5.getTime() - d3.getTime();
5215
- var d2 = d6.getTime() - d4.getTime();
5216
- return (d3.getTime() - d4.getTime() || d2 - d1);
5217
- });
5222
+ if (this.parent.eventSettings.sortComparer) {
5223
+ appointments = this.parent.eventSettings.sortComparer.call(this.parent, appointments);
5224
+ }
5225
+ else {
5226
+ var fieldMapping_1 = this.parent.eventFields;
5227
+ appointments.sort(function (object1, object2) {
5228
+ var d3 = object1[fieldMapping_1.startTime];
5229
+ var d4 = object2[fieldMapping_1.startTime];
5230
+ var d5 = object1[fieldMapping_1.endTime];
5231
+ var d6 = object2[fieldMapping_1.endTime];
5232
+ var d1 = d5.getTime() - d3.getTime();
5233
+ var d2 = d6.getTime() - d4.getTime();
5234
+ return (d3.getTime() - d4.getTime() || d2 - d1);
5235
+ });
5236
+ }
5218
5237
  return appointments;
5219
5238
  };
5220
5239
  EventBase.prototype.getSmallestMissingNumber = function (array) {
@@ -5267,10 +5286,10 @@ var EventBase = /** @__PURE__ @class */ (function () {
5267
5286
  };
5268
5287
  EventBase.prototype.splitEvent = function (event, dateRender) {
5269
5288
  var fields = this.parent.eventFields;
5270
- var start = resetTime(new Date(event[fields.startTime] + '')).getTime();
5271
- var end = resetTime(new Date(event[fields.endTime] + '')).getTime();
5289
+ var start = resetTime(event[fields.startTime]).getTime();
5290
+ var end = resetTime(event[fields.endTime]).getTime();
5272
5291
  if (getDateInMs(event[fields.endTime]) <= 0) {
5273
- var temp = addDays(resetTime(new Date(event[fields.endTime] + '')), -1).getTime();
5292
+ var temp = addDays(resetTime(event[fields.endTime]), -1).getTime();
5274
5293
  end = start > temp ? start : temp;
5275
5294
  }
5276
5295
  var orgStart = start;
@@ -5542,7 +5561,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
5542
5561
  var isAllDay = event[fieldMapping.isAllDay];
5543
5562
  var isFullDay = ((event[fieldMapping.endTime].getTime() - event[fieldMapping.startTime].getTime())
5544
5563
  / MS_PER_DAY) >= 1;
5545
- return (isAllDay || isFullDay) ? true : false;
5564
+ return (isAllDay || (!(this.parent.eventSettings.spannedEventPlacement == 'TimeSlot') && isFullDay)) ? true : false;
5546
5565
  };
5547
5566
  EventBase.prototype.addEventListener = function () {
5548
5567
  this.parent.on(documentClick, this.appointmentBorderRemove, this);
@@ -6174,6 +6193,12 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6174
6193
  return _this;
6175
6194
  }
6176
6195
  VerticalEvent.prototype.renderAppointments = function () {
6196
+ if (isNullOrUndefined(this.parent)) {
6197
+ return;
6198
+ }
6199
+ if (this.parent.dragAndDropModule) {
6200
+ this.parent.dragAndDropModule.setDragArea();
6201
+ }
6177
6202
  var wrapperElements = [].slice.call(this.parent.element.querySelectorAll('.' + BLOCK_APPOINTMENT_CLASS +
6178
6203
  ',.' + APPOINTMENT_CLASS + ',.' + ROW_COUNT_WRAPPER_CLASS));
6179
6204
  var isDragging = (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) ? true : false;
@@ -6649,7 +6674,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6649
6674
  var schedule = getStartEndHours(currentDate, this.startHour, this.endHour);
6650
6675
  var isValidEvent = this.isValidEvent(eventObj, eStart, eEnd, schedule);
6651
6676
  if (eStart <= eEnd && isValidEvent) {
6652
- var appHeight = this.getHeight(eStart, eEnd);
6677
+ var appHeight_1 = this.getHeight(eStart, eEnd);
6653
6678
  if (eStart.getTime() > schedule.startHour.getTime()) {
6654
6679
  topValue = this.getTopValue(eStart, dayIndex, resource);
6655
6680
  }
@@ -6677,30 +6702,30 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6677
6702
  this.renderedEvents[resource] = [];
6678
6703
  }
6679
6704
  this.renderedEvents[resource].push(extend({}, record, null, true));
6680
- var appointmentElement_2;
6705
+ var appointmentElement = void 0;
6681
6706
  if (inline) {
6682
- appointmentElement_2 = this.parent.inlineModule.createInlineAppointmentElement(eventObj);
6707
+ appointmentElement = this.parent.inlineModule.createInlineAppointmentElement(eventObj);
6683
6708
  }
6684
6709
  else {
6685
- appointmentElement_2 = this.createAppointmentElement(eventObj, false, record.isSpanned, resource);
6710
+ appointmentElement = this.createAppointmentElement(eventObj, false, record.isSpanned, resource);
6686
6711
  }
6687
- setStyleAttribute(appointmentElement_2, {
6712
+ setStyleAttribute(appointmentElement, {
6688
6713
  'width': (this.parent.eventSettings.enableMaxHeight ? '100%' : tempData.appWidth),
6689
- 'height': appHeight + 'px', 'top': topValue + 'px'
6714
+ 'height': appHeight_1 + 'px', 'top': topValue + 'px'
6690
6715
  });
6691
- var iconHeight = appointmentElement_2.querySelectorAll('.' + EVENT_INDICATOR_CLASS).length * 15;
6692
- var maxHeight = appHeight - 40 - iconHeight;
6693
- var subjectElement = appointmentElement_2.querySelector('.' + SUBJECT_CLASS);
6716
+ var iconHeight = appointmentElement.querySelectorAll('.' + EVENT_INDICATOR_CLASS).length * 15;
6717
+ var maxHeight = appHeight_1 - 40 - iconHeight;
6718
+ var subjectElement = appointmentElement.querySelector('.' + SUBJECT_CLASS);
6694
6719
  if (!this.parent.isAdaptive && subjectElement) {
6695
6720
  subjectElement.style.maxHeight = formatUnit(maxHeight);
6696
6721
  }
6697
6722
  var index = this.parent.activeViewOptions.group.byDate ? (this.resources.length * dayIndex) + resource : dayCount;
6698
- this.appendEvent(eventObj, appointmentElement_2, index, tempData.appLeft);
6699
- this.wireAppointmentEvents(appointmentElement_2, eventObj);
6700
- if (appointmentElement_2.offsetHeight < this.cellHeight) {
6701
- var resizeHandlers = [].slice.call(appointmentElement_2.querySelectorAll('.' + EVENT_RESIZE_CLASS));
6723
+ this.appendEvent(eventObj, appointmentElement, index, tempData.appLeft);
6724
+ this.wireAppointmentEvents(appointmentElement, eventObj);
6725
+ if (appHeight_1 < this.cellHeight) {
6726
+ var resizeHandlers = [].slice.call(appointmentElement.querySelectorAll('.' + EVENT_RESIZE_CLASS));
6702
6727
  resizeHandlers.forEach(function (resizeHandler) {
6703
- resizeHandler.style.height = Math.ceil(appointmentElement_2.offsetHeight / resizeHandler.offsetHeight) + 'px';
6728
+ resizeHandler.style.height = Math.ceil(appHeight_1 / resizeHandler.offsetHeight) + 'px';
6704
6729
  });
6705
6730
  }
6706
6731
  }
@@ -6793,11 +6818,12 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6793
6818
  eventsList = eventsList.filter(function (obj) { return (obj[fieldMapping.startTime] === record[fieldMapping.startTime] &&
6794
6819
  obj[fieldMapping.endTime] > record[fieldMapping.endTime] || obj[fieldMapping.endTime] > record[fieldMapping.startTime] &&
6795
6820
  obj[fieldMapping.startTime] < record[fieldMapping.endTime] || obj[fieldMapping.endTime] === record[fieldMapping.startTime]
6796
- && obj[fieldMapping.startTime] === record[fieldMapping.endTime]) || ((obj[fieldMapping.startTime].getTime() ===
6797
- record[fieldMapping.startTime].getTime() && obj[fieldMapping.endTime].getTime() === record[fieldMapping.endTime].getTime())
6798
- || (obj[fieldMapping.startTime].getTime() === record[fieldMapping.startTime].getTime() &&
6799
- obj[fieldMapping.endTime].getTime() < record[fieldMapping.endTime].getTime() ||
6800
- obj[fieldMapping.endTime].getTime() > record[fieldMapping.endTime].getTime())); });
6821
+ && obj[fieldMapping.startTime] === record[fieldMapping.endTime]) ||
6822
+ ((obj[fieldMapping.startTime].getTime() === record[fieldMapping.startTime].getTime() &&
6823
+ obj[fieldMapping.endTime].getTime() === record[fieldMapping.endTime].getTime())
6824
+ || (obj[fieldMapping.startTime].getTime() === record[fieldMapping.startTime].getTime() &&
6825
+ obj[fieldMapping.endTime].getTime() < record[fieldMapping.endTime].getTime() ||
6826
+ obj[fieldMapping.endTime].getTime() > record[fieldMapping.endTime].getTime())); });
6801
6827
  }
6802
6828
  if (eventsList.length > 0) {
6803
6829
  var appLevel = eventsList.map(function (obj) { return obj.Index; });
@@ -7002,6 +7028,9 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7002
7028
  }
7003
7029
  };
7004
7030
  MonthEvent.prototype.renderAppointments = function () {
7031
+ if (this.parent.dragAndDropModule) {
7032
+ this.parent.dragAndDropModule.setDragArea();
7033
+ }
7005
7034
  var conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
7006
7035
  if (this.parent.rowAutoHeight) {
7007
7036
  this.parent.uiStateValues.top = conWrap.scrollTop;
@@ -7031,6 +7060,13 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7031
7060
  if (!this.element.querySelector('.' + WORK_CELLS_CLASS)) {
7032
7061
  return;
7033
7062
  }
7063
+ if (this.parent.currentView === 'Month') {
7064
+ var wrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
7065
+ var cellTd = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
7066
+ cellTd.appendChild(wrapper);
7067
+ this.monthHeaderHeight = wrapper.offsetTop - cellTd.offsetTop;
7068
+ cellTd.removeChild(wrapper);
7069
+ }
7034
7070
  this.eventHeight = getElementHeightFromClass(this.element, APPOINTMENT_CLASS);
7035
7071
  var scrollTop = conWrap.scrollTop;
7036
7072
  if (this.parent.rowAutoHeight && this.parent.virtualScrollModule && !isNullOrUndefined(this.parent.currentAction)) {
@@ -7062,10 +7098,10 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7062
7098
  this.parent.virtualScrollModule.updateVirtualScrollHeight();
7063
7099
  }
7064
7100
  }
7065
- this.parent.notify(scrollUiUpdate, data);
7066
7101
  if (!this.parent.enablePersistence) {
7067
7102
  this.parent.notify(contentReady, {});
7068
7103
  }
7104
+ this.parent.notify(scrollUiUpdate, data);
7069
7105
  if (this.parent.currentView === 'Month' && this.parent.showWeekNumber) {
7070
7106
  var totalCells_1 = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
7071
7107
  var weekNumberCells = [].slice.call(this.parent.element.querySelectorAll('.' + WEEK_NUMBER_CLASS));
@@ -7101,7 +7137,9 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7101
7137
  this.sortByDateTime(blockList);
7102
7138
  if (this.parent.currentView === 'Month' && this.parent.rowAutoHeight && this.parent.activeViewOptions.group.resources.length === 0) {
7103
7139
  var totalCells = [].slice.call(this.parent.element.querySelectorAll('.e-content-wrap table tr td:first-child'));
7104
- var height_1 = this.parent.element.querySelector('.e-schedule-table').clientHeight / totalCells.length;
7140
+ var height_1 = this.parent.height === 'auto' ? (this.parent.element.querySelector('.e-content-wrap').clientHeight +
7141
+ this.parent.element.querySelector('.e-date-header-wrap').clientHeight) / totalCells.length
7142
+ : this.parent.element.querySelector('.e-schedule-table').clientHeight / totalCells.length;
7105
7143
  totalCells.forEach(function (cell) {
7106
7144
  setStyleAttribute(cell, { 'height': height_1 + 'px' });
7107
7145
  });
@@ -7195,7 +7233,6 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7195
7233
  appWidth = (appWidth <= 0) ? this.cellWidth : appWidth;
7196
7234
  var appLeft = (this.parent.enableRtl) ? 0 : position;
7197
7235
  var appRight = (this.parent.enableRtl) ? position : 0;
7198
- this.renderWrapperElement(cellTd);
7199
7236
  var appHeight = this.cellHeight - this.monthHeaderHeight;
7200
7237
  var appTop = this.getRowTop(resIndex);
7201
7238
  var blockElement = this.createBlockAppointmentElement(event, resIndex);
@@ -7302,18 +7339,19 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7302
7339
  var eventSubject = (record[this.fields.subject] || this.parent.eventSettings.fields.subject.default ||
7303
7340
  this.parent.localeObj.getConstant('addTitle'));
7304
7341
  var newRecord = extend({}, record, record.data, true);
7305
- var appointmentWrapper = createElement('div', {
7306
- className: APPOINTMENT_CLASS,
7307
- attrs: {
7308
- 'data-id': 'Appointment_' + record[this.fields.id],
7309
- 'role': 'button', 'tabindex': '0',
7310
- 'aria-readonly': this.parent.eventBase.getReadonlyAttribute(record), 'aria-selected': 'false', 'aria-grabbed': 'true',
7311
- 'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
7312
- }
7313
- });
7342
+ var attrs = {
7343
+ 'data-id': 'Appointment_' + record[this.fields.id],
7344
+ 'role': 'button', 'tabindex': '0',
7345
+ 'aria-readonly': this.parent.eventBase.getReadonlyAttribute(record), 'aria-selected': 'false', 'aria-grabbed': 'true',
7346
+ 'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
7347
+ };
7314
7348
  if (!isCloneElement) {
7315
- appointmentWrapper.setAttribute('data-guid', record.Guid);
7349
+ attrs['data-guid'] = record.Guid;
7350
+ }
7351
+ if (this.parent.activeViewOptions.group.resources.length > 0) {
7352
+ attrs['data-group-index'] = resIndex.toString();
7316
7353
  }
7354
+ var appointmentWrapper = createElement('div', { className: APPOINTMENT_CLASS, attrs: attrs });
7317
7355
  if (!isNullOrUndefined(this.cssClass)) {
7318
7356
  addClass([appointmentWrapper], this.cssClass);
7319
7357
  }
@@ -7322,9 +7360,6 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7322
7360
  }
7323
7361
  var appointmentDetails = createElement('div', { className: APPOINTMENT_DETAILS });
7324
7362
  appointmentWrapper.appendChild(appointmentDetails);
7325
- if (this.parent.activeViewOptions.group.resources.length > 0) {
7326
- appointmentWrapper.setAttribute('data-group-index', resIndex.toString());
7327
- }
7328
7363
  var templateElement;
7329
7364
  var eventData = record.data;
7330
7365
  var eventObj = this.getEventData(record);
@@ -7437,7 +7472,6 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7437
7472
  var appWidth = (diffInDays * this.cellWidth) - 5;
7438
7473
  var cellTd = this.workCells[day];
7439
7474
  var appTop = (overlapCount * (appHeight + EVENT_GAP));
7440
- this.renderWrapperElement(cellTd);
7441
7475
  var height = this.monthHeaderHeight + ((overlapCount + 1) * (appHeight + EVENT_GAP)) + this.moreIndicatorHeight;
7442
7476
  var enableAppRender = this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
7443
7477
  if (this.parent.rowAutoHeight || enableAppRender) {
@@ -7474,7 +7508,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7474
7508
  moreIndicatorElement.setAttribute('data-group-index', groupIndex);
7475
7509
  }
7476
7510
  moreIndicatorElement.style.top = appArea + 'px';
7477
- moreIndicatorElement.style.width = cellTd_1.offsetWidth - 2 + 'px';
7511
+ moreIndicatorElement.style.width = this.cellWidth - 2 + 'px';
7478
7512
  this.renderElement(cellTd_1, moreIndicatorElement);
7479
7513
  EventHandler.add(moreIndicatorElement, 'click', this.moreIndicatorClick, this);
7480
7514
  }
@@ -7515,8 +7549,9 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7515
7549
  var appointmentsList = [];
7516
7550
  for (var _i = 0, appointments_1 = appointments; _i < appointments_1.length; _i++) {
7517
7551
  var app = appointments_1[_i];
7518
- if ((resetTime(app[this.fields.startTime]).getTime() <= resetTime(date).getTime()) &&
7519
- (resetTime(app[this.fields.endTime]).getTime() >= resetTime(date).getTime())) {
7552
+ var dateTime = resetTime(date).getTime();
7553
+ if ((resetTime(app[this.fields.startTime]).getTime() <= dateTime) &&
7554
+ (resetTime(app[this.fields.endTime]).getTime() >= dateTime)) {
7520
7555
  appointmentsList.push(app);
7521
7556
  }
7522
7557
  }
@@ -7585,8 +7620,9 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7585
7620
  if (this.maxOrIndicator && isAppointment) {
7586
7621
  this.setMaxEventHeight(element, cellTd);
7587
7622
  }
7588
- if (cellTd.querySelector('.' + APPOINTMENT_WRAPPER_CLASS)) {
7589
- cellTd.querySelector('.' + APPOINTMENT_WRAPPER_CLASS).appendChild(element);
7623
+ var wrapperEle = cellTd.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
7624
+ if (wrapperEle) {
7625
+ wrapperEle.appendChild(element);
7590
7626
  }
7591
7627
  else {
7592
7628
  var wrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
@@ -7594,17 +7630,6 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7594
7630
  cellTd.appendChild(wrapper);
7595
7631
  }
7596
7632
  };
7597
- MonthEvent.prototype.renderWrapperElement = function (cellTd) {
7598
- var element = cellTd.querySelector('.' + APPOINTMENT_WRAPPER_CLASS);
7599
- if (!isNullOrUndefined(element)) {
7600
- this.monthHeaderHeight = element.offsetTop - cellTd.offsetTop;
7601
- }
7602
- else {
7603
- var wrapper = createElement('div', { className: APPOINTMENT_WRAPPER_CLASS });
7604
- cellTd.appendChild(wrapper);
7605
- this.monthHeaderHeight = wrapper.offsetTop - cellTd.offsetTop;
7606
- }
7607
- };
7608
7633
  MonthEvent.prototype.getMoreIndicatorElement = function (count, startDate, endDate) {
7609
7634
  var moreIndicatorElement = createElement('div', {
7610
7635
  className: MORE_INDICATOR_CLASS,
@@ -7717,6 +7742,36 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
7717
7742
  }
7718
7743
  return appointmentsList;
7719
7744
  };
7745
+ TimelineEvent.prototype.getSortComparerIndex = function (startDate, endDate) {
7746
+ var appIndex = -1;
7747
+ var appointments = this.renderedEvents;
7748
+ if (appointments.length > 0) {
7749
+ var appointmentsList = this.getOverlapSortComparerEvents(startDate, endDate, appointments);
7750
+ var appLevel = appointmentsList.map(function (obj) { return obj.Index; });
7751
+ appIndex = (appLevel.length > 0) ? this.getSmallestMissingNumber(appLevel) : 0;
7752
+ }
7753
+ return (appIndex === -1) ? 0 : appIndex;
7754
+ };
7755
+ TimelineEvent.prototype.getOverlapSortComparerEvents = function (startDate, endDate, appointmentsCollection) {
7756
+ var appointments = [];
7757
+ for (var _i = 0, appointmentsCollection_1 = appointmentsCollection; _i < appointmentsCollection_1.length; _i++) {
7758
+ var app = appointmentsCollection_1[_i];
7759
+ if (this.renderType === 'day') {
7760
+ if ((resetTime(app[this.fields.startTime]).getTime() <= resetTime(new Date(startDate.getTime())).getTime()) &&
7761
+ (resetTime(app[this.fields.endTime]).getTime() >= resetTime(new Date(startDate.getTime())).getTime())) {
7762
+ appointments.push(app);
7763
+ }
7764
+ }
7765
+ else {
7766
+ var eventData = app.data;
7767
+ if (((eventData.trimStartTime.getTime() <= startDate.getTime()) && (startDate.getTime() < eventData.trimEndTime.getTime())) ||
7768
+ ((startDate.getTime() <= eventData.trimStartTime.getTime()) && (eventData.trimStartTime.getTime() < endDate.getTime()))) {
7769
+ appointments.push(app);
7770
+ }
7771
+ }
7772
+ }
7773
+ return appointments;
7774
+ };
7720
7775
  TimelineEvent.prototype.renderResourceEvents = function () {
7721
7776
  this.removeHeightProperty(RESOURCE_COLUMN_TABLE_CLASS);
7722
7777
  var resources = this.parent.uiStateValues.isGroupAdaptive ?
@@ -7757,7 +7812,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
7757
7812
  return;
7758
7813
  }
7759
7814
  var cellTd = this.getCellTd();
7760
- var overlapCount = this.getIndex(startTime);
7815
+ var overlapCount = (isNullOrUndefined(this.parent.eventSettings.sortComparer)) ? this.getIndex(startTime) : this.getSortComparerIndex(startTime, endTime);
7761
7816
  event.Index = overlapCount;
7762
7817
  var elem = this.element.querySelector('.' + APPOINTMENT_CLASS);
7763
7818
  var eleHeight = (elem) ? elem.getBoundingClientRect().height : 0;
@@ -8403,6 +8458,9 @@ var FieldValidator = /** @__PURE__ @class */ (function () {
8403
8458
  if (!elem && !this.ignoreError) {
8404
8459
  this.createTooltip(inputElement, error, id, '');
8405
8460
  }
8461
+ if (!isNullOrUndefined(elem)) {
8462
+ elem.querySelector(".e-error").innerHTML = error.innerHTML;
8463
+ }
8406
8464
  };
8407
8465
  FieldValidator.prototype.createTooltip = function (element, error, name, display) {
8408
8466
  var dlgContent;
@@ -8586,6 +8644,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
8586
8644
  });
8587
8645
  buttonObj.appendTo(element);
8588
8646
  EventHandler.add(element, 'click', clickEvent, this);
8647
+ removeClass([element], ICON);
8589
8648
  };
8590
8649
  QuickPopups.prototype.quickDialogClass = function (action) {
8591
8650
  var classList$$1 = [
@@ -8830,10 +8889,16 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
8830
8889
  var closeIcon = this.quickPopup.element.querySelector('.' + CLOSE_CLASS);
8831
8890
  this.renderButton('e-flat e-round e-small', ICON + ' ' + CLOSE_ICON_CLASS, false, closeIcon, this.closeClick);
8832
8891
  var readonly = this.parent.activeViewOptions.readonly || eventObj[this.parent.eventFields.isReadonly];
8892
+ var editAction = !this.parent.eventSettings.allowEditing || readonly;
8893
+ var deleteAction = !this.parent.eventSettings.allowDeleting || readonly;
8833
8894
  var editIcon = this.quickPopup.element.querySelector('.' + EDIT_CLASS);
8834
- this.renderButton('e-flat e-round e-small', ICON + ' ' + EDIT_ICON_CLASS, readonly, editIcon, this.editClick);
8895
+ if (editIcon) {
8896
+ this.renderButton('e-flat e-round e-small', ICON + ' ' + EDIT_ICON_CLASS, editAction, editIcon, this.editClick);
8897
+ }
8835
8898
  var deleteIcon = this.quickPopup.element.querySelector('.' + DELETE_CLASS);
8836
- this.renderButton('e-flat e-round e-small', ICON + ' ' + DELETE_ICON_CLASS, readonly, deleteIcon, this.deleteClick);
8899
+ if (deleteIcon) {
8900
+ this.renderButton('e-flat e-round e-small', ICON + ' ' + DELETE_ICON_CLASS, deleteAction, deleteIcon, this.deleteClick);
8901
+ }
8837
8902
  this.beforeQuickPopupOpen(target);
8838
8903
  };
8839
8904
  QuickPopups.prototype.isCellBlocked = function (args) {
@@ -9284,21 +9349,24 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9284
9349
  }
9285
9350
  });
9286
9351
  };
9287
- QuickPopups.prototype.saveClick = function () {
9352
+ QuickPopups.prototype.saveClick = function (event) {
9353
+ this.dialogEvent = event;
9288
9354
  this.isCrudAction = true;
9289
9355
  this.quickPopupHide();
9290
9356
  };
9291
- QuickPopups.prototype.detailsClick = function () {
9357
+ QuickPopups.prototype.detailsClick = function (event) {
9292
9358
  var subjectEle = this.quickPopup.element.querySelector('.' + SUBJECT_CLASS);
9293
9359
  if (subjectEle && subjectEle.value !== '') {
9294
9360
  extend(this.parent.activeCellsData, { subject: subjectEle.value });
9295
9361
  }
9362
+ this.dialogEvent = event;
9296
9363
  this.isCrudAction = false;
9297
9364
  this.fieldValidator.destroyToolTip();
9298
9365
  this.quickPopupHide();
9299
9366
  this.parent.eventWindow.openEditor(this.parent.activeCellsData, 'Add');
9300
9367
  };
9301
- QuickPopups.prototype.editClick = function () {
9368
+ QuickPopups.prototype.editClick = function (event) {
9369
+ this.dialogEvent = event;
9302
9370
  this.quickPopupHide(true);
9303
9371
  var data = this.parent.activeEventData.event;
9304
9372
  this.parent.currentAction = 'EditSeries';
@@ -9310,7 +9378,8 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9310
9378
  this.parent.eventWindow.openEditor(data, this.parent.currentAction);
9311
9379
  }
9312
9380
  };
9313
- QuickPopups.prototype.deleteClick = function () {
9381
+ QuickPopups.prototype.deleteClick = function (event) {
9382
+ this.dialogEvent = event;
9314
9383
  this.quickPopupHide(true);
9315
9384
  this.parent.currentAction = 'Delete';
9316
9385
  if (this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule]) {
@@ -9342,11 +9411,13 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9342
9411
  var moreElement = this.createMoreEventList(events, groupOrder, groupIndex);
9343
9412
  this.morePopup.element.querySelector('.' + MORE_EVENT_POPUP_CLASS).appendChild(moreElement);
9344
9413
  };
9345
- QuickPopups.prototype.closeClick = function () {
9414
+ QuickPopups.prototype.closeClick = function (event) {
9415
+ this.dialogEvent = event;
9346
9416
  this.quickPopupHide();
9347
9417
  this.morePopup.hide();
9348
9418
  };
9349
9419
  QuickPopups.prototype.dialogButtonClick = function (event) {
9420
+ this.dialogEvent = event;
9350
9421
  this.quickDialog.hide();
9351
9422
  var target = event.target;
9352
9423
  var cancelBtn = this.quickDialog.element.querySelector('.' + QUICK_DIALOG_ALERT_CANCEL);
@@ -9390,7 +9461,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9390
9461
  else if (!cancelBtn.classList.contains(DISABLE_CLASS) && (target.classList.contains(QUICK_DIALOG_ALERT_OK) ||
9391
9462
  (target.classList.contains(QUICK_DIALOG_ALERT_CANCEL) && !cancelBtn.classList.contains(QUICK_DIALOG_CANCEL_CLASS)))) {
9392
9463
  this.parent.uiStateValues.isIgnoreOccurrence = target.classList.contains(QUICK_DIALOG_ALERT_CANCEL);
9393
- this.parent.eventWindow.eventSave(this.l10n.getConstant('ok'));
9464
+ this.parent.eventWindow.eventSave(event, this.l10n.getConstant('ok'));
9394
9465
  }
9395
9466
  };
9396
9467
  QuickPopups.prototype.updateTapHoldEventPopup = function (target) {
@@ -9447,9 +9518,10 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9447
9518
  this.parent.eventWindow.convertToEventData(cellsData, eventObj);
9448
9519
  return eventObj;
9449
9520
  };
9450
- QuickPopups.prototype.beforeQuickDialogClose = function () {
9521
+ QuickPopups.prototype.beforeQuickDialogClose = function (e) {
9451
9522
  var _this = this;
9452
9523
  var args = {
9524
+ event: e.event || this.dialogEvent,
9453
9525
  type: (isNullOrUndefined(this.parent.activeEventData.event)) ? 'ValidationAlert' :
9454
9526
  !isNullOrUndefined(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])
9455
9527
  ? 'RecurrenceAlert' : 'DeleteAlert', cancel: false, data: this.parent.activeEventData.event,
@@ -9491,7 +9563,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9491
9563
  else {
9492
9564
  _this.quickPopup.offsetX = 10;
9493
9565
  _this.quickPopup.collision = { X: _this.parent.enableRtl ? 'flip' : 'none', Y: 'fit' };
9494
- _this.quickPopup.position = { X: _this.parent.enableRtl ? 'left' : 'right', Y: 'top' };
9566
+ _this.quickPopup.position = { X: _this.parent.enableRtl ? 'left' : 'right', Y: _this.parent.enableRtl ? 'bottom' : 'top' };
9495
9567
  _this.quickPopup.dataBind();
9496
9568
  _this.quickPopup.refreshPosition(null, true);
9497
9569
  var collide = isCollide(_this.quickPopup.element, _this.parent.element);
@@ -9595,7 +9667,8 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9595
9667
  remove(moreWrapper);
9596
9668
  }
9597
9669
  };
9598
- QuickPopups.prototype.popupClose = function () {
9670
+ QuickPopups.prototype.popupClose = function (event) {
9671
+ this.dialogEvent = event;
9599
9672
  this.isCrudAction = false;
9600
9673
  this.quickPopupHide(true);
9601
9674
  };
@@ -9629,6 +9702,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9629
9702
  }
9630
9703
  var isEventPopup = this.quickPopup.element.querySelector('.' + EVENT_POPUP_CLASS);
9631
9704
  var args = {
9705
+ event: this.dialogEvent,
9632
9706
  type: this.parent.isAdaptive ? isEventPopup ? 'ViewEventInfo' : 'EditEventInfo' : 'QuickInfo',
9633
9707
  cancel: false, data: popupData, element: this.quickPopup.element,
9634
9708
  target: (isCellPopup ? this.parent.activeCellsData.element : this.parent.activeEventData.element)
@@ -9660,7 +9734,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9660
9734
  if (!isNullOrUndefined(navigateEle)) {
9661
9735
  var date = this.parent.getDateFromElement(e.currentTarget);
9662
9736
  if (!isNullOrUndefined(date)) {
9663
- this.closeClick();
9737
+ this.closeClick(e);
9664
9738
  this.parent.setProperties({ selectedDate: date }, true);
9665
9739
  this.parent.changeView(this.parent.getNavigateView(), e);
9666
9740
  }
@@ -9688,7 +9762,10 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9688
9762
  this.morePopup.hide();
9689
9763
  }
9690
9764
  };
9691
- QuickPopups.prototype.onClosePopup = function () {
9765
+ QuickPopups.prototype.onClosePopup = function (event) {
9766
+ if (!isNullOrUndefined(event)) {
9767
+ this.dialogEvent = event;
9768
+ }
9692
9769
  this.quickPopupHide();
9693
9770
  this.parent.eventBase.focusElement();
9694
9771
  };
@@ -11227,6 +11304,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
11227
11304
  }
11228
11305
  var eventProp = {
11229
11306
  type: 'Editor',
11307
+ event: args.event || this.dialogEvent,
11230
11308
  data: this.eventCrudData,
11231
11309
  cancel: false,
11232
11310
  element: this.element,
@@ -12097,11 +12175,12 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12097
12175
  (this.l10n.getConstant('repeats') + ' ' + this.recurrenceEditor.getRuleSummary(repeatRule)) : this.l10n.getConstant('repeat');
12098
12176
  this.repeatStatus.setProperties({ label: data });
12099
12177
  };
12100
- EventWindow.prototype.dialogClose = function () {
12178
+ EventWindow.prototype.dialogClose = function (event) {
12101
12179
  if (this.isEnterKey) {
12102
12180
  this.isEnterKey = false;
12103
12181
  return;
12104
12182
  }
12183
+ this.dialogEvent = event;
12105
12184
  this.isCrudAction = false;
12106
12185
  this.parent.activeEventData = { event: undefined, element: undefined };
12107
12186
  this.parent.currentAction = null;
@@ -12151,7 +12230,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12151
12230
  }
12152
12231
  }
12153
12232
  };
12154
- EventWindow.prototype.eventSave = function (alert) {
12233
+ EventWindow.prototype.eventSave = function (event, alert) {
12155
12234
  if (this.isEnterKey) {
12156
12235
  this.isEnterKey = false;
12157
12236
  return;
@@ -12166,6 +12245,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12166
12245
  return;
12167
12246
  }
12168
12247
  this.eventCrudData = dataCollection.eventData;
12248
+ this.dialogEvent = event;
12169
12249
  this.isCrudAction = true;
12170
12250
  this.dialogObject.hide();
12171
12251
  };
@@ -12714,7 +12794,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12714
12794
  var element = this.element.querySelector('.' + className);
12715
12795
  return element ? element.ej2_instances[0] : null;
12716
12796
  };
12717
- EventWindow.prototype.eventDelete = function () {
12797
+ EventWindow.prototype.eventDelete = function (event) {
12718
12798
  if (this.isEnterKey) {
12719
12799
  this.isEnterKey = false;
12720
12800
  return;
@@ -12740,6 +12820,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12740
12820
  }
12741
12821
  break;
12742
12822
  }
12823
+ this.dialogEvent = event;
12743
12824
  this.isCrudAction = false;
12744
12825
  this.dialogObject.hide();
12745
12826
  this.parent.quickPopup.openDeleteAlert();
@@ -12921,7 +13002,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
12921
13002
  };
12922
13003
  VirtualScroll.prototype.renderEvents = function () {
12923
13004
  this.setTabIndex();
12924
- this.parent.notify(dataReady, {});
13005
+ this.parent.refreshEvents(false);
12925
13006
  this.parent.notify(contentReady, {});
12926
13007
  this.parent.hideSpinner();
12927
13008
  };
@@ -12975,6 +13056,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
12975
13056
  }
12976
13057
  else {
12977
13058
  var height = (this.parent.rowAutoHeight) ? this.averageRowHeight : this.itemSize;
13059
+ height = (height > 0) ? height : this.itemSize;
12978
13060
  this.translateY = (conWrap.scrollTop - (this.bufferCount * height) > 0) ?
12979
13061
  conWrap.scrollTop - (this.bufferCount * height) : 0;
12980
13062
  }
@@ -13389,8 +13471,7 @@ var Crud = /** @__PURE__ @class */ (function () {
13389
13471
  var resultData = extend([], args.result, null, true);
13390
13472
  _this.parent.eventsData = resultData.filter(function (data) { return !data[_this.parent.eventFields.isBlock]; });
13391
13473
  _this.parent.blockData = resultData.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
13392
- var processed = _this.parent.eventBase.processData(resultData);
13393
- _this.parent.notify(dataReady, { processedData: processed });
13474
+ _this.parent.refreshEvents(false);
13394
13475
  if (_this.parent.dragAndDropModule && _this.parent.dragAndDropModule.actionObj.action === 'drag') {
13395
13476
  _this.parent.dragAndDropModule.navigationWrapper();
13396
13477
  }
@@ -13492,6 +13573,7 @@ var Crud = /** @__PURE__ @class */ (function () {
13492
13573
  if (addArgs.addedRecords instanceof Array) {
13493
13574
  for (var _i = 0, _a = addArgs.addedRecords; _i < _a.length; _i++) {
13494
13575
  var event_1 = _a[_i];
13576
+ event_1 = _this.parent.eventBase.updateEventDateTime(event_1);
13495
13577
  var eventData_1 = extend({}, _this.parent.eventBase.processTimezone(event_1, true), null, true);
13496
13578
  editParams.addedRecords.push(eventData_1);
13497
13579
  }
@@ -13549,6 +13631,7 @@ var Crud = /** @__PURE__ @class */ (function () {
13549
13631
  if (saveArgs.changedRecords instanceof Array) {
13550
13632
  for (var _i = 0, _a = saveArgs.changedRecords; _i < _a.length; _i++) {
13551
13633
  var event_3 = _a[_i];
13634
+ event_3 = _this.parent.eventBase.updateEventDateTime(event_3);
13552
13635
  var eventData_2 = extend({}, _this.parent.eventBase.processTimezone(event_3, true), null, true);
13553
13636
  editParams.changedRecords.push(eventData_2);
13554
13637
  }
@@ -14332,6 +14415,9 @@ var EventSettings = /** @__PURE__ @class */ (function (_super) {
14332
14415
  __decorate$6([
14333
14416
  Property()
14334
14417
  ], EventSettings.prototype, "tooltipTemplate", void 0);
14418
+ __decorate$6([
14419
+ Property('AllDayRow')
14420
+ ], EventSettings.prototype, "spannedEventPlacement", void 0);
14335
14421
  __decorate$6([
14336
14422
  Property()
14337
14423
  ], EventSettings.prototype, "resourceColorField", void 0);
@@ -14356,6 +14442,9 @@ var EventSettings = /** @__PURE__ @class */ (function (_super) {
14356
14442
  __decorate$6([
14357
14443
  Property(false)
14358
14444
  ], EventSettings.prototype, "ignoreWhitespace", void 0);
14445
+ __decorate$6([
14446
+ Property()
14447
+ ], EventSettings.prototype, "sortComparer", void 0);
14359
14448
  return EventSettings;
14360
14449
  }(ChildProperty));
14361
14450
 
@@ -14494,7 +14583,13 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
14494
14583
  ResourceBase.prototype.renderResourceHeaderIndent = function (tr) {
14495
14584
  var resColTd = createElement('td', { className: RESOURCE_LEFT_TD_CLASS });
14496
14585
  var resColDiv = createElement('div', { className: RESOURCE_TEXT_CLASS });
14497
- resColTd.appendChild(resColDiv);
14586
+ if (this.parent.activeViewOptions.headerIndentTemplate) {
14587
+ var data = { className: [resColTd.className], type: 'emptyCells' };
14588
+ this.parent.renderHeaderIndentTemplate(data, resColTd);
14589
+ }
14590
+ else {
14591
+ resColTd.appendChild(resColDiv);
14592
+ }
14498
14593
  var args = { elementType: 'emptyCells', element: resColTd };
14499
14594
  this.parent.trigger(renderCell, args);
14500
14595
  tr.appendChild(resColTd);
@@ -14683,7 +14778,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
14683
14778
  cancel: false, event: e, groupIndex: index,
14684
14779
  requestType: target.classList.contains(RESOURCE_COLLAPSE_CLASS) ? 'resourceExpanded' : 'resourceCollapsed'
14685
14780
  };
14686
- _this.parent.notify(dataReady, {});
14781
+ _this.parent.refreshEvents(false);
14687
14782
  _this.parent.trigger(actionComplete, args);
14688
14783
  }
14689
14784
  });
@@ -15145,8 +15240,11 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
15145
15240
  var currentLevelChilds = _a[_i];
15146
15241
  for (var _b = 0, currentLevelChilds_1 = currentLevelChilds; _b < currentLevelChilds_1.length; _b++) {
15147
15242
  var currentLevelChild = currentLevelChilds_1[_b];
15148
- if (resTreeGroup[i + 1]) {
15243
+ if (resTreeGroup[i + 1] && resTreeGroup[i + 1].length > 0) {
15149
15244
  var nextLevelChilds = resTreeGroup[i + 1][temp];
15245
+ if (!nextLevelChilds) {
15246
+ continue;
15247
+ }
15150
15248
  var colSpan = 0;
15151
15249
  for (var _c = 0, nextLevelChilds_1 = nextLevelChilds; _c < nextLevelChilds_1.length; _c++) {
15152
15250
  var nextLevelChild = nextLevelChilds_1[_c];
@@ -15556,11 +15654,6 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
15556
15654
  }
15557
15655
  classList(this.element, addClasses, removeClasses);
15558
15656
  this.validateDate();
15559
- this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);
15560
- this.editorTemplateFn = this.templateParser(this.editorTemplate);
15561
- this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);
15562
- this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);
15563
- this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);
15564
15657
  createSpinner({ target: this.element });
15565
15658
  this.scrollModule = new Scroll(this);
15566
15659
  this.scrollModule.setWidth();
@@ -15710,6 +15803,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
15710
15803
  obj.dayHeaderTemplateName = obj.dayHeaderTemplate ? obj.option : '';
15711
15804
  obj.monthHeaderTemplateName = obj.monthHeaderTemplate ? obj.option : '';
15712
15805
  obj.resourceHeaderTemplateName = obj.resourceHeaderTemplate ? obj.option : '';
15806
+ obj.headerIndentTemplateName = obj.headerIndentTemplate ? obj.option : '';
15713
15807
  obj.eventTemplateName = obj.eventTemplate ? obj.option : '';
15714
15808
  if (!isNullOrUndefined(obj.firstDayOfWeek) && obj.firstDayOfWeek === 0) {
15715
15809
  delete obj.firstDayOfWeek;
@@ -15768,6 +15862,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
15768
15862
  eventTemplate: this.eventSettings.template,
15769
15863
  dateHeaderTemplate: this.dateHeaderTemplate,
15770
15864
  resourceHeaderTemplate: this.resourceHeaderTemplate,
15865
+ headerIndentTemplate: this.headerIndentTemplate,
15771
15866
  firstMonthOfYear: this.firstMonthOfYear,
15772
15867
  firstDayOfWeek: this.firstDayOfWeek,
15773
15868
  workDays: workDays,
@@ -15843,7 +15938,13 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
15843
15938
  this.minorSlotTemplateFn = this.templateParser(this.activeViewOptions.timeScale.minorSlotTemplate);
15844
15939
  this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);
15845
15940
  this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);
15941
+ this.headerIndentTemplateFn = this.templateParser(this.activeViewOptions.headerIndentTemplate);
15846
15942
  this.headerTooltipTemplateFn = this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);
15943
+ this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);
15944
+ this.editorTemplateFn = this.templateParser(this.editorTemplate);
15945
+ this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);
15946
+ this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);
15947
+ this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);
15847
15948
  };
15848
15949
  Schedule.prototype.initializePopups = function () {
15849
15950
  this.eventWindow = new EventWindow(this);
@@ -16483,6 +16584,15 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16483
16584
  Schedule.prototype.getResourceHeaderTemplate = function () {
16484
16585
  return this.resourceHeaderTemplateFn;
16485
16586
  };
16587
+ /**
16588
+ * Method to process indent template
16589
+ *
16590
+ * @returns {CallbackFunction} Returns the callback function
16591
+ * @private
16592
+ */
16593
+ Schedule.prototype.getHeaderIndentTemplate = function () {
16594
+ return this.headerIndentTemplateFn;
16595
+ };
16486
16596
  /**
16487
16597
  * Method to get dynamic CSS properties
16488
16598
  *
@@ -16546,7 +16656,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16546
16656
  && !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {
16547
16657
  this.activeView.resetColWidth();
16548
16658
  this.notify(scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });
16549
- this.notify(dataReady, {});
16659
+ this.refreshEvents(false);
16550
16660
  }
16551
16661
  else {
16552
16662
  this.notify(contentReady, {});
@@ -16656,6 +16766,23 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16656
16766
  }
16657
16767
  return weekNumber;
16658
16768
  };
16769
+ /**
16770
+ * Method to render the header indent template.
16771
+ *
16772
+ * @param {TdData} data Accepts the td data
16773
+ * @param {Element} td Accepts the td element
16774
+ * @returns {void}
16775
+ * @private
16776
+ */
16777
+ Schedule.prototype.renderHeaderIndentTemplate = function (data, td) {
16778
+ if (this.activeViewOptions.headerIndentTemplate) {
16779
+ var scheduleId = this.element.id + '_';
16780
+ var viewName = this.activeViewOptions.headerIndentTemplateName;
16781
+ var templateId = scheduleId + viewName + 'headerIndentTemplate';
16782
+ var indentTemplate = [].slice.call(this.getHeaderIndentTemplate()(data, this, 'headerIndentTemplate', templateId, false));
16783
+ append(indentTemplate, td);
16784
+ }
16785
+ };
16659
16786
  Schedule.prototype.unWireEvents = function () {
16660
16787
  EventHandler.remove(window, 'resize', this.onScheduleResize);
16661
16788
  EventHandler.remove(window, 'orientationchange', this.onScheduleResize);
@@ -16724,7 +16851,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16724
16851
  }
16725
16852
  this.notify(scrollUiUpdate, { cssProperties: this.getCssProperties() });
16726
16853
  if (this.activeView.isTimelineView()) {
16727
- this.notify(dataReady, {});
16854
+ this.refreshEvents(false);
16728
16855
  }
16729
16856
  break;
16730
16857
  case 'showWeekend':
@@ -16920,10 +17047,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16920
17047
  break;
16921
17048
  case 'allowDragAndDrop':
16922
17049
  case 'allowResizing':
16923
- this.notify(dataReady, { processedData: this.eventBase.processData(this.eventsData) });
16924
- break;
16925
17050
  case 'eventDragArea':
16926
- this.notify(dataReady, {});
17051
+ this.refreshEvents(false);
16927
17052
  break;
16928
17053
  case 'weekRule':
16929
17054
  state.isLayout = true;
@@ -16953,6 +17078,11 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16953
17078
  }
16954
17079
  state.isLayout = true;
16955
17080
  break;
17081
+ case 'headerIndentTemplate':
17082
+ this.activeViewOptions.headerIndentTemplate = newProp.headerIndentTemplate;
17083
+ this.headerIndentTemplateFn = this.templateParser(this.activeViewOptions.headerIndentTemplate);
17084
+ state.isLayout = true;
17085
+ break;
16956
17086
  }
16957
17087
  };
16958
17088
  Schedule.prototype.setRtlClass = function () {
@@ -17025,9 +17155,10 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17025
17155
  this.eventWindow.refresh();
17026
17156
  }
17027
17157
  break;
17158
+ case 'spannedEventPlacement':
17028
17159
  case 'enableMaxHeight':
17029
17160
  case 'enableIndicator':
17030
- this.notify(dataReady, { processedData: this.eventBase.processData(this.eventsData) });
17161
+ this.refreshEvents(false);
17031
17162
  break;
17032
17163
  case 'ignoreWhitespace':
17033
17164
  state.isLayout = true;
@@ -17571,14 +17702,103 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17571
17702
  * Refreshes the event dataSource. This method may be useful when the events alone in the schedule needs to be re-rendered.
17572
17703
  *
17573
17704
  * @function refreshEvents
17705
+ * @param {boolean} isRemoteRefresh Accepts the boolean to refresh data from remote or local
17574
17706
  * @returns {void}
17575
17707
  */
17576
- Schedule.prototype.refreshEvents = function () {
17708
+ Schedule.prototype.refreshEvents = function (isRemoteRefresh) {
17709
+ if (isRemoteRefresh === void 0) { isRemoteRefresh = true; }
17577
17710
  if (this.dragAndDropModule) {
17578
17711
  this.dragAndDropModule.actionObj.action = '';
17579
17712
  removeClass([this.element], EVENT_ACTION_CLASS);
17580
17713
  }
17581
- this.crudModule.refreshDataManager();
17714
+ if (isRemoteRefresh) {
17715
+ this.crudModule.refreshDataManager();
17716
+ }
17717
+ else {
17718
+ var eventsData = this.eventsData || [];
17719
+ var blockData = this.blockData || [];
17720
+ var data = eventsData.concat(blockData);
17721
+ this.notify(dataReady, { processedData: this.eventBase ? this.eventBase.processData(data) : [] });
17722
+ }
17723
+ };
17724
+ /**
17725
+ * Method to refresh the given Schedule templates
17726
+ *
17727
+ * @param {string} templateName Accepts the template name
17728
+ * @returns {void}
17729
+ */
17730
+ Schedule.prototype.refreshTemplates = function (templateName) {
17731
+ if (templateName) {
17732
+ this.resetTemplates([templateName]);
17733
+ }
17734
+ else {
17735
+ this.resetTemplates();
17736
+ }
17737
+ switch (templateName) {
17738
+ case 'eventTemplate':
17739
+ this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);
17740
+ this.refreshEvents(false);
17741
+ break;
17742
+ case 'dateHeaderTemplate':
17743
+ this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate);
17744
+ this.activeView.refreshHeader();
17745
+ break;
17746
+ case 'resourceHeaderTemplate':
17747
+ this.resourceHeaderTemplateFn = this.templateParser(this.activeViewOptions.resourceHeaderTemplate);
17748
+ if (this.activeView.isTimelineView()) {
17749
+ this.activeView.refreshResourceHeader();
17750
+ }
17751
+ else {
17752
+ this.activeView.refreshHeader();
17753
+ }
17754
+ break;
17755
+ case 'quickInfoTemplates':
17756
+ if (this.quickPopup) {
17757
+ this.quickPopup.destroy();
17758
+ this.quickPopup = null;
17759
+ }
17760
+ this.quickPopup = new QuickPopups(this);
17761
+ this.quickInfoTemplatesHeaderFn = this.templateParser(this.quickInfoTemplates.header);
17762
+ this.quickInfoTemplatesContentFn = this.templateParser(this.quickInfoTemplates.content);
17763
+ this.quickInfoTemplatesFooterFn = this.templateParser(this.quickInfoTemplates.footer);
17764
+ break;
17765
+ case 'editorTemplate':
17766
+ if (this.eventWindow) {
17767
+ this.eventWindow.destroy();
17768
+ this.eventWindow = null;
17769
+ }
17770
+ this.eventWindow = new EventWindow(this);
17771
+ this.editorTemplateFn = this.templateParser(this.editorTemplate);
17772
+ break;
17773
+ case 'tooltipTemplate':
17774
+ case 'headerTooltipTemplate':
17775
+ if (this.eventTooltip) {
17776
+ this.eventTooltip.destroy();
17777
+ this.eventTooltip = null;
17778
+ }
17779
+ this.eventTooltip = new EventTooltip(this);
17780
+ this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);
17781
+ this.headerTooltipTemplateFn = this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);
17782
+ break;
17783
+ default:
17784
+ this.initializeView(this.currentView);
17785
+ break;
17786
+ }
17787
+ };
17788
+ /**
17789
+ * Refreshes the Schedule layout without re-render.
17790
+ *
17791
+ * @function refreshLayout
17792
+ * @returns {void}
17793
+ */
17794
+ Schedule.prototype.refreshLayout = function () {
17795
+ this.onScheduleResize();
17796
+ if (this.headerModule) {
17797
+ this.headerModule.refresh();
17798
+ }
17799
+ if (this.eventWindow) {
17800
+ this.eventWindow.refresh();
17801
+ }
17582
17802
  };
17583
17803
  /**
17584
17804
  * To retrieve the appointment object from element.
@@ -17966,6 +18186,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17966
18186
  __decorate([
17967
18187
  Property()
17968
18188
  ], Schedule.prototype, "resourceHeaderTemplate", void 0);
18189
+ __decorate([
18190
+ Property()
18191
+ ], Schedule.prototype, "headerIndentTemplate", void 0);
17969
18192
  __decorate([
17970
18193
  Complex({}, Group)
17971
18194
  ], Schedule.prototype, "group", void 0);
@@ -18151,7 +18374,7 @@ var ActionBase = /** @__PURE__ @class */ (function () {
18151
18374
  var viewElement = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
18152
18375
  var trElement = [].slice.call(viewElement.querySelector('tr').children);
18153
18376
  if (!this.parent.activeView.isTimelineView() && this.parent.activeViewOptions.group.resources.length > 0 &&
18154
- !this.parent.isAdaptive) {
18377
+ !this.parent.isAdaptive && !this.parent.enableAdaptiveUI) {
18155
18378
  trElement = this.getResourceElements(trElement);
18156
18379
  }
18157
18380
  var leftOffset = trElement[0].getBoundingClientRect();
@@ -18717,6 +18940,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
18717
18940
  };
18718
18941
  Resize.prototype.monthResizing = function () {
18719
18942
  this.removeCloneElement();
18943
+ if (isNullOrUndefined(this.actionObj.pageX) || isNullOrUndefined(this.actionObj.pageY)) {
18944
+ return;
18945
+ }
18720
18946
  var td = document.elementFromPoint(this.actionObj.pageX, this.actionObj.pageY);
18721
18947
  if (isNullOrUndefined(td)) {
18722
18948
  return;
@@ -18850,13 +19076,16 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
18850
19076
  var eventEnd = new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());
18851
19077
  var resizeTime;
18852
19078
  var isDateHeader = false;
19079
+ var isTimeViews = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1;
19080
+ var isTimelineMonth = this.parent.currentView === 'TimelineMonth';
19081
+ var isWithoutScale = isTimelineMonth || isTimeViews && !this.parent.activeViewOptions.timeScale.enable;
18853
19082
  if (this.parent.activeView.isTimelineView()) {
18854
19083
  var tr = this.parent.getContentTable().querySelector('tr');
18855
19084
  var headerName = this.parent.currentView;
18856
19085
  if (this.parent.activeViewOptions.headerRows.length > 0) {
18857
19086
  var rows = this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
18858
19087
  headerName = rows.slice(-1)[0];
18859
- if (this.parent.currentView === 'TimelineMonth' && headerName === 'Hour') {
19088
+ if (isTimelineMonth && headerName === 'Hour') {
18860
19089
  headerName = rows.slice(-2)[0] || 'Month';
18861
19090
  }
18862
19091
  }
@@ -18876,9 +19105,8 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
18876
19105
  offsetValue += (this.actionObj.clone.offsetWidth - this.actionObj.cellWidth);
18877
19106
  }
18878
19107
  cellIndex = Math.floor(offsetValue / Math.floor(tr.offsetWidth / noOfDays));
18879
- isDateHeader =
18880
- ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1 && headerName === 'Date';
18881
- cellIndex = isLeft ? cellIndex : (this.parent.currentView === 'TimelineMonth' || isDateHeader) ? cellIndex + 1 : cellIndex;
19108
+ isDateHeader = isTimeViews && headerName === 'Date';
19109
+ cellIndex = isLeft ? cellIndex : (isTimelineMonth || isDateHeader) ? cellIndex + 1 : cellIndex;
18882
19110
  isLastCell = cellIndex === tdCollections.length;
18883
19111
  cellIndex = (cellIndex < 0) ? 0 : (cellIndex >= noOfDays) ? noOfDays - 1 : cellIndex;
18884
19112
  }
@@ -18890,7 +19118,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
18890
19118
  if (this.parent.enableRtl) {
18891
19119
  var cellOffsetWidth = 0;
18892
19120
  if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
18893
- this.parent.currentView !== 'TimelineMonth')) {
19121
+ !isTimelineMonth)) {
18894
19122
  cellOffsetWidth = this.actionObj.cellWidth;
18895
19123
  }
18896
19124
  var offsetWidth = (Math.floor(parseInt(this.actionObj.clone.style.right, 10) / this.actionObj.cellWidth) *
@@ -18942,16 +19170,18 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
18942
19170
  }
18943
19171
  }
18944
19172
  if (isLeft) {
18945
- if ((this.actionObj.event[this.parent.eventFields.endTime].getTime() - resizeTime.getTime()) <= 0) {
18946
- resizeTime = new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime());
19173
+ if ((eventEnd.getTime() - resizeTime.getTime()) <= 0) {
19174
+ resizeTime = isWithoutScale ? resetTime(eventEnd) : eventStart;
18947
19175
  }
18948
19176
  this.actionObj.start = this.parent.activeViewOptions.timeScale.enable ? this.calculateIntervalTime(resizeTime) : resizeTime;
18949
19177
  }
18950
19178
  else {
18951
- var isTimeViews = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1 &&
18952
- this.parent.activeViewOptions.timeScale.enable;
18953
- var resizeEnd = ((!isTimeViews || isDateHeader) && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ?
19179
+ var isTimeScaleViews = isTimeViews && this.parent.activeViewOptions.timeScale.enable;
19180
+ var resizeEnd = ((!isTimeScaleViews || isDateHeader) && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ?
18954
19181
  addDays(resizeTime, 1) : resizeTime;
19182
+ if (isWithoutScale && (resizeEnd.getTime() - eventStart.getTime()) <= 0) {
19183
+ resizeEnd = addDays(resetTime(eventStart), 1);
19184
+ }
18955
19185
  this.actionObj.end = this.parent.activeViewOptions.timeScale.enable && this.parent.currentView !== 'Month' ?
18956
19186
  this.calculateIntervalTime(resizeEnd) : resizeEnd;
18957
19187
  }
@@ -19104,6 +19334,9 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
19104
19334
  return _this;
19105
19335
  }
19106
19336
  YearEvent.prototype.renderAppointments = function () {
19337
+ if (this.parent.dragAndDropModule) {
19338
+ this.parent.dragAndDropModule.setDragArea();
19339
+ }
19107
19340
  this.fields = this.parent.eventFields;
19108
19341
  var elementSelector = (this.parent.currentView === 'Year') ? '.' + APPOINTMENT_CLASS :
19109
19342
  '.' + APPOINTMENT_WRAPPER_CLASS + ',.' + MORE_INDICATOR_CLASS;
@@ -19302,7 +19535,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
19302
19535
  var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[month], 1);
19303
19536
  for (var i = 0, len = resources.length; i < len; i++) {
19304
19537
  this.renderedEvents = [];
19305
- this.renderResourceEvent(wrapperCollection[i], resources[i], month, i, monthStart);
19538
+ this.renderResourceEvent(wrapperCollection[month], resources[i], month, i, monthStart);
19306
19539
  }
19307
19540
  }
19308
19541
  }
@@ -19634,7 +19867,6 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
19634
19867
  return _this;
19635
19868
  }
19636
19869
  DragAndDrop.prototype.wireDragEvent = function (element) {
19637
- var dragElement = document.querySelector(this.parent.eventDragArea);
19638
19870
  new Draggable(element, {
19639
19871
  abort: '.' + EVENT_RESIZE_CLASS,
19640
19872
  clone: true,
@@ -19642,8 +19874,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
19642
19874
  enableTapHold: this.parent.isAdaptive,
19643
19875
  enableTailMode: (this.parent.eventDragArea) ? true : false,
19644
19876
  cursorAt: (this.parent.eventDragArea) ? { left: -20, top: -20 } : { left: 0, top: 0 },
19645
- dragArea: (this.parent.eventDragArea && dragElement) ?
19646
- dragElement : this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS),
19877
+ dragArea: this.dragArea,
19647
19878
  dragStart: this.dragStart.bind(this),
19648
19879
  drag: this.drag.bind(this),
19649
19880
  dragStop: this.dragStop.bind(this),
@@ -19652,6 +19883,11 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
19652
19883
  queryPositionInfo: this.dragPosition.bind(this)
19653
19884
  });
19654
19885
  };
19886
+ DragAndDrop.prototype.setDragArea = function () {
19887
+ var dragElement = document.querySelector(this.parent.eventDragArea);
19888
+ this.dragArea = this.parent.eventDragArea && dragElement ? dragElement :
19889
+ this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS);
19890
+ };
19655
19891
  DragAndDrop.prototype.dragHelper = function (e) {
19656
19892
  var _this = this;
19657
19893
  this.setDragActionDefaultValues();
@@ -20265,18 +20501,20 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20265
20501
  var eventData = [];
20266
20502
  var startTime = event[eventFields.startTime];
20267
20503
  var endTime = event[eventFields.endTime];
20268
- var isDifferentDate = resetTime(new Date(startTime.getTime())) < resetTime(new Date(endTime.getTime()));
20269
- if (isDifferentDate) {
20270
- var scheduleStartHour = this.parent.activeView.getStartHour();
20271
- var scheduleEndHour = this.parent.activeView.getEndHour();
20272
- var startDate = getStartEndHours(resetTime(startTime), scheduleStartHour, scheduleEndHour);
20273
- var endDate = getStartEndHours(resetTime(endTime), scheduleStartHour, scheduleEndHour);
20274
- var firstEventObj = extend({}, event, null, true);
20275
- firstEventObj[eventFields.endTime] = startDate.endHour;
20276
- eventData.push(firstEventObj);
20277
- var secondEventObj = extend({}, event, null, true);
20278
- secondEventObj[eventFields.startTime] = endDate.startHour;
20279
- eventData.push(secondEventObj);
20504
+ if (resetTime(new Date(startTime.getTime())) < resetTime(new Date(endTime.getTime()))) {
20505
+ var startReferenceDate = resetTime(new Date(startTime.getTime()));
20506
+ var endReferenceDate = new Date(startReferenceDate.getTime());
20507
+ for (var i = 0; startReferenceDate < new Date(endTime.getTime()); i++) {
20508
+ endReferenceDate = new Date(endReferenceDate.setDate(startReferenceDate.getDate() + 1));
20509
+ var eventObj = extend({}, event, null, true);
20510
+ eventObj[eventFields.startTime] = new Date(startReferenceDate);
20511
+ eventObj[eventFields.endTime] = new Date(endReferenceDate);
20512
+ startReferenceDate = new Date(startReferenceDate.setDate(startReferenceDate.getDate() + 1));
20513
+ eventData.push(eventObj);
20514
+ }
20515
+ var index = eventData.length - 1;
20516
+ eventData[0][eventFields.startTime] = startTime;
20517
+ eventData[index][eventFields.endTime] = endTime;
20280
20518
  }
20281
20519
  else {
20282
20520
  eventData.push(event);
@@ -20347,8 +20585,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20347
20585
  // eslint-disable-next-line max-len
20348
20586
  this.parent.getDateFromElement(isNullOrUndefined(index) ? this.actionObj.target : this.targetTd)));
20349
20587
  var splitEvents = this.splitEvent(event);
20350
- var events_1 = event[this.parent.eventFields.isAllDay] ||
20351
- this.parent.eventBase.isAllDayAppointment(event) || splitEvents.length > 2 ? [event] : splitEvents;
20588
+ var events_1 = this.parent.eventBase.isAllDayAppointment(event) || splitEvents.length > 2 || !(this.parent.eventSettings.spannedEventPlacement == 'TimeSlot') ? [event] : splitEvents;
20352
20589
  for (var i = 0; i < events_1.length; i++) {
20353
20590
  if (i > 0) {
20354
20591
  var filterQuery = ".e-day-wrapper[data-date=\"" + resetTime(events_1[i][this.parent.eventFields.startTime]).getTime() + "\"]";
@@ -20643,6 +20880,12 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
20643
20880
  var eventSrt = eventObj[this.parent.eventFields.startTime];
20644
20881
  eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds());
20645
20882
  }
20883
+ if (this.parent.eventDragArea) {
20884
+ var targetDate = this.parent.getDateFromElement(e.target);
20885
+ if (!isNullOrUndefined(targetDate)) {
20886
+ eventStart = targetDate;
20887
+ }
20888
+ }
20646
20889
  var eventEnd = new Date(eventStart.getTime());
20647
20890
  eventEnd.setMilliseconds(eventDuration);
20648
20891
  var eventsData = [this.getUpdatedEvent(eventStart, eventEnd, this.actionObj.event)];
@@ -20886,8 +21129,15 @@ var ViewBase = /** @__PURE__ @class */ (function () {
20886
21129
  ViewBase.prototype.getContentRows = function () {
20887
21130
  return [];
20888
21131
  };
20889
- ViewBase.prototype.serverRenderLayout = function () {
20890
- // Need only for layout server rendering
21132
+ ViewBase.prototype.refreshHeader = function () {
21133
+ // Method to refresh the date header
21134
+ };
21135
+ ViewBase.prototype.refreshResourceHeader = function () {
21136
+ remove(this.element.querySelector('tbody').lastElementChild.firstElementChild);
21137
+ var resTd = createElement('td');
21138
+ resTd.appendChild(this.parent.resourceBase.createResourceColumn());
21139
+ prepend([resTd], this.element.querySelector('tbody').lastElementChild);
21140
+ this.parent.notify(contentReady, {});
20891
21141
  };
20892
21142
  ViewBase.prototype.getDayName = function (date) {
20893
21143
  return this.parent.getDayNames('abbreviated')[date.getDay()];
@@ -20934,7 +21184,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
20934
21184
  };
20935
21185
  ViewBase.prototype.createTableLayout = function (className) {
20936
21186
  var clsName = className || '';
20937
- var table = createElement('table', { className: SCHEDULE_TABLE_CLASS + ' ' + clsName });
21187
+ var table = createElement('table', { className: SCHEDULE_TABLE_CLASS + ' ' + clsName, attrs: { role: 'table' } });
20938
21188
  var tbody = createElement('tbody');
20939
21189
  table.appendChild(tbody);
20940
21190
  return table;
@@ -21602,12 +21852,11 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21602
21852
  if (!isNullOrUndefined(_this.currentTimeIndicatorTimer)) {
21603
21853
  _this.clearCurrentTimeIndicatorTimer();
21604
21854
  _this.changeCurrentTimePosition();
21605
- _this.currentTimeIndicatorTimer =
21606
- window.setInterval(function () { _this.changeCurrentTimePosition(); }, MS_PER_MINUTE);
21855
+ _this.updateCurrentTimeIndicatorTimer();
21607
21856
  }
21608
21857
  }, interval);
21609
21858
  }
21610
- this.currentTimeIndicatorTimer = window.setInterval(function () { _this.changeCurrentTimePosition(); }, MS_PER_MINUTE);
21859
+ this.updateCurrentTimeIndicatorTimer();
21611
21860
  }
21612
21861
  }
21613
21862
  else {
@@ -21651,6 +21900,10 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21651
21900
  this.removeCurrentTimeIndicatorElements();
21652
21901
  }
21653
21902
  };
21903
+ VerticalView.prototype.updateCurrentTimeIndicatorTimer = function () {
21904
+ var _this = this;
21905
+ this.currentTimeIndicatorTimer = window.setInterval(function () { _this.changeCurrentTimePosition(); }, MS_PER_MINUTE);
21906
+ };
21654
21907
  VerticalView.prototype.removeCurrentTimeIndicatorElements = function () {
21655
21908
  var queryString = '.' + PREVIOUS_TIMELINE_CLASS + ',.' + CURRENT_TIMELINE_CLASS + ',.' + CURRENT_TIME_CLASS;
21656
21909
  var timeIndicator = [].slice.call(this.element.querySelectorAll(queryString));
@@ -21744,7 +21997,6 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21744
21997
  cntEle = [].slice.call(this.parent.getMinorSlotTemplate()(args, this.parent, templateName, templateId + templateName, false));
21745
21998
  }
21746
21999
  else {
21747
- wrapper.innerHTML = '&nbsp;';
21748
22000
  cntEle = [].slice.call(wrapper.childNodes);
21749
22001
  }
21750
22002
  break;
@@ -21759,6 +22011,11 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21759
22011
  }
21760
22012
  return cntEle;
21761
22013
  };
22014
+ VerticalView.prototype.refreshHeader = function () {
22015
+ remove(this.element.querySelector('tbody tr'));
22016
+ this.renderHeader();
22017
+ this.parent.notify(contentReady, {});
22018
+ };
21762
22019
  VerticalView.prototype.renderLayout = function (type) {
21763
22020
  this.setPanel(createElement('div', { className: TABLE_WRAP_CLASS }));
21764
22021
  var clsList = [this.baseCssClass, this.viewClass];
@@ -21830,6 +22087,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21830
22087
  var tbl = this.createTableLayout();
21831
22088
  var trEle = createElement('tr');
21832
22089
  var rowCount = this.colLevels.length;
22090
+ var nth;
21833
22091
  for (var i = 0; i < rowCount; i++) {
21834
22092
  var ntr_1 = trEle.cloneNode();
21835
22093
  var data_1 = { className: [(this.colLevels[i][0] && this.colLevels[i][0].className[0])], type: 'emptyCells' };
@@ -21841,7 +22099,9 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21841
22099
  attrs: { title: this.parent.localeObj.getConstant('week') + ' ' + weekNo }
21842
22100
  })];
21843
22101
  }
21844
- ntr_1.appendChild(this.createTd(data_1));
22102
+ nth = this.createTd(data_1);
22103
+ this.parent.renderHeaderIndentTemplate(data_1, nth);
22104
+ ntr_1.appendChild(nth);
21845
22105
  tbl.querySelector('tbody').appendChild(ntr_1);
21846
22106
  }
21847
22107
  var ntr = trEle.cloneNode();
@@ -21854,8 +22114,9 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21854
22114
  ICON + ' ' + DISABLE_CLASS
21855
22115
  });
21856
22116
  var data = { className: [ALLDAY_CELLS_CLASS], type: 'emptyCells' };
21857
- var nth = this.createTd(data);
22117
+ nth = this.createTd(data);
21858
22118
  nth.appendChild(appointmentExpandCollapse);
22119
+ this.parent.renderHeaderIndentTemplate(data, nth);
21859
22120
  ntr.appendChild(nth);
21860
22121
  tbl.querySelector('tbody').appendChild(ntr);
21861
22122
  wrap.appendChild(tbl);
@@ -21996,10 +22257,10 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
21996
22257
  ntd.setAttribute('colspan', tdData.colSpan.toString());
21997
22258
  }
21998
22259
  var clsName = this.getContentTdClass(r);
21999
- if (!this.parent.isMinMaxDate(resetTime(new Date('' + tdData.date)))) {
22260
+ var cellDate = resetTime(tdData.date);
22261
+ if (!this.parent.isMinMaxDate(cellDate)) {
22000
22262
  clsName.push(DISABLE_DATES);
22001
22263
  }
22002
- var cellDate = resetTime(new Date('' + tdData.date));
22003
22264
  setTime(cellDate, getDateInMs(r.date));
22004
22265
  var type = 'workCells';
22005
22266
  if (tdData.className.indexOf(RESOURCE_PARENT_CLASS) !== -1) {
@@ -22293,6 +22554,7 @@ var __extends$21 = (undefined && undefined.__extends) || (function () {
22293
22554
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22294
22555
  };
22295
22556
  })();
22557
+ /* eslint-disable @typescript-eslint/no-explicit-any */
22296
22558
  /**
22297
22559
  * month view
22298
22560
  */
@@ -22353,20 +22615,14 @@ var Month = /** @__PURE__ @class */ (function (_super) {
22353
22615
  this.setContentHeight(content, leftPanel, height);
22354
22616
  }
22355
22617
  var scrollBarWidth = getScrollBarWidth();
22356
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22357
22618
  header.firstElementChild.style[args.cssProperties.rtlBorder] = '';
22358
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22359
22619
  header.style[args.cssProperties.rtlPadding] = '';
22360
22620
  if (content.offsetWidth - content.clientWidth > 0) {
22361
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22362
22621
  header.firstElementChild.style[args.cssProperties.border] = scrollBarWidth > 0 ? '1px' : '0px';
22363
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22364
22622
  header.style[args.cssProperties.padding] = scrollBarWidth > 0 ? scrollBarWidth - 1 + 'px' : '0px';
22365
22623
  }
22366
22624
  else {
22367
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22368
22625
  header.firstElementChild.style[args.cssProperties.border] = '';
22369
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22370
22626
  header.style[args.cssProperties.padding] = '';
22371
22627
  }
22372
22628
  this.setColWidth(content);
@@ -22468,6 +22724,11 @@ var Month = /** @__PURE__ @class */ (function (_super) {
22468
22724
  }
22469
22725
  this.parent.notify(contentReady, {});
22470
22726
  };
22727
+ Month.prototype.refreshHeader = function () {
22728
+ remove(this.element.querySelector('tbody tr'));
22729
+ this.renderHeader();
22730
+ this.parent.notify(contentReady, {});
22731
+ };
22471
22732
  Month.prototype.wireCellEvents = function (element) {
22472
22733
  EventHandler.add(element, 'mousedown', this.parent.workCellAction.cellMouseDown, this.parent.workCellAction);
22473
22734
  EventHandler.add(element, 'click', this.parent.workCellAction.cellClick, this.parent.workCellAction);
@@ -23676,7 +23937,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
23676
23937
  var event_1 = _a[_i];
23677
23938
  delete event_1.generatedDates;
23678
23939
  }
23679
- var eventCollection = args.processedData;
23940
+ var eventCollection = this.parent.activeViewOptions.allowVirtualScrolling ? args.processedData : this.parent.eventsProcessed;
23680
23941
  if (this.parent.uiStateValues.isGroupAdaptive) {
23681
23942
  var resource = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];
23682
23943
  this.dataSource = this.parent.eventBase.filterEventsByResource(resource, this.dataSource);
@@ -23707,6 +23968,22 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
23707
23968
  }
23708
23969
  this.parent.eventsProcessed = this.parent.eventsProcessed.concat(this.processAgendaEvents(processedData));
23709
23970
  };
23971
+ Agenda.prototype.refreshHeader = function () {
23972
+ var tBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
23973
+ if (this.parent.activeViewOptions.group.byDate) {
23974
+ removeChildren(tBody);
23975
+ }
23976
+ else {
23977
+ remove(tBody.firstElementChild);
23978
+ }
23979
+ var agendaDate = resetTime(this.parent.selectedDate);
23980
+ var emptyTBody = createElement('tbody');
23981
+ var firstDate = new Date(agendaDate.getTime());
23982
+ var lastDate = (this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) ?
23983
+ this.getEndDateFromStartDate(firstDate) : addDays(firstDate, this.parent.agendaDaysCount);
23984
+ this.renderContent(emptyTBody, firstDate, lastDate);
23985
+ append([].slice.call(emptyTBody.childNodes), tBody);
23986
+ };
23710
23987
  Agenda.prototype.renderInitialContent = function (tBody, agendaDate) {
23711
23988
  var emptyTBody = createElement('tbody');
23712
23989
  var firstDate = new Date(agendaDate.getTime());
@@ -23764,6 +24041,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
23764
24041
  var filterData = this.appointmentFiltering(agendaDate);
23765
24042
  var nTr = this.createTableRowElement(agendaDate, 'data');
23766
24043
  if (this.element.querySelector('tr[aria-rowindex="' + parseInt(nTr.getAttribute('aria-rowindex'), 10) + '"]')) {
24044
+ agendaDate = addDays(agendaDate, 1);
23767
24045
  continue;
23768
24046
  }
23769
24047
  var dTd = nTr.children[0];
@@ -23836,7 +24114,7 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
23836
24114
  this.updateHeaderText(scrollDate);
23837
24115
  }
23838
24116
  }
23839
- else if (totalHeight === scrollHeight) {
24117
+ else if (totalHeight >= (scrollHeight - 5)) {
23840
24118
  filterDate = this.getPreviousNextDate(addDays(scrollDate, 1), direction);
23841
24119
  filterData = this.appointmentFiltering(filterDate.start, filterDate.end);
23842
24120
  if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
@@ -24867,8 +25145,14 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
24867
25145
  if (c.colSpan) {
24868
25146
  tdEle.setAttribute('colspan', c.colSpan.toString());
24869
25147
  }
25148
+ if (c.groupIndex > -1) {
25149
+ tdEle.setAttribute('data-group-index', c.groupIndex.toString());
25150
+ }
24870
25151
  this.setResourceHeaderContent(tdEle, c);
24871
25152
  }
25153
+ if (className === LEFT_INDENT_WRAP_CLASS) {
25154
+ this.parent.renderHeaderIndentTemplate(c, tdEle);
25155
+ }
24872
25156
  var args = { elementType: c.type, element: tdEle, date: c.date, groupIndex: c.groupIndex };
24873
25157
  this.parent.trigger(renderCell, args);
24874
25158
  ntr.appendChild(tdEle);
@@ -25079,10 +25363,10 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
25079
25363
  });
25080
25364
  addClass([td], classList$$1);
25081
25365
  td.setAttribute('data-group-index', groupIndex.toString());
25082
- this.renderCellTemplate({ date: date, type: 'workCells', groupIndex: groupIndex }, td);
25366
+ this.renderCellTemplate({ date: date, type: 'resourceGroupCells', groupIndex: groupIndex }, td);
25083
25367
  this.wireEvents(td, 'cell');
25084
25368
  tr.appendChild(td);
25085
- this.parent.trigger(renderCell, { elementType: 'workCells', element: td, date: date });
25369
+ this.parent.trigger(renderCell, { elementType: 'resourceGroupCells', element: td, date: date });
25086
25370
  }
25087
25371
  }
25088
25372
  if (this.parent.activeViewOptions.orientation === 'Vertical') {