@syncfusion/ej2-schedule 20.4.53 → 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 (107) hide show
  1. package/CHANGELOG.md +15 -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 +321 -134
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +356 -155
  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/schedule/actions/action-base.js +5 -0
  16. package/src/schedule/actions/crud.js +1 -0
  17. package/src/schedule/actions/data.d.ts +14 -2
  18. package/src/schedule/actions/data.js +26 -2
  19. package/src/schedule/actions/keyboard.js +10 -9
  20. package/src/schedule/base/interface.d.ts +23 -23
  21. package/src/schedule/base/resource.js +5 -6
  22. package/src/schedule/base/schedule-model.d.ts +34 -27
  23. package/src/schedule/base/schedule.d.ts +50 -27
  24. package/src/schedule/base/schedule.js +39 -7
  25. package/src/schedule/base/type.d.ts +66 -1
  26. package/src/schedule/event-renderer/agenda-base.js +6 -2
  27. package/src/schedule/event-renderer/event-base.d.ts +1 -0
  28. package/src/schedule/event-renderer/event-base.js +26 -9
  29. package/src/schedule/event-renderer/month.js +4 -5
  30. package/src/schedule/event-renderer/vertical-view.d.ts +0 -1
  31. package/src/schedule/event-renderer/vertical-view.js +6 -30
  32. package/src/schedule/event-renderer/year.d.ts +1 -0
  33. package/src/schedule/event-renderer/year.js +135 -54
  34. package/src/schedule/models/event-settings-model.d.ts +11 -2
  35. package/src/schedule/models/event-settings.d.ts +10 -2
  36. package/src/schedule/models/event-settings.js +3 -0
  37. package/src/schedule/models/fields-model.d.ts +4 -2
  38. package/src/schedule/models/fields.d.ts +6 -4
  39. package/src/schedule/models/fields.js +2 -2
  40. package/src/schedule/models/header-rows-model.d.ts +5 -5
  41. package/src/schedule/models/header-rows.d.ts +5 -5
  42. package/src/schedule/models/quick-info-templates-model.d.ts +3 -3
  43. package/src/schedule/models/quick-info-templates.d.ts +3 -3
  44. package/src/schedule/models/views-model.d.ts +16 -15
  45. package/src/schedule/models/views.d.ts +16 -15
  46. package/src/schedule/popups/event-tooltip.js +2 -1
  47. package/src/schedule/popups/event-window.js +26 -5
  48. package/src/schedule/popups/quick-popups.js +32 -10
  49. package/src/schedule/renderer/header-renderer.js +1 -0
  50. package/src/schedule/renderer/month-agenda.d.ts +2 -1
  51. package/src/schedule/renderer/month-agenda.js +5 -0
  52. package/src/schedule/renderer/month.d.ts +1 -0
  53. package/src/schedule/renderer/month.js +5 -3
  54. package/src/schedule/renderer/timeline-year.js +12 -8
  55. package/src/schedule/renderer/vertical-view.js +1 -1
  56. package/src/schedule/renderer/view-base.js +3 -4
  57. package/src/schedule/renderer/year.js +5 -1
  58. package/styles/bootstrap-dark.css +99 -89
  59. package/styles/bootstrap.css +99 -89
  60. package/styles/bootstrap4.css +99 -89
  61. package/styles/bootstrap5-dark.css +110 -100
  62. package/styles/bootstrap5.css +110 -100
  63. package/styles/fabric-dark.css +98 -88
  64. package/styles/fabric.css +98 -88
  65. package/styles/fluent-dark.css +109 -99
  66. package/styles/fluent.css +109 -99
  67. package/styles/highcontrast-light.css +98 -88
  68. package/styles/highcontrast.css +98 -88
  69. package/styles/material-dark.css +98 -88
  70. package/styles/material.css +98 -88
  71. package/styles/recurrence-editor/_bootstrap5-definition.scss +1 -1
  72. package/styles/recurrence-editor/_fluent-definition.scss +1 -1
  73. package/styles/recurrence-editor/_tailwind-definition.scss +1 -1
  74. package/styles/schedule/_bootstrap-dark-definition.scss +8 -1
  75. package/styles/schedule/_bootstrap-definition.scss +8 -1
  76. package/styles/schedule/_bootstrap4-definition.scss +7 -0
  77. package/styles/schedule/_bootstrap5-definition.scss +17 -10
  78. package/styles/schedule/_fabric-dark-definition.scss +7 -0
  79. package/styles/schedule/_fabric-definition.scss +7 -0
  80. package/styles/schedule/_fluent-definition.scss +15 -8
  81. package/styles/schedule/_fusionnew-definition.scss +7 -0
  82. package/styles/schedule/_highcontrast-definition.scss +7 -0
  83. package/styles/schedule/_highcontrast-light-definition.scss +7 -0
  84. package/styles/schedule/_layout.scss +63 -48
  85. package/styles/schedule/_material-dark-definition.scss +7 -0
  86. package/styles/schedule/_material-definition.scss +7 -0
  87. package/styles/schedule/_tailwind-definition.scss +17 -10
  88. package/styles/schedule/_theme.scss +40 -41
  89. package/styles/schedule/bootstrap-dark.css +99 -89
  90. package/styles/schedule/bootstrap.css +99 -89
  91. package/styles/schedule/bootstrap4.css +99 -89
  92. package/styles/schedule/bootstrap5-dark.css +110 -100
  93. package/styles/schedule/bootstrap5.css +110 -100
  94. package/styles/schedule/fabric-dark.css +98 -88
  95. package/styles/schedule/fabric.css +98 -88
  96. package/styles/schedule/fluent-dark.css +109 -99
  97. package/styles/schedule/fluent.css +109 -99
  98. package/styles/schedule/highcontrast-light.css +98 -88
  99. package/styles/schedule/highcontrast.css +98 -88
  100. package/styles/schedule/material-dark.css +98 -88
  101. package/styles/schedule/material.css +98 -88
  102. package/styles/schedule/tailwind-dark.css +106 -96
  103. package/styles/schedule/tailwind.css +106 -96
  104. package/styles/tailwind-dark.css +106 -96
  105. package/styles/tailwind.css +106 -96
  106. package/styles/recurrence-editor/_material3-definition.scss +0 -13
  107. package/styles/schedule/_material3-definition.scss +0 -283
