@syncfusion/ej2-gantt 24.1.45 → 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 (56) hide show
  1. package/CHANGELOG.md +12 -0
  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 +48 -23
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +51 -25
  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 +15 -15
  13. package/src/gantt/actions/edit.js +7 -1
  14. package/src/gantt/actions/pdf-export.d.ts +2 -1
  15. package/src/gantt/actions/pdf-export.js +3 -3
  16. package/src/gantt/actions/taskbar-edit.js +4 -4
  17. package/src/gantt/base/task-processor.js +19 -13
  18. package/src/gantt/base/tree-grid.d.ts +1 -0
  19. package/src/gantt/base/tree-grid.js +3 -0
  20. package/src/gantt/export/export-helper.js +3 -2
  21. package/src/gantt/export/pdf-taskbar.js +12 -2
  22. package/styles/bootstrap-dark.css +1 -1
  23. package/styles/bootstrap.css +1 -1
  24. package/styles/bootstrap4.css +1 -1
  25. package/styles/bootstrap5-dark.css +1 -1
  26. package/styles/bootstrap5.css +1 -1
  27. package/styles/fabric-dark.css +1 -1
  28. package/styles/fabric.css +1 -1
  29. package/styles/fluent-dark.css +1 -1
  30. package/styles/fluent.css +1 -1
  31. package/styles/gantt/_layout.scss +1 -1
  32. package/styles/gantt/bootstrap-dark.css +1 -1
  33. package/styles/gantt/bootstrap.css +1 -1
  34. package/styles/gantt/bootstrap4.css +1 -1
  35. package/styles/gantt/bootstrap5-dark.css +1 -1
  36. package/styles/gantt/bootstrap5.css +1 -1
  37. package/styles/gantt/fabric-dark.css +1 -1
  38. package/styles/gantt/fabric.css +1 -1
  39. package/styles/gantt/fluent-dark.css +1 -1
  40. package/styles/gantt/fluent.css +1 -1
  41. package/styles/gantt/highcontrast-light.css +1 -1
  42. package/styles/gantt/highcontrast.css +1 -1
  43. package/styles/gantt/material-dark.css +1 -1
  44. package/styles/gantt/material.css +1 -1
  45. package/styles/gantt/material3-dark.css +1 -1
  46. package/styles/gantt/material3.css +1 -1
  47. package/styles/gantt/tailwind-dark.css +1 -1
  48. package/styles/gantt/tailwind.css +1 -1
  49. package/styles/highcontrast-light.css +1 -1
  50. package/styles/highcontrast.css +1 -1
  51. package/styles/material-dark.css +1 -1
  52. package/styles/material.css +1 -1
  53. package/styles/material3-dark.css +1 -1
  54. package/styles/material3.css +1 -1
  55. package/styles/tailwind-dark.css +1 -1
  56. 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()
@@ -8110,6 +8116,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8110
8116
  this.bindEvents();
8111
8117
  var root = 'root';
8112
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);
8113
8122
  this.parent.treeGrid.appendTo(this.treeGridElement);
8114
8123
  if (this.parent.treeGrid.grid && this.parent.toolbarModule && this.parent.isReact) {
8115
8124
  this.parent.treeGrid.grid.portals = this.parent.portals;
@@ -21418,7 +21427,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
21418
21427
  pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
21419
21428
  /* To render the milestone in proper date while editing */
21420
21429
  if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
21421
- pStartDate.setDate(pStartDate.getDate() - 1);
21430
+ // pStartDate.setDate(pStartDate.getDate()-1);
21422
21431
  this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
21423
21432
  pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
21424
21433
  }
@@ -21428,9 +21437,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
21428
21437
  if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
21429
21438
  pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
21430
21439
  }
21431
- else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
21432
- pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
21433
- }
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
+ // }
21434
21443
  }
21435
21444
  return pStartDate;
21436
21445
  };
@@ -29118,10 +29127,16 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
29118
29127
  }
