@syncfusion/ej2-gantt 22.2.12 → 23.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/CHANGELOG.md +180 -164
  2. package/dist/ej2-gantt.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +846 -242
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +884 -264
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +21 -21
  13. package/src/gantt/actions/cell-edit.js +4 -1
  14. package/src/gantt/actions/critical-path.d.ts +2 -0
  15. package/src/gantt/actions/critical-path.js +79 -59
  16. package/src/gantt/actions/dependency.d.ts +1 -0
  17. package/src/gantt/actions/dependency.js +43 -25
  18. package/src/gantt/actions/dialog-edit.js +27 -7
  19. package/src/gantt/actions/edit.js +15 -8
  20. package/src/gantt/actions/pdf-export.d.ts +4 -1
  21. package/src/gantt/actions/pdf-export.js +36 -3
  22. package/src/gantt/actions/rowdragdrop.js +10 -2
  23. package/src/gantt/actions/selection.js +22 -5
  24. package/src/gantt/actions/taskbar-edit.js +51 -36
  25. package/src/gantt/actions/toolbar.js +8 -0
  26. package/src/gantt/base/date-processor.js +1 -1
  27. package/src/gantt/base/gantt-chart.d.ts +1 -0
  28. package/src/gantt/base/gantt-chart.js +79 -6
  29. package/src/gantt/base/gantt-model.d.ts +7 -0
  30. package/src/gantt/base/gantt.d.ts +6 -0
  31. package/src/gantt/base/gantt.js +73 -11
  32. package/src/gantt/base/interface.d.ts +14 -0
  33. package/src/gantt/base/task-processor.d.ts +4 -4
  34. package/src/gantt/base/task-processor.js +75 -25
  35. package/src/gantt/base/tree-grid.js +19 -10
  36. package/src/gantt/export/export-helper.d.ts +5 -1
  37. package/src/gantt/export/export-helper.js +150 -3
  38. package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
  39. package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
  40. package/src/gantt/export/pdf-base/treegrid-layouter.js +3 -1
  41. package/src/gantt/export/pdf-connector-line.js +3 -1
  42. package/src/gantt/export/pdf-gantt.js +6 -0
  43. package/src/gantt/export/pdf-taskbar.d.ts +13 -0
  44. package/src/gantt/export/pdf-taskbar.js +39 -5
  45. package/src/gantt/export/pdf-timeline.js +17 -8
  46. package/src/gantt/export/pdf-treegrid.js +3 -3
  47. package/src/gantt/models/task-fields-model.d.ts +7 -0
  48. package/src/gantt/models/task-fields.d.ts +6 -0
  49. package/src/gantt/models/task-fields.js +3 -0
  50. package/src/gantt/renderer/chart-rows.d.ts +1 -1
  51. package/src/gantt/renderer/chart-rows.js +39 -20
  52. package/src/gantt/renderer/connector-line.js +49 -9
  53. package/src/gantt/renderer/edit-tooltip.js +2 -1
  54. package/src/gantt/renderer/timeline.js +16 -9
  55. package/src/gantt/renderer/tooltip.js +5 -5
  56. package/styles/bootstrap-dark.css +44 -100
  57. package/styles/bootstrap.css +44 -100
  58. package/styles/bootstrap4.css +44 -100
  59. package/styles/bootstrap5-dark.css +44 -100
  60. package/styles/bootstrap5.css +44 -100
  61. package/styles/fabric-dark.css +44 -100
  62. package/styles/fabric.css +44 -100
  63. package/styles/fluent-dark.css +44 -100
  64. package/styles/fluent.css +44 -100
  65. package/styles/gantt/_layout.scss +44 -31
  66. package/styles/gantt/_theme.scss +104 -98
  67. package/styles/gantt/bootstrap-dark.css +44 -100
  68. package/styles/gantt/bootstrap-dark.scss +1 -1
  69. package/styles/gantt/bootstrap.css +44 -100
  70. package/styles/gantt/bootstrap.scss +1 -1
  71. package/styles/gantt/bootstrap4.css +44 -100
  72. package/styles/gantt/bootstrap4.scss +1 -1
  73. package/styles/gantt/bootstrap5-dark.css +44 -100
  74. package/styles/gantt/bootstrap5-dark.scss +1 -1
  75. package/styles/gantt/bootstrap5.css +44 -100
  76. package/styles/gantt/bootstrap5.scss +1 -1
  77. package/styles/gantt/fabric-dark.css +44 -100
  78. package/styles/gantt/fabric-dark.scss +1 -1
  79. package/styles/gantt/fabric.css +44 -100
  80. package/styles/gantt/fabric.scss +1 -1
  81. package/styles/gantt/fluent-dark.css +44 -100
  82. package/styles/gantt/fluent-dark.scss +1 -1
  83. package/styles/gantt/fluent.css +44 -100
  84. package/styles/gantt/fluent.scss +1 -1
  85. package/styles/gantt/highcontrast-light.css +40 -100
  86. package/styles/gantt/highcontrast-light.scss +1 -1
  87. package/styles/gantt/highcontrast.css +44 -100
  88. package/styles/gantt/highcontrast.scss +1 -1
  89. package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
  90. package/styles/gantt/icons/_bootstrap.scss +4 -0
  91. package/styles/gantt/icons/_bootstrap4.scss +4 -0
  92. package/styles/gantt/icons/_bootstrap5.scss +4 -0
  93. package/styles/gantt/icons/_fabric-dark.scss +4 -0
  94. package/styles/gantt/icons/_fabric.scss +4 -0
  95. package/styles/gantt/icons/_fluent.scss +4 -0
  96. package/styles/gantt/icons/_fusionnew.scss +4 -0
  97. package/styles/gantt/icons/_highcontrast.scss +4 -0
  98. package/styles/gantt/icons/_material-dark.scss +4 -0
  99. package/styles/gantt/icons/_material.scss +4 -0
  100. package/styles/gantt/icons/_material3.scss +4 -0
  101. package/styles/gantt/icons/_tailwind-dark.scss +4 -0
  102. package/styles/gantt/icons/_tailwind.scss +4 -0
  103. package/styles/gantt/material-dark.css +44 -101
  104. package/styles/gantt/material-dark.scss +1 -1
  105. package/styles/gantt/material.css +44 -101
  106. package/styles/gantt/material.scss +1 -1
  107. package/styles/gantt/material3-dark.css +45 -102
  108. package/styles/gantt/material3-dark.scss +1 -1
  109. package/styles/gantt/material3.css +45 -102
  110. package/styles/gantt/material3.scss +1 -1
  111. package/styles/gantt/tailwind-dark.css +44 -101
  112. package/styles/gantt/tailwind-dark.scss +1 -1
  113. package/styles/gantt/tailwind.css +44 -101
  114. package/styles/gantt/tailwind.scss +1 -1
  115. package/styles/highcontrast-light.css +40 -100
  116. package/styles/highcontrast.css +44 -100
  117. package/styles/material-dark.css +44 -101
  118. package/styles/material.css +44 -101
  119. package/styles/material3-dark.css +45 -102
  120. package/styles/material3-dark.scss +1 -1
  121. package/styles/material3.css +45 -102
  122. package/styles/material3.scss +1 -1
  123. package/styles/tailwind-dark.css +44 -101
  124. 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;
@@ -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,11 @@ 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();
5344
5460
  }
5345
5461
  this.isExpandAll = false;
5462
+ this.isCollapseAll = false;
5346
5463
  };
5347
5464
  /**
5348
5465
  * Public method to expand particular level of rows.
@@ -5825,7 +5942,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5825
5942
  childElement = element;
5826
5943
  }
5827
5944
  }
5828
- if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span')) {
5945
+ 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
5946
  if (focus === 'add') {
5830
5947
  element.setAttribute('tabIndex', '0');
5831
5948
  addClass([element], 'e-active-container');
@@ -5889,7 +6006,13 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5889
6006
  recordIndex = this.parent.flatData.indexOf(record);
5890
6007
  }
5891
6008
  else {
5892
- recordIndex = this.parent.currentViewData.indexOf(record);
6009
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
6010
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
6011
+ recordIndex = this.parent.ids.indexOf(record.ganttProperties.taskId.toString());
6012
+ }
6013
+ else {
6014
+ recordIndex = this.parent.currentViewData.indexOf(record);
6015
+ }
5893
6016
  }
5894
6017
  }
5895
6018
  return recordIndex;
@@ -5976,7 +6099,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
5976
6099
  */
5977
6100
  Timeline.prototype.refreshTimelineByTimeSpan = function () {
5978
6101
  this.validateTimelineProp();
5979
- this.parent.ganttChartModule.chartTimelineContainer.innerHTML = '';
6102
+ 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)) {
6103
+ this.parent.ganttChartModule.chartTimelineContainer.innerHTML = '';
6104
+ }
5980
6105
  this.createTimelineSeries();
5981
6106
  };
5982
6107
  /**
@@ -6293,7 +6418,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
6293
6418
  this.customTimelineSettings.topTier.format = this.validateFormat(this.topTier, this.customTimelineSettings.topTier.format);
6294
6419
  this.customTimelineSettings.weekStartDay = this.customTimelineSettings.weekStartDay >= 0 &&
6295
6420
  this.customTimelineSettings.weekStartDay <= 6 ? this.customTimelineSettings.weekStartDay : 0;
6296
- this.checkCurrentZoomingLevel();
6421
+ if (!(this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps &&
6422
+ this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
6423
+ this.checkCurrentZoomingLevel();
6424
+ }
6297
6425
  };
6298
6426
  /**
6299
6427
  * To find the current zooming level of the Gantt control.
@@ -6540,13 +6668,15 @@ var Timeline = /** @__PURE__ @class */ (function () {
6540
6668
  table = createElement('table', { className: timelineHeaderTableContainer, styles: 'display: block;' });
6541
6669
  thead = createElement('thead', { className: timelineHeaderTableBody, styles: 'display:block; border-collapse:collapse' });
6542
6670
  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);
6671
+ 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)) {
6672
+ td = createElement('th');
6673
+ div = createElement('div', { styles: 'width: 20px' });
6674
+ td.appendChild(div);
6675
+ tr.appendChild(td);
6676
+ thead.appendChild(tr);
6677
+ table.appendChild(thead);
6678
+ this.parent.ganttChartModule.chartTimelineContainer.appendChild(table);
6679
+ }
6550
6680
  tier = 'bottomTier';
6551
6681
  tr = null;
6552
6682
  }
@@ -7588,6 +7718,11 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7588
7718
  this.wireEvents();
7589
7719
  };
7590
7720
  GanttTreeGrid.prototype.composeProperties = function () {
7721
+ this.parent.treeGrid.hasChildMapping = this.parent.taskFields.hasChildMapping;
7722
+ this.parent.treeGrid.loadChildOnDemand = this.parent.loadChildOnDemand;
7723
+ this.parent.treeGrid['isFromGantt'] = true;
7724
+ this.parent.treeGrid.parentIdMapping = this.parent.taskFields.parentID;
7725
+ this.parent.treeGrid.idMapping = this.parent.taskFields.id;
7591
7726
  this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
7592
7727
  this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
7593
7728
  this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
@@ -7604,8 +7739,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7604
7739
  this.parent.treeGrid.dataSource = { result: this.parent.flatData, count: count };
7605
7740
  }
7606
7741
  else {
7607
- this.parent.treeGrid.hasChildMapping = null;
7608
- this.parent.treeGrid.dataSource = this.parent.flatData;
7742
+ if (!this.parent.treeGrid.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
7743
+ this.parent.autoCalculateDateScheduling = false;
7744
+ this.parent.treeGrid.dataSource = this.parent.dataSource;
7745
+ }
7746
+ else {
7747
+ this.parent.treeGrid.hasChildMapping = null;
7748
+ this.parent.treeGrid.dataSource = this.parent.flatData;
7749
+ }
7609
7750
  }
7610
7751
  this.parent.treeGrid.expandStateMapping = this.parent.taskFields.expandState;
7611
7752
  var isGantt = 'isGantt';
@@ -7766,7 +7907,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7766
7907
  collapsedArgs = this.createExpandCollapseArgs(args, null);
7767
7908
  this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
7768
7909
  }
7769
- if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
7910
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isCollapseAll && collapsedArgs['gridRow']) {
7770
7911
  collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
7771
7912
  this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
7772
7913
  this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
@@ -7796,7 +7937,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7796
7937
  expandedArgs = this.createExpandCollapseArgs(args, null);
7797
7938
  this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
7798
7939
  }
