@syncfusion/ej2-schedule 25.1.35 → 25.1.39

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 (72) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/ej2-schedule.min.js +2 -2
  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 +183 -44
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +192 -45
  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 +12 -12
  13. package/src/recurrence-editor/recurrence-editor.js +1 -2
  14. package/src/schedule/actions/crud.js +3 -0
  15. package/src/schedule/actions/virtual-scroll.d.ts +2 -0
  16. package/src/schedule/actions/virtual-scroll.js +24 -1
  17. package/src/schedule/base/css-constant.d.ts +4 -0
  18. package/src/schedule/base/css-constant.js +4 -0
  19. package/src/schedule/base/interface.d.ts +1 -0
  20. package/src/schedule/base/resource.js +1 -0
  21. package/src/schedule/base/schedule.d.ts +1 -0
  22. package/src/schedule/base/schedule.js +20 -4
  23. package/src/schedule/base/type.d.ts +1 -0
  24. package/src/schedule/event-renderer/agenda-base.d.ts +1 -1
  25. package/src/schedule/event-renderer/agenda-base.js +36 -14
  26. package/src/schedule/event-renderer/event-base.js +4 -2
  27. package/src/schedule/event-renderer/month.js +1 -2
  28. package/src/schedule/event-renderer/timeline-view.js +17 -5
  29. package/src/schedule/event-renderer/vertical-view.js +18 -2
  30. package/src/schedule/popups/quick-popups.js +3 -1
  31. package/src/schedule/renderer/agenda.d.ts +1 -0
  32. package/src/schedule/renderer/agenda.js +38 -9
  33. package/src/schedule/renderer/header-renderer.js +3 -2
  34. package/src/schedule/renderer/renderer.js +1 -0
  35. package/src/schedule/renderer/timeline-year.js +4 -1
  36. package/src/schedule/renderer/vertical-view.js +14 -0
  37. package/src/schedule/renderer/view-base.js +1 -1
  38. package/styles/bootstrap-dark.css +11 -1
  39. package/styles/bootstrap.css +11 -1
  40. package/styles/bootstrap4.css +11 -1
  41. package/styles/bootstrap5-dark.css +11 -1
  42. package/styles/bootstrap5.css +11 -1
  43. package/styles/fabric-dark.css +11 -1
  44. package/styles/fabric.css +11 -1
  45. package/styles/fluent-dark.css +12 -2
  46. package/styles/fluent.css +12 -2
  47. package/styles/highcontrast-light.css +11 -1
  48. package/styles/highcontrast.css +11 -1
  49. package/styles/material-dark.css +20 -1
  50. package/styles/material.css +20 -1
  51. package/styles/material3-dark.css +11 -1
  52. package/styles/material3.css +11 -1
  53. package/styles/schedule/_layout.scss +22 -1
  54. package/styles/schedule/bootstrap-dark.css +11 -1
  55. package/styles/schedule/bootstrap.css +11 -1
  56. package/styles/schedule/bootstrap4.css +11 -1
  57. package/styles/schedule/bootstrap5-dark.css +11 -1
  58. package/styles/schedule/bootstrap5.css +11 -1
  59. package/styles/schedule/fabric-dark.css +11 -1
  60. package/styles/schedule/fabric.css +11 -1
  61. package/styles/schedule/fluent-dark.css +12 -2
  62. package/styles/schedule/fluent.css +12 -2
  63. package/styles/schedule/highcontrast-light.css +11 -1
  64. package/styles/schedule/highcontrast.css +11 -1
  65. package/styles/schedule/material-dark.css +20 -1
  66. package/styles/schedule/material.css +20 -1
  67. package/styles/schedule/material3-dark.css +11 -1
  68. package/styles/schedule/material3.css +11 -1
  69. package/styles/schedule/tailwind-dark.css +11 -1
  70. package/styles/schedule/tailwind.css +11 -1
  71. package/styles/tailwind-dark.css +11 -1
  72. package/styles/tailwind.css +11 -1
@@ -557,6 +557,8 @@ const RTL = 'e-rtl';
557
557
  /** @private */
558
558
  const DEVICE_CLASS = 'e-device';
559
559
  /** @private */
560
+ const ADAPTIVE_CLASS = 'e-adaptive';
561
+ /** @private */
560
562
  const MULTI_DRAG = 'e-multi-drag';
561
563
  /** @private */
562
564
  const ICON = 'e-icons';
@@ -671,6 +673,8 @@ const TIMELINE_WRAPPER_CLASS = 'e-timeline-wrapper';
671
673
  /** @private */
672
674
  const APPOINTMENT_WRAPPER_CLASS = 'e-appointment-wrapper';
