@syncfusion/ej2-gantt 20.2.44 → 20.2.49

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.
@@ -653,6 +653,9 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
653
653
  */
654
654
  DateProcessor.prototype.getProjectStartDate = function (ganttProp, isLoad) {
655
655
  if (!isNullOrUndefined(this.parent.cloneProjectStartDate)) {
656
+ if (typeof this.parent.cloneProjectStartDate === 'string') {
657
+ this.parent.cloneProjectStartDate = this.getDateFromFormat(this.parent.cloneProjectStartDate);
658
+ }
656
659
  var cloneStartDate = this.checkStartDate(this.parent.cloneProjectStartDate);
657
660
  this.parent.cloneProjectStartDate = cloneStartDate;
658
661
  return new Date(cloneStartDate.getTime());
@@ -1890,7 +1893,10 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1890
1893
  this.setTime(this.parent.defaultEndTime, baselineEndDate);
1891
1894
  }
1892
1895
  if ((ganttProperties.baselineStartDate && baselineEndDate &&
1893
- (ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) || ganttProperties.isMilestone) {
1896
+ (ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) ||
1897
+ ((!isNullOrUndefined(ganttProperties.baselineStartDate) && !isNullOrUndefined(ganttProperties.startDate) && (ganttProperties.baselineStartDate.getTime() === ganttProperties.startDate.getTime()))
1898
+ && (!isNullOrUndefined(baselineEndDate) && !isNullOrUndefined(ganttProperties.endDate) && (baselineEndDate.toLocaleDateString() === ganttProperties.endDate.toLocaleDateString())) &&
1899
+ ganttProperties.isMilestone)) {
1894
1900
  baselineEndDate = ganttProperties.baselineStartDate;
1895
1901
  }
1896
1902
  this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate, ganttProperties), ganttProperties, true);
@@ -4868,7 +4874,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4868
4874
  * @private
4869
4875
  */
4870
4876
  GanttChart.prototype.expandedGanttRow = function (args) {
4871
- if ((isNullOrUndefined(args['gridRow']) || isNullOrUndefined(args['chartRow'])) && this.parent.enableVirtualization) {
4877
+ if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
4872
4878
  return;
4873
4879
  }
4874
4880
  var record = getValue('data', args);
@@ -6342,7 +6348,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
6342
6348
  endDate.setHours(24, 0, 0, 0);
6343
6349
  }
6344
6350
  }
6345
- if (this.isZooming || this.parent.isLoad) {
6351
+ if ((this.isZooming || this.parent.isLoad) && isNullOrUndefined(this.parent.projectEndDate)) {
6346
6352
  this.updateTimelineAfterZooming(endDate, false);
6347
6353
  }
6348
6354
  return endDate;
@@ -9722,7 +9728,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9722
9728
  }
9723
9729
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9724
9730
  this.templateData.ganttProperties.baselineEndDate) {
9725
- taskBaselineTemplateNode = this.getTaskBaselineNode();
9731
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9732
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9733
+ this.templateData.ganttProperties.isMilestone)
9734
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9726
9735
  }
9727
9736
  }
9728
9737
  else if (this.templateData.ganttProperties.isMilestone) {
@@ -9732,7 +9741,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9732
9741
  }
9733
9742
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9734
9743
  this.templateData.ganttProperties.baselineEndDate) {
9735
- taskBaselineTemplateNode = this.getMilestoneBaselineNode();
9744
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9745
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9746
+ this.templateData.ganttProperties.isMilestone)
9747
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9736
9748
  }
9737
9749
  }
9738
9750
  else {
@@ -9777,7 +9789,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9777
9789
  }
9778
9790
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9779
9791
  this.templateData.ganttProperties.baselineEndDate) {
9780
- taskBaselineTemplateNode = this.getTaskBaselineNode();
9792
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9793
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9794
+ this.templateData.ganttProperties.isMilestone)
9795
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9781
9796
  }
9782
9797
  }
9783
9798
  if (!this.templateData.hasChildRecords) {
@@ -11919,7 +11934,9 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
11919
11934
  _this.splitterObject.paneSettings[1].size = null;
11920
11935
  _this.splitterObject.paneSettings[1].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionChart);
11921
11936
  }
11922
- _this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
11937
+ if (isNullOrUndefined(_this.parent.projectEndDate)) {
11938
+ _this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
11939
+ }
11923
11940
  callBackPromise.resolve(splitterResizedArgs);
11924
11941
  });
11925
11942
  return callBackPromise;
@@ -28927,7 +28944,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28927
28944
  var currentData = this_1.parent.currentViewData.filter(function (e) {
28928
28945
  return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
28929
28946
  })[0];
28930
- if (currentData.index > droppedRecord.index) {
28947
+ if (currentData && currentData.index > droppedRecord.index) {
28931
28948
  endIndex = currentData.index;
28932
28949
  return "break";
28933
28950
  }
@@ -28944,7 +28961,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28944
28961
  var currentData = this_1.parent.currentViewData.filter(function (e) {
28945
28962
  return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
28946
28963
  })[0];
28947
- if (currentData.index > draggedRecord.index) {
28964
+ if (currentData && currentData.index > draggedRecord.index) {
28948
28965
  endIndex = currentData.index;
28949
28966
  return "break";
28950
28967
  }