@syncfusion/ej2-schedule 20.4.52 → 21.1.35

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 (114) hide show
  1. package/CHANGELOG.md +30 -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 +374 -153
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +409 -174
  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 +16 -16
  13. package/src/common/calendar-util.d.ts +7 -0
  14. package/src/recurrence-editor/recurrence-editor.d.ts +10 -0
  15. package/src/recurrence-editor/recurrence-editor.js +3 -3
  16. package/src/schedule/actions/action-base.js +5 -0
  17. package/src/schedule/actions/crud.js +14 -2
  18. package/src/schedule/actions/data.d.ts +14 -2
  19. package/src/schedule/actions/data.js +26 -2
  20. package/src/schedule/actions/drag.js +6 -1
  21. package/src/schedule/actions/keyboard.d.ts +1 -1
  22. package/src/schedule/actions/keyboard.js +17 -15
  23. package/src/schedule/actions/virtual-scroll.js +2 -2
  24. package/src/schedule/base/interface.d.ts +23 -23
  25. package/src/schedule/base/resource.js +8 -7
  26. package/src/schedule/base/schedule-model.d.ts +34 -27
  27. package/src/schedule/base/schedule.d.ts +57 -27
  28. package/src/schedule/base/schedule.js +56 -9
  29. package/src/schedule/base/type.d.ts +66 -1
  30. package/src/schedule/event-renderer/agenda-base.js +6 -2
  31. package/src/schedule/event-renderer/event-base.d.ts +1 -0
  32. package/src/schedule/event-renderer/event-base.js +27 -10
  33. package/src/schedule/event-renderer/month.js +4 -5
  34. package/src/schedule/event-renderer/vertical-view.d.ts +0 -1
  35. package/src/schedule/event-renderer/vertical-view.js +6 -30
  36. package/src/schedule/event-renderer/year.d.ts +1 -0
  37. package/src/schedule/event-renderer/year.js +135 -54
  38. package/src/schedule/models/event-settings-model.d.ts +11 -2
  39. package/src/schedule/models/event-settings.d.ts +10 -2
  40. package/src/schedule/models/event-settings.js +3 -0
  41. package/src/schedule/models/fields-model.d.ts +4 -2
  42. package/src/schedule/models/fields.d.ts +6 -4
  43. package/src/schedule/models/fields.js +2 -2
  44. package/src/schedule/models/header-rows-model.d.ts +5 -5
  45. package/src/schedule/models/header-rows.d.ts +5 -5
  46. package/src/schedule/models/quick-info-templates-model.d.ts +3 -3
  47. package/src/schedule/models/quick-info-templates.d.ts +3 -3
  48. package/src/schedule/models/views-model.d.ts +16 -15
  49. package/src/schedule/models/views.d.ts +16 -15
  50. package/src/schedule/popups/event-tooltip.js +2 -1
  51. package/src/schedule/popups/event-window.js +27 -6
  52. package/src/schedule/popups/quick-popups.js +32 -10
  53. package/src/schedule/renderer/header-renderer.js +1 -0
  54. package/src/schedule/renderer/month-agenda.d.ts +2 -1
  55. package/src/schedule/renderer/month-agenda.js +5 -0
  56. package/src/schedule/renderer/month.d.ts +1 -0
  57. package/src/schedule/renderer/month.js +5 -3
  58. package/src/schedule/renderer/timeline-year.js +12 -8
  59. package/src/schedule/renderer/vertical-view.js +1 -1
  60. package/src/schedule/renderer/view-base.js +3 -4
  61. package/src/schedule/renderer/year.js +5 -1
  62. package/styles/bootstrap-dark.css +99 -89
  63. package/styles/bootstrap.css +99 -89
  64. package/styles/bootstrap4.css +99 -89
  65. package/styles/bootstrap5-dark.css +110 -100
  66. package/styles/bootstrap5.css +110 -100
  67. package/styles/fabric-dark.css +98 -88
  68. package/styles/fabric.css +98 -88
  69. package/styles/fluent-dark.css +109 -99
  70. package/styles/fluent.css +109 -99
  71. package/styles/highcontrast-light.css +98 -88
  72. package/styles/highcontrast.css +98 -88
  73. package/styles/material-dark.css +98 -88
  74. package/styles/material.css +98 -88
  75. package/styles/recurrence-editor/_bootstrap5-definition.scss +1 -1
  76. package/styles/recurrence-editor/_fluent-definition.scss +1 -1
  77. package/styles/recurrence-editor/_tailwind-definition.scss +1 -1
  78. package/styles/schedule/_bootstrap-dark-definition.scss +8 -1
  79. package/styles/schedule/_bootstrap-definition.scss +8 -1
  80. package/styles/schedule/_bootstrap4-definition.scss +7 -0
  81. package/styles/schedule/_bootstrap5-definition.scss +17 -10
  82. package/styles/schedule/_fabric-dark-definition.scss +7 -0
  83. package/styles/schedule/_fabric-definition.scss +7 -0
  84. package/styles/schedule/_fluent-definition.scss +15 -8
  85. package/styles/schedule/_fusionnew-definition.scss +7 -0
  86. package/styles/schedule/_highcontrast-definition.scss +7 -0
  87. package/styles/schedule/_highcontrast-light-definition.scss +7 -0
  88. package/styles/schedule/_layout.scss +63 -48
  89. package/styles/schedule/_material-dark-definition.scss +7 -0
  90. package/styles/schedule/_material-definition.scss +7 -0
  91. package/styles/schedule/_tailwind-definition.scss +17 -10
  92. package/styles/schedule/_theme.scss +40 -41
  93. package/styles/schedule/bootstrap-dark.css +99 -89
  94. package/styles/schedule/bootstrap.css +99 -89
  95. package/styles/schedule/bootstrap4.css +99 -89
  96. package/styles/schedule/bootstrap5-dark.css +110 -100
  97. package/styles/schedule/bootstrap5.css +110 -100
  98. package/styles/schedule/fabric-dark.css +98 -88
  99. package/styles/schedule/fabric.css +98 -88
  100. package/styles/schedule/fluent-dark.css +109 -99
  101. package/styles/schedule/fluent.css +109 -99
  102. package/styles/schedule/highcontrast-light.css +98 -88
  103. package/styles/schedule/highcontrast.css +98 -88
  104. package/styles/schedule/material-dark.css +98 -88
  105. package/styles/schedule/material.css +98 -88
  106. package/styles/schedule/tailwind-dark.css +106 -96
  107. package/styles/schedule/tailwind.css +106 -96
  108. package/styles/tailwind-dark.css +106 -96
  109. package/styles/tailwind.css +106 -96
  110. package/GitLeaksReport.json +0 -1
  111. package/gitleaks-ci/gitleaks +0 -0
  112. package/gitleaks-ci.tar.gz +0 -0
  113. package/styles/recurrence-editor/_material3-definition.scss +0 -13
  114. package/styles/schedule/_material3-definition.scss +0 -283
