@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
@@ -479,7 +479,8 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
479
479
  DateProcessor.prototype.calculateDuration = function (ganttData) {
480
480
  var ganttProperties = ganttData.ganttProperties;
481
481
  var tDuration;
482
- if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0) {
482
+ if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0 &&
483
+ !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
483
484
  tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
484
485
  }
485
486
  else {
@@ -6585,7 +6586,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
6585
6586
  var validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
6586
6587
  var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
6587
6588
  var isChanged = void 0;
6588
- if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft <= this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
6589
+ if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
6589
6590
  isChanged = 'prevTimeSpan';
6590
6591
  minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
6591
6592
  }
@@ -6960,6 +6961,10 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
6960
6961
  };
6961
6962
  GanttTreeGrid.prototype.actionBegin = function (args) {
6962
6963
  this.parent.notify('actionBegin', args);
6964
+ var flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
6965
+ if (flag !== null) {
6966
+ setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
6967
+ }
6963
6968
  this.parent.trigger('actionBegin', args);
6964
6969
  }; // eslint-disable-next-line
6965
6970
  GanttTreeGrid.prototype.created = function (args) {
@@ -8364,11 +8369,20 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8364
8369
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
8365
8370
  }
8366
8371
  if (labelString !== 'null') {
8367
- taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
8368
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : '') +
8369
- 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : '') +
8370
- 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8371
- this.taskBarHeight + 'px;">' + labelString + '</span>';
8372
+ if (isNaN(parseInt(labelString))) {
8373
+ taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
8374
+ (this.taskBarHeight - 1) + 'px; text-align: left;' +
8375
+ 'display:' + 'inline-block;' +
8376
+ 'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
8377
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
8378
+ }
8379
+ else {
8380
+ taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
8381
+ (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : ';') +
8382
+ 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') +
8383
+ 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8384
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
8385
+ }
8372
8386
  }
8373
8387
  var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
8374
8388
  this.splitTaskbar(data, labelString) : (data.ganttProperties.startDate && data.ganttProperties.endDate
@@ -8967,11 +8981,20 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8967
8981
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
8968
8982
  }
8969
8983
  if (labelString !== 'null') {
8970
- labelDiv = this.createDivElement('<span class="' +
8971
- taskLabel + '" style="line-height:' +
8972
- (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : '') + 'width:' +
8973
- (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8974
- this.taskBarHeight + 'px;">' + labelString + '</span>');
8984
+ if (isNaN(parseInt(labelString))) {
8985
+ labelDiv = this.createDivElement('<span class="' + taskLabel + '" style="line-height:' +
8986
+ (this.taskBarHeight - 1) + 'px; text-align: left;' +
8987
+ 'display:' + 'inline-block;' +
8988
+ 'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
8989
+ this.taskBarHeight + 'px;">' + labelString + '</span>');
8990
+ }
8991
+ else {
8992
+ labelDiv = this.createDivElement('<span class="' +
8993
+ taskLabel + '" style="line-height:' +
8994
+ (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') + 'width:' +
8995
+ (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : ';') + 'px; height:' +
8996
+ this.taskBarHeight + 'px;">' + labelString + '</span>');
8997
+ }
8975
8998
  progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
8976
8999
  }
8977
9000
  var milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
@@ -16035,7 +16058,8 @@ var CellEdit = /** @__PURE__ @class */ (function () {
16035
16058
  if (!ganttRecord.ganttProperties.isAutoSchedule) {
16036
16059
  this.parent.setRecordValue('autoWidth', this.parent.dataOperation.calculateWidth(ganttRecord, false), ganttRecord.ganttProperties, true);
16037
16060
  }
16038
- if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0) {
16061
+ if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0 &&
16062
+ !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
16039
16063
  this.parent.editModule.taskbarEditModule.updateSegmentProgress(args.data.ganttProperties);
16040
16064
  }
16041
16065
  if (!args.data.hasChildRecords) {
@@ -24121,10 +24145,6 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24121
24145
  }
24122
24146
  this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
24123
24147
  }
24124
- var flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
24125
- if (flag !== null) {
24126
- setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
24127
- }
24128
24148
  this.addSuccess(args);
24129
24149
  args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
24130
24150
  this.parent.trigger('actionComplete', args);
@@ -27633,7 +27653,13 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27633
27653
  }
27634
27654
  else {
27635
27655
  startIndex = droppedRecord.index;
27636
- endIndex = draggedRecord.index;
27656
+ var rootChildRecord = draggedRecord;
27657
+ if (rootChildRecord.childRecords.length > 0) {
27658
+ do {
27659
+ rootChildRecord = rootChildRecord.childRecords[rootChildRecord.childRecords.length - 1];
27660
+ } while (rootChildRecord.childRecords.length > 0);
27661
+ }
27662
+ endIndex = rootChildRecord.index;
27637
27663
  }
27638
27664
  var _loop_2 = function (i_1) {
27639
27665
  if (!isNullOrUndefined(data_1[i_1])) {