@syncfusion/ej2-gantt 21.2.8 → 21.2.10
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 +31 -0
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +149 -54
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +144 -49
- 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/dependency.js +9 -0
- package/src/gantt/actions/edit.d.ts +1 -0
- package/src/gantt/actions/edit.js +14 -3
- package/src/gantt/base/date-processor.js +9 -1
- package/src/gantt/base/gantt-chart.js +13 -2
- package/src/gantt/base/task-processor.js +51 -20
- package/src/gantt/base/tree-grid.js +2 -2
- package/src/gantt/export/export-helper.js +3 -0
- package/src/gantt/renderer/chart-rows.d.ts +1 -0
- package/src/gantt/renderer/chart-rows.js +39 -19
- package/src/gantt/renderer/timeline.js +4 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.2.
|
|
3
|
+
* version : 21.2.10
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-gantt@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-gantt@21.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@21.2.9",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-eYEVlazMp41/EH/pIG4tAEC3I5c+p+OS6M1RBkLrtP/QzA1dFEfKGsWb3aQo1+6uz+STW+7V+KHaw11oBDBWmw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-gantt",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
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-21.2.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-21.2.9.tgz",
|
|
27
|
+
"_shasum": "ad5e6b81969e9f038a739374cc73cf82832682ac",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~21.2.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~21.2.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~21.2.
|
|
41
|
-
"@syncfusion/ej2-data": "~21.2.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~21.2.
|
|
43
|
-
"@syncfusion/ej2-grids": "~21.2.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~21.2.
|
|
45
|
-
"@syncfusion/ej2-layouts": "~21.2.
|
|
46
|
-
"@syncfusion/ej2-lists": "~21.2.
|
|
47
|
-
"@syncfusion/ej2-navigations": "~21.2.
|
|
38
|
+
"@syncfusion/ej2-base": "~21.2.9",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~21.2.10",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~21.2.10",
|
|
41
|
+
"@syncfusion/ej2-data": "~21.2.9",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~21.2.10",
|
|
43
|
+
"@syncfusion/ej2-grids": "~21.2.10",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~21.2.9",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~21.2.9",
|
|
46
|
+
"@syncfusion/ej2-lists": "~21.2.9",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~21.2.9",
|
|
48
48
|
"@syncfusion/ej2-notifications": "~21.2.3",
|
|
49
|
-
"@syncfusion/ej2-popups": "~21.2.
|
|
50
|
-
"@syncfusion/ej2-richtexteditor": "~21.2.
|
|
51
|
-
"@syncfusion/ej2-treegrid": "~21.2.
|
|
49
|
+
"@syncfusion/ej2-popups": "~21.2.10",
|
|
50
|
+
"@syncfusion/ej2-richtexteditor": "~21.2.10",
|
|
51
|
+
"@syncfusion/ej2-treegrid": "~21.2.9"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
74
74
|
},
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "21.2.
|
|
76
|
+
"version": "21.2.10",
|
|
77
77
|
"sideEffects": false
|
|
78
78
|
}
|
|
@@ -387,6 +387,15 @@ var Dependency = /** @class */ (function () {
|
|
|
387
387
|
for (var count = 0; count < totLength; count++) {
|
|
388
388
|
if (flatData[count].ganttProperties.predecessorsName) {
|
|
389
389
|
this.validatePredecessorDates(flatData[count]);
|
|
390
|
+
var predecessorCollection = flatData[count].ganttProperties.predecessor;
|
|
391
|
+
if (predecessorCollection && predecessorCollection.length > 1) {
|
|
392
|
+
for (var i = 0; i < predecessorCollection.length; i++) {
|
|
393
|
+
var validateRecord = this.parent.getRecordByID(predecessorCollection[i].to);
|
|
394
|
+
if (validateRecord) {
|
|
395
|
+
this.validatePredecessorDates(validateRecord);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
390
399
|
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
391
400
|
&& this.parent.allowParentDependency) {
|
|
392
401
|
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
@@ -17,6 +17,7 @@ var Edit = /** @class */ (function () {
|
|
|
17
17
|
this.isFromDeleteMethod = false;
|
|
18
18
|
this.targetedRecords = [];
|
|
19
19
|
this.isNewRecordAdded = false;
|
|
20
|
+
this.isValidatedEditedRecord = false;
|
|
20
21
|
/** @hidden */
|
|
21
22
|
this.updateParentRecords = [];
|
|
22
23
|
/** @hidden */
|
|
@@ -671,8 +672,9 @@ var Edit = /** @class */ (function () {
|
|
|
671
672
|
(isNullOrUndefined(taskData.startDate) && !isNullOrUndefined(prevStart)) ||
|
|
672
673
|
(isNullOrUndefined(taskData.endDate) && !isNullOrUndefined(prevEnd)) ||
|
|
673
674
|
(prevStart && prevStart.getTime() !== taskData.startDate.getTime())
|
|
674
|
-
|
|
675
|
-
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration
|
|
675
|
+
|| (prevEnd && prevEnd.getTime() !== taskData.endDate.getTime())
|
|
676
|
+
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration)
|
|
677
|
+
|| (!isNullOrUndefined(prevDuration) && prevDuration === taskData.duration &&
|
|
676
678
|
prevDurationUnit !== taskData.durationUnit)) {
|
|
677
679
|
isMoved = true;
|
|
678
680
|
}
|
|
@@ -785,6 +787,11 @@ var Edit = /** @class */ (function () {
|
|
|
785
787
|
this.parent.connectorLineEditModule.openValidationDialog(validateObject);
|
|
786
788
|
}
|
|
787
789
|
else {
|
|
790
|
+
if (this.parent.editModule && this.parent.editModule.dialogModule &&
|
|
791
|
+
this.parent.editModule.dialogModule['isEdit'] && this.predecessorUpdated) {
|
|
792
|
+
this.isValidatedEditedRecord = true;
|
|
793
|
+
this.parent.predecessorModule.validatePredecessor(args.data, [], '');
|
|
794
|
+
}
|
|
788
795
|
this.parent.connectorLineEditModule.applyPredecessorOption();
|
|
789
796
|
}
|
|
790
797
|
}
|
|
@@ -848,7 +855,10 @@ var Edit = /** @class */ (function () {
|
|
|
848
855
|
if (this.taskbarMoved) {
|
|
849
856
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
850
857
|
}
|
|
851
|
-
this.
|
|
858
|
+
if (!this.isValidatedEditedRecord) {
|
|
859
|
+
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
860
|
+
}
|
|
861
|
+
this.isValidatedEditedRecord = false;
|
|
852
862
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
853
863
|
}
|
|
854
864
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
@@ -2734,6 +2744,7 @@ var Edit = /** @class */ (function () {
|
|
|
2734
2744
|
this.parent.treeGrid.parentData = [];
|
|
2735
2745
|
this.parent.addDeleteRecord = true;
|
|
2736
2746
|
this.parent.selectedRowIndex = 0;
|
|
2747
|
+
this.parent.treeGrid['isAddedFromGantt'] = true;
|
|
2737
2748
|
this.parent.treeGrid.refresh();
|
|
2738
2749
|
if (this.parent.enableImmutableMode) {
|
|
2739
2750
|
this.parent.modifiedRecords = args.modifiedRecords;
|
|
@@ -1362,7 +1362,15 @@ var DateProcessor = /** @class */ (function () {
|
|
|
1362
1362
|
var segment = segments[i];
|
|
1363
1363
|
var sDate = segment.startDate;
|
|
1364
1364
|
var eDate = segment.endDate;
|
|
1365
|
-
|
|
1365
|
+
if (this.parent.timelineModule.bottomTier === "Hour") {
|
|
1366
|
+
duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60));
|
|
1367
|
+
}
|
|
1368
|
+
else if (this.parent.timelineModule.bottomTier === "Minutes") {
|
|
1369
|
+
duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60));
|
|
1370
|
+
}
|
|
1371
|
+
else {
|
|
1372
|
+
duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24));
|
|
1373
|
+
}
|
|
1366
1374
|
}
|
|
1367
1375
|
return duration;
|
|
1368
1376
|
};
|
|
@@ -965,7 +965,13 @@ var GanttChart = /** @class */ (function () {
|
|
|
965
965
|
* @private
|
|
966
966
|
*/
|
|
967
967
|
GanttChart.prototype.getRecordByTaskBar = function (target) {
|
|
968
|
-
var item
|
|
968
|
+
var item;
|
|
969
|
+
if (this.parent.enableVirtualization && this.parent.enableMultiTaskbar) {
|
|
970
|
+
item = this.parent.flatData[this.getIndexByTaskBar(target)];
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
item = this.parent.currentViewData[this.getIndexByTaskBar(target)];
|
|
974
|
+
}
|
|
969
975
|
return item;
|
|
970
976
|
};
|
|
971
977
|
/**
|
|
@@ -1323,7 +1329,12 @@ var GanttChart = /** @class */ (function () {
|
|
|
1323
1329
|
else {
|
|
1324
1330
|
var id = row.getAttribute('rowUniqueId');
|
|
1325
1331
|
var record = this.parent.getRecordByID(id);
|
|
1326
|
-
|
|
1332
|
+
if (this.parent.enableVirtualization && this.parent.enableMultiTaskbar) {
|
|
1333
|
+
recordIndex = this.parent.flatData.indexOf(record);
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
recordIndex = this.parent.currentViewData.indexOf(record);
|
|
1337
|
+
}
|
|
1327
1338
|
}
|
|
1328
1339
|
return recordIndex;
|
|
1329
1340
|
};
|
|
@@ -509,29 +509,53 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
509
509
|
startDate = this.checkStartDate(startDate, data.ganttProperties, false);
|
|
510
510
|
if (!isNullOrUndefined(duration)) {
|
|
511
511
|
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
512
|
+
if (taskSettings.duration) {
|
|
513
|
+
remainingDuration = data.ganttProperties.duration - sumOfDuration;
|
|
514
|
+
if (remainingDuration <= 0) {
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
duration = i === segments.length - 1 ? remainingDuration : remainingDuration > 0 &&
|
|
518
|
+
duration > remainingDuration ? remainingDuration : duration;
|
|
519
|
+
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
520
|
+
}
|
|
521
|
+
else if (!taskSettings.duration && taskSettings.endDate) {
|
|
522
|
+
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
|
|
523
|
+
data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
|
|
524
|
+
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
525
|
+
if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
|
|
526
|
+
&& endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
|
|
527
|
+
ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
512
531
|
}
|
|
513
532
|
else {
|
|
514
533
|
endDate = this.getDateFromFormat(endDate);
|
|
534
|
+
if (endDate && (isNullOrUndefined(duration) || String(duration) === '')) {
|
|
535
|
+
if (endDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
|
|
536
|
+
this.setTime(this.parent.defaultEndTime, endDate);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
515
539
|
endDate = this.checkEndDate(endDate, data.ganttProperties, false);
|
|
516
540
|
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
541
|
+
if (taskSettings.duration) {
|
|
542
|
+
remainingDuration = data.ganttProperties.duration - sumOfDuration - 1;
|
|
543
|
+
if (remainingDuration <= 0) {
|
|
544
|
+
continue;
|
|
545
|
+
}
|
|
546
|
+
duration = i === segments.length - 1 ? remainingDuration : remainingDuration > 0 &&
|
|
547
|
+
duration > remainingDuration ? remainingDuration : duration;
|
|
548
|
+
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
522
549
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
&& endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
|
|
533
|
-
ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
534
|
-
continue;
|
|
550
|
+
else if (!taskSettings.duration && taskSettings.endDate) {
|
|
551
|
+
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
|
|
552
|
+
data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
|
|
553
|
+
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
554
|
+
if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
|
|
555
|
+
&& endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
|
|
556
|
+
ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
535
559
|
}
|
|
536
560
|
}
|
|
537
561
|
segment = {};
|
|
@@ -1395,7 +1419,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1395
1419
|
var data_1 = [];
|
|
1396
1420
|
var _loop_4 = function (k) {
|
|
1397
1421
|
resourceData.filter(function (resourceInfo) {
|
|
1398
|
-
if (resourceInfo[resourceSettings.id] === preTaskResources[k][resourceSettings.id]) {
|
|
1422
|
+
if (resourceInfo[resourceSettings.id] === preTaskResources[k][resourceSettings.id] && data_1.indexOf(preTaskResources[k]) === -1) {
|
|
1399
1423
|
data_1.push(preTaskResources[k]);
|
|
1400
1424
|
}
|
|
1401
1425
|
});
|
|
@@ -1680,7 +1704,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1680
1704
|
if (resourceUnit !== 100) {
|
|
1681
1705
|
resName += '[' + resourceUnit + '%' + ']';
|
|
1682
1706
|
}
|
|
1683
|
-
|
|
1707
|
+
if (!isNullOrUndefined(resName)) {
|
|
1708
|
+
resourceName.push(resName);
|
|
1709
|
+
}
|
|
1684
1710
|
if (data.taskData) {
|
|
1685
1711
|
var mapping = taskMapping.resourceInfo;
|
|
1686
1712
|
// eslint-disable-next-line
|
|
@@ -2182,7 +2208,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2182
2208
|
if (!isNullOrUndefined(ganttRecord.segments) && ganttRecord.segments.length > 0) {
|
|
2183
2209
|
var segments = ganttRecord.segments;
|
|
2184
2210
|
var fixedWidth = true;
|
|
2185
|
-
var totalTaskWidth = this.splitTasksDuration(segments) * this.parent.perDayWidth;
|
|
2211
|
+
var totalTaskWidth = this.splitTasksDuration(segments) * ((this.parent.timelineModule.bottomTier === "Hour" || this.parent.timelineModule.bottomTier === "Minutes") ? this.parent.timelineSettings.timelineUnitSize : this.parent.perDayWidth);
|
|
2186
2212
|
var totalProgressWidth = this.parent.dataOperation.getProgressWidth(totalTaskWidth, ganttRecord.progress);
|
|
2187
2213
|
for (var i = 0; i < segments.length; i++) {
|
|
2188
2214
|
var segment = segments[i];
|
|
@@ -2230,6 +2256,8 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2230
2256
|
var ganttRecord = data.ganttProperties;
|
|
2231
2257
|
this.parent.setRecordValue('autoWidth', this.calculateWidth(data, true), ganttRecord, true);
|
|
2232
2258
|
this.parent.setRecordValue('autoLeft', this.calculateLeft(ganttRecord, true), ganttRecord, true);
|
|
2259
|
+
this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth((ganttRecord.isAutoSchedule ||
|
|
2260
|
+
!data.hasChildRecords ? ganttRecord.width : ganttRecord.autoWidth), ganttRecord.progress), ganttRecord, true);
|
|
2233
2261
|
};
|
|
2234
2262
|
/**
|
|
2235
2263
|
* To calculate parent progress value
|
|
@@ -2365,6 +2393,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2365
2393
|
}
|
|
2366
2394
|
}
|
|
2367
2395
|
this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
|
|
2396
|
+
if (!isNullOrUndefined(this.parent.taskFields.milestone)) {
|
|
2397
|
+
this.updateMappingData(parentData, 'milestone');
|
|
2398
|
+
}
|
|
2368
2399
|
if (parentProp.isAutoSchedule) {
|
|
2369
2400
|
this.calculateDuration(parentData);
|
|
2370
2401
|
}
|
|
@@ -456,7 +456,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
456
456
|
this.parent.columnByField = {};
|
|
457
457
|
this.parent.customColumns = [];
|
|
458
458
|
var tasksMapping = ['id', 'name', 'startDate', 'endDate', 'duration', 'dependency',
|
|
459
|
-
'progress', 'baselineStartDate', 'baselineEndDate', 'resourceInfo', 'notes', 'work', 'manual', 'type'];
|
|
459
|
+
'progress', 'baselineStartDate', 'baselineEndDate', 'resourceInfo', 'notes', 'work', 'manual', 'type', 'milestone'];
|
|
460
460
|
var _loop_1 = function (i) {
|
|
461
461
|
var column = {};
|
|
462
462
|
if (typeof ganttObj.columns[i] === 'string') {
|
|
@@ -803,7 +803,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
803
803
|
}
|
|
804
804
|
}; // eslint-disable-next-line
|
|
805
805
|
GanttTreeGrid.prototype.durationValueAccessor = function (field, data, column) {
|
|
806
|
-
var ganttProp = data.ganttProperties;
|
|
806
|
+
var ganttProp = (!isNullOrUndefined(data)) ? data.ganttProperties : null;
|
|
807
807
|
if (!isNullOrUndefined(ganttProp)) {
|
|
808
808
|
return this.parent.dataOperation.getDurationString(ganttProp.duration, ganttProp.durationUnit);
|
|
809
809
|
}
|
|
@@ -469,6 +469,9 @@ var ExportHelper = /** @class */ (function () {
|
|
|
469
469
|
footer.graphics.drawRectangle(pen, footerBrush, 0, 0, pdfDoc.pageSettings.width, 35);
|
|
470
470
|
/* eslint-disable-next-line */
|
|
471
471
|
var font = new PdfStandardFont(this.ganttStyle.fontFamily, this.ganttStyle.footer.fontSize, this.ganttStyle.footer.fontStyle);
|
|
472
|
+
if (this.ganttStyle.font) {
|
|
473
|
+
font = this.ganttStyle.font;
|
|
474
|
+
}
|
|
472
475
|
var brush = new PdfSolidBrush(this.ganttStyle.footer.fontColor);
|
|
473
476
|
var pageNumber = new PdfPageNumberField(font);
|
|
474
477
|
var count = new PdfPageCountField(font, brush);
|
|
@@ -279,6 +279,7 @@ export declare class ChartRows extends DateProcessor {
|
|
|
279
279
|
* @private
|
|
280
280
|
*/
|
|
281
281
|
refreshRow(index: number, isValidateRange?: boolean): void;
|
|
282
|
+
private updateResourceTaskbarElement;
|
|
282
283
|
private getResourceParent;
|
|
283
284
|
/**
|
|
284
285
|
* To refresh all edited records
|
|
@@ -243,7 +243,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
243
243
|
!this.isTemplate(childLabel) &&
|
|
244
244
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
245
245
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
246
|
-
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent
|
|
246
|
+
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent === '' &&
|
|
247
247
|
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML !== '')
|
|
248
248
|
progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
|
|
249
249
|
}
|
|
@@ -914,7 +914,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
914
914
|
!this.isTemplate(parentLabel) &&
|
|
915
915
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
916
916
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
917
|
-
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent
|
|
917
|
+
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent === '' &&
|
|
918
918
|
parentLabel && !parentLabel['elementRef'] && div.innerHTML !== '')
|
|
919
919
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
920
920
|
}
|
|
@@ -944,11 +944,19 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
944
944
|
* @returns {NodeList} .
|
|
945
945
|
* @private
|
|
946
946
|
*/
|
|
947
|
-
ChartRows.prototype.getTableTrNode = function () {
|
|
947
|
+
ChartRows.prototype.getTableTrNode = function (i) {
|
|
948
948
|
var table = createElement('table');
|
|
949
949
|
var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
950
950
|
'e-chart-row-border' : '';
|
|
951
|
-
|
|
951
|
+
var rows = this.parent.treeGrid.grid.contentModule.getRows()[i];
|
|
952
|
+
var activecls;
|
|
953
|
+
if (rows && rows.isSelected) {
|
|
954
|
+
activecls = 'e-active';
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
activecls = '';
|
|
958
|
+
}
|
|
959
|
+
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + cls.chartRow + ' ' + (activecls) + '"' +
|
|
952
960
|
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
953
961
|
this.parent.rowHeight + 'px;">' +
|
|
954
962
|
'<td class="' + cls.chartRowCell + ' ' + className
|
|
@@ -1386,7 +1394,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1386
1394
|
this.parent.renderTemplates();
|
|
1387
1395
|
this.triggerQueryTaskbarInfo();
|
|
1388
1396
|
this.parent.modifiedRecords = [];
|
|
1389
|
-
if (this.parent.viewType
|
|
1397
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
|
|
1390
1398
|
this.updateOverlapped();
|
|
1391
1399
|
}
|
|
1392
1400
|
if (collapsedResourceRecord.length) {
|
|
@@ -1410,7 +1418,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1410
1418
|
ChartRows.prototype.getGanttChartRow = function (i, tempTemplateData) {
|
|
1411
1419
|
this.templateData = tempTemplateData;
|
|
1412
1420
|
var taskBaselineTemplateNode = null;
|
|
1413
|
-
var parentTrNode = this.getTableTrNode();
|
|
1421
|
+
var parentTrNode = this.getTableTrNode(i);
|
|
1414
1422
|
var leftLabelNode = this.getLeftLabelNode(i);
|
|
1415
1423
|
var taskbarContainerNode = this.taskbarContainer();
|
|
1416
1424
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
@@ -1962,6 +1970,19 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1962
1970
|
}
|
|
1963
1971
|
}
|
|
1964
1972
|
};
|
|
1973
|
+
ChartRows.prototype.updateResourceTaskbarElement = function (tRow, parentTr) {
|
|
1974
|
+
var cloneElement = tRow.querySelector('.e-taskbar-main-container');
|
|
1975
|
+
addClass([cloneElement], 'collpse-parent-border');
|
|
1976
|
+
var id = tRow.querySelector('.' + cls.taskBarMainContainer).getAttribute('rowUniqueId');
|
|
1977
|
+
var ganttData = this.parent.getRecordByID(id);
|
|
1978
|
+
var zIndex = "";
|
|
1979
|
+
if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
|
|
1980
|
+
zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
|
|
1981
|
+
}
|
|
1982
|
+
var cloneChildElement = cloneElement.cloneNode(true);
|
|
1983
|
+
cloneChildElement.style.zIndex = zIndex;
|
|
1984
|
+
parentTr[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
|
|
1985
|
+
};
|
|
1965
1986
|
ChartRows.prototype.getResourceParent = function (record) {
|
|
1966
1987
|
var chartRows = this.parent.ganttChartModule.getChartRows();
|
|
1967
1988
|
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
@@ -1985,20 +2006,19 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1985
2006
|
parentTrNode[0].childNodes[0].childNodes[0].appendChild(collapseParent);
|
|
1986
2007
|
var tasks = this.parent.dataOperation.setSortedChildTasks(record);
|
|
1987
2008
|
this.parent.dataOperation.updateOverlappingIndex(tasks);
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2009
|
+
var tRow;
|
|
2010
|
+
if (this.parent.enableVirtualization) {
|
|
2011
|
+
for (var i = 0; i < record.childRecords.length; i++) {
|
|
2012
|
+
tRow = this.getGanttChartRow(record.childRecords[i].index, this.parent.flatData[record.childRecords[i].index]);
|
|
2013
|
+
this.updateResourceTaskbarElement(tRow, parentTrNode);
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
else {
|
|
2017
|
+
for (var i = 0; i < chartRows.length; i++) {
|
|
2018
|
+
if (chartRows[i].classList.contains('gridrowtaskId'
|
|
2019
|
+
+ record.ganttProperties.rowUniqueID + 'level' + (record.level + 1))) {
|
|
2020
|
+
this.updateResourceTaskbarElement(chartRows[i], parentTrNode);
|
|
1998
2021
|
}
|
|
1999
|
-
var cloneChildElement = cloneElement.cloneNode(true);
|
|
2000
|
-
cloneChildElement.style.zIndex = zIndex;
|
|
2001
|
-
parentTrNode[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
|
|
2002
2022
|
}
|
|
2003
2023
|
}
|
|
2004
2024
|
parentTrNode[0].childNodes[0].childNodes[0].appendChild([].slice.call(leftLabelNode)[0]);
|
|
@@ -1410,9 +1410,11 @@ var Timeline = /** @class */ (function () {
|
|
|
1410
1410
|
var validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
|
|
1411
1411
|
var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
1412
1412
|
var isChanged = void 0;
|
|
1413
|
+
var taskbarModule = this.parent.editModule.taskbarEditModule;
|
|
1413
1414
|
if (!isNullOrUndefined(maxStartLeft) && ((minStartDate < this.timelineStartDate) ||
|
|
1414
|
-
(!isNullOrUndefined(
|
|
1415
|
-
|
|
1415
|
+
(!isNullOrUndefined(taskbarModule)) && (!isNullOrUndefined(taskbarModule.taskBarEditAction)
|
|
1416
|
+
&& taskbarModule.taskBarEditAction !== 'ProgressResizing' &&
|
|
1417
|
+
taskbarModule.taskBarEditAction !== 'RightResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
1416
1418
|
isChanged = 'prevTimeSpan';
|
|
1417
1419
|
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
1418
1420
|
}
|