@syncfusion/ej2-gantt 20.3.52 → 20.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/ej2-gantt.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +57 -19
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +57 -19
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +18 -18
  13. package/src/gantt/actions/dependency.js +20 -4
  14. package/src/gantt/actions/dialog-edit.js +14 -8
  15. package/src/gantt/actions/edit.d.ts +1 -0
  16. package/src/gantt/actions/edit.js +13 -3
  17. package/src/gantt/base/gantt.d.ts +4 -0
  18. package/src/gantt/base/gantt.js +6 -0
  19. package/src/gantt/base/task-processor.js +1 -1
  20. package/src/gantt/base/tree-grid.js +1 -1
  21. package/src/gantt/renderer/chart-rows.js +1 -1
  22. package/src/gantt/renderer/timeline.js +1 -1
  23. package/styles/bootstrap-dark.css +122 -61
  24. package/styles/bootstrap.css +124 -62
  25. package/styles/bootstrap4.css +122 -61
  26. package/styles/bootstrap5-dark.css +122 -61
  27. package/styles/bootstrap5.css +122 -61
  28. package/styles/fabric-dark.css +122 -61
  29. package/styles/fabric.css +122 -61
  30. package/styles/fluent-dark.css +122 -61
  31. package/styles/fluent.css +122 -61
  32. package/styles/gantt/bootstrap-dark.css +122 -61
  33. package/styles/gantt/bootstrap.css +124 -62
  34. package/styles/gantt/bootstrap4.css +122 -61
  35. package/styles/gantt/bootstrap5-dark.css +122 -61
  36. package/styles/gantt/bootstrap5.css +122 -61
  37. package/styles/gantt/fabric-dark.css +122 -61
  38. package/styles/gantt/fabric.css +122 -61
  39. package/styles/gantt/fluent-dark.css +122 -61
  40. package/styles/gantt/fluent.css +122 -61
  41. package/styles/gantt/highcontrast-light.css +122 -61
  42. package/styles/gantt/highcontrast.css +122 -61
  43. package/styles/gantt/material-dark.css +128 -64
  44. package/styles/gantt/material.css +128 -64
  45. package/styles/gantt/tailwind-dark.css +126 -63
  46. package/styles/gantt/tailwind.css +126 -63
  47. package/styles/highcontrast-light.css +122 -61
  48. package/styles/highcontrast.css +122 -61
  49. package/styles/material-dark.css +128 -64
  50. package/styles/material.css +128 -64
  51. package/styles/tailwind-dark.css +126 -63
  52. package/styles/tailwind.css +126 -63
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.3.52
3
+ * version : 20.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@20.3.50",
3
+ "_id": "@syncfusion/ej2-gantt@20.3.56",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-tZ8N8JZCWpcLimmN48sryAFv2cRtZosczDA2+K6EBfYPgHSbymj7Kr8SUcy4zEn9LrTYvXb6a40ofz44EEud9Q==",
5
+ "_integrity": "sha512-+kN5WztURPf2VJE+TS9fUA4B9nP9dde6bsr9NbvbExPLK/BiN5ZUTV8ERbdE7Mvs6TJMy1zNDPA7pC5dv/d42w==",
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-20.3.50.tgz",
27
- "_shasum": "4d0fe52bf76c918a2146dd208454bb4074c09152",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.3.56.tgz",
27
+ "_shasum": "9ac7b60026dda47658a14bb1d4b7710557c5233f",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
30
30
  "author": {
@@ -35,19 +35,19 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.3.50",
39
- "@syncfusion/ej2-buttons": "~20.3.50",
40
- "@syncfusion/ej2-calendars": "~20.3.50",
41
- "@syncfusion/ej2-data": "~20.3.50",
42
- "@syncfusion/ej2-dropdowns": "~20.3.50",
43
- "@syncfusion/ej2-grids": "~20.3.52",
44
- "@syncfusion/ej2-inputs": "~20.3.50",
45
- "@syncfusion/ej2-layouts": "~20.3.48",
46
- "@syncfusion/ej2-lists": "~20.3.51",
47
- "@syncfusion/ej2-navigations": "~20.3.52",
48
- "@syncfusion/ej2-popups": "~20.3.50",
49
- "@syncfusion/ej2-richtexteditor": "~20.3.50",
50
- "@syncfusion/ej2-treegrid": "~20.3.52"
38
+ "@syncfusion/ej2-base": "~20.3.56",
39
+ "@syncfusion/ej2-buttons": "~20.3.57",
40
+ "@syncfusion/ej2-calendars": "~20.3.56",
41
+ "@syncfusion/ej2-data": "~20.3.56",
42
+ "@syncfusion/ej2-dropdowns": "~20.3.57",
43
+ "@syncfusion/ej2-grids": "~20.3.57",
44
+ "@syncfusion/ej2-inputs": "~20.3.57",
45
+ "@syncfusion/ej2-layouts": "~20.3.57",
46
+ "@syncfusion/ej2-lists": "~20.3.56",
47
+ "@syncfusion/ej2-navigations": "~20.3.57",
48
+ "@syncfusion/ej2-popups": "~20.3.57",
49
+ "@syncfusion/ej2-richtexteditor": "~20.3.56",
50
+ "@syncfusion/ej2-treegrid": "~20.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": "20.3.52",
78
+ "version": "20.3.57",
79
79
  "sideEffects": false
80
80
  }