673
675
  /** @private */
676
+ const APPOINTMENT_WRAPPER_HIDDEN_CLASS = 'e-appointment-wrapper-hidden';
677
+ /** @private */
674
678
  const DAY_WRAPPER_CLASS = 'e-day-wrapper';
675
679
  /** @private */
676
680
  const TOOLBAR_CONTAINER = 'e-schedule-toolbar-container';
@@ -1082,6 +1086,7 @@ class HeaderRenderer {
1082
1086
  });
1083
1087
  this.toolbarObj.root = this.parent.root ? this.parent.root : this.parent;
1084
1088
  this.toolbarObj.appendTo(this.parent.element.querySelector('.' + HEADER_TOOLBAR));
1089
+ this.toolbarObj.element.setAttribute('aria-label', 'Scheduler');
1085
1090
  const prevNavEle = this.toolbarObj.element.querySelector('.e-prev');
1086
1091
  if (prevNavEle) {
1087
1092
  prevNavEle.firstElementChild.setAttribute('title', this.l10n.getConstant('previous'));
@@ -1267,7 +1272,7 @@ class HeaderRenderer {
1267
1272
  switch (item.name) {
1268
1273
  case 'Today':
1269
1274
  tbItem = {
1270
- showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-day',
1275
+ showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-today',
1271
1276
  text: this.l10n.getConstant('today'), cssClass: 'e-today', overflow: 'Show'
1272
1277
  };
1273
1278
  tbItem.align = propItem.align ? propItem.align : item.align;
@@ -1353,7 +1358,7 @@ class HeaderRenderer {
1353
1358
  }
1354
1359
  else {
1355
1360
  items.push({
1356
- align: 'Right', showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-day',
1361
+ align: 'Right', showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-today',
1357
1362
  text: this.l10n.getConstant('today'), cssClass: 'e-today', overflow: 'Show'
1358
1363
  });
1359
1364
  if (this.parent.views.length > 1) {
@@ -6629,11 +6634,13 @@ class EventBase {
6629
6634
  createEventWrapper(type = '', index = 0) {
6630
6635
  const tr = createElement('tr');
6631
6636
  const levels = this.parent.activeView.colLevels.slice(-1)[0];
6637
+ const className = this.parent.isReact && this.parent.activeViewOptions.eventTemplate ?
6638
+ ' ' + APPOINTMENT_WRAPPER_HIDDEN_CLASS : '';
6632
6639
  for (let i = 0, len = levels.length; i < len; i++) {
6633
6640
  const col = levels[parseInt(i.toString(), 10)];
6634
6641
  const appointmentWrap = createElement('td', {
6635
- className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS : (type === 'timeIndicator') ?
6636
- TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS, attrs: { 'data-date': col.date.getTime().toString() }
6642
+ className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS + className : (type === 'timeIndicator') ?
6643
+ TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS + className, attrs: { 'data-date': col.date.getTime().toString() }
6637
6644
  });
6638
6645
  if (!isNullOrUndefined(col.groupIndex)) {
6639
6646
  appointmentWrap.setAttribute('data-group-index', col.groupIndex.toString());
@@ -6747,6 +6754,14 @@ class VerticalEvent extends EventBase {
6747
6754
  const wrapperElements = [].slice.call(this.parent.element.querySelectorAll('.' + BLOCK_APPOINTMENT_CLASS +
6748
6755
  ',.' + APPOINTMENT_CLASS + ',.' + ROW_COUNT_WRAPPER_CLASS));
6749
6756
  const isDragging = (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) ? true : false;
6757
+ const hideWrapper = (wrapper) => {
6758
+ if (this.parent.isReact && !isNullOrUndefined(this.parent.activeViewOptions.eventTemplate)) {
6759
+ const appWrapper = closest(wrapper, '.' + DAY_WRAPPER_CLASS + ',.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS);
6760
+ if (appWrapper && !appWrapper.classList.contains(APPOINTMENT_WRAPPER_HIDDEN_CLASS)) {
6761
+ addClass([appWrapper], APPOINTMENT_WRAPPER_HIDDEN_CLASS);
6762
+ }
6763
+ }
6764
+ };
6750
6765
  for (const wrapper of wrapperElements) {
6751
6766
  if (isDragging && !(wrapper.classList.contains(ALLDAY_APPOINTMENT_CLASS) ||
6752
6767
  wrapper.classList.contains(ROW_COUNT_WRAPPER_CLASS))) {
@@ -6754,11 +6769,13 @@ class VerticalEvent extends EventBase {
6754
6769
  for (let j = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; j < len; j++) {
6755
6770
  if (groupIndex === this.parent.crudModule.crudObj.sourceEvent[parseInt(j.toString(), 10)].groupIndex ||
6756
6771
  groupIndex === this.parent.crudModule.crudObj.targetEvent[parseInt(j.toString(), 10)].groupIndex) {
6772
+ hideWrapper(wrapper);
6757
6773
  remove(wrapper);
6758
6774
  }
6759
6775
  }
6760
6776
  }
6761
6777
  else {
6778
+ hideWrapper(wrapper);
6762
6779
  remove(wrapper);
6763
6780
  }
6764
6781
  }
@@ -6793,7 +6810,12 @@ class VerticalEvent extends EventBase {
6793
6810
  if (isDragging) {
6794
6811
  this.parent.crudModule.crudObj.isCrudAction = false;
6795
6812
  }
6796
- this.parent.renderTemplates();
6813
+ this.parent.renderTemplates(() => {
6814
+ if (this.parent.isReact && this.parent.activeViewOptions.eventTemplate) {
6815
+ const wraps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_WRAPPER_HIDDEN_CLASS));
6816
+ removeClass(wraps, APPOINTMENT_WRAPPER_HIDDEN_CLASS);
6817
+ }
6818
+ });
6797
6819
  }
6798
6820
  initializeValues() {
6799
6821
  this.resources = (this.parent.activeViewOptions.group.resources.length > 0) ? this.parent.uiStateValues.isGroupAdaptive ?
@@ -8165,8 +8187,7 @@ class MonthEvent extends EventBase {
8165
8187
  attrs: {
8166
8188
  'role': 'button',
8167
8189
  'tabindex': '0',
8168
- 'aria-label': this.parent.globalize.formatNumber(count) + '&nbsp;'
8169
- + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more')),
8190
+ 'aria-label': this.parent.globalize.formatNumber(count) + ' ' + this.parent.localeObj.getConstant('moreEvents'),
8170
8191
  'data-count': count.toString(),
8171
8192
  'data-start-date': startDate.getTime().toString(),
8172
8193
  'data-end-date': endDate.getTime().toString()
@@ -8273,8 +8294,16 @@ class TimelineEvent extends MonthEvent {
8273
8294
  const appointments = [];
8274
8295
  for (const app of appointmentsCollection) {
8275
8296
  if (this.renderType === 'day') {
8276
- if ((resetTime(app[this.fields.startTime]).getTime() <= resetTime(new Date(startDate.getTime())).getTime()) &&
8277
- (resetTime(app[this.fields.endTime]).getTime() >= resetTime(new Date(startDate.getTime())).getTime())) {
8297
+ const start = resetTime(startDate).getTime();
8298
+ const end = resetTime(endDate).getTime();
8299
+ const appStart = resetTime(app[this.fields.startTime]).getTime();
8300
+ const appEnd = resetTime(app[this.fields.endTime]).getTime();
8301
+ const isEndOverlap = () => {
8302
+ let endTime = (end - (getDateInMs(endDate) <= 0 ? MS_PER_DAY : 0));
8303
+ endTime = start > endTime ? start : endTime;
8304
+ return appEnd >= endTime && appStart <= endTime;
8305
+ };
8306
+ if (appStart <= start && appEnd >= start || isEndOverlap() || appStart > start && appEnd < end) {
8278
8307
  appointments.push(app);
8279
8308
  }
8280
8309
  }
@@ -9147,7 +9176,7 @@ class QuickPopups {
9147
9176
  renderMorePopup() {
9148
9177
  const moreEventPopup = `<div class="${MORE_EVENT_POPUP_CLASS}"><div class="${MORE_EVENT_HEADER_CLASS}">` +
9149
9178
  `<div class="${MORE_EVENT_CLOSE_CLASS}" title="${this.l10n.getConstant('close')}" tabindex="0" role="button"></div>` +
9150
- `<div class="${MORE_EVENT_DATE_HEADER_CLASS}"><div class="${MORE_EVENT_HEADER_DAY_CLASS}"></div>` +
9179
+ `<div class="${MORE_EVENT_DATE_HEADER_CLASS}"><div class="${MORE_EVENT_HEADER_DAY_CLASS}" id="${this.parent.element.id}_more_popup"></div>` +
9151
9180
  `<div class="${MORE_EVENT_HEADER_DATE_CLASS} ${NAVIGATE_CLASS}" tabindex="0" role="link"></div></div></div></div>`;
9152
9181
  const moreEventWrapper = createElement('div', {
9153
9182
  className: MORE_POPUP_WRAPPER_CLASS + ' e-popup-close',
@@ -9172,6 +9201,8 @@ class QuickPopups {
9172
9201
  viewPortElement: (this.parent.isAdaptive ? document.body : this.parent.element),
9173
9202
  zIndex: (this.parent.isAdaptive ? 1002 : 2)
9174
9203
  });
9204
+ this.morePopup.element.setAttribute('role', 'dialog');
9205
+ this.morePopup.element.setAttribute('aria-labelledby', this.parent.element.id + '_more_popup');
9175
9206
  const closeButton = this.morePopup.element.querySelector('.' + MORE_EVENT_CLOSE_CLASS);
9176
9207
  this.renderButton('e-round', ICON + ' ' + CLOSE_ICON_CLASS, false, closeButton, this.closeClick);
9177
9208
  EventHandler.add(this.morePopup.element.querySelector('.' + MORE_EVENT_HEADER_DATE_CLASS), 'click', this.navigationClick, this);
@@ -11324,7 +11355,6 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
11324
11355
  setTemplate() {
11325
11356
  const dayData = this.getDayData('narrow');
11326
11357
  const fullDay = this.getDayData('wide');
11327
- const labelId = this.element.id + '_' + 'end_label';
11328
11358
  this.element.innerHTML = '<div class="' + HEADER + '">' +
11329
11359
  '<div class="' + INPUTWARAPPER + ' ' + FORMLEFT + '">' +
11330
11360
  '<input type="text" tabindex="0" class="' + REPEATELEMENT +
@@ -11371,7 +11401,7 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
11371
11401
  '</div></div>' +
11372
11402
  '<div class="' + INPUTWARAPPERSIDE + ' ' + ENDON + ' ' + FORMRIGHT + '">' +
11373
11403
  '<div class="' + INPUTWARAPPER + ' ' + ENDONLEFT + '">' +
11374
- '<input type="text" tabindex="0" class="' + ENDONELEMENT + '" aria-labelledby="' + labelId + '"title="' + this.localeObj.getConstant(END) + '" />' +
11404
+ '<input type="text" tabindex="0" class="' + ENDONELEMENT + '"title="' + this.localeObj.getConstant(END) + '" />' +
11375
11405
  '</div>' +
11376
11406
  '<div class="' + INPUTWARAPPER + ' ' + ENDONDATE + '" >' +
11377
11407
  '<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
@@ -13790,6 +13820,27 @@ class VirtualScroll {
13790
13820
  this.itemSize = getElementHeightFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
13791
13821
  }
13792
13822
  }
13823
+ refreshLayout() {
13824
+ const initialHeight = this.parent.uiStateValues.scheduleHeight;
13825
+ this.parent.uiStateValues.scheduleHeight = this.parent.element.offsetHeight;
13826
+ const preRenderedLength = this.renderedLength;
13827
+ if (this.parent.uiStateValues.scheduleHeight !== initialHeight) {
13828
+ if (preRenderedLength < this.getRenderedCount()) {
13829
+ this.isRemoteRefresh = true;
13830
+ }
13831
+ const resWrap = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
13832
+ const conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
13833
+ const eventWrap = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
13834
+ let firstTDIndex = parseInt(resWrap.querySelector('tbody td').getAttribute('data-group-index'), 10);
13835
+ const endIndex = (firstTDIndex + this.renderedLength);
13836
+ firstTDIndex = (endIndex > this.parent.resourceBase.expandedResources.length) ?
13837
+ (this.parent.resourceBase.expandedResources.length - this.renderedLength) : firstTDIndex;
13838
+ this.parent.resourceBase.renderedResources = this.parent.resourceBase.expandedResources.slice(firstTDIndex, endIndex);
13839
+ if (this.parent.resourceBase.renderedResources.length > 0) {
13840
+ this.updateContent(resWrap, conWrap, eventWrap, this.parent.resourceBase.renderedResources);
13841
+ }
13842
+ }
13843
+ }
13793
13844
  renderEvents() {
13794
13845
  this.setTabIndex();
13795
13846
  const dynamicData = this.triggerScrollEvent(virtualScrollStop);
@@ -13824,7 +13875,9 @@ class VirtualScroll {
13824
13875
  const eventWrap = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
13825
13876
  const timeIndicator = this.parent.element.querySelector('.' + CURRENT_TIMELINE_CLASS);
13826
13877
  const conTable = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS);
13827
- addClass([conWrap], 'e-transition');
13878
+ if (!this.parent.rowAutoHeight) {
13879
+ addClass([conWrap, resWrap], 'e-transition');
13880
+ }
13828
13881
  this.renderedLength = resWrap.querySelector('tbody').children.length;
13829
13882
  const firstTDIndex = parseInt(resWrap.querySelector('tbody td').getAttribute('data-group-index'), 10);
13830
13883
  const scrollHeight = this.parent.rowAutoHeight ?
@@ -14218,6 +14271,7 @@ class Render {
14218
14271
  }
14219
14272
  throw Error('Inject required modules');
14220
14273
  }
14274
+ this.parent.uiStateValues.scheduleHeight = this.parent.element.offsetHeight;
14221
14275
  this.parent.activeView.viewIndex = this.parent.viewIndex;
14222
14276
  this.updateLabelText(viewName);
14223
14277
  this.parent.activeView.addEventListener();
@@ -14407,6 +14461,9 @@ class Crud {
14407
14461
  return;
14408
14462
  }
14409
14463
  this.parent.trigger(dataBinding, e, (args) => {
14464
+ if (args.cancel) {
14465
+ return;
14466
+ }
14410
14467
  const resultData = extend([], args.result, null, true);
14411
14468
  this.parent.eventsData = resultData.filter((data) => !data[this.parent.eventFields.isBlock]);
14412
14469
  this.parent.blockData = resultData.filter((data) => data[this.parent.eventFields.isBlock]);
@@ -15903,6 +15960,7 @@ class ResourceBase {
15903
15960
  args = {
15904
15961
  cancel: false, event: (event) ? event.event : null, groupIndex: this.parent.uiStateValues.groupIndex, requestType: 'resourceChanged'
15905
15962
  };
15963
+ this.parent.adaptiveGroupIndex = this.parent.uiStateValues.groupIndex;
15906
15964
  this.parent.trigger(actionComplete, args);
15907
15965
  }
15908
15966
  });
@@ -16559,6 +16617,7 @@ let Schedule = class Schedule extends Component {
16559
16617
  */
16560
16618
  constructor(options, element) {
16561
16619
  super(options, element);
16620
+ this.adaptiveGroupIndex = 0;
16562
16621
  }
16563
16622
  /**
16564
16623
  * Core method that initializes the control rendering.
@@ -16582,6 +16641,12 @@ let Schedule = class Schedule extends Component {
16582
16641
  else {
16583
16642
  removeClasses.push(DEVICE_CLASS);
16584
16643
  }
16644
+ if (this.enableAdaptiveUI) {
16645
+ addClasses.push(ADAPTIVE_CLASS);
16646
+ }
16647
+ else {
16648
+ removeClasses.push(ADAPTIVE_CLASS);
16649
+ }
16585
16650
  if (this.allowMultiDrag) {
16586
16651
  addClasses.push(MULTI_DRAG);
16587
16652
  }
@@ -17183,7 +17248,7 @@ let Schedule = class Schedule extends Component {
17183
17248
  if (this && isNullOrUndefined(this.uiStateValues) || !(this.enablePersistence)) {
17184
17249
  this.uiStateValues = {
17185
17250
  expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
17186
- isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
17251
+ isIgnoreOccurrence: false, groupIndex: this.adaptiveGroupIndex, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
17187
17252
  };
17188
17253
  }
17189
17254
  this.currentTimezoneDate = this.getCurrentTime();
@@ -17675,6 +17740,9 @@ let Schedule = class Schedule extends Component {
17675
17740
  && document.activeElement.classList.contains(SUBJECT_CLASS))) {
17676
17741
  return;
17677
17742
  }
17743
+ if (this.virtualScrollModule && this.activeView.isTimelineView()) {
17744
+ this.virtualScrollModule.refreshLayout();
17745
+ }
17678
17746
  if (this.activeViewOptions.timeScale.enable && this.activeView) {
17679
17747
  this.activeView.highlightCurrentTime();
17680
17748
  }
@@ -17686,7 +17754,12 @@ let Schedule = class Schedule extends Component {
17686
17754
  && !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {
17687
17755
  this.activeView.resetColWidth();
17688
17756
  this.notify(scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });
17689
- this.refreshEvents(false);
17757
+ let isRemoteRefresh = false;
17758
+ if (this.activeViewOptions.enableLazyLoading && this.virtualScrollModule && this.virtualScrollModule.isRemoteRefresh) {
17759
+ isRemoteRefresh = this.virtualScrollModule.isRemoteRefresh;
17760
+ this.virtualScrollModule.isRemoteRefresh = false;
17761
+ }
17762
+ this.refreshEvents(isRemoteRefresh);
17690
17763
  }
17691
17764
  else {
17692
17765
  this.notify(contentReady, {});
@@ -17869,7 +17942,7 @@ let Schedule = class Schedule extends Component {
17869
17942
  * @private
17870
17943
  */
17871
17944
  getPersistData() {
17872
- return this.addOnPersist(['currentView', 'selectedDate', 'scrollTop', 'scrollLeft']);
17945
+ return this.addOnPersist(['currentView', 'selectedDate', 'scrollTop', 'scrollLeft', 'adaptiveGroupIndex']);
17873
17946
  }
17874
17947
  /**
17875
17948
  * Called internally, if any of the property value changed.
@@ -22870,7 +22943,7 @@ class ViewBase {
22870
22943
  const colWidth = (getElementWidth(contentBody) / (colElements.length / 2));
22871
22944
  if (content.offsetHeight !== content.clientHeight) {
22872
22945
  const resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
22873
- if (!isNullOrUndefined(resourceColumn)) {
22946
+ if (!isNullOrUndefined(resourceColumn) && resourceColumn.offsetHeight !== content.clientHeight) {
22874
22947
  setStyleAttribute(resourceColumn, { 'height': formatUnit(content.clientHeight) });
22875
22948
  }
22876
22949
  }
@@ -23687,6 +23760,20 @@ class VerticalView extends ViewBase {
23687
23760
  append(tooltipTemplate, ntd);
23688
23761
  }
23689
23762
  ntd.setAttribute('data-date', cellDate.getTime().toString());
23763
+ const skeleton = 'full';
23764
+ if (!this.parent.activeViewOptions.timeScale.enable) {
23765
+ const announcementText = this.parent.globalize.formatDate(tdData.date, { skeleton: skeleton, calendar: this.parent.getCalendarMode() });
23766
+ ntd.setAttribute('aria-label', announcementText);
23767
+ }
23768
+ else {
23769
+ const startDateText = this.parent.globalize.formatDate(cellDate, {
23770
+ type: 'dateTime', skeleton: skeleton, calendar: this.parent.getCalendarMode()
23771
+ });
23772
+ const endDateText = this.parent.globalize.formatDate(this.getEndDateFromStartDate(cellDate), {
23773
+ type: 'dateTime', skeleton: skeleton, calendar: this.parent.getCalendarMode()
23774
+ });
23775
+ ntd.setAttribute('aria-label', startDateText + ' ' + this.parent.localeObj.getConstant('endAt') + ' ' + endDateText);
23776
+ }
23690
23777
  if (!isNullOrUndefined(tdData.groupIndex) || this.parent.uiStateValues.isGroupAdaptive) {
23691
23778
  const groupIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex :
23692
23779
  tdData.groupIndex;
@@ -25134,23 +25221,40 @@ class AgendaBase extends ViewBase {
25134
25221
  EventHandler.add(element, 'click', this.parent.agendaModule.dayNavigationClick, this);
25135
25222
  }
25136
25223
  }
25137
- calculateResourceTableElement(tBody, noOfDays, agendaDate) {
25224
+ calculateResourceTableElement(tBody, noOfDays, agendaDate, agendaEnd = null) {
25138
25225
  if (isNullOrUndefined(this.parent.resourceBase.lastResourceLevel)) {
25139
25226
  const level = this.getDateSlots(this.renderDates, this.parent.activeViewOptions.workDays);
25140
25227
  this.parent.resourceBase.generateResourceLevels(level);
25141
25228
  }
25142
- const agendaLastDate = addDays(new Date(agendaDate.getTime()), noOfDays);
25229
+ let agendaLastDate = addDays(new Date(agendaDate.getTime()), noOfDays);
25143
25230
  const days = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda') ? noOfDays : 1;
25144
25231
  const resColl = this.parent.resourceBase.resourceCollection;
25145
25232
  const resData = this.parent.resourceBase.lastResourceLevel;
25146
- const initialDate = agendaDate;
25233
+ const agendaStart = agendaDate;
25234
+ let initialDate = agendaDate;
25235
+ const showWeekend = this.parent.activeViewOptions.showWeekend;
25147
25236
  for (let i = 0; i < days; i++) {
25148
25237
  const lastLevelInfo = [];
25149
25238
  const tempLastLevelInfo = [];
25150
25239
  let tempIndex = 0;
25151
25240
  let eventObj;
25152
25241
  let dateObj;
25153
- const firstDate = addDays(initialDate, i);
25242
+ let firstDate = addDays(initialDate, i);
25243
+ if (this.parent.currentView === 'Agenda' && this.parent.activeViewOptions.group.byDate &&
25244
+ this.parent.activeViewOptions.allowVirtualScrolling && !showWeekend && !this.isWorkDay(firstDate)) {
25245
+ do {
25246
+ firstDate = addDays(firstDate, 1);
25247
+ if (firstDate >= agendaEnd) {
25248
+ break;
25249
+ }
25250
+ } while (!this.isWorkDay(firstDate) ||
25251
+ this.parent.eventBase.filterEvents(firstDate, addDays(firstDate, 1)).length < 1);
25252
+ if (firstDate >= agendaEnd) {
25253
+ break;
25254
+ }
25255
+ initialDate = addDays(firstDate, -i);
25256
+ agendaLastDate = addDays(firstDate, 1);
25257
+ }
25154
25258
  const finalDate = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda')
25155
25259
  ? addDays(firstDate, 1) : agendaLastDate;
25156
25260
  const agendaCollection = this.parent.eventBase.filterEvents(firstDate, finalDate);
@@ -25165,7 +25269,9 @@ class AgendaBase extends ViewBase {
25165
25269
  for (let r = 0; r < noOfDays; r++) {
25166
25270
  // eslint-disable-next-line max-len
25167
25271
  const resDayCollection = this.parent.eventBase.filterEvents(agendaDate, addDays(agendaDate, 1), resDataCollection, undefined);
25168
- if (resDayCollection.length > 0 || !this.parent.hideEmptyAgendaDays ||
25272
+ if (((showWeekend || !showWeekend && (this.parent.group.byDate ? this.isWorkDay(agendaDate) :
25273
+ this.isWorkDay(agendaDate, resData[parseInt(res.toString(), 10)].workDays)))
25274
+ && (resDayCollection.length > 0 || !this.parent.hideEmptyAgendaDays)) ||
25169
25275
  this.parent.currentView === 'MonthAgenda') {
25170
25276
  data.push(resDayCollection[0]);
25171
25277
  eventObj = {
@@ -25191,16 +25297,18 @@ class AgendaBase extends ViewBase {
25191
25297
  agendaDate = addDays(agendaDate, 1);
25192
25298
  if (agendaDate.getTime() >= agendaLastDate.getTime() || this.parent.activeViewOptions.group.byDate
25193
25299
  || this.parent.currentView === 'MonthAgenda') {
25194
- lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
25195
- const tempObj = {
25196
- rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
25197
- groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
25198
- resourceData: resData[parseInt(res.toString(), 10)].resourceData,
25199
- groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
25200
- date: agendaDate
25201
- };
25202
- lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
25203
- tempLastLevelInfo.push(extend({}, tempObj, null, true));
25300
+ if (data.length > 0) {
25301
+ lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
25302
+ const tempObj = {
25303
+ rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
25304
+ groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
25305
+ resourceData: resData[parseInt(res.toString(), 10)].resourceData,
25306
+ groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
25307
+ date: agendaDate
25308
+ };
25309
+ lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
25310
+ tempLastLevelInfo.push(extend({}, tempObj, null, true));
25311
+ }
25204
25312
  break;
25205
25313
  }
25206
25314
  }
@@ -25235,9 +25343,9 @@ class AgendaBase extends ViewBase {
25235
25343
  this.createResourceTableRow(lastLevelInfo, tBody);
25236
25344
  }
25237
25345
  }
25238
- const totalCollection = this.parent.eventBase.filterEvents(initialDate, agendaLastDate);
25346
+ const totalCollection = this.parent.eventBase.filterEvents(agendaStart, agendaLastDate);
25239
25347
  if (totalCollection.length === 0 && !this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
25240
- this.renderEmptyContent(tBody, initialDate);
25348
+ this.renderEmptyContent(tBody, agendaStart);
25241
25349
  }
25242
25350
  }
25243
25351
  createResourceTableRow(tContent, tBody) {
@@ -25492,9 +25600,19 @@ class Agenda extends AgendaBase {
25492
25600
  const firstDate = new Date(agendaDate.getTime());
25493
25601
  const isObject = this.appointmentFiltering(firstDate, lastDate);
25494
25602
  if (isObject.length > 0 && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
25495
- agendaDate = isObject[0][fieldMapping.startTime];
25496
- agendaDate = new Date(new Date(agendaDate.getTime()).setHours(0, 0, 0, 0));
25497
- this.updateHeaderText(isObject[0][fieldMapping.startTime]);
25603
+ if (!this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(isObject[0][fieldMapping.startTime])) {
25604
+ for (const event of isObject) {
25605
+ if (this.isAgendaWorkDay(event[fieldMapping.startTime])) {
25606
+ agendaDate = new Date(new Date(event[fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
25607
+ this.updateHeaderText(event[fieldMapping.startTime]);
25608
+ break;
25609
+ }
25610
+ }
25611
+ }
25612
+ else {
25613
+ agendaDate = new Date(new Date(isObject[0][fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
25614
+ this.updateHeaderText(isObject[0][fieldMapping.startTime]);
25615
+ }
25498
25616
  }
25499
25617
  let endDate;
25500
25618
  if (!this.parent.hideEmptyAgendaDays || (this.parent.agendaDaysCount > 0 && isObject.length > 0)) {
@@ -25508,18 +25626,25 @@ class Agenda extends AgendaBase {
25508
25626
  this.parent.headerModule.updateHeaderItems('remove');
25509
25627
  }
25510
25628
  }
25511
- this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date);
25629
+ this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date, lastDate);
25512
25630
  }
25513
25631
  else {
25514
25632
  for (let day = 0; day < this.parent.agendaDaysCount; day++) {
25515
- const filterData = this.appointmentFiltering(agendaDate);
25516
25633
  const nTr = this.createTableRowElement(agendaDate, 'data');
25517
- if (this.element.querySelector('tr[data-row-index="' + parseInt(nTr.getAttribute('data-row-index'), 10) + '"]')) {
25634
+ const virtualContent = this.element.querySelector('tr[data-row-index="' + (+(nTr.dataset.rowIndex)) + '"]');
25635
+ if (virtualContent || !this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(agendaDate)) {
25518
25636
  agendaDate = addDays(agendaDate, 1);
25637
+ if (!virtualContent && this.parent.activeViewOptions.allowVirtualScrolling) {
25638
+ day--;
25639
+ }
25640
+ if (agendaDate.getTime() > lastDate.getTime()) {
25641
+ break;
25642
+ }
25519
25643
  continue;
25520
25644
  }
25521
25645
  const dTd = nTr.children[0];
25522
25646
  const aTd = nTr.children[1];
25647
+ const filterData = this.appointmentFiltering(agendaDate);
25523
25648
  if (filterData.length > 0 || (!this.parent.hideEmptyAgendaDays && filterData.length === 0)) {
25524
25649
  const elementType = (!this.parent.hideEmptyAgendaDays && filterData.length === 0) ? 'noEvents' : 'data';
25525
25650
  dTd.appendChild(this.createDateHeaderElement(agendaDate));
@@ -25546,6 +25671,14 @@ class Agenda extends AgendaBase {
25546
25671
  }
25547
25672
  this.agendaDates = { start: firstDate, end: endDate };
25548
25673
  }
25674
+ isAgendaWorkDay(date) {
25675
+ if (this.parent.uiStateValues.isGroupAdaptive && !this.parent.group.byDate) {
25676
+ return this.isWorkDay(date, this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays);
25677
+ }
25678
+ else {
25679
+ return this.isWorkDay(date);
25680
+ }
25681
+ }
25549
25682
  agendaScrolling(event) {
25550
25683
  if (this.parent.quickPopup) {
25551
25684
  this.parent.quickPopup.quickPopupHide();
@@ -25650,9 +25783,12 @@ class Agenda extends AgendaBase {
25650
25783
  const lastDate = this.getEndDateFromStartDate(date);
25651
25784
  let daysCount = 0;
25652
25785
  do {
25653
- const filterData = this.appointmentFiltering(currentDate);
25654
- if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
25655
- daysCount++;
25786
+ if (this.parent.activeViewOptions.showWeekend || !this.parent.activeViewOptions.showWeekend &&
25787
+ this.isAgendaWorkDay(currentDate)) {
25788
+ const filterData = this.appointmentFiltering(currentDate);
25789
+ if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
25790
+ daysCount++;
25791
+ }
25656
25792
  }
25657
25793
  currentDate = addDays(currentDate, (type === 'next') ? 1 : -1);
25658
25794
  if (currentDate < firstDate || currentDate > lastDate) {
@@ -26864,11 +27000,14 @@ class TimelineYear extends Year {
26864
27000
  groupIndex = this.colLevels.slice(-1)[0][parseInt(month.toString(), 10)].groupIndex;
26865
27001
  classList$$1.push(WORKDAY_CLASS);
26866
27002
  }
27003
+ const startDateText = this.parent.globalize.formatDate(date, { type: 'dateTime', skeleton: 'full', calendar: this.parent.getCalendarMode() });
27004
+ const endDateText = this.parent.globalize.formatDate(this.parent.calendarUtil.getMonthEndDate(new Date(monthDate.getTime())), { type: 'dateTime', skeleton: 'full', calendar: this.parent.getCalendarMode() });
26867
27005
  const td = createElement('td', {
26868
27006
  className: WORK_CELLS_CLASS,
26869
27007
  attrs: {
26870
27008
  'aria-selected': 'false',
26871
- 'data-date': date.getTime().toString()
27009
+ 'data-date': date.getTime().toString(),
27010
+ 'aria-label': startDateText + ' ' + this.parent.localeObj.getConstant('endAt') + ' ' + endDateText
26872
27011
  }
26873
27012
  });
26874
27013
  addClass([td], classList$$1);