@syncfusion/ej2-gantt 20.3.47 → 20.3.49
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 +25 -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 +85 -24
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +78 -17
- 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/context-menu.js +3 -1
- package/src/gantt/actions/dialog-edit.js +8 -5
- package/src/gantt/actions/edit.js +6 -1
- package/src/gantt/base/gantt-chart.js +3 -0
- package/src/gantt/base/gantt.js +3 -1
- package/src/gantt/base/interface.d.ts +13 -1
- package/src/gantt/base/task-processor.js +21 -7
- package/src/gantt/base/tree-grid.js +8 -1
- package/src/gantt/export/pdf-base/pdf-grid-table.js +9 -0
- package/src/gantt/export/pdf-taskbar.js +12 -0
- package/src/gantt/export/pdf-timeline.js +3 -0
- package/src/gantt/renderer/timeline.js +1 -1
- package/src/gantt/renderer/tooltip.js +1 -0
- package/styles/bootstrap4.css +1 -1
- package/styles/gantt/bootstrap4.css +1 -1
|
@@ -2960,7 +2960,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2960
2960
|
this.parent.setRecordValue(dataMapping.id, ganttProperties.taskId, ganttData);
|
|
2961
2961
|
}
|
|
2962
2962
|
if (dataMapping.name) {
|
|
2963
|
-
this.parent.
|
|
2963
|
+
if (!this.parent.isLoad) {
|
|
2964
|
+
this.parent.setRecordValue('taskData.' + dataMapping.name, ganttProperties.taskName, ganttData);
|
|
2965
|
+
}
|
|
2964
2966
|
this.parent.setRecordValue(dataMapping.name, ganttProperties.taskName, ganttData);
|
|
2965
2967
|
}
|
|
2966
2968
|
if (dataMapping.startDate) {
|
|
@@ -2976,7 +2978,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2976
2978
|
data[dataMapping.durationUnit] = ganttProperties.durationUnit;
|
|
2977
2979
|
}
|
|
2978
2980
|
if (dataMapping.progress) {
|
|
2979
|
-
this.parent.
|
|
2981
|
+
if (!this.parent.isLoad) {
|
|
2982
|
+
this.parent.setRecordValue('taskData.' + dataMapping.progress, ganttProperties.progress, ganttData);
|
|
2983
|
+
}
|
|
2980
2984
|
this.parent.setRecordValue(dataMapping.progress, ganttProperties.progress, ganttData);
|
|
2981
2985
|
}
|
|
2982
2986
|
if (dataMapping.baselineStartDate) {
|
|
@@ -2986,15 +2990,21 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2986
2990
|
this.setRecordDate(ganttData, ganttProperties.baselineEndDate, dataMapping.baselineEndDate);
|
|
2987
2991
|
}
|
|
2988
2992
|
if (dataMapping.notes) {
|
|
2989
|
-
this.parent.
|
|
2993
|
+
if (!this.parent.isLoad) {
|
|
2994
|
+
this.parent.setRecordValue('taskData.' + dataMapping.notes, ganttProperties.notes, ganttData);
|
|
2995
|
+
}
|
|
2990
2996
|
this.parent.setRecordValue(dataMapping.notes, ganttProperties.notes, ganttData);
|
|
2991
2997
|
}
|
|
2992
2998
|
if (dataMapping.cssClass) {
|
|
2993
|
-
this.parent.
|
|
2999
|
+
if (!this.parent.isLoad) {
|
|
3000
|
+
this.parent.setRecordValue('taskData.' + dataMapping.cssClass, ganttProperties.cssClass, ganttData);
|
|
3001
|
+
}
|
|
2994
3002
|
this.parent.setRecordValue(dataMapping.cssClass, ganttProperties.cssClass, ganttData);
|
|
2995
3003
|
}
|
|
2996
3004
|
if (dataMapping.indicators) {
|
|
2997
|
-
this.parent.
|
|
3005
|
+
if (!this.parent.isLoad) {
|
|
3006
|
+
this.parent.setRecordValue('taskData.' + dataMapping.indicators, ganttProperties.indicators, ganttData);
|
|
3007
|
+
}
|
|
2998
3008
|
this.parent.setRecordValue(dataMapping.indicators, ganttProperties.indicators, ganttData);
|
|
2999
3009
|
}
|
|
3000
3010
|
if (dataMapping.parentID) {
|
|
@@ -3003,11 +3013,15 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3003
3013
|
this.parent.setRecordValue(dataMapping.parentID, ganttProperties.parentId, ganttData);
|
|
3004
3014
|
}
|
|
3005
3015
|
if (dataMapping.work) {
|
|
3006
|
-
this.parent.
|
|
3016
|
+
if (!this.parent.isLoad) {
|
|
3017
|
+
this.parent.setRecordValue('taskData.' + dataMapping.work, this.getWorkString(ganttProperties.work, ganttProperties.workUnit), ganttData);
|
|
3018
|
+
}
|
|
3007
3019
|
this.parent.setRecordValue(dataMapping.work, ganttProperties.work, ganttData);
|
|
3008
3020
|
}
|
|
3009
3021
|
if (dataMapping.type) {
|
|
3010
|
-
this.parent.
|
|
3022
|
+
if (!this.parent.isLoad) {
|
|
3023
|
+
this.parent.setRecordValue('taskData.' + dataMapping.type, ganttProperties.taskType, ganttData);
|
|
3024
|
+
}
|
|
3011
3025
|
this.parent.setRecordValue(dataMapping.type, ganttProperties.taskType, ganttData);
|
|
3012
3026
|
}
|
|
3013
3027
|
}
|
|
@@ -4833,6 +4847,9 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4833
4847
|
* @private
|
|
4834
4848
|
*/
|
|
4835
4849
|
GanttChart.prototype.collapsedGanttRow = function (args) {
|
|
4850
|
+
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
4851
|
+
return;
|
|
4852
|
+
}
|
|
4836
4853
|
var record = getValue('data', args);
|
|
4837
4854
|
if (this.isExpandCollapseFromChart) {
|
|
4838
4855
|
this.expandCollapseChartRows('collapse', getValue('chartRow', args), record, null);
|
|
@@ -6356,7 +6373,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6356
6373
|
endDate.setHours(24, 0, 0, 0);
|
|
6357
6374
|
}
|
|
6358
6375
|
}
|
|
6359
|
-
if ((this.isZooming || this.parent.isLoad) && isNullOrUndefined(this.parent.projectEndDate)) {
|
|
6376
|
+
if ((this.isZooming || this.parent.isLoad || this.parent.isFromOnPropertyChange) && isNullOrUndefined(this.parent.projectEndDate)) {
|
|
6360
6377
|
this.updateTimelineAfterZooming(endDate, false);
|
|
6361
6378
|
}
|
|
6362
6379
|
return endDate;
|
|
@@ -7620,7 +7637,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7620
7637
|
return data.level === 0 ? 'R-' + data.ganttProperties.taskId : 'T-' + data.ganttProperties.taskId;
|
|
7621
7638
|
};
|
|
7622
7639
|
GanttTreeGrid.prototype.updateScrollTop = function (args) {
|
|
7623
|
-
|
|
7640
|
+
var newScrollTop;
|
|
7641
|
+
if (getValue('top', args) > (this.parent.flatData.length * this.parent.rowHeight)) {
|
|
7642
|
+
newScrollTop = getValue('top', args) - document.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'];
|
|
7643
|
+
}
|
|
7644
|
+
else {
|
|
7645
|
+
newScrollTop = getValue('top', args);
|
|
7646
|
+
}
|
|
7647
|
+
this.treeGridElement.querySelector('.e-content').scrollTop = newScrollTop;
|
|
7624
7648
|
this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
|
|
7625
7649
|
};
|
|
7626
7650
|
GanttTreeGrid.prototype.treeGridClickHandler = function (e) {
|
|
@@ -12376,6 +12400,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
12376
12400
|
args.cancel = true;
|
|
12377
12401
|
}
|
|
12378
12402
|
});
|
|
12403
|
+
this.toolTipObj.content = argsData.content;
|
|
12379
12404
|
if (!this.parent.isAdaptive && args.event.type === 'mouseover') {
|
|
12380
12405
|
this.currentTarget = args.target;
|
|
12381
12406
|
EventHandler.add(this.currentTarget, 'mousemove', this.mouseMoveHandler.bind(this));
|
|
@@ -15343,7 +15368,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15343
15368
|
if (isNullOrUndefined(index)) {
|
|
15344
15369
|
record = this.getRecordByID(id.toString());
|
|
15345
15370
|
chartRow$$1 = this.getRowByID(id);
|
|
15346
|
-
|
|
15371
|
+
if (!isNullOrUndefined(chartRow$$1)) {
|
|
15372
|
+
rowIndex = getValue('rowIndex', chartRow$$1);
|
|
15373
|
+
}
|
|
15347
15374
|
}
|
|
15348
15375
|
else if (!isNullOrUndefined(index)) {
|
|
15349
15376
|
chartRow$$1 = this.getRowByIndex(index);
|
|
@@ -21077,10 +21104,17 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
21077
21104
|
// eslint-disable-next-line
|
|
21078
21105
|
DialogEdit.prototype.updateSegmentsData = function (segmentForm, data) {
|
|
21079
21106
|
var gridObj = segmentForm.ej2_instances[0];
|
|
21107
|
+
var isEdit = gridObj.isEdit;
|
|
21108
|
+
var dataSource;
|
|
21080
21109
|
if (gridObj.isEdit) {
|
|
21081
21110
|
gridObj.endEdit();
|
|
21082
21111
|
}
|
|
21083
|
-
|
|
21112
|
+
if (isEdit) {
|
|
21113
|
+
dataSource = gridObj.dataSource;
|
|
21114
|
+
}
|
|
21115
|
+
else {
|
|
21116
|
+
dataSource = gridObj.currentViewData;
|
|
21117
|
+
}
|
|
21084
21118
|
this.updateSegmentTaskData(dataSource);
|
|
21085
21119
|
};
|
|
21086
21120
|
DialogEdit.prototype.updateGeneralTab = function (generalForm, isCustom) {
|
|
@@ -21174,10 +21208,6 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
21174
21208
|
var ids = [];
|
|
21175
21209
|
for (var i = 0; i < dataSource.length; i++) {
|
|
21176
21210
|
var preData = dataSource[i];
|
|
21177
|
-
var newId = preData.name.split('-')[0];
|
|
21178
|
-
if (preData.id !== newId) {
|
|
21179
|
-
preData.id = newId;
|
|
21180
|
-
}
|
|
21181
21211
|
if (ids.indexOf(preData.id) === -1) {
|
|
21182
21212
|
var name_1 = preData.id + preData.type;
|
|
21183
21213
|
if (preData.offset && preData.offset.indexOf('-') !== -1) {
|
|
@@ -24643,6 +24673,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24643
24673
|
}
|
|
24644
24674
|
/*Child collection update*/
|
|
24645
24675
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
24676
|
+
if (!this.parent.taskFields.child) {
|
|
24677
|
+
this.parent.taskFields.child = 'Children';
|
|
24678
|
+
}
|
|
24646
24679
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
24647
24680
|
isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
|
|
24648
24681
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
@@ -24777,7 +24810,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24777
24810
|
dataSource.push(addedRecord[i].taskData);
|
|
24778
24811
|
}
|
|
24779
24812
|
else {
|
|
24780
|
-
|
|
24813
|
+
if (isNullOrUndefined(addedRecord[i].parentItem)) {
|
|
24814
|
+
this.addDataInRealDataSource(dataSource, addedRecord[i].taskData, rowPosition);
|
|
24815
|
+
}
|
|
24781
24816
|
}
|
|
24782
24817
|
}
|
|
24783
24818
|
this.isBreakLoop = false;
|
|
@@ -28949,7 +28984,9 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
28949
28984
|
ContextMenu$$1.prototype.contextMenuOpen = function (args) {
|
|
28950
28985
|
this.isOpen = true;
|
|
28951
28986
|
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
28952
|
-
|
|
28987
|
+
if (!isNullOrUndefined(firstMenuItem)) {
|
|
28988
|
+
addClass([firstMenuItem], 'e-focused');
|
|
28989
|
+
}
|
|
28953
28990
|
};
|
|
28954
28991
|
ContextMenu$$1.prototype.getMenuItems = function () {
|
|
28955
28992
|
var menuItems = !isNullOrUndefined(this.parent.contextMenuItems) ?
|
|
@@ -31595,6 +31632,9 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
31595
31632
|
if (typeof this.value === 'string') {
|
|
31596
31633
|
/* eslint-disable-next-line */
|
|
31597
31634
|
var font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
31635
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
31636
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
31637
|
+
}
|
|
31598
31638
|
/* eslint-disable-next-line */
|
|
31599
31639
|
var slr = layouter.layout(this.value, font, this.style.format, new SizeF(Number.MAX_VALUE, Number.MAX_VALUE), false, new SizeF(0, 0));
|
|
31600
31640
|
width += slr.actualSize.width;
|
|
@@ -31628,6 +31668,9 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
31628
31668
|
}
|
|
31629
31669
|
/* eslint-disable */
|
|
31630
31670
|
var font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
31671
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
31672
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
31673
|
+
}
|
|
31631
31674
|
/* eslint-disable */
|
|
31632
31675
|
var slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
|
|
31633
31676
|
height += slr.actualSize.height;
|
|
@@ -31695,6 +31738,9 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
31695
31738
|
else {
|
|
31696
31739
|
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
31697
31740
|
}
|
|
31741
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
31742
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
31743
|
+
}
|
|
31698
31744
|
var innerLayoutArea = bounds;
|
|
31699
31745
|
if (!this.isHeaderCell) {
|
|
31700
31746
|
/* eslint-disable-next-line */
|
|
@@ -33066,6 +33112,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33066
33112
|
this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
|
|
33067
33113
|
//Draw Taskbar
|
|
33068
33114
|
var font = new PdfStandardFont(this.fontFamily, 9, PdfFontStyle.Regular);
|
|
33115
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
33116
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
33117
|
+
}
|
|
33069
33118
|
var fontColor = null;
|
|
33070
33119
|
var fontBrush = new PdfSolidBrush(this.progressFontColor);
|
|
33071
33120
|
var progressFormat = new PdfStringFormat();
|
|
@@ -33231,6 +33280,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33231
33280
|
!isNullOrUndefined(this.rightTaskLabel.value) && !this.rightTaskLabel.isCompleted) {
|
|
33232
33281
|
var result = this.getWidth(this.rightTaskLabel.value, detail.endPoint - left, 15);
|
|
33233
33282
|
var font = new PdfStandardFont(this.fontFamily, 9);
|
|
33283
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
33284
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
33285
|
+
}
|
|
33234
33286
|
var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
33235
33287
|
var point = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
33236
33288
|
var size = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -33286,6 +33338,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33286
33338
|
&& !this.leftTaskLabel.isCompleted) {
|
|
33287
33339
|
var result = this.getWidth(this.leftTaskLabel.value, detail.endPoint - left, 15);
|
|
33288
33340
|
var font = new PdfStandardFont(this.fontFamily, 9);
|
|
33341
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
33342
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
33343
|
+
}
|
|
33289
33344
|
var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
33290
33345
|
var rightLabelpoint = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
33291
33346
|
var rightLabelSize = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -33314,6 +33369,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33314
33369
|
};
|
|
33315
33370
|
PdfGanttTaskbarCollection.prototype.getWidth = function (value, width, height) {
|
|
33316
33371
|
var font = new PdfStandardFont(this.fontFamily, 9);
|
|
33372
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
33373
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
33374
|
+
}
|
|
33317
33375
|
var layouter = new PdfStringLayouter();
|
|
33318
33376
|
var progressFormat = new PdfStringFormat();
|
|
33319
33377
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
@@ -33534,6 +33592,9 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
33534
33592
|
var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
33535
33593
|
graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
|
|
33536
33594
|
var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
|
|
33595
|
+
if (ganttStyle.font) {
|
|
33596
|
+
font = ganttStyle.font;
|
|
33597
|
+
}
|
|
33537
33598
|
var textBrush = new PdfSolidBrush(eventArgs.timelineCell.fontColor);
|
|
33538
33599
|
var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
33539
33600
|
var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|