@syncfusion/ej2-gantt 22.2.12 → 23.1.38

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 (126) hide show
  1. package/CHANGELOG.md +197 -164
  2. package/dist/ej2-gantt.min.js +3 -3
  3. package/dist/ej2-gantt.umd.min.js +3 -3
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +973 -280
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +1011 -302
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +3 -3
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +2 -2
  12. package/package.json +21 -21
  13. package/src/gantt/actions/cell-edit.js +4 -1
  14. package/src/gantt/actions/connector-line-edit.js +48 -6
  15. package/src/gantt/actions/critical-path.d.ts +2 -0
  16. package/src/gantt/actions/critical-path.js +79 -61
  17. package/src/gantt/actions/dependency.d.ts +1 -0
  18. package/src/gantt/actions/dependency.js +92 -31
  19. package/src/gantt/actions/dialog-edit.js +28 -8
  20. package/src/gantt/actions/edit.js +18 -8
  21. package/src/gantt/actions/pdf-export.d.ts +4 -1
  22. package/src/gantt/actions/pdf-export.js +36 -3
  23. package/src/gantt/actions/rowdragdrop.js +10 -2
  24. package/src/gantt/actions/selection.js +22 -5
  25. package/src/gantt/actions/taskbar-edit.js +58 -38
  26. package/src/gantt/actions/toolbar.js +8 -0
  27. package/src/gantt/base/date-processor.js +1 -1
  28. package/src/gantt/base/gantt-chart.d.ts +1 -0
  29. package/src/gantt/base/gantt-chart.js +85 -6
  30. package/src/gantt/base/gantt-model.d.ts +7 -0
  31. package/src/gantt/base/gantt.d.ts +6 -0
  32. package/src/gantt/base/gantt.js +78 -16
  33. package/src/gantt/base/interface.d.ts +14 -0
  34. package/src/gantt/base/splitter.js +1 -0
  35. package/src/gantt/base/task-processor.d.ts +4 -4
  36. package/src/gantt/base/task-processor.js +75 -25
  37. package/src/gantt/base/tree-grid.js +19 -10
  38. package/src/gantt/export/export-helper.d.ts +5 -1
  39. package/src/gantt/export/export-helper.js +150 -3
  40. package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
  41. package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
  42. package/src/gantt/export/pdf-base/treegrid-layouter.js +3 -1
  43. package/src/gantt/export/pdf-connector-line.js +3 -1
  44. package/src/gantt/export/pdf-gantt.js +6 -0
  45. package/src/gantt/export/pdf-taskbar.d.ts +13 -0
  46. package/src/gantt/export/pdf-taskbar.js +39 -5
  47. package/src/gantt/export/pdf-timeline.js +17 -8
  48. package/src/gantt/export/pdf-treegrid.js +3 -3
  49. package/src/gantt/models/task-fields-model.d.ts +7 -0
  50. package/src/gantt/models/task-fields.d.ts +6 -0
  51. package/src/gantt/models/task-fields.js +3 -0
  52. package/src/gantt/renderer/chart-rows.d.ts +1 -1
  53. package/src/gantt/renderer/chart-rows.js +44 -34
  54. package/src/gantt/renderer/connector-line.js +52 -11
  55. package/src/gantt/renderer/edit-tooltip.js +2 -1
  56. package/src/gantt/renderer/timeline.js +16 -9
  57. package/src/gantt/renderer/tooltip.js +5 -5
  58. package/styles/bootstrap-dark.css +44 -100
  59. package/styles/bootstrap.css +44 -100
  60. package/styles/bootstrap4.css +44 -100
  61. package/styles/bootstrap5-dark.css +44 -100
  62. package/styles/bootstrap5.css +44 -100
  63. package/styles/fabric-dark.css +44 -100
  64. package/styles/fabric.css +44 -100
  65. package/styles/fluent-dark.css +44 -100
  66. package/styles/fluent.css +44 -100
  67. package/styles/gantt/_layout.scss +44 -31
  68. package/styles/gantt/_theme.scss +104 -98
  69. package/styles/gantt/bootstrap-dark.css +44 -100
  70. package/styles/gantt/bootstrap-dark.scss +1 -1
  71. package/styles/gantt/bootstrap.css +44 -100
  72. package/styles/gantt/bootstrap.scss +1 -1
  73. package/styles/gantt/bootstrap4.css +44 -100
  74. package/styles/gantt/bootstrap4.scss +1 -1
  75. package/styles/gantt/bootstrap5-dark.css +44 -100
  76. package/styles/gantt/bootstrap5-dark.scss +1 -1
  77. package/styles/gantt/bootstrap5.css +44 -100
  78. package/styles/gantt/bootstrap5.scss +1 -1
  79. package/styles/gantt/fabric-dark.css +44 -100
  80. package/styles/gantt/fabric-dark.scss +1 -1
  81. package/styles/gantt/fabric.css +44 -100
  82. package/styles/gantt/fabric.scss +1 -1
  83. package/styles/gantt/fluent-dark.css +44 -100
  84. package/styles/gantt/fluent-dark.scss +1 -1
  85. package/styles/gantt/fluent.css +44 -100
  86. package/styles/gantt/fluent.scss +1 -1
  87. package/styles/gantt/highcontrast-light.css +40 -100
  88. package/styles/gantt/highcontrast-light.scss +1 -1
  89. package/styles/gantt/highcontrast.css +44 -100
  90. package/styles/gantt/highcontrast.scss +1 -1
  91. package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
  92. package/styles/gantt/icons/_bootstrap.scss +4 -0
  93. package/styles/gantt/icons/_bootstrap4.scss +4 -0
  94. package/styles/gantt/icons/_bootstrap5.scss +4 -0
  95. package/styles/gantt/icons/_fabric-dark.scss +4 -0
  96. package/styles/gantt/icons/_fabric.scss +4 -0
  97. package/styles/gantt/icons/_fluent.scss +4 -0
  98. package/styles/gantt/icons/_fusionnew.scss +4 -0
  99. package/styles/gantt/icons/_highcontrast.scss +4 -0
  100. package/styles/gantt/icons/_material-dark.scss +4 -0
  101. package/styles/gantt/icons/_material.scss +4 -0
  102. package/styles/gantt/icons/_material3.scss +4 -0
  103. package/styles/gantt/icons/_tailwind-dark.scss +4 -0
  104. package/styles/gantt/icons/_tailwind.scss +4 -0
  105. package/styles/gantt/material-dark.css +44 -101
  106. package/styles/gantt/material-dark.scss +1 -1
  107. package/styles/gantt/material.css +44 -101
  108. package/styles/gantt/material.scss +1 -1
  109. package/styles/gantt/material3-dark.css +45 -102
  110. package/styles/gantt/material3-dark.scss +1 -1
  111. package/styles/gantt/material3.css +45 -102
  112. package/styles/gantt/material3.scss +1 -1
  113. package/styles/gantt/tailwind-dark.css +44 -101
  114. package/styles/gantt/tailwind-dark.scss +1 -1
  115. package/styles/gantt/tailwind.css +44 -101
  116. package/styles/gantt/tailwind.scss +1 -1
  117. package/styles/highcontrast-light.css +40 -100
  118. package/styles/highcontrast.css +44 -100
  119. package/styles/material-dark.css +44 -101
  120. package/styles/material.css +44 -101
  121. package/styles/material3-dark.css +45 -102
  122. package/styles/material3-dark.scss +1 -1
  123. package/styles/material3.css +45 -102
  124. package/styles/material3.scss +1 -1
  125. package/styles/tailwind-dark.css +44 -101
  126. package/styles/tailwind.css +44 -101
@@ -511,7 +511,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
511
511
  }
512
512
  else {
513
513
  if ((!isNullOrUndefined(this.parent.taskFields.milestone)) && (!isNullOrUndefined(ganttProperties.startDate)) && !isNullOrUndefined(ganttProperties.endDate) &&
514
- (ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
514
+ (ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && (ganttData.taskData[this.parent.taskFields.milestone] === false)) {
515
515
  tDuration = 1;
516
516
  }
517
517
  else {
@@ -1656,7 +1656,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1656
1656
  dataManager.executeQuery(queryManager).then(function (e) {
1657
1657
  _this.dataArray = e.result;
1658
1658
  _this.processTimeline();
1659
- _this.cloneDataSource();
1659
+ if (_this.parent.loadChildOnDemand || (!_this.parent.loadChildOnDemand && !(_this.parent.taskFields.hasChildMapping))) {
1660
+ _this.cloneDataSource();
1661
+ }
1660
1662
  _this.parent.renderGantt(isChange);
1661
1663
  }).catch(function (e) {
1662
1664
  // Trigger action failure event
@@ -1695,6 +1697,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1695
1697
  var data = [];
1696
1698
  for (var i = 0; i < this.dataArray.length; i++) {
1697
1699
  var tempData = this.dataArray[i];
1700
+ if (tempData['parentItem']) {
1701
+ delete tempData['parentItem'];
1702
+ }
1698
1703
  data.push(extend({}, {}, tempData, true));
1699
1704
  if (!isNullOrUndefined(tempData[taskIdMapping])) {
1700
1705
  this.taskIds.push(tempData[taskIdMapping].toString());
@@ -1704,7 +1709,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1704
1709
  this.parent.setProperties({ taskFields: { child: 'Children' } }, true);
1705
1710
  }
1706
1711
  this.constructDataSource(data);
1707
- hierarchicalData = this.hierarchyData;
1712
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping && this.hierarchyData.length === 0) {
1713
+ hierarchicalData = this.dataArray;
1714
+ }
1715
+ else {
1716
+ hierarchicalData = this.hierarchyData;
1717
+ }
1708
1718
  }
1709
1719
  else {
1710
1720
  hierarchicalData = this.dataArray;
@@ -1926,7 +1936,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1926
1936
  if (!isNullOrUndefined(data[taskSettings.id])) {
1927
1937
  id = data[taskSettings.id];
1928
1938
  name = data[taskSettings.name];
1929
- this.addTaskData(ganttData, data, isLoad);
1939
+ if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && data['taskData']) {
1940
+ ganttData['taskData'] = data['taskData'];
1941
+ }
1942
+ else {
1943
+ this.addTaskData(ganttData, data, isLoad);
1944
+ }
1930
1945
  }
1931
1946
  else if (!isNullOrUndefined(data[resourceFields.id])) {
1932
1947
  id = data[resourceFields.id];
@@ -1964,6 +1979,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1964
1979
  this.parent.setRecordValue('notes', notes, ganttProperties, true);
1965
1980
  this.parent.setRecordValue('cssClass', data[taskSettings.cssClass], ganttProperties, true);
1966
1981
  this.parent.setRecordValue('parentItem', this.getCloneParent(parentItem), ganttData);
1982
+ if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && this.parent.currentViewData.length > 0) {
1983
+ this.parent.setRecordValue('parentItem', ganttData.parentItem, this.parent.currentViewData[this.taskIds.indexOf(data[taskSettings.id].toString())]);
1984
+ }
1967
1985
  var parentUniqId = ganttData.parentItem ? ganttData.parentItem.uniqueID : null;
1968
1986
  this.parent.setRecordValue('parentUniqueID', parentUniqId, ganttData);
1969
1987
  if (this.parent.viewType === 'ResourceView' && !isNullOrUndefined(taskSettings.parentID)
@@ -1971,7 +1989,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1971
1989
  this.parent.setRecordValue('parentId', ganttData.parentItem.taskId, ganttProperties, true);
1972
1990
  }
1973
1991
  this.parent.setRecordValue('level', level, ganttData);
1974
- this.parent.setRecordValue('uniqueID', getUid(this.parent.element.id + '_data_'), ganttData);
1992
+ if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && data['uniqueID']) {
1993
+ this.parent.setRecordValue('uniqueID', data['uniqueID'], ganttData);
1994
+ }
1995
+ else {
1996
+ this.parent.setRecordValue('uniqueID', getUid(this.parent.element.id + '_data_'), ganttData);
1997
+ }
1975
1998
  this.parent.setRecordValue('uniqueID', ganttData.uniqueID, ganttProperties, true);
1976
1999
  this.parent.setRecordValue('childRecords', [], ganttData);
1977
2000
  if (this.parent.dataSource instanceof Object && isCountRequired(this.parent) &&
@@ -1986,7 +2009,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1986
2009
  }
1987
2010
  }
1988
2011
  else {
1989
- this.parent.setRecordValue('hasChildRecords', false, ganttData);
2012
+ if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && ganttData.taskData[taskSettings.hasChildMapping]) {
2013
+ this.parent.setRecordValue('hasChildRecords', true, ganttData);
2014
+ }
2015
+ else {
2016
+ this.parent.setRecordValue('hasChildRecords', false, ganttData);
2017
+ }
1990
2018
  }
1991
2019
  if (ganttData.hasChildRecords) {
1992
2020
  this.parent.setRecordValue('autoStartDate', ganttData.ganttProperties.startDate, ganttProperties);
@@ -2599,7 +2627,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
2599
2627
  }
2600
2628
  else {
2601
2629
  this.updateDurationValue(duration, ganttProperties);
2602
- this.calculateEndDate(ganttData);
2630
+ if (this.parent.autoCalculateDateScheduling) {
2631
+ this.calculateEndDate(ganttData);
2632
+ }
2633
+ else {
2634
+ this.parent.setRecordValue('endDate', endDate, ganttProperties, true);
2635
+ }
2603
2636
  }
2604
2637
  };
2605
2638
  /**
@@ -3384,7 +3417,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3384
3417
  */
3385
3418
  TaskProcessor.prototype.updateDurationValue = function (duration, ganttProperties) {
3386
3419
  var tempDuration = this.getDurationValue(duration);
3387
- if (!isNaN(getValue('duration', tempDuration))) {
3420
+ if (!isNaN(getValue('duration', tempDuration)) && !(this.parent.viewType === "ResourceView" && tempDuration["duration"] === 0)) {
3388
3421
  this.parent.setRecordValue('duration', getValue('duration', tempDuration), ganttProperties, true);
3389
3422
  }
3390
3423
  if (!isNullOrUndefined(getValue('durationUnit', tempDuration))) {
@@ -3768,7 +3801,14 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3768
3801
  * @private
3769
3802
  */
3770
3803
  TaskProcessor.prototype.reUpdateGanttDataPosition = function () {
3771
- var flatData = this.parent.flatData;
3804
+ var flatData;
3805
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
3806
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
3807
+ flatData = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'];
3808
+ }
3809
+ else {
3810
+ flatData = this.parent.flatData;
3811
+ }
3772
3812
  var length = flatData.length;
3773
3813
  for (var i = 0; i < length; i++) {
3774
3814
  var data = flatData[i];
@@ -3895,6 +3935,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3895
3935
  * @private
3896
3936
  */
3897
3937
  TaskProcessor.prototype.updateParentItems = function (cloneParent, isParent) {
3938
+ var _this = this;
3898
3939
  var parentData = isParent ? cloneParent : this.parent.getParentTask(cloneParent);
3899
3940
  var deleteUpdate = false;
3900
3941
  var ganttProp = parentData.ganttProperties;
@@ -3903,8 +3944,8 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3903
3944
  var previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
3904
3945
  var previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
3905
3946
  ganttProp.autoEndDate;
3906
- var childRecords = parentData.childRecords;
3907
- var childLength = childRecords.length;
3947
+ var childRecords_1 = parentData.childRecords;
3948
+ var childLength = childRecords_1.length;
3908
3949
  var totalDuration = 0;
3909
3950
  var progressValues = {};
3910
3951
  var minStartDate = null;
@@ -3913,38 +3954,43 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3913
3954
  var totalProgress = 0;
3914
3955
  var childCompletedWorks = 0;
3915
3956
  var childData = void 0;
3916
- for (var count = 0; count < childLength; count++) {
3917
- childData = childRecords[count];
3918
- if (this.parent.isOnDelete && childData.isDelete) {
3919
- if (childLength === 1 && this.parent.viewType === 'ProjectView') {
3957
+ var _loop_6 = function (count) {
3958
+ if (!this_4.parent.loadChildOnDemand && this_4.parent.taskFields.hasChildMapping) {
3959
+ childData = this_4.parent.currentViewData.filter(function (item) { return item.ganttProperties.taskId === childRecords_1[count][_this.parent.taskFields.id]; })[0];
3960
+ }
3961
+ else {
3962
+ childData = childRecords_1[count];
3963
+ }
3964
+ if (this_4.parent.isOnDelete && childData.isDelete) {
3965
+ if (childLength === 1 && this_4.parent.viewType === 'ProjectView') {
3920
3966
  deleteUpdate = true;
3921
3967
  }
3922
- continue;
3968
+ return "continue";
3923
3969
  }
3924
- var startDate = this.getValidStartDate(childData.ganttProperties);
3970
+ var startDate = this_4.getValidStartDate(childData.ganttProperties);
3925
3971
  if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
3926
3972
  startDate = childData.ganttProperties.autoStartDate;
3927
3973
  }
3928
- var endDate = this.getValidEndDate(childData.ganttProperties);
3974
+ var endDate = this_4.getValidEndDate(childData.ganttProperties);
3929
3975
  if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
3930
3976
  endDate = childData.ganttProperties.autoEndDate;
3931
3977
  }
3932
3978
  if (isNullOrUndefined(minStartDate)) {
3933
- minStartDate = this.getDateFromFormat(startDate);
3979
+ minStartDate = this_4.getDateFromFormat(startDate);
3934
3980
  }
3935
3981
  if (isNullOrUndefined(maxEndDate)) {
3936
- maxEndDate = this.getDateFromFormat(endDate);
3982
+ maxEndDate = this_4.getDateFromFormat(endDate);
3937
3983
  }
3938
- if (!isNullOrUndefined(endDate) && this.compareDates(endDate, maxEndDate) === 1) {
3939
- maxEndDate = this.getDateFromFormat(endDate);
3984
+ if (!isNullOrUndefined(endDate) && this_4.compareDates(endDate, maxEndDate) === 1) {
3985
+ maxEndDate = this_4.getDateFromFormat(endDate);
3940
3986
  }
3941
- if (!isNullOrUndefined(startDate) && this.compareDates(startDate, minStartDate) === -1) {
3942
- minStartDate = this.getDateFromFormat(startDate);
3987
+ if (!isNullOrUndefined(startDate) && this_4.compareDates(startDate, minStartDate) === -1) {
3988
+ minStartDate = this_4.getDateFromFormat(startDate);
3943
3989
  }
3944
3990
  if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
3945
- progressValues = this.getParentProgress(childData);
3991
+ progressValues = this_4.getParentProgress(childData);
3946
3992
  totalProgress += getValue('totalProgress', progressValues);
3947
- if (childData[this.parent.taskFields.duration] < 1) {
3993
+ if (childData[this_4.parent.taskFields.duration] < 1) {
3948
3994
  totalDuration += getValue('totalDuration', progressValues);
3949
3995
  totalDuration = Number(totalDuration.toFixed(4));
3950
3996
  }
@@ -3956,6 +4002,10 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3956
4002
  milestoneCount++;
3957
4003
  }
3958
4004
  childCompletedWorks += childData.ganttProperties.work;
4005
+ };
4006
+ var this_4 = this;
4007
+ for (var count = 0; count < childLength; count++) {
4008
+ _loop_6(count);
3959
4009
  }
3960
4010
  if (!deleteUpdate) {
3961
4011
  var taskCount = void 0;
@@ -4081,7 +4131,7 @@ var chartRowCell = 'e-chart-row-cell';
4081
4131
  var chartRow = 'e-chart-row';
4082
4132
  var rowExpand = 'e-row-expand';
4083
4133
  var rowCollapse = 'e-row-collapse';
4084
- var collapseParent = 'e-collapse-parent';
4134
+
4085
4135
  var taskBarLeftResizer = 'e-taskbar-left-resizer';
4086
4136
  var taskBarRightResizer = 'e-taskbar-right-resizer';
4087
4137
  var childProgressResizer = 'e-child-progress-resizer';
@@ -4448,6 +4498,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4448
4498
  function GanttChart(parent) {
4449
4499
  this.isExpandCollapseFromChart = false;
4450
4500
  this.isExpandAll = false;
4501
+ this.isCollapseAll = false;
4451
4502
  this.isGanttElement = false;
4452
4503
  this.parent = parent;
4453
4504
  this.chartTimelineContainer = null;
@@ -4793,6 +4844,42 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4793
4844
  if (this.parent.editSettings.allowTaskbarEditing) {
4794
4845
  this.parent.notify('chartMouseUp', e);
4795
4846
  }
4847
+ if (!this.parent.editSettings.allowEditing) {
4848
+ var isTaskbarEdited = false;
4849
+ if (this.parent.editSettings.allowTaskbarEditing &&
4850
+ getValue('editModule.taskbarEditModule.isMouseDragged', this.parent) &&
4851
+ getValue('editModule.taskbarEditModule.taskBarEditAction', this.parent)) {
4852
+ isTaskbarEdited = true;
4853
+ }
4854
+ if (!isTaskbarEdited) {
4855
+ /** Expand/collapse action */
4856
+ var target = e.target;
4857
+ var isOnTaskbarElement = e.target.classList.contains(taskBarMainContainer)
4858
+ || closest(e.target, '.' + taskBarMainContainer);
4859
+ if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
4860
+ this.chartExpandCollapseRequest(e);
4861
+ }
4862
+ else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
4863
+ this.scrollToTarget(e); /** Scroll to task */
4864
+ }
4865
+ }
4866
+ }
4867
+ if (e.type === "touchend") {
4868
+ var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
4869
+ if (!isNullOrUndefined(resizeCheck)) {
4870
+ resizeCheck.remove();
4871
+ }
4872
+ var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar');
4873
+ if (!isNullOrUndefined(Check)) {
4874
+ var clonetbody = Check.parentElement;
4875
+ var cloneTable = clonetbody.parentElement;
4876
+ cloneTable.remove();
4877
+ }
4878
+ var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
4879
+ if (!isNullOrUndefined(falseline)) {
4880
+ this.parent.editModule.taskbarEditModule.removeFalseLine(true);
4881
+ }
4882
+ }
4796
4883
  };
4797
4884
  /**
4798
4885
  *
@@ -5184,13 +5271,27 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5184
5271
  * @private
5185
5272
  */
5186
5273
  GanttChart.prototype.collapsedGanttRow = function (args) {
5274
+ var _this = this;
5187
5275
  if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
5188
5276
  return;
5189
5277
  }
5190
- var record = getValue('data', args);
5278
+ var record;
5279
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
5280
+ record = this.parent.currentViewData.filter(function (item) { return item.ganttProperties[_this.parent.taskFields.id] === args['data'][_this.parent.taskFields.id]; })[0];
5281
+ }
5282
+ else {
5283
+ record = getValue('data', args);
5284
+ }
5191
5285
  if (this.isExpandCollapseFromChart) {
5192
5286
  this.expandCollapseChartRows('collapse', getValue('chartRow', args), record, null);
5193
- this.parent.treeGrid.collapseRow(getValue('gridRow', args), record);
5287
+ var idField_1 = this.parent.taskFields.id;
5288
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
5289
+ var gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField_1] == args['data'][idField_1]; })[0];
5290
+ this.parent.treeGrid.collapseRow(getValue('gridRow', args), gridRec);
5291
+ }
5292
+ else {
5293
+ this.parent.treeGrid.collapseRow(getValue('gridRow', args), record);
5294
+ }
5194
5295
  this.isExpandCollapseFromChart = false;
5195
5296
  }
5196
5297
  else {
@@ -5235,13 +5336,27 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5235
5336
  * @private
5236
5337
  */
5237
5338
  GanttChart.prototype.expandedGanttRow = function (args) {
5339
+ var _this = this;
5238
5340
  if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
5239
5341
  return;
5240
5342
  }
5241
- var record = getValue('data', args);
5343
+ var record;
5344
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
5345
+ record = this.parent.currentViewData.filter(function (item) { return item.ganttProperties.taskId == args['data'][_this.parent.taskFields.id]; })[0];
5346
+ }
5347
+ else {
5348
+ record = getValue('data', args);
5349
+ }
5242
5350
  if (this.isExpandCollapseFromChart) {
5243
5351
  this.expandCollapseChartRows('expand', getValue('chartRow', args), record, null);
5244
- this.parent.treeGrid.expandRow(getValue('gridRow', args), record);
5352
+ var idField_2 = this.parent.taskFields.id;
5353
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
5354
+ var gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField_2] == args['data'][idField_2]; })[0];
5355
+ this.parent.treeGrid.expandRow(getValue('gridRow', args), gridRec);
5356
+ }
5357
+ else {
5358
+ this.parent.treeGrid.expandRow(getValue('gridRow', args), record);
5359
+ }
5245
5360
  this.isExpandCollapseFromChart = false;
