@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
|
@@ -2918,7 +2918,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
2918
2918
|
this.parent.setRecordValue(dataMapping.id, ganttProperties.taskId, ganttData);
|
|
2919
2919
|
}
|
|
2920
2920
|
if (dataMapping.name) {
|
|
2921
|
-
this.parent.
|
|
2921
|
+
if (!this.parent.isLoad) {
|
|
2922
|
+
this.parent.setRecordValue('taskData.' + dataMapping.name, ganttProperties.taskName, ganttData);
|
|
2923
|
+
}
|
|
2922
2924
|
this.parent.setRecordValue(dataMapping.name, ganttProperties.taskName, ganttData);
|
|
2923
2925
|
}
|
|
2924
2926
|
if (dataMapping.startDate) {
|
|
@@ -2934,7 +2936,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
2934
2936
|
data[dataMapping.durationUnit] = ganttProperties.durationUnit;
|
|
2935
2937
|
}
|
|
2936
2938
|
if (dataMapping.progress) {
|
|
2937
|
-
this.parent.
|
|
2939
|
+
if (!this.parent.isLoad) {
|
|
2940
|
+
this.parent.setRecordValue('taskData.' + dataMapping.progress, ganttProperties.progress, ganttData);
|
|
2941
|
+
}
|
|
2938
2942
|
this.parent.setRecordValue(dataMapping.progress, ganttProperties.progress, ganttData);
|
|
2939
2943
|
}
|
|
2940
2944
|
if (dataMapping.baselineStartDate) {
|
|
@@ -2944,15 +2948,21 @@ class TaskProcessor extends DateProcessor {
|
|
|
2944
2948
|
this.setRecordDate(ganttData, ganttProperties.baselineEndDate, dataMapping.baselineEndDate);
|
|
2945
2949
|
}
|
|
2946
2950
|
if (dataMapping.notes) {
|
|
2947
|
-
this.parent.
|
|
2951
|
+
if (!this.parent.isLoad) {
|
|
2952
|
+
this.parent.setRecordValue('taskData.' + dataMapping.notes, ganttProperties.notes, ganttData);
|
|
2953
|
+
}
|
|
2948
2954
|
this.parent.setRecordValue(dataMapping.notes, ganttProperties.notes, ganttData);
|
|
2949
2955
|
}
|
|
2950
2956
|
if (dataMapping.cssClass) {
|
|
2951
|
-
this.parent.
|
|
2957
|
+
if (!this.parent.isLoad) {
|
|
2958
|
+
this.parent.setRecordValue('taskData.' + dataMapping.cssClass, ganttProperties.cssClass, ganttData);
|
|
2959
|
+
}
|
|
2952
2960
|
this.parent.setRecordValue(dataMapping.cssClass, ganttProperties.cssClass, ganttData);
|
|
2953
2961
|
}
|
|
2954
2962
|
if (dataMapping.indicators) {
|
|
2955
|
-
this.parent.
|
|
2963
|
+
if (!this.parent.isLoad) {
|
|
2964
|
+
this.parent.setRecordValue('taskData.' + dataMapping.indicators, ganttProperties.indicators, ganttData);
|
|
2965
|
+
}
|
|
2956
2966
|
this.parent.setRecordValue(dataMapping.indicators, ganttProperties.indicators, ganttData);
|
|
2957
2967
|
}
|
|
2958
2968
|
if (dataMapping.parentID) {
|
|
@@ -2961,11 +2971,15 @@ class TaskProcessor extends DateProcessor {
|
|
|
2961
2971
|
this.parent.setRecordValue(dataMapping.parentID, ganttProperties.parentId, ganttData);
|
|
2962
2972
|
}
|
|
2963
2973
|
if (dataMapping.work) {
|
|
2964
|
-
this.parent.
|
|
2974
|
+
if (!this.parent.isLoad) {
|
|
2975
|
+
this.parent.setRecordValue('taskData.' + dataMapping.work, this.getWorkString(ganttProperties.work, ganttProperties.workUnit), ganttData);
|
|
2976
|
+
}
|
|
2965
2977
|
this.parent.setRecordValue(dataMapping.work, ganttProperties.work, ganttData);
|
|
2966
2978
|
}
|
|
2967
2979
|
if (dataMapping.type) {
|
|
2968
|
-
this.parent.
|
|
2980
|
+
if (!this.parent.isLoad) {
|
|
2981
|
+
this.parent.setRecordValue('taskData.' + dataMapping.type, ganttProperties.taskType, ganttData);
|
|
2982
|
+
}
|
|
2969
2983
|
this.parent.setRecordValue(dataMapping.type, ganttProperties.taskType, ganttData);
|
|
2970
2984
|
}
|
|
2971
2985
|
}
|
|
@@ -7549,7 +7563,14 @@ class GanttTreeGrid {
|
|
|
7549
7563
|
return data.level === 0 ? 'R-' + data.ganttProperties.taskId : 'T-' + data.ganttProperties.taskId;
|
|
7550
7564
|
}
|
|
7551
7565
|
updateScrollTop(args) {
|
|
7552
|
-
|
|
7566
|
+
let newScrollTop;
|
|
7567
|
+
if (getValue('top', args) > (this.parent.flatData.length * this.parent.rowHeight)) {
|
|
7568
|
+
newScrollTop = getValue('top', args) - document.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'];
|
|
7569
|
+
}
|
|
7570
|
+
else {
|
|
7571
|
+
newScrollTop = getValue('top', args);
|
|
7572
|
+
}
|
|
7573
|
+
this.treeGridElement.querySelector('.e-content').scrollTop = newScrollTop;
|
|
7553
7574
|
this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
|
|
7554
7575
|
}
|
|
7555
7576
|
treeGridClickHandler(e) {
|
|
@@ -24142,6 +24163,9 @@ class Edit$2 {
|
|
|
24142
24163
|
}
|
|
24143
24164
|
/*Child collection update*/
|
|
24144
24165
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
24166
|
+
if (!this.parent.taskFields.child) {
|
|
24167
|
+
this.parent.taskFields.child = 'Children';
|
|
24168
|
+
}
|
|
24145
24169
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
24146
24170
|
isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
|
|
24147
24171
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
@@ -28404,7 +28428,9 @@ class ContextMenu$2 {
|
|
|
28404
28428
|
contextMenuOpen(args) {
|
|
28405
28429
|
this.isOpen = true;
|
|
28406
28430
|
const firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
28407
|
-
|
|
28431
|
+
if (!isNullOrUndefined(firstMenuItem)) {
|
|
28432
|
+
addClass([firstMenuItem], 'e-focused');
|
|
28433
|
+
}
|
|
28408
28434
|
}
|
|
28409
28435
|
getMenuItems() {
|
|
28410
28436
|
const menuItems = !isNullOrUndefined(this.parent.contextMenuItems) ?
|
|
@@ -30904,7 +30930,10 @@ class PdfTreeGridCell {
|
|
|
30904
30930
|
const layouter = new PdfStringLayouter();
|
|
30905
30931
|
if (typeof this.value === 'string') {
|
|
30906
30932
|
/* eslint-disable-next-line */
|
|
30907
|
-
|
|
30933
|
+
let font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
30934
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
30935
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
30936
|
+
}
|
|
30908
30937
|
/* eslint-disable-next-line */
|
|
30909
30938
|
const slr = layouter.layout(this.value, font, this.style.format, new SizeF(Number.MAX_VALUE, Number.MAX_VALUE), false, new SizeF(0, 0));
|
|
30910
30939
|
width += slr.actualSize.width;
|
|
@@ -30937,7 +30966,10 @@ class PdfTreeGridCell {
|
|
|
30937
30966
|
currentValue = !(isNullOrUndefined(this.remainingString) || this.remainingString === '') ? this.remainingString : this.value;
|
|
30938
30967
|
}
|
|
30939
30968
|
/* eslint-disable */
|
|
30940
|
-
|
|
30969
|
+
let font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
30970
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
30971
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
30972
|
+
}
|
|
30941
30973
|
/* eslint-disable */
|
|
30942
30974
|
const slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
|
|
30943
30975
|
height += slr.actualSize.height;
|
|
@@ -31005,6 +31037,9 @@ class PdfTreeGridCell {
|
|
|
31005
31037
|
else {
|
|
31006
31038
|
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
31007
31039
|
}
|
|
31040
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
31041
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
31042
|
+
}
|
|
31008
31043
|
let innerLayoutArea = bounds;
|
|
31009
31044
|
if (!this.isHeaderCell) {
|
|
31010
31045
|
/* eslint-disable-next-line */
|
|
@@ -32266,7 +32301,10 @@ class PdfGanttTaskbarCollection {
|
|
|
32266
32301
|
}
|
|
32267
32302
|
this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
|
|
32268
32303
|
//Draw Taskbar
|
|
32269
|
-
|
|
32304
|
+
let font = new PdfStandardFont(this.fontFamily, 9, PdfFontStyle.Regular);
|
|
32305
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32306
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32307
|
+
}
|
|
32270
32308
|
const fontColor = null;
|
|
32271
32309
|
const fontBrush = new PdfSolidBrush(this.progressFontColor);
|
|
32272
32310
|
const progressFormat = new PdfStringFormat();
|
|
@@ -32431,7 +32469,10 @@ class PdfGanttTaskbarCollection {
|
|
|
32431
32469
|
if (detail.startPoint <= left && left < detail.endPoint &&
|
|
32432
32470
|
!isNullOrUndefined(this.rightTaskLabel.value) && !this.rightTaskLabel.isCompleted) {
|
|
32433
32471
|
const result = this.getWidth(this.rightTaskLabel.value, detail.endPoint - left, 15);
|
|
32434
|
-
|
|
32472
|
+
let font = new PdfStandardFont(this.fontFamily, 9);
|
|
32473
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32474
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32475
|
+
}
|
|
32435
32476
|
const adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
32436
32477
|
const point = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
32437
32478
|
const size = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -32486,7 +32527,10 @@ class PdfGanttTaskbarCollection {
|
|
|
32486
32527
|
if (detail.startPoint <= left && left < detail.endPoint && !isNullOrUndefined(this.leftTaskLabel.value)
|
|
32487
32528
|
&& !this.leftTaskLabel.isCompleted) {
|
|
32488
32529
|
const result = this.getWidth(this.leftTaskLabel.value, detail.endPoint - left, 15);
|
|
32489
|
-
|
|
32530
|
+
let font = new PdfStandardFont(this.fontFamily, 9);
|
|
32531
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32532
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32533
|
+
}
|
|
32490
32534
|
const adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
32491
32535
|
const rightLabelpoint = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
32492
32536
|
const rightLabelSize = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -32514,7 +32558,10 @@ class PdfGanttTaskbarCollection {
|
|
|
32514
32558
|
}
|
|
32515
32559
|
}
|
|
32516
32560
|
getWidth(value, width, height) {
|
|
32517
|
-
|
|
32561
|
+
let font = new PdfStandardFont(this.fontFamily, 9);
|
|
32562
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32563
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32564
|
+
}
|
|
32518
32565
|
const layouter = new PdfStringLayouter();
|
|
32519
32566
|
const progressFormat = new PdfStringFormat();
|
|
32520
32567
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
@@ -32733,7 +32780,10 @@ class PdfTimeline {
|
|
|
32733
32780
|
const rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
|
|
32734
32781
|
const rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
32735
32782
|
graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
|
|
32736
|
-
|
|
32783
|
+
let font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
|
|
32784
|
+
if (ganttStyle.font) {
|
|
32785
|
+
font = ganttStyle.font;
|
|
32786
|
+
}
|
|
32737
32787
|
const textBrush = new PdfSolidBrush(eventArgs.timelineCell.fontColor);
|
|
32738
32788
|
const pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
32739
32789
|
const pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|