@syncfusion/ej2-gantt 19.3.56 → 19.3.57
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.
- package/CHANGELOG.md +8 -0
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +40 -24
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +40 -24
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/gantt/actions/taskbar-edit.d.ts +0 -15
- package/src/gantt/actions/taskbar-edit.js +2 -23
- package/src/gantt/base/gantt.d.ts +15 -0
- package/src/gantt/base/gantt.js +21 -0
- package/src/gantt/renderer/timeline.js +17 -1
|
@@ -6090,6 +6090,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6090
6090
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
|
|
6091
6091
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
6092
6092
|
increment = this.getIncrement(startDate, count, mode);
|
|
6093
|
+
if (this.parent.isInDst(startDate)) {
|
|
6094
|
+
increment = increment + (1000 * 60 * 60);
|
|
6095
|
+
}
|
|
6093
6096
|
newTime = startDate.getTime() + increment;
|
|
6094
6097
|
startDate.setTime(newTime);
|
|
6095
6098
|
if (startDate >= endDate) {
|
|
@@ -6153,11 +6156,19 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6153
6156
|
dayIntervel - 1 : dayIntervel : dayIntervel;
|
|
6154
6157
|
lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
|
|
6155
6158
|
increment = lastDay.getTime() - firstDay.getTime();
|
|
6159
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6160
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6161
|
+
increment = increment - (1000 * 60 * 60);
|
|
6162
|
+
}
|
|
6156
6163
|
break;
|
|
6157
6164
|
}
|
|
6158
6165
|
case 'Day':
|
|
6159
6166
|
lastDay.setHours(24, 0, 0, 0);
|
|
6160
6167
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
|
|
6168
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6169
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6170
|
+
increment -= (1000 * 60 * 60);
|
|
6171
|
+
}
|
|
6161
6172
|
break;
|
|
6162
6173
|
case 'Hour':
|
|
6163
6174
|
lastDay.setMinutes(60);
|
|
@@ -6252,7 +6263,12 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6252
6263
|
* @private
|
|
6253
6264
|
*/
|
|
6254
6265
|
Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
|
|
6255
|
-
var
|
|
6266
|
+
var timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
6267
|
+
if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
|
|
6268
|
+
(!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
|
|
6269
|
+
timeDifference = timeDifference - (1000 * 60 * 60);
|
|
6270
|
+
}
|
|
6271
|
+
var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
6256
6272
|
return balanceDay * this.parent.perDayWidth;
|
|
6257
6273
|
};
|
|
6258
6274
|
/**
|
|
@@ -12437,6 +12453,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12437
12453
|
Gantt.prototype.getModuleName = function () {
|
|
12438
12454
|
return 'gantt';
|
|
12439
12455
|
};
|
|
12456
|
+
/**
|
|
12457
|
+
* To get timezone offset.
|
|
12458
|
+
*
|
|
12459
|
+
* @returns {number} .
|
|
12460
|
+
* @private
|
|
12461
|
+
*/
|
|
12462
|
+
Gantt.prototype.getDefaultTZOffset = function () {
|
|
12463
|
+
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
12464
|
+
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
12465
|
+
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
12466
|
+
};
|
|
12467
|
+
/**
|
|
12468
|
+
* To check whether the date is in DST.
|
|
12469
|
+
*
|
|
12470
|
+
* @param {Date} date .
|
|
12471
|
+
* @returns {boolean} .
|
|
12472
|
+
* @private
|
|
12473
|
+
*/
|
|
12474
|
+
Gantt.prototype.isInDst = function (date) {
|
|
12475
|
+
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
12476
|
+
};
|
|
12440
12477
|
/**
|
|
12441
12478
|
* For internal use only - Initialize the event handler
|
|
12442
12479
|
*
|
|
@@ -17602,36 +17639,15 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17602
17639
|
var tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
|
|
17603
17640
|
this.parent.timelineModule.bottomTier;
|
|
17604
17641
|
if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
|
|
17605
|
-
if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
|
|
17642
|
+
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
17606
17643
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
17607
17644
|
}
|
|
17608
|
-
else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
|
|
17645
|
+
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
17609
17646
|
pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
17610
17647
|
}
|
|
17611
17648
|
}
|
|
17612
17649
|
return pStartDate;
|
|
17613
17650
|
};
|
|
17614
|
-
/**
|
|
17615
|
-
* To get timezone offset.
|
|
17616
|
-
*
|
|
17617
|
-
* @returns {number} .
|
|
17618
|
-
* @private
|
|
17619
|
-
*/
|
|
17620
|
-
TaskbarEdit.prototype.getDefaultTZOffset = function () {
|
|
17621
|
-
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
17622
|
-
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
17623
|
-
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
17624
|
-
};
|
|
17625
|
-
/**
|
|
17626
|
-
* To check whether the date is in DST.
|
|
17627
|
-
*
|
|
17628
|
-
* @param {Date} date .
|
|
17629
|
-
* @returns {boolean} .
|
|
17630
|
-
* @private
|
|
17631
|
-
*/
|
|
17632
|
-
TaskbarEdit.prototype.isInDst = function (date) {
|
|
17633
|
-
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
17634
|
-
};
|
|
17635
17651
|
/**
|
|
17636
17652
|
* To set item position.
|
|
17637
17653
|
*
|