@syncfusion/ej2-gantt 22.1.36 → 22.1.37

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 : 22.1.36
3
+ * version : 22.1.37
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@21.1.36",
3
+ "_id": "@syncfusion/ej2-gantt@22.1.36",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-tDyjXzp2Ee+tpcZOq1yfm3Bvfzm9wNegYHa5DjMIylljMQbbDOc2vWstdSvDAkCPcnAlVlIpczkl5+q5mSglsA==",
5
+ "_integrity": "sha512-7MEx9csM58T3eHOhm9EkmpfUp3StyM/nXSx0wTSmAWKJ9zD/98YfEgd1yTSnx94hHHgXOQxngHnAxxVLVx8Ypg==",
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": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-21.1.36.tgz",
27
- "_shasum": "41c1dff00c5d26c0c8c9553da0e920a32aad398c",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.1.36.tgz",
27
+ "_shasum": "c45c61ba695de72b2b0d8e80c56d87ac2577aed3",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
30
  "author": {
@@ -36,20 +36,20 @@
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
38
  "@syncfusion/ej2-base": "~22.1.34",
39
- "@syncfusion/ej2-buttons": "~21.1.36",
39
+ "@syncfusion/ej2-buttons": "~22.1.36",
40
40
  "@syncfusion/ej2-calendars": "~22.1.36",
41
41
  "@syncfusion/ej2-data": "~22.1.36",
42
- "@syncfusion/ej2-dropdowns": "~22.1.36",
43
- "@syncfusion/ej2-grids": "~22.1.36",
42
+ "@syncfusion/ej2-dropdowns": "~22.1.37",
43
+ "@syncfusion/ej2-grids": "~22.1.37",
44
44
  "@syncfusion/ej2-inputs": "~22.1.34",
45
- "@syncfusion/ej2-layouts": "~22.1.36",
45
+ "@syncfusion/ej2-layouts": "~22.1.37",
46
46
  "@syncfusion/ej2-lists": "~22.1.34",
47
47
  "@syncfusion/ej2-navigations": "~22.1.36",
48
48
  "@syncfusion/ej2-notifications": "~22.1.34",
49
- "@syncfusion/ej2-popups": "~22.1.36",
49
+ "@syncfusion/ej2-popups": "~22.1.37",
50
50
  "@syncfusion/ej2-richtexteditor": "~22.1.36",
51
51
  "@syncfusion/ej2-svg-base": "~22.1.34",
52
- "@syncfusion/ej2-treegrid": "~22.1.36"
52
+ "@syncfusion/ej2-treegrid": "~22.1.37"
53
53
  },
54
54
  "deprecated": false,
55
55
  "description": "Essential JS 2 Gantt Component",
@@ -74,6 +74,6 @@
74
74
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
75
75
  },
76
76
  "typings": "index.d.ts",
77
- "version": "22.1.36",
77
+ "version": "22.1.37",
78
78
  "sideEffects": false
79
79
  }
@@ -1749,6 +1749,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
1749
1749
  }
1750
1750
  }
1751
1751
  }
1752
+ this.parent['isProjectDateUpdated'] = false;
1752
1753
  };
1753
1754
  /**
1754
1755
  * To cancel the taskbar edt action.
@@ -1331,6 +1331,7 @@ var DateProcessor = /** @class */ (function () {
1331
1331
  setValue('minStartDate', minStartDate, editArgs);
1332
1332
  setValue('maxEndDate', maxEndDate, editArgs);
1333
1333
  }
1334
+ this.parent['isProjectDateUpdated'] = true;
1334
1335
  };
1335
1336
  /**
1336
1337
  *
@@ -86,6 +86,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
86
86
  /** @hidden */
87
87
  private headerMaskTable;
88
88
  /** @hidden */
89
+ private isProjectDateUpdated;
89
90
  columnLoop: any;
90
91
  showIndicator: boolean;
91
92
  singleTier: number;
