@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
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 24.2.4
3
+ * version : 24.2.8
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-schedule@*",
3
- "_id": "@syncfusion/ej2-schedule@24.2.3",
3
+ "_id": "@syncfusion/ej2-schedule@24.2.4",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Gl514rzz50QthXreUYNs3USTKmeufyBVrP23DMVahPJiR8tVS8350GXUgGOhvsVaHn5NmtgDvqcqB3StCeJZxw==",
5
+ "_integrity": "sha512-oBgKnAT6yCQiWtsncH5FXAnymoL6njD8ugNGu7gYoDjpxbslOUZWLq034w0dSmhfjwUfMwOEm9P//XR46ZVcsA==",
6
6
  "_location": "/@syncfusion/ej2-schedule",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-schedule",
24
24
  "/@syncfusion/ej2-vue-schedule"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-24.2.3.tgz",
27
- "_shasum": "68cf18dacb39bf44d0164f3b73fdb185aae9fbd4",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-24.2.4.tgz",
27
+ "_shasum": "4439adf0387fa69424cea8d1c249c87491244ef2",
28
28
  "_spec": "@syncfusion/ej2-schedule@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
30
30
  "author": {
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~24.2.3",
39
- "@syncfusion/ej2-buttons": "~24.2.3",
40
- "@syncfusion/ej2-calendars": "~24.2.3",
38
+ "@syncfusion/ej2-base": "~24.2.7",
39
+ "@syncfusion/ej2-buttons": "~24.2.7",
40
+ "@syncfusion/ej2-calendars": "~24.2.8",
41
41
  "@syncfusion/ej2-data": "~24.2.3",
42
- "@syncfusion/ej2-dropdowns": "~24.2.4",
42
+ "@syncfusion/ej2-dropdowns": "~24.2.8",
43
43
  "@syncfusion/ej2-excel-export": "~24.2.4",
44
- "@syncfusion/ej2-inputs": "~24.2.4",
45
- "@syncfusion/ej2-lists": "~24.2.4",
46
- "@syncfusion/ej2-navigations": "~24.2.4",
47
- "@syncfusion/ej2-popups": "~24.2.3"
44
+ "@syncfusion/ej2-inputs": "~24.2.7",
45
+ "@syncfusion/ej2-lists": "~24.2.8",
46
+ "@syncfusion/ej2-navigations": "~24.2.8",
47
+ "@syncfusion/ej2-popups": "~24.2.8"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.",
@@ -73,6 +73,6 @@
73
73
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
74
74
  },
75
75
  "typings": "index.d.ts",
76
- "version": "24.2.4",
76
+ "version": "24.2.8",
77
77
  "sideEffects": false
78
78
  }
@@ -436,7 +436,7 @@ var DragAndDrop = /** @class */ (function (_super) {
436
436
  this.timelineEventModule.cellWidth = this.actionObj.cellWidth;
437
437
  this.timelineEventModule.getSlotDates();
438
438
  this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
439
- this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS).getBoundingClientRect().width;
439
+ util.getElementWidth(this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS));
440
440
  this.calculateTimelineTime(e);
441
441
  }