29119
29128
  if (!isNullOrUndefined(args.data["" + tempTaskID])) {
29120
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
+ }
29121
29137
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
29122
29138
  args.newTaskData[tempTaskID] = args.data[tempTaskID];
29123
29139
  args.data['ganttProperties']['rowUniqueID'] = args.data[tempTaskID].toString();
29124
- _this.parent.ids.push(args.data[tempTaskID].toString());
29125
29140
  }
29126
29141
  }
29127
29142
  if (!args.cancel) {
@@ -37937,9 +37952,11 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
37937
37952
  compositeField.draw(footer.graphics, new PointF(0, 0));
37938
37953
  pdfDoc.template.bottom = footer;
37939
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;
37940
37958
  // code for draw header content
37941
37959
  if (!isNullOrUndefined(this.exportProps.header)) {
37942
- var clientSize = this.pdfDoc.pageSettings.size;
37943
37960
  var headerProp = this.exportProps.header;
37944
37961
  var position = new PointF(0, headerProp.fromTop);
37945
37962
  var size = new SizeF((clientSize.width * 1.1), ((headerProp && headerProp.height) ? headerProp.height * 0.75 : 50));
@@ -37948,7 +37965,6 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
37948
37965
  }
37949
37966
  // code for customization of footer
37950
37967
  if (!this.exportProps.enableFooter && !isNullOrUndefined(this.exportProps.footer)) {
37951
- var clientSize = this.pdfDoc.pageSettings.size;
37952
37968
  var footer = this.exportProps.footer;
37953
37969
  var position = new PointF(0, ((clientSize.width - 80) - ((footer && footer.fromBottom) ?
37954
37970
  footer.fromBottom * 0.75 : 0)));
@@ -38369,11 +38385,21 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
38369
38385
  var pageIndex = -1;
38370
38386
  var renderBaselineWidth = 0;
38371
38387
  if (this.baselineWidth > detail.totalWidth) {
38372
- renderBaselineWidth = detail.totalWidth;
38388
+ if (this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) {
38389
+ renderBaselineWidth = detail.totalWidth - this.baselineLeft;
38390
+ }
38391
+ else {
38392
+ renderBaselineWidth = detail.totalWidth;
38393
+ }
38373
38394
  this.baselineWidth = this.baselineWidth - detail.totalWidth;
38374
38395
  }
38375
38396
  else {
38376
- renderBaselineWidth = this.baselineWidth;
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
+ }
38377
38403
  }
38378
38404
  var baselinePen = new PdfPen(taskbar.baselineBorderColor);
38379
38405
  var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
@@ -40748,8 +40774,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
40748
40774
  var _this = this;
40749
40775
  var section = this.pdfDocument.sections.add();
40750
40776
  this.processSectionExportProperties(section, pdfExportProperties);
40751
- var pdfPage = section.pages.add();
40752
- this.pdfPageDimensions = pdfPage.getClientSize();
40777
+ this.pdfPage = section.pages.add();
40778
+ this.pdfPageDimensions = this.pdfPage.getClientSize();
40753
40779
  /* eslint-disable-next-line */
40754
40780
  return new Promise(function (resolve, reject) {
40755
40781
  _this.helper.processGridExport(data, _this.gantt, pdfExportProperties);
@@ -40758,7 +40784,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
40758
40784
  }).then(function () {
40759
40785
  var format = new PdfTreeGridLayoutFormat();
40760
40786
  format.break = PdfLayoutBreakType.FitElement;
40761
- var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
40787
+ var layouter = _this.gantt.drawGrid(_this.pdfPage, 0, 0, format);
40762
40788
  _this.gantt.drawChart(layouter);
40763
40789
  if (_this.helper.exportProps && _this.helper.exportProps.fitToWidthSettings && _this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
40764
40790
  _this.parent.zoomingProjectStartDate = _this.helper.beforeSinglePageExport['zoomingProjectStartDate'];