@syncfusion/ej2-schedule 19.4.52 → 20.1.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 (76) hide show
  1. package/CHANGELOG.md +31 -9
  2. package/dist/ej2-schedule.umd.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-schedule.es2015.js +158 -47
  5. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  6. package/dist/es6/ej2-schedule.es5.js +158 -47
  7. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  8. package/dist/global/ej2-schedule.min.js +2 -2
  9. package/dist/global/ej2-schedule.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +15 -15
  12. package/src/recurrence-editor/date-generator.js +4 -0
  13. package/src/schedule/base/schedule.js +4 -0
  14. package/src/schedule/event-renderer/agenda-base.js +1 -1
  15. package/src/schedule/event-renderer/month.d.ts +3 -0
  16. package/src/schedule/event-renderer/month.js +38 -24
  17. package/src/schedule/event-renderer/timeline-view.js +2 -1
  18. package/src/schedule/event-renderer/year.js +3 -1
  19. package/src/schedule/popups/event-window.js +4 -2
  20. package/src/schedule/renderer/month.d.ts +1 -0
  21. package/src/schedule/renderer/month.js +29 -12
  22. package/src/schedule/renderer/renderer.js +2 -1
  23. package/src/schedule/renderer/timeline-year.d.ts +2 -1
  24. package/src/schedule/renderer/timeline-year.js +49 -4
  25. package/src/schedule/renderer/vertical-view.js +2 -1
  26. package/src/schedule/renderer/year.js +20 -0
  27. package/styles/bootstrap-dark.css +19 -8
  28. package/styles/bootstrap.css +19 -8
  29. package/styles/bootstrap4.css +20 -9
  30. package/styles/bootstrap5-dark.css +29 -20
  31. package/styles/bootstrap5.css +29 -20
  32. package/styles/fabric-dark.css +19 -8
  33. package/styles/fabric.css +19 -8
  34. package/styles/fluent-dark.css +5102 -0
  35. package/styles/fluent-dark.scss +2 -0
  36. package/styles/fluent.css +5103 -0
  37. package/styles/fluent.scss +2 -0
  38. package/styles/highcontrast-light.css +19 -8
  39. package/styles/highcontrast.css +20 -9
  40. package/styles/material-dark.css +19 -8
  41. package/styles/material.css +19 -8
  42. package/styles/recurrence-editor/_fluent-dark-definition.scss +1 -0
  43. package/styles/recurrence-editor/fluent-dark.css +495 -0
  44. package/styles/recurrence-editor/fluent-dark.scss +3 -0
  45. package/styles/recurrence-editor/fluent.css +495 -0
  46. package/styles/recurrence-editor/fluent.scss +3 -0
  47. package/styles/schedule/_bootstrap4-definition.scss +1 -1
  48. package/styles/schedule/_bootstrap5-definition.scss +4 -4
  49. package/styles/schedule/_fluent-dark-definition.scss +1 -0
  50. package/styles/schedule/_fluent-definition.scss +10 -8
  51. package/styles/schedule/_highcontrast-definition.scss +1 -1
  52. package/styles/schedule/_layout.scss +62 -15
  53. package/styles/schedule/_tailwind-definition.scss +1 -0
  54. package/styles/schedule/_theme.scss +6 -9
  55. package/styles/schedule/bootstrap-dark.css +19 -8
  56. package/styles/schedule/bootstrap.css +19 -8
  57. package/styles/schedule/bootstrap4.css +20 -9
  58. package/styles/schedule/bootstrap5-dark.css +29 -20
  59. package/styles/schedule/bootstrap5.css +29 -20
  60. package/styles/schedule/fabric-dark.css +19 -8
  61. package/styles/schedule/fabric.css +19 -8
  62. package/styles/schedule/fluent-dark.css +4606 -0
  63. package/styles/schedule/fluent-dark.scss +4 -0
  64. package/styles/schedule/fluent.css +4607 -0
  65. package/styles/schedule/fluent.scss +5 -0
  66. package/styles/schedule/highcontrast-light.css +19 -8
  67. package/styles/schedule/highcontrast.css +20 -9
  68. package/styles/schedule/icons/_fluent-dark.scss +1 -0
  69. package/styles/schedule/icons/_fluent.scss +51 -50
  70. package/styles/schedule/icons/_tailwind.scss +51 -50
  71. package/styles/schedule/material-dark.css +19 -8
  72. package/styles/schedule/material.css +19 -8
  73. package/styles/schedule/tailwind-dark.css +74 -61
  74. package/styles/schedule/tailwind.css +74 -61
  75. package/styles/tailwind-dark.css +74 -61
  76. package/styles/tailwind.css +74 -61