442
442
  else {
@@ -1255,7 +1255,7 @@ var DragAndDrop = /** @class */ (function (_super) {
1255
1255
  ~~(dragArea.querySelector('table').offsetHeight / trCollection.length) : this.actionObj.cellHeight;
1256
1256
  var rowIndex = Math.floor(Math.floor((this.actionObj.Y +
1257
1257
  (dragArea.scrollTop - translateY - (window.scrollY || window.pageYOffset))) -
1258
- dragArea.getBoundingClientRect().top) / rowHeight);
1258
+ util.getElementTop(dragArea)) / rowHeight);
1259
1259
  rowIndex = (rowIndex < 0) ? 0 : (rowIndex > trCollection.length - 1) ? trCollection.length - 1 : rowIndex;
1260
1260
  this.actionObj.index = rowIndex;
1261
1261
  var eventContainer = this.parent.element.querySelectorAll('.e-appointment-container:not(.e-hidden)').item(rowIndex);
@@ -1271,7 +1271,7 @@ var DragAndDrop = /** @class */ (function (_super) {
1271
1271
  if (!isNullOrUndefined(this.parent.eventDragArea)) {
1272
1272
  return;
1273
1273
  }
1274
- var top = trCollection[parseInt(rowIndex.toString(), 10)].getBoundingClientRect().height * rowIndex;
1274
+ var top = util.getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
1275
1275
  if (this.parent.rowAutoHeight) {
1276
1276
  var cursorElement = this.getCursorElement(e);
1277
1277
  if (cursorElement) {
@@ -81,9 +81,9 @@ var Resize = /** @class */ (function (_super) {
81
81
  bottom: resizeTarget.classList.contains(cls.BOTTOM_RESIZE_HANDLER)
82
82
  };
83
83
  _this.actionObj.groupIndex = _this.parent.uiStateValues.isGroupAdaptive ? _this.parent.uiStateValues.groupIndex : 0;
84
- var workCell = _this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS).getBoundingClientRect();
85
- _this.actionObj.cellWidth = workCell.width;
86
- _this.actionObj.cellHeight = workCell.height;
84
+ var workCell = _this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS);
85
+ _this.actionObj.cellWidth = util.getElementWidth(workCell);
86
+ _this.actionObj.cellHeight = util.getElementHeight(workCell);
87
87
  var hRows = _this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
88
88
  if (_this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
89
89
  var tr = _this.parent.getContentTable().querySelector('tr');
@@ -385,9 +385,9 @@ var Resize = /** @class */ (function (_super) {
385
385
  parseInt(this.actionObj.clone.style.left, 10);
386
386
  offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
387
387
  if (!isLeft) {
388
- offsetValue += (this.actionObj.clone.getBoundingClientRect().width - this.actionObj.cellWidth);
388
+ offsetValue += (util.getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
389
389
  }
390
- cellIndex = Math.floor(offsetValue / Math.floor(tr.getBoundingClientRect().width / noOfDays));
390
+ cellIndex = Math.floor(offsetValue / Math.floor(util.getElementWidth(tr) / noOfDays));
391
391
  isDateHeader = isTimeViews && headerName === 'Date';
392
392
  cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
393
393
  isLastCell = cellIndex === tdCollections.length;
@@ -396,7 +396,7 @@ var Resize = /** @class */ (function (_super) {
396
396
  else {
397
397
  var cellWidth = this.actionObj.cellWidth;
398
398
  cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
399
- Math.ceil((offset + (this.actionObj.clone.getBoundingClientRect().width - cellWidth)) / this.actionObj.cellWidth);
399
+ Math.ceil((offset + (util.getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
400
400
  if (this.parent.enableRtl) {
401
401
  var cellOffsetWidth = 0;
402
402
  if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
@@ -404,7 +404,7 @@ var Resize = /** @class */ (function (_super) {
404
404
  cellOffsetWidth = this.actionObj.cellWidth;
405
405
  }
406
406
  var offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
407
- this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.getBoundingClientRect().width - cellOffsetWidth);
407
+ this.actionObj.cellWidth) + (isLeft ? 0 : util.getElementWidth(this.actionObj.clone) - cellOffsetWidth);
408
408
  cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
409
409
  }
410
410
  isLastCell = cellIndex === tdCollections.length;
@@ -423,7 +423,7 @@ var Resize = /** @class */ (function (_super) {
423
423
  }
424
424
  else {
425
425
  if (!isLeft) {
426
- offset += this.actionObj.clone.getBoundingClientRect().width;
426
+ offset += util.getElementWidth(this.actionObj.clone);
427
427
  }
428
428
  var spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
429
429
  (offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
@@ -435,9 +435,9 @@ var Resize = /** @class */ (function (_super) {
435
435
  }
436
436
  else {
437
437
  var cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
438
- var originalWidth = Math.ceil((isLeft ? this.actionObj.element.getBoundingClientRect().width : 0) /
438
+ var originalWidth = Math.ceil((isLeft ? util.getElementWidth(this.actionObj.element) : 0) /
439
439
  this.actionObj.cellWidth) * this.actionObj.cellWidth;
440
- var noOfDays = Math.ceil((this.actionObj.clone.getBoundingClientRect().width - originalWidth) /
440
+ var noOfDays = Math.ceil((util.getElementWidth(this.actionObj.clone) - originalWidth) /
441
441
  this.actionObj.cellWidth);
442
442
  var tr = closest(this.actionObj.clone, 'tr');
443
443
  var dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
@@ -500,23 +500,24 @@ var Resize = /** @class */ (function (_super) {
500
500
  var slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
501
501
  var pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
502
502
  var targetWidth = isTimelineView ?
503
- (this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth :
504
- this.parent.currentView === 'Month' ? this.actionObj.element.getBoundingClientRect().width :
505
- Math.ceil(this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth;
503
+ (util.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
504
+ this.parent.currentView === 'Month' ? util.getElementWidth(this.actionObj.element) :
505
+ Math.ceil(util.getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
506
506
  var offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
507
507
  var left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
508
508
  if (isTimeViews) {
509
509
  offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval);
510
510
  if (!isLeft) {
511
511
  var roundedLeft = (+parseFloat(this.actionObj.element.style[this.parent.enableRtl ? 'right' : 'left'])).toFixed(1);
512
- if (roundedLeft !== left.toFixed(1)) {
512
+ var roundedWidth = Math.round(targetWidth / slotInterval) * slotInterval;
513
+ if (roundedLeft !== left.toFixed(1) || roundedWidth !== targetWidth) {
513
514
  offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left;
514
515
  }
515
516
  }
516
517
  this.actionObj.event[this.parent.eventFields.isAllDay] = false;
517
518
  }
518
519
  var width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
519
- this.actionObj.clone.getBoundingClientRect().width : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
520
+ util.getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
520
521
  if (this.parent.enableRtl) {
521
522
  var rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
522
523
  -(offsetWidth - this.actionObj.cellWidth);
@@ -530,7 +531,7 @@ var Resize = /** @class */ (function (_super) {
530
531
  }
531
532
  rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
532
533
  styles.right = formatUnit(rightValue);
533
- width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.getBoundingClientRect().width : width;
534
+ width = width + rightValue > this.scrollArgs.width ? util.getElementWidth(this.actionObj.clone) : width;
534
535
  }
535
536
  else {
536
537
  var offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
@@ -538,12 +539,12 @@ var Resize = /** @class */ (function (_super) {
538
539
  if (isTimelineView) {
539
540
  offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
540
541
  if (this.parent.enableRtl) {
541
- offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.getBoundingClientRect().width)
542
+ offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - util.getElementWidth(this.actionObj.clone))
542
543
  ? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
543
544
  }
544
545
  else {
545
- offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.getBoundingClientRect().width &&
546
- this.actionObj.clone.getBoundingClientRect().width === this.actionObj.cellWidth) ?
546
+ offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + util.getElementWidth(this.actionObj.clone) &&
547
+ util.getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
547
548
  parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
548
549
  }
549
550
  }
@@ -559,10 +560,10 @@ var Resize = /** @class */ (function (_super) {
559
560
  }
560
561
  else {
561
562
  offsetLeft = 0;
562
- width = this.actionObj.clone.getBoundingClientRect().width;
563
+ width = util.getElementWidth(this.actionObj.clone);
563
564
  }
564
565
  }
565
- var cloneWidth = Math.ceil(this.actionObj.clone.getBoundingClientRect().width / this.actionObj.cellWidth) *
566
+ var cloneWidth = Math.ceil(util.getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
566
567
  this.actionObj.cellWidth;
567
568
  if (isLeft) {
568
569
  styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
@@ -55,6 +55,10 @@ var VirtualScroll = /** @class */ (function () {
55
55
  this.renderedLength = conTable.querySelector('tbody').children.length;
56
56
  virtual.style.height = (conTable.offsetHeight + (this.parent.resourceBase.expandedResources.length - (this.renderedLength)) *
57
57
  conTable.offsetHeight / this.renderedLength) + 'px';
58
+ var conWrap = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
59
+ if ((conWrap.scrollHeight - conWrap.scrollTop) < conWrap.offsetHeight * this.bufferCount) {
60
+ virtual.style.height = parseInt(virtual.style.height) + (conWrap.offsetHeight * this.bufferCount) + 'px';
61
+ }
58
62
  }
59
63
  else {
60
64
  virtual.style.height = '';
@@ -238,3 +238,24 @@ export declare function isIPadDevice(): boolean;
238
238
  * @returns {string} Returns the output string
239
239
  */
240
240
  export declare function capitalizeFirstWord(inputString: string, type: string): string;
241
+ /**
242
+ * Method to get element cell width
243
+ *
244
+ * @param {HTMLElement} element Accepts the DOM element
245
+ * @returns {number} Returns the width of the given element
246
+ */
247
+ export declare function getElementWidth(element: HTMLElement): number;
248
+ /**
249
+ * Method to get element cell Height
250
+ *
251
+ * @param {HTMLElement} element Accepts the DOM element
252
+ * @returns {number} Returns the Height of the given element
253
+ */
254
+ export declare function getElementHeight(element: HTMLElement): number;
255
+ /**
256
+ * Method to get element cell Top
257
+ *
258
+ * @param {HTMLElement} element Accepts the DOM element
259
+ * @returns {number} Returns the top value of the given element
260
+ */
261
+ export declare function getElementTop(element: HTMLElement): number;
@@ -20,7 +20,7 @@ export function getElementHeightFromClass(container, elementClass) {
20
20
  el.style.visibility = 'hidden';
21
21
  el.style.position = 'absolute';
22
22
  container.appendChild(el);
23
- height = el.getBoundingClientRect().height;
23
+ height = getElementHeight(el);
24
24
  remove(el);
25
25
  return height;
26
26
  }
@@ -37,7 +37,7 @@ export function getElementWidthFromClass(container, elementClass) {
37
37
  el.style.visibility = 'hidden';
38
38
  el.style.position = 'absolute';
39
39
  container.appendChild(el);
40
- width = el.getBoundingClientRect().width;
40
+ width = getElementWidth(el);
41
41
  remove(el);
42
42
  return width;
43
43
  }
@@ -425,3 +425,30 @@ export function capitalizeFirstWord(inputString, type) {
425
425
  }
426
426
  return inputString;
427
427
  }
428
+ /**
429
+ * Method to get element cell width
430
+ *
431
+ * @param {HTMLElement} element Accepts the DOM element
432
+ * @returns {number} Returns the width of the given element
433
+ */
434
+ export function getElementWidth(element) {
435
+ return document.body.style.transform.includes('scale') ? element.offsetWidth : element.getBoundingClientRect().width;
436
+ }
437
+ /**
438
+ * Method to get element cell Height
439
+ *
440
+ * @param {HTMLElement} element Accepts the DOM element
441
+ * @returns {number} Returns the Height of the given element
442
+ */
443
+ export function getElementHeight(element) {
444
+ return document.body.style.transform.includes('scale') ? element.offsetHeight : element.getBoundingClientRect().height;
445
+ }
446
+ /**
447
+ * Method to get element cell Top
448
+ *
449
+ * @param {HTMLElement} element Accepts the DOM element
450
+ * @returns {number} Returns the top value of the given element
451
+ */
452
+ export function getElementTop(element) {
453
+ return document.body.style.transform.includes('scale') ? element.offsetTop : element.getBoundingClientRect().top;
454
+ }
@@ -89,7 +89,6 @@ export declare class EventBase {
89
89
  getPageCoordinates(e: MouseEvent & TouchEvent): (MouseEvent & TouchEvent) | Touch;
90
90
  renderSpannedIcon(element: HTMLElement, spanEvent: Record<string, any>): void;
91
91
  addCellHeight(selector: string, eventHeight: number, eventGap: number, headerHeight: number, indHeight: number, isScrollUpdate?: boolean): void;
92
- getCellWidth(element: HTMLElement): number;
93
92
  private unWireEvents;
94
93
  destroy(): void;
95
94
  }
@@ -1354,9 +1354,6 @@ var EventBase = /** @class */ (function () {
1354
1354
  }
1355
1355
  }
1356
1356
  };
1357
- EventBase.prototype.getCellWidth = function (element) {
1358
- return document.body.style.transform.includes('scale') ? parseFloat(window.getComputedStyle(element).width) : element.getBoundingClientRect().width;
1359
- };
1360
1357
  EventBase.prototype.unWireEvents = function () {
1361
1358
  var appElements = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
1362
1359
  for (var _i = 0, appElements_1 = appElements; _i < appElements_1.length; _i++) {
@@ -108,7 +108,7 @@ var InlineEdit = /** @class */ (function () {
108
108
  var allDayElements = [].slice.call(this.parent.element.querySelectorAll('.' + cls.ALLDAY_APPOINTMENT_CLASS));
109
109
  var allDayLevel = 0;
110
110
  if (allDayElements.length > 0) {
111
- allDayLevel = Math.floor(this.parent.element.querySelector('.' + cls.ALLDAY_ROW_CLASS).getBoundingClientRect().height /
111
+ allDayLevel = Math.floor(util.getElementHeight(this.parent.element.querySelector('.' + cls.ALLDAY_ROW_CLASS)) /
112
112
  allDayElements[0].offsetHeight) - 1;
113
113
  }
114
114
  verticalEvent.allDayLevel = allDayLevel;
@@ -175,8 +175,8 @@ var MonthEvent = /** @class */ (function (_super) {
175
175
  });
176
176
  }
177
177
  var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? 0 : this.workCells.length - 1];
178
- this.cellWidth = this.parent.eventBase.getCellWidth(cellDetail);
179
- this.cellHeight = cellDetail.getBoundingClientRect().height;
178
+ this.cellWidth = util.getElementWidth(cellDetail);
179
+ this.cellHeight = util.getElementHeight(cellDetail);
180
180
  this.dateRender = dateRender;
181
181
  var filteredDates = this.getRenderedDates(dateRender);
182
182
  this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
@@ -38,7 +38,7 @@ var TimelineEvent = /** @class */ (function (_super) {
38
38
  _this.eventContainers = [].slice.call(_this.element.querySelectorAll('.' + cls.APPOINTMENT_CONTAINER_CLASS));
39
39
  var tr = [].slice.call(_this.element.querySelectorAll('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr'));
40
40
  _this.dayLength = tr.length === 0 ? 0 : tr[0].children.length;
41
- _this.content = _this.parent.element.querySelector('.' + cls.CONTENT_TABLE_CLASS);
41
+ _this.content = _this.parent.element.querySelector('.' + cls.SCHEDULE_TABLE_CLASS + '.' + cls.CONTENT_TABLE_CLASS);
42
42
  return _this;
43
43
  }
44
44
  TimelineEvent.prototype.getSlotDates = function () {
@@ -48,7 +48,7 @@ var TimelineEvent = /** @class */ (function (_super) {
48
48
  this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
49
49
  this.renderType = 'day';
50
50
  var workCell = this.content.querySelector('.' + cls.WORK_CELLS_CLASS);
51
- this.cellWidth = workCell.getBoundingClientRect().width / +(workCell.getAttribute('colspan') || 1);
51
+ this.cellWidth = util.getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
52
52
  this.slotsPerDay = 1;
53
53
  }
54
54
  else {
@@ -204,14 +204,14 @@ var TimelineEvent = /** @class */ (function (_super) {
204
204
  this.wireAppointmentEvents(appointmentElement, event);
205
205
  if (this.parent.rowAutoHeight) {
206
206
  var conWrap = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
207
- var conWidth = conWrap.getBoundingClientRect().width;
207
+ var conWidth = util.getElementWidth(conWrap);
208
208
  var isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
209
209
  conWrap.offsetWidth === conWrap.clientWidth;
210
210
  this.renderEventElement(event, appointmentElement, cellTd);
211
211
  var firstChild = this.getFirstChild(resIndex);
212
212
  this.updateCellHeight(firstChild, height);
213
213
  if (isWithoutScroll &&
214
- (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== conWrap.getBoundingClientRect().width)) {
214
+ (conWrap.offsetWidth > conWrap.clientWidth || conWidth !== util.getElementWidth(conWrap))) {
215
215
  this.adjustAppointments(conWidth);
216
216
  }
217
217
  }
@@ -330,7 +330,7 @@ var TimelineEvent = /** @class */ (function (_super) {
330
330
  TimelineEvent.prototype.adjustAppointments = function (conWidth) {
331
331
  var _this = this;
332
332
  var tr = this.parent.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr');
333
- var actualCellWidth = this.workCells[0].getBoundingClientRect().width;
333
+ var actualCellWidth = util.getElementWidth(this.workCells[0]);
334
334
  this.cellWidth = actualCellWidth / +(this.workCells[0].getAttribute('colspan') || 1);
335
335
  var currentPercentage = (actualCellWidth * tr.children.length) / (conWidth / 100);
336
336
  var apps = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS));
@@ -113,7 +113,7 @@ var VerticalEvent = /** @class */ (function (_super) {
113
113
  this.resources = this.parent.resourceBase.renderedResources;
114
114
  }
115
115
  this.cellHeight =
116
- parseFloat(this.parent.element.querySelector('.e-content-wrap tbody tr').getBoundingClientRect().height.toFixed(2));
116
+ parseFloat(util.getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
117
117
  this.dateRender[0] = this.parent.activeView.renderDates;
118
118
  if (this.parent.activeViewOptions.group.resources.length > 0) {
119
119
  for (var i = 0, len = this.resources.length; i < len; i++) {
@@ -89,7 +89,7 @@ var YearEvent = /** @class */ (function (_super) {
89
89
  YearEvent.prototype.timelineYearViewEvents = function () {
90
90
  var _this = this;
91
91
  var workCell = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')');
92
- this.cellWidth = this.parent.eventBase.getCellWidth(workCell);
92
+ this.cellWidth = util.getElementWidth(workCell);
93
93
  this.cellHeader = util.getOuterHeight(workCell.querySelector('.' + cls.DATE_HEADER_CLASS));
94
94
  var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS);
95
95
  this.eventHeight = util.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
@@ -247,7 +247,7 @@ var YearEvent = /** @class */ (function (_super) {
247
247
  var contentTable = this.parent.element.querySelector('.' + cls.CONTENT_WRAP_CLASS);
248
248
  var isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
249
249
  var workCell = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS);
250
- this.cellWidth = workCell.getBoundingClientRect().width;
250
+ this.cellWidth = util.getElementWidth(workCell);
251
251
  this.cellHeader = 0;
252
252
  var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS);
253
253
  this.eventHeight = util.getElementHeightFromClass(eventTable, cls.APPOINTMENT_CLASS);
@@ -292,7 +292,7 @@ var YearEvent = /** @class */ (function (_super) {
292
292
  appWrapper.forEach(function (appWrap, cellIndex) {
293
293
  var td = row.querySelector("td:nth-child(" + (cellIndex + 1) + ")");
294
294
  var app = [].slice.call(appWrap.children);
295
- var width = td.getBoundingClientRect().width;
295
+ var width = util.getElementWidth(td);
296
296
  var left = td.offsetLeft;
297
297
  if (_this.parent.enableRtl) {
298
298
  var right_1 = conTable_1.offsetWidth - left - td.offsetWidth;
@@ -16,7 +16,6 @@ export declare class TimelineViews extends VerticalView {
16
16
  private generateTimeSlots;
17
17
  changeCurrentTimePosition(): void;
18
18
  private getLeftFromDateTime;
19
- private getWorkCellWidth;
20
19
  renderHeader(): void;
21
20
  createAllDayRow(table: Element, tdData: TdData[]): void;
22
21
  getCurrentTimeIndicatorIndex(): number[];
@@ -72,7 +72,7 @@ var TimelineViews = /** @class */ (function (_super) {
72
72
  }
73
73
  var scrollLeft;
74
74
  if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
75
- scrollLeft = index * this.getWorkCellWidth();
75
+ scrollLeft = index * util.getElementWidth(this.element.querySelector('.e-work-cells'));
76
76
  }
77
77
  else {
78
78
  scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
@@ -159,7 +159,7 @@ var TimelineViews = /** @class */ (function (_super) {
159
159
  if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
160
160
  this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
161
161
  diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
162
- this.getWorkCellWidth();
162
+ util.getElementWidth(this.element.querySelector('.e-work-cells'));
163
163
  }
164
164
  else {
165
165
  var endHour = this.getEndHour();
@@ -169,12 +169,9 @@ var TimelineViews = /** @class */ (function (_super) {
169
169
  }
170
170
  }
171
171
  }
172
- return diffInDates + ((diffInMinutes * this.getWorkCellWidth() * this.parent.activeViewOptions.timeScale.slotCount) /
172
+ return diffInDates + ((diffInMinutes * util.getElementWidth(this.element.querySelector('.e-work-cells')) * this.parent.activeViewOptions.timeScale.slotCount) /
173
173
  this.parent.activeViewOptions.timeScale.interval);
174
174
  };
175
- TimelineViews.prototype.getWorkCellWidth = function () {
176
- return this.element.querySelector('.e-work-cells').getBoundingClientRect().width;
177
- };
178
175
  TimelineViews.prototype.renderHeader = function () {
179
176
  var tr = createElement('tr');
180
177
  if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
@@ -371,7 +371,7 @@ var VerticalView = /** @class */ (function (_super) {
371
371
  this.parent.activeViewOptions.timeScale.interval;
372
372
  };
373
373
  VerticalView.prototype.getWorkCellHeight = function () {
374
- return parseFloat(this.element.querySelector('.' + cls.WORK_CELLS_CLASS).getBoundingClientRect().height.toFixed(2));
374
+ return parseFloat(util.getElementHeight(this.element.querySelector('.' + cls.WORK_CELLS_CLASS)).toFixed(2));
375
375
  };
376
376
  VerticalView.prototype.getTdContent = function (date, type, groupIndex) {
377
377
  var cntEle;
@@ -449,7 +449,7 @@ var ViewBase = /** @class */ (function () {
449
449
  if (this.isTimelineView()) {
450
450
  var colElements = this.getColElements();
451
451
  var contentBody = this.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody');
452
- var colWidth_1 = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
452
+ var colWidth_1 = (util.getElementWidth(contentBody) / (colElements.length / 2));
453
453
  if (content.offsetHeight !== content.clientHeight) {
454
454
  var resourceColumn = this.parent.element.querySelector('.' + cls.RESOURCE_COLUMN_WRAP_CLASS);
455
455
  if (!isNullOrUndefined(resourceColumn)) {
@@ -395,6 +395,9 @@
395
395
  .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items .e-toolbar-left .e-tbar-btn.e-icon-btn:hover, .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items .e-toolbar-left .e-tbar-btn.e-icon-btn:focus {
396
396
  height: calc(100% - 20px);
397
397
  }
398
+ .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items {
399
+ height: 56px;
400
+ }
398
401
  .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items.e-tbar-pos {
399
402
  height: 56px;
400
403
  min-height: 56px;
@@ -421,6 +424,20 @@
421
424
  .e-schedule.e-device .e-content-wrap.e-scroll-hidden {
422
425
  overflow: hidden;
423
426
  }
427
+ @media screen and (max-width: 320px) {
428
+ .e-schedule .e-schedule-toolbar .e-toolbar-pop {
429
+ width: 100%;
430
+ }
431
+ .e-schedule .e-schedule-toolbar .e-toolbar-pop .e-toolbar-item .e-tbar-btn.e-btn {
432
+ padding-left: 7px;
433
+ }
434
+ .e-schedule .e-schedule-toolbar .e-toolbar-pop.e-rtl .e-toolbar-item .e-tbar-btn.e-btn {
435
+ padding-right: 7px;
436
+ }
437
+ .e-schedule .e-schedule-toolbar .e-tbar-btn .e-tbar-btn-text {
438
+ font-size: 8px;
439
+ }
440
+ }
424
441
  .e-schedule .e-schedule-resource-toolbar {
425
442
  background: #131313;
426
443
  border-bottom: 1px solid #505050;
@@ -2789,6 +2806,19 @@
2789
2806
  float: right;
2790
2807
  }
2791
2808
 
2809
+ /*! schedule event window for smaller viewports*/
2810
+ @media screen and (max-width: 320px) {
2811
+ .e-schedule-dialog.e-popup.e-popup-open {
2812
+ max-height: 350px;
2813
+ min-width: 100%;
2814
+ }
2815
+ .e-schedule-dialog .e-all-day-container {
2816
+ padding-bottom: 10px;
2817
+ }
2818
+ .e-schedule-dialog .e-all-day-time-zone-row {
2819
+ display: block;
2820
+ }
2821
+ }
2792
2822
  .e-ddl.e-popup .e-resource-template {
2793
2823
  display: -ms-flexbox;
2794
2824
  display: flex;
@@ -3378,6 +3408,18 @@
3378
3408
  margin-right: 0;
3379
3409
  }
3380
3410
 
3411
+ /*! schedule quick popup for smaller viewports */
3412
+ @media screen and (max-width: 320px) {
3413
+ .e-quick-popup-wrapper {
3414
+ min-width: 100%;
3415
+ }
3416
+ .e-quick-popup-wrapper .e-popup-footer {
3417
+ padding-left: 5px;
3418
+ }
3419
+ .e-quick-popup-wrapper.e-rtl .e-popup-footer {
3420
+ padding-right: 5px;
3421
+ }
3422
+ }
3381
3423
  .e-bigger .e-quick-popup-wrapper .e-cell-popup .e-popup-content .e-popup-table .e-subject {
3382
3424
  font-size: 24px;
3383
3425
  }
@@ -390,6 +390,9 @@
390
390
  .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items .e-toolbar-left .e-tbar-btn.e-icon-btn:hover, .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items .e-toolbar-left .e-tbar-btn.e-icon-btn:focus {
391
391
  height: calc(100% - 20px);
392
392
  }
393
+ .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items {
394
+ height: 56px;
395
+ }
393
396
  .e-schedule.e-device .e-schedule-toolbar .e-toolbar-items.e-tbar-pos {
394
397
  height: 56px;
395
398
  min-height: 56px;
@@ -416,6 +419,20 @@
416
419
  .e-schedule.e-device .e-content-wrap.e-scroll-hidden {
417
420
  overflow: hidden;
418
421
  }
422
+ @media screen and (max-width: 320px) {
423
+ .e-schedule .e-schedule-toolbar .e-toolbar-pop {
424
+ width: 100%;
425
+ }
426
+ .e-schedule .e-schedule-toolbar .e-toolbar-pop .e-toolbar-item .e-tbar-btn.e-btn {
427
+ padding-left: 7px;
428
+ }
429
+ .e-schedule .e-schedule-toolbar .e-toolbar-pop.e-rtl .e-toolbar-item .e-tbar-btn.e-btn {
430
+ padding-right: 7px;
431
+ }
432
+ .e-schedule .e-schedule-toolbar .e-tbar-btn .e-tbar-btn-text {
433
+ font-size: 8px;
434
+ }
435
+ }
419
436
  .e-schedule .e-schedule-resource-toolbar {
420
437
  background: #f8f8f8;
421
438
  border-bottom: 1px solid #ddd;
@@ -2784,6 +2801,19 @@
2784
2801
  float: right;
2785
2802
  }
2786
2803
 
2804
+ /*! schedule event window for smaller viewports*/
2805
+ @media screen and (max-width: 320px) {
2806
+ .e-schedule-dialog.e-popup.e-popup-open {
2807
+ max-height: 350px;
2808
+ min-width: 100%;
2809
+ }
2810
+ .e-schedule-dialog .e-all-day-container {
2811
+ padding-bottom: 10px;
2812
+ }
2813
+ .e-schedule-dialog .e-all-day-time-zone-row {
2814
+ display: block;
2815
+ }
2816
+ }
2787
2817
  .e-ddl.e-popup .e-resource-template {
2788
2818
  display: -ms-flexbox;
2789
2819
  display: flex;
@@ -3373,6 +3403,18 @@
3373
3403
  margin-right: 0;
3374
3404
  }
3375
3405
 
3406
+ /*! schedule quick popup for smaller viewports */
3407
+ @media screen and (max-width: 320px) {
3408
+ .e-quick-popup-wrapper {
3409
+ min-width: 100%;
3410
+ }
3411
+ .e-quick-popup-wrapper .e-popup-footer {
3412
+ padding-left: 5px;
3413
+ }
3414
+ .e-quick-popup-wrapper.e-rtl .e-popup-footer {
3415
+ padding-right: 5px;
3416
+ }
3417
+ }
3376
3418
  .e-bigger .e-quick-popup-wrapper .e-cell-popup .e-popup-content .e-popup-table .e-subject {
3377
3419
  font-size: 24px;
3378
3420
  }