@syncfusion/ej2-schedule 21.1.38 → 21.1.41

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 (59) 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 +59 -51
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +66 -58
  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/schedule/base/resource.js +1 -1
  14. package/src/schedule/base/schedule.d.ts +5 -3
  15. package/src/schedule/base/schedule.js +11 -7
  16. package/src/schedule/event-renderer/agenda-base.js +2 -2
  17. package/src/schedule/event-renderer/event-base.js +1 -1
  18. package/src/schedule/event-renderer/month.js +2 -2
  19. package/src/schedule/event-renderer/timeline-view.js +4 -11
  20. package/src/schedule/event-renderer/vertical-view.js +5 -11
  21. package/src/schedule/exports/print.js +11 -2
  22. package/src/schedule/popups/event-window.js +11 -3
  23. package/src/schedule/popups/quick-popups.js +5 -5
  24. package/src/schedule/renderer/month.js +2 -2
  25. package/src/schedule/renderer/renderer.js +1 -0
  26. package/src/schedule/renderer/timeline-year.js +4 -6
  27. package/src/schedule/renderer/vertical-view.js +5 -4
  28. package/src/schedule/renderer/view-base.js +2 -2
  29. package/styles/bootstrap-dark.css +6 -2
  30. package/styles/bootstrap.css +6 -2
  31. package/styles/bootstrap4.css +6 -2
  32. package/styles/bootstrap5-dark.css +6 -2
  33. package/styles/bootstrap5.css +6 -2
  34. package/styles/fabric-dark.css +6 -2
  35. package/styles/fabric.css +6 -2
  36. package/styles/fluent-dark.css +6 -2
  37. package/styles/fluent.css +6 -2
  38. package/styles/highcontrast-light.css +6 -2
  39. package/styles/highcontrast.css +6 -2
  40. package/styles/material-dark.css +6 -2
  41. package/styles/material.css +6 -2
  42. package/styles/schedule/_layout.scss +6 -2
  43. package/styles/schedule/bootstrap-dark.css +6 -2
  44. package/styles/schedule/bootstrap.css +6 -2
  45. package/styles/schedule/bootstrap4.css +6 -2
  46. package/styles/schedule/bootstrap5-dark.css +6 -2
  47. package/styles/schedule/bootstrap5.css +6 -2
  48. package/styles/schedule/fabric-dark.css +6 -2
  49. package/styles/schedule/fabric.css +6 -2
  50. package/styles/schedule/fluent-dark.css +6 -2
  51. package/styles/schedule/fluent.css +6 -2
  52. package/styles/schedule/highcontrast-light.css +6 -2
  53. package/styles/schedule/highcontrast.css +6 -2
  54. package/styles/schedule/material-dark.css +6 -2
  55. package/styles/schedule/material.css +6 -2
  56. package/styles/schedule/tailwind-dark.css +6 -2
  57. package/styles/schedule/tailwind.css +6 -2
  58. package/styles/tailwind-dark.css +6 -2
  59. package/styles/tailwind.css +6 -2
@@ -6358,7 +6358,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
6358
6358
  }
6359
6359
  else {
6360
6360
  var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
6361
- appointmentSubject.innerText = this.parent.sanitize(eventSubject);
6361
+ this.parent.sanitize(eventSubject, appointmentSubject);
6362
6362
  templateElement = [appointmentSubject];
6363
6363
  }
6364
6364
  append(templateElement, appointmentWrapper);
@@ -6919,7 +6919,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6919
6919
  }
6920
6920
  else {
6921
6921
  var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
6922
- appointmentSubject.innerText = this.parent.sanitize(recordSubject);
6922
+ this.parent.sanitize(recordSubject, appointmentSubject);
6923
6923
  if (isAllDay) {
6924
6924
  if (record[fieldMapping.isAllDay]) {
6925
6925
  templateElement = [appointmentSubject];
@@ -6952,7 +6952,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6952
6952
  innerHTML: timeStr
6953
6953
  });
6954
6954
  var appointmentLocation = createElement('div', { className: LOCATION_CLASS });
6955
- appointmentLocation.innerText = this.parent.sanitize((record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || ''));
6955
+ this.parent.sanitize((record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || ''), appointmentLocation);
6956
6956
  templateElement = [appointmentSubject, appointmentTime, appointmentLocation];
6957
6957
  }
6958
6958
  }
