@syncfusion/ej2-gantt 24.1.45 → 24.1.47
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 +53 -26
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +60 -32
- 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 +17 -17
- package/src/gantt/actions/edit.js +7 -1
- package/src/gantt/actions/pdf-export.d.ts +2 -1
- package/src/gantt/actions/pdf-export.js +3 -3
- package/src/gantt/actions/taskbar-edit.js +6 -7
- package/src/gantt/base/task-processor.js +19 -13
- package/src/gantt/base/tree-grid.d.ts +1 -0
- package/src/gantt/base/tree-grid.js +3 -0
- package/src/gantt/export/export-helper.js +3 -2
- package/src/gantt/export/pdf-taskbar.js +12 -2
- package/src/gantt/export/pdf-timeline.js +8 -5
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/gantt/_layout.scss +1 -1
- package/styles/gantt/bootstrap-dark.css +1 -1
- package/styles/gantt/bootstrap.css +1 -1
- package/styles/gantt/bootstrap4.css +1 -1
- package/styles/gantt/bootstrap5-dark.css +1 -1
- package/styles/gantt/bootstrap5.css +1 -1
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/fabric.css +1 -1
- package/styles/gantt/fluent-dark.css +1 -1
- package/styles/gantt/fluent.css +1 -1
- package/styles/gantt/highcontrast-light.css +1 -1
- package/styles/gantt/highcontrast.css +1 -1
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/material.css +1 -1
- package/styles/gantt/material3-dark.css +1 -1
- package/styles/gantt/material3.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -1629,19 +1629,25 @@ class TaskProcessor extends DateProcessor {
|
|
|
1629
1629
|
const queryManager = this.parent.query instanceof Query ? this.parent.query : new Query();
|
|
1630
1630
|
queryManager.requiresCount();
|
|
1631
1631
|
const dataManager = this.parent.dataSource;
|
|
1632
|
-
|
|
1633
|
-
this.dataArray = e.result;
|
|
1632
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
1634
1633
|
this.processTimeline();
|
|
1635
|
-
if (this.parent.loadChildOnDemand || (!this.parent.loadChildOnDemand && !(this.parent.taskFields.hasChildMapping))) {
|
|
1636
|
-
this.cloneDataSource();
|
|
1637
|
-
}
|
|
1638
|
-
this.parent.renderGantt(isChange);
|
|
1639
|
-
}).catch((e) => {
|
|
1640
|
-
// Trigger action failure event
|
|
1641
|
-
this.parent.processTimeline();
|
|
1642
1634
|
this.parent.renderGantt(isChange);
|
|
1643
|
-
|
|
1644
|
-
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
dataManager.executeQuery(queryManager).then((e) => {
|
|
1638
|
+
this.dataArray = e.result;
|
|
1639
|
+
this.processTimeline();
|
|
1640
|
+
if (this.parent.loadChildOnDemand || (!this.parent.loadChildOnDemand && !(this.parent.taskFields.hasChildMapping))) {
|
|
1641
|
+
this.cloneDataSource();
|
|
1642
|
+
}
|
|
1643
|
+
this.parent.renderGantt(isChange);
|
|
1644
|
+
}).catch((e) => {
|
|
1645
|
+
// Trigger action failure event
|
|
1646
|
+
this.parent.processTimeline();
|
|
1647
|
+
this.parent.renderGantt(isChange);
|
|
1648
|
+
this.parent.trigger('actionFailure', { error: e });
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1645
1651
|
}
|
|
1646
1652
|
constructDataSource(dataSource) {
|
|
1647
1653
|
const mappingData = new DataManager(dataSource).executeLocal(new Query()
|
|
@@ -8035,6 +8041,9 @@ class GanttTreeGrid {
|
|
|
8035
8041
|
this.bindEvents();
|
|
8036
8042
|
const root = 'root';
|
|
8037
8043
|
this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
|
|
8044
|
+
setValue('registeredTemplate', this.registeredTemplate, this.parent.treeGrid);
|
|
8045
|
+
const ref = 'viewContainerRef';
|
|
8046
|
+
setValue('viewContainerRef', this.parent[`${ref}`], this.parent.treeGrid);
|
|
8038
8047
|
this.parent.treeGrid.appendTo(this.treeGridElement);
|
|
8039
8048
|
if (this.parent.treeGrid.grid && this.parent.toolbarModule && this.parent.isReact) {
|
|
8040
8049
|
this.parent.treeGrid.grid.portals = this.parent.portals;
|
|
@@ -19691,7 +19700,6 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19691
19700
|
}
|
|
19692
19701
|
else {
|
|
19693
19702
|
rowElement = this.parent.getRowByIndex(parseInt(target.getAttribute('data-rowindex'))).children;
|
|
19694
|
-
|
|
19695
19703
|
}
|
|
19696
19704
|
if (rowElement) {
|
|
19697
19705
|
if (this.parent.rowDragAndDropModule['dropPosition'] === 'above') {
|
|
@@ -19960,7 +19968,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19960
19968
|
let rowIndex = getValue('rowIndex', rowElement);
|
|
19961
19969
|
let droppedTreeGridRecord = this.parent.flatData[rowIndex];
|
|
19962
19970
|
let isValid = true;
|
|
19963
|
-
if (this.parent.viewType === 'ResourceView' && !this.taskBarEditRecord.hasChildRecords && !droppedTreeGridRecord.hasChildRecords && this.taskBarEditRecord.parentItem.taskId === droppedTreeGridRecord.parentItem.taskId) {
|
|
19971
|
+
if (this.parent.viewType === 'ResourceView' && !this.taskBarEditRecord.hasChildRecords && !droppedTreeGridRecord.hasChildRecords && !isNullOrUndefined(droppedTreeGridRecord.parentItem) && this.taskBarEditRecord.parentItem.taskId === droppedTreeGridRecord.parentItem.taskId) {
|
|
19964
19972
|
isValid = false;
|
|
19965
19973
|
}
|
|
19966
19974
|
if (droppedTreeGridRecord) {
|
|
@@ -20933,7 +20941,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20933
20941
|
pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
|
|
20934
20942
|
/* To render the milestone in proper date while editing */
|
|
20935
20943
|
if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
|
|
20936
|
-
pStartDate.setDate(pStartDate.getDate()
|
|
20944
|
+
// pStartDate.setDate(pStartDate.getDate()-1);
|
|
20937
20945
|
this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
|
|
20938
20946
|
pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
|
|
20939
20947
|
}
|
|
@@ -20943,9 +20951,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20943
20951
|
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
20944
20952
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
20945
20953
|
}
|
|
20946
|
-
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
20947
|
-
|
|
20948
|
-
}
|
|
20954
|
+
// else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
20955
|
+
// pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
20956
|
+
// }
|
|
20949
20957
|
}
|
|
20950
20958
|
return pStartDate;
|
|
20951
20959
|
}
|
|
@@ -21359,7 +21367,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
21359
21367
|
droppedRecord.childRecords.length == 0)) ? 'child' : this.parent.rowDragAndDropModule['dropPosition'];
|
|
21360
21368
|
}
|
|
21361
21369
|
if (this.parent.rowDragAndDropModule) {
|
|
21362
|
-
if (this.parent.viewType === 'ResourceView' && (position === 'child' && !droppedRecord.hasChildRecords)) {
|
|
21370
|
+
if (this.parent.viewType === 'ResourceView' && (position === 'child' && !droppedRecord.hasChildRecords) && !isNullOrUndefined(droppedRecord.parentItem)) {
|
|
21363
21371
|
position = 'Invalid';
|
|
21364
21372
|
this.parent.rowDragAndDropModule['dropPosition'] = 'Invalid';
|
|
21365
21373
|
}
|
|
@@ -28554,10 +28562,15 @@ class Edit$2 {
|
|
|
28554
28562
|
}
|
|
28555
28563
|
if (!isNullOrUndefined(args.data[`${tempTaskID}`])) {
|
|
28556
28564
|
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
28565
|
+
for (const key of Object.keys(this.parent.ids)) {
|
|
28566
|
+
if (this.parent.ids[key] === args.data['ganttProperties']['taskId'].toString()) {
|
|
28567
|
+
this.parent.ids[key] = args.data[tempTaskID].toString();
|
|
28568
|
+
break;
|
|
28569
|
+
}
|
|
28570
|
+
}
|
|
28557
28571
|
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
28558
28572
|
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
28559
28573
|
args.data['ganttProperties']['rowUniqueID'] = args.data[tempTaskID].toString();
|
|
28560
|
-
this.parent.ids.push(args.data[tempTaskID].toString());
|
|
28561
28574
|
}
|
|
28562
28575
|
}
|
|
28563
28576
|
if (!args.cancel) {
|
|
@@ -37066,9 +37079,11 @@ class ExportHelper {
|
|
|
37066
37079
|
compositeField.draw(footer.graphics, new PointF(0, 0));
|
|
37067
37080
|
pdfDoc.template.bottom = footer;
|
|
37068
37081
|
}
|
|
37082
|
+
const PdfPage$$1 = this.parent.pdfExportModule.pdfPage;
|
|
37083
|
+
const pageSize = PdfPage$$1.size;
|
|
37084
|
+
const clientSize = !isNullOrUndefined(pageSize) ? pageSize : this.pdfDoc.pageSettings.size;
|
|
37069
37085
|
// code for draw header content
|
|
37070
37086
|
if (!isNullOrUndefined(this.exportProps.header)) {
|
|
37071
|
-
const clientSize = this.pdfDoc.pageSettings.size;
|
|
37072
37087
|
const headerProp = this.exportProps.header;
|
|
37073
37088
|
const position = new PointF(0, headerProp.fromTop);
|
|
37074
37089
|
const size = new SizeF((clientSize.width * 1.1), ((headerProp && headerProp.height) ? headerProp.height * 0.75 : 50));
|
|
@@ -37077,7 +37092,6 @@ class ExportHelper {
|
|
|
37077
37092
|
}
|
|
37078
37093
|
// code for customization of footer
|
|
37079
37094
|
if (!this.exportProps.enableFooter && !isNullOrUndefined(this.exportProps.footer)) {
|
|
37080
|
-
const clientSize = this.pdfDoc.pageSettings.size;
|
|
37081
37095
|
const footer = this.exportProps.footer;
|
|
37082
37096
|
const position = new PointF(0, ((clientSize.width - 80) - ((footer && footer.fromBottom) ?
|
|
37083
37097
|
footer.fromBottom * 0.75 : 0)));
|
|
@@ -37483,11 +37497,21 @@ class PdfGanttTaskbarCollection {
|
|
|
37483
37497
|
let pageIndex = -1;
|
|
37484
37498
|
let renderBaselineWidth = 0;
|
|
37485
37499
|
if (this.baselineWidth > detail.totalWidth) {
|
|
37486
|
-
|
|
37500
|
+
if (this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) {
|
|
37501
|
+
renderBaselineWidth = detail.totalWidth - this.baselineLeft;
|
|
37502
|
+
}
|
|
37503
|
+
else {
|
|
37504
|
+
renderBaselineWidth = detail.totalWidth;
|
|
37505
|
+
}
|
|
37487
37506
|
this.baselineWidth = this.baselineWidth - detail.totalWidth;
|
|
37488
37507
|
}
|
|
37489
37508
|
else {
|
|
37490
|
-
|
|
37509
|
+
if ((this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) && this.baselineWidth + this.baselineLeft > detail.totalWidth) {
|
|
37510
|
+
renderBaselineWidth = detail.totalWidth - this.baselineLeft;
|
|
37511
|
+
}
|
|
37512
|
+
else {
|
|
37513
|
+
renderBaselineWidth = this.baselineWidth;
|
|
37514
|
+
}
|
|
37491
37515
|
}
|
|
37492
37516
|
const baselinePen = new PdfPen(taskbar.baselineBorderColor);
|
|
37493
37517
|
const baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
|
|
@@ -38811,6 +38835,8 @@ class PdfTimeline {
|
|
|
38811
38835
|
const pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
38812
38836
|
const pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|
|
38813
38837
|
/* eslint-disable-next-line */
|
|
38838
|
+
let state = graphics.save();
|
|
38839
|
+
graphics.setClip(new RectangleF(x, y, width, pixelToPoint(height)));
|
|
38814
38840
|
if (isTopTier) {
|
|
38815
38841
|
x = x + pLeft + 4;
|
|
38816
38842
|
}
|
|
@@ -38818,6 +38844,7 @@ class PdfTimeline {
|
|
|
38818
38844
|
x = x + pLeft;
|
|
38819
38845
|
}
|
|
38820
38846
|
graphics.drawString(eventArgs.value, font, null, textBrush, x, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
|
|
38847
|
+
graphics.restore(state);
|
|
38821
38848
|
}
|
|
38822
38849
|
}
|
|
38823
38850
|
|
|
@@ -39811,8 +39838,8 @@ class PdfExport {
|
|
|
39811
39838
|
processExport(data, pdfExportProperties, isMultipleExport) {
|
|
39812
39839
|
const section = this.pdfDocument.sections.add();
|
|
39813
39840
|
this.processSectionExportProperties(section, pdfExportProperties);
|
|
39814
|
-
|
|
39815
|
-
this.pdfPageDimensions = pdfPage.getClientSize();
|
|
39841
|
+
this.pdfPage = section.pages.add();
|
|
39842
|
+
this.pdfPageDimensions = this.pdfPage.getClientSize();
|
|
39816
39843
|
/* eslint-disable-next-line */
|
|
39817
39844
|
return new Promise((resolve, reject) => {
|
|
39818
39845
|
this.helper.processGridExport(data, this.gantt, pdfExportProperties);
|
|
@@ -39821,7 +39848,7 @@ class PdfExport {
|
|
|
39821
39848
|
}).then(() => {
|
|
39822
39849
|
const format = new PdfTreeGridLayoutFormat();
|
|
39823
39850
|
format.break = PdfLayoutBreakType.FitElement;
|
|
39824
|
-
const layouter = this.gantt.drawGrid(pdfPage, 0, 0, format);
|
|
39851
|
+
const layouter = this.gantt.drawGrid(this.pdfPage, 0, 0, format);
|
|
39825
39852
|
this.gantt.drawChart(layouter);
|
|
39826
39853
|
if (this.helper.exportProps && this.helper.exportProps.fitToWidthSettings && this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
39827
39854
|
this.parent.zoomingProjectStartDate = this.helper.beforeSinglePageExport['zoomingProjectStartDate'];
|