@@ -8,18 +8,18 @@ export interface ViewsModel {
8
8
  /**
9
9
  * It accepts the schedule view name, based on which we can define with its related properties in a single object.
10
10
  * The applicable view names are,
11
- * * Day
12
- * * Week
13
- * * WorkWeek
14
- * * Month
15
- * * Year
16
- * * Agenda
17
- * * MonthAgenda
18
- * * TimelineDay
19
- * * TimelineWeek
20
- * * TimelineWorkWeek
21
- * * TimelineMonth
22
- * * TimelineYear
11
+ * * Day - Denotes Day view of the scheduler.
12
+ * * Week - Denotes Week view of the scheduler.
13
+ * * WorkWeek - Denotes Work Week view of the scheduler.
14
+ * * Month - Denotes Month view of the scheduler.
15
+ * * Year - Denotes Year view of the scheduler.
16
+ * * Agenda - Denotes Agenda view of the scheduler.
17
+ * * MonthAgenda - Denotes Month Agenda view of the scheduler.
18
+ * * TimelineDay - Denotes Timeline Day view of the scheduler.
19
+ * * TimelineWeek - Denotes Timeline Week view of the scheduler.
20
+ * * TimelineWorkWeek - Denotes Timeline Work Week view of the scheduler.
21
+ * * TimelineMonth - Denotes Timeline Month view of the scheduler.
22
+ * * TimelineYear - Denotes Timeline Year view of the scheduler.
23
23
  *
24
24
  * @default null
25
25
  */
@@ -27,7 +27,8 @@ export interface ViewsModel {
27
27
 
28
28
  /**
29
29
  * To denote whether the view name given on the `option` is active or not.
30
- * It acts similar to the `currentView` property and defines the active view of Schedule.
30
+ * It acts similar to the [`currentView`](../../schedule/#current-view/)
31
+ * property and defines the active view of Schedule.
31
32
  *
32
33
  * @default false
33
34
  */
@@ -235,8 +236,8 @@ export interface ViewsModel {
235
236
  /**
236
237
  * It is used to specify the year view rendering orientation on the schedule.
237
238
  * The applicable orientation values are,
238
- * * Horizontal
239
- * * Vertical
239
+ * * Horizontal - Denotes the horizontal orientation of Timeline Year view.
240
+ * * Vertical - Denotes the vertical orientation of Timeline Year view.
240
241
  *
241
242
  * @default 'Horizontal'
242
243
  */
@@ -8,25 +8,26 @@ export declare class Views extends ChildProperty<Views> {
8
8
  /**
9
9
  * It accepts the schedule view name, based on which we can define with its related properties in a single object.
10
10
  * The applicable view names are,
11
- * * Day
12
- * * Week
13
- * * WorkWeek
14
- * * Month
15
- * * Year
16
- * * Agenda
17
- * * MonthAgenda
18
- * * TimelineDay
19
- * * TimelineWeek
20
- * * TimelineWorkWeek
21
- * * TimelineMonth
22
- * * TimelineYear
11
+ * * Day - Denotes Day view of the scheduler.
12
+ * * Week - Denotes Week view of the scheduler.
13
+ * * WorkWeek - Denotes Work Week view of the scheduler.
14
+ * * Month - Denotes Month view of the scheduler.
15
+ * * Year - Denotes Year view of the scheduler.
16
+ * * Agenda - Denotes Agenda view of the scheduler.
17
+ * * MonthAgenda - Denotes Month Agenda view of the scheduler.
18
+ * * TimelineDay - Denotes Timeline Day view of the scheduler.
19
+ * * TimelineWeek - Denotes Timeline Week view of the scheduler.
20
+ * * TimelineWorkWeek - Denotes Timeline Work Week view of the scheduler.
21
+ * * TimelineMonth - Denotes Timeline Month view of the scheduler.
22
+ * * TimelineYear - Denotes Timeline Year view of the scheduler.
23
23
  *
24
24
  * @default null
25
25
  */
26
26
  option: View;
27
27
  /**
28
28
  * To denote whether the view name given on the `option` is active or not.
29
- * It acts similar to the `currentView` property and defines the active view of Schedule.
29
+ * It acts similar to the [`currentView`](../../schedule/#current-view/)
30
+ * property and defines the active view of Schedule.
30
31
  *
31
32
  * @default false
32
33
  */
@@ -210,8 +211,8 @@ export declare class Views extends ChildProperty<Views> {
210
211
  /**
211
212
  * It is used to specify the year view rendering orientation on the schedule.
212
213
  * The applicable orientation values are,
213
- * * Horizontal
214
- * * Vertical
214
+ * * Horizontal - Denotes the horizontal orientation of Timeline Year view.
215
+ * * Vertical - Denotes the vertical orientation of Timeline Year view.
215
216
  *
216
217
  * @default 'Horizontal'
217
218
  */
@@ -20,7 +20,8 @@ var EventTooltip = /** @class */ (function () {
20
20
  target: this.getTargets(),
21
21
  beforeRender: this.onBeforeRender.bind(this),
22
22
  beforeClose: this.onBeforeClose.bind(this),
23
- enableRtl: this.parent.enableRtl
23
+ enableRtl: this.parent.enableRtl,
24
+ enableHtmlSanitizer: this.parent.enableHtmlSanitizer
24
25
  });
25
26
  this.tooltipObj.appendTo(this.parent.element);
26
27
  }
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import { createElement, isNullOrUndefined, addClass, remove, EventHandler, extend, append, detach } from '@syncfusion/ej2-base';
3
- import { cldrData, removeClass, getValue, getDefaultDateObject, closest, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
3
+ import { cldrData, removeClass, getValue, getDefaultDateObject, closest } from '@syncfusion/ej2-base';
4
4
  import { Query, Deferred } from '@syncfusion/ej2-data';
5
5
  import { CheckBox, Button } from '@syncfusion/ej2-buttons';
6
6
  import { Dialog } from '@syncfusion/ej2-popups';
@@ -37,6 +37,7 @@ var EventWindow = /** @class */ (function () {
37
37
  content: this.getEventWindowContent(),
38
38
  cssClass: cls.EVENT_WINDOW_DIALOG_CLASS,
39
39
  enableRtl: this.parent.enableRtl,
40
+ enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
40
41
  height: this.parent.isAdaptive ? '100%' : 'auto',
41
42
  minHeight: '300px',
42
43
  isModal: true,
@@ -247,6 +248,10 @@ var EventWindow = /** @class */ (function () {
247
248
  var _this = this;
248
249
  if (!isNullOrUndefined(this.parent.editorTemplate)) {
249
250
  if (args) {
251
+ if (this.fieldValidator) {
252
+ this.fieldValidator.destroy();
253
+ this.fieldValidator = null;
254
+ }
250
255
  if (this.recurrenceEditor) {
251
256
  this.recurrenceEditor.destroy();
252
257
  this.recurrenceEditor = null;
@@ -329,7 +334,7 @@ var EventWindow = /** @class */ (function () {
329
334
  return parentDiv;
330
335
  };
331
336
  EventWindow.prototype.createRecurrenceEditor = function (parentDiv) {
332
- var recurrenceEditor = this.createDivElement();
337
+ var recurrenceEditor = createElement('div', { id: this.parent.element.id + '_recurrence_editor' });
333
338
  parentDiv.appendChild(recurrenceEditor);
334
339
  this.recurrenceEditor = this.renderRecurrenceEditor();
335
340
  this.recurrenceEditor.appendTo(recurrenceEditor);
@@ -422,6 +427,7 @@ var EventWindow = /** @class */ (function () {
422
427
  if (resourceData.allowMultiple) {
423
428
  var listObj = new MultiSelect({
424
429
  enableRtl: this.parent.enableRtl,
430
+ enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
425
431
  cssClass: this.parent.cssClass || '',
426
432
  dataSource: resourceData.dataSource,
427
433
  change: this.onMultiselectResourceChange.bind(this),
@@ -568,6 +574,7 @@ var EventWindow = /** @class */ (function () {
568
574
  change: this.onChange.bind(this),
569
575
  cssClass: value + ' ' + this.parent.cssClass,
570
576
  enableRtl: this.parent.enableRtl,
577
+ enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
571
578
  label: this.getFieldLabel(value)
572
579
  });
573
580
  checkBox.appendTo(checkBoxInput);
@@ -694,6 +701,7 @@ var EventWindow = /** @class */ (function () {
694
701
  target: this.element,
695
702
  animationSettings: { effect: 'Zoom' },
696
703
  enableRtl: this.parent.enableRtl,
704
+ enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
697
705
  isModal: true,
698
706
  cssClass: REPEAT_DIALOG_CLASS,
699
707
  open: this.repeatOpenDialog.bind(this)
@@ -761,6 +769,9 @@ var EventWindow = /** @class */ (function () {
761
769
  if (!this.parent.eventSettings.allowAdding) {
762
770
  return;
763
771
  }
772
+ if (this.parent.isAdaptive && repeatType && !this.repeatDialogObject) {
773
+ this.renderRepeatDialog();
774
+ }
764
775
  this.element.querySelector('.' + cls.FORM_CLASS).removeAttribute('data-id');
765
776
  this.element.querySelector('.' + cls.EVENT_WINDOW_TITLE_TEXT_CLASS).innerHTML = this.l10n.getConstant('newEvent');
766
777
  eventObj.Timezone = false;
@@ -790,10 +801,18 @@ var EventWindow = /** @class */ (function () {
790
801
  selectedType: !isNullOrUndefined(repeatType) ? repeatType : !isNullOrUndefined(eventObj[this.fields.recurrenceRule]) ?
791
802
  this.recurrenceEditor.selectedType : 0
792
803
  });
804
+ this.repeatRule = this.recurrenceEditor.value;
793
805
  }
794
806
  if (this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate)) {
795
807
  var element = this.element.querySelector('.' + REPEAT_CONTAINER_CLASS);
796
- addClass([element], HIDE_STYLE_CLASS);
808
+ if (eventObj[this.fields.recurrenceRule] || repeatType) {
809
+ removeClass([element], HIDE_STYLE_CLASS);
810
+ this.repeatStatus.setProperties({ checked: true });
811
+ }
812
+ else {
813
+ addClass([element], HIDE_STYLE_CLASS);
814
+ this.repeatStatus.setProperties({ checked: false });
815
+ }
797
816
  this.updateRepeatLabel(this.repeatRule);
798
817
  }
799
818
  else {
@@ -1448,9 +1467,11 @@ var EventWindow = /** @class */ (function () {
1448
1467
  }
1449
1468
  var currentStartTime = new Date(+currentData[this.fields.startTime]);
1450
1469
  var currentEndTime = new Date(+currentData[this.fields.endTime]);
1470
+ var nextStartTime;
1471
+ var nextEndTime;
1451
1472
  if (index !== recurColl.length - 1) {
1452
- var nextStartTime = new Date(+recurColl[index + 1][this.fields.startTime]);
1453
- var nextEndTime = new Date(+recurColl[index + 1][this.fields.endTime]);
1473
+ nextStartTime = new Date(+recurColl[index + 1][this.fields.startTime]);
1474
+ nextEndTime = new Date(+recurColl[index + 1][this.fields.endTime]);
1454
1475
  }
1455
1476
  var lastEndTime = new Date(+recurColl[recurColl.length - 1][this.fields.endTime]);
1456
1477
  if (index === 0) {
@@ -1649,7 +1670,7 @@ var EventWindow = /** @class */ (function () {
1649
1670
  value = element.checked;
1650
1671
  }
1651
1672
  else {
1652
- value = SanitizeHtmlHelper.sanitize(element.value);
1673
+ value = this.parent.sanitize(element.value);
1653
1674
  }
1654
1675
  }
1655
1676
  return value;
@@ -103,6 +103,7 @@ var QuickPopups = /** @class */ (function () {
103
103
  cssClass: cls.QUICK_DIALOG_CLASS,
104
104
  closeOnEscape: true,
105
105
  enableRtl: this.parent.enableRtl,
106
+ enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
106
107
  beforeClose: this.beforeQuickDialogClose.bind(this),
107
108
  isModal: true,
108
109
  position: { X: 'center', Y: 'center' },
@@ -134,6 +135,7 @@ var QuickPopups = /** @class */ (function () {
134
135
  cssClass: className,
135
136
  disabled: isDisabled,
136
137
  enableRtl: this.parent.enableRtl,
138
+ enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
137
139
  iconCss: iconName
138
140
  });
139
141
  buttonObj.appendTo(element);
@@ -329,7 +331,8 @@ var QuickPopups = /** @class */ (function () {
329
331
  append(templateElement, appointmentElement);
330
332
  }
331
333
  else {
332
- appointmentElement.appendChild(createElement('div', { className: cls.SUBJECT_CLASS, innerHTML: eventText }));
334
+ appointmentElement.appendChild(createElement('div', { className: cls.SUBJECT_CLASS }));
335
+ appointmentElement.firstElementChild.innerText = this_1.parent.sanitize(eventText);
333
336
  }
334
337
  if (!isNullOrUndefined(groupIndex)) {
335
338
  appointmentElement.setAttribute('data-group-index', groupIndex);
@@ -583,10 +586,14 @@ var QuickPopups = /** @class */ (function () {
583
586
  ("<button class=\"" + (cls.DELETE_CLASS + ' ' + cls.ICON) + "\" title=\"" + this.l10n.getConstant('delete') + "\"></button>") +
584
587
  ("<button class=\"" + cls.CLOSE_CLASS + "\" title=\"" + this.l10n.getConstant('close') + "\"></button></div>") +
585
588
  ("<div class=\"" + cls.SUBJECT_WRAP + "\"><div class=\"" + cls.SUBJECT_CLASS + " " + cls.TEXT_ELLIPSIS + "\" ") +
586
- ("title=\"" + (args.eventSubject ? args.eventSubject.replaceAll('"', '\'') : args.eventSubject) + "\">" + args.eventSubject + "</div></div >");
589
+ ("title=\"" + (args.eventSubject ? args.eventSubject.replaceAll('"', '\'') : args.eventSubject) + "\"></div></div >");
587
590
  break;
588
591
  }
589
592
  var templateWrapper = createElement('div', { innerHTML: header });
593
+ if (headerType === 'Event') {
594
+ var subjectText = templateWrapper.querySelector('.' + cls.SUBJECT_CLASS);
595
+ subjectText.innerText = this.parent.sanitize(args.eventSubject);
596
+ }
590
597
  append([].slice.call(templateWrapper.childNodes), headerTemplate);
591
598
  }
592
599
  return headerTemplate;
@@ -614,7 +621,7 @@ var QuickPopups = /** @class */ (function () {
614
621
  (cls.TEXT_ELLIPSIS + "\">" + cellDetails.details + "</div></div>") +
615
622
  ((this.parent.activeViewOptions.group.resources.length > 0 ? "<div class=\"" + cls.RESOURCE_CLASS + "\">" +
616
623
  ("<div class=\"" + cls.RESOURCE_ICON_CLASS + " " + cls.ICON + " \"></div><div class=\"" + cls.RESOURCE_DETAILS_CLASS + " ") +
617
- (cls.TEXT_ELLIPSIS + "\">" + resourceText + "</div></div>") : '') + "</td></tr></tbody></table>");
624
+ (cls.TEXT_ELLIPSIS + "\"></div></div>") : '') + "</td></tr></tbody></table>");
618
625
  break;
619
626
  case 'Event':
620
627
  argsData = this.getFormattedString(data);
@@ -628,8 +635,7 @@ var QuickPopups = /** @class */ (function () {
628
635
  content += '</div></div>';
629
636
  if (data[this.parent.eventFields.location]) {
630
637
  content += '<div class="' + cls.LOCATION_CLASS + '"><div class="' + cls.LOCATION_ICON_CLASS + ' ' +
631
- cls.ICON + '"></div><div class="' + cls.LOCATION_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '">' +
632
- data[this.parent.eventFields.location] + '</div></div>';
638
+ cls.ICON + '"></div><div class="' + cls.LOCATION_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '"></div></div>';
633
639
  }
634
640
  if (data[this.parent.eventFields.startTimezone] || data[this.parent.eventFields.endTimezone]) {
635
641
  content += '<div class="' + cls.TIME_ZONE_CLASS + '"><div class="' + cls.TIME_ZONE_ICON_CLASS + ' ' + cls.ICON +
@@ -638,17 +644,33 @@ var QuickPopups = /** @class */ (function () {
638
644
  }
639
645
  if (data[this.parent.eventFields.description]) {
640
646
  content += '<div class="' + cls.DESCRIPTION_CLASS + '"><div class="' + cls.DESCRIPTION_ICON_CLASS + ' ' + cls.ICON +
641
- '"></div><div class="' + cls.DESCRIPTION_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '">' +
642
- data[this.parent.eventFields.description] + '</div></div>';
647
+ '"></div><div class="' + cls.DESCRIPTION_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '"></div></div>';
643
648
  }
644
649
  if (this.parent.resourceCollection.length > 0) {
645
650
  content += '<div class="' + cls.RESOURCE_CLASS + '"><div class="' + cls.RESOURCE_ICON_CLASS + ' ' + cls.ICON +
646
- '"></div><div class="' + cls.RESOURCE_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '">' +
647
- resourceText + '</div></div>';
651
+ '"></div><div class="' + cls.RESOURCE_DETAILS_CLASS + ' ' + cls.TEXT_ELLIPSIS + '"></div></div>';
648
652
  }
649
653
  break;
650
654
  }
651
655
  var templateWrapper = createElement('div', { innerHTML: content });
656
+ if (data[this.parent.eventFields.location]) {
657
+ var locationDetails = templateWrapper.querySelector('.' + cls.LOCATION_DETAILS_CLASS);
658
+ if (!isNullOrUndefined(locationDetails)) {
659
+ locationDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.location]);
660
+ }
661
+ }
662
+ if (data[this.parent.eventFields.description]) {
663
+ var descriptionDetails = templateWrapper.querySelector('.' + cls.DESCRIPTION_DETAILS_CLASS);
664
+ if (!isNullOrUndefined(descriptionDetails)) {
665
+ descriptionDetails.innerText = this.parent.sanitize(data[this.parent.eventFields.description]);
666
+ }
667
+ }
668
+ if (resourceText) {
669
+ var resourceDetails = templateWrapper.querySelector('.' + cls.RESOURCE_DETAILS_CLASS);
670
+ if (!isNullOrUndefined(resourceDetails)) {
671
+ resourceDetails.innerText = this.parent.sanitize(resourceText);
672
+ }
673
+ }
652
674
  append([].slice.call(templateWrapper.childNodes), contentTemplate);
653
675
  }
654
676
  return contentTemplate;
@@ -1186,7 +1208,7 @@ var QuickPopups = /** @class */ (function () {
1186
1208
  };
1187
1209
  QuickPopups.prototype.quickPopupClose = function () {
1188
1210
  this.parent.eventBase.focusElement();
1189
- this.quickPopup.relateTo = cls.WORK_CELLS_CLASS;
1211
+ this.quickPopup.relateTo = '.' + cls.WORK_CELLS_CLASS;
1190
1212
  this.fieldValidator.destroyToolTip();
1191
1213
  if (this.quickPopup.element.querySelectorAll('.e-formvalidator').length) {
1192
1214
  this.fieldValidator.destroy();
@@ -70,6 +70,7 @@ var HeaderRenderer = /** @class */ (function () {
70
70
  overflowMode: 'Popup',
71
71
  clicked: _this.toolbarClickHandler.bind(_this),
72
72
  enableRtl: _this.parent.enableRtl,
73
+ enableHtmlSanitizer: _this.parent.enableHtmlSanitizer,
73
74
  locale: _this.parent.locale
74
75
  });
75
76
  _this.toolbarObj.appendTo(_this.parent.element.querySelector('.' + cls.HEADER_TOOLBAR));
@@ -1,4 +1,4 @@
1
- import { CellClickEventArgs, NotifyEventArgs } from '../base/interface';
1
+ import { CellClickEventArgs, NotifyEventArgs, TdData } from '../base/interface';
2
2
  import { AgendaBase } from '../event-renderer/agenda-base';
3
3
  import { Schedule } from '../base/schedule';
4
4
  import { Month } from './month';
@@ -14,6 +14,7 @@ export declare class MonthAgenda extends Month {
14
14
  protected getModuleName(): string;
15
15
  renderAppointmentContainer(): void;
16
16
  getDayNameFormat(): string;
17
+ updateSelectedCellClass(data: TdData): void;
17
18
  private setEventWrapperHeight;
18
19
  onDataReady(args: NotifyEventArgs): void;
19
20
  onCellClick(event: CellClickEventArgs): void;
@@ -48,6 +48,11 @@ var MonthAgenda = /** @class */ (function (_super) {
48
48
  }
49
49
  return 'abbreviated';
50
50
  };
51
+ MonthAgenda.prototype.updateSelectedCellClass = function (data) {
52
+ if (util.resetTime(data.date).getTime() === util.resetTime(this.monthAgendaDate).getTime()) {
53
+ data.className.push(cls.SELECTED_CELL_CLASS);
54
+ }
55
+ };
51
56
  MonthAgenda.prototype.setEventWrapperHeight = function () {
52
57
  var headerHeight = (this.parent.headerModule ? this.parent.headerModule.getHeaderElement().offsetHeight : 0) + 2;
53
58
  var resourceWrapper = this.parent.element.querySelector('.' + cls.RESOURCE_HEADER_TOOLBAR);
@@ -36,6 +36,7 @@ export declare class Month extends ViewBase implements IRenderer {
36
36
  private createHeaderCell;
37
37
  getContentSlots(): TdData[][];
38
38
  updateClassList(data: TdData): void;
39
+ updateSelectedCellClass(data: TdData): void;
39
40
  private isOtherMonth;
40
41
  renderContentArea(): Element;
41
42
  getContentRows(): Element[];
@@ -444,9 +444,11 @@ var Month = /** @class */ (function (_super) {
444
444
  if (!this.parent.isMinMaxDate(data.date)) {
445
445
  data.className.push(cls.DISABLE_DATES);
446
446
  }
447
- if (this.parent.currentView === 'MonthAgenda' && this.parent.isSelectedDate(data.date)) {
448
- data.className.push(cls.SELECTED_CELL_CLASS);
449
- }
447
+ this.updateSelectedCellClass(data);
448
+ };
449
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
450
+ Month.prototype.updateSelectedCellClass = function (data) {
451
+ return;
450
452
  };
451
453
  Month.prototype.isOtherMonth = function (date) {
452
454
  return date.getTime() < this.monthDates.start.getTime() || date.getTime() > this.monthDates.end.getTime();
@@ -171,15 +171,15 @@ var TimelineYear = /** @class */ (function (_super) {
171
171
  this.parent.virtualScrollModule.renderVirtualTrack(content);
172
172
  }
173
173
  var contentTBody = contentTable.querySelector('tbody');
174
- if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
175
- if (this.parent.rowAutoHeight) {
176
- var addClassTable = [contentTable];
177
- var monthHeader = this.parent.element.querySelector('.' + cls.MONTH_HEADER_WRAPPER + ' .' + cls.SCHEDULE_TABLE_CLASS);
178
- if (monthHeader) {
179
- addClassTable.push(monthHeader);
180
- }
181
- addClass(addClassTable, cls.AUTO_HEIGHT);
174
+ if (this.parent.rowAutoHeight) {
175
+ var addClassTable = [contentTable];
176
+ var monthHeader = this.parent.element.querySelector('.' + cls.MONTH_HEADER_WRAPPER + ' .' + cls.SCHEDULE_TABLE_CLASS);
177
+ if (monthHeader) {
178
+ addClassTable.push(monthHeader);
182
179
  }
180
+ addClass(addClassTable, cls.AUTO_HEIGHT);
181
+ }
182
+ if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
183
183
  var colCount = this.parent.activeViewOptions.orientation === 'Horizontal' ? this.colLevels.slice(-1)[0].length : this.columnCount;
184
184
  contentTable.appendChild(this.createTableColGroup(colCount));
185
185
  this.renderResourceContent(eventWrapper, monthTBody, contentTBody);
@@ -281,6 +281,9 @@ var TimelineYear = /** @class */ (function (_super) {
281
281
  if (td.classList.contains(cls.OTHERMONTH_CLASS)) {
282
282
  continue;
283
283
  }
284
+ else {
285
+ this.renderDates.push(new Date(date));
286
+ }
284
287
  td.appendChild(dateHeader);
285
288
  if (isDateAvail) {
286
289
  td.setAttribute('data-date', date.getTime().toString());
@@ -295,6 +298,7 @@ var TimelineYear = /** @class */ (function (_super) {
295
298
  }
296
299
  }
297
300
  }
301
+ this.renderDates.splice(0, 1);
298
302
  };
299
303
  TimelineYear.prototype.getContentRows = function () {
300
304
  var tRow = [];
@@ -93,8 +93,8 @@ var VerticalView = /** @class */ (function (_super) {
93
93
  var content = this.getScrollableElement();
94
94
  var header = this.getDatesHeaderElement();
95
95
  var scrollerHeight = this.parent.element.offsetHeight - headerBarHeight - header.offsetHeight;
96
- this.setColWidth(content);
97
96
  this.setContentHeight(content, timeCells, scrollerHeight);
97
+ this.setColWidth(content);
98
98
  var scrollBarWidth = util.getScrollBarWidth();
99
99
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
100
100
  header.firstElementChild.style[args.cssProperties.rtlBorder] = '';
@@ -424,9 +424,9 @@ var ViewBase = /** @class */ (function () {
424
424
  append(quickTemplate, tdElement);
425
425
  }
426
426
  else {
427
- tdElement.appendChild(createElement('div', {
428
- className: className, innerHTML: tdData.resourceData[tdData.resource.textField]
429
- }));
427
+ var resourceText = createElement('div', { className: className });
428
+ resourceText.innerText = this.parent.sanitize(tdData.resourceData[tdData.resource.textField]);
429
+ tdElement.appendChild(resourceText);
430
430
  }
431
431
  };
432
432
  ViewBase.prototype.renderResourceMobileLayout = function () {
@@ -450,7 +450,6 @@ var ViewBase = /** @class */ (function () {
450
450
  var colElements = this.getColElements();
451
451
  var contentBody = this.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody');
452
452
  var colWidth_1 = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
453
- colElements.forEach(function (col) { return setStyleAttribute(col, { 'width': formatUnit(colWidth_1) }); });
454
453
  if (content.offsetHeight !== content.clientHeight) {
455
454
  var resourceColumn = this.parent.element.querySelector('.' + cls.RESOURCE_COLUMN_WRAP_CLASS);
456
455
  if (!isNullOrUndefined(resourceColumn)) {
@@ -89,6 +89,7 @@ var Year = /** @class */ (function (_super) {
89
89
  calendarElement.appendChild(this.renderCalendarContent(currentMonth));
90
90
  calendarWrapper.appendChild(calendarElement);
91
91
  }
92
+ this.renderDates.splice(0, 1);
92
93
  };
93
94
  Year.prototype.renderCalendarHeader = function (currentDate) {
94
95
  var headerWrapper = createElement('div', { className: 'e-header e-month' });
@@ -148,7 +149,7 @@ var Year = /** @class */ (function (_super) {
148
149
  var date = weekDates_1[_i];
149
150
  var td = createElement('td', {
150
151
  className: 'e-cell ' + cls.WORK_CELLS_CLASS,
151
- attrs: { 'aria-selected': 'false', 'data-date': date.getTime().toString() }
152
+ attrs: { 'data-date': date.getTime().toString() }
152
153
  });
153
154
  if (this.parent.activeViewOptions.cellHeaderTemplate) {
154
155
  var args = { date: date, type: 'monthCells' };
@@ -176,6 +177,9 @@ var Year = /** @class */ (function (_super) {
176
177
  addClass([td], classList);
177
178
  }
178
179
  tr_1.appendChild(td);
180
+ if (currentDate.getMonth() === date.getMonth()) {
181
+ this.renderDates.push(new Date(date));
182
+ }
179
183
  if (!this.parent.isMinMaxDate(date)) {
180
184
  addClass([td], cls.DISABLE_DATES);
181
185
  }