@syncfusion/ej2-gantt 22.2.11 → 23.1.36
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 +195 -163
- 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 +1003 -292
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1040 -313
- 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 +4 -1
- package/src/gantt/actions/context-menu.js +4 -1
- package/src/gantt/actions/critical-path.d.ts +2 -0
- package/src/gantt/actions/critical-path.js +81 -59
- package/src/gantt/actions/dependency.d.ts +1 -0
- package/src/gantt/actions/dependency.js +43 -25
- package/src/gantt/actions/dialog-edit.js +27 -7
- package/src/gantt/actions/edit.d.ts +12 -1
- package/src/gantt/actions/edit.js +91 -10
- package/src/gantt/actions/filter.js +3 -0
- package/src/gantt/actions/pdf-export.d.ts +4 -1
- package/src/gantt/actions/pdf-export.js +36 -3
- package/src/gantt/actions/rowdragdrop.js +10 -2
- package/src/gantt/actions/selection.js +22 -5
- package/src/gantt/actions/taskbar-edit.js +51 -36
- package/src/gantt/actions/toolbar.js +8 -0
- package/src/gantt/base/date-processor.js +3 -3
- package/src/gantt/base/gantt-chart.d.ts +1 -0
- package/src/gantt/base/gantt-chart.js +79 -6
- package/src/gantt/base/gantt-model.d.ts +7 -0
- package/src/gantt/base/gantt.d.ts +6 -0
- package/src/gantt/base/gantt.js +83 -13
- package/src/gantt/base/interface.d.ts +14 -0
- package/src/gantt/base/task-processor.d.ts +4 -4
- package/src/gantt/base/task-processor.js +86 -36
- package/src/gantt/base/tree-grid.js +19 -10
- package/src/gantt/export/export-helper.d.ts +5 -1
- package/src/gantt/export/export-helper.js +152 -4
- package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
- package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
- package/src/gantt/export/pdf-base/treegrid-layouter.js +6 -1
- package/src/gantt/export/pdf-connector-line.js +3 -1
- package/src/gantt/export/pdf-gantt.js +6 -0
- package/src/gantt/export/pdf-taskbar.d.ts +13 -0
- package/src/gantt/export/pdf-taskbar.js +39 -5
- package/src/gantt/export/pdf-timeline.js +17 -8
- package/src/gantt/export/pdf-treegrid.js +3 -0
- package/src/gantt/models/task-fields-model.d.ts +7 -0
- package/src/gantt/models/task-fields.d.ts +6 -0
- package/src/gantt/models/task-fields.js +3 -0
- package/src/gantt/renderer/chart-rows.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.js +39 -20
- package/src/gantt/renderer/connector-line.js +49 -9
- package/src/gantt/renderer/edit-tooltip.js +11 -7
- package/src/gantt/renderer/timeline.js +19 -9
- package/src/gantt/renderer/tooltip.js +37 -33
- package/styles/bootstrap-dark.css +44 -100
- package/styles/bootstrap.css +44 -100
- package/styles/bootstrap4.css +44 -100
- package/styles/bootstrap5-dark.css +44 -100
- package/styles/bootstrap5.css +44 -100
- package/styles/fabric-dark.css +44 -100
- package/styles/fabric.css +44 -100
- package/styles/fluent-dark.css +44 -100
- package/styles/fluent.css +44 -100
- package/styles/gantt/_layout.scss +44 -31
- package/styles/gantt/_theme.scss +104 -98
- package/styles/gantt/bootstrap-dark.css +44 -100
- package/styles/gantt/bootstrap-dark.scss +1 -1
- package/styles/gantt/bootstrap.css +44 -100
- package/styles/gantt/bootstrap.scss +1 -1
- package/styles/gantt/bootstrap4.css +44 -100
- package/styles/gantt/bootstrap4.scss +1 -1
- package/styles/gantt/bootstrap5-dark.css +44 -100
- package/styles/gantt/bootstrap5-dark.scss +1 -1
- package/styles/gantt/bootstrap5.css +44 -100
- package/styles/gantt/bootstrap5.scss +1 -1
- package/styles/gantt/fabric-dark.css +44 -100
- package/styles/gantt/fabric-dark.scss +1 -1
- package/styles/gantt/fabric.css +44 -100
- package/styles/gantt/fabric.scss +1 -1
- package/styles/gantt/fluent-dark.css +44 -100
- package/styles/gantt/fluent-dark.scss +1 -1
- package/styles/gantt/fluent.css +44 -100
- package/styles/gantt/fluent.scss +1 -1
- package/styles/gantt/highcontrast-light.css +40 -100
- package/styles/gantt/highcontrast-light.scss +1 -1
- package/styles/gantt/highcontrast.css +44 -100
- package/styles/gantt/highcontrast.scss +1 -1
- package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
- package/styles/gantt/icons/_bootstrap.scss +4 -0
- package/styles/gantt/icons/_bootstrap4.scss +4 -0
- package/styles/gantt/icons/_bootstrap5.scss +4 -0
- package/styles/gantt/icons/_fabric-dark.scss +4 -0
- package/styles/gantt/icons/_fabric.scss +4 -0
- package/styles/gantt/icons/_fluent.scss +4 -0
- package/styles/gantt/icons/_fusionnew.scss +4 -0
- package/styles/gantt/icons/_highcontrast.scss +4 -0
- package/styles/gantt/icons/_material-dark.scss +4 -0
- package/styles/gantt/icons/_material.scss +4 -0
- package/styles/gantt/icons/_material3.scss +4 -0
- package/styles/gantt/icons/_tailwind-dark.scss +4 -0
- package/styles/gantt/icons/_tailwind.scss +4 -0
- package/styles/gantt/material-dark.css +44 -101
- package/styles/gantt/material-dark.scss +1 -1
- package/styles/gantt/material.css +44 -101
- package/styles/gantt/material.scss +1 -1
- package/styles/gantt/material3-dark.css +45 -102
- package/styles/gantt/material3-dark.scss +1 -1
- package/styles/gantt/material3.css +45 -102
- package/styles/gantt/material3.scss +1 -1
- package/styles/gantt/tailwind-dark.css +44 -101
- package/styles/gantt/tailwind-dark.scss +1 -1
- package/styles/gantt/tailwind.css +44 -101
- package/styles/gantt/tailwind.scss +1 -1
- package/styles/highcontrast-light.css +40 -100
- package/styles/highcontrast.css +44 -100
- package/styles/material-dark.css +44 -101
- package/styles/material.css +44 -101
- package/styles/material3-dark.css +45 -102
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +45 -102
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +44 -101
- package/styles/tailwind.css +44 -101
|
@@ -511,7 +511,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
511
511
|
}
|
|
512
512
|
else {
|
|
513
513
|
if ((!isNullOrUndefined(this.parent.taskFields.milestone)) && (!isNullOrUndefined(ganttProperties.startDate)) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
514
|
-
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() &&
|
|
514
|
+
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && (ganttData.taskData[this.parent.taskFields.milestone] === false)) {
|
|
515
515
|
tDuration = 1;
|
|
516
516
|
}
|
|
517
517
|
else {
|
|
@@ -1536,8 +1536,8 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
if (!editArgs) {
|
|
1538
1538
|
this.prevProjectStartDate = this.parent.cloneProjectStartDate;
|
|
1539
|
-
this.parent.cloneProjectStartDate = minStartDate ? minStartDate : new Date(projectStartDate.getTime());
|
|
1540
|
-
this.parent.cloneProjectEndDate = maxEndDate ? maxEndDate : new Date(projectEndDate.getTime());
|
|
1539
|
+
this.parent.cloneProjectStartDate = minStartDate ? (!this.parent.timelineModule.isZoomToFit) ? (!isNullOrUndefined(projectStartDate)) ? new Date(projectStartDate.getTime()) : minStartDate : minStartDate : new Date(projectStartDate.getTime());
|
|
1540
|
+
this.parent.cloneProjectEndDate = maxEndDate ? (!this.parent.timelineModule.isZoomToFit) ? (!isNullOrUndefined(projectEndDate)) ? new Date(projectEndDate.getTime()) : maxEndDate : maxEndDate : new Date(projectEndDate.getTime());
|
|
1541
1541
|
}
|
|
1542
1542
|
else {
|
|
1543
1543
|
setValue('minStartDate', minStartDate, editArgs);
|
|
@@ -1656,7 +1656,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1656
1656
|
dataManager.executeQuery(queryManager).then(function (e) {
|
|
1657
1657
|
_this.dataArray = e.result;
|
|
1658
1658
|
_this.processTimeline();
|
|
1659
|
-
_this.
|
|
1659
|
+
if (_this.parent.loadChildOnDemand || (!_this.parent.loadChildOnDemand && !(_this.parent.taskFields.hasChildMapping))) {
|
|
1660
|
+
_this.cloneDataSource();
|
|
1661
|
+
}
|
|
1660
1662
|
_this.parent.renderGantt(isChange);
|
|
1661
1663
|
}).catch(function (e) {
|
|
1662
1664
|
// Trigger action failure event
|
|
@@ -1695,6 +1697,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1695
1697
|
var data = [];
|
|
1696
1698
|
for (var i = 0; i < this.dataArray.length; i++) {
|
|
1697
1699
|
var tempData = this.dataArray[i];
|
|
1700
|
+
if (tempData['parentItem']) {
|
|
1701
|
+
delete tempData['parentItem'];
|
|
1702
|
+
}
|
|
1698
1703
|
data.push(extend({}, {}, tempData, true));
|
|
1699
1704
|
if (!isNullOrUndefined(tempData[taskIdMapping])) {
|
|
1700
1705
|
this.taskIds.push(tempData[taskIdMapping].toString());
|
|
@@ -1704,7 +1709,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1704
1709
|
this.parent.setProperties({ taskFields: { child: 'Children' } }, true);
|
|
1705
1710
|
}
|
|
1706
1711
|
this.constructDataSource(data);
|
|
1707
|
-
|
|
1712
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping && this.hierarchyData.length === 0) {
|
|
1713
|
+
hierarchicalData = this.dataArray;
|
|
1714
|
+
}
|
|
1715
|
+
else {
|
|
1716
|
+
hierarchicalData = this.hierarchyData;
|
|
1717
|
+
}
|
|
1708
1718
|
}
|
|
1709
1719
|
else {
|
|
1710
1720
|
hierarchicalData = this.dataArray;
|
|
@@ -1926,7 +1936,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1926
1936
|
if (!isNullOrUndefined(data[taskSettings.id])) {
|
|
1927
1937
|
id = data[taskSettings.id];
|
|
1928
1938
|
name = data[taskSettings.name];
|
|
1929
|
-
this.
|
|
1939
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && data['taskData']) {
|
|
1940
|
+
ganttData['taskData'] = data['taskData'];
|
|
1941
|
+
}
|
|
1942
|
+
else {
|
|
1943
|
+
this.addTaskData(ganttData, data, isLoad);
|
|
1944
|
+
}
|
|
1930
1945
|
}
|
|
1931
1946
|
else if (!isNullOrUndefined(data[resourceFields.id])) {
|
|
1932
1947
|
id = data[resourceFields.id];
|
|
@@ -1964,6 +1979,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1964
1979
|
this.parent.setRecordValue('notes', notes, ganttProperties, true);
|
|
1965
1980
|
this.parent.setRecordValue('cssClass', data[taskSettings.cssClass], ganttProperties, true);
|
|
1966
1981
|
this.parent.setRecordValue('parentItem', this.getCloneParent(parentItem), ganttData);
|
|
1982
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && this.parent.currentViewData.length > 0) {
|
|
1983
|
+
this.parent.setRecordValue('parentItem', ganttData.parentItem, this.parent.currentViewData[this.taskIds.indexOf(data[taskSettings.id].toString())]);
|
|
1984
|
+
}
|
|
1967
1985
|
var parentUniqId = ganttData.parentItem ? ganttData.parentItem.uniqueID : null;
|
|
1968
1986
|
this.parent.setRecordValue('parentUniqueID', parentUniqId, ganttData);
|
|
1969
1987
|
if (this.parent.viewType === 'ResourceView' && !isNullOrUndefined(taskSettings.parentID)
|
|
@@ -1971,7 +1989,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1971
1989
|
this.parent.setRecordValue('parentId', ganttData.parentItem.taskId, ganttProperties, true);
|
|
1972
1990
|
}
|
|
1973
1991
|
this.parent.setRecordValue('level', level, ganttData);
|
|
1974
|
-
|
|
1992
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && data['uniqueID']) {
|
|
1993
|
+
this.parent.setRecordValue('uniqueID', data['uniqueID'], ganttData);
|
|
1994
|
+
}
|
|
1995
|
+
else {
|
|
1996
|
+
this.parent.setRecordValue('uniqueID', getUid(this.parent.element.id + '_data_'), ganttData);
|
|
1997
|
+
}
|
|
1975
1998
|
this.parent.setRecordValue('uniqueID', ganttData.uniqueID, ganttProperties, true);
|
|
1976
1999
|
this.parent.setRecordValue('childRecords', [], ganttData);
|
|
1977
2000
|
if (this.parent.dataSource instanceof Object && isCountRequired(this.parent) &&
|
|
@@ -1986,7 +2009,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1986
2009
|
}
|
|
1987
2010
|
}
|
|
1988
2011
|
else {
|
|
1989
|
-
this.parent.
|
|
2012
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && ganttData.taskData[taskSettings.hasChildMapping]) {
|
|
2013
|
+
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
2014
|
+
}
|
|
2015
|
+
else {
|
|
2016
|
+
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
2017
|
+
}
|
|
1990
2018
|
}
|
|
1991
2019
|
if (ganttData.hasChildRecords) {
|
|
1992
2020
|
this.parent.setRecordValue('autoStartDate', ganttData.ganttProperties.startDate, ganttProperties);
|
|
@@ -2599,7 +2627,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2599
2627
|
}
|
|
2600
2628
|
else {
|
|
2601
2629
|
this.updateDurationValue(duration, ganttProperties);
|
|
2602
|
-
this.
|
|
2630
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
2631
|
+
this.calculateEndDate(ganttData);
|
|
2632
|
+
}
|
|
2633
|
+
else {
|
|
2634
|
+
this.parent.setRecordValue('endDate', endDate, ganttProperties, true);
|
|
2635
|
+
}
|
|
2603
2636
|
}
|
|
2604
2637
|
};
|
|
2605
2638
|
/**
|
|
@@ -3097,17 +3130,15 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3097
3130
|
else {
|
|
3098
3131
|
hierarchicalData = this.parent.dataSource;
|
|
3099
3132
|
}
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
if (
|
|
3103
|
-
|
|
3104
|
-
task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
|
|
3105
|
-
}
|
|
3106
|
-
if (!isNullOrUndefined(_this.parent.taskFields.endDate)) {
|
|
3107
|
-
task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
|
|
3108
|
-
}
|
|
3133
|
+
hierarchicalData.map(function (record) {
|
|
3134
|
+
if (task.ganttProperties.taskId === record[_this.parent.taskFields.id]) {
|
|
3135
|
+
if (!isNullOrUndefined(_this.parent.taskFields.startDate)) {
|
|
3136
|
+
task[_this.parent.taskFields.startDate] = record[_this.parent.taskFields.startDate];
|
|
3109
3137
|
}
|
|
3110
|
-
|
|
3138
|
+
if (!isNullOrUndefined(_this.parent.taskFields.endDate)) {
|
|
3139
|
+
task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3111
3142
|
});
|
|
3112
3143
|
};
|
|
3113
3144
|
TaskProcessor.prototype.getWorkInHour = function (work, workUnit) {
|
|
@@ -3149,7 +3180,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3149
3180
|
this.setRecordDate(ganttData, ganttProperties.endDate, dataMapping.endDate);
|
|
3150
3181
|
}
|
|
3151
3182
|
if (dataMapping.duration) {
|
|
3152
|
-
|
|
3183
|
+
if (!isNullOrUndefined(dataMapping.milestone) && !ganttData.taskData[dataMapping.milestone]) {
|
|
3184
|
+
this.setRecordDuration(ganttData, dataMapping.duration);
|
|
3185
|
+
}
|
|
3153
3186
|
}
|
|
3154
3187
|
if (dataMapping.durationUnit) {
|
|
3155
3188
|
data[dataMapping.durationUnit] = ganttProperties.durationUnit;
|
|
@@ -3384,7 +3417,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3384
3417
|
*/
|
|
3385
3418
|
TaskProcessor.prototype.updateDurationValue = function (duration, ganttProperties) {
|
|
3386
3419
|
var tempDuration = this.getDurationValue(duration);
|
|
3387
|
-
if (!isNaN(getValue('duration', tempDuration))) {
|
|
3420
|
+
if (!isNaN(getValue('duration', tempDuration)) && !(this.parent.viewType === "ResourceView" && tempDuration["duration"] === 0)) {
|
|
3388
3421
|
this.parent.setRecordValue('duration', getValue('duration', tempDuration), ganttProperties, true);
|
|
3389
3422
|
}
|
|
3390
3423
|
if (!isNullOrUndefined(getValue('durationUnit', tempDuration))) {
|
|
@@ -3768,7 +3801,14 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3768
3801
|
* @private
|
|
3769
3802
|
*/
|
|
3770
3803
|
TaskProcessor.prototype.reUpdateGanttDataPosition = function () {
|
|
3771
|
-
var flatData
|
|
3804
|
+
var flatData;
|
|
3805
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
3806
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
3807
|
+
flatData = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'];
|
|
3808
|
+
}
|
|
3809
|
+
else {
|
|
3810
|
+
flatData = this.parent.flatData;
|
|
3811
|
+
}
|
|
3772
3812
|
var length = flatData.length;
|
|
3773
3813
|
for (var i = 0; i < length; i++) {
|
|
3774
3814
|
var data = flatData[i];
|
|
@@ -3895,6 +3935,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3895
3935
|
* @private
|
|
3896
3936
|
*/
|
|
3897
3937
|
TaskProcessor.prototype.updateParentItems = function (cloneParent, isParent) {
|
|
3938
|
+
var _this = this;
|
|
3898
3939
|
var parentData = isParent ? cloneParent : this.parent.getParentTask(cloneParent);
|
|
3899
3940
|
var deleteUpdate = false;
|
|
3900
3941
|
var ganttProp = parentData.ganttProperties;
|
|
@@ -3903,8 +3944,8 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3903
3944
|
var previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
|
|
3904
3945
|
var previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
|
|
3905
3946
|
ganttProp.autoEndDate;
|
|
3906
|
-
var
|
|
3907
|
-
var childLength =
|
|
3947
|
+
var childRecords_1 = parentData.childRecords;
|
|
3948
|
+
var childLength = childRecords_1.length;
|
|
3908
3949
|
var totalDuration = 0;
|
|
3909
3950
|
var progressValues = {};
|
|
3910
3951
|
var minStartDate = null;
|
|
@@ -3913,38 +3954,43 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3913
3954
|
var totalProgress = 0;
|
|
3914
3955
|
var childCompletedWorks = 0;
|
|
3915
3956
|
var childData = void 0;
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3957
|
+
var _loop_6 = function (count) {
|
|
3958
|
+
if (!this_4.parent.loadChildOnDemand && this_4.parent.taskFields.hasChildMapping) {
|
|
3959
|
+
childData = this_4.parent.currentViewData.filter(function (item) { return item.ganttProperties.taskId === childRecords_1[count][_this.parent.taskFields.id]; })[0];
|
|
3960
|
+
}
|
|
3961
|
+
else {
|
|
3962
|
+
childData = childRecords_1[count];
|
|
3963
|
+
}
|
|
3964
|
+
if (this_4.parent.isOnDelete && childData.isDelete) {
|
|
3965
|
+
if (childLength === 1 && this_4.parent.viewType === 'ProjectView') {
|
|
3920
3966
|
deleteUpdate = true;
|
|
3921
3967
|
}
|
|
3922
|
-
continue;
|
|
3968
|
+
return "continue";
|
|
3923
3969
|
}
|
|
3924
|
-
var startDate =
|
|
3970
|
+
var startDate = this_4.getValidStartDate(childData.ganttProperties);
|
|
3925
3971
|
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
3926
3972
|
startDate = childData.ganttProperties.autoStartDate;
|
|
3927
3973
|
}
|
|
3928
|
-
var endDate =
|
|
3974
|
+
var endDate = this_4.getValidEndDate(childData.ganttProperties);
|
|
3929
3975
|
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
3930
3976
|
endDate = childData.ganttProperties.autoEndDate;
|
|
3931
3977
|
}
|
|
3932
3978
|
if (isNullOrUndefined(minStartDate)) {
|
|
3933
|
-
minStartDate =
|
|
3979
|
+
minStartDate = this_4.getDateFromFormat(startDate);
|
|
3934
3980
|
}
|
|
3935
3981
|
if (isNullOrUndefined(maxEndDate)) {
|
|
3936
|
-
maxEndDate =
|
|
3982
|
+
maxEndDate = this_4.getDateFromFormat(endDate);
|
|
3937
3983
|
}
|
|
3938
|
-
if (!isNullOrUndefined(endDate) &&
|
|
3939
|
-
maxEndDate =
|
|
3984
|
+
if (!isNullOrUndefined(endDate) && this_4.compareDates(endDate, maxEndDate) === 1) {
|
|
3985
|
+
maxEndDate = this_4.getDateFromFormat(endDate);
|
|
3940
3986
|
}
|
|
3941
|
-
if (!isNullOrUndefined(startDate) &&
|
|
3942
|
-
minStartDate =
|
|
3987
|
+
if (!isNullOrUndefined(startDate) && this_4.compareDates(startDate, minStartDate) === -1) {
|
|
3988
|
+
minStartDate = this_4.getDateFromFormat(startDate);
|
|
3943
3989
|
}
|
|
3944
3990
|
if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
|
|
3945
|
-
progressValues =
|
|
3991
|
+
progressValues = this_4.getParentProgress(childData);
|
|
3946
3992
|
totalProgress += getValue('totalProgress', progressValues);
|
|
3947
|
-
if (childData[
|
|
3993
|
+
if (childData[this_4.parent.taskFields.duration] < 1) {
|
|
3948
3994
|
totalDuration += getValue('totalDuration', progressValues);
|
|
3949
3995
|
totalDuration = Number(totalDuration.toFixed(4));
|
|
3950
3996
|
}
|
|
@@ -3956,6 +4002,10 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3956
4002
|
milestoneCount++;
|
|
3957
4003
|
}
|
|
3958
4004
|
childCompletedWorks += childData.ganttProperties.work;
|
|
4005
|
+
};
|
|
4006
|
+
var this_4 = this;
|
|
4007
|
+
for (var count = 0; count < childLength; count++) {
|
|
4008
|
+
_loop_6(count);
|
|
3959
4009
|
}
|
|
3960
4010
|
if (!deleteUpdate) {
|
|
3961
4011
|
var taskCount = void 0;
|
|
@@ -4448,6 +4498,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4448
4498
|
function GanttChart(parent) {
|
|
4449
4499
|
this.isExpandCollapseFromChart = false;
|
|
4450
4500
|
this.isExpandAll = false;
|
|
4501
|
+
this.isCollapseAll = false;
|
|
4451
4502
|
this.isGanttElement = false;
|
|
4452
4503
|
this.parent = parent;
|
|
4453
4504
|
this.chartTimelineContainer = null;
|
|
@@ -4793,6 +4844,42 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4793
4844
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
4794
4845
|
this.parent.notify('chartMouseUp', e);
|
|
4795
4846
|
}
|
|
4847
|
+
if (!this.parent.editSettings.allowEditing) {
|
|
4848
|
+
var isTaskbarEdited = false;
|
|
4849
|
+
if (this.parent.editSettings.allowTaskbarEditing &&
|
|
4850
|
+
getValue('editModule.taskbarEditModule.isMouseDragged', this.parent) &&
|
|
4851
|
+
getValue('editModule.taskbarEditModule.taskBarEditAction', this.parent)) {
|
|
4852
|
+
isTaskbarEdited = true;
|
|
4853
|
+
}
|
|
4854
|
+
if (!isTaskbarEdited) {
|
|
4855
|
+
/** Expand/collapse action */
|
|
4856
|
+
var target = e.target;
|
|
4857
|
+
var isOnTaskbarElement = e.target.classList.contains(taskBarMainContainer)
|
|
4858
|
+
|| closest(e.target, '.' + taskBarMainContainer);
|
|
4859
|
+
if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
|
|
4860
|
+
this.chartExpandCollapseRequest(e);
|
|
4861
|
+
}
|
|
4862
|
+
else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
|
|
4863
|
+
this.scrollToTarget(e); /** Scroll to task */
|
|
4864
|
+
}
|
|
4865
|
+
}
|
|
4866
|
+
}
|
|
4867
|
+
if (e.type === "touchend") {
|
|
4868
|
+
var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
|
|
4869
|
+
if (!isNullOrUndefined(resizeCheck)) {
|
|
4870
|
+
resizeCheck.remove();
|
|
4871
|
+
}
|
|
4872
|
+
var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar');
|
|
4873
|
+
if (!isNullOrUndefined(Check)) {
|
|
4874
|
+
var clonetbody = Check.parentElement;
|
|
4875
|
+
var cloneTable = clonetbody.parentElement;
|
|
4876
|
+
cloneTable.remove();
|
|
4877
|
+
}
|
|
4878
|
+
var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
|
|
4879
|
+
if (!isNullOrUndefined(falseline)) {
|
|
4880
|
+
this.parent.editModule.taskbarEditModule.removeFalseLine(true);
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4796
4883
|
};
|
|
4797
4884
|
/**
|
|
4798
4885
|
*
|
|
@@ -5184,13 +5271,27 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5184
5271
|
* @private
|
|
5185
5272
|
*/
|
|
5186
5273
|
GanttChart.prototype.collapsedGanttRow = function (args) {
|
|
5274
|
+
var _this = this;
|
|
5187
5275
|
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
5188
5276
|
return;
|
|
5189
5277
|
}
|
|
5190
|
-
var record
|
|
5278
|
+
var record;
|
|
5279
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5280
|
+
record = this.parent.currentViewData.filter(function (item) { return item.ganttProperties[_this.parent.taskFields.id] === args['data'][_this.parent.taskFields.id]; })[0];
|
|
5281
|
+
}
|
|
5282
|
+
else {
|
|
5283
|
+
record = getValue('data', args);
|
|
5284
|
+
}
|
|
5191
5285
|
if (this.isExpandCollapseFromChart) {
|
|
5192
5286
|
this.expandCollapseChartRows('collapse', getValue('chartRow', args), record, null);
|
|
5193
|
-
this.parent.
|
|
5287
|
+
var idField_1 = this.parent.taskFields.id;
|
|
5288
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5289
|
+
var gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField_1] == args['data'][idField_1]; })[0];
|
|
5290
|
+
this.parent.treeGrid.collapseRow(getValue('gridRow', args), gridRec);
|
|
5291
|
+
}
|
|
5292
|
+
else {
|
|
5293
|
+
this.parent.treeGrid.collapseRow(getValue('gridRow', args), record);
|
|
5294
|
+
}
|
|
5194
5295
|
this.isExpandCollapseFromChart = false;
|
|
5195
5296
|
}
|
|
5196
5297
|
else {
|
|
@@ -5235,13 +5336,27 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5235
5336
|
* @private
|
|
5236
5337
|
*/
|
|
5237
5338
|
GanttChart.prototype.expandedGanttRow = function (args) {
|
|
5339
|
+
var _this = this;
|
|
5238
5340
|
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
5239
5341
|
return;
|
|
5240
5342
|
}
|
|
5241
|
-
var record
|
|
5343
|
+
var record;
|
|
5344
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5345
|
+
record = this.parent.currentViewData.filter(function (item) { return item.ganttProperties.taskId == args['data'][_this.parent.taskFields.id]; })[0];
|
|
5346
|
+
}
|
|
5347
|
+
else {
|
|
5348
|
+
record = getValue('data', args);
|
|
5349
|
+
}
|
|
5242
5350
|
if (this.isExpandCollapseFromChart) {
|
|
5243
5351
|
this.expandCollapseChartRows('expand', getValue('chartRow', args), record, null);
|
|
5244
|
-
this.parent.
|
|
5352
|
+
var idField_2 = this.parent.taskFields.id;
|
|
5353
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5354
|
+
var gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField_2] == args['data'][idField_2]; })[0];
|
|
5355
|
+
this.parent.treeGrid.expandRow(getValue('gridRow', args), gridRec);
|
|
5356
|
+
}
|
|
5357
|
+
else {
|
|
5358
|
+
this.parent.treeGrid.expandRow(getValue('gridRow', args), record);
|
|
5359
|
+
}
|
|
5245
5360
|
this.isExpandCollapseFromChart = false;
|
|
5246
5361
|
}
|
|
5247
5362
|
else {
|
|
@@ -5340,9 +5455,11 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5340
5455
|
this.parent.treeGrid.expandAll();
|
|
5341
5456
|
}
|
|
5342
5457
|
else {
|
|
5458
|
+
this.isCollapseAll = true;
|
|
5343
5459
|
this.parent.treeGrid.collapseAll();
|
|
5344
5460
|
}
|
|
5345
5461
|
this.isExpandAll = false;
|
|
5462
|
+
this.isCollapseAll = false;
|
|
5346
5463
|
};
|
|
5347
5464
|
/**
|
|
5348
5465
|
* Public method to expand particular level of rows.
|
|
@@ -5825,7 +5942,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5825
5942
|
childElement = element;
|
|
5826
5943
|
}
|
|
5827
5944
|
}
|
|
5828
|
-
if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span')) {
|
|
5945
|
+
if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span') || element.classList.contains("e-timeline-header-container")) {
|
|
5829
5946
|
if (focus === 'add') {
|
|
5830
5947
|
element.setAttribute('tabIndex', '0');
|
|
5831
5948
|
addClass([element], 'e-active-container');
|
|
@@ -5889,7 +6006,13 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5889
6006
|
recordIndex = this.parent.flatData.indexOf(record);
|
|
5890
6007
|
}
|
|
5891
6008
|
else {
|
|
5892
|
-
|
|
6009
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
6010
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
6011
|
+
recordIndex = this.parent.ids.indexOf(record.ganttProperties.taskId.toString());
|
|
6012
|
+
}
|
|
6013
|
+
else {
|
|
6014
|
+
recordIndex = this.parent.currentViewData.indexOf(record);
|
|
6015
|
+
}
|
|
5893
6016
|
}
|
|
5894
6017
|
}
|
|
5895
6018
|
return recordIndex;
|
|
@@ -5976,7 +6099,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5976
6099
|
*/
|
|
5977
6100
|
Timeline.prototype.refreshTimelineByTimeSpan = function () {
|
|
5978
6101
|
this.validateTimelineProp();
|
|
5979
|
-
this.parent.
|
|
6102
|
+
if (!this.parent.pdfExportModule || (this.parent.pdfExportModule && !this.parent.pdfExportModule.isPdfExport) || (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && !this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
6103
|
+
this.parent.ganttChartModule.chartTimelineContainer.innerHTML = '';
|
|
6104
|
+
}
|
|
5980
6105
|
this.createTimelineSeries();
|
|
5981
6106
|
};
|
|
5982
6107
|
/**
|
|
@@ -6293,7 +6418,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6293
6418
|
this.customTimelineSettings.topTier.format = this.validateFormat(this.topTier, this.customTimelineSettings.topTier.format);
|
|
6294
6419
|
this.customTimelineSettings.weekStartDay = this.customTimelineSettings.weekStartDay >= 0 &&
|
|
6295
6420
|
this.customTimelineSettings.weekStartDay <= 6 ? this.customTimelineSettings.weekStartDay : 0;
|
|
6296
|
-
this.
|
|
6421
|
+
if (!(this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps &&
|
|
6422
|
+
this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
6423
|
+
this.checkCurrentZoomingLevel();
|
|
6424
|
+
}
|
|
6297
6425
|
};
|
|
6298
6426
|
/**
|
|
6299
6427
|
* To find the current zooming level of the Gantt control.
|
|
@@ -6540,13 +6668,15 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6540
6668
|
table = createElement('table', { className: timelineHeaderTableContainer, styles: 'display: block;' });
|
|
6541
6669
|
thead = createElement('thead', { className: timelineHeaderTableBody, styles: 'display:block; border-collapse:collapse' });
|
|
6542
6670
|
tr = createElement('tr', { innerHTML: this.createTimelineTemplate(tier) });
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6671
|
+
if (!this.parent.pdfExportModule || (this.parent.pdfExportModule && !this.parent.pdfExportModule.isPdfExport) || (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && !this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
6672
|
+
td = createElement('th');
|
|
6673
|
+
div = createElement('div', { styles: 'width: 20px' });
|
|
6674
|
+
td.appendChild(div);
|
|
6675
|
+
tr.appendChild(td);
|
|
6676
|
+
thead.appendChild(tr);
|
|
6677
|
+
table.appendChild(thead);
|
|
6678
|
+
this.parent.ganttChartModule.chartTimelineContainer.appendChild(table);
|
|
6679
|
+
}
|
|
6550
6680
|
tier = 'bottomTier';
|
|
6551
6681
|
tr = null;
|
|
6552
6682
|
}
|
|
@@ -7380,13 +7510,16 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
7380
7510
|
this.parent.updateProjectDates(args.projectStartDate, args.ProjectEndDate, args.isTimelineRoundOff, isFrom);
|
|
7381
7511
|
if (type === 'prevTimeSpan' && isFrom === 'publicMethod') {
|
|
7382
7512
|
this.parent.ganttChartModule.updateScrollLeft(0);
|
|
7513
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
7383
7514
|
}
|
|
7384
7515
|
else if (type === 'nextTimeSpan' && isFrom === 'publicMethod') {
|
|
7385
7516
|
this.parent.ganttChartModule.updateScrollLeft(this.parent.timelineModule.totalTimelineWidth);
|
|
7517
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
7386
7518
|
}
|
|
7387
7519
|
else if (type === 'nextTimeSpan' && isFrom === 'TaskbarEditing') {
|
|
7388
7520
|
var currentScrollLeft = document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollLeft;
|
|
7389
7521
|
this.parent.element.querySelector('.e-timeline-header-container').scrollLeft = currentScrollLeft;
|
|
7522
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
7390
7523
|
}
|
|
7391
7524
|
this.parent.timelineModule.timeSpanActionEvent('actionComplete', type, isFrom);
|
|
7392
7525
|
}
|
|
@@ -7585,6 +7718,11 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7585
7718
|
this.wireEvents();
|
|
7586
7719
|
};
|
|
7587
7720
|
GanttTreeGrid.prototype.composeProperties = function () {
|
|
7721
|
+
this.parent.treeGrid.hasChildMapping = this.parent.taskFields.hasChildMapping;
|
|
7722
|
+
this.parent.treeGrid.loadChildOnDemand = this.parent.loadChildOnDemand;
|
|
7723
|
+
this.parent.treeGrid['isFromGantt'] = true;
|
|
7724
|
+
this.parent.treeGrid.parentIdMapping = this.parent.taskFields.parentID;
|
|
7725
|
+
this.parent.treeGrid.idMapping = this.parent.taskFields.id;
|
|
7588
7726
|
this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
|
|
7589
7727
|
this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
|
|
7590
7728
|
this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
|
|
@@ -7601,8 +7739,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7601
7739
|
this.parent.treeGrid.dataSource = { result: this.parent.flatData, count: count };
|
|
7602
7740
|
}
|
|
7603
7741
|
else {
|
|
7604
|
-
this.parent.treeGrid.hasChildMapping
|
|
7605
|
-
|
|
7742
|
+
if (!this.parent.treeGrid.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
7743
|
+
this.parent.autoCalculateDateScheduling = false;
|
|
7744
|
+
this.parent.treeGrid.dataSource = this.parent.dataSource;
|
|
7745
|
+
}
|
|
7746
|
+
else {
|
|
7747
|
+
this.parent.treeGrid.hasChildMapping = null;
|
|
7748
|
+
this.parent.treeGrid.dataSource = this.parent.flatData;
|
|
7749
|
+
}
|
|
7606
7750
|
}
|
|
7607
7751
|
this.parent.treeGrid.expandStateMapping = this.parent.taskFields.expandState;
|
|
7608
7752
|
var isGantt = 'isGantt';
|
|
@@ -7763,7 +7907,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7763
7907
|
collapsedArgs = this.createExpandCollapseArgs(args, null);
|
|
7764
7908
|
this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
|
|
7765
7909
|
}
|
|
7766
|
-
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
|
|
7910
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isCollapseAll && collapsedArgs['gridRow']) {
|
|
7767
7911
|
collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
|
|
7768
7912
|
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7769
7913
|
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
@@ -7793,7 +7937,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7793
7937
|
expandedArgs = this.createExpandCollapseArgs(args, null);
|
|
7794
7938
|
this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
|
|
7795
7939
|
}
|
|
7796
|
-
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
|
|
7940
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isExpandAll && args['row']) {
|
|
7797
7941
|
args['row'].style.height = this.parent.rowHeight + 'px';
|
|
7798
7942
|
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7799
7943
|
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
@@ -8363,6 +8507,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
8363
8507
|
if (!isNullOrUndefined(ganttProp)) {
|
|
8364
8508
|
return this.parent.dataOperation.getDurationString(ganttProp.duration, ganttProp.durationUnit);
|
|
8365
8509
|
}
|
|
8510
|
+
else if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
8511
|
+
return this.parent.dataOperation.getDurationString(parseInt(data[this.parent.taskFields.duration]), this.parent.durationUnit);
|
|
8512
|
+
}
|
|
8366
8513
|
return '';
|
|
8367
8514
|
}; // eslint-disable-next-line
|
|
8368
8515
|
GanttTreeGrid.prototype.resourceValueAccessor = function (field, data, column) {
|
|
@@ -8399,12 +8546,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
8399
8546
|
};
|
|
8400
8547
|
GanttTreeGrid.prototype.updateScrollTop = function (args) {
|
|
8401
8548
|
var newScrollTop;
|
|
8402
|
-
|
|
8403
|
-
newScrollTop = getValue('top', args) - document.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'];
|
|
8404
|
-
}
|
|
8405
|
-
else {
|
|
8406
|
-
newScrollTop = getValue('top', args);
|
|
8407
|
-
}
|
|
8549
|
+
newScrollTop = getValue('top', args);
|
|
8408
8550
|
this.treeGridElement.querySelector('.e-content').scrollTop = newScrollTop;
|
|
8409
8551
|
this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
|
|
8410
8552
|
};
|
|
@@ -8931,6 +9073,9 @@ var TaskFields = /** @__PURE__ @class */ (function (_super) {
|
|
|
8931
9073
|
__decorate$12([
|
|
8932
9074
|
Property(null)
|
|
8933
9075
|
], TaskFields.prototype, "parentID", void 0);
|
|
9076
|
+
__decorate$12([
|
|
9077
|
+
Property(null)
|
|
9078
|
+
], TaskFields.prototype, "hasChildMapping", void 0);
|
|
8934
9079
|
__decorate$12([
|
|
8935
9080
|
Property(null)
|
|
8936
9081
|
], TaskFields.prototype, "startDate", void 0);
|
|
@@ -9547,16 +9692,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9547
9692
|
return splitTasks;
|
|
9548
9693
|
};
|
|
9549
9694
|
ChartRows.prototype.getSplitTaskbarLeftResizerNode = function () {
|
|
9550
|
-
var lResizerLeft =
|
|
9695
|
+
var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
|
|
9551
9696
|
var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
9552
|
-
' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9697
|
+
' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
9553
9698
|
return template;
|
|
9554
9699
|
};
|
|
9555
9700
|
ChartRows.prototype.getSplitTaskbarRightResizerNode = function (segment) {
|
|
9556
|
-
var rResizerLeft =
|
|
9701
|
+
var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
|
|
9557
9702
|
var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
9558
9703
|
' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (segment.width + rResizerLeft) + 'px;' +
|
|
9559
|
-
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9704
|
+
'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
9560
9705
|
return template;
|
|
9561
9706
|
};
|
|
9562
9707
|
ChartRows.prototype.getSplitProgressResizerNode = function (segment) {
|
|
@@ -9881,7 +10026,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9881
10026
|
}
|
|
9882
10027
|
else {
|
|
9883
10028
|
var template = '<div class="' + traceMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;height:' +
|
|
9884
|
-
((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);
|
|
10029
|
+
((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);left:' + 1 + 'px;"> </div>';
|
|
9885
10030
|
milestoneNode = this.createDivElement(template);
|
|
9886
10031
|
}
|
|
9887
10032
|
return milestoneNode;
|
|
@@ -10259,16 +10404,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10259
10404
|
return this.createDivElement(template);
|
|
10260
10405
|
};
|
|
10261
10406
|
ChartRows.prototype.childTaskbarLeftResizer = function () {
|
|
10262
|
-
var lResizerLeft =
|
|
10407
|
+
var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
|
|
10263
10408
|
var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
10264
|
-
'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
10409
|
+
'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
10265
10410
|
return this.createDivElement(template);
|
|
10266
10411
|
};
|
|
10267
10412
|
ChartRows.prototype.childTaskbarRightResizer = function () {
|
|
10268
|
-
var rResizerLeft =
|
|
10413
|
+
var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
|
|
10269
10414
|
var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
10270
10415
|
'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
10271
|
-
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
10416
|
+
'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
10272
10417
|
return this.createDivElement(template);
|
|
10273
10418
|
};
|
|
10274
10419
|
ChartRows.prototype.childTaskbarProgressResizer = function () {
|
|
@@ -10282,8 +10427,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10282
10427
|
};
|
|
10283
10428
|
ChartRows.prototype.getLeftPointNode = function () {
|
|
10284
10429
|
var data = this.templateData;
|
|
10285
|
-
var
|
|
10286
|
-
var
|
|
10430
|
+
var left = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 12 : 0;
|
|
10431
|
+
var mileStoneLeftValue = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 6 : 3;
|
|
10432
|
+
var pointerLeft = -(3 + this.connectorPointWidth + left);
|
|
10433
|
+
var mileStoneLeft = -(this.connectorPointWidth + 4 + mileStoneLeftValue);
|
|
10287
10434
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
10288
10435
|
var marginTop;
|
|
10289
10436
|
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
@@ -10302,7 +10449,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10302
10449
|
};
|
|
10303
10450
|
ChartRows.prototype.getRightPointNode = function () {
|
|
10304
10451
|
var data = this.templateData;
|
|
10305
|
-
var
|
|
10452
|
+
var right = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -12 : 0;
|
|
10453
|
+
var pointerRight = -(3 + right);
|
|
10306
10454
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
10307
10455
|
var marginTop;
|
|
10308
10456
|
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
@@ -10312,7 +10460,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10312
10460
|
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
10313
10461
|
}
|
|
10314
10462
|
var template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
|
|
10315
|
-
((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
10463
|
+
((data.ganttProperties.isMilestone) ? ('left:' + ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.milestoneHeight + 5) : this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
10316
10464
|
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
|
|
10317
10465
|
'<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
10318
10466
|
'" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
|
|
@@ -10485,7 +10633,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10485
10633
|
* @private
|
|
10486
10634
|
*/
|
|
10487
10635
|
ChartRows.prototype.initChartHelperPrivateVariable = function () {
|
|
10488
|
-
var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
|
|
10636
|
+
var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 0.7 : 0.62);
|
|
10489
10637
|
var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
|
|
10490
10638
|
var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
|
|
10491
10639
|
this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
|
|
@@ -10507,8 +10655,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10507
10655
|
this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
|
|
10508
10656
|
this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
|
|
10509
10657
|
this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
|
|
10510
|
-
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) :
|
|
10511
|
-
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2))
|
|
10658
|
+
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
|
|
10659
|
+
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
|
|
10512
10660
|
};
|
|
10513
10661
|
/**
|
|
10514
10662
|
* Function used to refresh Gantt rows.
|
|
@@ -10794,11 +10942,24 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10794
10942
|
* @private
|
|
10795
10943
|
*/
|
|
10796
10944
|
ChartRows.prototype.setAriaRowIndex = function (tempTemplateData, tRow) {
|
|
10945
|
+
var _this = this;
|
|
10797
10946
|
var dataSource = this.parent.treeGrid.getCurrentViewRecords();
|
|
10798
10947
|
var visualData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
10799
10948
|
getValue('virtualScrollModule.visualData', this.parent.treeGrid) : dataSource;
|
|
10800
|
-
var index
|
|
10801
|
-
|
|
10949
|
+
var index;
|
|
10950
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
10951
|
+
var gridData = this.parent.treeGrid.grid.contentModule['rows'];
|
|
10952
|
+
var data = gridData.filter(function (x) {
|
|
10953
|
+
if (x['data'][_this.parent.taskFields.id] === tempTemplateData.ganttProperties.taskId) {
|
|
10954
|
+
return x;
|
|
10955
|
+
}
|
|
10956
|
+
})[0];
|
|
10957
|
+
tRow.setAttribute('aria-rowindex', data['index'].toString());
|
|
10958
|
+
}
|
|
10959
|
+
else {
|
|
10960
|
+
index = visualData.indexOf(tempTemplateData);
|
|
10961
|
+
tRow.setAttribute('aria-rowindex', index.toString());
|
|
10962
|
+
}
|
|
10802
10963
|
};
|
|
10803
10964
|
/**
|
|
10804
10965
|
* To trigger query taskbar info event.
|
|
@@ -11174,8 +11335,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
11174
11335
|
this.triggerQueryTaskbarInfoByIndex(tr, data);
|
|
11175
11336
|
}
|
|
11176
11337
|
var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
|
|
11177
|
-
this.parent.
|
|
11178
|
-
|
|
11338
|
+
if (!this.parent.ganttChartModule.isExpandAll && !this.parent.ganttChartModule.isCollapseAll) {
|
|
11339
|
+
this.parent.treeGrid.grid.setRowData(dataId, data);
|
|
11340
|
+
}
|
|
11341
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap &&
|
|
11342
|
+
!this.parent.ganttChartModule.isCollapseAll && !this.parent.ganttChartModule.isExpandAll) {
|
|
11179
11343
|
this.updateDragDropRecords(selectedItem, tr);
|
|
11180
11344
|
}
|
|
11181
11345
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
@@ -11369,6 +11533,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11369
11533
|
this.parentRecord = [];
|
|
11370
11534
|
this.parentIds = [];
|
|
11371
11535
|
this.parentPredecessors = [];
|
|
11536
|
+
this.validatedParentIds = [];
|
|
11372
11537
|
this.parent = gantt;
|
|
11373
11538
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
11374
11539
|
}
|
|
@@ -11985,13 +12150,31 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11985
12150
|
*/
|
|
11986
12151
|
Dependency.prototype.createConnectorLinesCollection = function (records) {
|
|
11987
12152
|
var ganttRecords = records ? records : this.parent.currentViewData;
|
|
12153
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
12154
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
12155
|
+
ganttRecords = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneCurrentViewData'];
|
|
12156
|
+
}
|
|
11988
12157
|
var recordLength = ganttRecords.length;
|
|
11989
12158
|
var count;
|
|
11990
12159
|
var ganttRecord;
|
|
11991
12160
|
var predecessorsCollection;
|
|
11992
|
-
this.parent.
|
|
11993
|
-
this.parent.
|
|
12161
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
12162
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
12163
|
+
this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
12164
|
+
this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
|
|
12165
|
+
}
|
|
12166
|
+
else {
|
|
12167
|
+
this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
12168
|
+
this.parent.updatedRecords : this.parent.getExpandedRecords(this.parent.updatedRecords);
|
|
12169
|
+
}
|
|
11994
12170
|
for (count = 0; count < recordLength; count++) {
|
|
12171
|
+
if (this.parent.editModule && this.parent.editModule.deletedTaskDetails.length > 0) {
|
|
12172
|
+
if (ganttRecords[count].parentItem) {
|
|
12173
|
+
var parentItem = this.parent.getRecordByID(ganttRecords[count].parentItem.taskId.toString());
|
|
12174
|
+
this.parent.setRecordValue('parentItem', this.parent.dataOperation.getCloneParent(parentItem), ganttRecords[count]);
|
|
12175
|
+
}
|
|
12176
|
+
ganttRecords[count].index = count;
|
|
12177
|
+
}
|
|
11995
12178
|
ganttRecord = ganttRecords[count];
|
|
11996
12179
|
predecessorsCollection = ganttRecord.ganttProperties.predecessor;
|
|
11997
12180
|
if (predecessorsCollection) {
|
|
@@ -12139,36 +12322,35 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12139
12322
|
this.validatePredecessor(record, undefined, 'successor');
|
|
12140
12323
|
}
|
|
12141
12324
|
}
|
|
12142
|
-
if (record && record.
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12325
|
+
if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
|
|
12326
|
+
this.validatedParentIds.push(record.parentItem.taskId);
|
|
12327
|
+
}
|
|
12328
|
+
|
|
12329
|
+
var validUpdate = true;
|
|
12330
|
+
if (record && record.hasChildRecords && this.validatedParentIds.indexOf(record.ganttProperties.taskId.toString()) !== -1) {
|
|
12331
|
+
validUpdate = false;
|
|
12332
|
+
}
|
|
12333
|
+
if (validUpdate) {
|
|
12334
|
+
if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
|
|
12335
|
+
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
12336
|
+
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
12337
|
+
this.parent.editModule['updateChildItems'](record);
|
|
12338
|
+
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
12339
|
+
}
|
|
12340
|
+
}
|
|
12341
|
+
else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
|
|
12342
|
+
(record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
12156
12343
|
this.parent.editModule['updateChildItems'](record);
|
|
12157
12344
|
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
12158
12345
|
}
|
|
12346
|
+
if (!ganttProp.hasChildRecords) {
|
|
12347
|
+
this.parent.dataOperation.updateParentItems(record, true);
|
|
12348
|
+
}
|
|
12159
12349
|
}
|
|
12160
|
-
else if (
|
|
12161
|
-
(validUpdate && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
12350
|
+
else if (record && record.hasChildRecords && !ganttProp) {
|
|
12162
12351
|
this.parent.editModule['updateChildItems'](record);
|
|
12163
|
-
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
12164
|
-
}
|
|
12165
|
-
if (!ganttProp.hasChildRecords) {
|
|
12166
|
-
this.parent.dataOperation.updateParentItems(record, true);
|
|
12167
12352
|
}
|
|
12168
12353
|
}
|
|
12169
|
-
else if (record && record.hasChildRecords && !ganttProp) {
|
|
12170
|
-
this.parent.editModule['updateChildItems'](record);
|
|
12171
|
-
}
|
|
12172
12354
|
}
|
|
12173
12355
|
};
|
|
12174
12356
|
/**
|
|
@@ -12251,7 +12433,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12251
12433
|
};
|
|
12252
12434
|
ConnectorLine.prototype.getTaskbarMidpoint = function (isMilestone) {
|
|
12253
12435
|
return Math.floor(isMilestone ?
|
|
12254
|
-
(this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2))
|
|
12436
|
+
(this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) :
|
|
12255
12437
|
(this.parent.chartRowsModule.taskBarMarginTop + (this.parent.chartRowsModule.taskBarHeight / 2))) + 1;
|
|
12256
12438
|
};
|
|
12257
12439
|
/**
|
|
@@ -12265,14 +12447,45 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12265
12447
|
*/
|
|
12266
12448
|
ConnectorLine.prototype.createConnectorLineObject = function (parentGanttData, childGanttData, predecessor) {
|
|
12267
12449
|
var connectorObj = {};
|
|
12268
|
-
var updatedRecords
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12450
|
+
var updatedRecords;
|
|
12451
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
12452
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
12453
|
+
updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
|
|
12454
|
+
this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.expandedRecords;
|
|
12455
|
+
}
|
|
12456
|
+
else {
|
|
12457
|
+
updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
|
|
12458
|
+
this.parent.flatData : this.expandedRecords;
|
|
12459
|
+
}
|
|
12460
|
+
var parentIndex;
|
|
12461
|
+
var childIndex;
|
|
12462
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
12463
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
12464
|
+
var parentData = this.parent.flatData.filter(function (data) {
|
|
12465
|
+
return data.ganttProperties.taskId.toString() == parentGanttData.ganttProperties.taskId.toString();
|
|
12466
|
+
})[0];
|
|
12467
|
+
var childData = this.parent.flatData.filter(function (data) {
|
|
12468
|
+
return data.ganttProperties.taskId.toString() == childGanttData.ganttProperties.taskId.toString();
|
|
12469
|
+
})[0];
|
|
12470
|
+
parentIndex = parentData.index;
|
|
12471
|
+
childIndex = childData.index;
|
|
12472
|
+
}
|
|
12473
|
+
else {
|
|
12474
|
+
parentIndex = updatedRecords.indexOf(parentGanttData);
|
|
12475
|
+
childIndex = updatedRecords.indexOf(childGanttData);
|
|
12476
|
+
}
|
|
12272
12477
|
var parentGanttRecord = parentGanttData.ganttProperties;
|
|
12273
12478
|
var childGanttRecord = childGanttData.ganttProperties;
|
|
12274
|
-
var currentData
|
|
12275
|
-
|
|
12479
|
+
var currentData;
|
|
12480
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
12481
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
12482
|
+
currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
12483
|
+
this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
|
|
12484
|
+
}
|
|
12485
|
+
else {
|
|
12486
|
+
currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
12487
|
+
this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
|
|
12488
|
+
}
|
|
12276
12489
|
connectorObj.parentIndexInCurrentView = currentData.indexOf(parentGanttData);
|
|
12277
12490
|
connectorObj.childIndexInCurrentView = currentData.indexOf(childGanttData);
|
|
12278
12491
|
var isVirtualScroll = this.parent.virtualScrollModule && this.parent.enableVirtualization;
|
|
@@ -13057,8 +13270,17 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
13057
13270
|
if (isNullOrUndefined(id)) {
|
|
13058
13271
|
return null;
|
|
13059
13272
|
}
|
|
13060
|
-
|
|
13061
|
-
this.parent.
|
|
13273
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
13274
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
13275
|
+
var a = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'].filter(function (data) {
|
|
13276
|
+
return data.ganttProperties.taskId.toString() === id.toString();
|
|
13277
|
+
})[0];
|
|
13278
|
+
return a;
|
|
13279
|
+
}
|
|
13280
|
+
else {
|
|
13281
|
+
return this.parent.viewType === 'ResourceView' ? this.parent.flatData[this.parent.getTaskIds().indexOf('T' + id.toString())] :
|
|
13282
|
+
this.parent.flatData[this.parent.ids.indexOf(id.toString())];
|
|
13283
|
+
}
|
|
13062
13284
|
};
|
|
13063
13285
|
/**
|
|
13064
13286
|
* Method to remove connector line from DOM
|
|
@@ -13387,8 +13609,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13387
13609
|
if (taskbarTemplateNode) {
|
|
13388
13610
|
append(taskbarTemplateNode, tooltipTemplate);
|
|
13389
13611
|
}
|
|
13390
|
-
argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate :
|
|
13391
|
-
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args);
|
|
13612
|
+
argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate : data ?
|
|
13613
|
+
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args) : "";
|
|
13392
13614
|
}
|
|
13393
13615
|
else if (args.target.classList.contains('e-baseline-bar') ||
|
|
13394
13616
|
args.target.classList.contains('e-baseline-gantt-milestone')) {
|
|
@@ -13400,8 +13622,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13400
13622
|
if (baseLineTemplateNode) {
|
|
13401
13623
|
append(baseLineTemplateNode, baselineTemplate);
|
|
13402
13624
|
}
|
|
13403
|
-
argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate :
|
|
13404
|
-
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args);
|
|
13625
|
+
argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate : data ?
|
|
13626
|
+
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args) : "";
|
|
13405
13627
|
}
|
|
13406
13628
|
else if (args.target.classList.contains('e-event-markers')) {
|
|
13407
13629
|
argsData.content = this.toolTipObj.content = parent.tooltipModule.getTooltipContent('marker', data, parent, args);
|
|
@@ -13468,7 +13690,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13468
13690
|
// eslint-disable-next-line
|
|
13469
13691
|
Tooltip$$1.prototype.tooltipCloseHandler = function (args) {
|
|
13470
13692
|
this.tooltipMouseEvent = null;
|
|
13471
|
-
if (!this.parent.isAdaptive) {
|
|
13693
|
+
if (!this.parent.isAdaptive && !isNullOrUndefined(this.currentTarget)) {
|
|
13472
13694
|
EventHandler.remove(this.currentTarget, 'mousemove', this.mouseMoveHandler);
|
|
13473
13695
|
}
|
|
13474
13696
|
this.currentTarget = null;
|
|
@@ -13484,34 +13706,38 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13484
13706
|
*/
|
|
13485
13707
|
Tooltip$$1.prototype.updateTooltipPosition = function (args) {
|
|
13486
13708
|
args.element.style.visibility = 'visible';
|
|
13487
|
-
|
|
13488
|
-
|
|
13489
|
-
|
|
13490
|
-
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13510
|
-
|
|
13511
|
-
|
|
13512
|
-
|
|
13513
|
-
|
|
13514
|
-
|
|
13709
|
+
var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
|
|
13710
|
+
if (isNullOrUndefined(parentWithZoomStyle)) {
|
|
13711
|
+
if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
|
|
13712
|
+
return;
|
|
13713
|
+
}
|
|
13714
|
+
var postion = this.getPointorPosition(this.tooltipMouseEvent);
|
|
13715
|
+
var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
|
|
13716
|
+
var topEnd = containerPosition.top + this.parent.chartPane.offsetHeight;
|
|
13717
|
+
var leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
|
|
13718
|
+
var tooltipPositionX = postion.x;
|
|
13719
|
+
var tooltipPositionY = postion.y;
|
|
13720
|
+
if (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
|
|
13721
|
+
while (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
|
|
13722
|
+
tooltipPositionX = leftEnd - args.element.offsetWidth - 10;
|
|
13723
|
+
args.element.style.left = tooltipPositionX + 'px';
|
|
13724
|
+
}
|
|
13725
|
+
}
|
|
13726
|
+
else {
|
|
13727
|
+
tooltipPositionX = tooltipPositionX + 10;
|
|
13728
|
+
args.element.style.left = tooltipPositionX + 'px';
|
|
13729
|
+
}
|
|
13730
|
+
if (window.innerHeight < args.element.offsetHeight + tooltipPositionY) {
|
|
13731
|
+
tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
|
|
13732
|
+
}
|
|
13733
|
+
if ((topEnd < (tooltipPositionY + args.element.offsetHeight + 20))) {
|
|
13734
|
+
tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
|
|
13735
|
+
}
|
|
13736
|
+
else {
|
|
13737
|
+
tooltipPositionY = tooltipPositionY + 10;
|
|
13738
|
+
}
|
|
13739
|
+
args.element.style.top = tooltipPositionY + 'px';
|
|
13740
|
+
}
|
|
13515
13741
|
};
|
|
13516
13742
|
/**
|
|
13517
13743
|
* Method to get mouse pointor position
|
|
@@ -14461,6 +14687,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14461
14687
|
createSpinner({ target: this.element }, this.createElement);
|
|
14462
14688
|
this.trigger('load', {});
|
|
14463
14689
|
this.element.classList.add(root);
|
|
14690
|
+
this.rowHeight = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.rowHeight === 36) ? 46 : this.rowHeight : this.rowHeight;
|
|
14464
14691
|
if (this.isAdaptive) {
|
|
14465
14692
|
this.element.classList.add(adaptive);
|
|
14466
14693
|
}
|
|
@@ -14896,7 +15123,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14896
15123
|
this.wireEvents();
|
|
14897
15124
|
this.notify('initPredessorDialog', {});
|
|
14898
15125
|
}
|
|
14899
|
-
this.
|
|
15126
|
+
if (!this.isFromOnPropertyChange) {
|
|
15127
|
+
this.splitterModule.updateSplitterPosition();
|
|
15128
|
+
}
|
|
14900
15129
|
// if (this.gridLines === 'Vertical' || this.gridLines === 'Both') {
|
|
14901
15130
|
// this.renderChartVerticalLines();
|
|
14902
15131
|
// }
|
|
@@ -14908,6 +15137,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14908
15137
|
removeClass(ganttChartElement.querySelectorAll('.e-critical-milestone'), criticalMilestone);
|
|
14909
15138
|
removeClass(this.element.querySelectorAll('.e-connector-line'), criticalConnectorLineSVG);
|
|
14910
15139
|
removeClass(this.element.querySelectorAll('.e-connector-line-arrow'), criticalConnectorArrowSVG);
|
|
15140
|
+
var innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
|
|
15141
|
+
innerDivs.style.outlineColor = "";
|
|
14911
15142
|
};
|
|
14912
15143
|
Gantt.prototype.wireEvents = function () {
|
|
14913
15144
|
if (this.allowKeyboard) {
|
|
@@ -14999,7 +15230,39 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14999
15230
|
this.treeGridModule.renderTreeGrid();
|
|
15000
15231
|
};
|
|
15001
15232
|
Gantt.prototype.updateCurrentViewData = function () {
|
|
15233
|
+
var _this = this;
|
|
15002
15234
|
this.currentViewData = this.treeGrid.getCurrentViewRecords().slice();
|
|
15235
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping && this.currentViewData.length > 0) {
|
|
15236
|
+
this.autoCalculateDateScheduling = false;
|
|
15237
|
+
this.flatData = [];
|
|
15238
|
+
this.dataOperation.taskIds = [];
|
|
15239
|
+
this.ids = [];
|
|
15240
|
+
this.dataOperation.recordIndex = 0;
|
|
15241
|
+
this.dataOperation.dataArray = this.currentViewData;
|
|
15242
|
+
this.dataOperation.cloneDataSource();
|
|
15243
|
+
if (this.predecessorModule && this.taskFields.dependency) {
|
|
15244
|
+
this.predecessorModule['parentIds'] = [];
|
|
15245
|
+
this.predecessorModule['parentRecord'] = [];
|
|
15246
|
+
this.predecessorModule.updatePredecessors();
|
|
15247
|
+
}
|
|
15248
|
+
var gridData = this.treeGrid.grid.contentModule['rows'];
|
|
15249
|
+
var data = gridData.filter(function (x) {
|
|
15250
|
+
if (x['data'][_this.taskFields.id] === _this.flatData[0].ganttProperties.taskId) {
|
|
15251
|
+
return x;
|
|
15252
|
+
}
|
|
15253
|
+
})[0];
|
|
15254
|
+
var index = data['index'];
|
|
15255
|
+
for (var i = 0; i < this.flatData.length; i++) {
|
|
15256
|
+
this.flatData[i].index = index;
|
|
15257
|
+
index++;
|
|
15258
|
+
}
|
|
15259
|
+
this.currentViewData = this.flatData;
|
|
15260
|
+
this.treeGrid.grid.currentViewData = this.flatData;
|
|
15261
|
+
if (!isNullOrUndefined(this.treeGrid['virtualScrollModule'])) {
|
|
15262
|
+
this.treeGrid['virtualScrollModule'].visualData = this.flatData;
|
|
15263
|
+
this.updatedRecords = this.flatData;
|
|
15264
|
+
}
|
|
15265
|
+
}
|
|
15003
15266
|
};
|
|
15004
15267
|
/**
|
|
15005
15268
|
* @param {IGanttData} records -Defines the delete record collections.
|
|
@@ -15019,7 +15282,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15019
15282
|
* @private
|
|
15020
15283
|
*/
|
|
15021
15284
|
Gantt.prototype.updateContentHeight = function (args) {
|
|
15022
|
-
if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
15285
|
+
if ((!this.allowTaskbarOverlap && !this.ganttChartModule.isCollapseAll && !this.ganttChartModule.isExpandAll) && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
15023
15286
|
return;
|
|
15024
15287
|
}
|
|
15025
15288
|
else {
|
|
@@ -15385,6 +15648,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15385
15648
|
else {
|
|
15386
15649
|
this.getCurrentRecords(args);
|
|
15387
15650
|
}
|
|
15651
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
15652
|
+
this.updateContentHeight();
|
|
15653
|
+
}
|
|
15388
15654
|
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
15389
15655
|
this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
|
|
15390
15656
|
}
|
|
@@ -15400,6 +15666,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15400
15666
|
}
|
|
15401
15667
|
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
15402
15668
|
this.isLoad = false;
|
|
15669
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
15670
|
+
this.autoCalculateDateScheduling = true;
|
|
15671
|
+
}
|
|
15403
15672
|
this.trigger('dataBound', args);
|
|
15404
15673
|
};
|
|
15405
15674
|
/**
|
|
@@ -15620,6 +15889,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15620
15889
|
break;
|
|
15621
15890
|
case 'projectStartDate':
|
|
15622
15891
|
case 'projectEndDate':
|
|
15892
|
+
this.timelineModule.isZoomToFit = false;
|
|
15623
15893
|
this.dataOperation.calculateProjectDates();
|
|
15624
15894
|
this.updateProjectDates(this.cloneProjectStartDate, this.cloneProjectEndDate, this.isTimelineRoundOff);
|
|
15625
15895
|
break;
|
|
@@ -15663,7 +15933,14 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15663
15933
|
if (prop === 'locale') {
|
|
15664
15934
|
this.isLocaleChanged = true;
|
|
15665
15935
|
}
|
|
15666
|
-
|
|
15936
|
+
if (prop === 'taskFields') {
|
|
15937
|
+
if (!isNullOrUndefined(newProp.taskFields.child)) {
|
|
15938
|
+
return;
|
|
15939
|
+
}
|
|
15940
|
+
}
|
|
15941
|
+
if (prop !== 'allowTaskbarDragAndDrop') {
|
|
15942
|
+
isRefresh = true;
|
|
15943
|
+
}
|
|
15667
15944
|
break;
|
|
15668
15945
|
case 'validateManualTasksOnLinking':
|
|
15669
15946
|
this.validateManualTasksOnLinking = newProp.validateManualTasksOnLinking;
|
|
@@ -16343,6 +16620,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16343
16620
|
* @returns {Promise<any>} .
|
|
16344
16621
|
*/
|
|
16345
16622
|
Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
16623
|
+
if (pdfExportProperties && pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
|
|
16624
|
+
pdfExportProperties.pageOrientation == 'Landscape';
|
|
16625
|
+
}
|
|
16346
16626
|
return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
|
|
16347
16627
|
: null;
|
|
16348
16628
|
};
|
|
@@ -16431,14 +16711,17 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16431
16711
|
this.isTimelineRoundOff = isTimelineRoundOff;
|
|
16432
16712
|
this.timelineModule.refreshTimelineByTimeSpan();
|
|
16433
16713
|
this.dataOperation.reUpdateGanttDataPosition();
|
|
16434
|
-
this.
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
this.ganttChartModule.
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
|
|
16714
|
+
if (!this.pdfExportModule || (this.pdfExportModule && !this.pdfExportModule.isPdfExport) || (this.pdfExportModule && this.pdfExportModule.isPdfExport && this.pdfExportModule.helper.exportProps &&
|
|
16715
|
+
this.pdfExportModule.helper.exportProps.fitToWidthSettings && !this.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
16716
|
+
this.timelineModule.updateChartByNewTimeline();
|
|
16717
|
+
this.ganttChartModule.chartBodyContent.style.width = formatUnit(this.timelineModule.totalTimelineWidth);
|
|
16718
|
+
this.ganttChartModule.updateLastRowBottomWidth();
|
|
16719
|
+
if (this.taskFields.dependency) {
|
|
16720
|
+
this.ganttChartModule.reRenderConnectorLines();
|
|
16721
|
+
}
|
|
16722
|
+
if (isFrom !== 'beforeAdd') {
|
|
16723
|
+
this.notify('selectRowByIndex', {});
|
|
16724
|
+
}
|
|
16442
16725
|
}
|
|
16443
16726
|
};
|
|
16444
16727
|
/**
|
|
@@ -16744,8 +17027,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16744
17027
|
}
|
|
16745
17028
|
else {
|
|
16746
17029
|
this.editModule.addRecord(data, rowPosition, rowIndex);
|
|
17030
|
+
if (rowPosition === 'Bottom') {
|
|
17031
|
+
this.selectedRowIndex = rowIndex;
|
|
17032
|
+
}
|
|
16747
17033
|
if (rowPosition === 'Above' || rowPosition === 'Below' || rowPosition === 'Child') {
|
|
16748
|
-
this.currentSelection = data;
|
|
17034
|
+
this.currentSelection = !isNullOrUndefined(data) ? data : this.currentSelection;
|
|
16749
17035
|
}
|
|
16750
17036
|
}
|
|
16751
17037
|
}
|
|
@@ -17013,8 +17299,15 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
17013
17299
|
* @returns {HTMLElement} .
|
|
17014
17300
|
*/
|
|
17015
17301
|
Gantt.prototype.getRowByID = function (id) {
|
|
17302
|
+
var _this = this;
|
|
17016
17303
|
var record = this.getRecordByID(id.toString());
|
|
17017
|
-
var index
|
|
17304
|
+
var index;
|
|
17305
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
17306
|
+
index = this.updatedRecords.map(function (item) { return item[_this.taskFields.id]; }).indexOf(record.ganttProperties.taskId);
|
|
17307
|
+
}
|
|
17308
|
+
else {
|
|
17309
|
+
index = this.updatedRecords.indexOf(record);
|
|
17310
|
+
}
|
|
17018
17311
|
if (index !== -1) {
|
|
17019
17312
|
return this.getRowByIndex(index);
|
|
17020
17313
|
}
|
|
@@ -17475,6 +17768,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
17475
17768
|
__decorate([
|
|
17476
17769
|
Property(true)
|
|
17477
17770
|
], Gantt.prototype, "enableVirtualMaskRow", void 0);
|
|
17771
|
+
__decorate([
|
|
17772
|
+
Property(false)
|
|
17773
|
+
], Gantt.prototype, "loadChildOnDemand", void 0);
|
|
17478
17774
|
__decorate([
|
|
17479
17775
|
Property(true)
|
|
17480
17776
|
], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
|
|
@@ -17981,7 +18277,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
17981
18277
|
args.cancel = true;
|
|
17982
18278
|
return;
|
|
17983
18279
|
}
|
|
17984
|
-
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
18280
|
+
if (data.hasChildRecords && !this.parent.allowParentDependency && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
17985
18281
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
17986
18282
|
|| field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
17987
18283
|
if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
|
|
@@ -18280,6 +18576,9 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
18280
18576
|
* @returns {void} .
|
|
18281
18577
|
*/
|
|
18282
18578
|
CellEdit.prototype.durationEdited = function (args) {
|
|
18579
|
+
if (parseInt(args.data[this.parent.taskFields.duration]) < 0) {
|
|
18580
|
+
args.data[this.parent.taskFields.duration] = 0;
|
|
18581
|
+
}
|
|
18283
18582
|
var ganttProb = args.data.ganttProperties;
|
|
18284
18583
|
var durationString = args.data[this.parent.taskFields.duration];
|
|
18285
18584
|
this.parent.dataOperation.updateDurationValue(durationString, ganttProb);
|
|
@@ -18552,14 +18851,18 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
|
|
|
18552
18851
|
* @returns {void} .
|
|
18553
18852
|
*/
|
|
18554
18853
|
EditTooltip.prototype.updateTooltipPosition = function (args) {
|
|
18555
|
-
// const containerPosition: { top: number, left: number } = this.parent.getOffsetRect(this.parent.chartPane);
|
|
18556
|
-
// const leftEnd: number = containerPosition.left + this.parent.chartPane.offsetWidth;
|
|
18557
|
-
// let tooltipPositionX: number = args.element.offsetLeft;
|
|
18558
|
-
// if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
|
|
18559
|
-
// tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
|
|
18560
|
-
// }
|
|
18561
|
-
// args.element.style.left = tooltipPositionX + 'px';
|
|
18562
18854
|
args.element.style.visibility = 'visible';
|
|
18855
|
+
var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
|
|
18856
|
+
if (isNullOrUndefined(parentWithZoomStyle)) {
|
|
18857
|
+
var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
|
|
18858
|
+
var leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
|
|
18859
|
+
var tooltipPositionX = args.element.offsetLeft;
|
|
18860
|
+
if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
|
|
18861
|
+
tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
|
|
18862
|
+
}
|
|
18863
|
+
args.element.style.left = tooltipPositionX + 'px';
|
|
18864
|
+
args.element.style.visibility = 'visible';
|
|
18865
|
+
}
|
|
18563
18866
|
};
|
|
18564
18867
|
/**
|
|
18565
18868
|
* To show/hide taskbar edit tooltip.
|
|
@@ -18817,13 +19120,10 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18817
19120
|
TaskbarEdit.prototype.mouseDownHandler = function (e) {
|
|
18818
19121
|
if (this.parent.editSettings.allowTaskbarEditing && !this.parent.readOnly) {
|
|
18819
19122
|
this.canDrag = false;
|
|
18820
|
-
if (this.
|
|
19123
|
+
if (this.taskBarEditElement) {
|
|
18821
19124
|
var targetElement = this.getElementByPosition(e);
|
|
18822
19125
|
var element = parentsUntil$1(targetElement, taskBarMainContainer);
|
|
18823
|
-
if (element && element.innerHTML === this.taskBarEditElement.innerHTML
|
|
18824
|
-
!(targetElement.classList.contains(connectorPointLeft) ||
|
|
18825
|
-
targetElement.classList.contains(connectorPointRight)) &&
|
|
18826
|
-
!this.tapPointOnFocus) {
|
|
19126
|
+
if ((element && element.innerHTML === this.taskBarEditElement.innerHTML || this.taskBarEditElement.classList.contains("e-segmented-taskbar") || this.taskBarEditElement.classList.contains("collpse-parent-border"))) {
|
|
18827
19127
|
this.updateTaskBarEditElement(e);
|
|
18828
19128
|
this.canDrag = true;
|
|
18829
19129
|
e.preventDefault();
|
|
@@ -18846,7 +19146,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18846
19146
|
}
|
|
18847
19147
|
return;
|
|
18848
19148
|
}
|
|
18849
|
-
if (this.tapPointOnFocus && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
|
|
19149
|
+
if (this.tapPointOnFocus && !isNullOrUndefined(this.taskBarEditElement) && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
|
|
18850
19150
|
this.connectorSecondRecord = this.parent.ganttChartModule.getRecordByTaskBar(element);
|
|
18851
19151
|
this.connectorSecondAction = 'ConnectorPointLeftDrag';
|
|
18852
19152
|
this.connectorSecondElement = element;
|
|
@@ -18857,8 +19157,16 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18857
19157
|
this.showHideActivePredecessors(false);
|
|
18858
19158
|
this.initPublicProp();
|
|
18859
19159
|
}
|
|
18860
|
-
else if (targetElement.classList.contains(connectorPointLeftHover)
|
|
18861
|
-
|
|
19160
|
+
else if (targetElement.classList.contains(connectorPointLeftHover)) {
|
|
19161
|
+
this.canDrag = false;
|
|
19162
|
+
this.multipleSelectionEnabled();
|
|
19163
|
+
this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
|
|
19164
|
+
this.tapPointOnFocus = true;
|
|
19165
|
+
this.taskBarEditAction = 'ConnectorPointLeftDrag';
|
|
19166
|
+
this.connectorSecondRecord = this.taskBarEditRecord;
|
|
19167
|
+
this.taskBarEditingAction(e, false);
|
|
19168
|
+
}
|
|
19169
|
+
else if (targetElement.classList.contains(connectorPointRightHover)) {
|
|
18862
19170
|
this.canDrag = false;
|
|
18863
19171
|
this.multipleSelectionEnabled();
|
|
18864
19172
|
this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
|
|
@@ -18988,7 +19296,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18988
19296
|
}
|
|
18989
19297
|
}
|
|
18990
19298
|
if (this.parent.editSettings.allowTaskbarEditing && element) {
|
|
18991
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
19299
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
18992
19300
|
this.editElement = element;
|
|
18993
19301
|
this.realTaskbarElement = this.editElement;
|
|
18994
19302
|
var index = this.editElement.getAttribute('data-segment-index');
|
|
@@ -19069,7 +19377,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19069
19377
|
else {
|
|
19070
19378
|
if (this.parent.isAdaptive) {
|
|
19071
19379
|
if (this.taskBarEditElement) {
|
|
19072
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
19380
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
19073
19381
|
}
|
|
19074
19382
|
this.initPublicProp();
|
|
19075
19383
|
}
|
|
@@ -19129,8 +19437,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19129
19437
|
&& isShowConnectorPoints) {
|
|
19130
19438
|
var connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
|
|
19131
19439
|
element : element.parentElement;
|
|
19132
|
-
|
|
19133
|
-
|
|
19440
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointLeft))) {
|
|
19441
|
+
addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
|
|
19442
|
+
}
|
|
19443
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointRight))) {
|
|
19444
|
+
addClass([connectorElement.querySelector('.' + connectorPointRight)], [connectorPointRightHover]);
|
|
19445
|
+
}
|
|
19134
19446
|
}
|
|
19135
19447
|
}
|
|
19136
19448
|
else if (!fadeConnectorLine) {
|
|
@@ -19257,7 +19569,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19257
19569
|
var item = this.taskBarEditRecord.ganttProperties;
|
|
19258
19570
|
this.previousItem = this.parent.timelineModule.extendFunction(item, this.previousItemProperty);
|
|
19259
19571
|
if (this.taskBarEditAction !== 'ConnectorPointLeftDrag' &&
|
|
19260
|
-
this.taskBarEditAction !== 'ConnectorPointRightDrag'
|
|
19572
|
+
this.taskBarEditAction !== 'ConnectorPointRightDrag' &&
|
|
19573
|
+
!(this.parent.viewType == 'ResourceView' && this.taskBarEditAction == 'ParentDrag')) {
|
|
19261
19574
|
this.editTooltip.showHideTaskbarEditTooltip(true, this.segmentIndex);
|
|
19262
19575
|
}
|
|
19263
19576
|
this.taskBarEditElement.setAttribute('aria-grabbed', 'true');
|
|
@@ -19295,6 +19608,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19295
19608
|
this.dragMouseLeave = false;
|
|
19296
19609
|
this.isMouseDragCheck();
|
|
19297
19610
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
19611
|
+
event.preventDefault();
|
|
19298
19612
|
if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
|
|
19299
19613
|
var currentElement = this.editElement.parentElement;
|
|
19300
19614
|
currentElement.style.setProperty("position", "absolute");
|
|
@@ -19384,9 +19698,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19384
19698
|
this.taskBarEditAction === 'ConnectorPointRightDrag') {
|
|
19385
19699
|
this.updateConnectorLineSecondProperties(e);
|
|
19386
19700
|
this.triggerDependencyEvent(e);
|
|
19387
|
-
|
|
19388
|
-
this.drawFalseLine();
|
|
19389
|
-
}
|
|
19701
|
+
this.drawFalseLine();
|
|
19390
19702
|
}
|
|
19391
19703
|
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
|
|
19392
19704
|
if (this.dragMoveY > this.mouseMoveY) {
|
|
@@ -19398,7 +19710,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19398
19710
|
this.currentItemTop = this.currentItemTop + this.mouseMoveY;
|
|
19399
19711
|
}
|
|
19400
19712
|
var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
|
|
19401
|
-
this.
|
|
19713
|
+
if (this.parent.isAdaptive || e.touches) {
|
|
19714
|
+
this.dragMoveY = e.touches[0].pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
19715
|
+
}
|
|
19716
|
+
else {
|
|
19717
|
+
this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
19718
|
+
}
|
|
19402
19719
|
this.topValue = this.currentItemTop;
|
|
19403
19720
|
this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
|
|
19404
19721
|
this.topValue == this.currentItemTop) ? this.topValue :
|
|
@@ -19785,6 +20102,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19785
20102
|
if (this.segmentIndex === 0) {
|
|
19786
20103
|
this.parent.setRecordValue('width', item.width - differenceWidth, item, true);
|
|
19787
20104
|
this.parent.setRecordValue('left', item.left + differenceWidth, item, true);
|
|
20105
|
+
segment.width = segment.width - differenceWidth;
|
|
19788
20106
|
for (var i = 1; i < item.segments.length; i++) {
|
|
19789
20107
|
var segment_3 = segments[i];
|
|
19790
20108
|
segment_3.left = segment_3.left - differenceWidth;
|
|
@@ -20265,6 +20583,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20265
20583
|
var traceParentTaskBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentTaskBar);
|
|
20266
20584
|
var traceParentProgressBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentProgressBar);
|
|
20267
20585
|
var traceConnectorPointRight = this.taskBarEditElement.querySelector('.' + rightConnectorPointOuterDiv);
|
|
20586
|
+
var segmentConnectorPointRight = taskBarMainContainer$$1.querySelector('.' + rightConnectorPointOuterDiv);
|
|
20268
20587
|
var manualParentTaskbar = this.taskBarEditElement;
|
|
20269
20588
|
var manualTaskbar = this.taskBarEditElement.querySelector('.' + manualParentTaskBar);
|
|
20270
20589
|
var manualParentRight = this.taskBarEditElement.querySelector('.' + manualParentRightResizer);
|
|
@@ -20291,6 +20610,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20291
20610
|
}
|
|
20292
20611
|
taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
|
|
20293
20612
|
taskBarMainContainer$$1.style.width = (width) + 'px';
|
|
20613
|
+
if (segmentedTaskBarContainer && segmentConnectorPointRight) {
|
|
20614
|
+
segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
|
|
20615
|
+
}
|
|
20294
20616
|
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
|
|
20295
20617
|
(this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
|
|
20296
20618
|
taskBarMainContainer$$1.style.setProperty('top', (this.topValue) + 'px');
|
|
@@ -20407,9 +20729,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20407
20729
|
}
|
|
20408
20730
|
if (segmentedTaskBarContainer) {
|
|
20409
20731
|
taskBarRightResizer$$1.style.setProperty(position, rightResizer + 'px');
|
|
20410
|
-
traceChildProgressBar$$1.style.width = (segment.
|
|
20732
|
+
traceChildProgressBar$$1.style.width = (segment.width) + 'px';
|
|
20411
20733
|
if (!isNullOrUndefined(childProgressResizer$$1)) {
|
|
20412
|
-
childProgressResizer$$1.style.setProperty(position, segment.
|
|
20734
|
+
childProgressResizer$$1.style.setProperty(position, segment.width - 10 + 'px');
|
|
20413
20735
|
}
|
|
20414
20736
|
}
|
|
20415
20737
|
}
|
|
@@ -20479,9 +20801,6 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20479
20801
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor && (!this.connectorSecondRecord.hasChildRecords ||
|
|
20480
20802
|
this.connectorSecondRecord.hasChildRecords && this.parent.allowParentDependency)) {
|
|
20481
20803
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
20482
|
-
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
20483
|
-
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
20484
|
-
}
|
|
20485
20804
|
}
|
|
20486
20805
|
else {
|
|
20487
20806
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -20771,6 +21090,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20771
21090
|
TaskbarEdit.prototype.updateConnectorLineSecondProperties = function (e) {
|
|
20772
21091
|
var target = this.getElementByPosition(e);
|
|
20773
21092
|
var element = parentsUntil$1(target, taskBarMainContainer);
|
|
21093
|
+
var isBigger = document.body.className.includes("e-bigger");
|
|
20774
21094
|
this.connectorSecondAction = null;
|
|
20775
21095
|
var scrollTop = 0;
|
|
20776
21096
|
if (parentsUntil$1(target, connectorPointLeft)) {
|
|
@@ -20793,20 +21113,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20793
21113
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
20794
21114
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
20795
21115
|
if (!this.parent.allowParentDependency) {
|
|
20796
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
21116
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
20797
21117
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
20798
21118
|
}
|
|
20799
21119
|
else {
|
|
20800
21120
|
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
20801
|
-
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft;
|
|
21121
|
+
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
20802
21122
|
this.elementOffsetTop = ((this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
20803
21123
|
}
|
|
20804
21124
|
else {
|
|
20805
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
21125
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
20806
21126
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
20807
21127
|
}
|
|
20808
21128
|
}
|
|
20809
|
-
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth;
|
|
21129
|
+
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth + ((isBigger) ? 20 : 0);
|
|
20810
21130
|
this.elementOffsetHeight = this.realTaskbarElement.offsetHeight;
|
|
20811
21131
|
}
|
|
20812
21132
|
this.showHideTaskBarEditingElements(element, this.highlightedSecondElement, true);
|
|
@@ -20914,18 +21234,16 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20914
21234
|
// Get XY coordinates for touch and non-touch device
|
|
20915
21235
|
TaskbarEdit.prototype.getCoordinate = function (event) {
|
|
20916
21236
|
var coordinates = {};
|
|
20917
|
-
|
|
20918
|
-
|
|
20919
|
-
|
|
20920
|
-
|
|
20921
|
-
|
|
21237
|
+
var e = event;
|
|
21238
|
+
coordinates.pageX = e.pageX;
|
|
21239
|
+
coordinates.pageY = e.pageY;
|
|
21240
|
+
if (event && event.type !== 'click') {
|
|
21241
|
+
var e_1 = event;
|
|
21242
|
+
if (e_1.type === 'touchmove' || e_1.type === 'touchstart' || e_1.type === 'touchend') {
|
|
21243
|
+
coordinates.pageX = e_1.changedTouches[0].pageX;
|
|
21244
|
+
coordinates.pageY = e_1.changedTouches[0].pageY;
|
|
20922
21245
|
}
|
|
20923
21246
|
}
|
|
20924
|
-
else if (event) {
|
|
20925
|
-
var e = event;
|
|
20926
|
-
coordinates.pageX = e.pageX;
|
|
20927
|
-
coordinates.pageY = e.pageY;
|
|
20928
|
-
}
|
|
20929
21247
|
return coordinates;
|
|
20930
21248
|
};
|
|
20931
21249
|
// Get current target element by mouse position
|
|
@@ -21877,7 +22195,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
21877
22195
|
if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
|
|
21878
22196
|
this.updateScheduleFields(dialog, ganttProp, 'endDate');
|
|
21879
22197
|
}
|
|
21880
|
-
if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName) {
|
|
22198
|
+
if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName || ganttProp.duration >= 0) {
|
|
21881
22199
|
this.updateScheduleFields(dialog, ganttProp, 'duration');
|
|
21882
22200
|
}
|
|
21883
22201
|
if (!isNullOrUndefined(tasks.work) && tasks.work !== colName) {
|
|
@@ -22035,17 +22353,33 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
22035
22353
|
var ganttProp = currentData.ganttProperties;
|
|
22036
22354
|
var taskSettings = ganttObj.taskFields;
|
|
22037
22355
|
if (taskSettings.duration === columnName) {
|
|
22038
|
-
if (!isNullOrUndefined(value) && value !== '') {
|
|
22356
|
+
if (!isNullOrUndefined(value) && value !== '' && parseInt(value) >= 0) {
|
|
22039
22357
|
ganttObj.dataOperation.updateDurationValue(value, ganttProp);
|
|
22040
22358
|
this.parent.setRecordValue(taskSettings.duration, value, currentData);
|
|
22041
22359
|
this.parent.setRecordValue('taskData.' + taskSettings.duration, ganttProp.duration, currentData);
|
|
22360
|
+
this.validateDuration(currentData);
|
|
22042
22361
|
}
|
|
22043
22362
|
else {
|
|
22044
22363
|
if (ganttObj.allowUnscheduledTasks) {
|
|
22045
|
-
|
|
22364
|
+
if ((ganttProp.startDate && ganttProp.endDate && ganttProp.startDate.getTime() > ganttProp.endDate.getTime()) || value.indexOf('-') !== -1) {
|
|
22365
|
+
this.parent.setRecordValue('duration', 0, ganttProp, true);
|
|
22366
|
+
if (ganttProp.endDate) {
|
|
22367
|
+
this.parent.setRecordValue('startDate', ganttProp.endDate, ganttProp, true);
|
|
22368
|
+
}
|
|
22369
|
+
}
|
|
22370
|
+
else {
|
|
22371
|
+
if (value === "") {
|
|
22372
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
22373
|
+
if (ganttProp.endDate) {
|
|
22374
|
+
this.parent.setRecordValue('endDate', null, ganttProp, true);
|
|
22375
|
+
}
|
|
22376
|
+
}
|
|
22377
|
+
else {
|
|
22378
|
+
this.parent.setRecordValue('duration', ganttProp.duration, ganttProp, true);
|
|
22379
|
+
}
|
|
22380
|
+
}
|
|
22046
22381
|
}
|
|
22047
22382
|
}
|
|
22048
|
-
this.validateDuration(currentData);
|
|
22049
22383
|
this.parent.editModule.updateResourceRelatedFields(currentData, 'duration');
|
|
22050
22384
|
}
|
|
22051
22385
|
if (taskSettings.startDate === columnName) {
|
|
@@ -22053,13 +22387,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
22053
22387
|
var startDate = this.parent.dateValidationModule.getDateFromFormat(value);
|
|
22054
22388
|
startDate = this.parent.dateValidationModule.checkStartDate(startDate, ganttProp);
|
|
22055
22389
|
this.parent.setRecordValue('startDate', startDate, ganttProp, true);
|
|
22390
|
+
this.validateStartDate(currentData);
|
|
22056
22391
|
}
|
|
22057
22392
|
else {
|
|
22058
22393
|
if (ganttObj.allowUnscheduledTasks && !(currentData.hasChildRecords)) {
|
|
22059
22394
|
this.parent.setRecordValue('startDate', null, ganttProp, true);
|
|
22395
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
22396
|
+
this.parent.setRecordValue('isMilestone', false, ganttProp, true);
|
|
22060
22397
|
}
|
|
22061
22398
|
}
|
|
22062
|
-
this.validateStartDate(currentData);
|
|
22063
22399
|
}
|
|
22064
22400
|
if (taskSettings.endDate === columnName) {
|
|
22065
22401
|
if (value !== '') {
|
|
@@ -22074,13 +22410,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
22074
22410
|
if (isNullOrUndefined(ganttProp.startDate) || endDate.getTime() > (ganttProp.startDate).getTime()) {
|
|
22075
22411
|
this.parent.setRecordValue('endDate', endDate, ganttProp, true);
|
|
22076
22412
|
}
|
|
22413
|
+
this.validateEndDate(currentData);
|
|
22077
22414
|
}
|
|
22078
22415
|
else {
|
|
22079
22416
|
if (ganttObj.allowUnscheduledTasks) {
|
|
22080
22417
|
this.parent.setRecordValue('endDate', null, ganttProp, true);
|
|
22418
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
22419
|
+
this.parent.setRecordValue('isMilestone', false, ganttProp, true);
|
|
22081
22420
|
}
|
|
22082
22421
|
}
|
|
22083
|
-
this.validateEndDate(currentData);
|
|
22084
22422
|
}
|
|
22085
22423
|
if (taskSettings.work === columnName) {
|
|
22086
22424
|
if (!isNullOrUndefined(value) && value !== '') {
|
|
@@ -22487,7 +22825,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
22487
22825
|
var eDate = getValue('endDate', selectedItem);
|
|
22488
22826
|
var duration = getValue('duration', selectedItem);
|
|
22489
22827
|
var startDate_1 = !isNullOrUndefined(gridData) && gridData.length > 0 ?
|
|
22490
|
-
!isNullOrUndefined(taskFields.endDate) ? new Date(getValue('endDate', gridData[0]).getTime()) :
|
|
22828
|
+
(!isNullOrUndefined(taskFields.endDate) && !isNullOrUndefined(gridData[0].endDate)) ? new Date(getValue('endDate', gridData[0]).getTime()) :
|
|
22491
22829
|
new Date(getValue('startDate', gridData[0]).getTime()) :
|
|
22492
22830
|
!isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate) &&
|
|
22493
22831
|
new Date(this.beforeOpenArgs.rowData.ganttProperties.startDate.getTime());
|
|
@@ -24706,6 +25044,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24706
25044
|
var ganttPropByMapping = getSwapKey(ganttObj.columnMapping);
|
|
24707
25045
|
var scheduleFieldNames = [];
|
|
24708
25046
|
var isScheduleValueUpdated = false;
|
|
25047
|
+
if (!isNullOrUndefined(ganttData[tasks.milestone])) {
|
|
25048
|
+
if (ganttData[tasks.milestone] === true) {
|
|
25049
|
+
ganttData[tasks.milestone] = false;
|
|
25050
|
+
}
|
|
25051
|
+
}
|
|
24709
25052
|
for (var _i = 0, _b = Object.keys(data); _i < _b.length; _i++) {
|
|
24710
25053
|
var key = _b[_i];
|
|
24711
25054
|
if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
|
|
@@ -24767,6 +25110,22 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24767
25110
|
else if (key === tasks.cssClass) {
|
|
24768
25111
|
ganttPropKey = 'cssClass';
|
|
24769
25112
|
}
|
|
25113
|
+
else if (key === tasks.milestone) {
|
|
25114
|
+
ganttPropKey = 'isMilestone';
|
|
25115
|
+
if (!isNullOrUndefined(tasks.duration)) {
|
|
25116
|
+
var ganttProp = ganttData.ganttProperties;
|
|
25117
|
+
var durationValue = data[tasks.duration];
|
|
25118
|
+
if (value) {
|
|
25119
|
+
durationValue = 0;
|
|
25120
|
+
}
|
|
25121
|
+
else {
|
|
25122
|
+
durationValue = durationValue <= 0 ? 1 : durationValue;
|
|
25123
|
+
}
|
|
25124
|
+
ganttObj.setRecordValue(tasks.duration, durationValue, ganttData, true);
|
|
25125
|
+
ganttObj.setRecordValue('duration', durationValue, ganttProp, true);
|
|
25126
|
+
ganttObj.setRecordValue('taskData.' + tasks.duration, durationValue, ganttData);
|
|
25127
|
+
}
|
|
25128
|
+
}
|
|
24770
25129
|
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
24771
25130
|
ganttPropKey = 'segments';
|
|
24772
25131
|
/* eslint-disable-next-line */
|
|
@@ -25166,10 +25525,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25166
25525
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
25167
25526
|
}
|
|
25168
25527
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
25169
|
-
(args.action === "DrawConnectorLine")
|
|
25528
|
+
(args.action === "DrawConnectorLine")) {
|
|
25170
25529
|
this.updateChildItems(ganttRecord);
|
|
25171
25530
|
}
|
|
25172
25531
|
this.updateParentItemOnEditing();
|
|
25532
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
25173
25533
|
}
|
|
25174
25534
|
/** Update parent up-to zeroth level */
|
|
25175
25535
|
if (ganttRecord.parentItem) {
|
|
@@ -25182,6 +25542,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25182
25542
|
this.updateParentItemOnEditing();
|
|
25183
25543
|
}
|
|
25184
25544
|
}
|
|
25545
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit && this.parent.connectorLineEditModule && args.data) {
|
|
25546
|
+
this.parent.connectorLineEditModule['calculateOffset'](args.data);
|
|
25547
|
+
}
|
|
25548
|
+
this.parent.predecessorModule['validatedParentIds'] = [];
|
|
25185
25549
|
this.initiateSaveAction(args);
|
|
25186
25550
|
};
|
|
25187
25551
|
Edit$$1.prototype.updateParentItemOnEditing = function () {
|
|
@@ -25201,7 +25565,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25201
25565
|
*/
|
|
25202
25566
|
Edit$$1.prototype.updateParentChildRecord = function (data) {
|
|
25203
25567
|
var ganttRecord = data;
|
|
25204
|
-
if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
|
|
25568
|
+
if (ganttRecord.hasChildRecords && this.taskbarMoved && (ganttRecord[this.parent.taskFields.manual] === false || this.parent.taskMode === 'Auto') && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
|
|
25205
25569
|
this.updateChildItems(ganttRecord);
|
|
25206
25570
|
}
|
|
25207
25571
|
if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
|
|
@@ -25677,6 +26041,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25677
26041
|
this.updateScheduleDatesOnEditing(args);
|
|
25678
26042
|
}
|
|
25679
26043
|
}
|
|
26044
|
+
if (this.parent.enableCriticalPath) {
|
|
26045
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
26046
|
+
criticalModule.showCriticalPath(true);
|
|
26047
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
26048
|
+
}
|
|
25680
26049
|
if (!this.parent.editSettings.allowTaskbarEditing || (this.parent.editSettings.allowTaskbarEditing &&
|
|
25681
26050
|
!this.taskbarEditModule.dependencyCancel)) {
|
|
25682
26051
|
eventArgs.requestType = 'save';
|
|
@@ -25690,11 +26059,6 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25690
26059
|
eventArgs.taskBarEditAction = args.taskBarEditAction;
|
|
25691
26060
|
}
|
|
25692
26061
|
this.endEditAction(args);
|
|
25693
|
-
if (this.parent.enableCriticalPath) {
|
|
25694
|
-
var criticalModule = this.parent.criticalPathModule;
|
|
25695
|
-
criticalModule.showCriticalPath(true);
|
|
25696
|
-
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
25697
|
-
}
|
|
25698
26062
|
this.parent.trigger('actionComplete', eventArgs);
|
|
25699
26063
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
25700
26064
|
this.parent.hideMaskRow();
|
|
@@ -25880,7 +26244,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25880
26244
|
if (!this.parent.taskFields.parentID) {
|
|
25881
26245
|
var deleteRecordIDs = [];
|
|
25882
26246
|
deleteRecordIDs.push(deletedRow.ganttProperties.rowUniqueID.toString());
|
|
25883
|
-
this.parent.
|
|
26247
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
26248
|
+
this.parent.editModule.removeFromDataSource(deleteRecordIDs);
|
|
26249
|
+
}
|
|
25884
26250
|
}
|
|
25885
26251
|
var flatRecordIndex = this.parent.flatData.indexOf(deletedRow);
|
|
25886
26252
|
if (gObj.taskFields.parentID) {
|
|
@@ -27169,6 +27535,57 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27169
27535
|
}
|
|
27170
27536
|
}
|
|
27171
27537
|
};
|
|
27538
|
+
/**
|
|
27539
|
+
* Method to update the values to client side from server side.
|
|
27540
|
+
*
|
|
27541
|
+
* @param {Object} e - Defines the new modified data from the server.
|
|
27542
|
+
* @param {ITaskAddedEventArgs} args - Defines the client side data.
|
|
27543
|
+
* @returns {void} .
|
|
27544
|
+
*/
|
|
27545
|
+
Edit$$1.prototype.updateClientDataFromServer = function (e, args) {
|
|
27546
|
+
var serverReturnedValue = e.addedRecords[0];
|
|
27547
|
+
var _aLength = Object.keys(serverReturnedValue).length;
|
|
27548
|
+
for (var j = 0, _a = Object.keys(serverReturnedValue); j < _aLength; j++) {
|
|
27549
|
+
var key = _a[parseInt(j.toString(), 10)];
|
|
27550
|
+
args.data["" + key] = serverReturnedValue["" + key];
|
|
27551
|
+
}
|
|
27552
|
+
if (this.parent.taskFields.id !== null) {
|
|
27553
|
+
args.data.ganttProperties['taskId'] = serverReturnedValue[this.parent.taskFields.id];
|
|
27554
|
+
}
|
|
27555
|
+
if (this.parent.taskFields.name !== null) {
|
|
27556
|
+
args.data.ganttProperties['taskName'] = serverReturnedValue[this.parent.taskFields.name];
|
|
27557
|
+
}
|
|
27558
|
+
if (this.parent.taskFields.startDate !== null) {
|
|
27559
|
+
args.data.ganttProperties['startDate'] = serverReturnedValue[this.parent.taskFields.startDate];
|
|
27560
|
+
}
|
|
27561
|
+
if (this.parent.taskFields.endDate !== null) {
|
|
27562
|
+
args.data.ganttProperties['endDate'] = serverReturnedValue[this.parent.taskFields.endDate];
|
|
27563
|
+
}
|
|
27564
|
+
if (this.parent.taskFields.duration !== null) {
|
|
27565
|
+
args.data.ganttProperties['duration'] = parseInt(serverReturnedValue[this.parent.taskFields.duration]);
|
|
27566
|
+
}
|
|
27567
|
+
if (this.parent.taskFields.durationUnit !== null) {
|
|
27568
|
+
args.data.ganttProperties['durationUnit'] = serverReturnedValue[this.parent.taskFields.durationUnit];
|
|
27569
|
+
}
|
|
27570
|
+
if (this.parent.taskFields.progress !== null) {
|
|
27571
|
+
args.data.ganttProperties['progress'] = serverReturnedValue[this.parent.taskFields.progress];
|
|
27572
|
+
}
|
|
27573
|
+
if (this.parent.taskFields.dependency !== null) {
|
|
27574
|
+
args.data.ganttProperties['dependency'] = serverReturnedValue[this.parent.taskFields.dependency];
|
|
27575
|
+
}
|
|
27576
|
+
if (this.parent.taskFields.parentID !== null) {
|
|
27577
|
+
args.data.ganttProperties['parentID'] = serverReturnedValue[this.parent.taskFields.parentID];
|
|
27578
|
+
}
|
|
27579
|
+
if (this.parent.taskFields.baselineEndDate !== null) {
|
|
27580
|
+
args.data.ganttProperties['baselineEndDate'] = serverReturnedValue[this.parent.taskFields.baselineEndDate];
|
|
27581
|
+
}
|
|
27582
|
+
if (this.parent.taskFields.baselineStartDate !== null) {
|
|
27583
|
+
args.data.ganttProperties['baselineStartDate'] = serverReturnedValue[this.parent.taskFields.baselineStartDate];
|
|
27584
|
+
}
|
|
27585
|
+
if (this.parent.taskFields.resourceInfo !== null) {
|
|
27586
|
+
args.data.ganttProperties['resources'] = serverReturnedValue[this.parent.taskFields.resourceInfo];
|
|
27587
|
+
}
|
|
27588
|
+
};
|
|
27172
27589
|
/**
|
|
27173
27590
|
* Method to add new record.
|
|
27174
27591
|
*
|
|
@@ -27230,7 +27647,8 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27230
27647
|
/* tslint:disable-next-line */
|
|
27231
27648
|
var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
27232
27649
|
var adaptor = data_2.adaptor;
|
|
27233
|
-
|
|
27650
|
+
var moduleName = adaptor.getModuleName();
|
|
27651
|
+
if (!(moduleName == "WebApiAdaptor" || moduleName == "ODataAdaptor" || moduleName == "ODataV4Adaptor") || data_2.dataSource.batchUrl) {
|
|
27234
27652
|
/* tslint:disable-next-line */
|
|
27235
27653
|
var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
|
|
27236
27654
|
crud.then(function (e) {
|
|
@@ -27240,6 +27658,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27240
27658
|
_this.parent.setRecordValue('taskData', e.addedRecords[0], args.data);
|
|
27241
27659
|
_this.parent.setRecordValue(_this.parent.taskFields.id, e.addedRecords[0][_this.parent.taskFields.id], args.data);
|
|
27242
27660
|
_this.parent.setRecordValue('rowUniqueID', e.addedRecords[0][_this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
|
|
27661
|
+
_this.updateClientDataFromServer(e, args);
|
|
27243
27662
|
var idsIndex = _this.parent.ids.indexOf(prevID_1);
|
|
27244
27663
|
if (idsIndex !== -1) {
|
|
27245
27664
|
_this.parent.ids[idsIndex] = e.addedRecords[0][_this.parent.taskFields.id].toString();
|
|
@@ -28542,6 +28961,9 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
28542
28961
|
break;
|
|
28543
28962
|
}
|
|
28544
28963
|
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
28964
|
+
if (parentNode.parentNode instanceof HTMLDocument) {
|
|
28965
|
+
break;
|
|
28966
|
+
}
|
|
28545
28967
|
parentNode = parentNode.parentNode;
|
|
28546
28968
|
marginLeft = parentNode.style.marginLeft;
|
|
28547
28969
|
}
|
|
@@ -28968,7 +29390,24 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
28968
29390
|
* @returns {Object[]} .
|
|
28969
29391
|
*/
|
|
28970
29392
|
Selection$$1.prototype.getSelectedRecords = function () {
|
|
28971
|
-
|
|
29393
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
29394
|
+
var selectedRows = [];
|
|
29395
|
+
var selectedIndexes_1 = this.parent.selectionModule.getSelectedRowIndexes();
|
|
29396
|
+
var _loop_1 = function (i) {
|
|
29397
|
+
var rec = this_1.parent.currentViewData.filter(function (data) {
|
|
29398
|
+
return data.index == selectedIndexes_1[i];
|
|
29399
|
+
})[0];
|
|
29400
|
+
selectedRows.push(rec);
|
|
29401
|
+
};
|
|
29402
|
+
var this_1 = this;
|
|
29403
|
+
for (var i = 0; i < selectedIndexes_1.length; i++) {
|
|
29404
|
+
_loop_1(i);
|
|
29405
|
+
}
|
|
29406
|
+
return selectedRows;
|
|
29407
|
+
}
|
|
29408
|
+
else {
|
|
29409
|
+
return this.parent.treeGrid.getSelectedRecords();
|
|
29410
|
+
}
|
|
28972
29411
|
};
|
|
28973
29412
|
/**
|
|
28974
29413
|
* Get the selected records for cell selection.
|
|
@@ -29068,19 +29507,19 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
29068
29507
|
records = [records];
|
|
29069
29508
|
}
|
|
29070
29509
|
var ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
|
|
29071
|
-
var
|
|
29510
|
+
var _loop_2 = function (i) {
|
|
29072
29511
|
var selectedRow = ganttRow.filter(function (e) {
|
|
29073
29512
|
// eslint-disable-next-line
|
|
29074
29513
|
return parseInt(e.getAttribute('aria-rowindex'), 0) === records[i];
|
|
29075
29514
|
})[0];
|
|
29076
29515
|
if (!isNullOrUndefined(selectedRow)) {
|
|
29077
29516
|
// eslint-disable-next-line
|
|
29078
|
-
|
|
29517
|
+
this_2.getSelectedRowIndexes().indexOf(records[i]) > -1 ? this_2.addClass(selectedRow) : this_2.removeClass(selectedRow);
|
|
29079
29518
|
}
|
|
29080
29519
|
};
|
|
29081
|
-
var
|
|
29520
|
+
var this_2 = this;
|
|
29082
29521
|
for (var i = 0; i < records.length; i++) {
|
|
29083
|
-
|
|
29522
|
+
_loop_2(i);
|
|
29084
29523
|
}
|
|
29085
29524
|
};
|
|
29086
29525
|
Selection$$1.prototype.addClass = function (selectedRow) {
|
|
@@ -29633,6 +30072,14 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
|
|
|
29633
30072
|
var edit = gObj.editSettings;
|
|
29634
30073
|
var gID = this.id;
|
|
29635
30074
|
var ind = gObj.selectedRowIndex;
|
|
30075
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
30076
|
+
for (var i = 0; i < gObj.updatedRecords.length; i++) {
|
|
30077
|
+
if (gObj.updatedRecords[i].index === ind) {
|
|
30078
|
+
ind = i;
|
|
30079
|
+
break;
|
|
30080
|
+
}
|
|
30081
|
+
}
|
|
30082
|
+
}
|
|
29636
30083
|
var previousGanttRecord;
|
|
29637
30084
|
var isSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length === 1 ||
|
|
29638
30085
|
gObj.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
@@ -30167,6 +30614,7 @@ var DayMarkers = /** @__PURE__ @class */ (function () {
|
|
|
30167
30614
|
/** @hidden */
|
|
30168
30615
|
var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
30169
30616
|
function CriticalPath(parent) {
|
|
30617
|
+
this.validatedids = [];
|
|
30170
30618
|
this.resourceCollectionIds = [];
|
|
30171
30619
|
this.criticalTasks = [];
|
|
30172
30620
|
this.parent = parent;
|
|
@@ -30193,6 +30641,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30193
30641
|
var collectionTaskId = [];
|
|
30194
30642
|
var fromDataObject = [];
|
|
30195
30643
|
var criticalPathIds = [];
|
|
30644
|
+
this.criticalTasks = [];
|
|
30196
30645
|
/* eslint-disable-next-line */
|
|
30197
30646
|
if (parentRecords[0].ganttProperties.autoEndDate > parentRecords[0].ganttProperties.endDate && !parentRecords[0].ganttProperties.isAutoSchedule) {
|
|
30198
30647
|
checkEndDate = parentRecords[0].ganttProperties.autoEndDate;
|
|
@@ -30389,6 +30838,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30389
30838
|
this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, totalRecords, modelIds);
|
|
30390
30839
|
}
|
|
30391
30840
|
criticalPathIds = this.finalCriticalPath(collection, taskBeyondEnddate, totalRecords, modelIds, checkEndDate);
|
|
30841
|
+
this.validatedids = [];
|
|
30392
30842
|
this.criticalPathCollection = criticalPathIds;
|
|
30393
30843
|
this.detailPredecessorCollection = collection;
|
|
30394
30844
|
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
@@ -30768,73 +31218,69 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30768
31218
|
return this.parent.dataOperation.getDuration(startDate, endDate, durationUnit, record.ganttProperties.isAutoSchedule, true);
|
|
30769
31219
|
}
|
|
30770
31220
|
};
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
|
|
30777
|
-
|
|
30778
|
-
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
|
|
30783
|
-
|
|
30784
|
-
|
|
30785
|
-
|
|
30786
|
-
|
|
30787
|
-
|
|
30788
|
-
|
|
30789
|
-
for (var f = i.length - 1; f >= 0; f--) {
|
|
30790
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30791
|
-
var q = modelRecordIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30792
|
-
for (var k = 0; k < indexes.length; k++) {
|
|
30793
|
-
var item = indexes[parseInt(j.toString(), 10)];
|
|
30794
|
-
if (item !== q) {
|
|
30795
|
-
indexes.push(q);
|
|
30796
|
-
}
|
|
30797
|
-
break;
|
|
30798
|
-
}
|
|
31221
|
+
CriticalPath.prototype.updateCriticalTasks = function (record, criticalPathIds) {
|
|
31222
|
+
for (var i = 0; i < record.ganttProperties.predecessor.length; i++) {
|
|
31223
|
+
var fromRecord = void 0;
|
|
31224
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
31225
|
+
fromRecord = this.parent.getRecordByID(record.ganttProperties.predecessor[i].from);
|
|
31226
|
+
}
|
|
31227
|
+
else {
|
|
31228
|
+
var resourceIndex = this.resourceCollectionIds.indexOf(record.ganttProperties.predecessor[i].from.toString());
|
|
31229
|
+
fromRecord = this.parent.flatData[resourceIndex];
|
|
31230
|
+
}
|
|
31231
|
+
var durationDiff = void 0;
|
|
31232
|
+
if (record.ganttProperties.endDate.getTime() >= this.maxEndDate.getTime()) {
|
|
31233
|
+
record.ganttProperties.slack = record.slack = 0 + ' ' + record.ganttProperties.durationUnit;
|
|
31234
|
+
if (record.ganttProperties.progress < 100) {
|
|
31235
|
+
record.isCritical = true;
|
|
31236
|
+
record.ganttProperties.isCritical = true;
|
|
31237
|
+
if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
|
|
31238
|
+
criticalPathIds.push(parseInt(record.ganttProperties.taskId));
|
|
30799
31239
|
}
|
|
30800
|
-
|
|
30801
|
-
|
|
30802
|
-
|
|
30803
|
-
|
|
30804
|
-
|
|
30805
|
-
|
|
30806
|
-
|
|
30807
|
-
|
|
30808
|
-
|
|
31240
|
+
}
|
|
31241
|
+
}
|
|
31242
|
+
if (fromRecord) {
|
|
31243
|
+
if (record.ganttProperties.predecessor[i].type == 'FS') {
|
|
31244
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
31245
|
+
}
|
|
31246
|
+
else if (record.ganttProperties.predecessor[i].type == 'SS') {
|
|
31247
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.startDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
31248
|
+
}
|
|
31249
|
+
else if (record.ganttProperties.predecessor[i].type == 'FF') {
|
|
31250
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.endDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
31251
|
+
}
|
|
31252
|
+
else if (record.ganttProperties.predecessor[i].type == 'SF') {
|
|
31253
|
+
durationDiff = this.parent.dataOperation.getDuration(record.ganttProperties.endDate, fromRecord.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
31254
|
+
}
|
|
31255
|
+
if (durationDiff == 0 && this.validatedids.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.taskId != record.ganttProperties.taskId) {
|
|
31256
|
+
fromRecord.ganttProperties.slack = record.ganttProperties.slack;
|
|
31257
|
+
fromRecord.slack = record.slack;
|
|
31258
|
+
fromRecord.isCritical = record.ganttProperties.isCritical;
|
|
31259
|
+
fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
|
|
31260
|
+
if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
|
|
31261
|
+
this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
|
|
31262
|
+
criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
|
|
31263
|
+
}
|
|
31264
|
+
if (fromRecord.ganttProperties.predecessorsName) {
|
|
31265
|
+
this.updateCriticalTasks(fromRecord, criticalPathIds);
|
|
30809
31266
|
}
|
|
30810
31267
|
}
|
|
30811
31268
|
}
|
|
30812
31269
|
}
|
|
30813
|
-
|
|
31270
|
+
};
|
|
31271
|
+
/* eslint-disable-next-line */
|
|
31272
|
+
CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
31273
|
+
var criticalPathIds = [];
|
|
31274
|
+
var index;
|
|
31275
|
+
var predecessorFrom;
|
|
31276
|
+
for (var x = collection.length - 1; x >= 0; x--) {
|
|
30814
31277
|
if (this.parent.viewType === 'ProjectView') {
|
|
30815
|
-
index = modelRecordIds.indexOf(
|
|
31278
|
+
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
30816
31279
|
}
|
|
30817
31280
|
else {
|
|
30818
|
-
index = this.resourceCollectionIds.indexOf(
|
|
31281
|
+
index = this.resourceCollectionIds.indexOf(collection[x]['taskid'].toString());
|
|
30819
31282
|
}
|
|
30820
31283
|
var predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
30821
|
-
if (isNullOrUndefined(predecessorLength)) {
|
|
30822
|
-
if (taskBeyondEnddate.length > 0) {
|
|
30823
|
-
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30824
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30825
|
-
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30826
|
-
}
|
|
30827
|
-
else {
|
|
30828
|
-
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30829
|
-
}
|
|
30830
|
-
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30831
|
-
this.criticalTasks.push(flatRecords[index]);
|
|
30832
|
-
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30833
|
-
}
|
|
30834
|
-
}
|
|
30835
|
-
}
|
|
30836
|
-
break;
|
|
30837
|
-
}
|
|
30838
31284
|
var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
30839
31285
|
for (var i = predecessorLength.length - 1; i >= 0; i--) {
|
|
30840
31286
|
var toID = void 0;
|
|
@@ -30847,6 +31293,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30847
31293
|
var dateDifference = void 0;
|
|
30848
31294
|
var currentData = flatRecords[index].ganttProperties;
|
|
30849
31295
|
if (predecessorLength[i].type === 'FS') {
|
|
31296
|
+
/* eslint-disable-next-line */
|
|
30850
31297
|
if (predecessorLength[i].to != currentData.taskId.toString() || this.parent.viewType === 'ResourceView') {
|
|
30851
31298
|
/* eslint-disable-next-line */
|
|
30852
31299
|
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
@@ -30898,8 +31345,28 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30898
31345
|
flatRecords[index].isCritical = true;
|
|
30899
31346
|
flatRecords[index].ganttProperties.isCritical = true;
|
|
30900
31347
|
this.criticalTasks.push(flatRecords[index]);
|
|
30901
|
-
|
|
30902
|
-
|
|
31348
|
+
if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
|
|
31349
|
+
criticalPathIds.push(collection[x]['taskid']);
|
|
31350
|
+
}
|
|
31351
|
+
}
|
|
31352
|
+
}
|
|
31353
|
+
if (flatRecords[index].ganttProperties.predecessor.length > 0) {
|
|
31354
|
+
this.updateCriticalTasks(flatRecords[index], criticalPathIds);
|
|
31355
|
+
}
|
|
31356
|
+
}
|
|
31357
|
+
if (taskBeyondEnddate.length > 0) {
|
|
31358
|
+
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
31359
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
31360
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
31361
|
+
}
|
|
31362
|
+
else {
|
|
31363
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
31364
|
+
}
|
|
31365
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
31366
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
31367
|
+
if (criticalPathIds.indexOf(taskBeyondEnddate[i]) === -1) {
|
|
31368
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
31369
|
+
}
|
|
30903
31370
|
}
|
|
30904
31371
|
}
|
|
30905
31372
|
}
|
|
@@ -30944,7 +31411,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30944
31411
|
}
|
|
30945
31412
|
}
|
|
30946
31413
|
/* eslint-disable-next-line */
|
|
30947
|
-
if (this_2.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
31414
|
+
if (this_2.parent.allowUnscheduledTasks && criticalData && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
30948
31415
|
taskClass = criticalUnscheduledTask;
|
|
30949
31416
|
}
|
|
30950
31417
|
else {
|
|
@@ -30957,6 +31424,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30957
31424
|
}
|
|
30958
31425
|
if (element.getElementsByClassName('e-gantt-child-taskbar-inner-div').length > 0) {
|
|
30959
31426
|
addClass(element.querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
31427
|
+
var innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
|
|
31428
|
+
innerDivs.style.outlineColor = "";
|
|
30960
31429
|
}
|
|
30961
31430
|
if (element.getElementsByClassName('e-gantt-child-progressbar-inner-div').length > 0) {
|
|
30962
31431
|
addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
|
|
@@ -31182,7 +31651,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
31182
31651
|
taskfields = this.parent.taskFields;
|
|
31183
31652
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
31184
31653
|
var ganttProp = this.rowData.ganttProperties;
|
|
31185
|
-
data[taskfields.duration] =
|
|
31654
|
+
data[taskfields.duration] = data[taskfields.duration] <= 0 ? 1 : data[taskfields.duration];
|
|
31186
31655
|
}
|
|
31187
31656
|
else {
|
|
31188
31657
|
data[taskfields.startDate] = new Date(this.rowData.taskData[taskfields.startDate]);
|
|
@@ -31195,6 +31664,9 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
31195
31664
|
data[taskfields.milestone] = false;
|
|
31196
31665
|
}
|
|
31197
31666
|
}
|
|
31667
|
+
if (data[taskfields.startDate]) {
|
|
31668
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
31669
|
+
}
|
|
31198
31670
|
this.parent.updateRecordByID(data);
|
|
31199
31671
|
}
|
|
31200
31672
|
break;
|
|
@@ -32002,8 +32474,16 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
32002
32474
|
var dragElement = this.parent.element.querySelector('.e-ganttdrag');
|
|
32003
32475
|
var ganttTop = this.parent.element.getClientRects()[0].top;
|
|
32004
32476
|
var ganttLeft = this.parent.element.getClientRects()[0].left;
|
|
32005
|
-
var left
|
|
32006
|
-
var top
|
|
32477
|
+
var left;
|
|
32478
|
+
var top;
|
|
32479
|
+
if (this.parent.isAdaptive) {
|
|
32480
|
+
left = args.originalEvent.event.touches[0].clientX - ganttLeft;
|
|
32481
|
+
top = args.originalEvent.event.touches[0].clientY - ganttTop;
|
|
32482
|
+
}
|
|
32483
|
+
else {
|
|
32484
|
+
left = getValue('event', args.originalEvent).clientX - ganttLeft;
|
|
32485
|
+
top = getValue('event', args.originalEvent).clientY - ganttTop;
|
|
32486
|
+
}
|
|
32007
32487
|
dragElement.style.left = left + 20 + 'px';
|
|
32008
32488
|
dragElement.style.top = top + 20 + 'px';
|
|
32009
32489
|
this.parent.trigger('rowDrag', args);
|
|
@@ -32884,6 +33364,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
32884
33364
|
ganttStyle.taskbar.progressColor = new PdfColor(33, 82, 125);
|
|
32885
33365
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32886
33366
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
33367
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(240, 173, 78);
|
|
33368
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(240, 173, 78);
|
|
32887
33369
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32888
33370
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32889
33371
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(119, 119, 119);
|
|
@@ -32904,6 +33386,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
32904
33386
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 86, 179);
|
|
32905
33387
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32906
33388
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
33389
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(255, 193, 7);
|
|
33390
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(255, 193, 7);
|
|
32907
33391
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32908
33392
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32909
33393
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(108, 117, 125);
|
|
@@ -32926,6 +33410,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
32926
33410
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 91, 163);
|
|
32927
33411
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32928
33412
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
33413
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(216, 59, 1);
|
|
33414
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(216, 59, 1);
|
|
32929
33415
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32930
33416
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32931
33417
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(118, 118, 118);
|
|
@@ -32946,6 +33432,8 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
32946
33432
|
ganttStyle.taskbar.progressColor = new PdfColor(63, 81, 181);
|
|
32947
33433
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32948
33434
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
33435
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(193, 87, 0);
|
|
33436
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(193, 87, 0);
|
|
32949
33437
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32950
33438
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32951
33439
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(132, 132, 132);
|
|
@@ -33515,7 +34003,7 @@ var PdfTreeGridLayouter = /** @__PURE__ @class */ (function (_super) {
|
|
|
33515
34003
|
var startColumn = 0;
|
|
33516
34004
|
var endColumn = 0;
|
|
33517
34005
|
var cellWidths = 0;
|
|
33518
|
-
var availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;
|
|
34006
|
+
var availableWidth = pointToPixel(this.currentGraphics.clientSize.width) - this.currentBounds.x;
|
|
33519
34007
|
for (var i = 0; i < this.treegrid.columns.count; i++) {
|
|
33520
34008
|
cellWidths += this.treegrid.columns.getColumn(i).width;
|
|
33521
34009
|
if (cellWidths >= availableWidth) {
|
|
@@ -33741,6 +34229,10 @@ var PdfTreeGridLayouter = /** @__PURE__ @class */ (function (_super) {
|
|
|
33741
34229
|
}
|
|
33742
34230
|
}
|
|
33743
34231
|
var size = new SizeF(column.width, height);
|
|
34232
|
+
if (cell.columnSpan > 1) {
|
|
34233
|
+
size = new SizeF(cell.width, height);
|
|
34234
|
+
i += cell.columnSpan;
|
|
34235
|
+
}
|
|
33744
34236
|
if (!this.checkIfDefaultFormat(column.format) && this.checkIfDefaultFormat(cell.style.format)) {
|
|
33745
34237
|
cell.style.format = column.format;
|
|
33746
34238
|
}
|
|
@@ -34126,12 +34618,15 @@ var PdfTreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
34126
34618
|
colSpan = cell.columnSpan;
|
|
34127
34619
|
currentCellIndex = j;
|
|
34128
34620
|
cell.isCellMergeStart = true;
|
|
34621
|
+
var totalColumnWidth = this.columns.columns[currentCellIndex].width;
|
|
34129
34622
|
//Set Column merges.
|
|
34130
34623
|
while (colSpan > 1) {
|
|
34131
34624
|
currentCellIndex++;
|
|
34132
34625
|
row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
|
|
34133
34626
|
colSpan--;
|
|
34627
|
+
totalColumnWidth += this.columns.columns[currentCellIndex].width;
|
|
34134
34628
|
}
|
|
34629
|
+
cell.width = totalColumnWidth;
|
|
34135
34630
|
}
|
|
34136
34631
|
else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
|
|
34137
34632
|
rowSpan = cell.rowSpan;
|
|
@@ -34413,11 +34908,11 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
34413
34908
|
if (this.finishedDrawingCell) {
|
|
34414
34909
|
temp = (this.remainingString === '') ? this.remainingString : this.value;
|
|
34415
34910
|
/* eslint-disable-next-line */
|
|
34416
|
-
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
34911
|
+
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
34417
34912
|
}
|
|
34418
34913
|
else {
|
|
34419
34914
|
/* eslint-disable-next-line */
|
|
34420
|
-
graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, this.style.format);
|
|
34915
|
+
graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, this.style.format);
|
|
34421
34916
|
}
|
|
34422
34917
|
result = graphics.stringLayoutResult;
|
|
34423
34918
|
}
|
|
@@ -35144,8 +35639,101 @@ var PdfTreeGridColumnCollection = /** @__PURE__ @class */ (function () {
|
|
|
35144
35639
|
*/
|
|
35145
35640
|
var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
35146
35641
|
function ExportHelper(parent) {
|
|
35642
|
+
this.totalColumnWidth = 0;
|
|
35643
|
+
this.beforeSinglePageExport = {};
|
|
35644
|
+
this.baselineHeight = 8;
|
|
35147
35645
|
this.parent = parent;
|
|
35148
35646
|
}
|
|
35647
|
+
ExportHelper.prototype.processToFit = function () {
|
|
35648
|
+
this.beforeSinglePageExport['zoomingProjectStartDate'] = this.parent.zoomingProjectStartDate;
|
|
35649
|
+
this.beforeSinglePageExport['zoomingProjectEndDate'] = this.parent.zoomingProjectEndDate;
|
|
35650
|
+
this.beforeSinglePageExport['cloneProjectStartDate'] = this.parent.cloneProjectStartDate;
|
|
35651
|
+
this.beforeSinglePageExport['cloneProjectEndDate'] = this.parent.cloneProjectEndDate;
|
|
35652
|
+
this.beforeSinglePageExport['customTimelineSettings'] = extend({}, this.parent.timelineModule.customTimelineSettings, null, true);
|
|
35653
|
+
this.beforeSinglePageExport['isTimelineRoundOff'] = this.parent.isTimelineRoundOff;
|
|
35654
|
+
this.beforeSinglePageExport['topTier'] = this.parent.timelineModule.topTier;
|
|
35655
|
+
this.beforeSinglePageExport['topTierCellWidth'] = this.parent.timelineModule.topTierCellWidth;
|
|
35656
|
+
this.beforeSinglePageExport['topTierCollection'] = this.parent.timelineModule.topTierCollection;
|
|
35657
|
+
this.beforeSinglePageExport['bottomTier'] = this.parent.timelineModule.bottomTier;
|
|
35658
|
+
this.beforeSinglePageExport['bottomTierCellWidth'] = this.parent.timelineModule.bottomTierCellWidth;
|
|
35659
|
+
this.beforeSinglePageExport['bottomTierCollection'] = this.parent.timelineModule.bottomTierCollection;
|
|
35660
|
+
this.beforeSinglePageExport['totalTimelineWidth'] = this.parent.timelineModule.totalTimelineWidth;
|
|
35661
|
+
this.beforeSinglePageExport['timelineStartDate'] = this.parent.timelineModule.timelineStartDate;
|
|
35662
|
+
this.beforeSinglePageExport['timelineEndDate'] = this.parent.timelineModule.timelineEndDate;
|
|
35663
|
+
this.beforeSinglePageExport['timelineRoundOffEndDate'] = this.parent.timelineModule.timelineRoundOffEndDate;
|
|
35664
|
+
this.beforeSinglePageExport['perDayWidth'] = this.parent.perDayWidth;
|
|
35665
|
+
this.beforeSinglePageExport['updatedConnectorLineCollection'] = extend([], this.parent.updatedConnectorLineCollection, null, true);
|
|
35666
|
+
this.parent.timelineModule.isZoomToFit = true;
|
|
35667
|
+
this.parent.timelineModule.isZooming = false;
|
|
35668
|
+
if (!this.parent.zoomingProjectStartDate) {
|
|
35669
|
+
this.parent.zoomingProjectStartDate = this.parent.cloneProjectStartDate;
|
|
35670
|
+
this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
|
|
35671
|
+
}
|
|
35672
|
+
if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
|
|
35673
|
+
this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
|
|
35674
|
+
}
|
|
35675
|
+
this.parent.dataOperation.calculateProjectDates();
|
|
35676
|
+
var timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
|
|
35677
|
+
var totalDays = (timeDifference / (1000 * 3600 * 24));
|
|
35678
|
+
var chartsideWidth;
|
|
35679
|
+
var gridWidth;
|
|
35680
|
+
if (this.exportProps.fitToWidthSettings.gridWidth) {
|
|
35681
|
+
gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
|
|
35682
|
+
}
|
|
35683
|
+
if (this.exportProps.fitToWidthSettings.chartWidth) {
|
|
35684
|
+
chartsideWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
|
|
35685
|
+
}
|
|
35686
|
+
else {
|
|
35687
|
+
if (this.exportProps.fitToWidthSettings.gridWidth) {
|
|
35688
|
+
chartsideWidth = 100 - gridWidth;
|
|
35689
|
+
}
|
|
35690
|
+
else {
|
|
35691
|
+
chartsideWidth = 70;
|
|
35692
|
+
}
|
|
35693
|
+
}
|
|
35694
|
+
var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * chartsideWidth) / 100;
|
|
35695
|
+
var chartWidth = pdfwidth;
|
|
35696
|
+
var perDayWidth = chartWidth / totalDays;
|
|
35697
|
+
var zoomingLevel;
|
|
35698
|
+
var firstValue;
|
|
35699
|
+
var secondValue;
|
|
35700
|
+
var zoomingCollections = this.parent.zoomingLevels.slice();
|
|
35701
|
+
var sortedCollectons = zoomingCollections.sort(function (a, b) {
|
|
35702
|
+
return (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1);
|
|
35703
|
+
});
|
|
35704
|
+
if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
|
|
35705
|
+
return;
|
|
35706
|
+
}
|
|
35707
|
+
for (var i = 0; i < sortedCollectons.length; i++) {
|
|
35708
|
+
firstValue = sortedCollectons[i];
|
|
35709
|
+
if (i === sortedCollectons.length - 1) {
|
|
35710
|
+
zoomingLevel = sortedCollectons[i];
|
|
35711
|
+
break;
|
|
35712
|
+
}
|
|
35713
|
+
else {
|
|
35714
|
+
secondValue = sortedCollectons[i + 1];
|
|
35715
|
+
}
|
|
35716
|
+
if (perDayWidth >= firstValue.perDayWidth) {
|
|
35717
|
+
zoomingLevel = sortedCollectons[i];
|
|
35718
|
+
break;
|
|
35719
|
+
}
|
|
35720
|
+
if (perDayWidth < firstValue.perDayWidth && perDayWidth > secondValue.perDayWidth) {
|
|
35721
|
+
zoomingLevel = sortedCollectons[i + 1];
|
|
35722
|
+
break;
|
|
35723
|
+
}
|
|
35724
|
+
}
|
|
35725
|
+
var newTimeline = extend({}, {}, zoomingLevel, true);
|
|
35726
|
+
this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
35727
|
+
this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
35728
|
+
var numberOfCells = this.parent.timelineModule['calculateNumberOfTimelineCells'](newTimeline);
|
|
35729
|
+
var scrollHeight = this.parent.pdfExportModule['pdfPageDimensions'].height; //17 is horizontal scrollbar width
|
|
35730
|
+
var contentHeight = this.parent.pdfExportModule['pdfPageDimensions'].height;
|
|
35731
|
+
var emptySpace = contentHeight <= scrollHeight ? 0 : 17;
|
|
35732
|
+
newTimeline.timelineUnitSize = Math.abs((chartWidth - emptySpace)) / numberOfCells;
|
|
35733
|
+
this.parent.timelineModule['changeTimelineSettings'](newTimeline);
|
|
35734
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
35735
|
+
this.parent.timelineModule.isZooming = false;
|
|
35736
|
+
};
|
|
35149
35737
|
/**
|
|
35150
35738
|
* @param {IGanttData[]} data .
|
|
35151
35739
|
* @param {PdfGantt} gantt .
|
|
@@ -35167,11 +35755,16 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35167
35755
|
this.gantt.style.cellPadding.right = 0;
|
|
35168
35756
|
this.ganttStyle = this.gantt.ganttStyle;
|
|
35169
35757
|
this.gantt.borderColor = this.ganttStyle.chartGridLineColor;
|
|
35758
|
+
this.parent.pdfExportModule.isPdfExport = true;
|
|
35759
|
+
if (this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
35760
|
+
this.processToFit();
|
|
35761
|
+
}
|
|
35170
35762
|
this.processHeaderContent();
|
|
35171
35763
|
this.processGanttContent();
|
|
35172
35764
|
this.processTimeline();
|
|
35173
35765
|
this.processTaskbar();
|
|
35174
35766
|
this.processPredecessor();
|
|
35767
|
+
this.parent.pdfExportModule.isPdfExport = false;
|
|
35175
35768
|
};
|
|
35176
35769
|
ExportHelper.prototype.processHeaderContent = function () {
|
|
35177
35770
|
var _this = this;
|
|
@@ -35227,7 +35820,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35227
35820
|
this.renderEmptyGantt();
|
|
35228
35821
|
}
|
|
35229
35822
|
else {
|
|
35230
|
-
|
|
35823
|
+
var flatData = void 0;
|
|
35824
|
+
flatData = this.flatData;
|
|
35825
|
+
flatData.forEach(function (data) {
|
|
35231
35826
|
_this.row = _this.gantt.rows.addRow();
|
|
35232
35827
|
if (data.hasChildRecords) {
|
|
35233
35828
|
_this.gantt.rows.getRow(_this.rowIndex).isParentRow = true;
|
|
@@ -35236,6 +35831,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35236
35831
|
else {
|
|
35237
35832
|
_this.processRecordRow(data);
|
|
35238
35833
|
}
|
|
35834
|
+
if (_this.exportProps.fitToWidthSettings && _this.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
35835
|
+
_this.row.height = 33.33;
|
|
35836
|
+
}
|
|
35239
35837
|
_this.rowIndex++;
|
|
35240
35838
|
});
|
|
35241
35839
|
}
|
|
@@ -35287,7 +35885,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35287
35885
|
else {
|
|
35288
35886
|
predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
|
|
35289
35887
|
}
|
|
35290
|
-
|
|
35888
|
+
_this.ganttStyle.connectorLineColor = predecessor.connectorLineColor;
|
|
35291
35889
|
_this.gantt.predecessorCollection.push(predecessor);
|
|
35292
35890
|
});
|
|
35293
35891
|
this.parent.pdfExportModule.isPdfExport = false;
|
|
@@ -35352,7 +35950,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35352
35950
|
*/
|
|
35353
35951
|
ExportHelper.prototype.processTaskbar = function () {
|
|
35354
35952
|
var _this = this;
|
|
35355
|
-
|
|
35953
|
+
var flatData;
|
|
35954
|
+
flatData = this.flatData;
|
|
35955
|
+
flatData.forEach(function (data) {
|
|
35356
35956
|
var taskbar = _this.gantt.taskbar.add();
|
|
35357
35957
|
var ganttProp = data.ganttProperties;
|
|
35358
35958
|
taskbar.left = ganttProp.left;
|
|
@@ -35383,7 +35983,22 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35383
35983
|
taskbar.startDate = ganttProp.startDate;
|
|
35384
35984
|
taskbar.endDate = ganttProp.endDate;
|
|
35385
35985
|
taskbar.height = _this.parent.chartRowsModule.taskBarHeight;
|
|
35986
|
+
if (_this.parent.renderBaseline) {
|
|
35987
|
+
var height = void 0;
|
|
35988
|
+
if ((taskbar.height + _this.baselineHeight) <= _this.parent.rowHeight) {
|
|
35989
|
+
height = taskbar.height;
|
|
35990
|
+
}
|
|
35991
|
+
else {
|
|
35992
|
+
height = taskbar.height - (_this.baselineHeight + 1);
|
|
35993
|
+
}
|
|
35994
|
+
taskbar.height = height;
|
|
35995
|
+
}
|
|
35996
|
+
taskbar.baselineTop = _this.parent.chartRowsModule.baselineTop;
|
|
35386
35997
|
taskbar.isMilestone = ganttProp.isMilestone;
|
|
35998
|
+
taskbar.baselineStartDate = ganttProp.baselineStartDate;
|
|
35999
|
+
taskbar.baselineEndDate = ganttProp.baselineEndDate;
|
|
36000
|
+
taskbar.baselineLeft = ganttProp.baselineLeft;
|
|
36001
|
+
taskbar.baselineWidth = ganttProp.baselineWidth;
|
|
35387
36002
|
taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.milestoneColor);
|
|
35388
36003
|
taskbar.isParentTask = data.hasChildRecords;
|
|
35389
36004
|
if (ganttProp.isMilestone) {
|
|
@@ -35414,6 +36029,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35414
36029
|
taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
|
|
35415
36030
|
taskbar.progressColor = new PdfColor(_this.ganttStyle.taskbar.criticalProgressColor);
|
|
35416
36031
|
taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskBorderColor);
|
|
36032
|
+
taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
|
|
35417
36033
|
}
|
|
35418
36034
|
else {
|
|
35419
36035
|
taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.taskColor);
|
|
@@ -35421,6 +36037,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35421
36037
|
taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.taskBorderColor);
|
|
35422
36038
|
}
|
|
35423
36039
|
}
|
|
36040
|
+
taskbar.baselineColor = new PdfColor(_this.ganttStyle.taskbar.baselineColor);
|
|
36041
|
+
taskbar.baselineBorderColor = new PdfColor(_this.ganttStyle.taskbar.baselineBorderColor);
|
|
35424
36042
|
taskbar.gridLineColor = new PdfColor(_this.ganttStyle.chartGridLineColor);
|
|
35425
36043
|
_this.gantt.taskbarCollection.push(taskbar);
|
|
35426
36044
|
var taskStyle = {};
|
|
@@ -35429,6 +36047,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35429
36047
|
taskStyle.taskBorderColor = taskbar.taskBorderColor;
|
|
35430
36048
|
taskStyle.progressColor = taskbar.progressColor;
|
|
35431
36049
|
taskStyle.milestoneColor = taskbar.milestoneColor;
|
|
36050
|
+
taskStyle.baselineColor = taskbar.baselineColor;
|
|
36051
|
+
taskStyle.baselineBorderColor = taskbar.baselineBorderColor;
|
|
35432
36052
|
var args = {
|
|
35433
36053
|
taskbar: taskStyle,
|
|
35434
36054
|
data: data
|
|
@@ -35440,6 +36060,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35440
36060
|
taskbar.taskBorderColor = args.taskbar.taskBorderColor;
|
|
35441
36061
|
taskbar.progressColor = args.taskbar.progressColor;
|
|
35442
36062
|
taskbar.milestoneColor = args.taskbar.milestoneColor;
|
|
36063
|
+
taskbar.baselineColor = args.taskbar.baselineColor;
|
|
36064
|
+
taskbar.baselineBorderColor = args.taskbar.baselineBorderColor;
|
|
35443
36065
|
}
|
|
35444
36066
|
});
|
|
35445
36067
|
};
|
|
@@ -35541,7 +36163,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35541
36163
|
row.height = pixelToPoint(this.parent.rowHeight);
|
|
35542
36164
|
this.copyStyles(this.ganttStyle.columnHeader, row.cells.getCell(0), row.isParentRow);
|
|
35543
36165
|
var count = this.columns.length;
|
|
35544
|
-
|
|
36166
|
+
row.cells.getCell(0).value = this.parent.localeObj.getConstant('emptyRecord');
|
|
36167
|
+
this.mergeCells(1, 0, count);
|
|
35545
36168
|
};
|
|
35546
36169
|
ExportHelper.prototype.mergeCells = function (rowIndex, colIndex, lastColIndex) {
|
|
35547
36170
|
this.gantt.rows.getRow(rowIndex).cells.getCell(colIndex).columnSpan = lastColIndex;
|
|
@@ -35586,6 +36209,26 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35586
36209
|
var widths = [];
|
|
35587
36210
|
var treeColumnIndex = 0;
|
|
35588
36211
|
var tWidth = (this.pdfDoc.pageSettings.width - 82);
|
|
36212
|
+
if (this.exportProps && this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
36213
|
+
var gridWidth = void 0;
|
|
36214
|
+
if (this.exportProps.fitToWidthSettings.gridWidth) {
|
|
36215
|
+
gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
|
|
36216
|
+
}
|
|
36217
|
+
else {
|
|
36218
|
+
if (this.exportProps.fitToWidthSettings.chartWidth) {
|
|
36219
|
+
var chartWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
|
|
36220
|
+
gridWidth = 100 - chartWidth;
|
|
36221
|
+
}
|
|
36222
|
+
else {
|
|
36223
|
+
gridWidth = 30;
|
|
36224
|
+
}
|
|
36225
|
+
}
|
|
36226
|
+
var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * gridWidth) / 100;
|
|
36227
|
+
var perColumnWidth = pdfwidth / this.gantt.columns.columns.length;
|
|
36228
|
+
for (var i = 0; i < this.gantt.columns.columns.length; i++) {
|
|
36229
|
+
this.gantt.columns.getColumn(i).width = perColumnWidth;
|
|
36230
|
+
}
|
|
36231
|
+
}
|
|
35589
36232
|
if (this.totalColumnWidth > (this.pdfDoc.pageSettings.width - 82)) {
|
|
35590
36233
|
this.gantt.style.allowHorizontalOverflow = true;
|
|
35591
36234
|
}
|
|
@@ -35713,6 +36356,8 @@ var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
|
35713
36356
|
*/
|
|
35714
36357
|
var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
35715
36358
|
function PdfGanttTaskbarCollection(parent) {
|
|
36359
|
+
/** Defines the task baselineHeight . */
|
|
36360
|
+
this.baselineHeight = 8;
|
|
35716
36361
|
/**
|
|
35717
36362
|
* @private
|
|
35718
36363
|
*/
|
|
@@ -35759,6 +36404,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35759
36404
|
//code for while current pdf page is exceed
|
|
35760
36405
|
if (yPoint > pageSize.height) {
|
|
35761
36406
|
page = this.GetNextPage(page);
|
|
36407
|
+
page['contentWidth'] = pointToPixel(detail.endPoint - detail.startPoint);
|
|
35762
36408
|
taskGraphics = page.graphics;
|
|
35763
36409
|
startPoint.y = 0;
|
|
35764
36410
|
if (this.parent.pdfExportModule.gantt.enableHeader) {
|
|
@@ -35766,6 +36412,11 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35766
36412
|
startPoint.y = pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60);
|
|
35767
36413
|
}
|
|
35768
36414
|
isNextPage = true;
|
|
36415
|
+
var graphics = page.graphics;
|
|
36416
|
+
var pen = new PdfPen(new PdfColor(206, 206, 206));
|
|
36417
|
+
if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
|
|
36418
|
+
graphics.drawRectangle(pen, startPoint.x, startPoint.y, page['contentWidth'] + 0.5, rowHeight);
|
|
36419
|
+
}
|
|
35769
36420
|
}
|
|
35770
36421
|
this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
|
|
35771
36422
|
//Draw Taskbar
|
|
@@ -35789,9 +36440,13 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35789
36440
|
if (!taskbar.isMilestone) {
|
|
35790
36441
|
var taskbarPen = new PdfPen(taskbar.taskBorderColor);
|
|
35791
36442
|
var taskBrush = new PdfSolidBrush(taskbar.taskColor);
|
|
36443
|
+
var baselinePen = new PdfPen(taskbar.baselineBorderColor);
|
|
36444
|
+
var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
|
|
35792
36445
|
var progressPen = new PdfPen(taskbar.progressColor);
|
|
35793
36446
|
var progressBrush = new PdfSolidBrush(taskbar.progressColor);
|
|
35794
|
-
var
|
|
36447
|
+
var adjustHeightforTaskbar = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
|
|
36448
|
+
var adjustHeightforBaseline = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
|
|
36449
|
+
var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
|
|
35795
36450
|
pageIndex = page.section.indexOf(page);
|
|
35796
36451
|
var startDate = isNullOrUndefined(this.unscheduleStarteDate) ? this.startDate : this.unscheduleStarteDate;
|
|
35797
36452
|
var endDate = isNullOrUndefined(this.unscheduleEndDate) ? this.endDate : this.unscheduleEndDate;
|
|
@@ -35805,6 +36460,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35805
36460
|
this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
|
|
35806
36461
|
}
|
|
35807
36462
|
else {
|
|
36463
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
36464
|
+
taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
|
|
36465
|
+
}
|
|
35808
36466
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
35809
36467
|
if (this.isScheduledTask) {
|
|
35810
36468
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
@@ -35836,6 +36494,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35836
36494
|
this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
|
|
35837
36495
|
}
|
|
35838
36496
|
else {
|
|
36497
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
36498
|
+
taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
|
|
36499
|
+
}
|
|
35839
36500
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
35840
36501
|
taskbar.width = taskbar.width - renderWidth;
|
|
35841
36502
|
if (this.isScheduledTask) {
|
|
@@ -35867,6 +36528,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35867
36528
|
this.taskStartPoint = __assign$3({}, startPoint);
|
|
35868
36529
|
this.isStartPoint = true;
|
|
35869
36530
|
}
|
|
36531
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
36532
|
+
taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
|
|
36533
|
+
}
|
|
35870
36534
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
35871
36535
|
if (this.isScheduledTask) {
|
|
35872
36536
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
@@ -35888,6 +36552,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35888
36552
|
this.taskStartPoint = __assign$3({}, startPoint);
|
|
35889
36553
|
this.isStartPoint = true;
|
|
35890
36554
|
}
|
|
36555
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
36556
|
+
taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
|
|
36557
|
+
}
|
|
35891
36558
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
|
|
35892
36559
|
if (this.isScheduledTask) {
|
|
35893
36560
|
var progressBoundsWidth = 0;
|
|
@@ -35913,6 +36580,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35913
36580
|
}
|
|
35914
36581
|
else {
|
|
35915
36582
|
this.drawMilestone(page, startPoint, detail, cumulativeWidth);
|
|
36583
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
36584
|
+
this.drawMilestone(page, startPoint, detail, cumulativeWidth);
|
|
36585
|
+
}
|
|
35916
36586
|
}
|
|
35917
36587
|
this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
|
|
35918
36588
|
return isNextPage;
|
|
@@ -36071,13 +36741,20 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36071
36741
|
var pageIndex = page.section.indexOf(page);
|
|
36072
36742
|
this.taskStartPoint = __assign$3({}, startPoint);
|
|
36073
36743
|
var milestonePen = new PdfPen(this.milestoneColor);
|
|
36074
|
-
var
|
|
36744
|
+
var adjustHeightforBaselineMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 3.0));
|
|
36745
|
+
var adjustHeightforMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
|
|
36746
|
+
var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaselineMilesone : adjustHeightforMilesone;
|
|
36075
36747
|
var milestoneBrush = new PdfSolidBrush(this.milestoneColor);
|
|
36748
|
+
var baselinePen = new PdfPen(this.baselineBorderColor);
|
|
36749
|
+
var baselineBrush = new PdfSolidBrush(this.baselineColor);
|
|
36076
36750
|
taskGraphics.save(); //saving graphics state
|
|
36077
|
-
var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.
|
|
36751
|
+
var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.8);
|
|
36078
36752
|
/* eslint-disable-next-line */
|
|
36079
36753
|
taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
|
|
36080
36754
|
taskGraphics.rotateTransform(45); //apply rotation
|
|
36755
|
+
if (this.parent.renderBaseline && this.baselineStartDate && this.baselineEndDate) {
|
|
36756
|
+
taskGraphics.drawRectangle(baselinePen, baselineBrush, 2, 2, pixelToPoint(height), pixelToPoint(height));
|
|
36757
|
+
}
|
|
36081
36758
|
taskGraphics.drawRectangle(milestonePen, milestoneBrush, 0, 0, pixelToPoint(height), pixelToPoint(height));
|
|
36082
36759
|
taskGraphics.restore(); //restoring graphics state
|
|
36083
36760
|
this.endPage = this.startPage = pageIndex;
|
|
@@ -36108,7 +36785,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36108
36785
|
* @returns {void}
|
|
36109
36786
|
*/
|
|
36110
36787
|
PdfTimeline.prototype.drawTimeline = function (page, startPoint, detail) {
|
|
36111
|
-
var remainWidth = Math.floor(detail.totalWidth);
|
|
36788
|
+
var remainWidth = pointToPixel(Math.floor(detail.totalWidth));
|
|
36112
36789
|
var renderWidth = 0;
|
|
36113
36790
|
this.topTierPoint.x = startPoint.x;
|
|
36114
36791
|
this.topTierPoint.y = startPoint.y;
|
|
@@ -36136,7 +36813,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36136
36813
|
//Primary header Event Arguments
|
|
36137
36814
|
/* eslint-disable-next-line */
|
|
36138
36815
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
|
|
36139
|
-
this.topTierPoint.x +=
|
|
36816
|
+
this.topTierPoint.x += renderWidth;
|
|
36140
36817
|
remainWidth -= renderWidth;
|
|
36141
36818
|
if (isCompleted) {
|
|
36142
36819
|
this.topTierIndex++;
|
|
@@ -36162,7 +36839,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36162
36839
|
//Secondary header Event Arguments
|
|
36163
36840
|
/* eslint-disable-next-line */
|
|
36164
36841
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
|
|
36165
|
-
this.bottomTierPoint.x = this.bottomTierPoint.x +
|
|
36842
|
+
this.bottomTierPoint.x = this.bottomTierPoint.x + width;
|
|
36166
36843
|
remainWidth -= width;
|
|
36167
36844
|
secondHeader.completedWidth = width;
|
|
36168
36845
|
if (isCompleted) {
|
|
@@ -36193,7 +36870,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36193
36870
|
//Primary header Event Arguments
|
|
36194
36871
|
/* eslint-disable-next-line */
|
|
36195
36872
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
|
|
36196
|
-
this.topTierPoint.x +=
|
|
36873
|
+
this.topTierPoint.x += pHeader.completedWidth;
|
|
36197
36874
|
}
|
|
36198
36875
|
}
|
|
36199
36876
|
}
|
|
@@ -36206,7 +36883,7 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36206
36883
|
//Secondary header Event Arguments
|
|
36207
36884
|
/* eslint-disable-next-line */
|
|
36208
36885
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
|
|
36209
|
-
this.bottomTierPoint.x = this.bottomTierPoint.x +
|
|
36886
|
+
this.bottomTierPoint.x = this.bottomTierPoint.x + secondHeader.width;
|
|
36210
36887
|
}
|
|
36211
36888
|
}
|
|
36212
36889
|
}
|
|
@@ -36253,7 +36930,10 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36253
36930
|
var e = eventArgs.timelineCell;
|
|
36254
36931
|
var rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
|
|
36255
36932
|
var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
36256
|
-
graphics.drawRectangle(rectPen, rectBrush, x, y,
|
|
36933
|
+
graphics.drawRectangle(rectPen, rectBrush, x, y, width, pixelToPoint(height));
|
|
36934
|
+
if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
|
|
36935
|
+
graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
|
|
36936
|
+
}
|
|
36257
36937
|
var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
|
|
36258
36938
|
if (ganttStyle.font) {
|
|
36259
36939
|
font = ganttStyle.font;
|
|
@@ -36262,7 +36942,13 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36262
36942
|
var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
36263
36943
|
var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|
|
36264
36944
|
/* eslint-disable-next-line */
|
|
36265
|
-
|
|
36945
|
+
if (isTopTier) {
|
|
36946
|
+
x = x + pLeft + 4;
|
|
36947
|
+
}
|
|
36948
|
+
else {
|
|
36949
|
+
x = x + pLeft;
|
|
36950
|
+
}
|
|
36951
|
+
graphics.drawString(eventArgs.value, font, null, textBrush, x, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
|
|
36266
36952
|
};
|
|
36267
36953
|
return PdfTimeline;
|
|
36268
36954
|
}());
|
|
@@ -36429,7 +37115,9 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
|
|
|
36429
37115
|
}
|
|
36430
37116
|
break;
|
|
36431
37117
|
}
|
|
36432
|
-
var
|
|
37118
|
+
var midPointforTaskbar = Math.round((this.parent.rowHeight - 1) / 2.0);
|
|
37119
|
+
var midPointforBaseline = Math.round((this.parent.rowHeight - 10) / 2.0);
|
|
37120
|
+
var midPoint = this.parent.renderBaseline ? midPointforBaseline : midPointforTaskbar;
|
|
36433
37121
|
midPoint = pixelToPoint(midPoint);
|
|
36434
37122
|
/* eslint-disable-next-line */
|
|
36435
37123
|
var point1, point2, point3, point4, point5, point6;
|
|
@@ -36924,6 +37612,7 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
36924
37612
|
var pageData;
|
|
36925
37613
|
this.headerDetails.forEach(function (detail, index) {
|
|
36926
37614
|
var page = _this.result.page.section.getPages()[_this.startPageIndex];
|
|
37615
|
+
page['contentWidth'] = pointToPixel(_this.headerDetails[index].endPoint - _this.headerDetails[index].startPoint);
|
|
36927
37616
|
_this.chartHeader.drawTimeline(page, _this.startPoint, detail);
|
|
36928
37617
|
taskbarPoint.y = taskbarPoint.y + pixelToPoint(_this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
|
|
36929
37618
|
pageStartX = taskbarPoint.x;
|
|
@@ -36934,6 +37623,11 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
36934
37623
|
var task = _this.taskbarCollection[i];
|
|
36935
37624
|
var rowHeight = _this.rows.getRow(i + 1).height;
|
|
36936
37625
|
var pdfPage = _this.result.page.section.getPages()[_this.startPageIndex];
|
|
37626
|
+
var graphics = pdfPage.graphics;
|
|
37627
|
+
var pen = new PdfPen(new PdfColor(206, 206, 206));
|
|
37628
|
+
if (page['contentWidth'] && (_this.parent.gridLines == "Both" || _this.parent.gridLines == "Horizontal")) {
|
|
37629
|
+
graphics.drawRectangle(pen, pageStartX, taskbarPoint.y, page['contentWidth'] + 0.5, rowHeight);
|
|
37630
|
+
}
|
|
36937
37631
|
/* eslint-disable-next-line */
|
|
36938
37632
|
var isNextPage = task.drawTaskbar(pdfPage, taskbarPoint, detail, cumulativeWidth, rowHeight, _this.taskbarCollection[i]);
|
|
36939
37633
|
if (isNextPage) {
|
|
@@ -37068,11 +37762,23 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
37068
37762
|
if (isNullOrUndefined(pdfExportProperties)) {
|
|
37069
37763
|
pdfExportProperties = {};
|
|
37070
37764
|
}
|
|
37071
|
-
if (pdfExportProperties.
|
|
37072
|
-
|
|
37765
|
+
if (pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
|
|
37766
|
+
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
37767
|
+
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.currentViewData, null, true);
|
|
37768
|
+
}
|
|
37769
|
+
else {
|
|
37770
|
+
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.flatData, null, true);
|
|
37771
|
+
}
|
|
37772
|
+
this.helper.beforeSinglePageExport['cloneCurrentViewData'] = extend([], this.parent.currentViewData, null, true);
|
|
37773
|
+
data = this.helper.beforeSinglePageExport['cloneFlatData'];
|
|
37073
37774
|
}
|
|
37074
37775
|
else {
|
|
37075
|
-
|
|
37776
|
+
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
37777
|
+
data = this.parent.currentViewData;
|
|
37778
|
+
}
|
|
37779
|
+
else {
|
|
37780
|
+
data = this.parent.flatData;
|
|
37781
|
+
}
|
|
37076
37782
|
}
|
|
37077
37783
|
this.initGantt();
|
|
37078
37784
|
if (!isNullOrUndefined(pdfDoc)) {
|
|
@@ -37097,6 +37803,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
37097
37803
|
var section = this.pdfDocument.sections.add();
|
|
37098
37804
|
this.processSectionExportProperties(section, pdfExportProperties);
|
|
37099
37805
|
var pdfPage = section.pages.add();
|
|
37806
|
+
this.pdfPageDimensions = pdfPage.getClientSize();
|
|
37100
37807
|
/* eslint-disable-next-line */
|
|
37101
37808
|
return new Promise(function (resolve, reject) {
|
|
37102
37809
|
_this.helper.processGridExport(data, _this.gantt, pdfExportProperties);
|
|
@@ -37107,6 +37814,26 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
37107
37814
|
format.break = PdfLayoutBreakType.FitElement;
|
|
37108
37815
|
var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
|
|
37109
37816
|
_this.gantt.drawChart(layouter);
|
|
37817
|
+
if (_this.helper.exportProps && _this.helper.exportProps.fitToWidthSettings && _this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
37818
|
+
_this.parent.zoomingProjectStartDate = _this.helper.beforeSinglePageExport['zoomingProjectStartDate'];
|
|
37819
|
+
_this.parent.zoomingProjectEndDate = _this.helper.beforeSinglePageExport['zoomingProjectEndDate'];
|
|
37820
|
+
_this.parent.cloneProjectStartDate = _this.helper.beforeSinglePageExport['cloneProjectStartDate'];
|
|
37821
|
+
_this.parent.cloneProjectEndDate = _this.helper.beforeSinglePageExport['cloneProjectEndDate'];
|
|
37822
|
+
_this.parent.timelineModule.customTimelineSettings = _this.helper.beforeSinglePageExport['customTimelineSettings'];
|
|
37823
|
+
_this.parent.isTimelineRoundOff = _this.helper.beforeSinglePageExport['isTimelineRoundOff'];
|
|
37824
|
+
_this.parent.timelineModule.topTier = _this.helper.beforeSinglePageExport['topTier'];
|
|
37825
|
+
_this.parent.timelineModule.topTierCellWidth = _this.helper.beforeSinglePageExport['topTierCellWidth'];
|
|
37826
|
+
_this.parent.timelineModule.topTierCollection = _this.helper.beforeSinglePageExport['topTierCollection'];
|
|
37827
|
+
_this.parent.timelineModule.bottomTier = _this.helper.beforeSinglePageExport['bottomTier'];
|
|
37828
|
+
_this.parent.timelineModule.bottomTierCellWidth = _this.helper.beforeSinglePageExport['bottomTierCellWidth'];
|
|
37829
|
+
_this.parent.timelineModule.bottomTierCollection = _this.helper.beforeSinglePageExport['bottomTierCollection'];
|
|
37830
|
+
_this.parent.timelineModule.totalTimelineWidth = _this.helper.beforeSinglePageExport['totalTimelineWidth'];
|
|
37831
|
+
_this.parent.timelineModule.timelineStartDate = _this.helper.beforeSinglePageExport['timelineStartDate'];
|
|
37832
|
+
_this.parent.timelineModule.timelineEndDate = _this.helper.beforeSinglePageExport['timelineEndDate'];
|
|
37833
|
+
_this.parent.timelineModule.timelineRoundOffEndDate = _this.helper.beforeSinglePageExport['timelineRoundOffEndDate'];
|
|
37834
|
+
_this.parent.perDayWidth = _this.helper.beforeSinglePageExport['perDayWidth'];
|
|
37835
|
+
_this.parent.updatedConnectorLineCollection = _this.helper.beforeSinglePageExport['updatedConnectorLineCollection'];
|
|
37836
|
+
}
|
|
37110
37837
|
if (!isMultipleExport) {
|
|
37111
37838
|
if (!_this.isBlob) {
|
|
37112
37839
|
// save the PDF
|