@@ -184,18 +184,18 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
184
184
  /**
185
185
  * To set the active view on scheduler, the `currentView` property can be used and it usually accepts either of the following available
186
186
  * view options. The view option specified in this property will be initially loaded on the schedule.
187
- * * Day
188
- * * Week
189
- * * WorkWeek
190
- * * Month
191
- * * Year
192
- * * Agenda
193
- * * MonthAgenda
194
- * * TimelineDay
195
- * * TimelineWeek
196
- * * TimelineWorkWeek
197
- * * TimelineMonth
198
- * * TimelineYear
187
+ * * `Day`: Denotes Day view of the scheduler.
188
+ * * `Week`: Denotes Week view of the scheduler.
189
+ * * `WorkWeek`: Denotes Work Week view of the scheduler.
190
+ * * `Month`: Denotes Month view of the scheduler.
191
+ * * `Year`: Denotes Year view of the scheduler.
192
+ * * `Agenda`: Denotes Agenda view of the scheduler.
193
+ * * `MonthAgenda`: Denotes Month Agenda view of the scheduler.
194
+ * * `TimelineDay`: Denotes Timeline Day view of the scheduler.
195
+ * * `TimelineWeek`: Denotes Timeline Week view of the scheduler.
196
+ * * `TimelineWorkWeek`: Denotes Timeline Work Week view of the scheduler.
197
+ * * `TimelineMonth`: Denotes Timeline Month view of the scheduler.
198
+ * * `TimelineYear`: Denotes Timeline Year view of the scheduler.
199
199
  *
200
200
  * {% codeBlock src='schedule/currentView/index.md' %}{% endcodeBlock %}
201
201
  *
@@ -208,13 +208,12 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
208
208
  * Schedule displays all the views namely `Day`, `Week`, `Work Week`, `Month` and `Agenda`.
209
209
  *
210
210
  * Example for array of views:
211
- * {% codeBlock src="schedule/view-api/index.ts" %}{% endcodeBlock %}
211
+ * {% codeBlock src="schedule/views/index.md" %}{% endcodeBlock %}
212
212
  *
213
213
  * Example for array of view objects:
214
- * {% codeBlock src="schedule/view-api/array.ts" %}{% endcodeBlock %}
215
- * {% codeBlock src='schedule/views/index.md' %}{% endcodeBlock %}
214
+ * {% codeBlock src='schedule/viewOption/index.md' %}{% endcodeBlock %}
216
215
  *
217
- * @default '['Day', 'Week', 'WorkWeek', 'Month', 'Agenda']'
216
+ * @default '["Day", "Week", "WorkWeek", "Month", "Agenda"]'
218
217
  */
219
218
  views: View[] | ViewsModel[];
220
219
  /**
@@ -296,9 +295,9 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
296
295
  /**
297
296
  * It allows the Scheduler to display week numbers based on following available week options. The week
298
297
  * option specified in this property will be initially loaded on the schedule.
299
- * * FirstDay
300
- * * FirstFourDayWeek
301
- * * FirstFullWeek
298
+ * * `FirstDay`: Denotes that the first week of the year starts on the first day of the year and ends before the following designated first day of the week.
299
+ * * `FirstFourDayWeek`:Denotes that the first week of the year is the first week with four or more days before the designated first day of the week.
300
+ * * `FirstFullWeek`: Denotes that the first week of the year begins on the first occurrence of the designated first day of the week on or after the first day of the year.
302
301
  *
303
302
  * {% codeBlock src='schedule/weekRule/index.md' %}{% endcodeBlock %}
304
303
  *
@@ -350,6 +349,13 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
350
349
  * @default null
351
350
  */