5246
5361
  }
5247
5362
  else {
@@ -5340,9 +5455,17 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5340
5455
  this.parent.treeGrid.expandAll();
5341
5456
  }
5342
5457
  else {
5458
+ this.isCollapseAll = true;
5343
5459
  this.parent.treeGrid.collapseAll();
5460
+ if (this.isCollapseAll && !this.parent.allowTaskbarOverlap && this.parent.viewType === 'ResourceView') {
5461
+ var treeGridContentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
5462
+ this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
5463
+ this.parent.contentHeight = treeGridContentHeight;
5464
+ document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
5465
+ }
5344
5466
  }
5345
5467
  this.isExpandAll = false;
5468
+ this.isCollapseAll = false;
5346
5469
  };
5347
5470
  /**
5348
5471
  * Public method to expand particular level of rows.
@@ -5825,7 +5948,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5825
5948
  childElement = element;
5826
5949
  }
5827
5950
  }
5828
- if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span')) {
5951
+ if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span') || element.classList.contains("e-timeline-header-container")) {
5829
5952
  if (focus === 'add') {
5830
5953
  element.setAttribute('tabIndex', '0');
5831
5954
  addClass([element], 'e-active-container');
@@ -5889,7 +6012,13 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5889
6012
  recordIndex = this.parent.flatData.indexOf(record);
5890
6013
  }
5891
6014
  else {
5892
- recordIndex = this.parent.currentViewData.indexOf(record);
6015
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
6016
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
6017
+ recordIndex = this.parent.ids.indexOf(record.ganttProperties.taskId.toString());
6018
+ }
6019
+ else {
6020
+ recordIndex = this.parent.currentViewData.indexOf(record);
6021
+ }
5893
6022
  }
5894
6023
  }
5895
6024
  return recordIndex;
@@ -5976,7 +6105,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
5976
6105
  */
5977
6106
  Timeline.prototype.refreshTimelineByTimeSpan = function () {
5978
6107
  this.validateTimelineProp();
5979
- this.parent.ganttChartModule.chartTimelineContainer.innerHTML = '';
6108
+ if (!this.parent.pdfExportModule || (this.parent.pdfExportModule && !this.parent.pdfExportModule.isPdfExport) || (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && !this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
6109
+ this.parent.ganttChartModule.chartTimelineContainer.innerHTML = '';
6110
+ }
5980
6111
  this.createTimelineSeries();
5981
6112
  };
5982
6113
  /**
@@ -6293,7 +6424,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
6293
6424
  this.customTimelineSettings.topTier.format = this.validateFormat(this.topTier, this.customTimelineSettings.topTier.format);
6294
6425
  this.customTimelineSettings.weekStartDay = this.customTimelineSettings.weekStartDay >= 0 &&
6295
6426
  this.customTimelineSettings.weekStartDay <= 6 ? this.customTimelineSettings.weekStartDay : 0;
6296
- this.checkCurrentZoomingLevel();
6427
+ if (!(this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps &&
6428
+ this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
6429
+ this.checkCurrentZoomingLevel();
6430
+ }
6297
6431
  };
6298
6432
  /**
6299
6433
  * To find the current zooming level of the Gantt control.
@@ -6540,13 +6674,15 @@ var Timeline = /** @__PURE__ @class */ (function () {
6540
6674
  table = createElement('table', { className: timelineHeaderTableContainer, styles: 'display: block;' });
6541
6675
  thead = createElement('thead', { className: timelineHeaderTableBody, styles: 'display:block; border-collapse:collapse' });
6542
6676
  tr = createElement('tr', { innerHTML: this.createTimelineTemplate(tier) });
6543
- td = createElement('th');
6544
- div = createElement('div', { styles: 'width: 20px' });
6545
- td.appendChild(div);
6546
- tr.appendChild(td);
6547
- thead.appendChild(tr);
6548
- table.appendChild(thead);
6549
- this.parent.ganttChartModule.chartTimelineContainer.appendChild(table);
6677
+ if (!this.parent.pdfExportModule || (this.parent.pdfExportModule && !this.parent.pdfExportModule.isPdfExport) || (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && !this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
6678
+ td = createElement('th');
6679
+ div = createElement('div', { styles: 'width: 20px' });
6680
+ td.appendChild(div);
6681
+ tr.appendChild(td);
6682
+ thead.appendChild(tr);
6683
+ table.appendChild(thead);
6684
+ this.parent.ganttChartModule.chartTimelineContainer.appendChild(table);
6685
+ }
6550
6686
  tier = 'bottomTier';
6551
6687
  tr = null;
6552
6688
  }
@@ -7588,6 +7724,11 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7588
7724
  this.wireEvents();
7589
7725
  };
7590
7726
  GanttTreeGrid.prototype.composeProperties = function () {
7727
+ this.parent.treeGrid.hasChildMapping = this.parent.taskFields.hasChildMapping;
7728
+ this.parent.treeGrid.loadChildOnDemand = this.parent.loadChildOnDemand;
7729
+ this.parent.treeGrid['isFromGantt'] = true;
7730
+ this.parent.treeGrid.parentIdMapping = this.parent.taskFields.parentID;
7731
+ this.parent.treeGrid.idMapping = this.parent.taskFields.id;
7591
7732
  this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
7592
7733
  this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
7593
7734
  this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
@@ -7604,8 +7745,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7604
7745
  this.parent.treeGrid.dataSource = { result: this.parent.flatData, count: count };
7605
7746
  }
7606
7747
  else {
7607
- this.parent.treeGrid.hasChildMapping = null;
7608
- this.parent.treeGrid.dataSource = this.parent.flatData;
7748
+ if (!this.parent.treeGrid.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
7749
+ this.parent.autoCalculateDateScheduling = false;
7750
+ this.parent.treeGrid.dataSource = this.parent.dataSource;
7751
+ }
7752
+ else {
7753
+ this.parent.treeGrid.hasChildMapping = null;
7754
+ this.parent.treeGrid.dataSource = this.parent.flatData;
7755
+ }
7609
7756
  }
7610
7757
  this.parent.treeGrid.expandStateMapping = this.parent.taskFields.expandState;
7611
7758
  var isGantt = 'isGantt';
@@ -7766,7 +7913,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7766
7913
  collapsedArgs = this.createExpandCollapseArgs(args, null);
7767
7914
  this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
7768
7915
  }
7769
- if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
7916
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isCollapseAll && collapsedArgs['gridRow']) {
7770
7917
  collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
7771
7918
  this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
7772
7919
  this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
@@ -7796,7 +7943,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7796
7943
  expandedArgs = this.createExpandCollapseArgs(args, null);
7797
7944
  this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
7798
7945
  }
7799
- if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
7946
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isExpandAll && args['row']) {
7800
7947
  args['row'].style.height = this.parent.rowHeight + 'px';
7801
7948
  this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
7802
7949
  this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
@@ -8366,6 +8513,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8366
8513
  if (!isNullOrUndefined(ganttProp)) {
8367
8514
  return this.parent.dataOperation.getDurationString(ganttProp.duration, ganttProp.durationUnit);
8368
8515
  }
8516
+ else if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
8517
+ return this.parent.dataOperation.getDurationString(parseInt(data[this.parent.taskFields.duration]), this.parent.durationUnit);
8518
+ }
8369
8519
  return '';
8370
8520
  }; // eslint-disable-next-line
8371
8521
  GanttTreeGrid.prototype.resourceValueAccessor = function (field, data, column) {
@@ -8402,12 +8552,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8402
8552
  };
8403
8553
  GanttTreeGrid.prototype.updateScrollTop = function (args) {
8404
8554
  var newScrollTop;
8405
- if (getValue('top', args) > (this.parent.flatData.length * this.parent.rowHeight)) {
8406
- newScrollTop = getValue('top', args) - document.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'];
8407
- }
8408
- else {
8409
- newScrollTop = getValue('top', args);
8410
- }
8555
+ newScrollTop = getValue('top', args);
8411
8556
  this.treeGridElement.querySelector('.e-content').scrollTop = newScrollTop;
8412
8557
  this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
8413
8558
  };
@@ -8934,6 +9079,9 @@ var TaskFields = /** @__PURE__ @class */ (function (_super) {
8934
9079
  __decorate$12([
8935
9080
  Property(null)
8936
9081
  ], TaskFields.prototype, "parentID", void 0);
9082
+ __decorate$12([
9083
+ Property(null)
9084
+ ], TaskFields.prototype, "hasChildMapping", void 0);
8937
9085
  __decorate$12([
8938
9086
  Property(null)
8939
9087
  ], TaskFields.prototype, "startDate", void 0);
@@ -9550,16 +9698,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9550
9698
  return splitTasks;
9551
9699
  };
9552
9700
  ChartRows.prototype.getSplitTaskbarLeftResizerNode = function () {
9553
- var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
9701
+ var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
9554
9702
  var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
9555
- ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9703
+ ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
9556
9704
  return template;
9557
9705
  };
9558
9706
  ChartRows.prototype.getSplitTaskbarRightResizerNode = function (segment) {
9559
- var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
9707
+ var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
9560
9708
  var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
9561
9709
  ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (segment.width + rResizerLeft) + 'px;' +
9562
- 'height:' + (this.taskBarHeight) + 'px;"></div>';
9710
+ 'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
9563
9711
  return template;
9564
9712
  };
9565
9713
  ChartRows.prototype.getSplitProgressResizerNode = function (segment) {
@@ -9884,7 +10032,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9884
10032
  }
9885
10033
  else {
9886
10034
  var template = '<div class="' + traceMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;height:' +
9887
- ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);top:' + (this.parent.rowHeight > 40 ? 0 : 1) + 'px;left:' + 1 + 'px;"> </div>';
10035
+ ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);left:' + 1 + 'px;"> </div>';
9888
10036
  milestoneNode = this.createDivElement(template);
9889
10037
  }
9890
10038
  return milestoneNode;
@@ -9914,7 +10062,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9914
10062
  var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
9915
10063
  var template = '<div class="' + baselineMilestoneContainer + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 10)) + 'px;height:' +
9916
10064
  ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 10)) + 'px;position:absolute;transform:rotate(45deg);' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.parent.enableRtl ? (data.ganttProperties.left -
9917
- (this.milestoneHeight / 2) + 3) : (data.ganttProperties.left - (this.milestoneHeight / 2) + 1)) + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + 'margin-top:' + ((-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) + 2) + 'px"> </div>';
10065
+ (this.milestoneHeight / 2) + 3) : (data.ganttProperties.baselineLeft - (this.milestoneHeight / 2) + 1)) + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + 'margin-top:' + ((-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) + 2) + 'px"> </div>';
9918
10066
  return this.createDivElement(template);
