@syncfusion/ej2-schedule 19.2.60 → 19.3.48

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 (125) hide show
  1. package/.eslintrc.json +1 -1
  2. package/CHANGELOG.md +65 -0
  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 +445 -164
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +456 -172
  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 +15 -15
  13. package/src/schedule/actions/action-base.js +1 -1
  14. package/src/schedule/actions/crud.js +3 -2
  15. package/src/schedule/actions/drag.d.ts +2 -0
  16. package/src/schedule/actions/drag.js +27 -17
  17. package/src/schedule/actions/keyboard.js +5 -5
  18. package/src/schedule/actions/resize.js +17 -10
  19. package/src/schedule/actions/virtual-scroll.js +2 -1
  20. package/src/schedule/base/interface.d.ts +9 -0
  21. package/src/schedule/base/resource.js +12 -3
  22. package/src/schedule/base/schedule-model.d.ts +13 -1
  23. package/src/schedule/base/schedule.d.ts +45 -2
  24. package/src/schedule/base/schedule.js +139 -14
  25. package/src/schedule/base/type.d.ts +4 -0
  26. package/src/schedule/event-renderer/event-base.d.ts +2 -1
  27. package/src/schedule/event-renderer/event-base.js +42 -28
  28. package/src/schedule/event-renderer/month.d.ts +0 -1
  29. package/src/schedule/event-renderer/month.js +32 -33
  30. package/src/schedule/event-renderer/timeline-view.d.ts +2 -0
  31. package/src/schedule/event-renderer/timeline-view.js +31 -1
  32. package/src/schedule/event-renderer/vertical-view.js +26 -19
  33. package/src/schedule/event-renderer/year.js +4 -1
  34. package/src/schedule/models/event-settings-model.d.ts +21 -1
  35. package/src/schedule/models/event-settings.d.ts +20 -0
  36. package/src/schedule/models/event-settings.js +6 -0
  37. package/src/schedule/models/views-model.d.ts +9 -0
  38. package/src/schedule/models/views.d.ts +8 -0
  39. package/src/schedule/models/views.js +3 -0
  40. package/src/schedule/popups/event-window.d.ts +3 -2
  41. package/src/schedule/popups/event-window.js +7 -3
  42. package/src/schedule/popups/form-validator.js +4 -1
  43. package/src/schedule/popups/quick-popups.d.ts +3 -2
  44. package/src/schedule/popups/quick-popups.js +32 -13
  45. package/src/schedule/renderer/agenda.d.ts +1 -0
  46. package/src/schedule/renderer/agenda.js +20 -3
  47. package/src/schedule/renderer/header-renderer.d.ts +1 -0
  48. package/src/schedule/renderer/header-renderer.js +6 -1
  49. package/src/schedule/renderer/month.d.ts +1 -0
  50. package/src/schedule/renderer/month.js +7 -7
  51. package/src/schedule/renderer/timeline-year.js +8 -2
  52. package/src/schedule/renderer/vertical-view.d.ts +2 -0
  53. package/src/schedule/renderer/vertical-view.js +19 -8
  54. package/src/schedule/renderer/view-base.d.ts +2 -1
  55. package/src/schedule/renderer/view-base.js +11 -3
  56. package/styles/bootstrap-dark.css +48 -66
  57. package/styles/bootstrap.css +28 -45
  58. package/styles/bootstrap4.css +28 -44
  59. package/styles/bootstrap5-dark.css +5172 -0
  60. package/styles/bootstrap5-dark.scss +2 -0
  61. package/styles/bootstrap5.css +5173 -0
  62. package/styles/bootstrap5.scss +2 -0
  63. package/styles/fabric-dark.css +29 -61
  64. package/styles/fabric.css +28 -45
  65. package/styles/highcontrast-light.css +28 -76
  66. package/styles/highcontrast.css +30 -49
  67. package/styles/material-dark.css +72 -79
  68. package/styles/material.css +32 -45
  69. package/styles/recurrence-editor/_bootstrap5-dark-definition.scss +1 -0
  70. package/styles/recurrence-editor/_bootstrap5-definition.scss +8 -0
  71. package/styles/recurrence-editor/_layout.scss +0 -4
  72. package/styles/recurrence-editor/_tailwind-dark-definition.scss +1 -8
  73. package/styles/recurrence-editor/_tailwind-definition.scss +8 -8
  74. package/styles/recurrence-editor/bootstrap-dark.css +0 -4
  75. package/styles/recurrence-editor/bootstrap.css +0 -4
  76. package/styles/recurrence-editor/bootstrap4.css +0 -4
  77. package/styles/recurrence-editor/bootstrap5-dark.css +479 -0
  78. package/styles/recurrence-editor/bootstrap5-dark.scss +3 -0
  79. package/styles/recurrence-editor/bootstrap5.css +479 -0
  80. package/styles/recurrence-editor/bootstrap5.scss +3 -0
  81. package/styles/recurrence-editor/fabric-dark.css +0 -4
  82. package/styles/recurrence-editor/fabric.css +0 -4
  83. package/styles/recurrence-editor/highcontrast-light.css +0 -4
  84. package/styles/recurrence-editor/highcontrast.css +0 -4
  85. package/styles/recurrence-editor/material-dark.css +0 -4
  86. package/styles/recurrence-editor/material.css +0 -4
  87. package/styles/recurrence-editor/tailwind-dark.css +0 -4
  88. package/styles/recurrence-editor/tailwind.css +0 -4
  89. package/styles/schedule/_bootstrap-dark-definition.scss +6 -6
  90. package/styles/schedule/_bootstrap-definition.scss +2 -2
  91. package/styles/schedule/_bootstrap4-definition.scss +6 -5
  92. package/styles/schedule/_bootstrap5-dark-definition.scss +1 -0
  93. package/styles/schedule/_bootstrap5-definition.scss +198 -0
  94. package/styles/schedule/_fabric-dark-definition.scss +3 -3
  95. package/styles/schedule/_fabric-definition.scss +2 -2
  96. package/styles/schedule/_highcontrast-definition.scss +3 -3
  97. package/styles/schedule/_highcontrast-light-definition.scss +2 -2
  98. package/styles/schedule/_layout.scss +97 -120
  99. package/styles/schedule/_material-dark-definition.scss +2 -2
  100. package/styles/schedule/_material-definition.scss +2 -2
  101. package/styles/schedule/_tailwind-dark-definition.scss +1 -196
  102. package/styles/schedule/_tailwind-definition.scss +195 -196
  103. package/styles/schedule/_theme.scss +33 -7
  104. package/styles/schedule/bootstrap-dark.css +48 -62
  105. package/styles/schedule/bootstrap.css +28 -41
  106. package/styles/schedule/bootstrap4.css +28 -40
  107. package/styles/schedule/bootstrap5-dark.css +4692 -0
  108. package/styles/schedule/bootstrap5-dark.scss +4 -0
  109. package/styles/schedule/bootstrap5.css +4693 -0
  110. package/styles/schedule/bootstrap5.scss +5 -0
  111. package/styles/schedule/fabric-dark.css +29 -57
  112. package/styles/schedule/fabric.css +28 -41
  113. package/styles/schedule/highcontrast-light.css +28 -72
  114. package/styles/schedule/highcontrast.css +30 -45
  115. package/styles/schedule/icons/_bootstrap5-dark.scss +1 -0
  116. package/styles/schedule/icons/_bootstrap5.scss +232 -0
  117. package/styles/schedule/icons/_tailwind-dark.scss +1 -231
  118. package/styles/schedule/icons/_tailwind.scss +231 -231
  119. package/styles/schedule/material-dark.css +72 -75
  120. package/styles/schedule/material.css +32 -41
  121. package/styles/schedule/tailwind-dark.css +53 -71
  122. package/styles/schedule/tailwind-dark.scss +0 -1
  123. package/styles/schedule/tailwind.css +53 -70
  124. package/styles/tailwind-dark.css +53 -75
  125. package/styles/tailwind.css +53 -74
