@syncfusion/ej2-gantt 19.4.40 → 19.4.41

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.
@@ -6041,9 +6041,6 @@ class Timeline {
6041
6041
  parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
6042
6042
  scheduleDateCollection.push(new Date(startDate.toString()));
6043
6043
  increment = this.getIncrement(startDate, count, mode);
6044
- if (this.parent.isInDst(startDate)) {
6045
- increment = increment + (1000 * 60 * 60);
6046
- }
6047
6044
  newTime = startDate.getTime() + increment;
6048
6045
  startDate.setTime(newTime);
6049
6046
  if (startDate >= endDate) {
@@ -6107,24 +6104,17 @@ class Timeline {
6107
6104
  dayIntervel - 1 : dayIntervel : dayIntervel;
6108
6105
  lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
6109
6106
  increment = lastDay.getTime() - firstDay.getTime();
6110
- if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
6111
- (!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
6112
- increment = increment - (1000 * 60 * 60);
6113
- }
6114
6107
  break;
6115
6108
  }
6116
6109
  case 'Day':
6117
6110
  lastDay.setHours(24, 0, 0, 0);
6118
6111
  increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
6119
- if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
6120
- (!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
6121
- increment -= (1000 * 60 * 60);
6122
- }
6123
6112
  break;
6124
6113
  case 'Hour':
6125
6114
  lastDay.setMinutes(60);
6126
6115
  lastDay.setSeconds(0);
6127
6116
  increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * (count - 1));
6117
+ increment = this.checkDate(firstDay, lastDay, increment, count);
6128
6118
  break;
6129
6119
  case 'Minutes':
6130
6120
  lastDay.setSeconds(60);
@@ -6133,6 +6123,21 @@ class Timeline {
6133
6123
  }
6134
6124
  return increment;
6135
6125
  }
6126
+ checkDate(firstDay, lastDay, increment, count) {
6127
+ var date = new Date(firstDay.getTime());
6128
+ date.setTime(date.getTime() + increment);
6129
+ if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
6130
+ var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
6131
+ if (!this.parent.isInDst(date)) {
6132
+ increment += (1000 * 60 * 60 * diffCount);
6133
+ }
6134
+ else if (this.parent.isInDst(date)) {
6135
+ increment -= (1000 * 60 * 60 * diffCount);
6136
+ }
6137
+ }
6138
+ return increment;
6139
+ }
6140
+ ;
6136
6141
  /**
6137
6142
  * Method to find header cell was weekend or not
6138
6143
  *
@@ -6215,10 +6220,6 @@ class Timeline {
6215
6220
  */
6216
6221
  calculateWidthBetweenTwoDate(mode, scheduleWeeks, endDate) {
6217
6222
  let timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
6218
- if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
6219
- (!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
6220
- timeDifference = timeDifference - (1000 * 60 * 60);
6221
- }
6222
6223
  const balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
6223
6224
  return balanceDay * this.parent.perDayWidth;
6224
6225
  }
@@ -8960,6 +8961,7 @@ class ChartRows extends DateProcessor {
8960
8961
  }
8961
8962
  }
8962
8963
  }
8964
+ this.parent.renderTemplates();
8963
8965
  this.triggerQueryTaskbarInfo();
8964
8966
  this.parent.modifiedRecords = [];
8965
8967
  if (collapsedResourceRecord.length) {
@@ -9323,6 +9325,7 @@ class ChartRows extends DateProcessor {
9323
9325
  else {
9324
9326
  tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
9325
9327
  }
9328
+ this.parent.renderTemplates();
9326
9329
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
9327
9330
  if (isValidateRange) {
9328
9331
  this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
@@ -12912,10 +12915,8 @@ let Gantt = class Gantt extends Component {
12912
12915
  this.treeGrid.grid.searchSettings = getActualProperties(this.searchSettings);
12913
12916
  this.treeGrid.grid.dataBind();
12914
12917
  }
12915
- else {
12916
- this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
12917
- this.treeGrid.dataBind();
12918
- }
12918
+ this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
12919
+ this.treeGrid.dataBind();
12919
12920
  if (this.toolbarModule) {
12920
12921
  this.toolbarModule.updateSearchTextBox();
12921
12922
  }
@@ -17372,6 +17373,7 @@ class TaskbarEdit extends DateProcessor {
17372
17373
  this.isMouseDragged = false;
17373
17374
  }
17374
17375
  else {
17376
+ this.parent.isOnEdit = false;
17375
17377
  this.cancelTaskbarEditActionInMouseLeave();
17376
17378
  }
17377
17379
  }
@@ -18028,7 +18030,7 @@ class DialogEdit {
18028
18030
  tempData.ganttProperties.durationUnit = this.parent.durationUnit.toLocaleLowerCase();
18029
18031
  }
18030
18032
  else if (columns[i].field === taskSettings.name) {
18031
- tempData[field] = 'New Task ' + id;
18033
+ tempData[field] = this.localeObj.getConstant('addDialogTitle') + ' ' + id;
18032
18034
  tempData.ganttProperties.taskName = tempData[field];
18033
18035
  }
18034
18036
  else if (columns[i].field === taskSettings.progress) {