@syncfusion/ej2-gantt 24.1.44 → 24.1.46

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 (57) hide show
  1. package/CHANGELOG.md +21 -2
  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 +128 -51
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +133 -55
  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 +16 -16
  13. package/src/gantt/actions/dialog-edit.js +16 -1
  14. package/src/gantt/actions/edit.js +21 -7
  15. package/src/gantt/actions/pdf-export.d.ts +2 -1
  16. package/src/gantt/actions/pdf-export.js +3 -3
  17. package/src/gantt/actions/taskbar-edit.js +4 -4
  18. package/src/gantt/base/task-processor.js +41 -28
  19. package/src/gantt/base/tree-grid.d.ts +1 -0
  20. package/src/gantt/base/tree-grid.js +3 -0
  21. package/src/gantt/export/export-helper.js +3 -2
  22. package/src/gantt/export/pdf-taskbar.js +42 -10
  23. package/styles/bootstrap-dark.css +1 -1
  24. package/styles/bootstrap.css +1 -1
  25. package/styles/bootstrap4.css +1 -1
  26. package/styles/bootstrap5-dark.css +1 -1
  27. package/styles/bootstrap5.css +1 -1
  28. package/styles/fabric-dark.css +1 -1
  29. package/styles/fabric.css +1 -1
  30. package/styles/fluent-dark.css +1 -1
  31. package/styles/fluent.css +1 -1
  32. package/styles/gantt/_layout.scss +1 -1
  33. package/styles/gantt/bootstrap-dark.css +1 -1
  34. package/styles/gantt/bootstrap.css +1 -1
  35. package/styles/gantt/bootstrap4.css +1 -1
  36. package/styles/gantt/bootstrap5-dark.css +1 -1
  37. package/styles/gantt/bootstrap5.css +1 -1
  38. package/styles/gantt/fabric-dark.css +1 -1
  39. package/styles/gantt/fabric.css +1 -1
  40. package/styles/gantt/fluent-dark.css +1 -1
  41. package/styles/gantt/fluent.css +1 -1
  42. package/styles/gantt/highcontrast-light.css +1 -1
  43. package/styles/gantt/highcontrast.css +1 -1
  44. package/styles/gantt/material-dark.css +1 -1
  45. package/styles/gantt/material.css +1 -1
  46. package/styles/gantt/material3-dark.css +1 -1
  47. package/styles/gantt/material3.css +1 -1
  48. package/styles/gantt/tailwind-dark.css +1 -1
  49. package/styles/gantt/tailwind.css +1 -1
  50. package/styles/highcontrast-light.css +1 -1
  51. package/styles/highcontrast.css +1 -1
  52. package/styles/material-dark.css +1 -1
  53. package/styles/material.css +1 -1
  54. package/styles/material3-dark.css +1 -1
  55. package/styles/material3.css +1 -1
  56. package/styles/tailwind-dark.css +1 -1
  57. package/styles/tailwind.css +1 -1
@@ -1653,19 +1653,25 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1653
1653
  var queryManager = this.parent.query instanceof Query ? this.parent.query : new Query();
1654
1654
  queryManager.requiresCount();
1655
1655
  var dataManager = this.parent.dataSource;
1656
- dataManager.executeQuery(queryManager).then(function (e) {
1657
- _this.dataArray = e.result;
1658
- _this.processTimeline();
1659
- if (_this.parent.loadChildOnDemand || (!_this.parent.loadChildOnDemand && !(_this.parent.taskFields.hasChildMapping))) {
1660
- _this.cloneDataSource();
1661
- }
1662
- _this.parent.renderGantt(isChange);
1663
- }).catch(function (e) {
1664
- // Trigger action failure event
1665
- _this.parent.processTimeline();
1666
- _this.parent.renderGantt(isChange);
1667
- _this.parent.trigger('actionFailure', { error: e });
1668
- });
1656
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
1657
+ this.processTimeline();
1658
+ this.parent.renderGantt(isChange);
1659
+ }
1660
+ else {
1661
+ dataManager.executeQuery(queryManager).then(function (e) {
1662
+ _this.dataArray = e.result;
1663
+ _this.processTimeline();
1664
+ if (_this.parent.loadChildOnDemand || (!_this.parent.loadChildOnDemand && !(_this.parent.taskFields.hasChildMapping))) {
1665
+ _this.cloneDataSource();
1666
+ }
1667
+ _this.parent.renderGantt(isChange);
1668
+ }).catch(function (e) {
1669
+ // Trigger action failure event
1670
+ _this.parent.processTimeline();
1671
+ _this.parent.renderGantt(isChange);
1672
+ _this.parent.trigger('actionFailure', { error: e });
1673
+ });
1674
+ }
1669
1675
  };
