@syncfusion/ej2-gantt 19.4.38 → 19.4.43

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.4.38
3
+ * version : 19.4.43
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.7.0",
3
+ "_id": "@syncfusion/ej2-gantt@19.4.42",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-pCBiP1niGv6kWO+zEiP3M319heaa4WYhbNR9bt+eeEMc848UHgZAAb9PE19YOGcXvIOg2ObmIBx6DVOywyK/lQ==",
5
+ "_integrity": "sha512-kEt5wqOD/GQdNZnD3wAYxHxwV90nyc0eiBOEUJ0+Vtz5V0JKD8y+uaUSqwBWytup8puLZv/an4kaRNrdujg4lQ==",
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-release/@syncfusion/ej2-gantt/-/ej2-gantt-19.7.0.tgz",
27
- "_shasum": "a19c8392c249d42c5464bef9858792baf7d51b64",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-19.4.42.tgz",
27
+ "_shasum": "c94b802d9a77ea0ac7710ab428cf40f76527116e",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,19 +35,19 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~19.4.38",
39
- "@syncfusion/ej2-buttons": "~19.4.38",
40
- "@syncfusion/ej2-calendars": "~19.4.38",
41
- "@syncfusion/ej2-data": "~19.4.38",
42
- "@syncfusion/ej2-dropdowns": "~19.4.38",
43
- "@syncfusion/ej2-grids": "~19.4.38",
44
- "@syncfusion/ej2-inputs": "~19.4.38",
45
- "@syncfusion/ej2-layouts": "~19.4.38",
38
+ "@syncfusion/ej2-base": "~19.4.42",
39
+ "@syncfusion/ej2-buttons": "~19.4.42",
40
+ "@syncfusion/ej2-calendars": "~19.4.42",
41
+ "@syncfusion/ej2-data": "~19.4.42",
42
+ "@syncfusion/ej2-dropdowns": "~19.4.42",
43
+ "@syncfusion/ej2-grids": "~19.4.43",
44
+ "@syncfusion/ej2-inputs": "~19.4.43",
45
+ "@syncfusion/ej2-layouts": "~19.4.43",
46
46
  "@syncfusion/ej2-lists": "~19.4.38",
47
- "@syncfusion/ej2-navigations": "~19.4.38",
48
- "@syncfusion/ej2-popups": "~19.4.38",
49
- "@syncfusion/ej2-richtexteditor": "~19.4.38",
50
- "@syncfusion/ej2-treegrid": "~19.4.38"
47
+ "@syncfusion/ej2-navigations": "~19.4.41",
48
+ "@syncfusion/ej2-popups": "~19.4.41",
49
+ "@syncfusion/ej2-richtexteditor": "~19.4.40",
50
+ "@syncfusion/ej2-treegrid": "~19.4.42"
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.4.38",
78
+ "version": "19.4.43",
79
79
  "sideEffects": false
80
80
  }