9919
10067
  };
9920
10068
  /**
@@ -10262,16 +10410,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10262
10410
  return this.createDivElement(template);
10263
10411
  };
10264
10412
  ChartRows.prototype.childTaskbarLeftResizer = function () {
10265
- var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
10413
+ var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
10266
10414
  var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
10267
- 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
10415
+ 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
10268
10416
  return this.createDivElement(template);
10269
10417
  };
10270
10418
  ChartRows.prototype.childTaskbarRightResizer = function () {
10271
- var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
10419
+ var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
10272
10420
  var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
10273
10421
  'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
10274
- 'height:' + (this.taskBarHeight) + 'px;"></div>';
10422
+ 'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
10275
10423
  return this.createDivElement(template);
10276
10424
  };
10277
10425
  ChartRows.prototype.childTaskbarProgressResizer = function () {
@@ -10285,8 +10433,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10285
10433
  };
10286
10434
  ChartRows.prototype.getLeftPointNode = function () {
10287
10435
  var data = this.templateData;
10288
- var pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
10289
- var mileStoneLeft = -(this.connectorPointWidth + 2);
10436
+ var left = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 12 : 0;
10437
+ var mileStoneLeftValue = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 6 : 3;
10438
+ var pointerLeft = -(3 + this.connectorPointWidth + left);
10439
+ var mileStoneLeft = -(this.connectorPointWidth + 4 + mileStoneLeftValue);
10290
10440
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
10291
10441
  var marginTop;
10292
10442
  if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
@@ -10305,7 +10455,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10305
10455
  };
10306
10456
  ChartRows.prototype.getRightPointNode = function () {
10307
10457
  var data = this.templateData;
10308
- var pointerRight = this.parent.isAdaptive ? 10 : -2;
10458
+ var right = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -12 : 0;
10459
+ var pointerRight = -(3 + right);
10309
10460
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
10310
10461
  var marginTop;
10311
10462
  if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
@@ -10315,7 +10466,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10315
10466
  marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
10316
10467
  }
10317
10468
  var template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
10318
- ((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
10469
+ ((data.ganttProperties.isMilestone) ? ('left:' + ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.milestoneHeight + 5) : this.milestoneHeight - 2) + 'px;margin-top:' +
10319
10470
  pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
10320
10471
  '<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
10321
10472
  '" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
@@ -10488,7 +10639,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10488
10639
  * @private
10489
10640
  */
10490
10641
  ChartRows.prototype.initChartHelperPrivateVariable = function () {
10491
- var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
10642
+ var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 0.7 : 0.62);
10492
10643
  var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
10493
10644
  var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
10494
10645
  this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
@@ -10510,8 +10661,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10510
10661
  this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
10511
10662
  this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
10512
10663
  this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
10513
- this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 10;
10514
- this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2)) - 1;
10664
+ this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
10665
+ this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
10515
10666
  };
10516
10667
  /**
10517
10668
  * Function used to refresh Gantt rows.
@@ -10797,11 +10948,24 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10797
10948
  * @private
10798
10949
  */
10799
10950
  ChartRows.prototype.setAriaRowIndex = function (tempTemplateData, tRow) {
10951
+ var _this = this;
10800
10952
  var dataSource = this.parent.treeGrid.getCurrentViewRecords();
10801
10953
  var visualData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
10802
10954
  getValue('virtualScrollModule.visualData', this.parent.treeGrid) : dataSource;
10803
- var index = visualData.indexOf(tempTemplateData);
10804
- tRow.setAttribute('aria-rowindex', index.toString());
10955
+ var index;
10956
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
10957
+ var gridData = this.parent.treeGrid.grid.contentModule['rows'];
10958
+ var data = gridData.filter(function (x) {
10959
+ if (x['data'][_this.parent.taskFields.id] === tempTemplateData.ganttProperties.taskId) {
10960
+ return x;
10961
+ }
10962
+ })[0];
10963
+ tRow.setAttribute('aria-rowindex', data['index'].toString());
10964
+ }
10965
+ else {
10966
+ index = visualData.indexOf(tempTemplateData);
10967
+ tRow.setAttribute('aria-rowindex', index.toString());
10968
+ }
10805
10969
  };
10806
10970
  /**
10807
10971
  * To trigger query taskbar info event.
@@ -10873,7 +11037,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10873
11037
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor;
10874
11038
  args.taskbarBorderColor = isNullOrUndefined(childTask) ? null : taskbarElement.classList.contains(traceChildTaskBar) ?
10875
11039
  getComputedStyle(taskbarElement).backgroundColor :
10876
- getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderColor;
11040
+ getComputedStyle(taskbarElement.querySelector(classCollections[0])).outlineColor;
10877
11041
  args.progressBarBgColor = isNullOrUndefined(progressTask) ? null :
10878
11042
  taskbarElement.classList.contains(traceChildProgressBar) ?
10879
11043
  getComputedStyle(taskbarElement).backgroundColor :
@@ -10922,7 +11086,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10922
11086
  */
10923
11087
  ChartRows.prototype.updateQueryTaskbarInfoArgs = function (args, rowElement, taskBarElement) {
10924
11088
  var trElement = args.rowElement;
10925
- var taskbarElement = args.taskbarElement;
11089
+ var taskbarElement = this.parent.enableVirtualization ? args.rowElement : args.taskbarElement;
10926
11090
  var classCollections = this.getClassName(args);
10927
11091
  var segmentRowElement;
10928
11092
  if (args.data.ganttProperties.segments && args.data.ganttProperties.segments.length > 0) {
@@ -10943,18 +11107,6 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10943
11107
  }
10944
11108
  }
10945
11109
  else if (taskbarElement) {
10946
- if (taskbarElement && this.parent.enableVirtualization && !args.data.expanded) {
10947
- var childElement = trElement.querySelector('.' + collapseParent);
10948
- if (childElement) {
10949
- for (var i = 0; i < childElement.childNodes.length; i++) {
10950
- var taskbar = childElement.childNodes[i];
10951
- var mainTaskbar = taskbar.querySelector('.' + traceChildTaskBar);
10952
- if (mainTaskbar) {
10953
- mainTaskbar.style.backgroundColor = args.taskbarBgColor;
10954
- }
10955
- }
10956
- }
10957
- }
10958
11110
  if (taskbarElement.querySelector(classCollections[0]) &&
10959
11111
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
10960
11112
  taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
@@ -11177,7 +11329,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
11177
11329
  this.triggerQueryTaskbarInfoByIndex(tr, data);
11178
11330
  }
11179
11331
  var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
11180
- this.parent.treeGrid.grid.setRowData(dataId, data);
11332
+ if (!this.parent.ganttChartModule.isExpandAll && !this.parent.ganttChartModule.isCollapseAll) {
11333
+ this.parent.treeGrid.grid.setRowData(dataId, data);
11334
+ }
11181
11335
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap) {
11182
11336
  this.updateDragDropRecords(selectedItem, tr);
11183
11337
  }
@@ -11201,6 +11355,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
11201
11355
  addClass([cloneElement], 'collpse-parent-border');
11202
11356
  var id = tRow.querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
11203
11357
  var ganttData = this.parent.getRecordByID(id);
11358
+ var mainTaskbar = (cloneElement.querySelector('.e-gantt-child-taskbar'));
11359
+ if (this.parent.queryTaskbarInfo) {
11360
+ this.triggerQueryTaskbarInfoByIndex(mainTaskbar, ganttData);
11361
+ }
11204
11362
  var zIndex = "";
11205
11363
  if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
11206
11364
  zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
@@ -11372,6 +11530,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
11372
11530
  this.parentRecord = [];
11373
11531
  this.parentIds = [];
11374
11532
  this.parentPredecessors = [];
11533
+ this.validatedParentIds = [];
11375
11534
  this.parent = gantt;
11376
11535
  this.dateValidateModule = this.parent.dateValidationModule;
11377
11536
  }
