@syncfusion/ej2-schedule 26.1.39 → 26.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/ej2-schedule.min.js +2 -2
  2. package/dist/ej2-schedule.umd.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-schedule.es2015.js +248 -112
  5. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  6. package/dist/es6/ej2-schedule.es5.js +250 -113
  7. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  8. package/dist/global/ej2-schedule.min.js +2 -2
  9. package/dist/global/ej2-schedule.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +12 -12
  12. package/src/schedule/actions/drag.d.ts +2 -0
  13. package/src/schedule/actions/drag.js +43 -15
  14. package/src/schedule/actions/resize.js +20 -19
  15. package/src/schedule/actions/touch.js +1 -0
  16. package/src/schedule/actions/virtual-scroll.d.ts +4 -0
  17. package/src/schedule/actions/virtual-scroll.js +78 -29
  18. package/src/schedule/base/interface.d.ts +3 -0
  19. package/src/schedule/base/schedule.d.ts +25 -0
  20. package/src/schedule/base/schedule.js +36 -1
  21. package/src/schedule/base/util.d.ts +10 -5
  22. package/src/schedule/base/util.js +15 -10
  23. package/src/schedule/event-renderer/agenda-base.js +2 -1
  24. package/src/schedule/event-renderer/inline-edit.js +4 -4
  25. package/src/schedule/event-renderer/month.js +3 -3
  26. package/src/schedule/event-renderer/timeline-view.js +4 -4
  27. package/src/schedule/event-renderer/vertical-view.js +3 -3
  28. package/src/schedule/event-renderer/year.js +5 -5
  29. package/src/schedule/popups/event-window.js +12 -5
  30. package/src/schedule/renderer/timeline-view.js +4 -4
  31. package/src/schedule/renderer/vertical-view.js +18 -8
  32. package/src/schedule/renderer/view-base.js +1 -1
@@ -107,15 +107,16 @@ var MS_PER_MINUTE = 60000;
107
107
  *
108
108
  * @param {Element} container Accepts the DOM element
109
109
  * @param {string} elementClass Accepts the element class
110
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
110
111
  * @returns {number} Returns the height of the element
111
112
  */