352
351
  timeFormat: string;
352
+ /**
353
+ * Specifies whether to enable the rendering of untrusted HTML values in the Schedule component.
354
+ * When this property is enabled, the component will sanitize any suspected untrusted strings and scripts before rendering them.
355
+ *
356
+ * @default true
357
+ */
358
+ enableHtmlSanitizer: boolean;
353
359
  /**
354
360
  * When set to `true`, If valid, the scroll on the all day row is activated when the all day row
355
361
  * height reaches the max height when the all day row is expanded.
@@ -458,9 +464,9 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
458
464
  * The template option which is used to render the customized work cells on the Schedule. Here, the template accepts either
459
465
  * the string or HTMLElement as template design and then the parsed design is displayed onto the work cells.
460
466
  * The fields accessible via template are as follows.
461
- * * date
462
- * * groupIndex
463
- * * type
467
+ * * `date`: Returns the date of the cell.
468
+ * * `groupIndex`: Returns the group index of the cell.
469
+ * * `type`: Returns the type of the work cell.
464
470
  *
465
471
  * Refer to the below code snippet.
466
472
  *
@@ -628,8 +634,8 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
628
634
  * Template option to customize the resource header bar. Here, the template accepts either
629
635
  * the string or HTMLElement as template design and then the parsed design is displayed onto the resource header cells.
630
636
  * The following can be accessible via template.
631
- * * resource - All the resource fields.
632
- * * resourceData - object collection of current resource.
637
+ * * `resource` - All the resource fields.
638
+ * * `resourceData` - Object collection of current resource.
633
639
  *
634
640
  * Refer to the below code snippet.
635
641
  *
@@ -660,7 +666,7 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
660
666
  group: GroupModel;
661
667
  /**
662
668
  * Allows defining the collection of resources to be displayed on the Schedule. The resource collection needs to be defined
663
- * with unique resource names to identify it along with the respective dataSource and field mapping options.
669
+ * with unique resource names to identify it along with the respective dataSource and field mapping options.
664
670
  *
665
671
  * {% codeBlock src='schedule/resources/index.md' %}{% endcodeBlock %}
666
672
  *
@@ -669,7 +675,7 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
669
675
  resources: ResourcesModel[];
670
676
  /**
671
677
  * Allows defining the collection of custom header rows to display the year, month, week, date and hour label as an individual row
672
- * on the timeline view of the scheduler.
678
+ * on the timeline view of the scheduler.
673
679
  *
674
680
  * {% codeBlock src='schedule/headerRows/index.md' %}{% endcodeBlock %}
675
681
  *
@@ -890,7 +896,7 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
890
896
  /**
891
897
  * Method to render react templates
892
898
  *
893
- * @param {Function} callBack - specifies the callBack method
899
+ * @param {Function} callback - Specifies the callBack method
894
900
  * @returns {void}
895
901
  * @private
896
902
  */
@@ -903,6 +909,14 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
903
909
  * @private
904
910
  */
905
911
  resetTemplates(templates?: string[]): void;
912
+ /**
913
+ * Method to sanitize any suspected untrusted strings and scripts before rendering them.
914
+ *
915
+ * @param {string} value - A string value representing the HTML string value to be sanitized.
916
+ * @returns {string} A sanitized Html string.
917
+ * @private
918
+ */
919
+ sanitize(value: string): string;
906
920
  private initializeResources;
907
921
  /**
908
922
  * Method to render the layout elements
@@ -1495,6 +1509,15 @@ export declare class Schedule extends Component<HTMLElement> implements INotifyP
1495
1509
  * @returns {void}
1496
1510
  */
1497
1511
  addEvent(data: Record<string, any> | Record<string, any>[]): void;