@@ -3631,6 +3631,10 @@ function generate(startDate, rule, excludeDate, startDayOfWeek, maximumCount = M
3631
3631
  }
3632
3632
  maxOccurrence = maximumCount;
3633
3633
  setFirstDayOfWeek(DAYINDEX[startDayOfWeek]);
3634
+ if (ruleObject.until) {
3635
+ const end = resetTime(ruleObject.until);
3636
+ ruleObject.until = new Date(end.getFullYear(), end.getMonth(), end.getDate(), 23, 59, 59);
3637
+ }
3634
3638
  switch (ruleObject.freq) {
3635
3639
  case 'DAILY':
3636
3640
  dailyType(modifiedDate, ruleObject.until, data, ruleObject);
@@ -7078,6 +7082,7 @@ class MonthEvent extends EventBase {
7078
7082
  constructor(parent) {
7079
7083
  super(parent);
7080
7084
  this.renderedEvents = [];
7085
+ this.eventsRendered = [];
7081
7086
  this.monthHeaderHeight = 0;
7082
7087
  this.moreIndicatorHeight = 19;
7083
7088
  this.renderType = 'day';
@@ -7096,7 +7101,7 @@ class MonthEvent extends EventBase {
7096
7101
  if (appElement.length > 0) {
7097
7102
  appElement = (this.parent.currentView === 'Month') ? appElement : [appElement[0]];
7098
7103
  for (const wrap of appElement) {
7099
- if (!wrap.classList.contains('e-more-indicator') && wrap.parentElement && wrap.parentElement.parentNode) {
7104
+ if (wrap.parentElement && wrap.parentElement.parentNode) {
7100
7105
  remove(wrap.parentElement);
7101
7106
  }
7102
7107
  }
@@ -7191,6 +7196,7 @@ class MonthEvent extends EventBase {
7191
7196
  }
7192
7197
  renderEventsHandler(dateRender, workDays, resData) {
7193
7198
  this.renderedEvents = [];
7199
+ this.eventsRendered = [];
7194
7200
  let eventsList;
7195
7201
  let blockList;
7196
7202
  let resIndex = 0;
@@ -7534,16 +7540,16 @@ class MonthEvent extends EventBase {
7534
7540
  }
7535
7541
  const overlapCount = this.getIndex(startTime);
7536
7542
  event.Index = overlapCount;
7537
- let appHeight = this.eventHeight;
7538
7543
  this.renderedEvents.push(extend({}, event, null, true));
7539
7544
  const diffInDays = event.data.count;
7540
7545
  if (startTime.getTime() <= endTime.getTime()) {
7541
7546
  const appWidth = (diffInDays * this.cellWidth) - 5;
7542
7547
  const cellTd = this.workCells[day];
7543
- const appTop = (overlapCount * (appHeight + EVENT_GAP));
7544
- const height = this.monthHeaderHeight + ((overlapCount + 1) * (appHeight + EVENT_GAP)) + this.moreIndicatorHeight;
7548
+ const appTop = (overlapCount * (this.eventHeight + EVENT_GAP));
7549
+ const height = this.monthHeaderHeight + ((overlapCount + 1) * (this.eventHeight + EVENT_GAP)) + this.moreIndicatorHeight;
7545
7550
  const enableAppRender = this.maxOrIndicator ? overlapCount < 1 ? true : false : this.cellHeight > height;
7546
7551
  if (this.parent.rowAutoHeight || enableAppRender) {
7552
+ this.eventsRendered.push(extend({}, event, null, true));
7547
7553
  let appointmentElement;
7548
7554
  if (this.inlineValue) {
7549
7555
  appointmentElement = this.parent.inlineModule.createInlineAppointmentElement();
@@ -7559,28 +7565,37 @@ class MonthEvent extends EventBase {
7559
7565
  const firstChild = cellTd.parentElement.firstElementChild;
7560
7566
  this.updateCellHeight(firstChild, height);
7561
7567
  }
7568
+ else if (cellTd.querySelector('.' + MORE_INDICATOR_CLASS)) {
7569
+ this.renderMoreIndicators(diffInDays, day);
7570
+ }
7562
7571
  }
7563
7572
  else {
7564
- for (let i = 0; i < diffInDays; i++) {
7565
- const cellTd = this.workCells[day + i];
7566
- if (cellTd && isNullOrUndefined(cellTd.querySelector('.' + MORE_INDICATOR_CLASS))) {
7567
- const startDate = new Date(this.dateRender[day + i].getTime());
7568
- const endDate = addDays(this.dateRender[day + i], 1);
7569
- const groupIndex = cellTd.getAttribute('data-group-index');
7570
- const filterEvents = this.getFilteredEvents(startDate, endDate, groupIndex);
7571
- const appArea = this.cellHeight - this.monthHeaderHeight - this.moreIndicatorHeight;
7572
- appHeight = this.withIndicator ? appArea : appHeight;
7573
- const renderedAppCount = Math.floor(appArea / (appHeight + EVENT_GAP));
7574
- const count = (filterEvents.length - renderedAppCount) <= 0 ? 1 : (filterEvents.length - renderedAppCount);
7575
- const moreIndicatorElement = this.getMoreIndicatorElement(count, startDate, endDate);
7576
- if (!isNullOrUndefined(groupIndex)) {
7577
- moreIndicatorElement.setAttribute('data-group-index', groupIndex);
7578
- }
7579
- moreIndicatorElement.style.top = appArea + 'px';
7580
- moreIndicatorElement.style.width = this.cellWidth - 2 + 'px';
7581
- this.renderElement(cellTd, moreIndicatorElement);
7582
- EventHandler.add(moreIndicatorElement, 'click', this.moreIndicatorClick, this);
7573
+ this.renderMoreIndicators(diffInDays, day);
7574
+ }
7575
+ }
7576
+ }
7577
+ renderMoreIndicators(diffInDays, day) {
7578
+ for (let i = 0; i < diffInDays; i++) {
7579
+ if (this.workCells[day + i]) {
7580
+ const startDate = new Date(this.dateRender[day + i].getTime());
7581
+ const endDate = addDays(this.dateRender[day + i], 1);
7582
+ const groupIndex = this.workCells[day + i].getAttribute('data-group-index');
7583
+ const filterEvents = this.getFilteredEvents(startDate, endDate, groupIndex);
7584
+ const renderedAppCount = this.getOverlapEvents(startDate, this.eventsRendered).length;
7585
+ const count = (filterEvents.length - renderedAppCount) <= 0 ? 1 : (filterEvents.length - renderedAppCount);
7586
+ const indicator = this.workCells[day + i].querySelector('.' + MORE_INDICATOR_CLASS);
7587
+ if (indicator) {
7588
+ indicator.innerHTML = this.getMoreIndicatorText(count);
7589
+ }
7590
+ else {
7591
+ const moreIndicatorElement = this.getMoreIndicatorElement(count, startDate, endDate);
7592
+ if (!isNullOrUndefined(groupIndex)) {
7593
+ moreIndicatorElement.setAttribute('data-group-index', groupIndex);
7583
7594
  }
7595
+ moreIndicatorElement.style.top = (this.cellHeight - this.monthHeaderHeight - this.moreIndicatorHeight) + 'px';
7596
+ moreIndicatorElement.style.width = this.cellWidth - 2 + 'px';
7597
+ this.renderElement(this.workCells[day + i], moreIndicatorElement);
7598
+ EventHandler.add(moreIndicatorElement, 'click', this.moreIndicatorClick, this);
7584
7599
  }
7585
7600
  }
7586
7601
  }
@@ -7697,7 +7712,7 @@ class MonthEvent extends EventBase {
7697
7712
  getMoreIndicatorElement(count, startDate, endDate) {
7698
7713
  const moreIndicatorElement = createElement('div', {
7699
7714
  className: MORE_INDICATOR_CLASS,
7700
- innerHTML: '+' + this.parent.globalize.formatNumber(count) + '&nbsp;' + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more')),
7715
+ innerHTML: this.getMoreIndicatorText(count),
7701
7716
  attrs: {
7702
7717
  'tabindex': '0',
7703
7718
  'data-start-date': startDate.getTime().toString(),
@@ -7707,6 +7722,9 @@ class MonthEvent extends EventBase {
7707
7722
  });
7708
7723
  return moreIndicatorElement;
7709
7724
  }
7725
+ getMoreIndicatorText(count) {
7726
+ return '+' + this.parent.globalize.formatNumber(count) + '&nbsp;' + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more'));
7727
+ }
7710
7728
  removeHeightProperty(selector) {
7711
7729
  const rows = [].slice.call(this.element.querySelectorAll('.' + selector + ' tbody tr'));
7712
7730
  for (const row of rows) {
@@ -7986,7 +8004,8 @@ class TimelineEvent extends MonthEvent {
7986
8004
  }
7987
8005
  }
7988
8006
  updateCellHeight(cell, height) {
7989
- if ((height > this.cellHeight)) {
8007
+ const cellHeight = cell.style.height === '' ? this.cellHeight : parseInt(cell.style.height, 10);
8008
+ if (height > cellHeight) {
7990
8009
  setStyleAttribute(cell, { 'height': height + 'px' });
7991
8010
  if (this.parent.activeViewOptions.group.resources.length > 0) {
7992
8011
  const resourceCell = this.parent.element.querySelector('.' + RESOURCE_COLUMN_TABLE_CLASS + ' ' + 'tbody td[data-group-index="' +
@@ -11730,7 +11749,8 @@ class EventWindow {
11730
11749
  return labelText;
11731
11750
  }
11732
11751
  onChange(args) {
11733
- const target = args.event.currentTarget.querySelector('input');
11752
+ const targetSelector = `.${EVENT_WINDOW_ALL_DAY_CLASS},.${TIME_ZONE_CLASS},.${EVENT_WINDOW_REPEAT_CLASS}`;
11753
+ const target = closest(args.event.target, targetSelector);
11734
11754
  if (target.classList.contains(EVENT_WINDOW_ALL_DAY_CLASS)) {
11735
11755
  this.onAllDayChange(args.checked);
11736
11756
  }
@@ -11894,7 +11914,8 @@ class EventWindow {
11894
11914
  }
11895
11915
  showDetails(eventData) {
11896
11916
  const eventObj = extend({}, eventData, null, true);
11897
- if (eventObj[this.fields.endTime].getHours() === 0 && eventObj[this.fields.endTime].getMinutes() === 0) {
11917
+ if ((!this.cellClickAction || this.cellClickAction && !isNullOrUndefined(this.parent.editorTemplate)) &&
11918
+ eventObj[this.fields.endTime].getHours() === 0 && eventObj[this.fields.endTime].getMinutes() === 0) {
11898
11919
  this.trimAllDay(eventObj);
11899
11920
  }
11900
11921
  this.eventData = eventObj;
@@ -13182,7 +13203,8 @@ class Render {
13182
13203
  this.parent.virtualScrollModule.destroy();
13183
13204
  this.parent.virtualScrollModule = null;
13184
13205
  }
13185
- if (this.parent.currentView.indexOf('Timeline') !== -1 && this.parent.currentView.indexOf('Year') === -1
13206
+ if (this.parent.currentView.indexOf('Timeline') !== -1 && (this.parent.currentView.indexOf('Year') === -1 ||
13207
+ (this.parent.currentView === 'TimelineYear' && this.parent.activeViewOptions.orientation === 'Vertical'))
13186
13208
  && this.parent.activeViewOptions.allowVirtualScrolling
13187
13209
  && this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
13188
13210
  this.parent.virtualScrollModule = new VirtualScroll(this.parent);
@@ -15728,6 +15750,7 @@ let Schedule = class Schedule extends Component {
15728
15750
  };
15729
15751
  this.trigger(navigating, navArgs, (navigationArgs) => {
15730
15752
  if (!navigationArgs.cancel) {
15753
+ this.uiStateValues.isInitial = ['TimelineMonth', 'TimelineYear', 'Year'].indexOf(view) > -1 ? true : this.uiStateValues.isInitial;
15731
15754
  this.viewIndex = navigationArgs.viewIndex;
15732
15755
  this.setProperties({ currentView: view }, true);
15733
15756
  if (this.headerModule) {
@@ -16346,6 +16369,9 @@ let Schedule = class Schedule extends Component {
16346
16369
  if (document.querySelectorAll(template).length) {
16347
16370
  return compile(document.querySelector(template).innerHTML.trim());
16348
16371
  }
16372
+ else {
16373
+ return compile(template);
16374
+ }
16349
16375
  }
16350
16376
  catch (error) {
16351
16377
  return compile(template);
@@ -19151,7 +19177,9 @@ class YearEvent extends TimelineEvent {
19151
19177
  this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
19152
19178
  const wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
19153
19179
  const resources = this.parent.uiStateValues.isGroupAdaptive ?
19154
- [this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]] : this.parent.resourceBase.lastResourceLevel;
19180
+ [this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]] :
19181
+ this.parent.activeViewOptions.allowVirtualScrolling ? this.parent.resourceBase.renderedResources :
19182
+ this.parent.resourceBase.lastResourceLevel;
19155
19183
  const months = this.getMonths();
19156
19184
  if (this.parent.activeViewOptions.orientation === 'Horizontal') {
19157
19185
  for (let month = 0; month < months.length; month++) {
@@ -21930,8 +21958,9 @@ class VerticalView extends ViewBase {
21930
21958
  const msStartHour = startHour.getTime();
21931
21959
  const msEndHour = endHour.getTime();
21932
21960
  if (msStartHour !== msEndHour) {
21961
+ const duration = this.parent.activeViewOptions.timeScale.interval / this.parent.activeViewOptions.timeScale.slotCount;
21933
21962
  length = (Math.abs(msEndHour - msStartHour) / msInterval) - ((new Date(msEndHour).getTimezoneOffset()
21934
- - new Date(msStartHour).getTimezoneOffset()) / (60 / this.parent.activeViewOptions.timeScale.slotCount));
21963
+ - new Date(msStartHour).getTimezoneOffset()) / duration);
21935
21964
  }
21936
21965
  if (!this.parent.activeViewOptions.timeScale.enable) {
21937
21966
  length = 1;
@@ -22106,6 +22135,8 @@ class Month extends ViewBase {
22106
22135
  this.parent.notify(virtualScroll, e);
22107
22136
  this.scrollTopPanel(e.target);
22108
22137
  this.scrollLeftPanel(e.target);
22138
+ this.parent.uiStateValues.top = e.target.scrollTop;
22139
+ this.parent.uiStateValues.left = e.target.scrollLeft;
22109
22140
  this.setPersistence();
22110
22141
  }
22111
22142
  scrollLeftPanel(target) {
@@ -22138,26 +22169,41 @@ class Month extends ViewBase {
22138
22169
  header.style[args.cssProperties.padding] = '';
22139
22170
  }
22140
22171
  this.setColWidth(content);
22141
- if (args.scrollPosition) {
22172
+ if (args.scrollPosition || !args.isPreventScrollUpdate && this.parent.currentView === 'TimelineMonth') {
22173
+ const top = this.parent.currentView === 'TimelineMonth' ? this.parent.uiStateValues.top : args.scrollPosition.top;
22142
22174
  if (leftPanel) {
22143
- leftPanel.scrollTop = args.scrollPosition.top;
22175
+ leftPanel.scrollTop = top;
22144
22176
  }
22145
- content.scrollTop = args.scrollPosition.top;
22146
- content.scrollLeft = args.scrollPosition.left;
22147
- }
22148
- else {
22149
- const headerCell = this.element.querySelector('.' + HEADER_CELLS_CLASS + '[data-date="'
22150
- + this.parent.selectedDate.getTime().toString() + '"]');
22151
- if (!isNullOrUndefined(headerCell)) {
22152
- content.scrollLeft = !this.parent.enableRtl ?
22153
- headerCell.offsetLeft : -(this.parent.getContentTable().offsetWidth - headerCell.offsetLeft - headerCell.offsetWidth);
22177
+ content.scrollTop = top;
22178
+ if (this.parent.uiStateValues.isInitial) {
22179
+ this.scrollToSelectedDate();
22180
+ this.parent.uiStateValues.isInitial = false;
22154
22181
  }
22155
22182
  else {
22156
- content.scrollLeft = 0;
22183
+ content.scrollLeft = this.parent.currentView === 'TimelineMonth' ? this.parent.uiStateValues.left :
22184
+ args.scrollPosition.left;
22157
22185
  }
22158
22186
  }
22187
+ else {
22188
+ this.scrollToSelectedDate();
22189
+ }
22159
22190
  this.retainScrollPosition();
22160
22191
  }
22192
+ scrollToSelectedDate() {
22193
+ const headerCell = this.element.querySelector('.' + HEADER_CELLS_CLASS + '[data-date="'
22194
+ + this.parent.selectedDate.getTime().toString() + '"]');
22195
+ const content = this.getContentAreaElement();
22196
+ if (!isNullOrUndefined(headerCell)) {
22197
+ content.scrollLeft = !this.parent.enableRtl ?
22198
+ headerCell.offsetLeft : -(this.parent.getContentTable().offsetWidth - headerCell.offsetLeft - headerCell.offsetWidth);
22199
+ }
22200
+ else {
22201
+ content.scrollLeft = 0;
22202
+ }
22203
+ if (content.scrollLeft === 0 && this.parent.uiStateValues.isInitial) {
22204
+ this.parent.uiStateValues.left = 0;
22205
+ }
22206
+ }
22161
22207
  setContentHeight(content, leftPanelElement, height) {
22162
22208
  content.style.height = 'auto';
22163
22209
  if (this.parent.currentView === 'Month') {
@@ -22712,6 +22758,9 @@ class Year extends ViewBase {
22712
22758
  const viewTypeClass = this.parent.activeViewOptions.orientation === 'Horizontal' ? 'e-horizontal' : 'e-vertical';
22713
22759
  addClass([this.element], [this.viewClass, viewTypeClass, className]);
22714
22760
  this.renderPanel(className);
22761
+ if (this.parent.activeViewOptions.allowVirtualScrolling) {
22762
+ addClass([this.element], [VIRTUAL_SCROLL_CLASS]);
22763
+ }
22715
22764
  const calendarTable = this.createTableLayout(OUTER_TABLE_CLASS);
22716
22765
  this.element.appendChild(calendarTable);
22717
22766
  this.element.querySelector('table').setAttribute('role', 'presentation');
@@ -22924,6 +22973,7 @@ class Year extends ViewBase {
22924
22973
  onContentScroll(e) {
22925
22974
  const target = e.target;
22926
22975
  const headerWrapper = this.getDatesHeaderElement();
22976
+ this.parent.notify(virtualScroll, e);
22927
22977
  if (headerWrapper) {
22928
22978
  headerWrapper.firstElementChild.scrollLeft = target.scrollLeft;
22929
22979
  }
@@ -22932,6 +22982,10 @@ class Year extends ViewBase {
22932
22982
  if (scrollTopElement) {
22933
22983
  scrollTopElement.scrollTop = target.scrollTop;
22934
22984
  }
22985
+ if (!this.parent.isAdaptive) {
22986
+ this.parent.uiStateValues.top = e.target.scrollTop;
22987
+ }
22988
+ this.parent.uiStateValues.left = e.target.scrollLeft;
22935
22989
  this.setPersistence();
22936
22990
  }
22937
22991
  onScrollUiUpdate(args) {
@@ -22962,6 +23016,18 @@ class Year extends ViewBase {
22962
23016
  const isYScroll = contentWrapper.scrollWidth > contentWrapper.clientWidth;
22963
23017
  leftPanelElement.style.height = formatUnit(height - (isYScroll ? 17 : 0));
22964
23018
  }
23019
+ if (!args.isPreventScrollUpdate) {
23020
+ if (this.parent.uiStateValues.isInitial) {
23021
+ this.parent.uiStateValues.isInitial = false;
23022
+ }
23023
+ else {
23024
+ if (leftPanelElement) {
23025
+ leftPanelElement.scrollTop = this.parent.uiStateValues.top;
23026
+ }
23027
+ contentWrapper.scrollTop = this.parent.uiStateValues.top;
23028
+ contentWrapper.scrollLeft = this.parent.uiStateValues.left;
23029
+ }
23030
+ }
22965
23031
  this.retainScrollPosition();
22966
23032
  }
22967
23033
  getStartDate() {
@@ -23064,7 +23130,7 @@ class AgendaBase extends ViewBase {
23064
23130
  moduleName: 'agenda',
23065
23131
  listClass: this.parent.activeView.viewClass,
23066
23132
  itemClass: this.parent.activeView.viewClass,
23067
- template: '<div class=' + AGENDA_NO_EVENT_CLASS + '>${subject}</div>'
23133
+ template: `<div class="${AGENDA_NO_EVENT_CLASS}">${this.parent.localeObj.getConstant('noEvents')}</div>`
23068
23134
  });
23069
23135
  }
23070
23136
  else {
@@ -24608,7 +24674,7 @@ class TimelineYear extends Year {
24608
24674
  !this.parent.uiStateValues.isGroupAdaptive) {
24609
24675
  tdCollection.push(firstTd);
24610
24676
  firstTd.appendChild(this.parent.resourceBase.createResourceColumn());
24611
- this.rowCount = this.parent.resourceBase.lastResourceLevel.length;
24677
+ this.rowCount = this.parent.resourceBase.renderedResources.length;
24612
24678
  }
24613
24679
  else {
24614
24680
  tdCollection.push(firstTd);
@@ -24625,6 +24691,9 @@ class TimelineYear extends Year {
24625
24691
  content.appendChild(contentTable);
24626
24692
  const eventWrapper = createElement('div', { className: EVENT_TABLE_CLASS });
24627
24693
  content.appendChild(eventWrapper);
24694
+ if (this.parent.virtualScrollModule) {
24695
+ this.parent.virtualScrollModule.renderVirtualTrack(content);
24696
+ }
24628
24697
  const contentTBody = contentTable.querySelector('tbody');
24629
24698
  if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
24630
24699
  if (this.parent.rowAutoHeight) {
@@ -24742,6 +24811,47 @@ class TimelineYear extends Year {
24742
24811
  }
24743
24812
  }
24744
24813
  }
24814
+ getContentRows() {
24815
+ const tRow = [];
24816
+ const monthCells = this.getMonths();
24817
+ for (let row = 0; row < this.parent.resourceBase.renderedResources.length; row++) {
24818
+ const tr = createElement('tr', { attrs: { 'role': 'row' } });
24819
+ tRow.push(tr);
24820
+ let resData;
24821
+ if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
24822
+ resData = this.parent.resourceBase.renderedResources[row];
24823
+ }
24824
+ let monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[row], 1);
24825
+ let date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
24826
+ for (let month = 0; month < this.columnCount; month++) {
24827
+ let classList$$1 = [];
24828
+ const groupIndex = resData.groupIndex;
24829
+ classList$$1 = classList$$1.concat(resData.className);
24830
+ if (classList$$1.indexOf(RESOURCE_PARENT_CLASS) > -1) {
24831
+ classList$$1.push(RESOURCE_GROUP_CELLS_CLASS);
24832
+ }
24833
+ else {
24834
+ classList$$1.push(WORKDAY_CLASS);
24835
+ }
24836
+ monthDate = new Date(this.parent.selectedDate.getFullYear(), monthCells[month], 1);
24837
+ date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
24838
+ const tdELe = createElement('td', {
24839
+ className: WORK_CELLS_CLASS,
24840
+ attrs: {
24841
+ 'role': 'gridcell', 'aria-selected': 'false',
24842
+ 'data-date': date.getTime().toString()
24843
+ }
24844
+ });
24845
+ addClass([tdELe], classList$$1);
24846
+ tdELe.setAttribute('data-group-index', groupIndex.toString());
24847
+ this.renderCellTemplate({ date: date, type: 'resourceGroupCells', groupIndex: groupIndex }, tdELe);
24848
+ this.wireEvents(tdELe, 'cell');
24849
+ this.parent.trigger(renderCell, { elementType: 'resourceGroupCells', element: tdELe, date: date });
24850
+ tr.appendChild(tdELe);
24851
+ }
24852
+ }
24853
+ return tRow;
24854
+ }
24745
24855
  renderResourceContent(wrapper, monthBody, contentBody) {
24746
24856
  const months = this.getMonths();
24747
24857
  for (let row = 0; row < this.rowCount; row++) {
@@ -24749,8 +24859,8 @@ class TimelineYear extends Year {
24749
24859
  const tr = createElement('tr', { attrs: { 'role': 'row' } });
24750
24860
  contentBody.appendChild(tr);
24751
24861
  let resData;
24752
- if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
24753
- resData = this.parent.resourceBase.lastResourceLevel[row];
24862
+ if (this.parent.activeViewOptions.orientation === 'Vertical' && this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
24863
+ resData = this.parent.resourceBase.renderedResources[row];
24754
24864
  }
24755
24865
  let monthDate = new Date(this.parent.selectedDate.getFullYear(), months[row], 1);
24756
24866
  let date = this.parent.calendarUtil.getMonthStartDate(new Date(monthDate.getTime()));
@@ -24771,8 +24881,9 @@ class TimelineYear extends Year {
24771
24881
  }
24772
24882
  for (let month = 0; month < this.columnCount; month++) {
24773
24883
  let classList$$1 = [];
24774
- let groupIndex = row;
24884
+ let groupIndex;
24775
24885
  if (this.parent.activeViewOptions.orientation === 'Vertical') {
24886
+ groupIndex = resData.groupIndex;
24776
24887
  classList$$1 = classList$$1.concat(resData.className);
24777
24888
  if (classList$$1.indexOf(RESOURCE_PARENT_CLASS) > -1) {
24778
24889
  classList$$1.push(RESOURCE_GROUP_CELLS_CLASS);