@syncfusion/ej2-gantt 23.2.5 → 24.1.41
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 +3 -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 +2980 -336
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +3034 -370
- 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 +21 -21
- package/src/gantt/actions/cell-edit.js +7 -3
- package/src/gantt/actions/chart-scroll.d.ts +9 -1
- package/src/gantt/actions/chart-scroll.js +111 -3
- package/src/gantt/actions/connector-line-edit.js +8 -1
- package/src/gantt/actions/context-menu.js +2 -2
- package/src/gantt/actions/day-markers.d.ts +2 -1
- package/src/gantt/actions/dependency.js +2 -2
- package/src/gantt/actions/dialog-edit.d.ts +24 -0
- package/src/gantt/actions/dialog-edit.js +383 -1
- package/src/gantt/actions/edit.js +104 -41
- package/src/gantt/actions/keyboard.js +5 -1
- package/src/gantt/actions/pdf-export.js +12 -4
- package/src/gantt/actions/rowdragdrop.js +24 -5
- package/src/gantt/actions/selection.js +6 -3
- package/src/gantt/actions/taskbar-edit.d.ts +14 -0
- package/src/gantt/actions/taskbar-edit.js +513 -78
- package/src/gantt/actions/toolbar.js +4 -1
- package/src/gantt/base/css-constants.d.ts +2 -0
- package/src/gantt/base/css-constants.js +2 -0
- package/src/gantt/base/enum.d.ts +22 -0
- package/src/gantt/base/gantt-chart.js +63 -21
- package/src/gantt/base/gantt-model.d.ts +9 -1
- package/src/gantt/base/gantt.d.ts +11 -1
- package/src/gantt/base/gantt.js +46 -18
- package/src/gantt/base/interface.d.ts +135 -3
- package/src/gantt/base/splitter.js +6 -0
- package/src/gantt/base/task-processor.d.ts +1 -1
- package/src/gantt/base/task-processor.js +37 -9
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/export/export-helper.d.ts +12 -0
- package/src/gantt/export/export-helper.js +316 -9
- package/src/gantt/export/pdf-base/pdf-grid-table.js +14 -1
- package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +36 -0
- package/src/gantt/export/pdf-connector-line.js +137 -32
- package/src/gantt/export/pdf-event-marker.d.ts +10 -0
- package/src/gantt/export/pdf-event-marker.js +57 -0
- package/src/gantt/export/pdf-gantt.d.ts +2 -0
- package/src/gantt/export/pdf-gantt.js +30 -10
- package/src/gantt/export/pdf-taskbar.d.ts +23 -2
- package/src/gantt/export/pdf-taskbar.js +771 -43
- package/src/gantt/export/pdf-timeline.d.ts +9 -0
- package/src/gantt/export/pdf-timeline.js +98 -20
- package/src/gantt/models/column.d.ts +12 -0
- package/src/gantt/renderer/chart-rows.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.js +29 -16
- package/src/gantt/renderer/connector-line.js +8 -5
- package/src/gantt/renderer/edit-tooltip.js +3 -0
- package/src/gantt/renderer/event-marker.js +4 -1
- package/src/gantt/renderer/nonworking-day.js +18 -5
- package/src/gantt/renderer/timeline.d.ts +9 -0
- package/src/gantt/renderer/timeline.js +169 -21
- package/styles/bootstrap-dark.css +77 -16
- package/styles/bootstrap.css +78 -17
- package/styles/bootstrap4.css +78 -17
- package/styles/bootstrap5-dark.css +78 -17
- package/styles/bootstrap5.css +78 -17
- package/styles/fabric-dark.css +78 -17
- package/styles/fabric.css +78 -17
- package/styles/fluent-dark.css +78 -17
- package/styles/fluent.css +78 -17
- package/styles/gantt/_bootstrap-dark-definition.scss +7 -2
- package/styles/gantt/_bootstrap-definition.scss +7 -2
- package/styles/gantt/_bootstrap4-definition.scss +7 -2
- package/styles/gantt/_bootstrap5-definition.scss +7 -2
- package/styles/gantt/_fabric-dark-definition.scss +7 -2
- package/styles/gantt/_fabric-definition.scss +7 -2
- package/styles/gantt/_fluent-definition.scss +7 -2
- package/styles/gantt/_fusionnew-definition.scss +6 -2
- package/styles/gantt/_highcontrast-definition.scss +7 -2
- package/styles/gantt/_highcontrast-light-definition.scss +7 -2
- package/styles/gantt/_layout.scss +92 -20
- package/styles/gantt/_material-dark-definition.scss +7 -2
- package/styles/gantt/_material-definition.scss +7 -2
- package/styles/gantt/_material3-definition.scss +7 -2
- package/styles/gantt/_tailwind-definition.scss +6 -1
- package/styles/gantt/_theme.scss +11 -0
- package/styles/gantt/bootstrap-dark.css +77 -16
- package/styles/gantt/bootstrap.css +78 -17
- package/styles/gantt/bootstrap4.css +78 -17
- package/styles/gantt/bootstrap5-dark.css +78 -17
- package/styles/gantt/bootstrap5.css +78 -17
- package/styles/gantt/fabric-dark.css +78 -17
- package/styles/gantt/fabric.css +78 -17
- package/styles/gantt/fluent-dark.css +78 -17
- package/styles/gantt/fluent.css +78 -17
- package/styles/gantt/highcontrast-light.css +78 -17
- package/styles/gantt/highcontrast.css +78 -17
- package/styles/gantt/material-dark.css +78 -17
- package/styles/gantt/material.css +78 -17
- package/styles/gantt/material3-dark.css +77 -16
- package/styles/gantt/material3.css +77 -16
- package/styles/gantt/tailwind-dark.css +78 -17
- package/styles/gantt/tailwind.css +78 -17
- package/styles/highcontrast-light.css +78 -17
- package/styles/highcontrast.css +78 -17
- package/styles/material-dark.css +78 -17
- package/styles/material.css +78 -17
- package/styles/material3-dark.css +77 -16
- package/styles/material3.css +77 -16
- package/styles/tailwind-dark.css +78 -17
- package/styles/tailwind.css +78 -17
|
@@ -913,9 +913,12 @@ var Edit = /** @class */ (function () {
|
|
|
913
913
|
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
914
914
|
}
|
|
915
915
|
var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
|
|
916
|
-
if (!parentData
|
|
917
|
-
|
|
918
|
-
|
|
916
|
+
if (!isNullOrUndefined(parentData)) {
|
|
917
|
+
if (!parentData.ganttProperties.predecessorsName) {
|
|
918
|
+
this.parent.predecessorModule.validatePredecessor(parentData, [], '');
|
|
919
|
+
this.updateParentItemOnEditing();
|
|
920
|
+
this.parent.ganttChartModule.reRenderConnectorLines();
|
|
921
|
+
}
|
|
919
922
|
}
|
|
920
923
|
}
|
|
921
924
|
if (this.parent.UpdateOffsetOnTaskbarEdit && this.parent.connectorLineEditModule && args.data) {
|
|
@@ -1241,12 +1244,18 @@ var Edit = /** @class */ (function () {
|
|
|
1241
1244
|
var ganttObj = this.parent;
|
|
1242
1245
|
var currentBaselineStart = __assign({}, eventArgs.data.ganttProperties.baselineStartDate);
|
|
1243
1246
|
var currentBaselineEnd = __assign({}, eventArgs.data.ganttProperties.baselineEndDate);
|
|
1247
|
+
var currentProgress = eventArgs.data.ganttProperties.progress;
|
|
1244
1248
|
this.parent.trigger('actionBegin', eventArgs, function (eventArg) {
|
|
1245
1249
|
if (currentBaselineStart != eventArg.data["ganttProperties"].baselineStartDate
|
|
1246
1250
|
|| currentBaselineEnd != eventArg.data["ganttProperties"].baselineEndDate) {
|
|
1247
1251
|
ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(eventArg.data['ganttProperties']), eventArg.data['ganttProperties'], true);
|
|
1248
1252
|
ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(eventArg.data['ganttProperties']), eventArg.data['ganttProperties'], true);
|
|
1249
1253
|
}
|
|
1254
|
+
if (!isNullOrUndefined(_this.parent.taskFields.progress) && currentProgress != eventArg.data["ganttProperties"].progress) {
|
|
1255
|
+
var width = eventArg.data['ganttProperties'].isAutoSchedule ? eventArg.data['ganttProperties'].width :
|
|
1256
|
+
eventArg.data['ganttProperties'].autoWidth;
|
|
1257
|
+
_this.parent.setRecordValue('progressWidth', _this.parent.dataOperation.getProgressWidth(width, eventArg.data['ganttProperties'].progress), eventArg.data['ganttProperties'], true);
|
|
1258
|
+
}
|
|
1250
1259
|
if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
1251
1260
|
_this.parent.showMaskRow();
|
|
1252
1261
|
}
|
|
@@ -1422,9 +1431,10 @@ var Edit = /** @class */ (function () {
|
|
|
1422
1431
|
}
|
|
1423
1432
|
}
|
|
1424
1433
|
if (this.parent.isConnectorLineUpdate && !isNullOrUndefined(this.parent.connectorLineEditModule)) {
|
|
1425
|
-
|
|
1426
|
-
|
|
1434
|
+
this.parent.updatedConnectorLineCollection = [];
|
|
1435
|
+
this.parent.connectorLineIds = [];
|
|
1427
1436
|
this.parent.connectorLineEditModule.refreshEditedRecordConnectorLine(this.parent.editedRecords);
|
|
1437
|
+
this.parent.ganttChartModule.reRenderConnectorLines();
|
|
1428
1438
|
this.updateScheduleDatesOnEditing(args);
|
|
1429
1439
|
}
|
|
1430
1440
|
}
|
|
@@ -1447,6 +1457,9 @@ var Edit = /** @class */ (function () {
|
|
|
1447
1457
|
}
|
|
1448
1458
|
this.endEditAction(args);
|
|
1449
1459
|
this.parent.trigger('actionComplete', eventArgs);
|
|
1460
|
+
if (this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule && this.parent.rowDragAndDropModule['draggedRecord']) {
|
|
1461
|
+
this.parent.rowDragAndDropModule['draggedRecord'] = null;
|
|
1462
|
+
}
|
|
1450
1463
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
1451
1464
|
this.parent.hideMaskRow();
|
|
1452
1465
|
}
|
|
@@ -2560,33 +2573,41 @@ var Edit = /** @class */ (function () {
|
|
|
2560
2573
|
var childRecord;
|
|
2561
2574
|
var predecessorIndex;
|
|
2562
2575
|
var updatedPredecessor = [];
|
|
2576
|
+
var validPredecessor;
|
|
2563
2577
|
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
|
-
|
|
2578
|
+
var fromRecord = this.parent.getRecordByID(predecessorCollection[count].from);
|
|
2579
|
+
var toRecord = this.parent.getRecordByID(predecessorCollection[count].to);
|
|
2580
|
+
validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
|
|
2581
|
+
if (!validPredecessor) {
|
|
2582
|
+
if (predecessorCollection[count].to === parentRecordTaskData.rowUniqueID.toString()) {
|
|
2583
|
+
childRecord = this.parent.getRecordByID(predecessorCollection[count].from);
|
|
2584
|
+
predecessorIndex = getIndex(predecessorCollection[count], 'from', childRecord.ganttProperties.predecessor, 'to');
|
|
2585
|
+
// eslint-disable-next-line
|
|
2586
|
+
var predecessorCollections = (extend([], childRecord.ganttProperties.predecessor, [], true));
|
|
2587
|
+
predecessorCollections.splice(predecessorIndex, 1);
|
|
2588
|
+
this.parent.setRecordValue('predecessor', predecessorCollections, childRecord.ganttProperties, true);
|
|
2589
|
+
}
|
|
2590
|
+
else if (predecessorCollection[count].from === parentRecordTaskData.rowUniqueID.toString()) {
|
|
2591
|
+
childRecord = this.parent.getRecordByID(predecessorCollection[count].to);
|
|
2592
|
+
var prdcList = (childRecord.ganttProperties.predecessorsName.toString()).split(',');
|
|
2593
|
+
var str = predecessorCollection[count].from + predecessorCollection[count].type;
|
|
2594
|
+
var ind = prdcList.indexOf(str);
|
|
2595
|
+
prdcList.splice(ind, 1);
|
|
2596
|
+
this.parent.setRecordValue('predecessorsName', prdcList.join(','), childRecord.ganttProperties, true);
|
|
2597
|
+
this.parent.setRecordValue(this.parent.taskFields.dependency, prdcList.join(','), childRecord);
|
|
2598
|
+
predecessorIndex = getIndex(predecessorCollection[count], 'from', childRecord.ganttProperties.predecessor, 'to');
|
|
2599
|
+
// eslint-disable-next-line
|
|
2600
|
+
var temppredecessorCollection = (extend([], childRecord.ganttProperties.predecessor, [], true));
|
|
2601
|
+
temppredecessorCollection.splice(predecessorIndex, 1);
|
|
2602
|
+
this.parent.setRecordValue('predecessor', temppredecessorCollection, childRecord.ganttProperties, true);
|
|
2603
|
+
this.parent.predecessorModule.validatePredecessorDates(childRecord);
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
if (!validPredecessor) {
|
|
2608
|
+
this.parent.setRecordValue('predecessor', updatedPredecessor, parentRecord.ganttProperties, true);
|
|
2609
|
+
this.parent.setRecordValue('predecessorsName', '', parentRecord.ganttProperties, true);
|
|
2587
2610
|
}
|
|
2588
|
-
this.parent.setRecordValue('predecessor', updatedPredecessor, parentRecord.ganttProperties, true);
|
|
2589
|
-
this.parent.setRecordValue('predecessorsName', '', parentRecord.ganttProperties, true);
|
|
2590
2611
|
};
|
|
2591
2612
|
/**
|
|
2592
2613
|
* @param {IPredecessor[]} predecessorCollection .
|
|
@@ -2898,11 +2919,30 @@ var Edit = /** @class */ (function () {
|
|
|
2898
2919
|
}
|
|
2899
2920
|
if (getValue(this.parent.taskFields.id, dataCollection[i]).toString() ===
|
|
2900
2921
|
this.addRowSelectedItem.ganttProperties.rowUniqueID.toString()) {
|
|
2922
|
+
var index = void 0;
|
|
2923
|
+
if (this.parent.rowDragAndDropModule && this.parent.rowDragAndDropModule['droppedRecord'] && this.parent.viewType === 'ResourceView') {
|
|
2924
|
+
for (var i_1 = 0; i_1 < dataCollection.length; i_1++) {
|
|
2925
|
+
if (dataCollection[i_1][this.parent.taskFields.id] == this.parent.rowDragAndDropModule['droppedRecord'].ganttProperties.taskId) {
|
|
2926
|
+
index = i_1;
|
|
2927
|
+
break;
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2901
2931
|
if (rowPosition === 'Above') {
|
|
2902
|
-
|
|
2932
|
+
if (index) {
|
|
2933
|
+
dataCollection.splice(index, 0, record);
|
|
2934
|
+
}
|
|
2935
|
+
else {
|
|
2936
|
+
dataCollection.splice(i, 0, record);
|
|
2937
|
+
}
|
|
2903
2938
|
}
|
|
2904
2939
|
else if (rowPosition === 'Below') {
|
|
2905
|
-
|
|
2940
|
+
if (index) {
|
|
2941
|
+
dataCollection.splice(index + 1, 0, record);
|
|
2942
|
+
}
|
|
2943
|
+
else {
|
|
2944
|
+
dataCollection.splice(i + 1, 0, record);
|
|
2945
|
+
}
|
|
2906
2946
|
}
|
|
2907
2947
|
else if (rowPosition === 'Child') {
|
|
2908
2948
|
if (dataCollection[i][child] && dataCollection[i][child].length > 0) {
|
|
@@ -3104,6 +3144,9 @@ var Edit = /** @class */ (function () {
|
|
|
3104
3144
|
}
|
|
3105
3145
|
_this.updateTreeGridUniqueID(cAddedRecord_1, 'add');
|
|
3106
3146
|
_this.refreshNewlyAddedRecord(args, cAddedRecord_1);
|
|
3147
|
+
if (_this.parent.viewType === 'ResourceView' && _this.parent.taskFields.work) {
|
|
3148
|
+
_this.parent.dataOperation.updateParentItems(ganttData, true);
|
|
3149
|
+
}
|
|
3107
3150
|
_this._resetProperties();
|
|
3108
3151
|
}
|
|
3109
3152
|
}
|
|
@@ -3475,6 +3518,7 @@ var Edit = /** @class */ (function () {
|
|
|
3475
3518
|
}
|
|
3476
3519
|
};
|
|
3477
3520
|
Edit.prototype.reArrangeRows = function (args, isByMethod) {
|
|
3521
|
+
var _this = this;
|
|
3478
3522
|
this.dropPosition = args.dropPosition;
|
|
3479
3523
|
if (args.dropPosition !== 'Invalid' && this.parent.editModule) {
|
|
3480
3524
|
var obj = this.parent;
|
|
@@ -3552,12 +3596,22 @@ var Edit = /** @class */ (function () {
|
|
|
3552
3596
|
this.refreshDataSource();
|
|
3553
3597
|
}
|
|
3554
3598
|
if (this.dropPosition === 'middleSegment') {
|
|
3555
|
-
if (droppedRec.ganttProperties.predecessor) {
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3599
|
+
if (!isNullOrUndefined(droppedRec.ganttProperties.predecessor)) {
|
|
3600
|
+
var len = droppedRec.ganttProperties.predecessor.length;
|
|
3601
|
+
for (var count = 0; count < len; count++) {
|
|
3602
|
+
if (!isNullOrUndefined(droppedRec.ganttProperties.predecessor)) {
|
|
3603
|
+
var fromRecord = this.parent.getRecordByID(droppedRec.ganttProperties.predecessor[count].from);
|
|
3604
|
+
var toRecord = this.parent.getRecordByID(droppedRec.ganttProperties.predecessor[count].to);
|
|
3605
|
+
var validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
|
|
3606
|
+
if (droppedRec.ganttProperties.predecessor && !validPredecessor) {
|
|
3607
|
+
this.parent.editModule.removePredecessorOnDelete(droppedRec);
|
|
3608
|
+
droppedRec.ganttProperties.predecessor = null;
|
|
3609
|
+
droppedRec.ganttProperties.predecessorsName = null;
|
|
3610
|
+
droppedRec[this.parent.taskFields.dependency] = null;
|
|
3611
|
+
droppedRec.taskData[this.parent.taskFields.dependency] = null;
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3561
3615
|
}
|
|
3562
3616
|
if (droppedRec.ganttProperties.isMilestone) {
|
|
3563
3617
|
this.parent.setRecordValue('isMilestone', false, droppedRec.ganttProperties, true);
|
|
@@ -3571,6 +3625,12 @@ var Edit = /** @class */ (function () {
|
|
|
3571
3625
|
for (var k = 0; k < this.updateParentRecords.length; k++) {
|
|
3572
3626
|
this.parent.dataOperation.updateParentItems(this.updateParentRecords[k]);
|
|
3573
3627
|
}
|
|
3628
|
+
this.parent.editedRecords.forEach(function (record) {
|
|
3629
|
+
_this.parent.predecessorModule.validatePredecessor(record, [], '');
|
|
3630
|
+
});
|
|
3631
|
+
for (var k = 0; k < this.updateParentRecords.length; k++) {
|
|
3632
|
+
this.parent.dataOperation.updateParentItems(this.updateParentRecords[k]);
|
|
3633
|
+
}
|
|
3574
3634
|
this.updateParentRecords = [];
|
|
3575
3635
|
this.parent.isOnEdit = false;
|
|
3576
3636
|
}
|
|
@@ -3640,6 +3700,9 @@ var Edit = /** @class */ (function () {
|
|
|
3640
3700
|
else {
|
|
3641
3701
|
this.parent.hideSpinner();
|
|
3642
3702
|
}
|
|
3703
|
+
if (this.parent.rowDragAndDropModule) {
|
|
3704
|
+
this.parent.rowDragAndDropModule['draggedRecord'] = null;
|
|
3705
|
+
}
|
|
3643
3706
|
this.parent.editedRecords = [];
|
|
3644
3707
|
};
|
|
3645
3708
|
Edit.prototype.refreshDataSource = function () {
|
|
@@ -3903,9 +3966,9 @@ var Edit = /** @class */ (function () {
|
|
|
3903
3966
|
data.splice(indx, 1);
|
|
3904
3967
|
}
|
|
3905
3968
|
var gridIndx = void 0;
|
|
3906
|
-
for (var
|
|
3907
|
-
if (this.treeGridData[
|
|
3908
|
-
gridIndx =
|
|
3969
|
+
for (var i_2 = 0; i_2 < this.treeGridData.length; i_2++) {
|
|
3970
|
+
if (this.treeGridData[i_2][this.parent.taskFields.id] === currentRec.taskData[this.parent.taskFields.id]) {
|
|
3971
|
+
gridIndx = i_2;
|
|
3909
3972
|
}
|
|
3910
3973
|
}
|
|
3911
3974
|
this.treeGridData.splice(gridIndx, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';
|
|
1
|
+
import { isNullOrUndefined, getValue, removeClass } from '@syncfusion/ej2-base';
|
|
2
2
|
/**
|
|
3
3
|
* Focus module is used to handle certain action on focus elements in keyboard navigations.
|
|
4
4
|
*/
|
|
@@ -256,6 +256,10 @@ var FocusModule = /** @class */ (function () {
|
|
|
256
256
|
if (ganttObj.selectionModule) {
|
|
257
257
|
if (ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectedRowIndex !== -1) {
|
|
258
258
|
var selectedItem = ganttObj.currentViewData[ganttObj.selectedRowIndex];
|
|
259
|
+
var focussedElement = ganttObj.element.querySelector('.e-focused');
|
|
260
|
+
if (focussedElement) {
|
|
261
|
+
removeClass([focussedElement], 'e-focused');
|
|
262
|
+
}
|
|
259
263
|
var focusedRowIndex = this.parent.ganttChartModule.focusedRowIndex;
|
|
260
264
|
var selectingRowIndex = expandedRecords.indexOf(selectedItem);
|
|
261
265
|
var currentSelectingRecord = e.action === 'downArrow' ? expandedRecords[selectingRowIndex + 1] :
|
|
@@ -81,18 +81,26 @@ var PdfExport = /** @class */ (function () {
|
|
|
81
81
|
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
82
82
|
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.currentViewData, null, true);
|
|
83
83
|
}
|
|
84
|
-
else {
|
|
84
|
+
else if (pdfExportProperties.exportType === 'AllData') {
|
|
85
85
|
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.flatData, null, true);
|
|
86
86
|
}
|
|
87
|
+
else {
|
|
88
|
+
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.updatedRecords, null, true);
|
|
89
|
+
}
|
|
87
90
|
this.helper.beforeSinglePageExport['cloneCurrentViewData'] = extend([], this.parent.currentViewData, null, true);
|
|
88
91
|
data = this.helper.beforeSinglePageExport['cloneFlatData'];
|
|
89
92
|
}
|
|
90
93
|
else {
|
|
91
|
-
if (pdfExportProperties.exportType
|
|
92
|
-
|
|
94
|
+
if (!isNullOrUndefined(pdfExportProperties.exportType)) {
|
|
95
|
+
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
96
|
+
data = this.parent.currentViewData;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
data = this.parent.flatData;
|
|
100
|
+
}
|
|
93
101
|
}
|
|
94
102
|
else {
|
|
95
|
-
data = this.parent.
|
|
103
|
+
data = this.parent.updatedRecords;
|
|
96
104
|
}
|
|
97
105
|
}
|
|
98
106
|
this.initGantt();
|
|
@@ -335,11 +335,30 @@ 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
|
+
if (droppedRecord.ganttProperties.predecessor && droppedRecord.ganttProperties.predecessor[count_1]) {
|
|
341
|
+
var fromRecord = this.parent.getRecordByID(droppedRecord.ganttProperties.predecessor[count_1].from);
|
|
342
|
+
var toRecord = this.parent.getRecordByID(droppedRecord.ganttProperties.predecessor[count_1].to);
|
|
343
|
+
var validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
|
|
344
|
+
if (droppedRecord.ganttProperties.predecessor && !validPredecessor) {
|
|
345
|
+
this.parent.editModule.removePredecessorOnDelete(droppedRecord);
|
|
346
|
+
droppedRecord.ganttProperties.predecessor.splice(0, 1);
|
|
347
|
+
if (droppedRecord.ganttProperties.predecessorsName) {
|
|
348
|
+
var splittedName = droppedRecord.ganttProperties.predecessorsName.split(',');
|
|
349
|
+
for (var i = 0; i < splittedName.length; i++) {
|
|
350
|
+
if (splittedName[i].indexOf(draggedRecord.ganttProperties.taskId + '') != -1) {
|
|
351
|
+
splittedName.splice(i, 1);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
var validatedPredecessorNames = splittedName.join();
|
|
355
|
+
droppedRecord.ganttProperties.predecessorsName = validatedPredecessorNames;
|
|
356
|
+
droppedRecord[this.parent.taskFields.dependency] = validatedPredecessorNames;
|
|
357
|
+
droppedRecord.taskData[this.parent.taskFields.dependency] = validatedPredecessorNames;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
343
362
|
}
|
|
344
363
|
if (droppedRecord.ganttProperties.isMilestone) {
|
|
345
364
|
this.parent.setRecordValue('isMilestone', false, droppedRecord.ganttProperties, true);
|
|
@@ -90,6 +90,9 @@ var Selection = /** @class */ (function () {
|
|
|
90
90
|
this.selectedRowIndexes = index;
|
|
91
91
|
}
|
|
92
92
|
if (this.parent.autoFocusTasks) {
|
|
93
|
+
if (this.parent.enableTimelineVirtualization) {
|
|
94
|
+
this.parent['isRowSelected'] = true;
|
|
95
|
+
}
|
|
93
96
|
this.parent.ganttChartModule.updateScrollLeft(getValue('data.ganttProperties.left', args));
|
|
94
97
|
}
|
|
95
98
|
args.target = this.actualTarget;
|
|
@@ -206,7 +209,7 @@ var Selection = /** @class */ (function () {
|
|
|
206
209
|
index = this.parent.flatData.indexOf(this.parent.currentViewData[index]);
|
|
207
210
|
this.parent.treeGridModule.addedRecord = false;
|
|
208
211
|
}
|
|
209
|
-
var selectedRow = ganttRow.filter(function (e) { return parseInt(e.getAttribute('
|
|
212
|
+
var selectedRow = ganttRow.filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 0) === index; })[0];
|
|
210
213
|
var condition;
|
|
211
214
|
if (index === -1 || isNullOrUndefined(selectedRow) || this.parent.selectionSettings.mode === 'Cell') {
|
|
212
215
|
return;
|
|
@@ -325,7 +328,7 @@ var Selection = /** @class */ (function () {
|
|
|
325
328
|
this.isSelectionFromChart = fromChart;
|
|
326
329
|
if (fromChart) {
|
|
327
330
|
var selectedRow = closest(e.target, 'tr.e-chart-row');
|
|
328
|
-
var rIndex = parseInt(selectedRow.getAttribute('
|
|
331
|
+
var rIndex = parseInt(selectedRow.getAttribute('data-rowindex'), 10);
|
|
329
332
|
var isToggle = this.parent.selectionSettings.enableToggle;
|
|
330
333
|
if (this.parent.selectionSettings.type === 'Single' || (!this.isMultiCtrlRequest && !this.isMultiShiftRequest)) {
|
|
331
334
|
if (!this.parent.allowTaskbarDragAndDrop || (this.parent.allowTaskbarDragAndDrop && (this.parent.rowDragAndDropModule &&
|
|
@@ -381,7 +384,7 @@ var Selection = /** @class */ (function () {
|
|
|
381
384
|
var _loop_2 = function (i) {
|
|
382
385
|
var selectedRow = ganttRow.filter(function (e) {
|
|
383
386
|
// eslint-disable-next-line
|
|
384
|
-
return parseInt(e.getAttribute('
|
|
387
|
+
return parseInt(e.getAttribute('data-rowindex'), 0) === records[i];
|
|
385
388
|
})[0];
|
|
386
389
|
if (!isNullOrUndefined(selectedRow)) {
|
|
387
390
|
// eslint-disable-next-line
|
|
@@ -61,6 +61,11 @@ export declare class TaskbarEdit extends DateProcessor {
|
|
|
61
61
|
private taskbarResizer;
|
|
62
62
|
private currentIndex;
|
|
63
63
|
private currentData;
|
|
64
|
+
private isClonedElement;
|
|
65
|
+
private draggedTreeGridRowElement;
|
|
66
|
+
private draggedTreeGridRowHeight;
|
|
67
|
+
private updatePosition;
|
|
68
|
+
private tooltipValue;
|
|
64
69
|
constructor(ganttObj?: Gantt);
|
|
65
70
|
private wireEvents;
|
|
66
71
|
/**
|
|
@@ -111,6 +116,15 @@ export declare class TaskbarEdit extends DateProcessor {
|
|
|
111
116
|
*/
|
|
112
117
|
private updateMouseDownProperties;
|
|
113
118
|
private isMouseDragCheck;
|
|
119
|
+
removeFirstBorder(element: any): void;
|
|
120
|
+
removeLastBorder(element: any): void;
|
|
121
|
+
private removetopOrBottomBorder;
|
|
122
|
+
private topOrBottomBorder;
|
|
123
|
+
private removeChildBorder;
|
|
124
|
+
private addRemoveClasses;
|
|
125
|
+
private addErrorElem;
|
|
126
|
+
private removeErrorElem;
|
|
127
|
+
ensurePosition(draggedRecords: IGanttData[], currentRecord: IGanttData): void;
|
|
114
128
|
/**
|
|
115
129
|
* To handle mouse move action in chart
|
|
116
130
|
*
|