@syncfusion/ej2-gantt 20.3.58 → 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 +23 -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 +64 -18
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +84 -33
- 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/dependency.js +3 -0
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +59 -22
- package/src/gantt/actions/keyboard.js +0 -1
- package/src/gantt/actions/taskbar-edit.js +12 -6
- package/src/gantt/base/gantt-chart.js +6 -0
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/renderer/timeline.js +2 -2
- package/styles/bootstrap-dark.css +3 -2
- package/styles/bootstrap.css +3 -2
- package/styles/bootstrap4.css +3 -2
- package/styles/bootstrap5-dark.css +3 -2
- package/styles/bootstrap5.css +3 -2
- package/styles/fabric-dark.css +3 -2
- package/styles/fabric.css +3 -2
- package/styles/fluent-dark.css +3 -2
- package/styles/fluent.css +3 -2
- package/styles/gantt/_layout.scss +3 -2
- package/styles/gantt/bootstrap-dark.css +3 -2
- package/styles/gantt/bootstrap.css +3 -2
- package/styles/gantt/bootstrap4.css +3 -2
- package/styles/gantt/bootstrap5-dark.css +3 -2
- package/styles/gantt/bootstrap5.css +3 -2
- package/styles/gantt/fabric-dark.css +3 -2
- package/styles/gantt/fabric.css +3 -2
- package/styles/gantt/fluent-dark.css +3 -2
- package/styles/gantt/fluent.css +3 -2
- package/styles/gantt/highcontrast-light.css +3 -2
- package/styles/gantt/highcontrast.css +3 -2
- package/styles/gantt/material-dark.css +3 -2
- package/styles/gantt/material.css +3 -2
- package/styles/gantt/tailwind-dark.css +3 -2
- package/styles/gantt/tailwind.css +3 -2
- package/styles/highcontrast-light.css +3 -2
- package/styles/highcontrast.css +3 -2
- package/styles/material-dark.css +3 -2
- package/styles/material.css +3 -2
- package/styles/tailwind-dark.css +3 -2
- package/styles/tailwind.css +3 -2
|
@@ -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) {
|
|
@@ -4488,6 +4491,9 @@ class GanttChart {
|
|
|
4488
4491
|
* @private
|
|
4489
4492
|
*/
|
|
4490
4493
|
mouseUp(e) {
|
|
4494
|
+
if (!isNullOrUndefined(this.parent.editModule) && !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
|
|
4495
|
+
this.parent.editModule.taskbarEditModule.removeFalseLine(false);
|
|
4496
|
+
}
|
|
4491
4497
|
if (this.parent.allowRowDragAndDrop) {
|
|
4492
4498
|
const ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
|
|
4493
4499
|
if (ganttDragElemet) {
|
|
@@ -6741,9 +6747,9 @@ class Timeline {
|
|
|
6741
6747
|
const validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
|
|
6742
6748
|
const validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
6743
6749
|
let isChanged;
|
|
6744
|
-
if (!isNullOrUndefined(maxStartLeft) && (minStartDate < this.timelineStartDate) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
6750
|
+
if (!isNullOrUndefined(maxStartLeft) && ((minStartDate < this.timelineStartDate) || (!isNullOrUndefined(this.parent.editModule.taskbarEditModule)) && (!isNullOrUndefined(this.parent.editModule.taskbarEditModule.taskBarEditAction))) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
6745
6751
|
isChanged = 'prevTimeSpan';
|
|
6746
|
-
minStartDate = this.timelineStartDate;
|
|
6752
|
+
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
6747
6753
|
}
|
|
6748
6754
|
else {
|
|
6749
6755
|
minStartDate = this.timelineStartDate;
|
|
@@ -7474,7 +7480,7 @@ class GanttTreeGrid {
|
|
|
7474
7480
|
break;
|
|
7475
7481
|
}
|
|
7476
7482
|
}
|
|
7477
|
-
if (typeof (taskIDName) === "string") {
|
|
7483
|
+
if (typeof (taskIDName) === "string" || isNullOrUndefined(taskIDName)) {
|
|
7478
7484
|
if (this.parent.viewType === 'ResourceView') {
|
|
7479
7485
|
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7480
7486
|
}
|
|
@@ -10681,6 +10687,9 @@ class Dependency {
|
|
|
10681
10687
|
this.parent.dataOperation.updateParentItems(record, true);
|
|
10682
10688
|
}
|
|
10683
10689
|
}
|
|
10690
|
+
else if (record && record.hasChildRecords && !ganttProp) {
|
|
10691
|
+
this.parent.editModule['updateChildItems'](record);
|
|
10692
|
+
}
|
|
10684
10693
|
}
|
|
10685
10694
|
}
|
|
10686
10695
|
/**
|
|
@@ -12375,7 +12384,6 @@ class FocusModule {
|
|
|
12375
12384
|
if (ganttObj.selectedRowIndex === ganttObj.flatData.indexOf(currentSelectingRecord)) {
|
|
12376
12385
|
return;
|
|
12377
12386
|
}
|
|
12378
|
-
ganttObj.selectionModule.selectRow(ganttObj.flatData.indexOf(currentSelectingRecord), false, true);
|
|
12379
12387
|
}
|
|
12380
12388
|
break;
|
|
12381
12389
|
case 'downArrow':
|
|
@@ -18277,14 +18285,20 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18277
18285
|
new Date(nextSegment.startDate.getTime()) : this.parent.cloneProjectEndDate;
|
|
18278
18286
|
const eDate = !isNullOrUndefined(previousSegment) ?
|
|
18279
18287
|
new Date(previousSegment.endDate.getTime()) : this.parent.cloneProjectStartDate;
|
|
18280
|
-
sDate.setHours(0, 0, 0, 0);
|
|
18281
|
-
eDate.setHours(0, 0, 0, 0);
|
|
18282
18288
|
const cStartDate = new Date(segment.startDate.getTime());
|
|
18283
18289
|
const cEndDate = new Date(segment.endDate.getTime());
|
|
18284
|
-
|
|
18285
|
-
|
|
18286
|
-
|
|
18287
|
-
|
|
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
|
+
}
|
|
18288
18302
|
if (cStartDate.getTime() <= eDate.getTime() && !isNullOrUndefined(previousSegment) && !isNullOrUndefined(segment)) {
|
|
18289
18303
|
const segmentIndexes = [
|
|
18290
18304
|
{ 'firstSegmentIndex': previousSegment.segmentIndex, 'secondSegmentIndex': segment.segmentIndex }
|
|
@@ -20398,7 +20412,7 @@ class DialogEdit {
|
|
|
20398
20412
|
inputElement = this.createInputElement('', ganttId + '' + column.field, column.field);
|
|
20399
20413
|
divElement.appendChild(inputElement);
|
|
20400
20414
|
}
|
|
20401
|
-
inputModel.enabled = !this.isCheckIsDisabled(column);
|
|
20415
|
+
inputModel.enabled = !isNullOrUndefined(inputModel.enabled) ? inputModel.enabled : !this.isCheckIsDisabled(column);
|
|
20402
20416
|
if (column.field === this.parent.taskFields.duration) {
|
|
20403
20417
|
if (!isNullOrUndefined(column.valueAccessor)) {
|
|
20404
20418
|
if (typeof column.valueAccessor === 'string') {
|
|
@@ -22572,6 +22586,7 @@ class Edit$2 {
|
|
|
22572
22586
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
22573
22587
|
}
|
|
22574
22588
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
22589
|
+
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
22575
22590
|
}
|
|
22576
22591
|
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
22577
22592
|
(args.action === "DrawConnectorLine" || args.action === "CellEditing" || args.action === "DialogEditing")) {
|
|
@@ -22794,7 +22809,9 @@ class Edit$2 {
|
|
|
22794
22809
|
previousStartDate = new Date(ganttRecord.ganttProperties.startDate.getTime());
|
|
22795
22810
|
}
|
|
22796
22811
|
else {
|
|
22797
|
-
|
|
22812
|
+
if (!isNullOrUndefined(previousData.ganttProperties.startDate)) {
|
|
22813
|
+
previousStartDate = new Date(previousData.ganttProperties.startDate.getTime());
|
|
22814
|
+
}
|
|
22798
22815
|
}
|
|
22799
22816
|
const currentStartDate = ganttRecord.ganttProperties.startDate;
|
|
22800
22817
|
const childRecords = [];
|
|
@@ -22807,7 +22824,7 @@ class Edit$2 {
|
|
|
22807
22824
|
if (childRecords.length === 0) {
|
|
22808
22825
|
return;
|
|
22809
22826
|
}
|
|
22810
|
-
if (previousStartDate.getTime() > currentStartDate.getTime()) {
|
|
22827
|
+
if (!isNullOrUndefined(previousStartDate) && !isNullOrUndefined(currentStartDate) && previousStartDate.getTime() > currentStartDate.getTime()) {
|
|
22811
22828
|
validStartDate = this.parent.dateValidationModule.checkStartDate(currentStartDate);
|
|
22812
22829
|
validEndDate = this.parent.dateValidationModule.checkEndDate(previousStartDate, ganttRecord.ganttProperties);
|
|
22813
22830
|
isRightMove = false;
|
|
@@ -22818,7 +22835,7 @@ class Edit$2 {
|
|
|
22818
22835
|
isRightMove = true;
|
|
22819
22836
|
}
|
|
22820
22837
|
//Get Duration
|
|
22821
|
-
if (validStartDate.getTime() >= validEndDate.getTime()) {
|
|
22838
|
+
if (!isNullOrUndefined(validStartDate) && !isNullOrUndefined(validEndDate) && validStartDate.getTime() >= validEndDate.getTime()) {
|
|
22822
22839
|
durationDiff = 0;
|
|
22823
22840
|
}
|
|
22824
22841
|
else {
|
|
@@ -23105,6 +23122,12 @@ class Edit$2 {
|
|
|
23105
23122
|
}
|
|
23106
23123
|
if (!isNullOrUndefined(unassignedTasks)) {
|
|
23107
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;
|
|
23108
23131
|
}
|
|
23109
23132
|
else {
|
|
23110
23133
|
// Block for create the unassigned task.
|
|
@@ -23380,13 +23403,17 @@ class Edit$2 {
|
|
|
23380
23403
|
const data = selectedRecords[i];
|
|
23381
23404
|
const ids = data.ganttProperties.sharedTaskUniqueIds;
|
|
23382
23405
|
for (let j = 0; j < ids.length; j++) {
|
|
23383
|
-
|
|
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)]);
|
|
23384
23412
|
}
|
|
23385
|
-
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23386
23413
|
}
|
|
23387
23414
|
else {
|
|
23388
23415
|
const resourceParent = this.parent.flatData.filter((data) => {
|
|
23389
|
-
return (
|
|
23416
|
+
return (data.ganttProperties.taskId === selectedRecords[i].ganttProperties.taskId &&
|
|
23390
23417
|
data.hasChildRecords);
|
|
23391
23418
|
})[0];
|
|
23392
23419
|
deleteRecords.push(resourceParent);
|
|
@@ -23841,7 +23868,26 @@ class Edit$2 {
|
|
|
23841
23868
|
return !data.hasChildRecords;
|
|
23842
23869
|
});
|
|
23843
23870
|
for (let i = 0; i < updateUnAssignedResources.length; i++) {
|
|
23844
|
-
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
|
+
}
|
|
23845
23891
|
}
|
|
23846
23892
|
}
|
|
23847
23893
|
this.parent.trigger('actionComplete', eventArgs);
|