@syncfusion/ej2-gantt 23.1.44 → 23.2.5
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 +52 -30
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +90 -57
- 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 +20 -20
- package/src/gantt/actions/edit.js +19 -0
- package/src/gantt/actions/toolbar.js +3 -0
- package/src/gantt/base/date-processor.js +1 -1
- package/src/gantt/base/gantt.js +1 -0
- package/src/gantt/base/tree-grid.js +5 -3
- package/src/gantt/export/export-helper.js +11 -11
- package/src/gantt/export/pdf-gantt.js +6 -3
- package/src/gantt/export/pdf-taskbar.js +3 -3
- package/src/gantt/export/pdf-timeline.js +12 -6
- package/src/gantt/renderer/timeline.js +3 -4
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap5-dark.css +2 -1
- package/styles/bootstrap5.css +2 -1
- package/styles/fabric-dark.css +5 -0
- package/styles/fluent-dark.css +2 -1
- package/styles/fluent.css +2 -1
- package/styles/gantt/bootstrap-dark.css +5 -0
- package/styles/gantt/bootstrap5-dark.css +2 -1
- package/styles/gantt/bootstrap5.css +2 -1
- package/styles/gantt/fabric-dark.css +5 -0
- package/styles/gantt/fluent-dark.css +2 -1
- package/styles/gantt/fluent.css +2 -1
- package/styles/gantt/highcontrast.css +5 -0
- package/styles/gantt/tailwind-dark.css +2 -1
- package/styles/gantt/tailwind.css +2 -1
- package/styles/highcontrast.css +5 -0
- package/styles/tailwind-dark.css +2 -1
- package/styles/tailwind.css +2 -1
|
@@ -271,7 +271,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
271
271
|
if (!this.parent.includeWeekend) {
|
|
272
272
|
var tempDate = new Date(cloneStartDate.getTime());
|
|
273
273
|
cloneStartDate = this.getNextWorkingDay(cloneStartDate);
|
|
274
|
-
if (tempDate.getTime() !== cloneStartDate.getTime()) {
|
|
274
|
+
if (tempDate.getTime() !== cloneStartDate.getTime() && !validateAsMilestone) {
|
|
275
275
|
this.setTime(startTime, cloneStartDate);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -7482,10 +7482,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
7482
7482
|
var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
7483
7483
|
var isChanged = void 0;
|
|
7484
7484
|
var taskbarModule = this.parent.editModule.taskbarEditModule;
|
|
7485
|
-
if (!isNullOrUndefined(maxStartLeft) && ((
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
taskbarModule.taskBarEditAction !== 'RightResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
7485
|
+
if (!isNullOrUndefined(maxStartLeft) && ((!isNullOrUndefined(taskbarModule)) && (!isNullOrUndefined(taskbarModule.taskBarEditAction)
|
|
7486
|
+
&& taskbarModule.taskBarEditAction !== 'ProgressResizing' &&
|
|
7487
|
+
taskbarModule.taskBarEditAction !== 'RightResizing' && taskbarModule.taskBarEditAction !== 'LeftResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
7489
7488
|
isChanged = 'prevTimeSpan';
|
|
7490
7489
|
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
7491
7490
|
}
|
|
@@ -7750,7 +7749,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7750
7749
|
this.parent.treeGrid.loadChildOnDemand = this.parent.loadChildOnDemand;
|
|
7751
7750
|
this.parent.treeGrid['isFromGantt'] = true;
|
|
7752
7751
|
this.parent.treeGrid.parentIdMapping = this.parent.taskFields.parentID;
|
|
7753
|
-
|
|
7752
|
+
if (this.parent.taskFields.parentID) {
|
|
7753
|
+
this.parent.treeGrid.idMapping = this.parent.taskFields.id;
|
|
7754
|
+
}
|
|
7754
7755
|
this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
|
|
7755
7756
|
this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
|
|
7756
7757
|
this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
|
|
@@ -7791,7 +7792,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7791
7792
|
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
7792
7793
|
}
|
|
7793
7794
|
this.parent.treeGrid.height =
|
|
7794
|
-
this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'] - 19;
|
|
7795
|
+
this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'] - (this.parent.flatData.length == 0 ? 0 : 19);
|
|
7795
7796
|
};
|
|
7796
7797
|
GanttTreeGrid.prototype.getContentDiv = function () {
|
|
7797
7798
|
return this.treeGridElement.querySelector('.e-content');
|
|
@@ -8450,7 +8451,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
8450
8451
|
*/
|
|
8451
8452
|
GanttTreeGrid.prototype.composeIDColumn = function (column) {
|
|
8452
8453
|
var isProjectView = this.parent.viewType === 'ProjectView';
|
|
8453
|
-
var lengthDataSource = this.parent.dataSource['length'];
|
|
8454
|
+
var lengthDataSource = this.parent.dataSource ? this.parent.dataSource['length'] : 0;
|
|
8454
8455
|
var taskIDName;
|
|
8455
8456
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
8456
8457
|
if (this.parent.isLocaleChanged) {
|
|
@@ -15947,6 +15948,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15947
15948
|
this.treeGridModule.treeGridColumns = [];
|
|
15948
15949
|
this.treeGridModule.validateGanttColumns();
|
|
15949
15950
|
this.treeGrid.columns = this.treeGridModule.treeGridColumns;
|
|
15951
|
+
this.treeGrid.grid.columns = this.treeGridModule.treeGridColumns;
|
|
15950
15952
|
this.chartRowsModule.initiateTemplates();
|
|
15951
15953
|
this.timelineModule.updateChartByNewTimeline();
|
|
15952
15954
|
break;
|
|
@@ -19138,8 +19140,8 @@ var __extends$20 = (undefined && undefined.__extends) || (function () {
|
|
|
19138
19140
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19139
19141
|
};
|
|
19140
19142
|
})();
|
|
19141
|
-
var __assign$
|
|
19142
|
-
__assign$
|
|
19143
|
+
var __assign$2 = (undefined && undefined.__assign) || function () {
|
|
19144
|
+
__assign$2 = Object.assign || function(t) {
|
|
19143
19145
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19144
19146
|
s = arguments[i];
|
|
19145
19147
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -19147,7 +19149,7 @@ var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
|
19147
19149
|
}
|
|
19148
19150
|
return t;
|
|
19149
19151
|
};
|
|
19150
|
-
return __assign$
|
|
19152
|
+
return __assign$2.apply(this, arguments);
|
|
19151
19153
|
};
|
|
19152
19154
|
/**
|
|
19153
19155
|
* File for handling taskbar editing operation in Gantt.
|
|
@@ -19979,7 +19981,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19979
19981
|
var differenceWidth = 0;
|
|
19980
19982
|
if (this.taskBarEditElement.classList.contains('e-segmented-taskbar') &&
|
|
19981
19983
|
!this.taskBarEditElement.classList.contains('e-segment-first')) {
|
|
19982
|
-
var segments = this.taskBarEditRecord.ganttProperties.segments.map(function (e) { return (__assign$
|
|
19984
|
+
var segments = this.taskBarEditRecord.ganttProperties.segments.map(function (e) { return (__assign$2({}, e)); });
|
|
19983
19985
|
var segment = segments[this.segmentIndex];
|
|
19984
19986
|
if (this.mouseDownX > this.mouseMoveX) {
|
|
19985
19987
|
differenceWidth = isNullOrUndefined(this.previousMouseMove) ?
|
|
@@ -20128,7 +20130,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20128
20130
|
}
|
|
20129
20131
|
};
|
|
20130
20132
|
TaskbarEdit.prototype.enableSplitTaskLeftResize = function (item) {
|
|
20131
|
-
var segments = this.taskBarEditRecord.ganttProperties.segments.map(function (e) { return (__assign$
|
|
20133
|
+
var segments = this.taskBarEditRecord.ganttProperties.segments.map(function (e) { return (__assign$2({}, e)); });
|
|
20132
20134
|
var segment = segments[this.segmentIndex];
|
|
20133
20135
|
var differenceWidth = 0;
|
|
20134
20136
|
//when decrease the left and increase the width
|
|
@@ -20263,7 +20265,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20263
20265
|
var item = this.taskBarEditRecord.ganttProperties;
|
|
20264
20266
|
var differenceWidth = 0;
|
|
20265
20267
|
if (this.taskBarEditElement.classList.contains('e-segmented-taskbar')) {
|
|
20266
|
-
var segments = this.taskBarEditRecord.ganttProperties.segments.map(function (e) { return (__assign$
|
|
20268
|
+
var segments = this.taskBarEditRecord.ganttProperties.segments.map(function (e) { return (__assign$2({}, e)); });
|
|
20267
20269
|
var segment = segments[this.segmentIndex];
|
|
20268
20270
|
if (this.mouseDownX > this.mouseMoveX) {
|
|
20269
20271
|
if (this.mouseMoveX > (item.left + segment.left) && (this.mouseDownX - this.mouseMoveX) > 3) {
|
|
@@ -24771,6 +24773,17 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
24771
24773
|
return ConnectorLineEdit;
|
|
24772
24774
|
}());
|
|
24773
24775
|
|
|
24776
|
+
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
24777
|
+
__assign$1 = Object.assign || function(t) {
|
|
24778
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24779
|
+
s = arguments[i];
|
|
24780
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
24781
|
+
t[p] = s[p];
|
|
24782
|
+
}
|
|
24783
|
+
return t;
|
|
24784
|
+
};
|
|
24785
|
+
return __assign$1.apply(this, arguments);
|
|
24786
|
+
};
|
|
24774
24787
|
/**
|
|
24775
24788
|
* The Edit Module is used to handle editing actions.
|
|
24776
24789
|
*
|
|
@@ -25990,7 +26003,15 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25990
26003
|
if (args.action && args.action === 'DrawConnectorLine') {
|
|
25991
26004
|
eventArgs.action = 'DrawConnectorLine';
|
|
25992
26005
|
}
|
|
26006
|
+
var ganttObj = this.parent;
|
|
26007
|
+
var currentBaselineStart = __assign$1({}, eventArgs.data.ganttProperties.baselineStartDate);
|
|
26008
|
+
var currentBaselineEnd = __assign$1({}, eventArgs.data.ganttProperties.baselineEndDate);
|
|
25993
26009
|
this.parent.trigger('actionBegin', eventArgs, function (eventArg) {
|
|
26010
|
+
if (currentBaselineStart != eventArg.data["ganttProperties"].baselineStartDate
|
|
26011
|
+
|| currentBaselineEnd != eventArg.data["ganttProperties"].baselineEndDate) {
|
|
26012
|
+
ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(eventArg.data['ganttProperties']), eventArg.data['ganttProperties'], true);
|
|
26013
|
+
ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(eventArg.data['ganttProperties']), eventArg.data['ganttProperties'], true);
|
|
26014
|
+
}
|
|
25994
26015
|
if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
25995
26016
|
_this.parent.showMaskRow();
|
|
25996
26017
|
}
|
|
@@ -29922,6 +29943,9 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
|
|
|
29922
29943
|
this.toolbar.isReact = this.parent.isReact;
|
|
29923
29944
|
this.toolbar.on('render-react-toolbar-template', this.addReactToolbarPortals, this);
|
|
29924
29945
|
this.toolbar.appendTo(this.element);
|
|
29946
|
+
if (this.parent.treeGrid.grid && this.parent.isReact) {
|
|
29947
|
+
this.parent.treeGrid.grid.portals = this.parent.portals;
|
|
29948
|
+
}
|
|
29925
29949
|
var cancelItem = this.element.querySelector('#' + this.parent.element.id + '_cancel');
|
|
29926
29950
|
var updateItem = this.element.querySelector('#' + this.parent.element.id + '_update');
|
|
29927
29951
|
if (cancelItem) {
|
|
@@ -36007,10 +36031,10 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
36007
36031
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
36008
36032
|
this.parent.updatedConnectorLineCollection.forEach(function (data) {
|
|
36009
36033
|
var predecessor = _this.gantt.predecessor.add();
|
|
36010
|
-
predecessor.parentLeft =
|
|
36011
|
-
predecessor.childLeft =
|
|
36012
|
-
predecessor.parentWidth =
|
|
36013
|
-
predecessor.childWidth =
|
|
36034
|
+
predecessor.parentLeft = data.parentLeft;
|
|
36035
|
+
predecessor.childLeft = data.childLeft;
|
|
36036
|
+
predecessor.parentWidth = data.parentWidth;
|
|
36037
|
+
predecessor.childWidth = data.childWidth;
|
|
36014
36038
|
predecessor.parentIndex = data.parentIndex;
|
|
36015
36039
|
predecessor.childIndex = data.childIndex;
|
|
36016
36040
|
predecessor.rowHeight = data.rowHeight;
|
|
@@ -36095,8 +36119,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
36095
36119
|
flatData.forEach(function (data) {
|
|
36096
36120
|
var taskbar = _this.gantt.taskbar.add();
|
|
36097
36121
|
var ganttProp = data.ganttProperties;
|
|
36098
|
-
taskbar.left =
|
|
36099
|
-
taskbar.width =
|
|
36122
|
+
taskbar.left = ganttProp.left;
|
|
36123
|
+
taskbar.width = ganttProp.width;
|
|
36100
36124
|
if (taskbar.left < 0) {
|
|
36101
36125
|
taskbar.width = taskbar.width + taskbar.left;
|
|
36102
36126
|
taskbar.left = 0;
|
|
@@ -36137,8 +36161,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
36137
36161
|
taskbar.isMilestone = ganttProp.isMilestone;
|
|
36138
36162
|
taskbar.baselineStartDate = ganttProp.baselineStartDate;
|
|
36139
36163
|
taskbar.baselineEndDate = ganttProp.baselineEndDate;
|
|
36140
|
-
taskbar.baselineLeft =
|
|
36141
|
-
taskbar.baselineWidth =
|
|
36164
|
+
taskbar.baselineLeft = ganttProp.baselineLeft;
|
|
36165
|
+
taskbar.baselineWidth = ganttProp.baselineWidth;
|
|
36142
36166
|
taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.milestoneColor);
|
|
36143
36167
|
taskbar.isParentTask = data.hasChildRecords;
|
|
36144
36168
|
if (ganttProp.isMilestone) {
|
|
@@ -36154,9 +36178,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
36154
36178
|
taskbar.taskLabel = data[_this.parent.labelSettings.taskLabel].toString();
|
|
36155
36179
|
}
|
|
36156
36180
|
var reduceLeft = ganttProp.isMilestone ? Math.floor(_this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
|
|
36157
|
-
taskbar.rightTaskLabel.left =
|
|
36181
|
+
taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
|
|
36158
36182
|
taskbar.fontFamily = _this.ganttStyle.fontFamily;
|
|
36159
|
-
taskbar.progressWidth =
|
|
36183
|
+
taskbar.progressWidth = ganttProp.progressWidth;
|
|
36160
36184
|
taskbar.labelColor = new PdfColor(_this.ganttStyle.label.fontColor);
|
|
36161
36185
|
taskbar.progressFontColor = new PdfColor(_this.ganttStyle.taskbar.progressFontColor);
|
|
36162
36186
|
if (taskbar.isParentTask) {
|
|
@@ -36480,8 +36504,8 @@ var ExportValueFormatter = /** @__PURE__ @class */ (function () {
|
|
|
36480
36504
|
return ExportValueFormatter;
|
|
36481
36505
|
}());
|
|
36482
36506
|
|
|
36483
|
-
var __assign$
|
|
36484
|
-
__assign$
|
|
36507
|
+
var __assign$4 = (undefined && undefined.__assign) || function () {
|
|
36508
|
+
__assign$4 = Object.assign || function(t) {
|
|
36485
36509
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
36486
36510
|
s = arguments[i];
|
|
36487
36511
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -36489,7 +36513,7 @@ var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
|
36489
36513
|
}
|
|
36490
36514
|
return t;
|
|
36491
36515
|
};
|
|
36492
|
-
return __assign$
|
|
36516
|
+
return __assign$4.apply(this, arguments);
|
|
36493
36517
|
};
|
|
36494
36518
|
/**
|
|
36495
36519
|
* @hidden
|
|
@@ -36544,7 +36568,8 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36544
36568
|
//code for while current pdf page is exceed
|
|
36545
36569
|
if (yPoint > pageSize.height) {
|
|
36546
36570
|
page = this.GetNextPage(page);
|
|
36547
|
-
page['contentWidth'] =
|
|
36571
|
+
page['contentWidth'] = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36572
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pointToPixel(detail.endPoint - detail.startPoint) : detail.endPoint - detail.startPoint;
|
|
36548
36573
|
taskGraphics = page.graphics;
|
|
36549
36574
|
startPoint.y = 0;
|
|
36550
36575
|
if (this.parent.pdfExportModule.gantt.enableHeader) {
|
|
@@ -36572,7 +36597,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36572
36597
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
36573
36598
|
var isLabelString = false;
|
|
36574
36599
|
var updatedWidth;
|
|
36575
|
-
if (/^[a-zA-Z]/.test(this.taskLabel)) {
|
|
36600
|
+
if (!isNullOrUndefined(this.taskLabel) && (/^[a-zA-Z]/.test(this.taskLabel))) {
|
|
36576
36601
|
isLabelString = true;
|
|
36577
36602
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
36578
36603
|
}
|
|
@@ -36593,7 +36618,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36593
36618
|
//Task start and end date both are in the range of header split up start and end date
|
|
36594
36619
|
if (detail.startDate <= startDate && endDate <= detail.endDate) {
|
|
36595
36620
|
if (!this.isStartPoint) {
|
|
36596
|
-
this.taskStartPoint = __assign$
|
|
36621
|
+
this.taskStartPoint = __assign$4({}, startPoint);
|
|
36597
36622
|
this.isStartPoint = true;
|
|
36598
36623
|
}
|
|
36599
36624
|
if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
|
|
@@ -36622,7 +36647,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36622
36647
|
//Task start date is in the range of header split up start and end date
|
|
36623
36648
|
else if (detail.startDate <= startDate && detail.endDate >= startDate && (endDate >= detail.endDate)) {
|
|
36624
36649
|
if (!this.isStartPoint) {
|
|
36625
|
-
this.taskStartPoint = __assign$
|
|
36650
|
+
this.taskStartPoint = __assign$4({}, startPoint);
|
|
36626
36651
|
this.isStartPoint = true;
|
|
36627
36652
|
}
|
|
36628
36653
|
var renderWidth = 0;
|
|
@@ -36638,7 +36663,6 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36638
36663
|
taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
|
|
36639
36664
|
}
|
|
36640
36665
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
36641
|
-
taskbar.width = taskbar.width - renderWidth;
|
|
36642
36666
|
if (this.isScheduledTask) {
|
|
36643
36667
|
var progressBoundsWidth = 0;
|
|
36644
36668
|
if (this.progressWidth <= renderWidth) {
|
|
@@ -36665,7 +36689,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36665
36689
|
//Task end date is in the range of header split up start and end date
|
|
36666
36690
|
else if (endDate <= detail.endDate && detail.startDate <= endDate && !this.isCompleted) {
|
|
36667
36691
|
if (!this.isStartPoint) {
|
|
36668
|
-
this.taskStartPoint = __assign$
|
|
36692
|
+
this.taskStartPoint = __assign$4({}, startPoint);
|
|
36669
36693
|
this.isStartPoint = true;
|
|
36670
36694
|
}
|
|
36671
36695
|
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
@@ -36689,7 +36713,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36689
36713
|
//So the task is takes entire width of page.
|
|
36690
36714
|
else if (startDate < detail.startDate && endDate > detail.endDate) {
|
|
36691
36715
|
if (!this.isStartPoint) {
|
|
36692
|
-
this.taskStartPoint = __assign$
|
|
36716
|
+
this.taskStartPoint = __assign$4({}, startPoint);
|
|
36693
36717
|
this.isStartPoint = true;
|
|
36694
36718
|
}
|
|
36695
36719
|
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
@@ -36879,7 +36903,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
36879
36903
|
if (detail.startDate <= this.startDate && this.startDate <= detail.endDate) {
|
|
36880
36904
|
var taskGraphics = page.graphics;
|
|
36881
36905
|
var pageIndex = page.section.indexOf(page);
|
|
36882
|
-
this.taskStartPoint = __assign$
|
|
36906
|
+
this.taskStartPoint = __assign$4({}, startPoint);
|
|
36883
36907
|
var milestonePen = new PdfPen(this.milestoneColor);
|
|
36884
36908
|
var adjustHeightforBaselineMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 3.0));
|
|
36885
36909
|
var adjustHeightforMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
|
|
@@ -36925,7 +36949,8 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36925
36949
|
* @returns {void}
|
|
36926
36950
|
*/
|
|
36927
36951
|
PdfTimeline.prototype.drawTimeline = function (page, startPoint, detail) {
|
|
36928
|
-
var remainWidth =
|
|
36952
|
+
var remainWidth = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36953
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pointToPixel(Math.floor(detail.totalWidth)) : Math.floor(detail.totalWidth);
|
|
36929
36954
|
var renderWidth = 0;
|
|
36930
36955
|
this.topTierPoint.x = startPoint.x;
|
|
36931
36956
|
this.topTierPoint.y = startPoint.y;
|
|
@@ -36953,7 +36978,8 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36953
36978
|
//Primary header Event Arguments
|
|
36954
36979
|
/* eslint-disable-next-line */
|
|
36955
36980
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
|
|
36956
|
-
this.topTierPoint.x +=
|
|
36981
|
+
this.topTierPoint.x += (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36982
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? renderWidth : pixelToPoint(renderWidth);
|
|
36957
36983
|
remainWidth -= renderWidth;
|
|
36958
36984
|
if (isCompleted) {
|
|
36959
36985
|
this.topTierIndex++;
|
|
@@ -36979,7 +37005,8 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
36979
37005
|
//Secondary header Event Arguments
|
|
36980
37006
|
/* eslint-disable-next-line */
|
|
36981
37007
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
|
|
36982
|
-
this.bottomTierPoint.x = this.
|
|
37008
|
+
this.bottomTierPoint.x = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
37009
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? this.bottomTierPoint.x + width : this.bottomTierPoint.x + pixelToPoint(width);
|
|
36983
37010
|
remainWidth -= width;
|
|
36984
37011
|
secondHeader.completedWidth = width;
|
|
36985
37012
|
if (isCompleted) {
|
|
@@ -37010,7 +37037,8 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
37010
37037
|
//Primary header Event Arguments
|
|
37011
37038
|
/* eslint-disable-next-line */
|
|
37012
37039
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
|
|
37013
|
-
this.topTierPoint.x +=
|
|
37040
|
+
this.topTierPoint.x += (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
37041
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pHeader.completedWidth : pixelToPoint(pHeader.completedWidth);
|
|
37014
37042
|
}
|
|
37015
37043
|
}
|
|
37016
37044
|
}
|
|
@@ -37023,7 +37051,8 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
37023
37051
|
//Secondary header Event Arguments
|
|
37024
37052
|
/* eslint-disable-next-line */
|
|
37025
37053
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
|
|
37026
|
-
this.bottomTierPoint.x = this.
|
|
37054
|
+
this.bottomTierPoint.x = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
37055
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? this.bottomTierPoint.x + secondHeader.width : this.bottomTierPoint.x + pixelToPoint(secondHeader.width);
|
|
37027
37056
|
}
|
|
37028
37057
|
}
|
|
37029
37058
|
}
|
|
@@ -37070,7 +37099,8 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
37070
37099
|
var e = eventArgs.timelineCell;
|
|
37071
37100
|
var rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
|
|
37072
37101
|
var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
37073
|
-
graphics.drawRectangle(rectPen, rectBrush, x, y,
|
|
37102
|
+
graphics.drawRectangle(rectPen, rectBrush, x, y, (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
37103
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? width : pixelToPoint(width), pixelToPoint(height));
|
|
37074
37104
|
if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
|
|
37075
37105
|
graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
|
|
37076
37106
|
}
|
|
@@ -37093,8 +37123,8 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
37093
37123
|
return PdfTimeline;
|
|
37094
37124
|
}());
|
|
37095
37125
|
|
|
37096
|
-
var __assign$
|
|
37097
|
-
__assign$
|
|
37126
|
+
var __assign$5 = (undefined && undefined.__assign) || function () {
|
|
37127
|
+
__assign$5 = Object.assign || function(t) {
|
|
37098
37128
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
37099
37129
|
s = arguments[i];
|
|
37100
37130
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -37102,7 +37132,7 @@ var __assign$4 = (undefined && undefined.__assign) || function () {
|
|
|
37102
37132
|
}
|
|
37103
37133
|
return t;
|
|
37104
37134
|
};
|
|
37105
|
-
return __assign$
|
|
37135
|
+
return __assign$5.apply(this, arguments);
|
|
37106
37136
|
};
|
|
37107
37137
|
/**
|
|
37108
37138
|
* @hidden
|
|
@@ -37262,8 +37292,8 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
|
|
|
37262
37292
|
/* eslint-disable-next-line */
|
|
37263
37293
|
var point1, point2, point3, point4, point5, point6;
|
|
37264
37294
|
point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
|
|
37265
|
-
var parentTaskpoint = __assign$
|
|
37266
|
-
var childTaskpoint = __assign$
|
|
37295
|
+
var parentTaskpoint = __assign$5({}, parentTask.taskStartPoint);
|
|
37296
|
+
var childTaskpoint = __assign$5({}, childTask.taskStartPoint);
|
|
37267
37297
|
parentY = parentTaskpoint.y + parentPageData.startPoint.y;
|
|
37268
37298
|
childY = childTaskpoint.y + childPageData.startPoint.y;
|
|
37269
37299
|
var ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
|
|
@@ -37420,9 +37450,9 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
|
|
|
37420
37450
|
PdfGanttPredecessor.prototype.drawLine = function (page, startPoint, endPoint) {
|
|
37421
37451
|
var pdfPages = this.pdfGantt.result.page.section.getPages();
|
|
37422
37452
|
var graphics = page.graphics;
|
|
37423
|
-
var newEndPoint = __assign$
|
|
37424
|
-
var newStartPoint = __assign$
|
|
37425
|
-
var checkStartPoint = __assign$
|
|
37453
|
+
var newEndPoint = __assign$5({}, endPoint);
|
|
37454
|
+
var newStartPoint = __assign$5({}, endPoint);
|
|
37455
|
+
var checkStartPoint = __assign$5({}, endPoint);
|
|
37426
37456
|
var pageData = this.pdfGantt.pdfPageDetail[page.section.indexOf(page) - this.pdfGantt.chartPageIndex];
|
|
37427
37457
|
var pageRect = new RectangleF(pageData.startPoint.x, pageData.startPoint.y, pageData.width, pageData.height);
|
|
37428
37458
|
var startPointCheck = this.contains(pageRect, startPoint.x, startPoint.y);
|
|
@@ -37550,8 +37580,8 @@ var __extends$23 = (undefined && undefined.__extends) || (function () {
|
|
|
37550
37580
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
37551
37581
|
};
|
|
37552
37582
|
})();
|
|
37553
|
-
var __assign$
|
|
37554
|
-
__assign$
|
|
37583
|
+
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
37584
|
+
__assign$3 = Object.assign || function(t) {
|
|
37555
37585
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
37556
37586
|
s = arguments[i];
|
|
37557
37587
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -37559,7 +37589,7 @@ var __assign$2 = (undefined && undefined.__assign) || function () {
|
|
|
37559
37589
|
}
|
|
37560
37590
|
return t;
|
|
37561
37591
|
};
|
|
37562
|
-
return __assign$
|
|
37592
|
+
return __assign$3.apply(this, arguments);
|
|
37563
37593
|
};
|
|
37564
37594
|
/**
|
|
37565
37595
|
*
|
|
@@ -37632,10 +37662,12 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
37632
37662
|
}
|
|
37633
37663
|
var detail = {};
|
|
37634
37664
|
var range = [];
|
|
37635
|
-
var convertedWidth =
|
|
37665
|
+
var convertedWidth = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
37666
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pixelToPoint(this.chartHeader.bottomTierCellWidth) : this.chartHeader.bottomTierCellWidth;
|
|
37636
37667
|
var width = 0;
|
|
37637
37668
|
if (this.chartHeader.bottomTierCellWidth !== 0) {
|
|
37638
|
-
width = (
|
|
37669
|
+
width = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
37670
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? (Math.floor(pageWidth / convertedWidth) * convertedWidth) : (Math.floor(pageWidth / convertedWidth) * convertedWidth) + 5;
|
|
37639
37671
|
}
|
|
37640
37672
|
range[0] = point;
|
|
37641
37673
|
if (headerWidth - point <= width) {
|
|
@@ -37752,7 +37784,8 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
37752
37784
|
var pageData;
|
|
37753
37785
|
this.headerDetails.forEach(function (detail, index) {
|
|
37754
37786
|
var page = _this.result.page.section.getPages()[_this.startPageIndex];
|
|
37755
|
-
page['contentWidth'] =
|
|
37787
|
+
page['contentWidth'] = (_this.parent.pdfExportModule && _this.parent.pdfExportModule.helper.exportProps && _this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
37788
|
+
_this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pointToPixel(_this.headerDetails[index].endPoint - _this.headerDetails[index].startPoint) : _this.headerDetails[index].endPoint - _this.headerDetails[index].startPoint;
|
|
37756
37789
|
_this.chartHeader.drawTimeline(page, _this.startPoint, detail);
|
|
37757
37790
|
taskbarPoint.y = taskbarPoint.y + pixelToPoint(_this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
|
|
37758
37791
|
pageStartX = taskbarPoint.x;
|
|
@@ -37781,7 +37814,7 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
37781
37814
|
pageData = {};
|
|
37782
37815
|
pageData.height = cumulativeHeight;
|
|
37783
37816
|
pageData.pageStartX = pageStartX;
|
|
37784
|
-
pageData.startPoint = __assign$
|
|
37817
|
+
pageData.startPoint = __assign$3({}, pagePoint);
|
|
37785
37818
|
pageData.width = pixelToPoint(detail.totalWidth);
|
|
37786
37819
|
_this.pdfPageDetail.push(pageData);
|
|
37787
37820
|
pagePoint.y += pageData.height;
|
|
@@ -37803,7 +37836,7 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
37803
37836
|
pageData = {};
|
|
37804
37837
|
pageData.height = cumulativeHeight;
|
|
37805
37838
|
pageData.pageStartX = pageStartX;
|
|
37806
|
-
pageData.startPoint = __assign$
|
|
37839
|
+
pageData.startPoint = __assign$3({}, pagePoint);
|
|
37807
37840
|
pageData.width = pixelToPoint(detail.totalWidth);
|
|
37808
37841
|
_this.pdfPageDetail.push(pageData);
|
|
37809
37842
|
pagePoint.x += pageData.width;
|