@syncfusion/ej2-schedule 20.2.50 → 20.3.47

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 (124) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/ej2-schedule.min.js +10 -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 +600 -215
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +618 -227
  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/recurrence-editor/recurrence-editor-model.d.ts +1 -1
  14. package/src/recurrence-editor/recurrence-editor.d.ts +1 -0
  15. package/src/recurrence-editor/recurrence-editor.js +37 -10
  16. package/src/schedule/actions/action-base.js +5 -3
  17. package/src/schedule/actions/crud.js +1 -2
  18. package/src/schedule/actions/drag.js +17 -14
  19. package/src/schedule/actions/resize.js +1 -3
  20. package/src/schedule/actions/touch.js +2 -2
  21. package/src/schedule/actions/virtual-scroll.d.ts +12 -3
  22. package/src/schedule/actions/virtual-scroll.js +206 -54
  23. package/src/schedule/base/interface.d.ts +2 -1
  24. package/src/schedule/base/schedule-model.d.ts +7 -0
  25. package/src/schedule/base/schedule.d.ts +13 -0
  26. package/src/schedule/base/schedule.js +13 -4
  27. package/src/schedule/base/util.d.ts +15 -0
  28. package/src/schedule/base/util.js +29 -3
  29. package/src/schedule/event-renderer/agenda-base.js +3 -5
  30. package/src/schedule/event-renderer/event-base.d.ts +2 -1
  31. package/src/schedule/event-renderer/event-base.js +30 -3
  32. package/src/schedule/event-renderer/month.d.ts +1 -0
  33. package/src/schedule/event-renderer/month.js +8 -6
  34. package/src/schedule/event-renderer/vertical-view.d.ts +3 -0
  35. package/src/schedule/event-renderer/vertical-view.js +32 -12
  36. package/src/schedule/event-renderer/year.js +1 -1
  37. package/src/schedule/popups/event-window.d.ts +1 -0
  38. package/src/schedule/popups/event-window.js +35 -7
  39. package/src/schedule/popups/quick-popups.js +18 -5
  40. package/src/schedule/renderer/agenda.js +1 -0
  41. package/src/schedule/renderer/month.js +25 -6
  42. package/src/schedule/renderer/renderer.js +8 -2
  43. package/src/schedule/renderer/timeline-view.js +2 -2
  44. package/src/schedule/renderer/timeline-year.d.ts +1 -0
  45. package/src/schedule/renderer/timeline-year.js +20 -12
  46. package/src/schedule/renderer/vertical-view.d.ts +1 -1
  47. package/src/schedule/renderer/vertical-view.js +48 -44
  48. package/src/schedule/renderer/view-base.d.ts +2 -0
  49. package/src/schedule/renderer/view-base.js +31 -1
  50. package/src/schedule/renderer/year.d.ts +1 -1
  51. package/src/schedule/renderer/year.js +49 -30
  52. package/styles/bootstrap-dark.css +50 -33
  53. package/styles/bootstrap.css +50 -33
  54. package/styles/bootstrap4.css +50 -33
  55. package/styles/bootstrap5-dark.css +51 -38
  56. package/styles/bootstrap5.css +51 -38
  57. package/styles/fabric-dark.css +50 -33
  58. package/styles/fabric.css +50 -33
  59. package/styles/fluent-dark.css +52 -39
  60. package/styles/fluent.css +52 -39
  61. package/styles/highcontrast-light.css +50 -33
  62. package/styles/highcontrast.css +50 -33
  63. package/styles/material-dark.css +50 -33
  64. package/styles/material.css +50 -33
  65. package/styles/recurrence-editor/_all.scss +1 -1
  66. package/styles/recurrence-editor/_bootstrap-dark-definition.scss +1 -3
  67. package/styles/recurrence-editor/_bootstrap-definition.scss +1 -3
  68. package/styles/recurrence-editor/_bootstrap4-definition.scss +1 -3
  69. package/styles/recurrence-editor/_bootstrap5-definition.scss +1 -3
  70. package/styles/recurrence-editor/_fabric-dark-definition.scss +1 -4
  71. package/styles/recurrence-editor/_fabric-definition.scss +1 -3
  72. package/styles/recurrence-editor/_fluent-definition.scss +1 -3
  73. package/styles/recurrence-editor/_fusionnew-definition.scss +1 -3
  74. package/styles/recurrence-editor/_highcontrast-definition.scss +1 -3
  75. package/styles/recurrence-editor/_highcontrast-light-definition.scss +1 -3
  76. package/styles/recurrence-editor/_layout.scss +28 -38
  77. package/styles/recurrence-editor/_material-dark-definition.scss +1 -3
  78. package/styles/recurrence-editor/_material-definition.scss +1 -3
  79. package/styles/recurrence-editor/_material3-definition.scss +1 -3
  80. package/styles/recurrence-editor/_tailwind-definition.scss +1 -3
  81. package/styles/recurrence-editor/bootstrap-dark.css +21 -27
  82. package/styles/recurrence-editor/bootstrap.css +21 -27
  83. package/styles/recurrence-editor/bootstrap4.css +21 -27
  84. package/styles/recurrence-editor/bootstrap5-dark.css +21 -27
  85. package/styles/recurrence-editor/bootstrap5.css +21 -27
  86. package/styles/recurrence-editor/fabric-dark.css +21 -27
  87. package/styles/recurrence-editor/fabric.css +21 -27
  88. package/styles/recurrence-editor/fluent-dark.css +21 -27
  89. package/styles/recurrence-editor/fluent.css +21 -27
  90. package/styles/recurrence-editor/highcontrast-light.css +21 -27
  91. package/styles/recurrence-editor/highcontrast.css +21 -27
  92. package/styles/recurrence-editor/material-dark.css +21 -27
  93. package/styles/recurrence-editor/material.css +21 -27
  94. package/styles/recurrence-editor/tailwind-dark.css +21 -27
  95. package/styles/recurrence-editor/tailwind.css +21 -27
  96. package/styles/schedule/_all.scss +1 -1
  97. package/styles/schedule/_bootstrap4-definition.scss +0 -1
  98. package/styles/schedule/_bootstrap5-definition.scss +1 -1
  99. package/styles/schedule/_fusionnew-definition.scss +1 -1
  100. package/styles/schedule/_layout.scss +57 -32
  101. package/styles/schedule/_material3-definition.scss +1 -1
  102. package/styles/schedule/_theme.scss +12 -10
  103. package/styles/schedule/bootstrap-dark.css +29 -6
  104. package/styles/schedule/bootstrap.css +29 -6
  105. package/styles/schedule/bootstrap4.css +29 -6
  106. package/styles/schedule/bootstrap5-dark.css +30 -11
  107. package/styles/schedule/bootstrap5.css +30 -11
  108. package/styles/schedule/fabric-dark.css +29 -6
  109. package/styles/schedule/fabric.css +29 -6
  110. package/styles/schedule/fluent-dark.css +31 -12
  111. package/styles/schedule/fluent.css +31 -12
  112. package/styles/schedule/highcontrast-light.css +29 -6
  113. package/styles/schedule/highcontrast.css +29 -6
  114. package/styles/schedule/icons/_bootstrap5.scss +0 -1
  115. package/styles/schedule/icons/_fluent.scss +0 -1
  116. package/styles/schedule/icons/_fusionnew.scss +0 -1
  117. package/styles/schedule/icons/_material3.scss +0 -1
  118. package/styles/schedule/icons/_tailwind.scss +0 -1
  119. package/styles/schedule/material-dark.css +29 -6
  120. package/styles/schedule/material.css +29 -6
  121. package/styles/schedule/tailwind-dark.css +29 -6
  122. package/styles/schedule/tailwind.css +29 -6
  123. package/styles/tailwind-dark.css +50 -33
  124. package/styles/tailwind.css +50 -33
