@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.
- package/CHANGELOG.md +13 -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 +53 -12
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +73 -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/gantt-chart.js +3 -0
|
@@ -4431,6 +4431,9 @@ class GanttChart {
|
|
|
4431
4431
|
this.parent.notify('chartMouseDown', e);
|
|
4432
4432
|
this.parent.element.tabIndex = 0;
|
|
4433
4433
|
}
|
|
4434
|
+
if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
|
|
4435
|
+
this.parent.treeGrid.endEdit();
|
|
4436
|
+
}
|
|
4434
4437
|
}
|
|
4435
4438
|
ganttChartMouseClick(e) {
|
|
4436
4439
|
if (this.parent.autoFocusTasks) {
|
|
@@ -10684,6 +10687,9 @@ class Dependency {
|
|
|
10684
10687
|
this.parent.dataOperation.updateParentItems(record, true);
|
|
10685
10688
|
}
|
|
10686
10689
|
}
|
|
10690
|
+
else if (record && record.hasChildRecords && !ganttProp) {
|
|
10691
|
+
this.parent.editModule['updateChildItems'](record);
|
|
10692
|
+
}
|
|
10687
10693
|
}
|
|
10688
10694
|
}
|
|
10689
10695
|
/**
|
|
@@ -12378,7 +12384,6 @@ class FocusModule {
|
|
|
12378
12384
|
if (ganttObj.selectedRowIndex === ganttObj.flatData.indexOf(currentSelectingRecord)) {
|
|
12379
12385
|
return;
|
|
12380
12386
|
}
|
|
12381
|
-
ganttObj.selectionModule.selectRow(ganttObj.flatData.indexOf(currentSelectingRecord), false, true);
|
|
12382
12387
|
}
|
|
12383
12388
|
break;
|
|
12384
12389
|
case 'downArrow':
|
|
@@ -18280,14 +18285,20 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18280
18285
|
new Date(nextSegment.startDate.getTime()) : this.parent.cloneProjectEndDate;
|
|
18281
18286
|
const eDate = !isNullOrUndefined(previousSegment) ?
|
|
18282
18287
|
new Date(previousSegment.endDate.getTime()) : this.parent.cloneProjectStartDate;
|
|
18283
|
-
sDate.setHours(0, 0, 0, 0);
|
|
18284
|
-
eDate.setHours(0, 0, 0, 0);
|
|
18285
18288
|
const cStartDate = new Date(segment.startDate.getTime());
|
|
18286
18289
|
const cEndDate = new Date(segment.endDate.getTime());
|
|
18287
|
-
|
|
18288
|
-
|
|
18289
|
-
|
|
18290
|
-
|
|
18290
|
+
if (this.parent.timelineModule.topTier === 'Day' && this.parent.timelineModule.bottomTier === 'Hour') {
|
|
18291
|
+
cStartDate.setHours(cStartDate.getHours() - 1);
|
|
18292
|
+
cEndDate.setHours(cEndDate.getHours() + 1);
|
|
18293
|
+
}
|
|
18294
|
+
else {
|
|
18295
|
+
sDate.setHours(0, 0, 0, 0);
|
|
18296
|
+
eDate.setHours(0, 0, 0, 0);
|
|
18297
|
+
cStartDate.setDate(cStartDate.getDate() - 1);
|
|
18298
|
+
cEndDate.setDate(cEndDate.getDate() + 1);
|
|
18299
|
+
cStartDate.setHours(0, 0, 0, 0);
|
|
18300
|
+
cEndDate.setHours(0, 0, 0, 0);
|
|
18301
|
+
}
|
|
18291
18302
|
if (cStartDate.getTime() <= eDate.getTime() && !isNullOrUndefined(previousSegment) && !isNullOrUndefined(segment)) {
|
|
18292
18303
|
const segmentIndexes = [
|
|
18293
18304
|
{ 'firstSegmentIndex': previousSegment.segmentIndex, 'secondSegmentIndex': segment.segmentIndex }
|
|
@@ -20401,7 +20412,7 @@ class DialogEdit {
|
|
|
20401
20412
|
inputElement = this.createInputElement('', ganttId + '' + column.field, column.field);
|
|
20402
20413
|
divElement.appendChild(inputElement);
|
|
20403
20414
|
}
|
|
20404
|
-
inputModel.enabled = !this.isCheckIsDisabled(column);
|
|
20415
|
+
inputModel.enabled = !isNullOrUndefined(inputModel.enabled) ? inputModel.enabled : !this.isCheckIsDisabled(column);
|
|
20405
20416
|
if (column.field === this.parent.taskFields.duration) {
|
|
20406
20417
|
if (!isNullOrUndefined(column.valueAccessor)) {
|
|
20407
20418
|
if (typeof column.valueAccessor === 'string') {
|
|
@@ -22575,6 +22586,7 @@ class Edit$2 {
|
|
|
22575
22586
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
22576
22587
|
}
|
|
22577
22588
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
22589
|
+
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
22578
22590
|
}
|
|
22579
22591
|
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
22580
22592
|
(args.action === "DrawConnectorLine" || args.action === "CellEditing" || args.action === "DialogEditing")) {
|
|
@@ -23110,6 +23122,12 @@ class Edit$2 {
|
|
|
23110
23122
|
}
|
|
23111
23123
|
if (!isNullOrUndefined(unassignedTasks)) {
|
|
23112
23124
|
this.addNewRecord(updateRecord, unassignedTasks);
|
|
23125
|
+
const updatedData = this.parent.currentViewData.filter((data) => {
|
|
23126
|
+
return (data.ganttProperties.taskId === updateRecord.ganttProperties.taskId &&
|
|
23127
|
+
(data.hasChildRecords === updateRecord.hasChildRecords));
|
|
23128
|
+
})[0];
|
|
23129
|
+
updateRecord.parentItem = updatedData.parentItem;
|
|
23130
|
+
updateRecord.parentUniqueID = updatedData.parentUniqueID;
|
|
23113
23131
|
}
|
|
23114
23132
|
else {
|
|
23115
23133
|
// Block for create the unassigned task.
|
|
@@ -23385,13 +23403,17 @@ class Edit$2 {
|
|
|
23385
23403
|
const data = selectedRecords[i];
|
|
23386
23404
|
const ids = data.ganttProperties.sharedTaskUniqueIds;
|
|
23387
23405
|
for (let j = 0; j < ids.length; j++) {
|
|
23388
|
-
|
|
23406
|
+
if (this.parent.ids.indexOf(ids[j].toString()) !== -1) {
|
|
23407
|
+
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(ids[j].toString())]);
|
|
23408
|
+
}
|
|
23409
|
+
}
|
|
23410
|
+
if (this.parent.ids.indexOf(data.ganttProperties.rowUniqueID) !== -1) {
|
|
23411
|
+
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23389
23412
|
}
|
|
23390
|
-
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23391
23413
|
}
|
|
23392
23414
|
else {
|
|
23393
23415
|
const resourceParent = this.parent.flatData.filter((data) => {
|
|
23394
|
-
return (
|
|
23416
|
+
return (data.ganttProperties.taskId === selectedRecords[i].ganttProperties.taskId &&
|
|
23395
23417
|
data.hasChildRecords);
|
|
23396
23418
|
})[0];
|
|
23397
23419
|
deleteRecords.push(resourceParent);
|
|
@@ -23846,7 +23868,26 @@ class Edit$2 {
|
|
|
23846
23868
|
return !data.hasChildRecords;
|
|
23847
23869
|
});
|
|
23848
23870
|
for (let i = 0; i < updateUnAssignedResources.length; i++) {
|
|
23849
|
-
this.
|
|
23871
|
+
const unassignedTask = this.parent.flatData.filter((data) => {
|
|
23872
|
+
return data.ganttProperties.taskName === this.parent.localeObj.getConstant('unassignedTask');
|
|
23873
|
+
})[0];
|
|
23874
|
+
const isDuplicate = unassignedTask.childRecords.filter((data) => {
|
|
23875
|
+
return data.ganttProperties.taskId === updateUnAssignedResources[i].ganttProperties.taskId;
|
|
23876
|
+
});
|
|
23877
|
+
const parentTask = this.parent.getParentTask(updateUnAssignedResources[i].parentItem);
|
|
23878
|
+
if (parentTask && parentTask.ganttProperties.taskName !==
|
|
23879
|
+
this.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
|
|
23880
|
+
this.checkWithUnassignedTask(updateUnAssignedResources[i]);
|
|
23881
|
+
if (parentTask) {
|
|
23882
|
+
this.parent.dataOperation.updateParentItems(updateUnAssignedResources[i].parentItem);
|
|
23883
|
+
}
|
|
23884
|
+
}
|
|
23885
|
+
else if (!parentTask && isDuplicate.length === 0) {
|
|
23886
|
+
this.checkWithUnassignedTask(updateUnAssignedResources[i]);
|
|
23887
|
+
if (updateUnAssignedResources[i].parentItem) {
|
|
23888
|
+
this.parent.dataOperation.updateParentItems(updateUnAssignedResources[i].parentItem);
|
|
23889
|
+
}
|
|
23890
|
+
}
|
|
23850
23891
|
}
|
|
23851
23892
|
}
|
|
23852
23893
|
this.parent.trigger('actionComplete', eventArgs);
|