@syncfusion/ej2-gantt 20.1.60 → 20.2.39
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 +35 -0
- 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 +1129 -82
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1128 -79
- 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 +18 -18
- package/src/gantt/actions/actions.d.ts +1 -0
- package/src/gantt/actions/actions.js +1 -0
- package/src/gantt/actions/cell-edit.js +5 -3
- package/src/gantt/actions/connector-line-edit.js +20 -6
- package/src/gantt/actions/context-menu.js +3 -4
- package/src/gantt/actions/critical-path.d.ts +26 -0
- package/src/gantt/actions/critical-path.js +735 -0
- package/src/gantt/actions/dependency.js +3 -0
- package/src/gantt/actions/edit.js +29 -3
- package/src/gantt/actions/filter.js +1 -1
- package/src/gantt/actions/keyboard.js +2 -2
- package/src/gantt/actions/rowdragdrop.js +7 -1
- package/src/gantt/actions/selection.js +3 -0
- package/src/gantt/actions/taskbar-edit.js +5 -1
- package/src/gantt/actions/toolbar.js +20 -4
- package/src/gantt/base/css-constants.d.ts +12 -0
- package/src/gantt/base/css-constants.js +12 -0
- package/src/gantt/base/date-processor.d.ts +1 -1
- package/src/gantt/base/date-processor.js +9 -3
- package/src/gantt/base/enum.d.ts +3 -1
- package/src/gantt/base/gantt-chart.js +9 -2
- package/src/gantt/base/gantt-model.d.ts +8 -1
- package/src/gantt/base/gantt.d.ts +32 -1
- package/src/gantt/base/gantt.js +133 -5
- package/src/gantt/base/interface.d.ts +16 -0
- package/src/gantt/base/splitter.js +4 -0
- package/src/gantt/base/task-processor.js +16 -7
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/export/export-helper.js +16 -3
- package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +16 -0
- package/src/gantt/renderer/chart-rows.js +16 -5
- package/src/gantt/renderer/nonworking-day.js +5 -2
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +63 -26
- package/src/global.js +1 -1
- package/styles/bootstrap-dark.css +144 -92
- package/styles/bootstrap.css +141 -89
- package/styles/bootstrap4.css +142 -90
- package/styles/bootstrap5-dark.css +146 -94
- package/styles/bootstrap5.css +146 -94
- package/styles/fabric-dark.css +143 -91
- package/styles/fabric.css +148 -96
- package/styles/fluent-dark.css +152 -100
- package/styles/fluent.css +146 -94
- package/styles/gantt/_bootstrap-dark-definition.scss +22 -16
- package/styles/gantt/_bootstrap-definition.scss +21 -15
- package/styles/gantt/_bootstrap4-definition.scss +30 -24
- package/styles/gantt/_bootstrap5-definition.scss +20 -14
- package/styles/gantt/_fabric-dark-definition.scss +22 -16
- package/styles/gantt/_fabric-definition.scss +22 -16
- package/styles/gantt/_fluent-definition.scss +19 -13
- package/styles/gantt/_fusionnew-definition.scss +212 -0
- package/styles/gantt/_highcontrast-definition.scss +22 -16
- package/styles/gantt/_highcontrast-light-definition.scss +17 -11
- package/styles/gantt/_layout.scss +131 -136
- package/styles/gantt/_material-dark-definition.scss +22 -16
- package/styles/gantt/_material-definition.scss +27 -21
- package/styles/gantt/_material3-definition.scss +213 -0
- package/styles/gantt/_tailwind-definition.scss +16 -10
- package/styles/gantt/_theme.scss +56 -1
- package/styles/gantt/bootstrap-dark.css +144 -92
- package/styles/gantt/bootstrap.css +141 -89
- package/styles/gantt/bootstrap4.css +142 -90
- package/styles/gantt/bootstrap5-dark.css +146 -94
- package/styles/gantt/bootstrap5.css +146 -94
- package/styles/gantt/fabric-dark.css +143 -91
- package/styles/gantt/fabric.css +148 -96
- package/styles/gantt/fluent-dark.css +152 -100
- package/styles/gantt/fluent.css +146 -94
- package/styles/gantt/highcontrast-light.css +140 -91
- package/styles/gantt/highcontrast.css +143 -91
- package/styles/gantt/icons/_bootstrap-dark.scss +4 -1
- package/styles/gantt/icons/_bootstrap.scss +4 -1
- package/styles/gantt/icons/_bootstrap4.scss +4 -1
- 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 +120 -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 +124 -0
- package/styles/gantt/icons/_tailwind-dark.scss +4 -0
- package/styles/gantt/icons/_tailwind.scss +4 -0
- package/styles/gantt/material-dark.css +147 -95
- package/styles/gantt/material.css +149 -97
- package/styles/gantt/tailwind-dark.css +154 -102
- package/styles/gantt/tailwind.css +150 -98
- package/styles/highcontrast-light.css +140 -91
- package/styles/highcontrast.css +143 -91
- package/styles/material-dark.css +147 -95
- package/styles/material.css +149 -97
- package/styles/tailwind-dark.css +154 -102
- package/styles/tailwind.css +150 -98
|
@@ -239,7 +239,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
239
239
|
this.setTime(this.parent.defaultStartTime, cloneStartDate);
|
|
240
240
|
}
|
|
241
241
|
else if (hour < this.parent.defaultStartTime && validateAsMilestone) {
|
|
242
|
-
this.setTime(this.parent.
|
|
242
|
+
this.setTime(this.parent.defaultStartTime, cloneStartDate);
|
|
243
243
|
}
|
|
244
244
|
else if ((hour === this.parent.defaultEndTime && (!ganttProp || !validateAsMilestone)) || hour > this.parent.defaultEndTime) {
|
|
245
245
|
cloneStartDate.setDate(cloneStartDate.getDate() + 1);
|
|
@@ -391,7 +391,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
391
391
|
* @returns {Date} .
|
|
392
392
|
* @private
|
|
393
393
|
*/
|
|
394
|
-
DateProcessor.prototype.checkBaselineEndDate = function (date) {
|
|
394
|
+
DateProcessor.prototype.checkBaselineEndDate = function (date, ganttProp) {
|
|
395
395
|
if (isNullOrUndefined(date)) {
|
|
396
396
|
return null;
|
|
397
397
|
}
|
|
@@ -401,7 +401,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
401
401
|
if (hour > this.parent.defaultEndTime) {
|
|
402
402
|
this.setTime(this.parent.defaultEndTime, cloneDate);
|
|
403
403
|
}
|
|
404
|
-
else if (hour <= this.parent.defaultStartTime) {
|
|
404
|
+
else if (hour <= this.parent.defaultStartTime && !ganttProp.isMilestone) {
|
|
405
405
|
cloneDate.setDate(cloneDate.getDate() - 1);
|
|
406
406
|
this.setTime(this.parent.defaultEndTime, cloneDate);
|
|
407
407
|
}
|
|
@@ -1390,6 +1390,12 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1390
1390
|
*/
|
|
1391
1391
|
DateProcessor.prototype.calculateProjectDates = function (editArgs) {
|
|
1392
1392
|
var _this = this;
|
|
1393
|
+
if (this.parent.isLoad && this.parent.enablePersistence &&
|
|
1394
|
+
this.parent.cloneProjectStartDate && this.parent.cloneProjectEndDate) {
|
|
1395
|
+
this.parent.cloneProjectStartDate = this.getDateFromFormat(this.parent.cloneProjectStartDate);
|
|
1396
|
+
this.parent.cloneProjectEndDate = this.getDateFromFormat(this.parent.cloneProjectEndDate);
|
|
1397
|
+
return;
|
|
1398
|
+
}
|
|
1393
1399
|
var sDate = typeof this.parent.projectStartDate === 'string' ?
|
|
1394
1400
|
new Date(this.parent.projectStartDate) : this.parent.projectStartDate;
|
|
1395
1401
|
var eDate = typeof this.parent.projectEndDate === 'string' ?
|
|
@@ -1602,10 +1608,11 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1602
1608
|
var mappingData = new DataManager(dataSource).executeLocal(new Query()
|
|
1603
1609
|
.group(this.parent.taskFields.parentID));
|
|
1604
1610
|
var rootData = [];
|
|
1611
|
+
var index;
|
|
1605
1612
|
for (var i = 0; i < mappingData.length; i++) {
|
|
1606
1613
|
var groupData = mappingData[i];
|
|
1607
1614
|
if (!isNullOrUndefined(groupData.key)) {
|
|
1608
|
-
|
|
1615
|
+
index = this.taskIds.indexOf(groupData.key.toString());
|
|
1609
1616
|
if (index > -1) {
|
|
1610
1617
|
if (!isNullOrUndefined(groupData.key)) {
|
|
1611
1618
|
dataSource[index][this.parent.taskFields.child] = groupData.items;
|
|
@@ -1613,7 +1620,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1613
1620
|
}
|
|
1614
1621
|
}
|
|
1615
1622
|
}
|
|
1616
|
-
|
|
1623
|
+
if (index !== -1) {
|
|
1624
|
+
rootData.push.apply(rootData, groupData.items); // eslint-disable-line
|
|
1625
|
+
}
|
|
1617
1626
|
}
|
|
1618
1627
|
this.hierarchyData = this.dataReorder(dataSource, rootData);
|
|
1619
1628
|
};
|
|
@@ -1874,7 +1883,11 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1874
1883
|
if (baselineEndDate && baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
|
|
1875
1884
|
this.setTime(this.parent.defaultEndTime, baselineEndDate);
|
|
1876
1885
|
}
|
|
1877
|
-
|
|
1886
|
+
if ((ganttProperties.baselineStartDate && baselineEndDate &&
|
|
1887
|
+
(ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) || ganttProperties.isMilestone) {
|
|
1888
|
+
baselineEndDate = ganttProperties.baselineStartDate;
|
|
1889
|
+
}
|
|
1890
|
+
this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate, ganttProperties), ganttProperties, true);
|
|
1878
1891
|
this.parent.setRecordValue('progress', progress, ganttProperties, true);
|
|
1879
1892
|
this.parent.setRecordValue('totalProgress', progress, ganttProperties, true);
|
|
1880
1893
|
this.parent.setRecordValue('predecessorsName', predecessors, ganttProperties, true);
|
|
@@ -1895,7 +1908,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1895
1908
|
!isNullOrUndefined(taskSettings.child)) {
|
|
1896
1909
|
this.parent.setRecordValue(taskSettings.child, [], ganttData);
|
|
1897
1910
|
}
|
|
1898
|
-
this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate), ganttProperties, true);
|
|
1899
1911
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
1900
1912
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
1901
1913
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
@@ -2108,10 +2120,10 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2108
2120
|
work = parseFloat(work.toFixed(2));
|
|
2109
2121
|
}
|
|
2110
2122
|
}
|
|
2111
|
-
if (ganttData.childRecords.length > 0) {
|
|
2123
|
+
if (ganttData.childRecords.length > 0 && this.parent.isOnEdit) {
|
|
2112
2124
|
var childCompletedWorks = 0;
|
|
2113
2125
|
for (var i = 0; i < ganttData.childRecords.length; i++) {
|
|
2114
|
-
childCompletedWorks += ganttData.childRecords[i]
|
|
2126
|
+
childCompletedWorks += ganttData.childRecords[i].ganttProperties.work;
|
|
2115
2127
|
}
|
|
2116
2128
|
work += childCompletedWorks;
|
|
2117
2129
|
}
|
|
@@ -2611,7 +2623,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2611
2623
|
TaskProcessor.prototype.calculateBaselineWidth = function (ganttProperties) {
|
|
2612
2624
|
var baselineStartDate = this.getDateFromFormat(ganttProperties.baselineStartDate);
|
|
2613
2625
|
var baselineEndDate = this.getDateFromFormat(ganttProperties.baselineEndDate);
|
|
2614
|
-
if (baselineStartDate && baselineEndDate) {
|
|
2626
|
+
if (baselineStartDate && baselineEndDate && (baselineStartDate.getTime() !== baselineEndDate.getTime())) {
|
|
2615
2627
|
return (this.getTaskWidth(baselineStartDate, baselineEndDate));
|
|
2616
2628
|
}
|
|
2617
2629
|
else {
|
|
@@ -3675,6 +3687,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3675
3687
|
var maxEndDate = null;
|
|
3676
3688
|
var milestoneCount = 0;
|
|
3677
3689
|
var totalProgress = 0;
|
|
3690
|
+
var childCompletedWorks = 0;
|
|
3678
3691
|
var childData = void 0;
|
|
3679
3692
|
for (var count = 0; count < childLength; count++) {
|
|
3680
3693
|
childData = childRecords[count];
|
|
@@ -3712,6 +3725,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3712
3725
|
else {
|
|
3713
3726
|
milestoneCount++;
|
|
3714
3727
|
}
|
|
3728
|
+
childCompletedWorks += childData.ganttProperties.work;
|
|
3715
3729
|
}
|
|
3716
3730
|
if (!deleteUpdate) {
|
|
3717
3731
|
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
@@ -3737,6 +3751,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3737
3751
|
}
|
|
3738
3752
|
this.updateWorkWithDuration(parentData);
|
|
3739
3753
|
var parentWork = parentProp.work;
|
|
3754
|
+
parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
|
|
3740
3755
|
this.parent.setRecordValue('work', parentWork, parentProp, true);
|
|
3741
3756
|
this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
|
|
3742
3757
|
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
@@ -3808,8 +3823,12 @@ var parentProgressBarInnerDiv = 'e-gantt-parent-progressbar-inner-div';
|
|
|
3808
3823
|
var taskLabel = 'e-task-label';
|
|
3809
3824
|
var childTaskBarInnerDiv = 'e-gantt-child-taskbar-inner-div';
|
|
3810
3825
|
var childProgressBarInnerDiv = 'e-gantt-child-progressbar-inner-div';
|
|
3826
|
+
var criticalChildTaskBarInnerDiv = 'e-gantt-child-critical-taskbar-inner-div';
|
|
3827
|
+
var criticalChildProgressBarInnerDiv = 'e-gantt-child-critical-progressbar-inner-div';
|
|
3811
3828
|
var milestoneTop = 'e-milestone-top';
|
|
3812
3829
|
var milestoneBottom = 'e-milestone-bottom';
|
|
3830
|
+
var criticalMilestoneTop = 'e-critical-milestone-top';
|
|
3831
|
+
var criticalMilestoneBottom = 'e-critical-milestone-bottom';
|
|
3813
3832
|
var baselineBar = 'e-baseline-bar';
|
|
3814
3833
|
var baselineMilestoneContainer = 'e-baseline-gantt-milestone-container';
|
|
3815
3834
|
var baselineMilestoneDiv = 'e-baseline-gantt-milestone';
|
|
@@ -3845,6 +3864,7 @@ var traceManualUnscheduledTask = 'e-gantt-unscheduled-manualtask';
|
|
|
3845
3864
|
var traceParentTaskBar = 'e-gantt-parent-taskbar';
|
|
3846
3865
|
var traceParentProgressBar = 'e-gantt-parent-progressbar';
|
|
3847
3866
|
var traceUnscheduledTask = 'e-gantt-unscheduled-task';
|
|
3867
|
+
var criticalUnscheduledTask = 'e-gantt-critical-unscheduled-taskbar';
|
|
3848
3868
|
var taskIndicatorDiv = 'e-indicator-span';
|
|
3849
3869
|
var leftResizeGripper = 'e-left-resize-gripper';
|
|
3850
3870
|
var rightResizeGripper = 'e-right-resize-gripper';
|
|
@@ -3872,13 +3892,19 @@ var unscheduledMilestoneBottom = 'e-unscheduled-milestone-bottom';
|
|
|
3872
3892
|
var dependencyViewContainer = 'e-gantt-dependency-view-container';
|
|
3873
3893
|
var connectorLineContainer = 'e-connector-line-container';
|
|
3874
3894
|
var connectorLine = 'e-line';
|
|
3895
|
+
var criticalConnectorLine = 'e-criticalconnector-line';
|
|
3896
|
+
var criticalConnectorLineRightArrow = 'e-criticalconnector-line-right-arrow';
|
|
3897
|
+
var criticalConnectorLineLeftArrow = 'e-criticalconnector-line-left-arrow';
|
|
3875
3898
|
var connectorLineRightArrow = 'e-connector-line-right-arrow';
|
|
3876
3899
|
var connectorLineLeftArrow = 'e-connector-line-left-arrow';
|
|
3877
3900
|
var connectorLineZIndex = 'e-connector-line-z-index';
|
|
3878
3901
|
var connectorLineHover = 'e-connector-line-hover';
|
|
3902
|
+
var criticalConnectorLineHover = 'e-critical-connector-line-hover';
|
|
3879
3903
|
var connectorLineHoverZIndex = 'e-connector-line-hover-z-index';
|
|
3880
3904
|
var connectorLineRightArrowHover = 'e-connector-line-right-arrow-hover';
|
|
3881
3905
|
var connectorLineLeftArrowHover = 'e-connector-line-left-arrow-hover';
|
|
3906
|
+
var criticalConnectorLineRightArrowHover = 'e-critical-connector-line-right-arrow-hover';
|
|
3907
|
+
var criticalConnectorLineLeftArrowHover = 'e-critical-connector-line-left-arrow-hover';
|
|
3882
3908
|
|
|
3883
3909
|
var connectorPointLeft = 'e-connectorpoint-left';
|
|
3884
3910
|
var connectorPointRight = 'e-connectorpoint-right';
|
|
@@ -3905,6 +3931,7 @@ var editIcon = 'e-edit';
|
|
|
3905
3931
|
var indentIcon = 'e-indent';
|
|
3906
3932
|
var outdentIcon = 'e-outdent';
|
|
3907
3933
|
var addIcon = 'e-add';
|
|
3934
|
+
|
|
3908
3935
|
var addAboveIcon = 'e-add-above';
|
|
3909
3936
|
var addBelowIcon = 'e-add-below';
|
|
3910
3937
|
//Predecessor touch mode
|
|
@@ -4210,6 +4237,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4210
4237
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
4211
4238
|
}
|
|
4212
4239
|
this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection);
|
|
4240
|
+
if (this.parent.enableCriticalPath) {
|
|
4241
|
+
var crtiticalModule = this.parent.criticalPathModule;
|
|
4242
|
+
this.parent.criticalPathModule.criticalConnectorLine(crtiticalModule.criticalPathCollection, crtiticalModule.detailPredecessorCollection, this.parent.enableCriticalPath, crtiticalModule.predecessorCollectionTaskIds);
|
|
4243
|
+
}
|
|
4213
4244
|
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
|
|
4214
4245
|
this.renderOverAllocationContainer();
|
|
4215
4246
|
}
|
|
@@ -4831,6 +4862,9 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4831
4862
|
* @private
|
|
4832
4863
|
*/
|
|
4833
4864
|
GanttChart.prototype.expandedGanttRow = function (args) {
|
|
4865
|
+
if (isNullOrUndefined(args['gridRow'])) {
|
|
4866
|
+
return;
|
|
4867
|
+
}
|
|
4834
4868
|
var record = getValue('data', args);
|
|
4835
4869
|
if (this.isExpandCollapseFromChart) {
|
|
4836
4870
|
this.expandCollapseChartRows('expand', getValue('chartRow', args), record, null);
|
|
@@ -5085,7 +5119,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5085
5119
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
5086
5120
|
}
|
|
5087
5121
|
}
|
|
5088
|
-
if (!isInEditedState) {
|
|
5122
|
+
if (!isNullOrUndefined(isInEditedState) && !this.parent.editModule.cellEditModule.isCellEdit) {
|
|
5089
5123
|
if (nextElement) {
|
|
5090
5124
|
if ($target.classList.contains('e-rowcell')) {
|
|
5091
5125
|
this.manageFocus($target, 'remove', false);
|
|
@@ -5093,7 +5127,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5093
5127
|
else {
|
|
5094
5128
|
this.manageFocus($target, 'remove', true);
|
|
5095
5129
|
}
|
|
5096
|
-
if (nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) {
|
|
5130
|
+
if ((nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) || $target.classList.contains('e-right-label-container')) {
|
|
5097
5131
|
if (!$target.classList.contains('e-rowcell')) {
|
|
5098
5132
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
5099
5133
|
var fmodule = getValue('focusModule', this.parent.treeGrid.grid);
|
|
@@ -5386,6 +5420,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5386
5420
|
this.totalTimelineWidth = 0;
|
|
5387
5421
|
this.customTimelineSettings = null;
|
|
5388
5422
|
this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
|
|
5423
|
+
if (this.parent.enablePersistence) {
|
|
5424
|
+
this.parent.timelineSettings = this.parent.currentZoomingLevel;
|
|
5425
|
+
}
|
|
5389
5426
|
};
|
|
5390
5427
|
/**
|
|
5391
5428
|
* To render timeline header series.
|
|
@@ -5513,6 +5550,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5513
5550
|
this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
|
|
5514
5551
|
this.processTimelineUnit();
|
|
5515
5552
|
this.parent.updateProjectDates(this.parent.cloneProjectStartDate, this.parent.cloneProjectEndDate, this.parent.isTimelineRoundOff);
|
|
5553
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
5554
|
+
if (this.parent.enableCriticalPath && criticalModule) {
|
|
5555
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
5556
|
+
}
|
|
5516
5557
|
if (this.isZooming || this.isZoomToFit) {
|
|
5517
5558
|
var args = {
|
|
5518
5559
|
requestType: this.isZoomIn ? 'AfterZoomIn' : this.isZoomToFit ? 'AfterZoomToProject' : 'AfterZoomOut',
|
|
@@ -5571,8 +5612,8 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5571
5612
|
}
|
|
5572
5613
|
}
|
|
5573
5614
|
var newTimeline = extend({}, {}, zoomingLevel, true);
|
|
5574
|
-
this.roundOffDateToZoom(this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit);
|
|
5575
|
-
this.roundOffDateToZoom(this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit);
|
|
5615
|
+
this.roundOffDateToZoom(this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
5616
|
+
this.roundOffDateToZoom(this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
5576
5617
|
var numberOfCells = this.calculateNumberOfTimelineCells(newTimeline);
|
|
5577
5618
|
var scrollHeight = this.parent.ganttChartModule.scrollElement.offsetHeight - 17; //17 is horizontal scrollbar width
|
|
5578
5619
|
var contentHeight = this.parent.ganttChartModule.chartBodyContent.offsetHeight;
|
|
@@ -5588,24 +5629,40 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5588
5629
|
this.parent.trigger('actionBegin', args);
|
|
5589
5630
|
this.changeTimelineSettings(newTimeline);
|
|
5590
5631
|
};
|
|
5591
|
-
Timeline.prototype.
|
|
5592
|
-
var
|
|
5593
|
-
|
|
5632
|
+
Timeline.prototype.bottomTierCellWidthCalc = function (mode, zoomLevel, date) {
|
|
5633
|
+
var convertedMilliSeconds;
|
|
5634
|
+
switch (mode) {
|
|
5635
|
+
case 'Minutes':
|
|
5636
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 1000);
|
|
5637
|
+
break;
|
|
5638
|
+
case 'Hour':
|
|
5639
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 60 * 1000);
|
|
5640
|
+
break;
|
|
5641
|
+
case 'Week':
|
|
5642
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (7 * 24 * 60 * 60 * 1000);
|
|
5643
|
+
break;
|
|
5644
|
+
case 'Day':
|
|
5645
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (24 * 60 * 60 * 1000);
|
|
5646
|
+
break;
|
|
5647
|
+
case 'Month':
|
|
5648
|
+
var daysInMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
|
|
5649
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 60 * 24 * daysInMonth * 1000);
|
|
5650
|
+
break;
|
|
5651
|
+
case 'Year':
|
|
5652
|
+
var daysInYear = (date.getFullYear() % 400 === 0 || (date.getFullYear() % 100 !== 0 && date.getFullYear() % 4 === 0)) ? 366 : 365;
|
|
5653
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 60 * 24 * daysInYear * 1000);
|
|
5654
|
+
break;
|
|
5655
|
+
}
|
|
5656
|
+
return convertedMilliSeconds;
|
|
5657
|
+
};
|
|
5658
|
+
Timeline.prototype.roundOffDateToZoom = function (date, isStartDate, perDayWidth, tierMode, zoomingLevel) {
|
|
5659
|
+
var roundOffTime = this.bottomTierCellWidthCalc(tierMode, zoomingLevel, date);
|
|
5594
5660
|
if (isStartDate) {
|
|
5595
5661
|
date.setTime(date.getTime() - roundOffTime);
|
|
5596
5662
|
}
|
|
5597
5663
|
else {
|
|
5598
5664
|
date.setTime(date.getTime() + roundOffTime);
|
|
5599
5665
|
}
|
|
5600
|
-
if (tierMode === 'Hour') {
|
|
5601
|
-
date.setMinutes(isStartDate ? -120 : 120);
|
|
5602
|
-
}
|
|
5603
|
-
else if (tierMode === 'Minutes') {
|
|
5604
|
-
date.setSeconds(isStartDate ? -120 : 120);
|
|
5605
|
-
}
|
|
5606
|
-
else {
|
|
5607
|
-
date.setHours(isStartDate ? -48 : 48, 0, 0, 0);
|
|
5608
|
-
}
|
|
5609
5666
|
};
|
|
5610
5667
|
Timeline.prototype.calculateNumberOfTimelineCells = function (newTimeline) {
|
|
5611
5668
|
var numberOfDays = Math.abs((this.parent.cloneProjectEndDate.getTime() -
|
|
@@ -6176,7 +6233,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6176
6233
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell, isFirstCell);
|
|
6177
6234
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
6178
6235
|
if (isFirstCell) {
|
|
6179
|
-
newTime = this.calculateQuarterEndDate(startDate).getTime();
|
|
6236
|
+
newTime = this.calculateQuarterEndDate(startDate, count).getTime();
|
|
6180
6237
|
}
|
|
6181
6238
|
else {
|
|
6182
6239
|
increment = this.getIncrement(startDate, count, mode);
|
|
@@ -6332,19 +6389,29 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6332
6389
|
mode === 'Hour' || mode === 'Minutes') &&
|
|
6333
6390
|
this.parent.nonWorkingDayIndex.indexOf(day.getDay()) !== -1;
|
|
6334
6391
|
};
|
|
6335
|
-
Timeline.prototype.calculateQuarterEndDate = function (date) {
|
|
6392
|
+
Timeline.prototype.calculateQuarterEndDate = function (date, count) {
|
|
6336
6393
|
var month = date.getMonth();
|
|
6337
|
-
if (
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6394
|
+
if (count === 3) {
|
|
6395
|
+
if (month >= 0 && month <= 2) {
|
|
6396
|
+
return new Date(date.getFullYear(), 3, 1);
|
|
6397
|
+
}
|
|
6398
|
+
else if (month >= 3 && month <= 5) {
|
|
6399
|
+
return new Date(date.getFullYear(), 6, 1);
|
|
6400
|
+
}
|
|
6401
|
+
else if (month >= 6 && month <= 8) {
|
|
6402
|
+
return new Date(date.getFullYear(), 9, 1);
|
|
6403
|
+
}
|
|
6404
|
+
else {
|
|
6405
|
+
return new Date(date.getFullYear() + 1, 0, 1);
|
|
6406
|
+
}
|
|
6345
6407
|
}
|
|
6346
6408
|
else {
|
|
6347
|
-
|
|
6409
|
+
if (month >= 0 && month <= 5) {
|
|
6410
|
+
return new Date(date.getFullYear(), 6, 1);
|
|
6411
|
+
}
|
|
6412
|
+
else {
|
|
6413
|
+
return new Date(date.getFullYear() + 1, 0, 1);
|
|
6414
|
+
}
|
|
6348
6415
|
}
|
|
6349
6416
|
};
|
|
6350
6417
|
/**
|
|
@@ -6375,7 +6442,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6375
6442
|
this.customFormat(scheduleWeeks, format, tier, mode, formatter);
|
|
6376
6443
|
thWidth = (this.getIncrement(scheduleWeeks, count, mode) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth;
|
|
6377
6444
|
var cellWidth = thWidth;
|
|
6378
|
-
thWidth = isLast || isFirstCell ? isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate) : this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.calculateQuarterEndDate(scheduleWeeks))
|
|
6445
|
+
thWidth = isLast || isFirstCell ? isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate) : this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.calculateQuarterEndDate(scheduleWeeks, count))
|
|
6379
6446
|
: thWidth;
|
|
6380
6447
|
var isWeekendCell = this.isWeekendHeaderCell(mode, tier, scheduleWeeks);
|
|
6381
6448
|
var textClassName = tier === 'topTier' ? ' e-gantt-top-cell-text' : '';
|
|
@@ -6728,6 +6795,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6728
6795
|
else if (type === 'nextTimeSpan' && isFrom === 'publicMethod') {
|
|
6729
6796
|
this.parent.ganttChartModule.updateScrollLeft(this.parent.timelineModule.totalTimelineWidth);
|
|
6730
6797
|
}
|
|
6798
|
+
else if (type === 'nextTimeSpan' && isFrom === 'TaskbarEditing') {
|
|
6799
|
+
var currentScrollLeft = document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollLeft;
|
|
6800
|
+
this.parent.element.querySelector('.e-timeline-header-container').scrollLeft = currentScrollLeft;
|
|
6801
|
+
}
|
|
6731
6802
|
this.parent.timelineModule.timeSpanActionEvent('actionComplete', type, isFrom);
|
|
6732
6803
|
}
|
|
6733
6804
|
else {
|
|
@@ -6965,7 +7036,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
6965
7036
|
var scrollWidth = this.getScrollbarWidth();
|
|
6966
7037
|
var isMobile = /Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6967
7038
|
if (scrollWidth !== 0) {
|
|
6968
|
-
content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);';
|
|
7039
|
+
content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);'; //actual scrollbar width 17 px but here scrollbar width set to 16px hence adding increment of 1
|
|
6969
7040
|
}
|
|
6970
7041
|
else {
|
|
6971
7042
|
content.classList.add('e-gantt-scroll-padding');
|
|
@@ -8456,7 +8527,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8456
8527
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
8457
8528
|
}
|
|
8458
8529
|
if (labelString.indexOf('null') === -1) {
|
|
8459
|
-
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
8530
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
8531
|
+
!this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
8460
8532
|
labelString = '';
|
|
8461
8533
|
}
|
|
8462
8534
|
if (isNaN(parseInt(labelString))) {
|
|
@@ -8506,7 +8578,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8506
8578
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
8507
8579
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
8508
8580
|
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
8509
|
-
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML
|
|
8581
|
+
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML !== '')
|
|
8510
8582
|
progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
|
|
8511
8583
|
}
|
|
8512
8584
|
if (!isNullOrUndefined(taskbarInnerDiv) && taskbarInnerDiv.length > 0) {
|
|
@@ -8524,6 +8596,13 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8524
8596
|
var splitTasks = '';
|
|
8525
8597
|
for (var i = 0; i < data.ganttProperties.segments.length; i++) {
|
|
8526
8598
|
var segment = data.ganttProperties.segments[i];
|
|
8599
|
+
var progressBarVisible = void 0;
|
|
8600
|
+
if (!segment.showProgress) {
|
|
8601
|
+
progressBarVisible = 'hidden';
|
|
8602
|
+
}
|
|
8603
|
+
else {
|
|
8604
|
+
progressBarVisible = 'initial';
|
|
8605
|
+
}
|
|
8527
8606
|
var segmentPosition = (i === 0) ? 'e-segment-first' : (i === data.ganttProperties.segments.length - 1)
|
|
8528
8607
|
? 'e-segment-last' : 'e-segment-inprogress';
|
|
8529
8608
|
splitTasks += (
|
|
@@ -8531,7 +8610,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8531
8610
|
'<div class="' + childTaskBarInnerDiv + ' ' + segmentPosition + ' ' + traceChildTaskBar + ' ' +
|
|
8532
8611
|
' e-segmented-taskbar' +
|
|
8533
8612
|
'"style="width:' + segment.width + 'px;position: absolute; left:' + segment.left + 'px;height:' +
|
|
8534
|
-
(this.taskBarHeight) + 'px; overflow:
|
|
8613
|
+
(this.taskBarHeight) + 'px; overflow:' + progressBarVisible + ';" data-segment-index = "' + i + '" aria-label = "' +
|
|
8535
8614
|
this.generateSpiltTaskAriaLabel(segment, data.ganttProperties) + '"> ' +
|
|
8536
8615
|
this.getSplitTaskbarLeftResizerNode() +
|
|
8537
8616
|
//split progress bar
|
|
@@ -8653,6 +8732,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8653
8732
|
this.parent.dataOperation.updateMappingData(mergeData, 'segments');
|
|
8654
8733
|
if (segments.length === 1) {
|
|
8655
8734
|
this.parent.setRecordValue('endDate', endDate, mergeData.ganttProperties, true);
|
|
8735
|
+
this.parent.setRecordValue('EndDate', endDate, mergeData, true);
|
|
8656
8736
|
this.parent.setRecordValue('segments', null, mergeData.ganttProperties, true);
|
|
8657
8737
|
this.parent.dataOperation.updateMappingData(mergeData, 'segments');
|
|
8658
8738
|
}
|
|
@@ -8821,6 +8901,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8821
8901
|
else {
|
|
8822
8902
|
startDate = new Date(splitDate.getTime());
|
|
8823
8903
|
startDate.setDate(startDate.getDate() + 1 + increment);
|
|
8904
|
+
this.setTime(this.parent.defaultStartTime, startDate);
|
|
8824
8905
|
startDate = this.parent.dataOperation.checkStartDate(startDate, ganttProp, false);
|
|
8825
8906
|
segmentEndDate = new Date(endDate.getTime());
|
|
8826
8907
|
segmentEndDate.setDate(segmentEndDate.getDate() + 1);
|
|
@@ -9094,7 +9175,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9094
9175
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
9095
9176
|
}
|
|
9096
9177
|
if (labelString.indexOf('null') === -1) {
|
|
9097
|
-
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
9178
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
9179
|
+
!this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
9098
9180
|
labelString = '';
|
|
9099
9181
|
}
|
|
9100
9182
|
if (isNaN(parseInt(labelString))) {
|
|
@@ -9123,7 +9205,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9123
9205
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
9124
9206
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
9125
9207
|
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
9126
|
-
parentLabel && !parentLabel['elementRef'] && div.innerHTML
|
|
9208
|
+
parentLabel && !parentLabel['elementRef'] && div.innerHTML !== '')
|
|
9127
9209
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
9128
9210
|
}
|
|
9129
9211
|
var milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
|
|
@@ -10679,6 +10761,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10679
10761
|
Dependency.prototype.updateConnectorLineObject = function (parentGanttRecord, childGanttRecord, predecessor) {
|
|
10680
10762
|
var connectorObj = this.parent.connectorLineModule.createConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
10681
10763
|
if (connectorObj) {
|
|
10764
|
+
if (childGanttRecord.isCritical && parentGanttRecord.isCritical) {
|
|
10765
|
+
connectorObj.isCritical = true;
|
|
10766
|
+
}
|
|
10682
10767
|
if ((this.parent.connectorLineIds.length > 0 && this.parent.connectorLineIds.indexOf(connectorObj.connectorLineId) === -1) ||
|
|
10683
10768
|
this.parent.connectorLineIds.length === 0) {
|
|
10684
10769
|
this.parent.updatedConnectorLineCollection.push(connectorObj);
|
|
@@ -11753,6 +11838,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
11753
11838
|
this.splitterObject = new Splitter({
|
|
11754
11839
|
height: null,
|
|
11755
11840
|
width: this.parent.ganttWidth.toString(),
|
|
11841
|
+
enablePersistence: this.parent.enablePersistence,
|
|
11756
11842
|
separatorSize: this.parent.splitterSettings.separatorSize,
|
|
11757
11843
|
paneSettings: [
|
|
11758
11844
|
{
|
|
@@ -11804,6 +11890,9 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
11804
11890
|
* @private
|
|
11805
11891
|
*/
|
|
11806
11892
|
Splitter$$1.prototype.calculateSplitterPosition = function (splitter$$1, isDynamic) {
|
|
11893
|
+
if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
|
|
11894
|
+
return this.splitterObject.paneSettings[0].size;
|
|
11895
|
+
}
|
|
11807
11896
|
if (splitter$$1.view === 'Grid') {
|
|
11808
11897
|
return '100%';
|
|
11809
11898
|
}
|
|
@@ -12502,8 +12591,8 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12502
12591
|
break;
|
|
12503
12592
|
}
|
|
12504
12593
|
case 'delete':
|
|
12505
|
-
if (ganttObj.selectionModule && ganttObj.editModule &&
|
|
12506
|
-
(ganttObj.editModule.dialogModule.dialogObj &&
|
|
12594
|
+
if (ganttObj.selectionModule && ganttObj.editModule && ganttObj.editModule.dialogModule &&
|
|
12595
|
+
(!ganttObj.editModule.dialogModule.dialogObj || (ganttObj.editModule.dialogModule.dialogObj &&
|
|
12507
12596
|
!ganttObj.editModule.dialogModule.dialogObj.visible)) && (!ganttObj.editSettings.allowTaskbarEditing
|
|
12508
12597
|
|| (ganttObj.editSettings.allowTaskbarEditing && !ganttObj.editModule.taskbarEditModule.touchEdit))) {
|
|
12509
12598
|
if ((ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectionModule.selectedRowIndexes.length)
|
|
@@ -12705,6 +12794,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12705
12794
|
* @private
|
|
12706
12795
|
*/
|
|
12707
12796
|
_this.isEdit = false;
|
|
12797
|
+
setValue('mergePersistData', _this.mergePersistGanttData, _this);
|
|
12708
12798
|
return _this;
|
|
12709
12799
|
}
|
|
12710
12800
|
/**
|
|
@@ -12775,8 +12865,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12775
12865
|
this.dataOperation.getNonWorkingDayIndex();
|
|
12776
12866
|
this.columnMapping = {};
|
|
12777
12867
|
this.controlId = this.element.id;
|
|
12778
|
-
this.cloneProjectStartDate =
|
|
12779
|
-
|
|
12868
|
+
this.cloneProjectStartDate = this.enablePersistence && this.cloneProjectStartDate ?
|
|
12869
|
+
this.cloneProjectStartDate : null;
|
|
12870
|
+
this.cloneProjectEndDate = this.enablePersistence && this.cloneProjectEndDate ?
|
|
12871
|
+
this.cloneProjectEndDate : null;
|
|
12780
12872
|
this.totalHolidayDates = this.dataOperation.getHolidayDates();
|
|
12781
12873
|
this.ganttChartModule = new GanttChart(this);
|
|
12782
12874
|
this.timelineModule = new Timeline(this);
|
|
@@ -13043,6 +13135,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13043
13135
|
this.updateRowHeightInConnectorLine(this.updatedConnectorLineCollection);
|
|
13044
13136
|
this.connectorLineModule.renderConnectorLines(this.updatedConnectorLineCollection);
|
|
13045
13137
|
}
|
|
13138
|
+
if (this.enableCriticalPath) {
|
|
13139
|
+
var criticalModule = this.criticalPathModule;
|
|
13140
|
+
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
13141
|
+
}
|
|
13046
13142
|
}
|
|
13047
13143
|
};
|
|
13048
13144
|
Gantt.prototype.keyActionHandler = function (e) {
|
|
@@ -13374,6 +13470,39 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13374
13470
|
var value = this.dateValidationModule.getWorkString(work, workUnit);
|
|
13375
13471
|
return value;
|
|
13376
13472
|
};
|
|
13473
|
+
Gantt.prototype.updateTreeColumns = function () {
|
|
13474
|
+
var temp;
|
|
13475
|
+
var field;
|
|
13476
|
+
var gridColumns = this.treeGrid.grid.getColumns();
|
|
13477
|
+
if (this.treeColumnIndex !== -1 && this.columns[this.treeColumnIndex] &&
|
|
13478
|
+
!isNullOrUndefined(this.columns[this.treeColumnIndex]['template'])) {
|
|
13479
|
+
temp = this.columns[this.treeColumnIndex]['template'];
|
|
13480
|
+
field = this.columns[this.treeColumnIndex]['field'];
|
|
13481
|
+
}
|
|
13482
|
+
var gridColumn;
|
|
13483
|
+
for (var i = 0; i < gridColumns.length; i++) {
|
|
13484
|
+
gridColumn = {};
|
|
13485
|
+
for (var j = 0; j < this.columns.length; j++) {
|
|
13486
|
+
if (this.columns[j]['field'] == gridColumns[i].field) {
|
|
13487
|
+
for (var _i = 0, _a = Object.keys(this.columns[j]); _i < _a.length; _i++) {
|
|
13488
|
+
var prop = _a[_i];
|
|
13489
|
+
if (!isUndefined(this.columns[j][prop])) {
|
|
13490
|
+
gridColumn[prop] = gridColumns[i][prop];
|
|
13491
|
+
}
|
|
13492
|
+
gridColumn.visible = gridColumns[i].visible;
|
|
13493
|
+
gridColumn.width = gridColumns[i].width;
|
|
13494
|
+
}
|
|
13495
|
+
this.columns[j] = (gridColumn);
|
|
13496
|
+
if (this.columns[j]['type'] !== 'checkbox' && (!isNullOrUndefined(temp) && temp !== '')) {
|
|
13497
|
+
this.columns[j]['template'] = temp;
|
|
13498
|
+
}
|
|
13499
|
+
}
|
|
13500
|
+
}
|
|
13501
|
+
}
|
|
13502
|
+
if (this.columns.length > 0) {
|
|
13503
|
+
this.treeGrid.setProperties({ columns: this.columns }, true);
|
|
13504
|
+
}
|
|
13505
|
+
};
|
|
13377
13506
|
/**
|
|
13378
13507
|
*
|
|
13379
13508
|
* @param {object} args .
|
|
@@ -13394,6 +13523,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13394
13523
|
this.splitterElement.style.height = '100%';
|
|
13395
13524
|
}
|
|
13396
13525
|
if (this.isLoad) {
|
|
13526
|
+
if (this.enablePersistence) {
|
|
13527
|
+
this.updateTreeColumns();
|
|
13528
|
+
}
|
|
13397
13529
|
this.updateCurrentViewData();
|
|
13398
13530
|
if (!this.enableVirtualization) {
|
|
13399
13531
|
this.updateContentHeight();
|
|
@@ -13423,7 +13555,14 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13423
13555
|
else {
|
|
13424
13556
|
this.getCurrentRecords(args);
|
|
13425
13557
|
}
|
|
13558
|
+
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
13559
|
+
this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
|
|
13560
|
+
}
|
|
13426
13561
|
this.notify('recordsUpdated', {});
|
|
13562
|
+
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
13563
|
+
var criticalModule = this.criticalPathModule;
|
|
13564
|
+
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
13565
|
+
}
|
|
13427
13566
|
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
13428
13567
|
this.isLoad = false;
|
|
13429
13568
|
this.trigger('dataBound', args);
|
|
@@ -13512,6 +13651,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13512
13651
|
}
|
|
13513
13652
|
break;
|
|
13514
13653
|
case 'timezone':
|
|
13654
|
+
case 'enableCriticalPath':
|
|
13515
13655
|
this.dataOperation.checkDataBinding(true);
|
|
13516
13656
|
break;
|
|
13517
13657
|
case 'filterSettings':
|
|
@@ -13679,15 +13819,42 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13679
13819
|
}
|
|
13680
13820
|
};
|
|
13681
13821
|
/**
|
|
13682
|
-
*
|
|
13822
|
+
* Returns the properties to be maintained in persisted state.
|
|
13683
13823
|
*
|
|
13684
13824
|
* @returns {string} .
|
|
13685
13825
|
* @private
|
|
13686
13826
|
*/
|
|
13687
13827
|
Gantt.prototype.getPersistData = function () {
|
|
13688
|
-
var keyEntity = ['
|
|
13828
|
+
var keyEntity = ['sortSettings',
|
|
13829
|
+
'filterSettings', 'columns', 'searchSettings', 'selectedRowIndex', 'treeColumnIndex', 'currentZoomingLevel', 'cloneProjectStartDate', 'cloneProjectEndDate'];
|
|
13830
|
+
var ignoreOnPersist = {
|
|
13831
|
+
filterSettings: ['type', 'mode', 'showFilterBarStatus', 'immediateModeDelay', 'ignoreAccent', 'hierarchyMode'],
|
|
13832
|
+
searchSettings: ['fields', 'operator', 'ignoreCase'],
|
|
13833
|
+
sortSettings: [], columns: [], selectedRowIndex: []
|
|
13834
|
+
};
|
|
13835
|
+
var ignoreOnColumn = ['filter', 'edit', 'filterBarTemplate', 'headerTemplate', 'template',
|
|
13836
|
+
'commandTemplate', 'commands', 'dataSource'];
|
|
13837
|
+
for (var i = 0; i < keyEntity.length; i++) {
|
|
13838
|
+
var currentObject = this[keyEntity[i]];
|
|
13839
|
+
for (var k = 0, val = ignoreOnPersist[keyEntity[i]]; (!isNullOrUndefined(val) && k < val.length); k++) {
|
|
13840
|
+
var objVal = val[k];
|
|
13841
|
+
delete currentObject[objVal];
|
|
13842
|
+
}
|
|
13843
|
+
}
|
|
13844
|
+
this.ignoreInArrays(ignoreOnColumn, this.columns);
|
|
13689
13845
|
return this.addOnPersist(keyEntity);
|
|
13690
13846
|
};
|
|
13847
|
+
Gantt.prototype.ignoreInArrays = function (ignoreOnColumn, columns) {
|
|
13848
|
+
for (var i = 0; i < columns.length; i++) {
|
|
13849
|
+
this.ignoreInColumn(ignoreOnColumn, columns[i]);
|
|
13850
|
+
}
|
|
13851
|
+
};
|
|
13852
|
+
Gantt.prototype.ignoreInColumn = function (ignoreOnColumn, column) {
|
|
13853
|
+
for (var i = 0; i < ignoreOnColumn.length; i++) {
|
|
13854
|
+
delete column[ignoreOnColumn[i]];
|
|
13855
|
+
column.filter = {};
|
|
13856
|
+
}
|
|
13857
|
+
};
|
|
13691
13858
|
/**
|
|
13692
13859
|
* @returns {void} .
|
|
13693
13860
|
* @private
|
|
@@ -13770,6 +13937,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13770
13937
|
args: [this]
|
|
13771
13938
|
});
|
|
13772
13939
|
}
|
|
13940
|
+
if (this.enableCriticalPath) {
|
|
13941
|
+
modules.push({
|
|
13942
|
+
member: 'criticalPath',
|
|
13943
|
+
args: [this]
|
|
13944
|
+
});
|
|
13945
|
+
}
|
|
13773
13946
|
if (this.allowResizing) {
|
|
13774
13947
|
modules.push({
|
|
13775
13948
|
member: 'resize',
|
|
@@ -13847,6 +14020,17 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13847
14020
|
this.sortModule.sortColumn(columnName, direction, isMultiSort);
|
|
13848
14021
|
}
|
|
13849
14022
|
};
|
|
14023
|
+
Gantt.prototype.mergePersistGanttData = function () {
|
|
14024
|
+
if (!this.treeGrid) {
|
|
14025
|
+
this.treeGrid = new TreeGrid();
|
|
14026
|
+
}
|
|
14027
|
+
var persist1 = 'mergePersistGridData';
|
|
14028
|
+
this.treeGrid.grid[persist1].apply(this);
|
|
14029
|
+
};
|
|
14030
|
+
Gantt.prototype.mergeColumns = function (storedColumn, columns) {
|
|
14031
|
+
var persist2 = 'mergeColumns';
|
|
14032
|
+
this.treeGrid.grid[persist2].apply(this, [storedColumn, columns]);
|
|
14033
|
+
};
|
|
13850
14034
|
/**
|
|
13851
14035
|
* Clears all the sorted columns of the Gantt.
|
|
13852
14036
|
*
|
|
@@ -13924,7 +14108,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13924
14108
|
*/
|
|
13925
14109
|
Gantt.prototype.updateGridLineContainerHeight = function () {
|
|
13926
14110
|
if (this.chartVerticalLineContainer) {
|
|
13927
|
-
this.chartVerticalLineContainer.style.height = formatUnit(this.
|
|
14111
|
+
this.chartVerticalLineContainer.style.height = formatUnit(this.getContentHeight());
|
|
13928
14112
|
}
|
|
13929
14113
|
};
|
|
13930
14114
|
/**
|
|
@@ -14028,6 +14212,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14028
14212
|
progress: 'Progress',
|
|
14029
14213
|
dependency: 'Dependency',
|
|
14030
14214
|
notes: 'Notes',
|
|
14215
|
+
criticalPath: 'Critical Path',
|
|
14031
14216
|
baselineStartDate: 'Baseline Start Date',
|
|
14032
14217
|
baselineEndDate: 'Baseline End Date',
|
|
14033
14218
|
taskMode: 'Task Mode',
|
|
@@ -14725,6 +14910,34 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14725
14910
|
this.editModule.outdent();
|
|
14726
14911
|
}
|
|
14727
14912
|
};
|
|
14913
|
+
/**
|
|
14914
|
+
* To render the critical path tasks in Gantt.
|
|
14915
|
+
*
|
|
14916
|
+
* @returns {void} .
|
|
14917
|
+
* @param {boolean} isCritical- whether to render critical path or not .
|
|
14918
|
+
* @public
|
|
14919
|
+
*/
|
|
14920
|
+
Gantt.prototype.showCriticalPath = function (isCritical) {
|
|
14921
|
+
if (this.criticalPathModule) {
|
|
14922
|
+
this.criticalPathModule.showCriticalPath(isCritical);
|
|
14923
|
+
var criticalModule = this.criticalPathModule;
|
|
14924
|
+
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
14925
|
+
}
|
|
14926
|
+
};
|
|
14927
|
+
/**
|
|
14928
|
+
* To get all the critical tasks in Gantt.
|
|
14929
|
+
*
|
|
14930
|
+
* @returns {IGanttData[]} .
|
|
14931
|
+
* @public
|
|
14932
|
+
*/
|
|
14933
|
+
Gantt.prototype.getCriticalTasks = function () {
|
|
14934
|
+
if (!isNullOrUndefined(this.criticalPathModule) && this.enableCriticalPath) {
|
|
14935
|
+
return this.criticalPathModule.getCriticalTasks();
|
|
14936
|
+
}
|
|
14937
|
+
else {
|
|
14938
|
+
return null;
|
|
14939
|
+
}
|
|
14940
|
+
};
|
|
14728
14941
|
/**
|
|
14729
14942
|
* To perform Zoom in action on Gantt timeline.
|
|
14730
14943
|
*
|
|
@@ -15536,6 +15749,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15536
15749
|
__decorate([
|
|
15537
15750
|
Property(false)
|
|
15538
15751
|
], Gantt.prototype, "enableContextMenu", void 0);
|
|
15752
|
+
__decorate([
|
|
15753
|
+
Property(false)
|
|
15754
|
+
], Gantt.prototype, "enableCriticalPath", void 0);
|
|
15539
15755
|
__decorate([
|
|
15540
15756
|
Property()
|
|
15541
15757
|
], Gantt.prototype, "contextMenuItems", void 0);
|
|
@@ -15836,7 +16052,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
15836
16052
|
return;
|
|
15837
16053
|
}
|
|
15838
16054
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
15839
|
-
data['isManual']
|
|
16055
|
+
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
15840
16056
|
|| field === taskSettings.dependency || field === taskSettings.progress
|
|
15841
16057
|
|| field === taskSettings.work || field === 'taskType')) {
|
|
15842
16058
|
args.cancel = true;
|
|
@@ -16025,7 +16241,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
16025
16241
|
var ganttProb = args.data.ganttProperties;
|
|
16026
16242
|
var currentValue = args.data[this.parent.taskFields.startDate];
|
|
16027
16243
|
currentValue = currentValue ? new Date(currentValue.getTime()) : null;
|
|
16028
|
-
currentValue = this.parent.dateValidationModule.checkStartDate(currentValue);
|
|
16244
|
+
currentValue = this.parent.dateValidationModule.checkStartDate(currentValue, ganttData.ganttProperties, ganttData.ganttProperties.isMilestone);
|
|
16029
16245
|
if (isNullOrUndefined(currentValue)) {
|
|
16030
16246
|
if (!ganttData.hasChildRecords) {
|
|
16031
16247
|
this.parent.setRecordValue('startDate', null, ganttProb, true);
|
|
@@ -16150,7 +16366,9 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
16150
16366
|
var currentDuration = ganttProb.duration;
|
|
16151
16367
|
if (isNullOrUndefined(currentDuration)) {
|
|
16152
16368
|
this.parent.setRecordValue('isMilestone', false, ganttProb, true);
|
|
16153
|
-
this.parent.
|
|
16369
|
+
if (args.data[this.parent.taskFields.duration] != null) {
|
|
16370
|
+
this.parent.setRecordValue('endDate', null, ganttProb, true);
|
|
16371
|
+
}
|
|
16154
16372
|
}
|
|
16155
16373
|
else {
|
|
16156
16374
|
if (isNullOrUndefined(startDate) && !isNullOrUndefined(endDate)) {
|
|
@@ -17167,7 +17385,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17167
17385
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.left;
|
|
17168
17386
|
this.startScrollTimer('left');
|
|
17169
17387
|
}
|
|
17170
|
-
else if (isConnectorLineEdit && ((mouseY +
|
|
17388
|
+
else if (isConnectorLineEdit && ((mouseY + 80) >
|
|
17171
17389
|
containerPosition.top + this.parent.ganttChartModule.chartBodyContainer.offsetHeight)) {
|
|
17172
17390
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
17173
17391
|
this.startScrollTimer('bottom');
|
|
@@ -18045,6 +18263,10 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18045
18263
|
else {
|
|
18046
18264
|
this.parent.isOnEdit = false;
|
|
18047
18265
|
this.cancelTaskbarEditActionInMouseLeave();
|
|
18266
|
+
if (this.parent.enableCriticalPath && this.parent.criticalPathModule) {
|
|
18267
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
18268
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
18269
|
+
}
|
|
18048
18270
|
}
|
|
18049
18271
|
}
|
|
18050
18272
|
if (this.parent.viewType === 'ResourceView' && this.parent.enableMultiTaskbar && !isNullOrUndefined(this.taskBarEditElement)) {
|
|
@@ -20722,9 +20944,16 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
20722
20944
|
ConnectorLineEdit.prototype.addHighlight = function (element) {
|
|
20723
20945
|
this.connectorLineElement = element;
|
|
20724
20946
|
addClass([element], [connectorLineHoverZIndex]);
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20947
|
+
if (element.querySelectorAll('.' + connectorLine)[0].classList.contains('e-criticalconnector-line')) {
|
|
20948
|
+
addClass(element.querySelectorAll('.' + connectorLine), [criticalConnectorLineHover]);
|
|
20949
|
+
addClass(element.querySelectorAll('.' + connectorLineRightArrow), [criticalConnectorLineRightArrowHover]);
|
|
20950
|
+
addClass(element.querySelectorAll('.' + connectorLineLeftArrow), [criticalConnectorLineLeftArrowHover]);
|
|
20951
|
+
}
|
|
20952
|
+
else {
|
|
20953
|
+
addClass(element.querySelectorAll('.' + connectorLine), [connectorLineHover]);
|
|
20954
|
+
addClass(element.querySelectorAll('.' + connectorLineRightArrow), [connectorLineRightArrowHover]);
|
|
20955
|
+
addClass(element.querySelectorAll('.' + connectorLineLeftArrow), [connectorLineLeftArrowHover]);
|
|
20956
|
+
}
|
|
20728
20957
|
};
|
|
20729
20958
|
/**
|
|
20730
20959
|
* To remove connector line highlight class.
|
|
@@ -20735,9 +20964,16 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
20735
20964
|
ConnectorLineEdit.prototype.removeHighlight = function () {
|
|
20736
20965
|
if (!isNullOrUndefined(this.connectorLineElement)) {
|
|
20737
20966
|
removeClass([this.connectorLineElement], [connectorLineHoverZIndex]);
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20967
|
+
if (this.connectorLineElement.querySelectorAll('.' + connectorLine)[0].classList.contains(criticalConnectorLineHover)) {
|
|
20968
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLine), [criticalConnectorLineHover]);
|
|
20969
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineRightArrow), [criticalConnectorLineRightArrowHover]);
|
|
20970
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineLeftArrow), [criticalConnectorLineLeftArrowHover]);
|
|
20971
|
+
}
|
|
20972
|
+
else {
|
|
20973
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLine), [connectorLineHover]);
|
|
20974
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineRightArrow), [connectorLineRightArrowHover]);
|
|
20975
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineLeftArrow), [connectorLineLeftArrowHover]);
|
|
20976
|
+
}
|
|
20741
20977
|
this.connectorLineElement = null;
|
|
20742
20978
|
}
|
|
20743
20979
|
};
|
|
@@ -21945,6 +22181,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
21945
22181
|
}
|
|
21946
22182
|
if ((key === tasks.baselineStartDate || key === tasks.baselineEndDate) &&
|
|
21947
22183
|
(ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate)) {
|
|
22184
|
+
ganttObj.setRecordValue('baselineStartDate', ganttObj.dataOperation.checkBaselineStartDate(ganttData.ganttProperties.baselineStartDate), ganttData.ganttProperties, true);
|
|
22185
|
+
ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
|
|
22186
|
+
ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
|
|
21948
22187
|
ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
|
|
21949
22188
|
ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
|
|
21950
22189
|
}
|
|
@@ -22707,6 +22946,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
22707
22946
|
eventArgs.taskBarEditAction = args.taskBarEditAction;
|
|
22708
22947
|
}
|
|
22709
22948
|
this.endEditAction(args);
|
|
22949
|
+
if (this.parent.enableCriticalPath) {
|
|
22950
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
22951
|
+
criticalModule.showCriticalPath(true);
|
|
22952
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
22953
|
+
}
|
|
22710
22954
|
this.parent.trigger('actionComplete', eventArgs);
|
|
22711
22955
|
}
|
|
22712
22956
|
else {
|
|
@@ -23041,6 +23285,8 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23041
23285
|
}
|
|
23042
23286
|
else {
|
|
23043
23287
|
this.deleteSelectedItems();
|
|
23288
|
+
var focusingElement = this.parent.element.querySelector('.e-treegrid');
|
|
23289
|
+
focusingElement.focus();
|
|
23044
23290
|
}
|
|
23045
23291
|
}
|
|
23046
23292
|
};
|
|
@@ -23911,7 +24157,17 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23911
24157
|
this.refreshRecordInImmutableMode();
|
|
23912
24158
|
}
|
|
23913
24159
|
};
|
|
23914
|
-
Edit$$1.prototype.refreshRecordInImmutableMode = function () {
|
|
24160
|
+
Edit$$1.prototype.refreshRecordInImmutableMode = function (data, dragged) {
|
|
24161
|
+
if (!dragged && !isNullOrUndefined(data)) {
|
|
24162
|
+
for (var i = data[0].index + 1; i < this.parent.currentViewData.length; i++) {
|
|
24163
|
+
if (data[0].level < this.parent.currentViewData[i].level) {
|
|
24164
|
+
this.parent.modifiedRecords.push(this.parent.currentViewData[i]);
|
|
24165
|
+
}
|
|
24166
|
+
else {
|
|
24167
|
+
break;
|
|
24168
|
+
}
|
|
24169
|
+
}
|
|
24170
|
+
}
|
|
23915
24171
|
var _loop_1 = function (i) {
|
|
23916
24172
|
var originalData = this_1.parent.modifiedRecords[i];
|
|
23917
24173
|
var treeIndex = this_1.parent.allowRowDragAndDrop ? 1 : 0;
|
|
@@ -24078,7 +24334,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24078
24334
|
var insertCrud = data_2.insert(updatedData_2[addedRecords], null, query_2);
|
|
24079
24335
|
insertCrud.then(function (e) {
|
|
24080
24336
|
var changedRecords = 'changedRecords';
|
|
24081
|
-
var addedRecords
|
|
24337
|
+
var addedRecords;
|
|
24338
|
+
if (!isNullOrUndefined(e[0])) {
|
|
24339
|
+
addedRecords = e[0];
|
|
24340
|
+
}
|
|
24341
|
+
else {
|
|
24342
|
+
addedRecords = updatedData_2['addedRecords'][0];
|
|
24343
|
+
}
|
|
24082
24344
|
/* tslint:disable-next-line */
|
|
24083
24345
|
var updateCrud = data_2.update(_this.parent.taskFields.id, updatedData_2[changedRecords], null, query_2);
|
|
24084
24346
|
updateCrud.then(function () {
|
|
@@ -24625,7 +24887,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24625
24887
|
this.parent.treeGrid.parentData = [];
|
|
24626
24888
|
this.parent.treeGrid.refresh();
|
|
24627
24889
|
if (this.parent.enableImmutableMode) {
|
|
24628
|
-
this.refreshRecordInImmutableMode();
|
|
24890
|
+
this.refreshRecordInImmutableMode(args.data, isDrag);
|
|
24629
24891
|
}
|
|
24630
24892
|
if (isDrag) {
|
|
24631
24893
|
args.requestType = 'rowDropped';
|
|
@@ -25245,7 +25507,7 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25245
25507
|
var ganttElement = closest(element, '#' + this.parent.element.id)
|
|
25246
25508
|
|| element.querySelector('#' + this.parent.element.id);
|
|
25247
25509
|
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || (!(this.filterMenuElement.contains(element)) && (isNullOrUndefined(datePickerElement))
|
|
25248
|
-
&& (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML')))) {
|
|
25510
|
+
&& (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML') || (element.nodeName === 'SPAN') || (element.nodeName === 'BUTTON')))) {
|
|
25249
25511
|
remove(this.filterMenuElement);
|
|
25250
25512
|
this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
|
|
25251
25513
|
this.filterMenuElement = null;
|
|
@@ -25898,6 +26160,9 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
25898
26160
|
this.popUpClickHandler(e);
|
|
25899
26161
|
if (this.parent.selectionSettings.mode !== 'Cell' && isSelected) {
|
|
25900
26162
|
if (closest(e.target, 'tr.e-chart-row')) {
|
|
26163
|
+
if (this.parent.enableVirtualization) {
|
|
26164
|
+
this.parent.treeGrid.grid.selectionModule.isInteracted = true;
|
|
26165
|
+
}
|
|
25901
26166
|
this.highlightSelectedRows(e, true);
|
|
25902
26167
|
}
|
|
25903
26168
|
else {
|
|
@@ -25957,7 +26222,7 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
|
|
|
25957
26222
|
this.predefinedItems = {};
|
|
25958
26223
|
this.items = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'ExpandAll', 'CollapseAll', 'Search',
|
|
25959
26224
|
'PrevTimeSpan', 'NextTimeSpan', 'ZoomIn', 'ZoomOut', 'ZoomToFit', 'ExcelExport',
|
|
25960
|
-
'CsvExport', 'PdfExport', 'Indent', 'Outdent'];
|
|
26225
|
+
'CsvExport', 'PdfExport', 'Indent', 'Outdent', 'CriticalPath'];
|
|
25961
26226
|
this.parent = parent;
|
|
25962
26227
|
this.id = this.parent.element.id;
|
|
25963
26228
|
this.parent.on('ui-toolbarupdate', this.propertyChanged, this);
|
|
@@ -25981,11 +26246,19 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
|
|
|
25981
26246
|
}
|
|
25982
26247
|
var preItems = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'ExpandAll', 'CollapseAll',
|
|
25983
26248
|
'PrevTimeSpan', 'NextTimeSpan', 'ZoomIn', 'ZoomOut', 'ZoomToFit', 'ExcelExport', 'CsvExport',
|
|
25984
|
-
'PdfExport', 'Indent', 'Outdent'];
|
|
26249
|
+
'PdfExport', 'Indent', 'Outdent', 'CriticalPath'];
|
|
25985
26250
|
for (var _i = 0, preItems_1 = preItems; _i < preItems_1.length; _i++) {
|
|
25986
26251
|
var item = preItems_1[_i];
|
|
25987
|
-
var itemStr =
|
|
25988
|
-
var localeName =
|
|
26252
|
+
var itemStr = void 0;
|
|
26253
|
+
var localeName = void 0;
|
|
26254
|
+
if (item === 'CriticalPath') {
|
|
26255
|
+
itemStr = "critical-path";
|
|
26256
|
+
localeName = "criticalPath";
|
|
26257
|
+
}
|
|
26258
|
+
else {
|
|
26259
|
+
itemStr = item.toLowerCase();
|
|
26260
|
+
localeName = item[0].toLowerCase() + item.slice(1);
|
|
26261
|
+
}
|
|
25989
26262
|
this.predefinedItems[item] = {
|
|
25990
26263
|
id: this.parent.element.id + '_' + itemStr, prefixIcon: 'e-' + itemStr,
|
|
25991
26264
|
text: this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant(localeName),
|
|
@@ -26189,6 +26462,14 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
|
|
|
26189
26462
|
gObj.indent();
|
|
26190
26463
|
}
|
|
26191
26464
|
break;
|
|
26465
|
+
case gID + '_critical-path':
|
|
26466
|
+
if (gObj.enableCriticalPath) {
|
|
26467
|
+
gObj.enableCriticalPath = false;
|
|
26468
|
+
}
|
|
26469
|
+
else {
|
|
26470
|
+
gObj.enableCriticalPath = true;
|
|
26471
|
+
}
|
|
26472
|
+
break;
|
|
26192
26473
|
case gID + '_outdent':
|
|
26193
26474
|
if (gObj.editModule && gObj.selectionModule.getSelectedRecords().length) {
|
|
26194
26475
|
gObj.outdent();
|
|
@@ -26489,8 +26770,9 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26489
26770
|
var toDate;
|
|
26490
26771
|
var container = createElement('div');
|
|
26491
26772
|
var height = this.parent.contentHeight;
|
|
26773
|
+
// eslint-disable-next-line
|
|
26492
26774
|
var toolbarHeight = 0;
|
|
26493
|
-
if (!isNullOrUndefined(this.parent.toolbarModule)) {
|
|
26775
|
+
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
26494
26776
|
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
26495
26777
|
}
|
|
26496
26778
|
var viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
|
|
@@ -26595,6 +26877,7 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26595
26877
|
};
|
|
26596
26878
|
NonWorkingDay.prototype.updateHolidayLabelHeight = function () {
|
|
26597
26879
|
var height = this.parent.getContentHeight();
|
|
26880
|
+
// eslint-disable-next-line
|
|
26598
26881
|
var toolbarHeight = 0;
|
|
26599
26882
|
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
26600
26883
|
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
@@ -26799,6 +27082,738 @@ var DayMarkers = /** @__PURE__ @class */ (function () {
|
|
|
26799
27082
|
return DayMarkers;
|
|
26800
27083
|
}());
|
|
26801
27084
|
|
|
27085
|
+
var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
27086
|
+
function CriticalPath(parent) {
|
|
27087
|
+
this.resourceCollectionIds = [];
|
|
27088
|
+
this.criticalTasks = [];
|
|
27089
|
+
this.parent = parent;
|
|
27090
|
+
}
|
|
27091
|
+
CriticalPath.prototype.getCriticalTasks = function () {
|
|
27092
|
+
return this.criticalTasks;
|
|
27093
|
+
};
|
|
27094
|
+
CriticalPath.prototype.showCriticalPath = function (isCritical) {
|
|
27095
|
+
var modelIds = this.parent.ids;
|
|
27096
|
+
var totalRecords = this.parent.flatData;
|
|
27097
|
+
if (isCritical && this.parent.flatData.length > 0 && !this.parent.enableMultiTaskbar) {
|
|
27098
|
+
this.parent.enableCriticalPath = true;
|
|
27099
|
+
var parentRecords = this.parent.treeGrid.parentData;
|
|
27100
|
+
var checkEndDateTaskid = void 0;
|
|
27101
|
+
var checkEndDate = parentRecords[0].ganttProperties.endDate;
|
|
27102
|
+
var dateDifference = 0;
|
|
27103
|
+
var checkBeyondEnddate = [];
|
|
27104
|
+
var totalPredecessorsCollection = [];
|
|
27105
|
+
var totalPredecessorsCollectionId = [];
|
|
27106
|
+
var predecessorIndex = 0;
|
|
27107
|
+
var taskBeyondEnddate = [];
|
|
27108
|
+
var predecessorTaskBeyondEnddate = [];
|
|
27109
|
+
var collection = [];
|
|
27110
|
+
var collectionTaskId = [];
|
|
27111
|
+
var fromDataObject = [];
|
|
27112
|
+
var criticalPathIds = [];
|
|
27113
|
+
/* eslint-disable-next-line */
|
|
27114
|
+
if (parentRecords[0].ganttProperties.autoEndDate > parentRecords[0].ganttProperties.endDate && !parentRecords[0].ganttProperties.isAutoSchedule) {
|
|
27115
|
+
checkEndDate = parentRecords[0].ganttProperties.autoEndDate;
|
|
27116
|
+
}
|
|
27117
|
+
checkEndDateTaskid = parentRecords[0].ganttProperties.taskId;
|
|
27118
|
+
// Find the total project endDate
|
|
27119
|
+
for (var i = 1; i < parentRecords.length; i++) {
|
|
27120
|
+
if (parentRecords[i].ganttProperties.endDate >= checkEndDate) {
|
|
27121
|
+
checkEndDate = parentRecords[i].ganttProperties.endDate;
|
|
27122
|
+
checkEndDateTaskid = parentRecords[i].ganttProperties.taskId;
|
|
27123
|
+
}
|
|
27124
|
+
if (!parentRecords[i].ganttProperties.isAutoSchedule) {
|
|
27125
|
+
if (parentRecords[i].ganttProperties.autoEndDate >= checkEndDate) {
|
|
27126
|
+
checkEndDate = parentRecords[i].ganttProperties.autoEndDate;
|
|
27127
|
+
checkEndDateTaskid = parentRecords[i].ganttProperties.taskId;
|
|
27128
|
+
}
|
|
27129
|
+
}
|
|
27130
|
+
}
|
|
27131
|
+
this.maxEndDate = checkEndDate;
|
|
27132
|
+
// find the tasks that ends on total project end date that stored in checkBeyondEnddate
|
|
27133
|
+
// find the tasks with predecessor that stored in totalPredecessorsCollectionId.
|
|
27134
|
+
for (var j = 0; j < totalRecords.length; j++) {
|
|
27135
|
+
totalRecords[j].isCritical = false;
|
|
27136
|
+
totalRecords[j].ganttProperties.isCritical = false;
|
|
27137
|
+
/* eslint-disable-next-line */
|
|
27138
|
+
dateDifference = this.parent.dataOperation.getDuration(totalRecords[j].ganttProperties.endDate, checkEndDate, totalRecords[j].ganttProperties.durationUnit, totalRecords[j].ganttProperties.isAutoSchedule, totalRecords[j].ganttProperties.isMilestone);
|
|
27139
|
+
totalRecords[j].slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
27140
|
+
totalRecords[j].ganttProperties.slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
27141
|
+
if (totalRecords[j].ganttProperties.endDate >= checkEndDate) {
|
|
27142
|
+
checkBeyondEnddate.push(parseInt(totalRecords[j].ganttProperties.taskId, 10));
|
|
27143
|
+
}
|
|
27144
|
+
if (totalRecords[j].ganttProperties.predecessor) {
|
|
27145
|
+
if (totalRecords[j].ganttProperties.predecessor.length !== 0) {
|
|
27146
|
+
totalPredecessorsCollection.push(totalRecords[j]);
|
|
27147
|
+
totalPredecessorsCollectionId.push(parseInt(totalRecords[j].ganttProperties.taskId, 10));
|
|
27148
|
+
}
|
|
27149
|
+
}
|
|
27150
|
+
}
|
|
27151
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
27152
|
+
for (var i = 0; i < this.parent.taskIds.length; i++) {
|
|
27153
|
+
this.resourceCollectionIds[i] = this.parent.taskIds[i].slice(1);
|
|
27154
|
+
}
|
|
27155
|
+
}
|
|
27156
|
+
// seperate the predecessor connected taskes from the individual taskes that ends on total project end date
|
|
27157
|
+
for (var k = 0; k < checkBeyondEnddate.length; k++) {
|
|
27158
|
+
if (totalPredecessorsCollectionId.indexOf(checkBeyondEnddate[k]) === -1) {
|
|
27159
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27160
|
+
predecessorIndex = modelIds.indexOf(checkBeyondEnddate[k].toString());
|
|
27161
|
+
}
|
|
27162
|
+
else {
|
|
27163
|
+
predecessorIndex = this.resourceCollectionIds.indexOf(checkBeyondEnddate[k].toString());
|
|
27164
|
+
}
|
|
27165
|
+
if (totalRecords[predecessorIndex].ganttProperties.progress < 100) {
|
|
27166
|
+
totalRecords[predecessorIndex].isCritical = true;
|
|
27167
|
+
totalRecords[predecessorIndex].ganttProperties.isCritical = true;
|
|
27168
|
+
}
|
|
27169
|
+
totalRecords[predecessorIndex]['slack'] = 0 + ' ' + totalRecords[predecessorIndex].ganttProperties.durationUnit;
|
|
27170
|
+
taskBeyondEnddate.push(checkBeyondEnddate[k]);
|
|
27171
|
+
}
|
|
27172
|
+
else {
|
|
27173
|
+
predecessorTaskBeyondEnddate.push(checkBeyondEnddate[k]);
|
|
27174
|
+
}
|
|
27175
|
+
}
|
|
27176
|
+
var predecessorLength = totalPredecessorsCollection.length;
|
|
27177
|
+
var endTask = [];
|
|
27178
|
+
// find the detail collection of predecessor for each taskes that stored in collection.
|
|
27179
|
+
for (var x = 0; x < predecessorLength; x++) {
|
|
27180
|
+
var to = -1;
|
|
27181
|
+
var from = -1;
|
|
27182
|
+
var toPredecessor = -1;
|
|
27183
|
+
var fromPredecessor = -1;
|
|
27184
|
+
var currentIndex = x;
|
|
27185
|
+
var predecessor = totalPredecessorsCollection[x].ganttProperties.predecessor;
|
|
27186
|
+
var individualPredecessorLength = totalPredecessorsCollection[x].ganttProperties.predecessor.length;
|
|
27187
|
+
var taskid = (parseInt(totalPredecessorsCollection[x].ganttProperties.taskId, 10));
|
|
27188
|
+
for (var y = 0; y < individualPredecessorLength; y++) {
|
|
27189
|
+
if (parseInt(predecessor[y].from, 10) === taskid) {
|
|
27190
|
+
if (to === -1) {
|
|
27191
|
+
if (!predecessor[y].offset) {
|
|
27192
|
+
to = predecessor[y].to;
|
|
27193
|
+
toPredecessor = predecessor[y].type;
|
|
27194
|
+
}
|
|
27195
|
+
else {
|
|
27196
|
+
to = predecessor[y].to + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
27197
|
+
toPredecessor = predecessor[y].type;
|
|
27198
|
+
}
|
|
27199
|
+
}
|
|
27200
|
+
else {
|
|
27201
|
+
if (!predecessor[y].offset) {
|
|
27202
|
+
to = to + ',' + predecessor[y].to;
|
|
27203
|
+
toPredecessor = toPredecessor + ',' + predecessor[y].type;
|
|
27204
|
+
}
|
|
27205
|
+
else {
|
|
27206
|
+
to = to + ',' + predecessor[y].to + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
27207
|
+
toPredecessor = toPredecessor + ',' + predecessor[y].type;
|
|
27208
|
+
}
|
|
27209
|
+
}
|
|
27210
|
+
}
|
|
27211
|
+
if (parseInt(predecessor[y].to, 10) === taskid) {
|
|
27212
|
+
if (from === -1) {
|
|
27213
|
+
if (!predecessor[y].offset) {
|
|
27214
|
+
from = predecessor[y].from;
|
|
27215
|
+
fromPredecessor = predecessor[y].type;
|
|
27216
|
+
}
|
|
27217
|
+
else {
|
|
27218
|
+
from = predecessor[y].from + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
27219
|
+
fromPredecessor = predecessor[y].type;
|
|
27220
|
+
}
|
|
27221
|
+
}
|
|
27222
|
+
else {
|
|
27223
|
+
if (!predecessor[y].offset) {
|
|
27224
|
+
from = from + ',' + predecessor[y].from;
|
|
27225
|
+
fromPredecessor = fromPredecessor + ',' + predecessor[y].type;
|
|
27226
|
+
}
|
|
27227
|
+
else {
|
|
27228
|
+
from = from + ',' + predecessor[y].from + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
27229
|
+
fromPredecessor = fromPredecessor + ',' + predecessor[y].type;
|
|
27230
|
+
}
|
|
27231
|
+
}
|
|
27232
|
+
}
|
|
27233
|
+
}
|
|
27234
|
+
if (from === -1) {
|
|
27235
|
+
from = null;
|
|
27236
|
+
fromPredecessor = null;
|
|
27237
|
+
}
|
|
27238
|
+
if (to === -1) {
|
|
27239
|
+
to = null;
|
|
27240
|
+
toPredecessor = null;
|
|
27241
|
+
}
|
|
27242
|
+
/* eslint-disable-next-line */
|
|
27243
|
+
collection.push({ from: from, fromPredecessor: fromPredecessor, taskid: taskid, to: to, toPredecessor: toPredecessor, currentIndex: currentIndex, slack: null, enddate: null });
|
|
27244
|
+
collectionTaskId.push(taskid);
|
|
27245
|
+
}
|
|
27246
|
+
var collectionLength = collection.length;
|
|
27247
|
+
var indexEnddate = 0;
|
|
27248
|
+
var num = void 0;
|
|
27249
|
+
// find the predecessors connected taskes that does not contains any successor.
|
|
27250
|
+
for (var z = 0; z < collectionLength; z++) {
|
|
27251
|
+
if (!collection[z]['to']) {
|
|
27252
|
+
num = collection[z]['taskid'];
|
|
27253
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27254
|
+
indexEnddate = modelIds.indexOf(num.toString());
|
|
27255
|
+
}
|
|
27256
|
+
else {
|
|
27257
|
+
indexEnddate = this.resourceCollectionIds.indexOf(num.toString());
|
|
27258
|
+
}
|
|
27259
|
+
var flatData = totalRecords[indexEnddate].ganttProperties;
|
|
27260
|
+
/* eslint-disable-next-line */
|
|
27261
|
+
dateDifference = this.parent.dataOperation.getDuration(flatData.endDate, checkEndDate, 'minute', flatData.isAutoSchedule, flatData.isMilestone);
|
|
27262
|
+
collection[z]['slack'] = dateDifference;
|
|
27263
|
+
collection[z]['fs'] = -1;
|
|
27264
|
+
collection[z]['enddate'] = flatData.endDate;
|
|
27265
|
+
endTask.push({
|
|
27266
|
+
fromdata: collection[z]['from'], todateID: collection[z]['taskid'],
|
|
27267
|
+
fromDataPredecessor: collection[z]['fromPredecessor']
|
|
27268
|
+
});
|
|
27269
|
+
}
|
|
27270
|
+
}
|
|
27271
|
+
for (var k = 0; k < endTask.length; k++) {
|
|
27272
|
+
fromDataObject.push(endTask[k]);
|
|
27273
|
+
this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, totalRecords, modelIds);
|
|
27274
|
+
}
|
|
27275
|
+
criticalPathIds = this.finalCriticalPath(collection, taskBeyondEnddate, totalRecords, modelIds, checkEndDate);
|
|
27276
|
+
this.criticalPathCollection = criticalPathIds;
|
|
27277
|
+
this.detailPredecessorCollection = collection;
|
|
27278
|
+
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
27279
|
+
}
|
|
27280
|
+
if (isCritical === false && this.parent.flatData.length > 0 && !this.parent.enableMultiTaskbar) {
|
|
27281
|
+
var pathIndex = void 0;
|
|
27282
|
+
this.parent.enableCriticalPath = false;
|
|
27283
|
+
for (var z = 0; z < this.criticalPathCollection.length; z++) {
|
|
27284
|
+
pathIndex = modelIds.indexOf(this.criticalPathCollection[z].toString());
|
|
27285
|
+
totalRecords[pathIndex].isCritical = false;
|
|
27286
|
+
}
|
|
27287
|
+
this.criticalPathCollection = [];
|
|
27288
|
+
this.detailPredecessorCollection = [];
|
|
27289
|
+
this.predecessorCollectionTaskIds = [];
|
|
27290
|
+
}
|
|
27291
|
+
};
|
|
27292
|
+
/* eslint-disable-next-line */
|
|
27293
|
+
CriticalPath.prototype.slackCalculation = function (fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds) {
|
|
27294
|
+
var fromDateArray = fromDataObject[0]['fromdata'].split(',');
|
|
27295
|
+
var fromDataPredecessor = fromDataObject[0]['fromDataPredecessor'].split(',');
|
|
27296
|
+
var fromDateArray1 = [];
|
|
27297
|
+
var fromTaskIdIndex;
|
|
27298
|
+
var indexFromTaskId;
|
|
27299
|
+
var indexToTaskId;
|
|
27300
|
+
var totaskId;
|
|
27301
|
+
var dateDifference;
|
|
27302
|
+
var prevTaskEnddate;
|
|
27303
|
+
var offsetInMillSec;
|
|
27304
|
+
var ffslack;
|
|
27305
|
+
for (var i = 0; i < fromDateArray.length; i++) {
|
|
27306
|
+
fromDateArray1 = fromDateArray[i].split(':');
|
|
27307
|
+
fromTaskIdIndex = collectionTaskId.indexOf(parseInt(fromDateArray1[0], 10));
|
|
27308
|
+
totaskId = collectionTaskId.indexOf(parseInt(fromDataObject[0]['todateID'], 10));
|
|
27309
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27310
|
+
indexFromTaskId = modelRecordIds.indexOf(fromDateArray1[0].toString());
|
|
27311
|
+
indexToTaskId = modelRecordIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
27312
|
+
}
|
|
27313
|
+
else {
|
|
27314
|
+
indexFromTaskId = this.resourceCollectionIds.indexOf(fromDateArray1[0].toString());
|
|
27315
|
+
indexToTaskId = this.resourceCollectionIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
27316
|
+
}
|
|
27317
|
+
var fromIdFlatData = flatRecords[indexFromTaskId].ganttProperties;
|
|
27318
|
+
var toIdFlatData = flatRecords[indexToTaskId].ganttProperties;
|
|
27319
|
+
if (fromDateArray1.length > 1) {
|
|
27320
|
+
if (fromDateArray1[1].indexOf('hour') !== -1) {
|
|
27321
|
+
offsetInMillSec = parseFloat(fromDateArray1[1]) * 60;
|
|
27322
|
+
}
|
|
27323
|
+
else if (fromDateArray1[1].indexOf('day') !== -1) {
|
|
27324
|
+
offsetInMillSec = parseFloat(fromDateArray1[1]) * (this.parent.secondsPerDay / 3600) * 60;
|
|
27325
|
+
}
|
|
27326
|
+
else {
|
|
27327
|
+
offsetInMillSec = parseFloat(fromDateArray1[1]);
|
|
27328
|
+
}
|
|
27329
|
+
}
|
|
27330
|
+
// calculate slack value for the task contains predecessor connection in "finish to start".
|
|
27331
|
+
if (fromDataPredecessor[i] === 'FS') {
|
|
27332
|
+
if (fromIdFlatData.endDate > toIdFlatData.startDate) {
|
|
27333
|
+
/* eslint-disable-next-line */
|
|
27334
|
+
dateDifference = -(this.parent.dataOperation.getDuration(toIdFlatData.startDate, fromIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
27335
|
+
}
|
|
27336
|
+
else {
|
|
27337
|
+
/* eslint-disable-next-line */
|
|
27338
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.endDate, toIdFlatData.startDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
27339
|
+
}
|
|
27340
|
+
// execute if the slack value is not set initially.
|
|
27341
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
27342
|
+
// execute if the offset value is not given.
|
|
27343
|
+
if (fromDateArray1.length <= 1) {
|
|
27344
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
27345
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27346
|
+
}
|
|
27347
|
+
else {
|
|
27348
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27349
|
+
}
|
|
27350
|
+
}
|
|
27351
|
+
}
|
|
27352
|
+
// execute if the current calculated slack value is less than the previous slack value.
|
|
27353
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27354
|
+
// execute if the offset value is not given.
|
|
27355
|
+
if (fromDateArray1.length <= 1) {
|
|
27356
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
27357
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27358
|
+
}
|
|
27359
|
+
else {
|
|
27360
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27361
|
+
}
|
|
27362
|
+
}
|
|
27363
|
+
}
|
|
27364
|
+
// execute if the offset value is given.
|
|
27365
|
+
if (fromDateArray1.length > 1) {
|
|
27366
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27367
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
27368
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
27369
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27370
|
+
}
|
|
27371
|
+
}
|
|
27372
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
27373
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
27374
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
27375
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
27376
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27377
|
+
}
|
|
27378
|
+
}
|
|
27379
|
+
// calculate slack value for the task contains predecessor connection in "start to start".
|
|
27380
|
+
if (fromDataPredecessor[i] === 'SS') {
|
|
27381
|
+
// It execute if the task is in auto mode.
|
|
27382
|
+
if (fromIdFlatData.isAutoSchedule) {
|
|
27383
|
+
if (fromIdFlatData.startDate > toIdFlatData.startDate) {
|
|
27384
|
+
/* eslint-disable-next-line */
|
|
27385
|
+
dateDifference = -(this.parent.dataOperation.getDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
27386
|
+
}
|
|
27387
|
+
else {
|
|
27388
|
+
/* eslint-disable-next-line */
|
|
27389
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.startDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
27390
|
+
}
|
|
27391
|
+
// It execute while the slack value is not set to the corresponding task.
|
|
27392
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
27393
|
+
if (fromDateArray1.length <= 1) {
|
|
27394
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
27395
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27396
|
+
}
|
|
27397
|
+
else {
|
|
27398
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27399
|
+
}
|
|
27400
|
+
}
|
|
27401
|
+
}
|
|
27402
|
+
//It execute while already the slack value is set and it is higher than the datedifference.
|
|
27403
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27404
|
+
if (fromDateArray1.length <= 1) {
|
|
27405
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
27406
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27407
|
+
}
|
|
27408
|
+
else {
|
|
27409
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27410
|
+
}
|
|
27411
|
+
}
|
|
27412
|
+
}
|
|
27413
|
+
// execute if the offset value is given.
|
|
27414
|
+
if (fromDateArray1.length > 1) {
|
|
27415
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27416
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
27417
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
27418
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27419
|
+
}
|
|
27420
|
+
}
|
|
27421
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
27422
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
27423
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
27424
|
+
}
|
|
27425
|
+
// It execute if the task is in not an auto mode task.
|
|
27426
|
+
else if (!fromIdFlatData.isAutoSchedule) {
|
|
27427
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27428
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
27429
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27430
|
+
}
|
|
27431
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27432
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27433
|
+
}
|
|
27434
|
+
}
|
|
27435
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
27436
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27437
|
+
}
|
|
27438
|
+
}
|
|
27439
|
+
// calculate slack value for the task contains predecessor connection in "finish to finish".
|
|
27440
|
+
if (fromDataPredecessor[i] === 'FF') {
|
|
27441
|
+
// execute if the previous task is from finish to start or finish to finish state.
|
|
27442
|
+
if (collection[totaskId]['fs'] === 1 || collection[totaskId]['ff'] === 1 || collection[totaskId]['fs'] === -1) {
|
|
27443
|
+
if (collection[totaskId]['fs'] === 1 || collection[totaskId]['ff'] === 1) {
|
|
27444
|
+
prevTaskEnddate = toIdFlatData.endDate;
|
|
27445
|
+
ffslack = collection[totaskId]['slack'];
|
|
27446
|
+
}
|
|
27447
|
+
if (collection[totaskId]['fs'] === -1) {
|
|
27448
|
+
prevTaskEnddate = collection[totaskId]['enddate'];
|
|
27449
|
+
ffslack = collection[totaskId]['slack'];
|
|
27450
|
+
}
|
|
27451
|
+
if (prevTaskEnddate > fromIdFlatData.endDate) {
|
|
27452
|
+
dateDifference = -(this.getSlackDuration(fromIdFlatData.endDate, prevTaskEnddate, 'minute', flatRecords[indexFromTaskId]));
|
|
27453
|
+
}
|
|
27454
|
+
else {
|
|
27455
|
+
dateDifference = this.getSlackDuration(prevTaskEnddate, fromIdFlatData.endDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27456
|
+
}
|
|
27457
|
+
// set the slack value if the slack value is not set initially.
|
|
27458
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
27459
|
+
// execute if the offset value is not given.
|
|
27460
|
+
if (fromDateArray1.length <= 1) {
|
|
27461
|
+
if (ffslack - dateDifference < 0) {
|
|
27462
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27463
|
+
}
|
|
27464
|
+
else {
|
|
27465
|
+
collection[fromTaskIdIndex]['slack'] = ffslack - dateDifference;
|
|
27466
|
+
}
|
|
27467
|
+
}
|
|
27468
|
+
}
|
|
27469
|
+
// overright the slack value if the current calculated slack value is less than the previous slack value.
|
|
27470
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27471
|
+
// execute if the offset value is not given.
|
|
27472
|
+
if (fromDateArray1.length <= 1) {
|
|
27473
|
+
if (ffslack - dateDifference < 0) {
|
|
27474
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27475
|
+
}
|
|
27476
|
+
else {
|
|
27477
|
+
collection[fromTaskIdIndex]['slack'] = ffslack - dateDifference;
|
|
27478
|
+
}
|
|
27479
|
+
}
|
|
27480
|
+
}
|
|
27481
|
+
// execute if the offset value is given.
|
|
27482
|
+
if (fromDateArray1.length > 1) {
|
|
27483
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] - dateDifference;
|
|
27484
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
27485
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
27486
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27487
|
+
}
|
|
27488
|
+
}
|
|
27489
|
+
collection[fromTaskIdIndex]['ff'] = 1;
|
|
27490
|
+
collection[fromTaskIdIndex]['enddate'] = prevTaskEnddate;
|
|
27491
|
+
collection[fromTaskIdIndex]['fsslack'] = ffslack;
|
|
27492
|
+
}
|
|
27493
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
27494
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27495
|
+
}
|
|
27496
|
+
}
|
|
27497
|
+
// calculate slack value for the task contains predecessor connection in "start to finish".
|
|
27498
|
+
if (fromDataPredecessor[i] === 'SF') {
|
|
27499
|
+
//It execute if the task is an auto mode task.
|
|
27500
|
+
if (fromIdFlatData.isAutoSchedule) {
|
|
27501
|
+
//execute if the slack value is not set initially.
|
|
27502
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
27503
|
+
// execute if the offset value is not given.
|
|
27504
|
+
if (fromDateArray1.length <= 1) {
|
|
27505
|
+
// execute if the previous task does no has sucessor.
|
|
27506
|
+
if (isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27507
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27508
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27509
|
+
}
|
|
27510
|
+
// execute if the previous task has sucessor.
|
|
27511
|
+
else if (!isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27512
|
+
if (toIdFlatData.endDate > fromIdFlatData.startDate) {
|
|
27513
|
+
/* eslint-disable-next-line */
|
|
27514
|
+
dateDifference = -(this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
27515
|
+
}
|
|
27516
|
+
else {
|
|
27517
|
+
dateDifference = this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27518
|
+
}
|
|
27519
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
27520
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27521
|
+
}
|
|
27522
|
+
else {
|
|
27523
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27524
|
+
}
|
|
27525
|
+
}
|
|
27526
|
+
}
|
|
27527
|
+
// execute if the offset value is given.
|
|
27528
|
+
else if (fromDateArray1.length > 1) {
|
|
27529
|
+
if (toIdFlatData.endDate >= fromIdFlatData.endDate) {
|
|
27530
|
+
if (fromIdFlatData.startDate > toIdFlatData.endDate) {
|
|
27531
|
+
/* eslint-disable-next-line */
|
|
27532
|
+
dateDifference = -(this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]));
|
|
27533
|
+
}
|
|
27534
|
+
else {
|
|
27535
|
+
/* eslint-disable-next-line */
|
|
27536
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
27537
|
+
}
|
|
27538
|
+
}
|
|
27539
|
+
else {
|
|
27540
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27541
|
+
}
|
|
27542
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27543
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
27544
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
27545
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27546
|
+
}
|
|
27547
|
+
}
|
|
27548
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
27549
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
27550
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
27551
|
+
}
|
|
27552
|
+
else {
|
|
27553
|
+
if (fromDateArray1.length <= 1) {
|
|
27554
|
+
if (isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27555
|
+
/* eslint-disable-next-line */
|
|
27556
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27557
|
+
}
|
|
27558
|
+
else if (!isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27559
|
+
if (toIdFlatData.endDate > fromIdFlatData.startDate) {
|
|
27560
|
+
// eslint-disable-next-line
|
|
27561
|
+
dateDifference = -(this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
27562
|
+
}
|
|
27563
|
+
else {
|
|
27564
|
+
dateDifference = this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27565
|
+
}
|
|
27566
|
+
}
|
|
27567
|
+
// execute if the current calculated slack value is less than the previous slack value.
|
|
27568
|
+
if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27569
|
+
if (isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27570
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27571
|
+
}
|
|
27572
|
+
else if (!isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27573
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
27574
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27575
|
+
}
|
|
27576
|
+
else {
|
|
27577
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27578
|
+
}
|
|
27579
|
+
}
|
|
27580
|
+
}
|
|
27581
|
+
}
|
|
27582
|
+
else if (fromDateArray1.length > 1) {
|
|
27583
|
+
if (toIdFlatData.endDate > fromIdFlatData.endDate) {
|
|
27584
|
+
if (fromIdFlatData.startDate > toIdFlatData.endDate) {
|
|
27585
|
+
/* eslint-disable-next-line */
|
|
27586
|
+
dateDifference = -(this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]));
|
|
27587
|
+
}
|
|
27588
|
+
else {
|
|
27589
|
+
// eslint-disable-next-line
|
|
27590
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
27591
|
+
}
|
|
27592
|
+
}
|
|
27593
|
+
else {
|
|
27594
|
+
/* eslint-disable-next-line */
|
|
27595
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27596
|
+
}
|
|
27597
|
+
// execute if the current calculated slack value is less than the previous slack value.
|
|
27598
|
+
if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27599
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27600
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
27601
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
27602
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27603
|
+
}
|
|
27604
|
+
}
|
|
27605
|
+
}
|
|
27606
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
27607
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
27608
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
27609
|
+
}
|
|
27610
|
+
}
|
|
27611
|
+
//It execute if the task is an auto mode task.
|
|
27612
|
+
else if (!fromIdFlatData.isAutoSchedule) {
|
|
27613
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27614
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
27615
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27616
|
+
}
|
|
27617
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27618
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27619
|
+
}
|
|
27620
|
+
}
|
|
27621
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
27622
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27623
|
+
}
|
|
27624
|
+
}
|
|
27625
|
+
if (collection[fromTaskIdIndex]['from']) {
|
|
27626
|
+
fromDataObject.push({
|
|
27627
|
+
fromdata: collection[fromTaskIdIndex]['from'], todateID: collection[fromTaskIdIndex]['taskid'],
|
|
27628
|
+
fromDataPredecessor: collection[fromTaskIdIndex]['fromPredecessor']
|
|
27629
|
+
});
|
|
27630
|
+
}
|
|
27631
|
+
}
|
|
27632
|
+
if (fromDataObject) {
|
|
27633
|
+
fromDataObject.splice(0, 1);
|
|
27634
|
+
if (fromDataObject.length > 0) {
|
|
27635
|
+
this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds);
|
|
27636
|
+
}
|
|
27637
|
+
}
|
|
27638
|
+
};
|
|
27639
|
+
CriticalPath.prototype.getSlackDuration = function (sDate, eDate, durationUnit, record) {
|
|
27640
|
+
var startDate = this.parent.dateValidationModule.checkStartDate(new Date(sDate));
|
|
27641
|
+
var endDate = this.parent.dateValidationModule.checkEndDate(new Date(eDate));
|
|
27642
|
+
if (this.parent.dataOperation['getTimeDifference'](startDate, endDate, true) <= 0) {
|
|
27643
|
+
return 0;
|
|
27644
|
+
}
|
|
27645
|
+
else {
|
|
27646
|
+
return this.parent.dataOperation.getDuration(startDate, endDate, durationUnit, record.ganttProperties.isAutoSchedule, true);
|
|
27647
|
+
}
|
|
27648
|
+
};
|
|
27649
|
+
/* eslint-disable-next-line */
|
|
27650
|
+
CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
27651
|
+
var criticalPathIds = [];
|
|
27652
|
+
var index;
|
|
27653
|
+
for (var x = collection.length - 1; x >= 0; x--) {
|
|
27654
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27655
|
+
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
27656
|
+
}
|
|
27657
|
+
else {
|
|
27658
|
+
index = this.resourceCollectionIds.indexOf(collection[x]['taskid'].toString());
|
|
27659
|
+
}
|
|
27660
|
+
var predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
27661
|
+
var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
27662
|
+
for (var i = 0; i < predecessorLength.length; i++) {
|
|
27663
|
+
var toID = void 0;
|
|
27664
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27665
|
+
toID = this.parent.ids.indexOf(predecessorLength[i].to);
|
|
27666
|
+
}
|
|
27667
|
+
else {
|
|
27668
|
+
toID = this.resourceCollectionIds.indexOf(predecessorLength[i].to);
|
|
27669
|
+
}
|
|
27670
|
+
var dateDifference = void 0;
|
|
27671
|
+
var currentData = flatRecords[index].ganttProperties;
|
|
27672
|
+
if (predecessorLength[i].type === 'FS') {
|
|
27673
|
+
/* eslint-disable-next-line */
|
|
27674
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27675
|
+
if (dateDifference === 0 && index !== toID && flatRecords[index].slack !== noSlackValue) {
|
|
27676
|
+
flatRecords[index].slack = flatRecords[toID].slack;
|
|
27677
|
+
flatRecords[index].ganttProperties.slack = flatRecords[toID].slack;
|
|
27678
|
+
}
|
|
27679
|
+
else if (dateDifference !== 0 && index !== toID && flatRecords[toID].isCritical) {
|
|
27680
|
+
flatRecords[index].slack = dateDifference + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
27681
|
+
flatRecords[index].ganttProperties.slack = dateDifference + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
27682
|
+
}
|
|
27683
|
+
}
|
|
27684
|
+
else if (predecessorLength[i].type === 'SF') {
|
|
27685
|
+
/* eslint-disable-next-line */
|
|
27686
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.startDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27687
|
+
}
|
|
27688
|
+
else if (predecessorLength[i].type === 'SS') {
|
|
27689
|
+
/* eslint-disable-next-line */
|
|
27690
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.startDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27691
|
+
}
|
|
27692
|
+
else {
|
|
27693
|
+
/* eslint-disable-next-line */
|
|
27694
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27695
|
+
}
|
|
27696
|
+
if (parseInt(predecessorLength[i].from, 10) === flatRecords[index][this.parent.taskFields.id] &&
|
|
27697
|
+
flatRecords[toID].slack === noSlackValue && dateDifference <= 0) {
|
|
27698
|
+
flatRecords[index].slack = noSlackValue;
|
|
27699
|
+
flatRecords[index].ganttProperties.slack = noSlackValue;
|
|
27700
|
+
}
|
|
27701
|
+
}
|
|
27702
|
+
if (flatRecords[index].slack === noSlackValue) {
|
|
27703
|
+
if (flatRecords[index].ganttProperties.progress < 100) {
|
|
27704
|
+
flatRecords[index].isCritical = true;
|
|
27705
|
+
flatRecords[index].ganttProperties.isCritical = true;
|
|
27706
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
27707
|
+
criticalPathIds.push(collection[x]['taskid']);
|
|
27708
|
+
}
|
|
27709
|
+
}
|
|
27710
|
+
}
|
|
27711
|
+
if (taskBeyondEnddate.length > 0) {
|
|
27712
|
+
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
27713
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27714
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
27715
|
+
}
|
|
27716
|
+
else {
|
|
27717
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
27718
|
+
}
|
|
27719
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
27720
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
27721
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
27722
|
+
}
|
|
27723
|
+
}
|
|
27724
|
+
}
|
|
27725
|
+
return criticalPathIds;
|
|
27726
|
+
};
|
|
27727
|
+
/* eslint-disable-next-line */
|
|
27728
|
+
CriticalPath.prototype.criticalConnectorLine = function (criticalPathIds, collection, condition, collectionTaskId) {
|
|
27729
|
+
var ganttChartElement = this.parent.ganttChartModule.chartElement;
|
|
27730
|
+
removeClass(ganttChartElement.querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
27731
|
+
removeClass(ganttChartElement.querySelectorAll('.e-gantt-child-progressbar-inner-div'), criticalChildProgressBarInnerDiv);
|
|
27732
|
+
removeClass(ganttChartElement.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27733
|
+
removeClass(ganttChartElement.querySelectorAll('.e-milestone-bottom'), criticalMilestoneBottom);
|
|
27734
|
+
for (var i = 0; i < criticalPathIds.length; i++) {
|
|
27735
|
+
var criticalData = void 0;
|
|
27736
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27737
|
+
criticalData = this.parent.flatData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
27738
|
+
}
|
|
27739
|
+
else {
|
|
27740
|
+
criticalData = this.parent.flatData[this.resourceCollectionIds.indexOf(criticalPathIds[i].toString())];
|
|
27741
|
+
}
|
|
27742
|
+
var index = this.parent.currentViewData.indexOf(criticalData);
|
|
27743
|
+
var element = this.parent.getRowByIndex(index);
|
|
27744
|
+
var taskClass = void 0;
|
|
27745
|
+
var columnFields = this.parent.taskFields;
|
|
27746
|
+
/* eslint-disable-next-line */
|
|
27747
|
+
if (this.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
27748
|
+
taskClass = criticalUnscheduledTask;
|
|
27749
|
+
}
|
|
27750
|
+
else {
|
|
27751
|
+
taskClass = criticalChildProgressBarInnerDiv;
|
|
27752
|
+
}
|
|
27753
|
+
if (element) {
|
|
27754
|
+
if (element.getElementsByClassName('e-milestone-top')[0]) {
|
|
27755
|
+
addClass(element.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27756
|
+
}
|
|
27757
|
+
if (element.getElementsByClassName('e-milestone-bottom')[0]) {
|
|
27758
|
+
addClass(element.querySelectorAll('.e-milestone-bottom'), criticalMilestoneBottom);
|
|
27759
|
+
}
|
|
27760
|
+
if (element.getElementsByClassName('e-gantt-child-taskbar-inner-div').length > 0) {
|
|
27761
|
+
addClass(element.querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
27762
|
+
}
|
|
27763
|
+
if (element.getElementsByClassName('e-gantt-child-progressbar-inner-div').length > 0) {
|
|
27764
|
+
addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
|
|
27765
|
+
}
|
|
27766
|
+
}
|
|
27767
|
+
}
|
|
27768
|
+
removeClass(this.parent.element.querySelectorAll('.e-line'), criticalConnectorLine);
|
|
27769
|
+
removeClass(this.parent.element.querySelectorAll('.e-connector-line-right-arrow'), criticalConnectorLineRightArrow);
|
|
27770
|
+
removeClass(this.parent.element.querySelectorAll('.e-connector-line-left-arrow'), criticalConnectorLineLeftArrow);
|
|
27771
|
+
if (collection.length !== 0) {
|
|
27772
|
+
var index = 0;
|
|
27773
|
+
var currentdata = void 0;
|
|
27774
|
+
var checking = [];
|
|
27775
|
+
var checkint = void 0;
|
|
27776
|
+
for (var i = 0; i < this.criticalPathCollection.length; i++) {
|
|
27777
|
+
index = collectionTaskId.indexOf(this.criticalPathCollection[i]);
|
|
27778
|
+
currentdata = collection[index];
|
|
27779
|
+
if (index !== -1 && currentdata['to']) {
|
|
27780
|
+
checking = currentdata['to'].split(',');
|
|
27781
|
+
for (var j = 0; j < checking.length; j++) {
|
|
27782
|
+
checkint = parseInt(checking[j], 10);
|
|
27783
|
+
if (criticalPathIds.indexOf(checkint) !== -1) {
|
|
27784
|
+
var lineElement = this.parent.element.querySelectorAll('#ConnectorLineparent' +
|
|
27785
|
+
currentdata['taskid'] + 'child' + checkint);
|
|
27786
|
+
if (lineElement.length > 0) {
|
|
27787
|
+
addClass(this.parent.element.querySelectorAll('#ConnectorLineparent' + currentdata['taskid'] + 'child' +
|
|
27788
|
+
checkint)[0].querySelectorAll('.e-line'), criticalConnectorLine);
|
|
27789
|
+
addClass(this.parent.element.querySelectorAll('#ConnectorLineparent' + currentdata['taskid'] + 'child' +
|
|
27790
|
+
checkint)[0].querySelectorAll('.e-connector-line-right-arrow'), criticalConnectorLineRightArrow);
|
|
27791
|
+
addClass(this.parent.element.querySelectorAll('#ConnectorLineparent' + currentdata['taskid'] + 'child' +
|
|
27792
|
+
checkint)[0].querySelectorAll('.e-connector-line-left-arrow'), criticalConnectorLineLeftArrow);
|
|
27793
|
+
}
|
|
27794
|
+
}
|
|
27795
|
+
}
|
|
27796
|
+
}
|
|
27797
|
+
}
|
|
27798
|
+
}
|
|
27799
|
+
};
|
|
27800
|
+
CriticalPath.prototype.getModuleName = function () {
|
|
27801
|
+
return 'criticalPath';
|
|
27802
|
+
};
|
|
27803
|
+
/**
|
|
27804
|
+
* Destroys the Critical Path of Gantt.
|
|
27805
|
+
*
|
|
27806
|
+
* @returns {void} .
|
|
27807
|
+
* @private
|
|
27808
|
+
*/
|
|
27809
|
+
CriticalPath.prototype.destroy = function () {
|
|
27810
|
+
if (!this.parent.enableCriticalPath && this.parent.criticalPathModule) {
|
|
27811
|
+
this.parent.criticalPathModule = undefined;
|
|
27812
|
+
}
|
|
27813
|
+
};
|
|
27814
|
+
return CriticalPath;
|
|
27815
|
+
}());
|
|
27816
|
+
|
|
26802
27817
|
// eslint-disable-next-line
|
|
26803
27818
|
/**
|
|
26804
27819
|
* The ContextMenu module is used to handle the context menu items & sub-menu items.
|
|
@@ -27030,9 +28045,8 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
27030
28045
|
ContextMenu$$1.prototype.getClickedDate = function (element) {
|
|
27031
28046
|
// context menu click position
|
|
27032
28047
|
var ganttElementPosition = this.parent.getOffsetRect(this.parent.element);
|
|
27033
|
-
var ganttLeft = ganttElementPosition.left - this.parent.element.offsetLeft;
|
|
27034
28048
|
// task left position
|
|
27035
|
-
var pageLeft =
|
|
28049
|
+
var pageLeft = ganttElementPosition.left + this.parent.ganttChartModule.chartElement.offsetLeft +
|
|
27036
28050
|
this.rowData.ganttProperties.left - this.parent.ganttChartModule.scrollElement.scrollLeft;
|
|
27037
28051
|
// difference from task start date to current click position.
|
|
27038
28052
|
var currentTaskDifference = this.clickedPosition - pageLeft;
|
|
@@ -27220,7 +28234,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
27220
28234
|
break;
|
|
27221
28235
|
case 'Indent':
|
|
27222
28236
|
{
|
|
27223
|
-
if (!this.parent.allowSelection) {
|
|
28237
|
+
if (!this.parent.allowSelection || !this.parent.editModule || !this.parent.editSettings) {
|
|
27224
28238
|
this.hideItems.push(item.text);
|
|
27225
28239
|
}
|
|
27226
28240
|
else {
|
|
@@ -27237,7 +28251,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
27237
28251
|
}
|
|
27238
28252
|
case 'Outdent':
|
|
27239
28253
|
{
|
|
27240
|
-
if (!this.parent.allowSelection) {
|
|
28254
|
+
if (!this.parent.allowSelection || !this.parent.editModule || !this.parent.editSettings) {
|
|
27241
28255
|
this.hideItems.push(item.text);
|
|
27242
28256
|
}
|
|
27243
28257
|
else {
|
|
@@ -28051,6 +29065,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28051
29065
|
var proxy = this.parent;
|
|
28052
29066
|
var tempDataSource;
|
|
28053
29067
|
var idx;
|
|
29068
|
+
var ganttFields = this.parent.taskFields;
|
|
28054
29069
|
if (this.parent.dataSource instanceof DataManager) {
|
|
28055
29070
|
tempDataSource = getValue('dataOperation.dataArray', this.parent);
|
|
28056
29071
|
}
|
|
@@ -28059,7 +29074,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28059
29074
|
}
|
|
28060
29075
|
if (tempDataSource.length > 0 && (!isNullOrUndefined(droppedRecord) && !droppedRecord.parentItem)) {
|
|
28061
29076
|
for (var i = 0; i < Object.keys(tempDataSource).length; i++) {
|
|
28062
|
-
if (
|
|
29077
|
+
if (!isNullOrUndefined(droppedRecord.taskData[ganttFields.child]) &&
|
|
29078
|
+
tempDataSource[i][ganttFields.child] === droppedRecord.taskData[ganttFields.child]) {
|
|
29079
|
+
idx = i;
|
|
29080
|
+
}
|
|
29081
|
+
else if (isNullOrUndefined(droppedRecord.taskData[ganttFields.child]) &&
|
|
29082
|
+
droppedRecord.taskData[ganttFields.id] === tempDataSource[i][ganttFields.id]) {
|
|
28063
29083
|
idx = i;
|
|
28064
29084
|
}
|
|
28065
29085
|
}
|
|
@@ -28501,6 +29521,10 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
28501
29521
|
//chart side theme
|
|
28502
29522
|
ganttStyle.taskbar.taskColor = new PdfColor(49, 122, 185);
|
|
28503
29523
|
ganttStyle.taskbar.progressColor = new PdfColor(33, 82, 125);
|
|
29524
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
29525
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
29526
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
29527
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
28504
29528
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(119, 119, 119);
|
|
28505
29529
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(85, 85, 85);
|
|
28506
29530
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(33, 82, 125);
|
|
@@ -28517,6 +29541,10 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
28517
29541
|
//chart side theme
|
|
28518
29542
|
ganttStyle.taskbar.taskColor = new PdfColor(0, 123, 255);
|
|
28519
29543
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 86, 179);
|
|
29544
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
29545
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
29546
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
29547
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
28520
29548
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(108, 117, 125);
|
|
28521
29549
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(73, 80, 87);
|
|
28522
29550
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(0, 86, 179);
|
|
@@ -28535,6 +29563,10 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
28535
29563
|
//chart side theme
|
|
28536
29564
|
ganttStyle.taskbar.taskColor = new PdfColor(0, 120, 214);
|
|
28537
29565
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 91, 163);
|
|
29566
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
29567
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
29568
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
29569
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
28538
29570
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(118, 118, 118);
|
|
28539
29571
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(80, 80, 80);
|
|
28540
29572
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(0, 91, 163);
|
|
@@ -28551,6 +29583,10 @@ var PdfGanttTheme = /** @__PURE__ @class */ (function () {
|
|
|
28551
29583
|
//chart side theme
|
|
28552
29584
|
ganttStyle.taskbar.taskColor = new PdfColor(88, 105, 197);
|
|
28553
29585
|
ganttStyle.taskbar.progressColor = new PdfColor(63, 81, 181);
|
|
29586
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
29587
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
29588
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
29589
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
28554
29590
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(132, 132, 132);
|
|
28555
29591
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(97, 97, 97);
|
|
28556
29592
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(63, 81, 181);
|
|
@@ -30866,6 +31902,12 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
30866
31902
|
predecessor.milestoneParent = data.milestoneParent;
|
|
30867
31903
|
predecessor.milestoneChild = data.milestoneChild;
|
|
30868
31904
|
predecessor.lineWidth = _this.parent.connectorLineWidth > 5 ? pixelToPoint(5) : pixelToPoint(_this.parent.connectorLineWidth);
|
|
31905
|
+
if (data.isCritical) {
|
|
31906
|
+
predecessor.connectorLineColor = _this.ganttStyle.criticalConnectorLineColor;
|
|
31907
|
+
}
|
|
31908
|
+
else {
|
|
31909
|
+
predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
|
|
31910
|
+
}
|
|
30869
31911
|
predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
|
|
30870
31912
|
_this.gantt.predecessorCollection.push(predecessor);
|
|
30871
31913
|
});
|
|
@@ -30989,9 +32031,16 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
30989
32031
|
taskbar.progressColor = new PdfColor(_this.ganttStyle.taskbar.parentProgressColor);
|
|
30990
32032
|
}
|
|
30991
32033
|
else {
|
|
30992
|
-
|
|
30993
|
-
|
|
30994
|
-
|
|
32034
|
+
if (data.isCritical) {
|
|
32035
|
+
taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
|
|
32036
|
+
taskbar.progressColor = new PdfColor(_this.ganttStyle.taskbar.criticalProgressColor);
|
|
32037
|
+
taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskBorderColor);
|
|
32038
|
+
}
|
|
32039
|
+
else {
|
|
32040
|
+
taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.taskColor);
|
|
32041
|
+
taskbar.progressColor = new PdfColor(_this.ganttStyle.taskbar.progressColor);
|
|
32042
|
+
taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.taskBorderColor);
|
|
32043
|
+
}
|
|
30995
32044
|
}
|
|
30996
32045
|
taskbar.gridLineColor = new PdfColor(_this.ganttStyle.chartGridLineColor);
|
|
30997
32046
|
_this.gantt.taskbarCollection.push(taskbar);
|
|
@@ -32802,5 +33851,5 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
32802
33851
|
* Gantt index file
|
|
32803
33852
|
*/
|
|
32804
33853
|
|
|
32805
|
-
export { Gantt, PdfHorizontalOverflowType, parentsUntil$1 as parentsUntil, isScheduledTask, isCountRequired, getSwapKey, isRemoteData, getTaskData, updateDates, formatString, getIndex, pixelToPoint, pointToPixel, getUid$1 as getUid, load, rowDataBound, queryCellInfo, toolbarClick, keyPressed, Edit$2 as Edit, Reorder$1 as Reorder, Resize$1 as Resize, Filter$1 as Filter, Sort$1 as Sort, Dependency, Selection$1 as Selection, Toolbar$3 as Toolbar, DayMarkers, ContextMenu$2 as ContextMenu, ExcelExport$1 as ExcelExport, ColumnMenu$1 as ColumnMenu, RowDD$1 as RowDD, PdfExport, VirtualScroll$1 as VirtualScroll, Column, DayWorkingTime, AddDialogFieldSettings, EditDialogFieldSettings, EditSettings, EventMarker, FilterSettings, SearchSettings, Holiday, LabelSettings, SelectionSettings, SplitterSettings, TaskFields, TimelineTierSettings, TimelineSettings, TooltipSettings, SortDescriptor, SortSettings, ResourceFields };
|
|
33854
|
+
export { Gantt, PdfHorizontalOverflowType, parentsUntil$1 as parentsUntil, isScheduledTask, isCountRequired, getSwapKey, isRemoteData, getTaskData, updateDates, formatString, getIndex, pixelToPoint, pointToPixel, getUid$1 as getUid, load, rowDataBound, queryCellInfo, toolbarClick, keyPressed, Edit$2 as Edit, Reorder$1 as Reorder, Resize$1 as Resize, Filter$1 as Filter, Sort$1 as Sort, Dependency, Selection$1 as Selection, Toolbar$3 as Toolbar, DayMarkers, CriticalPath, ContextMenu$2 as ContextMenu, ExcelExport$1 as ExcelExport, ColumnMenu$1 as ColumnMenu, RowDD$1 as RowDD, PdfExport, VirtualScroll$1 as VirtualScroll, Column, DayWorkingTime, AddDialogFieldSettings, EditDialogFieldSettings, EditSettings, EventMarker, FilterSettings, SearchSettings, Holiday, LabelSettings, SelectionSettings, SplitterSettings, TaskFields, TimelineTierSettings, TimelineSettings, TooltipSettings, SortDescriptor, SortSettings, ResourceFields };
|
|
32806
33855
|
//# sourceMappingURL=ej2-gantt.es5.js.map
|