7799
- if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
7940
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isExpandAll && args['row']) {
7800
7941
  args['row'].style.height = this.parent.rowHeight + 'px';
7801
7942
  this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
7802
7943
  this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
@@ -8366,6 +8507,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8366
8507
  if (!isNullOrUndefined(ganttProp)) {
8367
8508
  return this.parent.dataOperation.getDurationString(ganttProp.duration, ganttProp.durationUnit);
8368
8509
  }
8510
+ else if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
8511
+ return this.parent.dataOperation.getDurationString(parseInt(data[this.parent.taskFields.duration]), this.parent.durationUnit);
8512
+ }
8369
8513
  return '';
8370
8514
  }; // eslint-disable-next-line
8371
8515
  GanttTreeGrid.prototype.resourceValueAccessor = function (field, data, column) {
@@ -8402,12 +8546,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8402
8546
  };
8403
8547
  GanttTreeGrid.prototype.updateScrollTop = function (args) {
8404
8548
  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
- }
8549
+ newScrollTop = getValue('top', args);
8411
8550
  this.treeGridElement.querySelector('.e-content').scrollTop = newScrollTop;
8412
8551
  this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
8413
8552
  };
@@ -8934,6 +9073,9 @@ var TaskFields = /** @__PURE__ @class */ (function (_super) {
8934
9073
  __decorate$12([
8935
9074
  Property(null)
8936
9075
  ], TaskFields.prototype, "parentID", void 0);
9076
+ __decorate$12([
9077
+ Property(null)
9078
+ ], TaskFields.prototype, "hasChildMapping", void 0);
8937
9079
  __decorate$12([
8938
9080
  Property(null)
8939
9081
  ], TaskFields.prototype, "startDate", void 0);
@@ -9550,16 +9692,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9550
9692
  return splitTasks;
9551
9693
  };
9552
9694
  ChartRows.prototype.getSplitTaskbarLeftResizerNode = function () {
9553
- var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
9695
+ var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
9554
9696
  var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
9555
- ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9697
+ ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
9556
9698
  return template;
9557
9699
  };
9558
9700
  ChartRows.prototype.getSplitTaskbarRightResizerNode = function (segment) {
9559
- var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
9701
+ var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
9560
9702
  var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
9561
9703
  ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (segment.width + rResizerLeft) + 'px;' +
9562
- 'height:' + (this.taskBarHeight) + 'px;"></div>';
9704
+ 'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
9563
9705
  return template;
9564
9706
  };
9565
9707
  ChartRows.prototype.getSplitProgressResizerNode = function (segment) {
@@ -9884,7 +10026,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9884
10026
  }
9885
10027
  else {
9886
10028
  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>';
10029
+ ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);left:' + 1 + 'px;"> </div>';
9888
10030
  milestoneNode = this.createDivElement(template);
9889
10031
  }
9890
10032
  return milestoneNode;
@@ -10262,16 +10404,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10262
10404
  return this.createDivElement(template);
10263
10405
  };
10264
10406
  ChartRows.prototype.childTaskbarLeftResizer = function () {
10265
- var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
10407
+ var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
10266
10408
  var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
10267
- 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
10409
+ 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
10268
10410
  return this.createDivElement(template);
10269
10411
  };
10270
10412
  ChartRows.prototype.childTaskbarRightResizer = function () {
10271
- var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
10413
+ var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
10272
10414
  var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
10273
10415
  'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
10274
- 'height:' + (this.taskBarHeight) + 'px;"></div>';
10416
+ 'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
10275
10417
  return this.createDivElement(template);
10276
10418
  };
10277
10419
  ChartRows.prototype.childTaskbarProgressResizer = function () {
@@ -10285,8 +10427,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10285
10427
  };
10286
10428
  ChartRows.prototype.getLeftPointNode = function () {
10287
10429
  var data = this.templateData;
10288
- var pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
10289
- var mileStoneLeft = -(this.connectorPointWidth + 2);
10430
+ var left = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 12 : 0;
10431
+ var mileStoneLeftValue = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 6 : 3;
10432
+ var pointerLeft = -(3 + this.connectorPointWidth + left);
10433
+ var mileStoneLeft = -(this.connectorPointWidth + 4 + mileStoneLeftValue);
10290
10434
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
10291
10435
  var marginTop;
10292
10436
  if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
@@ -10305,7 +10449,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10305
10449
  };
10306
10450
  ChartRows.prototype.getRightPointNode = function () {
10307
10451
  var data = this.templateData;
10308
- var pointerRight = this.parent.isAdaptive ? 10 : -2;
10452
+ var right = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -12 : 0;
10453
+ var pointerRight = -(3 + right);
10309
10454
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
10310
10455
  var marginTop;
10311
10456
  if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
@@ -10315,7 +10460,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10315
10460
  marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
10316
10461
  }
10317
10462
  var template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
10318
- ((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
10463
+ ((data.ganttProperties.isMilestone) ? ('left:' + ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.milestoneHeight + 5) : this.milestoneHeight - 2) + 'px;margin-top:' +
10319
10464
  pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
10320
10465
  '<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
10321
10466
  '" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
@@ -10488,7 +10633,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10488
10633
  * @private
10489
10634
  */
10490
10635
  ChartRows.prototype.initChartHelperPrivateVariable = function () {
10491
- var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
10636
+ var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 0.7 : 0.62);
10492
10637
  var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
10493
10638
  var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
10494
10639
  this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
@@ -10510,8 +10655,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10510
10655
  this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
10511
10656
  this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
10512
10657
  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;
10658
+ this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
10659
+ this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
10515
10660
  };
10516
10661
  /**
10517
10662
  * Function used to refresh Gantt rows.
@@ -10797,11 +10942,24 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10797
10942
  * @private
10798
10943
  */
10799
10944
  ChartRows.prototype.setAriaRowIndex = function (tempTemplateData, tRow) {
10945
+ var _this = this;
10800
10946
  var dataSource = this.parent.treeGrid.getCurrentViewRecords();
10801
10947
  var visualData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
10802
10948
  getValue('virtualScrollModule.visualData', this.parent.treeGrid) : dataSource;
10803
- var index = visualData.indexOf(tempTemplateData);
10804
- tRow.setAttribute('aria-rowindex', index.toString());
10949
+ var index;
10950
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
10951
+ var gridData = this.parent.treeGrid.grid.contentModule['rows'];
10952
+ var data = gridData.filter(function (x) {
10953
+ if (x['data'][_this.parent.taskFields.id] === tempTemplateData.ganttProperties.taskId) {
10954
+ return x;
10955
+ }
10956
+ })[0];
10957
+ tRow.setAttribute('aria-rowindex', data['index'].toString());
10958
+ }
10959
+ else {
10960
+ index = visualData.indexOf(tempTemplateData);
10961
+ tRow.setAttribute('aria-rowindex', index.toString());
10962
+ }
10805
10963
  };
10806
10964
  /**
10807
10965
  * To trigger query taskbar info event.
@@ -11177,8 +11335,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
11177
11335
  this.triggerQueryTaskbarInfoByIndex(tr, data);
11178
11336
  }
11179
11337
  var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
11180
- this.parent.treeGrid.grid.setRowData(dataId, data);
11181
- if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap) {
11338
+ if (!this.parent.ganttChartModule.isExpandAll && !this.parent.ganttChartModule.isCollapseAll) {
11339
+ this.parent.treeGrid.grid.setRowData(dataId, data);
11340
+ }
11341
+ if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap &&
11342
+ !this.parent.ganttChartModule.isCollapseAll && !this.parent.ganttChartModule.isExpandAll) {
11182
11343
  this.updateDragDropRecords(selectedItem, tr);
11183
11344
  }
11184
11345
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
@@ -11372,6 +11533,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
11372
11533
  this.parentRecord = [];
11373
11534
  this.parentIds = [];
11374
11535
  this.parentPredecessors = [];
11536
+ this.validatedParentIds = [];
11375
11537
  this.parent = gantt;
11376
11538
  this.dateValidateModule = this.parent.dateValidationModule;
11377
11539
  }
@@ -11988,13 +12150,31 @@ var Dependency = /** @__PURE__ @class */ (function () {
11988
12150
  */
11989
12151
  Dependency.prototype.createConnectorLinesCollection = function (records) {
11990
12152
  var ganttRecords = records ? records : this.parent.currentViewData;
12153
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
12154
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
12155
+ ganttRecords = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneCurrentViewData'];
12156
+ }
11991
12157
  var recordLength = ganttRecords.length;
11992
12158
  var count;
11993
12159
  var ganttRecord;
11994
12160
  var predecessorsCollection;
11995
- this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
11996
- this.parent.updatedRecords : this.parent.getExpandedRecords(this.parent.updatedRecords);
12161
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
12162
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
12163
+ this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12164
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
12165
+ }
12166
+ else {
12167
+ this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12168
+ this.parent.updatedRecords : this.parent.getExpandedRecords(this.parent.updatedRecords);
12169
+ }
11997
12170
  for (count = 0; count < recordLength; count++) {
12171
+ if (this.parent.editModule && this.parent.editModule.deletedTaskDetails.length > 0) {
12172
+ if (ganttRecords[count].parentItem) {
12173
+ var parentItem = this.parent.getRecordByID(ganttRecords[count].parentItem.taskId.toString());
12174
+ this.parent.setRecordValue('parentItem', this.parent.dataOperation.getCloneParent(parentItem), ganttRecords[count]);
12175
+ }
12176
+ ganttRecords[count].index = count;
12177
+ }
11998
12178
  ganttRecord = ganttRecords[count];
11999
12179
  predecessorsCollection = ganttRecord.ganttProperties.predecessor;
12000
12180
  if (predecessorsCollection) {
@@ -12142,36 +12322,35 @@ var Dependency = /** @__PURE__ @class */ (function () {
12142
12322
  this.validatePredecessor(record, undefined, 'successor');
12143
12323
  }
12144
12324
  }
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) {
12325
+ if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
12326
+ this.validatedParentIds.push(record.parentItem.taskId);
12327
+ }
12328
+
12329
+ var validUpdate = true;
12330
+ if (record && record.hasChildRecords && this.validatedParentIds.indexOf(record.ganttProperties.taskId.toString()) !== -1) {
12331
+ validUpdate = false;
12332
+ }
12333
+ if (validUpdate) {
12334
+ if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
12335
+ if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
12336
+ if (!ganttProp.hasChildRecords && record.hasChildRecords) {
12337
+ this.parent.editModule['updateChildItems'](record);
12338
+ this.isValidatedParentTaskID = record.ganttProperties.taskId;
12339
+ }
12340
+ }
12341
+ else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
12342
+ (record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
12159
12343
  this.parent.editModule['updateChildItems'](record);
12160
12344
  this.isValidatedParentTaskID = record.ganttProperties.taskId;
12161
12345
  }
12346
+ if (!ganttProp.hasChildRecords) {
12347
+ this.parent.dataOperation.updateParentItems(record, true);
12348
+ }
12162
12349
  }
12163
- else if ((record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
12164
- (validUpdate && taskBarModule.taskBarEditAction == 'ParentDrag')) {
12350
+ else if (record && record.hasChildRecords && !ganttProp) {
12165
12351
  this.parent.editModule['updateChildItems'](record);
12166
- this.isValidatedParentTaskID = record.ganttProperties.taskId;
12167
- }
12168
- if (!ganttProp.hasChildRecords) {
12169
- this.parent.dataOperation.updateParentItems(record, true);
12170
12352
  }
12171
12353
  }
12172
- else if (record && record.hasChildRecords && !ganttProp) {
12173
- this.parent.editModule['updateChildItems'](record);
12174
- }
12175
12354
  }
12176
12355
  };
12177
12356
  /**
@@ -12254,7 +12433,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12254
12433
  };
12255
12434
  ConnectorLine.prototype.getTaskbarMidpoint = function (isMilestone) {
12256
12435
  return Math.floor(isMilestone ?
12257
- (this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) + 1 :
12436
+ (this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) :
12258
12437
  (this.parent.chartRowsModule.taskBarMarginTop + (this.parent.chartRowsModule.taskBarHeight / 2))) + 1;
12259
12438
  };
12260
12439
  /**
@@ -12268,14 +12447,45 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12268
12447
  */
12269
12448
  ConnectorLine.prototype.createConnectorLineObject = function (parentGanttData, childGanttData, predecessor) {
12270
12449
  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);
12450
+ var updatedRecords;
12451
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
12452
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
12453
+ updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
12454
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.expandedRecords;
12455
+ }
12456
+ else {
12457
+ updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
12458
+ this.parent.flatData : this.expandedRecords;
12459
+ }
12460
+ var parentIndex;
12461
+ var childIndex;
12462
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
12463
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
12464
+ var parentData = this.parent.flatData.filter(function (data) {
12465
+ return data.ganttProperties.taskId.toString() == parentGanttData.ganttProperties.taskId.toString();
12466
+ })[0];
12467
+ var childData = this.parent.flatData.filter(function (data) {
12468
+ return data.ganttProperties.taskId.toString() == childGanttData.ganttProperties.taskId.toString();
12469
+ })[0];
12470
+ parentIndex = parentData.index;
12471
+ childIndex = childData.index;
12472
+ }
12473
+ else {
12474
+ parentIndex = updatedRecords.indexOf(parentGanttData);
12475
+ childIndex = updatedRecords.indexOf(childGanttData);
12476
+ }
12275
12477
  var parentGanttRecord = parentGanttData.ganttProperties;
