@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
|
@@ -4475,6 +4475,9 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4475
4475
|
this.parent.notify('chartMouseDown', e);
|
|
4476
4476
|
this.parent.element.tabIndex = 0;
|
|
4477
4477
|
}
|
|
4478
|
+
if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
|
|
4479
|
+
this.parent.treeGrid.endEdit();
|
|
4480
|
+
}
|
|
4478
4481
|
};
|
|
4479
4482
|
GanttChart.prototype.ganttChartMouseClick = function (e) {
|
|
4480
4483
|
if (this.parent.autoFocusTasks) {
|
|
@@ -4532,6 +4535,9 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4532
4535
|
* @private
|
|
4533
4536
|
*/
|
|
4534
4537
|
GanttChart.prototype.mouseUp = function (e) {
|
|
4538
|
+
if (!isNullOrUndefined(this.parent.editModule) && !isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
|
|
4539
|
+
this.parent.editModule.taskbarEditModule.removeFalseLine(false);
|
|
4540
|
+
}
|
|
4535
4541
|
if (this.parent.allowRowDragAndDrop) {
|
|
4536
4542
|
var ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
|
|
4537
4543
|
if (ganttDragElemet) {
|
|
@@ -6807,9 +6813,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6807
6813
|
var validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
|
|
6808
6814
|
var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
6809
6815
|
var isChanged = void 0;
|
|
6810
|
-
if (!isNullOrUndefined(maxStartLeft) && (minStartDate < this.timelineStartDate) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
6816
|
+
if (!isNullOrUndefined(maxStartLeft) && ((minStartDate < this.timelineStartDate) || (!isNullOrUndefined(this.parent.editModule.taskbarEditModule)) && (!isNullOrUndefined(this.parent.editModule.taskbarEditModule.taskBarEditAction))) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
6811
6817
|
isChanged = 'prevTimeSpan';
|
|
6812
|
-
minStartDate = this.timelineStartDate;
|
|
6818
|
+
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
6813
6819
|
}
|
|
6814
6820
|
else {
|
|
6815
6821
|
minStartDate = this.timelineStartDate;
|
|
@@ -7547,7 +7553,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7547
7553
|
break;
|
|
7548
7554
|
}
|
|
7549
7555
|
}
|
|
7550
|
-
if (typeof (taskIDName) === "string") {
|
|
7556
|
+
if (typeof (taskIDName) === "string" || isNullOrUndefined(taskIDName)) {
|
|
7551
7557
|
if (this.parent.viewType === 'ResourceView') {
|
|
7552
7558
|
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7553
7559
|
}
|
|
@@ -11073,6 +11079,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11073
11079
|
this.parent.dataOperation.updateParentItems(record, true);
|
|
11074
11080
|
}
|
|
11075
11081
|
}
|
|
11082
|
+
else if (record && record.hasChildRecords && !ganttProp) {
|
|
11083
|
+
this.parent.editModule['updateChildItems'](record);
|
|
11084
|
+
}
|
|
11076
11085
|
}
|
|
11077
11086
|
};
|
|
11078
11087
|
/**
|
|
@@ -12773,7 +12782,6 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12773
12782
|
if (ganttObj.selectedRowIndex === ganttObj.flatData.indexOf(currentSelectingRecord)) {
|
|
12774
12783
|
return;
|
|
12775
12784
|
}
|
|
12776
|
-
ganttObj.selectionModule.selectRow(ganttObj.flatData.indexOf(currentSelectingRecord), false, true);
|
|
12777
12785
|
}
|
|
12778
12786
|
break;
|
|
12779
12787
|
case 'downArrow':
|
|
@@ -18732,14 +18740,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18732
18740
|
new Date(nextSegment.startDate.getTime()) : this.parent.cloneProjectEndDate;
|
|
18733
18741
|
var eDate = !isNullOrUndefined(previousSegment) ?
|
|
18734
18742
|
new Date(previousSegment.endDate.getTime()) : this.parent.cloneProjectStartDate;
|
|
18735
|
-
sDate.setHours(0, 0, 0, 0);
|
|
18736
|
-
eDate.setHours(0, 0, 0, 0);
|
|
18737
18743
|
var cStartDate = new Date(segment.startDate.getTime());
|
|
18738
18744
|
var cEndDate = new Date(segment.endDate.getTime());
|
|
18739
|
-
|
|
18740
|
-
|
|
18741
|
-
|
|
18742
|
-
|
|
18745
|
+
if (this.parent.timelineModule.topTier === 'Day' && this.parent.timelineModule.bottomTier === 'Hour') {
|
|
18746
|
+
cStartDate.setHours(cStartDate.getHours() - 1);
|
|
18747
|
+
cEndDate.setHours(cEndDate.getHours() + 1);
|
|
18748
|
+
}
|
|
18749
|
+
else {
|
|
18750
|
+
sDate.setHours(0, 0, 0, 0);
|
|
18751
|
+
eDate.setHours(0, 0, 0, 0);
|
|
18752
|
+
cStartDate.setDate(cStartDate.getDate() - 1);
|
|
18753
|
+
cEndDate.setDate(cEndDate.getDate() + 1);
|
|
18754
|
+
cStartDate.setHours(0, 0, 0, 0);
|
|
18755
|
+
cEndDate.setHours(0, 0, 0, 0);
|
|
18756
|
+
}
|
|
18743
18757
|
if (cStartDate.getTime() <= eDate.getTime() && !isNullOrUndefined(previousSegment) && !isNullOrUndefined(segment)) {
|
|
18744
18758
|
var segmentIndexes = [
|
|
18745
18759
|
{ 'firstSegmentIndex': previousSegment.segmentIndex, 'secondSegmentIndex': segment.segmentIndex }
|
|
@@ -20872,7 +20886,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20872
20886
|
inputElement = this.createInputElement('', ganttId + '' + column.field, column.field);
|
|
20873
20887
|
divElement.appendChild(inputElement);
|
|
20874
20888
|
}
|
|
20875
|
-
inputModel.enabled = !this.isCheckIsDisabled(column);
|
|
20889
|
+
inputModel.enabled = !isNullOrUndefined(inputModel.enabled) ? inputModel.enabled : !this.isCheckIsDisabled(column);
|
|
20876
20890
|
if (column.field === this.parent.taskFields.duration) {
|
|
20877
20891
|
if (!isNullOrUndefined(column.valueAccessor)) {
|
|
20878
20892
|
if (typeof column.valueAccessor === 'string') {
|
|
@@ -23076,6 +23090,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23076
23090
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
23077
23091
|
}
|
|
23078
23092
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
23093
|
+
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
23079
23094
|
}
|
|
23080
23095
|
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
23081
23096
|
(args.action === "DrawConnectorLine" || args.action === "CellEditing" || args.action === "DialogEditing")) {
|
|
@@ -23298,7 +23313,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23298
23313
|
previousStartDate = new Date(ganttRecord.ganttProperties.startDate.getTime());
|
|
23299
23314
|
}
|
|
23300
23315
|
else {
|
|
23301
|
-
|
|
23316
|
+
if (!isNullOrUndefined(previousData.ganttProperties.startDate)) {
|
|
23317
|
+
previousStartDate = new Date(previousData.ganttProperties.startDate.getTime());
|
|
23318
|
+
}
|
|
23302
23319
|
}
|
|
23303
23320
|
var currentStartDate = ganttRecord.ganttProperties.startDate;
|
|
23304
23321
|
var childRecords = [];
|
|
@@ -23311,7 +23328,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23311
23328
|
if (childRecords.length === 0) {
|
|
23312
23329
|
return;
|
|
23313
23330
|
}
|
|
23314
|
-
if (previousStartDate.getTime() > currentStartDate.getTime()) {
|
|
23331
|
+
if (!isNullOrUndefined(previousStartDate) && !isNullOrUndefined(currentStartDate) && previousStartDate.getTime() > currentStartDate.getTime()) {
|
|
23315
23332
|
validStartDate = this.parent.dateValidationModule.checkStartDate(currentStartDate);
|
|
23316
23333
|
validEndDate = this.parent.dateValidationModule.checkEndDate(previousStartDate, ganttRecord.ganttProperties);
|
|
23317
23334
|
isRightMove = false;
|
|
@@ -23322,7 +23339,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23322
23339
|
isRightMove = true;
|
|
23323
23340
|
}
|
|
23324
23341
|
//Get Duration
|
|
23325
|
-
if (validStartDate.getTime() >= validEndDate.getTime()) {
|
|
23342
|
+
if (!isNullOrUndefined(validStartDate) && !isNullOrUndefined(validEndDate) && validStartDate.getTime() >= validEndDate.getTime()) {
|
|
23326
23343
|
durationDiff = 0;
|
|
23327
23344
|
}
|
|
23328
23345
|
else {
|
|
@@ -23610,6 +23627,12 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23610
23627
|
}
|
|
23611
23628
|
if (!isNullOrUndefined(unassignedTasks)) {
|
|
23612
23629
|
this.addNewRecord(updateRecord, unassignedTasks);
|
|
23630
|
+
var updatedData = this.parent.currentViewData.filter(function (data) {
|
|
23631
|
+
return (data.ganttProperties.taskId === updateRecord.ganttProperties.taskId &&
|
|
23632
|
+
(data.hasChildRecords === updateRecord.hasChildRecords));
|
|
23633
|
+
})[0];
|
|
23634
|
+
updateRecord.parentItem = updatedData.parentItem;
|
|
23635
|
+
updateRecord.parentUniqueID = updatedData.parentUniqueID;
|
|
23613
23636
|
}
|
|
23614
23637
|
else {
|
|
23615
23638
|
// Block for create the unassigned task.
|
|
@@ -23885,13 +23908,17 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23885
23908
|
var data = selectedRecords[i];
|
|
23886
23909
|
var ids = data.ganttProperties.sharedTaskUniqueIds;
|
|
23887
23910
|
for (var j = 0; j < ids.length; j++) {
|
|
23888
|
-
|
|
23911
|
+
if (this_1.parent.ids.indexOf(ids[j].toString()) !== -1) {
|
|
23912
|
+
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
|
|
23913
|
+
}
|
|
23914
|
+
}
|
|
23915
|
+
if (this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID) !== -1) {
|
|
23916
|
+
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23889
23917
|
}
|
|
23890
|
-
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23891
23918
|
}
|
|
23892
23919
|
else {
|
|
23893
23920
|
var resourceParent = this_1.parent.flatData.filter(function (data) {
|
|
23894
|
-
return (
|
|
23921
|
+
return (data.ganttProperties.taskId === selectedRecords[i].ganttProperties.taskId &&
|
|
23895
23922
|
data.hasChildRecords);
|
|
23896
23923
|
})[0];
|
|
23897
23924
|
deleteRecords.push(resourceParent);
|
|
@@ -24276,6 +24303,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24276
24303
|
});
|
|
24277
24304
|
};
|
|
24278
24305
|
Edit$$1.prototype.deleteSuccess = function (args) {
|
|
24306
|
+
var _this = this;
|
|
24279
24307
|
var flatData = this.parent.flatData;
|
|
24280
24308
|
var currentData = this.parent.currentViewData;
|
|
24281
24309
|
var deletedRecords = this.parent.getRecordFromFlatdata(args.deletedRecordCollection);
|
|
@@ -24347,11 +24375,34 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24347
24375
|
setValue('action', args.action, eventArgs);
|
|
24348
24376
|
this.parent.isOnDelete = false;
|
|
24349
24377
|
if (this.parent.viewType === 'ResourceView') {
|
|
24350
|
-
var
|
|
24378
|
+
var updateUnAssignedResources_1 = eventArgs.data.filter(function (data) {
|
|
24351
24379
|
return !data.hasChildRecords;
|
|
24352
24380
|
});
|
|
24353
|
-
|
|
24354
|
-
|
|
24381
|
+
var _loop_2 = function (i) {
|
|
24382
|
+
var unassignedTask = this_2.parent.flatData.filter(function (data) {
|
|
24383
|
+
return data.ganttProperties.taskName === _this.parent.localeObj.getConstant('unassignedTask');
|
|
24384
|
+
})[0];
|
|
24385
|
+
var isDuplicate = unassignedTask.childRecords.filter(function (data) {
|
|
24386
|
+
return data.ganttProperties.taskId === updateUnAssignedResources_1[i].ganttProperties.taskId;
|
|
24387
|
+
});
|
|
24388
|
+
var parentTask = this_2.parent.getParentTask(updateUnAssignedResources_1[i].parentItem);
|
|
24389
|
+
if (parentTask && parentTask.ganttProperties.taskName !==
|
|
24390
|
+
this_2.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
|
|
24391
|
+
this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
|
|
24392
|
+
if (parentTask) {
|
|
24393
|
+
this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
|
|
24394
|
+
}
|
|
24395
|
+
}
|
|
24396
|
+
else if (!parentTask && isDuplicate.length === 0) {
|
|
24397
|
+
this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
|
|
24398
|
+
if (updateUnAssignedResources_1[i].parentItem) {
|
|
24399
|
+
this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
|
|
24400
|
+
}
|
|
24401
|
+
}
|
|
24402
|
+
};
|
|
24403
|
+
var this_2 = this;
|
|
24404
|
+
for (var i = 0; i < updateUnAssignedResources_1.length; i++) {
|
|
24405
|
+
_loop_2(i);
|
|
24355
24406
|
}
|
|
24356
24407
|
}
|
|
24357
24408
|
this.parent.trigger('actionComplete', eventArgs);
|
|
@@ -24808,27 +24859,27 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24808
24859
|
}
|
|
24809
24860
|
}
|
|
24810
24861
|
}
|
|
24811
|
-
var
|
|
24812
|
-
var originalData =
|
|
24813
|
-
var treeIndex =
|
|
24814
|
-
var uniqueTaskID =
|
|
24815
|
-
originalIndex =
|
|
24862
|
+
var _loop_3 = function (i) {
|
|
24863
|
+
var originalData = this_3.parent.modifiedRecords[i];
|
|
24864
|
+
var treeIndex = this_3.parent.allowRowDragAndDrop ? 1 : 0;
|
|
24865
|
+
var uniqueTaskID = this_3.parent.taskFields.id;
|
|
24866
|
+
originalIndex = this_3.parent.currentViewData.findIndex(function (data) {
|
|
24816
24867
|
return (data[uniqueTaskID] == originalData[uniqueTaskID]);
|
|
24817
24868
|
});
|
|
24818
|
-
if (
|
|
24819
|
-
|
|
24820
|
-
data: originalData, cell:
|
|
24821
|
-
column:
|
|
24869
|
+
if (this_3.parent.treeGrid.getRows()[originalIndex]) {
|
|
24870
|
+
this_3.parent.treeGrid.renderModule.cellRender({
|
|
24871
|
+
data: originalData, cell: this_3.parent.treeGrid.getRows()[originalIndex].cells[this_3.parent.treeColumnIndex + treeIndex],
|
|
24872
|
+
column: this_3.parent.treeGrid.grid.getColumns()[this_3.parent.treeColumnIndex],
|
|
24822
24873
|
requestType: 'rowDragAndDrop'
|
|
24823
24874
|
});
|
|
24824
|
-
|
|
24825
|
-
data: originalData, row:
|
|
24875
|
+
this_3.parent.treeGrid.renderModule.RowModifier({
|
|
24876
|
+
data: originalData, row: this_3.parent.treeGrid.getRows()[originalIndex], rowHeight: this_3.parent.rowHeight
|
|
24826
24877
|
});
|
|
24827
24878
|
}
|
|
24828
24879
|
};
|
|
24829
|
-
var
|
|
24880
|
+
var this_3 = this, originalIndex;
|
|
24830
24881
|
for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
|
|
24831
|
-
|
|
24882
|
+
_loop_3(i);
|
|
24832
24883
|
}
|
|
24833
24884
|
};
|
|
24834
24885
|
/**
|