@syncfusion/ej2-schedule 24.2.4 → 24.2.8

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 (79) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/ej2-schedule.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js +2 -2
  4. package/dist/ej2-schedule.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-schedule.es2015.js +77 -51
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +76 -50
  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 +13 -13
  13. package/src/schedule/actions/drag.js +3 -3
  14. package/src/schedule/actions/resize.js +22 -21
  15. package/src/schedule/actions/virtual-scroll.js +4 -0
  16. package/src/schedule/base/util.d.ts +21 -0
  17. package/src/schedule/base/util.js +29 -2
  18. package/src/schedule/event-renderer/event-base.d.ts +0 -1
  19. package/src/schedule/event-renderer/event-base.js +0 -3
  20. package/src/schedule/event-renderer/inline-edit.js +1 -1
  21. package/src/schedule/event-renderer/month.js +2 -2
  22. package/src/schedule/event-renderer/timeline-view.js +5 -5
  23. package/src/schedule/event-renderer/vertical-view.js +1 -1
  24. package/src/schedule/event-renderer/year.js +3 -3
  25. package/src/schedule/renderer/timeline-view.d.ts +0 -1
  26. package/src/schedule/renderer/timeline-view.js +3 -6
  27. package/src/schedule/renderer/vertical-view.js +1 -1
  28. package/src/schedule/renderer/view-base.js +1 -1
  29. package/styles/bootstrap-dark.css +42 -0
  30. package/styles/bootstrap.css +42 -0
  31. package/styles/bootstrap4.css +42 -0
  32. package/styles/bootstrap5-dark.css +42 -0
  33. package/styles/bootstrap5.css +42 -0
  34. package/styles/fabric-dark.css +42 -0
  35. package/styles/fabric.css +42 -0
  36. package/styles/fluent-dark.css +42 -0
  37. package/styles/fluent.css +42 -0
  38. package/styles/highcontrast-light.css +42 -0
  39. package/styles/highcontrast.css +42 -0
  40. package/styles/material-dark.css +42 -0
  41. package/styles/material.css +42 -0
  42. package/styles/material3-dark.css +42 -0
  43. package/styles/material3.css +42 -0
  44. package/styles/schedule/_bootstrap-dark-definition.scss +1 -0
  45. package/styles/schedule/_bootstrap-definition.scss +1 -0
  46. package/styles/schedule/_bootstrap4-definition.scss +1 -0
  47. package/styles/schedule/_bootstrap5-definition.scss +1 -0
  48. package/styles/schedule/_fabric-dark-definition.scss +1 -0
  49. package/styles/schedule/_fabric-definition.scss +1 -0
  50. package/styles/schedule/_fluent-definition.scss +1 -0
  51. package/styles/schedule/_fusionnew-definition.scss +1 -0
  52. package/styles/schedule/_highcontrast-definition.scss +1 -0
  53. package/styles/schedule/_highcontrast-light-definition.scss +1 -0
  54. package/styles/schedule/_layout.scss +58 -0
  55. package/styles/schedule/_material-dark-definition.scss +1 -0
  56. package/styles/schedule/_material-definition.scss +1 -0
  57. package/styles/schedule/_material3-definition.scss +1 -0
  58. package/styles/schedule/_tailwind-definition.scss +1 -0
  59. package/styles/schedule/bootstrap-dark.css +42 -0
  60. package/styles/schedule/bootstrap.css +42 -0
  61. package/styles/schedule/bootstrap4.css +42 -0
  62. package/styles/schedule/bootstrap5-dark.css +42 -0
  63. package/styles/schedule/bootstrap5.css +42 -0
  64. package/styles/schedule/fabric-dark.css +42 -0
  65. package/styles/schedule/fabric.css +42 -0
  66. package/styles/schedule/fluent-dark.css +42 -0
  67. package/styles/schedule/fluent.css +42 -0
  68. package/styles/schedule/highcontrast-light.css +42 -0
  69. package/styles/schedule/highcontrast.css +42 -0
  70. package/styles/schedule/material-dark.css +42 -0
  71. package/styles/schedule/material.css +42 -0
  72. package/styles/schedule/material3-dark.css +42 -0
  73. package/styles/schedule/material3.css +42 -0
  74. package/styles/schedule/tailwind-dark.css +42 -0
  75. package/styles/schedule/tailwind.css +42 -0
  76. package/styles/tailwind-dark.css +42 -0
  77. package/styles/tailwind.css +42 -0
  78. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -63
  79. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -39
