@syncfusion/ej2-gantt 23.1.44 → 23.2.4
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 +11 -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 +43 -22
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +81 -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 +20 -20
- package/src/gantt/actions/edit.js +19 -0
- package/src/gantt/actions/toolbar.js +3 -0
- package/src/gantt/base/gantt.js +1 -0
- 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/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
|
@@ -15502,6 +15502,7 @@ let Gantt = class Gantt extends Component {
|
|
|
15502
15502
|
this.treeGridModule.treeGridColumns = [];
|
|
15503
15503
|
this.treeGridModule.validateGanttColumns();
|
|
15504
15504
|
this.treeGrid.columns = this.treeGridModule.treeGridColumns;
|
|
15505
|
+
this.treeGrid.grid.columns = this.treeGridModule.treeGridColumns;
|
|
15505
15506
|
this.chartRowsModule.initiateTemplates();
|
|
15506
15507
|
this.timelineModule.updateChartByNewTimeline();
|
|
15507
15508
|
break;
|
|
@@ -25456,7 +25457,15 @@ class Edit$2 {
|
|
|
25456
25457
|
if (args.action && args.action === 'DrawConnectorLine') {
|
|
25457
25458
|
eventArgs.action = 'DrawConnectorLine';
|
|
25458
25459
|
}
|
|
25460
|
+
const ganttObj = this.parent;
|
|
25461
|
+
const currentBaselineStart = Object.assign({}, eventArgs.data.ganttProperties.baselineStartDate);
|
|
25462
|
+
const currentBaselineEnd = Object.assign({}, eventArgs.data.ganttProperties.baselineEndDate);
|
|
25459
25463
|
this.parent.trigger('actionBegin', eventArgs, (eventArg) => {
|
|
25464
|
+
if (currentBaselineStart != eventArg.data["ganttProperties"].baselineStartDate
|
|
25465
|
+
|| currentBaselineEnd != eventArg.data["ganttProperties"].baselineEndDate) {
|
|
25466
|
+
ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(eventArg.data['ganttProperties']), eventArg.data['ganttProperties'], true);
|
|
25467
|
+
ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(eventArg.data['ganttProperties']), eventArg.data['ganttProperties'], true);
|
|
25468
|
+
}
|
|
25460
25469
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
25461
25470
|
this.parent.showMaskRow();
|
|
25462
25471
|
}
|
|
@@ -29350,6 +29359,9 @@ class Toolbar$3 {
|
|
|
29350
29359
|
this.toolbar.isReact = this.parent.isReact;
|
|
29351
29360
|
this.toolbar.on('render-react-toolbar-template', this.addReactToolbarPortals, this);
|
|
29352
29361
|
this.toolbar.appendTo(this.element);
|
|
29362
|
+
if (this.parent.treeGrid.grid && this.parent.isReact) {
|
|
29363
|
+
this.parent.treeGrid.grid.portals = this.parent.portals;
|
|
29364
|
+
}
|
|
29353
29365
|
const cancelItem = this.element.querySelector('#' + this.parent.element.id + '_cancel');
|
|
29354
29366
|
const updateItem = this.element.querySelector('#' + this.parent.element.id + '_update');
|
|
29355
29367
|
if (cancelItem) {
|
|
@@ -35165,10 +35177,10 @@ class ExportHelper {
|
|
|
35165
35177
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
35166
35178
|
this.parent.updatedConnectorLineCollection.forEach((data) => {
|
|
35167
35179
|
const predecessor = this.gantt.predecessor.add();
|
|
35168
|
-
predecessor.parentLeft =
|
|
35169
|
-
predecessor.childLeft =
|
|
35170
|
-
predecessor.parentWidth =
|
|
35171
|
-
predecessor.childWidth =
|
|
35180
|
+
predecessor.parentLeft = data.parentLeft;
|
|
35181
|
+
predecessor.childLeft = data.childLeft;
|
|
35182
|
+
predecessor.parentWidth = data.parentWidth;
|
|
35183
|
+
predecessor.childWidth = data.childWidth;
|
|
35172
35184
|
predecessor.parentIndex = data.parentIndex;
|
|
35173
35185
|
predecessor.childIndex = data.childIndex;
|
|
35174
35186
|
predecessor.rowHeight = data.rowHeight;
|
|
@@ -35251,8 +35263,8 @@ class ExportHelper {
|
|
|
35251
35263
|
flatData.forEach((data) => {
|
|
35252
35264
|
const taskbar = this.gantt.taskbar.add();
|
|
35253
35265
|
const ganttProp = data.ganttProperties;
|
|
35254
|
-
taskbar.left =
|
|
35255
|
-
taskbar.width =
|
|
35266
|
+
taskbar.left = ganttProp.left;
|
|
35267
|
+
taskbar.width = ganttProp.width;
|
|
35256
35268
|
if (taskbar.left < 0) {
|
|
35257
35269
|
taskbar.width = taskbar.width + taskbar.left;
|
|
35258
35270
|
taskbar.left = 0;
|
|
@@ -35293,8 +35305,8 @@ class ExportHelper {
|
|
|
35293
35305
|
taskbar.isMilestone = ganttProp.isMilestone;
|
|
35294
35306
|
taskbar.baselineStartDate = ganttProp.baselineStartDate;
|
|
35295
35307
|
taskbar.baselineEndDate = ganttProp.baselineEndDate;
|
|
35296
|
-
taskbar.baselineLeft =
|
|
35297
|
-
taskbar.baselineWidth =
|
|
35308
|
+
taskbar.baselineLeft = ganttProp.baselineLeft;
|
|
35309
|
+
taskbar.baselineWidth = ganttProp.baselineWidth;
|
|
35298
35310
|
taskbar.milestoneColor = new PdfColor(this.ganttStyle.taskbar.milestoneColor);
|
|
35299
35311
|
taskbar.isParentTask = data.hasChildRecords;
|
|
35300
35312
|
if (ganttProp.isMilestone) {
|
|
@@ -35310,9 +35322,9 @@ class ExportHelper {
|
|
|
35310
35322
|
taskbar.taskLabel = data[this.parent.labelSettings.taskLabel].toString();
|
|
35311
35323
|
}
|
|
35312
35324
|
const reduceLeft = ganttProp.isMilestone ? Math.floor(this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
|
|
35313
|
-
taskbar.rightTaskLabel.left =
|
|
35325
|
+
taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
|
|
35314
35326
|
taskbar.fontFamily = this.ganttStyle.fontFamily;
|
|
35315
|
-
taskbar.progressWidth =
|
|
35327
|
+
taskbar.progressWidth = ganttProp.progressWidth;
|
|
35316
35328
|
taskbar.labelColor = new PdfColor(this.ganttStyle.label.fontColor);
|
|
35317
35329
|
taskbar.progressFontColor = new PdfColor(this.ganttStyle.taskbar.progressFontColor);
|
|
35318
35330
|
if (taskbar.isParentTask) {
|
|
@@ -35687,7 +35699,8 @@ class PdfGanttTaskbarCollection {
|
|
|
35687
35699
|
//code for while current pdf page is exceed
|
|
35688
35700
|
if (yPoint > pageSize.height) {
|
|
35689
35701
|
page = this.GetNextPage(page);
|
|
35690
|
-
page['contentWidth'] =
|
|
35702
|
+
page['contentWidth'] = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
35703
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pointToPixel(detail.endPoint - detail.startPoint) : detail.endPoint - detail.startPoint;
|
|
35691
35704
|
taskGraphics = page.graphics;
|
|
35692
35705
|
startPoint.y = 0;
|
|
35693
35706
|
if (this.parent.pdfExportModule.gantt.enableHeader) {
|
|
@@ -35715,7 +35728,7 @@ class PdfGanttTaskbarCollection {
|
|
|
35715
35728
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
35716
35729
|
let isLabelString = false;
|
|
35717
35730
|
let updatedWidth;
|
|
35718
|
-
if (/^[a-zA-Z]/.test(this.taskLabel)) {
|
|
35731
|
+
if (!isNullOrUndefined(this.taskLabel) && (/^[a-zA-Z]/.test(this.taskLabel))) {
|
|
35719
35732
|
isLabelString = true;
|
|
35720
35733
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
35721
35734
|
}
|
|
@@ -35781,7 +35794,6 @@ class PdfGanttTaskbarCollection {
|
|
|
35781
35794
|
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));
|
|
35782
35795
|
}
|
|
35783
35796
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
35784
|
-
taskbar.width = taskbar.width - renderWidth;
|
|
35785
35797
|
if (this.isScheduledTask) {
|
|
35786
35798
|
let progressBoundsWidth = 0;
|
|
35787
35799
|
if (this.progressWidth <= renderWidth) {
|
|
@@ -36067,7 +36079,8 @@ class PdfTimeline {
|
|
|
36067
36079
|
* @returns {void}
|
|
36068
36080
|
*/
|
|
36069
36081
|
drawTimeline(page, startPoint, detail) {
|
|
36070
|
-
let remainWidth =
|
|
36082
|
+
let remainWidth = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36083
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pointToPixel(Math.floor(detail.totalWidth)) : Math.floor(detail.totalWidth);
|
|
36071
36084
|
let renderWidth = 0;
|
|
36072
36085
|
this.topTierPoint.x = startPoint.x;
|
|
36073
36086
|
this.topTierPoint.y = startPoint.y;
|
|
@@ -36095,7 +36108,8 @@ class PdfTimeline {
|
|
|
36095
36108
|
//Primary header Event Arguments
|
|
36096
36109
|
/* eslint-disable-next-line */
|
|
36097
36110
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
|
|
36098
|
-
this.topTierPoint.x +=
|
|
36111
|
+
this.topTierPoint.x += (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36112
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? renderWidth : pixelToPoint(renderWidth);
|
|
36099
36113
|
remainWidth -= renderWidth;
|
|
36100
36114
|
if (isCompleted) {
|
|
36101
36115
|
this.topTierIndex++;
|
|
@@ -36121,7 +36135,8 @@ class PdfTimeline {
|
|
|
36121
36135
|
//Secondary header Event Arguments
|
|
36122
36136
|
/* eslint-disable-next-line */
|
|
36123
36137
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
|
|
36124
|
-
this.bottomTierPoint.x = this.
|
|
36138
|
+
this.bottomTierPoint.x = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36139
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? this.bottomTierPoint.x + width : this.bottomTierPoint.x + pixelToPoint(width);
|
|
36125
36140
|
remainWidth -= width;
|
|
36126
36141
|
secondHeader.completedWidth = width;
|
|
36127
36142
|
if (isCompleted) {
|
|
@@ -36152,7 +36167,8 @@ class PdfTimeline {
|
|
|
36152
36167
|
//Primary header Event Arguments
|
|
36153
36168
|
/* eslint-disable-next-line */
|
|
36154
36169
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
|
|
36155
|
-
this.topTierPoint.x +=
|
|
36170
|
+
this.topTierPoint.x += (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36171
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pHeader.completedWidth : pixelToPoint(pHeader.completedWidth);
|
|
36156
36172
|
}
|
|
36157
36173
|
}
|
|
36158
36174
|
}
|
|
@@ -36165,7 +36181,8 @@ class PdfTimeline {
|
|
|
36165
36181
|
//Secondary header Event Arguments
|
|
36166
36182
|
/* eslint-disable-next-line */
|
|
36167
36183
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
|
|
36168
|
-
this.bottomTierPoint.x = this.
|
|
36184
|
+
this.bottomTierPoint.x = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36185
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? this.bottomTierPoint.x + secondHeader.width : this.bottomTierPoint.x + pixelToPoint(secondHeader.width);
|
|
36169
36186
|
}
|
|
36170
36187
|
}
|
|
36171
36188
|
}
|
|
@@ -36212,7 +36229,8 @@ class PdfTimeline {
|
|
|
36212
36229
|
const e = eventArgs.timelineCell;
|
|
36213
36230
|
const rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
|
|
36214
36231
|
const rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
36215
|
-
graphics.drawRectangle(rectPen, rectBrush, x, y,
|
|
36232
|
+
graphics.drawRectangle(rectPen, rectBrush, x, y, (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36233
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? width : pixelToPoint(width), pixelToPoint(height));
|
|
36216
36234
|
if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
|
|
36217
36235
|
graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
|
|
36218
36236
|
}
|
|
@@ -36731,10 +36749,12 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
36731
36749
|
}
|
|
36732
36750
|
const detail = {};
|
|
36733
36751
|
const range = [];
|
|
36734
|
-
const convertedWidth =
|
|
36752
|
+
const convertedWidth = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36753
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pixelToPoint(this.chartHeader.bottomTierCellWidth) : this.chartHeader.bottomTierCellWidth;
|
|
36735
36754
|
let width = 0;
|
|
36736
36755
|
if (this.chartHeader.bottomTierCellWidth !== 0) {
|
|
36737
|
-
width = (
|
|
36756
|
+
width = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36757
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? (Math.floor(pageWidth / convertedWidth) * convertedWidth) : (Math.floor(pageWidth / convertedWidth) * convertedWidth) + 5;
|
|
36738
36758
|
}
|
|
36739
36759
|
range[0] = point;
|
|
36740
36760
|
if (headerWidth - point <= width) {
|
|
@@ -36850,7 +36870,8 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
36850
36870
|
let pageData;
|
|
36851
36871
|
this.headerDetails.forEach((detail, index) => {
|
|
36852
36872
|
const page = this.result.page.section.getPages()[this.startPageIndex];
|
|
36853
|
-
page['contentWidth'] =
|
|
36873
|
+
page['contentWidth'] = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
36874
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pointToPixel(this.headerDetails[index].endPoint - this.headerDetails[index].startPoint) : this.headerDetails[index].endPoint - this.headerDetails[index].startPoint;
|
|
36854
36875
|
this.chartHeader.drawTimeline(page, this.startPoint, detail);
|
|
36855
36876
|
taskbarPoint.y = taskbarPoint.y + pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
|
|
36856
36877
|
pageStartX = taskbarPoint.x;
|