@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.3.56
3
+ * version : 19.3.57
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-gantt@*",
3
- "_id": "@syncfusion/ej2-gantt@19.3.55",
3
+ "_id": "@syncfusion/ej2-gantt@19.3.56",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-vNRdUvWlJJMgMIx1G7wBtMWrlWpflfRAXNQsM5UaxDxpAjc5rg8z/OQOw/jdlvgL6l3doAxsggtfGcMDfn86yQ==",
5
+ "_integrity": "sha512-zaE29SRA+d9qXVM+gyejDYeWlWdDAvCAtSAI9BC4y0R5PUOiI5wFPT5R3M/KgRk+ppCDqD5771FC4PBvfk+ZGw==",
6
6
  "_location": "/@syncfusion/ej2-gantt",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-gantt",
24
24
  "/@syncfusion/ej2-vue-gantt"
25
25
  ],
26
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-19.3.55.tgz",
27
- "_shasum": "d1f4499c21f075fdfbbe9e41a289f490cb326556",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-19.3.56.tgz",
27
+ "_shasum": "ecbc9e83d49c99b8c139c10e7cef000287cac9a8",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -38,16 +38,16 @@
38
38
  "@syncfusion/ej2-base": "~19.3.56",
39
39
  "@syncfusion/ej2-buttons": "~19.3.53",
40
40
  "@syncfusion/ej2-calendars": "~19.3.56",
41
- "@syncfusion/ej2-data": "~19.3.56",
41
+ "@syncfusion/ej2-data": "~19.3.57",
42
42
  "@syncfusion/ej2-dropdowns": "~19.3.56",
43
- "@syncfusion/ej2-grids": "~19.3.56",
44
- "@syncfusion/ej2-inputs": "~19.3.53",
43
+ "@syncfusion/ej2-grids": "~19.3.57",
44
+ "@syncfusion/ej2-inputs": "~19.3.57",
45
45
  "@syncfusion/ej2-layouts": "~19.3.53",
46
46
  "@syncfusion/ej2-lists": "~19.3.53",
47
- "@syncfusion/ej2-navigations": "~19.3.56",
48
- "@syncfusion/ej2-popups": "~19.3.53",
49
- "@syncfusion/ej2-richtexteditor": "~19.3.55",
50
- "@syncfusion/ej2-treegrid": "~19.3.55"
47
+ "@syncfusion/ej2-navigations": "~19.3.57",
48
+ "@syncfusion/ej2-popups": "~19.3.57",
49
+ "@syncfusion/ej2-richtexteditor": "~19.3.57",
50
+ "@syncfusion/ej2-treegrid": "~19.3.57"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 Gantt Component",
@@ -75,6 +75,6 @@
75
75
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
76
76
  },
77
77
  "typings": "index.d.ts",
78
- "version": "19.3.56",
78
+ "version": "19.3.57",
79
79
  "sideEffects": false
80
80
  }
@@ -224,21 +224,6 @@ export declare class TaskbarEdit extends DateProcessor {
224
224
  * @private
225
225
  */
226
226
  getDateByLeft(left: number): Date;
227
- /**
228
- * To get timezone offset.
229
- *
230
- * @returns {number} .
231
- * @private
232
- */
233
- private getDefaultTZOffset;
234
- /**
235
- * To check whether the date is in DST.
236
- *
237
- * @param {Date} date .
238
- * @returns {boolean} .
239
- * @private
240
- */
241
- isInDst(date: Date): boolean;
242
227
  /**
243
228
  * To set item position.
244
229
  *
@@ -1321,36 +1321,15 @@ var TaskbarEdit = /** @class */ (function (_super) {
1321
1321
  var tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
1322
1322
  this.parent.timelineModule.bottomTier;
1323
1323
  if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
1324
- if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
1324
+ if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
1325
1325
  pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
1326
1326
  }
1327
- else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
1327
+ else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
1328
1328
  pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
1329
1329
  }
1330
1330
  }
1331
1331
  return pStartDate;
1332
1332
  };
