@syncfusion/ej2-gantt 22.2.11 → 23.1.36
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 +195 -163
- 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 +1003 -292
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1040 -313
- 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 +21 -21
- package/src/gantt/actions/cell-edit.js +4 -1
- package/src/gantt/actions/context-menu.js +4 -1
- package/src/gantt/actions/critical-path.d.ts +2 -0
- package/src/gantt/actions/critical-path.js +81 -59
- package/src/gantt/actions/dependency.d.ts +1 -0
- package/src/gantt/actions/dependency.js +43 -25
- package/src/gantt/actions/dialog-edit.js +27 -7
- package/src/gantt/actions/edit.d.ts +12 -1
- package/src/gantt/actions/edit.js +91 -10
- package/src/gantt/actions/filter.js +3 -0
- package/src/gantt/actions/pdf-export.d.ts +4 -1
- package/src/gantt/actions/pdf-export.js +36 -3
- package/src/gantt/actions/rowdragdrop.js +10 -2
- package/src/gantt/actions/selection.js +22 -5
- package/src/gantt/actions/taskbar-edit.js +51 -36
- package/src/gantt/actions/toolbar.js +8 -0
- package/src/gantt/base/date-processor.js +3 -3
- package/src/gantt/base/gantt-chart.d.ts +1 -0
- package/src/gantt/base/gantt-chart.js +79 -6
- package/src/gantt/base/gantt-model.d.ts +7 -0
- package/src/gantt/base/gantt.d.ts +6 -0
- package/src/gantt/base/gantt.js +83 -13
- package/src/gantt/base/interface.d.ts +14 -0
- package/src/gantt/base/task-processor.d.ts +4 -4
- package/src/gantt/base/task-processor.js +86 -36
- package/src/gantt/base/tree-grid.js +19 -10
- package/src/gantt/export/export-helper.d.ts +5 -1
- package/src/gantt/export/export-helper.js +152 -4
- package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
- package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
- package/src/gantt/export/pdf-base/treegrid-layouter.js +6 -1
- package/src/gantt/export/pdf-connector-line.js +3 -1
- package/src/gantt/export/pdf-gantt.js +6 -0
- package/src/gantt/export/pdf-taskbar.d.ts +13 -0
- package/src/gantt/export/pdf-taskbar.js +39 -5
- package/src/gantt/export/pdf-timeline.js +17 -8
- package/src/gantt/export/pdf-treegrid.js +3 -0
- package/src/gantt/models/task-fields-model.d.ts +7 -0
- package/src/gantt/models/task-fields.d.ts +6 -0
- package/src/gantt/models/task-fields.js +3 -0
- package/src/gantt/renderer/chart-rows.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.js +39 -20
- package/src/gantt/renderer/connector-line.js +49 -9
- package/src/gantt/renderer/edit-tooltip.js +11 -7
- package/src/gantt/renderer/timeline.js +19 -9
- package/src/gantt/renderer/tooltip.js +37 -33
- package/styles/bootstrap-dark.css +44 -100
- package/styles/bootstrap.css +44 -100
- package/styles/bootstrap4.css +44 -100
- package/styles/bootstrap5-dark.css +44 -100
- package/styles/bootstrap5.css +44 -100
- package/styles/fabric-dark.css +44 -100
- package/styles/fabric.css +44 -100
- package/styles/fluent-dark.css +44 -100
- package/styles/fluent.css +44 -100
- package/styles/gantt/_layout.scss +44 -31
- package/styles/gantt/_theme.scss +104 -98
- package/styles/gantt/bootstrap-dark.css +44 -100
- package/styles/gantt/bootstrap-dark.scss +1 -1
- package/styles/gantt/bootstrap.css +44 -100
- package/styles/gantt/bootstrap.scss +1 -1
- package/styles/gantt/bootstrap4.css +44 -100
- package/styles/gantt/bootstrap4.scss +1 -1
- package/styles/gantt/bootstrap5-dark.css +44 -100
- package/styles/gantt/bootstrap5-dark.scss +1 -1
- package/styles/gantt/bootstrap5.css +44 -100
- package/styles/gantt/bootstrap5.scss +1 -1
- package/styles/gantt/fabric-dark.css +44 -100
- package/styles/gantt/fabric-dark.scss +1 -1
- package/styles/gantt/fabric.css +44 -100
- package/styles/gantt/fabric.scss +1 -1
- package/styles/gantt/fluent-dark.css +44 -100
- package/styles/gantt/fluent-dark.scss +1 -1
- package/styles/gantt/fluent.css +44 -100
- package/styles/gantt/fluent.scss +1 -1
- package/styles/gantt/highcontrast-light.css +40 -100
- package/styles/gantt/highcontrast-light.scss +1 -1
- package/styles/gantt/highcontrast.css +44 -100
- package/styles/gantt/highcontrast.scss +1 -1
- package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
- package/styles/gantt/icons/_bootstrap.scss +4 -0
- package/styles/gantt/icons/_bootstrap4.scss +4 -0
- package/styles/gantt/icons/_bootstrap5.scss +4 -0
- package/styles/gantt/icons/_fabric-dark.scss +4 -0
- package/styles/gantt/icons/_fabric.scss +4 -0
- package/styles/gantt/icons/_fluent.scss +4 -0
- package/styles/gantt/icons/_fusionnew.scss +4 -0
- package/styles/gantt/icons/_highcontrast.scss +4 -0
- package/styles/gantt/icons/_material-dark.scss +4 -0
- package/styles/gantt/icons/_material.scss +4 -0
- package/styles/gantt/icons/_material3.scss +4 -0
- package/styles/gantt/icons/_tailwind-dark.scss +4 -0
- package/styles/gantt/icons/_tailwind.scss +4 -0
- package/styles/gantt/material-dark.css +44 -101
- package/styles/gantt/material-dark.scss +1 -1
- package/styles/gantt/material.css +44 -101
- package/styles/gantt/material.scss +1 -1
- package/styles/gantt/material3-dark.css +45 -102
- package/styles/gantt/material3-dark.scss +1 -1
- package/styles/gantt/material3.css +45 -102
- package/styles/gantt/material3.scss +1 -1
- package/styles/gantt/tailwind-dark.css +44 -101
- package/styles/gantt/tailwind-dark.scss +1 -1
- package/styles/gantt/tailwind.css +44 -101
- package/styles/gantt/tailwind.scss +1 -1
- package/styles/highcontrast-light.css +40 -100
- package/styles/highcontrast.css +44 -100
- package/styles/material-dark.css +44 -101
- package/styles/material.css +44 -101
- package/styles/material3-dark.css +45 -102
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +45 -102
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +44 -101
- package/styles/tailwind.css +44 -101
|
@@ -11,6 +11,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
11
11
|
function GanttChart(parent) {
|
|
12
12
|
this.isExpandCollapseFromChart = false;
|
|
13
13
|
this.isExpandAll = false;
|
|
14
|
+
this.isCollapseAll = false;
|
|
14
15
|
this.isGanttElement = false;
|
|
15
16
|
this.parent = parent;
|
|
16
17
|
this.chartTimelineContainer = null;
|
|
@@ -356,6 +357,42 @@ var GanttChart = /** @class */ (function () {
|
|
|
356
357
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
357
358
|
this.parent.notify('chartMouseUp', e);
|
|
358
359
|
}
|
|
360
|
+
if (!this.parent.editSettings.allowEditing) {
|
|
361
|
+
var isTaskbarEdited = false;
|
|
362
|
+
if (this.parent.editSettings.allowTaskbarEditing &&
|
|
363
|
+
getValue('editModule.taskbarEditModule.isMouseDragged', this.parent) &&
|
|
364
|
+
getValue('editModule.taskbarEditModule.taskBarEditAction', this.parent)) {
|
|
365
|
+
isTaskbarEdited = true;
|
|
366
|
+
}
|
|
367
|
+
if (!isTaskbarEdited) {
|
|
368
|
+
/** Expand/collapse action */
|
|
369
|
+
var target = e.target;
|
|
370
|
+
var isOnTaskbarElement = e.target.classList.contains(cls.taskBarMainContainer)
|
|
371
|
+
|| closest(e.target, '.' + cls.taskBarMainContainer);
|
|
372
|
+
if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
|
|
373
|
+
this.chartExpandCollapseRequest(e);
|
|
374
|
+
}
|
|
375
|
+
else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
|
|
376
|
+
this.scrollToTarget(e); /** Scroll to task */
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (e.type === "touchend") {
|
|
381
|
+
var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
|
|
382
|
+
if (!isNullOrUndefined(resizeCheck)) {
|
|
383
|
+
resizeCheck.remove();
|
|
384
|
+
}
|
|
385
|
+
var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar');
|
|
386
|
+
if (!isNullOrUndefined(Check)) {
|
|
387
|
+
var clonetbody = Check.parentElement;
|
|
388
|
+
var cloneTable = clonetbody.parentElement;
|
|
389
|
+
cloneTable.remove();
|
|
390
|
+
}
|
|
391
|
+
var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
|
|
392
|
+
if (!isNullOrUndefined(falseline)) {
|
|
393
|
+
this.parent.editModule.taskbarEditModule.removeFalseLine(true);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
359
396
|
};
|
|
360
397
|
/**
|
|
361
398
|
*
|
|
@@ -747,13 +784,27 @@ var GanttChart = /** @class */ (function () {
|
|
|
747
784
|
* @private
|
|
748
785
|
*/
|
|
749
786
|
GanttChart.prototype.collapsedGanttRow = function (args) {
|
|
787
|
+
var _this = this;
|
|
750
788
|
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
751
789
|
return;
|
|
752
790
|
}
|
|
753
|
-
var record
|
|
791
|
+
var record;
|
|
792
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
793
|
+
record = this.parent.currentViewData.filter(function (item) { return item.ganttProperties[_this.parent.taskFields.id] === args['data'][_this.parent.taskFields.id]; })[0];
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
record = getValue('data', args);
|
|
797
|
+
}
|
|
754
798
|
if (this.isExpandCollapseFromChart) {
|
|
755
799
|
this.expandCollapseChartRows('collapse', getValue('chartRow', args), record, null);
|
|
756
|
-
this.parent.
|
|
800
|
+
var idField_1 = this.parent.taskFields.id;
|
|
801
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
802
|
+
var gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField_1] == args['data'][idField_1]; })[0];
|
|
803
|
+
this.parent.treeGrid.collapseRow(getValue('gridRow', args), gridRec);
|
|
804
|
+
}
|
|
805
|
+
else {
|
|
806
|
+
this.parent.treeGrid.collapseRow(getValue('gridRow', args), record);
|
|
807
|
+
}
|
|
757
808
|
this.isExpandCollapseFromChart = false;
|
|
758
809
|
}
|
|
759
810
|
else {
|
|
@@ -798,13 +849,27 @@ var GanttChart = /** @class */ (function () {
|
|
|
798
849
|
* @private
|
|
799
850
|
*/
|
|
800
851
|
GanttChart.prototype.expandedGanttRow = function (args) {
|
|
852
|
+
var _this = this;
|
|
801
853
|
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
802
854
|
return;
|
|
803
855
|
}
|
|
804
|
-
var record
|
|
856
|
+
var record;
|
|
857
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
858
|
+
record = this.parent.currentViewData.filter(function (item) { return item.ganttProperties.taskId == args['data'][_this.parent.taskFields.id]; })[0];
|
|
859
|
+
}
|
|
860
|
+
else {
|
|
861
|
+
record = getValue('data', args);
|
|
862
|
+
}
|
|
805
863
|
if (this.isExpandCollapseFromChart) {
|
|
806
864
|
this.expandCollapseChartRows('expand', getValue('chartRow', args), record, null);
|
|
807
|
-
this.parent.
|
|
865
|
+
var idField_2 = this.parent.taskFields.id;
|
|
866
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
867
|
+
var gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField_2] == args['data'][idField_2]; })[0];
|
|
868
|
+
this.parent.treeGrid.expandRow(getValue('gridRow', args), gridRec);
|
|
869
|
+
}
|
|
870
|
+
else {
|
|
871
|
+
this.parent.treeGrid.expandRow(getValue('gridRow', args), record);
|
|
872
|
+
}
|
|
808
873
|
this.isExpandCollapseFromChart = false;
|
|
809
874
|
}
|
|
810
875
|
else {
|
|
@@ -903,9 +968,11 @@ var GanttChart = /** @class */ (function () {
|
|
|
903
968
|
this.parent.treeGrid.expandAll();
|
|
904
969
|
}
|
|
905
970
|
else {
|
|
971
|
+
this.isCollapseAll = true;
|
|
906
972
|
this.parent.treeGrid.collapseAll();
|
|
907
973
|
}
|
|
908
974
|
this.isExpandAll = false;
|
|
975
|
+
this.isCollapseAll = false;
|
|
909
976
|
};
|
|
910
977
|
/**
|
|
911
978
|
* Public method to expand particular level of rows.
|
|
@@ -1388,7 +1455,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
1388
1455
|
childElement = element;
|
|
1389
1456
|
}
|
|
1390
1457
|
}
|
|
1391
|
-
if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span')) {
|
|
1458
|
+
if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span') || element.classList.contains("e-timeline-header-container")) {
|
|
1392
1459
|
if (focus === 'add') {
|
|
1393
1460
|
element.setAttribute('tabIndex', '0');
|
|
1394
1461
|
addClass([element], 'e-active-container');
|
|
@@ -1452,7 +1519,13 @@ var GanttChart = /** @class */ (function () {
|
|
|
1452
1519
|
recordIndex = this.parent.flatData.indexOf(record);
|
|
1453
1520
|
}
|
|
1454
1521
|
else {
|
|
1455
|
-
|
|
1522
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
1523
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
1524
|
+
recordIndex = this.parent.ids.indexOf(record.ganttProperties.taskId.toString());
|
|
1525
|
+
}
|
|
1526
|
+
else {
|
|
1527
|
+
recordIndex = this.parent.currentViewData.indexOf(record);
|
|
1528
|
+
}
|
|
1456
1529
|
}
|
|
1457
1530
|
}
|
|
1458
1531
|
return recordIndex;
|
|
@@ -57,6 +57,13 @@ export interface GanttModel extends ComponentModel{
|
|
|
57
57
|
*/
|
|
58
58
|
enableVirtualMaskRow?: boolean;
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Gets or sets whether to load child record on demand in remote data binding. Initially parent records are rendered in collapsed state.
|
|
62
|
+
*
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
loadChildOnDemand?: boolean;
|
|
66
|
+
|
|
60
67
|
/**
|
|
61
68
|
* Specifies whether to update offset value on a task for all the predecessor edit actions.
|
|
62
69
|
*
|
|
@@ -350,6 +350,12 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
350
350
|
* @default true
|
|
351
351
|
*/
|
|
352
352
|
enableVirtualMaskRow: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* Gets or sets whether to load child record on demand in remote data binding. Initially parent records are rendered in collapsed state.
|
|
355
|
+
*
|
|
356
|
+
* @default false
|
|
357
|
+
*/
|
|
358
|
+
loadChildOnDemand: boolean;
|
|
353
359
|
/**
|
|
354
360
|
* Specifies whether to update offset value on a task for all the predecessor edit actions.
|
|
355
361
|
*
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -344,6 +344,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
344
344
|
createSpinner({ target: this.element }, this.createElement);
|
|
345
345
|
this.trigger('load', {});
|
|
346
346
|
this.element.classList.add(cls.root);
|
|
347
|
+
this.rowHeight = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.rowHeight === 36) ? 46 : this.rowHeight : this.rowHeight;
|
|
347
348
|
if (this.isAdaptive) {
|
|
348
349
|
this.element.classList.add(cls.adaptive);
|
|
349
350
|
}
|
|
@@ -779,7 +780,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
779
780
|
this.wireEvents();
|
|
780
781
|
this.notify('initPredessorDialog', {});
|
|
781
782
|
}
|
|
782
|
-
this.
|
|
783
|
+
if (!this.isFromOnPropertyChange) {
|
|
784
|
+
this.splitterModule.updateSplitterPosition();
|
|
785
|
+
}
|
|
783
786
|
// if (this.gridLines === 'Vertical' || this.gridLines === 'Both') {
|
|
784
787
|
// this.renderChartVerticalLines();
|
|
785
788
|
// }
|
|
@@ -791,6 +794,8 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
791
794
|
removeClass(ganttChartElement.querySelectorAll('.e-critical-milestone'), cls.criticalMilestone);
|
|
792
795
|
removeClass(this.element.querySelectorAll('.e-connector-line'), cls.criticalConnectorLineSVG);
|
|
793
796
|
removeClass(this.element.querySelectorAll('.e-connector-line-arrow'), cls.criticalConnectorArrowSVG);
|
|
797
|
+
var innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
|
|
798
|
+
innerDivs.style.outlineColor = "";
|
|
794
799
|
};
|
|
795
800
|
Gantt.prototype.wireEvents = function () {
|
|
796
801
|
if (this.allowKeyboard) {
|
|
@@ -882,7 +887,39 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
882
887
|
this.treeGridModule.renderTreeGrid();
|
|
883
888
|
};
|
|
884
889
|
Gantt.prototype.updateCurrentViewData = function () {
|
|
890
|
+
var _this = this;
|
|
885
891
|
this.currentViewData = this.treeGrid.getCurrentViewRecords().slice();
|
|
892
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping && this.currentViewData.length > 0) {
|
|
893
|
+
this.autoCalculateDateScheduling = false;
|
|
894
|
+
this.flatData = [];
|
|
895
|
+
this.dataOperation.taskIds = [];
|
|
896
|
+
this.ids = [];
|
|
897
|
+
this.dataOperation.recordIndex = 0;
|
|
898
|
+
this.dataOperation.dataArray = this.currentViewData;
|
|
899
|
+
this.dataOperation.cloneDataSource();
|
|
900
|
+
if (this.predecessorModule && this.taskFields.dependency) {
|
|
901
|
+
this.predecessorModule['parentIds'] = [];
|
|
902
|
+
this.predecessorModule['parentRecord'] = [];
|
|
903
|
+
this.predecessorModule.updatePredecessors();
|
|
904
|
+
}
|
|
905
|
+
var gridData = this.treeGrid.grid.contentModule['rows'];
|
|
906
|
+
var data = gridData.filter(function (x) {
|
|
907
|
+
if (x['data'][_this.taskFields.id] === _this.flatData[0].ganttProperties.taskId) {
|
|
908
|
+
return x;
|
|
909
|
+
}
|
|
910
|
+
})[0];
|
|
911
|
+
var index = data['index'];
|
|
912
|
+
for (var i = 0; i < this.flatData.length; i++) {
|
|
913
|
+
this.flatData[i].index = index;
|
|
914
|
+
index++;
|
|
915
|
+
}
|
|
916
|
+
this.currentViewData = this.flatData;
|
|
917
|
+
this.treeGrid.grid.currentViewData = this.flatData;
|
|
918
|
+
if (!isNullOrUndefined(this.treeGrid['virtualScrollModule'])) {
|
|
919
|
+
this.treeGrid['virtualScrollModule'].visualData = this.flatData;
|
|
920
|
+
this.updatedRecords = this.flatData;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
886
923
|
};
|
|
887
924
|
/**
|
|
888
925
|
* @param {IGanttData} records -Defines the delete record collections.
|
|
@@ -902,7 +939,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
902
939
|
* @private
|
|
903
940
|
*/
|
|
904
941
|
Gantt.prototype.updateContentHeight = function (args) {
|
|
905
|
-
if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
942
|
+
if ((!this.allowTaskbarOverlap && !this.ganttChartModule.isCollapseAll && !this.ganttChartModule.isExpandAll) && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
906
943
|
return;
|
|
907
944
|
}
|
|
908
945
|
else {
|
|
@@ -1268,6 +1305,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1268
1305
|
else {
|
|
1269
1306
|
this.getCurrentRecords(args);
|
|
1270
1307
|
}
|
|
1308
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
1309
|
+
this.updateContentHeight();
|
|
1310
|
+
}
|
|
1271
1311
|
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
1272
1312
|
this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
|
|
1273
1313
|
}
|
|
@@ -1283,6 +1323,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1283
1323
|
}
|
|
1284
1324
|
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
1285
1325
|
this.isLoad = false;
|
|
1326
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
1327
|
+
this.autoCalculateDateScheduling = true;
|
|
1328
|
+
}
|
|
1286
1329
|
this.trigger('dataBound', args);
|
|
1287
1330
|
};
|
|
1288
1331
|
/**
|
|
@@ -1503,6 +1546,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1503
1546
|
break;
|
|
1504
1547
|
case 'projectStartDate':
|
|
1505
1548
|
case 'projectEndDate':
|
|
1549
|
+
this.timelineModule.isZoomToFit = false;
|
|
1506
1550
|
this.dataOperation.calculateProjectDates();
|
|
1507
1551
|
this.updateProjectDates(this.cloneProjectStartDate, this.cloneProjectEndDate, this.isTimelineRoundOff);
|
|
1508
1552
|
break;
|
|
@@ -1546,7 +1590,14 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1546
1590
|
if (prop === 'locale') {
|
|
1547
1591
|
this.isLocaleChanged = true;
|
|
1548
1592
|
}
|
|
1549
|
-
|
|
1593
|
+
if (prop === 'taskFields') {
|
|
1594
|
+
if (!isNullOrUndefined(newProp.taskFields.child)) {
|
|
1595
|
+
return;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
if (prop !== 'allowTaskbarDragAndDrop') {
|
|
1599
|
+
isRefresh = true;
|
|
1600
|
+
}
|
|
1550
1601
|
break;
|
|
1551
1602
|
case 'validateManualTasksOnLinking':
|
|
1552
1603
|
this.validateManualTasksOnLinking = newProp.validateManualTasksOnLinking;
|
|
@@ -2226,6 +2277,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2226
2277
|
* @returns {Promise<any>} .
|
|
2227
2278
|
*/
|
|
2228
2279
|
Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
2280
|
+
if (pdfExportProperties && pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
|
|
2281
|
+
pdfExportProperties.pageOrientation == 'Landscape';
|
|
2282
|
+
}
|
|
2229
2283
|
return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
|
|
2230
2284
|
: null;
|
|
2231
2285
|
};
|
|
@@ -2314,14 +2368,17 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2314
2368
|
this.isTimelineRoundOff = isTimelineRoundOff;
|
|
2315
2369
|
this.timelineModule.refreshTimelineByTimeSpan();
|
|
2316
2370
|
this.dataOperation.reUpdateGanttDataPosition();
|
|
2317
|
-
this.
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
this.ganttChartModule.
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2371
|
+
if (!this.pdfExportModule || (this.pdfExportModule && !this.pdfExportModule.isPdfExport) || (this.pdfExportModule && this.pdfExportModule.isPdfExport && this.pdfExportModule.helper.exportProps &&
|
|
2372
|
+
this.pdfExportModule.helper.exportProps.fitToWidthSettings && !this.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
2373
|
+
this.timelineModule.updateChartByNewTimeline();
|
|
2374
|
+
this.ganttChartModule.chartBodyContent.style.width = formatUnit(this.timelineModule.totalTimelineWidth);
|
|
2375
|
+
this.ganttChartModule.updateLastRowBottomWidth();
|
|
2376
|
+
if (this.taskFields.dependency) {
|
|
2377
|
+
this.ganttChartModule.reRenderConnectorLines();
|
|
2378
|
+
}
|
|
2379
|
+
if (isFrom !== 'beforeAdd') {
|
|
2380
|
+
this.notify('selectRowByIndex', {});
|
|
2381
|
+
}
|
|
2325
2382
|
}
|
|
2326
2383
|
};
|
|
2327
2384
|
/**
|
|
@@ -2627,8 +2684,11 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2627
2684
|
}
|
|
2628
2685
|
else {
|
|
2629
2686
|
this.editModule.addRecord(data, rowPosition, rowIndex);
|
|
2687
|
+
if (rowPosition === 'Bottom') {
|
|
2688
|
+
this.selectedRowIndex = rowIndex;
|
|
2689
|
+
}
|
|
2630
2690
|
if (rowPosition === 'Above' || rowPosition === 'Below' || rowPosition === 'Child') {
|
|
2631
|
-
this.currentSelection = data;
|
|
2691
|
+
this.currentSelection = !isNullOrUndefined(data) ? data : this.currentSelection;
|
|
2632
2692
|
}
|
|
2633
2693
|
}
|
|
2634
2694
|
}
|
|
@@ -2896,8 +2956,15 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2896
2956
|
* @returns {HTMLElement} .
|
|
2897
2957
|
*/
|
|
2898
2958
|
Gantt.prototype.getRowByID = function (id) {
|
|
2959
|
+
var _this = this;
|
|
2899
2960
|
var record = this.getRecordByID(id.toString());
|
|
2900
|
-
var index
|
|
2961
|
+
var index;
|
|
2962
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
2963
|
+
index = this.updatedRecords.map(function (item) { return item[_this.taskFields.id]; }).indexOf(record.ganttProperties.taskId);
|
|
2964
|
+
}
|
|
2965
|
+
else {
|
|
2966
|
+
index = this.updatedRecords.indexOf(record);
|
|
2967
|
+
}
|
|
2901
2968
|
if (index !== -1) {
|
|
2902
2969
|
return this.getRowByIndex(index);
|
|
2903
2970
|
}
|
|
@@ -3358,6 +3425,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
3358
3425
|
__decorate([
|
|
3359
3426
|
Property(true)
|
|
3360
3427
|
], Gantt.prototype, "enableVirtualMaskRow", void 0);
|
|
3428
|
+
__decorate([
|
|
3429
|
+
Property(false)
|
|
3430
|
+
], Gantt.prototype, "loadChildOnDemand", void 0);
|
|
3361
3431
|
__decorate([
|
|
3362
3432
|
Property(true)
|
|
3363
3433
|
], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
|
|
@@ -802,6 +802,8 @@ export interface PdfExportProperties {
|
|
|
802
802
|
exportType?: ExportType;
|
|
803
803
|
/** Indicates whether to show the predecessors in exported Pdf */
|
|
804
804
|
showPredecessorLines?: boolean;
|
|
805
|
+
/** Defines the export options in rendering each row fit to the PDF page width */
|
|
806
|
+
fitToWidthSettings?: FitToWidthSettings;
|
|
805
807
|
}
|
|
806
808
|
export interface PdfQueryCellInfoEventArgs {
|
|
807
809
|
/** Defines the column of the current cell. */
|
|
@@ -886,6 +888,18 @@ export interface ITaskbarStyle {
|
|
|
886
888
|
criticalProgressColor?: PdfColor;
|
|
887
889
|
/** Defines the child taskbar border color */
|
|
888
890
|
criticalTaskBorderColor?: PdfColor;
|
|
891
|
+
/** Defines the baseline color */
|
|
892
|
+
baselineColor?: PdfColor;
|
|
893
|
+
/** Defines the baseline border color */
|
|
894
|
+
baselineBorderColor?: PdfColor;
|
|
895
|
+
}
|
|
896
|
+
export interface FitToWidthSettings {
|
|
897
|
+
/** Specifies whether to export gantt data where each row is adjusted and rendered to fit the PDF document page size. */
|
|
898
|
+
isFitToWidth?: boolean;
|
|
899
|
+
/** Specifies the grid width in percentage while exporting. */
|
|
900
|
+
gridWidth?: string;
|
|
901
|
+
/** Specifies the chart width in percentage while exporting. */
|
|
902
|
+
chartWidth?: string;
|
|
889
903
|
}
|
|
890
904
|
export interface IGanttStyle {
|
|
891
905
|
/** Defines the columnHeader style. */
|
|
@@ -5,9 +5,9 @@ import { DateProcessor } from './date-processor';
|
|
|
5
5
|
* To calculate and update task related values
|
|
6
6
|
*/
|
|
7
7
|
export declare class TaskProcessor extends DateProcessor {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
recordIndex: number;
|
|
9
|
+
dataArray: Object[];
|
|
10
|
+
taskIds: Object[];
|
|
11
11
|
private segmentCollection;
|
|
12
12
|
private hierarchyData;
|
|
13
13
|
constructor(parent: Gantt);
|
|
@@ -21,7 +21,7 @@ export declare class TaskProcessor extends DateProcessor {
|
|
|
21
21
|
private processTimeline;
|
|
22
22
|
private initDataSource;
|
|
23
23
|
private constructDataSource;
|
|
24
|
-
|
|
24
|
+
cloneDataSource(): void;
|
|
25
25
|
/**
|
|
26
26
|
* @param {object[]} resources .
|
|
27
27
|
* @param {object[]} data .
|