@@ -262,7 +262,7 @@ var DialogEdit = /** @class */ (function () {
262
262
  tempData.ganttProperties.durationUnit = this.parent.durationUnit.toLocaleLowerCase();
263
263
  }
264
264
  else if (columns[i].field === taskSettings.name) {
265
- tempData[field] = 'New Task ' + id;
265
+ tempData[field] = this.localeObj.getConstant('addDialogTitle') + ' ' + id;
266
266
  tempData.ganttProperties.taskName = tempData[field];
267
267
  }
268
268
  else if (columns[i].field === taskSettings.progress) {
@@ -1181,7 +1181,7 @@ var DialogEdit = /** @class */ (function () {
1181
1181
  inputValue = dialog.querySelector('#' + ganttId + 'SegmentsTabContainer' + columnName)
1182
1182
  .ej2_instances[0];
1183
1183
  }
1184
- if (inputValue.value !== tempValue.toString()) {
1184
+ if (inputValue.value.toString() !== tempValue.toString()) {
1185
1185
  inputValue.value = tempValue;
1186
1186
  inputValue.dataBind();
1187
1187
  }
@@ -799,7 +799,7 @@ var Edit = /** @class */ (function () {
799
799
  this.updateParentItemOnEditing();
800
800
  }
801
801
  /** Update parent up-to zeroth level */
802
- if (ganttRecord.parentItem || this.parent.taskMode !== 'Auto') {
802
+ if (ganttRecord.parentItem) {
803
803
  this.parent.dataOperation.updateParentItems(ganttRecord, true);
804
804
  }
805
805
  this.initiateSaveAction(args);
@@ -25,6 +25,10 @@ var FocusModule = /** @class */ (function () {
25
25
  FocusModule.prototype.onKeyPress = function (e) {
26
26
  var ganttObj = this.parent;
27
27
  var expandedRecords = ganttObj.getExpandedRecords(ganttObj.currentViewData);
28
+ if (isNullOrUndefined(this.parent.focusModule.getActiveElement()) && (e.action === 'expandAll' || e.action === 'collapseAll')) {
29
+ var focussedElement = this.parent.element.querySelector('.e-treegrid');
30
+ focussedElement.focus();
31
+ }
28
32
  var targetElement = this.parent.focusModule.getActiveElement();
29
33
  if (e.action === 'home' || e.action === 'end' || e.action === 'downArrow' || e.action === 'upArrow' || e.action === 'delete' ||
30
34
  e.action === 'rightArrow' || e.action === 'leftArrow' || e.action === 'focusTask' || e.action === 'focusSearch' ||
@@ -137,9 +141,9 @@ var FocusModule = /** @class */ (function () {
137
141
  {
138
142
  if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
139
143
  e.preventDefault();
140
- var focussedElement = ganttObj.element.querySelector('.e-gantt-chart');
141
- focussedElement.focus();
142
144
  ganttObj.addRecord();
145
+ var focussedElement = ganttObj.element;
146
+ focussedElement.focus();
143
147
  }
144
148
  break;
145
149
  }
@@ -1482,6 +1482,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
1482
1482
  this.isMouseDragged = false;
1483
1483
  }
1484
1484
  else {
1485
+ this.parent.isOnEdit = false;
1485
1486
  this.cancelTaskbarEditActionInMouseLeave();
1486
1487
  }
1487
1488
  }
@@ -281,7 +281,14 @@ var DateProcessor = /** @class */ (function () {
281
281
  tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
282
282
  }
283
283
  else {
284
- tDuration = this.getDuration(ganttProperties.startDate, ganttProperties.endDate, ganttProperties.durationUnit, ganttProperties.isAutoSchedule, ganttProperties.isMilestone);
284
+ // eslint-disable-next-line
285
+ if (!isNullOrUndefined(ganttProperties.startDate) && !isNullOrUndefined(ganttProperties.endDate) &&
286
+ (ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
287
+ tDuration = 1;
288
+ }
289
+ else {
290
+ tDuration = this.getDuration(ganttProperties.startDate, ganttProperties.endDate, ganttProperties.durationUnit, ganttProperties.isAutoSchedule, ganttProperties.isMilestone);
291
+ }
285
292
  }
286
293
  this.parent.setRecordValue('duration', tDuration, ganttProperties, true);
287
294
  var col = this.parent.columnByField[this.parent.columnMapping.duration];
@@ -775,8 +775,6 @@ var GanttChart = /** @class */ (function () {
775
775
  this.parent.treeGrid.collapseAll();
776
776
  }
777
777
  this.isExpandAll = false;
778
- var focussedElement = this.parent.element.querySelector('.e-treegrid');
779
- focussedElement.focus();
780
778
  };
781
779
  /**
782
780
  * Public method to expand particular level of rows.
@@ -292,7 +292,7 @@ var Gantt = /** @class */ (function (_super) {
292
292
  Gantt.prototype.calculateDimensions = function () {
293
293
  var settingsHeight;
294
294
  if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
295
- !this.element.parentElement.style.height)) {
295
+ !this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
296
296
  var ganttHeight = Number(this.height.split("%")[0]);
297
297
  ganttHeight = (ganttHeight * window.innerHeight) / 100;
298
298
  if (this.height === '100%') {
@@ -448,7 +448,8 @@ var Gantt = /** @class */ (function (_super) {
448
448
  var settingsHeight = void 0;
449
449
  if (this.height.indexOf('%') !== -1) {
450
450
  var ganttHeight = Number(this.height.split("%")[0]);
451
- if (this.element.parentElement && this.element.parentElement.style.height) {
451
+ if (this.element.parentElement && (this.element.parentElement.style.height
452
+ || this.element.parentElement.style.height.indexOf('%') !== -1)) {
452
453
  var containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
453
454
  ganttHeight = (ganttHeight * containerHeight) / 100;
454
455
  }
@@ -966,10 +967,8 @@ var Gantt = /** @class */ (function (_super) {
966
967
  this.treeGrid.grid.searchSettings = getActualProperties(this.searchSettings);
967
968
  this.treeGrid.grid.dataBind();
968
969
  }
969
- else {
970
- this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
971
- this.treeGrid.dataBind();
972
- }
970
+ this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
971
+ this.treeGrid.dataBind();
973
972
  if (this.toolbarModule) {
974
973
  this.toolbarModule.updateSearchTextBox();
975
974
  }
@@ -1133,7 +1133,12 @@ var TaskProcessor = /** @class */ (function (_super) {
1133
1133
  eDate.setHours(0, 0, 0, 0);
1134
1134
  }
1135
1135
  }
1136
- return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
1136
+ if ((sDate).getTime() === (eDate).getTime()) {
1137
+ return (this.parent.perDayWidth);
1138
+ }
1139
+ else {
1140
+ return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
1141
+ }
1137
1142
  };
1138
1143
  /**
1139
1144
  * Get task left value
@@ -1222,14 +1227,16 @@ var TaskProcessor = /** @class */ (function (_super) {
1222
1227
  // eslint-disable-next-line
1223
1228
  var resourcesId = [];
1224
1229
  var resourcesName = [];
1225
- for (var i = 0; i < resourceData.length; i++) {
1226
- resourcesId.push(resourceData[i][resourceSettings.id]);
1227
- var resName = resourceData[i][resourceSettings.name];
1228
- var resourceUnit = resourceData[i][resourceSettings.unit];
1229
- if (resourceUnit !== 100) {
1230
- resName += '[' + resourceUnit + '%' + ']';
1230
+ if (!isNullOrUndefined(resourceData)) {
1231
+ for (var i = 0; i < resourceData.length; i++) {
1232
+ resourcesId.push(resourceData[i][resourceSettings.id]);
1233
+ var resName = resourceData[i][resourceSettings.name];
1234
+ var resourceUnit = resourceData[i][resourceSettings.unit];
1235
+ if (resourceUnit !== 100) {
1236
+ resName += '[' + resourceUnit + '%' + ']';
1237
+ }
1238
+ resourcesName.push(resName);
1231
1239
  }
1232
- resourcesName.push(resName);
1233
1240
  }
1234
1241
  this.parent.setRecordValue('resourceNames', resourcesName.join(','), ganttProp, true);
1235
1242
  this.updateTaskDataResource(ganttData);
@@ -297,6 +297,9 @@ var GanttTreeGrid = /** @class */ (function () {
297
297
  if (getValue('requestType', args) === 'refresh' && isNullOrUndefined(getValue('type', args)) && this.parent.addDeleteRecord) {
298
298
  if (this.parent.selectedRowIndex != -1) {
299
299
  this.parent.selectRow(this.parent.selectedRowIndex);
300
+ if (this.parent.selectedRowIndex > this.parent.currentViewData.length - 1) {
301
+ this.parent.selectedRowIndex = -1;
302
+ }
300
303
  }
301
304
  else {
302
305
  this.parent.selectRow(0);
@@ -1204,6 +1204,7 @@ var ChartRows = /** @class */ (function (_super) {
1204
1204
  }
1205
1205
  }
1206
1206
  }
1207
+ this.parent.renderTemplates();
1207
1208
  this.triggerQueryTaskbarInfo();
1208
1209
  this.parent.modifiedRecords = [];
1209
1210
  if (collapsedResourceRecord.length) {
@@ -1568,6 +1569,7 @@ var ChartRows = /** @class */ (function (_super) {
1568
1569
  else {
1569
1570
  tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
1570
1571
  }
1572
+ this.parent.renderTemplates();
1571
1573
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
1572
1574
  if (isValidateRange) {
1573
1575
  this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
@@ -222,6 +222,7 @@ export declare class Timeline {
222
222
  * @private
223
223
  */
224
224
  getIncrement(startDate: Date, count: number, mode: string): number;
225
+ private checkDate;
225
226
  /**
226
227
  * Method to find header cell was weekend or not
227
228
  *
@@ -817,9 +817,6 @@ 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
- }
823
820
  newTime = startDate.getTime() + increment;
824
821
  startDate.setTime(newTime);
825
822
  if (startDate >= endDate) {
@@ -883,24 +880,17 @@ var Timeline = /** @class */ (function () {
883
880
  dayIntervel - 1 : dayIntervel : dayIntervel;
884
881
  lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
885
882
  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
- }
890
883
  break;
891
884
  }
892
885
  case 'Day':
893
886
  lastDay.setHours(24, 0, 0, 0);
894
887
  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
- }
899
888
  break;
900
889
  case 'Hour':
901
890
  lastDay.setMinutes(60);
902
891
  lastDay.setSeconds(0);
903
892
  increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * (count - 1));
893
+ increment = this.checkDate(firstDay, lastDay, increment, count);
904
894
  break;
905
895
  case 'Minutes':
906
896
  lastDay.setSeconds(60);
@@ -909,6 +899,21 @@ var Timeline = /** @class */ (function () {
909
899
  }
910
900
  return increment;
911
901
  };
902
+ Timeline.prototype.checkDate = function (firstDay, lastDay, increment, count) {
903
+ var date = new Date(firstDay.getTime());
904
+ date.setTime(date.getTime() + increment);
905
+ if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
906
+ var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
907
+ if (!this.parent.isInDst(date)) {
908
+ increment += (1000 * 60 * 60 * diffCount);
909
+ }
910
+ else if (this.parent.isInDst(date)) {
911
+ increment -= (1000 * 60 * 60 * diffCount);
912
+ }
913
+ }
914
+ return increment;
915
+ };
916
+ ;
912
917
  /**
913
918
  * Method to find header cell was weekend or not
914
919
  *
@@ -991,10 +996,6 @@ var Timeline = /** @class */ (function () {
991
996
  */
992
997
  Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
993
998
  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
999
  var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
999
1000
  return balanceDay * this.parent.perDayWidth;
1000
1001
  };
@@ -637,7 +637,7 @@
637
637
  }
638
638
 
639
639
  .e-gantt .e-gantt-chart .e-gantt-split-container-line {
640
- border-color: inherit;
640
+ border-color: #a9a9a9;
641
641
  border-top-style: dotted;
642
642
  border-top-width: 2px;
643
643
  height: 0;
@@ -154,4 +154,5 @@ $gantt-active-container-border: $neutral-secondary !default;
154
154
  $grid-active-container-border: 0 0 0 1px $neutral-secondary inset !default;
155
155
  $gantt-collapse-progress-width: 0px !important;
156
156
  $rangecontainer-border-color: #FC7A05;
157
- $gantt-range-container-arc-radius: 0px !default;
157
+ $gantt-range-container-arc-radius: 0px !default;
158
+ $gantt-active-background-color: #a9a9a9;
@@ -402,7 +402,12 @@
402
402
  }
403
403
 
404
404
  .e-gantt-split-container-line {
405
- border-color: inherit;
405
+ @if ($theme-name == 'material-dark' or $theme-name == 'fabric-dark') {
406
+ border-color: $gantt-active-background-color;
407
+ }
408
+ @else {
409
+ border-color: inherit;
410
+ }
406
411
  border-top-style: dotted;
407
412
  border-top-width: 2px;
408
413
  height: 0;
@@ -154,4 +154,5 @@ $gantt-active-container-border: rgba($grey-white, .5) !default;
154
154
  $grid-active-container-border: 0 0 0 1px rgba($grey-white, .5) inset !default;
155
155
  $gantt-collapse-progress-width: 0px !important;
156
156
  $rangecontainer-border-color: #FC7A05;
157
- $gantt-range-container-arc-radius: 2px !default;
157
+ $gantt-range-container-arc-radius: 2px !default;
158
+ $gantt-active-background-color: #a9a9a9;
@@ -637,7 +637,7 @@
637
637
  }
638
638
 
639
639
  .e-gantt .e-gantt-chart .e-gantt-split-container-line {
640
- border-color: inherit;
640
+ border-color: #a9a9a9;
641
641
  border-top-style: dotted;
642
642
  border-top-width: 2px;
643
643
  height: 0;
@@ -674,7 +674,7 @@
674
674
  }
675
675
 
676
676
  .e-gantt .e-gantt-chart .e-gantt-split-container-line {
677
- border-color: inherit;
677
+ border-color: #a9a9a9;
678
678
  border-top-style: dotted;
679
679
  border-top-width: 2px;
680
680
  height: 0;
@@ -674,7 +674,7 @@
674
674
  }
675
675
 
676
676
  .e-gantt .e-gantt-chart .e-gantt-split-container-line {
677
- border-color: inherit;
677
+ border-color: #a9a9a9;
678
678
  border-top-style: dotted;
679
679
  border-top-width: 2px;
680
680
  height: 0;