@syncfusion/ej2-gantt 23.2.4 → 23.2.5

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.
@@ -271,7 +271,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
271
271
  if (!this.parent.includeWeekend) {
272
272
  var tempDate = new Date(cloneStartDate.getTime());
273
273
  cloneStartDate = this.getNextWorkingDay(cloneStartDate);
274
- if (tempDate.getTime() !== cloneStartDate.getTime()) {
274
+ if (tempDate.getTime() !== cloneStartDate.getTime() && !validateAsMilestone) {
275
275
  this.setTime(startTime, cloneStartDate);
276
276
  }
277
277
  }
@@ -7482,10 +7482,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
7482
7482
  var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
7483
7483
  var isChanged = void 0;
7484
7484
  var taskbarModule = this.parent.editModule.taskbarEditModule;
7485
- if (!isNullOrUndefined(maxStartLeft) && ((minStartDate < this.timelineStartDate) ||
7486
- (!isNullOrUndefined(taskbarModule)) && (!isNullOrUndefined(taskbarModule.taskBarEditAction)
7487
- && taskbarModule.taskBarEditAction !== 'ProgressResizing' &&
7488
- taskbarModule.taskBarEditAction !== 'RightResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
7485
+ if (!isNullOrUndefined(maxStartLeft) && ((!isNullOrUndefined(taskbarModule)) && (!isNullOrUndefined(taskbarModule.taskBarEditAction)
7486
+ && taskbarModule.taskBarEditAction !== 'ProgressResizing' &&
7487
+ taskbarModule.taskBarEditAction !== 'RightResizing' && taskbarModule.taskBarEditAction !== 'LeftResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
7489
7488
  isChanged = 'prevTimeSpan';
7490
7489
  minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
7491
7490
  }
@@ -7750,7 +7749,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7750
7749
  this.parent.treeGrid.loadChildOnDemand = this.parent.loadChildOnDemand;
7751
7750
  this.parent.treeGrid['isFromGantt'] = true;
7752
7751
  this.parent.treeGrid.parentIdMapping = this.parent.taskFields.parentID;
7753
- this.parent.treeGrid.idMapping = this.parent.taskFields.id;
7752
+ if (this.parent.taskFields.parentID) {
7753
+ this.parent.treeGrid.idMapping = this.parent.taskFields.id;
7754
+ }
7754
7755
  this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
7755
7756
  this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
7756
7757
  this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
@@ -7791,7 +7792,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7791
7792
  toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
7792
7793
  }
7793
7794
  this.parent.treeGrid.height =
7794
- this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'] - 19;
7795
+ this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'] - (this.parent.flatData.length == 0 ? 0 : 19);
7795
7796
  };
7796
7797
  GanttTreeGrid.prototype.getContentDiv = function () {
7797
7798
  return this.treeGridElement.querySelector('.e-content');
@@ -8450,7 +8451,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
8450
8451
  */
8451
8452
  GanttTreeGrid.prototype.composeIDColumn = function (column) {
8452
8453
  var isProjectView = this.parent.viewType === 'ProjectView';
8453
- var lengthDataSource = this.parent.dataSource['length'];
8454
+ var lengthDataSource = this.parent.dataSource ? this.parent.dataSource['length'] : 0;
8454
8455
  var taskIDName;
8455
8456
  column.isPrimaryKey = isProjectView ? true : false;
8456
8457
  if (this.parent.isLocaleChanged) {