@@ -673,6 +673,11 @@ var Dependency = /** @class */ (function () {
673
673
  return;
674
674
  }
675
675
  if (childGanttRecord.ganttProperties.predecessor) {
676
+ var taskBarModule = this.parent.editModule.taskbarEditModule;
677
+ var ganttProp = void 0;
678
+ if (taskBarModule) {
679
+ ganttProp = taskBarModule.taskBarEditRecord;
680
+ }
676
681
  var predecessorsCollection = childGanttRecord.ganttProperties.predecessor;
677
682
  var parentGanttRecord = void 0;
678
683
  var record = null;
@@ -737,10 +742,21 @@ var Dependency = /** @class */ (function () {
737
742
  this.validatePredecessor(record, undefined, 'successor');
738
743
  }
739
744
  }
740
- if (record && record.hasChildRecords && record.ganttProperties.taskId !== this.isValidatedParentTaskID &&
741
- this.parent.editModule['taskbarMoved']) {
742
- this.parent.editModule['updateChildItems'](record);
743
- this.isValidatedParentTaskID = record.ganttProperties.taskId;
745
+ if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
746
+ if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
747
+ if (!ganttProp.hasChildRecords && record.hasChildRecords) {
748
+ this.parent.editModule['updateChildItems'](record);
749
+ this.isValidatedParentTaskID = record.ganttProperties.taskId;
750
+ }
751
+ }
752
+ else if ((record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
753
+ (!ganttProp.ganttProperties.predecessorsName && taskBarModule.taskBarEditAction == 'ParentDrag')) {
754
+ this.parent.editModule['updateChildItems'](record);
755
+ this.isValidatedParentTaskID = record.ganttProperties.taskId;
756
+ }
757
+ if (!ganttProp.hasChildRecords) {
758
+ this.parent.dataOperation.updateParentItems(record, true);
759
+ }
744
760
  }
745
761
  }
746
762
  };
@@ -2200,17 +2200,19 @@ var DialogEdit = /** @class */ (function () {
2200
2200
  this.parent.setRecordValue('durationUnit', fromRecord.ganttProperties.durationUnit, toRecord.ganttProperties, true);
2201
2201
  this.parent.setRecordValue('work', fromRecord.ganttProperties.work, toRecord.ganttProperties, true);
2202
2202
  this.parent.setRecordValue('type', fromRecord.ganttProperties.taskType, toRecord.ganttProperties, true);
2203
+ this.parent.setRecordValue('resourceNames', fromRecord.ganttProperties.resourceNames, toRecord.ganttProperties, true);
2204
+ this.parent.setRecordValue('resourceInfo', fromRecord.ganttProperties.resourceInfo, toRecord.ganttProperties, true);
2203
2205
  if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
2204
- this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.startDate);
2206
+ this.parent.dataOperation.updateMappingData(toRecord, this.parent.taskFields.startDate);
2205
2207
  }
2206
2208
  if (!isNullOrUndefined(this.parent.taskFields.endDate)) {
2207
- this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.endDate);
2209
+ this.parent.dataOperation.updateMappingData(toRecord, this.parent.taskFields.endDate);
2208
2210
  }
2209
2211
  if (!isNullOrUndefined(this.parent.taskFields.duration)) {
2210
- this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.duration);
2212
+ this.parent.dataOperation.updateMappingData(toRecord, this.parent.taskFields.duration);
2211
2213
  this.parent.setRecordValue('durationUnit', fromRecord.ganttProperties.durationUnit, this.rowData, true);
