@syncfusion/ej2-gantt 21.1.35 → 21.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 +22 -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 +47 -28
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +47 -28
- 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 +19 -19
- package/src/gantt/actions/column-menu.d.ts +1 -0
- package/src/gantt/actions/column-menu.js +1 -0
- package/src/gantt/actions/critical-path.d.ts +1 -0
- package/src/gantt/actions/critical-path.js +1 -0
- package/src/gantt/actions/keyboard.js +1 -0
- package/src/gantt/base/gantt-model.d.ts +6 -0
- package/src/gantt/base/gantt.d.ts +1 -0
- package/src/gantt/base/gantt.js +22 -5
- package/src/gantt/base/task-processor.js +10 -17
- package/src/gantt/export/pdf-base/pdf-borders.d.ts +2 -0
- package/src/gantt/export/pdf-base/pdf-borders.js +2 -0
- package/src/gantt/export/pdf-base/pdf-grid-table.d.ts +1 -3
- package/src/gantt/export/pdf-base/pdf-grid-table.js +1 -3
- package/src/gantt/export/pdf-gantt.js +1 -1
- package/src/gantt/export/pdf-taskbar.js +1 -0
- package/src/gantt/models/column.d.ts +4 -4
- package/src/gantt/renderer/chart-rows.js +3 -1
- package/src/gantt/renderer/timeline.js +4 -1
|
@@ -2982,17 +2982,15 @@ class TaskProcessor extends DateProcessor {
|
|
|
2982
2982
|
else {
|
|
2983
2983
|
hierarchicalData = this.parent.dataSource;
|
|
2984
2984
|
}
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
if (
|
|
2988
|
-
|
|
2989
|
-
task[this.parent.taskFields.endDate] = record[this.parent.taskFields.endDate];
|
|
2990
|
-
}
|
|
2991
|
-
if (!isNullOrUndefined(this.parent.taskFields.endDate)) {
|
|
2992
|
-
task[this.parent.taskFields.endDate] = record[this.parent.taskFields.endDate];
|
|
2993
|
-
}
|
|
2985
|
+
hierarchicalData.map((record) => {
|
|
2986
|
+
if (task.ganttProperties.taskId === record[this.parent.taskFields.id]) {
|
|
2987
|
+
if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
|
|
2988
|
+
task[this.parent.taskFields.startDate] = record[this.parent.taskFields.startDate];
|
|
2994
2989
|
}
|
|
2995
|
-
|
|
2990
|
+
if (!isNullOrUndefined(this.parent.taskFields.endDate)) {
|
|
2991
|
+
task[this.parent.taskFields.endDate] = record[this.parent.taskFields.endDate];
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2996
2994
|
});
|
|
2997
2995
|
}
|
|
2998
2996
|
getWorkInHour(work, workUnit) {
|
|
@@ -3743,12 +3741,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3743
3741
|
durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 60));
|
|
3744
3742
|
break;
|
|
3745
3743
|
default:
|
|
3746
|
-
|
|
3747
|
-
durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 3600));
|
|
3748
|
-
}
|
|
3749
|
-
else {
|
|
3750
|
-
durationInDay = childGanttRecord.ganttProperties.duration;
|
|
3751
|
-
}
|
|
3744
|
+
durationInDay = childGanttRecord.ganttProperties.duration;
|
|
3752
3745
|
}
|
|
3753
3746
|
if (childGanttRecord.hasChildRecords) {
|
|
3754
3747
|
setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
|
|
@@ -3847,7 +3840,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3847
3840
|
else {
|
|
3848
3841
|
taskCount = childLength - milestoneCount;
|
|
3849
3842
|
}
|
|
3850
|
-
const parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
|
|
3843
|
+
const parentProgress = (taskCount > 0 && totalDuration > 0) ? Number((totalProgress / totalDuration).toFixed(2)) : 0;
|
|
3851
3844
|
const parentProp = parentData.ganttProperties;
|
|
3852
3845
|
const milestone = (taskCount === 0) && minStartDate && maxEndDate &&
|
|
3853
3846
|
minStartDate.getTime() === maxEndDate.getTime() ? true : false;
|
|
@@ -5793,7 +5786,10 @@ class Timeline {
|
|
|
5793
5786
|
* @private
|
|
5794
5787
|
*/
|
|
5795
5788
|
changeTimelineSettings(newTimeline) {
|
|
5796
|
-
if (
|
|
5789
|
+
if (this.isZoomToFit) {
|
|
5790
|
+
this.isSingleTier = this.customTimelineSettings.topTier.unit === 'None' || this.customTimelineSettings.bottomTier.unit === 'None' ? true : false;
|
|
5791
|
+
}
|
|
5792
|
+
else if (!this.isZoomIn) {
|
|
5797
5793
|
this.isSingleTier = newTimeline.topTier.unit === 'None' || newTimeline.bottomTier.unit === 'None' ? true : false;
|
|
5798
5794
|
}
|
|
5799
5795
|
const skipProperty = this.isSingleTier ?
|
|
@@ -10464,7 +10460,9 @@ class ChartRows extends DateProcessor {
|
|
|
10464
10460
|
this.parent.ganttChartModule.tempNextElement = null;
|
|
10465
10461
|
}
|
|
10466
10462
|
const row = this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[index].getAttribute('data-uid'));
|
|
10467
|
-
row
|
|
10463
|
+
if (!isNullOrUndefined(row)) {
|
|
10464
|
+
row.data = data;
|
|
10465
|
+
}
|
|
10468
10466
|
}
|
|
10469
10467
|
}
|
|
10470
10468
|
getResourceParent(record) {
|
|
@@ -13216,6 +13214,7 @@ class FocusModule {
|
|
|
13216
13214
|
if (ganttObj.selectedRowIndex === ganttObj.flatData.indexOf(currentSelectingRecord)) {
|
|
13217
13215
|
return;
|
|
13218
13216
|
}
|
|
13217
|
+
ganttObj.selectionModule.selectRow(ganttObj.flatData.indexOf(currentSelectingRecord), false, true);
|
|
13219
13218
|
}
|
|
13220
13219
|
break;
|
|
13221
13220
|
case 'downArrow':
|
|
@@ -13633,7 +13632,9 @@ let Gantt = class Gantt extends Component {
|
|
|
13633
13632
|
contextMenu: 'shift+F10' //F Key
|
|
13634
13633
|
};
|
|
13635
13634
|
this.focusModule = new FocusModule(this);
|
|
13636
|
-
this.zoomingLevels
|
|
13635
|
+
if (this.zoomingLevels.length === 0) {
|
|
13636
|
+
this.zoomingLevels = this.getZoomingLevels();
|
|
13637
|
+
}
|
|
13637
13638
|
this.resourceFieldsMapping();
|
|
13638
13639
|
if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
|
|
13639
13640
|
this.resourceFields.unit = 'unit';
|
|
@@ -14837,6 +14838,14 @@ let Gantt = class Gantt extends Component {
|
|
|
14837
14838
|
this.chartRowsModule.refreshGanttRows();
|
|
14838
14839
|
this.isLoad = false;
|
|
14839
14840
|
break;
|
|
14841
|
+
case 'dayWorkingTime':
|
|
14842
|
+
this.isLoad = true;
|
|
14843
|
+
this.dataOperation.reUpdateGanttData();
|
|
14844
|
+
this.treeGrid.refreshColumns();
|
|
14845
|
+
this.chartRowsModule.initiateTemplates();
|
|
14846
|
+
this.chartRowsModule.refreshGanttRows();
|
|
14847
|
+
this.isLoad = false;
|
|
14848
|
+
break;
|
|
14840
14849
|
case 'addDialogFields':
|
|
14841
14850
|
case 'editDialogFields':
|
|
14842
14851
|
if (this.editModule && this.editModule.dialogModule) {
|
|
@@ -14916,7 +14925,6 @@ let Gantt = class Gantt extends Component {
|
|
|
14916
14925
|
case 'readOnly':
|
|
14917
14926
|
case 'viewType':
|
|
14918
14927
|
case 'taskFields':
|
|
14919
|
-
case 'dayWorkingTime':
|
|
14920
14928
|
case 'allowTaskbarDragAndDrop':
|
|
14921
14929
|
case 'allowTaskbarOverlap':
|
|
14922
14930
|
case 'allowParentDependency':
|
|
@@ -15767,12 +15775,17 @@ let Gantt = class Gantt extends Component {
|
|
|
15767
15775
|
const id = ganttData.rowUniqueID;
|
|
15768
15776
|
const task = this.getRecordByID(id);
|
|
15769
15777
|
let isValid = false;
|
|
15770
|
-
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(
|
|
15771
|
-
|
|
15778
|
+
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(record[`${field}`]) && (value instanceof Date ? value.getTime() !==
|
|
15779
|
+
record[`${field}`].getTime() : record[`${field}`] !== value))) {
|
|
15772
15780
|
isValid = true;
|
|
15773
15781
|
}
|
|
15774
15782
|
if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
|
|
15775
|
-
this.
|
|
15783
|
+
if (this.editModule['draggedRecord'] && this.editModule['draggedRecord'].ganttProperties.taskId === ganttData.taskId) {
|
|
15784
|
+
this.editedRecords.splice(0, 0, task);
|
|
15785
|
+
}
|
|
15786
|
+
else {
|
|
15787
|
+
this.editedRecords.push(task);
|
|
15788
|
+
}
|
|
15776
15789
|
if (this.enableImmutableMode) {
|
|
15777
15790
|
this.modifiedRecords.push(task);
|
|
15778
15791
|
}
|
|
@@ -16898,6 +16911,9 @@ __decorate([
|
|
|
16898
16911
|
__decorate([
|
|
16899
16912
|
Complex({}, TimelineSettings)
|
|
16900
16913
|
], Gantt.prototype, "timelineSettings", void 0);
|
|
16914
|
+
__decorate([
|
|
16915
|
+
Property([])
|
|
16916
|
+
], Gantt.prototype, "zoomingLevels", void 0);
|
|
16901
16917
|
__decorate([
|
|
16902
16918
|
Complex({}, SortSettings)
|
|
16903
16919
|
], Gantt.prototype, "sortSettings", void 0);
|
|
@@ -29131,6 +29147,7 @@ class DayMarkers {
|
|
|
29131
29147
|
}
|
|
29132
29148
|
}
|
|
29133
29149
|
|
|
29150
|
+
/** @hidden */
|
|
29134
29151
|
class CriticalPath {
|
|
29135
29152
|
constructor(parent) {
|
|
29136
29153
|
this.resourceCollectionIds = [];
|
|
@@ -30735,6 +30752,7 @@ class ExcelExport$1 {
|
|
|
30735
30752
|
|
|
30736
30753
|
/**
|
|
30737
30754
|
* Configures columnMenu collection in Gantt.
|
|
30755
|
+
* @hidden
|
|
30738
30756
|
*/
|
|
30739
30757
|
class ColumnMenu$1 {
|
|
30740
30758
|
constructor(parent) {
|
|
@@ -31980,6 +31998,7 @@ class TemporaryDictionary {
|
|
|
31980
31998
|
*/
|
|
31981
31999
|
/**
|
|
31982
32000
|
* `PdfBorders` class used represents the cell border of the PDF grid.
|
|
32001
|
+
* @hidden
|
|
31983
32002
|
*/
|
|
31984
32003
|
class PdfBorders {
|
|
31985
32004
|
// Properties
|
|
@@ -32079,6 +32098,7 @@ class PdfBorders {
|
|
|
32079
32098
|
this.bottomPen = defaultBorderPenBottom;
|
|
32080
32099
|
}
|
|
32081
32100
|
}
|
|
32101
|
+
/** @hidden */
|
|
32082
32102
|
class PdfPaddings {
|
|
32083
32103
|
constructor(left, right, top, bottom) {
|
|
32084
32104
|
/**
|
|
@@ -32949,9 +32969,7 @@ class PdfTreeGrid extends PdfLayoutElement {
|
|
|
32949
32969
|
}
|
|
32950
32970
|
}
|
|
32951
32971
|
|
|
32952
|
-
|
|
32953
|
-
*
|
|
32954
|
-
*/
|
|
32972
|
+
/**@hidden*/
|
|
32955
32973
|
class PdfTreeGridCell {
|
|
32956
32974
|
constructor(row) {
|
|
32957
32975
|
this.cellWidth = 0;
|
|
@@ -34447,6 +34465,7 @@ class PdfGanttTaskbarCollection {
|
|
|
34447
34465
|
}
|
|
34448
34466
|
else {
|
|
34449
34467
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
34468
|
+
taskbar.width = taskbar.width - renderWidth;
|
|
34450
34469
|
if (this.isScheduledTask) {
|
|
34451
34470
|
let progressBoundsWidth = 0;
|
|
34452
34471
|
if (this.progressWidth <= renderWidth) {
|
|
@@ -35389,7 +35408,7 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
35389
35408
|
&& this.parent.cloneProjectStartDate.getSeconds() === 0) {
|
|
35390
35409
|
this.parent.cloneProjectStartDate.setHours(8);
|
|
35391
35410
|
}
|
|
35392
|
-
const timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.
|
|
35411
|
+
const timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.timelineModule.timelineStartDate);
|
|
35393
35412
|
const count = isNullOrUndefined(timelineSettings.customTimelineSettings.bottomTier.count) ?
|
|
35394
35413
|
timelineSettings.customTimelineSettings.topTier.count : timelineSettings.customTimelineSettings.bottomTier.count;
|
|
35395
35414
|
const scheduleType = timelineSettings.customTimelineSettings.bottomTier.unit === 'None' ?
|