12276
12478
  var childGanttRecord = childGanttData.ganttProperties;
12277
- var currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12278
- this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
12479
+ var currentData;
12480
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
12481
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
12482
+ currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12483
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
12484
+ }
12485
+ else {
12486
+ currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
12487
+ this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
12488
+ }
12279
12489
  connectorObj.parentIndexInCurrentView = currentData.indexOf(parentGanttData);
12280
12490
  connectorObj.childIndexInCurrentView = currentData.indexOf(childGanttData);
12281
12491
  var isVirtualScroll = this.parent.virtualScrollModule && this.parent.enableVirtualization;
@@ -13060,8 +13270,17 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
13060
13270
  if (isNullOrUndefined(id)) {
13061
13271
  return null;
13062
13272
  }
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())];
13273
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
13274
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
13275
+ var a = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'].filter(function (data) {
13276
+ return data.ganttProperties.taskId.toString() === id.toString();
13277
+ })[0];
13278
+ return a;
13279
+ }
13280
+ else {
13281
+ return this.parent.viewType === 'ResourceView' ? this.parent.flatData[this.parent.getTaskIds().indexOf('T' + id.toString())] :
13282
+ this.parent.flatData[this.parent.ids.indexOf(id.toString())];
13283
+ }
13065
13284
  };
13066
13285
  /**
13067
13286
  * Method to remove connector line from DOM
@@ -13390,8 +13609,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13390
13609
  if (taskbarTemplateNode) {
13391
13610
  append(taskbarTemplateNode, tooltipTemplate);
13392
13611
  }
13393
- argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate :
13394
- parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args);
13612
+ argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate : data ?
13613
+ parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args) : "";
13395
13614
  }
13396
13615
  else if (args.target.classList.contains('e-baseline-bar') ||
13397
13616
  args.target.classList.contains('e-baseline-gantt-milestone')) {
@@ -13403,8 +13622,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13403
13622
  if (baseLineTemplateNode) {
13404
13623
  append(baseLineTemplateNode, baselineTemplate);
13405
13624
  }
13406
- argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate :
13407
- parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args);
13625
+ argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate : data ?
13626
+ parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args) : "";
13408
13627
  }
13409
13628
  else if (args.target.classList.contains('e-event-markers')) {
13410
13629
  argsData.content = this.toolTipObj.content = parent.tooltipModule.getTooltipContent('marker', data, parent, args);
@@ -13471,7 +13690,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13471
13690
  // eslint-disable-next-line
13472
13691
  Tooltip$$1.prototype.tooltipCloseHandler = function (args) {
13473
13692
  this.tooltipMouseEvent = null;
13474
- if (!this.parent.isAdaptive) {
13693
+ if (!this.parent.isAdaptive && !isNullOrUndefined(this.currentTarget)) {
13475
13694
  EventHandler.remove(this.currentTarget, 'mousemove', this.mouseMoveHandler);
13476
13695
  }
13477
13696
  this.currentTarget = null;
@@ -14468,6 +14687,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14468
14687
  createSpinner({ target: this.element }, this.createElement);
14469
14688
  this.trigger('load', {});
14470
14689
  this.element.classList.add(root);
14690
+ this.rowHeight = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.rowHeight === 36) ? 46 : this.rowHeight : this.rowHeight;
14471
14691
  if (this.isAdaptive) {
14472
14692
  this.element.classList.add(adaptive);
14473
14693
  }
@@ -15010,7 +15230,39 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15010
15230
  this.treeGridModule.renderTreeGrid();
15011
15231
  };
15012
15232
  Gantt.prototype.updateCurrentViewData = function () {
15233
+ var _this = this;
15013
15234
  this.currentViewData = this.treeGrid.getCurrentViewRecords().slice();
15235
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping && this.currentViewData.length > 0) {
15236
+ this.autoCalculateDateScheduling = false;
15237
+ this.flatData = [];
15238
+ this.dataOperation.taskIds = [];
15239
+ this.ids = [];
15240
+ this.dataOperation.recordIndex = 0;
15241
+ this.dataOperation.dataArray = this.currentViewData;
15242
+ this.dataOperation.cloneDataSource();
15243
+ if (this.predecessorModule && this.taskFields.dependency) {
15244
+ this.predecessorModule['parentIds'] = [];
15245
+ this.predecessorModule['parentRecord'] = [];
15246
+ this.predecessorModule.updatePredecessors();
15247
+ }
15248
+ var gridData = this.treeGrid.grid.contentModule['rows'];
15249
+ var data = gridData.filter(function (x) {
15250
+ if (x['data'][_this.taskFields.id] === _this.flatData[0].ganttProperties.taskId) {
15251
+ return x;
15252
+ }
15253
+ })[0];
15254
+ var index = data['index'];
15255
+ for (var i = 0; i < this.flatData.length; i++) {
15256
+ this.flatData[i].index = index;
15257
+ index++;
15258
+ }
15259
+ this.currentViewData = this.flatData;
15260
+ this.treeGrid.grid.currentViewData = this.flatData;
15261
+ if (!isNullOrUndefined(this.treeGrid['virtualScrollModule'])) {
15262
+ this.treeGrid['virtualScrollModule'].visualData = this.flatData;
15263
+ this.updatedRecords = this.flatData;
15264
+ }
15265
+ }
15014
15266
  };
15015
15267
  /**
15016
15268
  * @param {IGanttData} records -Defines the delete record collections.
@@ -15030,7 +15282,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15030
15282
  * @private
15031
15283
  */
15032
15284
  Gantt.prototype.updateContentHeight = function (args) {
15033
- if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
15285
+ if ((!this.allowTaskbarOverlap && !this.ganttChartModule.isCollapseAll && !this.ganttChartModule.isExpandAll) && this.viewType === 'ResourceView' && !this.isLoad) {
15034
15286
  return;
15035
15287
  }
15036
15288
  else {
@@ -15396,6 +15648,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15396
15648
  else {
15397
15649
  this.getCurrentRecords(args);
15398
15650
  }
15651
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
15652
+ this.updateContentHeight();
15653
+ }
15399
15654
  if (this.enableCriticalPath && this.criticalPathModule) {
15400
15655
  this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
15401
15656
  }
@@ -15411,6 +15666,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15411
15666
  }
15412
15667
  this.initialChartRowElements = this.ganttChartModule.getChartRows();
15413
15668
  this.isLoad = false;
15669
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
15670
+ this.autoCalculateDateScheduling = true;
15671
+ }
15414
15672
  this.trigger('dataBound', args);
15415
15673
  };
15416
15674
  /**
@@ -15675,7 +15933,14 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15675
15933
  if (prop === 'locale') {
15676
15934
  this.isLocaleChanged = true;
15677
15935
  }
15678
- isRefresh = true;
15936
+ if (prop === 'taskFields') {
15937
+ if (!isNullOrUndefined(newProp.taskFields.child)) {
15938
+ return;
15939
+ }
15940
+ }
15941
+ if (prop !== 'allowTaskbarDragAndDrop') {
15942
+ isRefresh = true;
15943
+ }
15679
15944
  break;
15680
15945
  case 'validateManualTasksOnLinking':
15681
15946
  this.validateManualTasksOnLinking = newProp.validateManualTasksOnLinking;
@@ -16355,6 +16620,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16355
16620
  * @returns {Promise<any>} .
16356
16621
  */
16357
16622
  Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
16623
+ if (pdfExportProperties && pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
16624
+ pdfExportProperties.pageOrientation == 'Landscape';
16625
+ }
16358
16626
  return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
16359
16627
  : null;
16360
16628
  };
@@ -16443,14 +16711,17 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16443
16711
  this.isTimelineRoundOff = isTimelineRoundOff;
16444
16712
  this.timelineModule.refreshTimelineByTimeSpan();
16445
16713
  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', {});
16714
+ if (!this.pdfExportModule || (this.pdfExportModule && !this.pdfExportModule.isPdfExport) || (this.pdfExportModule && this.pdfExportModule.isPdfExport && this.pdfExportModule.helper.exportProps &&
16715
+ this.pdfExportModule.helper.exportProps.fitToWidthSettings && !this.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
16716
+ this.timelineModule.updateChartByNewTimeline();
16717
+ this.ganttChartModule.chartBodyContent.style.width = formatUnit(this.timelineModule.totalTimelineWidth);
16718
+ this.ganttChartModule.updateLastRowBottomWidth();
16719
+ if (this.taskFields.dependency) {
16720
+ this.ganttChartModule.reRenderConnectorLines();
16721
+ }
16722
+ if (isFrom !== 'beforeAdd') {
16723
+ this.notify('selectRowByIndex', {});
16724
+ }
16454
16725
  }
16455
16726
  };
16456
16727
  /**
@@ -17028,8 +17299,15 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
17028
17299
  * @returns {HTMLElement} .
17029
17300
  */
17030
17301
  Gantt.prototype.getRowByID = function (id) {
17302
+ var _this = this;
17031
17303
  var record = this.getRecordByID(id.toString());
17032
- var index = this.updatedRecords.indexOf(record);
17304
+ var index;
17305
+ if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
17306
+ index = this.updatedRecords.map(function (item) { return item[_this.taskFields.id]; }).indexOf(record.ganttProperties.taskId);
17307
+ }
17308
+ else {
17309
+ index = this.updatedRecords.indexOf(record);
17310
+ }
17033
17311
  if (index !== -1) {
17034
17312
  return this.getRowByIndex(index);
17035
17313
  }
@@ -17490,6 +17768,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
17490
17768
  __decorate([
17491
17769
  Property(true)
17492
17770
  ], Gantt.prototype, "enableVirtualMaskRow", void 0);
17771
+ __decorate([
17772
+ Property(false)
17773
+ ], Gantt.prototype, "loadChildOnDemand", void 0);
17493
17774
  __decorate([
17494
17775
  Property(true)
17495
17776
  ], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
@@ -17996,7 +18277,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17996
18277
  args.cancel = true;
17997
18278
  return;
17998
18279
  }
