@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
|
@@ -3026,17 +3026,15 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3026
3026
|
else {
|
|
3027
3027
|
hierarchicalData = this.parent.dataSource;
|
|
3028
3028
|
}
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
if (
|
|
3032
|
-
|
|
3033
|
-
task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
|
|
3034
|
-
}
|
|
3035
|
-
if (!isNullOrUndefined(_this.parent.taskFields.endDate)) {
|
|
3036
|
-
task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
|
|
3037
|
-
}
|
|
3029
|
+
hierarchicalData.map(function (record) {
|
|
3030
|
+
if (task.ganttProperties.taskId === record[_this.parent.taskFields.id]) {
|
|
3031
|
+
if (!isNullOrUndefined(_this.parent.taskFields.startDate)) {
|
|
3032
|
+
task[_this.parent.taskFields.startDate] = record[_this.parent.taskFields.startDate];
|
|
3038
3033
|
}
|
|
3039
|
-
|
|
3034
|
+
if (!isNullOrUndefined(_this.parent.taskFields.endDate)) {
|
|
3035
|
+
task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3040
3038
|
});
|
|
3041
3039
|
};
|
|
3042
3040
|
TaskProcessor.prototype.getWorkInHour = function (work, workUnit) {
|
|
@@ -3790,12 +3788,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3790
3788
|
durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 60));
|
|
3791
3789
|
break;
|
|
3792
3790
|
default:
|
|
3793
|
-
|
|
3794
|
-
durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 3600));
|
|
3795
|
-
}
|
|
3796
|
-
else {
|
|
3797
|
-
durationInDay = childGanttRecord.ganttProperties.duration;
|
|
3798
|
-
}
|
|
3791
|
+
durationInDay = childGanttRecord.ganttProperties.duration;
|
|
3799
3792
|
}
|
|
3800
3793
|
if (childGanttRecord.hasChildRecords) {
|
|
3801
3794
|
setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
|
|
@@ -3894,7 +3887,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3894
3887
|
else {
|
|
3895
3888
|
taskCount = childLength - milestoneCount;
|
|
3896
3889
|
}
|
|
3897
|
-
var parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
|
|
3890
|
+
var parentProgress = (taskCount > 0 && totalDuration > 0) ? Number((totalProgress / totalDuration).toFixed(2)) : 0;
|
|
3898
3891
|
var parentProp = parentData.ganttProperties;
|
|
3899
3892
|
var milestone = (taskCount === 0) && minStartDate && maxEndDate &&
|
|
3900
3893
|
minStartDate.getTime() === maxEndDate.getTime() ? true : false;
|
|
@@ -5854,7 +5847,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5854
5847
|
*/
|
|
5855
5848
|
Timeline.prototype.changeTimelineSettings = function (newTimeline) {
|
|
5856
5849
|
var _this = this;
|
|
5857
|
-
if (
|
|
5850
|
+
if (this.isZoomToFit) {
|
|
5851
|
+
this.isSingleTier = this.customTimelineSettings.topTier.unit === 'None' || this.customTimelineSettings.bottomTier.unit === 'None' ? true : false;
|
|
5852
|
+
}
|
|
5853
|
+
else if (!this.isZoomIn) {
|
|
5858
5854
|
this.isSingleTier = newTimeline.topTier.unit === 'None' || newTimeline.bottomTier.unit === 'None' ? true : false;
|
|
5859
5855
|
}
|
|
5860
5856
|
var skipProperty = this.isSingleTier ?
|
|
@@ -10871,7 +10867,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10871
10867
|
this.parent.ganttChartModule.tempNextElement = null;
|
|
10872
10868
|
}
|
|
10873
10869
|
var row = this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[index].getAttribute('data-uid'));
|
|
10874
|
-
row
|
|
10870
|
+
if (!isNullOrUndefined(row)) {
|
|
10871
|
+
row.data = data;
|
|
10872
|
+
}
|
|
10875
10873
|
}
|
|
10876
10874
|
};
|
|
10877
10875
|
ChartRows.prototype.getResourceParent = function (record) {
|
|
@@ -13632,6 +13630,7 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
13632
13630
|
if (ganttObj.selectedRowIndex === ganttObj.flatData.indexOf(currentSelectingRecord)) {
|
|
13633
13631
|
return;
|
|
13634
13632
|
}
|
|
13633
|
+
ganttObj.selectionModule.selectRow(ganttObj.flatData.indexOf(currentSelectingRecord), false, true);
|
|
13635
13634
|
}
|
|
13636
13635
|
break;
|
|
13637
13636
|
case 'downArrow':
|
|
@@ -14065,7 +14064,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14065
14064
|
contextMenu: 'shift+F10' //F Key
|
|
14066
14065
|
};
|
|
14067
14066
|
this.focusModule = new FocusModule(this);
|
|
14068
|
-
this.zoomingLevels
|
|
14067
|
+
if (this.zoomingLevels.length === 0) {
|
|
14068
|
+
this.zoomingLevels = this.getZoomingLevels();
|
|
14069
|
+
}
|
|
14069
14070
|
this.resourceFieldsMapping();
|
|
14070
14071
|
if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
|
|
14071
14072
|
this.resourceFields.unit = 'unit';
|
|
@@ -15272,6 +15273,14 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15272
15273
|
this.chartRowsModule.refreshGanttRows();
|
|
15273
15274
|
this.isLoad = false;
|
|
15274
15275
|
break;
|
|
15276
|
+
case 'dayWorkingTime':
|
|
15277
|
+
this.isLoad = true;
|
|
15278
|
+
this.dataOperation.reUpdateGanttData();
|
|
15279
|
+
this.treeGrid.refreshColumns();
|
|
15280
|
+
this.chartRowsModule.initiateTemplates();
|
|
15281
|
+
this.chartRowsModule.refreshGanttRows();
|
|
15282
|
+
this.isLoad = false;
|
|
15283
|
+
break;
|
|
15275
15284
|
case 'addDialogFields':
|
|
15276
15285
|
case 'editDialogFields':
|
|
15277
15286
|
if (this.editModule && this.editModule.dialogModule) {
|
|
@@ -15351,7 +15360,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15351
15360
|
case 'readOnly':
|
|
15352
15361
|
case 'viewType':
|
|
15353
15362
|
case 'taskFields':
|
|
15354
|
-
case 'dayWorkingTime':
|
|
15355
15363
|
case 'allowTaskbarDragAndDrop':
|
|
15356
15364
|
case 'allowTaskbarOverlap':
|
|
15357
15365
|
case 'allowParentDependency':
|
|
@@ -16202,12 +16210,17 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16202
16210
|
var id = ganttData.rowUniqueID;
|
|
16203
16211
|
var task = this.getRecordByID(id);
|
|
16204
16212
|
var isValid = false;
|
|
16205
|
-
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(
|
|
16206
|
-
|
|
16213
|
+
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(record["" + field]) && (value instanceof Date ? value.getTime() !==
|
|
16214
|
+
record["" + field].getTime() : record["" + field] !== value))) {
|
|
16207
16215
|
isValid = true;
|
|
16208
16216
|
}
|
|
16209
16217
|
if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
|
|
16210
|
-
this.
|
|
16218
|
+
if (this.editModule['draggedRecord'] && this.editModule['draggedRecord'].ganttProperties.taskId === ganttData.taskId) {
|
|
16219
|
+
this.editedRecords.splice(0, 0, task);
|
|
16220
|
+
}
|
|
16221
|
+
else {
|
|
16222
|
+
this.editedRecords.push(task);
|
|
16223
|
+
}
|
|
16211
16224
|
if (this.enableImmutableMode) {
|
|
16212
16225
|
this.modifiedRecords.push(task);
|
|
16213
16226
|
}
|
|
@@ -17333,6 +17346,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
17333
17346
|
__decorate([
|
|
17334
17347
|
Complex({}, TimelineSettings)
|
|
17335
17348
|
], Gantt.prototype, "timelineSettings", void 0);
|
|
17349
|
+
__decorate([
|
|
17350
|
+
Property([])
|
|
17351
|
+
], Gantt.prototype, "zoomingLevels", void 0);
|
|
17336
17352
|
__decorate([
|
|
17337
17353
|
Complex({}, SortSettings)
|
|
17338
17354
|
], Gantt.prototype, "sortSettings", void 0);
|
|
@@ -29696,6 +29712,7 @@ var DayMarkers = /** @__PURE__ @class */ (function () {
|
|
|
29696
29712
|
return DayMarkers;
|
|
29697
29713
|
}());
|
|
29698
29714
|
|
|
29715
|
+
/** @hidden */
|
|
29699
29716
|
var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
29700
29717
|
function CriticalPath(parent) {
|
|
29701
29718
|
this.resourceCollectionIds = [];
|
|
@@ -31319,6 +31336,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
31319
31336
|
|
|
31320
31337
|
/**
|
|
31321
31338
|
* Configures columnMenu collection in Gantt.
|
|
31339
|
+
* @hidden
|
|
31322
31340
|
*/
|
|
31323
31341
|
var ColumnMenu$1 = /** @__PURE__ @class */ (function () {
|
|
31324
31342
|
function ColumnMenu$$1(parent) {
|
|
@@ -32595,6 +32613,7 @@ var TemporaryDictionary = /** @__PURE__ @class */ (function () {
|
|
|
32595
32613
|
*/
|
|
32596
32614
|
/**
|
|
32597
32615
|
* `PdfBorders` class used represents the cell border of the PDF grid.
|
|
32616
|
+
* @hidden
|
|
32598
32617
|
*/
|
|
32599
32618
|
var PdfBorders = /** @__PURE__ @class */ (function () {
|
|
32600
32619
|
// Constructor
|
|
@@ -32723,6 +32742,7 @@ var PdfBorders = /** @__PURE__ @class */ (function () {
|
|
|
32723
32742
|
});
|
|
32724
32743
|
return PdfBorders;
|
|
32725
32744
|
}());
|
|
32745
|
+
/** @hidden */
|
|
32726
32746
|
var PdfPaddings = /** @__PURE__ @class */ (function () {
|
|
32727
32747
|
function PdfPaddings(left, right, top, bottom) {
|
|
32728
32748
|
/**
|
|
@@ -33672,9 +33692,7 @@ var PdfTreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
33672
33692
|
return PdfTreeGrid;
|
|
33673
33693
|
}(PdfLayoutElement));
|
|
33674
33694
|
|
|
33675
|
-
|
|
33676
|
-
*
|
|
33677
|
-
*/
|
|
33695
|
+
/**@hidden*/
|
|
33678
33696
|
var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
33679
33697
|
function PdfTreeGridCell(row) {
|
|
33680
33698
|
this.cellWidth = 0;
|
|
@@ -35287,6 +35305,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
35287
35305
|
}
|
|
35288
35306
|
else {
|
|
35289
35307
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
35308
|
+
taskbar.width = taskbar.width - renderWidth;
|
|
35290
35309
|
if (this.isScheduledTask) {
|
|
35291
35310
|
var progressBoundsWidth = 0;
|
|
35292
35311
|
if (this.progressWidth <= renderWidth) {
|
|
@@ -36273,7 +36292,7 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
36273
36292
|
&& this.parent.cloneProjectStartDate.getSeconds() === 0) {
|
|
36274
36293
|
this.parent.cloneProjectStartDate.setHours(8);
|
|
36275
36294
|
}
|
|
36276
|
-
var timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.
|
|
36295
|
+
var timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.timelineModule.timelineStartDate);
|
|
36277
36296
|
var count = isNullOrUndefined(timelineSettings.customTimelineSettings.bottomTier.count) ?
|
|
36278
36297
|
timelineSettings.customTimelineSettings.topTier.count : timelineSettings.customTimelineSettings.bottomTier.count;
|
|
36279
36298
|
var scheduleType = timelineSettings.customTimelineSettings.bottomTier.unit === 'None' ?
|