@@ -44,6 +44,12 @@ var VerticalEvent = /** @class */ (function (_super) {
44
44
  return _this;
45
45
  }
46
46
  VerticalEvent.prototype.renderAppointments = function () {
47
+ if (isNullOrUndefined(this.parent)) {
48
+ return;
49
+ }
50
+ if (this.parent.dragAndDropModule) {
51
+ this.parent.dragAndDropModule.setDragArea();
52
+ }
47
53
  var wrapperElements = [].slice.call(this.parent.element.querySelectorAll('.' + cls.BLOCK_APPOINTMENT_CLASS +
48
54
  ',.' + cls.APPOINTMENT_CLASS + ',.' + cls.ROW_COUNT_WRAPPER_CLASS));
49
55
  var isDragging = (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) ? true : false;
@@ -519,7 +525,7 @@ var VerticalEvent = /** @class */ (function (_super) {
519
525
  var schedule = util.getStartEndHours(currentDate, this.startHour, this.endHour);
520
526
  var isValidEvent = this.isValidEvent(eventObj, eStart, eEnd, schedule);
521
527
  if (eStart <= eEnd && isValidEvent) {
522
- var appHeight = this.getHeight(eStart, eEnd);
528
+ var appHeight_1 = this.getHeight(eStart, eEnd);
523
529
  if (eStart.getTime() > schedule.startHour.getTime()) {
524
530
  topValue = this.getTopValue(eStart, dayIndex, resource);
525
531
  }
@@ -547,30 +553,30 @@ var VerticalEvent = /** @class */ (function (_super) {
547
553
  this.renderedEvents[resource] = [];
548
554
  }
549
555
  this.renderedEvents[resource].push(extend({}, record, null, true));
550
- var appointmentElement_2;
556
+ var appointmentElement = void 0;
551
557
  if (inline) {
552
- appointmentElement_2 = this.parent.inlineModule.createInlineAppointmentElement(eventObj);
558
+ appointmentElement = this.parent.inlineModule.createInlineAppointmentElement(eventObj);
553
559
  }
554
560
  else {
555
- appointmentElement_2 = this.createAppointmentElement(eventObj, false, record.isSpanned, resource);
561
+ appointmentElement = this.createAppointmentElement(eventObj, false, record.isSpanned, resource);
556
562
  }
557
- setStyleAttribute(appointmentElement_2, {
563
+ setStyleAttribute(appointmentElement, {
558
564
  'width': (this.parent.eventSettings.enableMaxHeight ? '100%' : tempData.appWidth),
559
- 'height': appHeight + 'px', 'top': topValue + 'px'
565
+ 'height': appHeight_1 + 'px', 'top': topValue + 'px'
560
566
  });
561
- var iconHeight = appointmentElement_2.querySelectorAll('.' + cls.EVENT_INDICATOR_CLASS).length * 15;
562
- var maxHeight = appHeight - 40 - iconHeight;
563
- var subjectElement = appointmentElement_2.querySelector('.' + cls.SUBJECT_CLASS);
567
+ var iconHeight = appointmentElement.querySelectorAll('.' + cls.EVENT_INDICATOR_CLASS).length * 15;
568
+ var maxHeight = appHeight_1 - 40 - iconHeight;
569
+ var subjectElement = appointmentElement.querySelector('.' + cls.SUBJECT_CLASS);
564
570
  if (!this.parent.isAdaptive && subjectElement) {
565
571
  subjectElement.style.maxHeight = formatUnit(maxHeight);
566
572
  }
567
573
  var index = this.parent.activeViewOptions.group.byDate ? (this.resources.length * dayIndex) + resource : dayCount;
568
- this.appendEvent(eventObj, appointmentElement_2, index, tempData.appLeft);
569
- this.wireAppointmentEvents(appointmentElement_2, eventObj);
570
- if (appointmentElement_2.offsetHeight < this.cellHeight) {
571
- var resizeHandlers = [].slice.call(appointmentElement_2.querySelectorAll('.' + cls.EVENT_RESIZE_CLASS));
574
+ this.appendEvent(eventObj, appointmentElement, index, tempData.appLeft);
575
+ this.wireAppointmentEvents(appointmentElement, eventObj);
576
+ if (appHeight_1 < this.cellHeight) {
577
+ var resizeHandlers = [].slice.call(appointmentElement.querySelectorAll('.' + cls.EVENT_RESIZE_CLASS));
572
578
  resizeHandlers.forEach(function (resizeHandler) {
573
- resizeHandler.style.height = Math.ceil(appointmentElement_2.offsetHeight / resizeHandler.offsetHeight) + 'px';
579
+ resizeHandler.style.height = Math.ceil(appHeight_1 / resizeHandler.offsetHeight) + 'px';
574
580
  });
575
581
  }
576
582
  }
@@ -663,11 +669,12 @@ var VerticalEvent = /** @class */ (function (_super) {
663
669
  eventsList = eventsList.filter(function (obj) { return (obj[fieldMapping.startTime] === record[fieldMapping.startTime] &&
664
670
  obj[fieldMapping.endTime] > record[fieldMapping.endTime] || obj[fieldMapping.endTime] > record[fieldMapping.startTime] &&
665
671
  obj[fieldMapping.startTime] < record[fieldMapping.endTime] || obj[fieldMapping.endTime] === record[fieldMapping.startTime]
666
- && obj[fieldMapping.startTime] === record[fieldMapping.endTime]) || ((obj[fieldMapping.startTime].getTime() ===
667
- record[fieldMapping.startTime].getTime() && obj[fieldMapping.endTime].getTime() === record[fieldMapping.endTime].getTime())
668
- || (obj[fieldMapping.startTime].getTime() === record[fieldMapping.startTime].getTime() &&
669
- obj[fieldMapping.endTime].getTime() < record[fieldMapping.endTime].getTime() ||
670
- obj[fieldMapping.endTime].getTime() > record[fieldMapping.endTime].getTime())); });
672
+ && obj[fieldMapping.startTime] === record[fieldMapping.endTime]) ||
673
+ ((obj[fieldMapping.startTime].getTime() === record[fieldMapping.startTime].getTime() &&
674
+ obj[fieldMapping.endTime].getTime() === record[fieldMapping.endTime].getTime())
675
+ || (obj[fieldMapping.startTime].getTime() === record[fieldMapping.startTime].getTime() &&
676
+ obj[fieldMapping.endTime].getTime() < record[fieldMapping.endTime].getTime() ||
677
+ obj[fieldMapping.endTime].getTime() > record[fieldMapping.endTime].getTime())); });
671
678
  }
672
679
  if (eventsList.length > 0) {
673
680
  var appLevel = eventsList.map(function (obj) { return obj.Index; });
@@ -30,6 +30,9 @@ var YearEvent = /** @class */ (function (_super) {
30
30
  return _this;
31
31
  }
32
32
  YearEvent.prototype.renderAppointments = function () {
33
+ if (this.parent.dragAndDropModule) {
34
+ this.parent.dragAndDropModule.setDragArea();
35
+ }
33
36
  this.fields = this.parent.eventFields;
34
37
  var elementSelector = (this.parent.currentView === 'Year') ? '.' + cls.APPOINTMENT_CLASS :
35
38
  '.' + cls.APPOINTMENT_WRAPPER_CLASS + ',.' + cls.MORE_INDICATOR_CLASS;
@@ -228,7 +231,7 @@ var YearEvent = /** @class */ (function (_super) {
228
231
  var monthStart = new Date(this.parent.selectedDate.getFullYear(), months[month], 1);
229
232
  for (var i = 0, len = resources.length; i < len; i++) {
230
233
  this.renderedEvents = [];
231
- this.renderResourceEvent(wrapperCollection[i], resources[i], month, i, monthStart);
234
+ this.renderResourceEvent(wrapperCollection[month], resources[i], month, i, monthStart);
232
235
  }
233
236
  }
234
237
  }
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { Query, DataManager } from '@syncfusion/ej2-data';import { Field } from './fields';import { FieldModel } from './fields-model';
1
+ import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { Query, DataManager } from '@syncfusion/ej2-data';import { SortComparerFunction } from '../base/interface';import { SpannedEventPlacement } from '../base/type';import { Field } from './fields';import { FieldModel } from './fields-model';
2
2
 
3
3
  /**
4
4
  * Interface for a class EventSettings
@@ -57,6 +57,17 @@ export interface EventSettingsModel {
57
57
  */
58
58
  tooltipTemplate?: string;
59
59
 
60
+ /**
61
+ * Defines the option to render the spanned events (more than 24 hours) in either `AllDayRow` or `TimeSlot`. By default it renders in `AllDayRow`.
62
+ * This property is applicable for `Day`, `Week` and `WorkWeek` views only. The possible values for this property as follows
63
+ * * AllDayRow
64
+ * * TimeSlot
65
+ * {% codeBlock src='schedule/spannedEventPlacement/index.md' %}{% endcodeBlock %}
66
+ *
67
+ * @default 'AllDayRow'
68
+ */
69
+ spannedEventPlacement?: SpannedEventPlacement;
70
+
60
71
  /**
61
72
  * Defines the resource name, to decides the color of which particular resource level is to be applied on appointments, when
62
73
  * grouping is enabled on scheduler.
@@ -116,4 +127,13 @@ export interface EventSettingsModel {
116
127
  */
117
128
  ignoreWhitespace?: boolean;
118
129
 
130
+ /**
131
+ * Defines the custom sort comparer function.
132
+ * The sort comparer function has the same functionality like
133
+ * [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) sort comparer.
134
+ *
135
+ * @default null
136
+ */
137
+ sortComparer?: SortComparerFunction;
138
+
119
139
  }
@@ -1,5 +1,7 @@
1
1
  import { ChildProperty } from '@syncfusion/ej2-base';
2
2
  import { Query, DataManager } from '@syncfusion/ej2-data';
3
+ import { SortComparerFunction } from '../base/interface';
4
+ import { SpannedEventPlacement } from '../base/type';
3
5
  import { FieldModel } from './fields-model';
4
6
  /**
5
7
  * Holds the configuration of event related options and dataSource binding to Schedule.
@@ -51,6 +53,16 @@ export declare class EventSettings extends ChildProperty<EventSettings> {
51
53
  * @default null
52
54
  */
53
55
  tooltipTemplate: string;
56
+ /**
57
+ * Defines the option to render the spanned events (more than 24 hours) in either `AllDayRow` or `TimeSlot`. By default it renders in `AllDayRow`.
58
+ * This property is applicable for `Day`, `Week` and `WorkWeek` views only. The possible values for this property as follows
59
+ * * AllDayRow
60
+ * * TimeSlot
61
+ * {% codeBlock src='schedule/spannedEventPlacement/index.md' %}{% endcodeBlock %}
62
+ *
63
+ * @default 'AllDayRow'
64
+ */
65
+ spannedEventPlacement: SpannedEventPlacement;
54
66
  /**
55
67
  * Defines the resource name, to decides the color of which particular resource level is to be applied on appointments, when
56
68
  * grouping is enabled on scheduler.
@@ -102,4 +114,12 @@ export declare class EventSettings extends ChildProperty<EventSettings> {
102
114
  * @default false
103
115
  */
104
116
  ignoreWhitespace: boolean;
117
+ /**
118
+ * Defines the custom sort comparer function.
119
+ * The sort comparer function has the same functionality like
120
+ * [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) sort comparer.
121
+ *
122
+ * @default null
123
+ */
124
+ sortComparer: SortComparerFunction;
105
125
  }
@@ -46,6 +46,9 @@ var EventSettings = /** @class */ (function (_super) {
46
46
  __decorate([
47
47
  Property()
48
48
  ], EventSettings.prototype, "tooltipTemplate", void 0);
49
+ __decorate([
50
+ Property('AllDayRow')
51
+ ], EventSettings.prototype, "spannedEventPlacement", void 0);
49
52
  __decorate([
50
53
  Property()
51
54
  ], EventSettings.prototype, "resourceColorField", void 0);
@@ -70,6 +73,9 @@ var EventSettings = /** @class */ (function (_super) {
70
73
  __decorate([
71
74
  Property(false)
72
75
  ], EventSettings.prototype, "ignoreWhitespace", void 0);
76
+ __decorate([
77
+ Property()
78
+ ], EventSettings.prototype, "sortComparer", void 0);
73
79
  return EventSettings;
74
80
  }(ChildProperty));
75
81
  export { EventSettings };
@@ -207,6 +207,15 @@ export interface ViewsModel {
207
207
  */
208
208
  resourceHeaderTemplate?: string;
209
209
 
210
+ /**
211
+ * The template option which is used to render the customized header indent cell on the schedule. Here, the
212
+ * template accepts either the string or HTMLElement as template design and then the parsed design is displayed onto the header indent cell.
213
+ * It gets applied only to the view objects on which it is defined.
214
+ *
215
+ * @default null
216
+ */
217
+ headerIndentTemplate?: string;
218
+
210
219
  /**
211
220
  * By default, Schedule follows the time-format as per the default culture assigned to it.
212
221
  * It is also possible to manually set specific time format by using the `timeFormat` property.
@@ -185,6 +185,14 @@ export declare class Views extends ChildProperty<Views> {
185
185
  * @default null
186
186
  */
187
187
  resourceHeaderTemplate: string;
188
+ /**
189
+ * The template option which is used to render the customized header indent cell on the schedule. Here, the
190
+ * template accepts either the string or HTMLElement as template design and then the parsed design is displayed onto the header indent cell.
191
+ * It gets applied only to the view objects on which it is defined.
192
+ *
193
+ * @default null
194
+ */
195
+ headerIndentTemplate: string;
188
196
  /**
189
197
  * By default, Schedule follows the time-format as per the default culture assigned to it.
190
198
  * It is also possible to manually set specific time format by using the `timeFormat` property.
@@ -95,6 +95,9 @@ var Views = /** @class */ (function (_super) {
95
95
  __decorate([
96
96
  Property()
97
97
  ], Views.prototype, "resourceHeaderTemplate", void 0);
98
+ __decorate([
99
+ Property()
100
+ ], Views.prototype, "headerIndentTemplate", void 0);
98
101
  __decorate([
99
102
  Property(null)
100
103
  ], Views.prototype, "timeFormat", void 0);
@@ -27,6 +27,7 @@ export declare class EventWindow {
27
27
  private eventWindowTime;
28
28
  private timezoneData;
29
29
  private isEnterKey;
30
+ private dialogEvent;
30
31
  constructor(parent: Schedule);
31
32
  private renderEventWindow;
32
33
  refresh(): void;
@@ -79,11 +80,11 @@ export declare class EventWindow {
79
80
  private renderRecurrenceEditor;
80
81
  updateMinMaxDateToEditor(): void;
81
82
  private updateRepeatLabel;
82
- dialogClose(): void;
83
+ dialogClose(event?: Event): void;
83
84
  private resetForm;
84
85
  private timezoneChangeStyle;
85
86
  private resetFormFields;
86
- eventSave(alert?: string): void;
87
+ eventSave(event: Event, alert?: string): void;
87
88
  getEventDataFromEditor(): Record<string, Record<string, any>>;
88
89
  private processEventValidation;
89
90
  private processCrudActions;
@@ -208,6 +208,7 @@ var EventWindow = /** @class */ (function () {
208
208
  }
209
209
  var eventProp = {
210
210
  type: 'Editor',
211
+ event: args.event || this.dialogEvent,
211
212
  data: this.eventCrudData,
212
213
  cancel: false,
213
214
  element: this.element,
@@ -1078,11 +1079,12 @@ var EventWindow = /** @class */ (function () {
1078
1079
  (this.l10n.getConstant('repeats') + ' ' + this.recurrenceEditor.getRuleSummary(repeatRule)) : this.l10n.getConstant('repeat');
1079
1080
  this.repeatStatus.setProperties({ label: data });
1080
1081
  };
1081
- EventWindow.prototype.dialogClose = function () {
1082
+ EventWindow.prototype.dialogClose = function (event) {
1082
1083
  if (this.isEnterKey) {
1083
1084
  this.isEnterKey = false;
1084
1085
  return;
1085
1086
  }
1087
+ this.dialogEvent = event;
1086
1088
  this.isCrudAction = false;
1087
1089
  this.parent.activeEventData = { event: undefined, element: undefined };
1088
1090
  this.parent.currentAction = null;
@@ -1132,7 +1134,7 @@ var EventWindow = /** @class */ (function () {
1132
1134
  }
1133
1135
  }
1134
1136
  };
1135
- EventWindow.prototype.eventSave = function (alert) {
1137
+ EventWindow.prototype.eventSave = function (event, alert) {
1136
1138
  if (this.isEnterKey) {
1137
1139
  this.isEnterKey = false;
1138
1140
  return;
@@ -1147,6 +1149,7 @@ var EventWindow = /** @class */ (function () {
1147
1149
  return;
1148
1150
  }
1149
1151
  this.eventCrudData = dataCollection.eventData;
1152
+ this.dialogEvent = event;
1150
1153
  this.isCrudAction = true;
1151
1154
  this.dialogObject.hide();
1152
1155
  };
@@ -1695,7 +1698,7 @@ var EventWindow = /** @class */ (function () {
1695
1698
  var element = this.element.querySelector('.' + className);
1696
1699
  return element ? element.ej2_instances[0] : null;
1697
1700
  };
1698
- EventWindow.prototype.eventDelete = function () {
1701
+ EventWindow.prototype.eventDelete = function (event) {
1699
1702
  if (this.isEnterKey) {
1700
1703
  this.isEnterKey = false;
1701
1704
  return;
@@ -1721,6 +1724,7 @@ var EventWindow = /** @class */ (function () {
1721
1724
  }
1722
1725
  break;
1723
1726
  }
1727
+ this.dialogEvent = event;
1724
1728
  this.isCrudAction = false;
1725
1729
  this.dialogObject.hide();
1726
1730
  this.parent.quickPopup.openDeleteAlert();
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { createElement, remove } from '@syncfusion/ej2-base';
2
+ import { createElement, isNullOrUndefined, remove } from '@syncfusion/ej2-base';
3
3
  import { FormValidator } from '@syncfusion/ej2-inputs';
4
4
  import * as cls from '../base/css-constant';
5
5
  /**
@@ -49,6 +49,9 @@ var FieldValidator = /** @class */ (function () {
49
49
  if (!elem && !this.ignoreError) {
50
50
  this.createTooltip(inputElement, error, id, '');
51
51
  }
52
+ if (!isNullOrUndefined(elem)) {
53
+ elem.querySelector(".e-error").innerHTML = error.innerHTML;
54
+ }
52
55
  };
53
56
  FieldValidator.prototype.createTooltip = function (element, error, name, display) {
54
57
  var dlgContent;
@@ -14,6 +14,7 @@ export declare class QuickPopups {
14
14
  private fieldValidator;
15
15
  private isCrudAction;
16
16
  lastEvent: Record<string, any>;
17
+ private dialogEvent;
17
18
  constructor(parent: Schedule);
18
19
  private render;
19
20
  private renderQuickPopup;
@@ -43,7 +44,7 @@ export declare class QuickPopups {
43
44
  private saveClick;
44
45
  private detailsClick;
45
46
  private editClick;
46
- deleteClick(): void;
47
+ deleteClick(event: Event): void;
47
48
  private updateMoreEventContent;
48
49
  private closeClick;
49
50
  private dialogButtonClick;
@@ -63,7 +64,7 @@ export declare class QuickPopups {
63
64
  quickPopupHide(hideAnimation?: boolean): void;
64
65
  private navigationClick;
65
66
  private documentClick;
66
- onClosePopup(): void;
67
+ onClosePopup(event?: Event): void;
67
68
  private addEventListener;
68
69
  private removeEventListener;
69
70
  private destroyPopupButtons;
@@ -138,6 +138,7 @@ var QuickPopups = /** @class */ (function () {
138
138
  });
139
139
  buttonObj.appendTo(element);
140
140
  EventHandler.add(element, 'click', clickEvent, this);
141
+ removeClass([element], cls.ICON);
141
142
  };
142
143
  QuickPopups.prototype.quickDialogClass = function (action) {
143
144
  var classList = [
@@ -382,10 +383,16 @@ var QuickPopups = /** @class */ (function () {
382
383
  var closeIcon = this.quickPopup.element.querySelector('.' + cls.CLOSE_CLASS);
383
384
  this.renderButton('e-flat e-round e-small', cls.ICON + ' ' + cls.CLOSE_ICON_CLASS, false, closeIcon, this.closeClick);
384
385
  var readonly = this.parent.activeViewOptions.readonly || eventObj[this.parent.eventFields.isReadonly];
386
+ var editAction = !this.parent.eventSettings.allowEditing || readonly;
387
+ var deleteAction = !this.parent.eventSettings.allowDeleting || readonly;
385
388
  var editIcon = this.quickPopup.element.querySelector('.' + cls.EDIT_CLASS);
386
- this.renderButton('e-flat e-round e-small', cls.ICON + ' ' + cls.EDIT_ICON_CLASS, readonly, editIcon, this.editClick);
389
+ if (editIcon) {
390
+ this.renderButton('e-flat e-round e-small', cls.ICON + ' ' + cls.EDIT_ICON_CLASS, editAction, editIcon, this.editClick);
391
+ }
387
392
  var deleteIcon = this.quickPopup.element.querySelector('.' + cls.DELETE_CLASS);
388
- this.renderButton('e-flat e-round e-small', cls.ICON + ' ' + cls.DELETE_ICON_CLASS, readonly, deleteIcon, this.deleteClick);
393
+ if (deleteIcon) {
394
+ this.renderButton('e-flat e-round e-small', cls.ICON + ' ' + cls.DELETE_ICON_CLASS, deleteAction, deleteIcon, this.deleteClick);
395
+ }
389
396
  this.beforeQuickPopupOpen(target);
390
397
  };
391
398
  QuickPopups.prototype.isCellBlocked = function (args) {
@@ -836,21 +843,24 @@ var QuickPopups = /** @class */ (function () {
836
843
  }
837
844
  });
838
845
  };
839
- QuickPopups.prototype.saveClick = function () {
846
+ QuickPopups.prototype.saveClick = function (event) {
847
+ this.dialogEvent = event;
840
848
  this.isCrudAction = true;
841
849
  this.quickPopupHide();
842
850
  };
843
- QuickPopups.prototype.detailsClick = function () {
851
+ QuickPopups.prototype.detailsClick = function (event) {
844
852
  var subjectEle = this.quickPopup.element.querySelector('.' + cls.SUBJECT_CLASS);
845
853
  if (subjectEle && subjectEle.value !== '') {
846
854
  extend(this.parent.activeCellsData, { subject: subjectEle.value });
847
855
  }
856
+ this.dialogEvent = event;
848
857
  this.isCrudAction = false;
849
858
  this.fieldValidator.destroyToolTip();
850
859
  this.quickPopupHide();
851
860
  this.parent.eventWindow.openEditor(this.parent.activeCellsData, 'Add');
852
861
  };
853
- QuickPopups.prototype.editClick = function () {
862
+ QuickPopups.prototype.editClick = function (event) {
863
+ this.dialogEvent = event;
854
864
  this.quickPopupHide(true);
855
865
  var data = this.parent.activeEventData.event;
856
866
  this.parent.currentAction = 'EditSeries';
@@ -862,7 +872,8 @@ var QuickPopups = /** @class */ (function () {
862
872
  this.parent.eventWindow.openEditor(data, this.parent.currentAction);
863
873
  }
864
874
  };
865
- QuickPopups.prototype.deleteClick = function () {
875
+ QuickPopups.prototype.deleteClick = function (event) {
876
+ this.dialogEvent = event;
866
877
  this.quickPopupHide(true);
867
878
  this.parent.currentAction = 'Delete';
868
879
  if (this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule]) {
@@ -894,11 +905,13 @@ var QuickPopups = /** @class */ (function () {
894
905
  var moreElement = this.createMoreEventList(events, groupOrder, groupIndex);
895
906
  this.morePopup.element.querySelector('.' + cls.MORE_EVENT_POPUP_CLASS).appendChild(moreElement);
896
907
  };
897
- QuickPopups.prototype.closeClick = function () {
908
+ QuickPopups.prototype.closeClick = function (event) {
909
+ this.dialogEvent = event;
898
910
  this.quickPopupHide();
899
911
  this.morePopup.hide();
900
912
  };
901
913
  QuickPopups.prototype.dialogButtonClick = function (event) {
914
+ this.dialogEvent = event;
902
915
  this.quickDialog.hide();
903
916
  var target = event.target;
904
917
  var cancelBtn = this.quickDialog.element.querySelector('.' + cls.QUICK_DIALOG_ALERT_CANCEL);
@@ -942,7 +955,7 @@ var QuickPopups = /** @class */ (function () {
942
955
  else if (!cancelBtn.classList.contains(cls.DISABLE_CLASS) && (target.classList.contains(cls.QUICK_DIALOG_ALERT_OK) ||
943
956
  (target.classList.contains(cls.QUICK_DIALOG_ALERT_CANCEL) && !cancelBtn.classList.contains(cls.QUICK_DIALOG_CANCEL_CLASS)))) {
944
957
  this.parent.uiStateValues.isIgnoreOccurrence = target.classList.contains(cls.QUICK_DIALOG_ALERT_CANCEL);
945
- this.parent.eventWindow.eventSave(this.l10n.getConstant('ok'));
958
+ this.parent.eventWindow.eventSave(event, this.l10n.getConstant('ok'));
946
959
  }
947
960
  };
948
961
  QuickPopups.prototype.updateTapHoldEventPopup = function (target) {
@@ -999,9 +1012,10 @@ var QuickPopups = /** @class */ (function () {
999
1012
  this.parent.eventWindow.convertToEventData(cellsData, eventObj);
1000
1013
  return eventObj;
1001
1014
  };
1002
- QuickPopups.prototype.beforeQuickDialogClose = function () {
1015
+ QuickPopups.prototype.beforeQuickDialogClose = function (e) {
1003
1016
  var _this = this;
1004
1017
  var args = {
1018
+ event: e.event || this.dialogEvent,
1005
1019
  type: (isNullOrUndefined(this.parent.activeEventData.event)) ? 'ValidationAlert' :
1006
1020
  !isNullOrUndefined(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])
1007
1021
  ? 'RecurrenceAlert' : 'DeleteAlert', cancel: false, data: this.parent.activeEventData.event,
@@ -1043,7 +1057,7 @@ var QuickPopups = /** @class */ (function () {
1043
1057
  else {
1044
1058
  _this.quickPopup.offsetX = 10;
1045
1059
  _this.quickPopup.collision = { X: _this.parent.enableRtl ? 'flip' : 'none', Y: 'fit' };
1046
- _this.quickPopup.position = { X: _this.parent.enableRtl ? 'left' : 'right', Y: 'top' };
1060
+ _this.quickPopup.position = { X: _this.parent.enableRtl ? 'left' : 'right', Y: _this.parent.enableRtl ? 'bottom' : 'top' };
1047
1061
  _this.quickPopup.dataBind();
1048
1062
  _this.quickPopup.refreshPosition(null, true);
1049
1063
  var collide = isCollide(_this.quickPopup.element, _this.parent.element);
@@ -1147,7 +1161,8 @@ var QuickPopups = /** @class */ (function () {
1147
1161
  remove(moreWrapper);
1148
1162
  }
1149
1163
  };
1150
- QuickPopups.prototype.popupClose = function () {
1164
+ QuickPopups.prototype.popupClose = function (event) {
1165
+ this.dialogEvent = event;
1151
1166
  this.isCrudAction = false;
1152
1167
  this.quickPopupHide(true);
1153
1168
  };
@@ -1181,6 +1196,7 @@ var QuickPopups = /** @class */ (function () {
1181
1196
  }
1182
1197
  var isEventPopup = this.quickPopup.element.querySelector('.' + cls.EVENT_POPUP_CLASS);
1183
1198
  var args = {
1199
+ event: this.dialogEvent,
1184
1200
  type: this.parent.isAdaptive ? isEventPopup ? 'ViewEventInfo' : 'EditEventInfo' : 'QuickInfo',
1185
1201
  cancel: false, data: popupData, element: this.quickPopup.element,
1186
1202
  target: (isCellPopup ? this.parent.activeCellsData.element : this.parent.activeEventData.element)
@@ -1212,7 +1228,7 @@ var QuickPopups = /** @class */ (function () {
1212
1228
  if (!isNullOrUndefined(navigateEle)) {
1213
1229
  var date = this.parent.getDateFromElement(e.currentTarget);
1214
1230
  if (!isNullOrUndefined(date)) {
1215
- this.closeClick();
1231
+ this.closeClick(e);
1216
1232
  this.parent.setProperties({ selectedDate: date }, true);
1217
1233
  this.parent.changeView(this.parent.getNavigateView(), e);
1218
1234
  }
@@ -1240,7 +1256,10 @@ var QuickPopups = /** @class */ (function () {
1240
1256
  this.morePopup.hide();
1241
1257
  }
1242
1258
  };
1243
- QuickPopups.prototype.onClosePopup = function () {
1259
+ QuickPopups.prototype.onClosePopup = function (event) {
1260
+ if (!isNullOrUndefined(event)) {
1261
+ this.dialogEvent = event;
1262
+ }
1244
1263
  this.quickPopupHide();
1245
1264
  this.parent.eventBase.focusElement();
1246
1265
  };
@@ -17,6 +17,7 @@ export declare class Agenda extends AgendaBase implements IRenderer {
17
17
  renderLayout(): void;
18
18
  private eventLoad;
19
19
  private refreshEvent;
20
+ refreshHeader(): void;
20
21
  private renderInitialContent;
21
22
  renderContent(tBody: Element, agendaDate: Date, lastDate: Date): void;
22
23
  private agendaScrolling;
@@ -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 { formatUnit, isNullOrUndefined, closest, extend, append, prepend } from '@syncfusion/ej2-base';
15
+ import { formatUnit, isNullOrUndefined, closest, extend, append, prepend, remove } from '@syncfusion/ej2-base';
16
16
  import { createElement, addClass, EventHandler } from '@syncfusion/ej2-base';
17
17
  import { AgendaBase } from '../event-renderer/agenda-base';
18
18
  import * as util from '../base/util';
@@ -67,7 +67,7 @@ var Agenda = /** @class */ (function (_super) {
67
67
  var event_1 = _a[_i];
68
68
  delete event_1.generatedDates;
69
69
  }
70
- var eventCollection = args.processedData;
70
+ var eventCollection = this.parent.activeViewOptions.allowVirtualScrolling ? args.processedData : this.parent.eventsProcessed;
71
71
  if (this.parent.uiStateValues.isGroupAdaptive) {
72
72
  var resource = this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];
73
73
  this.dataSource = this.parent.eventBase.filterEventsByResource(resource, this.dataSource);
@@ -98,6 +98,22 @@ var Agenda = /** @class */ (function (_super) {
98
98
  }
99
99
  this.parent.eventsProcessed = this.parent.eventsProcessed.concat(this.processAgendaEvents(processedData));
100
100
  };
101
+ Agenda.prototype.refreshHeader = function () {
102
+ var tBody = this.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody');
103
+ if (this.parent.activeViewOptions.group.byDate) {
104
+ util.removeChildren(tBody);
105
+ }
106
+ else {
107
+ remove(tBody.firstElementChild);
108
+ }
109
+ var agendaDate = util.resetTime(this.parent.selectedDate);
110
+ var emptyTBody = createElement('tbody');
111
+ var firstDate = new Date(agendaDate.getTime());
112
+ var lastDate = (this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) ?
113
+ this.getEndDateFromStartDate(firstDate) : util.addDays(firstDate, this.parent.agendaDaysCount);
114
+ this.renderContent(emptyTBody, firstDate, lastDate);
115
+ append([].slice.call(emptyTBody.childNodes), tBody);
116
+ };
101
117
  Agenda.prototype.renderInitialContent = function (tBody, agendaDate) {
102
118
  var emptyTBody = createElement('tbody');
103
119
  var firstDate = new Date(agendaDate.getTime());
@@ -155,6 +171,7 @@ var Agenda = /** @class */ (function (_super) {
155
171
  var filterData = this.appointmentFiltering(agendaDate);
156
172
  var nTr = this.createTableRowElement(agendaDate, 'data');
157
173
  if (this.element.querySelector('tr[aria-rowindex="' + parseInt(nTr.getAttribute('aria-rowindex'), 10) + '"]')) {
174
+ agendaDate = util.addDays(agendaDate, 1);
158
175
  continue;
159
176
  }
160
177
  var dTd = nTr.children[0];
@@ -227,7 +244,7 @@ var Agenda = /** @class */ (function (_super) {
227
244
  this.updateHeaderText(scrollDate);
228
245
  }
229
246
  }
230
- else if (totalHeight === scrollHeight) {
247
+ else if (totalHeight >= (scrollHeight - 5)) {
231
248
  filterDate = this.getPreviousNextDate(util.addDays(scrollDate, 1), direction);
232
249
  filterData = this.appointmentFiltering(filterDate.start, filterDate.end);
233
250
  if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
@@ -26,6 +26,7 @@ export declare class HeaderRenderer {
26
26
  setCalendarView(): void;
27
27
  updateActiveView(): void;
28
28
  updateDateRange(text: string): void;
29
+ refresh(): void;
29
30
  updateAddIcon(): void;
30
31
  private getDateRangeText;
31
32
  private getItems;
@@ -153,6 +153,11 @@ var HeaderRenderer = /** @class */ (function () {
153
153
  if (selEle) {
154
154
  selEle.setAttribute('aria-label', text);
155
155
  selEle.querySelector('.e-tbar-btn-text').innerHTML = text;
156
+ this.refresh();
157
+ }
158
+ };
159
+ HeaderRenderer.prototype.refresh = function () {
160
+ if (this.toolbarObj) {
156
161
  this.toolbarObj.refreshOverflow();
157
162
  }
158
163
  };
@@ -408,7 +413,7 @@ var HeaderRenderer = /** @class */ (function () {
408
413
  this.parent.changeView('TimelineYear', args.originalEvent, undefined, this.calculateViewIndex(args));
409
414
  break;
410
415
  case 'e-today':
411
- if (!this.parent.isSelectedDate(util.resetTime(this.parent.getCurrentTime()))) {
416
+ if (this.parent.currentView === 'Agenda' || !this.parent.isSelectedDate(util.resetTime(this.parent.getCurrentTime()))) {
412
417
  this.parent.changeDate(util.resetTime(this.parent.getCurrentTime()), args.originalEvent);
413
418
  }
414
419
  break;
@@ -24,6 +24,7 @@ export declare class Month extends ViewBase implements IRenderer {
24
24
  getDateSlots(renderDates: Date[], workDays: number[]): TdData[];
25
25
  getDayNameFormat(): string;
26
26
  renderLayout(type: string): void;
27
+ refreshHeader(): void;
27
28
  private wireCellEvents;
28
29
  renderHeader(): void;
29
30
  renderLeftIndent(tr: Element): void;