@@ -57,6 +57,7 @@ var MonthEvent = /** @class */ (function (_super) {
57
57
  if (this.parent.dragAndDropModule) {
58
58
  this.parent.dragAndDropModule.setDragArea();
59
59
  }
60
+ this.isResourceEventTemplate = this.parent.isSpecificResourceEvents();
60
61
  var conWrap = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
61
62
  if (this.parent.rowAutoHeight) {
62
63
  this.parent.uiStateValues.top = conWrap.scrollTop;
@@ -95,7 +96,8 @@ var MonthEvent = /** @class */ (function (_super) {
95
96
  }
96
97
  this.eventHeight = util.getElementHeightFromClass(this.element, cls.APPOINTMENT_CLASS);
97
98
  var scrollTop = conWrap.scrollTop;
98
- if (this.parent.rowAutoHeight && this.parent.virtualScrollModule && !isNullOrUndefined(this.parent.currentAction)) {
99
+ if (this.parent.rowAutoHeight && this.parent.virtualScrollModule && !this.parent.virtualScrollModule.isHorizontalScroll
100
+ && !isNullOrUndefined(this.parent.currentAction)) {
99
101
  conWrap.scrollTop = conWrap.scrollTop - 1;
100
102
  }
101
103
  if (this.parent.activeViewOptions.group.resources.length > 0) {
@@ -115,7 +117,7 @@ var MonthEvent = /** @class */ (function (_super) {
115
117
  isPreventScrollUpdate: true,
116
118
  scrollPosition: { left: this.parent.uiStateValues.left, top: this.parent.uiStateValues.top }
117
119
  };
118
- if (this.parent.virtualScrollModule) {
120
+ if (this.parent.virtualScrollModule && !this.parent.virtualScrollModule.isHorizontalScroll) {
119
121
  if (this.parent.currentAction) {
120
122
  conWrap.scrollTop = scrollTop;
121
123
  this.parent.currentAction = null;
@@ -267,7 +269,7 @@ var MonthEvent = /** @class */ (function (_super) {
267
269
  var appRight = (this.parent.enableRtl) ? position : 0;
268
270
  var appHeight = this.cellHeight - this.monthHeaderHeight;
269
271
  var appTop = this.getRowTop(resIndex);
270
- var blockElement = this.createBlockAppointmentElement(event, resIndex);
272
+ var blockElement = this.createBlockAppointmentElement(event, resIndex, this.isResourceEventTemplate);
271
273
  setStyleAttribute(blockElement, {
272
274
  'width': appWidth + 'px', 'height': appHeight + 'px', 'left': appLeft + 'px',
273
275
  'right': appRight + 'px', 'top': appTop + 'px'
@@ -338,7 +340,7 @@ var MonthEvent = /** @class */ (function (_super) {
338
340
  MonthEvent.prototype.renderResourceEvents = function () {
339
341
  var resources = this.parent.uiStateValues.isGroupAdaptive ?
340
342
  [this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]] :
341
- this.parent.resourceBase.lastResourceLevel;
343
+ this.parent.resourceBase.renderedResources;
342
344
  if (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) {
343
345
  for (var i = 0, len = this.parent.crudModule.crudObj.sourceEvent.length; i < len; i++) {
344
346
  var sourceRes = this.parent.crudModule.crudObj.sourceEvent[i];
@@ -374,7 +376,7 @@ var MonthEvent = /** @class */ (function (_super) {
374
376
  var attrs = {
375
377
  'data-id': 'Appointment_' + record[this.fields.id],
376
378
  'role': 'button', 'tabindex': '0',
377
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false', 'aria-grabbed': 'true',
379
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
378
380
  'aria-label': this.parent.getAnnouncementString(newRecord, eventSubject)
379
381
  };
380
382
  if (!isCloneElement) {
@@ -399,7 +401,7 @@ var MonthEvent = /** @class */ (function (_super) {
399
401
  var scheduleId = this.parent.element.id + '_';
400
402
  var viewName = this.parent.activeViewOptions.eventTemplateName;
401
403
  var templateId = scheduleId + viewName + 'eventTemplate';
402
- var eventTemplate = 'eventTemplate' + (this.parent.activeViewOptions.group.resources.length > 0 ? '_' + resIndex : '');
404
+ var eventTemplate = 'eventTemplate' + (this.isResourceEventTemplate ? '_' + resIndex : '');
403
405
  templateElement = this.parent.getAppointmentTemplate()(eventObj, this.parent, eventTemplate, templateId, false);
404
406
  }
405
407
  else {
@@ -23,6 +23,7 @@ export declare class VerticalEvent extends EventBase {
23
23
  fields: EventFieldsMapping;
24
24
  cellHeight: number;
25
25
  resources: TdData[];
26
+ private isResourceEventTemplate;
26
27
  constructor(parent: Schedule);
27
28
  renderAppointments(): void;
28
29
  initializeValues(): void;
@@ -31,6 +32,8 @@ export declare class VerticalEvent extends EventBase {
31
32
  private processBlockEvents;
32
33
  private renderBlockEvents;
33
34
  private renderEvents;
35
+ getStartCount(): number;
36
+ private getDayIndex;
34
37
  private setValues;
35
38
  private getResourceList;
36
39
  createAppointmentElement(record: Record<string, any>, isAllDay: boolean, data: Record<string, any>, resource: number): HTMLElement;
@@ -50,6 +50,7 @@ var VerticalEvent = /** @class */ (function (_super) {
50
50
  if (this.parent.dragAndDropModule) {
51
51
  this.parent.dragAndDropModule.setDragArea();
52
52
  }
53
+ this.isResourceEventTemplate = this.parent.isSpecificResourceEvents();
53
54
  var wrapperElements = [].slice.call(this.parent.element.querySelectorAll('.' + cls.BLOCK_APPOINTMENT_CLASS +
54
55
  ',.' + cls.APPOINTMENT_CLASS + ',.' + cls.ROW_COUNT_WRAPPER_CLASS));
55
56
  var isDragging = (this.parent.crudModule && this.parent.crudModule.crudObj.isCrudAction) ? true : false;
@@ -72,6 +73,9 @@ var VerticalEvent = /** @class */ (function (_super) {
72
73
  if (!this.element.querySelector('.' + cls.WORK_CELLS_CLASS)) {
73
74
  return;
74
75
  }
76
+ if (this.parent.virtualScrollModule) {
77
+ this.parent.virtualScrollModule.updateFocusedWorkCell();
78
+ }
75
79
  this.allDayElement = [].slice.call(this.element.querySelectorAll('.' + cls.ALLDAY_CELLS_CLASS));
76
80
  this.setAllDayRowHeight(0);
77
81
  if (this.parent.eventsProcessed.length === 0 && this.parent.blockProcessed.length === 0) {
@@ -104,6 +108,9 @@ var VerticalEvent = /** @class */ (function (_super) {
104
108
  this.resources = (this.parent.activeViewOptions.group.resources.length > 0) ? this.parent.uiStateValues.isGroupAdaptive ?
105
109
  [this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]] :
106
110
  this.parent.resourceBase.lastResourceLevel : [];
111
+ if (this.resources.length > 0 && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.virtualScrollModule) {
112
+ this.resources = this.parent.resourceBase.renderedResources;
113
+ }
107
114
  this.cellHeight =
108
115
  parseFloat(this.parent.element.querySelector('.e-content-wrap tbody tr').getBoundingClientRect().height.toFixed(2));
109
116
  this.dateRender[0] = this.parent.activeView.renderDates;
@@ -120,7 +127,7 @@ var VerticalEvent = /** @class */ (function (_super) {
120
127
  return appHeight;
121
128
  };
122
129
  VerticalEvent.prototype.appendEvent = function (eventObj, appointmentElement, index, appLeft) {
123
- var appointmentWrap = [].slice.call(this.element.querySelectorAll('.' + cls.APPOINTMENT_WRAPPER_CLASS));
130
+ var appointmentWrap = this.element.querySelector('.' + cls.APPOINTMENT_WRAPPER_CLASS + '[id="' + cls.APPOINTMENT_WRAPPER_CLASS + '-' + index + '"]');
124
131
  if (this.parent.enableRtl) {
125
132
  setStyleAttribute(appointmentElement, { 'right': appLeft });
126
133
  }
@@ -134,13 +141,13 @@ var VerticalEvent = /** @class */ (function (_super) {
134
141
  };
135
142
  this.parent.trigger(events.eventRendered, args, function (eventArgs) {
136
143
  if (!eventArgs.cancel) {
137
- appointmentWrap[index].appendChild(appointmentElement);
144
+ appointmentWrap.appendChild(appointmentElement);
138
145
  }
139
146
  });
140
147
  };
141
148
  VerticalEvent.prototype.processBlockEvents = function () {
142
149
  var resources = this.getResourceList();
143
- var dateCount = 0;
150
+ var dateCount = this.getStartCount();
144
151
  for (var _i = 0, resources_1 = resources; _i < resources_1.length; _i++) {
145
152
  var resource = resources_1[_i];
146
153
  var renderDates = this.dateRender[resource];
@@ -179,9 +186,11 @@ var VerticalEvent = /** @class */ (function (_super) {
179
186
  blockHeight = formatUnit(this.getHeight(eStart, eEnd));
180
187
  blockTop = formatUnit(this.getTopValue(eStart, dayIndex, resource));
181
188
  }
182
- var appointmentElement = this.createBlockAppointmentElement(eventObj, resource);
189
+ var appointmentElement = this.createBlockAppointmentElement(eventObj, resource, this.isResourceEventTemplate);
183
190
  setStyleAttribute(appointmentElement, { 'width': '100%', 'height': blockHeight, 'top': blockTop });
184
- var index = this.parent.activeViewOptions.group.byDate ? (this.resources.length * dayIndex) + resource : dayCount;
191
+ var renderedIndex = this.getDayIndex(dayIndex, resource);
192
+ var index = this.parent.activeViewOptions.group.byDate ?
193
+ (this.resources.length * renderedIndex) + resource : dayCount;
185
194
  this.appendEvent(eventObj, appointmentElement, index, '0px');
186
195
  }
187
196
  };
@@ -189,7 +198,7 @@ var VerticalEvent = /** @class */ (function (_super) {
189
198
  removeClass(this.allDayElement, cls.ALLDAY_ROW_ANIMATE_CLASS);
190
199
  var eventCollection = (eventType === 'allDayEvents') ? this.sortByDateTime(this.allDayEvents) : undefined;
191
200
  var resources = this.getResourceList();
192
- var dateCount = 0;
201
+ var dateCount = this.getStartCount();
193
202
  var isRender;
194
203
  var _loop_1 = function (resource) {
195
204
  isRender = true;
@@ -253,6 +262,15 @@ var VerticalEvent = /** @class */ (function (_super) {
253
262
  _loop_1(resource);
254
263
  }
255
264
  };
265
+ VerticalEvent.prototype.getStartCount = function () {
266
+ return this.parent.virtualScrollModule && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.timeScale.enable ?
267
+ parseInt(this.element.querySelector('.' + cls.APPOINTMENT_WRAPPER_CLASS).getAttribute('id').split('-').slice(-1)[0], 10) : 0;
268
+ };
269
+ VerticalEvent.prototype.getDayIndex = function (dayIndex, resource) {
270
+ return this.parent.activeViewOptions.group.byDate ?
271
+ this.parent.resourceBase.lastResourceLevel[0].renderDates.indexOf(this.dateRender[resource][dayIndex]) :
272
+ dayIndex;
273
+ };
256
274
  VerticalEvent.prototype.setValues = function (event, resourceIndex) {
257
275
  if (this.parent.activeViewOptions.group.resources.length > 0) {
258
276
  this.cssClass = this.resources[resourceIndex].cssClass;
@@ -284,7 +302,6 @@ var VerticalEvent = /** @class */ (function (_super) {
284
302
  'tabindex': '0',
285
303
  'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record),
286
304
  'aria-pressed': 'false',
287
- 'aria-grabbed': 'true',
288
305
  'aria-label': this.parent.getAnnouncementString(record)
289
306
  }
290
307
  });
@@ -304,7 +321,7 @@ var VerticalEvent = /** @class */ (function (_super) {
304
321
  var viewName = this.parent.activeViewOptions.eventTemplateName;
305
322
  var templateId = elementId + viewName + 'eventTemplate';
306
323
  var resIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex : resource;
307
- var templateName = 'eventTemplate' + (this.parent.activeViewOptions.group.resources.length > 0 ? '_' + resIndex : '');
324
+ var templateName = 'eventTemplate' + (this.isResourceEventTemplate ? '_' + resIndex : '');
308
325
  templateElement = this.parent.getAppointmentTemplate()(record, this.parent, templateName, templateId, false);
309
326
  }
310
327
  else {
@@ -481,10 +498,11 @@ var VerticalEvent = /** @class */ (function (_super) {
481
498
  if (isNullOrUndefined(this.renderedAllDayEvents[resource])) {
482
499
  this.renderedAllDayEvents[resource] = [];
483
500
  }
501
+ var renderedIndex = this.getDayIndex(dayIndex, resource);
484
502
  this.renderedAllDayEvents[resource].push(extend({}, record, null, true));
485
503
  var allDayRow_1 = [].slice.call(this.element.querySelector('.' + cls.ALLDAY_ROW_CLASS).children);
486
504
  var wIndex_1 = this.parent.activeViewOptions.group.byDate ?
487
- (this.resources.length * dayIndex) + resource : dayCount;
505
+ (this.resources.length * renderedIndex) + resource : dayCount;
488
506
  var eventWrapper_1 = this.element.querySelector('.' + cls.ALLDAY_APPOINTMENT_WRAPPER_CLASS +
489
507
  ':nth-child(' + (wIndex_1 + 1) + ')');
490
508
  var appointmentElement_1;
@@ -553,9 +571,10 @@ var VerticalEvent = /** @class */ (function (_super) {
553
571
  this.overlapEvents.push([record]);
554
572
  }
555
573
  appWidth = this.getEventWidth();
574
+ var renderedIndex = this.getDayIndex(dayIndex, resource);
556
575
  var argsData = {
557
576
  index: appIndex, left: appLeft, width: appWidth,
558
- day: dayIndex, dayIndex: dayCount, record: record, resource: resource
577
+ day: renderedIndex, dayIndex: dayCount, record: record, resource: resource
559
578
  };
560
579
  var tempData = this.adjustOverlapElements(argsData);
561
580
  appWidth = (tempData.appWidth);
@@ -580,7 +599,8 @@ var VerticalEvent = /** @class */ (function (_super) {
580
599
  if (!this.parent.isAdaptive && subjectElement) {
581
600
  subjectElement.style.maxHeight = formatUnit(maxHeight);
582
601
  }
583
- var index = this.parent.activeViewOptions.group.byDate ? (this.resources.length * dayIndex) + resource : dayCount;
602
+ var index = this.parent.activeViewOptions.group.byDate ?
603
+ (this.resources.length * renderedIndex) + resource : dayCount;
584
604
  var eventData = {};
585
605
  eventData[this.fields.startTime] = eventObj[this.fields.startTime];
586
606
  eventData[this.fields.endTime] = eventObj[this.fields.endTime];
@@ -704,7 +724,7 @@ var VerticalEvent = /** @class */ (function (_super) {
704
724
  var dayCount = this.parent.activeViewOptions.group.byDate ?
705
725
  (this.resources.length * args.day) + args.resource : args.dayIndex;
706
726
  var element = this.element.querySelector('#e-appointment-wrapper-' + dayCount);
707
- if (element.childElementCount > 0) {
727
+ if (element && element.childElementCount > 0) {
708
728
  var eleGuid = this.overlapEvents[i][j].Guid;
709
729
  if (element.querySelectorAll('div[data-guid="' + eleGuid + '"]').length > 0 && eleGuid !== args.record.Guid) {
710
730
  var apps = element.querySelector('div[data-guid="' + eleGuid + '"]');
@@ -369,7 +369,7 @@ var YearEvent = /** @class */ (function (_super) {
369
369
  'data-id': 'Appointment_' + record[this.fields.id],
370
370
  'data-guid': record.Guid,
371
371
  'role': 'button', 'tabindex': '0',
372
- 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false', 'aria-grabbed': 'true',
372
+ 'aria-disabled': this.parent.eventBase.getReadonlyAttribute(record), 'aria-pressed': 'false',
373
373
  'aria-label': this.parent.getAnnouncementString(record)
374
374
  }
375
375
  });
@@ -104,5 +104,6 @@ export declare class EventWindow {
104
104
  private eventDelete;
105
105
  getRecurrenceEditorInstance(): RecurrenceEditor;
106
106
  private destroyComponents;
107
+ private detachComponents;
107
108
  destroy(isIgnore?: boolean): void;
108
109
  }
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { createElement, isNullOrUndefined, addClass, remove, EventHandler, extend, append } from '@syncfusion/ej2-base';
2
+ import { createElement, isNullOrUndefined, addClass, remove, EventHandler, extend, append, detach } from '@syncfusion/ej2-base';
3
3
  import { cldrData, removeClass, getValue, getDefaultDateObject, closest, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
4
4
  import { Query, Deferred } from '@syncfusion/ej2-data';
5
5
  import { CheckBox, Button } from '@syncfusion/ej2-buttons';
@@ -261,6 +261,7 @@ var EventWindow = /** @class */ (function () {
261
261
  var tempEle = [].slice.call(this.parent.getEditorTemplate()(args || {}, this.parent, 'editorTemplate', templateId, false));
262
262
  append(tempEle, form);
263
263
  this.parent.renderTemplates();
264
+ this.applyFormValidation();
264
265
  }
265
266
  else {
266
267
  form.appendChild(this.getDefaultEventWindowContent());
@@ -814,12 +815,26 @@ var EventWindow = /** @class */ (function () {
814
815
  };
815
816
  var form = this.element.querySelector('.' + cls.FORM_CLASS);
816
817
  var rules = {};
817
- rules[this.parent.eventSettings.fields.subject.name] = getValidationRule(this.parent.eventSettings.fields.subject.validation);
818
- rules[this.parent.eventSettings.fields.location.name] = getValidationRule(this.parent.eventSettings.fields.location.validation);
819
- rules[this.parent.eventSettings.fields.startTime.name] = getValidationRule(this.parent.eventSettings.fields.startTime.validation);
820
- rules[this.parent.eventSettings.fields.endTime.name] = getValidationRule(this.parent.eventSettings.fields.endTime.validation);
821
- rules[this.parent.eventSettings.fields.description.name] =
822
- getValidationRule(this.parent.eventSettings.fields.description.validation);
818
+ var subjectRule = getValidationRule(this.parent.eventSettings.fields.subject.validation);
819
+ if (!isNullOrUndefined(subjectRule)) {
820
+ rules[this.parent.eventSettings.fields.subject.name] = subjectRule;
821
+ }
822
+ var locationRule = getValidationRule(this.parent.eventSettings.fields.location.validation);
823
+ if (!isNullOrUndefined(locationRule)) {
824
+ rules[this.parent.eventSettings.fields.location.name] = locationRule;
825
+ }
826
+ var startTimeRule = getValidationRule(this.parent.eventSettings.fields.startTime.validation);
827
+ if (!isNullOrUndefined(startTimeRule)) {
828
+ rules[this.parent.eventSettings.fields.startTime.name] = startTimeRule;
829
+ }
830
+ var endTimeRule = getValidationRule(this.parent.eventSettings.fields.endTime.validation);
831
+ if (!isNullOrUndefined(endTimeRule)) {
832
+ rules[this.parent.eventSettings.fields.endTime.name] = endTimeRule;
833
+ }
834
+ var descriptionRule = getValidationRule(this.parent.eventSettings.fields.description.validation);
835
+ if (!isNullOrUndefined(descriptionRule)) {
836
+ rules[this.parent.eventSettings.fields.description.name] = descriptionRule;
837
+ }
823
838
  this.fieldValidator = new FieldValidator();
824
839
  this.fieldValidator.renderFormValidator(form, rules, this.element, this.parent.locale);
825
840
  };
@@ -1767,6 +1782,13 @@ var EventWindow = /** @class */ (function () {
1767
1782
  this.buttonObj.destroy();
1768
1783
  }
1769
1784
  };
1785
+ EventWindow.prototype.detachComponents = function () {
1786
+ var formElements = this.getFormElements(cls.EVENT_WINDOW_DIALOG_CLASS);
1787
+ for (var _i = 0, formElements_4 = formElements; _i < formElements_4.length; _i++) {
1788
+ var element = formElements_4[_i];
1789
+ detach(element);
1790
+ }
1791
+ };
1770
1792
  EventWindow.prototype.destroy = function (isIgnore) {
1771
1793
  if (this.parent && !this.parent.isDestroyed) {
1772
1794
  this.parent.resetTemplates(['editorTemplate']);
@@ -1774,6 +1796,7 @@ var EventWindow = /** @class */ (function () {
1774
1796
  this.destroyComponents();
1775
1797
  if (this.recurrenceEditor) {
1776
1798
  this.recurrenceEditor.destroy();
1799
+ detach(this.recurrenceEditor.element);
1777
1800
  this.recurrenceEditor = null;
1778
1801
  }
1779
1802
  if (this.fieldValidator) {
@@ -1784,8 +1807,12 @@ var EventWindow = /** @class */ (function () {
1784
1807
  this.repeatDialogObject.destroy();
1785
1808
  this.repeatDialogObject = null;
1786
1809
  }
1810
+ this.detachComponents();
1787
1811
  if (this.dialogObject) {
1788
1812
  if (this.dialogObject.element) {
1813
+ var form = this.dialogObject.element.querySelector('form');
1814
+ util.removeChildren(form);
1815
+ detach(form);
1789
1816
  EventHandler.remove(this.dialogObject.element, 'keydown', this.preventEventSave);
1790
1817
  }
1791
1818
  this.dialogObject.destroy();
@@ -1802,6 +1829,7 @@ var EventWindow = /** @class */ (function () {
1802
1829
  this.buttonObj = null;
1803
1830
  this.repeatStatus = null;
1804
1831
  this.eventWindowTime = null;
1832
+ this.dialogEvent = null;
1805
1833
  }
1806
1834
  };
1807
1835
  return EventWindow;
@@ -319,7 +319,7 @@ var QuickPopups = /** @class */ (function () {
319
319
  'data-id': '' + eventData[fields.id],
320
320
  'data-guid': eventData.Guid, 'role': 'button', 'tabindex': '0',
321
321
  'aria-disabled': this_1.parent.eventBase.getReadonlyAttribute(eventData),
322
- 'aria-pressed': 'false', 'aria-grabbed': 'true', 'aria-label': this_1.parent.getAnnouncementString(eventData)
322
+ 'aria-pressed': 'false', 'aria-label': this_1.parent.getAnnouncementString(eventData)
323
323
  }
324
324
  });
325
325
  var templateElement = void 0;
@@ -444,6 +444,9 @@ var QuickPopups = /** @class */ (function () {
444
444
  }
445
445
  return;
446
446
  }
447
+ else if (this.quickPopup.element) {
448
+ this.destroyPopupButtons('quickPopup');
449
+ }
447
450
  var temp = {};
448
451
  temp[this.parent.eventFields.startTime] = this.parent.activeCellsData.startTime;
449
452
  temp[this.parent.eventFields.endTime] = this.parent.activeCellsData.endTime;
@@ -515,6 +518,9 @@ var QuickPopups = /** @class */ (function () {
515
518
  if (isSameTarget) {
516
519
  return;
517
520
  }
521
+ else if (this.quickPopup.element) {
522
+ this.destroyPopupButtons('quickPopup');
523
+ }
518
524
  var eventData = events.event;
519
525
  var quickEventPopup = createElement('div', { className: cls.EVENT_POPUP_CLASS });
520
526
  quickEventPopup.appendChild(this.getPopupHeader('Event', eventData));
@@ -1059,7 +1065,10 @@ var QuickPopups = /** @class */ (function () {
1059
1065
  _this.quickPopup.element.style.height = formatUnit((popupType === 'EditEventInfo') ? 65 : window.innerHeight);
1060
1066
  }
1061
1067
  else {
1062
- _this.quickPopup.offsetX = 10;
1068
+ var isVirtualScroll = _this.parent.virtualScrollModule && _this.parent.virtualScrollModule.isHorizontalScroll
1069
+ && !isNullOrUndefined(closest(target, '.' + cls.CONTENT_TABLE_CLASS));
1070
+ var conTable = _this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS + ' table');
1071
+ _this.quickPopup.offsetX = isVirtualScroll && !_this.parent.enableRtl ? (util.getTranslateX(conTable) + 10) : 10;
1063
1072
  _this.quickPopup.collision = { X: _this.parent.enableRtl ? 'flip' : 'none', Y: 'fit' };
1064
1073
  _this.quickPopup.position = { X: _this.parent.enableRtl ? 'left' : 'right', Y: _this.parent.enableRtl ? 'bottom' : 'top' };
1065
1074
  _this.quickPopup.dataBind();
@@ -1067,7 +1076,11 @@ var QuickPopups = /** @class */ (function () {
1067
1076
  var collide = isCollide(_this.quickPopup.element, _this.parent.element);
1068
1077
  if (collide.indexOf(_this.parent.enableRtl ? 'left' : 'right') > -1) {
1069
1078
  _this.quickPopup.offsetX = -target.offsetWidth - 10 - _this.quickPopup.element.offsetWidth;
1079
+ if (isVirtualScroll && !_this.parent.enableRtl) {
1080
+ _this.quickPopup.offsetX = util.getTranslateX(conTable) + _this.quickPopup.offsetX;
1081
+ }
1070
1082
  _this.quickPopup.dataBind();
1083
+ _this.quickPopup.refreshPosition(null, true);
1071
1084
  var leftCollide = isCollide(_this.quickPopup.element, _this.parent.element);
1072
1085
  if (leftCollide.indexOf('left') > -1) {
1073
1086
  _this.quickPopup.position = { X: 'center', Y: 'center' };
@@ -1076,9 +1089,8 @@ var QuickPopups = /** @class */ (function () {
1076
1089
  _this.quickPopup.dataBind();
1077
1090
  }
1078
1091
  }
1079
- if (_this.parent.virtualScrollModule && (collide.indexOf('top') > -1 || collide.indexOf('bottom') > -1)) {
1080
- var element = _this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS + ' table');
1081
- var translateY = util.getTranslateY(element);
1092
+ if (_this.parent.virtualScrollModule && !_this.parent.virtualScrollModule.isHorizontalScroll && (collide.indexOf('top') > -1 || collide.indexOf('bottom') > -1)) {
1093
+ var translateY = util.getTranslateY(conTable);
1082
1094
  _this.quickPopup.offsetY = translateY;
1083
1095
  _this.quickPopup.dataBind();
1084
1096
  }
@@ -1333,6 +1345,7 @@ var QuickPopups = /** @class */ (function () {
1333
1345
  this.destroyQuickPopup();
1334
1346
  this.destroyMorePopup();
1335
1347
  this.destroyQuickDialog();
1348
+ this.dialogEvent = null;
1336
1349
  this.parent = null;
1337
1350
  this.l10n = null;
1338
1351
  this.isCrudAction = null;
@@ -48,6 +48,7 @@ var Agenda = /** @class */ (function (_super) {
48
48
  var wrap = createElement('div', { className: cls.CONTENT_WRAP_CLASS });
49
49
  workTd.appendChild(wrap);
50
50
  var tbl = this.createTableLayout(cls.CONTENT_TABLE_CLASS);
51
+ this.setAriaAttributes(tbl);
51
52
  wrap.appendChild(tbl);
52
53
  var tBody = tbl.querySelector('tbody');
53
54
  var agendaDate = util.resetTime(this.parent.selectedDate);
@@ -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 { EventHandler, formatUnit, isNullOrUndefined, createElement, addClass, append, prepend, remove } from '@syncfusion/ej2-base';
15
+ import { EventHandler, formatUnit, isNullOrUndefined, createElement, addClass, append, prepend, remove, extend } from '@syncfusion/ej2-base';
16
16
  import { ViewBase } from './view-base';
17
17
  import { MonthEvent } from '../event-renderer/month';
18
18
  import * as util from '../base/util';
@@ -186,7 +186,7 @@ var Month = /** @class */ (function (_super) {
186
186
  if (this.parent.activeViewOptions.group.byDate) {
187
187
  clsList.push('e-by-date');
188
188
  }
189
- if (this.parent.activeViewOptions.allowVirtualScrolling) {
189
+ if (this.parent.activeViewOptions.allowVirtualScrolling && !this.parent.uiStateValues.isGroupAdaptive) {
190
190
  clsList.push(cls.VIRTUAL_SCROLL_CLASS);
191
191
  }
192
192
  if (this.parent.rowAutoHeight && this.parent.eventSettings.ignoreWhitespace) {
@@ -234,11 +234,18 @@ var Month = /** @class */ (function (_super) {
234
234
  }
235
235
  };
236
236
  Month.prototype.renderContent = function () {
237
+ if (this.parent.activeViewOptions.group.resources.length > 0) {
238
+ this.parent.resourceBase.renderedResources = extend([], this.parent.resourceBase.lastResourceLevel, null, true);
239
+ }
237
240
  var tr = createElement('tr');
238
241
  if (this.parent.activeViewOptions.showWeekNumber) {
239
242
  tr.appendChild(this.renderWeekNumberContent());
240
243
  }
241
244
  var workTd = createElement('td');
245
+ var levels = this.colLevels.slice(0);
246
+ if (this.parent.virtualScrollModule) {
247
+ this.resetColLevels();
248
+ }
242
249
  var wrap = createElement('div', { className: cls.CONTENT_WRAP_CLASS });
243
250
  var contentArea = this.renderContentArea();
244
251
  if (this.parent.currentView === 'Month') {
@@ -252,6 +259,10 @@ var Month = /** @class */ (function (_super) {
252
259
  EventHandler.add(wrap, 'scroll', this.onContentScroll, this);
253
260
  workTd.appendChild(wrap);
254
261
  tr.appendChild(workTd);
262
+ if (this.parent.virtualScrollModule) {
263
+ this.colLevels = levels;
264
+ this.parent.virtualScrollModule.renderVirtualTrack(wrap);
265
+ }
255
266
  this.element.querySelector('tbody').appendChild(tr);
256
267
  this.renderAppointmentContainer();
257
268
  };
@@ -279,6 +290,11 @@ var Month = /** @class */ (function (_super) {
279
290
  var wrap = createElement('div', { className: cls.DATE_HEADER_WRAP_CLASS });
280
291
  container.appendChild(wrap);
281
292
  var table = this.createTableLayout();
293
+ if (this.parent.currentView === 'Month') {
294
+ var thead = createElement('thead');
295
+ thead.appendChild(createElement('tr'));
296
+ prepend([thead], table);
297
+ }
282
298
  this.createColGroup(table, this.colLevels[this.colLevels.length - 1]);
283
299
  var trEle = createElement('tr');
284
300
  for (var i = 0; i < this.colLevels.length; i++) {
@@ -368,10 +384,12 @@ var Month = /** @class */ (function (_super) {
368
384
  var dates = this.renderDates.map(function (date) { return new Date(+date); });
369
385
  var count = this.parent.activeViewOptions.showWeekend ? util.WEEK_LENGTH :
370
386
  this.parent.activeViewOptions.workDays.length;
387
+ var level = this.colLevels.slice(0, 1)[0];
388
+ var startIndex = this.renderDates.map(Number).indexOf(+level[0].date);
371
389
  for (var i = 0; i < (this.renderDates.length / count); i++) {
372
390
  var colDates = dates.splice(0, count);
373
- for (var _c = 0, colDates_2 = colDates; _c < colDates_2.length; _c++) {
374
- var colDate = colDates_2[_c];
391
+ for (var j = startIndex; j < (this.colLevels[0].length + startIndex) && j < colDates.length; j++) {
392
+ var colDate = colDates[j];
375
393
  if (includeResource) {
376
394
  var lastRow = this.colLevels[(this.colLevels.length - 1)];
377
395
  var resourcesTd = lastRow.slice(0, lastRow.length / count);
@@ -407,6 +425,7 @@ var Month = /** @class */ (function (_super) {
407
425
  };
408
426
  Month.prototype.renderContentArea = function () {
409
427
  var tbl = this.createTableLayout(cls.CONTENT_TABLE_CLASS);
428
+ this.setAriaAttributes(tbl);
410
429
  this.addAutoHeightClass(tbl);
411
430
  if (this.parent.currentView === 'TimelineMonth') {
412
431
  this.createColGroup(tbl, this.colLevels[this.colLevels.length - 1]);
@@ -423,8 +442,8 @@ var Month = /** @class */ (function (_super) {
423
442
  };
424
443
  Month.prototype.getContentRows = function () {
425
444
  var trows = [];
426
- var tr = createElement('tr', { attrs: { role: 'row' } });
427
- var td = createElement('td', { attrs: { role: 'gridcell', 'aria-selected': 'false' } });
445
+ var tr = createElement('tr');
446
+ var td = createElement('td', { attrs: { 'aria-selected': 'false' } });
428
447
  var slotDatas = this.getContentSlots();
429
448
  for (var row = 0; row < slotDatas.length; row++) {
430
449
  var ntr = tr.cloneNode();
@@ -91,12 +91,18 @@ var Render = /** @class */ (function () {
91
91
  this.parent.virtualScrollModule.destroy();
92
92
  this.parent.virtualScrollModule = null;
93
93
  }
94
- if (this.parent.currentView.indexOf('Timeline') !== -1 && (this.parent.currentView.indexOf('Year') === -1 ||
94
+ if ((['Agenda', 'Year'].indexOf(this.parent.currentView) === -1 ||
95
95
  (this.parent.currentView === 'TimelineYear' && this.parent.activeViewOptions.orientation === 'Vertical'))
96
96
  && this.parent.activeViewOptions.allowVirtualScrolling
97
97
  && this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
98
98
  this.parent.virtualScrollModule = new VirtualScroll(this.parent);
99
- this.parent.uiStateValues.top = 0;
99
+ if (this.parent.activeView.isTimelineView()) {
100
+ this.parent.uiStateValues.top = 0;
101
+ }
102
+ else {
103
+ this.parent.virtualScrollModule.isHorizontalScroll = true;
104
+ this.parent.uiStateValues.left = 0;
105
+ }
100
106
  }
101
107
  this.updateHeader();
102
108
  this.parent.activeView.renderLayout(cls.CURRENT_PANEL_CLASS);
@@ -229,8 +229,8 @@ var TimelineViews = /** @class */ (function (_super) {
229
229
  };
230
230
  TimelineViews.prototype.getContentRows = function () {
231
231
  var rows = [];
232
- var tr = createElement('tr', { attrs: { role: 'row' } });
233
- var td = createElement('td', { attrs: { role: 'gridcell', 'aria-selected': 'false' } });
232
+ var tr = createElement('tr');
233
+ var td = createElement('td', { attrs: { 'aria-selected': 'false' } });
234
234
  var trCount = this.getRowCount();
235
235
  for (var i = 0; i < trCount; i++) {
236
236
  var ntr = tr.cloneNode();
@@ -18,4 +18,5 @@ export declare class TimelineYear extends Year {
18
18
  private renderCellTemplate;
19
19
  scrollToDate(scrollDate: Date): void;
20
20
  getScrollableElement(): Element;
21
+ private wireEvents;
21
22
  }