17999
- if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
18280
+ if (data.hasChildRecords && !this.parent.allowParentDependency && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
18000
18281
  data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
18001
18282
  || field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
18002
18283
  if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
@@ -18295,6 +18576,9 @@ var CellEdit = /** @__PURE__ @class */ (function () {
18295
18576
  * @returns {void} .
18296
18577
  */
18297
18578
  CellEdit.prototype.durationEdited = function (args) {
18579
+ if (parseInt(args.data[this.parent.taskFields.duration]) < 0) {
18580
+ args.data[this.parent.taskFields.duration] = 0;
18581
+ }
18298
18582
  var ganttProb = args.data.ganttProperties;
18299
18583
  var durationString = args.data[this.parent.taskFields.duration];
18300
18584
  this.parent.dataOperation.updateDurationValue(durationString, ganttProb);
@@ -18567,6 +18851,7 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
18567
18851
  * @returns {void} .
18568
18852
  */
18569
18853
  EditTooltip.prototype.updateTooltipPosition = function (args) {
18854
+ args.element.style.visibility = 'visible';
18570
18855
  var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
18571
18856
  if (isNullOrUndefined(parentWithZoomStyle)) {
18572
18857
  var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
@@ -18576,8 +18861,8 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
18576
18861
  tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
18577
18862
  }
18578
18863
  args.element.style.left = tooltipPositionX + 'px';
18864
+ args.element.style.visibility = 'visible';
18579
18865
  }
18580
- args.element.style.visibility = 'visible';
18581
18866
  };
18582
18867
  /**
18583
18868
  * To show/hide taskbar edit tooltip.
@@ -18835,13 +19120,10 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18835
19120
  TaskbarEdit.prototype.mouseDownHandler = function (e) {
18836
19121
  if (this.parent.editSettings.allowTaskbarEditing && !this.parent.readOnly) {
18837
19122
  this.canDrag = false;
18838
- if (this.parent.isAdaptive && this.taskBarEditElement) {
19123
+ if (this.taskBarEditElement) {
18839
19124
  var targetElement = this.getElementByPosition(e);
18840
19125
  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) {
19126
+ if ((element && element.innerHTML === this.taskBarEditElement.innerHTML || this.taskBarEditElement.classList.contains("e-segmented-taskbar") || this.taskBarEditElement.classList.contains("collpse-parent-border"))) {
18845
19127
  this.updateTaskBarEditElement(e);
18846
19128
  this.canDrag = true;
18847
19129
  e.preventDefault();
@@ -18864,7 +19146,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18864
19146
  }
18865
19147
  return;
18866
19148
  }
18867
- if (this.tapPointOnFocus && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
19149
+ if (this.tapPointOnFocus && !isNullOrUndefined(this.taskBarEditElement) && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
18868
19150
  this.connectorSecondRecord = this.parent.ganttChartModule.getRecordByTaskBar(element);
18869
19151
  this.connectorSecondAction = 'ConnectorPointLeftDrag';
18870
19152
  this.connectorSecondElement = element;
@@ -18875,8 +19157,16 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18875
19157
  this.showHideActivePredecessors(false);
18876
19158
  this.initPublicProp();
18877
19159
  }
18878
- else if (targetElement.classList.contains(connectorPointLeftHover) ||
18879
- targetElement.classList.contains(connectorPointRightHover)) {
19160
+ else if (targetElement.classList.contains(connectorPointLeftHover)) {
19161
+ this.canDrag = false;
19162
+ this.multipleSelectionEnabled();
19163
+ this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
19164
+ this.tapPointOnFocus = true;
19165
+ this.taskBarEditAction = 'ConnectorPointLeftDrag';
19166
+ this.connectorSecondRecord = this.taskBarEditRecord;
19167
+ this.taskBarEditingAction(e, false);
19168
+ }
19169
+ else if (targetElement.classList.contains(connectorPointRightHover)) {
18880
19170
  this.canDrag = false;
18881
19171
  this.multipleSelectionEnabled();
18882
19172
  this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
@@ -19006,7 +19296,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19006
19296
  }
19007
19297
  }
19008
19298
  if (this.parent.editSettings.allowTaskbarEditing && element) {
19009
- this.showHideTaskBarEditingElements(element, this.taskBarEditElement);
19299
+ this.showHideTaskBarEditingElements(element, this.editElement);
19010
19300
  this.editElement = element;
19011
19301
  this.realTaskbarElement = this.editElement;
19012
19302
  var index = this.editElement.getAttribute('data-segment-index');
@@ -19087,7 +19377,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19087
19377
  else {
19088
19378
  if (this.parent.isAdaptive) {
19089
19379
  if (this.taskBarEditElement) {
19090
- this.showHideTaskBarEditingElements(element, this.taskBarEditElement);
19380
+ this.showHideTaskBarEditingElements(element, this.editElement);
19091
19381
  }
19092
19382
  this.initPublicProp();
19093
19383
  }
@@ -19147,8 +19437,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19147
19437
  && isShowConnectorPoints) {
19148
19438
  var connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
19149
19439
  element : element.parentElement;
19150
- addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
19151
- addClass([connectorElement.querySelector('.' + connectorPointRight)], [connectorPointRightHover]);
19440
+ if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointLeft))) {
19441
+ addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
19442
+ }
19443
+ if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointRight))) {
19444
+ addClass([connectorElement.querySelector('.' + connectorPointRight)], [connectorPointRightHover]);
19445
+ }
19152
19446
  }
19153
19447
  }
19154
19448
  else if (!fadeConnectorLine) {
@@ -19275,7 +19569,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19275
19569
  var item = this.taskBarEditRecord.ganttProperties;
19276
19570
  this.previousItem = this.parent.timelineModule.extendFunction(item, this.previousItemProperty);
19277
19571
  if (this.taskBarEditAction !== 'ConnectorPointLeftDrag' &&
19278
- this.taskBarEditAction !== 'ConnectorPointRightDrag') {
19572
+ this.taskBarEditAction !== 'ConnectorPointRightDrag' &&
19573
+ !(this.parent.viewType == 'ResourceView' && this.taskBarEditAction == 'ParentDrag')) {
19279
19574
  this.editTooltip.showHideTaskbarEditTooltip(true, this.segmentIndex);
19280
19575
  }
19281
19576
  this.taskBarEditElement.setAttribute('aria-grabbed', 'true');
@@ -19313,6 +19608,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19313
19608
  this.dragMouseLeave = false;
19314
19609
  this.isMouseDragCheck();
19315
19610
  if (this.isMouseDragged && this.taskBarEditAction) {
19611
+ event.preventDefault();
19316
19612
  if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
19317
19613
  var currentElement = this.editElement.parentElement;
19318
19614
  currentElement.style.setProperty("position", "absolute");
@@ -19402,9 +19698,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19402
19698
  this.taskBarEditAction === 'ConnectorPointRightDrag') {
19403
19699
  this.updateConnectorLineSecondProperties(e);
19404
19700
  this.triggerDependencyEvent(e);
19405
- if (!this.parent.isAdaptive) {
19406
- this.drawFalseLine();
19407
- }
19701
+ this.drawFalseLine();
19408
19702
  }
19409
19703
  if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
19410
19704
  if (this.dragMoveY > this.mouseMoveY) {
@@ -19416,7 +19710,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19416
19710
  this.currentItemTop = this.currentItemTop + this.mouseMoveY;
19417
19711
  }
19418
19712
  var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
19419
- this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19713
+ if (this.parent.isAdaptive || e.touches) {
19714
+ this.dragMoveY = e.touches[0].pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19715
+ }
19716
+ else {
19717
+ this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19718
+ }
19420
19719
  this.topValue = this.currentItemTop;
19421
19720
  this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
19422
19721
  this.topValue == this.currentItemTop) ? this.topValue :
@@ -19803,6 +20102,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19803
20102
  if (this.segmentIndex === 0) {
19804
20103
  this.parent.setRecordValue('width', item.width - differenceWidth, item, true);
19805
20104
  this.parent.setRecordValue('left', item.left + differenceWidth, item, true);
20105
+ segment.width = segment.width - differenceWidth;
19806
20106
  for (var i = 1; i < item.segments.length; i++) {
19807
20107
  var segment_3 = segments[i];
19808
20108
  segment_3.left = segment_3.left - differenceWidth;
@@ -20283,6 +20583,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20283
20583
  var traceParentTaskBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentTaskBar);
20284
20584
  var traceParentProgressBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentProgressBar);
20285
20585
  var traceConnectorPointRight = this.taskBarEditElement.querySelector('.' + rightConnectorPointOuterDiv);
20586
+ var segmentConnectorPointRight = taskBarMainContainer$$1.querySelector('.' + rightConnectorPointOuterDiv);
20286
20587
  var manualParentTaskbar = this.taskBarEditElement;
20287
20588
  var manualTaskbar = this.taskBarEditElement.querySelector('.' + manualParentTaskBar);
20288
20589
  var manualParentRight = this.taskBarEditElement.querySelector('.' + manualParentRightResizer);
@@ -20309,6 +20610,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20309
20610
  }
20310
20611
  taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
20311
20612
  taskBarMainContainer$$1.style.width = (width) + 'px';
20613
+ if (segmentedTaskBarContainer && segmentConnectorPointRight) {
20614
+ segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
20615
+ }
20312
20616
  if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
20313
20617
  (this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
20314
20618
  taskBarMainContainer$$1.style.setProperty('top', (this.topValue) + 'px');
@@ -20425,9 +20729,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20425
20729
  }
20426
20730
  if (segmentedTaskBarContainer) {
20427
20731
  taskBarRightResizer$$1.style.setProperty(position, rightResizer + 'px');
20428
- traceChildProgressBar$$1.style.width = (segment.progressWidth) + 'px';
20732
+ traceChildProgressBar$$1.style.width = (segment.width) + 'px';
20429
20733
  if (!isNullOrUndefined(childProgressResizer$$1)) {
20430
- childProgressResizer$$1.style.setProperty(position, segment.progressWidth - 10 + 'px');
20734
+ childProgressResizer$$1.style.setProperty(position, segment.width - 10 + 'px');
20431
20735
  }
20432
20736
  }
20433
20737
  }
@@ -20497,9 +20801,6 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20497
20801
  this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor && (!this.connectorSecondRecord.hasChildRecords ||
20498
20802
  this.connectorSecondRecord.hasChildRecords && this.parent.allowParentDependency)) {
20499
20803
  this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
20500
- if (this.parent.UpdateOffsetOnTaskbarEdit) {
20501
- this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
20502
- }
20503
20804
  }
20504
20805
  else {
20505
20806
  if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
@@ -20789,6 +21090,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20789
21090
  TaskbarEdit.prototype.updateConnectorLineSecondProperties = function (e) {
20790
21091
  var target = this.getElementByPosition(e);
20791
21092
  var element = parentsUntil$1(target, taskBarMainContainer);
21093
+ var isBigger = document.body.className.includes("e-bigger");
20792
21094
  this.connectorSecondAction = null;
20793
21095
  var scrollTop = 0;
20794
21096
  if (parentsUntil$1(target, connectorPointLeft)) {
@@ -20811,20 +21113,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20811
21113
  if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
20812
21114
  !this.elementOffsetLeft) || !this.parent.enableVirtualization) {
20813
21115
  if (!this.parent.allowParentDependency) {
20814
- this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
21116
+ this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
20815
21117
  this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
20816
21118
  }
20817
21119
  else {
20818
21120
  if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
20819
- this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft;
21121
+ this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
20820
21122
  this.elementOffsetTop = ((this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
20821
21123
  }
20822
21124
  else {
20823
- this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
21125
+ this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
20824
21126
  this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
20825
21127
  }
20826
21128
  }
20827
- this.elementOffsetWidth = this.realTaskbarElement.offsetWidth;
21129
+ this.elementOffsetWidth = this.realTaskbarElement.offsetWidth + ((isBigger) ? 20 : 0);
20828
21130
  this.elementOffsetHeight = this.realTaskbarElement.offsetHeight;
20829
21131
  }
20830
21132
  this.showHideTaskBarEditingElements(element, this.highlightedSecondElement, true);
@@ -20932,18 +21234,16 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20932
21234
  // Get XY coordinates for touch and non-touch device
20933
21235
  TaskbarEdit.prototype.getCoordinate = function (event) {
20934
21236
  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;
21237
+ var e = event;
21238
+ coordinates.pageX = e.pageX;
21239
+ coordinates.pageY = e.pageY;
21240
+ if (event && event.type !== 'click') {
21241
+ var e_1 = event;
21242
+ if (e_1.type === 'touchmove' || e_1.type === 'touchstart' || e_1.type === 'touchend') {
21243
+ coordinates.pageX = e_1.changedTouches[0].pageX;
21244
+ coordinates.pageY = e_1.changedTouches[0].pageY;
20940
21245
  }
20941
21246
  }
20942
- else if (event) {
20943
- var e = event;
20944
- coordinates.pageX = e.pageX;
20945
- coordinates.pageY = e.pageY;
20946
- }
20947
21247
  return coordinates;
20948
21248
  };
20949
21249
  // Get current target element by mouse position
@@ -21895,7 +22195,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21895
22195
  if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
21896
22196
  this.updateScheduleFields(dialog, ganttProp, 'endDate');
21897
22197
  }
21898
- if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName) {
22198
+ if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName || ganttProp.duration >= 0) {
21899
22199
  this.updateScheduleFields(dialog, ganttProp, 'duration');
21900
22200
  }
21901
22201
  if (!isNullOrUndefined(tasks.work) && tasks.work !== colName) {
@@ -22053,17 +22353,33 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22053
22353
  var ganttProp = currentData.ganttProperties;
22054
22354
  var taskSettings = ganttObj.taskFields;
22055
22355
  if (taskSettings.duration === columnName) {
22056
- if (!isNullOrUndefined(value) && value !== '') {
22356
+ if (!isNullOrUndefined(value) && value !== '' && parseInt(value) >= 0) {
22057
22357
  ganttObj.dataOperation.updateDurationValue(value, ganttProp);
22058
22358
  this.parent.setRecordValue(taskSettings.duration, value, currentData);
22059
22359
  this.parent.setRecordValue('taskData.' + taskSettings.duration, ganttProp.duration, currentData);
22360
+ this.validateDuration(currentData);
22060
22361
  }
22061
22362
  else {
22062
22363
  if (ganttObj.allowUnscheduledTasks) {
22063
- this.parent.setRecordValue('duration', null, ganttProp, true);
22364
+ if ((ganttProp.startDate && ganttProp.endDate && ganttProp.startDate.getTime() > ganttProp.endDate.getTime()) || value.indexOf('-') !== -1) {
22365
+ this.parent.setRecordValue('duration', 0, ganttProp, true);
22366
+ if (ganttProp.endDate) {
22367
+ this.parent.setRecordValue('startDate', ganttProp.endDate, ganttProp, true);
22368
+ }
22369
+ }
22370
+ else {
22371
+ if (value === "") {
22372
+ this.parent.setRecordValue('duration', null, ganttProp, true);
22373
+ if (ganttProp.endDate) {
22374
+ this.parent.setRecordValue('endDate', null, ganttProp, true);
22375
+ }
22376
+ }
22377
+ else {
22378
+ this.parent.setRecordValue('duration', ganttProp.duration, ganttProp, true);
22379
+ }
22380
+ }
22064
22381
  }
22065
22382
  }
22066
- this.validateDuration(currentData);
22067
22383
  this.parent.editModule.updateResourceRelatedFields(currentData, 'duration');
22068
22384
  }
22069
22385
  if (taskSettings.startDate === columnName) {
@@ -22071,13 +22387,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22071
22387
  var startDate = this.parent.dateValidationModule.getDateFromFormat(value);
22072
22388
  startDate = this.parent.dateValidationModule.checkStartDate(startDate, ganttProp);
22073
22389
  this.parent.setRecordValue('startDate', startDate, ganttProp, true);
22390
+ this.validateStartDate(currentData);
22074
22391
  }
22075
22392
  else {
22076
22393
  if (ganttObj.allowUnscheduledTasks && !(currentData.hasChildRecords)) {
22077
22394
  this.parent.setRecordValue('startDate', null, ganttProp, true);
22395
+ this.parent.setRecordValue('duration', null, ganttProp, true);
22396
+ this.parent.setRecordValue('isMilestone', false, ganttProp, true);
22078
22397
  }
22079
22398
  }
22080
- this.validateStartDate(currentData);
22081
22399
  }
22082
22400
  if (taskSettings.endDate === columnName) {
22083
22401
  if (value !== '') {
@@ -22092,13 +22410,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22092
22410
  if (isNullOrUndefined(ganttProp.startDate) || endDate.getTime() > (ganttProp.startDate).getTime()) {
22093
22411
  this.parent.setRecordValue('endDate', endDate, ganttProp, true);
22094
22412
  }
22413
+ this.validateEndDate(currentData);
22095
22414
  }
22096
22415
  else {
22097
22416
  if (ganttObj.allowUnscheduledTasks) {
22098
22417
  this.parent.setRecordValue('endDate', null, ganttProp, true);
22418
+ this.parent.setRecordValue('duration', null, ganttProp, true);
22419
+ this.parent.setRecordValue('isMilestone', false, ganttProp, true);
22099
22420
  }
22100
22421
  }
22101
- this.validateEndDate(currentData);
22102
22422
  }
22103
22423
  if (taskSettings.work === columnName) {
22104
22424
  if (!isNullOrUndefined(value) && value !== '') {
@@ -22505,7 +22825,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22505
22825
  var eDate = getValue('endDate', selectedItem);
22506
22826
  var duration = getValue('duration', selectedItem);
22507
22827
  var startDate_1 = !isNullOrUndefined(gridData) && gridData.length > 0 ?
22508
- !isNullOrUndefined(taskFields.endDate) ? new Date(getValue('endDate', gridData[0]).getTime()) :
22828
+ (!isNullOrUndefined(taskFields.endDate) && !isNullOrUndefined(gridData[0].endDate)) ? new Date(getValue('endDate', gridData[0]).getTime()) :
22509
22829
  new Date(getValue('startDate', gridData[0]).getTime()) :
22510
22830
  !isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate) &&
22511
22831
  new Date(this.beforeOpenArgs.rowData.ganttProperties.startDate.getTime());
@@ -25205,10 +25525,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25205
25525
  this.parent.predecessorModule.isValidatedParentTaskID = '';
25206
25526
  }
25207
25527
  if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
25208
- (args.action === "DrawConnectorLine") || (args.action === "DialogEditing")) {
25528
+ (args.action === "DrawConnectorLine")) {
25209
25529
  this.updateChildItems(ganttRecord);
25210
25530
  }
25211
25531
  this.updateParentItemOnEditing();
25532
+ this.parent.dataOperation.updateParentItems(ganttRecord, true);
25212
25533
  }
25213
25534
  /** Update parent up-to zeroth level */
25214
25535
  if (ganttRecord.parentItem) {
@@ -25221,6 +25542,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25221
25542
  this.updateParentItemOnEditing();
25222
25543
  }
25223
25544
  }
25545
+ if (this.parent.UpdateOffsetOnTaskbarEdit && this.parent.connectorLineEditModule && args.data) {
25546
+ this.parent.connectorLineEditModule['calculateOffset'](args.data);
25547
+ }
25548
+ this.parent.predecessorModule['validatedParentIds'] = [];
25224
25549
  this.initiateSaveAction(args);
25225
25550
  };
25226
25551
  Edit$$1.prototype.updateParentItemOnEditing = function () {
@@ -25240,7 +25565,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25240
25565
  */
25241
25566
  Edit$$1.prototype.updateParentChildRecord = function (data) {
25242
25567
  var ganttRecord = data;
25243
- if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
25568
+ 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
25569
  this.updateChildItems(ganttRecord);
25245
25570
  }
25246
25571
  if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
@@ -25716,6 +26041,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25716
26041
  this.updateScheduleDatesOnEditing(args);
25717
26042
  }
25718
26043
  }
