@syncfusion/ej2-gantt 19.4.56 → 20.1.47
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 +10 -0
- 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 +167 -70
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +185 -78
- 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 +18 -18
- package/src/gantt/actions/cell-edit.js +2 -1
- package/src/gantt/actions/dialog-edit.js +2 -1
- package/src/gantt/actions/edit.js +11 -2
- package/src/gantt/actions/rowdragdrop.js +37 -15
- package/src/gantt/base/date-processor.js +0 -1
- package/src/gantt/base/gantt-chart.js +9 -4
- package/src/gantt/base/gantt.js +2 -2
- package/src/gantt/base/splitter.js +1 -0
- package/src/gantt/base/tree-grid.js +3 -1
- package/src/gantt/renderer/chart-rows.js +36 -24
- package/src/gantt/renderer/connector-line.js +22 -18
- package/src/gantt/renderer/event-marker.js +1 -0
- package/src/gantt/renderer/nonworking-day.js +13 -6
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +37 -1
- package/src/gantt/renderer/tooltip.js +10 -3
- package/styles/bootstrap-dark.css +37 -10
- package/styles/bootstrap.css +37 -10
- package/styles/bootstrap4.css +37 -10
- package/styles/bootstrap5-dark.css +53 -19
- package/styles/bootstrap5.css +53 -19
- package/styles/fabric-dark.css +34 -7
- package/styles/fabric.css +37 -10
- package/styles/fluent-dark.css +1942 -0
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +1942 -0
- package/styles/fluent.scss +1 -0
- package/styles/gantt/_bootstrap-dark-definition.scss +10 -2
- package/styles/gantt/_bootstrap-definition.scss +11 -3
- package/styles/gantt/_bootstrap4-definition.scss +10 -2
- package/styles/gantt/_bootstrap5-definition.scss +17 -9
- package/styles/gantt/_fabric-dark-definition.scss +8 -0
- package/styles/gantt/_fabric-definition.scss +10 -2
- package/styles/gantt/_fluent-dark-definition.scss +1 -0
- package/styles/gantt/_fluent-definition.scss +21 -13
- package/styles/gantt/_highcontrast-definition.scss +9 -1
- package/styles/gantt/_highcontrast-light-definition.scss +9 -1
- package/styles/gantt/_layout.scss +53 -2
- package/styles/gantt/_material-dark-definition.scss +9 -1
- package/styles/gantt/_material-definition.scss +10 -2
- package/styles/gantt/_tailwind-definition.scss +13 -5
- package/styles/gantt/_theme.scss +2 -5
- package/styles/gantt/bootstrap-dark.css +37 -10
- package/styles/gantt/bootstrap.css +37 -10
- package/styles/gantt/bootstrap4.css +37 -10
- package/styles/gantt/bootstrap5-dark.css +53 -19
- package/styles/gantt/bootstrap5.css +53 -19
- package/styles/gantt/fabric-dark.css +34 -7
- package/styles/gantt/fabric.css +37 -10
- package/styles/gantt/fluent-dark.css +1942 -0
- package/styles/gantt/fluent-dark.scss +22 -0
- package/styles/gantt/fluent.css +1942 -0
- package/styles/gantt/fluent.scss +22 -0
- package/styles/gantt/highcontrast-light.css +34 -7
- package/styles/gantt/highcontrast.css +34 -7
- package/styles/gantt/icons/_fluent-dark.scss +1 -0
- package/styles/gantt/icons/_fluent.scss +1 -1
- package/styles/gantt/icons/_tailwind-dark.scss +28 -29
- package/styles/gantt/icons/_tailwind.scss +26 -27
- package/styles/gantt/material-dark.css +37 -10
- package/styles/gantt/material.css +37 -10
- package/styles/gantt/tailwind-dark.css +70 -99
- package/styles/gantt/tailwind.css +70 -99
- package/styles/highcontrast-light.css +34 -7
- package/styles/highcontrast.css +34 -7
- package/styles/material-dark.css +37 -10
- package/styles/material.css +37 -10
- package/styles/tailwind-dark.css +70 -99
- package/styles/tailwind.css +70 -99
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 20.1.47
|
|
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@19.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@19.10.10",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-kJWTMNP/9/2FtwxZ6khAoLriF7D+LPHkkeCwBLOYy2+QaggPgOyqD6Kxf+EUvIcy88okK5d+aRAVfm35iY0dzg==",
|
|
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-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-gantt/-/ej2-gantt-19.10.10.tgz",
|
|
27
|
+
"_shasum": "8340614ed1ccd8ec22e6082223b54f2226d905d1",
|
|
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": "~
|
|
39
|
-
"@syncfusion/ej2-buttons": "~
|
|
40
|
-
"@syncfusion/ej2-calendars": "~
|
|
41
|
-
"@syncfusion/ej2-data": "~
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~
|
|
43
|
-
"@syncfusion/ej2-grids": "~
|
|
44
|
-
"@syncfusion/ej2-inputs": "~
|
|
45
|
-
"@syncfusion/ej2-layouts": "~
|
|
46
|
-
"@syncfusion/ej2-lists": "~
|
|
47
|
-
"@syncfusion/ej2-navigations": "~
|
|
48
|
-
"@syncfusion/ej2-popups": "~
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~
|
|
38
|
+
"@syncfusion/ej2-base": "~20.1.47",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.1.47",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~20.1.47",
|
|
41
|
+
"@syncfusion/ej2-data": "~20.1.47",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.1.47",
|
|
43
|
+
"@syncfusion/ej2-grids": "~20.1.47",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.1.47",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~20.1.47",
|
|
46
|
+
"@syncfusion/ej2-lists": "~20.1.47",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.1.47",
|
|
48
|
+
"@syncfusion/ej2-popups": "~20.1.47",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~20.1.47",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~20.1.47"
|
|
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": "
|
|
78
|
+
"version": "20.1.47",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -48,7 +48,8 @@ var CellEdit = /** @class */ (function () {
|
|
|
48
48
|
args.cancel = true;
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
if (data.hasChildRecords && (field === taskSettings.endDate
|
|
51
|
+
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
52
|
+
data['isManual'] == false) || this.parent.taskMode == 'Auto')) || field === taskSettings.duration
|
|
52
53
|
|| field === taskSettings.dependency || field === taskSettings.progress
|
|
53
54
|
|| field === taskSettings.work || field === 'taskType')) {
|
|
54
55
|
args.cancel = true;
|
|
@@ -1537,7 +1537,8 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1537
1537
|
disabled = true;
|
|
1538
1538
|
}
|
|
1539
1539
|
if (this.editedRecord.hasChildRecords) {
|
|
1540
|
-
if (column.field === this.parent.taskFields.endDate
|
|
1540
|
+
if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
|
|
1541
|
+
this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
|
|
1541
1542
|
column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
|
|
1542
1543
|
column.field === 'taskType') {
|
|
1543
1544
|
disabled = true;
|
|
@@ -2356,14 +2356,20 @@ var Edit = /** @class */ (function () {
|
|
|
2356
2356
|
}
|
|
2357
2357
|
else {
|
|
2358
2358
|
childIndex = parentItem.childRecords.length;
|
|
2359
|
-
}
|
|
2359
|
+
}
|
|
2360
|
+
/*Child collection update*/
|
|
2360
2361
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
2361
2362
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
2362
2363
|
isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
|
|
2363
2364
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
2364
2365
|
var child = this.parent.taskFields.child;
|
|
2365
2366
|
if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
|
|
2366
|
-
|
|
2367
|
+
if (rowPosition === 'Above' || rowPosition === 'Below') {
|
|
2368
|
+
parentItem.taskData[child].splice(childIndex, 0, record.taskData);
|
|
2369
|
+
}
|
|
2370
|
+
else {
|
|
2371
|
+
parentItem.taskData[child].push(record.taskData);
|
|
2372
|
+
}
|
|
2367
2373
|
}
|
|
2368
2374
|
else {
|
|
2369
2375
|
parentItem.taskData[child] = [];
|
|
@@ -2824,6 +2830,9 @@ var Edit = /** @class */ (function () {
|
|
|
2824
2830
|
}
|
|
2825
2831
|
this.addSuccess(args);
|
|
2826
2832
|
args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
|
|
2833
|
+
if (this.dialogModule.isAddNewResource && !this.parent.isEdit && this.parent.taskFields.work) {
|
|
2834
|
+
this.parent.dataOperation.updateWorkWithDuration(cAddedRecord[0]);
|
|
2835
|
+
}
|
|
2827
2836
|
this.parent.trigger('actionComplete', args);
|
|
2828
2837
|
if (this.dialogModule.dialog && !this.dialogModule.dialogObj.isDestroyed) {
|
|
2829
2838
|
this.dialogModule.dialogObj.hide();
|
|
@@ -249,33 +249,55 @@ var RowDD = /** @class */ (function () {
|
|
|
249
249
|
var data_1 = gObj.flatData;
|
|
250
250
|
var startIndex = void 0;
|
|
251
251
|
var endIndex = void 0;
|
|
252
|
+
var ganttData_1 = this_1.parent.dataSource;
|
|
253
|
+
var uniqueTaskID_1 = this_1.parent.taskFields.id;
|
|
252
254
|
if (draggedRecord.index < droppedRecord.index) {
|
|
253
255
|
startIndex = draggedRecord.index;
|
|
254
|
-
|
|
256
|
+
var _loop_2 = function (i_1) {
|
|
257
|
+
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
258
|
+
return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
|
|
259
|
+
})[0];
|
|
260
|
+
if (currentData.index > droppedRecord.index) {
|
|
261
|
+
endIndex = currentData.index;
|
|
262
|
+
return "break";
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
|
|
266
|
+
var state_2 = _loop_2(i_1);
|
|
267
|
+
if (state_2 === "break")
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
255
270
|
}
|
|
256
271
|
else {
|
|
257
272
|
startIndex = droppedRecord.index;
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
273
|
+
var _loop_3 = function (i_2) {
|
|
274
|
+
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
275
|
+
return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
|
|
276
|
+
})[0];
|
|
277
|
+
if (currentData.index > draggedRecord.index) {
|
|
278
|
+
endIndex = currentData.index;
|
|
279
|
+
return "break";
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
|
|
283
|
+
var state_3 = _loop_3(i_2);
|
|
284
|
+
if (state_3 === "break")
|
|
285
|
+
break;
|
|
263
286
|
}
|
|
264
|
-
endIndex = rootChildRecord.index;
|
|
265
287
|
}
|
|
266
|
-
var
|
|
267
|
-
if (!isNullOrUndefined(data_1[
|
|
268
|
-
data_1[
|
|
269
|
-
if (!isNullOrUndefined(data_1[
|
|
288
|
+
var _loop_4 = function (i_3) {
|
|
289
|
+
if (!isNullOrUndefined(data_1[i_3])) {
|
|
290
|
+
data_1[i_3].index = i_3;
|
|
291
|
+
if (!isNullOrUndefined(data_1[i_3].parentItem)) {
|
|
270
292
|
var updatedParent = data_1.filter(function (e) {
|
|
271
|
-
return e.uniqueID === data_1[
|
|
293
|
+
return e.uniqueID === data_1[i_3].parentUniqueID;
|
|
272
294
|
})[0];
|
|
273
|
-
data_1[
|
|
295
|
+
data_1[i_3].parentItem.index = updatedParent.index;
|
|
274
296
|
}
|
|
275
297
|
}
|
|
276
298
|
};
|
|
277
|
-
for (var
|
|
278
|
-
|
|
299
|
+
for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
|
|
300
|
+
_loop_4(i_3);
|
|
279
301
|
}
|
|
280
302
|
}
|
|
281
303
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
@@ -282,7 +282,6 @@ var DateProcessor = /** @class */ (function () {
|
|
|
282
282
|
tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
|
|
283
283
|
}
|
|
284
284
|
else {
|
|
285
|
-
// eslint-disable-next-line
|
|
286
285
|
if (!isNullOrUndefined(ganttProperties.startDate) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
287
286
|
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
|
|
288
287
|
tDuration = 1;
|
|
@@ -16,6 +16,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
16
16
|
this.chartTimelineContainer = null;
|
|
17
17
|
this.rangeViewContainer =
|
|
18
18
|
createElement('div', { className: cls.rangeContainer });
|
|
19
|
+
this.rangeViewContainer.setAttribute("role", "RangeContainer");
|
|
19
20
|
this.virtualRender = new VirtualContentRenderer(this.parent);
|
|
20
21
|
this.addEventListener();
|
|
21
22
|
}
|
|
@@ -170,6 +171,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
170
171
|
GanttChart.prototype.renderTimelineContainer = function () {
|
|
171
172
|
this.chartTimelineContainer =
|
|
172
173
|
createElement('div', { className: cls.timelineHeaderContainer });
|
|
174
|
+
this.chartTimelineContainer.setAttribute("role", "TimelineHeader");
|
|
173
175
|
this.chartElement.appendChild(this.chartTimelineContainer);
|
|
174
176
|
};
|
|
175
177
|
/**
|
|
@@ -221,8 +223,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
221
223
|
else {
|
|
222
224
|
this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
|
|
223
225
|
}
|
|
224
|
-
}
|
|
225
|
-
//let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
|
|
226
|
+
} //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
|
|
226
227
|
this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
|
|
227
228
|
this.setVirtualHeight();
|
|
228
229
|
this.parent.notify('updateHeight', {});
|
|
@@ -400,7 +401,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
400
401
|
var target = e.target;
|
|
401
402
|
var isOnTaskbarElement = e.target.classList.contains(cls.taskBarMainContainer)
|
|
402
403
|
|| closest(e.target, '.' + cls.taskBarMainContainer);
|
|
403
|
-
if (closest(target, '.e-gantt-parent-taskbar')) {
|
|
404
|
+
if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
|
|
404
405
|
this.chartExpandCollapseRequest(e);
|
|
405
406
|
}
|
|
406
407
|
else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
|
|
@@ -924,6 +925,10 @@ var GanttChart = /** @class */ (function () {
|
|
|
924
925
|
$target.classList.contains('e-headercell') || $target.closest('.e-segmented-taskbar')) {
|
|
925
926
|
e.preventDefault();
|
|
926
927
|
}
|
|
928
|
+
if (isTab && $target.classList.contains('e-rowdragdrop')) {
|
|
929
|
+
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
927
932
|
if ($target.classList.contains('e-rowcell') && (nextElement && nextElement.classList.contains('e-rowcell')) ||
|
|
928
933
|
$target.classList.contains('e-headercell')) { // eslint-disable-line
|
|
929
934
|
if (isTab) {
|
|
@@ -966,7 +971,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
966
971
|
else {
|
|
967
972
|
this.manageFocus($target, 'remove', true);
|
|
968
973
|
}
|
|
969
|
-
if (nextElement.classList.contains('e-rowcell')) {
|
|
974
|
+
if (nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) {
|
|
970
975
|
if (!$target.classList.contains('e-rowcell')) {
|
|
971
976
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
972
977
|
var fmodule = getValue('focusModule', this.parent.treeGrid.grid);
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -784,7 +784,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
784
784
|
gridHeight = 'calc(100% - ' + timelineContainer + 'px)';
|
|
785
785
|
// eslint-disable-next-line
|
|
786
786
|
this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
787
|
-
if (!isNullOrUndefined(this.toolbarModule)) {
|
|
787
|
+
if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
|
|
788
788
|
this.splitterElement.style.height = 'calc(100% - ' + this.toolbarModule.element.offsetHeight + 'px)';
|
|
789
789
|
}
|
|
790
790
|
else {
|
|
@@ -1320,7 +1320,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1320
1320
|
*/
|
|
1321
1321
|
Gantt.prototype.updateGridLineContainerHeight = function () {
|
|
1322
1322
|
if (this.chartVerticalLineContainer) {
|
|
1323
|
-
this.chartVerticalLineContainer.style.height = formatUnit(this.
|
|
1323
|
+
this.chartVerticalLineContainer.style.height = formatUnit(this.contentHeight);
|
|
1324
1324
|
}
|
|
1325
1325
|
};
|
|
1326
1326
|
/**
|
|
@@ -60,6 +60,7 @@ var Splitter = /** @class */ (function () {
|
|
|
60
60
|
_this.splitterObject.paneSettings[1].size = null;
|
|
61
61
|
_this.splitterObject.paneSettings[1].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionChart);
|
|
62
62
|
}
|
|
63
|
+
_this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
|
|
63
64
|
callBackPromise.resolve(splitterResizedArgs);
|
|
64
65
|
});
|
|
65
66
|
return callBackPromise;
|
|
@@ -92,6 +92,8 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
92
92
|
GanttTreeGrid.prototype.renderTreeGrid = function () {
|
|
93
93
|
this.composeProperties();
|
|
94
94
|
this.bindEvents();
|
|
95
|
+
var root = 'root';
|
|
96
|
+
this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
|
|
95
97
|
this.parent.treeGrid.appendTo(this.treeGridElement);
|
|
96
98
|
this.wireEvents();
|
|
97
99
|
};
|
|
@@ -155,7 +157,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
155
157
|
var scrollWidth = this.getScrollbarWidth();
|
|
156
158
|
var isMobile = /Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
157
159
|
if (scrollWidth !== 0) {
|
|
158
|
-
content.style.cssText += 'width: calc(100% + ' + scrollWidth + 'px);';
|
|
160
|
+
content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);';
|
|
159
161
|
}
|
|
160
162
|
else {
|
|
161
163
|
content.classList.add('e-gantt-scroll-padding');
|
|
@@ -28,7 +28,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
28
28
|
_this.milestoneHeight = 0;
|
|
29
29
|
_this.milesStoneRadius = 0;
|
|
30
30
|
_this.baselineTop = 0;
|
|
31
|
-
_this.baselineHeight =
|
|
31
|
+
_this.baselineHeight = 8;
|
|
32
32
|
_this.touchLeftConnectorpoint = '';
|
|
33
33
|
_this.touchRightConnectorpoint = '';
|
|
34
34
|
_this.dropSplit = false;
|
|
@@ -111,7 +111,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
111
111
|
* @private
|
|
112
112
|
*/
|
|
113
113
|
ChartRows.prototype.getIndicatorNode = function (indicator) {
|
|
114
|
-
var templateString = '<label class="' + cls.label + ' ' + cls.taskIndicatorDiv + '"
|
|
114
|
+
var templateString = '<label class="' + cls.label + ' ' + cls.taskIndicatorDiv + '" role="LabelIndicator" style="line-height:'
|
|
115
115
|
+ (this.parent.rowHeight) + 'px;' +
|
|
116
116
|
'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
|
|
117
117
|
return this.createDivElement(templateString);
|
|
@@ -184,9 +184,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
184
184
|
}
|
|
185
185
|
else {
|
|
186
186
|
taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
187
|
-
(this.taskBarHeight - 1) + 'px;
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'text-align: left;' : '') +
|
|
188
|
+
+(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
189
|
+
+(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
190
190
|
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -603,7 +603,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
603
603
|
*/
|
|
604
604
|
ChartRows.prototype.getTaskBaselineNode = function () {
|
|
605
605
|
var data = this.templateData;
|
|
606
|
-
var template = '<div class="' + cls.baselineBar + ' ' + '" style="margin-top:' + this.baselineTop +
|
|
606
|
+
var template = '<div class="' + cls.baselineBar + ' ' + '" role="BaselineBar" style="margin-top:' + this.baselineTop +
|
|
607
607
|
'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
|
|
608
608
|
'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
|
|
609
609
|
this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
|
|
@@ -617,9 +617,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
617
617
|
*/
|
|
618
618
|
ChartRows.prototype.getMilestoneBaselineNode = function () {
|
|
619
619
|
var data = this.templateData;
|
|
620
|
+
var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
|
|
620
621
|
var template = '<div class="' + cls.baselineMilestoneContainer + ' ' + '" style="' +
|
|
621
622
|
'left:' + (data.ganttProperties.baselineLeft - this.milesStoneRadius) + 'px;' +
|
|
622
|
-
'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) +
|
|
623
|
+
'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) +
|
|
623
624
|
'px">' + '<div class="' + cls.baselineMilestoneDiv + '">' + '<div class="' + cls.baselineMilestoneDiv +
|
|
624
625
|
' ' + cls.baselineMilestoneTop + '" ' +
|
|
625
626
|
'style="top:' + (-this.milestoneHeight) + 'px;border-right:' + this.milesStoneRadius +
|
|
@@ -647,7 +648,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
647
648
|
*/
|
|
648
649
|
ChartRows.prototype.getLeftLabelNode = function (i) {
|
|
649
650
|
var leftLabelNode = this.leftLabelContainer();
|
|
650
|
-
|
|
651
|
+
if (this.generateTaskLabelAriaLabel('left') !== "") {
|
|
652
|
+
leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
|
|
653
|
+
}
|
|
651
654
|
var leftLabelTemplateNode = null;
|
|
652
655
|
if (this.leftTaskLabelTemplateFunction) {
|
|
653
656
|
leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0], this.parent.treeGrid['root']);
|
|
@@ -669,9 +672,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
669
672
|
return leftLabelNode;
|
|
670
673
|
};
|
|
671
674
|
ChartRows.prototype.getLableText = function (labelString, labelDiv) {
|
|
675
|
+
var leftLabelHeight = this.parent.renderBaseline ? ((this.parent.rowHeight - this.taskBarHeight) / 2) : this.taskBarMarginTop;
|
|
672
676
|
var templateString = createElement('div', {
|
|
673
677
|
className: labelDiv, styles: 'height:' + (this.taskBarHeight) + 'px;' +
|
|
674
|
-
'margin-top:' +
|
|
678
|
+
'margin-top:' + leftLabelHeight + 'px;'
|
|
675
679
|
});
|
|
676
680
|
var spanElem = createElement('span', { className: cls.label });
|
|
677
681
|
var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
@@ -690,7 +694,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
690
694
|
*/
|
|
691
695
|
ChartRows.prototype.getRightLabelNode = function (i) {
|
|
692
696
|
var rightLabelNode = this.rightLabelContainer();
|
|
693
|
-
|
|
697
|
+
if (this.generateTaskLabelAriaLabel('right') !== "") {
|
|
698
|
+
rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
|
|
699
|
+
}
|
|
694
700
|
var rightLabelTemplateNode = null;
|
|
695
701
|
if (this.rightTaskLabelTemplateFunction) {
|
|
696
702
|
rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0], this.parent.treeGrid['root']);
|
|
@@ -803,8 +809,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
803
809
|
else {
|
|
804
810
|
labelDiv = this.createDivElement('<span class="' +
|
|
805
811
|
cls.taskLabel + '" style="line-height:' +
|
|
806
|
-
(this.taskBarHeight - 1) + 'px;
|
|
807
|
-
(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '
|
|
812
|
+
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
813
|
+
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
814
|
+
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
815
|
+
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
808
816
|
this.taskBarHeight + 'px;">' + labelString + '</span>');
|
|
809
817
|
}
|
|
810
818
|
progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
|
|
@@ -833,10 +841,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
833
841
|
var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
834
842
|
'e-chart-row-border' : '';
|
|
835
843
|
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + cls.chartRow + '"' +
|
|
836
|
-
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
844
|
+
'role="ChartRow" style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
837
845
|
this.parent.rowHeight + 'px;">' +
|
|
838
846
|
'<td class="' + cls.chartRowCell + ' ' + className
|
|
839
|
-
+ '" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
847
|
+
+ '" role="ChartCell" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
840
848
|
return table.childNodes;
|
|
841
849
|
};
|
|
842
850
|
/**
|
|
@@ -901,7 +909,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
901
909
|
};
|
|
902
910
|
ChartRows.prototype.leftLabelContainer = function () {
|
|
903
911
|
var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? cls.leftLabelTempContainer :
|
|
904
|
-
cls.leftLabelContainer) + ' ' + '" tabindex="-1" style="height:' +
|
|
912
|
+
cls.leftLabelContainer) + ' ' + '" tabindex="-1" role="LeftLabel" style="height:' +
|
|
905
913
|
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
906
914
|
return this.createDivElement(template);
|
|
907
915
|
};
|
|
@@ -913,7 +921,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
913
921
|
var template = '<div class="' + cls.taskBarMainContainer + ' ' +
|
|
914
922
|
this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
|
|
915
923
|
((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
|
|
916
|
-
' tabindex="-1" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
924
|
+
' tabindex="-1" role="TaskBar" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
917
925
|
('width:' + this.milestoneHeight + 'px;height:' +
|
|
918
926
|
this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
|
|
919
927
|
(this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
|
|
@@ -924,26 +932,26 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
924
932
|
};
|
|
925
933
|
ChartRows.prototype.rightLabelContainer = function () {
|
|
926
934
|
var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? cls.rightLabelTempContainer :
|
|
927
|
-
cls.rightLabelContainer) + '" ' + ' tabindex="-1" style="left:' + this.getRightLabelLeft(this.templateData) + 'px;height:'
|
|
935
|
+
cls.rightLabelContainer) + '" ' + ' tabindex="-1" role="RightLabel" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
|
|
928
936
|
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
929
937
|
return this.createDivElement(template);
|
|
930
938
|
};
|
|
931
939
|
ChartRows.prototype.childTaskbarLeftResizer = function () {
|
|
932
940
|
var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
|
|
933
941
|
var template = '<div class="' + cls.taskBarLeftResizer + ' ' + cls.icon + '"' +
|
|
934
|
-
' style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
942
|
+
' role="LeftResizer" style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
935
943
|
return this.createDivElement(template);
|
|
936
944
|
};
|
|
937
945
|
ChartRows.prototype.childTaskbarRightResizer = function () {
|
|
938
946
|
var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
|
|
939
947
|
var template = '<div class="' + cls.taskBarRightResizer + ' ' + cls.icon + '"' +
|
|
940
|
-
' style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
948
|
+
' role="RightResizer" style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
941
949
|
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
942
950
|
return this.createDivElement(template);
|
|
943
951
|
};
|
|
944
952
|
ChartRows.prototype.childTaskbarProgressResizer = function () {
|
|
945
953
|
var template = '<div class="' + cls.childProgressResizer + '"' +
|
|
946
|
-
' style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
954
|
+
' role="ProgressResizer" style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
947
955
|
(this.taskBarHeight - 4) + 'px;"><div class="' + cls.progressBarHandler + '"' +
|
|
948
956
|
'><div class="' + cls.progressHandlerElement + '"></div>' +
|
|
949
957
|
'<div class="' + cls.progressBarHandlerAfter + '"></div></div>';
|
|
@@ -1141,10 +1149,13 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1141
1149
|
* @private
|
|
1142
1150
|
*/
|
|
1143
1151
|
ChartRows.prototype.initChartHelperPrivateVariable = function () {
|
|
1152
|
+
var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
|
|
1153
|
+
var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
|
|
1154
|
+
var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
|
|
1144
1155
|
this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
|
|
1145
1156
|
this.parent.baselineColor !== '' ? this.parent.baselineColor : null;
|
|
1146
1157
|
this.taskBarHeight = isNullOrUndefined(this.parent.taskbarHeight) || this.parent.taskbarHeight >= this.parent.rowHeight ?
|
|
1147
|
-
Math.floor(this.parent.rowHeight *
|
|
1158
|
+
Math.floor(this.parent.rowHeight * taskbarHeightValue) : this.parent.taskbarHeight; // 0.62 -- Standard Ratio.
|
|
1148
1159
|
if (this.parent.renderBaseline) {
|
|
1149
1160
|
var height = void 0;
|
|
1150
1161
|
if ((this.taskBarHeight + this.baselineHeight) <= this.parent.rowHeight) {
|
|
@@ -1155,11 +1166,11 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1155
1166
|
}
|
|
1156
1167
|
this.taskBarHeight = height;
|
|
1157
1168
|
}
|
|
1158
|
-
this.milestoneHeight = Math.floor(this.taskBarHeight *
|
|
1159
|
-
this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) /
|
|
1169
|
+
this.milestoneHeight = Math.floor(this.taskBarHeight * milestoneHeightValue); // 0.82 -- Standard Ratio.
|
|
1170
|
+
this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) / taskBarMarginTopValue);
|
|
1160
1171
|
this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
|
|
1161
1172
|
this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
|
|
1162
|
-
this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) -
|
|
1173
|
+
this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
|
|
1163
1174
|
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
|
|
1164
1175
|
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
|
|
1165
1176
|
};
|
|
@@ -1353,6 +1364,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1353
1364
|
var indicators = this.templateData.ganttProperties.indicators;
|
|
1354
1365
|
for (var indicatorIndex = 0; indicatorIndex < indicators.length; indicatorIndex++) {
|
|
1355
1366
|
taskIndicatorNode = this.getIndicatorNode(indicators[indicatorIndex]);
|
|
1367
|
+
taskIndicatorNode[0].setAttribute('aria-label', indicators[indicatorIndex].name);
|
|
1356
1368
|
if (indicators[indicatorIndex].name.indexOf('$') > -1 || indicators[indicatorIndex].name.indexOf('#') > -1) {
|
|
1357
1369
|
taskIndicatorTextFunction = this.templateCompiler(indicators[indicatorIndex].name);
|
|
1358
1370
|
taskIndicatorTextNode = taskIndicatorTextFunction(extend({ index: i }, this.templateData), this.parent, 'indicatorLabelText');
|