@syncfusion/ej2-gantt 22.2.12 → 23.1.38
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 +197 -164
- package/dist/ej2-gantt.min.js +3 -3
- package/dist/ej2-gantt.umd.min.js +3 -3
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +973 -280
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1011 -302
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +3 -3
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +21 -21
- package/src/gantt/actions/cell-edit.js +4 -1
- package/src/gantt/actions/connector-line-edit.js +48 -6
- package/src/gantt/actions/critical-path.d.ts +2 -0
- package/src/gantt/actions/critical-path.js +79 -61
- package/src/gantt/actions/dependency.d.ts +1 -0
- package/src/gantt/actions/dependency.js +92 -31
- package/src/gantt/actions/dialog-edit.js +28 -8
- package/src/gantt/actions/edit.js +18 -8
- package/src/gantt/actions/pdf-export.d.ts +4 -1
- package/src/gantt/actions/pdf-export.js +36 -3
- package/src/gantt/actions/rowdragdrop.js +10 -2
- package/src/gantt/actions/selection.js +22 -5
- package/src/gantt/actions/taskbar-edit.js +58 -38
- package/src/gantt/actions/toolbar.js +8 -0
- package/src/gantt/base/date-processor.js +1 -1
- package/src/gantt/base/gantt-chart.d.ts +1 -0
- package/src/gantt/base/gantt-chart.js +85 -6
- package/src/gantt/base/gantt-model.d.ts +7 -0
- package/src/gantt/base/gantt.d.ts +6 -0
- package/src/gantt/base/gantt.js +78 -16
- package/src/gantt/base/interface.d.ts +14 -0
- package/src/gantt/base/splitter.js +1 -0
- package/src/gantt/base/task-processor.d.ts +4 -4
- package/src/gantt/base/task-processor.js +75 -25
- package/src/gantt/base/tree-grid.js +19 -10
- package/src/gantt/export/export-helper.d.ts +5 -1
- package/src/gantt/export/export-helper.js +150 -3
- package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
- package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
- package/src/gantt/export/pdf-base/treegrid-layouter.js +3 -1
- package/src/gantt/export/pdf-connector-line.js +3 -1
- package/src/gantt/export/pdf-gantt.js +6 -0
- package/src/gantt/export/pdf-taskbar.d.ts +13 -0
- package/src/gantt/export/pdf-taskbar.js +39 -5
- package/src/gantt/export/pdf-timeline.js +17 -8
- package/src/gantt/export/pdf-treegrid.js +3 -3
- package/src/gantt/models/task-fields-model.d.ts +7 -0
- package/src/gantt/models/task-fields.d.ts +6 -0
- package/src/gantt/models/task-fields.js +3 -0
- package/src/gantt/renderer/chart-rows.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.js +44 -34
- package/src/gantt/renderer/connector-line.js +52 -11
- package/src/gantt/renderer/edit-tooltip.js +2 -1
- package/src/gantt/renderer/timeline.js +16 -9
- package/src/gantt/renderer/tooltip.js +5 -5
- package/styles/bootstrap-dark.css +44 -100
- package/styles/bootstrap.css +44 -100
- package/styles/bootstrap4.css +44 -100
- package/styles/bootstrap5-dark.css +44 -100
- package/styles/bootstrap5.css +44 -100
- package/styles/fabric-dark.css +44 -100
- package/styles/fabric.css +44 -100
- package/styles/fluent-dark.css +44 -100
- package/styles/fluent.css +44 -100
- package/styles/gantt/_layout.scss +44 -31
- package/styles/gantt/_theme.scss +104 -98
- package/styles/gantt/bootstrap-dark.css +44 -100
- package/styles/gantt/bootstrap-dark.scss +1 -1
- package/styles/gantt/bootstrap.css +44 -100
- package/styles/gantt/bootstrap.scss +1 -1
- package/styles/gantt/bootstrap4.css +44 -100
- package/styles/gantt/bootstrap4.scss +1 -1
- package/styles/gantt/bootstrap5-dark.css +44 -100
- package/styles/gantt/bootstrap5-dark.scss +1 -1
- package/styles/gantt/bootstrap5.css +44 -100
- package/styles/gantt/bootstrap5.scss +1 -1
- package/styles/gantt/fabric-dark.css +44 -100
- package/styles/gantt/fabric-dark.scss +1 -1
- package/styles/gantt/fabric.css +44 -100
- package/styles/gantt/fabric.scss +1 -1
- package/styles/gantt/fluent-dark.css +44 -100
- package/styles/gantt/fluent-dark.scss +1 -1
- package/styles/gantt/fluent.css +44 -100
- package/styles/gantt/fluent.scss +1 -1
- package/styles/gantt/highcontrast-light.css +40 -100
- package/styles/gantt/highcontrast-light.scss +1 -1
- package/styles/gantt/highcontrast.css +44 -100
- package/styles/gantt/highcontrast.scss +1 -1
- package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
- package/styles/gantt/icons/_bootstrap.scss +4 -0
- package/styles/gantt/icons/_bootstrap4.scss +4 -0
- package/styles/gantt/icons/_bootstrap5.scss +4 -0
- package/styles/gantt/icons/_fabric-dark.scss +4 -0
- package/styles/gantt/icons/_fabric.scss +4 -0
- package/styles/gantt/icons/_fluent.scss +4 -0
- package/styles/gantt/icons/_fusionnew.scss +4 -0
- package/styles/gantt/icons/_highcontrast.scss +4 -0
- package/styles/gantt/icons/_material-dark.scss +4 -0
- package/styles/gantt/icons/_material.scss +4 -0
- package/styles/gantt/icons/_material3.scss +4 -0
- package/styles/gantt/icons/_tailwind-dark.scss +4 -0
- package/styles/gantt/icons/_tailwind.scss +4 -0
- package/styles/gantt/material-dark.css +44 -101
- package/styles/gantt/material-dark.scss +1 -1
- package/styles/gantt/material.css +44 -101
- package/styles/gantt/material.scss +1 -1
- package/styles/gantt/material3-dark.css +45 -102
- package/styles/gantt/material3-dark.scss +1 -1
- package/styles/gantt/material3.css +45 -102
- package/styles/gantt/material3.scss +1 -1
- package/styles/gantt/tailwind-dark.css +44 -101
- package/styles/gantt/tailwind-dark.scss +1 -1
- package/styles/gantt/tailwind.css +44 -101
- package/styles/gantt/tailwind.scss +1 -1
- package/styles/highcontrast-light.css +40 -100
- package/styles/highcontrast.css +44 -100
- package/styles/material-dark.css +44 -101
- package/styles/material.css +44 -101
- package/styles/material3-dark.css +45 -102
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +45 -102
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +44 -101
- package/styles/tailwind.css +44 -101
package/dist/global/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 -
|
|
3
|
+
* version : 23.1.38
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-gantt@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-gantt@
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@23.1.36",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-DaqtJNvLhh2v2HifwcrFvSwefaOTuNX8n/XbdImEEiQKiUe47Evc6TY5Ff72S6UPKgXDBG1xOC5voL16bmnFHg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-gantt",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-gantt",
|
|
24
24
|
"/@syncfusion/ej2-vue-gantt"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-23.1.36.tgz",
|
|
27
|
+
"_shasum": "13d8042a95ff4d2241be46c4d53bb29609be61eb",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
|
-
"_where": "/jenkins/workspace/elease-
|
|
29
|
+
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Syncfusion Inc."
|
|
32
32
|
},
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~
|
|
39
|
-
"@syncfusion/ej2-buttons": "~
|
|
40
|
-
"@syncfusion/ej2-calendars": "~
|
|
41
|
-
"@syncfusion/ej2-data": "~
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~
|
|
43
|
-
"@syncfusion/ej2-grids": "~
|
|
44
|
-
"@syncfusion/ej2-inputs": "~
|
|
45
|
-
"@syncfusion/ej2-layouts": "~
|
|
46
|
-
"@syncfusion/ej2-lists": "~
|
|
47
|
-
"@syncfusion/ej2-navigations": "~
|
|
48
|
-
"@syncfusion/ej2-notifications": "~
|
|
49
|
-
"@syncfusion/ej2-popups": "~
|
|
50
|
-
"@syncfusion/ej2-richtexteditor": "~
|
|
51
|
-
"@syncfusion/ej2-svg-base": "~
|
|
52
|
-
"@syncfusion/ej2-treegrid": "~
|
|
38
|
+
"@syncfusion/ej2-base": "~23.1.38",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~23.1.36",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~23.1.38",
|
|
41
|
+
"@syncfusion/ej2-data": "~23.1.36",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~23.1.38",
|
|
43
|
+
"@syncfusion/ej2-grids": "~23.1.38",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~23.1.38",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~23.1.36",
|
|
46
|
+
"@syncfusion/ej2-lists": "~23.1.36",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~23.1.36",
|
|
48
|
+
"@syncfusion/ej2-notifications": "~23.1.36",
|
|
49
|
+
"@syncfusion/ej2-popups": "~23.1.38",
|
|
50
|
+
"@syncfusion/ej2-richtexteditor": "~23.1.36",
|
|
51
|
+
"@syncfusion/ej2-svg-base": "~23.1.36",
|
|
52
|
+
"@syncfusion/ej2-treegrid": "~23.1.36"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
75
75
|
},
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "
|
|
77
|
+
"version": "23.1.38",
|
|
78
78
|
"sideEffects": false
|
|
79
79
|
}
|
|
@@ -48,7 +48,7 @@ var CellEdit = /** @class */ (function () {
|
|
|
48
48
|
args.cancel = true;
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
51
|
+
if (data.hasChildRecords && !this.parent.allowParentDependency && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
52
52
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
53
53
|
|| field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
54
54
|
if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
|
|
@@ -347,6 +347,9 @@ var CellEdit = /** @class */ (function () {
|
|
|
347
347
|
* @returns {void} .
|
|
348
348
|
*/
|
|
349
349
|
CellEdit.prototype.durationEdited = function (args) {
|
|
350
|
+
if (parseInt(args.data[this.parent.taskFields.duration]) < 0) {
|
|
351
|
+
args.data[this.parent.taskFields.duration] = 0;
|
|
352
|
+
}
|
|
350
353
|
var ganttProb = args.data.ganttProperties;
|
|
351
354
|
var durationString = args.data[this.parent.taskFields.duration];
|
|
352
355
|
this.parent.dataOperation.updateDurationValue(durationString, ganttProb);
|
|
@@ -178,16 +178,58 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
178
178
|
ConnectorLineEdit.prototype.idFromPredecessor = function (pre) {
|
|
179
179
|
var preArray = pre.split(',');
|
|
180
180
|
var preIdArray = [];
|
|
181
|
-
var values;
|
|
181
|
+
var values = [];
|
|
182
182
|
var offsetValue;
|
|
183
183
|
var match = [];
|
|
184
184
|
for (var j = 0; j < preArray.length; j++) {
|
|
185
185
|
var strArray = [];
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
186
|
+
var isGUId = false;
|
|
187
|
+
var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
188
|
+
var elSplit = preArray[j].split('-');
|
|
189
|
+
var id = void 0;
|
|
190
|
+
if (elSplit.length === 6) {
|
|
191
|
+
elSplit[4] = elSplit[4] + '-' + elSplit[5];
|
|
192
|
+
elSplit.pop();
|
|
193
|
+
}
|
|
194
|
+
if (elSplit.length === 5 && elSplit[4].length > 12) {
|
|
195
|
+
id = preArray[j].substring(0, 36);
|
|
196
|
+
if (regex.test(id)) {
|
|
197
|
+
isGUId = true;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (isGUId) {
|
|
201
|
+
var split = void 0;
|
|
202
|
+
split = elSplit[4].split('+');
|
|
203
|
+
var spliceLength = void 0;
|
|
204
|
+
if (split.length === 1) {
|
|
205
|
+
values[0] = preArray[j];
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
spliceLength = split[1].length;
|
|
209
|
+
values[0] = preArray[j].slice(0, -(spliceLength + 1));
|
|
210
|
+
values[1] = split[1];
|
|
211
|
+
}
|
|
212
|
+
offsetValue = '+';
|
|
213
|
+
if (elSplit[4].indexOf('-') >= 0) {
|
|
214
|
+
split = elSplit[4].split('-');
|
|
215
|
+
if (split.length === 1) {
|
|
216
|
+
values[0] = preArray[j];
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
spliceLength = split[1].length;
|
|
220
|
+
values[0] = preArray[j].slice(0, -(spliceLength + 1));
|
|
221
|
+
values[1] = split[1];
|
|
222
|
+
}
|
|
223
|
+
offsetValue = '-';
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
values = preArray[j].split('+');
|
|
228
|
+
offsetValue = '+';
|
|
229
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
230
|
+
values = preArray[j].split('-');
|
|
231
|
+
offsetValue = '-';
|
|
232
|
+
}
|
|
191
233
|
}
|
|
192
234
|
if (!isNullOrUndefined(values[0])) {
|
|
193
235
|
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
@@ -3,6 +3,7 @@ import { IGanttData } from '../base/interface';
|
|
|
3
3
|
/** @hidden */
|
|
4
4
|
export declare class CriticalPath {
|
|
5
5
|
private parent;
|
|
6
|
+
private validatedids;
|
|
6
7
|
detailPredecessorCollection: object[];
|
|
7
8
|
criticalPathCollection: number[];
|
|
8
9
|
resourceCollectionIds: string[];
|
|
@@ -14,6 +15,7 @@ export declare class CriticalPath {
|
|
|
14
15
|
showCriticalPath(isCritical: boolean): void;
|
|
15
16
|
slackCalculation(fromDataObject: object[], collection: object[], collectionTaskId: any, checkEndDate: Date, flatRecords: IGanttData[], modelRecordIds: string[]): void;
|
|
16
17
|
private getSlackDuration;
|
|
18
|
+
private updateCriticalTasks;
|
|
17
19
|
private finalCriticalPath;
|
|
18
20
|
criticalConnectorLine(criticalPathIds: number[], collection: object[], condition: boolean, collectionTaskId: number[]): void;
|
|
19
21
|
getModuleName(): string;
|
|
@@ -4,6 +4,7 @@ import * as cls from '../base/css-constants';
|
|
|
4
4
|
/** @hidden */
|
|
5
5
|
var CriticalPath = /** @class */ (function () {
|
|
6
6
|
function CriticalPath(parent) {
|
|
7
|
+
this.validatedids = [];
|
|
7
8
|
this.resourceCollectionIds = [];
|
|
8
9
|
this.criticalTasks = [];
|
|
9
10
|
this.parent = parent;
|
|
@@ -30,6 +31,7 @@ var CriticalPath = /** @class */ (function () {
|
|
|
30
31
|
var collectionTaskId = [];
|
|
31
32
|
var fromDataObject = [];
|
|
32
33
|
var criticalPathIds = [];
|
|
34
|
+
this.criticalTasks = [];
|
|
33
35
|
/* eslint-disable-next-line */
|
|
34
36
|
if (parentRecords[0].ganttProperties.autoEndDate > parentRecords[0].ganttProperties.endDate && !parentRecords[0].ganttProperties.isAutoSchedule) {
|
|
35
37
|
checkEndDate = parentRecords[0].ganttProperties.autoEndDate;
|
|
@@ -226,6 +228,7 @@ var CriticalPath = /** @class */ (function () {
|
|
|
226
228
|
this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, totalRecords, modelIds);
|
|
227
229
|
}
|
|
228
230
|
criticalPathIds = this.finalCriticalPath(collection, taskBeyondEnddate, totalRecords, modelIds, checkEndDate);
|
|
231
|
+
this.validatedids = [];
|
|
229
232
|
this.criticalPathCollection = criticalPathIds;
|
|
230
233
|
this.detailPredecessorCollection = collection;
|
|
231
234
|
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
@@ -605,73 +608,69 @@ var CriticalPath = /** @class */ (function () {
|
|
|
605
608
|
return this.parent.dataOperation.getDuration(startDate, endDate, durationUnit, record.ganttProperties.isAutoSchedule, true);
|
|
606
609
|
}
|
|
607
610
|
};
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
var slackindexes = [];
|
|
614
|
-
var indexes = [];
|
|
615
|
-
for (var z = flatRecords.length - 1; z >= 0; z--) {
|
|
616
|
-
if (flatRecords[parseInt(z.toString(), 10)].slack === '0 day') {
|
|
617
|
-
var index1 = flatRecords[parseInt(z.toString(), 10)].index;
|
|
618
|
-
slackindexes.push(index1);
|
|
611
|
+
CriticalPath.prototype.updateCriticalTasks = function (record, criticalPathIds) {
|
|
612
|
+
for (var i = 0; i < record.ganttProperties.predecessor.length; i++) {
|
|
613
|
+
var fromRecord = void 0;
|
|
614
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
615
|
+
fromRecord = this.parent.getRecordByID(record.ganttProperties.predecessor[i].from);
|
|
619
616
|
}
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
var
|
|
625
|
-
if (
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
indexes.push(q);
|
|
633
|
-
}
|
|
634
|
-
break;
|
|
635
|
-
}
|
|
617
|
+
else {
|
|
618
|
+
var resourceIndex = this.resourceCollectionIds.indexOf(record.ganttProperties.predecessor[i].from.toString());
|
|
619
|
+
fromRecord = this.parent.flatData[resourceIndex];
|
|
620
|
+
}
|
|
621
|
+
var durationDiff = void 0;
|
|
622
|
+
if (record.ganttProperties.endDate.getTime() >= this.maxEndDate.getTime()) {
|
|
623
|
+
record.ganttProperties.slack = record.slack = 0 + ' ' + record.ganttProperties.durationUnit;
|
|
624
|
+
if (record.ganttProperties.progress < 100) {
|
|
625
|
+
record.isCritical = true;
|
|
626
|
+
record.ganttProperties.isCritical = true;
|
|
627
|
+
if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
|
|
628
|
+
criticalPathIds.push(parseInt(record.ganttProperties.taskId));
|
|
636
629
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
if (fromRecord) {
|
|
633
|
+
if (record.ganttProperties.predecessor[i].type == 'FS') {
|
|
634
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
635
|
+
}
|
|
636
|
+
else if (record.ganttProperties.predecessor[i].type == 'SS') {
|
|
637
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.startDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
638
|
+
}
|
|
639
|
+
else if (record.ganttProperties.predecessor[i].type == 'FF') {
|
|
640
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.endDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
641
|
+
}
|
|
642
|
+
else if (record.ganttProperties.predecessor[i].type == 'SF') {
|
|
643
|
+
durationDiff = this.parent.dataOperation.getDuration(record.ganttProperties.endDate, fromRecord.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
644
|
+
}
|
|
645
|
+
if (durationDiff == 0 && this.validatedids.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.taskId != record.ganttProperties.taskId) {
|
|
646
|
+
fromRecord.ganttProperties.slack = record.ganttProperties.slack;
|
|
647
|
+
fromRecord.slack = record.slack;
|
|
648
|
+
fromRecord.isCritical = record.ganttProperties.isCritical;
|
|
649
|
+
fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
|
|
650
|
+
if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
|
|
651
|
+
this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
|
|
652
|
+
criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
|
|
653
|
+
}
|
|
654
|
+
if (fromRecord.ganttProperties.predecessorsName) {
|
|
655
|
+
this.updateCriticalTasks(fromRecord, criticalPathIds);
|
|
646
656
|
}
|
|
647
657
|
}
|
|
648
658
|
}
|
|
649
659
|
}
|
|
650
|
-
|
|
660
|
+
};
|
|
661
|
+
/* eslint-disable-next-line */
|
|
662
|
+
CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
663
|
+
var criticalPathIds = [];
|
|
664
|
+
var index;
|
|
665
|
+
var predecessorFrom;
|
|
666
|
+
for (var x = collection.length - 1; x >= 0; x--) {
|
|
651
667
|
if (this.parent.viewType === 'ProjectView') {
|
|
652
|
-
index = modelRecordIds.indexOf(
|
|
668
|
+
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
653
669
|
}
|
|
654
670
|
else {
|
|
655
|
-
index = this.resourceCollectionIds.indexOf(
|
|
671
|
+
index = this.resourceCollectionIds.indexOf(collection[x]['taskid'].toString());
|
|
656
672
|
}
|
|
657
673
|
var predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
658
|
-
if (isNullOrUndefined(predecessorLength)) {
|
|
659
|
-
if (taskBeyondEnddate.length > 0) {
|
|
660
|
-
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
661
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
662
|
-
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
663
|
-
}
|
|
664
|
-
else {
|
|
665
|
-
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
666
|
-
}
|
|
667
|
-
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
668
|
-
this.criticalTasks.push(flatRecords[index]);
|
|
669
|
-
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
break;
|
|
674
|
-
}
|
|
675
674
|
var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
676
675
|
for (var i = predecessorLength.length - 1; i >= 0; i--) {
|
|
677
676
|
var toID = void 0;
|
|
@@ -684,6 +683,7 @@ var CriticalPath = /** @class */ (function () {
|
|
|
684
683
|
var dateDifference = void 0;
|
|
685
684
|
var currentData = flatRecords[index].ganttProperties;
|
|
686
685
|
if (predecessorLength[i].type === 'FS') {
|
|
686
|
+
/* eslint-disable-next-line */
|
|
687
687
|
if (predecessorLength[i].to != currentData.taskId.toString() || this.parent.viewType === 'ResourceView') {
|
|
688
688
|
/* eslint-disable-next-line */
|
|
689
689
|
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
@@ -735,8 +735,28 @@ var CriticalPath = /** @class */ (function () {
|
|
|
735
735
|
flatRecords[index].isCritical = true;
|
|
736
736
|
flatRecords[index].ganttProperties.isCritical = true;
|
|
737
737
|
this.criticalTasks.push(flatRecords[index]);
|
|
738
|
-
|
|
739
|
-
|
|
738
|
+
if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
|
|
739
|
+
criticalPathIds.push(collection[x]['taskid']);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
if (flatRecords[index].ganttProperties.predecessor.length > 0) {
|
|
744
|
+
this.updateCriticalTasks(flatRecords[index], criticalPathIds);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
if (taskBeyondEnddate.length > 0) {
|
|
748
|
+
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
749
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
750
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
751
|
+
}
|
|
752
|
+
else {
|
|
753
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
754
|
+
}
|
|
755
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
756
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
757
|
+
if (criticalPathIds.indexOf(taskBeyondEnddate[i]) === -1) {
|
|
758
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
759
|
+
}
|
|
740
760
|
}
|
|
741
761
|
}
|
|
742
762
|
}
|
|
@@ -781,7 +801,7 @@ var CriticalPath = /** @class */ (function () {
|
|
|
781
801
|
}
|
|
782
802
|
}
|
|
783
803
|
/* eslint-disable-next-line */
|
|
784
|
-
if (this_2.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
804
|
+
if (this_2.parent.allowUnscheduledTasks && criticalData && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
785
805
|
taskClass = cls.criticalUnscheduledTask;
|
|
786
806
|
}
|
|
787
807
|
else {
|
|
@@ -794,8 +814,6 @@ var CriticalPath = /** @class */ (function () {
|
|
|
794
814
|
}
|
|
795
815
|
if (element.getElementsByClassName('e-gantt-child-taskbar-inner-div').length > 0) {
|
|
796
816
|
addClass(element.querySelectorAll('.e-gantt-child-taskbar-inner-div'), cls.criticalChildTaskBarInnerDiv);
|
|
797
|
-
var innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
|
|
798
|
-
innerDivs.style.outlineColor = "";
|
|
799
817
|
}
|
|
800
818
|
if (element.getElementsByClassName('e-gantt-child-progressbar-inner-div').length > 0) {
|
|
801
819
|
addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
|
|
@@ -5,6 +5,7 @@ var Dependency = /** @class */ (function () {
|
|
|
5
5
|
this.parentRecord = [];
|
|
6
6
|
this.parentIds = [];
|
|
7
7
|
this.parentPredecessors = [];
|
|
8
|
+
this.validatedParentIds = [];
|
|
8
9
|
this.parent = gantt;
|
|
9
10
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
10
11
|
}
|
|
@@ -123,15 +124,58 @@ var Dependency = /** @class */ (function () {
|
|
|
123
124
|
var collection = [];
|
|
124
125
|
var match;
|
|
125
126
|
var isrelationship;
|
|
126
|
-
var values;
|
|
127
|
+
var values = [];
|
|
127
128
|
var offsetValue;
|
|
128
129
|
var predecessorText;
|
|
129
130
|
predecessor.split(',').forEach(function (el) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
var isGUId = false;
|
|
132
|
+
var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
133
|
+
var elSplit = el.split('-');
|
|
134
|
+
var id;
|
|
135
|
+
if (elSplit.length === 6) {
|
|
136
|
+
elSplit[4] = elSplit[4] + '-' + elSplit[5];
|
|
137
|
+
elSplit.pop();
|
|
138
|
+
}
|
|
139
|
+
if (elSplit.length === 5 && elSplit[4].length > 12) {
|
|
140
|
+
id = el.substring(0, 36);
|
|
141
|
+
if (regex.test(id)) {
|
|
142
|
+
isGUId = true;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (isGUId) {
|
|
146
|
+
var split = void 0;
|
|
147
|
+
split = elSplit[4].split('+');
|
|
148
|
+
var spliceLength = void 0;
|
|
149
|
+
;
|
|
150
|
+
if (split.length === 1) {
|
|
151
|
+
values[0] = el;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
spliceLength = split[1].length;
|
|
155
|
+
values[0] = el.slice(0, -(spliceLength + 1));
|
|
156
|
+
values[1] = split[1];
|
|
157
|
+
}
|
|
158
|
+
offsetValue = '+';
|
|
159
|
+
if (elSplit[4].indexOf('-') >= 0) {
|
|
160
|
+
split = elSplit[4].split('-');
|
|
161
|
+
if (split.length === 1) {
|
|
162
|
+
values[0] = el;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
spliceLength = split[1].length;
|
|
166
|
+
values[0] = el.slice(0, -(spliceLength + 1));
|
|
167
|
+
values[1] = split[1];
|
|
168
|
+
}
|
|
169
|
+
offsetValue = '-';
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
values = el.split('+');
|
|
174
|
+
offsetValue = '+';
|
|
175
|
+
if (el.indexOf('-') >= 0) {
|
|
176
|
+
values = el.split('-');
|
|
177
|
+
offsetValue = '-';
|
|
178
|
+
}
|
|
135
179
|
}
|
|
136
180
|
match = [];
|
|
137
181
|
var ids = _this.parent.viewType === 'ResourceView' ? _this.parent.getTaskIds() : _this.parent.ids;
|
|
@@ -622,13 +666,31 @@ var Dependency = /** @class */ (function () {
|
|
|
622
666
|
*/
|
|
623
667
|
Dependency.prototype.createConnectorLinesCollection = function (records) {
|
|
624
668
|
var ganttRecords = records ? records : this.parent.currentViewData;
|
|
669
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
670
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
671
|
+
ganttRecords = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneCurrentViewData'];
|
|
672
|
+
}
|
|
625
673
|
var recordLength = ganttRecords.length;
|
|
626
674
|
var count;
|
|
627
675
|
var ganttRecord;
|
|
628
676
|
var predecessorsCollection;
|
|
629
|
-
this.parent.
|
|
630
|
-
this.parent.
|
|
677
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
678
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
679
|
+
this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
680
|
+
this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
683
|
+
this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
684
|
+
this.parent.updatedRecords : this.parent.getExpandedRecords(this.parent.updatedRecords);
|
|
685
|
+
}
|
|
631
686
|
for (count = 0; count < recordLength; count++) {
|
|
687
|
+
if (this.parent.editModule && this.parent.editModule.deletedTaskDetails.length > 0) {
|
|
688
|
+
if (ganttRecords[count].parentItem) {
|
|
689
|
+
var parentItem = this.parent.getRecordByID(ganttRecords[count].parentItem.taskId.toString());
|
|
690
|
+
this.parent.setRecordValue('parentItem', this.parent.dataOperation.getCloneParent(parentItem), ganttRecords[count]);
|
|
691
|
+
}
|
|
692
|
+
ganttRecords[count].index = count;
|
|
693
|
+
}
|
|
632
694
|
ganttRecord = ganttRecords[count];
|
|
633
695
|
predecessorsCollection = ganttRecord.ganttProperties.predecessor;
|
|
634
696
|
if (predecessorsCollection) {
|
|
@@ -776,36 +838,35 @@ var Dependency = /** @class */ (function () {
|
|
|
776
838
|
this.validatePredecessor(record, undefined, 'successor');
|
|
777
839
|
}
|
|
778
840
|
}
|
|
779
|
-
if (record && record.
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
841
|
+
if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
|
|
842
|
+
this.validatedParentIds.push(record.parentItem.taskId);
|
|
843
|
+
}
|
|
844
|
+
;
|
|
845
|
+
var validUpdate = true;
|
|
846
|
+
if (record && record.hasChildRecords && this.validatedParentIds.indexOf(record.ganttProperties.taskId.toString()) !== -1) {
|
|
847
|
+
validUpdate = false;
|
|
848
|
+
}
|
|
849
|
+
if (validUpdate) {
|
|
850
|
+
if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
|
|
851
|
+
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
852
|
+
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
853
|
+
this.parent.editModule['updateChildItems'](record);
|
|
854
|
+
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
|
|
858
|
+
(record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
793
859
|
this.parent.editModule['updateChildItems'](record);
|
|
794
860
|
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
795
861
|
}
|
|
862
|
+
if (!ganttProp.hasChildRecords) {
|
|
863
|
+
this.parent.dataOperation.updateParentItems(record, true);
|
|
864
|
+
}
|
|
796
865
|
}
|
|
797
|
-
else if (
|
|
798
|
-
(validUpdate && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
866
|
+
else if (record && record.hasChildRecords && !ganttProp) {
|
|
799
867
|
this.parent.editModule['updateChildItems'](record);
|
|
800
|
-
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
801
|
-
}
|
|
802
|
-
if (!ganttProp.hasChildRecords) {
|
|
803
|
-
this.parent.dataOperation.updateParentItems(record, true);
|
|
804
868
|
}
|
|
805
869
|
}
|
|
806
|
-
else if (record && record.hasChildRecords && !ganttProp) {
|
|
807
|
-
this.parent.editModule['updateChildItems'](record);
|
|
808
|
-
}
|
|
809
870
|
}
|
|
810
871
|
};
|
|
811
872
|
/**
|