26044
+ if (this.parent.enableCriticalPath) {
26045
+ var criticalModule = this.parent.criticalPathModule;
26046
+ criticalModule.showCriticalPath(true);
26047
+ criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
26048
+ }
25719
26049
  if (!this.parent.editSettings.allowTaskbarEditing || (this.parent.editSettings.allowTaskbarEditing &&
25720
26050
  !this.taskbarEditModule.dependencyCancel)) {
25721
26051
  eventArgs.requestType = 'save';
@@ -25729,11 +26059,6 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25729
26059
  eventArgs.taskBarEditAction = args.taskBarEditAction;
25730
26060
  }
25731
26061
  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
26062
  this.parent.trigger('actionComplete', eventArgs);
25738
26063
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
25739
26064
  this.parent.hideMaskRow();
@@ -25919,7 +26244,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25919
26244
  if (!this.parent.taskFields.parentID) {
25920
26245
  var deleteRecordIDs = [];
25921
26246
  deleteRecordIDs.push(deletedRow.ganttProperties.rowUniqueID.toString());
25922
- this.parent.editModule.removeFromDataSource(deleteRecordIDs);
26247
+ if (this.parent.viewType === 'ProjectView') {
26248
+ this.parent.editModule.removeFromDataSource(deleteRecordIDs);
26249
+ }
25923
26250
  }
25924
26251
  var flatRecordIndex = this.parent.flatData.indexOf(deletedRow);
25925
26252
  if (gObj.taskFields.parentID) {
@@ -29063,7 +29390,24 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
29063
29390
  * @returns {Object[]} .
29064
29391
  */
29065
29392
  Selection$$1.prototype.getSelectedRecords = function () {
29066
- return this.parent.treeGrid.getSelectedRecords();
29393
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
29394
+ var selectedRows = [];
29395
+ var selectedIndexes_1 = this.parent.selectionModule.getSelectedRowIndexes();
29396
+ var _loop_1 = function (i) {
29397
+ var rec = this_1.parent.currentViewData.filter(function (data) {
29398
+ return data.index == selectedIndexes_1[i];
29399
+ })[0];
29400
+ selectedRows.push(rec);
29401
+ };
29402
+ var this_1 = this;
29403
+ for (var i = 0; i < selectedIndexes_1.length; i++) {
29404
+ _loop_1(i);
29405
+ }
29406
+ return selectedRows;
29407
+ }
29408
+ else {
29409
+ return this.parent.treeGrid.getSelectedRecords();
29410
+ }
29067
29411
  };
29068
29412
  /**
29069
29413
  * Get the selected records for cell selection.
@@ -29163,19 +29507,19 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
29163
29507
  records = [records];
29164
29508
  }
29165
29509
  var ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
29166
- var _loop_1 = function (i) {
29510
+ var _loop_2 = function (i) {
29167
29511
  var selectedRow = ganttRow.filter(function (e) {
29168
29512
  // eslint-disable-next-line
29169
29513
  return parseInt(e.getAttribute('aria-rowindex'), 0) === records[i];
29170
29514
  })[0];
29171
29515
  if (!isNullOrUndefined(selectedRow)) {
29172
29516
  // eslint-disable-next-line
29173
- this_1.getSelectedRowIndexes().indexOf(records[i]) > -1 ? this_1.addClass(selectedRow) : this_1.removeClass(selectedRow);
29517
+ this_2.getSelectedRowIndexes().indexOf(records[i]) > -1 ? this_2.addClass(selectedRow) : this_2.removeClass(selectedRow);
29174
29518
  }
29175
29519
  };
29176
- var this_1 = this;
29520
+ var this_2 = this;
29177
29521
  for (var i = 0; i < records.length; i++) {
29178
- _loop_1(i);
29522
+ _loop_2(i);
29179
29523
  }
29180
29524
  };
29181
29525
  Selection$$1.prototype.addClass = function (selectedRow) {
@@ -29728,6 +30072,14 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
29728
30072
  var edit = gObj.editSettings;
29729
30073
  var gID = this.id;
29730
30074
  var ind = gObj.selectedRowIndex;
30075
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
30076
+ for (var i = 0; i < gObj.updatedRecords.length; i++) {
30077
+ if (gObj.updatedRecords[i].index === ind) {
30078
+ ind = i;
30079
+ break;
30080
+ }
30081
+ }
30082
+ }
29731
30083
  var previousGanttRecord;
29732
30084
  var isSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length === 1 ||
29733
30085
  gObj.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
@@ -30262,6 +30614,7 @@ var DayMarkers = /** @__PURE__ @class */ (function () {
30262
30614
  /** @hidden */
30263
30615
  var CriticalPath = /** @__PURE__ @class */ (function () {
30264
30616
  function CriticalPath(parent) {
30617
+ this.validatedids = [];
30265
30618
  this.resourceCollectionIds = [];
30266
30619
  this.criticalTasks = [];
30267
30620
  this.parent = parent;
@@ -30288,6 +30641,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30288
30641
  var collectionTaskId = [];
30289
30642
  var fromDataObject = [];
30290
30643
  var criticalPathIds = [];
30644
+ this.criticalTasks = [];
30291
30645
  /* eslint-disable-next-line */
30292
30646
  if (parentRecords[0].ganttProperties.autoEndDate > parentRecords[0].ganttProperties.endDate && !parentRecords[0].ganttProperties.isAutoSchedule) {
30293
30647
  checkEndDate = parentRecords[0].ganttProperties.autoEndDate;
@@ -30484,6 +30838,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30484
30838
  this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, totalRecords, modelIds);
30485
30839
  }
30486
30840
  criticalPathIds = this.finalCriticalPath(collection, taskBeyondEnddate, totalRecords, modelIds, checkEndDate);
30841
+ this.validatedids = [];
30487
30842
  this.criticalPathCollection = criticalPathIds;
30488
30843
  this.detailPredecessorCollection = collection;
30489
30844
  this.predecessorCollectionTaskIds = collectionTaskId;
@@ -30863,73 +31218,69 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30863
31218
  return this.parent.dataOperation.getDuration(startDate, endDate, durationUnit, record.ganttProperties.isAutoSchedule, true);
30864
31219
  }
30865
31220
  };
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
- }
31221
+ CriticalPath.prototype.updateCriticalTasks = function (record, criticalPathIds) {
31222
+ for (var i = 0; i < record.ganttProperties.predecessor.length; i++) {
31223
+ var fromRecord = void 0;
31224
+ if (this.parent.viewType === 'ProjectView') {
31225
+ fromRecord = this.parent.getRecordByID(record.ganttProperties.predecessor[i].from);
31226
+ }
31227
+ else {
31228
+ var resourceIndex = this.resourceCollectionIds.indexOf(record.ganttProperties.predecessor[i].from.toString());
31229
+ fromRecord = this.parent.flatData[resourceIndex];
31230
+ }
31231
+ var durationDiff = void 0;
31232
+ if (record.ganttProperties.endDate.getTime() >= this.maxEndDate.getTime()) {
31233
+ record.ganttProperties.slack = record.slack = 0 + ' ' + record.ganttProperties.durationUnit;
31234
+ if (record.ganttProperties.progress < 100) {
31235
+ record.isCritical = true;
31236
+ record.ganttProperties.isCritical = true;
31237
+ if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
31238
+ criticalPathIds.push(parseInt(record.ganttProperties.taskId));
30894
31239
  }
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
- }
31240
+ }
31241
+ }
31242
+ if (fromRecord) {
31243
+ if (record.ganttProperties.predecessor[i].type == 'FS') {
31244
+ durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31245
+ }
31246
+ else if (record.ganttProperties.predecessor[i].type == 'SS') {
31247
+ durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.startDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31248
+ }
31249
+ else if (record.ganttProperties.predecessor[i].type == 'FF') {
31250
+ durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.endDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31251
+ }
31252
+ else if (record.ganttProperties.predecessor[i].type == 'SF') {
31253
+ durationDiff = this.parent.dataOperation.getDuration(record.ganttProperties.endDate, fromRecord.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
31254
+ }
31255
+ if (durationDiff == 0 && this.validatedids.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.taskId != record.ganttProperties.taskId) {
31256
+ fromRecord.ganttProperties.slack = record.ganttProperties.slack;
31257
+ fromRecord.slack = record.slack;
31258
+ fromRecord.isCritical = record.ganttProperties.isCritical;
31259
+ fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
31260
+ if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
31261
+ this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
31262
+ criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
31263
+ }
31264
+ if (fromRecord.ganttProperties.predecessorsName) {
31265
+ this.updateCriticalTasks(fromRecord, criticalPathIds);
30904
31266
  }
30905
31267
  }
30906
31268
  }
30907
31269
  }
