@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
@@ -558,6 +558,8 @@ var RTL = 'e-rtl';
558
558
  /** @private */
559
559
  var DEVICE_CLASS = 'e-device';
560
560
  /** @private */
561
+ var ADAPTIVE_CLASS = 'e-adaptive';
562
+ /** @private */
561
563
  var MULTI_DRAG = 'e-multi-drag';
562
564
  /** @private */
563
565
  var ICON = 'e-icons';
@@ -672,6 +674,8 @@ var TIMELINE_WRAPPER_CLASS = 'e-timeline-wrapper';
672
674
  /** @private */
673
675
  var APPOINTMENT_WRAPPER_CLASS = 'e-appointment-wrapper';
674
676
  /** @private */
677
+ var APPOINTMENT_WRAPPER_HIDDEN_CLASS = 'e-appointment-wrapper-hidden';
678
+ /** @private */
675
679
  var DAY_WRAPPER_CLASS = 'e-day-wrapper';
676
680
  /** @private */
677
681
  var TOOLBAR_CONTAINER = 'e-schedule-toolbar-container';
@@ -1095,6 +1099,7 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1095
1099
  });
1096
1100
  _this.toolbarObj.root = _this.parent.root ? _this.parent.root : _this.parent;
1097
1101
  _this.toolbarObj.appendTo(_this.parent.element.querySelector('.' + HEADER_TOOLBAR));
1102
+ _this.toolbarObj.element.setAttribute('aria-label', 'Scheduler');
1098
1103
  var prevNavEle = _this.toolbarObj.element.querySelector('.e-prev');
