@syncfusion/ej2-gantt 20.3.59 → 20.3.60

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 : 20.3.59
3
+ * version : 20.3.60
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.58",
3
+ "_id": "@syncfusion/ej2-gantt@20.3.59",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-ebP3V96K96tJN0n0FcIJgLK/8HF3CfJPm1U+jkokceSdLhq6Qys8F7or/FmW0N+Gvg6Sm5kr9VpJfIlvV3EfCw==",
5
+ "_integrity": "sha512-M/3WZzVzpwkLFh9alL80AIe56TOTDDu80diB+JLOv7KcX67eEf0IgJMkLHxNdolxu9+WBtb0TZdJtymYcW5jxQ==",
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-20.3.58.tgz",
27
- "_shasum": "33c2ae8d3f9459f9748b41d4af787f51604c7b67",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.3.59.tgz",
27
+ "_shasum": "5afb3c74c9dccee345b8c8bdd1692f089fba2a6e",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
30
30
  "author": {
@@ -38,16 +38,16 @@
38
38
  "@syncfusion/ej2-base": "~20.3.56",
39
39
  "@syncfusion/ej2-buttons": "~20.3.58",
40
40
  "@syncfusion/ej2-calendars": "~20.3.59",
41
- "@syncfusion/ej2-data": "~20.3.56",
42
- "@syncfusion/ej2-dropdowns": "~20.3.59",
43
- "@syncfusion/ej2-grids": "~20.3.59",
41
+ "@syncfusion/ej2-data": "~20.3.60",
42
+ "@syncfusion/ej2-dropdowns": "~20.3.60",
43
+ "@syncfusion/ej2-grids": "~20.3.60",
44
44
  "@syncfusion/ej2-inputs": "~20.3.57",
45
45
  "@syncfusion/ej2-layouts": "~20.3.58",
46
46
  "@syncfusion/ej2-lists": "~20.3.56",
47
- "@syncfusion/ej2-navigations": "~20.3.58",
48
- "@syncfusion/ej2-popups": "~20.3.59",
49
- "@syncfusion/ej2-richtexteditor": "~20.3.59",
50
- "@syncfusion/ej2-treegrid": "~20.3.58"
47
+ "@syncfusion/ej2-navigations": "~20.3.60",
48
+ "@syncfusion/ej2-popups": "~20.3.60",
49
+ "@syncfusion/ej2-richtexteditor": "~20.3.60",
50
+ "@syncfusion/ej2-treegrid": "~20.3.60"
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.59",
78
+ "version": "20.3.60",
79
79
  "sideEffects": false
80
80
  }
@@ -758,6 +758,9 @@ var Dependency = /** @class */ (function () {
758
758
  this.parent.dataOperation.updateParentItems(record, true);
759
759
  }
760
760
  }
761
+ else if (record && record.hasChildRecords && !ganttProp) {
762
+ this.parent.editModule['updateChildItems'](record);
763
+ }
761
764
  }
762
765
  };