30908
- for (var x = 0; x < indexes.length; x++) {
31270
+ };
31271
+ /* eslint-disable-next-line */
31272
+ CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
31273
+ var criticalPathIds = [];
31274
+ var index;
31275
+ var predecessorFrom;
31276
+ for (var x = collection.length - 1; x >= 0; x--) {
30909
31277
  if (this.parent.viewType === 'ProjectView') {
30910
- index = modelRecordIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['ganttProperties']['taskId'].toString());
31278
+ index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
30911
31279
  }
30912
31280
  else {
30913
- index = this.resourceCollectionIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['TaskID'].toString());
31281
+ index = this.resourceCollectionIds.indexOf(collection[x]['taskid'].toString());
30914
31282
  }
30915
31283
  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
31284
  var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
30934
31285
  for (var i = predecessorLength.length - 1; i >= 0; i--) {
30935
31286
  var toID = void 0;
@@ -30942,6 +31293,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30942
31293
  var dateDifference = void 0;
30943
31294
  var currentData = flatRecords[index].ganttProperties;
30944
31295
  if (predecessorLength[i].type === 'FS') {
31296
+ /* eslint-disable-next-line */
30945
31297
  if (predecessorLength[i].to != currentData.taskId.toString() || this.parent.viewType === 'ResourceView') {
30946
31298
  /* eslint-disable-next-line */
30947
31299
  dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
@@ -30993,8 +31345,28 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
30993
31345
  flatRecords[index].isCritical = true;
30994
31346
  flatRecords[index].ganttProperties.isCritical = true;
30995
31347
  this.criticalTasks.push(flatRecords[index]);
30996
- var num_1 = flatRecords[parseInt(index.toString(), 10)]['ganttProperties']['taskId'];
30997
- criticalPathIds.push(num_1);
31348
+ if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
31349
+ criticalPathIds.push(collection[x]['taskid']);
31350
+ }
31351
+ }
31352
+ }
31353
+ if (flatRecords[index].ganttProperties.predecessor.length > 0) {
31354
+ this.updateCriticalTasks(flatRecords[index], criticalPathIds);
31355
+ }
31356
+ }
31357
+ if (taskBeyondEnddate.length > 0) {
31358
+ for (var i = 0; i < taskBeyondEnddate.length; i++) {
31359
+ if (this.parent.viewType === 'ProjectView') {
31360
+ index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
31361
+ }
31362
+ else {
31363
+ index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
31364
+ }
31365
+ if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
31366
+ this.criticalTasks.push(flatRecords[index]);
31367
+ if (criticalPathIds.indexOf(taskBeyondEnddate[i]) === -1) {
31368
+ criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
31369
+ }
30998
31370
  }
30999
31371
  }
31000
31372
  }
@@ -31039,7 +31411,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31039
31411
  }
31040
31412
  }
31041
31413
  /* eslint-disable-next-line */
