@syncfusion/ej2-gantt 20.3.59 → 20.3.61
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.
- package/CHANGELOG.md +22 -0
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +63 -12
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +83 -27
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/gantt/actions/dependency.js +3 -0
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +54 -19
- package/src/gantt/actions/keyboard.js +0 -1
- package/src/gantt/actions/taskbar-edit.js +12 -6
- package/src/gantt/base/date-processor.js +4 -0
- package/src/gantt/base/gantt-chart.js +10 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.3.
|
|
3
|
+
* version : 20.3.61
|
|
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.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.3.60",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-r4ZVyKzjd8LePO6v6CESdNoXi8+jRiPhnRaZFr0jaIo6ZJhRxae8Hot3n16/s3vUZ8QFEsz0NWFuO0gD6f56gQ==",
|
|
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.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.3.60.tgz",
|
|
27
|
+
"_shasum": "8aac2f8a497d74ae0b6757829a0920d91655163b",
|
|
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.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~20.3.
|
|
43
|
-
"@syncfusion/ej2-grids": "~20.3.
|
|
41
|
+
"@syncfusion/ej2-data": "~20.3.60",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.3.60",
|
|
43
|
+
"@syncfusion/ej2-grids": "~20.3.61",
|
|
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.
|
|
48
|
-
"@syncfusion/ej2-popups": "~20.3.
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~20.3.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~20.3.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.3.60",
|
|
48
|
+
"@syncfusion/ej2-popups": "~20.3.60",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~20.3.61",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~20.3.61"
|
|
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.
|
|
78
|
+
"version": "20.3.61",
|
|
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
|
-
|
|
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 (
|
|
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
|
|
2095
|
+
var updateUnAssignedResources_1 = eventArgs.data.filter(function (data) {
|
|
2084
2096
|
return !data.hasChildRecords;
|
|
2085
2097
|
});
|
|
2086
|
-
|
|
2087
|
-
|
|
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
|
|
2545
|
-
var originalData =
|
|
2546
|
-
var treeIndex =
|
|
2547
|
-
var uniqueTaskID =
|
|
2548
|
-
originalIndex =
|
|
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 (
|
|
2552
|
-
|
|
2553
|
-
data: originalData, cell:
|
|
2554
|
-
column:
|
|
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
|
-
|
|
2558
|
-
data: originalData, row:
|
|
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
|
|
2597
|
+
var this_3 = this, originalIndex;
|
|
2563
2598
|
for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
|
|
2564
|
-
|
|
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
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
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 }
|
|
@@ -212,6 +212,10 @@ var DateProcessor = /** @class */ (function () {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
+
if (ganttProp && ganttProp.baselineStartDate && cloneDate &&
|
|
216
|
+
ganttProp.baselineStartDate.getTime() > cloneDate.getTime()) {
|
|
217
|
+
cloneDate.setDate(cloneDate.getDate() + 1);
|
|
218
|
+
}
|
|
215
219
|
return cloneDate;
|
|
216
220
|
}
|
|
217
221
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, formatUnit, EventHandler, Browser } from '@syncfusion/ej2-base';
|
|
2
|
-
import { isNullOrUndefined, closest, addClass, removeClass, getValue } from '@syncfusion/ej2-base';
|
|
2
|
+
import { isNullOrUndefined, closest, addClass, removeClass, getValue, setValue } from '@syncfusion/ej2-base';
|
|
3
3
|
import * as cls from '../base/css-constants';
|
|
4
4
|
import { ChartScroll } from '../actions/chart-scroll';
|
|
5
5
|
import { click } from '@syncfusion/ej2-grids';
|
|
@@ -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) {
|
|
@@ -379,6 +382,12 @@ var GanttChart = /** @class */ (function () {
|
|
|
379
382
|
*/
|
|
380
383
|
GanttChart.prototype.documentMouseUp = function (e) {
|
|
381
384
|
this.isGanttElement = true;
|
|
385
|
+
if (e.target.classList.contains('e-treegridexpand') ||
|
|
386
|
+
e.target.classList.contains('e-treegridcollapse')) {
|
|
387
|
+
if (getValue('isEditCollapse', this.parent.treeGrid) === true) {
|
|
388
|
+
setValue('isEditCollapse', false, this.parent.treeGrid);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
382
391
|
if (this.parent.allowRowDragAndDrop) {
|
|
383
392
|
var ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
|
|
384
393
|
if (ganttDragElemet) {
|