@@ -548,7 +548,7 @@ var TaskProcessor = /** @class */ (function (_super) {
548
548
  endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
549
549
  }
550
550
  else if (!taskSettings.duration && taskSettings.endDate) {
551
- endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
551
+ endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() <
552
552
  data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
553
553
  duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
554
554
  if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
@@ -1192,38 +1192,59 @@ var TaskProcessor = /** @class */ (function (_super) {
1192
1192
  modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 60 * 1000);
1193
1193
  }
1194
1194
  if (ganttData && ganttData.durationUnit == 'minute') {
1195
- modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 60 * 60 * 1000);
1195
+ modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 1000);
1196
1196
  }
1197
1197
  for (var i = 0; i < this.parent.dayWorkingTime.length; i++) {
1198
1198
  hour = hour + this.parent.dayWorkingTime[i].to - this.parent.dayWorkingTime[i].from;
1199
1199
  }
1200
1200
  var dateDiff = modifiedsDate.getTime() - sDate.getTime();
1201
- if (tierMode === 'Day') {
1202
- if ((Math.floor((dateDiff / (1000 * 60 * 60)) % 24) >= hour || dateDiff === 0)) {
1203
- isValid = true;
1201
+ if (ganttData && ganttData.durationUnit == 'minute' && ganttData.duration < (hour * 60)) {
1202
+ if (tierMode === 'Day') {
1203
+ if ((Math.floor((dateDiff / (1000 * 60 * 60)) % 24) >= hour || dateDiff === 0)) {
1204
+ isValid = true;
1205
+ }
1206
+ if (this.getSecondsInDecimal(sDate) === this.parent.defaultStartTime && isValid) {
1207
+ sDate.setHours(0, 0, 0, 0);
1208
+ }
1209
+ if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
1210
+ eDate.setHours(24);
1211
+ }
1212
+ if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
1213
+ eDate.setHours(0, 0, 0, 0);
1214
+ }
1204
1215
  }
1205
- if (this.getSecondsInDecimal(sDate) === this.parent.defaultStartTime && isValid) {
1206
- sDate.setHours(0, 0, 0, 0);
1216
+ else {
1217
+ isValid = true;
1207
1218
  }
1208
- if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
1209
- eDate.setHours(24);
1219
+ if ((sDate).getTime() === (eDate).getTime()) {
1220
+ return (this.parent.perDayWidth);
1210
1221
  }
1211
- if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
1212
- eDate.setHours(0, 0, 0, 0);
1222
+ else {
1223
+ if (isValid) {
1224
+ return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
1225
+ }
1226
+ else {
1227
+ return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * hour)) * this.parent.perDayWidth);
1228
+ }
1213
1229
  }
1214
1230
  }
1215
1231
  else {
1216
- isValid = true;
1217
- }
1218
- if ((sDate).getTime() === (eDate).getTime()) {
1219
- return (this.parent.perDayWidth);
1220
- }
1221
- else {
1222
- if (isValid) {
1223
- return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
1232
+ if (tierMode === 'Day') {
1233
+ if (this.getSecondsInDecimal(sDate) === this.parent.defaultStartTime) {
1234
+ sDate.setHours(0, 0, 0, 0);
1235
+ }
1236
+ if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
1237
+ eDate.setHours(24);
1238
+ }
1239
+ if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
1240
+ eDate.setHours(0, 0, 0, 0);
1241
+ }
1242
+ }
1243
+ if ((sDate).getTime() === (eDate).getTime()) {
1244
+ return (this.parent.perDayWidth);
1224
1245
  }
1225
1246
  else {
1226
- return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * hour)) * this.parent.perDayWidth);
1247
+ return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
1227
1248
  }
1228
1249
  }
1229
1250
  };
@@ -96,6 +96,9 @@ var Timeline = /** @class */ (function () {
96
96
  */
97
97
  Timeline.prototype.processZooming = function (isZoomIn) {
98
98
  this.isZoomToFit = false;
99
+ if (!this.parent['isProjectDateUpdated']) {
100
+ this.parent.dateValidationModule.calculateProjectDates();
101
+ }
99
102
  if (!isNullOrUndefined(this.parent.zoomingProjectStartDate)) {
100
103
  this.parent.cloneProjectStartDate = this.parent.cloneProjectStartDate.getTime() < this.parent.zoomingProjectStartDate.getTime()
101
104
  ? this.parent.cloneProjectStartDate : this.parent.zoomingProjectStartDate;