31042
- if (this_2.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
31414
+ if (this_2.parent.allowUnscheduledTasks && criticalData && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
31043
31415
  taskClass = criticalUnscheduledTask;
31044
31416
  }
31045
31417
  else {
@@ -32102,8 +32474,16 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
32102
32474
  var dragElement = this.parent.element.querySelector('.e-ganttdrag');
32103
32475
  var ganttTop = this.parent.element.getClientRects()[0].top;
32104
32476
  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;
32477
+ var left;
32478
+ var top;
32479
+ if (this.parent.isAdaptive) {
32480
+ left = args.originalEvent.event.touches[0].clientX - ganttLeft;
32481
+ top = args.originalEvent.event.touches[0].clientY - ganttTop;
32482
+ }
32483
+ else {
32484
+ left = getValue('event', args.originalEvent).clientX - ganttLeft;
32485
+ top = getValue('event', args.originalEvent).clientY - ganttTop;
32486
+ }
32107
32487
  dragElement.style.left = left + 20 + 'px';
32108
32488
  dragElement.style.top = top + 20 + 'px';
32109
32489
  this.parent.trigger('rowDrag', args);
@@ -32984,6 +33364,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
32984
33364
  ganttStyle.taskbar.progressColor = new PdfColor(33, 82, 125);
32985
33365
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
32986
33366
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33367
+ ganttStyle.taskbar.baselineColor = new PdfColor(240, 173, 78);
33368
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(240, 173, 78);
32987
33369
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
32988
33370
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
32989
33371
  ganttStyle.taskbar.parentTaskColor = new PdfColor(119, 119, 119);
@@ -33004,6 +33386,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
33004
33386
  ganttStyle.taskbar.progressColor = new PdfColor(0, 86, 179);
33005
33387
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
33006
33388
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33389
+ ganttStyle.taskbar.baselineColor = new PdfColor(255, 193, 7);
33390
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(255, 193, 7);
33007
33391
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
33008
33392
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
33009
33393
  ganttStyle.taskbar.parentTaskColor = new PdfColor(108, 117, 125);
@@ -33026,6 +33410,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
33026
33410
  ganttStyle.taskbar.progressColor = new PdfColor(0, 91, 163);
33027
33411
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
33028
33412
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33413
+ ganttStyle.taskbar.baselineColor = new PdfColor(216, 59, 1);
33414
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(216, 59, 1);
33029
33415
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
33030
33416
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
33031
33417
  ganttStyle.taskbar.parentTaskColor = new PdfColor(118, 118, 118);
@@ -33046,6 +33432,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
33046
33432
  ganttStyle.taskbar.progressColor = new PdfColor(63, 81, 181);
33047
33433
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
33048
33434
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
33435
+ ganttStyle.taskbar.baselineColor = new PdfColor(193, 87, 0);
33436
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(193, 87, 0);
33049
33437
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
33050
33438
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
33051
33439
  ganttStyle.taskbar.parentTaskColor = new PdfColor(132, 132, 132);
@@ -33615,7 +34003,7 @@ var PdfTreeGridLayouter = /** @__PURE__ @class */ (function (_super) {
33615
34003
  var startColumn = 0;
33616
34004
  var endColumn = 0;
33617
34005
  var cellWidths = 0;
33618
- var availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;
34006
+ var availableWidth = pointToPixel(this.currentGraphics.clientSize.width) - this.currentBounds.x;
33619
34007
  for (var i = 0; i < this.treegrid.columns.count; i++) {
33620
34008
  cellWidths += this.treegrid.columns.getColumn(i).width;
33621
34009
  if (cellWidths >= availableWidth) {
@@ -33843,6 +34231,7 @@ var PdfTreeGridLayouter = /** @__PURE__ @class */ (function (_super) {
33843
34231
  var size = new SizeF(column.width, height);
33844
34232
  if (cell.columnSpan > 1) {
33845
34233
  size = new SizeF(cell.width, height);
34234
+ i += cell.columnSpan;
33846
34235
  }
33847
34236
  if (!this.checkIfDefaultFormat(column.format) && this.checkIfDefaultFormat(cell.style.format)) {
33848
34237
  cell.style.format = column.format;
@@ -34229,12 +34618,15 @@ var PdfTreeGrid = /** @__PURE__ @class */ (function (_super) {
34229
34618
  colSpan = cell.columnSpan;
34230
34619
  currentCellIndex = j;
34231
34620
  cell.isCellMergeStart = true;
34621
+ var totalColumnWidth = this.columns.columns[currentCellIndex].width;
34232
34622
  //Set Column merges.
34233
34623
  while (colSpan > 1) {
34234
34624
  currentCellIndex++;
34235
34625
  row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
34236
34626
  colSpan--;
34627
+ totalColumnWidth += this.columns.columns[currentCellIndex].width;
34237
34628
  }
34629
+ cell.width = totalColumnWidth;
34238
34630
  }
34239
34631
  else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
34240
34632
  rowSpan = cell.rowSpan;
@@ -34299,15 +34691,12 @@ var PdfTreeGrid = /** @__PURE__ @class */ (function (_super) {
34299
34691
  colSpan = cell.columnSpan;
34300
34692
  currentCellIndex = j;
34301
34693
  cell.isCellMergeStart = true;
34302
- var totalColumnWidth = this.columns.columns[currentCellIndex].width;
34303
34694
  //set Column merges.
34304
34695
  while (colSpan > 1) {
34305
34696
  currentCellIndex++;
34306
34697
  row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
34307
34698
  colSpan--;
34308
- totalColumnWidth += this.columns.columns[currentCellIndex].width;
34309
34699
  }
34310
- cell.width = totalColumnWidth;
34311
34700
  }
34312
34701
  else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
34313
34702
  rowSpan = cell.rowSpan;
@@ -34519,11 +34908,11 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
34519
34908
  if (this.finishedDrawingCell) {
34520
34909
  temp = (this.remainingString === '') ? this.remainingString : this.value;
34521
34910
  /* 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);
34911
+ 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
34912
  }
34524
34913
  else {
34525
34914
  /* eslint-disable-next-line */
34526
- graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, this.style.format);
34915
+ graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, this.style.format);
34527
34916
  }
34528
34917
  result = graphics.stringLayoutResult;
34529
34918
  }
@@ -35250,8 +35639,101 @@ var PdfTreeGridColumnCollection = /** @__PURE__ @class */ (function () {
35250
35639
  */
35251
35640
  var ExportHelper = /** @__PURE__ @class */ (function () {
35252
35641
  function ExportHelper(parent) {
35642
+ this.totalColumnWidth = 0;
35643
+ this.beforeSinglePageExport = {};
35644
+ this.baselineHeight = 8;
35253
35645
  this.parent = parent;
35254
35646
  }
35647
+ ExportHelper.prototype.processToFit = function () {
35648
+ this.beforeSinglePageExport['zoomingProjectStartDate'] = this.parent.zoomingProjectStartDate;
35649
+ this.beforeSinglePageExport['zoomingProjectEndDate'] = this.parent.zoomingProjectEndDate;
35650
+ this.beforeSinglePageExport['cloneProjectStartDate'] = this.parent.cloneProjectStartDate;
35651
+ this.beforeSinglePageExport['cloneProjectEndDate'] = this.parent.cloneProjectEndDate;
35652
+ this.beforeSinglePageExport['customTimelineSettings'] = extend({}, this.parent.timelineModule.customTimelineSettings, null, true);
35653
+ this.beforeSinglePageExport['isTimelineRoundOff'] = this.parent.isTimelineRoundOff;
35654
+ this.beforeSinglePageExport['topTier'] = this.parent.timelineModule.topTier;
35655
+ this.beforeSinglePageExport['topTierCellWidth'] = this.parent.timelineModule.topTierCellWidth;
35656
+ this.beforeSinglePageExport['topTierCollection'] = this.parent.timelineModule.topTierCollection;
35657
+ this.beforeSinglePageExport['bottomTier'] = this.parent.timelineModule.bottomTier;
35658
+ this.beforeSinglePageExport['bottomTierCellWidth'] = this.parent.timelineModule.bottomTierCellWidth;
35659
+ this.beforeSinglePageExport['bottomTierCollection'] = this.parent.timelineModule.bottomTierCollection;
35660
+ this.beforeSinglePageExport['totalTimelineWidth'] = this.parent.timelineModule.totalTimelineWidth;
35661
+ this.beforeSinglePageExport['timelineStartDate'] = this.parent.timelineModule.timelineStartDate;
35662
+ this.beforeSinglePageExport['timelineEndDate'] = this.parent.timelineModule.timelineEndDate;
35663
+ this.beforeSinglePageExport['timelineRoundOffEndDate'] = this.parent.timelineModule.timelineRoundOffEndDate;
35664
+ this.beforeSinglePageExport['perDayWidth'] = this.parent.perDayWidth;
35665
+ this.beforeSinglePageExport['updatedConnectorLineCollection'] = extend([], this.parent.updatedConnectorLineCollection, null, true);
35666
+ this.parent.timelineModule.isZoomToFit = true;
35667
+ this.parent.timelineModule.isZooming = false;
35668
+ if (!this.parent.zoomingProjectStartDate) {
35669
+ this.parent.zoomingProjectStartDate = this.parent.cloneProjectStartDate;
35670
+ this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
35671
+ }
35672
+ if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
35673
+ this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
35674
+ }
35675
+ this.parent.dataOperation.calculateProjectDates();
35676
+ var timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
35677
+ var totalDays = (timeDifference / (1000 * 3600 * 24));
35678
+ var chartsideWidth;
35679
+ var gridWidth;
35680
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
35681
+ gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
35682
+ }
35683
+ if (this.exportProps.fitToWidthSettings.chartWidth) {
35684
+ chartsideWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
35685
+ }
35686
+ else {
35687
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
35688
+ chartsideWidth = 100 - gridWidth;
35689
+ }
35690
+ else {
35691
+ chartsideWidth = 70;
35692
+ }
35693
+ }
35694
+ var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * chartsideWidth) / 100;
35695
+ var chartWidth = pdfwidth;
35696
+ var perDayWidth = chartWidth / totalDays;
35697
+ var zoomingLevel;
35698
+ var firstValue;
35699
+ var secondValue;
35700
+ var zoomingCollections = this.parent.zoomingLevels.slice();
35701
+ var sortedCollectons = zoomingCollections.sort(function (a, b) {
35702
+ return (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1);
35703
+ });
35704
+ if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
35705
+ return;
35706
+ }
35707
+ for (var i = 0; i < sortedCollectons.length; i++) {
35708
+ firstValue = sortedCollectons[i];
35709
+ if (i === sortedCollectons.length - 1) {
35710
+ zoomingLevel = sortedCollectons[i];
35711
+ break;
35712
+ }
35713
+ else {
35714
+ secondValue = sortedCollectons[i + 1];
35715
+ }
35716
+ if (perDayWidth >= firstValue.perDayWidth) {
35717
+ zoomingLevel = sortedCollectons[i];
35718
+ break;
35719
+ }
35720
+ if (perDayWidth < firstValue.perDayWidth && perDayWidth > secondValue.perDayWidth) {
35721
+ zoomingLevel = sortedCollectons[i + 1];
35722
+ break;
35723
+ }
35724
+ }
35725
+ var newTimeline = extend({}, {}, zoomingLevel, true);
35726
+ this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
35727
+ this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
35728
+ var numberOfCells = this.parent.timelineModule['calculateNumberOfTimelineCells'](newTimeline);
35729
+ var scrollHeight = this.parent.pdfExportModule['pdfPageDimensions'].height; //17 is horizontal scrollbar width
35730
+ var contentHeight = this.parent.pdfExportModule['pdfPageDimensions'].height;
35731
+ var emptySpace = contentHeight <= scrollHeight ? 0 : 17;
35732
+ newTimeline.timelineUnitSize = Math.abs((chartWidth - emptySpace)) / numberOfCells;
35733
+ this.parent.timelineModule['changeTimelineSettings'](newTimeline);
35734
+ this.parent.timelineModule.isZoomToFit = false;
35735
+ this.parent.timelineModule.isZooming = false;
35736
+ };
35255
35737
  /**
35256
35738
  * @param {IGanttData[]} data .
35257
35739
  * @param {PdfGantt} gantt .
@@ -35273,11 +35755,16 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35273
35755
  this.gantt.style.cellPadding.right = 0;
35274
35756
  this.ganttStyle = this.gantt.ganttStyle;
35275
35757
  this.gantt.borderColor = this.ganttStyle.chartGridLineColor;
35758
+ this.parent.pdfExportModule.isPdfExport = true;
35759
+ if (this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
35760
+ this.processToFit();
35761
+ }
35276
35762
  this.processHeaderContent();
35277
35763
  this.processGanttContent();
35278
35764
  this.processTimeline();
35279
35765
  this.processTaskbar();
35280
35766
  this.processPredecessor();
35767
+ this.parent.pdfExportModule.isPdfExport = false;
35281
35768
  };
35282
35769
  ExportHelper.prototype.processHeaderContent = function () {
35283
35770
  var _this = this;
@@ -35333,7 +35820,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35333
35820
  this.renderEmptyGantt();
35334
35821
  }
35335
35822
  else {
35336
- this.flatData.forEach(function (data) {
35823
+ var flatData = void 0;
35824
+ flatData = this.flatData;
35825
+ flatData.forEach(function (data) {
35337
35826
  _this.row = _this.gantt.rows.addRow();
35338
35827
  if (data.hasChildRecords) {
35339
35828
  _this.gantt.rows.getRow(_this.rowIndex).isParentRow = true;
@@ -35342,6 +35831,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35342
35831
  else {
35343
35832
  _this.processRecordRow(data);
35344
35833
  }
35834
+ if (_this.exportProps.fitToWidthSettings && _this.exportProps.fitToWidthSettings.isFitToWidth) {
35835
+ _this.row.height = 33.33;
35836
+ }
35345
35837
  _this.rowIndex++;
35346
35838
  });
35347
35839
  }
@@ -35393,7 +35885,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35393
35885
  else {
35394
35886
  predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
35395
35887
  }
35396
- predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
35888
+ _this.ganttStyle.connectorLineColor = predecessor.connectorLineColor;
35397
35889
  _this.gantt.predecessorCollection.push(predecessor);
35398
35890
  });
35399
35891
  this.parent.pdfExportModule.isPdfExport = false;
@@ -35458,7 +35950,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35458
35950
  */
35459
35951
  ExportHelper.prototype.processTaskbar = function () {
35460
35952
  var _this = this;
35461
- this.flatData.forEach(function (data) {
35953
+ var flatData;
35954
+ flatData = this.flatData;
35955
+ flatData.forEach(function (data) {
35462
35956
  var taskbar = _this.gantt.taskbar.add();
35463
35957
  var ganttProp = data.ganttProperties;
35464
35958
  taskbar.left = ganttProp.left;
@@ -35489,7 +35983,22 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35489
35983
  taskbar.startDate = ganttProp.startDate;
35490
35984
  taskbar.endDate = ganttProp.endDate;
35491
35985
  taskbar.height = _this.parent.chartRowsModule.taskBarHeight;
35986
+ if (_this.parent.renderBaseline) {
35987
+ var height = void 0;
35988
+ if ((taskbar.height + _this.baselineHeight) <= _this.parent.rowHeight) {
35989
+ height = taskbar.height;
35990
+ }
35991
+ else {
35992
+ height = taskbar.height - (_this.baselineHeight + 1);
35993
+ }
35994
+ taskbar.height = height;
35995
+ }
35996
+ taskbar.baselineTop = _this.parent.chartRowsModule.baselineTop;
35492
35997
  taskbar.isMilestone = ganttProp.isMilestone;
35998
+ taskbar.baselineStartDate = ganttProp.baselineStartDate;
35999
+ taskbar.baselineEndDate = ganttProp.baselineEndDate;
36000
+ taskbar.baselineLeft = ganttProp.baselineLeft;
36001
+ taskbar.baselineWidth = ganttProp.baselineWidth;
35493
36002
  taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.milestoneColor);
35494
36003
  taskbar.isParentTask = data.hasChildRecords;
35495
36004
  if (ganttProp.isMilestone) {
@@ -35520,6 +36029,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35520
36029
  taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
35521
36030
  taskbar.progressColor = new PdfColor(_this.ganttStyle.taskbar.criticalProgressColor);
35522
36031
  taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskBorderColor);
36032
+ taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
35523
36033
  }
35524
36034
  else {
35525
36035
  taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.taskColor);
@@ -35527,6 +36037,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35527
36037
  taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.taskBorderColor);
35528
36038
  }
35529
36039
  }
36040
+ taskbar.baselineColor = new PdfColor(_this.ganttStyle.taskbar.baselineColor);
36041
+ taskbar.baselineBorderColor = new PdfColor(_this.ganttStyle.taskbar.baselineBorderColor);
35530
36042
  taskbar.gridLineColor = new PdfColor(_this.ganttStyle.chartGridLineColor);
35531
36043
  _this.gantt.taskbarCollection.push(taskbar);
35532
36044
  var taskStyle = {};
@@ -35535,6 +36047,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35535
36047
  taskStyle.taskBorderColor = taskbar.taskBorderColor;
35536
36048
  taskStyle.progressColor = taskbar.progressColor;
35537
36049
  taskStyle.milestoneColor = taskbar.milestoneColor;
36050
+ taskStyle.baselineColor = taskbar.baselineColor;
36051
+ taskStyle.baselineBorderColor = taskbar.baselineBorderColor;
35538
36052
  var args = {
35539
36053
  taskbar: taskStyle,
35540
36054
  data: data
@@ -35546,6 +36060,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35546
36060
  taskbar.taskBorderColor = args.taskbar.taskBorderColor;
35547
36061
  taskbar.progressColor = args.taskbar.progressColor;
35548
36062
  taskbar.milestoneColor = args.taskbar.milestoneColor;
36063
+ taskbar.baselineColor = args.taskbar.baselineColor;
36064
+ taskbar.baselineBorderColor = args.taskbar.baselineBorderColor;
35549
36065
  }
35550
36066
  });
35551
36067
  };
@@ -35693,6 +36209,26 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35693
36209
  var widths = [];
35694
36210
  var treeColumnIndex = 0;
35695
36211
  var tWidth = (this.pdfDoc.pageSettings.width - 82);
36212
+ if (this.exportProps && this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
36213
+ var gridWidth = void 0;
36214
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
36215
+ gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
36216
+ }
36217
+ else {
36218
+ if (this.exportProps.fitToWidthSettings.chartWidth) {
36219
+ var chartWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
36220
+ gridWidth = 100 - chartWidth;
36221
+ }
36222
+ else {
36223
+ gridWidth = 30;
36224
+ }
36225
+ }
36226
+ var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * gridWidth) / 100;
36227
+ var perColumnWidth = pdfwidth / this.gantt.columns.columns.length;
36228
+ for (var i = 0; i < this.gantt.columns.columns.length; i++) {
36229
+ this.gantt.columns.getColumn(i).width = perColumnWidth;
36230
+ }
36231
+ }
35696
36232
  if (this.totalColumnWidth > (this.pdfDoc.pageSettings.width - 82)) {
35697
36233
  this.gantt.style.allowHorizontalOverflow = true;
35698
36234
  }
@@ -35820,6 +36356,8 @@ var __assign$3 = (undefined && undefined.__assign) || function () {
35820
36356
  */
35821
36357
  var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35822
36358
  function PdfGanttTaskbarCollection(parent) {
36359
+ /** Defines the task baselineHeight . */
36360
+ this.baselineHeight = 8;
35823
36361
  /**
35824
36362
  * @private
35825
36363
  */
@@ -35866,6 +36404,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35866
36404
  //code for while current pdf page is exceed
35867
36405
  if (yPoint > pageSize.height) {
35868
36406
  page = this.GetNextPage(page);
36407
+ page['contentWidth'] = pointToPixel(detail.endPoint - detail.startPoint);
35869
36408
  taskGraphics = page.graphics;
35870
36409
  startPoint.y = 0;
35871
36410
  if (this.parent.pdfExportModule.gantt.enableHeader) {
@@ -35873,6 +36412,11 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35873
36412
  startPoint.y = pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60);
35874
36413
  }
35875
36414
  isNextPage = true;
36415
+ var graphics = page.graphics;
36416
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
36417
+ if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
36418
+ graphics.drawRectangle(pen, startPoint.x, startPoint.y, page['contentWidth'] + 0.5, rowHeight);
36419
+ }
35876
36420
  }
35877
36421
  this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
35878
36422
  //Draw Taskbar
@@ -35896,9 +36440,13 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35896
36440
  if (!taskbar.isMilestone) {
35897
36441
  var taskbarPen = new PdfPen(taskbar.taskBorderColor);
35898
36442
  var taskBrush = new PdfSolidBrush(taskbar.taskColor);
36443
+ var baselinePen = new PdfPen(taskbar.baselineBorderColor);
36444
+ var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
35899
36445
  var progressPen = new PdfPen(taskbar.progressColor);
35900
36446
  var progressBrush = new PdfSolidBrush(taskbar.progressColor);
35901
- var adjustHeight = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
36447
+ var adjustHeightforTaskbar = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
36448
+ var adjustHeightforBaseline = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
36449
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
35902
36450
  pageIndex = page.section.indexOf(page);
35903
36451
  var startDate = isNullOrUndefined(this.unscheduleStarteDate) ? this.startDate : this.unscheduleStarteDate;
35904
36452
  var endDate = isNullOrUndefined(this.unscheduleEndDate) ? this.endDate : this.unscheduleEndDate;
@@ -35912,6 +36460,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35912
36460
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
35913
36461
  }
35914
36462
  else {
36463
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36464
+ 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));
36465
+ }
35915
36466
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
35916
36467
  if (this.isScheduledTask) {
35917
36468
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -35943,6 +36494,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35943
36494
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
35944
36495
  }
