@syncfusion/ej2-gantt 23.1.43 → 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 +19 -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 -22
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +85 -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/filter.js +4 -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
|
}
|
|
@@ -28596,6 +28605,10 @@ class Filter$1 {
|
|
|
28596
28605
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
28597
28606
|
element.querySelector('.e-valid-input').focus();
|
|
28598
28607
|
}
|
|
28608
|
+
if (this.parent.treeGrid.filterSettings.type === 'Excel') {
|
|
28609
|
+
var inputElement = document.querySelector('.e-searchinput');
|
|
28610
|
+
inputElement.focus();
|
|
28611
|
+
}
|
|
28599
28612
|
}
|
|
28600
28613
|
removeEventListener() {
|
|
28601
28614
|
if (this.parent.isDestroyed) {
|
|
@@ -29346,6 +29359,9 @@ class Toolbar$3 {
|
|
|
29346
29359
|
this.toolbar.isReact = this.parent.isReact;
|
|
29347
29360
|
this.toolbar.on('render-react-toolbar-template', this.addReactToolbarPortals, this);
|
|
29348
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
|
+
}
|
|
29349
29365
|
const cancelItem = this.element.querySelector('#' + this.parent.element.id + '_cancel');
|
|
29350
29366
|
const updateItem = this.element.querySelector('#' + this.parent.element.id + '_update');
|
|
29351
29367
|
if (cancelItem) {
|
|
@@ -35161,10 +35177,10 @@ class ExportHelper {
|
|
|
35161
35177
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
35162
35178
|
this.parent.updatedConnectorLineCollection.forEach((data) => {
|
|
35163
35179
|
const predecessor = this.gantt.predecessor.add();
|
|
35164
|
-
predecessor.parentLeft =
|
|
35165
|
-
predecessor.childLeft =
|
|
35166
|
-
predecessor.parentWidth =
|
|
35167
|
-
predecessor.childWidth =
|
|
35180
|
+
predecessor.parentLeft = data.parentLeft;
|
|
35181
|
+
predecessor.childLeft = data.childLeft;
|
|
35182
|
+
predecessor.parentWidth = data.parentWidth;
|
|
35183
|
+
predecessor.childWidth = data.childWidth;
|
|
35168
35184
|
predecessor.parentIndex = data.parentIndex;
|
|
35169
35185
|
predecessor.childIndex = data.childIndex;
|
|
35170
35186
|
predecessor.rowHeight = data.rowHeight;
|
|
@@ -35247,8 +35263,8 @@ class ExportHelper {
|
|
|
35247
35263
|
flatData.forEach((data) => {
|
|
35248
35264
|
const taskbar = this.gantt.taskbar.add();
|
|
35249
35265
|
const ganttProp = data.ganttProperties;
|
|
35250
|
-
taskbar.left =
|
|
35251
|
-
taskbar.width =
|
|
35266
|
+
taskbar.left = ganttProp.left;
|
|
35267
|
+
taskbar.width = ganttProp.width;
|
|
35252
35268
|
if (taskbar.left < 0) {
|
|
35253
35269
|
taskbar.width = taskbar.width + taskbar.left;
|
|
35254
35270
|
taskbar.left = 0;
|
|
@@ -35289,8 +35305,8 @@ class ExportHelper {
|
|
|
35289
35305
|
taskbar.isMilestone = ganttProp.isMilestone;
|
|
35290
35306
|
taskbar.baselineStartDate = ganttProp.baselineStartDate;
|
|
35291
35307
|
taskbar.baselineEndDate = ganttProp.baselineEndDate;
|
|
35292
|
-
taskbar.baselineLeft =
|
|
35293
|
-
taskbar.baselineWidth =
|
|
35308
|
+
taskbar.baselineLeft = ganttProp.baselineLeft;
|
|
35309
|
+
taskbar.baselineWidth = ganttProp.baselineWidth;
|
|
35294
35310
|
taskbar.milestoneColor = new PdfColor(this.ganttStyle.taskbar.milestoneColor);
|
|
35295
35311
|
taskbar.isParentTask = data.hasChildRecords;
|
|
35296
35312
|
if (ganttProp.isMilestone) {
|
|
@@ -35306,9 +35322,9 @@ class ExportHelper {
|
|
|
35306
35322
|
taskbar.taskLabel = data[this.parent.labelSettings.taskLabel].toString();
|
|
35307
35323
|
}
|
|
35308
35324
|
const reduceLeft = ganttProp.isMilestone ? Math.floor(this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
|
|
35309
|
-
taskbar.rightTaskLabel.left =
|
|
35325
|
+
taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
|
|
35310
35326
|
taskbar.fontFamily = this.ganttStyle.fontFamily;
|
|
35311
|
-
taskbar.progressWidth =
|
|
35327
|
+
taskbar.progressWidth = ganttProp.progressWidth;
|
|
35312
35328
|
taskbar.labelColor = new PdfColor(this.ganttStyle.label.fontColor);
|
|
35313
35329
|
taskbar.progressFontColor = new PdfColor(this.ganttStyle.taskbar.progressFontColor);
|
|
35314
35330
|
if (taskbar.isParentTask) {
|
|
@@ -35683,7 +35699,8 @@ class PdfGanttTaskbarCollection {
|
|
|
35683
35699
|
//code for while current pdf page is exceed
|
|
35684
35700
|
if (yPoint > pageSize.height) {
|
|
35685
35701
|
page = this.GetNextPage(page);
|
|
35686
|
-
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;
|
|
35687
35704
|
taskGraphics = page.graphics;
|
|
35688
35705
|
startPoint.y = 0;
|
|
35689
35706
|
if (this.parent.pdfExportModule.gantt.enableHeader) {
|
|
@@ -35711,7 +35728,7 @@ class PdfGanttTaskbarCollection {
|
|
|
35711
35728
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
35712
35729
|
let isLabelString = false;
|
|
35713
35730
|
let updatedWidth;
|
|
35714
|
-
if (/^[a-zA-Z]/.test(this.taskLabel)) {
|
|
35731
|
+
if (!isNullOrUndefined(this.taskLabel) && (/^[a-zA-Z]/.test(this.taskLabel))) {
|
|
35715
35732
|
isLabelString = true;
|
|
35716
35733
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
35717
35734
|
}
|
|
@@ -35777,7 +35794,6 @@ class PdfGanttTaskbarCollection {
|
|
|
35777
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));
|
|
35778
35795
|
}
|
|
35779
35796
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
35780
|
-
taskbar.width = taskbar.width - renderWidth;
|
|
35781
35797
|
if (this.isScheduledTask) {
|
|
35782
35798
|
let progressBoundsWidth = 0;
|
|
35783
35799
|
if (this.progressWidth <= renderWidth) {
|
|
@@ -36063,7 +36079,8 @@ class PdfTimeline {
|
|
|
36063
36079
|
* @returns {void}
|
|
36064
36080
|
*/
|
|
36065
36081
|
drawTimeline(page, startPoint, detail) {
|
|
36066
|
-
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);
|
|
36067
36084
|
let renderWidth = 0;
|
|
36068
36085
|
this.topTierPoint.x = startPoint.x;
|
|
36069
36086
|
this.topTierPoint.y = startPoint.y;
|
|
@@ -36091,7 +36108,8 @@ class PdfTimeline {
|
|
|
36091
36108
|
//Primary header Event Arguments
|
|
36092
36109
|
/* eslint-disable-next-line */
|
|
36093
36110
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
|
|
36094
|
-
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);
|
|
36095
36113
|
remainWidth -= renderWidth;
|
|
36096
36114
|
if (isCompleted) {
|
|
36097
36115
|
this.topTierIndex++;
|
|
@@ -36117,7 +36135,8 @@ class PdfTimeline {
|
|
|
36117
36135
|
//Secondary header Event Arguments
|
|
36118
36136
|
/* eslint-disable-next-line */
|
|
36119
36137
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
|
|
36120
|
-
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);
|
|
36121
36140
|
remainWidth -= width;
|
|
36122
36141
|
secondHeader.completedWidth = width;
|
|
36123
36142
|
if (isCompleted) {
|
|
@@ -36148,7 +36167,8 @@ class PdfTimeline {
|
|
|
36148
36167
|
//Primary header Event Arguments
|
|
36149
36168
|
/* eslint-disable-next-line */
|
|
36150
36169
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
|
|
36151
|
-
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);
|
|
36152
36172
|
}
|
|
36153
36173
|
}
|
|
36154
36174
|
}
|
|
@@ -36161,7 +36181,8 @@ class PdfTimeline {
|
|
|
36161
36181
|
//Secondary header Event Arguments
|
|
36162
36182
|
/* eslint-disable-next-line */
|
|
36163
36183
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
|
|
36164
|
-
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);
|
|
36165
36186
|
}
|
|
36166
36187
|
}
|
|
36167
36188
|
}
|
|
@@ -36208,7 +36229,8 @@ class PdfTimeline {
|
|
|
36208
36229
|
const e = eventArgs.timelineCell;
|
|
36209
36230
|
const rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
|
|
36210
36231
|
const rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
36211
|
-
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));
|
|
36212
36234
|
if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
|
|
36213
36235
|
graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
|
|
36214
36236
|
}
|
|
@@ -36727,10 +36749,12 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
36727
36749
|
}
|
|
36728
36750
|
const detail = {};
|
|
36729
36751
|
const range = [];
|
|
36730
|
-
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;
|
|
36731
36754
|
let width = 0;
|
|
36732
36755
|
if (this.chartHeader.bottomTierCellWidth !== 0) {
|
|
36733
|
-
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;
|
|
36734
36758
|
}
|
|
36735
36759
|
range[0] = point;
|
|
36736
36760
|
if (headerWidth - point <= width) {
|
|
@@ -36846,7 +36870,8 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
36846
36870
|
let pageData;
|
|
36847
36871
|
this.headerDetails.forEach((detail, index) => {
|
|
36848
36872
|
const page = this.result.page.section.getPages()[this.startPageIndex];
|
|
36849
|
-
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;
|
|
36850
36875
|
this.chartHeader.drawTimeline(page, this.startPoint, detail);
|
|
36851
36876
|
taskbarPoint.y = taskbarPoint.y + pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
|
|
36852
36877
|
pageStartX = taskbarPoint.x;
|