@syncfusion/ej2-gantt 20.1.52 → 20.1.58

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 (49) hide show
  1. package/CHANGELOG.md +29 -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 +21 -12
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +21 -12
  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 +18 -18
  12. package/src/gantt/actions/edit.js +7 -0
  13. package/src/gantt/actions/filter.js +1 -1
  14. package/src/gantt/actions/pdf-export.js +1 -1
  15. package/src/gantt/base/gantt-chart.js +7 -2
  16. package/src/gantt/base/gantt.js +2 -5
  17. package/src/gantt/base/task-processor.js +1 -1
  18. package/src/gantt/renderer/chart-rows.js +1 -1
  19. package/src/gantt/renderer/connector-line.js +1 -1
  20. package/styles/bootstrap-dark.css +45 -368
  21. package/styles/bootstrap.css +46 -374
  22. package/styles/bootstrap4.css +56 -422
  23. package/styles/bootstrap5-dark.css +46 -369
  24. package/styles/bootstrap5.css +46 -369
  25. package/styles/fabric-dark.css +46 -367
  26. package/styles/fabric.css +48 -369
  27. package/styles/fluent-dark.css +45 -367
  28. package/styles/fluent.css +45 -367
  29. package/styles/gantt/bootstrap-dark.css +45 -368
  30. package/styles/gantt/bootstrap.css +46 -374
  31. package/styles/gantt/bootstrap4.css +56 -422
  32. package/styles/gantt/bootstrap5-dark.css +46 -369
  33. package/styles/gantt/bootstrap5.css +46 -369
  34. package/styles/gantt/fabric-dark.css +46 -367
  35. package/styles/gantt/fabric.css +48 -369
  36. package/styles/gantt/fluent-dark.css +45 -367
  37. package/styles/gantt/fluent.css +45 -367
  38. package/styles/gantt/highcontrast-light.css +21 -353
  39. package/styles/gantt/highcontrast.css +48 -403
  40. package/styles/gantt/material-dark.css +42 -360
  41. package/styles/gantt/material.css +43 -362
  42. package/styles/gantt/tailwind-dark.css +41 -359
  43. package/styles/gantt/tailwind.css +41 -359
  44. package/styles/highcontrast-light.css +21 -353
  45. package/styles/highcontrast.css +48 -403
  46. package/styles/material-dark.css +42 -360
  47. package/styles/material.css +43 -362
  48. package/styles/tailwind-dark.css +41 -359
  49. package/styles/tailwind.css +41 -359
@@ -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
@@ -5030,7 +5035,7 @@ class GanttChart {
5030
5035
  this.parent.treeGrid.grid.notify('key-pressed', e);
5031
5036
  }
5032
5037
  }
5033
- if (!this.parent.editModule.cellEditModule.isCellEdit) {
5038
+ if (!isInEditedState) {
5034
5039
  if (nextElement) {
5035
5040
  if ($target.classList.contains('e-rowcell')) {
5036
5041
  this.manageFocus($target, 'remove', false);
@@ -9553,7 +9558,7 @@ class ChartRows extends DateProcessor {
9553
9558
  const chartRows = this.parent.ganttChartModule.getChartRows();
9554
9559
  //Below code is for rendering taskbartemplate in resource view with multi taskbar
9555
9560
  if (this.parent.initialChartRowElements) {
9556
- for (let j = 0; j <= this.parent.initialChartRowElements.length; j++) {
9561
+ for (let j = 0; j < this.parent.initialChartRowElements.length; j++) {
9557
9562
  if (!isNullOrUndefined(chartRows[j])) {
9558
9563
  if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
9559
9564
  !isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
@@ -10468,7 +10473,7 @@ class ConnectorLine {
10468
10473
  (Math.floor(this.parent.chartRowsModule.milestoneHeight)) : childGanttRecord.width;
10469
10474
  connectorObj.parentIndex = parentIndex;
10470
10475
  connectorObj.childIndex = childIndex;
10471
- const rowHeight = this.parent.ganttChartModule.getChartRows()[0] &&
10476
+ const rowHeight = !isNullOrUndefined(this.parent.ganttChartModule.getChartRows()) && this.parent.ganttChartModule.getChartRows()[0] &&
10472
10477
  this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;
10473
10478
  connectorObj.rowHeight = rowHeight && !isNaN(rowHeight) ? rowHeight : this.parent.rowHeight;
10474
10479
  connectorObj.type = predecessor.type;
@@ -12569,10 +12574,7 @@ let Gantt = class Gantt extends Component {
12569
12574
  this.treeGrid.dataSource = { result: this.flatData, count: count };
12570
12575
  }
12571
12576
  else {
12572
- this.treeGrid.dataSource = this.flatData;
12573
- if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
12574
- this.treeGrid.dataBind();
12575
- }
12577
+ this.treeGrid.setProperties({ dataSource: this.flatData }, false);
12576
12578
  }
12577
12579
  }
12578
12580
  else {
@@ -12689,7 +12691,7 @@ let Gantt = class Gantt extends Component {
12689
12691
  const expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
12690
12692
  this.currentViewData : this.getExpandedRecords(this.currentViewData);
12691
12693
  let height;
12692
- const chartRow$$1 = this.ganttChartModule.getChartRows()[0];
12694
+ const chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
12693
12695
  if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
12694
12696
  height = chartRow$$1.getBoundingClientRect().height;
12695
12697
  }
@@ -21315,6 +21317,13 @@ class Edit$2 {
21315
21317
  if (!isNullOrUndefined(this.parent.editModule) && ganttData) {
21316
21318
  this.parent.isOnEdit = true;
21317
21319
  this.validateUpdateValues(data, ganttData, true);
21320
+ if (data[this.parent.taskFields.resourceInfo]) {
21321
+ if (ganttData.ganttProperties.duration === 0) {
21322
+ this.parent.dataOperation.updateWorkWithDuration(ganttData);
21323
+ }
21324
+ this.updateResourceRelatedFields(ganttData, 'resource');
21325
+ this.parent.dateValidationModule.calculateEndDate(ganttData);
21326
+ }
21318
21327
  const keys = Object.keys(data);
21319
21328
  if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
21320
21329
  keys.indexOf(tasks.duration) !== -1) {
@@ -24766,7 +24775,7 @@ class Filter$1 {
24766
24775
  }
24767
24776
  updateFilterMenuPosition(element, args) {
24768
24777
  addClass([element], 'e-gantt');
24769
- document.body.appendChild(element);
24778
+ document.querySelector('#' + this.parent.controlId).appendChild(element);
24770
24779
  let targetElement;
24771
24780
  if (this.parent.showColumnMenu) {
24772
24781
  targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
@@ -31789,7 +31798,7 @@ class PdfExport {
31789
31798
  //To set section page size and page orientation.
31790
31799
  if (!isNullOrUndefined(pdfExportProperties)) {
31791
31800
  const pdfPageSettings = new PdfPageSettings();
31792
- if (!isNullOrUndefined(pdfExportProperties.pageOrientation && pdfExportProperties.pageOrientation === 'Portrait')) {
31801
+ if (!isNullOrUndefined(pdfExportProperties.pageOrientation) && pdfExportProperties.pageOrientation === 'Portrait') {
31793
31802
  pdfPageSettings.orientation = PdfPageOrientation.Portrait;
31794
31803
  }
31795
31804
  else {