1670
1676
  TaskProcessor.prototype.constructDataSource = function (dataSource) {
1671
1677
  var mappingData = new DataManager(dataSource).executeLocal(new Query()
@@ -3848,14 +3854,11 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3848
3854
  */
3849
3855
  TaskProcessor.prototype.updateWidthLeft = function (data) {
3850
3856
  var ganttRecord = data.ganttProperties;
3857
+ var totalSegmentsProgressWidth = 0;
3851
3858
  // task endDate may be changed in segment calculation so this must be calculated first.
3852
3859
  // task width calculating was based on endDate
3853
3860
  if (!isNullOrUndefined(ganttRecord.segments) && ganttRecord.segments.length > 0) {
3854
3861
  var segments = ganttRecord.segments;
3855
- var fixedWidth = true;
3856
- var totalTaskWidth = this.splitTasksDuration(segments) * ((this.parent.timelineModule.bottomTier === "Hour" || this.parent.timelineModule.bottomTier === "Minutes") ? this.parent.timelineSettings.timelineUnitSize : this.parent.perDayWidth);
3857
-
3858
- var totalProgressWidth = this.parent.dataOperation.getProgressWidth(totalTaskWidth, ganttRecord.progress);
3859
3862
  for (var i = 0; i < segments.length; i++) {
3860
3863
  var segment = segments[i];
3861
3864
  if (i === 0 && !isNullOrUndefined(ganttRecord.startDate) &&
@@ -3866,22 +3869,27 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3866
3869
  this.parent.chartRowsModule.incrementSegments(segments, 0, data);
3867
3870
  }
3868
3871
  segment.width = this.getSplitTaskWidth(segment.startDate, segment.duration, data);
3872
+ totalSegmentsProgressWidth = totalSegmentsProgressWidth + segment.width;
3869
3873
  segment.showProgress = false;
3870
3874
  segment.progressWidth = -1;
3871
3875
  if (i !== 0) {
3872
3876
  var pStartDate = new Date(ganttRecord.startDate.getTime());
3873
3877
  segment.left = this.getSplitTaskLeft(segment.startDate, pStartDate);
3874
3878
  }
3875
- if (totalProgressWidth > 0 && totalProgressWidth > segment.width) {
3876
- totalProgressWidth = totalProgressWidth - segment.width;
3877
- segment.progressWidth = segment.width;
3878
- segment.showProgress = false;
3879
- }
3880
- else if (fixedWidth) {
3881
- segment.progressWidth = totalProgressWidth;
3882
- segment.showProgress = true;
3883
- totalProgressWidth = totalProgressWidth - segment.width;
3884
- fixedWidth = false;
3879
+ }
3880
+ var setProgress = this.parent.dataOperation.getProgressWidth(totalSegmentsProgressWidth, ganttRecord.progress);
3881
+ var isValid = true;
3882
+ for (var i = 0; i < segments.length; i++) {
3883
+ if (isValid) {
3884
+ if (setProgress <= segments[i].width) {
3885
+ segments[i].progressWidth = setProgress;
3886
+ segments[i].showProgress = true;
3887
+ isValid = false;
3888
+ }
3889
+ else {
3890
+ segments[i].progressWidth = segments[i].width;
3891
+ setProgress = setProgress - segments[i].progressWidth;
3892
+ }
3885
3893
  }
3886
3894
  }
3887
3895
  this.parent.setRecordValue('segments', ganttRecord.segments, ganttRecord, true);
@@ -3889,7 +3897,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3889
3897
  }
3890
3898
  this.parent.setRecordValue('width', this.parent.dataOperation.calculateWidth(data), ganttRecord, true);
3891
3899
  this.parent.setRecordValue('left', this.parent.dataOperation.calculateLeft(ganttRecord), ganttRecord, true);
3892
- this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth((ganttRecord.isAutoSchedule || !data.hasChildRecords ? ganttRecord.width : ganttRecord.autoWidth), ganttRecord.progress), ganttRecord, true);
3900
+ if (!isNullOrUndefined(ganttRecord.segments) && ganttRecord.segments.length > 0) {
3901
+ this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth(totalSegmentsProgressWidth, ganttRecord.progress), ganttRecord, true);
3902
+ }
3903
+ else {
3904
+ this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth((ganttRecord.isAutoSchedule || !data.hasChildRecords ? ganttRecord.width : ganttRecord.autoWidth), ganttRecord.progress), ganttRecord, true);
3905
+ }
3893
3906
  };
