@syncfusion/ej2-gantt 20.3.48 → 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 +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 +66 -16
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +59 -9
- 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 +14 -14
- package/src/gantt/actions/context-menu.js +3 -1
- package/src/gantt/actions/edit.js +3 -0
- 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/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
|
}
|
|
@@ -7623,7 +7637,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7623
7637
|
return data.level === 0 ? 'R-' + data.ganttProperties.taskId : 'T-' + data.ganttProperties.taskId;
|
|
7624
7638
|
};
|
|
7625
7639
|
GanttTreeGrid.prototype.updateScrollTop = function (args) {
|
|
7626
|
-
|
|
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;
|
|
7627
7648
|
this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
|
|
7628
7649
|
};
|
|
7629
7650
|
GanttTreeGrid.prototype.treeGridClickHandler = function (e) {
|
|
@@ -24652,6 +24673,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24652
24673
|
}
|
|
24653
24674
|
/*Child collection update*/
|
|
24654
24675
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
24676
|
+
if (!this.parent.taskFields.child) {
|
|
24677
|
+
this.parent.taskFields.child = 'Children';
|
|
24678
|
+
}
|
|
24655
24679
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
24656
24680
|
isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
|
|
24657
24681
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
@@ -28960,7 +28984,9 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
28960
28984
|
ContextMenu$$1.prototype.contextMenuOpen = function (args) {
|
|
28961
28985
|
this.isOpen = true;
|
|
28962
28986
|
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
28963
|
-
|
|
28987
|
+
if (!isNullOrUndefined(firstMenuItem)) {
|
|
28988
|
+
addClass([firstMenuItem], 'e-focused');
|
|
28989
|
+
}
|
|
28964
28990
|
};
|
|
28965
28991
|
ContextMenu$$1.prototype.getMenuItems = function () {
|
|
28966
28992
|
var menuItems = !isNullOrUndefined(this.parent.contextMenuItems) ?
|
|
@@ -31606,6 +31632,9 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
31606
31632
|
if (typeof this.value === 'string') {
|
|
31607
31633
|
/* eslint-disable-next-line */
|
|
31608
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
|
+
}
|
|
31609
31638
|
/* eslint-disable-next-line */
|
|
31610
31639
|
var slr = layouter.layout(this.value, font, this.style.format, new SizeF(Number.MAX_VALUE, Number.MAX_VALUE), false, new SizeF(0, 0));
|
|
31611
31640
|
width += slr.actualSize.width;
|
|
@@ -31639,6 +31668,9 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
31639
31668
|
}
|
|
31640
31669
|
/* eslint-disable */
|
|
31641
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
|
+
}
|
|
31642
31674
|
/* eslint-disable */
|
|
31643
31675
|
var slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
|
|
31644
31676
|
height += slr.actualSize.height;
|
|
@@ -31706,6 +31738,9 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
31706
31738
|
else {
|
|
31707
31739
|
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
31708
31740
|
}
|
|
31741
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
31742
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
31743
|
+
}
|
|
31709
31744
|
var innerLayoutArea = bounds;
|
|
31710
31745
|
if (!this.isHeaderCell) {
|
|
31711
31746
|
/* eslint-disable-next-line */
|
|
@@ -33077,6 +33112,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33077
33112
|
this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
|
|
33078
33113
|
//Draw Taskbar
|
|
33079
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
|
+
}
|
|
33080
33118
|
var fontColor = null;
|
|
33081
33119
|
var fontBrush = new PdfSolidBrush(this.progressFontColor);
|
|
33082
33120
|
var progressFormat = new PdfStringFormat();
|
|
@@ -33242,6 +33280,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33242
33280
|
!isNullOrUndefined(this.rightTaskLabel.value) && !this.rightTaskLabel.isCompleted) {
|
|
33243
33281
|
var result = this.getWidth(this.rightTaskLabel.value, detail.endPoint - left, 15);
|
|
33244
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
|
+
}
|
|
33245
33286
|
var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
33246
33287
|
var point = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
33247
33288
|
var size = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -33297,6 +33338,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33297
33338
|
&& !this.leftTaskLabel.isCompleted) {
|
|
33298
33339
|
var result = this.getWidth(this.leftTaskLabel.value, detail.endPoint - left, 15);
|
|
33299
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
|
+
}
|
|
33300
33344
|
var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
33301
33345
|
var rightLabelpoint = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
33302
33346
|
var rightLabelSize = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -33325,6 +33369,9 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
33325
33369
|
};
|
|
33326
33370
|
PdfGanttTaskbarCollection.prototype.getWidth = function (value, width, height) {
|
|
33327
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
|
+
}
|
|
33328
33375
|
var layouter = new PdfStringLayouter();
|
|
33329
33376
|
var progressFormat = new PdfStringFormat();
|
|
33330
33377
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
@@ -33545,6 +33592,9 @@ var PdfTimeline = /** @__PURE__ @class */ (function () {
|
|
|
33545
33592
|
var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
33546
33593
|
graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
|
|
33547
33594
|
var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
|
|
33595
|
+
if (ganttStyle.font) {
|
|
33596
|
+
font = ganttStyle.font;
|
|
33597
|
+
}
|
|
33548
33598
|
var textBrush = new PdfSolidBrush(eventArgs.timelineCell.fontColor);
|
|
33549
33599
|
var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
33550
33600
|
var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|