@syncfusion/ej2-gantt 19.4.50 → 19.4.54

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 (46) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -1
  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 +44 -18
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +44 -18
  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 +18 -18
  13. package/src/gantt/actions/cell-edit.js +2 -1
  14. package/src/gantt/actions/edit.js +0 -4
  15. package/src/gantt/actions/rowdragdrop.js +7 -1
  16. package/src/gantt/base/date-processor.js +2 -1
  17. package/src/gantt/base/tree-grid.js +4 -0
  18. package/src/gantt/renderer/chart-rows.js +28 -10
  19. package/src/gantt/renderer/timeline.js +1 -1
  20. package/styles/bootstrap-dark.css +3 -0
  21. package/styles/bootstrap.css +3 -0
  22. package/styles/bootstrap4.css +3 -0
  23. package/styles/bootstrap5-dark.css +3 -0
  24. package/styles/bootstrap5.css +3 -0
  25. package/styles/fabric-dark.css +3 -0
  26. package/styles/fabric.css +3 -0
  27. package/styles/gantt/_layout.scss +3 -0
  28. package/styles/gantt/bootstrap-dark.css +3 -0
  29. package/styles/gantt/bootstrap.css +3 -0
  30. package/styles/gantt/bootstrap4.css +3 -0
  31. package/styles/gantt/bootstrap5-dark.css +3 -0
  32. package/styles/gantt/bootstrap5.css +3 -0
  33. package/styles/gantt/fabric-dark.css +3 -0
  34. package/styles/gantt/fabric.css +3 -0
  35. package/styles/gantt/highcontrast-light.css +3 -0
  36. package/styles/gantt/highcontrast.css +3 -0
  37. package/styles/gantt/material-dark.css +3 -0
  38. package/styles/gantt/material.css +3 -0
  39. package/styles/gantt/tailwind-dark.css +3 -0
  40. package/styles/gantt/tailwind.css +3 -0
  41. package/styles/highcontrast-light.css +3 -0
  42. package/styles/highcontrast.css +3 -0
  43. package/styles/material-dark.css +3 -0
  44. package/styles/material.css +3 -0
  45. package/styles/tailwind-dark.css +3 -0
  46. package/styles/tailwind.css +3 -0
@@ -478,7 +478,8 @@ class DateProcessor {
478
478
  calculateDuration(ganttData) {
479
479
  const ganttProperties = ganttData.ganttProperties;
480
480
  let tDuration;
481
- if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0) {
481
+ if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0 &&
482
+ !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
482
483
  tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
483
484
  }
484
485
  else {
@@ -6519,7 +6520,7 @@ class Timeline {
6519
6520
  const validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
6520
6521
  const validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
6521
6522
  let isChanged;
6522
- if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft <= this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
6523
+ if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
6523
6524
  isChanged = 'prevTimeSpan';
6524
6525
  minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
6525
6526
  }
@@ -6891,6 +6892,10 @@ class GanttTreeGrid {
6891
6892
  }
6892
6893
  actionBegin(args) {
6893
6894
  this.parent.notify('actionBegin', args);
6895
+ let flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
6896
+ if (flag !== null) {
6897
+ setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
6898
+ }
6894
6899
  this.parent.trigger('actionBegin', args);
6895
6900
  } // eslint-disable-next-line
6896
6901
  created(args) {
@@ -7976,11 +7981,20 @@ class ChartRows extends DateProcessor {
7976
7981
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
7977
7982
  }
7978
7983
  if (labelString !== 'null') {
7979
- taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
7980
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : '') +
7981
- 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : '') +
7982
- 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
7983
- this.taskBarHeight + 'px;">' + labelString + '</span>';
7984
+ if (isNaN(parseInt(labelString))) {
7985
+ taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
7986
+ (this.taskBarHeight - 1) + 'px; text-align: left;' +
7987
+ 'display:' + 'inline-block;' +
7988
+ 'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
7989
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
7990
+ }
7991
+ else {
7992
+ taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
7993
+ (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : ';') +
7994
+ 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') +
7995
+ 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
7996
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
7997
+ }
7984
7998
  }
7985
7999
  const template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
7986
8000
  this.splitTaskbar(data, labelString) : (data.ganttProperties.startDate && data.ganttProperties.endDate
@@ -8579,11 +8593,20 @@ class ChartRows extends DateProcessor {
8579
8593
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
8580
8594
  }
8581
8595
  if (labelString !== 'null') {
8582
- labelDiv = this.createDivElement('<span class="' +
8583
- taskLabel + '" style="line-height:' +
8584
- (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : '') + 'width:' +
8585
- (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8586
- this.taskBarHeight + 'px;">' + labelString + '</span>');
8596
+ if (isNaN(parseInt(labelString))) {
8597
+ labelDiv = this.createDivElement('<span class="' + taskLabel + '" style="line-height:' +
8598
+ (this.taskBarHeight - 1) + 'px; text-align: left;' +
8599
+ 'display:' + 'inline-block;' +
8600
+ 'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
8601
+ this.taskBarHeight + 'px;">' + labelString + '</span>');
8602
+ }
8603
+ else {
8604
+ labelDiv = this.createDivElement('<span class="' +
8605
+ taskLabel + '" style="line-height:' +
8606
+ (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') + 'width:' +
8607
+ (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : ';') + 'px; height:' +
8608
+ this.taskBarHeight + 'px;">' + labelString + '</span>');
8609
+ }
8587
8610
  progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
8588
8611
  }
8589
8612
  const milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
@@ -15616,7 +15639,8 @@ class CellEdit {
15616
15639
  if (!ganttRecord.ganttProperties.isAutoSchedule) {
15617
15640
  this.parent.setRecordValue('autoWidth', this.parent.dataOperation.calculateWidth(ganttRecord, false), ganttRecord.ganttProperties, true);
15618
15641
  }
15619
- if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0) {
15642
+ if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0 &&
15643
+ !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
15620
15644
  this.parent.editModule.taskbarEditModule.updateSegmentProgress(args.data.ganttProperties);
15621
15645
  }
15622
15646
  if (!args.data.hasChildRecords) {
@@ -23614,10 +23638,6 @@ class Edit$2 {
23614
23638
  }
23615
23639
  this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
23616
23640
  }
23617
- let flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
23618
- if (flag !== null) {
23619
- setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
23620
- }
23621
23641
  this.addSuccess(args);
23622
23642
  args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
23623
23643
  this.parent.trigger('actionComplete', args);
@@ -27088,7 +27108,13 @@ class RowDD$1 {
27088
27108
  }
27089
27109
  else {
27090
27110
  startIndex = droppedRecord.index;
27091
- endIndex = draggedRecord.index;
27111
+ let rootChildRecord = draggedRecord;
27112
+ if (rootChildRecord.childRecords.length > 0) {
27113
+ do {
27114
+ rootChildRecord = rootChildRecord.childRecords[rootChildRecord.childRecords.length - 1];
27115
+ } while (rootChildRecord.childRecords.length > 0);
27116
+ }
27117
+ endIndex = rootChildRecord.index;
27092
27118
  }
27093
27119
  for (let i = startIndex; i <= endIndex; i++) {
27094
27120
  if (!isNullOrUndefined(data[i])) {