2212
2214
  if (this.rowData.ganttProperties.duration === 0) {
2213
- this.parent.setRecordValue('isMilestone', true, this.rowData.ganttProperties, true);
2215
+ this.parent.setRecordValue('isMilestone', true, toRecord.ganttProperties, true);
2214
2216
  }
2215
2217
  else {
2216
2218
  this.parent.setRecordValue('isMilestone', false, this.rowData.ganttProperties, true);
@@ -2225,6 +2227,9 @@ var DialogEdit = /** @class */ (function () {
2225
2227
  if (!isNullOrUndefined(this.parent.taskFields.type)) {
2226
2228
  this.parent.dataOperation.updateMappingData(this.rowData, "type");
2227
2229
  }
2230
+ if (!isNullOrUndefined(this.parent.taskFields.resourceInfo)) {
2231
+ this.parent.dataOperation.updateMappingData(this.rowData, "resourceInfo");
2232
+ }
2228
2233
  };
2229
2234
  DialogEdit.prototype.updatePredecessorTab = function (preElement) {
2230
2235
  var gridObj = preElement.ej2_instances[0];
@@ -2287,10 +2292,11 @@ var DialogEdit = /** @class */ (function () {
2287
2292
  }
2288
2293
  var idArray = [];
2289
2294
  if (this.isEdit) {
2290
- this.parent.setRecordValue('resourceInfo', selectedItems, this.rowData.ganttProperties, true);
2291
- this.parent.dataOperation.updateMappingData(this.rowData, 'resourceInfo');
2292
- this.parent.editModule.updateResourceRelatedFields(this.rowData, 'resource');
2293
- this.validateDuration(this.rowData);
2295
+ this.parent.setRecordValue('resourceInfo', selectedItems, this.editedRecord.ganttProperties, true);
2296
+ this.parent.dataOperation.updateMappingData(this.editedRecord, 'resourceInfo');
2297
+ this.parent.editModule.updateResourceRelatedFields(this.editedRecord, 'resource');
2298
+ this.validateDuration(this.editedRecord);
2299
+ this.updateScheduleProperties(this.editedRecord, this.rowData);
2294
2300
  }
2295
2301
  else {
2296
2302
  for (var i = 0; i < selectedItems.length; i++) {
@@ -15,6 +15,7 @@ export declare class Edit {
15
15
  validatedChildItems: IGanttData[];
16
16
  private isFromDeleteMethod;
17
17
  private targetedRecords;
18
+ private isNewRecordAdded;
18
19
  /**
19
20
  * @private
20
21
  */
@@ -16,6 +16,7 @@ var Edit = /** @class */ (function () {
16
16
  function Edit(parent) {
17
17
  this.isFromDeleteMethod = false;
18
18
  this.targetedRecords = [];
19
+ this.isNewRecordAdded = false;
19
20
  /** @hidden */
20
21
  this.updateParentRecords = [];
21
22
  /** @hidden */
@@ -817,7 +818,7 @@ var Edit = /** @class */ (function () {
817
818
  if (ganttRecord.parentItem) {
818
819
  this.parent.dataOperation.updateParentItems(ganttRecord, true);
819
820
  var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
820
- if (parentData.ganttProperties.predecessor) {
821
+ if (!parentData.ganttProperties.predecessorsName) {
821
822
  this.parent.predecessorModule.validatePredecessor(parentData, [], '');
822
823
  this.updateParentItemOnEditing();
823
824
  }
@@ -2470,6 +2471,7 @@ var Edit = /** @class */ (function () {
2470
2471
  parentItem.taskData[child] = [];
2471
2472
  parentItem.taskData[child].push(record.taskData);
2472
2473
  }
2474
+ this.isNewRecordAdded = true;
2473
2475
  }
2474
2476
  }
2475
2477
  };
@@ -2588,9 +2590,10 @@ var Edit = /** @class */ (function () {
2588
2590
  dataSource.push(addedRecord[i].taskData);
2589
2591
  }
2590
2592
  else {
2591
- if (isNullOrUndefined(addedRecord[i].parentItem)) {
2593
+ if (!this.isNewRecordAdded) {
2592
2594
  this.addDataInRealDataSource(dataSource, addedRecord[i].taskData, rowPosition);
2593
2595
  }
2596
+ this.isNewRecordAdded = false;
2594
2597
  }
2595
2598
  }
2596
2599
  this.isBreakLoop = false;
@@ -3320,7 +3323,14 @@ var Edit = /** @class */ (function () {
3320
3323
  if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
3321
3324
  var rowPos = this.dropPosition === 'topSegment' ? 'Above' : 'Below';
3322
3325
  this.parent.editModule.addRowSelectedItem = droppedRec;
3323
- this.parent.editModule.updateRealDataSource(draggedRec, rowPos);
3326
+ var dragRecord = [];
3327
+ if (!Array.isArray(draggedRec)) {
3328
+ dragRecord[0] = draggedRec;
3329
+ }
3330
+ else {
3331
+ dragRecord = draggedRec;
3332
+ }
3333
+ this.parent.editModule.updateRealDataSource(dragRecord, rowPos);
3324
3334
  delete this.parent.editModule.addRowSelectedItem;
3325
3335
  }
3326
3336
  }
@@ -818,6 +818,10 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
818
818
  * @private
819
819
  */
820
820
  isFromOnPropertyChange: boolean;
821
+ /**
822
+ * @private
823
+ */
824
+ isFromRenderBaseline: boolean;
821
825
  /**
822
826
  * @private
823
827
  */
@@ -95,6 +95,10 @@ var Gantt = /** @class */ (function (_super) {
95
95
  * @private
96
96
  */
97
97
  _this.isFromOnPropertyChange = false;
98
+ /**
99
+ * @private
100
+ */
101
+ _this.isFromRenderBaseline = false;
98
102
  /**
99
103
  * @private
100
104
  */
@@ -1022,8 +1026,10 @@ var Gantt = /** @class */ (function (_super) {
1022
1026
  case 'labelSettings':
1023
1027
  case 'renderBaseline':
1024
1028
  case 'baselineColor':
1029
+ this.isFromRenderBaseline = true;
1025
1030
  this.chartRowsModule.initiateTemplates();
1026
1031
  this.chartRowsModule.refreshGanttRows();
1032
+ this.isFromRenderBaseline = false;
1027
1033
  break;
1028
1034
  case 'resourceIDMapping':
1029
1035
  case 'resourceNameMapping':
@@ -192,7 +192,7 @@ var TaskProcessor = /** @class */ (function (_super) {
192
192
  }
193
193
  });
194
194
  }
195
- else if (!tempData[child]) {
195
+ else if (!tempData[child] || (tempData[child] && tempData[child].length === 0)) {
196
196
  unassignedTasks.push(tempData);
197
197
  }
198
198
  if (tempData[this_1.parent.taskFields.child] && tempData[this_1.parent.taskFields.child].length) {
@@ -481,7 +481,7 @@ var GanttTreeGrid = /** @class */ (function () {
481
481
  column.valueAccessor = column.valueAccessor ? column.valueAccessor : !isNullOrUndefined(column.edit) ? null :
482
482
  this.durationValueAccessor.bind(this);
483
483
  column.editType = column.editType ? column.editType : 'stringedit';
484
- column.type = 'string';
484
+ column.type = column.type ? column.type : 'string';
485
485
  }
486
486
  else if (taskSettings.progress === column.field) {
487
487
  this.composeProgressColumn(column);
@@ -1270,7 +1270,7 @@ var ChartRows = /** @class */ (function (_super) {
1270
1270
  for (var index = 0; index < this.parent.currentViewData.length; index++) {
1271
1271
  var oldIndex = oldKeys[this.parent.currentViewData[index][key]];
1272
1272
  var modifiedRecIndex = this.parent.modifiedRecords.indexOf(this.parent.currentViewData[index]);
1273
- if (isNullOrUndefined(oldIndex) || modifiedRecIndex !== -1) {
1273
+ if (isNullOrUndefined(oldIndex) || modifiedRecIndex !== -1 || this.parent.isFromRenderBaseline) {
1274
1274
  var tRow = this.getGanttChartRow(index, this.parent.currentViewData[index]);
1275
1275
  this.ganttChartTableBody.appendChild(tRow);
1276
1276
  this.refreshedTr.push(this.ganttChartTableBody.querySelectorAll('tr')[index]);
@@ -921,7 +921,7 @@ var Timeline = /** @class */ (function () {
921
921
  endDate.setHours(24, 0, 0, 0);
922
922
  }
923
923
  }
924
- if ((this.isZooming || this.parent.isLoad || this.parent.isFromOnPropertyChange) && isNullOrUndefined(this.parent.projectEndDate)) {
924
+ if (isNullOrUndefined(this.parent.projectEndDate)) {
925
925
  this.updateTimelineAfterZooming(endDate, false);
926
926
  }
927
927
  return endDate;