@syncfusion/ej2-gantt 21.2.8 → 21.2.10

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.
@@ -1565,7 +1565,15 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
1565
1565
  var segment = segments[i];
1566
1566
  var sDate = segment.startDate;
1567
1567
  var eDate = segment.endDate;
1568
- duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24));
1568
+ if (this.parent.timelineModule.bottomTier === "Hour") {
1569
+ duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60));
1570
+ }
1571
+ else if (this.parent.timelineModule.bottomTier === "Minutes") {
1572
+ duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60));
1573
+ }
1574
+ else {
1575
+ duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24));
1576
+ }
1569
1577
  }
1570
1578
  return duration;
1571
1579
  };
@@ -2078,29 +2086,53 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
2078
2086
  startDate = this.checkStartDate(startDate, data.ganttProperties, false);
2079
2087
  if (!isNullOrUndefined(duration)) {
2080
2088
  endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
2089
+ if (taskSettings.duration) {
2090
+ remainingDuration = data.ganttProperties.duration - sumOfDuration;
2091
+ if (remainingDuration <= 0) {
2092
+ continue;
2093
+ }
2094
+ duration = i === segments.length - 1 ? remainingDuration : remainingDuration > 0 &&
2095
+ duration > remainingDuration ? remainingDuration : duration;
2096
+ endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
2097
+ }
2098
+ else if (!taskSettings.duration && taskSettings.endDate) {
2099
+ endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
2100
+ data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
2101
+ duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
2102
+ if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
2103
+ && endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
2104
+ ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
2105
+ continue;
2106
+ }
2107
+ }
2081
2108
  }
2082
2109
  else {
2083
2110
  endDate = this.getDateFromFormat(endDate);
2111
+ if (endDate && (isNullOrUndefined(duration) || String(duration) === '')) {
2112
+ if (endDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
2113
+ this.setTime(this.parent.defaultEndTime, endDate);
2114
+ }
2115
+ }
2084
2116
  endDate = this.checkEndDate(endDate, data.ganttProperties, false);
2085
2117
  duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
2086
- }
2087
- if (taskSettings.duration) {
2088
- remainingDuration = data.ganttProperties.duration - sumOfDuration;
2089
- if (remainingDuration <= 0) {
2090
- continue;
2118
+ if (taskSettings.duration) {
2119
+ remainingDuration = data.ganttProperties.duration - sumOfDuration - 1;
2120
+ if (remainingDuration <= 0) {
2121
+ continue;
2122
+ }
2123
+ duration = i === segments.length - 1 ? remainingDuration : remainingDuration > 0 &&
2124
+ duration > remainingDuration ? remainingDuration : duration;
2125
+ endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
2091
2126
  }
2092
- duration = i === segments.length - 1 ? remainingDuration : remainingDuration > 0 &&
2093
- duration > remainingDuration ? remainingDuration : duration;
2094
- endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
2095
- }
2096
- else if (!taskSettings.duration && taskSettings.endDate) {
2097
- endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
2098
- data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
2099
- duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
2100
- if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
2101
- && endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
2102
- ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
2103
- continue;
2127
+ else if (!taskSettings.duration && taskSettings.endDate) {
2128
+ endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
2129
+ data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
2130
+ duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
2131
+ if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
2132
+ && endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
2133
+ ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
2134
+ continue;
2135
+ }
2104
2136
  }
2105
2137
  }
2106
2138
  segment = {};
@@ -2964,7 +2996,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
2964
2996
  var data_1 = [];