@@ -7131,7 +7131,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
7131
7131
  return;
7132
7132
  }
7133
7133
  if (eStart <= eEnd && isValidEvent && this.isWorkDayAvailable(resource, eStart)) {
7134
- var appHeight_1 = this.getHeight(eStart, eEnd);
7134
+ var appHeight = this.getHeight(eStart, eEnd);
7135
7135
  if (eStart.getTime() > schedule.startHour.getTime()) {
7136
7136
  topValue = this.getTopValue(eStart, dayIndex, resource);
7137
7137
  }
@@ -7168,10 +7168,10 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
7168
7168
  }
7169
7169
  setStyleAttribute(appointmentElement, {
7170
7170
  'width': (this.parent.eventSettings.enableMaxHeight ? '100%' : tempData.appWidth),
7171
- 'height': appHeight_1 + 'px', 'top': topValue + 'px'
7171
+ 'height': appHeight + 'px', 'top': topValue + 'px'
7172
7172
  });
7173
7173
  var iconHeight = appointmentElement.querySelectorAll('.' + EVENT_INDICATOR_CLASS).length * 15;
7174
- var maxHeight = appHeight_1 - 40 - iconHeight;
7174
+ var maxHeight = appHeight - 40 - iconHeight;
7175
7175
  var subjectElement = appointmentElement.querySelector('.' + SUBJECT_CLASS);
7176
7176
  if (!this.parent.isAdaptive && subjectElement) {
7177
7177
  subjectElement.style.maxHeight = formatUnit(maxHeight);
@@ -7183,12 +7183,6 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
7183
7183
  record.data = eventData;
7184
7184
  this.appendEvent(record, appointmentElement, index, tempData.appLeft);
7185
7185
  this.wireAppointmentEvents(appointmentElement, eventObj);
7186
- if (appHeight_1 < this.cellHeight) {
7187
- var resizeHandlers = [].slice.call(appointmentElement.querySelectorAll('.' + EVENT_RESIZE_CLASS));
7188
- resizeHandlers.forEach(function (resizeHandler) {
7189
- resizeHandler.style.height = Math.ceil(appHeight_1 / resizeHandler.offsetHeight) + 'px';
7190
- });
7191
- }
7192
7186
  }
7193
7187
  };
7194
7188
  VerticalEvent.prototype.getEventWidth = function () {
@@ -7845,7 +7839,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7845
7839
  else {
7846
7840
  var eventLocation = (record[this.fields.location] || this.parent.eventSettings.fields.location.default || '');
7847
7841
  var appointmentSubject = createElement('div', { className: SUBJECT_CLASS });
7848
- appointmentSubject.innerText = this.parent.sanitize((eventSubject + (eventLocation ? '; ' + eventLocation : '')));
7842
+ this.parent.sanitize((eventSubject + (eventLocation ? '; ' + eventLocation : '')), appointmentSubject);
7849
7843
  var appointmentStartTime = createElement('div', {
7850
7844
  className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''),
7851
7845
  innerHTML: this.parent.getTimeString(eventData[this.fields.startTime])
@@ -7889,7 +7883,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7889
7883
  className: APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + DISABLE_CLASS : ''), innerHTML: timeString
7890
7884
  });
7891
7885
  var appLocation = createElement('div', { className: LOCATION_CLASS });
7892
- appLocation.innerText = this.parent.sanitize(eventLocation);
7886
+ this.parent.sanitize(eventLocation, appLocation);
7893
7887
  innerElement = [appointmentSubject, appTime, appLocation];
7894
7888
  }
7895
7889
  var wrap = createElement('div', { className: 'e-inner-wrap' });
@@ -8307,12 +8301,12 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8307
8301
  isValidEvent = this.isValidEvent(eventObj, startTime, endTime, schedule);
8308
8302
  }