@@ -11489,15 +11648,58 @@ var Dependency = /** @__PURE__ @class */ (function () {
11489
11648
  var predecessor = predecessorValue.toString();
11490
11649
  var collection = [];
11491
11650
  var match;
11492
- var values;
11651
+ var values = [];
11493
11652
  var offsetValue;
11494
11653
  var predecessorText;
11495
11654
  predecessor.split(',').forEach(function (el) {
11496
- values = el.split('+');
11497
- offsetValue = '+';
11498
- if (el.indexOf('-') >= 0) {
11499
- values = el.split('-');
11500
- offsetValue = '-';
11655
+ var isGUId = false;
11656
+ var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
11657
+ var elSplit = el.split('-');
11658
+ var id;
11659
+ if (elSplit.length === 6) {
11660
+ elSplit[4] = elSplit[4] + '-' + elSplit[5];
11661
+ elSplit.pop();
11662
+ }
11663
+ if (elSplit.length === 5 && elSplit[4].length > 12) {
11664
+ id = el.substring(0, 36);
11665
+ if (regex.test(id)) {
11666
+ isGUId = true;
11667
+ }
11668
+ }
11669
+ if (isGUId) {
11670
+ var split = void 0;
11671
+ split = elSplit[4].split('+');
11672
+ var spliceLength = void 0;
11673
+
11674
+ if (split.length === 1) {
11675
+ values[0] = el;
11676
+ }
11677
+ else {
11678
+ spliceLength = split[1].length;
11679
+ values[0] = el.slice(0, -(spliceLength + 1));
11680
+ values[1] = split[1];
11681
+ }
11682
+ offsetValue = '+';
11683
+ if (elSplit[4].indexOf('-') >= 0) {
11684
+ split = elSplit[4].split('-');
11685
+ if (split.length === 1) {
11686
+ values[0] = el;
11687
+ }
11688
+ else {
11689
+ spliceLength = split[1].length;
11690
+ values[0] = el.slice(0, -(spliceLength + 1));
11691
+ values[1] = split[1];
11692
+ }
11693
+ offsetValue = '-';
11694
+ }
11695
+ }
11696
+ else {
11697
+ values = el.split('+');
11698
+ offsetValue = '+';
11699
+ if (el.indexOf('-') >= 0) {
11700
+ values = el.split('-');
11701
+ offsetValue = '-';
11702
+ }
11501
11703
  }
11502
11704
  match = [];
11503
11705
  var ids = _this.parent.viewType === 'ResourceView' ? _this.parent.getTaskIds() : _this.parent.ids;
@@ -11988,13 +12190,31 @@ var Dependency = /** @__PURE__ @class */ (function () {
11988
12190
  */
11989
12191
  Dependency.prototype.createConnectorLinesCollection = function (records) {
11990
12192
  var ganttRecords = records ? records : this.parent.currentViewData;
12193
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
12194
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
12195
+ ganttRecords = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneCurrentViewData'];
12196
+ }
11991
12197
  var recordLength = ganttRecords.length;
11992
12198
  var count;
11993
12199
  var ganttRecord;
11994
12200
  var predecessorsCollection;
11995
- this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
11996
- this.parent.updatedRecords : this.parent.getExpandedRecords(this.parent.updatedRecords);
12201
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
12202
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
12203
+ this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12204
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
12205
+ }
12206
+ else {
12207
+ this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12208
+ this.parent.updatedRecords : this.parent.getExpandedRecords(this.parent.updatedRecords);
12209
+ }
11997
12210
  for (count = 0; count < recordLength; count++) {
12211
+ if (this.parent.editModule && this.parent.editModule.deletedTaskDetails.length > 0) {
12212
+ if (ganttRecords[count].parentItem) {
12213
+ var parentItem = this.parent.getRecordByID(ganttRecords[count].parentItem.taskId.toString());
12214
+ this.parent.setRecordValue('parentItem', this.parent.dataOperation.getCloneParent(parentItem), ganttRecords[count]);
12215
+ }
12216
+ ganttRecords[count].index = count;
12217
+ }
11998
12218
  ganttRecord = ganttRecords[count];
11999
12219
  predecessorsCollection = ganttRecord.ganttProperties.predecessor;
12000
12220
  if (predecessorsCollection) {
@@ -12142,36 +12362,35 @@ var Dependency = /** @__PURE__ @class */ (function () {
12142
12362
  this.validatePredecessor(record, undefined, 'successor');
12143
12363
  }
12144
12364
  }
12145
- if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
12146
- var validUpdate = false;
12147
- var predecessorNames = ganttProp.ganttProperties.predecessorsName ?
12148
- ganttProp.ganttProperties.predecessorsName.split(',').length : ganttProp.ganttProperties.predecessorsName;
12149
- var predecessorLength = ganttProp.ganttProperties.predecessor ?
12150
- ganttProp.ganttProperties.predecessor.length : ganttProp.ganttProperties.predecessor;
12151
- if ((predecessorLength && predecessorNames !== predecessorLength)) {
12152
- validUpdate = true;
12153
- }
12154
- else if (record.hasChildRecords && record.ganttProperties.predecessor.length > 0 && ganttProp.hasChildRecords && !ganttProp.ganttProperties.predecessor) {
12155
- validUpdate = true;
12156
- }
12157
- if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
12158
- if (!ganttProp.hasChildRecords && record.hasChildRecords) {
12365
+ if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
12366
+ this.validatedParentIds.push(record.parentItem.taskId);
12367
+ }
12368
+
12369
+ var validUpdate = true;
12370
+ if (record && record.hasChildRecords && this.validatedParentIds.indexOf(record.ganttProperties.taskId.toString()) !== -1) {
12371
+ validUpdate = false;
12372
+ }
12373
+ if (validUpdate) {
12374
+ if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
12375
+ if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
12376
+ if (!ganttProp.hasChildRecords && record.hasChildRecords) {
12377
+ this.parent.editModule['updateChildItems'](record);
12378
+ this.isValidatedParentTaskID = record.ganttProperties.taskId;
12379
+ }
12380
+ }
12381
+ else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
12382
+ (record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
12159
12383
  this.parent.editModule['updateChildItems'](record);
12160
12384
  this.isValidatedParentTaskID = record.ganttProperties.taskId;
12161
12385
  }
12386
+ if (!ganttProp.hasChildRecords) {
12387
+ this.parent.dataOperation.updateParentItems(record, true);
12388
+ }
12162
12389
  }
12163
- else if ((record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
12164
- (validUpdate && taskBarModule.taskBarEditAction == 'ParentDrag')) {
12390
+ else if (record && record.hasChildRecords && !ganttProp) {
12165
12391
  this.parent.editModule['updateChildItems'](record);
12166
- this.isValidatedParentTaskID = record.ganttProperties.taskId;
12167
- }
12168
- if (!ganttProp.hasChildRecords) {
12169
- this.parent.dataOperation.updateParentItems(record, true);
12170
12392
  }
12171
12393
  }
12172
- else if (record && record.hasChildRecords && !ganttProp) {
12173
- this.parent.editModule['updateChildItems'](record);
12174
- }
12175
12394
  }
12176
12395
  };
12177
12396
  /**
@@ -12207,6 +12426,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12207
12426
  this.transform = '';
12208
12427
  this.connectorLinePath = '';
12209
12428
  this.arrowPath = '';
12429
+ this.taskLineValue = 0;
12210
12430
  this.expandedRecords = [];
12211
12431
  this.parent = ganttObj;
12212
12432
  this.dependencyViewContainer =
@@ -12254,7 +12474,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12254
12474
  };
12255
12475
  ConnectorLine.prototype.getTaskbarMidpoint = function (isMilestone) {
12256
12476
  return Math.floor(isMilestone ?
12257
- (this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) + 1 :
12477
+ (this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) :
12258
12478
  (this.parent.chartRowsModule.taskBarMarginTop + (this.parent.chartRowsModule.taskBarHeight / 2))) + 1;
12259
12479
  };
12260
12480
  /**
@@ -12268,14 +12488,45 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12268
12488
  */
12269
12489
  ConnectorLine.prototype.createConnectorLineObject = function (parentGanttData, childGanttData, predecessor) {
12270
12490
  var connectorObj = {};
12271
- var updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
12272
- this.parent.flatData : this.expandedRecords;
12273
- var parentIndex = updatedRecords.indexOf(parentGanttData);
12274
- var childIndex = updatedRecords.indexOf(childGanttData);
12491
+ var updatedRecords;
12492
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
12493
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
12494
+ updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
12495
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.expandedRecords;
12496
+ }
12497
+ else {
12498
+ updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
12499
+ this.parent.flatData : this.expandedRecords;
12500
+ }
12501
+ var parentIndex;
12502
+ var childIndex;
12503
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
12504
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
12505
+ var parentData = this.parent.flatData.filter(function (data) {
12506
+ return data.ganttProperties.taskId.toString() == parentGanttData.ganttProperties.taskId.toString();
12507
+ })[0];
12508
+ var childData = this.parent.flatData.filter(function (data) {
12509
+ return data.ganttProperties.taskId.toString() == childGanttData.ganttProperties.taskId.toString();
12510
+ })[0];
12511
+ parentIndex = parentData.index;
12512
+ childIndex = childData.index;
12513
+ }
12514
+ else {
12515
+ parentIndex = updatedRecords.indexOf(parentGanttData);
12516
+ childIndex = updatedRecords.indexOf(childGanttData);
12517
+ }
12275
12518
  var parentGanttRecord = parentGanttData.ganttProperties;
12276
12519
  var childGanttRecord = childGanttData.ganttProperties;
12277
- var currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12278
- this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
12520
+ var currentData;
12521
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
12522
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
12523
+ currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12524
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
12525
+ }
12526
+ else {
12527
+ currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12528
+ this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
12529
+ }
12279
12530
  connectorObj.parentIndexInCurrentView = currentData.indexOf(parentGanttData);
12280
12531
  connectorObj.childIndexInCurrentView = currentData.indexOf(childGanttData);
12281
12532
  var isVirtualScroll = this.parent.virtualScrollModule && this.parent.enableVirtualization;
@@ -13014,10 +13265,10 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
13014
13265
  * @private
13015
13266
  */
13016
13267
  ConnectorLine.prototype.getConnectorLineTooltipInnerTd = function (fromTaskName, fromPredecessorText, toTaskName, toPredecessorText) {
13017
- var innerTd = '<tr id="fromPredecessor"><td style="padding: 4px;">' + this.parent.localeObj.getConstant('from') + '</td><td> ';
13268
+ var innerTd = '<tr id="fromPredecessor"><td style="padding: 4px;width: 30px;">' + this.parent.localeObj.getConstant('from') + '</td><td> ';
13018
13269
  innerTd = innerTd + fromTaskName + ' </td><td style="padding: 2px;"> ' + this.parent.localeObj.getConstant(fromPredecessorText) + ' </td> </tr>';
13019
13270
  innerTd = innerTd + '<tr id="toPredecessor"><td style="padding: 4px;">' + this.parent.localeObj.getConstant('to') + '</td><td> ' + toTaskName;
13020
- innerTd = innerTd + ' </td><td style="padding: 2px;"> ' + this.parent.localeObj.getConstant(toPredecessorText) + ' </td></tr></tbody><table>';
13271
+ innerTd = innerTd + ' </td><td style="padding: 2px;width: 30px;"> ' + this.parent.localeObj.getConstant(toPredecessorText) + ' </td></tr></tbody><table>';
13021
13272
  return innerTd;
13022
13273
  };
13023
13274
  /**
@@ -13060,8 +13311,17 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
13060
13311
  if (isNullOrUndefined(id)) {
13061
13312
  return null;
13062
13313
  }
13063
- return this.parent.viewType === 'ResourceView' ? this.parent.flatData[this.parent.getTaskIds().indexOf('T' + id.toString())] :
13064
- this.parent.flatData[this.parent.ids.indexOf(id.toString())];
13314
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
13315
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
13316
+ var a = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'].filter(function (data) {
13317
+ return data.ganttProperties.taskId.toString() === id.toString();
13318
+ })[0];
13319
+ return a;
13320
+ }
13321
+ else {
13322
+ return this.parent.viewType === 'ResourceView' ? this.parent.flatData[this.parent.getTaskIds().indexOf('T' + id.toString())] :
13323
+ this.parent.flatData[this.parent.ids.indexOf(id.toString())];
13324
+ }
13065
13325
  };
13066
13326
  /**
13067
13327
  * Method to remove connector line from DOM
@@ -13181,6 +13441,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
13181
13441
  var leftPane = args.pane[0];
13182
13442
  _this.splitterPreviousPositionGrid = leftPane.scrollWidth + 1 + 'px';
13183
13443
  _this.splitterObject.paneSettings[0].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionGrid);
13444
+ _this.splitterObject.paneSettings[1].size = (_this.parent.ganttWidth - parseInt(_this.splitterPreviousPositionGrid) - 4) + 'px';
13184
13445
  var callBackPromise = new Deferred();
13185
13446
  _this.parent.trigger('splitterResized', args, function (splitterResizedArgs) {
13186
13447
  if (splitterResizedArgs.cancel === true) {
@@ -13390,8 +13651,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13390
13651
  if (taskbarTemplateNode) {
13391
13652
  append(taskbarTemplateNode, tooltipTemplate);
13392
13653
  }
13393
- argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate :
13394
- parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args);
13654
+ argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate : data ?
13655
+ parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args) : "";
13395
13656
  }
13396
13657
  else if (args.target.classList.contains('e-baseline-bar') ||
13397
13658
  args.target.classList.contains('e-baseline-gantt-milestone')) {
@@ -13403,8 +13664,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13403
13664
  if (baseLineTemplateNode) {
13404
13665
  append(baseLineTemplateNode, baselineTemplate);
13405
13666
  }
13406
- argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate :
13407
- parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args);
13667
+ argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate : data ?
13668
+ parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args) : "";
13408
13669
  }
13409
13670
  else if (args.target.classList.contains('e-event-markers')) {
13410
13671
  argsData.content = this.toolTipObj.content = parent.tooltipModule.getTooltipContent('marker', data, parent, args);
@@ -13471,7 +13732,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13471
13732
  // eslint-disable-next-line
13472
13733
  Tooltip$$1.prototype.tooltipCloseHandler = function (args) {
13473
13734
  this.tooltipMouseEvent = null;
13474
- if (!this.parent.isAdaptive) {
13735
+ if (!this.parent.isAdaptive && !isNullOrUndefined(this.currentTarget)) {
13475
13736
  EventHandler.remove(this.currentTarget, 'mousemove', this.mouseMoveHandler);
13476
13737
  }
13477
13738
  this.currentTarget = null;
@@ -14468,6 +14729,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14468
14729
  createSpinner({ target: this.element }, this.createElement);
14469
14730
  this.trigger('load', {});
14470
14731
  this.element.classList.add(root);
14732
+ this.rowHeight = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.rowHeight === 36) ? 46 : this.rowHeight : this.rowHeight;
14471
14733
  if (this.isAdaptive) {
14472
14734
  this.element.classList.add(adaptive);
14473
14735
  }
@@ -14917,8 +15179,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14917
15179
  removeClass(ganttChartElement.querySelectorAll('.e-critical-milestone'), criticalMilestone);
14918
15180
  removeClass(this.element.querySelectorAll('.e-connector-line'), criticalConnectorLineSVG);
14919
15181
  removeClass(this.element.querySelectorAll('.e-connector-line-arrow'), criticalConnectorArrowSVG);
14920
- var innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
14921
- innerDivs.style.outlineColor = "";
14922
15182
  };
14923
15183
  Gantt.prototype.wireEvents = function () {
14924
15184
  if (this.allowKeyboard) {
@@ -14964,10 +15224,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14964
15224
  var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
14965
15225
  this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
14966
15226
  this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
14967
- this.splitterModule.splitterObject.paneSettings[0].size = this.splitterModule['getSpliterPositionInPercentage'](this.splitterModule.splitterPreviousPositionGrid);
14968
- this.splitterModule.splitterObject.paneSettings[1].size = this.splitterModule.splitterPreviousPositionChart;
15227
+ this.splitterModule.splitterObject.paneSettings[1].size = (this.ganttWidth - parseInt(this.splitterModule.splitterPreviousPositionGrid) - 4) + 'px';
15228
+ var proxy_1 = this;
14969
15229
  if (this.timelineModule.isZoomToFit) {
14970
- this.timelineModule.processZoomToFit();
15230
+ setTimeout(function () {
15231
+ proxy_1.timelineModule.processZoomToFit();
15232
+ }, 0);
14971
15233
  }
14972
15234
  }
14973
15235
  };
@@ -15010,7 +15272,39 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15010
15272
  this.treeGridModule.renderTreeGrid();
15011
15273
  };
15012
15274
  Gantt.prototype.updateCurrentViewData = function () {
15275
+ var _this = this;
15013
15276
  this.currentViewData = this.treeGrid.getCurrentViewRecords().slice();
15277
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping && this.currentViewData.length > 0) {
15278
+ this.autoCalculateDateScheduling = false;
15279
+ this.flatData = [];
15280
+ this.dataOperation.taskIds = [];
15281
+ this.ids = [];
15282
+ this.dataOperation.recordIndex = 0;
15283
+ this.dataOperation.dataArray = this.currentViewData;
15284
+ this.dataOperation.cloneDataSource();
15285
+ if (this.predecessorModule && this.taskFields.dependency) {
15286
+ this.predecessorModule['parentIds'] = [];
15287
+ this.predecessorModule['parentRecord'] = [];
15288
+ this.predecessorModule.updatePredecessors();
15289
+ }
15290
+ var gridData = this.treeGrid.grid.contentModule['rows'];
15291
+ var data = gridData.filter(function (x) {
15292
+ if (x['data'][_this.taskFields.id] === _this.flatData[0].ganttProperties.taskId) {
15293
+ return x;
15294
+ }
15295
+ })[0];
15296
+ var index = data['index'];
15297
+ for (var i = 0; i < this.flatData.length; i++) {
15298
+ this.flatData[i].index = index;
15299
+ index++;
15300
+ }
15301
+ this.currentViewData = this.flatData;
15302
+ this.treeGrid.grid.currentViewData = this.flatData;
15303
+ if (!isNullOrUndefined(this.treeGrid['virtualScrollModule'])) {
15304
+ this.treeGrid['virtualScrollModule'].visualData = this.flatData;
15305
+ this.updatedRecords = this.flatData;
15306
+ }
15307
+ }
15014
15308
  };
15015
15309
  /**
15016
15310
  * @param {IGanttData} records -Defines the delete record collections.
@@ -15030,7 +15324,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15030
15324
  * @private
15031
15325
  */
15032
15326
  Gantt.prototype.updateContentHeight = function (args) {
15033
- if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
15327
+ if ((!this.allowTaskbarOverlap && !this.ganttChartModule.isCollapseAll && !this.ganttChartModule.isExpandAll) && this.viewType === 'ResourceView' && !this.isLoad) {
15034
15328
  return;
15035
15329
  }
15036
15330
  else {
@@ -15396,6 +15690,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15396
15690
  else {
15397
15691
  this.getCurrentRecords(args);
15398
15692
  }
15693
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
15694
+ this.updateContentHeight();
15695
+ }
15399
15696
  if (this.enableCriticalPath && this.criticalPathModule) {
15400
15697
  this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
15401
15698
  }
@@ -15411,6 +15708,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15411
15708
  }
15412
15709
  this.initialChartRowElements = this.ganttChartModule.getChartRows();
15413
15710
  this.isLoad = false;
15711
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
15712
+ this.autoCalculateDateScheduling = true;
15713
+ }
15414
15714
  this.trigger('dataBound', args);
15415
15715
  };
15416
15716
  /**
@@ -15675,7 +15975,14 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15675
15975
  if (prop === 'locale') {
15676
15976
  this.isLocaleChanged = true;
15677
15977
  }
15678
- isRefresh = true;
15978
+ if (prop === 'taskFields') {
15979
+ if (!isNullOrUndefined(newProp.taskFields.child)) {
15980
+ return;
15981
+ }
15982
+ }
15983
+ if (prop !== 'allowTaskbarDragAndDrop') {
15984
+ isRefresh = true;
15985
+ }
15679
15986
  break;
15680
15987
  case 'validateManualTasksOnLinking':
15681
15988
  this.validateManualTasksOnLinking = newProp.validateManualTasksOnLinking;
@@ -16355,6 +16662,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16355
16662
  * @returns {Promise<any>} .
16356
16663
  */
16357
16664
  Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
16665
+ if (pdfExportProperties && pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
16666
+ pdfExportProperties.pageOrientation == 'Landscape';
16667
+ }
16358
16668
  return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
16359
16669
  : null;
16360
16670
  };
@@ -16443,14 +16753,17 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16443
16753
  this.isTimelineRoundOff = isTimelineRoundOff;
16444
16754
  this.timelineModule.refreshTimelineByTimeSpan();
16445
16755
  this.dataOperation.reUpdateGanttDataPosition();
16446
- this.timelineModule.updateChartByNewTimeline();
16447
- this.ganttChartModule.chartBodyContent.style.width = formatUnit(this.timelineModule.totalTimelineWidth);
16448
- this.ganttChartModule.updateLastRowBottomWidth();
16449
- if (this.taskFields.dependency) {
16450
- this.ganttChartModule.reRenderConnectorLines();
16451
- }
16452
- if (isFrom !== 'beforeAdd') {
16453
- this.notify('selectRowByIndex', {});
16756
+ if (!this.pdfExportModule || (this.pdfExportModule && !this.pdfExportModule.isPdfExport) || (this.pdfExportModule && this.pdfExportModule.isPdfExport && this.pdfExportModule.helper.exportProps &&
16757
+ this.pdfExportModule.helper.exportProps.fitToWidthSettings && !this.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
16758
+ this.timelineModule.updateChartByNewTimeline();
16759
+ this.ganttChartModule.chartBodyContent.style.width = formatUnit(this.timelineModule.totalTimelineWidth);
16760
+ this.ganttChartModule.updateLastRowBottomWidth();
16761
+ if (this.taskFields.dependency) {
16762
+ this.ganttChartModule.reRenderConnectorLines();
16763
+ }
16764
+ if (isFrom !== 'beforeAdd') {
16765
+ this.notify('selectRowByIndex', {});
16766
+ }
16454
16767
  }
16455
16768
  };
16456
16769
  /**
@@ -17028,8 +17341,15 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
17028
17341
  * @returns {HTMLElement} .
17029
17342
  */
17030
17343
  Gantt.prototype.getRowByID = function (id) {
17344
+ var _this = this;
17031
17345
  var record = this.getRecordByID(id.toString());
17032
- var index = this.updatedRecords.indexOf(record);
17346
+ var index;
17347
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
17348
+ index = this.updatedRecords.map(function (item) { return item[_this.taskFields.id]; }).indexOf(record.ganttProperties.taskId);
17349
+ }
17350
+ else {
17351
+ index = this.updatedRecords.indexOf(record);
17352
+ }
17033
17353
  if (index !== -1) {
17034
17354
  return this.getRowByIndex(index);
17035
17355
  }
@@ -17490,6 +17810,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
17490
17810
  __decorate([
17491
17811
  Property(true)
17492
17812
  ], Gantt.prototype, "enableVirtualMaskRow", void 0);
17813
+ __decorate([
17814
+ Property(false)
17815
+ ], Gantt.prototype, "loadChildOnDemand", void 0);
17493
17816
  __decorate([
17494
17817
  Property(true)
17495
17818
  ], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
@@ -17996,7 +18319,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17996
18319
  args.cancel = true;
17997
18320
  return;
17998
18321
  }
17999
- if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
18322
+ if (data.hasChildRecords && !this.parent.allowParentDependency && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
18000
18323
  data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
18001
18324
  || field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
18002
18325
  if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
@@ -18295,6 +18618,9 @@ var CellEdit = /** @__PURE__ @class */ (function () {
18295
18618
  * @returns {void} .
18296
18619
  */
18297
18620
  CellEdit.prototype.durationEdited = function (args) {
18621
+ if (parseInt(args.data[this.parent.taskFields.duration]) < 0) {
18622
+ args.data[this.parent.taskFields.duration] = 0;
18623
+ }
18298
18624
  var ganttProb = args.data.ganttProperties;
18299
18625
  var durationString = args.data[this.parent.taskFields.duration];
18300
18626
  this.parent.dataOperation.updateDurationValue(durationString, ganttProb);
@@ -18567,6 +18893,7 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
18567
18893
  * @returns {void} .
18568
18894
  */
18569
18895
  EditTooltip.prototype.updateTooltipPosition = function (args) {
18896
+ args.element.style.visibility = 'visible';
18570
18897
  var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
18571
18898
  if (isNullOrUndefined(parentWithZoomStyle)) {
18572
18899
  var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
@@ -18576,8 +18903,8 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
18576
18903
  tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
18577
18904
  }
18578
18905
  args.element.style.left = tooltipPositionX + 'px';
18906
+ args.element.style.visibility = 'visible';
18579
18907
  }
18580
- args.element.style.visibility = 'visible';
18581
18908
  };
18582
18909
  /**
18583
18910
  * To show/hide taskbar edit tooltip.
@@ -18835,13 +19162,10 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18835
19162
  TaskbarEdit.prototype.mouseDownHandler = function (e) {
18836
19163
  if (this.parent.editSettings.allowTaskbarEditing && !this.parent.readOnly) {
18837
19164
  this.canDrag = false;
18838
- if (this.parent.isAdaptive && this.taskBarEditElement) {
19165
+ if (this.taskBarEditElement) {
18839
19166
  var targetElement = this.getElementByPosition(e);
18840
19167
  var element = parentsUntil$1(targetElement, taskBarMainContainer);
18841
- if (element && element.innerHTML === this.taskBarEditElement.innerHTML &&
18842
- !(targetElement.classList.contains(connectorPointLeft) ||
18843
- targetElement.classList.contains(connectorPointRight)) &&
18844
- !this.tapPointOnFocus) {
19168
+ if ((element && element.innerHTML === this.taskBarEditElement.innerHTML || this.taskBarEditElement.classList.contains("e-segmented-taskbar") || this.taskBarEditElement.classList.contains("collpse-parent-border"))) {
18845
19169
  this.updateTaskBarEditElement(e);
18846
19170
  this.canDrag = true;
18847
19171
  e.preventDefault();
@@ -18864,7 +19188,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18864
19188
  }
18865
19189
  return;
18866
19190
  }
18867
- if (this.tapPointOnFocus && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
19191
+ if (this.tapPointOnFocus && !isNullOrUndefined(this.taskBarEditElement) && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
18868
19192
  this.connectorSecondRecord = this.parent.ganttChartModule.getRecordByTaskBar(element);
18869
19193
  this.connectorSecondAction = 'ConnectorPointLeftDrag';
18870
19194
  this.connectorSecondElement = element;
@@ -18875,8 +19199,16 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18875
19199
  this.showHideActivePredecessors(false);
18876
19200
  this.initPublicProp();
18877
19201
  }
18878
- else if (targetElement.classList.contains(connectorPointLeftHover) ||
18879
- targetElement.classList.contains(connectorPointRightHover)) {
19202
+ else if (targetElement.classList.contains(connectorPointLeftHover)) {
19203
+ this.canDrag = false;
19204
+ this.multipleSelectionEnabled();
19205
+ this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
19206
+ this.tapPointOnFocus = true;
19207
+ this.taskBarEditAction = 'ConnectorPointLeftDrag';
19208
+ this.connectorSecondRecord = this.taskBarEditRecord;
19209
+ this.taskBarEditingAction(e, false);
19210
+ }
19211
+ else if (targetElement.classList.contains(connectorPointRightHover)) {
18880
19212
  this.canDrag = false;
18881
19213
  this.multipleSelectionEnabled();
18882
19214
  this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
@@ -18976,7 +19308,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18976
19308
  };
18977
19309
  // eslint-disable-next-line
18978
19310
  TaskbarEdit.prototype.mouseLeaveHandler = function (e) {
18979
- this.dragMouseLeave = true;
19311
+ if (this.taskBarEditAction === "ChildDrag" || this.taskBarEditAction === "ParentDrag" || this.taskBarEditAction === "ProgressResizing" || this.taskBarEditAction === "LeftResizing" || this.taskBarEditAction === "RightResizing") {
19312
+ this.dragMouseLeave = false;
19313
+ }
19314
+ else {
19315
+ this.dragMouseLeave = true;
19316
+ }
18980
19317
  };
18981
19318
  /**
18982
19319
  * To update taskbar edited elements on mouse down action.
@@ -19006,7 +19343,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19006
19343
  }
19007
19344
  }
19008
19345
  if (this.parent.editSettings.allowTaskbarEditing && element) {
19009
- this.showHideTaskBarEditingElements(element, this.taskBarEditElement);
19346
+ this.showHideTaskBarEditingElements(element, this.editElement);
19010
19347
  this.editElement = element;
19011
19348
  this.realTaskbarElement = this.editElement;
19012
19349
  var index = this.editElement.getAttribute('data-segment-index');
@@ -19087,7 +19424,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19087
19424
  else {
19088
19425
  if (this.parent.isAdaptive) {
19089
19426
  if (this.taskBarEditElement) {
19090
- this.showHideTaskBarEditingElements(element, this.taskBarEditElement);
19427
+ this.showHideTaskBarEditingElements(element, this.editElement);
19091
19428
  }
19092
19429
  this.initPublicProp();
19093
19430
  }
@@ -19147,8 +19484,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19147
19484
  && isShowConnectorPoints) {
19148
19485
  var connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
19149
19486
  element : element.parentElement;
19150
- addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
19151
- addClass([connectorElement.querySelector('.' + connectorPointRight)], [connectorPointRightHover]);
19487
+ if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointLeft))) {
19488
+ addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
19489
+ }
19490
+ if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointRight))) {
19491
+ addClass([connectorElement.querySelector('.' + connectorPointRight)], [connectorPointRightHover]);
19492
+ }
19152
19493
  }
19153
19494
  }
19154
19495
  else if (!fadeConnectorLine) {
@@ -19275,7 +19616,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19275
19616
  var item = this.taskBarEditRecord.ganttProperties;
19276
19617
  this.previousItem = this.parent.timelineModule.extendFunction(item, this.previousItemProperty);
19277
19618
  if (this.taskBarEditAction !== 'ConnectorPointLeftDrag' &&
19278
- this.taskBarEditAction !== 'ConnectorPointRightDrag') {
19619
+ this.taskBarEditAction !== 'ConnectorPointRightDrag' &&
19620
+ !(this.parent.viewType == 'ResourceView' && this.taskBarEditAction == 'ParentDrag')) {
19279
19621
  this.editTooltip.showHideTaskbarEditTooltip(true, this.segmentIndex);
19280
19622
  }
19281
19623
  this.taskBarEditElement.setAttribute('aria-grabbed', 'true');
@@ -19313,6 +19655,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19313
19655
  this.dragMouseLeave = false;
19314
19656
  this.isMouseDragCheck();
19315
19657
  if (this.isMouseDragged && this.taskBarEditAction) {
19658
+ event.preventDefault();
19316
19659
  if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
19317
19660
  var currentElement = this.editElement.parentElement;
19318
19661
  currentElement.style.setProperty("position", "absolute");
@@ -19402,9 +19745,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19402
19745
  this.taskBarEditAction === 'ConnectorPointRightDrag') {
19403
19746
  this.updateConnectorLineSecondProperties(e);
19404
19747
  this.triggerDependencyEvent(e);
19405
- if (!this.parent.isAdaptive) {
19406
- this.drawFalseLine();
19407
- }
19748
+ this.drawFalseLine();
19408
19749
  }
19409
19750
  if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
19410
19751
  if (this.dragMoveY > this.mouseMoveY) {
@@ -19416,7 +19757,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19416
19757
  this.currentItemTop = this.currentItemTop + this.mouseMoveY;
19417
19758
  }
19418
19759
  var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
19419
- this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19760
+ if (this.parent.isAdaptive || e.touches) {
19761
+ this.dragMoveY = e.touches[0].pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19762
+ }
19763
+ else {
19764
+ this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19765
+ }
19420
19766
  this.topValue = this.currentItemTop;
19421
19767
  this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
19422
19768
  this.topValue == this.currentItemTop) ? this.topValue :
@@ -19803,6 +20149,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19803
20149
  if (this.segmentIndex === 0) {
19804
20150
  this.parent.setRecordValue('width', item.width - differenceWidth, item, true);
19805
20151
  this.parent.setRecordValue('left', item.left + differenceWidth, item, true);
20152
+ segment.width = segment.width - differenceWidth;
19806
20153
  for (var i = 1; i < item.segments.length; i++) {
19807
20154
  var segment_3 = segments[i];
19808
20155
  segment_3.left = segment_3.left - differenceWidth;
@@ -20230,7 +20577,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20230
20577
  var milliSecondsPerPixel = (24 * 60 * 60 * 1000) / this.parent.perDayWidth;
20231
20578
  pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
20232
20579
  /* To render the milestone in proper date while editing */
20233
- if (isMilestone && !isNullOrUndefined(property.predecessor) && property.predecessor.length > 0) {
20580
+ if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
20234
20581
  pStartDate.setDate(pStartDate.getDate() - 1);
20235
20582
  this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
20236
20583
  pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
@@ -20283,6 +20630,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20283
20630
  var traceParentTaskBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentTaskBar);
20284
20631
  var traceParentProgressBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentProgressBar);
20285
20632
  var traceConnectorPointRight = this.taskBarEditElement.querySelector('.' + rightConnectorPointOuterDiv);
20633
+ var segmentConnectorPointRight = taskBarMainContainer$$1.querySelector('.' + rightConnectorPointOuterDiv);
20286
20634
  var manualParentTaskbar = this.taskBarEditElement;
20287
20635
  var manualTaskbar = this.taskBarEditElement.querySelector('.' + manualParentTaskBar);
20288
20636
  var manualParentRight = this.taskBarEditElement.querySelector('.' + manualParentRightResizer);
@@ -20309,6 +20657,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20309
20657
  }
20310
20658
  taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
20311
20659
  taskBarMainContainer$$1.style.width = (width) + 'px';
20660
+ if (segmentedTaskBarContainer && segmentConnectorPointRight) {
20661
+ segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
20662
+ }
20312
20663
  if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
20313
20664
  (this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
20314
20665
  taskBarMainContainer$$1.style.setProperty('top', (this.topValue) + 'px');
@@ -20425,9 +20776,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20425
20776
  }
20426
20777
  if (segmentedTaskBarContainer) {
20427
20778
  taskBarRightResizer$$1.style.setProperty(position, rightResizer + 'px');
20428
- traceChildProgressBar$$1.style.width = (segment.progressWidth) + 'px';
20779
+ traceChildProgressBar$$1.style.width = (segment.width) + 'px';
20429
20780
  if (!isNullOrUndefined(childProgressResizer$$1)) {
20430
- childProgressResizer$$1.style.setProperty(position, segment.progressWidth - 10 + 'px');
20781
+ childProgressResizer$$1.style.setProperty(position, segment.width - 10 + 'px');
20431
20782
  }
20432
20783
  }
20433
20784
  }
@@ -20497,9 +20848,6 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20497
20848
  this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor && (!this.connectorSecondRecord.hasChildRecords ||
20498
20849
  this.connectorSecondRecord.hasChildRecords && this.parent.allowParentDependency)) {
20499
20850
  this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
20500
- if (this.parent.UpdateOffsetOnTaskbarEdit) {
20501
- this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
20502
- }
20503
20851
  }
20504
20852
  else {
20505
20853
  if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
@@ -20789,6 +21137,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20789
21137
  TaskbarEdit.prototype.updateConnectorLineSecondProperties = function (e) {
20790
21138
  var target = this.getElementByPosition(e);
20791
21139
  var element = parentsUntil$1(target, taskBarMainContainer);
21140
+ var isBigger = document.body.className.includes("e-bigger");
20792
21141
  this.connectorSecondAction = null;
20793
21142
  var scrollTop = 0;
20794
21143
  if (parentsUntil$1(target, connectorPointLeft)) {
@@ -20811,20 +21160,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20811
21160
  if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
20812
21161
  !this.elementOffsetLeft) || !this.parent.enableVirtualization) {
20813
21162
  if (!this.parent.allowParentDependency) {
20814
- this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
21163
+ this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
20815
21164
  this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
20816
21165
  }
20817
21166
  else {
20818
21167
  if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
20819
- this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft;
21168
+ this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
20820
21169
  this.elementOffsetTop = ((this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
20821
21170
  }
20822
21171
  else {
20823
- this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
21172
+ this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
20824
21173
  this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
20825
21174
  }
20826
21175
  }
20827
- this.elementOffsetWidth = this.realTaskbarElement.offsetWidth;
21176
+ this.elementOffsetWidth = this.realTaskbarElement.offsetWidth + ((isBigger) ? 20 : 0);
20828
21177
  this.elementOffsetHeight = this.realTaskbarElement.offsetHeight;
20829
21178
  }
20830
21179
  this.showHideTaskBarEditingElements(element, this.highlightedSecondElement, true);
@@ -20932,18 +21281,16 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20932
21281
  // Get XY coordinates for touch and non-touch device
20933
21282
  TaskbarEdit.prototype.getCoordinate = function (event) {
20934
21283
  var coordinates = {};
20935
- if (this.parent.isAdaptive && event && event.type !== 'click') {
20936
- var e = event;
20937
- if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
20938
- coordinates.pageX = e.changedTouches[0].pageX;
20939
- coordinates.pageY = e.changedTouches[0].pageY;
21284
+ var e = event;
21285
+ coordinates.pageX = e.pageX;
21286
+ coordinates.pageY = e.pageY;
21287
+ if (event && event.type !== 'click') {
21288
+ var e_1 = event;
21289
+ if (e_1.type === 'touchmove' || e_1.type === 'touchstart' || e_1.type === 'touchend') {
21290
+ coordinates.pageX = e_1.changedTouches[0].pageX;
21291
+ coordinates.pageY = e_1.changedTouches[0].pageY;
20940
21292
  }
20941
21293
  }
20942
- else if (event) {
20943
- var e = event;
20944
- coordinates.pageX = e.pageX;
20945
- coordinates.pageY = e.pageY;
20946
- }
20947
21294
  return coordinates;
20948
21295
  };
20949
21296
  // Get current target element by mouse position
@@ -21895,7 +22242,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21895
22242
  if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
21896
22243
  this.updateScheduleFields(dialog, ganttProp, 'endDate');
21897
22244
  }
21898
- if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName) {
22245
+ if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName || ganttProp.duration >= 0) {
21899
22246
  this.updateScheduleFields(dialog, ganttProp, 'duration');
21900
22247
  }
21901
22248
  if (!isNullOrUndefined(tasks.work) && tasks.work !== colName) {
@@ -22053,17 +22400,33 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22053
22400
  var ganttProp = currentData.ganttProperties;
22054
22401
  var taskSettings = ganttObj.taskFields;
22055
22402
  if (taskSettings.duration === columnName) {
22056
- if (!isNullOrUndefined(value) && value !== '') {
22403
+ if (!isNullOrUndefined(value) && value !== '' && parseInt(value) >= 0) {
22057
22404
  ganttObj.dataOperation.updateDurationValue(value, ganttProp);
22058
22405
  this.parent.setRecordValue(taskSettings.duration, value, currentData);
22059
22406
  this.parent.setRecordValue('taskData.' + taskSettings.duration, ganttProp.duration, currentData);
22407
+ this.validateDuration(currentData);
22060
22408
  }
22061
22409
  else {
22062
22410
  if (ganttObj.allowUnscheduledTasks) {
22063
- this.parent.setRecordValue('duration', null, ganttProp, true);
22411
+ if ((ganttProp.startDate && ganttProp.endDate && ganttProp.startDate.getTime() > ganttProp.endDate.getTime()) || value.indexOf('-') !== -1) {
22412
+ this.parent.setRecordValue('duration', 0, ganttProp, true);
22413
+ if (ganttProp.endDate) {
22414
+ this.parent.setRecordValue('startDate', ganttProp.endDate, ganttProp, true);
22415
+ }
22416
+ }
22417
+ else {
22418
+ if (value === "") {
22419
+ this.parent.setRecordValue('duration', null, ganttProp, true);
22420
+ if (ganttProp.endDate) {
22421
+ this.parent.setRecordValue('endDate', null, ganttProp, true);
22422
+ }
22423
+ }
22424
+ else {
22425
+ this.parent.setRecordValue('duration', ganttProp.duration, ganttProp, true);
22426
+ }
22427
+ }
22064
22428
  }
22065
22429
  }
22066
- this.validateDuration(currentData);
22067
22430
  this.parent.editModule.updateResourceRelatedFields(currentData, 'duration');
22068
22431
  }
22069
22432
  if (taskSettings.startDate === columnName) {
@@ -22071,13 +22434,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22071
22434
  var startDate = this.parent.dateValidationModule.getDateFromFormat(value);
22072
22435
  startDate = this.parent.dateValidationModule.checkStartDate(startDate, ganttProp);
22073
22436
  this.parent.setRecordValue('startDate', startDate, ganttProp, true);
22437
+ this.validateStartDate(currentData);
22074
22438
  }
22075
22439
  else {
22076
22440
  if (ganttObj.allowUnscheduledTasks && !(currentData.hasChildRecords)) {
22077
22441
  this.parent.setRecordValue('startDate', null, ganttProp, true);
22442
+ this.parent.setRecordValue('duration', null, ganttProp, true);
22443
+ this.parent.setRecordValue('isMilestone', false, ganttProp, true);
22078
22444
  }
22079
22445
  }
22080
- this.validateStartDate(currentData);
22081
22446
  }
22082
22447
  if (taskSettings.endDate === columnName) {
22083
22448
  if (value !== '') {
@@ -22092,13 +22457,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22092
22457
  if (isNullOrUndefined(ganttProp.startDate) || endDate.getTime() > (ganttProp.startDate).getTime()) {
22093
22458
  this.parent.setRecordValue('endDate', endDate, ganttProp, true);
22094
22459
  }
22460
+ this.validateEndDate(currentData);
22095
22461
  }
22096
22462
  else {
22097
22463
  if (ganttObj.allowUnscheduledTasks) {
22098
22464
  this.parent.setRecordValue('endDate', null, ganttProp, true);
22465
+ this.parent.setRecordValue('duration', null, ganttProp, true);
22466
+ this.parent.setRecordValue('isMilestone', false, ganttProp, true);
22099
22467
  }
22100
22468
  }
22101
- this.validateEndDate(currentData);
22102
22469
  }
22103
22470
  if (taskSettings.work === columnName) {
22104
22471
  if (!isNullOrUndefined(value) && value !== '') {
@@ -22505,7 +22872,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22505
22872
  var eDate = getValue('endDate', selectedItem);
22506
22873
  var duration = getValue('duration', selectedItem);
22507
22874
  var startDate_1 = !isNullOrUndefined(gridData) && gridData.length > 0 ?
22508
- !isNullOrUndefined(taskFields.endDate) ? new Date(getValue('endDate', gridData[0]).getTime()) :
22875
+ (!isNullOrUndefined(taskFields.endDate) && !isNullOrUndefined(gridData[0].endDate)) ? new Date(getValue('endDate', gridData[0]).getTime()) :
22509
22876
  new Date(getValue('startDate', gridData[0]).getTime()) :
22510
22877
  !isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate) &&
22511
22878
  new Date(this.beforeOpenArgs.rowData.ganttProperties.startDate.getTime());
@@ -23186,7 +23553,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
23186
23553
  tasksData[fieldName] = column.edit.read(inputElement, controlObj.value);
23187
23554
  }
23188
23555
  }
23189
- else if (isCustom && column.editType === 'booleanedit') {
23556
+ else if (column.editType === 'booleanedit') {
23190
23557
  if (inputElement instanceof HTMLInputElement && inputElement.checked === true) {
23191
23558
  tasksData[fieldName] = true;
23192
23559
  }
@@ -23520,14 +23887,55 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23520
23887
  ConnectorLineEdit.prototype.idFromPredecessor = function (pre) {
23521
23888
  var preArray = pre.split(',');
23522
23889
  var preIdArray = [];
23523
- var values;
23890
+ var values = [];
23524
23891
  var match = [];
23525
23892
  for (var j = 0; j < preArray.length; j++) {
23526
23893
  var strArray = [];
23527
- values = preArray[j].split('+');
23528
- if (preArray[j].indexOf('-') >= 0) {
23529
- values = preArray[j].split('-');
23530
-
23894
+ var isGUId = false;
23895
+ var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
23896
+ var elSplit = preArray[j].split('-');
23897
+ var id = void 0;
23898
+ if (elSplit.length === 6) {
23899
+ elSplit[4] = elSplit[4] + '-' + elSplit[5];
23900
+ elSplit.pop();
23901
+ }
23902
+ if (elSplit.length === 5 && elSplit[4].length > 12) {
23903
+ id = preArray[j].substring(0, 36);
23904
+ if (regex.test(id)) {
23905
+ isGUId = true;
23906
+ }
23907
+ }
23908
+ if (isGUId) {
23909
+ var split = void 0;
23910
+ split = elSplit[4].split('+');
23911
+ var spliceLength = void 0;
23912
+ if (split.length === 1) {
23913
+ values[0] = preArray[j];
23914
+ }
23915
+ else {
23916
+ spliceLength = split[1].length;
23917
+ values[0] = preArray[j].slice(0, -(spliceLength + 1));
23918
+ values[1] = split[1];
23919
+ }
23920
+ if (elSplit[4].indexOf('-') >= 0) {
23921
+ split = elSplit[4].split('-');
23922
+ if (split.length === 1) {
23923
+ values[0] = preArray[j];
23924
+ }
23925
+ else {
23926
+ spliceLength = split[1].length;
23927
+ values[0] = preArray[j].slice(0, -(spliceLength + 1));
23928
+ values[1] = split[1];
23929
+ }
23930
+
23931
+ }
23932
+ }
23933
+ else {
23934
+ values = preArray[j].split('+');
23935
+ if (preArray[j].indexOf('-') >= 0) {
23936
+ values = preArray[j].split('-');
23937
+
23938
+ }
23531
23939
  }
23532
23940
  if (!isNullOrUndefined(values[0])) {
23533
23941
  var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
@@ -25205,10 +25613,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25205
25613
  this.parent.predecessorModule.isValidatedParentTaskID = '';
25206
25614
  }
25207
25615
  if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
25208
- (args.action === "DrawConnectorLine") || (args.action === "DialogEditing")) {
25616
+ (args.action === "DrawConnectorLine")) {
25209
25617
  this.updateChildItems(ganttRecord);
25210
25618
  }
25211
25619
  this.updateParentItemOnEditing();
25620
+ this.parent.dataOperation.updateParentItems(ganttRecord, true);
25212
25621
  }
25213
25622
  /** Update parent up-to zeroth level */
25214
25623
  if (ganttRecord.parentItem) {
@@ -25221,6 +25630,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25221
25630
  this.updateParentItemOnEditing();
25222
25631
  }
25223
25632
  }
25633
+ if (this.parent.UpdateOffsetOnTaskbarEdit && this.parent.connectorLineEditModule && args.data) {
25634
+ this.parent.connectorLineEditModule['calculateOffset'](args.data);
25635
+ }
25636
+ this.parent.predecessorModule['validatedParentIds'] = [];
25224
25637
  this.initiateSaveAction(args);
25225
25638
  };
25226
25639
  Edit$$1.prototype.updateParentItemOnEditing = function () {
@@ -25240,7 +25653,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25240
25653
  */
25241
25654
  Edit$$1.prototype.updateParentChildRecord = function (data) {
25242
25655
  var ganttRecord = data;
25243
- if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
25656
+ if (ganttRecord.hasChildRecords && this.taskbarMoved && (ganttRecord[this.parent.taskFields.manual] === false || this.parent.taskMode === 'Auto') && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
25244
25657
  this.updateChildItems(ganttRecord);
25245
25658
  }
25246
25659
  if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
@@ -25716,6 +26129,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25716
26129
  this.updateScheduleDatesOnEditing(args);
25717
26130
  }
25718
26131
  }
26132
+ if (this.parent.enableCriticalPath) {
26133
+ var criticalModule = this.parent.criticalPathModule;
26134
+ criticalModule.showCriticalPath(true);
26135
+ criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
26136
+ }
25719
26137
  if (!this.parent.editSettings.allowTaskbarEditing || (this.parent.editSettings.allowTaskbarEditing &&
25720
26138
  !this.taskbarEditModule.dependencyCancel)) {
25721
26139
  eventArgs.requestType = 'save';
@@ -25729,11 +26147,6 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25729
26147
  eventArgs.taskBarEditAction = args.taskBarEditAction;
25730
26148
  }
25731
26149
  this.endEditAction(args);
25732
- if (this.parent.enableCriticalPath) {
25733
- var criticalModule = this.parent.criticalPathModule;
25734
- criticalModule.showCriticalPath(true);
25735
- criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
25736
- }
25737
26150
  this.parent.trigger('actionComplete', eventArgs);
25738
26151
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
25739
26152
  this.parent.hideMaskRow();
@@ -25919,7 +26332,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25919
26332
  if (!this.parent.taskFields.parentID) {
25920
26333
  var deleteRecordIDs = [];
25921
26334
  deleteRecordIDs.push(deletedRow.ganttProperties.rowUniqueID.toString());
25922
- this.parent.editModule.removeFromDataSource(deleteRecordIDs);
26335
+ if (this.parent.viewType === 'ProjectView') {
26336
+ this.parent.editModule.removeFromDataSource(deleteRecordIDs);
26337
+ }
25923
26338
  }
25924
26339
  var flatRecordIndex = this.parent.flatData.indexOf(deletedRow);
25925
26340
  if (gObj.taskFields.parentID) {
@@ -27302,6 +27717,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
27302
27717
  _this.parent.flatData[_this.parent.getTaskIds().indexOf('T' + args.data[tasks.id])] : _this.parent.getRecordByID(args.data[tasks.id]);
27303
27718
  if (!isNullOrUndefined(ganttData)) {
27304
27719
  _this.validateUpdateValues(args.newTaskData, ganttData, true);
27720
+ _this.parent.dateValidationModule.calculateEndDate(ganttData);
27721
+ _this.parent.dataOperation.updateWidthLeft(ganttData);
27722
+ _this.parent.dataOperation.updateParentItems(ganttData);
27305
27723
  }
27306
27724
  if (!isNullOrUndefined(args.data["" + tempTaskID])) {
27307
27725
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
@@ -29063,7 +29481,24 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
29063
29481
  * @returns {Object[]} .
29064
29482
  */
29065
29483
  Selection$$1.prototype.getSelectedRecords = function () {
29066
- return this.parent.treeGrid.getSelectedRecords();
29484
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
29485
+ var selectedRows = [];
29486
+ var selectedIndexes_1 = this.parent.selectionModule.getSelectedRowIndexes();
29487
+ var _loop_1 = function (i) {
29488
+ var rec = this_1.parent.currentViewData.filter(function (data) {
29489
+ return data.index == selectedIndexes_1[i];
29490
+ })[0];
29491
+ selectedRows.push(rec);
29492
+ };
29493
+ var this_1 = this;
29494
+ for (var i = 0; i < selectedIndexes_1.length; i++) {
29495
+ _loop_1(i);
29496
+ }
29497
+ return selectedRows;
29498
+ }
29499
+ else {
29500
+ return this.parent.treeGrid.getSelectedRecords();
29501
+ }
29067
29502
  };
29068
29503
  /**
29069
29504
  * Get the selected records for cell selection.
@@ -29163,19 +29598,19 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
29163
29598
  records = [records];
29164
29599
  }
29165
29600
  var ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
29166
- var _loop_1 = function (i) {
29601
+ var _loop_2 = function (i) {
29167
29602
  var selectedRow = ganttRow.filter(function (e) {
29168
29603
  // eslint-disable-next-line
29169
29604
  return parseInt(e.getAttribute('aria-rowindex'), 0) === records[i];
29170
29605
  })[0];
29171
29606
  if (!isNullOrUndefined(selectedRow)) {
29172
29607
  // eslint-disable-next-line
29173
- this_1.getSelectedRowIndexes().indexOf(records[i]) > -1 ? this_1.addClass(selectedRow) : this_1.removeClass(selectedRow);
29608
+ this_2.getSelectedRowIndexes().indexOf(records[i]) > -1 ? this_2.addClass(selectedRow) : this_2.removeClass(selectedRow);
29174
29609
  }
29175
29610
  };
29176
- var this_1 = this;
29611
+ var this_2 = this;
29177
29612
  for (var i = 0; i < records.length; i++) {
29178
- _loop_1(i);
29613
+ _loop_2(i);
29179
29614
  }
29180
29615
  };
29181
29616
  Selection$$1.prototype.addClass = function (selectedRow) {
@@ -29728,6 +30163,14 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
29728
30163
  var edit = gObj.editSettings;
29729
30164
  var gID = this.id;
29730
30165
  var ind = gObj.selectedRowIndex;
30166
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
30167
+ for (var i = 0; i < gObj.updatedRecords.length; i++) {
30168
+ if (gObj.updatedRecords[i].index === ind) {
30169
+ ind = i;
30170
+ break;
30171
+ }
30172
+ }
30173
+ }
29731
30174
  var previousGanttRecord;
29732
30175
  var isSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length === 1 ||
29733
30176
  gObj.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
@@ -30262,6 +30705,7 @@ var DayMarkers = /** @__PURE__ @class */ (function () {
30262
30705
  /** @hidden */
30263
30706
  var CriticalPath = /** @__PURE__ @class */ (function () {
30264
30707
  function CriticalPath(parent) {
30708
+ this.validatedids = [];
30265
30709
  this.resourceCollectionIds = [];
30266
30710
  this.criticalTasks = [];
30267
30711
  this.parent = parent;
@@ -30288,6 +30732,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30288
30732
  var collectionTaskId = [];
30289
30733
  var fromDataObject = [];
30290
30734
  var criticalPathIds = [];
30735
+ this.criticalTasks = [];
30291
30736
  /* eslint-disable-next-line */
30292
30737
  if (parentRecords[0].ganttProperties.autoEndDate > parentRecords[0].ganttProperties.endDate && !parentRecords[0].ganttProperties.isAutoSchedule) {
30293
30738
  checkEndDate = parentRecords[0].ganttProperties.autoEndDate;
@@ -30484,6 +30929,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30484
30929
  this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, totalRecords, modelIds);
30485
30930
  }
30486
30931
  criticalPathIds = this.finalCriticalPath(collection, taskBeyondEnddate, totalRecords, modelIds, checkEndDate);
30932
+ this.validatedids = [];
30487
30933
  this.criticalPathCollection = criticalPathIds;
30488
30934
  this.detailPredecessorCollection = collection;
30489
30935
  this.predecessorCollectionTaskIds = collectionTaskId;
@@ -30863,73 +31309,69 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30863
31309
  return this.parent.dataOperation.getDuration(startDate, endDate, durationUnit, record.ganttProperties.isAutoSchedule, true);
30864
31310
  }
30865
31311
  };
30866
- /* eslint-disable-next-line */
30867
- CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
30868
- var criticalPathIds = [];
30869
- var index;
30870
- var predecessorFrom;
30871
- var slackindexes = [];
30872
- var indexes = [];
30873
- for (var z = flatRecords.length - 1; z >= 0; z--) {
30874
- if (flatRecords[parseInt(z.toString(), 10)].slack === '0 day') {
30875
- var index1 = flatRecords[parseInt(z.toString(), 10)].index;
30876
- slackindexes.push(index1);
30877
- }
30878
- }
30879
- var num = 0;
30880
- indexes.push(slackindexes[parseInt(num.toString(), 10)]);
30881
- for (var j = 0; j < indexes.length; j++) {
30882
- var i = flatRecords[indexes[parseInt(j.toString(), 10)]].ganttProperties.predecessor;
30883
- if (!isNullOrUndefined(i)) {
30884
- for (var f = i.length - 1; f >= 0; f--) {
30885
- if (this.parent.viewType === 'ProjectView') {
30886
- var q = modelRecordIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
30887
- for (var k = 0; k < indexes.length; k++) {
30888
- var item = indexes[parseInt(j.toString(), 10)];
30889
- if (item !== q) {
30890
- indexes.push(q);
30891
- }
30892
- break;
30893
- }
31312
+ CriticalPath.prototype.updateCriticalTasks = function (record, criticalPathIds) {
31313
+ for (var i = 0; i < record.ganttProperties.predecessor.length; i++) {
31314
+ var fromRecord = void 0;
31315
+ if (this.parent.viewType === 'ProjectView') {
31316
+ fromRecord = this.parent.getRecordByID(record.ganttProperties.predecessor[i].from);
31317
+ }
31318
+ else {
31319
+ var resourceIndex = this.resourceCollectionIds.indexOf(record.ganttProperties.predecessor[i].from.toString());
31320
+ fromRecord = this.parent.flatData[resourceIndex];
31321
+ }
31322
+ var durationDiff = void 0;
31323
+ if (record.ganttProperties.endDate.getTime() >= this.maxEndDate.getTime()) {
31324
+ record.ganttProperties.slack = record.slack = 0 + ' ' + record.ganttProperties.durationUnit;
31325
+ if (record.ganttProperties.progress < 100) {
31326
+ record.isCritical = true;
31327
+ record.ganttProperties.isCritical = true;
31328
+ if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
31329
+ criticalPathIds.push(parseInt(record.ganttProperties.taskId));
30894
31330
  }
30895
- else {
30896
- var q = this.resourceCollectionIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
30897
- for (var k = 0; k < indexes.length; k++) {
30898
- var item = indexes[parseInt(j.toString(), 10)];
30899
- if (item !== q) {
30900
- indexes.push(q);
30901
- }
30902
- break;
30903
- }
31331
+ }
31332
+ }
31333
+ if (fromRecord) {
31334
+ if (record.ganttProperties.predecessor[i].type == 'FS') {
31335
+ durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31336
+ }
31337
+ else if (record.ganttProperties.predecessor[i].type == 'SS') {
31338
+ durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.startDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31339
+ }
31340
+ else if (record.ganttProperties.predecessor[i].type == 'FF') {
31341
+ durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.endDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31342
+ }
31343
+ else if (record.ganttProperties.predecessor[i].type == 'SF') {
31344
+ durationDiff = this.parent.dataOperation.getDuration(record.ganttProperties.endDate, fromRecord.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31345
+ }
31346
+ if (durationDiff == 0 && this.validatedids.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.taskId != record.ganttProperties.taskId) {
31347
+ fromRecord.ganttProperties.slack = record.ganttProperties.slack;
31348
+ fromRecord.slack = record.slack;
31349
+ fromRecord.isCritical = record.ganttProperties.isCritical;
31350
+ fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
31351
+ if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
31352
+ this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
31353
+ criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
31354
+ }
31355
+ if (fromRecord.ganttProperties.predecessorsName) {
31356
+ this.updateCriticalTasks(fromRecord, criticalPathIds);
30904
31357
  }
30905
31358
  }
30906
31359
  }
30907
31360
  }
30908
- for (var x = 0; x < indexes.length; x++) {
31361
+ };
31362
+ /* eslint-disable-next-line */
31363
+ CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
31364
+ var criticalPathIds = [];
31365
+ var index;
31366
+ var predecessorFrom;
31367
+ for (var x = collection.length - 1; x >= 0; x--) {
30909
31368
  if (this.parent.viewType === 'ProjectView') {
30910
- index = modelRecordIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['ganttProperties']['taskId'].toString());
31369
+ index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
30911
31370
  }
30912
31371
  else {
30913
- index = this.resourceCollectionIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['TaskID'].toString());
31372
+ index = this.resourceCollectionIds.indexOf(collection[x]['taskid'].toString());
30914
31373
  }
30915
31374
  var predecessorLength = flatRecords[index].ganttProperties.predecessor;
30916
- if (isNullOrUndefined(predecessorLength)) {
30917
- if (taskBeyondEnddate.length > 0) {
30918
- for (var i = 0; i < taskBeyondEnddate.length; i++) {
30919
- if (this.parent.viewType === 'ProjectView') {
30920
- index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
30921
- }
30922
- else {
30923
- index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
30924
- }
30925
- if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
30926
- this.criticalTasks.push(flatRecords[index]);
30927
- criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
30928
- }
30929
- }
30930
- }
30931
- break;
30932
- }
30933
31375
  var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
30934
31376
  for (var i = predecessorLength.length - 1; i >= 0; i--) {
30935
31377
  var toID = void 0;
@@ -30942,6 +31384,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30942
31384
  var dateDifference = void 0;
30943
31385
  var currentData = flatRecords[index].ganttProperties;
30944
31386
  if (predecessorLength[i].type === 'FS') {
31387
+ /* eslint-disable-next-line */
30945
31388
  if (predecessorLength[i].to != currentData.taskId.toString() || this.parent.viewType === 'ResourceView') {
30946
31389
  /* eslint-disable-next-line */
30947
31390
  dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
@@ -30993,8 +31436,28 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30993
31436
  flatRecords[index].isCritical = true;
30994
31437
  flatRecords[index].ganttProperties.isCritical = true;
30995
31438
  this.criticalTasks.push(flatRecords[index]);
30996
- var num_1 = flatRecords[parseInt(index.toString(), 10)]['ganttProperties']['taskId'];
30997
- criticalPathIds.push(num_1);
31439
+ if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
31440
+ criticalPathIds.push(collection[x]['taskid']);
31441
+ }
31442
+ }
31443
+ }
31444
+ if (flatRecords[index].ganttProperties.predecessor.length > 0) {
31445
+ this.updateCriticalTasks(flatRecords[index], criticalPathIds);
31446
+ }
31447
+ }
31448
+ if (taskBeyondEnddate.length > 0) {
31449
+ for (var i = 0; i < taskBeyondEnddate.length; i++) {
31450
+ if (this.parent.viewType === 'ProjectView') {
31451
+ index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
31452
+ }
31453
+ else {
31454
+ index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
31455
+ }
31456
+ if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
31457
+ this.criticalTasks.push(flatRecords[index]);
31458
+ if (criticalPathIds.indexOf(taskBeyondEnddate[i]) === -1) {
31459
+ criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
31460
+ }
30998
31461
  }
30999
31462
  }
31000
31463
  }
@@ -31039,7 +31502,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31039
31502
  }
31040
31503
  }
31041
31504
  /* eslint-disable-next-line */
31042
- if (this_2.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
31505
+ if (this_2.parent.allowUnscheduledTasks && criticalData && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
31043
31506
  taskClass = criticalUnscheduledTask;
31044
31507
  }
31045
31508
  else {
@@ -31052,8 +31515,6 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31052
31515
  }
31053
31516
  if (element.getElementsByClassName('e-gantt-child-taskbar-inner-div').length > 0) {
31054
31517
  addClass(element.querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
31055
- var innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
31056
- innerDivs.style.outlineColor = "";
31057
31518
  }
31058
31519
  if (element.getElementsByClassName('e-gantt-child-progressbar-inner-div').length > 0) {
31059
31520
  addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
@@ -32102,8 +32563,16 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
32102
32563
  var dragElement = this.parent.element.querySelector('.e-ganttdrag');
32103
32564
  var ganttTop = this.parent.element.getClientRects()[0].top;
32104
32565
  var ganttLeft = this.parent.element.getClientRects()[0].left;
32105
- var left = getValue('event', args.originalEvent).clientX - ganttLeft;
32106
- var top = getValue('event', args.originalEvent).clientY - ganttTop;
32566
+ var left;
32567
+ var top;
32568
+ if (this.parent.isAdaptive) {
32569
+ left = args.originalEvent.event.touches[0].clientX - ganttLeft;
32570
+ top = args.originalEvent.event.touches[0].clientY - ganttTop;
32571
+ }
32572
+ else {
32573
+ left = getValue('event', args.originalEvent).clientX - ganttLeft;
32574
+ top = getValue('event', args.originalEvent).clientY - ganttTop;
32575
+ }
32107
32576
  dragElement.style.left = left + 20 + 'px';
32108
32577
  dragElement.style.top = top + 20 + 'px';
32109
32578
  this.parent.trigger('rowDrag', args);
@@ -32984,6 +33453,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
32984
33453
  ganttStyle.taskbar.progressColor = new PdfColor(33, 82, 125);
32985
33454
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
32986
33455
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33456
+ ganttStyle.taskbar.baselineColor = new PdfColor(240, 173, 78);
33457
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(240, 173, 78);
32987
33458
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
32988
33459
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
32989
33460
  ganttStyle.taskbar.parentTaskColor = new PdfColor(119, 119, 119);
@@ -33004,6 +33475,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
33004
33475
  ganttStyle.taskbar.progressColor = new PdfColor(0, 86, 179);
33005
33476
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
33006
33477
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33478
+ ganttStyle.taskbar.baselineColor = new PdfColor(255, 193, 7);
33479
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(255, 193, 7);
33007
33480
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
33008
33481
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
33009
33482
  ganttStyle.taskbar.parentTaskColor = new PdfColor(108, 117, 125);
@@ -33026,6 +33499,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
33026
33499
  ganttStyle.taskbar.progressColor = new PdfColor(0, 91, 163);
33027
33500
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
33028
33501
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33502
+ ganttStyle.taskbar.baselineColor = new PdfColor(216, 59, 1);
33503
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(216, 59, 1);
33029
33504
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
33030
33505
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
33031
33506
  ganttStyle.taskbar.parentTaskColor = new PdfColor(118, 118, 118);
@@ -33046,6 +33521,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
33046
33521
  ganttStyle.taskbar.progressColor = new PdfColor(63, 81, 181);
33047
33522
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
33048
33523
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33524
+ ganttStyle.taskbar.baselineColor = new PdfColor(193, 87, 0);
33525
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(193, 87, 0);
33049
33526
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
33050
33527
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
33051
33528
  ganttStyle.taskbar.parentTaskColor = new PdfColor(132, 132, 132);
@@ -33615,7 +34092,7 @@ var PdfTreeGridLayouter = /** @__PURE__ @class */ (function (_super) {
33615
34092
  var startColumn = 0;
33616
34093
  var endColumn = 0;
33617
34094
  var cellWidths = 0;
33618
- var availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;
34095
+ var availableWidth = pointToPixel(this.currentGraphics.clientSize.width) - this.currentBounds.x;
33619
34096
  for (var i = 0; i < this.treegrid.columns.count; i++) {
33620
34097
  cellWidths += this.treegrid.columns.getColumn(i).width;
33621
34098
  if (cellWidths >= availableWidth) {
@@ -33843,6 +34320,7 @@ var PdfTreeGridLayouter = /** @__PURE__ @class */ (function (_super) {
33843
34320
  var size = new SizeF(column.width, height);
33844
34321
  if (cell.columnSpan > 1) {
33845
34322
  size = new SizeF(cell.width, height);
34323
+ i += cell.columnSpan;
33846
34324
  }
33847
34325
  if (!this.checkIfDefaultFormat(column.format) && this.checkIfDefaultFormat(cell.style.format)) {
33848
34326
  cell.style.format = column.format;
@@ -34229,12 +34707,15 @@ var PdfTreeGrid = /** @__PURE__ @class */ (function (_super) {
34229
34707
  colSpan = cell.columnSpan;
34230
34708
  currentCellIndex = j;
34231
34709
  cell.isCellMergeStart = true;
34710
+ var totalColumnWidth = this.columns.columns[currentCellIndex].width;
34232
34711
  //Set Column merges.
34233
34712
  while (colSpan > 1) {
34234
34713
  currentCellIndex++;
34235
34714
  row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
34236
34715
  colSpan--;
34716
+ totalColumnWidth += this.columns.columns[currentCellIndex].width;
34237
34717
  }
34718
+ cell.width = totalColumnWidth;
34238
34719
  }
34239
34720
  else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
34240
34721
  rowSpan = cell.rowSpan;
@@ -34299,15 +34780,12 @@ var PdfTreeGrid = /** @__PURE__ @class */ (function (_super) {
34299
34780
  colSpan = cell.columnSpan;
34300
34781
  currentCellIndex = j;
34301
34782
  cell.isCellMergeStart = true;
34302
- var totalColumnWidth = this.columns.columns[currentCellIndex].width;
34303
34783
  //set Column merges.
34304
34784
  while (colSpan > 1) {
34305
34785
  currentCellIndex++;
34306
34786
  row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
34307
34787
  colSpan--;
34308
- totalColumnWidth += this.columns.columns[currentCellIndex].width;
34309
34788
  }
34310
- cell.width = totalColumnWidth;
34311
34789
  }
34312
34790
  else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
34313
34791
  rowSpan = cell.rowSpan;
@@ -34519,11 +34997,11 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
34519
34997
  if (this.finishedDrawingCell) {
34520
34998
  temp = (this.remainingString === '') ? this.remainingString : this.value;
34521
34999
  /* eslint-disable-next-line */
34522
- graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
35000
+ graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
34523
35001
  }
34524
35002
  else {
34525
35003
  /* eslint-disable-next-line */
34526
- graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, this.style.format);
35004
+ graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, this.style.format);
34527
35005
  }
34528
35006
  result = graphics.stringLayoutResult;
34529
35007
  }
@@ -35250,8 +35728,101 @@ var PdfTreeGridColumnCollection = /** @__PURE__ @class */ (function () {
35250
35728
  */
35251
35729
  var ExportHelper = /** @__PURE__ @class */ (function () {
35252
35730
  function ExportHelper(parent) {
35731
+ this.totalColumnWidth = 0;
35732
+ this.beforeSinglePageExport = {};
35733
+ this.baselineHeight = 8;
35253
35734
  this.parent = parent;
35254
35735
  }
35736
+ ExportHelper.prototype.processToFit = function () {
35737
+ this.beforeSinglePageExport['zoomingProjectStartDate'] = this.parent.zoomingProjectStartDate;
35738
+ this.beforeSinglePageExport['zoomingProjectEndDate'] = this.parent.zoomingProjectEndDate;
35739
+ this.beforeSinglePageExport['cloneProjectStartDate'] = this.parent.cloneProjectStartDate;
35740
+ this.beforeSinglePageExport['cloneProjectEndDate'] = this.parent.cloneProjectEndDate;
35741
+ this.beforeSinglePageExport['customTimelineSettings'] = extend({}, this.parent.timelineModule.customTimelineSettings, null, true);
35742
+ this.beforeSinglePageExport['isTimelineRoundOff'] = this.parent.isTimelineRoundOff;
35743
+ this.beforeSinglePageExport['topTier'] = this.parent.timelineModule.topTier;
35744
+ this.beforeSinglePageExport['topTierCellWidth'] = this.parent.timelineModule.topTierCellWidth;
35745
+ this.beforeSinglePageExport['topTierCollection'] = this.parent.timelineModule.topTierCollection;
35746
+ this.beforeSinglePageExport['bottomTier'] = this.parent.timelineModule.bottomTier;
35747
+ this.beforeSinglePageExport['bottomTierCellWidth'] = this.parent.timelineModule.bottomTierCellWidth;
35748
+ this.beforeSinglePageExport['bottomTierCollection'] = this.parent.timelineModule.bottomTierCollection;
35749
+ this.beforeSinglePageExport['totalTimelineWidth'] = this.parent.timelineModule.totalTimelineWidth;
35750
+ this.beforeSinglePageExport['timelineStartDate'] = this.parent.timelineModule.timelineStartDate;
35751
+ this.beforeSinglePageExport['timelineEndDate'] = this.parent.timelineModule.timelineEndDate;
35752
+ this.beforeSinglePageExport['timelineRoundOffEndDate'] = this.parent.timelineModule.timelineRoundOffEndDate;
35753
+ this.beforeSinglePageExport['perDayWidth'] = this.parent.perDayWidth;
35754
+ this.beforeSinglePageExport['updatedConnectorLineCollection'] = extend([], this.parent.updatedConnectorLineCollection, null, true);
35755
+ this.parent.timelineModule.isZoomToFit = true;
35756
+ this.parent.timelineModule.isZooming = false;
35757
+ if (!this.parent.zoomingProjectStartDate) {
35758
+ this.parent.zoomingProjectStartDate = this.parent.cloneProjectStartDate;
35759
+ this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
35760
+ }
35761
+ if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
35762
+ this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
35763
+ }
35764
+ this.parent.dataOperation.calculateProjectDates();
35765
+ var timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
35766
+ var totalDays = (timeDifference / (1000 * 3600 * 24));
35767
+ var chartsideWidth;
35768
+ var gridWidth;
35769
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
35770
+ gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
35771
+ }
35772
+ if (this.exportProps.fitToWidthSettings.chartWidth) {
35773
+ chartsideWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
35774
+ }
35775
+ else {
35776
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
35777
+ chartsideWidth = 100 - gridWidth;
35778
+ }
35779
+ else {
35780
+ chartsideWidth = 70;
35781
+ }
35782
+ }
35783
+ var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * chartsideWidth) / 100;
35784
+ var chartWidth = pdfwidth;
35785
+ var perDayWidth = chartWidth / totalDays;
35786
+ var zoomingLevel;
35787
+ var firstValue;
35788
+ var secondValue;
35789
+ var zoomingCollections = this.parent.zoomingLevels.slice();
35790
+ var sortedCollectons = zoomingCollections.sort(function (a, b) {
35791
+ return (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1);
35792
+ });
35793
+ if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
35794
+ return;
35795
+ }
35796
+ for (var i = 0; i < sortedCollectons.length; i++) {
35797
+ firstValue = sortedCollectons[i];
35798
+ if (i === sortedCollectons.length - 1) {
35799
+ zoomingLevel = sortedCollectons[i];
35800
+ break;
35801
+ }
35802
+ else {
35803
+ secondValue = sortedCollectons[i + 1];
35804
+ }
35805
+ if (perDayWidth >= firstValue.perDayWidth) {
35806
+ zoomingLevel = sortedCollectons[i];
35807
+ break;
35808
+ }
35809
+ if (perDayWidth < firstValue.perDayWidth && perDayWidth > secondValue.perDayWidth) {
35810
+ zoomingLevel = sortedCollectons[i + 1];
35811
+ break;
35812
+ }
35813
+ }
35814
+ var newTimeline = extend({}, {}, zoomingLevel, true);
35815
+ this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
35816
+ this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
35817
+ var numberOfCells = this.parent.timelineModule['calculateNumberOfTimelineCells'](newTimeline);
35818
+ var scrollHeight = this.parent.pdfExportModule['pdfPageDimensions'].height; //17 is horizontal scrollbar width
35819
+ var contentHeight = this.parent.pdfExportModule['pdfPageDimensions'].height;
35820
+ var emptySpace = contentHeight <= scrollHeight ? 0 : 17;
35821
+ newTimeline.timelineUnitSize = Math.abs((chartWidth - emptySpace)) / numberOfCells;
35822
+ this.parent.timelineModule['changeTimelineSettings'](newTimeline);
35823
+ this.parent.timelineModule.isZoomToFit = false;
35824
+ this.parent.timelineModule.isZooming = false;
35825
+ };
35255
35826
  /**
35256
35827
  * @param {IGanttData[]} data .
35257
35828
  * @param {PdfGantt} gantt .
@@ -35273,11 +35844,16 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35273
35844
  this.gantt.style.cellPadding.right = 0;
35274
35845
  this.ganttStyle = this.gantt.ganttStyle;
35275
35846
  this.gantt.borderColor = this.ganttStyle.chartGridLineColor;
35847
+ this.parent.pdfExportModule.isPdfExport = true;
35848
+ if (this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
35849
+ this.processToFit();
35850
+ }
35276
35851
  this.processHeaderContent();
35277
35852
  this.processGanttContent();
35278
35853
  this.processTimeline();
35279
35854
  this.processTaskbar();
35280
35855
  this.processPredecessor();
35856
+ this.parent.pdfExportModule.isPdfExport = false;
35281
35857
  };
35282
35858
  ExportHelper.prototype.processHeaderContent = function () {
35283
35859
  var _this = this;
@@ -35333,7 +35909,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35333
35909
  this.renderEmptyGantt();
35334
35910
  }
35335
35911
  else {
35336
- this.flatData.forEach(function (data) {
35912
+ var flatData = void 0;
35913
+ flatData = this.flatData;
35914
+ flatData.forEach(function (data) {
35337
35915
  _this.row = _this.gantt.rows.addRow();
35338
35916
  if (data.hasChildRecords) {
35339
35917
  _this.gantt.rows.getRow(_this.rowIndex).isParentRow = true;
@@ -35342,6 +35920,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35342
35920
  else {
35343
35921
  _this.processRecordRow(data);
35344
35922
  }
35923
+ if (_this.exportProps.fitToWidthSettings && _this.exportProps.fitToWidthSettings.isFitToWidth) {
35924
+ _this.row.height = 33.33;
35925
+ }
35345
35926
  _this.rowIndex++;
35346
35927
  });
35347
35928
  }
@@ -35393,7 +35974,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35393
35974
  else {
35394
35975
  predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
35395
35976
  }
35396
- predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
35977
+ _this.ganttStyle.connectorLineColor = predecessor.connectorLineColor;
35397
35978
  _this.gantt.predecessorCollection.push(predecessor);
35398
35979
  });
35399
35980
  this.parent.pdfExportModule.isPdfExport = false;
@@ -35458,7 +36039,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35458
36039
  */
35459
36040
  ExportHelper.prototype.processTaskbar = function () {
35460
36041
  var _this = this;
35461
- this.flatData.forEach(function (data) {
36042
+ var flatData;
36043
+ flatData = this.flatData;
36044
+ flatData.forEach(function (data) {
35462
36045
  var taskbar = _this.gantt.taskbar.add();
35463
36046
  var ganttProp = data.ganttProperties;
35464
36047
  taskbar.left = ganttProp.left;
@@ -35489,7 +36072,22 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35489
36072
  taskbar.startDate = ganttProp.startDate;
35490
36073
  taskbar.endDate = ganttProp.endDate;
35491
36074
  taskbar.height = _this.parent.chartRowsModule.taskBarHeight;
36075
+ if (_this.parent.renderBaseline) {
36076
+ var height = void 0;
36077
+ if ((taskbar.height + _this.baselineHeight) <= _this.parent.rowHeight) {
36078
+ height = taskbar.height;
36079
+ }
36080
+ else {
36081
+ height = taskbar.height - (_this.baselineHeight + 1);
36082
+ }
36083
+ taskbar.height = height;
36084
+ }
36085
+ taskbar.baselineTop = _this.parent.chartRowsModule.baselineTop;
35492
36086
  taskbar.isMilestone = ganttProp.isMilestone;
36087
+ taskbar.baselineStartDate = ganttProp.baselineStartDate;
36088
+ taskbar.baselineEndDate = ganttProp.baselineEndDate;
36089
+ taskbar.baselineLeft = ganttProp.baselineLeft;
36090
+ taskbar.baselineWidth = ganttProp.baselineWidth;
35493
36091
  taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.milestoneColor);
35494
36092
  taskbar.isParentTask = data.hasChildRecords;
35495
36093
  if (ganttProp.isMilestone) {
@@ -35520,6 +36118,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35520
36118
  taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
35521
36119
  taskbar.progressColor = new PdfColor(_this.ganttStyle.taskbar.criticalProgressColor);
35522
36120
  taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskBorderColor);
36121
+ taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
35523
36122
  }
35524
36123
  else {
35525
36124
  taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.taskColor);
@@ -35527,6 +36126,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35527
36126
  taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.taskBorderColor);
35528
36127
  }
35529
36128
  }
36129
+ taskbar.baselineColor = new PdfColor(_this.ganttStyle.taskbar.baselineColor);
36130
+ taskbar.baselineBorderColor = new PdfColor(_this.ganttStyle.taskbar.baselineBorderColor);
35530
36131
  taskbar.gridLineColor = new PdfColor(_this.ganttStyle.chartGridLineColor);
35531
36132
  _this.gantt.taskbarCollection.push(taskbar);
35532
36133
  var taskStyle = {};
@@ -35535,6 +36136,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35535
36136
  taskStyle.taskBorderColor = taskbar.taskBorderColor;
35536
36137
  taskStyle.progressColor = taskbar.progressColor;
35537
36138
  taskStyle.milestoneColor = taskbar.milestoneColor;
36139
+ taskStyle.baselineColor = taskbar.baselineColor;
36140
+ taskStyle.baselineBorderColor = taskbar.baselineBorderColor;
35538
36141
  var args = {
35539
36142
  taskbar: taskStyle,
35540
36143
  data: data
@@ -35546,6 +36149,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35546
36149
  taskbar.taskBorderColor = args.taskbar.taskBorderColor;
35547
36150
  taskbar.progressColor = args.taskbar.progressColor;
35548
36151
  taskbar.milestoneColor = args.taskbar.milestoneColor;
36152
+ taskbar.baselineColor = args.taskbar.baselineColor;
36153
+ taskbar.baselineBorderColor = args.taskbar.baselineBorderColor;
35549
36154
  }
35550
36155
  });
35551
36156
  };
@@ -35693,6 +36298,26 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35693
36298
  var widths = [];
35694
36299
  var treeColumnIndex = 0;
35695
36300
  var tWidth = (this.pdfDoc.pageSettings.width - 82);
36301
+ if (this.exportProps && this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
36302
+ var gridWidth = void 0;
36303
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
36304
+ gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
36305
+ }
36306
+ else {
36307
+ if (this.exportProps.fitToWidthSettings.chartWidth) {
36308
+ var chartWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
36309
+ gridWidth = 100 - chartWidth;
36310
+ }
36311
+ else {
36312
+ gridWidth = 30;
36313
+ }
36314
+ }
36315
+ var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * gridWidth) / 100;
36316
+ var perColumnWidth = pdfwidth / this.gantt.columns.columns.length;
36317
+ for (var i = 0; i < this.gantt.columns.columns.length; i++) {
36318
+ this.gantt.columns.getColumn(i).width = perColumnWidth;
36319
+ }
36320
+ }
35696
36321
  if (this.totalColumnWidth > (this.pdfDoc.pageSettings.width - 82)) {
35697
36322
  this.gantt.style.allowHorizontalOverflow = true;
35698
36323
  }
@@ -35820,6 +36445,8 @@ var __assign$3 = (undefined && undefined.__assign) || function () {
35820
36445
  */
35821
36446
  var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35822
36447
  function PdfGanttTaskbarCollection(parent) {
36448
+ /** Defines the task baselineHeight . */
36449
+ this.baselineHeight = 8;
35823
36450
  /**
35824
36451
  * @private
35825
36452
  */
@@ -35866,6 +36493,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35866
36493
  //code for while current pdf page is exceed
35867
36494
  if (yPoint > pageSize.height) {
35868
36495
  page = this.GetNextPage(page);
36496
+ page['contentWidth'] = pointToPixel(detail.endPoint - detail.startPoint);
35869
36497
  taskGraphics = page.graphics;
35870
36498
  startPoint.y = 0;
35871
36499
  if (this.parent.pdfExportModule.gantt.enableHeader) {
@@ -35873,6 +36501,11 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35873
36501
  startPoint.y = pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60);
35874
36502
  }
35875
36503
  isNextPage = true;
36504
+ var graphics = page.graphics;
36505
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
36506
+ if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
36507
+ graphics.drawRectangle(pen, startPoint.x, startPoint.y, page['contentWidth'] + 0.5, rowHeight);
36508
+ }
35876
36509
  }
35877
36510
  this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
35878
36511
  //Draw Taskbar
@@ -35896,9 +36529,13 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35896
36529
  if (!taskbar.isMilestone) {
35897
36530
  var taskbarPen = new PdfPen(taskbar.taskBorderColor);
35898
36531
  var taskBrush = new PdfSolidBrush(taskbar.taskColor);
36532
+ var baselinePen = new PdfPen(taskbar.baselineBorderColor);
36533
+ var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
35899
36534
  var progressPen = new PdfPen(taskbar.progressColor);
35900
36535
  var progressBrush = new PdfSolidBrush(taskbar.progressColor);
35901
- var adjustHeight = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
36536
+ var adjustHeightforTaskbar = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
36537
+ var adjustHeightforBaseline = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
36538
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
35902
36539
  pageIndex = page.section.indexOf(page);
35903
36540
  var startDate = isNullOrUndefined(this.unscheduleStarteDate) ? this.startDate : this.unscheduleStarteDate;
35904
36541
  var endDate = isNullOrUndefined(this.unscheduleEndDate) ? this.endDate : this.unscheduleEndDate;
@@ -35912,6 +36549,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35912
36549
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
35913
36550
  }
35914
36551
  else {
36552
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36553
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
36554
+ }
35915
36555
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
35916
36556
  if (this.isScheduledTask) {
35917
36557
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -35943,6 +36583,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35943
36583
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
35944
36584
  }
35945
36585
  else {
36586
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36587
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
36588
+ }
35946
36589
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
35947
36590
  taskbar.width = taskbar.width - renderWidth;
35948
36591
  if (this.isScheduledTask) {
@@ -35974,6 +36617,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35974
36617
  this.taskStartPoint = __assign$3({}, startPoint);
35975
36618
  this.isStartPoint = true;
35976
36619
  }
36620
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36621
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
36622
+ }
35977
36623
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
35978
36624
  if (this.isScheduledTask) {
35979
36625
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -35995,6 +36641,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35995
36641
  this.taskStartPoint = __assign$3({}, startPoint);
35996
36642
  this.isStartPoint = true;
35997
36643
  }
36644
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36645
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
36646
+ }
35998
36647
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
35999
36648
  if (this.isScheduledTask) {
36000
36649
  var progressBoundsWidth = 0;
@@ -36020,6 +36669,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
36020
36669
  }
36021
36670
  else {
36022
36671
  this.drawMilestone(page, startPoint, detail, cumulativeWidth);
36672
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36673
+ this.drawMilestone(page, startPoint, detail, cumulativeWidth);
36674
+ }
36023
36675
  }
36024
36676
  this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
36025
36677
  return isNextPage;
@@ -36178,13 +36830,20 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
36178
36830
  var pageIndex = page.section.indexOf(page);
36179
36831
  this.taskStartPoint = __assign$3({}, startPoint);
36180
36832
  var milestonePen = new PdfPen(this.milestoneColor);
36181
- var adjustHeight = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
36833
+ var adjustHeightforBaselineMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 3.0));
36834
+ var adjustHeightforMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
36835
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaselineMilesone : adjustHeightforMilesone;
36182
36836
  var milestoneBrush = new PdfSolidBrush(this.milestoneColor);
36837
+ var baselinePen = new PdfPen(this.baselineBorderColor);
36838
+ var baselineBrush = new PdfSolidBrush(this.baselineColor);
36183
36839
  taskGraphics.save(); //saving graphics state
36184
- var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.6);
36840
+ var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.8);
36185
36841
  /* eslint-disable-next-line */
36186
36842
  taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
36187
36843
  taskGraphics.rotateTransform(45); //apply rotation
36844
+ if (this.parent.renderBaseline && this.baselineStartDate && this.baselineEndDate) {
36845
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, 2, 2, pixelToPoint(height), pixelToPoint(height));
36846
+ }
36188
36847
  taskGraphics.drawRectangle(milestonePen, milestoneBrush, 0, 0, pixelToPoint(height), pixelToPoint(height));