763
766
  /**
@@ -1867,7 +1867,7 @@ var DialogEdit = /** @class */ (function () {
1867
1867
  inputElement = this.createInputElement('', ganttId + '' + column.field, column.field);
1868
1868
  divElement.appendChild(inputElement);
1869
1869
  }
1870
- inputModel.enabled = !this.isCheckIsDisabled(column);
1870
+ inputModel.enabled = !isNullOrUndefined(inputModel.enabled) ? inputModel.enabled : !this.isCheckIsDisabled(column);
1871
1871
  if (column.field === this.parent.taskFields.duration) {
1872
1872
  if (!isNullOrUndefined(column.valueAccessor)) {
1873
1873
  if (typeof column.valueAccessor === 'string') {
@@ -807,6 +807,7 @@ var Edit = /** @class */ (function () {
807
807
  this.parent.editedTaskBarItem = ganttRecord;
808
808
  }
809
809
  this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
810
+ this.parent.predecessorModule.isValidatedParentTaskID = '';
810
811
  }
811
812
  if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
812
813
  (args.action === "DrawConnectorLine" || args.action === "CellEditing" || args.action === "DialogEditing")) {
@@ -1343,6 +1344,12 @@ var Edit = /** @class */ (function () {
1343
1344
  }
1344
1345
  if (!isNullOrUndefined(unassignedTasks)) {
1345
1346
  this.addNewRecord(updateRecord, unassignedTasks);
1347
+ var updatedData = this.parent.currentViewData.filter(function (data) {
1348
+ return (data.ganttProperties.taskId === updateRecord.ganttProperties.taskId &&
1349
+ (data.hasChildRecords === updateRecord.hasChildRecords));
1350
+ })[0];
1351
+ updateRecord.parentItem = updatedData.parentItem;
1352
+ updateRecord.parentUniqueID = updatedData.parentUniqueID;
1346
1353
  }
1347
1354
  else {
1348
1355
  // Block for create the unassigned task.
@@ -1618,13 +1625,17 @@ var Edit = /** @class */ (function () {
1618
1625
  var data = selectedRecords[i];
1619
1626
  var ids = data.ganttProperties.sharedTaskUniqueIds;
1620
1627
  for (var j = 0; j < ids.length; j++) {
1621
- deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
1628
+ if (this_1.parent.ids.indexOf(ids[j].toString()) !== -1) {
1629
+ deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
1630
+ }
1631
+ }
1632
+ if (this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID) !== -1) {
1633
+ deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
1622
1634
  }
1623
- deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
1624
1635
  }
1625
1636
  else {
1626
1637
  var resourceParent = this_1.parent.flatData.filter(function (data) {
1627
- return (parseInt(data.ganttProperties.taskId) == parseInt(selectedRecords[i].ganttProperties.taskId) &&
1638
+ return (data.ganttProperties.taskId === selectedRecords[i].ganttProperties.taskId &&
1628
1639
  data.hasChildRecords);
1629
1640
  })[0];
1630
1641
  deleteRecords.push(resourceParent);
@@ -2009,6 +2020,7 @@ var Edit = /** @class */ (function () {
2009
2020
  });
2010
2021
  };
2011
2022
  Edit.prototype.deleteSuccess = function (args) {
2023
+ var _this = this;
2012
2024
  var flatData = this.parent.flatData;
2013
2025
  var currentData = this.parent.currentViewData;
2014
2026
  var deletedRecords = this.parent.getRecordFromFlatdata(args.deletedRecordCollection);
@@ -2080,11 +2092,34 @@ var Edit = /** @class */ (function () {
2080
2092
  setValue('action', args.action, eventArgs);
2081
2093
  this.parent.isOnDelete = false;
2082
2094
  if (this.parent.viewType === 'ResourceView') {
2083
- var updateUnAssignedResources = eventArgs.data.filter(function (data) {
2095
+ var updateUnAssignedResources_1 = eventArgs.data.filter(function (data) {
2084
2096
  return !data.hasChildRecords;
2085
2097
  });
2086
- for (var i = 0; i < updateUnAssignedResources.length; i++) {
2087
- this.checkWithUnassignedTask(updateUnAssignedResources[i]);
2098
+ var _loop_2 = function (i) {
2099
+ var unassignedTask = this_2.parent.flatData.filter(function (data) {
2100
+ return data.ganttProperties.taskName === _this.parent.localeObj.getConstant('unassignedTask');
2101
+ })[0];
2102
+ var isDuplicate = unassignedTask.childRecords.filter(function (data) {
2103
+ return data.ganttProperties.taskId === updateUnAssignedResources_1[i].ganttProperties.taskId;
2104
+ });
2105
+ var parentTask = this_2.parent.getParentTask(updateUnAssignedResources_1[i].parentItem);
2106
+ if (parentTask && parentTask.ganttProperties.taskName !==
2107
+ this_2.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
2108
+ this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
2109
+ if (parentTask) {
2110
+ this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
2111
+ }
2112
+ }
2113
+ else if (!parentTask && isDuplicate.length === 0) {
2114
+ this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
2115
+ if (updateUnAssignedResources_1[i].parentItem) {
2116
+ this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
2117
+ }
2118
+ }
2119
+ };
2120
+ var this_2 = this;
2121
+ for (var i = 0; i < updateUnAssignedResources_1.length; i++) {
2122
+ _loop_2(i);
2088
2123
  }
2089
2124
  }
2090
2125
  this.parent.trigger('actionComplete', eventArgs);
@@ -2541,27 +2576,27 @@ var Edit = /** @class */ (function () {
2541
2576
  }
2542
2577
  }
2543
2578
  }
2544
- var _loop_2 = function (i) {
2545
- var originalData = this_2.parent.modifiedRecords[i];
2546
- var treeIndex = this_2.parent.allowRowDragAndDrop ? 1 : 0;
2547
- var uniqueTaskID = this_2.parent.taskFields.id;
2548
- originalIndex = this_2.parent.currentViewData.findIndex(function (data) {
2579
+ var _loop_3 = function (i) {
2580
+ var originalData = this_3.parent.modifiedRecords[i];
2581
+ var treeIndex = this_3.parent.allowRowDragAndDrop ? 1 : 0;
2582
+ var uniqueTaskID = this_3.parent.taskFields.id;
2583
+ originalIndex = this_3.parent.currentViewData.findIndex(function (data) {
2549
2584
  return (data[uniqueTaskID] == originalData[uniqueTaskID]);
2550
2585
  });
2551
- if (this_2.parent.treeGrid.getRows()[originalIndex]) {
2552
- this_2.parent.treeGrid.renderModule.cellRender({
2553
- data: originalData, cell: this_2.parent.treeGrid.getRows()[originalIndex].cells[this_2.parent.treeColumnIndex + treeIndex],
2554
- column: this_2.parent.treeGrid.grid.getColumns()[this_2.parent.treeColumnIndex],
2586
+ if (this_3.parent.treeGrid.getRows()[originalIndex]) {
2587
+ this_3.parent.treeGrid.renderModule.cellRender({
2588
+ data: originalData, cell: this_3.parent.treeGrid.getRows()[originalIndex].cells[this_3.parent.treeColumnIndex + treeIndex],
2589
+ column: this_3.parent.treeGrid.grid.getColumns()[this_3.parent.treeColumnIndex],
2555
2590
  requestType: 'rowDragAndDrop'
2556
2591
  });
2557
- this_2.parent.treeGrid.renderModule.RowModifier({
2558
- data: originalData, row: this_2.parent.treeGrid.getRows()[originalIndex], rowHeight: this_2.parent.rowHeight
2592
+ this_3.parent.treeGrid.renderModule.RowModifier({
2593
+ data: originalData, row: this_3.parent.treeGrid.getRows()[originalIndex], rowHeight: this_3.parent.rowHeight
2559
2594
  });
2560
2595
  }
2561
2596
  };
2562
- var this_2 = this, originalIndex;
2597
+ var this_3 = this, originalIndex;
2563
2598
  for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
2564
- _loop_2(i);
2599
+ _loop_3(i);
2565
2600
  }
2566
2601
  };
2567
2602
  /**
@@ -62,7 +62,6 @@ var FocusModule = /** @class */ (function () {
62
62
  if (ganttObj.selectedRowIndex === ganttObj.flatData.indexOf(currentSelectingRecord)) {
63
63
  return;
64
64
  }
65
- ganttObj.selectionModule.selectRow(ganttObj.flatData.indexOf(currentSelectingRecord), false, true);
66
65
  }
67
66
  break;
68
67
  case 'downArrow':
@@ -1619,14 +1619,20 @@ var TaskbarEdit = /** @class */ (function (_super) {
1619
1619
  new Date(nextSegment.startDate.getTime()) : this.parent.cloneProjectEndDate;
1620
1620
  var eDate = !isNullOrUndefined(previousSegment) ?
1621
1621
  new Date(previousSegment.endDate.getTime()) : this.parent.cloneProjectStartDate;
1622
- sDate.setHours(0, 0, 0, 0);
1623
- eDate.setHours(0, 0, 0, 0);
1624
1622
  var cStartDate = new Date(segment.startDate.getTime());
1625
1623
  var cEndDate = new Date(segment.endDate.getTime());
1626
- cStartDate.setDate(cStartDate.getDate() - 1);
1627
- cEndDate.setDate(cEndDate.getDate() + 1);
1628
- cStartDate.setHours(0, 0, 0, 0);
1629
- cEndDate.setHours(0, 0, 0, 0);
1624
+ if (this.parent.timelineModule.topTier === 'Day' && this.parent.timelineModule.bottomTier === 'Hour') {
1625
+ cStartDate.setHours(cStartDate.getHours() - 1);
1626
+ cEndDate.setHours(cEndDate.getHours() + 1);
1627
+ }
1628
+ else {
1629
+ sDate.setHours(0, 0, 0, 0);
1630
+ eDate.setHours(0, 0, 0, 0);
1631
+ cStartDate.setDate(cStartDate.getDate() - 1);
1632
+ cEndDate.setDate(cEndDate.getDate() + 1);
1633
+ cStartDate.setHours(0, 0, 0, 0);
1634
+ cEndDate.setHours(0, 0, 0, 0);
1635
+ }
1630
1636
  if (cStartDate.getTime() <= eDate.getTime() && !isNullOrUndefined(previousSegment) && !isNullOrUndefined(segment)) {
1631
1637
  var segmentIndexes = [
1632
1638
  { 'firstSegmentIndex': previousSegment.segmentIndex, 'secondSegmentIndex': segment.segmentIndex }
@@ -299,6 +299,9 @@ var GanttChart = /** @class */ (function () {
299
299
  this.parent.notify('chartMouseDown', e);
300
300
  this.parent.element.tabIndex = 0;
301
301
  }
302
+ if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
303
+ this.parent.treeGrid.endEdit();
304
+ }
302
305
  };
303
306
  GanttChart.prototype.ganttChartMouseClick = function (e) {
304
307
  if (this.parent.autoFocusTasks) {