@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
@@ -1650,7 +1650,7 @@ class TaskProcessor extends DateProcessor {
1650
1650
  const child = this.parent.taskFields.child;
1651
1651
  const resourceData = tempData && tempData[this.parent.taskFields.resourceInfo];
1652
1652
  const resourceIdMapping = this.parent.resourceFields.id;
1653
- if (!tempData[child] && resourceData && resourceData.length) {
1653
+ if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
1654
1654
  resourceData.forEach((resource) => {
1655
1655
  const id = (typeof resource === 'object') ? resource[resourceIdMapping] :
1656
1656
  resource;
@@ -4662,7 +4662,12 @@ class GanttChart {
4662
4662
  * @private
4663
4663
  */
4664
4664
  getChartRows() {
4665
- return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
4665
+ if (document.getElementById(this.parent.element.id + 'GanttTaskTableBody') != null) {
4666
+ return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
4667
+ }
4668
+ else {
4669
+ return null;
4670
+ }
4666
4671
  }
4667
4672
  /**
4668
4673
  * Expand Collapse operations from gantt chart side
@@ -5467,6 +5472,9 @@ class Timeline {
5467
5472
  this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
5468
5473
  }
5469
5474
  this.parent.dataOperation.calculateProjectDates();
5475
+ if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
5476
+ this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
5477
+ }
5470
5478
  const timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
5471
5479
  const totalDays = (timeDifference / (1000 * 3600 * 24));
5472
5480
  const chartWidth = this.parent.ganttChartModule.chartElement.offsetWidth;
@@ -9553,7 +9561,7 @@ class ChartRows extends DateProcessor {
9553
9561
  const chartRows = this.parent.ganttChartModule.getChartRows();
9554
9562
  //Below code is for rendering taskbartemplate in resource view with multi taskbar
9555
9563
  if (this.parent.initialChartRowElements) {
9556
- for (let j = 0; j <= this.parent.initialChartRowElements.length; j++) {
9564
+ for (let j = 0; j < this.parent.initialChartRowElements.length; j++) {
9557
9565
  if (!isNullOrUndefined(chartRows[j])) {
9558
9566
  if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
9559
9567
  !isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
@@ -10468,7 +10476,7 @@ class ConnectorLine {
10468
10476
  (Math.floor(this.parent.chartRowsModule.milestoneHeight)) : childGanttRecord.width;
10469
10477
  connectorObj.parentIndex = parentIndex;
10470
10478
  connectorObj.childIndex = childIndex;
10471
- const rowHeight = this.parent.ganttChartModule.getChartRows()[0] &&
10479
+ const rowHeight = !isNullOrUndefined(this.parent.ganttChartModule.getChartRows()) && this.parent.ganttChartModule.getChartRows()[0] &&
10472
10480
  this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;
10473
10481
  connectorObj.rowHeight = rowHeight && !isNaN(rowHeight) ? rowHeight : this.parent.rowHeight;
10474
10482
  connectorObj.type = predecessor.type;
@@ -12569,10 +12577,7 @@ let Gantt = class Gantt extends Component {
12569
12577
  this.treeGrid.dataSource = { result: this.flatData, count: count };
12570
12578
  }
12571
12579
  else {
12572
- this.treeGrid.dataSource = this.flatData;
12573
- if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
12574
- this.treeGrid.dataBind();
12575
- }
12580
+ this.treeGrid.setProperties({ dataSource: this.flatData }, false);
12576
12581
  }
12577
12582
  }
12578
12583
  else {
@@ -12689,7 +12694,7 @@ let Gantt = class Gantt extends Component {
12689
12694
  const expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
12690
12695
  this.currentViewData : this.getExpandedRecords(this.currentViewData);
12691
12696
  let height;
12692
- const chartRow$$1 = this.ganttChartModule.getChartRows()[0];
12697
+ const chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
12693
12698
  if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
12694
12699
  height = chartRow$$1.getBoundingClientRect().height;
12695
12700
  }
@@ -21316,7 +21321,11 @@ class Edit$2 {
21316
21321
  this.parent.isOnEdit = true;
21317
21322
  this.validateUpdateValues(data, ganttData, true);
21318
21323
  if (data[this.parent.taskFields.resourceInfo]) {
21324
+ if (ganttData.ganttProperties.duration === 0) {
21325
+ this.parent.dataOperation.updateWorkWithDuration(ganttData);
21326
+ }
21319
21327
  this.updateResourceRelatedFields(ganttData, 'resource');
21328
+ this.parent.dateValidationModule.calculateEndDate(ganttData);
21320
21329
  }
21321
21330
  const keys = Object.keys(data);
21322
21331
  if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
@@ -30424,13 +30433,13 @@ class ExportValueFormatter {
30424
30433
  if (typeof args.column.format === 'string') {
30425
30434
  let format;
30426
30435
  if (args.column.type === 'date') {
30427
- format = { type: 'date', skeleton: args.column.format };
30436
+ format = { type: 'date', format: args.column.format };
30428
30437
  }
30429
30438
  else if (args.column.type === 'time') {
30430
- format = { type: 'time', skeleton: args.column.format };
30439
+ format = { type: 'time', format: args.column.format };
30431
30440
  }
30432
30441
  else {
30433
- format = { type: 'dateTime', skeleton: args.column.format };
30442
+ format = { type: 'dateTime', format: args.column.format };
30434
30443
  }
30435
30444
  return this.returnFormattedValue(args, format);
30436
30445
  }
@@ -31792,7 +31801,7 @@ class PdfExport {
31792
31801
  //To set section page size and page orientation.
31793
31802
  if (!isNullOrUndefined(pdfExportProperties)) {
31794
31803
  const pdfPageSettings = new PdfPageSettings();
31795
- if (!isNullOrUndefined(pdfExportProperties.pageOrientation && pdfExportProperties.pageOrientation === 'Portrait')) {
31804
+ if (!isNullOrUndefined(pdfExportProperties.pageOrientation) && pdfExportProperties.pageOrientation === 'Portrait') {
31796
31805
  pdfPageSettings.orientation = PdfPageOrientation.Portrait;
31797
31806
  }
31798
31807
  else {