@syncfusion/ej2-gantt 20.3.48 → 20.3.50
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 +22 -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 +79 -18
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +72 -11
- 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 +17 -17
- package/src/gantt/actions/context-menu.js +3 -1
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +3 -0
- package/src/gantt/actions/keyboard.js +8 -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 +16 -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) {
|
|
@@ -12446,7 +12467,14 @@ class FocusModule {
|
|
|
12446
12467
|
|| (ganttObj.editSettings.allowTaskbarEditing && !ganttObj.editModule.taskbarEditModule.touchEdit))) {
|
|
12447
12468
|
if ((ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectionModule.selectedRowIndexes.length)
|
|
12448
12469
|
|| (ganttObj.selectionSettings.mode === 'Cell' && ganttObj.selectionModule.getSelectedRowCellIndexes().length)) {
|
|
12449
|
-
|
|
12470
|
+
if (!isNullOrUndefined(e.target)) {
|
|
12471
|
+
if (e.target['tagName'] !== 'INPUT') {
|
|
12472
|
+
ganttObj.editModule.startDeleteAction();
|
|
12473
|
+
}
|
|
12474
|
+
}
|
|
12475
|
+
else {
|
|
12476
|
+
ganttObj.editModule.startDeleteAction();
|
|
12477
|
+
}
|
|
12450
12478
|
}
|
|
12451
12479
|
}
|
|
12452
12480
|
break;
|
|
@@ -20613,7 +20641,7 @@ class DialogEdit {
|
|
|
20613
20641
|
if (gridObj.isEdit) {
|
|
20614
20642
|
gridObj.endEdit();
|
|
20615
20643
|
}
|
|
20616
|
-
if (isEdit) {
|
|
20644
|
+
if (isEdit && gridObj.currentViewData.length != gridObj.dataSource['length']) {
|
|
20617
20645
|
dataSource = gridObj.dataSource;
|
|
20618
20646
|
}
|
|
20619
20647
|
else {
|
|
@@ -24142,6 +24170,9 @@ class Edit$2 {
|
|
|
24142
24170
|
}
|
|
24143
24171
|
/*Child collection update*/
|
|
24144
24172
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
24173
|
+
if (!this.parent.taskFields.child) {
|
|
24174
|
+
this.parent.taskFields.child = 'Children';
|
|
24175
|
+
}
|
|
24145
24176
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
24146
24177
|
isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
|
|
24147
24178
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
@@ -28404,7 +28435,9 @@ class ContextMenu$2 {
|
|
|
28404
28435
|
contextMenuOpen(args) {
|
|
28405
28436
|
this.isOpen = true;
|
|
28406
28437
|
const firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
28407
|
-
|
|
28438
|
+
if (!isNullOrUndefined(firstMenuItem)) {
|
|
28439
|
+
addClass([firstMenuItem], 'e-focused');
|
|
28440
|
+
}
|
|
28408
28441
|
}
|
|
28409
28442
|
getMenuItems() {
|
|
28410
28443
|
const menuItems = !isNullOrUndefined(this.parent.contextMenuItems) ?
|
|
@@ -30904,7 +30937,10 @@ class PdfTreeGridCell {
|
|
|
30904
30937
|
const layouter = new PdfStringLayouter();
|
|
30905
30938
|
if (typeof this.value === 'string') {
|
|
30906
30939
|
/* eslint-disable-next-line */
|
|
30907
|
-
|
|
30940
|
+
let font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
30941
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
30942
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
30943
|
+
}
|
|
30908
30944
|
/* eslint-disable-next-line */
|
|
30909
30945
|
const slr = layouter.layout(this.value, font, this.style.format, new SizeF(Number.MAX_VALUE, Number.MAX_VALUE), false, new SizeF(0, 0));
|
|
30910
30946
|
width += slr.actualSize.width;
|
|
@@ -30937,7 +30973,10 @@ class PdfTreeGridCell {
|
|
|
30937
30973
|
currentValue = !(isNullOrUndefined(this.remainingString) || this.remainingString === '') ? this.remainingString : this.value;
|
|
30938
30974
|
}
|
|
30939
30975
|
/* eslint-disable */
|
|
30940
|
-
|
|
30976
|
+
let font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
30977
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
30978
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
30979
|
+
}
|
|
30941
30980
|
/* eslint-disable */
|
|
30942
30981
|
const slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
|
|
30943
30982
|
height += slr.actualSize.height;
|
|
@@ -31005,6 +31044,9 @@ class PdfTreeGridCell {
|
|
|
31005
31044
|
else {
|
|
31006
31045
|
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
31007
31046
|
}
|
|
31047
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
31048
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
31049
|
+
}
|
|
31008
31050
|
let innerLayoutArea = bounds;
|
|
31009
31051
|
if (!this.isHeaderCell) {
|
|
31010
31052
|
/* eslint-disable-next-line */
|
|
@@ -32266,7 +32308,11 @@ class PdfGanttTaskbarCollection {
|
|
|
32266
32308
|
}
|
|
32267
32309
|
this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
|
|
32268
32310
|
//Draw Taskbar
|
|
32269
|
-
|
|
32311
|
+
let font = new PdfStandardFont(this.fontFamily, 9, PdfFontStyle.Regular);
|
|
32312
|
+
if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
|
|
32313
|
+
this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32314
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32315
|
+
}
|
|
32270
32316
|
const fontColor = null;
|
|
32271
32317
|
const fontBrush = new PdfSolidBrush(this.progressFontColor);
|
|
32272
32318
|
const progressFormat = new PdfStringFormat();
|
|
@@ -32431,7 +32477,11 @@ class PdfGanttTaskbarCollection {
|
|
|
32431
32477
|
if (detail.startPoint <= left && left < detail.endPoint &&
|
|
32432
32478
|
!isNullOrUndefined(this.rightTaskLabel.value) && !this.rightTaskLabel.isCompleted) {
|
|
32433
32479
|
const result = this.getWidth(this.rightTaskLabel.value, detail.endPoint - left, 15);
|
|
32434
|
-
|
|
32480
|
+
let font = new PdfStandardFont(this.fontFamily, 9);
|
|
32481
|
+
if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
|
|
32482
|
+
this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32483
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32484
|
+
}
|
|
32435
32485
|
const adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
32436
32486
|
const point = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
32437
32487
|
const size = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -32486,7 +32536,11 @@ class PdfGanttTaskbarCollection {
|
|
|
32486
32536
|
if (detail.startPoint <= left && left < detail.endPoint && !isNullOrUndefined(this.leftTaskLabel.value)
|
|
32487
32537
|
&& !this.leftTaskLabel.isCompleted) {
|
|
32488
32538
|
const result = this.getWidth(this.leftTaskLabel.value, detail.endPoint - left, 15);
|
|
32489
|
-
|
|
32539
|
+
let font = new PdfStandardFont(this.fontFamily, 9);
|
|
32540
|
+
if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
|
|
32541
|
+
this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32542
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32543
|
+
}
|
|
32490
32544
|
const adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
32491
32545
|
const rightLabelpoint = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
32492
32546
|
const rightLabelSize = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -32514,7 +32568,11 @@ class PdfGanttTaskbarCollection {
|
|
|
32514
32568
|
}
|
|
32515
32569
|
}
|
|
32516
32570
|
getWidth(value, width, height) {
|
|
32517
|
-
|
|
32571
|
+
let font = new PdfStandardFont(this.fontFamily, 9);
|
|
32572
|
+
if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
|
|
32573
|
+
this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
32574
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
32575
|
+
}
|
|
32518
32576
|
const layouter = new PdfStringLayouter();
|
|
32519
32577
|
const progressFormat = new PdfStringFormat();
|
|
32520
32578
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
@@ -32733,7 +32791,10 @@ class PdfTimeline {
|
|
|
32733
32791
|
const rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
|
|
32734
32792
|
const rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
32735
32793
|
graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
|
|
32736
|
-
|
|
32794
|
+
let font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
|
|
32795
|
+
if (ganttStyle.font) {
|
|
32796
|
+
font = ganttStyle.font;
|
|
32797
|
+
}
|
|
32737
32798
|
const textBrush = new PdfSolidBrush(eventArgs.timelineCell.fontColor);
|
|
32738
32799
|
const pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
32739
32800
|
const pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|