@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
|
@@ -6024,6 +6024,9 @@ class Timeline {
|
|
|
6024
6024
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
|
|
6025
6025
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
6026
6026
|
increment = this.getIncrement(startDate, count, mode);
|
|
6027
|
+
if (this.parent.isInDst(startDate)) {
|
|
6028
|
+
increment = increment + (1000 * 60 * 60);
|
|
6029
|
+
}
|
|
6027
6030
|
newTime = startDate.getTime() + increment;
|
|
6028
6031
|
startDate.setTime(newTime);
|
|
6029
6032
|
if (startDate >= endDate) {
|
|
@@ -6087,11 +6090,19 @@ class Timeline {
|
|
|
6087
6090
|
dayIntervel - 1 : dayIntervel : dayIntervel;
|
|
6088
6091
|
lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
|
|
6089
6092
|
increment = lastDay.getTime() - firstDay.getTime();
|
|
6093
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6094
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6095
|
+
increment = increment - (1000 * 60 * 60);
|
|
6096
|
+
}
|
|
6090
6097
|
break;
|
|
6091
6098
|
}
|
|
6092
6099
|
case 'Day':
|
|
6093
6100
|
lastDay.setHours(24, 0, 0, 0);
|
|
6094
6101
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
|
|
6102
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
6103
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
6104
|
+
increment -= (1000 * 60 * 60);
|
|
6105
|
+
}
|
|
6095
6106
|
break;
|
|
6096
6107
|
case 'Hour':
|
|
6097
6108
|
lastDay.setMinutes(60);
|
|
@@ -6186,7 +6197,12 @@ class Timeline {
|
|
|
6186
6197
|
* @private
|
|
6187
6198
|
*/
|
|
6188
6199
|
calculateWidthBetweenTwoDate(mode, scheduleWeeks, endDate) {
|
|
6189
|
-
|
|
6200
|
+
let timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
6201
|
+
if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
|
|
6202
|
+
(!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
|
|
6203
|
+
timeDifference = timeDifference - (1000 * 60 * 60);
|
|
6204
|
+
}
|
|
6205
|
+
const balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
6190
6206
|
return balanceDay * this.parent.perDayWidth;
|
|
6191
6207
|
}
|
|
6192
6208
|
/**
|
|
@@ -12023,6 +12039,27 @@ let Gantt = class Gantt extends Component {
|
|
|
12023
12039
|
getModuleName() {
|
|
12024
12040
|
return 'gantt';
|
|
12025
12041
|
}
|
|
12042
|
+
/**
|
|
12043
|
+
* To get timezone offset.
|
|
12044
|
+
*
|
|
12045
|
+
* @returns {number} .
|
|
12046
|
+
* @private
|
|
12047
|
+
*/
|
|
12048
|
+
getDefaultTZOffset() {
|
|
12049
|
+
const janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
12050
|
+
const julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
12051
|
+
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
12052
|
+
}
|
|
12053
|
+
/**
|
|
12054
|
+
* To check whether the date is in DST.
|
|
12055
|
+
*
|
|
12056
|
+
* @param {Date} date .
|
|
12057
|
+
* @returns {boolean} .
|
|
12058
|
+
* @private
|
|
12059
|
+
*/
|
|
12060
|
+
isInDst(date) {
|
|
12061
|
+
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
12062
|
+
}
|
|
12026
12063
|
/**
|
|
12027
12064
|
* For internal use only - Initialize the event handler
|
|
12028
12065
|
*
|
|
@@ -17148,36 +17185,15 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17148
17185
|
const tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
|
|
17149
17186
|
this.parent.timelineModule.bottomTier;
|
|
17150
17187
|
if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
|
|
17151
|
-
if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
|
|
17188
|
+
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
17152
17189
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
17153
17190
|
}
|
|
17154
|
-
else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
|
|
17191
|
+
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
17155
17192
|
pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
17156
17193
|
}
|
|
17157
17194
|
}
|
|
17158
17195
|
return pStartDate;
|
|
17159
17196
|
}
|
|
17160
|
-
/**
|
|
17161
|
-
* To get timezone offset.
|
|
17162
|
-
*
|
|
17163
|
-
* @returns {number} .
|
|
17164
|
-
* @private
|
|
17165
|
-
*/
|
|
17166
|
-
getDefaultTZOffset() {
|
|
17167
|
-
const janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
17168
|
-
const julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
17169
|
-
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
17170
|
-
}
|
|
17171
|
-
/**
|
|
17172
|
-
* To check whether the date is in DST.
|
|
17173
|
-
*
|
|
17174
|
-
* @param {Date} date .
|
|
17175
|
-
* @returns {boolean} .
|
|
17176
|
-
* @private
|
|
17177
|
-
*/
|
|
17178
|
-
isInDst(date) {
|
|
17179
|
-
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
17180
|
-
}
|
|
17181
17197
|
/**
|
|
17182
17198
|
* To set item position.
|
|
17183
17199
|
*
|