@syncfusion/ej2-gantt 23.2.4 → 23.2.7
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 +24 -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 +78 -48
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +78 -48
- 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 +15 -15
- package/src/gantt/actions/edit.js +46 -30
- package/src/gantt/actions/rowdragdrop.js +13 -5
- package/src/gantt/actions/taskbar-edit.js +4 -4
- package/src/gantt/base/date-processor.js +1 -1
- package/src/gantt/base/gantt-chart.js +1 -1
- package/src/gantt/base/tree-grid.js +6 -4
- package/src/gantt/renderer/timeline.js +8 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 23.2.
|
|
3
|
+
* version : 23.2.7
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@23.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@23.2.5",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-dx2I2n4yLq8ObKKGEke8UMHx5jxwXvS5EXQ1f9RctJvMQPOGXzPT25Q4KBX5e2cxr33+1tGGJsu5w71LyC8gkw==",
|
|
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-23.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-23.2.5.tgz",
|
|
27
|
+
"_shasum": "cddf93452ba28e98ba90fcc4c94ccbcea1a8ec16",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~23.2.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~23.2.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~23.2.
|
|
38
|
+
"@syncfusion/ej2-base": "~23.2.6",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~23.2.7",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~23.2.7",
|
|
41
41
|
"@syncfusion/ej2-data": "~23.2.4",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~23.2.
|
|
43
|
-
"@syncfusion/ej2-grids": "~23.2.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~23.2.7",
|
|
43
|
+
"@syncfusion/ej2-grids": "~23.2.7",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~23.2.4",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~23.2.4",
|
|
46
46
|
"@syncfusion/ej2-lists": "~23.2.4",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~23.2.
|
|
48
|
-
"@syncfusion/ej2-notifications": "~23.2.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~23.2.7",
|
|
48
|
+
"@syncfusion/ej2-notifications": "~23.2.5",
|
|
49
49
|
"@syncfusion/ej2-popups": "~23.2.4",
|
|
50
|
-
"@syncfusion/ej2-richtexteditor": "~23.2.
|
|
51
|
-
"@syncfusion/ej2-svg-base": "~23.2.
|
|
52
|
-
"@syncfusion/ej2-treegrid": "~23.2.
|
|
50
|
+
"@syncfusion/ej2-richtexteditor": "~23.2.7",
|
|
51
|
+
"@syncfusion/ej2-svg-base": "~23.2.5",
|
|
52
|
+
"@syncfusion/ej2-treegrid": "~23.2.7"
|
|
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": "23.2.
|
|
77
|
+
"version": "23.2.7",
|
|
78
78
|
"sideEffects": false
|
|
79
79
|
}
|
|
@@ -2559,34 +2559,42 @@ var Edit = /** @class */ (function () {
|
|
|
2559
2559
|
var predecessorCollection = parentRecordTaskData.predecessor;
|
|
2560
2560
|
var childRecord;
|
|
2561
2561
|
var predecessorIndex;
|
|
2562
|
+
var validPredecessor;
|
|
2562
2563
|
var updatedPredecessor = [];
|
|
2563
2564
|
for (var count = 0; count < len; count++) {
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2565
|
+
var fromRecord = this.parent.getRecordByID(predecessorCollection[count].from);
|
|
2566
|
+
var toRecord = this.parent.getRecordByID(predecessorCollection[count].to);
|
|
2567
|
+
validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
|
|
2568
|
+
if (!validPredecessor) {
|
|
2569
|
+
if (predecessorCollection[count].to === parentRecordTaskData.rowUniqueID.toString()) {
|
|
2570
|
+
childRecord = this.parent.getRecordByID(predecessorCollection[count].from);
|
|
2571
|
+
predecessorIndex = getIndex(predecessorCollection[count], 'from', childRecord.ganttProperties.predecessor, 'to');
|
|
2572
|
+
// eslint-disable-next-line
|
|
2573
|
+
var predecessorCollections = (extend([], childRecord.ganttProperties.predecessor, [], true));
|
|
2574
|
+
predecessorCollections.splice(predecessorIndex, 1);
|
|
2575
|
+
this.parent.setRecordValue('predecessor', predecessorCollections, childRecord.ganttProperties, true);
|
|
2576
|
+
}
|
|
2577
|
+
else if (predecessorCollection[count].from === parentRecordTaskData.rowUniqueID.toString()) {
|
|
2578
|
+
childRecord = this.parent.getRecordByID(predecessorCollection[count].to);
|
|
2579
|
+
var prdcList = (childRecord.ganttProperties.predecessorsName.toString()).split(',');
|
|
2580
|
+
var str = predecessorCollection[count].from + predecessorCollection[count].type;
|
|
2581
|
+
var ind = prdcList.indexOf(str);
|
|
2582
|
+
prdcList.splice(ind, 1);
|
|
2583
|
+
this.parent.setRecordValue('predecessorsName', prdcList.join(','), childRecord.ganttProperties, true);
|
|
2584
|
+
this.parent.setRecordValue(this.parent.taskFields.dependency, prdcList.join(','), childRecord);
|
|
2585
|
+
predecessorIndex = getIndex(predecessorCollection[count], 'from', childRecord.ganttProperties.predecessor, 'to');
|
|
2586
|
+
// eslint-disable-next-line
|
|
2587
|
+
var temppredecessorCollection = (extend([], childRecord.ganttProperties.predecessor, [], true));
|
|
2588
|
+
temppredecessorCollection.splice(predecessorIndex, 1);
|
|
2589
|
+
this.parent.setRecordValue('predecessor', temppredecessorCollection, childRecord.ganttProperties, true);
|
|
2590
|
+
this.parent.predecessorModule.validatePredecessorDates(childRecord);
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
if (!validPredecessor) {
|
|
2595
|
+
this.parent.setRecordValue('predecessor', updatedPredecessor, parentRecord.ganttProperties, true);
|
|
2596
|
+
this.parent.setRecordValue('predecessorsName', '', parentRecord.ganttProperties, true);
|
|
2587
2597
|
}
|
|
2588
|
-
this.parent.setRecordValue('predecessor', updatedPredecessor, parentRecord.ganttProperties, true);
|
|
2589
|
-
this.parent.setRecordValue('predecessorsName', '', parentRecord.ganttProperties, true);
|
|
2590
2598
|
};
|
|
2591
2599
|
/**
|
|
2592
2600
|
* @param {IPredecessor[]} predecessorCollection .
|
|
@@ -3553,11 +3561,19 @@ var Edit = /** @class */ (function () {
|
|
|
3553
3561
|
}
|
|
3554
3562
|
if (this.dropPosition === 'middleSegment') {
|
|
3555
3563
|
if (droppedRec.ganttProperties.predecessor) {
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3564
|
+
var len = droppedRec.ganttProperties.predecessor.length;
|
|
3565
|
+
for (var count = 0; count < len; count++) {
|
|
3566
|
+
var fromRecord = this.parent.getRecordByID(droppedRec.ganttProperties.predecessor[count].from);
|
|
3567
|
+
var toRecord = this.parent.getRecordByID(droppedRec.ganttProperties.predecessor[count].to);
|
|
3568
|
+
var validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
|
|
3569
|
+
if (droppedRec.ganttProperties.predecessor && !validPredecessor) {
|
|
3570
|
+
this.parent.editModule.removePredecessorOnDelete(droppedRec);
|
|
3571
|
+
droppedRec.ganttProperties.predecessor = null;
|
|
3572
|
+
droppedRec.ganttProperties.predecessorsName = null;
|
|
3573
|
+
droppedRec[this.parent.taskFields.dependency] = null;
|
|
3574
|
+
droppedRec.taskData[this.parent.taskFields.dependency] = null;
|
|
3575
|
+
}
|
|
3576
|
+
}
|
|
3561
3577
|
}
|
|
3562
3578
|
if (droppedRec.ganttProperties.isMilestone) {
|
|
3563
3579
|
this.parent.setRecordValue('isMilestone', false, droppedRec.ganttProperties, true);
|
|
@@ -335,11 +335,19 @@ var RowDD = /** @class */ (function () {
|
|
|
335
335
|
}
|
|
336
336
|
if (this.dropPosition === 'middleSegment') {
|
|
337
337
|
if (droppedRecord.ganttProperties.predecessor) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
var len = droppedRecord.ganttProperties.predecessor.length;
|
|
339
|
+
for (var count_1 = 0; count_1 < len; count_1++) {
|
|
340
|
+
var fromRecord = this.parent.getRecordByID(droppedRecord.ganttProperties.predecessor[count_1].from);
|
|
341
|
+
var toRecord = this.parent.getRecordByID(droppedRecord.ganttProperties.predecessor[count_1].to);
|
|
342
|
+
var validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
|
|
343
|
+
if (droppedRecord.ganttProperties.predecessor && !validPredecessor) {
|
|
344
|
+
this.parent.editModule.removePredecessorOnDelete(droppedRecord);
|
|
345
|
+
droppedRecord.ganttProperties.predecessor = null;
|
|
346
|
+
droppedRecord.ganttProperties.predecessorsName = null;
|
|
347
|
+
droppedRecord[this.parent.taskFields.dependency] = null;
|
|
348
|
+
droppedRecord.taskData[this.parent.taskFields.dependency] = null;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
343
351
|
}
|
|
344
352
|
if (droppedRecord.ganttProperties.isMilestone) {
|
|
345
353
|
this.parent.setRecordValue('isMilestone', false, droppedRecord.ganttProperties, true);
|
|
@@ -1514,7 +1514,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1514
1514
|
pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
|
|
1515
1515
|
/* To render the milestone in proper date while editing */
|
|
1516
1516
|
if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
|
|
1517
|
-
pStartDate.setDate(pStartDate.getDate()
|
|
1517
|
+
// pStartDate.setDate(pStartDate.getDate()-1);
|
|
1518
1518
|
this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
|
|
1519
1519
|
pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
|
|
1520
1520
|
}
|
|
@@ -1524,9 +1524,9 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1524
1524
|
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
1525
1525
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
1526
1526
|
}
|
|
1527
|
-
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
1528
|
-
|
|
1529
|
-
}
|
|
1527
|
+
// else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
1528
|
+
// pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
1529
|
+
// }
|
|
1530
1530
|
}
|
|
1531
1531
|
return pStartDate;
|
|
1532
1532
|
};
|
|
@@ -67,7 +67,7 @@ var DateProcessor = /** @class */ (function () {
|
|
|
67
67
|
if (!this.parent.includeWeekend) {
|
|
68
68
|
var tempDate = new Date(cloneStartDate.getTime());
|
|
69
69
|
cloneStartDate = this.getNextWorkingDay(cloneStartDate);
|
|
70
|
-
if (tempDate.getTime() !== cloneStartDate.getTime()) {
|
|
70
|
+
if (tempDate.getTime() !== cloneStartDate.getTime() && !validateAsMilestone) {
|
|
71
71
|
this.setTime(startTime, cloneStartDate);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -347,7 +347,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
347
347
|
if (this.parent.editSettings.allowTaskbarEditing && this.parent.element.querySelector('.e-left-resize-gripper')) {
|
|
348
348
|
isTaskbarEdited = true;
|
|
349
349
|
}
|
|
350
|
-
if (!isTaskbarEdited) {
|
|
350
|
+
if (!isTaskbarEdited || e.button == 2) {
|
|
351
351
|
if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
|
|
352
352
|
this.parent.treeGrid.endEdit();
|
|
353
353
|
}
|
|
@@ -121,7 +121,9 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
121
121
|
this.parent.treeGrid.loadChildOnDemand = this.parent.loadChildOnDemand;
|
|
122
122
|
this.parent.treeGrid['isFromGantt'] = true;
|
|
123
123
|
this.parent.treeGrid.parentIdMapping = this.parent.taskFields.parentID;
|
|
124
|
-
|
|
124
|
+
if (this.parent.taskFields.parentID) {
|
|
125
|
+
this.parent.treeGrid.idMapping = this.parent.taskFields.id;
|
|
126
|
+
}
|
|
125
127
|
this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
|
|
126
128
|
this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
|
|
127
129
|
this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
|
|
@@ -162,7 +164,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
162
164
|
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
163
165
|
}
|
|
164
166
|
this.parent.treeGrid.height =
|
|
165
|
-
this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'] - 19;
|
|
167
|
+
this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'] - (this.parent.flatData.length == 0 ? 0 : 19);
|
|
166
168
|
};
|
|
167
169
|
GanttTreeGrid.prototype.getContentDiv = function () {
|
|
168
170
|
return this.treeGridElement.querySelector('.e-content');
|
|
@@ -674,7 +676,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
674
676
|
else {
|
|
675
677
|
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('duration');
|
|
676
678
|
}
|
|
677
|
-
column.valueAccessor = column.valueAccessor ? column.valueAccessor : !isNullOrUndefined(column.edit) ? null :
|
|
679
|
+
column.valueAccessor = column.valueAccessor ? column.valueAccessor : !isNullOrUndefined(column.edit) && !isNullOrUndefined(column.edit.read) ? null :
|
|
678
680
|
this.durationValueAccessor.bind(this);
|
|
679
681
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
680
682
|
column.type = column.type ? column.type : 'string';
|
|
@@ -821,7 +823,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
821
823
|
*/
|
|
822
824
|
GanttTreeGrid.prototype.composeIDColumn = function (column) {
|
|
823
825
|
var isProjectView = this.parent.viewType === 'ProjectView';
|
|
824
|
-
var lengthDataSource = this.parent.dataSource['length'];
|
|
826
|
+
var lengthDataSource = this.parent.dataSource ? this.parent.dataSource['length'] : 0;
|
|
825
827
|
var taskIDName;
|
|
826
828
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
827
829
|
if (this.parent.isLocaleChanged) {
|
|
@@ -65,6 +65,10 @@ var Timeline = /** @class */ (function () {
|
|
|
65
65
|
if (!this.parent.isFromOnPropertyChange) {
|
|
66
66
|
this.parent.updateProjectDates(this.parent.cloneProjectStartDate, this.parent.cloneProjectEndDate, this.parent.isTimelineRoundOff);
|
|
67
67
|
}
|
|
68
|
+
var timelineContainer = this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
|
|
69
|
+
this.parent.element.getElementsByClassName('e-gridcontent')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
70
|
+
// eslint-disable-next-line
|
|
71
|
+
this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
68
72
|
};
|
|
69
73
|
/**
|
|
70
74
|
* Function used to refresh Gantt rows.
|
|
@@ -279,6 +283,7 @@ var Timeline = /** @class */ (function () {
|
|
|
279
283
|
}
|
|
280
284
|
this.changeTimelineSettings(newTimeline);
|
|
281
285
|
this.parent.isTimelineRoundOff = isNullOrUndefined(this.parent.projectStartDate) ? true : false;
|
|
286
|
+
this.isZoomToFit = false;
|
|
282
287
|
};
|
|
283
288
|
Timeline.prototype.bottomTierCellWidthCalc = function (mode, zoomLevel, date) {
|
|
284
289
|
var convertedMilliSeconds;
|
|
@@ -1429,10 +1434,9 @@ var Timeline = /** @class */ (function () {
|
|
|
1429
1434
|
var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
1430
1435
|
var isChanged = void 0;
|
|
1431
1436
|
var taskbarModule = this.parent.editModule.taskbarEditModule;
|
|
1432
|
-
if (!isNullOrUndefined(maxStartLeft) && ((
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
taskbarModule.taskBarEditAction !== 'RightResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
1437
|
+
if (!isNullOrUndefined(maxStartLeft) && ((!isNullOrUndefined(taskbarModule)) && (!isNullOrUndefined(taskbarModule.taskBarEditAction)
|
|
1438
|
+
&& taskbarModule.taskBarEditAction !== 'ProgressResizing' &&
|
|
1439
|
+
taskbarModule.taskBarEditAction !== 'RightResizing' && taskbarModule.taskBarEditAction !== 'LeftResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
1436
1440
|
isChanged = 'prevTimeSpan';
|
|
1437
1441
|
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
1438
1442
|
}
|