1099
1104
  if (prevNavEle) {
1100
1105
  prevNavEle.firstElementChild.setAttribute('title', _this.l10n.getConstant('previous'));
@@ -1282,7 +1287,7 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1282
1287
  switch (item.name) {
1283
1288
  case 'Today':
1284
1289
  tbItem = {
1285
- showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-day',
1290
+ showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-today',
1286
1291
  text: this.l10n.getConstant('today'), cssClass: 'e-today', overflow: 'Show'
1287
1292
  };
1288
1293
  tbItem.align = propItem.align ? propItem.align : item.align;
@@ -1369,7 +1374,7 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
1369
1374
  }
1370
1375
  else {
1371
1376
  items.push({
1372
- align: 'Right', showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-day',
1377
+ align: 'Right', showAlwaysInPopup: (this.parent.isAdaptive || this.parent.enableAdaptiveUI), prefixIcon: 'e-icon-today',
1373
1378
  text: this.l10n.getConstant('today'), cssClass: 'e-today', overflow: 'Show'
1374
1379
  });
1375
1380
  if (this.parent.views.length > 1) {
@@ -6745,11 +6750,13 @@ var EventBase = /** @__PURE__ @class */ (function () {
6745
6750
  if (index === void 0) { index = 0; }
6746
6751
  var tr = createElement('tr');
6747
6752
  var levels = this.parent.activeView.colLevels.slice(-1)[0];
6753
+ var className = this.parent.isReact && this.parent.activeViewOptions.eventTemplate ?
6754
+ ' ' + APPOINTMENT_WRAPPER_HIDDEN_CLASS : '';
6748
6755
  for (var i = 0, len = levels.length; i < len; i++) {
6749
6756
  var col = levels[parseInt(i.toString(), 10)];
6750
6757
  var appointmentWrap = createElement('td', {
6751
- className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS : (type === 'timeIndicator') ?
6752
- TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS, attrs: { 'data-date': col.date.getTime().toString() }
6758
+ className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS + className : (type === 'timeIndicator') ?
6759
+ TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS + className, attrs: { 'data-date': col.date.getTime().toString() }
6753
6760
  });
6754
6761
  if (!isNullOrUndefined(col.groupIndex)) {
6755
6762
  appointmentWrap.setAttribute('data-group-index', col.groupIndex.toString());
@@ -6872,6 +6879,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6872
6879
  return _this;
6873
6880
  }
6874
6881
  VerticalEvent.prototype.renderAppointments = function () {
6882
+ var _this = this;
6875
6883
  if (isNullOrUndefined(this.parent)) {
6876
6884
  return;
6877
6885
  }
@@ -6882,6 +6890,14 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6882
6890
  var wrapperElements = [].slice.call(this.parent.element.querySelectorAll('.' + BLOCK_APPOINTMENT_CLASS +
6883
6891
  ',.' + APPOINTMENT_CLASS + ',.' + ROW_COUNT_WRAPPER_CLASS));
6884
6892
  var isDragging = (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) ? true : false;
6893
+ var hideWrapper = function (wrapper) {
6894
+ if (_this.parent.isReact && !isNullOrUndefined(_this.parent.activeViewOptions.eventTemplate)) {
6895
+ var appWrapper = closest(wrapper, '.' + DAY_WRAPPER_CLASS + ',.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS);
6896
+ if (appWrapper && !appWrapper.classList.contains(APPOINTMENT_WRAPPER_HIDDEN_CLASS)) {
6897
+ addClass([appWrapper], APPOINTMENT_WRAPPER_HIDDEN_CLASS);
6898
+ }
6899
+ }
6900
+ };
6885
6901
  for (var _i = 0, wrapperElements_1 = wrapperElements; _i < wrapperElements_1.length; _i++) {
6886
6902
  var wrapper = wrapperElements_1[_i];
6887
6903
  if (isDragging && !(wrapper.classList.contains(ALLDAY_APPOINTMENT_CLASS) ||
@@ -6890,11 +6906,13 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6890
6906
  for (var j = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; j < len; j++) {
6891
6907
  if (groupIndex === this.parent.crudModule.crudObj.sourceEvent[parseInt(j.toString(), 10)].groupIndex ||
6892
6908
  groupIndex === this.parent.crudModule.crudObj.targetEvent[parseInt(j.toString(), 10)].groupIndex) {
6909
+ hideWrapper(wrapper);
6893
6910
  remove(wrapper);
6894
6911
  }
6895
6912
  }
6896
6913
  }
6897
6914
  else {
6915
+ hideWrapper(wrapper);
6898
6916
  remove(wrapper);
6899
6917
  }
6900
6918
  }
@@ -6931,7 +6949,12 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6931
6949
  if (isDragging) {
6932
6950
  this.parent.crudModule.crudObj.isCrudAction = false;
6933
6951
  }
6934
- this.parent.renderTemplates();
6952
+ this.parent.renderTemplates(function () {
6953
+ if (_this.parent.isReact && _this.parent.activeViewOptions.eventTemplate) {
6954
+ var wraps = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_WRAPPER_HIDDEN_CLASS));
6955
+ removeClass(wraps, APPOINTMENT_WRAPPER_HIDDEN_CLASS);
6956
+ }
6957
+ });
6935
6958
  };
6936
6959
  VerticalEvent.prototype.initializeValues = function () {
6937
6960
  this.resources = (this.parent.activeViewOptions.group.resources.length > 0) ? this.parent.uiStateValues.isGroupAdaptive ?
@@ -8360,8 +8383,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
8360
8383
  attrs: {
8361
8384
  'role': 'button',
8362
8385
  'tabindex': '0',
8363
- 'aria-label': this.parent.globalize.formatNumber(count) + '&nbsp;'
8364
- + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more')),
8386
+ 'aria-label': this.parent.globalize.formatNumber(count) + ' ' + this.parent.localeObj.getConstant('moreEvents'),
8365
8387
  'data-count': count.toString(),
8366
8388
  'data-start-date': startDate.getTime().toString(),
8367
8389
  'data-end-date': endDate.getTime().toString()
@@ -8485,11 +8507,18 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8485
8507
  };
8486
8508
  TimelineEvent.prototype.getOverlapSortComparerEvents = function (startDate, endDate, appointmentsCollection) {
8487
8509
  var appointments = [];
8488
- for (var _i = 0, appointmentsCollection_1 = appointmentsCollection; _i < appointmentsCollection_1.length; _i++) {
8489
- var app = appointmentsCollection_1[_i];
8490
- if (this.renderType === 'day') {
8491
- if ((resetTime(app[this.fields.startTime]).getTime() <= resetTime(new Date(startDate.getTime())).getTime()) &&
8492
- (resetTime(app[this.fields.endTime]).getTime() >= resetTime(new Date(startDate.getTime())).getTime())) {
8510
+ var _loop_1 = function (app) {
8511
+ if (this_1.renderType === 'day') {
8512
+ var start_1 = resetTime(startDate).getTime();
8513
+ var end_1 = resetTime(endDate).getTime();
8514
+ var appStart_1 = resetTime(app[this_1.fields.startTime]).getTime();
8515
+ var appEnd_1 = resetTime(app[this_1.fields.endTime]).getTime();
8516
+ var isEndOverlap = function () {
8517
+ var endTime = (end_1 - (getDateInMs(endDate) <= 0 ? MS_PER_DAY : 0));
8518
+ endTime = start_1 > endTime ? start_1 : endTime;
8519
+ return appEnd_1 >= endTime && appStart_1 <= endTime;
8520
+ };
8521
+ if (appStart_1 <= start_1 && appEnd_1 >= start_1 || isEndOverlap() || appStart_1 > start_1 && appEnd_1 < end_1) {
8493
8522
  appointments.push(app);
8494
8523
  }
8495
8524
  }
@@ -8500,6 +8529,11 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8500
8529
  appointments.push(app);
8501
8530
  }
8502
8531
  }
8532
+ };
8533
+ var this_1 = this;
8534
+ for (var _i = 0, appointmentsCollection_1 = appointmentsCollection; _i < appointmentsCollection_1.length; _i++) {
8535
+ var app = appointmentsCollection_1[_i];
8536
+ _loop_1(app);
8503
8537
  }
8504
8538
  return appointments;
8505
8539
  };
@@ -9374,7 +9408,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9374
9408
  QuickPopups.prototype.renderMorePopup = function () {
9375
9409
  var moreEventPopup = "<div class=\"" + MORE_EVENT_POPUP_CLASS + "\"><div class=\"" + MORE_EVENT_HEADER_CLASS + "\">" +
9376
9410
  ("<div class=\"" + MORE_EVENT_CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\" tabindex=\"0\" role=\"button\"></div>") +
9377
- ("<div class=\"" + MORE_EVENT_DATE_HEADER_CLASS + "\"><div class=\"" + MORE_EVENT_HEADER_DAY_CLASS + "\"></div>") +
9411
+ ("<div class=\"" + MORE_EVENT_DATE_HEADER_CLASS + "\"><div class=\"" + MORE_EVENT_HEADER_DAY_CLASS + "\" id=\"" + this.parent.element.id + "_more_popup\"></div>") +
9378
9412
  ("<div class=\"" + MORE_EVENT_HEADER_DATE_CLASS + " " + NAVIGATE_CLASS + "\" tabindex=\"0\" role=\"link\"></div></div></div></div>");
9379
9413
  var moreEventWrapper = createElement('div', {
9380
9414
  className: MORE_POPUP_WRAPPER_CLASS + ' e-popup-close',
@@ -9399,6 +9433,8 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9399
9433
  viewPortElement: (this.parent.isAdaptive ? document.body : this.parent.element),
9400
9434
  zIndex: (this.parent.isAdaptive ? 1002 : 2)
9401
9435
  });
9436
+ this.morePopup.element.setAttribute('role', 'dialog');
9437
+ this.morePopup.element.setAttribute('aria-labelledby', this.parent.element.id + '_more_popup');
9402
9438
  var closeButton = this.morePopup.element.querySelector('.' + MORE_EVENT_CLOSE_CLASS);
9403
9439
  this.renderButton('e-round', ICON + ' ' + CLOSE_ICON_CLASS, false, closeButton, this.closeClick);
9404
9440
  EventHandler.add(this.morePopup.element.querySelector('.' + MORE_EVENT_HEADER_DATE_CLASS), 'click', this.navigationClick, this);
@@ -11598,7 +11634,6 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
11598
11634
  RecurrenceEditor.prototype.setTemplate = function () {
11599
11635
  var dayData = this.getDayData('narrow');
11600
11636
  var fullDay = this.getDayData('wide');
11601
- var labelId = this.element.id + '_' + 'end_label';
11602
11637
  this.element.innerHTML = '<div class="' + HEADER + '">' +
11603
11638
  '<div class="' + INPUTWARAPPER + ' ' + FORMLEFT + '">' +
11604
11639
  '<input type="text" tabindex="0" class="' + REPEATELEMENT +
@@ -11645,7 +11680,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
11645
11680
  '</div></div>' +
11646
11681
  '<div class="' + INPUTWARAPPERSIDE + ' ' + ENDON + ' ' + FORMRIGHT + '">' +
11647
11682
  '<div class="' + INPUTWARAPPER + ' ' + ENDONLEFT + '">' +
11648
- '<input type="text" tabindex="0" class="' + ENDONELEMENT + '" aria-labelledby="' + labelId + '"title="' + this.localeObj.getConstant(END) + '" />' +
11683
+ '<input type="text" tabindex="0" class="' + ENDONELEMENT + '"title="' + this.localeObj.getConstant(END) + '" />' +
11649
11684
  '</div>' +
11650
11685
  '<div class="' + INPUTWARAPPER + ' ' + ENDONDATE + '" >' +
11651
11686
  '<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
@@ -14111,6 +14146,27 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14111
14146
  this.itemSize = getElementHeightFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
14112
14147
  }
14113
14148
  };
14149
+ VirtualScroll.prototype.refreshLayout = function () {
14150
+ var initialHeight = this.parent.uiStateValues.scheduleHeight;
14151
+ this.parent.uiStateValues.scheduleHeight = this.parent.element.offsetHeight;
14152
+ var preRenderedLength = this.renderedLength;
14153
+ if (this.parent.uiStateValues.scheduleHeight !== initialHeight) {
14154
+ if (preRenderedLength < this.getRenderedCount()) {
14155
+ this.isRemoteRefresh = true;
14156
+ }
14157
+ var resWrap = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
14158
+ var conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
14159
+ var eventWrap = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
14160
+ var firstTDIndex = parseInt(resWrap.querySelector('tbody td').getAttribute('data-group-index'), 10);
14161
+ var endIndex = (firstTDIndex + this.renderedLength);
14162
+ firstTDIndex = (endIndex > this.parent.resourceBase.expandedResources.length) ?
14163
+ (this.parent.resourceBase.expandedResources.length - this.renderedLength) : firstTDIndex;
14164
+ this.parent.resourceBase.renderedResources = this.parent.resourceBase.expandedResources.slice(firstTDIndex, endIndex);
14165
+ if (this.parent.resourceBase.renderedResources.length > 0) {
14166
+ this.updateContent(resWrap, conWrap, eventWrap, this.parent.resourceBase.renderedResources);
14167
+ }
14168
+ }
14169
+ };
14114
14170
  VirtualScroll.prototype.renderEvents = function () {
14115
14171
  this.setTabIndex();
14116
14172
  var dynamicData = this.triggerScrollEvent(virtualScrollStop);
@@ -14146,7 +14202,9 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14146
14202
  var eventWrap = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
14147
14203
  var timeIndicator = this.parent.element.querySelector('.' + CURRENT_TIMELINE_CLASS);
14148
14204
  var conTable = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS);
14149
- addClass([conWrap], 'e-transition');
14205
+ if (!this.parent.rowAutoHeight) {
14206
+ addClass([conWrap, resWrap], 'e-transition');
14207
+ }
14150
14208
  this.renderedLength = resWrap.querySelector('tbody').children.length;
14151
14209
  var firstTDIndex = parseInt(resWrap.querySelector('tbody td').getAttribute('data-group-index'), 10);
14152
14210
  var scrollHeight = this.parent.rowAutoHeight ?
@@ -14548,6 +14606,7 @@ var Render = /** @__PURE__ @class */ (function () {
14548
14606
  }
14549
14607
  throw Error('Inject required modules');
14550
14608
  }
14609
+ this.parent.uiStateValues.scheduleHeight = this.parent.element.offsetHeight;
14551
14610
  this.parent.activeView.viewIndex = this.parent.viewIndex;
14552
14611
  this.updateLabelText(viewName);
14553
14612
  this.parent.activeView.addEventListener();
@@ -14812,6 +14871,9 @@ var Crud = /** @__PURE__ @class */ (function () {
14812
14871
  return;
14813
14872
  }
14814
14873
  this.parent.trigger(dataBinding, e, function (args) {
14874
+ if (args.cancel) {
14875
+ return;
14876
+ }
14815
14877
  var resultData = extend([], args.result, null, true);
14816
14878
  _this.parent.eventsData = resultData.filter(function (data) { return !data[_this.parent.eventFields.isBlock]; });
14817
14879
  _this.parent.blockData = resultData.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
@@ -16465,6 +16527,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
16465
16527
  args = {
16466
16528
  cancel: false, event: (event) ? event.event : null, groupIndex: _this.parent.uiStateValues.groupIndex, requestType: 'resourceChanged'
16467
16529
  };
16530
+ _this.parent.adaptiveGroupIndex = _this.parent.uiStateValues.groupIndex;
16468
16531
  _this.parent.trigger(actionComplete, args);
16469
16532
  }
16470
16533
  });
@@ -17205,7 +17268,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17205
17268
  * @param {string | HTMLElement} element Accepts the DOM element reference
17206
17269
  */
17207
17270
  function Schedule(options, element) {
17208
- return _super.call(this, options, element) || this;
17271
+ var _this = _super.call(this, options, element) || this;
17272
+ _this.adaptiveGroupIndex = 0;
17273
+ return _this;
17209
17274
  }
17210
17275
  /**
17211
17276
  * Core method that initializes the control rendering.
@@ -17229,6 +17294,12 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17229
17294
  else {
17230
17295
  removeClasses.push(DEVICE_CLASS);
17231
17296
  }
17297
+ if (this.enableAdaptiveUI) {
17298
+ addClasses.push(ADAPTIVE_CLASS);
17299
+ }
17300
+ else {
17301
+ removeClasses.push(ADAPTIVE_CLASS);
17302
+ }
17232
17303
  if (this.allowMultiDrag) {
17233
17304
  addClasses.push(MULTI_DRAG);
17234
17305
  }
@@ -17841,7 +17912,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17841
17912
  if (this && isNullOrUndefined(this.uiStateValues) || !(this.enablePersistence)) {
17842
17913
  this.uiStateValues = {
17843
17914
  expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
17844
- isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
17915
+ isIgnoreOccurrence: false, groupIndex: this.adaptiveGroupIndex, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
17845
17916
  };
17846
17917
  }
17847
17918
  this.currentTimezoneDate = this.getCurrentTime();
@@ -18335,6 +18406,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18335
18406
  && document.activeElement.classList.contains(SUBJECT_CLASS))) {
18336
18407
  return;
18337
18408
  }
18409
+ if (this.virtualScrollModule && this.activeView.isTimelineView()) {
18410
+ this.virtualScrollModule.refreshLayout();
18411
+ }
18338
18412
  if (this.activeViewOptions.timeScale.enable && this.activeView) {
18339
18413
  this.activeView.highlightCurrentTime();
18340
18414
  }
@@ -18346,7 +18420,12 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18346
18420
  && !this.activeViewOptions.timeScale.enable) || this.activeView.isTimelineView()) {
18347
18421
  this.activeView.resetColWidth();
18348
18422
  this.notify(scrollUiUpdate, { cssProperties: this.getCssProperties(), isPreventScrollUpdate: true });
18349
- this.refreshEvents(false);
18423
+ var isRemoteRefresh = false;
18424
+ if (this.activeViewOptions.enableLazyLoading && this.virtualScrollModule && this.virtualScrollModule.isRemoteRefresh) {
18425
+ isRemoteRefresh = this.virtualScrollModule.isRemoteRefresh;
18426
+ this.virtualScrollModule.isRemoteRefresh = false;
18427
+ }
18428
+ this.refreshEvents(isRemoteRefresh);
18350
18429
  }
18351
18430
  else {
18352
18431
  this.notify(contentReady, {});
@@ -18529,7 +18608,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
18529
18608
  * @private
18530
18609
  */
18531
18610
  Schedule.prototype.getPersistData = function () {
18532
- return this.addOnPersist(['currentView', 'selectedDate', 'scrollTop', 'scrollLeft']);
18611
+ return this.addOnPersist(['currentView', 'selectedDate', 'scrollTop', 'scrollLeft', 'adaptiveGroupIndex']);
18533
18612
  };
18534
18613
  /**
18535
18614
  * Called internally, if any of the property value changed.
@@ -23672,7 +23751,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
23672
23751
  var colWidth_1 = (getElementWidth(contentBody) / (colElements.length / 2));
23673
23752
  if (content.offsetHeight !== content.clientHeight) {
23674
23753
  var resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
23675
- if (!isNullOrUndefined(resourceColumn)) {
23754
+ if (!isNullOrUndefined(resourceColumn) && resourceColumn.offsetHeight !== content.clientHeight) {
23676
23755
  setStyleAttribute(resourceColumn, { 'height': formatUnit(content.clientHeight) });
23677
23756
  }
23678
23757
  }
@@ -24519,6 +24598,20 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
24519
24598
  append(tooltipTemplate, ntd);
24520
24599
  }
24521
24600
  ntd.setAttribute('data-date', cellDate.getTime().toString());
24601
+ var skeleton = 'full';
24602
+ if (!this.parent.activeViewOptions.timeScale.enable) {
24603
+ var announcementText = this.parent.globalize.formatDate(tdData.date, { skeleton: skeleton, calendar: this.parent.getCalendarMode() });
24604
+ ntd.setAttribute('aria-label', announcementText);
24605
+ }
24606
+ else {
24607
+ var startDateText = this.parent.globalize.formatDate(cellDate, {
24608
+ type: 'dateTime', skeleton: skeleton, calendar: this.parent.getCalendarMode()
24609
+ });
24610
+ var endDateText = this.parent.globalize.formatDate(this.getEndDateFromStartDate(cellDate), {
24611
+ type: 'dateTime', skeleton: skeleton, calendar: this.parent.getCalendarMode()
24612
+ });
24613
+ ntd.setAttribute('aria-label', startDateText + ' ' + this.parent.localeObj.getConstant('endAt') + ' ' + endDateText);
24614
+ }
24522
24615
  if (!isNullOrUndefined(tdData.groupIndex) || this.parent.uiStateValues.isGroupAdaptive) {
24523
24616
  var groupIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex :
24524
24617
  tdData.groupIndex;
@@ -26083,7 +26176,8 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
26083
26176
  EventHandler.add(element, 'click', this.parent.agendaModule.dayNavigationClick, this);
26084
26177
  }
26085
26178
  };
26086
- AgendaBase.prototype.calculateResourceTableElement = function (tBody, noOfDays, agendaDate) {
26179
+ AgendaBase.prototype.calculateResourceTableElement = function (tBody, noOfDays, agendaDate, agendaEnd) {
26180
+ if (agendaEnd === void 0) { agendaEnd = null; }
26087
26181
  if (isNullOrUndefined(this.parent.resourceBase.lastResourceLevel)) {
26088
26182
  var level = this.getDateSlots(this.renderDates, this.parent.activeViewOptions.workDays);
26089
26183
  this.parent.resourceBase.generateResourceLevels(level);
@@ -26092,7 +26186,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
26092
26186
  var days = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda') ? noOfDays : 1;
26093
26187
  var resColl = this.parent.resourceBase.resourceCollection;
26094
26188
  var resData = this.parent.resourceBase.lastResourceLevel;
26189
+ var agendaStart = agendaDate;
26095
26190
  var initialDate = agendaDate;
26191
+ var showWeekend = this.parent.activeViewOptions.showWeekend;
26096
26192
  for (var i = 0; i < days; i++) {
26097
26193
  var lastLevelInfo = [];
26098
26194
  var tempLastLevelInfo = [];
@@ -26100,6 +26196,21 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
26100
26196
  var eventObj = void 0;
26101
26197
  var dateObj = void 0;
26102
26198
  var firstDate = addDays(initialDate, i);
26199
+ if (this.parent.currentView === 'Agenda' && this.parent.activeViewOptions.group.byDate &&
26200
+ this.parent.activeViewOptions.allowVirtualScrolling && !showWeekend && !this.isWorkDay(firstDate)) {
26201
+ do {
26202
+ firstDate = addDays(firstDate, 1);
26203
+ if (firstDate >= agendaEnd) {
26204
+ break;
26205
+ }
26206
+ } while (!this.isWorkDay(firstDate) ||
26207
+ this.parent.eventBase.filterEvents(firstDate, addDays(firstDate, 1)).length < 1);
26208
+ if (firstDate >= agendaEnd) {
26209
+ break;
26210
+ }
26211
+ initialDate = addDays(firstDate, -i);
26212
+ agendaLastDate = addDays(firstDate, 1);
26213
+ }
26103
26214
  var finalDate = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda')
26104
26215
  ? addDays(firstDate, 1) : agendaLastDate;
26105
26216
  var agendaCollection = this.parent.eventBase.filterEvents(firstDate, finalDate);
@@ -26114,7 +26225,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
26114
26225
  for (var r = 0; r < noOfDays; r++) {
26115
26226
  // eslint-disable-next-line max-len
26116
26227
  var resDayCollection = this.parent.eventBase.filterEvents(agendaDate, addDays(agendaDate, 1), resDataCollection, undefined);
26117
- if (resDayCollection.length > 0 || !this.parent.hideEmptyAgendaDays ||
26228
+ if (((showWeekend || !showWeekend && (this.parent.group.byDate ? this.isWorkDay(agendaDate) :
26229
+ this.isWorkDay(agendaDate, resData[parseInt(res.toString(), 10)].workDays)))
26230
+ && (resDayCollection.length > 0 || !this.parent.hideEmptyAgendaDays)) ||
26118
26231
  this.parent.currentView === 'MonthAgenda') {
26119
26232
  data.push(resDayCollection[0]);
26120
26233
  eventObj = {
@@ -26140,16 +26253,18 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
26140
26253
  agendaDate = addDays(agendaDate, 1);
26141
26254
  if (agendaDate.getTime() >= agendaLastDate.getTime() || this.parent.activeViewOptions.group.byDate
26142
26255
  || this.parent.currentView === 'MonthAgenda') {
26143
- lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
26144
- var tempObj = {
26145
- rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
26146
- groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
26147
- resourceData: resData[parseInt(res.toString(), 10)].resourceData,
26148
- groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
26149
- date: agendaDate
26150
- };
26151
- lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
26152
- tempLastLevelInfo.push(extend({}, tempObj, null, true));
26256
+ if (data.length > 0) {
26257
+ lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
26258
+ var tempObj = {
26259
+ rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
26260
+ groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
26261
+ resourceData: resData[parseInt(res.toString(), 10)].resourceData,
26262
+ groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
26263
+ date: agendaDate
26264
+ };
26265
+ lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
26266
+ tempLastLevelInfo.push(extend({}, tempObj, null, true));
26267
+ }
26153
26268
  break;
26154
26269
  }
26155
26270
  }
@@ -26184,9 +26299,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
26184
26299
  this.createResourceTableRow(lastLevelInfo, tBody);
26185
26300
  }
26186
26301
  }
26187
- var totalCollection = this.parent.eventBase.filterEvents(initialDate, agendaLastDate);
26302
+ var totalCollection = this.parent.eventBase.filterEvents(agendaStart, agendaLastDate);
26188
26303
  if (totalCollection.length === 0 && !this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
26189
- this.renderEmptyContent(tBody, initialDate);
26304
+ this.renderEmptyContent(tBody, agendaStart);
26190
26305
  }
26191
26306
  };
26192
26307
  AgendaBase.prototype.createResourceTableRow = function (tContent, tBody) {
@@ -26459,9 +26574,20 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
26459
26574
  var firstDate = new Date(agendaDate.getTime());
26460
26575
  var isObject = this.appointmentFiltering(firstDate, lastDate);
26461
26576
  if (isObject.length > 0 && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
26462
- agendaDate = isObject[0][fieldMapping.startTime];
26463
- agendaDate = new Date(new Date(agendaDate.getTime()).setHours(0, 0, 0, 0));
26464
- this.updateHeaderText(isObject[0][fieldMapping.startTime]);
26577
+ if (!this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(isObject[0][fieldMapping.startTime])) {
26578
+ for (var _i = 0, isObject_1 = isObject; _i < isObject_1.length; _i++) {
26579
+ var event_2 = isObject_1[_i];
26580
+ if (this.isAgendaWorkDay(event_2[fieldMapping.startTime])) {
26581
+ agendaDate = new Date(new Date(event_2[fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
26582
+ this.updateHeaderText(event_2[fieldMapping.startTime]);
26583
+ break;
26584
+ }
26585
+ }
26586
+ }
26587
+ else {
26588
+ agendaDate = new Date(new Date(isObject[0][fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
26589
+ this.updateHeaderText(isObject[0][fieldMapping.startTime]);
26590
+ }
26465
26591
  }
26466
26592
  var endDate;
26467
26593
  if (!this.parent.hideEmptyAgendaDays || (this.parent.agendaDaysCount > 0 && isObject.length > 0)) {
@@ -26475,18 +26601,25 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
26475
26601
  this.parent.headerModule.updateHeaderItems('remove');
26476
26602
  }
26477
26603
  }
26478
- this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date);
26604
+ this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date, lastDate);
26479
26605
  }
26480
26606
  else {
26481
26607
  for (var day = 0; day < this.parent.agendaDaysCount; day++) {
26482
- var filterData = this.appointmentFiltering(agendaDate);
26483
26608
  var nTr = this.createTableRowElement(agendaDate, 'data');
26484
- if (this.element.querySelector('tr[data-row-index="' + parseInt(nTr.getAttribute('data-row-index'), 10) + '"]')) {
26609
+ var virtualContent = this.element.querySelector('tr[data-row-index="' + (+(nTr.dataset.rowIndex)) + '"]');
26610
+ if (virtualContent || !this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(agendaDate)) {
26485
26611
  agendaDate = addDays(agendaDate, 1);
26612
+ if (!virtualContent && this.parent.activeViewOptions.allowVirtualScrolling) {
26613
+ day--;
26614
+ }
26615
+ if (agendaDate.getTime() > lastDate.getTime()) {
26616
+ break;
26617
+ }
26486
26618
  continue;
26487
26619
  }
26488
26620
  var dTd = nTr.children[0];
26489
26621
  var aTd = nTr.children[1];
26622
+ var filterData = this.appointmentFiltering(agendaDate);
26490
26623
  if (filterData.length > 0 || (!this.parent.hideEmptyAgendaDays && filterData.length === 0)) {
26491
26624
  var elementType = (!this.parent.hideEmptyAgendaDays && filterData.length === 0) ? 'noEvents' : 'data';
26492
26625
  dTd.appendChild(this.createDateHeaderElement(agendaDate));
@@ -26513,6 +26646,14 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
26513
26646
  }
26514
26647
  this.agendaDates = { start: firstDate, end: endDate };
26515
26648
  };
26649
+ Agenda.prototype.isAgendaWorkDay = function (date) {
26650
+ if (this.parent.uiStateValues.isGroupAdaptive && !this.parent.group.byDate) {
26651
+ return this.isWorkDay(date, this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays);
26652
+ }
26653
+ else {
26654
+ return this.isWorkDay(date);
26655
+ }
26656
+ };
26516
26657
  Agenda.prototype.agendaScrolling = function (event) {
26517
26658
  if (this.parent.quickPopup) {
26518
26659
  this.parent.quickPopup.quickPopupHide();
@@ -26617,9 +26758,12 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
26617
26758
  var lastDate = this.getEndDateFromStartDate(date);
26618
26759
  var daysCount = 0;
26619
26760
  do {
26620
- var filterData = this.appointmentFiltering(currentDate);
26621
- if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
26622
- daysCount++;
26761
+ if (this.parent.activeViewOptions.showWeekend || !this.parent.activeViewOptions.showWeekend &&
26762
+ this.isAgendaWorkDay(currentDate)) {
26763
+ var filterData = this.appointmentFiltering(currentDate);
26764
+ if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
26765
+ daysCount++;
26766
+ }
26623
26767
  }
26624
26768
  currentDate = addDays(currentDate, (type === 'next') ? 1 : -1);
26625
26769
  if (currentDate < firstDate || currentDate > lastDate) {
@@ -27918,11 +28062,14 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
27918
28062
  groupIndex = this.colLevels.slice(-1)[0][parseInt(month.toString(), 10)].groupIndex;
27919
28063
  classList$$1.push(WORKDAY_CLASS);
27920
28064
  }
28065
+ var startDateText = this.parent.globalize.formatDate(date, { type: 'dateTime', skeleton: 'full', calendar: this.parent.getCalendarMode() });
28066
+ var endDateText = this.parent.globalize.formatDate(this.parent.calendarUtil.getMonthEndDate(new Date(monthDate.getTime())), { type: 'dateTime', skeleton: 'full', calendar: this.parent.getCalendarMode() });
27921
28067
  var td = createElement('td', {
27922
28068
  className: WORK_CELLS_CLASS,
27923
28069
  attrs: {
27924
28070
  'aria-selected': 'false',
27925
- 'data-date': date.getTime().toString()
28071
+ 'data-date': date.getTime().toString(),
28072
+ 'aria-label': startDateText + ' ' + this.parent.localeObj.getConstant('endAt') + ' ' + endDateText
27926
28073
  }
27927
28074
  });
27928
28075
  addClass([td], classList$$1);