1333
- /**
1334
- * To get timezone offset.
1335
- *
1336
- * @returns {number} .
1337
- * @private
1338
- */
1339
- TaskbarEdit.prototype.getDefaultTZOffset = function () {
1340
- var janMonth = new Date(new Date().getFullYear(), 0, 1);
1341
- var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
1342
- return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
1343
- };
1344
- /**
1345
- * To check whether the date is in DST.
1346
- *
1347
- * @param {Date} date .
1348
- * @returns {boolean} .
1349
- * @private
1350
- */
1351
- TaskbarEdit.prototype.isInDst = function (date) {
1352
- return date.getTimezoneOffset() < this.getDefaultTZOffset();
1353
- };
1354
1333
  /**
1355
1334
  * To set item position.
1356
1335
  *
@@ -1207,6 +1207,21 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
1207
1207
  * @private
1208
1208
  */
1209
1209
  getModuleName(): string;
1210
+ /**
1211
+ * To get timezone offset.
1212
+ *
1213
+ * @returns {number} .
1214
+ * @private
1215
+ */
1216
+ private getDefaultTZOffset;
1217
+ /**
1218
+ * To check whether the date is in DST.
1219
+ *
1220
+ * @param {Date} date .
1221
+ * @returns {boolean} .
1222
+ * @private
1223
+ */
1224
+ isInDst(date: Date): boolean;
1210
1225
  /**
1211
1226
  * For internal use only - Initialize the event handler
1212
1227
  *
@@ -111,6 +111,27 @@ var Gantt = /** @class */ (function (_super) {
111
111
  Gantt.prototype.getModuleName = function () {
112
112
  return 'gantt';
113
113
  };
114
+ /**
115
+ * To get timezone offset.
116
+ *
117
+ * @returns {number} .
118
+ * @private
119
+ */
120
+ Gantt.prototype.getDefaultTZOffset = function () {
121
+ var janMonth = new Date(new Date().getFullYear(), 0, 1);
122
+ var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
123
+ return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
124
+ };
125
+ /**
126
+ * To check whether the date is in DST.
127
+ *
128
+ * @param {Date} date .
129
+ * @returns {boolean} .
130
+ * @private
131
+ */
132
+ Gantt.prototype.isInDst = function (date) {
133
+ return date.getTimezoneOffset() < this.getDefaultTZOffset();
134
+ };
114
135
  /**
115
136
  * For internal use only - Initialize the event handler
116
137
  *
@@ -817,6 +817,9 @@ var Timeline = /** @class */ (function () {
817
817
  parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
818
818
  scheduleDateCollection.push(new Date(startDate.toString()));
819
819
  increment = this.getIncrement(startDate, count, mode);
820
+ if (this.parent.isInDst(startDate)) {
821
+ increment = increment + (1000 * 60 * 60);
822
+ }
820
823
  newTime = startDate.getTime() + increment;
821
824
  startDate.setTime(newTime);
822
825
  if (startDate >= endDate) {
@@ -880,11 +883,19 @@ var Timeline = /** @class */ (function () {
880
883
  dayIntervel - 1 : dayIntervel : dayIntervel;
881
884
  lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
882
885
  increment = lastDay.getTime() - firstDay.getTime();
886
+ if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
887
+ (!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
888
+ increment = increment - (1000 * 60 * 60);
889
+ }
883
890
  break;
884
891
  }
885
892
  case 'Day':
886
893
  lastDay.setHours(24, 0, 0, 0);
887
894
  increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
895
+ if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
896
+ (!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
897
+ increment -= (1000 * 60 * 60);
898
+ }
888
899
  break;
889
900
  case 'Hour':
890
901
  lastDay.setMinutes(60);
@@ -979,7 +990,12 @@ var Timeline = /** @class */ (function () {
979
990
  * @private
980
991
  */
981
992
  Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
982
- var balanceDay = ((endDate.getTime() - scheduleWeeks.getTime()) / (1000 * 60 * 60 * 24));
993
+ var timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
994
+ if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
995
+ (!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
996
+ timeDifference = timeDifference - (1000 * 60 * 60);
997
+ }
998
+ var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
983
999
  return balanceDay * this.parent.perDayWidth;
984
1000
  };
985
1001
  /**