8309
8303
  if (startTime <= endTime && isValidEvent) {
8310
- var appWidth_1 = this.getEventWidth(startTime, endTime, event[this.fields.isAllDay], diffInDays);
8311
- appWidth_1 = this.renderType === 'day' ? appWidth_1 - 2 : appWidth_1;
8304
+ var appWidth = this.getEventWidth(startTime, endTime, event[this.fields.isAllDay], diffInDays);
8305
+ appWidth = this.renderType === 'day' ? appWidth - 2 : appWidth;
8312
8306
  var appLeft = 0;
8313
8307
  var appRight = 0;
8314
8308
  var position = this.getPosition(startTime, endTime, event[this.fields.isAllDay], this.day);
8315
- appWidth_1 = (appWidth_1 <= 0) ? this.cellWidth : appWidth_1; // appWidth 0 when start and end time as same
8309
+ appWidth = (appWidth <= 0) ? this.cellWidth : appWidth; // appWidth 0 when start and end time as same
8316
8310
  this.renderedEvents.push(extend({}, event, null, true));
8317
8311
  if (isNullOrUndefined(this.cellTops[parseInt(resIndex.toString(), 10)])) {
8318
8312
  this.cellTops[parseInt(resIndex.toString(), 10)] = this.getRowTop(resIndex);
@@ -8333,7 +8327,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8333
8327
  }
8334
8328
  this.applyResourceColor(appointmentElement, event, 'backgroundColor', this.groupOrder);
8335
8329
  setStyleAttribute(appointmentElement, {
8336
- 'width': appWidth_1 + 'px', 'left': appLeft + 'px', 'right': appRight + 'px', 'top': appTop + 'px'
8330
+ 'width': appWidth + 'px', 'left': appLeft + 'px', 'right': appRight + 'px', 'top': appTop + 'px'
8337
8331
  });
8338
8332
  this.wireAppointmentEvents(appointmentElement, event);
8339
8333
  this.renderEventElement(event, appointmentElement, cellTd);
@@ -8341,13 +8335,6 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8341
8335
  var firstChild = this.getFirstChild(resIndex);
8342
8336
  this.updateCellHeight(firstChild, height);
8343
8337
  }
8344
- if (this.parent.activeViewOptions.option !== 'TimelineMonth' && this.parent.activeViewOptions.timeScale.enable
8345
- && appWidth_1 < this.cellWidth) {
8346
- var resizeHandlers = [].slice.call(appointmentElement.querySelectorAll('.' + EVENT_RESIZE_CLASS));
8347
- resizeHandlers.forEach(function (resizeHandler) {
8348
- resizeHandler.style.width = Math.ceil(appWidth_1 / resizeHandler.getBoundingClientRect().width) + 'px';
8349
- });
8350
- }
8351
8338
  }
8352
8339
  else {
8353
8340
  for (var i = 0; i < diffInDays; i++) {
@@ -9350,7 +9337,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9350
9337
  }
9351
9338
  else {
9352
9339
  appointmentElement.appendChild(createElement('div', { className: SUBJECT_CLASS }));
9353
- appointmentElement.firstElementChild.innerText = this_1.parent.sanitize(eventText);
9340
+ this_1.parent.sanitize(eventText, appointmentElement.firstElementChild);
9354
9341
  }
9355
9342
  if (!isNullOrUndefined(groupIndex)) {
9356
9343
  appointmentElement.setAttribute('data-group-index', groupIndex);
@@ -9610,7 +9597,7 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9610
9597
  var templateWrapper = createElement('div', { innerHTML: header });
9611
9598
  if (headerType === 'Event') {
9612
9599
  var subjectText = templateWrapper.querySelector('.' + SUBJECT_CLASS);
9613
- subjectText.innerText = this.parent.sanitize(args.eventSubject);
9600
+ this.parent.sanitize(args.eventSubject, subjectText);
9614
9601
  }
9615
9602
  append([].slice.call(templateWrapper.childNodes), headerTemplate);
9616
9603
  }
@@ -9674,19 +9661,19 @@ var QuickPopups = /** @__PURE__ @class */ (function () {
9674
9661
  if (data[this.parent.eventFields.location]) {
9675
9662
  var locationDetails = templateWrapper.querySelector('.' + LOCATION_DETAILS_CLASS);
9676
9663
  if (!isNullOrUndefined(locationDetails)) {
9677
- locationDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.location]);
9664
+ this.parent.sanitize(data[this.parent.eventFields.location], locationDetails);
9678
9665
  }
9679
9666
  }
9680
9667
  if (data[this.parent.eventFields.description]) {
9681
9668
  var descriptionDetails = templateWrapper.querySelector('.' + DESCRIPTION_DETAILS_CLASS);
9682
9669
  if (!isNullOrUndefined(descriptionDetails)) {
9683
- descriptionDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.description]);
9670
+ this.parent.sanitize(data[this.parent.eventFields.description], descriptionDetails);
9684
9671
  }
