@syncfusion/ej2-gantt 22.2.9 → 22.2.11
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 +19 -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 +80 -27
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +80 -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 +13 -13
- package/src/gantt/actions/critical-path.js +59 -18
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +1 -1
- package/src/gantt/actions/filter.js +6 -1
- package/src/gantt/actions/keyboard.js +1 -1
- package/src/gantt/base/gantt.js +5 -2
- package/src/gantt/base/splitter.js +4 -0
- package/src/gantt/base/task-processor.js +3 -3
- package/styles/gantt/material.css +1 -1
- package/styles/material.css +1 -1
|
@@ -1989,9 +1989,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
else {
|
|
1991
1991
|
let uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
|
|
1992
|
-
if (this.parent.viewType === 'ResourceView' && typeof
|
|
1993
|
-
|
|
1994
|
-
}
|
|
1992
|
+
// if (this.parent.viewType === 'ResourceView' && typeof(ganttData.ganttProperties.taskId) === "string") {
|
|
1993
|
+
// uniqueId = ganttProperties.taskId.toString();
|
|
1994
|
+
// }
|
|
1995
1995
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
|
|
1996
1996
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
|
|
1997
1997
|
this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
|
|
@@ -12754,8 +12754,12 @@ class Splitter$1 {
|
|
|
12754
12754
|
},
|
|
12755
12755
|
resizing: (args) => {
|
|
12756
12756
|
this.parent.trigger('splitterResizing', args);
|
|
12757
|
+
if (this.parent.timelineModule.isZoomToFit) {
|
|
12758
|
+
this.parent.timelineModule.updateTimelineAfterZooming(this.parent.timelineModule.timelineEndDate, true);
|
|
12759
|
+
}
|
|
12757
12760
|
},
|
|
12758
12761
|
resizeStop: (args) => {
|
|
12762
|
+
this.parent['calculateDimensions']();
|
|
12759
12763
|
const leftPane = args.pane[0];
|
|
12760
12764
|
this.splitterPreviousPositionGrid = leftPane.scrollWidth + 1 + 'px';
|
|
12761
12765
|
this.splitterObject.paneSettings[0].size = this.getSpliterPositionInPercentage(this.splitterPreviousPositionGrid);
|
|
@@ -13561,7 +13565,7 @@ class FocusModule {
|
|
|
13561
13565
|
}
|
|
13562
13566
|
else if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
13563
13567
|
e.preventDefault();
|
|
13564
|
-
ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition);
|
|
13568
|
+
ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition, this.parent.selectedRowIndex);
|
|
13565
13569
|
const focussedElement = ganttObj.element;
|
|
13566
13570
|
focussedElement.focus();
|
|
13567
13571
|
}
|
|
@@ -14518,6 +14522,9 @@ let Gantt = class Gantt extends Component {
|
|
|
14518
14522
|
this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
|
|
14519
14523
|
this.splitterModule.splitterObject.paneSettings[0].size = this.splitterModule['getSpliterPositionInPercentage'](this.splitterModule.splitterPreviousPositionGrid);
|
|
14520
14524
|
this.splitterModule.splitterObject.paneSettings[1].size = this.splitterModule.splitterPreviousPositionChart;
|
|
14525
|
+
if (this.timelineModule.isZoomToFit) {
|
|
14526
|
+
this.timelineModule.processZoomToFit();
|
|
14527
|
+
}
|
|
14521
14528
|
}
|
|
14522
14529
|
}
|
|
14523
14530
|
keyActionHandler(e) {
|
|
@@ -16935,8 +16942,8 @@ let Gantt = class Gantt extends Component {
|
|
|
16935
16942
|
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
16936
16943
|
data[taskfields.dependency] = null;
|
|
16937
16944
|
}
|
|
16938
|
-
const position =
|
|
16939
|
-
this.addRecord(data, position);
|
|
16945
|
+
const position = this.editSettings.newRowPosition;
|
|
16946
|
+
this.addRecord(data, position, this.selectedRowIndex);
|
|
16940
16947
|
}
|
|
16941
16948
|
else {
|
|
16942
16949
|
if (!rowData.hasChildRecords && !rowData.ganttProperties.isMilestone) {
|
|
@@ -22589,7 +22596,7 @@ class DialogEdit {
|
|
|
22589
22596
|
}
|
|
22590
22597
|
}
|
|
22591
22598
|
else {
|
|
22592
|
-
this.parent.editModule.addRecord(this.addedRecord, this.parent.editSettings.newRowPosition);
|
|
22599
|
+
this.parent.editModule.addRecord(this.addedRecord, this.parent.editSettings.newRowPosition, this.parent.selectedRowIndex);
|
|
22593
22600
|
}
|
|
22594
22601
|
}
|
|
22595
22602
|
return true;
|
|
@@ -25107,7 +25114,7 @@ class Edit$2 {
|
|
|
25107
25114
|
this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
|
|
25108
25115
|
}
|
|
25109
25116
|
if (this.parent.viewType === 'ResourceView') {
|
|
25110
|
-
if (args.action === 'TaskbarEditing') {
|
|
25117
|
+
if (args.action === 'TaskbarEditing' || args.action === 'DrawConnectorLine') {
|
|
25111
25118
|
this.updateSharedTask(args.data);
|
|
25112
25119
|
}
|
|
25113
25120
|
else if (args.action === 'DialogEditing' || args.action === 'CellEditing' || args.action === 'methodUpdate') {
|
|
@@ -27968,8 +27975,13 @@ class Filter$1 {
|
|
|
27968
27975
|
break;
|
|
27969
27976
|
}
|
|
27970
27977
|
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
27978
|
+
if (parentNode.parentNode instanceof HTMLDocument) {
|
|
27979
|
+
break;
|
|
27980
|
+
}
|
|
27971
27981
|
parentNode = parentNode.parentNode;
|
|
27972
|
-
|
|
27982
|
+
if (parentNode.parentNode && parentNode.parentNode.style) {
|
|
27983
|
+
marginTop = parentNode.parentNode.style.marginTop;
|
|
27984
|
+
}
|
|
27973
27985
|
}
|
|
27974
27986
|
parentNodeTop = parentNode.getBoundingClientRect().top;
|
|
27975
27987
|
}
|
|
@@ -30191,14 +30203,68 @@ class CriticalPath {
|
|
|
30191
30203
|
let criticalPathIds = [];
|
|
30192
30204
|
let index;
|
|
30193
30205
|
let predecessorFrom;
|
|
30194
|
-
|
|
30206
|
+
const slackindexes = [];
|
|
30207
|
+
const indexes = [];
|
|
30208
|
+
for (let z = flatRecords.length - 1; z >= 0; z--) {
|
|
30209
|
+
if (flatRecords[parseInt(z.toString(), 10)].slack === '0 day') {
|
|
30210
|
+
const index1 = flatRecords[parseInt(z.toString(), 10)].index;
|
|
30211
|
+
slackindexes.push(index1);
|
|
30212
|
+
}
|
|
30213
|
+
}
|
|
30214
|
+
const num = 0;
|
|
30215
|
+
indexes.push(slackindexes[parseInt(num.toString(), 10)]);
|
|
30216
|
+
for (let j = 0; j < indexes.length; j++) {
|
|
30217
|
+
const i = flatRecords[indexes[parseInt(j.toString(), 10)]].ganttProperties.predecessor;
|
|
30218
|
+
if (!isNullOrUndefined(i)) {
|
|
30219
|
+
for (let f = i.length - 1; f >= 0; f--) {
|
|
30220
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30221
|
+
const q = modelRecordIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30222
|
+
for (let k = 0; k < indexes.length; k++) {
|
|
30223
|
+
const item = indexes[parseInt(j.toString(), 10)];
|
|
30224
|
+
if (item !== q) {
|
|
30225
|
+
indexes.push(q);
|
|
30226
|
+
}
|
|
30227
|
+
break;
|
|
30228
|
+
}
|
|
30229
|
+
}
|
|
30230
|
+
else {
|
|
30231
|
+
const q = this.resourceCollectionIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30232
|
+
for (let k = 0; k < indexes.length; k++) {
|
|
30233
|
+
const item = indexes[parseInt(j.toString(), 10)];
|
|
30234
|
+
if (item !== q) {
|
|
30235
|
+
indexes.push(q);
|
|
30236
|
+
}
|
|
30237
|
+
break;
|
|
30238
|
+
}
|
|
30239
|
+
}
|
|
30240
|
+
}
|
|
30241
|
+
}
|
|
30242
|
+
}
|
|
30243
|
+
for (let x = 0; x < indexes.length; x++) {
|
|
30195
30244
|
if (this.parent.viewType === 'ProjectView') {
|
|
30196
|
-
index = modelRecordIds.indexOf(
|
|
30245
|
+
index = modelRecordIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['ganttProperties']['taskId'].toString());
|
|
30197
30246
|
}
|
|
30198
30247
|
else {
|
|
30199
|
-
index = this.resourceCollectionIds.indexOf(
|
|
30248
|
+
index = this.resourceCollectionIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['TaskID'].toString());
|
|
30200
30249
|
}
|
|
30201
30250
|
const predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
30251
|
+
if (isNullOrUndefined(predecessorLength)) {
|
|
30252
|
+
if (taskBeyondEnddate.length > 0) {
|
|
30253
|
+
for (let i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30254
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30255
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30256
|
+
}
|
|
30257
|
+
else {
|
|
30258
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30259
|
+
}
|
|
30260
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30261
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
30262
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30263
|
+
}
|
|
30264
|
+
}
|
|
30265
|
+
}
|
|
30266
|
+
break;
|
|
30267
|
+
}
|
|
30202
30268
|
const noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
30203
30269
|
for (let i = predecessorLength.length - 1; i >= 0; i--) {
|
|
30204
30270
|
let toID;
|
|
@@ -30262,21 +30328,8 @@ class CriticalPath {
|
|
|
30262
30328
|
flatRecords[index].isCritical = true;
|
|
30263
30329
|
flatRecords[index].ganttProperties.isCritical = true;
|
|
30264
30330
|
this.criticalTasks.push(flatRecords[index]);
|
|
30265
|
-
|
|
30266
|
-
|
|
30267
|
-
}
|
|
30268
|
-
}
|
|
30269
|
-
if (taskBeyondEnddate.length > 0) {
|
|
30270
|
-
for (let i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30271
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30272
|
-
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30273
|
-
}
|
|
30274
|
-
else {
|
|
30275
|
-
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30276
|
-
}
|
|
30277
|
-
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30278
|
-
this.criticalTasks.push(flatRecords[index]);
|
|
30279
|
-
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30331
|
+
const num = flatRecords[parseInt(index.toString(), 10)]['ganttProperties']['taskId'];
|
|
30332
|
+
criticalPathIds.push(num);
|
|
30280
30333
|
}
|
|
30281
30334
|
}
|
|
30282
30335
|
}
|