@syncfusion/ej2-gantt 20.1.55 → 20.1.59

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 (75) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/ej2-gantt.umd.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-gantt.es2015.js +22 -13
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +22 -13
  7. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  8. package/dist/global/ej2-gantt.min.js +2 -2
  9. package/dist/global/ej2-gantt.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +15 -15
  12. package/src/gantt/actions/edit.js +4 -0
  13. package/src/gantt/actions/pdf-export.js +1 -1
  14. package/src/gantt/base/gantt-chart.js +6 -1
  15. package/src/gantt/base/gantt.js +2 -5
  16. package/src/gantt/base/task-processor.js +1 -1
  17. package/src/gantt/export/export-helper.js +3 -3
  18. package/src/gantt/renderer/chart-rows.js +1 -1
  19. package/src/gantt/renderer/connector-line.js +1 -1
  20. package/src/gantt/renderer/timeline.js +3 -0
  21. package/styles/bootstrap-dark.css +262 -379
  22. package/styles/bootstrap.css +264 -387
  23. package/styles/bootstrap4.css +276 -433
  24. package/styles/bootstrap5-dark.css +264 -382
  25. package/styles/bootstrap5.css +264 -382
  26. package/styles/fabric-dark.css +262 -377
  27. package/styles/fabric.css +265 -380
  28. package/styles/fluent-dark.css +262 -378
  29. package/styles/fluent.css +262 -378
  30. package/styles/gantt/_bootstrap-dark-definition.scss +41 -4
  31. package/styles/gantt/_bootstrap-definition.scss +41 -4
  32. package/styles/gantt/_bootstrap4-definition.scss +42 -4
  33. package/styles/gantt/_bootstrap5-definition.scss +41 -4
  34. package/styles/gantt/_fabric-dark-definition.scss +40 -3
  35. package/styles/gantt/_fabric-definition.scss +41 -4
  36. package/styles/gantt/_fluent-definition.scss +41 -4
  37. package/styles/gantt/_highcontrast-definition.scss +41 -4
  38. package/styles/gantt/_highcontrast-light-definition.scss +41 -4
  39. package/styles/gantt/_layout.scss +298 -7
  40. package/styles/gantt/_material-dark-definition.scss +42 -4
  41. package/styles/gantt/_material-definition.scss +42 -4
  42. package/styles/gantt/_tailwind-definition.scss +42 -4
  43. package/styles/gantt/bootstrap-dark.css +262 -379
  44. package/styles/gantt/bootstrap.css +264 -387
  45. package/styles/gantt/bootstrap4.css +276 -433
  46. package/styles/gantt/bootstrap5-dark.css +264 -382
  47. package/styles/gantt/bootstrap5.css +264 -382
  48. package/styles/gantt/fabric-dark.css +262 -377
  49. package/styles/gantt/fabric.css +265 -380
  50. package/styles/gantt/fluent-dark.css +262 -378
  51. package/styles/gantt/fluent.css +262 -378
  52. package/styles/gantt/highcontrast-light.css +230 -364
  53. package/styles/gantt/highcontrast.css +265 -414
  54. package/styles/gantt/icons/_bootstrap-dark.scss +8 -0
  55. package/styles/gantt/icons/_bootstrap.scss +8 -0
  56. package/styles/gantt/icons/_bootstrap4.scss +8 -0
  57. package/styles/gantt/icons/_bootstrap5.scss +8 -0
  58. package/styles/gantt/icons/_fabric-dark.scss +8 -0
  59. package/styles/gantt/icons/_fabric.scss +8 -0
  60. package/styles/gantt/icons/_fluent.scss +8 -0
  61. package/styles/gantt/icons/_highcontrast.scss +8 -0
  62. package/styles/gantt/icons/_material-dark.scss +8 -0
  63. package/styles/gantt/icons/_material.scss +8 -0
  64. package/styles/gantt/icons/_tailwind-dark.scss +8 -0
  65. package/styles/gantt/icons/_tailwind.scss +8 -0
  66. package/styles/gantt/material-dark.css +266 -371
  67. package/styles/gantt/material.css +267 -373
  68. package/styles/gantt/tailwind-dark.css +264 -370
  69. package/styles/gantt/tailwind.css +264 -370
  70. package/styles/highcontrast-light.css +230 -364
  71. package/styles/highcontrast.css +265 -414
  72. package/styles/material-dark.css +266 -371
  73. package/styles/material.css +267 -373
  74. package/styles/tailwind-dark.css +264 -370
  75. package/styles/tailwind.css +264 -370
@@ -1674,7 +1674,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1674
1674
  var child = this_1.parent.taskFields.child;
1675
1675
  var resourceData = tempData && tempData[this_1.parent.taskFields.resourceInfo];
1676
1676
  var resourceIdMapping = this_1.parent.resourceFields.id;