3894
3907
  /**
3895
3908
  * method to update left, width, progress width in record
@@ -8103,6 +8116,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8103
8116
  this.bindEvents();
8104
8117
  var root = 'root';
8105
8118
  this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
8119
+ setValue('registeredTemplate', this.registeredTemplate, this.parent.treeGrid.grid);
8120
+ var ref = 'viewContainerRef';
8121
+ setValue('viewContainerRef', this["" + ref], this.parent.treeGrid.grid);
8106
8122
  this.parent.treeGrid.appendTo(this.treeGridElement);
8107
8123
  if (this.parent.treeGrid.grid && this.parent.toolbarModule && this.parent.isReact) {
8108
8124
  this.parent.treeGrid.grid.portals = this.parent.portals;
@@ -21411,7 +21427,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
21411
21427
  pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
21412
21428
  /* To render the milestone in proper date while editing */
21413
21429
  if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
21414
- pStartDate.setDate(pStartDate.getDate() - 1);
21430
+ // pStartDate.setDate(pStartDate.getDate()-1);
21415
21431
  this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
21416
21432
  pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
21417
21433
  }
@@ -21421,9 +21437,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
21421
21437
  if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
21422
21438
  pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
21423
21439
  }
21424
- else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
21425
- pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
21426
- }
21440
+ // else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
21441
+ // pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
21442
+ // }
21427
21443
  }
21428
21444
  return pStartDate;
21429
21445
  };
@@ -24408,6 +24424,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
24408
24424
  var ganttObj = this.parent;
24409
24425
  var resourceSettings = ganttObj.resourceFields;
24410
24426
  var ganttData = this.beforeOpenArgs.rowData;
24427
+ if (((this.beforeOpenArgs.requestType === 'beforeOpenEditDialog' && !isNullOrUndefined(this.editedRecord[this.parent.taskFields.resourceInfo])) || (this.beforeOpenArgs.requestType === 'beforeOpenAddDialog' && !isNullOrUndefined(this.editedRecord[this.parent.taskFields.resourceInfo]))) && (typeof (this.editedRecord[this.parent.taskFields.resourceInfo]) === "object")) {
24428
+ this.parent.setRecordValue('resourceInfo', this.parent.dataOperation.setResourceInfo(this.editedRecord), ganttData.ganttProperties, true);
24429
+ }
24411
24430
  var rowResource = ganttData.ganttProperties.resourceInfo;
24412
24431
  var inputModel = this.beforeOpenArgs[itemName];
24413
24432
  var resourceTreeGridId = ganttObj.element.id + '' + itemName + 'TabContainer';
@@ -24446,6 +24465,11 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
24446
24465
  this.ganttResources.push(resourceInfo[i]);
24447
24466
  }
24448
24467
  }
24468
+ else if (!this.isEdit && !isNullOrUndefined(resourceInfo)) {
24469
+ for (var i = 0; i < resourceInfo.length; i++) {
24470
+ this.ganttResources.push(resourceInfo[i]);
24471
+ }
24472
+ }
24449
24473
  inputModel.rowSelected = function (args) {
24450
24474
  _this.updateResourceCollection(args, resourceTreeGridId);
24451
24475
  };