@@ -115,7 +115,7 @@ function getElementHeightFromClass(container, elementClass) {
115
115
  el.style.visibility = 'hidden';
116
116
  el.style.position = 'absolute';
117
117
  container.appendChild(el);
118
- height = el.getBoundingClientRect().height;
118
+ height = getElementHeight(el);
119
119
  remove(el);
120
120
  return height;
121
121
  }
@@ -132,7 +132,7 @@ function getElementWidthFromClass(container, elementClass) {
132
132
  el.style.visibility = 'hidden';
133
133
  el.style.position = 'absolute';
134
134
  container.appendChild(el);
135
- width = el.getBoundingClientRect().width;
135
+ width = getElementWidth(el);
136
136
  remove(el);
137
137
  return width;
138
138
  }
@@ -520,6 +520,33 @@ function capitalizeFirstWord(inputString, type) {
520
520
  }
521
521
  return inputString;
522
522
  }
523
+ /**
524
+ * Method to get element cell width
525
+ *
526
+ * @param {HTMLElement} element Accepts the DOM element
527
+ * @returns {number} Returns the width of the given element
528
+ */
529
+ function getElementWidth(element) {
530
+ return document.body.style.transform.includes('scale') ? element.offsetWidth : element.getBoundingClientRect().width;
531
+ }
532
+ /**
533
+ * Method to get element cell Height
534
+ *
535
+ * @param {HTMLElement} element Accepts the DOM element
536
+ * @returns {number} Returns the Height of the given element
537
+ */
538
+ function getElementHeight(element) {
539
+ return document.body.style.transform.includes('scale') ? element.offsetHeight : element.getBoundingClientRect().height;
540
+ }
541
+ /**
542
+ * Method to get element cell Top
543
+ *
544
+ * @param {HTMLElement} element Accepts the DOM element
545
+ * @returns {number} Returns the top value of the given element
546
+ */
547
+ function getElementTop(element) {
548
+ return document.body.style.transform.includes('scale') ? element.offsetTop : element.getBoundingClientRect().top;
549
+ }
523
550
 
524
551
  /**
525
552
  * CSS Constants
@@ -6784,9 +6811,6 @@ var EventBase = /** @__PURE__ @class */ (function () {
6784
6811
  }
6785
6812
  }
6786
6813
  };
6787
- EventBase.prototype.getCellWidth = function (element) {
6788
- return document.body.style.transform.includes('scale') ? parseFloat(window.getComputedStyle(element).width) : element.getBoundingClientRect().width;
6789
- };
6790
6814
  EventBase.prototype.unWireEvents = function () {
6791
6815
  var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
6792
6816
  for (var _i = 0, appElements_1 = appElements; _i < appElements_1.length; _i++) {
@@ -6910,7 +6934,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
6910
6934
  this.resources = this.parent.resourceBase.renderedResources;
6911
6935
  }
6912
6936
  this.cellHeight =
6913
- parseFloat(this.parent.element.querySelector('.e-content-wrap tbody tr').getBoundingClientRect().height.toFixed(2));
6937
+ parseFloat(getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
6914
6938
  this.dateRender[0] = this.parent.activeView.renderDates;
6915
6939
  if (this.parent.activeViewOptions.group.resources.length > 0) {
6916
6940
  for (var i = 0, len = this.resources.length; i < len; i++) {
@@ -7828,8 +7852,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
7828
7852
  });
7829
7853
  }
7830
7854
  var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? 0 : this.workCells.length - 1];
7831
- this.cellWidth = this.parent.eventBase.getCellWidth(cellDetail);
7832
- this.cellHeight = cellDetail.getBoundingClientRect().height;
7855
+ this.cellWidth = getElementWidth(cellDetail);
7856
+ this.cellHeight = getElementHeight(cellDetail);
7833
7857
  this.dateRender = dateRender;
7834
7858
  var filteredDates = this.getRenderedDates(dateRender);
7835
7859
  this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