36189
36848
  taskGraphics.restore(); //restoring graphics state
36190
36849
  this.endPage = this.startPage = pageIndex;
@@ -36215,7 +36874,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36215
36874
  * @returns {void}
36216
36875
  */
36217
36876
  PdfTimeline.prototype.drawTimeline = function (page, startPoint, detail) {
36218
- var remainWidth = Math.floor(detail.totalWidth);
36877
+ var remainWidth = pointToPixel(Math.floor(detail.totalWidth));
36219
36878
  var renderWidth = 0;
36220
36879
  this.topTierPoint.x = startPoint.x;
36221
36880
  this.topTierPoint.y = startPoint.y;
@@ -36243,7 +36902,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36243
36902
  //Primary header Event Arguments
36244
36903
  /* eslint-disable-next-line */
36245
36904
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
36246
- this.topTierPoint.x += pixelToPoint(renderWidth);
36905
+ this.topTierPoint.x += renderWidth;
36247
36906
  remainWidth -= renderWidth;
36248
36907
  if (isCompleted) {
36249
36908
  this.topTierIndex++;
@@ -36269,7 +36928,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36269
36928
  //Secondary header Event Arguments
36270
36929
  /* eslint-disable-next-line */
36271
36930
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
36272
- this.bottomTierPoint.x = this.bottomTierPoint.x + pixelToPoint(width);
36931
+ this.bottomTierPoint.x = this.bottomTierPoint.x + width;
36273
36932
  remainWidth -= width;
36274
36933
  secondHeader.completedWidth = width;
36275
36934
  if (isCompleted) {
@@ -36300,7 +36959,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36300
36959
  //Primary header Event Arguments
36301
36960
  /* eslint-disable-next-line */
36302
36961
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
36303
- this.topTierPoint.x += pixelToPoint(pHeader.completedWidth);
36962
+ this.topTierPoint.x += pHeader.completedWidth;
36304
36963
  }
36305
36964
  }
36306
36965
  }