35945
36496
  else {
36497
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36498
+ 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));
36499
+ }
35946
36500
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
35947
36501
  taskbar.width = taskbar.width - renderWidth;
35948
36502
  if (this.isScheduledTask) {
@@ -35974,6 +36528,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35974
36528
  this.taskStartPoint = __assign$3({}, startPoint);
35975
36529
  this.isStartPoint = true;
35976
36530
  }
36531
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36532
+ 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));
36533
+ }
35977
36534
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
35978
36535
  if (this.isScheduledTask) {
35979
36536
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -35995,6 +36552,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
35995
36552
  this.taskStartPoint = __assign$3({}, startPoint);
35996
36553
  this.isStartPoint = true;
35997
36554
  }
36555
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36556
+ 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));
36557
+ }
35998
36558
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
35999
36559
  if (this.isScheduledTask) {
36000
36560
  var progressBoundsWidth = 0;
@@ -36020,6 +36580,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
36020
36580
  }
36021
36581
  else {
36022
36582
  this.drawMilestone(page, startPoint, detail, cumulativeWidth);
36583
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
36584
+ this.drawMilestone(page, startPoint, detail, cumulativeWidth);
36585
+ }
36023
36586
  }
36024
36587
  this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
36025
36588
  return isNextPage;
@@ -36178,13 +36741,20 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
36178
36741
  var pageIndex = page.section.indexOf(page);
36179
36742
  this.taskStartPoint = __assign$3({}, startPoint);
36180
36743
  var milestonePen = new PdfPen(this.milestoneColor);
36181
- var adjustHeight = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
36744
+ var adjustHeightforBaselineMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 3.0));
36745
+ var adjustHeightforMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
36746
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaselineMilesone : adjustHeightforMilesone;
36182
36747
  var milestoneBrush = new PdfSolidBrush(this.milestoneColor);
36748
+ var baselinePen = new PdfPen(this.baselineBorderColor);
36749
+ var baselineBrush = new PdfSolidBrush(this.baselineColor);
36183
36750
  taskGraphics.save(); //saving graphics state
36184
- var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.6);
36751
+ var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.8);
36185
36752
  /* eslint-disable-next-line */
36186
36753
  taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
36187
36754
  taskGraphics.rotateTransform(45); //apply rotation
36755
+ if (this.parent.renderBaseline && this.baselineStartDate && this.baselineEndDate) {
36756
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, 2, 2, pixelToPoint(height), pixelToPoint(height));
36757
+ }
36188
36758
  taskGraphics.drawRectangle(milestonePen, milestoneBrush, 0, 0, pixelToPoint(height), pixelToPoint(height));
36189
36759
  taskGraphics.restore(); //restoring graphics state
36190
36760
  this.endPage = this.startPage = pageIndex;
@@ -36215,7 +36785,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36215
36785
  * @returns {void}
36216
36786
  */
36217
36787
  PdfTimeline.prototype.drawTimeline = function (page, startPoint, detail) {
36218
- var remainWidth = Math.floor(detail.totalWidth);
36788
+ var remainWidth = pointToPixel(Math.floor(detail.totalWidth));
36219
36789
  var renderWidth = 0;
36220
36790
  this.topTierPoint.x = startPoint.x;
36221
36791
  this.topTierPoint.y = startPoint.y;
@@ -36243,7 +36813,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36243
36813
  //Primary header Event Arguments
36244
36814
  /* eslint-disable-next-line */
36245
36815
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
36246
- this.topTierPoint.x += pixelToPoint(renderWidth);
36816
+ this.topTierPoint.x += renderWidth;
36247
36817
  remainWidth -= renderWidth;
36248
36818
  if (isCompleted) {
36249
36819
  this.topTierIndex++;
@@ -36269,7 +36839,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36269
36839
  //Secondary header Event Arguments
36270
36840
  /* eslint-disable-next-line */
36271
36841
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
36272
- this.bottomTierPoint.x = this.bottomTierPoint.x + pixelToPoint(width);
36842
+ this.bottomTierPoint.x = this.bottomTierPoint.x + width;
36273
36843
  remainWidth -= width;
36274
36844
  secondHeader.completedWidth = width;
36275
36845
  if (isCompleted) {
@@ -36300,7 +36870,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36300
36870
  //Primary header Event Arguments
36301
36871
  /* eslint-disable-next-line */
36302
36872
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
36303
- this.topTierPoint.x += pixelToPoint(pHeader.completedWidth);
36873
+ this.topTierPoint.x += pHeader.completedWidth;
36304
36874
  }
36305
36875
  }
36306
36876
  }
@@ -36313,7 +36883,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36313
36883
  //Secondary header Event Arguments
36314
36884
  /* eslint-disable-next-line */
36315
36885
  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);
36886
+ this.bottomTierPoint.x = this.bottomTierPoint.x + secondHeader.width;
36317
36887
  }
36318
36888
  }
36319
36889
  }
@@ -36360,7 +36930,10 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36360
36930
  var e = eventArgs.timelineCell;
36361
36931
  var rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
36362
36932
  var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
36363
- graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
36933
+ graphics.drawRectangle(rectPen, rectBrush, x, y, width, pixelToPoint(height));
36934
+ if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
36935
+ graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
36936
+ }
36364
36937
  var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
36365
36938
  if (ganttStyle.font) {
36366
36939
  font = ganttStyle.font;
@@ -36369,7 +36942,13 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
36369
36942
  var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
36370
36943
  var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
36371
36944
  /* eslint-disable-next-line */
36372
- graphics.drawString(eventArgs.value, font, null, textBrush, x + pLeft, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
36945
+ if (isTopTier) {
36946
+ x = x + pLeft + 4;
36947
+ }
36948
+ else {
36949
+ x = x + pLeft;
36950
+ }
36951
+ graphics.drawString(eventArgs.value, font, null, textBrush, x, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
36373
36952
  };
36374
36953
  return PdfTimeline;
36375
36954
  }());
@@ -36536,7 +37115,9 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
36536
37115
  }
36537
37116
  break;
36538
37117
  }
36539
- var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
37118
+ var midPointforTaskbar = Math.round((this.parent.rowHeight - 1) / 2.0);
37119
+ var midPointforBaseline = Math.round((this.parent.rowHeight - 10) / 2.0);
37120
+ var midPoint = this.parent.renderBaseline ? midPointforBaseline : midPointforTaskbar;
36540
37121
  midPoint = pixelToPoint(midPoint);
36541
37122
  /* eslint-disable-next-line */
36542
37123
  var point1, point2, point3, point4, point5, point6;
@@ -37031,6 +37612,7 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
37031
37612
  var pageData;
37032
37613
  this.headerDetails.forEach(function (detail, index) {
37033
37614
  var page = _this.result.page.section.getPages()[_this.startPageIndex];
37615
+ page['contentWidth'] = pointToPixel(_this.headerDetails[index].endPoint - _this.headerDetails[index].startPoint);
37034
37616
  _this.chartHeader.drawTimeline(page, _this.startPoint, detail);
37035
37617
  taskbarPoint.y = taskbarPoint.y + pixelToPoint(_this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
37036
37618
  pageStartX = taskbarPoint.x;
@@ -37041,6 +37623,11 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
37041
37623
  var task = _this.taskbarCollection[i];
37042
37624
  var rowHeight = _this.rows.getRow(i + 1).height;
37043
37625
  var pdfPage = _this.result.page.section.getPages()[_this.startPageIndex];
37626
+ var graphics = pdfPage.graphics;
37627
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
37628
+ if (page['contentWidth'] && (_this.parent.gridLines == "Both" || _this.parent.gridLines == "Horizontal")) {
37629
+ graphics.drawRectangle(pen, pageStartX, taskbarPoint.y, page['contentWidth'] + 0.5, rowHeight);
37630
+ }
37044
37631
  /* eslint-disable-next-line */
37045
37632
  var isNextPage = task.drawTaskbar(pdfPage, taskbarPoint, detail, cumulativeWidth, rowHeight, _this.taskbarCollection[i]);
37046
37633
  if (isNextPage) {
@@ -37175,11 +37762,23 @@ var PdfExport = /** @__PURE__ @class */ (function () {
37175
37762
  if (isNullOrUndefined(pdfExportProperties)) {
37176
37763
  pdfExportProperties = {};
37177
37764
  }
37178
- if (pdfExportProperties.exportType === 'CurrentViewData') {
37179
- data = this.parent.currentViewData;
37765
+ if (pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
37766
+ if (pdfExportProperties.exportType === 'CurrentViewData') {
37767
+ this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.currentViewData, null, true);
37768
+ }
37769
+ else {
37770
+ this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.flatData, null, true);
37771
+ }
37772
+ this.helper.beforeSinglePageExport['cloneCurrentViewData'] = extend([], this.parent.currentViewData, null, true);
37773
+ data = this.helper.beforeSinglePageExport['cloneFlatData'];
37180
37774
  }
37181
37775
  else {
37182
- data = this.parent.flatData;
37776
+ if (pdfExportProperties.exportType === 'CurrentViewData') {
37777
+ data = this.parent.currentViewData;
37778
+ }
37779
+ else {
37780
+ data = this.parent.flatData;
37781
+ }
37183
37782
  }
37184
37783
  this.initGantt();
37185
37784
  if (!isNullOrUndefined(pdfDoc)) {
@@ -37204,6 +37803,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
37204
37803
  var section = this.pdfDocument.sections.add();
37205
37804
  this.processSectionExportProperties(section, pdfExportProperties);
37206
37805
  var pdfPage = section.pages.add();
37806
+ this.pdfPageDimensions = pdfPage.getClientSize();
37207
37807
  /* eslint-disable-next-line */
37208
37808
  return new Promise(function (resolve, reject) {
37209
37809
  _this.helper.processGridExport(data, _this.gantt, pdfExportProperties);
@@ -37214,6 +37814,26 @@ var PdfExport = /** @__PURE__ @class */ (function () {
37214
37814
  format.break = PdfLayoutBreakType.FitElement;
37215
37815
  var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
37216
37816
  _this.gantt.drawChart(layouter);
37817
+ if (_this.helper.exportProps && _this.helper.exportProps.fitToWidthSettings && _this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
37818
+ _this.parent.zoomingProjectStartDate = _this.helper.beforeSinglePageExport['zoomingProjectStartDate'];
37819
+ _this.parent.zoomingProjectEndDate = _this.helper.beforeSinglePageExport['zoomingProjectEndDate'];
37820
+ _this.parent.cloneProjectStartDate = _this.helper.beforeSinglePageExport['cloneProjectStartDate'];
37821
+ _this.parent.cloneProjectEndDate = _this.helper.beforeSinglePageExport['cloneProjectEndDate'];
37822
+ _this.parent.timelineModule.customTimelineSettings = _this.helper.beforeSinglePageExport['customTimelineSettings'];
37823
+ _this.parent.isTimelineRoundOff = _this.helper.beforeSinglePageExport['isTimelineRoundOff'];
37824
+ _this.parent.timelineModule.topTier = _this.helper.beforeSinglePageExport['topTier'];
37825
+ _this.parent.timelineModule.topTierCellWidth = _this.helper.beforeSinglePageExport['topTierCellWidth'];
37826
+ _this.parent.timelineModule.topTierCollection = _this.helper.beforeSinglePageExport['topTierCollection'];
37827
+ _this.parent.timelineModule.bottomTier = _this.helper.beforeSinglePageExport['bottomTier'];
37828
+ _this.parent.timelineModule.bottomTierCellWidth = _this.helper.beforeSinglePageExport['bottomTierCellWidth'];
37829
+ _this.parent.timelineModule.bottomTierCollection = _this.helper.beforeSinglePageExport['bottomTierCollection'];
37830
+ _this.parent.timelineModule.totalTimelineWidth = _this.helper.beforeSinglePageExport['totalTimelineWidth'];
37831
+ _this.parent.timelineModule.timelineStartDate = _this.helper.beforeSinglePageExport['timelineStartDate'];
37832
+ _this.parent.timelineModule.timelineEndDate = _this.helper.beforeSinglePageExport['timelineEndDate'];
37833
+ _this.parent.timelineModule.timelineRoundOffEndDate = _this.helper.beforeSinglePageExport['timelineRoundOffEndDate'];
37834
+ _this.parent.perDayWidth = _this.helper.beforeSinglePageExport['perDayWidth'];
37835
+ _this.parent.updatedConnectorLineCollection = _this.helper.beforeSinglePageExport['updatedConnectorLineCollection'];
37836
+ }
37217
37837
  if (!isMultipleExport) {
37218
37838
  if (!_this.isBlob) {
37219
37839
  // save the PDF