@@ -24857,7 +24881,14 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
24857
24881
  }
24858
24882
  }
24859
24883
  else {
24860
- tasksData[fieldName] = controlObj.value;
24884
+ if (fieldName === "Duration") {
24885
+ var numericValue = parseFloat(String(controlObj.value));
24886
+
24887
+ tasksData[fieldName] = numericValue;
24888
+ }
24889
+ else {
24890
+ tasksData[fieldName] = controlObj.value;
24891
+ }
24861
24892
  if (this.parent.enableHtmlSanitizer && typeof (controlObj.value) === 'string') {
24862
24893
  controlObj.value = SanitizeHtmlHelper.sanitize(controlObj.value);
24863
24894
  tasksData[fieldName] = controlObj.value;
@@ -27551,9 +27582,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
27551
27582
  var taskID = updateRecord.ganttProperties.taskId;
27552
27583
  var resourceID = prevResource[index][this.parent.resourceFields.id];
27553
27584
  var record = flatRecords[this.parent.getTaskIds().indexOf('R' + resourceID)];
27554
- for (var j = 0; j < record.childRecords.length; j++) {
27555
- if (record.childRecords[j].ganttProperties.taskId === taskID) {
27556
- this.removeChildRecord(record.childRecords[j]);
27585
+ if (!isNullOrUndefined(record)) {
27586
+ for (var j = 0; j < record.childRecords.length; j++) {
27587
+ if (record.childRecords[j].ganttProperties.taskId === taskID) {
27588
+ this.removeChildRecord(record.childRecords[j]);
27589
+ }
27557
27590
  }
27558
27591
  }
27559
27592
  }
@@ -29094,10 +29127,16 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
29094
29127
  }
29095
29128
  if (!isNullOrUndefined(args.data["" + tempTaskID])) {
29096
29129
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
29130
+ for (var _i = 0, _b = Object.keys(_this.parent.ids); _i < _b.length; _i++) {
29131
+ var key = _b[_i];
29132
+ if (_this.parent.ids[key] === args.data['ganttProperties']['taskId'].toString()) {
29133
+ _this.parent.ids[key] = args.data[tempTaskID].toString();
29134
+ break;
29135
+ }
29136
+ }
29097
29137
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
29098
29138
  args.newTaskData[tempTaskID] = args.data[tempTaskID];
29099
29139
  args.data['ganttProperties']['rowUniqueID'] = args.data[tempTaskID].toString();
29100
- _this.parent.ids.push(args.data[tempTaskID].toString());
29101
29140
  }
29102
29141
  }
29103
29142
  if (!args.cancel) {
@@ -29107,7 +29146,6 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
29107
29146
  addedRecords: [args.newTaskData],
29108
29147
  changedRecords: args.modifiedTaskData
29109
29148
  };
29110
- var prevID_1 = args.data.ganttProperties.taskId.toString();
29111
29149
  /* tslint:disable-next-line */
29112
29150
  var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
29113
29151
  var adaptor = data_2.adaptor;
@@ -29115,14 +29153,21 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
29115
29153
  /* tslint:disable-next-line */
29116
29154
  var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
29117
29155
  crud.then(function (e) {
29156
+ if (e.addedRecords[0][_this.parent.taskFields.id].toString() != args.data['ganttProperties']['taskId']) {
29157
+ args.data['ganttProperties']['taskId'] = e.addedRecords[0][_this.parent.taskFields.id].toString();
29158
+ args.newTaskData[tempTaskID] = e.addedRecords[0][_this.parent.taskFields.id].toString();
29159
+ args.data['ganttProperties']['rowUniqueID'] = e.addedRecords[0][_this.parent.taskFields.id].toString();
29160
+ _this.parent.ids.push(e.addedRecords[0][_this.parent.taskFields.id].toString());
29161
+ }
29162
+ var prevID = args.data.ganttProperties.taskId.toString();
29118
29163
  if (_this.parent.taskFields.id && !isNullOrUndefined(e.addedRecords[0][_this.parent.taskFields.id]) &&
29119
- e.addedRecords[0][_this.parent.taskFields.id].toString() == prevID_1) {
29164
+ e.addedRecords[0][_this.parent.taskFields.id].toString() == prevID) {
29120
29165
  _this.parent.setRecordValue('taskId', e.addedRecords[0][_this.parent.taskFields.id], args.data.ganttProperties, true);
29121
29166
  _this.parent.setRecordValue('taskData', e.addedRecords[0], args.data);
29122
29167
  _this.parent.setRecordValue(_this.parent.taskFields.id, e.addedRecords[0][_this.parent.taskFields.id], args.data);
29123
29168
  _this.parent.setRecordValue('rowUniqueID', e.addedRecords[0][_this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
29124
29169
  _this.updateClientDataFromServer(e, args);
29125
- var idsIndex = _this.parent.ids.indexOf(prevID_1);
29170
+ var idsIndex = _this.parent.ids.indexOf(prevID);
29126
29171
  if (idsIndex !== -1) {
29127
29172
  _this.parent.ids[idsIndex] = e.addedRecords[0][_this.parent.taskFields.id].toString();
29128
29173
  }
@@ -37907,9 +37952,11 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
37907
37952
  compositeField.draw(footer.graphics, new PointF(0, 0));
37908
37953
  pdfDoc.template.bottom = footer;
37909
37954
  }
37955
+ var PdfPage$$1 = this.parent.pdfExportModule.pdfPage;
37956
+ var pageSize = PdfPage$$1.size;
37957
+ var clientSize = !isNullOrUndefined(pageSize) ? pageSize : this.pdfDoc.pageSettings.size;
37910
37958
  // code for draw header content
37911
37959
  if (!isNullOrUndefined(this.exportProps.header)) {
37912
- var clientSize = this.pdfDoc.pageSettings.size;
37913
37960
  var headerProp = this.exportProps.header;
37914
37961
  var position = new PointF(0, headerProp.fromTop);
37915
37962
  var size = new SizeF((clientSize.width * 1.1), ((headerProp && headerProp.height) ? headerProp.height * 0.75 : 50));
@@ -37918,7 +37965,6 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
37918
37965
  }
37919
37966
  // code for customization of footer
37920
37967
  if (!this.exportProps.enableFooter && !isNullOrUndefined(this.exportProps.footer)) {
37921
- var clientSize = this.pdfDoc.pageSettings.size;
37922
37968
  var footer = this.exportProps.footer;
37923
37969
  var position = new PointF(0, ((clientSize.width - 80) - ((footer && footer.fromBottom) ?
37924
37970
  footer.fromBottom * 0.75 : 0)));
@@ -38337,13 +38383,32 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
38337
38383
  progressFormat.alignment = PdfTextAlignment.Left;
38338
38384
  }
38339
38385
  var pageIndex = -1;
38386
+ var renderBaselineWidth = 0;
38387
+ if (this.baselineWidth > detail.totalWidth) {
38388
+ if (this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) {
38389
+ renderBaselineWidth = detail.totalWidth - this.baselineLeft;
38390
+ }
38391
+ else {
38392
+ renderBaselineWidth = detail.totalWidth;
38393
+ }
38394
+ this.baselineWidth = this.baselineWidth - detail.totalWidth;
38395
+ }
38396
+ else {
38397
+ if ((this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) && this.baselineWidth + this.baselineLeft > detail.totalWidth) {
38398
+ renderBaselineWidth = detail.totalWidth - this.baselineLeft;
38399
+ }
38400
+ else {
38401
+ renderBaselineWidth = this.baselineWidth;
38402
+ }
38403
+ }
38404
+ var baselinePen = new PdfPen(taskbar.baselineBorderColor);
38405
+ var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
38406
+ var renderedBaseline = false;
38340
38407
  if (!taskbar.isMilestone) {
38341
38408
  var taskbarPen_1 = new PdfPen(taskbar.taskBorderColor);
38342
38409
  var taskBrush_1 = new PdfSolidBrush(taskbar.taskColor);
38343
- var baselinePen = new PdfPen(taskbar.baselineBorderColor);
38344
38410
  var manualParentBorderPen = new PdfPen(taskbar.manualParentBorder);
38345
38411
  var manualChildBorderPen = new PdfPen(taskbar.manualChildBorder);
38346
- var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
38347
38412
  var manualTaskbarPen = new PdfPen(taskbar.manuallineColor);
38348
38413
  var manualParentPen = new PdfPen(taskbar.manualParentProgress);
38349
38414
  var manualline = new PdfPen(taskbar.manuallineColor);
@@ -38414,11 +38479,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
38414
38479
  else {
38415
38480
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
38416
38481
  if (this.isAutoFit()) {
38417
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
38482
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
38418
38483
  }
38419
38484
  else {
38420
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
38485
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
38421
38486
  }
38487
+ renderedBaseline = true;
38422
38488
  }
38423
38489
  if (taskbar.isSpliterTask) {
38424
38490
  splitline.dashStyle = PdfDashStyle.Dot;
@@ -38631,11 +38697,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
38631
38697
  else {
38632
38698
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
38633
38699
  if (this.isAutoFit()) {
38634
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
38700
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
38635
38701
  }
38636
38702
  else {
38637
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
38703
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
38638
38704
  }
38705
+ renderedBaseline = true;
38639
38706
  }
38640
38707
  if (taskbar.isSpliterTask) {
38641
38708
  var pervwidth_1 = 0;
@@ -38792,11 +38859,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
38792
38859
  }
38793
38860
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
38794
38861
  if (this.isAutoFit()) {
38795
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
38862
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
38796
38863
  }
38797
38864
  else {
38798
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
38865
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
38799
38866
  }
38867
+ renderedBaseline = true;
38800
38868
  }
38801
38869
  if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
38802
38870
  var brush1 = void 0;
@@ -38948,11 +39016,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
38948
39016
  }
38949
39017
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
38950
39018
  if (this.isAutoFit()) {
38951
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
39019
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
38952
39020
  }
38953
39021
  else {
38954
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
39022
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
38955
39023
  }
39024
+ renderedBaseline = true;
38956
39025
  }
38957
39026
  if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
38958
39027
  var brush1 = void 0;
@@ -39173,6 +39242,15 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
39173
39242
  this.drawMilestone(page, startPoint, detail, cumulativeWidth);
39174
39243
  }
39175
39244
  }
39245
+ if (this.baselineEndDate >= detail.startDate && !renderedBaseline && detail.startIndex != 1 && this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
39246
+ var adjustHeight = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
39247
+ if (this.isAutoFit()) {
39248
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
39249
+ }
39250
+ else {
39251
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
39252
+ }
39253
+ }
39176
39254
  this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
39177
39255
  return isNextPage;
39178
39256
  };
@@ -40696,8 +40774,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
40696
40774
  var _this = this;
40697
40775
  var section = this.pdfDocument.sections.add();
40698
40776
  this.processSectionExportProperties(section, pdfExportProperties);
40699
- var pdfPage = section.pages.add();
40700
- this.pdfPageDimensions = pdfPage.getClientSize();
40777
+ this.pdfPage = section.pages.add();
40778
+ this.pdfPageDimensions = this.pdfPage.getClientSize();
40701
40779
  /* eslint-disable-next-line */
40702
40780
  return new Promise(function (resolve, reject) {
40703
40781
  _this.helper.processGridExport(data, _this.gantt, pdfExportProperties);
@@ -40706,7 +40784,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
40706
40784
  }).then(function () {
40707
40785
  var format = new PdfTreeGridLayoutFormat();
40708
40786
  format.break = PdfLayoutBreakType.FitElement;
40709
- var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
40787
+ var layouter = _this.gantt.drawGrid(_this.pdfPage, 0, 0, format);
40710
40788
  _this.gantt.drawChart(layouter);
40711
40789
  if (_this.helper.exportProps && _this.helper.exportProps.fitToWidthSettings && _this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
40712
40790
  _this.parent.zoomingProjectStartDate = _this.helper.beforeSinglePageExport['zoomingProjectStartDate'];