1512
+ /**
1513
+ * Generates the occurrences of a single recurrence event based on the provided event.
1514
+ *
1515
+ * @function generateEventOccurrences
1516
+ * @param {Object} event Accepts the parent recurrence event from which the occurrences are generated.
1517
+ * @param {Date} startDate Accepts the start date for the event occurrences. If not provided, the event's start date will be used.
1518
+ * @returns {Object[]} Returns the collection of occurrence event objects.
1519
+ */
1520
+ generateEventOccurrences(event: Record<string, any>, startDate?: Date): Record<string, any>[];
1498
1521
  /**
1499
1522
  * Allows the Scheduler events data to be exported as an Excel file either in .xlsx or .csv file formats.
1500
1523
  * By default, the whole event collection bound to the Scheduler gets exported as an Excel file.
@@ -21,7 +21,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
21
21
  import { Component, Property, Event, Animation, Collection, append } from '@syncfusion/ej2-base';
22
22
  import { EventHandler, Browser, Internationalization, getDefaultDateObject, cldrData, L10n } from '@syncfusion/ej2-base';
23
23
  import { getValue, compile, extend, isNullOrUndefined, NotifyPropertyChanges, Complex } from '@syncfusion/ej2-base';
24
- import { getElement, removeClass, addClass, classList, remove } from '@syncfusion/ej2-base';
24
+ import { getElement, removeClass, addClass, classList, remove, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
25
25
  import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
26
26
  import { HeaderRenderer } from '../renderer/header-renderer';
27
27
  import { Scroll } from '../actions/scroll';
@@ -135,7 +135,7 @@ var Schedule = /** @class */ (function (_super) {
135
135
  /**
136
136
  * Method to render react templates
137
137
  *
138
- * @param {Function} callBack - specifies the callBack method
138
+ * @param {Function} callback - Specifies the callBack method
139
139
  * @returns {void}
140
140
  * @private
141
141
  */
@@ -159,6 +159,19 @@ var Schedule = /** @class */ (function (_super) {
159
159
  this.clearTemplate(templates);
160
160
  }
161
161
  };
162
+ /**
163
+ * Method to sanitize any suspected untrusted strings and scripts before rendering them.
164
+ *
165
+ * @param {string} value - A string value representing the HTML string value to be sanitized.
166
+ * @returns {string} A sanitized Html string.
167
+ * @private
168
+ */
169
+ Schedule.prototype.sanitize = function (value) {
170
+ if (this.enableHtmlSanitizer) {
171
+ return SanitizeHtmlHelper.sanitize(value);
172
+ }
173
+ return value;
174
+ };
162
175
  Schedule.prototype.initializeResources = function (isSetModel) {
163
176
  if (isSetModel === void 0) { isSetModel = false; }
164
177
  if (this.resources.length > 0) {
@@ -372,7 +385,7 @@ var Schedule = /** @class */ (function (_super) {
372
385
  followingID: this.eventSettings.fields.followingID
373
386
  };
374
387
  this.setEditorTitles();
375
- this.dataModule = new Data(this.eventSettings.dataSource, this.eventSettings.query);
388
+ this.dataModule = new Data(this, this.eventSettings.dataSource, this.eventSettings.query);
376
389
  this.crudModule = new Crud(this);
377
390
  };
378
391
  Schedule.prototype.setEditorTitles = function () {
@@ -792,7 +805,9 @@ var Schedule = /** @class */ (function (_super) {
792
805
  var selectedCells = this.getSelectedCells();
793
806
  for (var _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
794
807
  var cell = selectedCells_1[_i];
795
- cell.setAttribute('aria-selected', 'false');
808
+ if (this.currentView !== 'Year') {
809
+ cell.setAttribute('aria-selected', 'false');
810
+ }
796
811
  cell.removeAttribute('tabindex');
797
812
  }
798
813
  removeClass(selectedCells, cls.SELECTED_CELL_CLASS);
@@ -810,9 +825,11 @@ var Schedule = /** @class */ (function (_super) {
810
825
  * @private
811
826
  */
812
827
  Schedule.prototype.addSelectedClass = function (cells, focusCell, isPreventScroll) {
813
- for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
814
- var cell = cells_1[_i];
815
- cell.setAttribute('aria-selected', 'true');
828
+ if (this.currentView !== 'Year') {
829
+ for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
830
+ var cell = cells_1[_i];
831
+ cell.setAttribute('aria-selected', 'true');
832
+ }
816
833
  }
817
834
  addClass(cells, cls.SELECTED_CELL_CLASS);
818
835
  if (focusCell) {
@@ -1645,6 +1662,7 @@ var Schedule = /** @class */ (function (_super) {
1645
1662
  case 'dataSource':
1646
1663
  case 'query':
1647
1664
  case 'fields':
1665
+ case 'includeFiltersInQuery':
1648
1666
  this.initializeDataModule();
1649
1667
  state.isDataManager = true;
1650
1668
  break;
@@ -2047,6 +2065,17 @@ var Schedule = /** @class */ (function (_super) {
2047
2065
  Schedule.prototype.addEvent = function (data) {
2048
2066
  this.crudModule.addEvent(data);
2049
2067
  };
2068
+ /**
2069
+ * Generates the occurrences of a single recurrence event based on the provided event.
2070
+ *
2071
+ * @function generateEventOccurrences
2072
+ * @param {Object} event Accepts the parent recurrence event from which the occurrences are generated.
2073
+ * @param {Date} startDate Accepts the start date for the event occurrences. If not provided, the event's start date will be used.
2074
+ * @returns {Object[]} Returns the collection of occurrence event objects.
2075
+ */
2076
+ Schedule.prototype.generateEventOccurrences = function (event, startDate) {
2077
+ return (this.eventBase) ? this.eventBase.generateOccurrence(event, startDate) : [];
2078
+ };
2050
2079
  /**
2051
2080
  * Allows the Scheduler events data to be exported as an Excel file either in .xlsx or .csv file formats.
2052
2081
  * By default, the whole event collection bound to the Scheduler gets exported as an Excel file.
@@ -2722,6 +2751,9 @@ var Schedule = /** @class */ (function (_super) {
2722
2751
  __decorate([
2723
2752
  Property(null)
2724
2753
  ], Schedule.prototype, "timeFormat", void 0);
2754
+ __decorate([
2755
+ Property(true)
2756
+ ], Schedule.prototype, "enableHtmlSanitizer", void 0);
2725
2757
  __decorate([
2726
2758
  Property(false)
2727
2759
  ], Schedule.prototype, "enableAllDayScroll", void 0);
@@ -3,10 +3,35 @@
3
3
  */
4
4
  /**
5
5
  * An enum that denotes the view mode of the Scheduler.
6
+ * ```props
7
+ * Day :- Denotes Day view of the scheduler.
8
+ * Week :- Denotes Week view of the scheduler.
9
+ * WorkWeek :- Denotes Work Week view of the scheduler.
10
+ * Month :- Denotes Month view of the scheduler.
11
+ * Year :- Denotes Year view of the scheduler.
12
+ * Agenda :- Denotes Agenda view of the scheduler.
13
+ * MonthAgenda :- Denotes Month Agenda view of the scheduler.
14
+ * TimelineDay :- Denotes Timeline Day view of the scheduler.
15
+ * TimelineWeek :- Denotes Timeline Week view of the scheduler.
16
+ * TimelineWorkWeek :- Denotes Timeline Work Week view of the scheduler.
17
+ * TimelineMonth :- Denotes Timeline Month view of the scheduler.
18
+ * TimelineYear :- Denotes Timeline Year view of the scheduler.
19
+ * ```
6
20
  */
7
21
  export declare type View = 'Day' | 'Week' | 'WorkWeek' | 'Month' | 'Year' | 'Agenda' | 'MonthAgenda' | 'TimelineDay' | 'TimelineWeek' | 'TimelineWorkWeek' | 'TimelineMonth' | 'TimelineYear';
8
22
  /**
9
23
  * An enum that holds the actions available in scheduler.
24
+ * ```props
25
+ * Add :- Denotes the current action of the scheduler is appointment creation.
26
+ * Save :- Denotes the current action of the scheduler is editing the appointment.
27
+ * Delete :- Denotes the current action is deleting the appointment.
28
+ * DeleteOccurrence :- Denotes the current action is deleting single occurrence of a recurrence.
29
+ * DeleteSeries :- Denotes the current action is deleting the entire series of recurrence appointment.
30
+ * EditOccurrence :- Denotes the current action is editing single occurrence of a recurrence.
31
+ * EditSeries :- Denotes the current action is editing the entire series of recurrence appointment.
32
+ * EditFollowingEvents :- Denotes the current action is editing the following appointments in a recurrence.
33
+ * DeleteFollowingEvents :- Denotes the current action is deleting the following appointments in a recurrence.
34
+ * ```
10
35
  */
11
36
  export declare type CurrentAction = 'Add' | 'Save' | 'Delete' | 'DeleteOccurrence' | 'DeleteSeries' | 'EditOccurrence' | 'EditSeries' | 'EditFollowingEvents' | 'DeleteFollowingEvents';
12
37
  /**
@@ -18,30 +43,70 @@ export declare type ReturnType = {
18
43
  aggregates?: Record<string, any>;
19
44
  };
20
45
  /**
21
- * An enum that holds the available popup types in the scheduler.
46
+ * An enum that holds the available popup types in the scheduler. They are
47
+ * ```props
48
+ * DeleteAlert :- Denotes the popup showing delete confirmation message.
49
+ * EditEventInfo :- Denotes the quick popup on the events in responsive mode.
50
+ * Editor :- Denotes the detailed editor window.
51
+ * EventContainer :- Denotes the more indicator popup.
52
+ * QuickInfo :- Denotes the quick popup.
53
+ * RecurrenceAlert :- Denotes the popup showing recurrence alerts.
54
+ * RecurrenceValidationAlert :- Denotes the popup showing recurrence validation alerts.
55
+ * ValidationAlert :- Denotes the popup showing validation alerts.
56
+ * ViewEventInfo :- Denotes the quick popup on the cells in responsive mode.
57
+ * ```
22
58
  */
23
59
  export declare type PopupType = 'Editor' | 'EventContainer' | 'QuickInfo' | 'RecurrenceAlert' | 'DeleteAlert' | 'ViewEventInfo' | 'EditEventInfo' | 'ValidationAlert' | 'RecurrenceValidationAlert';
24
60
  /**
25
61
  * An enum that holds the header row type in the timeline scheduler.
62
+ * ```props
63
+ * Year :- Denotes the year row in the header bar.
64
+ * Month :- Denotes the month row in the header bar.
65
+ * Week :- Denotes the week row in the header bar.
66
+ * Date :- Denotes the date row in the header bar.
67
+ * Hour :- Denotes the hour row in the header bar.
68
+ * ```
26
69
  */
27
70
  export declare type HeaderRowType = 'Year' | 'Month' | 'Week' | 'Date' | 'Hour';
28
71
  /**
29
72
  * An enum that holds the orientation modes of the scheduler.
73
+ * ```props
74
+ * Vertical :- Denotes the vertical orientation of Timeline Year view.
75
+ * Horizontal :- Denotes the horizontal orientation of Timeline Year view.
76
+ * ```
30
77
  */
31
78
  export declare type Orientation = 'Vertical' | 'Horizontal';
32
79
  /**
33
80
  * An enum that holds the supported excel file formats.
81
+ * ```props
82
+ * csv :- Denotes the excel file format is csv.
83
+ * xlsx :- Denotes the excel file format is xlsx.
84
+ * ```
34
85
  */
35
86
  export declare type ExcelFormat = 'csv' | 'xlsx';
36
87
  /**
37
88
  * An enum that holds the type where the quick info template applies.
89
+ * ```props
90
+ * Both :- Denotes the template applies both to the event and cell.
91
+ * Cell :- Denotes the template applies only to the cell.
92
+ * Event :- Denotes the template applies to the event alone.
93
+ * ```
38
94
  */
39
95
  export declare type TemplateType = 'Both' | 'Cell' | 'Event';
40
96
  /**
41
97
  * An enum that holds the different type of week number options in the scheduler.
98
+ * ```props
99
+ * FirstDay :- Denotes that the first week of the year starts on the first day of the year and ends before the following designated first day of the week.
100
+ * FirstFourDayWeek :- Denotes that the first week of the year is the first week with four or more days before the designated first day of the week.
101
+ * FirstFullWeek :- Denotes that the first week of the year begins on the first occurrence of the designated first day of the week on or after the first day of the year.
102
+ * ```
42
103
  */
43
104
  export declare type WeekRule = 'FirstDay' | 'FirstFourDayWeek' | 'FirstFullWeek';
44
105
  /**
45
106
  * An enum that holds the options to render the spanned events in all day row or time slot.
107
+ * ```props
108
+ * AllDayRow :- Denotes the rendering of spanned events in an all-day row.
109
+ * TimeSlot :- Denotes the rendering of spanned events in an time slot row.
110
+ * ```
46
111
  */
47
112
  export declare type SpannedEventPlacement = 'AllDayRow' | 'TimeSlot';
@@ -110,9 +110,13 @@ var AgendaBase = /** @class */ (function (_super) {
110
110
  if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
111
111
  eventSubject += ',';
112
112
  }
113
- appSubjectWrap.appendChild(createElement('div', { className: cls.SUBJECT_CLASS, innerHTML: eventSubject }));
113
+ var appSubjectText = createElement('div', { className: cls.SUBJECT_CLASS });
114
+ appSubjectText.innerText = this.parent.sanitize(eventSubject);
115
+ appSubjectWrap.appendChild(appSubjectText);
114
116
  if (!isNullOrUndefined(eventLocation) && eventLocation !== '') {
115
- appSubjectWrap.appendChild(createElement('div', { className: cls.LOCATION_CLASS, innerHTML: eventLocation }));
117
+ var appLocation = createElement('div', { className: cls.LOCATION_CLASS });
118
+ appLocation.innerText = this.parent.sanitize(eventLocation);
119
+ appSubjectWrap.appendChild(appLocation);
116
120
  }
117
121
  if (!isNullOrUndefined(event[fieldMapping.recurrenceRule])) {
118
122
  var iconClass = (event[fieldMapping.id] === event[fieldMapping.recurrenceID]) ?
@@ -87,6 +87,7 @@ export declare class EventBase {
87
87
  updateEventMinimumDuration(startEndHours: Record<string, Date>, startTime: Date, endTime: Date): Record<string, Date>;
88
88
  createEventWrapper(type?: string, index?: number): HTMLElement;
89
89
  getPageCoordinates(e: MouseEvent & TouchEvent): (MouseEvent & TouchEvent) | Touch;
90
+ renderSpannedIcon(element: HTMLElement, spanEvent: Record<string, any>): void;
90
91
  private unWireEvents;
91
92
  destroy(): void;
92
93
  }
@@ -236,12 +236,7 @@ var EventBase = /** @class */ (function () {
236
236
  };
237
237
  EventBase.prototype.filterEvents = function (startDate, endDate, appointments, resourceTdData) {
238
238
  if (appointments === void 0) { appointments = this.parent.eventsProcessed; }
239
- var fieldMapping = this.parent.eventFields;
240
- var predicate = new Predicate(fieldMapping.startTime, 'greaterthanorequal', startDate).
241
- and(new Predicate(fieldMapping.endTime, 'greaterthanorequal', startDate)).
242
- and(new Predicate(fieldMapping.startTime, 'lessthan', endDate)).
243
- or(new Predicate(fieldMapping.startTime, 'lessthanorequal', startDate).
244
- and(new Predicate(fieldMapping.endTime, 'greaterthan', startDate)));
239
+ var predicate = this.parent.dataModule.getStartEndQuery(startDate, endDate);
245
240
  var filter = new DataManager({ json: appointments }).executeLocal(new Query().where(predicate));
246
241
  if (resourceTdData) {
247
242
  filter = this.filterEventsByResource(resourceTdData, filter);
@@ -1118,9 +1113,8 @@ var EventBase = /** @class */ (function () {
1118
1113
  templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
1119
1114
  }
1120
1115
  else {
1121
- var appointmentSubject = createElement('div', {
1122
- className: cls.SUBJECT_CLASS, innerHTML: eventSubject
1123
- });
1116
+ var appointmentSubject = createElement('div', { className: cls.SUBJECT_CLASS });
1117
+ appointmentSubject.innerText = this.parent.sanitize(eventSubject);
1124
1118
  templateElement = [appointmentSubject];
1125
1119
  }
1126
1120
  append(templateElement, appointmentWrapper);
@@ -1303,6 +1297,29 @@ var EventBase = /** @class */ (function () {
1303
1297
  return eventArgs && eventArgs.changedTouches ? eventArgs.changedTouches[0] : e.changedTouches ? e.changedTouches[0] :
1304
1298
  eventArgs || e;
1305
1299
  };
1300
+ EventBase.prototype.renderSpannedIcon = function (element, spanEvent) {
1301
+ var iconElement = createElement('div', { className: cls.EVENT_INDICATOR_CLASS + ' ' + cls.ICON });
1302
+ if (spanEvent.isLeft) {
1303
+ var iconLeft = iconElement.cloneNode();
1304
+ addClass([iconLeft], cls.EVENT_ICON_LEFT_CLASS);
1305
+ prepend([iconLeft], element);
1306
+ }
1307
+ if (spanEvent.isRight) {
1308
+ var iconRight = iconElement.cloneNode();
1309
+ addClass([iconRight], cls.EVENT_ICON_RIGHT_CLASS);
1310
+ append([iconRight], element);
1311
+ }
1312
+ if (spanEvent.isTop) {
1313
+ var iconTop = iconElement.cloneNode();
1314
+ addClass([iconTop], cls.EVENT_ICON_UP_CLASS);
1315
+ prepend([iconTop], element);
1316
+ }
1317
+ if (spanEvent.isBottom) {
1318
+ var iconBottom = iconElement.cloneNode();
1319
+ addClass([iconBottom], cls.EVENT_ICON_DOWN_CLASS);
1320
+ append([iconBottom], element);
1321
+ }
1322
+ };
1306
1323
  EventBase.prototype.unWireEvents = function () {
1307
1324
  var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
1308
1325
  for (var _i = 0, appElements_1 = appElements; _i < appElements_1.length; _i++) {
@@ -409,10 +409,8 @@ var MonthEvent = /** @class */ (function (_super) {
409
409
  }
410
410
  else {
411
411
  var eventLocation = (record[this.fields.location] || this.parent.eventSettings.fields.location.default || '');
412
- var appointmentSubject = createElement('div', {
413
- className: cls.SUBJECT_CLASS,
414
- innerHTML: (eventSubject + (eventLocation ? ';&nbsp' + eventLocation : ''))
415
- });
412
+ var appointmentSubject = createElement('div', { className: cls.SUBJECT_CLASS });
413
+ appointmentSubject.innerText = this.parent.sanitize((eventSubject + (eventLocation ? '; ' + eventLocation : '')));
416
414
  var appointmentStartTime = createElement('div', {
417
415
  className: cls.APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + cls.DISABLE_CLASS : ''),
418
416
  innerHTML: this.parent.getTimeString(eventData[this.fields.startTime])
@@ -455,7 +453,8 @@ var MonthEvent = /** @class */ (function (_super) {
455
453
  var appTime = createElement('div', {
456
454
  className: cls.APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + cls.DISABLE_CLASS : ''), innerHTML: timeString
457
455
  });
458
- var appLocation = createElement('div', { className: cls.LOCATION_CLASS, innerHTML: eventLocation });
456
+ var appLocation = createElement('div', { className: cls.LOCATION_CLASS });
457
+ appLocation.innerText = this.parent.sanitize(eventLocation);
459
458
  innerElement = [appointmentSubject, appTime, appLocation];
460
459
  }
461
460
  var wrap = createElement('div', { className: 'e-inner-wrap' });
@@ -38,7 +38,6 @@ export declare class VerticalEvent extends EventBase {
38
38
  private getResourceList;
39
39
  createAppointmentElement(record: Record<string, any>, isAllDay: boolean, data: Record<string, any>, resource: number): HTMLElement;
40
40
  private createMoreIndicator;
41
- private renderSpannedIcon;
42
41
  isSpannedEvent(record: Record<string, any>, day: number, resource: number): Record<string, any>;
43
42
  private isWorkDayAvailable;
44
43
  renderAllDayEvents(eventObj: Record<string, any>, dayIndex: number, resource: number, dayCount: number, inline?: boolean): void;
@@ -12,7 +12,7 @@ var __extends = (this && this.__extends) || (function () {
12
12
  };
13
13
  })();
14
14
  /* eslint-disable @typescript-eslint/no-explicit-any */
15
- import { append, createElement, extend, EventHandler, prepend, Animation, formatUnit } from '@syncfusion/ej2-base';
15
+ import { append, createElement, extend, EventHandler, Animation, formatUnit } from '@syncfusion/ej2-base';
16
16
  import { isNullOrUndefined, setStyleAttribute, remove, removeClass, addClass } from '@syncfusion/ej2-base';
17
17
  import { EventBase } from './event-base';
18
18
  import * as util from '../base/util';
@@ -344,7 +344,8 @@ var VerticalEvent = /** @class */ (function (_super) {
344
344
  templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
345
345
  }
346
346
  else {
347
- var appointmentSubject = createElement('div', { className: cls.SUBJECT_CLASS, innerHTML: recordSubject });
347
+ var appointmentSubject = createElement('div', { className: cls.SUBJECT_CLASS });
348
+ appointmentSubject.innerText = this.parent.sanitize(recordSubject);
348
349
  if (isAllDay) {
349
350
  if (record[fieldMapping.isAllDay]) {
350
351
  templateElement = [appointmentSubject];
@@ -376,10 +377,8 @@ var VerticalEvent = /** @class */ (function (_super) {
376
377
  className: cls.APPOINTMENT_TIME + (this.parent.isAdaptive ? ' ' + cls.DISABLE_CLASS : ''),
377
378
  innerHTML: timeStr
378
379
  });
379
- var appointmentLocation = createElement('div', {
380
- className: cls.LOCATION_CLASS,
381
- innerHTML: (record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || '')
382
- });
380
+ var appointmentLocation = createElement('div', { className: cls.LOCATION_CLASS });
381
+ appointmentLocation.innerText = this.parent.sanitize((record[fieldMapping.location] || this.parent.eventSettings.fields.location.default || ''));
383
382
  templateElement = [appointmentSubject, appointmentTime, appointmentLocation];
384
383
  }
385
384
  }
@@ -396,7 +395,7 @@ var VerticalEvent = /** @class */ (function (_super) {
396
395
  appointmentWrapper.appendChild(recurrenceIcon);
397
396
  }
398
397
  }
399
- this.renderSpannedIcon(isAllDay ? appointmentDetails : appointmentWrapper, eventData);
398
+ this.parent.eventBase.renderSpannedIcon(isAllDay ? appointmentDetails : appointmentWrapper, eventData);
400
399
  if (!isNullOrUndefined(this.cssClass)) {
401
400
  addClass([appointmentWrapper], this.cssClass);
402
401
  }
@@ -428,29 +427,6 @@ var VerticalEvent = /** @class */ (function (_super) {
428
427
  countCell.innerHTML = '+' + this.parent.globalize.formatNumber(moreCount) + '&nbsp;' + (this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant('more'));
429
428
  }
430
429
  };
431
- VerticalEvent.prototype.renderSpannedIcon = function (element, spanEvent) {
432
- var iconElement = createElement('div', { className: cls.EVENT_INDICATOR_CLASS + ' ' + cls.ICON });
433
- if (spanEvent.isLeft) {
434
- var iconLeft = iconElement.cloneNode();
435
- addClass([iconLeft], cls.EVENT_ICON_LEFT_CLASS);
436
- prepend([iconLeft], element);
437
- }
438
- if (spanEvent.isRight) {
439
- var iconRight = iconElement.cloneNode();
440
- addClass([iconRight], cls.EVENT_ICON_RIGHT_CLASS);
441
- append([iconRight], element);
442
- }
443
- if (spanEvent.isTop) {
444
- var iconTop = iconElement.cloneNode();
445
- addClass([iconTop], cls.EVENT_ICON_UP_CLASS);
446
- prepend([iconTop], element);
447
- }
448
- if (spanEvent.isBottom) {
449
- var iconBottom = iconElement.cloneNode();
450
- addClass([iconBottom], cls.EVENT_ICON_DOWN_CLASS);
451
- append([iconBottom], element);
452
- }
453
- };
454
430
  VerticalEvent.prototype.isSpannedEvent = function (record, day, resource) {
455
431
  var currentDate = util.resetTime(this.dateRender[parseInt(resource.toString(), 10)][parseInt(day.toString(), 10)]);
456
432
  var renderedDate = this.getRenderedDates(this.dateRender[parseInt(resource.toString(), 10)]) || [currentDate];
@@ -17,6 +17,7 @@ export declare class YearEvent extends TimelineEvent {
17
17
  private renderMoreIndicator;
18
18
  private createEventElement;
19
19
  isSpannedEvent(eventObj: Record<string, any>, monthDate: Date): Record<string, any>;
20
+ private updateSpannedEventDetails;
20
21
  getOverlapEvents(date: Date, appointments: Record<string, any>[]): Record<string, any>[];
21
22
  private getMonths;
22
23
  private removeCellHeight;