9685
9672
  }
9686
9673
  if (resourceText) {
9687
9674
  var resourceDetails = templateWrapper.querySelector('.' + RESOURCE_DETAILS_CLASS);
9688
9675
  if (!isNullOrUndefined(resourceDetails)) {
9689
- resourceDetails.innerText = this.parent.sanitize(resourceText);
9676
+ this.parent.sanitize(resourceText, resourceDetails);
9690
9677
  }
9691
9678
  }
9692
9679
  append([].slice.call(templateWrapper.childNodes), contentTemplate);
@@ -11969,6 +11956,7 @@ var EventWindow = /** @__PURE__ @class */ (function () {
11969
11956
  var element = formElements_1[_i];
11970
11957
  remove(element);
11971
11958
  }
11959
+ this.parent.resetTemplates(['editorTemplate']);
11972
11960
  }
11973
11961
  var templateId = this.parent.element.id + '_editorTemplate';
11974
11962
  var tempEle = [].slice.call(this.parent.getEditorTemplate()(args || {}, this.parent, 'editorTemplate', templateId, false));
@@ -12543,10 +12531,13 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12543
12531
  }
12544
12532
  };
12545
12533
  EventWindow.prototype.applyFormValidation = function () {
12534
+ var form = this.element.querySelector('.' + FORM_CLASS);
12535
+ if (!form) {
12536
+ return;
12537
+ }
12546
12538
  var getValidationRule = function (rules) {
12547
12539
  return (rules && Object.keys(rules).length > 0) ? rules : undefined;
12548
12540
  };
12549
- var form = this.element.querySelector('.' + FORM_CLASS);
12550
12541
  var rules = {};
12551
12542
  var subjectRule = getValidationRule(this.parent.eventSettings.fields.subject.validation);
12552
12543
  if (!isNullOrUndefined(subjectRule)) {
@@ -13377,7 +13368,8 @@ var EventWindow = /** @__PURE__ @class */ (function () {
13377
13368
  value = element.checked;
13378
13369
  }
13379
13370
  else {
13380
- value = this.parent.sanitize(element.value);
13371
+ value = this.parent.enableHtmlSanitizer ?
13372
+ SanitizeHtmlHelper.sanitize(element.value) : element.value;
13381
13373
  }
13382
13374
  }
13383
13375
  return value;
@@ -13522,6 +13514,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
13522
13514
  else if (element.classList.contains('e-multiselect')) {
13523
13515
  instance = element.ej2_instances;
13524
13516
  }
13517
+ else if (element.classList.contains('e-numerictextbox')) {
13518
+ instance = element.ej2_instances;
13519
+ }
13525
13520
  if (instance && instance[0]) {
13526
13521
  instance[0].destroy();
13527
13522
  }
@@ -14088,6 +14083,7 @@ var Render = /** @__PURE__ @class */ (function () {
14088
14083
  }
14089
14084
  }
14090
14085
  this.updateHeader();
14086
+ this.parent.currentTimezoneDate = this.parent.getCurrentTime();
14091
14087
  this.parent.activeView.renderLayout(CURRENT_PANEL_CLASS);
14092
14088
  this.parent.renderTemplates();
14093
14089
  if (this.parent.eventTooltip) {
@@ -15899,7 +15895,7 @@ var ResourceBase = /** @__PURE__ @class */ (function () {
15899
15895
  return resData[resourceLevel.idField] === resource.groupOrder[parseInt(i.toString(), 10)];
15900
15896
  });
15901
15897
  var resourceName = createElement('div', { className: RESOURCE_NAME });
15902
- resourceName.innerText = this_2.parent.sanitize(resourceText[0][resourceLevel.textField]);
15898
+ this_2.parent.sanitize(resourceText[0][resourceLevel.textField], resourceName);
15903
15899
  headerCollection.push(resourceName);
15904
15900
  var levelIcon = createElement('div', { className: 'e-icons e-icon-next' });
15905
15901
  headerCollection.push(levelIcon);
@@ -16704,17 +16700,20 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
16704
16700
  }
16705
16701
  };
16706
16702
  /**
16707
- * Method to sanitize any suspected untrusted strings and scripts before rendering them.
16703
+ * This method renders untrusted strings and scripts securely by sanitizing them first.
16708
16704
  *
16709
16705
  * @param {string} value - A string value representing the HTML string value to be sanitized.
16710
- * @returns {string} A sanitized Html string.
16706
+ * @param {HTMLElement} element - An HTML element to which the sanitized or unsanitized HTML string will be assigned.
16707
+ * @returns {void}
16711
16708
  * @private
16712
16709
  */
16713
- Schedule.prototype.sanitize = function (value) {
16710
+ Schedule.prototype.sanitize = function (value, element) {
16714
16711
  if (this.enableHtmlSanitizer) {
16715
- return SanitizeHtmlHelper.sanitize(value);
16712
+ element.innerText = SanitizeHtmlHelper.sanitize(value);
16713
+ }
16714
+ else {
16715
+ element.innerHTML = value;
16716
16716
  }
16717
- return value;
16718
16717
  };
16719
16718
  Schedule.prototype.initializeResources = function (isSetModel) {
16720
16719
  if (isSetModel === void 0) { isSetModel = false; }
@@ -17236,7 +17235,8 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17236
17235
  isIgnoreOccurrence: false, groupIndex: 0, action: false, isBlock: false, isCustomMonth: true, isPreventTimezone: false
17237
17236
  };
17238
17237
  }
17239
- this.activeCellsData = { startTime: this.getCurrentTime(), endTime: this.getCurrentTime(), isAllDay: false };
17238
+ this.currentTimezoneDate = this.getCurrentTime();
17239
+ this.activeCellsData = { startTime: new Date(this.currentTimezoneDate), endTime: new Date(this.currentTimezoneDate), isAllDay: false };
17240
17240
  this.activeEventData = { event: undefined, element: undefined };
17241
17241
  this.getDefaultLocale();
17242
17242
  this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale);
