@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.3.
|
|
3
|
+
* version : 20.3.49
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-gantt@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-gantt@20.3.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.3.48",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-N2zofXz/onMGBz+cAMn0tl9QWbncq9Yz54oi001UB2zVN57sDolIgOnS7DXmP0Sz38+Ff+t3Nv0DiXMjIirVhg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-gantt",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-gantt",
|
|
24
24
|
"/@syncfusion/ej2-vue-gantt"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.3.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.3.48.tgz",
|
|
27
|
+
"_shasum": "48056e66d813021bce8762c3c3ccf28f99f59f57",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~20.3.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~20.3.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~20.3.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.3.49",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.3.49",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~20.3.49",
|
|
41
41
|
"@syncfusion/ej2-data": "~20.3.47",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~20.3.
|
|
43
|
-
"@syncfusion/ej2-grids": "~20.3.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.3.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.3.49",
|
|
43
|
+
"@syncfusion/ej2-grids": "~20.3.49",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.3.49",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~20.3.48",
|
|
46
46
|
"@syncfusion/ej2-lists": "~20.3.47",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~20.3.
|
|
48
|
-
"@syncfusion/ej2-popups": "~20.3.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.3.49",
|
|
48
|
+
"@syncfusion/ej2-popups": "~20.3.49",
|
|
49
49
|
"@syncfusion/ej2-richtexteditor": "~20.3.47",
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~20.3.
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~20.3.49"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
53
53
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
76
76
|
},
|
|
77
77
|
"typings": "index.d.ts",
|
|
78
|
-
"version": "20.3.
|
|
78
|
+
"version": "20.3.49",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -519,7 +519,9 @@ var ContextMenu = /** @class */ (function () {
|
|
|
519
519
|
ContextMenu.prototype.contextMenuOpen = function (args) {
|
|
520
520
|
this.isOpen = true;
|
|
521
521
|
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
522
|
-
|
|
522
|
+
if (!isNullOrUndefined(firstMenuItem)) {
|
|
523
|
+
addClass([firstMenuItem], 'e-focused');
|
|
524
|
+
}
|
|
523
525
|
};
|
|
524
526
|
ContextMenu.prototype.getMenuItems = function () {
|
|
525
527
|
var menuItems = !isNullOrUndefined(this.parent.contextMenuItems) ?
|
|
@@ -2445,6 +2445,9 @@ var Edit = /** @class */ (function () {
|
|
|
2445
2445
|
}
|
|
2446
2446
|
/*Child collection update*/
|
|
2447
2447
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
2448
|
+
if (!this.parent.taskFields.child) {
|
|
2449
|
+
this.parent.taskFields.child = 'Children';
|
|
2450
|
+
}
|
|
2448
2451
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
2449
2452
|
isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
|
|
2450
2453
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PdfTreeGridCell } from './../export/pdf-base/pdf-grid-table';
|
|
2
2
|
import { PdfBorders } from './../export/pdf-base/pdf-borders';
|
|
3
3
|
import { ColumnModel } from './../models/column';
|
|
4
|
-
import { PointF, PdfColor, PdfFontFamily, PdfFontStyle, PdfStringFormat } from '@syncfusion/ej2-pdf-export';
|
|
4
|
+
import { PointF, PdfColor, PdfFontFamily, PdfFontStyle, PdfStringFormat, PdfTrueTypeFont } from '@syncfusion/ej2-pdf-export';
|
|
5
5
|
import { ContextMenuType, PdfPageSize, PageOrientation, ExportType, PdfTheme, TaskType } from './enum';
|
|
6
6
|
import { ContextMenuOpenEventArgs as GridContextMenuOpenEventArgs } from '@syncfusion/ej2-grids';
|
|
7
7
|
import { ContextMenuClickEventArgs as GridContextMenuClickEventArgs } from '@syncfusion/ej2-grids';
|
|
@@ -857,16 +857,28 @@ export interface ITaskbarStyle {
|
|
|
857
857
|
criticalTaskBorderColor?: PdfColor;
|
|
858
858
|
}
|
|
859
859
|
export interface IGanttStyle {
|
|
860
|
+
/** Defines the columnHeader style. */
|
|
860
861
|
columnHeader?: PdfGanttCellStyle;
|
|
862
|
+
/** Defines the font family. */
|
|
861
863
|
fontFamily?: PdfFontFamily;
|
|
864
|
+
/** Defines the cell style. */
|
|
862
865
|
cell?: PdfGanttCellStyle;
|
|
866
|
+
/** Defines the taskbar style. */
|
|
863
867
|
taskbar?: ITaskbarStyle;
|
|
868
|
+
/** Defines the font style. */
|
|
864
869
|
label?: PdfGanttCellStyle;
|
|
870
|
+
/** Defines the timeline style. */
|
|
865
871
|
timeline?: PdfGanttCellStyle;
|
|
872
|
+
/** Defines the chart line color. */
|
|
866
873
|
chartGridLineColor?: PdfColor;
|
|
874
|
+
/** Defines the connector line color. */
|
|
867
875
|
connectorLineColor?: PdfColor;
|
|
876
|
+
/** Defines the critical connector line color. */
|
|
868
877
|
criticalConnectorLineColor?: PdfColor;
|
|
878
|
+
/** Defines the footer format. */
|
|
869
879
|
footer?: PdfGanttCellStyle;
|
|
880
|
+
/** Defines the font of the theme. */
|
|
881
|
+
font?: PdfTrueTypeFont;
|
|
870
882
|
}
|
|
871
883
|
export interface PdfQueryTimelineCellInfoEventArgs {
|
|
872
884
|
/** Defines the timeline cell */
|
|
@@ -1443,7 +1443,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1443
1443
|
this.parent.setRecordValue(dataMapping.id, ganttProperties.taskId, ganttData);
|
|
1444
1444
|
}
|
|
1445
1445
|
if (dataMapping.name) {
|
|
1446
|
-
this.parent.
|
|
1446
|
+
if (!this.parent.isLoad) {
|
|
1447
|
+
this.parent.setRecordValue('taskData.' + dataMapping.name, ganttProperties.taskName, ganttData);
|
|
1448
|
+
}
|
|
1447
1449
|
this.parent.setRecordValue(dataMapping.name, ganttProperties.taskName, ganttData);
|
|
1448
1450
|
}
|
|
1449
1451
|
if (dataMapping.startDate) {
|
|
@@ -1459,7 +1461,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1459
1461
|
data[dataMapping.durationUnit] = ganttProperties.durationUnit;
|
|
1460
1462
|
}
|
|
1461
1463
|
if (dataMapping.progress) {
|
|
1462
|
-
this.parent.
|
|
1464
|
+
if (!this.parent.isLoad) {
|
|
1465
|
+
this.parent.setRecordValue('taskData.' + dataMapping.progress, ganttProperties.progress, ganttData);
|
|
1466
|
+
}
|
|
1463
1467
|
this.parent.setRecordValue(dataMapping.progress, ganttProperties.progress, ganttData);
|
|
1464
1468
|
}
|
|
1465
1469
|
if (dataMapping.baselineStartDate) {
|
|
@@ -1469,15 +1473,21 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1469
1473
|
this.setRecordDate(ganttData, ganttProperties.baselineEndDate, dataMapping.baselineEndDate);
|
|
1470
1474
|
}
|
|
1471
1475
|
if (dataMapping.notes) {
|
|
1472
|
-
this.parent.
|
|
1476
|
+
if (!this.parent.isLoad) {
|
|
1477
|
+
this.parent.setRecordValue('taskData.' + dataMapping.notes, ganttProperties.notes, ganttData);
|
|
1478
|
+
}
|
|
1473
1479
|
this.parent.setRecordValue(dataMapping.notes, ganttProperties.notes, ganttData);
|
|
1474
1480
|
}
|
|
1475
1481
|
if (dataMapping.cssClass) {
|
|
1476
|
-
this.parent.
|
|
1482
|
+
if (!this.parent.isLoad) {
|
|
1483
|
+
this.parent.setRecordValue('taskData.' + dataMapping.cssClass, ganttProperties.cssClass, ganttData);
|
|
1484
|
+
}
|
|
1477
1485
|
this.parent.setRecordValue(dataMapping.cssClass, ganttProperties.cssClass, ganttData);
|
|
1478
1486
|
}
|
|
1479
1487
|
if (dataMapping.indicators) {
|
|
1480
|
-
this.parent.
|
|
1488
|
+
if (!this.parent.isLoad) {
|
|
1489
|
+
this.parent.setRecordValue('taskData.' + dataMapping.indicators, ganttProperties.indicators, ganttData);
|
|
1490
|
+
}
|
|
1481
1491
|
this.parent.setRecordValue(dataMapping.indicators, ganttProperties.indicators, ganttData);
|
|
1482
1492
|
}
|
|
1483
1493
|
if (dataMapping.parentID) {
|
|
@@ -1486,11 +1496,15 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1486
1496
|
this.parent.setRecordValue(dataMapping.parentID, ganttProperties.parentId, ganttData);
|
|
1487
1497
|
}
|
|
1488
1498
|
if (dataMapping.work) {
|
|
1489
|
-
this.parent.
|
|
1499
|
+
if (!this.parent.isLoad) {
|
|
1500
|
+
this.parent.setRecordValue('taskData.' + dataMapping.work, this.getWorkString(ganttProperties.work, ganttProperties.workUnit), ganttData);
|
|
1501
|
+
}
|
|
1490
1502
|
this.parent.setRecordValue(dataMapping.work, ganttProperties.work, ganttData);
|
|
1491
1503
|
}
|
|
1492
1504
|
if (dataMapping.type) {
|
|
1493
|
-
this.parent.
|
|
1505
|
+
if (!this.parent.isLoad) {
|
|
1506
|
+
this.parent.setRecordValue('taskData.' + dataMapping.type, ganttProperties.taskType, ganttData);
|
|
1507
|
+
}
|
|
1494
1508
|
this.parent.setRecordValue(dataMapping.type, ganttProperties.taskType, ganttData);
|
|
1495
1509
|
}
|
|
1496
1510
|
}
|
|
@@ -689,7 +689,14 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
689
689
|
return data.level === 0 ? 'R-' + data.ganttProperties.taskId : 'T-' + data.ganttProperties.taskId;
|
|
690
690
|
};
|
|
691
691
|
GanttTreeGrid.prototype.updateScrollTop = function (args) {
|
|
692
|
-
|
|
692
|
+
var newScrollTop;
|
|
693
|
+
if (getValue('top', args) > (this.parent.flatData.length * this.parent.rowHeight)) {
|
|
694
|
+
newScrollTop = getValue('top', args) - document.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'];
|
|
695
|
+
}
|
|
696
|
+
else {
|
|
697
|
+
newScrollTop = getValue('top', args);
|
|
698
|
+
}
|
|
699
|
+
this.treeGridElement.querySelector('.e-content').scrollTop = newScrollTop;
|
|
693
700
|
this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
|
|
694
701
|
};
|
|
695
702
|
GanttTreeGrid.prototype.treeGridClickHandler = function (e) {
|
|
@@ -65,6 +65,9 @@ var PdfTreeGridCell = /** @class */ (function () {
|
|
|
65
65
|
if (typeof this.value === 'string') {
|
|
66
66
|
/* eslint-disable-next-line */
|
|
67
67
|
var font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
68
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
69
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
70
|
+
}
|
|
68
71
|
/* eslint-disable-next-line */
|
|
69
72
|
var slr = layouter.layout(this.value, font, this.style.format, new SizeF(Number.MAX_VALUE, Number.MAX_VALUE), false, new SizeF(0, 0));
|
|
70
73
|
width += slr.actualSize.width;
|
|
@@ -98,6 +101,9 @@ var PdfTreeGridCell = /** @class */ (function () {
|
|
|
98
101
|
}
|
|
99
102
|
/* eslint-disable */
|
|
100
103
|
var font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
104
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
105
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
106
|
+
}
|
|
101
107
|
/* eslint-disable */
|
|
102
108
|
var slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
|
|
103
109
|
height += slr.actualSize.height;
|
|
@@ -165,6 +171,9 @@ var PdfTreeGridCell = /** @class */ (function () {
|
|
|
165
171
|
else {
|
|
166
172
|
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
167
173
|
}
|
|
174
|
+
if (this.row.treegrid.ganttStyle.font) {
|
|
175
|
+
font = this.row.treegrid.ganttStyle.font;
|
|
176
|
+
}
|
|
168
177
|
var innerLayoutArea = bounds;
|
|
169
178
|
if (!this.isHeaderCell) {
|
|
170
179
|
/* eslint-disable-next-line */
|
|
@@ -74,6 +74,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
74
74
|
this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
|
|
75
75
|
//Draw Taskbar
|
|
76
76
|
var font = new PdfStandardFont(this.fontFamily, 9, PdfFontStyle.Regular);
|
|
77
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
78
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
79
|
+
}
|
|
77
80
|
var fontColor = null;
|
|
78
81
|
var fontBrush = new PdfSolidBrush(this.progressFontColor);
|
|
79
82
|
var progressFormat = new PdfStringFormat();
|
|
@@ -239,6 +242,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
239
242
|
!isNullOrUndefined(this.rightTaskLabel.value) && !this.rightTaskLabel.isCompleted) {
|
|
240
243
|
var result = this.getWidth(this.rightTaskLabel.value, detail.endPoint - left, 15);
|
|
241
244
|
var font = new PdfStandardFont(this.fontFamily, 9);
|
|
245
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
246
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
247
|
+
}
|
|
242
248
|
var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
243
249
|
var point = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
244
250
|
var size = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -294,6 +300,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
294
300
|
&& !this.leftTaskLabel.isCompleted) {
|
|
295
301
|
var result = this.getWidth(this.leftTaskLabel.value, detail.endPoint - left, 15);
|
|
296
302
|
var font = new PdfStandardFont(this.fontFamily, 9);
|
|
303
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
304
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
305
|
+
}
|
|
297
306
|
var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
|
|
298
307
|
var rightLabelpoint = new PointF(actualLeft, startPoint.y + adjustHeight);
|
|
299
308
|
var rightLabelSize = new SizeF(result.actualSize.width, result.actualSize.height);
|
|
@@ -322,6 +331,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
322
331
|
};
|
|
323
332
|
PdfGanttTaskbarCollection.prototype.getWidth = function (value, width, height) {
|
|
324
333
|
var font = new PdfStandardFont(this.fontFamily, 9);
|
|
334
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
|
|
335
|
+
font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
|
|
336
|
+
}
|
|
325
337
|
var layouter = new PdfStringLayouter();
|
|
326
338
|
var progressFormat = new PdfStringFormat();
|
|
327
339
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
@@ -170,6 +170,9 @@ var PdfTimeline = /** @class */ (function () {
|
|
|
170
170
|
var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
171
171
|
graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
|
|
172
172
|
var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
|
|
173
|
+
if (ganttStyle.font) {
|
|
174
|
+
font = ganttStyle.font;
|
|
175
|
+
}
|
|
173
176
|
var textBrush = new PdfSolidBrush(eventArgs.timelineCell.fontColor);
|
|
174
177
|
var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
175
178
|
var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|
package/styles/bootstrap4.css
CHANGED