1677
- if (!tempData[child] && resourceData && resourceData.length) {
1677
+ if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
1678
1678
  resourceData.forEach(function (resource) {
1679
1679
  var id = (typeof resource === 'object') ? resource[resourceIdMapping] :
1680
1680
  resource;
@@ -4706,7 +4706,12 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4706
4706
  * @private
4707
4707
  */
4708
4708
  GanttChart.prototype.getChartRows = function () {
4709
- return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
4709
+ if (document.getElementById(this.parent.element.id + 'GanttTaskTableBody') != null) {
4710
+ return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
4711
+ }
4712
+ else {
4713
+ return null;
4714
+ }
4710
4715
  };
4711
4716
  /**
4712
4717
  * Expand Collapse operations from gantt chart side
@@ -5526,6 +5531,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
5526
5531
  this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
5527
5532
  }
5528
5533
  this.parent.dataOperation.calculateProjectDates();
5534
+ if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
5535
+ this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
5536
+ }
5529
5537
  var timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
5530
5538
  var totalDays = (timeDifference / (1000 * 3600 * 24));
5531
5539
  var chartWidth = this.parent.ganttChartModule.chartElement.offsetWidth;
@@ -9942,7 +9950,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9942
9950
  var chartRows = this.parent.ganttChartModule.getChartRows();
9943
9951
  //Below code is for rendering taskbartemplate in resource view with multi taskbar
9944
9952
  if (this.parent.initialChartRowElements) {
9945
- for (var j = 0; j <= this.parent.initialChartRowElements.length; j++) {
9953
+ for (var j = 0; j < this.parent.initialChartRowElements.length; j++) {
9946
9954
  if (!isNullOrUndefined(chartRows[j])) {
9947
9955
  if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
9948
9956
  !isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
@@ -10862,7 +10870,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
10862
10870
  (Math.floor(this.parent.chartRowsModule.milestoneHeight)) : childGanttRecord.width;
10863
10871
  connectorObj.parentIndex = parentIndex;
10864
10872
  connectorObj.childIndex = childIndex;
10865
- var rowHeight = this.parent.ganttChartModule.getChartRows()[0] &&
10873
+ var rowHeight = !isNullOrUndefined(this.parent.ganttChartModule.getChartRows()) && this.parent.ganttChartModule.getChartRows()[0] &&
10866
10874
  this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;
10867
10875
  connectorObj.rowHeight = rowHeight && !isNaN(rowHeight) ? rowHeight : this.parent.rowHeight;
10868
10876
  connectorObj.type = predecessor.type;
@@ -12983,10 +12991,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12983
12991
  this.treeGrid.dataSource = { result: this.flatData, count: count };
12984
12992
  }
12985
12993
  else {
12986
- this.treeGrid.dataSource = this.flatData;
12987
- if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
12988
- this.treeGrid.dataBind();
12989
- }
12994
+ this.treeGrid.setProperties({ dataSource: this.flatData }, false);
12990
12995
  }
12991
12996
  }
12992
12997
  else {
@@ -13103,7 +13108,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13103
13108
  var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
13104
13109
  this.currentViewData : this.getExpandedRecords(this.currentViewData);
13105
13110
  var height = void 0;
13106
- var chartRow$$1 = this.ganttChartModule.getChartRows()[0];
13111
+ var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
13107
13112
  if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
13108
13113
  height = chartRow$$1.getBoundingClientRect().height;
13109
13114
  }
@@ -21820,7 +21825,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
21820
21825
  this.parent.isOnEdit = true;
21821
21826
  this.validateUpdateValues(data, ganttData, true);
21822
21827
  if (data[this.parent.taskFields.resourceInfo]) {
21828
+ if (ganttData.ganttProperties.duration === 0) {
21829
+ this.parent.dataOperation.updateWorkWithDuration(ganttData);
21830
+ }
21823
21831
  this.updateResourceRelatedFields(ganttData, 'resource');
21832
+ this.parent.dateValidationModule.calculateEndDate(ganttData);
21824
21833
  }
21825
21834
  var keys = Object.keys(data);
21826
21835
  if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
@@ -31205,13 +31214,13 @@ var ExportValueFormatter = /** @__PURE__ @class */ (function () {
31205
31214
  if (typeof args.column.format === 'string') {
31206
31215
  var format = void 0;
31207
31216
  if (args.column.type === 'date') {
31208
- format = { type: 'date', skeleton: args.column.format };
31217
+ format = { type: 'date', format: args.column.format };
31209
31218
  }
31210
31219
  else if (args.column.type === 'time') {
31211
- format = { type: 'time', skeleton: args.column.format };
31220
+ format = { type: 'time', format: args.column.format };
31212
31221
  }
31213
31222
  else {
31214
- format = { type: 'dateTime', skeleton: args.column.format };
31223
+ format = { type: 'dateTime', format: args.column.format };
31215
31224
  }
31216
31225
  return this.returnFormattedValue(args, format);
31217
31226
  }
@@ -32634,7 +32643,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
32634
32643
  //To set section page size and page orientation.
32635
32644
  if (!isNullOrUndefined(pdfExportProperties)) {
32636
32645
  var pdfPageSettings = new PdfPageSettings();
32637
- if (!isNullOrUndefined(pdfExportProperties.pageOrientation && pdfExportProperties.pageOrientation === 'Portrait')) {
32646
+ if (!isNullOrUndefined(pdfExportProperties.pageOrientation) && pdfExportProperties.pageOrientation === 'Portrait') {
32638
32647
  pdfPageSettings.orientation = PdfPageOrientation.Portrait;
32639
32648
  }
32640
32649
  else {