@syncfusion/ej2-gantt 24.1.45 → 24.1.46
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 +12 -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 +48 -23
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +51 -25
- 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 +15 -15
- 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 +4 -4
- 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/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.grid);
|
|
8045
|
+
const ref = 'viewContainerRef';
|
|
8046
|
+
setValue('viewContainerRef', this[`${ref}`], this.parent.treeGrid.grid);
|
|
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;
|
|
@@ -20933,7 +20942,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20933
20942
|
pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
|
|
20934
20943
|
/* To render the milestone in proper date while editing */
|
|
20935
20944
|
if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
|
|
20936
|
-
pStartDate.setDate(pStartDate.getDate()
|
|
20945
|
+
// pStartDate.setDate(pStartDate.getDate()-1);
|
|
20937
20946
|
this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
|
|
20938
20947
|
pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
|
|
20939
20948
|
}
|
|
@@ -20943,9 +20952,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20943
20952
|
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
20944
20953
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
20945
20954
|
}
|
|
20946
|
-
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
20947
|
-
|
|
20948
|
-
}
|
|
20955
|
+
// else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
20956
|
+
// pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
20957
|
+
// }
|
|
20949
20958
|
}
|
|
20950
20959
|
return pStartDate;
|
|
20951
20960
|
}
|
|
@@ -28554,10 +28563,15 @@ class Edit$2 {
|
|
|
28554
28563
|
}
|
|
28555
28564
|
if (!isNullOrUndefined(args.data[`${tempTaskID}`])) {
|
|
28556
28565
|
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
28566
|
+
for (const key of Object.keys(this.parent.ids)) {
|
|
28567
|
+
if (this.parent.ids[key] === args.data['ganttProperties']['taskId'].toString()) {
|
|
28568
|
+
this.parent.ids[key] = args.data[tempTaskID].toString();
|
|
28569
|
+
break;
|
|
28570
|
+
}
|
|
28571
|
+
}
|
|
28557
28572
|
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
28558
28573
|
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
28559
28574
|
args.data['ganttProperties']['rowUniqueID'] = args.data[tempTaskID].toString();
|
|
28560
|
-
this.parent.ids.push(args.data[tempTaskID].toString());
|
|
28561
28575
|
}
|
|
28562
28576
|
}
|
|
28563
28577
|
if (!args.cancel) {
|
|
@@ -37066,9 +37080,11 @@ class ExportHelper {
|
|
|
37066
37080
|
compositeField.draw(footer.graphics, new PointF(0, 0));
|
|
37067
37081
|
pdfDoc.template.bottom = footer;
|
|
37068
37082
|
}
|
|
37083
|
+
const PdfPage$$1 = this.parent.pdfExportModule.pdfPage;
|
|
37084
|
+
const pageSize = PdfPage$$1.size;
|
|
37085
|
+
const clientSize = !isNullOrUndefined(pageSize) ? pageSize : this.pdfDoc.pageSettings.size;
|
|
37069
37086
|
// code for draw header content
|
|
37070
37087
|
if (!isNullOrUndefined(this.exportProps.header)) {
|
|
37071
|
-
const clientSize = this.pdfDoc.pageSettings.size;
|
|
37072
37088
|
const headerProp = this.exportProps.header;
|
|
37073
37089
|
const position = new PointF(0, headerProp.fromTop);
|
|
37074
37090
|
const size = new SizeF((clientSize.width * 1.1), ((headerProp && headerProp.height) ? headerProp.height * 0.75 : 50));
|
|
@@ -37077,7 +37093,6 @@ class ExportHelper {
|
|
|
37077
37093
|
}
|
|
37078
37094
|
// code for customization of footer
|
|
37079
37095
|
if (!this.exportProps.enableFooter && !isNullOrUndefined(this.exportProps.footer)) {
|
|
37080
|
-
const clientSize = this.pdfDoc.pageSettings.size;
|
|
37081
37096
|
const footer = this.exportProps.footer;
|
|
37082
37097
|
const position = new PointF(0, ((clientSize.width - 80) - ((footer && footer.fromBottom) ?
|
|
37083
37098
|
footer.fromBottom * 0.75 : 0)));
|
|
@@ -37483,11 +37498,21 @@ class PdfGanttTaskbarCollection {
|
|
|
37483
37498
|
let pageIndex = -1;
|
|
37484
37499
|
let renderBaselineWidth = 0;
|
|
37485
37500
|
if (this.baselineWidth > detail.totalWidth) {
|
|
37486
|
-
|
|
37501
|
+
if (this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) {
|
|
37502
|
+
renderBaselineWidth = detail.totalWidth - this.baselineLeft;
|
|
37503
|
+
}
|
|
37504
|
+
else {
|
|
37505
|
+
renderBaselineWidth = detail.totalWidth;
|
|
37506
|
+
}
|
|
37487
37507
|
this.baselineWidth = this.baselineWidth - detail.totalWidth;
|
|
37488
37508
|
}
|
|
37489
37509
|
else {
|
|
37490
|
-
|
|
37510
|
+
if ((this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) && this.baselineWidth + this.baselineLeft > detail.totalWidth) {
|
|
37511
|
+
renderBaselineWidth = detail.totalWidth - this.baselineLeft;
|
|
37512
|
+
}
|
|
37513
|
+
else {
|
|
37514
|
+
renderBaselineWidth = this.baselineWidth;
|
|
37515
|
+
}
|
|
37491
37516
|
}
|
|
37492
37517
|
const baselinePen = new PdfPen(taskbar.baselineBorderColor);
|
|
37493
37518
|
const baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
|
|
@@ -39811,8 +39836,8 @@ class PdfExport {
|
|
|
39811
39836
|
processExport(data, pdfExportProperties, isMultipleExport) {
|
|
39812
39837
|
const section = this.pdfDocument.sections.add();
|
|
39813
39838
|
this.processSectionExportProperties(section, pdfExportProperties);
|
|
39814
|
-
|
|
39815
|
-
this.pdfPageDimensions = pdfPage.getClientSize();
|
|
39839
|
+
this.pdfPage = section.pages.add();
|
|
39840
|
+
this.pdfPageDimensions = this.pdfPage.getClientSize();
|
|
39816
39841
|
/* eslint-disable-next-line */
|
|
39817
39842
|
return new Promise((resolve, reject) => {
|
|
39818
39843
|
this.helper.processGridExport(data, this.gantt, pdfExportProperties);
|
|
@@ -39821,7 +39846,7 @@ class PdfExport {
|
|
|
39821
39846
|
}).then(() => {
|
|
39822
39847
|
const format = new PdfTreeGridLayoutFormat();
|
|
39823
39848
|
format.break = PdfLayoutBreakType.FitElement;
|
|
39824
|
-
const layouter = this.gantt.drawGrid(pdfPage, 0, 0, format);
|
|
39849
|
+
const layouter = this.gantt.drawGrid(this.pdfPage, 0, 0, format);
|
|
39825
39850
|
this.gantt.drawChart(layouter);
|
|
39826
39851
|
if (this.helper.exportProps && this.helper.exportProps.fitToWidthSettings && this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
39827
39852
|
this.parent.zoomingProjectStartDate = this.helper.beforeSinglePageExport['zoomingProjectStartDate'];
|