@@ -36313,7 +36972,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36313
36972
  //Secondary header Event Arguments
36314
36973
  /* eslint-disable-next-line */
36315
36974
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
36316
- this.bottomTierPoint.x = this.bottomTierPoint.x + pixelToPoint(secondHeader.width);
36975
+ this.bottomTierPoint.x = this.bottomTierPoint.x + secondHeader.width;
36317
36976
  }
36318
36977
  }
36319
36978
  }
@@ -36360,7 +37019,10 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36360
37019
  var e = eventArgs.timelineCell;
36361
37020
  var rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
36362
37021
  var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
36363
- graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
37022
+ graphics.drawRectangle(rectPen, rectBrush, x, y, width, pixelToPoint(height));
37023
+ if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
37024
+ graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
37025
+ }
36364
37026
  var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
36365
37027
  if (ganttStyle.font) {
36366
37028
  font = ganttStyle.font;
@@ -36369,7 +37031,13 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36369
37031
  var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
36370
37032
  var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
36371
37033
  /* eslint-disable-next-line */
36372
- graphics.drawString(eventArgs.value, font, null, textBrush, x + pLeft, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
37034
+ if (isTopTier) {
37035
+ x = x + pLeft + 4;
37036
+ }
37037
+ else {
37038
+ x = x + pLeft;
37039
+ }
37040
+ graphics.drawString(eventArgs.value, font, null, textBrush, x, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
36373
37041
  };
36374
37042
  return PdfTimeline;
36375
37043
  }());