2965
2997
  var _loop_4 = function (k) {
2966
2998
  resourceData.filter(function (resourceInfo) {
2967
- if (resourceInfo[resourceSettings.id] === preTaskResources[k][resourceSettings.id]) {
2999
+ if (resourceInfo[resourceSettings.id] === preTaskResources[k][resourceSettings.id] && data_1.indexOf(preTaskResources[k]) === -1) {
2968
3000
  data_1.push(preTaskResources[k]);
2969
3001
  }
2970
3002
  });
@@ -3249,7 +3281,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3249
3281
  if (resourceUnit !== 100) {
3250
3282
  resName += '[' + resourceUnit + '%' + ']';
3251
3283
  }
3252
- resourceName.push(resName);
3284
+ if (!isNullOrUndefined(resName)) {
3285
+ resourceName.push(resName);
3286
+ }
3253
3287
  if (data.taskData) {
3254
3288
  var mapping = taskMapping.resourceInfo;
3255
3289
  // eslint-disable-next-line
@@ -3750,7 +3784,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3750
3784
  if (!isNullOrUndefined(ganttRecord.segments) && ganttRecord.segments.length > 0) {
3751
3785
  var segments = ganttRecord.segments;
3752
3786
  var fixedWidth = true;
3753
- var totalTaskWidth = this.splitTasksDuration(segments) * this.parent.perDayWidth;
3787
+ var totalTaskWidth = this.splitTasksDuration(segments) * ((this.parent.timelineModule.bottomTier === "Hour" || this.parent.timelineModule.bottomTier === "Minutes") ? this.parent.timelineSettings.timelineUnitSize : this.parent.perDayWidth);
3754
3788
  var totalProgressWidth = this.parent.dataOperation.getProgressWidth(totalTaskWidth, ganttRecord.progress);
3755
3789
  for (var i = 0; i < segments.length; i++) {
3756
3790
  var segment = segments[i];
@@ -3798,6 +3832,8 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3798
3832
  var ganttRecord = data.ganttProperties;
3799
3833
  this.parent.setRecordValue('autoWidth', this.calculateWidth(data, true), ganttRecord, true);
3800
3834
  this.parent.setRecordValue('autoLeft', this.calculateLeft(ganttRecord, true), ganttRecord, true);
3835
+ this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth((ganttRecord.isAutoSchedule ||
3836
+ !data.hasChildRecords ? ganttRecord.width : ganttRecord.autoWidth), ganttRecord.progress), ganttRecord, true);
3801
3837
  };
3802
3838
  /**
3803
3839
  * To calculate parent progress value
@@ -3933,6 +3969,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3933
3969
  }
3934
3970
  }
3935
3971
  this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
3972
+ if (!isNullOrUndefined(this.parent.taskFields.milestone)) {
3973
+ this.updateMappingData(parentData, 'milestone');
3974
+ }
3936
3975
  if (parentProp.isAutoSchedule) {
3937
3976
  this.calculateDuration(parentData);
3938
3977
  }
@@ -5353,7 +5392,13 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5353
5392
  * @private
5354
5393
  */
5355
5394
  GanttChart.prototype.getRecordByTaskBar = function (target) {
5356
- var item = this.parent.currentViewData[this.getIndexByTaskBar(target)];
5395
+ var item;
5396
+ if (this.parent.enableVirtualization && this.parent.enableMultiTaskbar) {
5397
+ item = this.parent.flatData[this.getIndexByTaskBar(target)];
5398
+ }
5399
+ else {
5400
+ item = this.parent.currentViewData[this.getIndexByTaskBar(target)];
5401
+ }
5357
5402
  return item;
5358
5403
  };
5359
5404
  /**
@@ -5711,7 +5756,12 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5711
5756
  else {
5712
5757
  var id = row.getAttribute('rowUniqueId');
5713
5758
  var record = this.parent.getRecordByID(id);
5714
- recordIndex = this.parent.currentViewData.indexOf(record);
5759
+ if (this.parent.enableVirtualization && this.parent.enableMultiTaskbar) {
5760
+ recordIndex = this.parent.flatData.indexOf(record);
5761
+ }
5762
+ else {
5763
+ recordIndex = this.parent.currentViewData.indexOf(record);
5764
+ }
5715
5765
  }
5716
5766
  return recordIndex;
5717
5767
  };
@@ -7133,9 +7183,11 @@ var Timeline = /** @__PURE__ @class */ (function () {
7133
7183
  var validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
7134
7184
  var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
7135
7185
  var isChanged = void 0;
7186
+ var taskbarModule = this.parent.editModule.taskbarEditModule;
7136
7187
  if (!isNullOrUndefined(maxStartLeft) && ((minStartDate < this.timelineStartDate) ||
7137
- (!isNullOrUndefined(this.parent.editModule.taskbarEditModule)) &&
7138
- (!isNullOrUndefined(this.parent.editModule.taskbarEditModule.taskBarEditAction))) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
7188
+ (!isNullOrUndefined(taskbarModule)) && (!isNullOrUndefined(taskbarModule.taskBarEditAction)
7189
+ && taskbarModule.taskBarEditAction !== 'ProgressResizing' &&
7190
+ taskbarModule.taskBarEditAction !== 'RightResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
7139
7191
  isChanged = 'prevTimeSpan';
7140
7192
  minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
7141
7193
  }
@@ -7732,7 +7784,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7732
7784
  this.parent.columnByField = {};
7733
7785
  this.parent.customColumns = [];
7734
7786
  var tasksMapping = ['id', 'name', 'startDate', 'endDate', 'duration', 'dependency',
7735
- 'progress', 'baselineStartDate', 'baselineEndDate', 'resourceInfo', 'notes', 'work', 'manual', 'type'];
7787
+ 'progress', 'baselineStartDate', 'baselineEndDate', 'resourceInfo', 'notes', 'work', 'manual', 'type', 'milestone'];
7736
7788
  var _loop_1 = function (i) {
7737
7789
  var column = {};
7738
7790
  if (typeof ganttObj.columns[i] === 'string') {
@@ -8079,7 +8131,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8079
8131
  }
8080
8132
  }; // eslint-disable-next-line
8081
8133
  GanttTreeGrid.prototype.durationValueAccessor = function (field, data, column) {
8082
- var ganttProp = data.ganttProperties;
8134
+ var ganttProp = (!isNullOrUndefined(data)) ? data.ganttProperties : null;
8083
8135
  if (!isNullOrUndefined(ganttProp)) {
8084
8136
  return this.parent.dataOperation.getDurationString(ganttProp.duration, ganttProp.durationUnit);
8085
8137
  }
@@ -9205,7 +9257,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9205
9257
  !this.isTemplate(childLabel) &&
9206
9258
  progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
9207
9259
  progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
9208
- if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
9260
+ if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent === '' &&
9209
9261
  childLabel && !childLabel['elementRef'] && tempDiv.innerHTML !== '')
9210
9262
  progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
9211
9263
  }
@@ -9876,7 +9928,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9876
9928
  !this.isTemplate(parentLabel) &&
9877
9929
  progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
9878
9930
  progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
9879
- if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
9931
+ if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent === '' &&
9880
9932
  parentLabel && !parentLabel['elementRef'] && div.innerHTML !== '')
9881
9933
  progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
9882
9934
  }
@@ -9906,11 +9958,19 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9906
9958
  * @returns {NodeList} .
9907
9959
  * @private
9908
9960
  */
9909
- ChartRows.prototype.getTableTrNode = function () {
9961
+ ChartRows.prototype.getTableTrNode = function (i) {
9910
9962
  var table = createElement('table');
9911
9963
  var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
9912
9964
  'e-chart-row-border' : '';
9913
- table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
9965
+ var rows = this.parent.treeGrid.grid.contentModule.getRows()[i];
9966
+ var activecls;
9967
+ if (rows && rows.isSelected) {
9968
+ activecls = 'e-active';
9969
+ }
9970
+ else {
9971
+ activecls = '';
9972
+ }
9973
+ table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + ' ' + (activecls) + '"' +
9914
9974
  'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
9915
9975
  this.parent.rowHeight + 'px;">' +
9916
9976
  '<td class="' + chartRowCell + ' ' + className
@@ -10348,7 +10408,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10348
10408
  this.parent.renderTemplates();
10349
10409
  this.triggerQueryTaskbarInfo();
10350
10410
  this.parent.modifiedRecords = [];
10351
- if (this.parent.viewType == 'ResourceView' && this.parent.showOverAllocation) {
10411
+ if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
10352
10412
  this.updateOverlapped();
10353
10413
  }
10354
10414
  if (collapsedResourceRecord.length) {
@@ -10372,7 +10432,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10372
10432
  ChartRows.prototype.getGanttChartRow = function (i, tempTemplateData) {
10373
10433
  this.templateData = tempTemplateData;
10374
10434
  var taskBaselineTemplateNode = null;
10375
- var parentTrNode = this.getTableTrNode();
10435
+ var parentTrNode = this.getTableTrNode(i);
10376
10436
  var leftLabelNode = this.getLeftLabelNode(i);
10377
10437
  var taskbarContainerNode = this.taskbarContainer();
10378
10438
  taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
@@ -10924,6 +10984,19 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10924
10984
  }
10925
10985
  }
10926
10986
  };
10987
+ ChartRows.prototype.updateResourceTaskbarElement = function (tRow, parentTr) {
10988
+ var cloneElement = tRow.querySelector('.e-taskbar-main-container');
10989
+ addClass([cloneElement], 'collpse-parent-border');
10990
+ var id = tRow.querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
10991
+ var ganttData = this.parent.getRecordByID(id);
10992
+ var zIndex = "";
10993
+ if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
10994
+ zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
10995
+ }
10996
+ var cloneChildElement = cloneElement.cloneNode(true);
10997
+ cloneChildElement.style.zIndex = zIndex;
10998
+ parentTr[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
10999
+ };
10927
11000
  ChartRows.prototype.getResourceParent = function (record) {
10928
11001
  var chartRows = this.parent.ganttChartModule.getChartRows();
10929
11002
  //Below code is for rendering taskbartemplate in resource view with multi taskbar
@@ -10947,20 +11020,19 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10947
11020
  parentTrNode[0].childNodes[0].childNodes[0].appendChild(collapseParent);
10948
11021
  var tasks = this.parent.dataOperation.setSortedChildTasks(record);
10949
11022
  this.parent.dataOperation.updateOverlappingIndex(tasks);
10950
- for (var i = 0; i < chartRows.length; i++) {
10951
- if (chartRows[i].classList.contains('gridrowtaskId'
10952
- + record.ganttProperties.rowUniqueID + 'level' + (record.level + 1))) {
10953
- var cloneElement = chartRows[i].querySelector('.e-taskbar-main-container');
10954
- addClass([cloneElement], 'collpse-parent-border');
10955
- var id = chartRows[i].querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
10956
- var ganttData = this.parent.getRecordByID(id);
10957
- var zIndex = "";
10958
- if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
10959
- zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
11023
+ var tRow;
11024
+ if (this.parent.enableVirtualization) {
11025
+ for (var i = 0; i < record.childRecords.length; i++) {
11026
+ tRow = this.getGanttChartRow(record.childRecords[i].index, this.parent.flatData[record.childRecords[i].index]);
11027
+ this.updateResourceTaskbarElement(tRow, parentTrNode);
11028
+ }
11029
+ }
11030
+ else {
11031
+ for (var i = 0; i < chartRows.length; i++) {
11032
+ if (chartRows[i].classList.contains('gridrowtaskId'
11033
+ + record.ganttProperties.rowUniqueID + 'level' + (record.level + 1))) {
11034
+ this.updateResourceTaskbarElement(chartRows[i], parentTrNode);
10960
11035
  }
10961
- var cloneChildElement = cloneElement.cloneNode(true);
10962
- cloneChildElement.style.zIndex = zIndex;
10963
- parentTrNode[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
10964
11036
  }
10965
11037
  }
10966
11038
  parentTrNode[0].childNodes[0].childNodes[0].appendChild([].slice.call(leftLabelNode)[0]);
@@ -11469,6 +11541,15 @@ var Dependency = /** @__PURE__ @class */ (function () {
11469
11541
  for (var count = 0; count < totLength; count++) {
11470
11542
  if (flatData[count].ganttProperties.predecessorsName) {
11471
11543
  this.validatePredecessorDates(flatData[count]);
11544
+ var predecessorCollection = flatData[count].ganttProperties.predecessor;
11545
+ if (predecessorCollection && predecessorCollection.length > 1) {
11546
+ for (var i = 0; i < predecessorCollection.length; i++) {
11547
+ var validateRecord = this.parent.getRecordByID(predecessorCollection[i].to);
11548
+ if (validateRecord) {
11549
+ this.validatePredecessorDates(validateRecord);
11550
+ }
11551
+ }
11552
+ }
11472
11553
  if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
11473
11554
  && this.parent.allowParentDependency) {
11474
11555
  this.parent.editModule['updateChildItems'](flatData[count]);
@@ -23992,6 +24073,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23992
24073
  this.isFromDeleteMethod = false;
23993
24074
  this.targetedRecords = [];
23994
24075
  this.isNewRecordAdded = false;
24076
+ this.isValidatedEditedRecord = false;
23995
24077
  /** @hidden */
23996
24078
  this.updateParentRecords = [];
23997
24079
  /** @hidden */
@@ -24646,8 +24728,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24646
24728
  (isNullOrUndefined(taskData.startDate) && !isNullOrUndefined(prevStart)) ||
24647
24729
  (isNullOrUndefined(taskData.endDate) && !isNullOrUndefined(prevEnd)) ||
24648
24730
  (prevStart && prevStart.getTime() !== taskData.startDate.getTime())
24649
- && (prevEnd && prevEnd.getTime() !== taskData.endDate.getTime())
24650
- || (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration &&
24731
+ || (prevEnd && prevEnd.getTime() !== taskData.endDate.getTime())
24732
+ || (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration)
24733
+ || (!isNullOrUndefined(prevDuration) && prevDuration === taskData.duration &&
24651
24734
  prevDurationUnit !== taskData.durationUnit)) {
24652
24735
  isMoved = true;
24653
24736
  }
@@ -24760,6 +24843,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24760
24843
  this.parent.connectorLineEditModule.openValidationDialog(validateObject);
24761
24844
  }
24762
24845
  else {
24846
+ if (this.parent.editModule && this.parent.editModule.dialogModule &&
24847
+ this.parent.editModule.dialogModule['isEdit'] && this.predecessorUpdated) {
24848
+ this.isValidatedEditedRecord = true;
24849
+ this.parent.predecessorModule.validatePredecessor(args.data, [], '');
24850
+ }
24763
24851
  this.parent.connectorLineEditModule.applyPredecessorOption();
24764
24852
  }
24765
24853
  }
@@ -24823,7 +24911,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24823
24911
  if (this.taskbarMoved) {
24824
24912
  this.parent.editedTaskBarItem = ganttRecord;
24825
24913
  }
24826
- this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
24914
+ if (!this.isValidatedEditedRecord) {
24915
+ this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
24916
+ }
24917
+ this.isValidatedEditedRecord = false;
24827
24918
  this.parent.predecessorModule.isValidatedParentTaskID = '';
24828
24919
  }
24829
24920
  if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
@@ -26709,6 +26800,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
26709
26800
  this.parent.treeGrid.parentData = [];
26710
26801
  this.parent.addDeleteRecord = true;
26711
26802
  this.parent.selectedRowIndex = 0;
26803
+ this.parent.treeGrid['isAddedFromGantt'] = true;
26712
26804
  this.parent.treeGrid.refresh();
26713
26805
  if (this.parent.enableImmutableMode) {
26714
26806
  this.parent.modifiedRecords = args.modifiedRecords;
@@ -35156,6 +35248,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
35156
35248
  footer.graphics.drawRectangle(pen, footerBrush, 0, 0, pdfDoc.pageSettings.width, 35);
35157
35249
  /* eslint-disable-next-line */
35158
35250
  var font = new PdfStandardFont(this.ganttStyle.fontFamily, this.ganttStyle.footer.fontSize, this.ganttStyle.footer.fontStyle);
35251
+ if (this.ganttStyle.font) {
35252
+ font = this.ganttStyle.font;
35253
+ }
35159
35254
  var brush = new PdfSolidBrush(this.ganttStyle.footer.fontColor);
35160
35255
  var pageNumber = new PdfPageNumberField(font);
35161
35256
  var count = new PdfPageCountField(font, brush);