@@ -17686,7 +17686,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17686
17686
  */
17687
17687
  Schedule.prototype.getStartEndTime = function (startEndTime) {
17688
17688
  if (!isNullOrUndefined(startEndTime) && startEndTime !== '') {
17689
- var startEndDate = resetTime(this.getCurrentTime());
17689
+ var startEndDate = resetTime(new Date(this.currentTimezoneDate) || this.getCurrentTime());
17690
17690
  var timeString = startEndTime.split(':');
17691
17691
  if (timeString.length === 2) {
17692
17692
  startEndDate.setHours(parseInt(timeString[0], 10), parseInt(timeString[1], 10), 0);
@@ -22686,7 +22686,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
22686
22686
  return endHour;
22687
22687
  };
22688
22688
  ViewBase.prototype.isCurrentDate = function (date) {
22689
- return date.setHours(0, 0, 0, 0) === this.parent.getCurrentTime().setHours(0, 0, 0, 0);
22689
+ return date.setHours(0, 0, 0, 0) === new Date(this.parent.currentTimezoneDate).setHours(0, 0, 0, 0);
22690
22690
  };
22691
22691
  ViewBase.prototype.isCurrentMonth = function (date) {
22692
22692
  if (this.parent.activeViewOptions.displayDate || this.parent.activeViewOptions.numberOfWeeks > 0) {
@@ -22894,7 +22894,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
22894
22894
  }
22895
22895
  else {
22896
22896
  var resourceText = createElement('div', { className: className });
22897
- resourceText.innerText = this.parent.sanitize(tdData.resourceData[tdData.resource.textField]);
22897
+ this.parent.sanitize(tdData.resourceData[tdData.resource.textField], resourceText);
22898
22898
  tdElement.appendChild(resourceText);
22899
22899
  }
22900
22900
  };
@@ -23294,7 +23294,8 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
23294
23294
  this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
23295
23295
  return;
23296
23296
  }
23297
- if (this.parent.showTimeIndicator && this.isWorkHourRange(this.parent.getCurrentTime())) {
23297
+ var currentDate = this.parent.getCurrentTime();
23298
+ if (this.parent.showTimeIndicator && this.isWorkHourRange(currentDate)) {
23298
23299
  var currentDateIndex = this.getCurrentTimeIndicatorIndex();
23299
23300
  if (currentDateIndex.length > 0) {
23300
23301
  var workCells = [].slice.call(this.element.querySelectorAll('.' + WORK_CELLS_CLASS));
@@ -23302,7 +23303,6 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
23302
23303
  this.changeCurrentTimePosition();
23303
23304
  }
23304
23305
  if (isNullOrUndefined(this.currentTimeIndicatorTimer)) {
23305
- var currentDate = this.parent.getCurrentTime();
23306
23306
  var interval = MS_PER_MINUTE - ((currentDate.getSeconds() * 1000) + currentDate.getMilliseconds());
23307
23307
  if (interval <= (MS_PER_MINUTE - 1000)) {
23308
23308
  window.setTimeout(function () {
@@ -23329,11 +23329,12 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
23329
23329
  if (!isNullOrUndefined(this.parent.resourceBase) && (this.parent.activeViewOptions.group.resources.length > 0) &&
23330
23330
  !this.parent.uiStateValues.isGroupAdaptive) {
23331
23331
  var count = 0;
23332
+ var currentDate = resetTime(this.parent.getCurrentTime());
23332
23333
  if (this.parent.virtualScrollModule && this.parent.activeViewOptions.allowVirtualScrolling &&
23333
23334
  this.parent.activeViewOptions.group.byDate) {
23334
23335
  for (var _i = 0, _a = this.parent.resourceBase.expandedResources; _i < _a.length; _i++) {
23335
23336
  var resource = _a[_i];
23336
- if (resetTime(resource.date).getTime() === resetTime(this.parent.getCurrentTime()).getTime()) {
23337
+ if (resetTime(resource.date).getTime() === currentDate.getTime()) {
23337
23338
  currentDateIndex.push(count);
23338
23339
  }
23339
23340
  count += 1;
@@ -23342,7 +23343,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
23342
23343
  else {
23343
23344
  for (var _b = 0, _c = this.parent.resourceBase.renderedResources; _b < _c.length; _b++) {
23344
23345
  var resource = _c[_b];
23345
- var index = this.parent.getIndexOfDate(resource.renderDates, resetTime(this.parent.getCurrentTime()));
23346
+ var index = this.parent.getIndexOfDate(resource.renderDates, currentDate);
23346
23347
  if (index >= 0) {
23347
23348
  var resIndex = this.parent.activeViewOptions.group.byDate ?
23348
23349
  (this.parent.resourceBase.lastResourceLevel.length * index) + count : count + index;
@@ -24190,7 +24191,7 @@ var Month = /** @__PURE__ @class */ (function (_super) {
24190
24191
  for (var col = 0; col < count; col++) {
24191
24192
  var classList$$1 = [HEADER_CELLS_CLASS];
24192
24193
  var currentDateIndex = renderDates.slice(0, count).map(function (date) { return date.getDay(); });
24193
- if (isCurrentMonth && currentDateIndex.indexOf(this.parent.getCurrentTime().getDay()) === col) {
24194
+ if (isCurrentMonth && currentDateIndex.indexOf(this.parent.currentTimezoneDate.getDay()) === col) {
24194
24195
  classList$$1.push(CURRENT_DAY_CLASS);
24195
24196
  }
24196
24197
  dateSlots.push({ date: renderDates[parseInt(col.toString(), 10)], type: 'monthDay', className: classList$$1, colSpan: 1, workDays: workDays });
@@ -24562,7 +24563,7 @@ var Month = /** @__PURE__ @class */ (function (_super) {
24562
24563
  addClass([dateHeader], NAVIGATE_CLASS);
24563
24564
  var skeleton = 'full';
24564
24565
  var announcementText = this.parent.globalize.formatDate(data.date, { skeleton: skeleton, calendar: this.parent.getCalendarMode() });
24565
- dateHeader.setAttribute('aria-label', announcementText);
24566
+ ntd.setAttribute('aria-label', announcementText);
24566
24567
  }
24567
24568
  };
24568
24569
  Month.prototype.getMonthStart = function (currentDate) {
@@ -25275,11 +25276,11 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
25275
25276
  eventSubject += ',';
25276
25277
  }
25277
25278
  var appSubjectText = createElement('div', { className: SUBJECT_CLASS });
25278
- appSubjectText.innerText = this.parent.sanitize(eventSubject);
25279
+ this.parent.sanitize(eventSubject, appSubjectText);
25279
25280
  appSubjectWrap.appendChild(appSubjectText);
25280
25281
  if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
25281
25282
  var appLocation = createElement('div', { className: LOCATION_CLASS });
25282
- appLocation.innerText = this.parent.sanitize(eventLocation);
25283
+ this.parent.sanitize(eventLocation, appLocation);
25283
25284
  appSubjectWrap.appendChild(appLocation);
25284
25285
  }
25285
25286
  if (!isNullOrUndefined(event[fieldMapping.recurrenceRule])) {
@@ -27005,8 +27006,11 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
27005
27006
  else {
27006
27007
  isDateAvail = column >= monthStart.getDay() && date.getTime() < monthEnd.getTime();
27007
27008
  }
27009
+ var announcementText = this.parent.globalize.formatDate(date, {
27010
+ skeleton: 'full', calendar: this.parent.getCalendarMode()
27011
+ });
27008
27012
  var td = createElement('td', {
27009
- className: WORK_CELLS_CLASS, attrs: { 'aria-selected': 'false' }
27013
+ className: WORK_CELLS_CLASS, attrs: { 'aria-selected': 'false', 'aria-label': announcementText }
27010
27014
  });
27011
27015
  contentTr.appendChild(td);
27012
27016
  var dateHeader = createElement('div', {
@@ -27014,11 +27018,6 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
27014
27018
  innerHTML: (isDateAvail) ?
27015
27019
  this.parent.globalize.formatDate(date, { skeleton: 'd', calendar: this.parent.getCalendarMode() }) : ''
27016
27020
  });
27017
- var skeleton = 'full';
27018
- var announcementText = this.parent.globalize.formatDate(date, {
27019
- skeleton: skeleton, calendar: this.parent.getCalendarMode()
27020
- });
27021
- dateHeader.setAttribute('aria-label', announcementText);
27022
27021
  if (isDateAvail) {
27023
27022
  var tds = [td];
27024
27023
  var classList$$1 = [];
@@ -27766,6 +27765,8 @@ var Print = /** @__PURE__ @class */ (function () {
27766
27765
  ];
27767
27766
  var scheduleTemplates = ['cellHeaderTemplate', 'dayHeaderTemplate', 'monthHeaderTemplate', 'cellTemplate',
27768
27767
  'dateHeaderTemplate', 'dateRangeTemplate', 'eventTemplate', 'resourceHeaderTemplate', 'headerIndentTemplate'];
27768
+ var scheduleEvents = ['actionBegin', 'actionComplete', 'actionFailure', 'created', 'dataBinding', 'dataBound',
27769
+ 'destroyed', 'eventRendered', 'moreEventsClick', 'navigating', 'popupOpen', 'popupClose', 'renderCell'];
27769
27770
  var eventSettings;
27770
27771
  var group;
27771
27772
  var timeScale;
@@ -27773,12 +27774,15 @@ var Print = /** @__PURE__ @class */ (function () {
27773
27774
  for (var _i = 0, scheduleProps_1 = scheduleProps; _i < scheduleProps_1.length; _i++) {
27774
27775
  var key = scheduleProps_1[_i];
27775
27776
  switch (key) {
27776
- case 'eventSettings':
27777
+ case 'eventSettings': {
27777
27778
  eventSettings = Object.assign({}, this.parent.eventSettings.properties);
27778
27779
  eventSettings.dataSource = this.parent.eventsData;
27779
- eventSettings.template = typeof (eventSettings.template) === 'function' ? null : eventSettings.template;
27780
+ var eventTemplate = !isNullOrUndefined(printOptions.eventSettings) &&
27781
+ !isNullOrUndefined(printOptions.eventSettings.template) ? printOptions.eventSettings.template : eventSettings.template;
27782
+ eventSettings.template = typeof (eventTemplate) === 'function' ? null : eventTemplate;
27780
27783
  printModel.eventSettings = eventSettings;
27781
27784
  break;
27785
+ }
27782
27786
  case 'group':
27783
27787
  group = isNullOrUndefined(printOptions.group) ? this.parent.group : printOptions.group;
27784
27788
  group.headerTooltipTemplate = null;
@@ -27814,6 +27818,10 @@ var Print = /** @__PURE__ @class */ (function () {
27814
27818
  (typeof (printOptions["" + key]) === 'function' ? null : printOptions["" + key]);
27815
27819
  break;
27816
27820
  }
27821
+ if (scheduleEvents.indexOf(key) > -1) {
27822
+ printModel["" + key] = printOptions["" + key];
27823
+ break;
27824
+ }
27817
27825
  printModel["" + key] = isNullOrUndefined(printOptions["" + key]) ?
27818
27826
  this.parent["" + key] : printOptions["" + key];
27819
27827
  break;