@@ -8402,7 +8426,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8402
8426
  _this.eventContainers = [].slice.call(_this.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
8403
8427
  var tr = [].slice.call(_this.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr'));
8404
8428
  _this.dayLength = tr.length === 0 ? 0 : tr[0].children.length;
8405
- _this.content = _this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS);
8429
+ _this.content = _this.parent.element.querySelector('.' + SCHEDULE_TABLE_CLASS + '.' + CONTENT_TABLE_CLASS);
8406
8430
  return _this;
8407
8431
  }
8408
8432
  TimelineEvent.prototype.getSlotDates = function () {
@@ -8412,7 +8436,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8412
8436
  this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
8413
8437
  this.renderType = 'day';
8414
8438
  var workCell = this.content.querySelector('.' + WORK_CELLS_CLASS);
8415
- this.cellWidth = workCell.getBoundingClientRect().width / +(workCell.getAttribute('colspan') || 1);
8439
+ this.cellWidth = getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
8416
8440
  this.slotsPerDay = 1;
8417
8441
  }
8418
8442
  else {
@@ -8568,14 +8592,14 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8568
8592
  this.wireAppointmentEvents(appointmentElement, event);
8569
8593
  if (this.parent.rowAutoHeight) {
8570
8594
  var conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
8571
- var conWidth = conWrap.getBoundingClientRect().width;
8595
+ var conWidth = getElementWidth(conWrap);
8572
8596
  var isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
8573
8597
  conWrap.offsetWidth === conWrap.clientWidth;
8574
8598
  this.renderEventElement(event, appointmentElement, cellTd);
8575
8599
  var firstChild = this.getFirstChild(resIndex);
8576
8600
  this.updateCellHeight(firstChild, height);
8577
8601
  if (isWithoutScroll &&
8578
- (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== conWrap.getBoundingClientRect().width)) {
8602
+ (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== getElementWidth(conWrap))) {
8579
8603
  this.adjustAppointments(conWidth);
8580
8604
  }
8581
8605
  }
@@ -8694,7 +8718,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
8694
8718
  TimelineEvent.prototype.adjustAppointments = function (conWidth) {
8695
8719
  var _this = this;
8696
8720
  var tr = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody tr');
8697
- var actualCellWidth = this.workCells[0].getBoundingClientRect().width;
8721
+ var actualCellWidth = getElementWidth(this.workCells[0]);
8698
8722
  this.cellWidth = actualCellWidth / +(this.workCells[0].getAttribute('colspan') || 1);
8699
8723
  var currentPercentage = (actualCellWidth * tr.children.length) / (conWidth / 100);
8700
8724
  var apps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
@@ -9053,7 +9077,7 @@ var InlineEdit = /** @__PURE__ @class */ (function () {
9053
9077
  var allDayElements = [].slice.call(this.parent.element.querySelectorAll('.' + ALLDAY_APPOINTMENT_CLASS));
9054
9078
  var allDayLevel = 0;
9055
9079
  if (allDayElements.length > 0) {
9056
- allDayLevel = Math.floor(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS).getBoundingClientRect().height /
9080
+ allDayLevel = Math.floor(getElementHeight(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS)) /
9057
9081
  allDayElements[0].offsetHeight) - 1;
9058
9082
  }
9059
9083
  verticalEvent.allDayLevel = allDayLevel;
@@ -14032,6 +14056,10 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14032
14056
  this.renderedLength = conTable.querySelector('tbody').children.length;
14033
14057
  virtual.style.height = (conTable.offsetHeight + (this.parent.resourceBase.expandedResources.length - (this.renderedLength)) *
14034
14058
  conTable.offsetHeight / this.renderedLength) + 'px';
14059
+ var conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
14060
+ if ((conWrap.scrollHeight - conWrap.scrollTop) < conWrap.offsetHeight * this.bufferCount) {
14061
+ virtual.style.height = parseInt(virtual.style.height) + (conWrap.offsetHeight * this.bufferCount) + 'px';
14062
+ }
14035
14063
  }
14036
14064
  else {
14037
14065
  virtual.style.height = '';
@@ -20658,9 +20686,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
20658
20686
  bottom: resizeTarget.classList.contains(BOTTOM_RESIZE_HANDLER)
20659
20687
  };
20660
20688
  _this.actionObj.groupIndex = _this.parent.uiStateValues.isGroupAdaptive ? _this.parent.uiStateValues.groupIndex : 0;
20661
- var workCell = _this.parent.element.querySelector('.' + WORK_CELLS_CLASS).getBoundingClientRect();
20662
- _this.actionObj.cellWidth = workCell.width;
20663
- _this.actionObj.cellHeight = workCell.height;
20689
+ var workCell = _this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
20690
+ _this.actionObj.cellWidth = getElementWidth(workCell);
20691
+ _this.actionObj.cellHeight = getElementHeight(workCell);
20664
20692
  var hRows = _this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
20665
20693
  if (_this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
20666
20694
  var tr = _this.parent.getContentTable().querySelector('tr');
@@ -20962,9 +20990,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
20962
20990
  parseInt(this.actionObj.clone.style.left, 10);
20963
20991
  offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
20964
20992
  if (!isLeft) {
20965
- offsetValue += (this.actionObj.clone.getBoundingClientRect().width - this.actionObj.cellWidth);
20993
+ offsetValue += (getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
20966
20994
  }
20967
- cellIndex = Math.floor(offsetValue / Math.floor(tr.getBoundingClientRect().width / noOfDays));
20995
+ cellIndex = Math.floor(offsetValue / Math.floor(getElementWidth(tr) / noOfDays));
20968
20996
  isDateHeader = isTimeViews && headerName === 'Date';
20969
20997
  cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
20970
20998
  isLastCell = cellIndex === tdCollections.length;
@@ -20973,7 +21001,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
20973
21001
  else {
20974
21002
  var cellWidth = this.actionObj.cellWidth;
20975
21003
  cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
20976
- Math.ceil((offset + (this.actionObj.clone.getBoundingClientRect().width - cellWidth)) / this.actionObj.cellWidth);
21004
+ Math.ceil((offset + (getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
20977
21005
  if (this.parent.enableRtl) {
20978
21006
  var cellOffsetWidth = 0;
20979
21007
  if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
@@ -20981,7 +21009,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
20981
21009
  cellOffsetWidth = this.actionObj.cellWidth;
20982
21010
  }
20983
21011
  var offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
20984
- this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.getBoundingClientRect().width - cellOffsetWidth);
21012
+ this.actionObj.cellWidth) + (isLeft ? 0 : getElementWidth(this.actionObj.clone) - cellOffsetWidth);
20985
21013
  cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
20986
21014
  }
20987
21015
  isLastCell = cellIndex === tdCollections.length;
@@ -21000,7 +21028,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21000
21028
  }
21001
21029
  else {
21002
21030
  if (!isLeft) {
21003
- offset += this.actionObj.clone.getBoundingClientRect().width;
21031
+ offset += getElementWidth(this.actionObj.clone);
21004
21032
  }
21005
21033
  var spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
21006
21034
  (offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
@@ -21012,9 +21040,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21012
21040
  }
21013
21041
  else {
21014
21042
  var cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
21015
- var originalWidth = Math.ceil((isLeft ? this.actionObj.element.getBoundingClientRect().width : 0) /
21043
+ var originalWidth = Math.ceil((isLeft ? getElementWidth(this.actionObj.element) : 0) /
21016
21044
  this.actionObj.cellWidth) * this.actionObj.cellWidth;
21017
- var noOfDays = Math.ceil((this.actionObj.clone.getBoundingClientRect().width - originalWidth) /
21045
+ var noOfDays = Math.ceil((getElementWidth(this.actionObj.clone) - originalWidth) /
21018
21046
  this.actionObj.cellWidth);
21019
21047
  var tr = closest(this.actionObj.clone, 'tr');
21020
21048
  var dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
@@ -21077,23 +21105,24 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21077
21105
  var slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
21078
21106
  var pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
21079
21107
  var targetWidth = isTimelineView ?
21080
- (this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth :
21081
- this.parent.currentView === 'Month' ? this.actionObj.element.getBoundingClientRect().width :
21082
- Math.ceil(this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth;
21108
+ (getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
21109
+ this.parent.currentView === 'Month' ? getElementWidth(this.actionObj.element) :
21110
+ Math.ceil(getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
21083
21111
  var offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
21084
21112
  var left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
21085
21113
  if (isTimeViews) {
21086
21114
  offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval);
21087
21115
  if (!isLeft) {
21088
21116
  var roundedLeft = (+parseFloat(this.actionObj.element.style[this.parent.enableRtl ? 'right' : 'left'])).toFixed(1);
21089
- if (roundedLeft !== left.toFixed(1)) {
21117
+ var roundedWidth = Math.round(targetWidth / slotInterval) * slotInterval;
21118
+ if (roundedLeft !== left.toFixed(1) || roundedWidth !== targetWidth) {
21090
21119
  offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left;
21091
21120
  }
21092
21121
  }
21093
21122
  this.actionObj.event[this.parent.eventFields.isAllDay] = false;
21094
21123
  }
21095
21124
  var width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
21096
- this.actionObj.clone.getBoundingClientRect().width : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
21125
+ getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
21097
21126
  if (this.parent.enableRtl) {
21098
21127
  var rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
21099
21128
  -(offsetWidth - this.actionObj.cellWidth);
@@ -21107,7 +21136,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21107
21136
  }
21108
21137
  rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
21109
21138
  styles.right = formatUnit(rightValue);
21110
- width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.getBoundingClientRect().width : width;
21139
+ width = width + rightValue > this.scrollArgs.width ? getElementWidth(this.actionObj.clone) : width;
21111
21140
  }
21112
21141
  else {
21113
21142
  var offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
@@ -21115,12 +21144,12 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21115
21144
  if (isTimelineView) {
21116
21145
  offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
21117
21146
  if (this.parent.enableRtl) {
21118
- offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.getBoundingClientRect().width)
21147
+ offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - getElementWidth(this.actionObj.clone))
21119
21148
  ? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
21120
21149
  }
21121
21150
  else {
21122
- offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.getBoundingClientRect().width &&
21123
- this.actionObj.clone.getBoundingClientRect().width === this.actionObj.cellWidth) ?
21151
+ offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + getElementWidth(this.actionObj.clone) &&
21152
+ getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
21124
21153
  parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
21125
21154
  }
21126
21155
  }
@@ -21136,10 +21165,10 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
21136
21165
  }
21137
21166
  else {
21138
21167
  offsetLeft = 0;
21139
- width = this.actionObj.clone.getBoundingClientRect().width;
21168
+ width = getElementWidth(this.actionObj.clone);
21140
21169
  }
21141
21170
  }
21142
- var cloneWidth = Math.ceil(this.actionObj.clone.getBoundingClientRect().width / this.actionObj.cellWidth) *
21171
+ var cloneWidth = Math.ceil(getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
21143
21172
  this.actionObj.cellWidth;
21144
21173
  if (isLeft) {
21145
21174
  styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
@@ -21271,7 +21300,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
21271
21300
  YearEvent.prototype.timelineYearViewEvents = function () {
21272
21301
  var _this = this;
21273
21302
  var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
21274
- this.cellWidth = this.parent.eventBase.getCellWidth(workCell);
21303
+ this.cellWidth = getElementWidth(workCell);
21275
21304
  this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
21276
21305
  var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
21277
21306
  this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
@@ -21429,7 +21458,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
21429
21458
  var contentTable = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
21430
21459
  var isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
21431
21460
  var workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
21432
- this.cellWidth = workCell.getBoundingClientRect().width;
21461
+ this.cellWidth = getElementWidth(workCell);
21433
21462
  this.cellHeader = 0;
21434
21463
  var eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
21435
21464
  this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
@@ -21474,7 +21503,7 @@ var YearEvent = /** @__PURE__ @class */ (function (_super) {
21474
21503
  appWrapper.forEach(function (appWrap, cellIndex) {
21475
21504
  var td = row.querySelector("td:nth-child(" + (cellIndex + 1) + ")");
21476
21505
  var app = [].slice.call(appWrap.children);
21477
- var width = td.getBoundingClientRect().width;
21506
+ var width = getElementWidth(td);
21478
21507
  var left = td.offsetLeft;
21479
21508
  if (_this.parent.enableRtl) {
21480
21509
  var right_1 = conTable_1.offsetWidth - left - td.offsetWidth;
@@ -22237,7 +22266,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
22237
22266
  this.timelineEventModule.cellWidth = this.actionObj.cellWidth;
22238
22267
  this.timelineEventModule.getSlotDates();
22239
22268
  this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
22240
- this.parent.element.querySelector('.' + WORK_CELLS_CLASS).getBoundingClientRect().width;
22269
+ getElementWidth(this.parent.element.querySelector('.' + WORK_CELLS_CLASS));
22241
22270
  this.calculateTimelineTime(e);
22242
22271
  }
22243
22272
  else {
@@ -23056,7 +23085,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
23056
23085
  ~~(dragArea.querySelector('table').offsetHeight / trCollection.length) : this.actionObj.cellHeight;
23057
23086
  var rowIndex = Math.floor(Math.floor((this.actionObj.Y +
23058
23087
  (dragArea.scrollTop - translateY - (window.scrollY || window.pageYOffset))) -
23059
- dragArea.getBoundingClientRect().top) / rowHeight);
23088
+ getElementTop(dragArea)) / rowHeight);
23060
23089
  rowIndex = (rowIndex < 0) ? 0 : (rowIndex > trCollection.length - 1) ? trCollection.length - 1 : rowIndex;
23061
23090
  this.actionObj.index = rowIndex;
23062
23091
  var eventContainer = this.parent.element.querySelectorAll('.e-appointment-container:not(.e-hidden)').item(rowIndex);
@@ -23072,7 +23101,7 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
23072
23101
  if (!isNullOrUndefined(this.parent.eventDragArea)) {
23073
23102
  return;
23074
23103
  }
23075
- var top = trCollection[parseInt(rowIndex.toString(), 10)].getBoundingClientRect().height * rowIndex;
23104
+ var top = getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
23076
23105
  if (this.parent.rowAutoHeight) {
23077
23106
  var cursorElement = this.getCursorElement(e);
23078
23107
  if (cursorElement) {
@@ -23593,7 +23622,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
23593
23622
  if (this.isTimelineView()) {
23594
23623
  var colElements = this.getColElements();
23595
23624
  var contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
23596
- var colWidth_1 = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
23625
+ var colWidth_1 = (getElementWidth(contentBody) / (colElements.length / 2));
23597
23626
  if (content.offsetHeight !== content.clientHeight) {
23598
23627
  var resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
23599
23628
  if (!isNullOrUndefined(resourceColumn)) {
@@ -24101,7 +24130,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
24101
24130
  this.parent.activeViewOptions.timeScale.interval;
24102
24131
  };
24103
24132
  VerticalView.prototype.getWorkCellHeight = function () {
24104
- return parseFloat(this.element.querySelector('.' + WORK_CELLS_CLASS).getBoundingClientRect().height.toFixed(2));
24133
+ return parseFloat(getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
24105
24134
  };
24106
24135
  VerticalView.prototype.getTdContent = function (date, type, groupIndex) {
24107
24136
  var cntEle;
@@ -27072,7 +27101,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27072
27101
  }
27073
27102
  var scrollLeft;
27074
27103
  if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
27075
- scrollLeft = index * this.getWorkCellWidth();
27104
+ scrollLeft = index * getElementWidth(this.element.querySelector('.e-work-cells'));
27076
27105
  }
27077
27106
  else {
27078
27107
  scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
@@ -27159,7 +27188,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27159
27188
  if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
27160
27189
  this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
27161
27190
  diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
27162
- this.getWorkCellWidth();
27191
+ getElementWidth(this.element.querySelector('.e-work-cells'));
27163
27192
  }
27164
27193
  else {
27165
27194
  var endHour = this.getEndHour();
@@ -27169,12 +27198,9 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27169
27198
  }
27170
27199
  }
27171
27200
  }
27172
- return diffInDates + ((diffInMinutes * this.getWorkCellWidth() * this.parent.activeViewOptions.timeScale.slotCount) /
27201
+ return diffInDates + ((diffInMinutes * getElementWidth(this.element.querySelector('.e-work-cells')) * this.parent.activeViewOptions.timeScale.slotCount) /
27173
27202
  this.parent.activeViewOptions.timeScale.interval);
27174
27203
  };
27175
- TimelineViews.prototype.getWorkCellWidth = function () {
27176
- return this.element.querySelector('.e-work-cells').getBoundingClientRect().width;
27177
- };
27178
27204
  TimelineViews.prototype.renderHeader = function () {
27179
27205
  var tr = createElement('tr');
27180
27206
  if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
@@ -28608,5 +28634,5 @@ var Print = /** @__PURE__ @class */ (function () {
28608
28634
  * Export Schedule components
28609
28635
  */
28610
28636
 
28611
- export { Schedule, cellClick, cellDoubleClick, moreEventsClick, select, hover, actionBegin, actionComplete, actionFailure, navigating, renderCell, eventClick, eventDoubleClick, eventRendered, dataBinding, dataBound, popupOpen, popupClose, dragStart, drag, dragStop, resizeStart, resizing, resizeStop, inlineClick, cellSelect, virtualScrollStart, virtualScrollStop, initialLoad, initialEnd, print$1 as print, dataReady, eventsLoaded, contentReady, scroll, virtualScroll, scrollUiUpdate, uiUpdate, documentClick, cellMouseDown, WEEK_LENGTH, DEFAULT_WEEKS, MS_PER_DAY, MS_PER_MINUTE, getElementHeightFromClass, getElementWidthFromClass, getTranslateY, getTranslateX, getWeekFirstDate, getWeekLastDate, firstDateOfMonth, lastDateOfMonth, getWeekNumber, getWeekMiddleDate, setTime, resetTime, getDateInMs, getDateCount, addDays, addMonths, addYears, getStartEndHours, getMaxDays, getDaysCount, getDateFromString, getScrollBarWidth, resetScrollbarWidth, findIndexInData, getOuterHeight, removeChildren, isDaylightSavingTime, getUniversalTime, isMobile, isIPadDevice, capitalizeFirstWord, Resize, DragAndDrop, HeaderRenderer, ViewBase, Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineViews, TimelineMonth, TimelineYear, Timezone, timezoneData, ICalendarExport, ICalendarImport, ExcelExport, Print, RecurrenceEditor, generateSummary, generate, getDateFromRecurrenceDateString, extractObjectFromRule, getCalendarUtil, getRecurrenceStringFromDate, Gregorian, Islamic };
28637
+ export { Schedule, cellClick, cellDoubleClick, moreEventsClick, select, hover, actionBegin, actionComplete, actionFailure, navigating, renderCell, eventClick, eventDoubleClick, eventRendered, dataBinding, dataBound, popupOpen, popupClose, dragStart, drag, dragStop, resizeStart, resizing, resizeStop, inlineClick, cellSelect, virtualScrollStart, virtualScrollStop, initialLoad, initialEnd, print$1 as print, dataReady, eventsLoaded, contentReady, scroll, virtualScroll, scrollUiUpdate, uiUpdate, documentClick, cellMouseDown, WEEK_LENGTH, DEFAULT_WEEKS, MS_PER_DAY, MS_PER_MINUTE, getElementHeightFromClass, getElementWidthFromClass, getTranslateY, getTranslateX, getWeekFirstDate, getWeekLastDate, firstDateOfMonth, lastDateOfMonth, getWeekNumber, getWeekMiddleDate, setTime, resetTime, getDateInMs, getDateCount, addDays, addMonths, addYears, getStartEndHours, getMaxDays, getDaysCount, getDateFromString, getScrollBarWidth, resetScrollbarWidth, findIndexInData, getOuterHeight, removeChildren, isDaylightSavingTime, getUniversalTime, isMobile, isIPadDevice, capitalizeFirstWord, getElementWidth, getElementHeight, getElementTop, Resize, DragAndDrop, HeaderRenderer, ViewBase, Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineViews, TimelineMonth, TimelineYear, Timezone, timezoneData, ICalendarExport, ICalendarImport, ExcelExport, Print, RecurrenceEditor, generateSummary, generate, getDateFromRecurrenceDateString, extractObjectFromRule, getCalendarUtil, getRecurrenceStringFromDate, Gregorian, Islamic };
28612
28638
  //# sourceMappingURL=ej2-schedule.es5.js.map