@@ -36536,7 +37204,9 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
36536
37204
  }
36537
37205
  break;
36538
37206
  }
36539
- var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
37207
+ var midPointforTaskbar = Math.round((this.parent.rowHeight - 1) / 2.0);
37208
+ var midPointforBaseline = Math.round((this.parent.rowHeight - 10) / 2.0);
37209
+ var midPoint = this.parent.renderBaseline ? midPointforBaseline : midPointforTaskbar;
36540
37210
  midPoint = pixelToPoint(midPoint);
36541
37211
  /* eslint-disable-next-line */
36542
37212
  var point1, point2, point3, point4, point5, point6;
@@ -37031,6 +37701,7 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
37031
37701
  var pageData;
37032
37702
  this.headerDetails.forEach(function (detail, index) {
37033
37703
  var page = _this.result.page.section.getPages()[_this.startPageIndex];
37704
+ page['contentWidth'] = pointToPixel(_this.headerDetails[index].endPoint - _this.headerDetails[index].startPoint);
37034
37705
  _this.chartHeader.drawTimeline(page, _this.startPoint, detail);
37035
37706
  taskbarPoint.y = taskbarPoint.y + pixelToPoint(_this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
37036
37707
  pageStartX = taskbarPoint.x;
@@ -37041,6 +37712,11 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
37041
37712
  var task = _this.taskbarCollection[i];
37042
37713
  var rowHeight = _this.rows.getRow(i + 1).height;
37043
37714
  var pdfPage = _this.result.page.section.getPages()[_this.startPageIndex];
37715
+ var graphics = pdfPage.graphics;
37716
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
37717
+ if (page['contentWidth'] && (_this.parent.gridLines == "Both" || _this.parent.gridLines == "Horizontal")) {
37718
+ graphics.drawRectangle(pen, pageStartX, taskbarPoint.y, page['contentWidth'] + 0.5, rowHeight);
37719
+ }
37044
37720
  /* eslint-disable-next-line */
37045
37721
  var isNextPage = task.drawTaskbar(pdfPage, taskbarPoint, detail, cumulativeWidth, rowHeight, _this.taskbarCollection[i]);
37046
37722
  if (isNextPage) {
@@ -37175,11 +37851,23 @@ var PdfExport = /** @__PURE__ @class */ (function () {
37175
37851
  if (isNullOrUndefined(pdfExportProperties)) {
37176
37852
  pdfExportProperties = {};
37177
37853
  }
37178
- if (pdfExportProperties.exportType === 'CurrentViewData') {
37179
- data = this.parent.currentViewData;
37854
+ if (pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
37855
+ if (pdfExportProperties.exportType === 'CurrentViewData') {
37856
+ this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.currentViewData, null, true);
37857
+ }
37858
+ else {
37859
+ this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.flatData, null, true);
37860
+ }
37861
+ this.helper.beforeSinglePageExport['cloneCurrentViewData'] = extend([], this.parent.currentViewData, null, true);
37862
+ data = this.helper.beforeSinglePageExport['cloneFlatData'];
37180
37863
  }
37181
37864
  else {
37182
- data = this.parent.flatData;
37865
+ if (pdfExportProperties.exportType === 'CurrentViewData') {
37866
+ data = this.parent.currentViewData;
37867
+ }
37868
+ else {
37869
+ data = this.parent.flatData;
37870
+ }
37183
37871
  }
37184
37872
  this.initGantt();
37185
37873
  if (!isNullOrUndefined(pdfDoc)) {
@@ -37204,6 +37892,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
37204
37892
  var section = this.pdfDocument.sections.add();
37205
37893
  this.processSectionExportProperties(section, pdfExportProperties);
37206
37894
  var pdfPage = section.pages.add();
37895
+ this.pdfPageDimensions = pdfPage.getClientSize();
37207
37896
  /* eslint-disable-next-line */
37208
37897
  return new Promise(function (resolve, reject) {
37209
37898
  _this.helper.processGridExport(data, _this.gantt, pdfExportProperties);
@@ -37214,6 +37903,26 @@ var PdfExport = /** @__PURE__ @class */ (function () {
37214
37903
  format.break = PdfLayoutBreakType.FitElement;
37215
37904
  var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
37216
37905
  _this.gantt.drawChart(layouter);
37906
+ if (_this.helper.exportProps && _this.helper.exportProps.fitToWidthSettings && _this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
37907
+ _this.parent.zoomingProjectStartDate = _this.helper.beforeSinglePageExport['zoomingProjectStartDate'];
37908
+ _this.parent.zoomingProjectEndDate = _this.helper.beforeSinglePageExport['zoomingProjectEndDate'];
37909
+ _this.parent.cloneProjectStartDate = _this.helper.beforeSinglePageExport['cloneProjectStartDate'];
37910
+ _this.parent.cloneProjectEndDate = _this.helper.beforeSinglePageExport['cloneProjectEndDate'];
37911
+ _this.parent.timelineModule.customTimelineSettings = _this.helper.beforeSinglePageExport['customTimelineSettings'];
37912
+ _this.parent.isTimelineRoundOff = _this.helper.beforeSinglePageExport['isTimelineRoundOff'];
37913
+ _this.parent.timelineModule.topTier = _this.helper.beforeSinglePageExport['topTier'];
37914
+ _this.parent.timelineModule.topTierCellWidth = _this.helper.beforeSinglePageExport['topTierCellWidth'];
37915
+ _this.parent.timelineModule.topTierCollection = _this.helper.beforeSinglePageExport['topTierCollection'];
37916
+ _this.parent.timelineModule.bottomTier = _this.helper.beforeSinglePageExport['bottomTier'];
37917
+ _this.parent.timelineModule.bottomTierCellWidth = _this.helper.beforeSinglePageExport['bottomTierCellWidth'];
37918
+ _this.parent.timelineModule.bottomTierCollection = _this.helper.beforeSinglePageExport['bottomTierCollection'];
37919
+ _this.parent.timelineModule.totalTimelineWidth = _this.helper.beforeSinglePageExport['totalTimelineWidth'];
37920
+ _this.parent.timelineModule.timelineStartDate = _this.helper.beforeSinglePageExport['timelineStartDate'];
37921
+ _this.parent.timelineModule.timelineEndDate = _this.helper.beforeSinglePageExport['timelineEndDate'];
37922
+ _this.parent.timelineModule.timelineRoundOffEndDate = _this.helper.beforeSinglePageExport['timelineRoundOffEndDate'];
37923
+ _this.parent.perDayWidth = _this.helper.beforeSinglePageExport['perDayWidth'];
37924
+ _this.parent.updatedConnectorLineCollection = _this.helper.beforeSinglePageExport['updatedConnectorLineCollection'];
37925
+ }
37217
37926
  if (!isMultipleExport) {
37218
37927
  if (!_this.isBlob) {
37219
37928
  // save the PDF