112
- function getElementHeightFromClass(container, elementClass) {
113
+ function getElementHeightFromClass(container, elementClass, isTransformed) {
113
114
  var height = 0;
114
115
  var el = createElement('div', { className: elementClass }).cloneNode();
115
116
  el.style.visibility = 'hidden';
116
117
  el.style.position = 'absolute';
117
118
  container.appendChild(el);
118
- height = getElementHeight(el);
119
+ height = getElementHeight(el, isTransformed);
119
120
  remove(el);
120
121
  return height;
121
122
  }
@@ -124,15 +125,16 @@ function getElementHeightFromClass(container, elementClass) {
124
125
  *
125
126
  * @param {Element} container Accepts the DOM element
126
127
  * @param {string} elementClass Accepts the element class
128
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
127
129
  * @returns {number} Returns the width of the element
128
130
  */
129
- function getElementWidthFromClass(container, elementClass) {
131
+ function getElementWidthFromClass(container, elementClass, isTransformed) {
130
132
  var width = 0;
131
133
  var el = createElement('div', { className: elementClass }).cloneNode();
132
134
  el.style.visibility = 'hidden';
133
135
  el.style.position = 'absolute';
134
136
  container.appendChild(el);
135
- width = getElementWidth(el);
137
+ width = getElementWidth(el, isTransformed);
136
138
  remove(el);
137
139
  return width;
138
140
  }
@@ -524,28 +526,31 @@ function capitalizeFirstWord(inputString, type) {
524
526
  * Method to get element cell width
525
527
  *
526
528
  * @param {HTMLElement} element Accepts the DOM element
529
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
527
530
  * @returns {number} Returns the width of the given element
528
531
  */
529
- function getElementWidth(element) {
530
- return document.body.style.transform.includes('scale') ? element.offsetWidth : element.getBoundingClientRect().width;
532
+ function getElementWidth(element, isTransformed) {
533
+ return isTransformed ? element.offsetWidth : element.getBoundingClientRect().width;
531
534
  }
532
535
  /**
533
536
  * Method to get element cell Height
534
537
  *
535
538
  * @param {HTMLElement} element Accepts the DOM element
539
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
536
540
  * @returns {number} Returns the Height of the given element
537
541
  */
538
- function getElementHeight(element) {
539
- return document.body.style.transform.includes('scale') ? element.offsetHeight : element.getBoundingClientRect().height;
542
+ function getElementHeight(element, isTransformed) {
543
+ return isTransformed ? element.offsetHeight : element.getBoundingClientRect().height;
540
544
  }
541
545
  /**
542
546
  * Method to get element cell Top
543
547
  *
544
548
  * @param {HTMLElement} element Accepts the DOM element
549
+ * @param {boolean} isTransformed Accepts the boolean value that indicates the status of the transform style applied to the element
545
550
  * @returns {number} Returns the top value of the given element
546
551
  */
547
- function getElementTop(element) {
548
- return document.body.style.transform.includes('scale') ? element.offsetTop : element.getBoundingClientRect().top;
552
+ function getElementTop(element, isTransformed) {
553
+ return isTransformed ? element.offsetTop : element.getBoundingClientRect().top;
549
554
  }
550
555
 
551
556
  /**
@@ -1928,6 +1933,7 @@ var ScheduleTouch = /** @__PURE__ @class */ (function () {
1928
1933
  this.parent.selectedElements = [];
1929
1934
  this.parent.eventBase.getSelectedEventElements(target);
1930
1935
  if (this.parent.resizeModule && closest(e.originalEvent.target, '.' + EVENT_RESIZE_CLASS)) {
1936
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1931
1937
  this.parent.resizeModule.resizeStart(e.originalEvent);
1932
1938
  }
1933
1939
  }
@@ -6978,7 +6984,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6978
6984
  this.parent.crudModule.crudObj.isCrudAction = false;
6979
6985
  }
6980
6986
  this.parent.renderTemplates(function () {
6981
- if (_this.parent.isReact && _this.parent.activeViewOptions.eventTemplate) {
6987
+ if (_this.parent && _this.parent.isReact && _this.parent.activeViewOptions.eventTemplate) {
6982
6988
  var wraps = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_WRAPPER_HIDDEN_CLASS));
6983
6989
  removeClass(wraps, APPOINTMENT_WRAPPER_HIDDEN_CLASS);
6984
6990
  }
@@ -6992,7 +6998,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6992
6998
  this.resources = this.parent.resourceBase.renderedResources;
6993
6999
  }
6994
7000
  this.cellHeight =
6995
- parseFloat(getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
7001
+ parseFloat(this.parent.getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
6996
7002
  this.dateRender[0] = this.parent.activeView.renderDates;
6997
7003
  if (this.parent.activeViewOptions.group.resources.length > 0) {
6998
7004
  for (var i = 0, len = this.resources.length; i < len; i++) {
@@ -7078,7 +7084,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
7078
7084
  var resources = this.getResourceList();
7079
7085
  var dateCount = this.getStartCount();
7080
7086
  var isRender;
7081
- var appHeight = eventType === 'allDayEvents' ? getElementHeightFromClass(this.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS) : 0;
7087
+ var appHeight = eventType === 'allDayEvents' ? this.parent.getElementHeightFromClass(this.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS) : 0;
7082
7088
  var allDayRowTop = eventType === 'allDayEvents' && this.allDayElement.length > 0 ? this.allDayElement[0].offsetTop : 0;
7083
7089
  var _loop_1 = function (resource) {
7084
7090
  isRender = true;
@@ -7833,7 +7839,7 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7833
7839
  this.monthHeaderHeight = wrapper.offsetTop - cellTd.offsetTop;
7834
7840
  cellTd.removeChild(wrapper);
7835
7841
  }
7836
- this.eventHeight = getElementHeightFromClass(this.element, APPOINTMENT_CLASS);
7842
+ this.eventHeight = this.parent.getElementHeightFromClass(this.element, APPOINTMENT_CLASS);
7837
7843
  var selector = '.' + CONTENT_TABLE_CLASS + ' tbody tr';
7838
7844
  this.addCellHeight(selector, this.eventHeight, (this.parent.currentView === 'Month' ? EVENT_GAP : 2), this.monthHeaderHeight, this.moreIndicatorHeight);
7839
7845
  var scrollTop = conWrap.scrollTop;
@@ -7912,8 +7918,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7912
7918
  });
7913
7919
  }
7914
7920
  var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? 0 : this.workCells.length - 1];
7915
- this.cellWidth = getElementWidth(cellDetail);
7916
- this.cellHeight = getElementHeight(cellDetail);
7921
+ this.cellWidth = this.parent.getElementWidth(cellDetail);
7922
+ this.cellHeight = this.parent.getElementHeight(cellDetail);
7917
7923
  this.dateRender = dateRender;
7918
7924
  var filteredDates = this.getRenderedDates(dateRender);
7919
7925
  this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
@@ -8494,7 +8500,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8494
8500
  this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
8495
8501
  this.renderType = 'day';
8496
8502
  var workCell = this.content.querySelector('.' + WORK_CELLS_CLASS);
8497
- this.cellWidth = getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
8503
+ this.cellWidth = this.parent.getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
8498
8504
  this.slotsPerDay = 1;
8499
8505
  }
8500
8506
  else {
@@ -8664,14 +8670,14 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8664
8670
  this.wireAppointmentEvents(appointmentElement, event);
8665
8671
  if (this.parent.rowAutoHeight) {
8666
8672
  var conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
8667
- var conWidth = getElementWidth(conWrap);
8673
+ var conWidth = this.parent.getElementWidth(conWrap);
8668
8674
  var isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
8669
8675
  conWrap.offsetWidth === conWrap.clientWidth;
8670
8676
  this.renderEventElement(event, appointmentElement, cellTd);
8671
8677
  var firstChild = this.getFirstChild(resIndex);
8672
8678
  this.updateCellHeight(firstChild, height);
8673
8679
  if (isWithoutScroll &&
8674
- (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== getElementWidth(conWrap))) {
8680
+ (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== this.parent.getElementWidth(conWrap))) {
8675
8681
  this.adjustAppointments(conWidth);
8676
8682
  }
8677
8683
  }
@@ -8790,7 +8796,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8790
8796
  TimelineEvent.prototype.adjustAppointments = function (conWidth) {
8791
8797
  var _this = this;
8792
8798
  var tr = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody tr');
8793
- var actualCellWidth = getElementWidth(this.workCells[0]);
8799
+ var actualCellWidth = this.parent.getElementWidth(this.workCells[0]);
8794
8800
  this.cellWidth = actualCellWidth / +(this.workCells[0].getAttribute('colspan') || 1);
8795
8801
  var currentPercentage = (actualCellWidth * tr.children.length) / (conWidth / 100);
8796
8802
  var apps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
@@ -9154,11 +9160,11 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
9154
9160
  var allDayElements = [].slice.call(this.parent.element.querySelectorAll('.' + ALLDAY_APPOINTMENT_CLASS));
9155
9161
  var allDayLevel = 0;
9156
9162
  if (allDayElements.length > 0) {
9157
- allDayLevel = Math.floor(getElementHeight(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS)) /
9163
+ allDayLevel = Math.floor(this.parent.getElementHeight(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS)) /
9158
9164
  allDayElements[0].offsetHeight) - 1;
9159
9165
  }
9160
9166
  verticalEvent.allDayLevel = allDayLevel;
9161
- var appHeight = getElementHeightFromClass(this.parent.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS);
9167
+ var appHeight = this.parent.getElementHeightFromClass(this.parent.element.querySelector('.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS), APPOINTMENT_CLASS);
9162
9168
  var cellTop = verticalEvent.allDayElement.length > 0 ? verticalEvent.allDayElement[0].offsetTop : 0;
9163
9169
  verticalEvent.renderAllDayEvents(saveObj, index, resIndex, daysCount, this.parent.allowInline, cellTop, appHeight);
9164
9170
  }
@@ -9186,7 +9192,7 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
9186
9192
  monthEvent.cellWidth = monthEvent.workCells[0].offsetWidth;
9187
9193
  monthEvent.cellHeight = monthEvent.workCells[0].offsetHeight;
9188
9194
  monthEvent.eventHeight =
9189
- getElementHeightFromClass(this.parent.monthModule.element || monthEvent.element, APPOINTMENT_CLASS);
9195
+ this.parent.getElementHeightFromClass(this.parent.monthModule.element || monthEvent.element, APPOINTMENT_CLASS);
9190
9196
  monthEvent.getSlotDates(workDays);
9191
9197
  var filteredDates = monthEvent.getRenderedDates(renderDates);
9192
9198
  var spannedEvents = monthEvent.splitEvent(saveObject, filteredDates || renderDates);
@@ -9210,7 +9216,7 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
9210
9216
  var dayLength = this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr').length === 0 ?
9211
9217
  0 : this.parent.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr')[0].children.length;
9212
9218
  timelineView.slotsPerDay = dayLength / timelineView.dateRender.length;
9213
- timelineView.eventHeight = getElementHeightFromClass(timelineView.element, APPOINTMENT_CLASS);
9219
+ timelineView.eventHeight = this.parent.getElementHeightFromClass(timelineView.element, APPOINTMENT_CLASS);
9214
9220
  timelineView.renderEvents(saveObject, resIndex);
9215
9221
  };
9216
9222
  InlineEdit.prototype.getEventDaysCount = function (saveObj) {
@@ -12455,12 +12461,15 @@ var EventWindow = /** @__PURE__ @class */ (function () {
12455
12461
  this.recurrenceEditor = null;
12456
12462
  }
12457
12463
  this.destroyComponents();
12458
- var formElements = [].slice.call(form.children);
12459
- for (var _i = 0, formElements_1 = formElements; _i < formElements_1.length; _i++) {
12460
- var element = formElements_1[_i];
12461
- remove(element);
12462
- }
12463
12464
  this.parent.resetTemplates(['editorTemplate']);
12465
+ EventHandler.clearEvents(form);
12466
+ if (!this.parent.isReact) {
12467
+ var formElements = [].slice.call(form.children);
12468
+ for (var _i = 0, formElements_1 = formElements; _i < formElements_1.length; _i++) {
12469
+ var element = formElements_1[_i];
12470
+ remove(element);
12471
+ }
12472
+ }
12464
12473
  }
12465
12474
  var templateId = this.parent.element.id + '_editorTemplate';
12466
12475
  var tempEle = [].slice.call(this.parent.getEditorTemplate()(args || {}, this.parent, 'editorTemplate', templateId, false));
@@ -13067,6 +13076,10 @@ var EventWindow = /** @__PURE__ @class */ (function () {
13067
13076
  if (!isNullOrUndefined(descriptionRule)) {
13068
13077
  rules[this.parent.eventSettings.fields.description.name] = descriptionRule;
13069
13078
  }
13079
+ if (this.fieldValidator) {
13080
+ this.fieldValidator.destroy();
13081
+ this.fieldValidator = null;
13082
+ }
13070
13083
  this.fieldValidator = new FieldValidator();
13071
13084
  this.fieldValidator.renderFormValidator(form, rules, this.element, this.parent.locale);
13072
13085
  };
@@ -14104,6 +14117,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14104
14117
  this.renderedLength = 0;
14105
14118
  this.averageRowHeight = 0;
14106
14119
  this.startIndex = 0;
14120
+ this.existingDataCollection = [];
14107
14121
  this.parent = parent;
14108
14122
  this.addEventListener();
14109
14123
  }
@@ -14176,10 +14190,10 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14176
14190
  };
14177
14191
  VirtualScroll.prototype.setItemSize = function () {
14178
14192
  if (this.isHorizontalScroll) {
14179
- this.itemSize = getElementWidthFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
14193
+ this.itemSize = getElementWidthFromClass(this.parent.activeView.element, WORK_CELLS_CLASS, this.parent.uiStateValues.isTransformed) || this.itemSize;
14180
14194
  }
14181
14195
  else {
14182
- this.itemSize = getElementHeightFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
14196
+ this.itemSize = this.parent.getElementHeightFromClass(this.parent.activeView.element, WORK_CELLS_CLASS) || this.itemSize;
14183
14197
  }
14184
14198
  };
14185
14199
  VirtualScroll.prototype.refreshLayout = function () {
@@ -14463,43 +14477,91 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14463
14477
  append(eventRows, eventWrap);
14464
14478
  };
14465
14479
  VirtualScroll.prototype.updateHorizontalContent = function (conWrap, resCollection) {
14480
+ this.existingDataCollection = this.parent.resourceBase.expandedResources;
14466
14481
  this.parent.resourceBase.expandedResources = resCollection;
14467
14482
  var selectedEle = this.parent.getSelectedCells();
14468
14483
  this.focusedEle = selectedEle[selectedEle.length - 1] || this.focusedEle;
14469
- var renderedLength = conWrap.querySelectorAll('tbody tr').length;
14484
+ var tbody = conWrap.querySelector('tbody');
14485
+ var renderedRows = Array.from(tbody.querySelectorAll('tr'));
14486
+ if (this.parent.currentView === 'Month') {
14487
+ this.updateMonthViewContent(conWrap, resCollection);
14488
+ }
14489
+ else {
14490
+ this.updateOtherViewContent(conWrap, resCollection, renderedRows);
14491
+ }
14492
+ };
14493
+ VirtualScroll.prototype.updateMonthViewContent = function (conWrap, resCollection) {
14494
+ var renderedLength = conWrap.querySelectorAll(' tr').length;
14470
14495
  for (var i = 0; i < renderedLength; i++) {
14471
14496
  remove(conWrap.querySelector('tbody tr'));
14472
14497
  }
14473
- if (this.parent.currentView === 'Month') {
14474
- if (this.parent.activeViewOptions.group.byDate) {
14475
- this.parent.activeView.colLevels[0] = resCollection;
14476
- }
14477
- else {
14478
- this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 2] = resCollection;
14479
- }
14480
- var contentRows = this.parent.activeView.getContentRows();
14481
- append(contentRows, conWrap.querySelector('tbody'));
14498
+ if (this.parent.activeViewOptions.group.byDate) {
14499
+ this.parent.activeView.colLevels[0] = resCollection;
14482
14500
  }
14483
14501
  else {
14484
- var col = [].slice.call(conWrap.querySelector('colgroup').children);
14485
- for (var i = 0; i < col.length; i++) {
14486
- remove(col[parseInt(i.toString(), 10)]);
14487
- }
14488
- this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 1] = resCollection;
14489
- var contentRows = this.parent.activeView.getContentRows();
14490
- var table = conWrap.querySelector('table');
14491
- var thead = conWrap.querySelector('thead');
14492
- var colGroupEle_1 = conWrap.querySelector('colgroup');
14493
- resCollection.forEach(function () {
14494
- colGroupEle_1.appendChild(createElement('col'));
14502
+ this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 2] = resCollection;
14503
+ }
14504
+ var contentRows = this.parent.activeView.getContentRows();
14505
+ append(contentRows, conWrap.querySelector('tbody'));
14506
+ };
14507
+ VirtualScroll.prototype.updateOtherViewContent = function (conWrap, resCollection, renderedRows) {
14508
+ var tbody = conWrap.querySelector('tbody');
14509
+ var colGroup = conWrap.querySelector('colgroup');
14510
+ var thead = conWrap.querySelector('thead');
14511
+ var table = conWrap.querySelector('table');
14512
+ this.parent.activeView.colLevels[this.parent.activeView.colLevels.length - 1] = resCollection;
14513
+ var newGroupIndices = new Set(resCollection.map(function (data) { return data.groupIndex; }));
14514
+ renderedRows.forEach(function (row) {
14515
+ var tdElements = row.querySelectorAll('td');
14516
+ tdElements.forEach(function (td) {
14517
+ var groupIndex = parseInt(td.getAttribute('data-group-index'), 10);
14518
+ if (!newGroupIndices.has(groupIndex)) {
14519
+ td.remove();
14520
+ }
14495
14521
  });
14496
- thead.appendChild(this.parent.eventBase.createEventWrapper('', this.startIndex > 0 ? this.startIndex : 0));
14497
- if (this.parent.activeViewOptions.timeScale.enable) {
14498
- thead.appendChild(this.parent.eventBase.createEventWrapper('timeIndicator'));
14499
- }
14500
- prepend([thead], table);
14501
- append(contentRows, conWrap.querySelector('tbody'));
14522
+ });
14523
+ var col = [].slice.call(conWrap.querySelector('colgroup').children);
14524
+ for (var i = 0; i < col.length; i++) {
14525
+ remove(col[parseInt(i.toString(), 10)]);
14502
14526
  }
14527
+ resCollection.forEach(function () { return colGroup.appendChild(createElement('col')); });
14528
+ var tHead = [].slice.call(conWrap.querySelector('thead').children);
14529
+ for (var i = 0; i < tHead.length; i++) {
14530
+ remove(tHead[parseInt(i.toString(), 10)]);
14531
+ }
14532
+ thead.appendChild(this.parent.eventBase.createEventWrapper('', this.startIndex > 0 ? this.startIndex : 0));
14533
+ if (this.parent.activeViewOptions.timeScale.enable) {
14534
+ thead.appendChild(this.parent.eventBase.createEventWrapper('timeIndicator'));
14535
+ }
14536
+ prepend([thead], table);
14537
+ var contentRows = this.parent.activeView.getContentRows();
14538
+ this.mergeNewTdData(tbody, contentRows);
14539
+ };
14540
+ VirtualScroll.prototype.mergeNewTdData = function (tbody, contentRows) {
14541
+ var existingRows = Array.from(tbody.querySelectorAll('tr'));
14542
+ existingRows.forEach(function (existingRow, rowIndex) {
14543
+ if (rowIndex < contentRows.length) {
14544
+ var newRow = contentRows[parseInt(rowIndex.toString(), 10)];
14545
+ var existingTds_1 = Array.from(existingRow.querySelectorAll('td'));
14546
+ var newTds = Array.from(newRow.querySelectorAll('td'));
14547
+ newTds.forEach(function (newTd) {
14548
+ var newGroupIndex = parseInt(newTd.getAttribute('data-group-index').toString(), 10);
14549
+ var inserted = false;
14550
+ for (var _i = 0, existingTds_2 = existingTds_1; _i < existingTds_2.length; _i++) {
14551
+ var existingTd = existingTds_2[_i];
14552
+ var existingGroupIndex = parseInt(existingTd.getAttribute('data-group-index').toString(), 10);
14553
+ if (newGroupIndex < existingGroupIndex) {
14554
+ existingRow.insertBefore(newTd, existingTd);
14555
+ inserted = true;
14556
+ break;
14557
+ }
14558
+ }
14559
+ if (!inserted) {
14560
+ existingRow.appendChild(newTd);
14561
+ }
14562
+ });
14563
+ }
14564
+ });
14503
14565
  };
14504
14566
  VirtualScroll.prototype.getBufferCollection = function (startIndex, endIndex) {
14505
14567
  return this.parent.resourceBase.expandedResources.slice(startIndex, endIndex);
@@ -17397,6 +17459,37 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17397
17459
  }
17398
17460
  return templateName;
17399
17461
  };
17462
+ /**
17463
+ * Method to get element width
17464
+ *
17465
+ * @param {HTMLElement} element Accepts the DOM element
17466
+ * @returns {number} Returns the width of the given element
17467
+ * @private
17468
+ */
17469
+ Schedule.prototype.getElementWidth = function (element) {
17470
+ return getElementWidth(element, this.uiStateValues.isTransformed);
17471
+ };
17472
+ /**
17473
+ * Method to get element height
17474
+ *
17475
+ * @param {HTMLElement} element Accepts the DOM element
17476
+ * @returns {number} Returns the Height of the given element
17477
+ * @private
17478
+ */
17479
+ Schedule.prototype.getElementHeight = function (element) {
17480
+ return getElementHeight(element, this.uiStateValues.isTransformed);
17481
+ };
17482
+ /**
17483
+ * Method to get height from element
17484
+ *
17485
+ * @param {Element} element Accepts the DOM element
17486
+ * @param {string} elementClass Accepts the element class
17487
+ * @returns {number} Returns the height of the element
17488
+ * @private
17489
+ */
17490
+ Schedule.prototype.getElementHeightFromClass = function (element, elementClass) {
17491
+ return getElementHeightFromClass(element, elementClass, this.uiStateValues.isTransformed);
17492
+ };
17400
17493
  /**
17401
17494
  * Method to render react templates
17402
17495
  *
@@ -17477,6 +17570,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17477
17570
  this.headerModule = new HeaderRenderer(this);
17478
17571
  }
17479
17572
  this.renderTableContainer();
17573
+ this.uiStateValues.isTransformed = Math.round(this.element.getBoundingClientRect().width) !== this.element.offsetWidth;
17480
17574
  if (Browser.isDevice || Browser.isTouch) {
17481
17575
  this.scheduleTouchModule = new ScheduleTouch(this);
17482
17576
  }
@@ -17980,7 +18074,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
17980
18074
  this.uiStateValues = {
17981
18075
  expand: false, isInitial: true, left: 0, top: 0, isGroupAdaptive: false,
17982
18076
  isIgnoreOccurrence: false, groupIndex: this.adaptiveGroupIndex, action: false,
17983
- isBlock: false, isCustomMonth: true, isPreventTimezone: false
18077
+ isBlock: false, isCustomMonth: true, isPreventTimezone: false, isTransformed: false
17984
18078
  };
17985
18079
  }
17986
18080
  this.currentTimezoneDate = this.getCurrentTime();
@@ -19373,6 +19467,9 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
19373
19467
  * @returns {void}
19374
19468
  */
19375
19469
  Schedule.prototype.scrollTo = function (hour, scrollDate) {
19470
+ if (this.currentView.indexOf('Agenda') < 0 && isNullOrUndefined(this.element.querySelector('.e-work-cells'))) {
19471
+ return;
19472
+ }
19376
19473
  if (this.activeView.scrollToDate && isNullOrUndefined(hour) && scrollDate) {
19377
19474
  this.activeView.scrollToDate(scrollDate);
19378
19475
  }
@@ -20892,8 +20989,8 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
20892
20989
  };
20893
20990
  _this.actionObj.groupIndex = _this.parent.uiStateValues.isGroupAdaptive ? _this.parent.uiStateValues.groupIndex : 0;
20894
20991
  var workCell = _this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
20895
- _this.actionObj.cellWidth = getElementWidth(workCell);
20896
- _this.actionObj.cellHeight = getElementHeight(workCell);
20992
+ _this.actionObj.cellWidth = _this.parent.getElementWidth(workCell);
20993
+ _this.actionObj.cellHeight = _this.parent.getElementHeight(workCell);
20897
20994
  var hRows = _this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
20898
20995
  if (_this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
20899
20996
  var tr = _this.parent.getContentTable().querySelector('tr');
@@ -21203,9 +21300,10 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21203
21300
  parseInt(this.actionObj.clone.style.left, 10);
21204
21301
  offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
21205
21302
  if (!isLeft) {
21206
- offsetValue += (getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
21303
+ offsetValue += (this.parent.getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
21207
21304
  }
21208
- cellIndex = Math.floor(offsetValue / Math.floor(getElementWidth(tr) / noOfDays));
21305
+ cellIndex = !isTimelineMonth ? Math.round(offsetValue / (this.parent.getElementWidth(tr) / noOfDays)) :
21306
+ Math.floor(offsetValue / Math.floor(this.parent.getElementWidth(tr) / noOfDays));
21209
21307
  isDateHeader = isTimeViews && headerName === 'Date';
21210
21308
  cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
21211
21309
  isLastCell = cellIndex === tdCollections.length;
@@ -21214,7 +21312,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21214
21312
  else {
21215
21313
  var cellWidth = this.actionObj.cellWidth;
21216
21314
  cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
21217
- Math.ceil((offset + (getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
21315
+ Math.ceil((offset + (this.parent.getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
21218
21316
  if (this.parent.enableRtl) {
21219
21317
  var cellOffsetWidth = 0;
21220
21318
  if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
@@ -21222,7 +21320,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21222
21320
  cellOffsetWidth = this.actionObj.cellWidth;
21223
21321
  }
21224
21322
  var offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
21225
- this.actionObj.cellWidth) + (isLeft ? 0 : getElementWidth(this.actionObj.clone) - cellOffsetWidth);
21323
+ this.actionObj.cellWidth) + (isLeft ? 0 : this.parent.getElementWidth(this.actionObj.clone) - cellOffsetWidth);
21226
21324
  cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
21227
21325
  }
21228
21326
  isLastCell = cellIndex === tdCollections.length;
@@ -21241,7 +21339,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21241
21339
  }
21242
21340
  else {
21243
21341
  if (!isLeft) {
21244
- offset += getElementWidth(this.actionObj.clone);
21342
+ offset += this.parent.getElementWidth(this.actionObj.clone);
21245
21343
  }
21246
21344
  var spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
21247
21345
  (offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
@@ -21253,9 +21351,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21253
21351
  }
21254
21352
  else {
21255
21353
  var cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
21256
- var originalWidth = Math.ceil((isLeft ? getElementWidth(this.actionObj.element) : 0) /
21354
+ var originalWidth = Math.ceil((isLeft ? this.parent.getElementWidth(this.actionObj.element) : 0) /
21257
21355
  this.actionObj.cellWidth) * this.actionObj.cellWidth;
21258
- var noOfDays = Math.ceil((getElementWidth(this.actionObj.clone) - originalWidth) /
21356
+ var noOfDays = Math.ceil((this.parent.getElementWidth(this.actionObj.clone) - originalWidth) /
21259
21357
  this.actionObj.cellWidth);
21260
21358
  var tr = closest(this.actionObj.clone, 'tr');
21261
21359
  var dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
@@ -21318,9 +21416,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21318
21416
  var slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
21319
21417
  var pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
21320
21418
  var targetWidth = isTimelineView ?
21321
- (getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
21322
- this.parent.currentView === 'Month' ? getElementWidth(this.actionObj.element) :
21323
- Math.ceil(getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
21419
+ (this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
21420
+ this.parent.currentView === 'Month' ? this.parent.getElementWidth(this.actionObj.element) :
21421
+ Math.ceil(this.parent.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
21324
21422
  var offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
21325
21423
  var left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
21326
21424
  if (isTimeViews) {
@@ -21335,7 +21433,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21335
21433
  this.actionObj.event[this.parent.eventFields.isAllDay] = false;
21336
21434
  }
21337
21435
  var width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
21338
- getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
21436
+ this.parent.getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
21339
21437
  if (this.parent.enableRtl) {
21340
21438
  var rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
21341
21439
  -(offsetWidth - this.actionObj.cellWidth);
@@ -21349,7 +21447,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21349
21447
  }
21350
21448
  rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
21351
21449
  styles.right = formatUnit(rightValue);
21352
- width = width + rightValue > this.scrollArgs.width ? getElementWidth(this.actionObj.clone) : width;
21450
+ width = width + rightValue > this.scrollArgs.width ? this.parent.getElementWidth(this.actionObj.clone) : width;
21353
21451
  }
21354
21452
  else {
21355
21453
  var offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
@@ -21357,12 +21455,12 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21357
21455
  if (isTimelineView) {
21358
21456
  offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
21359
21457
  if (this.parent.enableRtl) {
21360
- offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - getElementWidth(this.actionObj.clone))
21458
+ offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.parent.getElementWidth(this.actionObj.clone))
21361
21459
  ? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
21362
21460
  }
21363
21461
  else {
21364
- offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + getElementWidth(this.actionObj.clone) &&
21365
- getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
21462
+ offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.parent.getElementWidth(this.actionObj.clone) &&
21463
+ this.parent.getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
21366
21464
  parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
21367
21465
  }
21368
21466
  }
@@ -21378,10 +21476,10 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21378
21476
  }
21379
21477
  else {
21380
21478
  offsetLeft = 0;
21381
- width = getElementWidth(this.actionObj.clone);
21479
+ width = this.parent.getElementWidth(this.actionObj.clone);
21382
21480
  }
21383
21481
  }
21384
- var cloneWidth = Math.ceil(getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
21482
+ var cloneWidth = Math.ceil(this.parent.getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
21385
21483
  this.actionObj.cellWidth;
21386
21484
  if (isLeft) {
21387
21485
  styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
@@ -21512,10 +21610,10 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
21512
21610
  YearEvent.prototype.timelineYearViewEvents = function () {
21513
21611
  var _this = this;
21514
21612
  var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
21515
- this.cellWidth = getElementWidth(workCell);
21613
+ this.cellWidth = this.parent.getElementWidth(workCell);
21516
21614
  this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
21517
21615
  var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
21518
- this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
21616
+ this.eventHeight = this.parent.getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
21519
21617
  var selector = "." + MONTH_HEADER_WRAPPER + " tbody tr,." + RESOURCE_COLUMN_TABLE_CLASS + " tbody tr,." + CONTENT_TABLE_CLASS + " tbody tr";
21520
21618
  this.addCellHeight(selector, this.eventHeight, EVENT_GAP$2, this.cellHeader, this.moreIndicatorHeight);
21521
21619
  var wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
@@ -21671,10 +21769,10 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
21671
21769
  var contentTable = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
21672
21770
  var isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
21673
21771
  var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
21674
- this.cellWidth = getElementWidth(workCell);
21772
+ this.cellWidth = this.parent.getElementWidth(workCell);
21675
21773
  this.cellHeader = 0;
21676
21774
  var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
21677
- this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
21775
+ this.eventHeight = this.parent.getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
21678
21776
  var selector = "." + MONTH_HEADER_WRAPPER + " tbody tr,." + RESOURCE_COLUMN_TABLE_CLASS + " tbody tr,." + CONTENT_TABLE_CLASS + " tbody tr";
21679
21777
  this.addCellHeight(selector, this.eventHeight, EVENT_GAP$2, this.cellHeader, this.moreIndicatorHeight);
21680
21778
  var wrapperCollection = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
@@ -21716,7 +21814,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
21716
21814
  appWrapper.forEach(function (appWrap, cellIndex) {
21717
21815
  var td = row.querySelector("td:nth-child(" + (cellIndex + 1) + ")");
21718
21816
  var app = [].slice.call(appWrap.children);
21719
- var width = getElementWidth(td);
21817
+ var width = _this.parent.getElementWidth(td);
21720
21818
  var left = td.offsetLeft;
21721
21819
  if (_this.parent.enableRtl) {
21722
21820
  var right_1 = conTable_1.offsetWidth - left - td.offsetWidth;
@@ -22091,6 +22189,8 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22091
22189
  _this.isAllDayTarget = false;
22092
22190
  _this.targetTd = null;
22093
22191
  _this.isCursorAhead = false;
22192
+ _this.enableCurrentViewDrag = false;
22193
+ _this.isPreventMultiDrag = false;
22094
22194
  return _this;
22095
22195
  }
22096
22196
  DragAndDrop.prototype.wireDragEvent = function (element) {
@@ -22206,6 +22306,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22206
22306
  if (cloneBottom > scrollHeight) {
22207
22307
  topValue = (parseInt(topValue, 10) - (cloneBottom - scrollHeight)) + 'px';
22208
22308
  }
22309
+ if (this.isPreventMultiDrag) {
22310
+ topValue = formatUnit(this.actionObj.clone.offsetTop);
22311
+ }
22209
22312
  }
22210
22313
  return { left: leftValue, top: topValue };
22211
22314
  };
@@ -22257,6 +22360,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22257
22360
  _this.actionObj.interval = dragEventArgs.interval;
22258
22361
  _this.actionObj.navigation = dragEventArgs.navigation;
22259
22362
  _this.actionObj.scroll = dragEventArgs.scroll;
22363
+ _this.enableCurrentViewDrag = dragArgs.dragWithinRange && !dragArgs.navigation.enable && _this.parent.allowMultiDrag;
22260
22364
  _this.actionObj.excludeSelectors = dragEventArgs.excludeSelectors;
22261
22365
  var viewElement = _this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
22262
22366
  _this.scrollArgs = { element: viewElement, width: viewElement.scrollWidth, height: viewElement.scrollHeight };
@@ -22417,6 +22521,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22417
22521
  DragAndDrop.prototype.dragStop = function (e) {
22418
22522
  var _this = this;
22419
22523
  this.isCursorAhead = false;
22524
+ this.isPreventMultiDrag = false;
22420
22525
  this.removeCloneElementClasses();
22421
22526
  this.removeCloneElement();
22422
22527
  clearInterval(this.actionObj.navigationInterval);
@@ -22485,7 +22590,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22485
22590
  this.timelineEventModule.cellWidth = this.actionObj.cellWidth;
22486
22591
  this.timelineEventModule.getSlotDates();
22487
22592
  this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
22488
- getElementWidth(this.parent.element.querySelector('.' + WORK_CELLS_CLASS));
22593
+ this.parent.getElementWidth(this.parent.element.querySelector('.' + WORK_CELLS_CLASS));
22489
22594
  this.calculateTimelineTime(e);
22490
22595
  }
22491
22596
  else {
@@ -22662,7 +22767,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22662
22767
  var dragStart;
22663
22768
  var dragEnd;
22664
22769
  if (this.parent.activeViewOptions.timeScale.enable && !this.isAllDayDrag) {
22665
- this.appendCloneElement(this.getEventWrapper(colIndex));
22770
+ if (!this.enableCurrentViewDrag || this.multiData.length === 0) {
22771
+ this.appendCloneElement(this.getEventWrapper(colIndex));
22772
+ }
22666
22773
  dragStart = this.parent.getDateFromElement(td);
22667
22774
  dragStart.setMinutes(dragStart.getMinutes() + (diffInMinutes / heightPerMinute));
22668
22775
  dragEnd = new Date(dragStart.getTime());
@@ -22719,18 +22826,34 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22719
22826
  this.startTime = eventObj_1[this.parent.eventFields.startTime].getTime();
22720
22827
  }
22721
22828
  var startTimeDiff = event[this.parent.eventFields.startTime].getTime() - this.startTime;
22722
- for (var index_2 = 0; index_2 < this.multiData.length; index_2++) {
22723
- this.updatedData[parseInt(index_2.toString(), 10)] =
22724
- this.updateMultipleData(this.multiData[parseInt(index_2.toString(), 10)], startTimeDiff);
22725
- var dayIndex = this.getDayIndex(this.updatedData[parseInt(index_2.toString(), 10)]);
22726
- if (dayIndex >= 0) {
22727
- var wrapper = this.getEventWrapper(dayIndex, this.updatedData[parseInt(index_2.toString(), 10)][this.parent.eventFields.isAllDay]);
22728
- this.appendCloneElement(wrapper, this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
22729
- this.updateEventHeight(this.updatedData[parseInt(index_2.toString(), 10)], index_2, dayIndex);
22730
- }
22731
- else {
22732
- if (!isNullOrUndefined(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)].parentNode)) {
22733
- remove(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
22829
+ if (this.enableCurrentViewDrag) {
22830
+ var renderDates = this.getRenderedDates();
22831
+ for (var i = 0; i < this.multiData.length; i++) {
22832
+ var eventObj_2 = extend({}, this.multiData[parseInt(i.toString(), 10)], null, true);
22833
+ var startTime = new Date(eventObj_2[this.parent.eventFields.startTime].getTime() + startTimeDiff);
22834
+ var dayIndex = this.parent.getIndexOfDate(renderDates, resetTime(startTime));
22835
+ if (dayIndex < 0) {
22836
+ this.isPreventMultiDrag = true;
22837
+ break;
22838
+ }
22839
+ this.isPreventMultiDrag = false;
22840
+ }
22841
+ }
22842
+ if (!this.isPreventMultiDrag) {
22843
+ for (var index_2 = 0; index_2 < this.multiData.length; index_2++) {
22844
+ this.updatedData[parseInt(index_2.toString(), 10)] =
22845
+ this.updateMultipleData(this.multiData[parseInt(index_2.toString(), 10)], startTimeDiff);
22846
+ var dayIndex = this.getDayIndex(this.updatedData[parseInt(index_2.toString(), 10)]);
22847
+ if (dayIndex >= 0) {
22848
+ var isAllDay = this.updatedData[parseInt(index_2.toString(), 10)][this.parent.eventFields.isAllDay];
22849
+ var wrapper = this.getEventWrapper(dayIndex, isAllDay);
22850
+ this.appendCloneElement(wrapper, this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
22851
+ this.updateEventHeight(this.updatedData[parseInt(index_2.toString(), 10)], index_2, dayIndex);
22852
+ }
22853
+ else {
22854
+ if (!isNullOrUndefined(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)].parentNode)) {
22855
+ remove(this.actionObj.cloneElement[parseInt(index_2.toString(), 10)]);
22856
+ }
22734
22857
  }
22735
22858
  }
22736
22859
  }
@@ -22948,6 +23071,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22948
23071
  };
22949
23072
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
22950
23073
  DragAndDrop.prototype.swapDragging = function (e) {
23074
+ if (this.isPreventMultiDrag) {
23075
+ return;
23076
+ }
22951
23077
  var colIndex = !isNullOrUndefined(closest(this.actionObj.target, 'td')) && closest(this.actionObj.target, 'td').cellIndex;
22952
23078
  if (closest(this.actionObj.target, '.' + DATE_HEADER_WRAP_CLASS) &&
22953
23079
  !closest(this.actionObj.clone, '.' + ALLDAY_APPOINTMENT_WRAPPER_CLASS)) {
@@ -23304,7 +23430,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
23304
23430
  ~~(dragArea.querySelector('table').offsetHeight / trCollection.length) : this.actionObj.cellHeight;
23305
23431
  var rowIndex = Math.floor(Math.floor((this.actionObj.Y +
23306
23432
  (dragArea.scrollTop - translateY - (window.scrollY || window.pageYOffset))) -
23307
- getElementTop(dragArea)) / rowHeight);
23433
+ getElementTop(dragArea, this.parent.uiStateValues.isTransformed)) / rowHeight);
23308
23434
  rowIndex = (rowIndex < 0) ? 0 : (rowIndex > trCollection.length - 1) ? trCollection.length - 1 : rowIndex;
23309
23435
  this.actionObj.index = rowIndex;
23310
23436
  var eventContainer = this.parent.element.querySelectorAll('.e-appointment-container:not(.e-hidden)').item(rowIndex);
@@ -23320,7 +23446,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
23320
23446
  if (!isNullOrUndefined(this.parent.eventDragArea)) {
23321
23447
  return;
23322
23448
  }
23323
- var top = getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
23449
+ var top = this.parent.getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
23324
23450
  if (this.parent.rowAutoHeight) {
23325
23451
  var cursorElement = this.getCursorElement(e);
23326
23452
  if (cursorElement) {
@@ -23885,7 +24011,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
23885
24011
  if (this.isTimelineView()) {
23886
24012
  var colElements = this.getColElements();
23887
24013
  var contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
23888
- var colWidth_1 = (getElementWidth(contentBody) / (colElements.length / 2));
24014
+ var colWidth_1 = (this.parent.getElementWidth(contentBody) / (colElements.length / 2));
23889
24015
  if (content.offsetHeight !== content.clientHeight) {
23890
24016
  var resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
23891
24017
  if (!isNullOrUndefined(resourceColumn) && resourceColumn.offsetHeight !== content.clientHeight) {
@@ -24267,11 +24393,8 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
24267
24393
  var currentDate = this.parent.getCurrentTime();
24268
24394
  if (this.parent.showTimeIndicator && this.isWorkHourRange(currentDate)) {
24269
24395
  var currentDateIndex = this.getCurrentTimeIndicatorIndex();
24270
- if (currentDateIndex.length > 0) {
24271
- var workCells = [].slice.call(this.element.querySelectorAll('.' + WORK_CELLS_CLASS));
24272
- if (workCells.length > 0) {
24273
- this.changeCurrentTimePosition();
24274
- }
24396
+ if (currentDateIndex.length > 0 && !isNullOrUndefined(this.element.querySelector('.' + WORK_CELLS_CLASS))) {
24397
+ this.changeCurrentTimePosition();
24275
24398
  if (isNullOrUndefined(this.currentTimeIndicatorTimer)) {
24276
24399
  var interval = MS_PER_MINUTE - ((currentDate.getSeconds() * 1000) + currentDate.getMilliseconds());
24277
24400
  if (interval <= (MS_PER_MINUTE - 1000)) {
@@ -24396,7 +24519,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
24396
24519
  this.parent.activeViewOptions.timeScale.interval;
24397
24520
  };
24398
24521
  VerticalView.prototype.getWorkCellHeight = function () {
24399
- return parseFloat(getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
24522
+ return parseFloat(this.parent.getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
24400
24523
  };
24401
24524
  VerticalView.prototype.getTdContent = function (date, type, groupIndex) {
24402
24525
  var cntEle;
@@ -24699,12 +24822,25 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
24699
24822
  var rows = [];
24700
24823
  var tr = createElement('tr');
24701
24824
  var td = createElement('td', { attrs: { 'aria-selected': 'false' } });
24825
+ var existingGroupIndices = new Set();
24826
+ if (this.parent.virtualScrollModule && this.parent.activeViewOptions.group.resources.length > 0 &&
24827
+ this.parent.virtualScrollModule.existingDataCollection.length > 0) {
24828
+ existingGroupIndices = new Set(this.parent.virtualScrollModule.existingDataCollection.map(function (data) { return data.groupIndex; }));
24829
+ }
24702
24830
  var handler = function (r) {
24703
24831
  var ntr = tr.cloneNode();
24704
24832
  for (var _i = 0, _a = _this.colLevels[_this.colLevels.length - 1]; _i < _a.length; _i++) {
24705
24833
  var tdData = _a[_i];
24706
- var ntd = _this.createContentTd(tdData, r, td);
24707
- ntr.appendChild(ntd);
24834
+ var isAllowTdCreation = true;
24835
+ if (_this.parent.virtualScrollModule && _this.parent.activeViewOptions.group.resources.length > 0) {
24836
+ if (existingGroupIndices.has(tdData.groupIndex)) {
24837
+ isAllowTdCreation = false;
24838
+ }
24839
+ }
24840
+ if (isAllowTdCreation) {
24841
+ var ntd = _this.createContentTd(tdData, r, td);
24842
+ ntr.appendChild(ntd);
24843
+ }
24708
24844
  }
24709
24845
  rows.push(ntr);
24710
24846
  return r;
@@ -26243,7 +26379,8 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
26243
26379
  var scheduleId = _this.parent.element.id + '_';
26244
26380
  var viewName = _this.parent.activeViewOptions.eventTemplateName;
26245
26381
  var templateId = scheduleId + viewName + 'eventTemplate';
26246
- templateEle = _this.parent.getAppointmentTemplate()(listData[parseInt(li.toString(), 10)], _this.parent, 'eventTemplate', templateId, false, undefined, undefined, _this.parent.root);
26382
+ templateEle =
26383
+ _this.parent.getAppointmentTemplate()(listData[parseInt(li.toString(), 10)], _this.parent, 'eventTemplate', templateId, false, undefined, undefined, _this.parent.root);
26247
26384
  if (!isNullOrUndefined(listData[parseInt(li.toString(), 10)][fieldMapping.recurrenceRule])) {
26248
26385
  var iconClass = (listData[parseInt(li.toString(), 10)][fieldMapping.id] ===
26249
26386
  listData[parseInt(li.toString(), 10)][fieldMapping.recurrenceID]) ?
@@ -27452,7 +27589,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27452
27589
  }
27453
27590
  var scrollLeft;
27454
27591
  if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
27455
- scrollLeft = index * getElementWidth(this.element.querySelector('.e-work-cells'));
27592
+ scrollLeft = index * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'));
27456
27593
  }
27457
27594
  else {
27458
27595
  scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
@@ -27539,7 +27676,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27539
27676
  if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
27540
27677
  this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
27541
27678
  diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
27542
- getElementWidth(this.element.querySelector('.e-work-cells'));
27679
+ this.parent.getElementWidth(this.element.querySelector('.e-work-cells'));
27543
27680
  }
27544
27681
  else {
27545
27682
  var endHour = this.getEndHour();
@@ -27549,8 +27686,8 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27549
27686
  }
27550
27687
  }
27551
27688
  }
27552
- return diffInDates + ((diffInMinutes * getElementWidth(this.element.querySelector('.e-work-cells')) * this.parent.activeViewOptions.timeScale.slotCount) /
27553
- this.parent.activeViewOptions.timeScale.interval);
27689
+ return diffInDates + ((diffInMinutes * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'))
27690
+ * this.parent.activeViewOptions.timeScale.slotCount) / this.parent.activeViewOptions.timeScale.interval);
27554
27691
  };
27555
27692
  TimelineViews.prototype.renderHeader = function () {
27556
27693
  var tr = createElement('tr');