@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
@@ -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
@@ -5076,7 +5081,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5076
5081
  this.parent.treeGrid.grid.notify('key-pressed', e);
5077
5082
  }
5078
5083
  }
5079
- if (!this.parent.editModule.cellEditModule.isCellEdit) {
5084
+ if (!isInEditedState) {
5080
5085
  if (nextElement) {
5081
5086
  if ($target.classList.contains('e-rowcell')) {
5082
5087
  this.manageFocus($target, 'remove', false);
@@ -9942,7 +9947,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9942
9947
  var chartRows = this.parent.ganttChartModule.getChartRows();
9943
9948
  //Below code is for rendering taskbartemplate in resource view with multi taskbar
9944
9949
  if (this.parent.initialChartRowElements) {
9945
- for (var j = 0; j <= this.parent.initialChartRowElements.length; j++) {
9950
+ for (var j = 0; j < this.parent.initialChartRowElements.length; j++) {
9946
9951
  if (!isNullOrUndefined(chartRows[j])) {
9947
9952
  if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
9948
9953
  !isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
@@ -10862,7 +10867,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
10862
10867
  (Math.floor(this.parent.chartRowsModule.milestoneHeight)) : childGanttRecord.width;
10863
10868
  connectorObj.parentIndex = parentIndex;
10864
10869
  connectorObj.childIndex = childIndex;
10865
- var rowHeight = this.parent.ganttChartModule.getChartRows()[0] &&
10870
+ var rowHeight = !isNullOrUndefined(this.parent.ganttChartModule.getChartRows()) && this.parent.ganttChartModule.getChartRows()[0] &&
10866
10871
  this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;
10867
10872
  connectorObj.rowHeight = rowHeight && !isNaN(rowHeight) ? rowHeight : this.parent.rowHeight;
10868
10873
  connectorObj.type = predecessor.type;
@@ -12983,10 +12988,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12983
12988
  this.treeGrid.dataSource = { result: this.flatData, count: count };
12984
12989
  }
12985
12990
  else {
12986
- this.treeGrid.dataSource = this.flatData;
12987
- if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
12988
- this.treeGrid.dataBind();
12989
- }
12991
+ this.treeGrid.setProperties({ dataSource: this.flatData }, false);
12990
12992
  }
12991
12993
  }
12992
12994
  else {
@@ -13103,7 +13105,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13103
13105
  var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
13104
13106
  this.currentViewData : this.getExpandedRecords(this.currentViewData);
13105
13107
  var height = void 0;
13106
- var chartRow$$1 = this.ganttChartModule.getChartRows()[0];
13108
+ var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
13107
13109
  if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
13108
13110
  height = chartRow$$1.getBoundingClientRect().height;
13109
13111
  }
@@ -21819,6 +21821,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
21819
21821
  if (!isNullOrUndefined(this.parent.editModule) && ganttData) {
21820
21822
  this.parent.isOnEdit = true;
21821
21823
  this.validateUpdateValues(data, ganttData, true);
21824
+ if (data[this.parent.taskFields.resourceInfo]) {
21825
+ if (ganttData.ganttProperties.duration === 0) {
21826
+ this.parent.dataOperation.updateWorkWithDuration(ganttData);
21827
+ }
21828
+ this.updateResourceRelatedFields(ganttData, 'resource');
21829
+ this.parent.dateValidationModule.calculateEndDate(ganttData);
21830
+ }
21822
21831
  var keys = Object.keys(data);
21823
21832
  if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
21824
21833
  keys.indexOf(tasks.duration) !== -1) {
@@ -25287,7 +25296,7 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
25287
25296
  };
25288
25297
  Filter$$1.prototype.updateFilterMenuPosition = function (element, args) {
25289
25298
  addClass([element], 'e-gantt');
25290
- document.body.appendChild(element);
25299
+ document.querySelector('#' + this.parent.controlId).appendChild(element);
25291
25300
  var targetElement;
25292
25301
  if (this.parent.showColumnMenu) {
25293
25302
  targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
@@ -32631,7 +32640,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
32631
32640
  //To set section page size and page orientation.
32632
32641
  if (!isNullOrUndefined(pdfExportProperties)) {
32633
32642
  var pdfPageSettings = new PdfPageSettings();
32634
- if (!isNullOrUndefined(pdfExportProperties.pageOrientation && pdfExportProperties.pageOrientation === 'Portrait')) {
32643
+ if (!isNullOrUndefined(pdfExportProperties.pageOrientation) && pdfExportProperties.pageOrientation === 'Portrait') {
32635
32644
  pdfPageSettings.orientation = PdfPageOrientation.Portrait;
32636
32645
  }
32637
32646
  else {