@syncfusion/ej2-gantt 19.4.55 → 20.1.48
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 +34 -1
- 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 +242 -138
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +264 -146
- 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 +36 -9
- package/src/gantt/actions/filter.js +4 -2
- package/src/gantt/actions/rowdragdrop.js +41 -17
- package/src/gantt/actions/selection.js +3 -2
- package/src/gantt/base/date-processor.js +0 -1
- package/src/gantt/base/gantt-chart.js +36 -5
- package/src/gantt/base/gantt.js +15 -56
- 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 +40 -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.48
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.1.47",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-60lkObo1sLVOuUOCasgszwBvryKWbHtCish7JIz4IlZ7aEOVHaZMzu84p839ay02/uIw5IKLnxcFY+SE5WW/pA==",
|
|
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-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.1.47.tgz",
|
|
27
|
+
"_shasum": "d0d50fd8f2502745938a6e16bfae7b01e97dbfa6",
|
|
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.48",
|
|
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.48",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.1.48",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~20.1.47",
|
|
46
|
+
"@syncfusion/ej2-lists": "~20.1.47",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.1.48",
|
|
48
|
+
"@syncfusion/ej2-popups": "~20.1.47",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~20.1.48",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~20.1.48"
|
|
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.48",
|
|
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;
|
|
@@ -2348,7 +2348,15 @@ var Edit = /** @class */ (function () {
|
|
|
2348
2348
|
}
|
|
2349
2349
|
/* data Source update */
|
|
2350
2350
|
if (!isNullOrUndefined(parentItem)) {
|
|
2351
|
-
|
|
2351
|
+
if (rowPosition == 'Above') {
|
|
2352
|
+
childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem);
|
|
2353
|
+
}
|
|
2354
|
+
else if (rowPosition == 'Below') {
|
|
2355
|
+
childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem) + 1;
|
|
2356
|
+
}
|
|
2357
|
+
else {
|
|
2358
|
+
childIndex = parentItem.childRecords.length;
|
|
2359
|
+
}
|
|
2352
2360
|
/*Child collection update*/
|
|
2353
2361
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
2354
2362
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
@@ -2356,12 +2364,9 @@ var Edit = /** @class */ (function () {
|
|
|
2356
2364
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
2357
2365
|
var child = this.parent.taskFields.child;
|
|
2358
2366
|
if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
|
|
2359
|
-
if (rowPosition === 'Above') {
|
|
2367
|
+
if (rowPosition === 'Above' || rowPosition === 'Below') {
|
|
2360
2368
|
parentItem.taskData[child].splice(childIndex, 0, record.taskData);
|
|
2361
2369
|
}
|
|
2362
|
-
else if (rowPosition === 'Below') {
|
|
2363
|
-
parentItem.taskData[child].splice(childIndex + 1, 0, record.taskData);
|
|
2364
|
-
}
|
|
2365
2370
|
else {
|
|
2366
2371
|
parentItem.taskData[child].push(record.taskData);
|
|
2367
2372
|
}
|
|
@@ -2427,11 +2432,27 @@ var Edit = /** @class */ (function () {
|
|
|
2427
2432
|
}
|
|
2428
2433
|
};
|
|
2429
2434
|
Edit.prototype.refreshRecordInImmutableMode = function () {
|
|
2435
|
+
var _loop_1 = function (i) {
|
|
2436
|
+
var originalData = this_1.parent.modifiedRecords[i];
|
|
2437
|
+
var treeIndex = this_1.parent.allowRowDragAndDrop ? 1 : 0;
|
|
2438
|
+
var uniqueTaskID = this_1.parent.taskFields.id;
|
|
2439
|
+
originalIndex = this_1.parent.currentViewData.findIndex(function (data) {
|
|
2440
|
+
return (data[uniqueTaskID] == originalData[uniqueTaskID]);
|
|
2441
|
+
});
|
|
2442
|
+
if (this_1.parent.treeGrid.getRows()[originalIndex]) {
|
|
2443
|
+
this_1.parent.treeGrid.renderModule.cellRender({
|
|
2444
|
+
data: originalData, cell: this_1.parent.treeGrid.getRows()[originalIndex].cells[this_1.parent.treeColumnIndex + treeIndex],
|
|
2445
|
+
column: this_1.parent.treeGrid.grid.getColumns()[this_1.parent.treeColumnIndex],
|
|
2446
|
+
requestType: 'rowDragAndDrop'
|
|
2447
|
+
});
|
|
2448
|
+
this_1.parent.treeGrid.renderModule.RowModifier({
|
|
2449
|
+
data: originalData, row: this_1.parent.treeGrid.getRows()[originalIndex], rowHeight: this_1.parent.rowHeight
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
};
|
|
2453
|
+
var this_1 = this, originalIndex;
|
|
2430
2454
|
for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
|
|
2431
|
-
|
|
2432
|
-
var dataId = this.parent.viewType === 'ProjectView' ?
|
|
2433
|
-
originalData.ganttProperties.taskId : originalData.ganttProperties.rowUniqueID;
|
|
2434
|
-
this.parent.treeGrid.grid.setRowData(dataId, originalData);
|
|
2455
|
+
_loop_1(i);
|
|
2435
2456
|
}
|
|
2436
2457
|
};
|
|
2437
2458
|
/**
|
|
@@ -2809,6 +2830,9 @@ var Edit = /** @class */ (function () {
|
|
|
2809
2830
|
}
|
|
2810
2831
|
this.addSuccess(args);
|
|
2811
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
|
+
}
|
|
2812
2836
|
this.parent.trigger('actionComplete', args);
|
|
2813
2837
|
if (this.dialogModule.dialog && !this.dialogModule.dialogObj.isDestroyed) {
|
|
2814
2838
|
this.dialogModule.dialogObj.hide();
|
|
@@ -3185,15 +3209,18 @@ var Edit = /** @class */ (function () {
|
|
|
3185
3209
|
if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
|
|
3186
3210
|
draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
|
|
3187
3211
|
draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
|
|
3212
|
+
draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.parentID];
|
|
3188
3213
|
}
|
|
3189
3214
|
else {
|
|
3190
3215
|
draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
|
|
3191
3216
|
draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
|
|
3217
|
+
draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.id];
|
|
3192
3218
|
}
|
|
3193
3219
|
}
|
|
3194
3220
|
else {
|
|
3195
3221
|
draggedRec[this.parent.taskFields.parentID] = null;
|
|
3196
3222
|
draggedRec.taskData[this.parent.taskFields.parentID] = null;
|
|
3223
|
+
draggedRec.ganttProperties['parentId'] = null;
|
|
3197
3224
|
}
|
|
3198
3225
|
}
|
|
3199
3226
|
};
|
|
@@ -185,11 +185,13 @@ var Filter = /** @class */ (function () {
|
|
|
185
185
|
// ...
|
|
186
186
|
};
|
|
187
187
|
Filter.prototype.closeFilterOnContextClick = function (element) {
|
|
188
|
+
var datePickerElement = document.querySelector('body > div.e-datepicker');
|
|
189
|
+
var dateTimePickerElement = document.querySelector('body > div.e-datetimepicker');
|
|
188
190
|
if (this.filterMenuElement && document.body.contains(this.filterMenuElement)) {
|
|
189
191
|
var ganttElement = closest(element, '#' + this.parent.element.id)
|
|
190
192
|
|| element.querySelector('#' + this.parent.element.id);
|
|
191
|
-
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element
|
|
192
|
-
|
|
193
|
+
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || (!(this.filterMenuElement.contains(element)) && (isNullOrUndefined(datePickerElement))
|
|
194
|
+
&& (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML')))) {
|
|
193
195
|
remove(this.filterMenuElement);
|
|
194
196
|
this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
|
|
195
197
|
this.filterMenuElement = null;
|
|
@@ -149,10 +149,12 @@ var RowDD = /** @class */ (function () {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
if (!args.cancel) {
|
|
152
|
-
args.cancel = true;
|
|
153
152
|
args.requestType = 'beforeDrop';
|
|
154
153
|
this.parent.trigger('actionBegin', args);
|
|
155
|
-
|
|
154
|
+
if (!args.cancel) {
|
|
155
|
+
this.dropRows(args, true); // method to update the data collections based on drop action
|
|
156
|
+
args.cancel = true;
|
|
157
|
+
}
|
|
156
158
|
}
|
|
157
159
|
};
|
|
158
160
|
RowDD.prototype.dropRows = function (args, isByMethod) {
|
|
@@ -249,33 +251,55 @@ var RowDD = /** @class */ (function () {
|
|
|
249
251
|
var data_1 = gObj.flatData;
|
|
250
252
|
var startIndex = void 0;
|
|
251
253
|
var endIndex = void 0;
|
|
254
|
+
var ganttData_1 = this_1.parent.dataSource;
|
|
255
|
+
var uniqueTaskID_1 = this_1.parent.taskFields.id;
|
|
252
256
|
if (draggedRecord.index < droppedRecord.index) {
|
|
253
257
|
startIndex = draggedRecord.index;
|
|
254
|
-
|
|
258
|
+
var _loop_2 = function (i_1) {
|
|
259
|
+
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
260
|
+
return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
|
|
261
|
+
})[0];
|
|
262
|
+
if (currentData.index > droppedRecord.index) {
|
|
263
|
+
endIndex = currentData.index;
|
|
264
|
+
return "break";
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
|
|
268
|
+
var state_2 = _loop_2(i_1);
|
|
269
|
+
if (state_2 === "break")
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
255
272
|
}
|
|
256
273
|
else {
|
|
257
274
|
startIndex = droppedRecord.index;
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
275
|
+
var _loop_3 = function (i_2) {
|
|
276
|
+
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
277
|
+
return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
|
|
278
|
+
})[0];
|
|
279
|
+
if (currentData.index > draggedRecord.index) {
|
|
280
|
+
endIndex = currentData.index;
|
|
281
|
+
return "break";
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
|
|
285
|
+
var state_3 = _loop_3(i_2);
|
|
286
|
+
if (state_3 === "break")
|
|
287
|
+
break;
|
|
263
288
|
}
|
|
264
|
-
endIndex = rootChildRecord.index;
|
|
265
289
|
}
|
|
266
|
-
var
|
|
267
|
-
if (!isNullOrUndefined(data_1[
|
|
268
|
-
data_1[
|
|
269
|
-
if (!isNullOrUndefined(data_1[
|
|
290
|
+
var _loop_4 = function (i_3) {
|
|
291
|
+
if (!isNullOrUndefined(data_1[i_3])) {
|
|
292
|
+
data_1[i_3].index = i_3;
|
|
293
|
+
if (!isNullOrUndefined(data_1[i_3].parentItem)) {
|
|
270
294
|
var updatedParent = data_1.filter(function (e) {
|
|
271
|
-
return e.uniqueID === data_1[
|
|
295
|
+
return e.uniqueID === data_1[i_3].parentUniqueID;
|
|
272
296
|
})[0];
|
|
273
|
-
data_1[
|
|
297
|
+
data_1[i_3].parentItem.index = updatedParent.index;
|
|
274
298
|
}
|
|
275
299
|
}
|
|
276
300
|
};
|
|
277
|
-
for (var
|
|
278
|
-
|
|
301
|
+
for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
|
|
302
|
+
_loop_4(i_3);
|
|
279
303
|
}
|
|
280
304
|
}
|
|
281
305
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
@@ -133,8 +133,9 @@ var Selection = /** @class */ (function () {
|
|
|
133
133
|
}
|
|
134
134
|
this.addRemoveClass(index);
|
|
135
135
|
this.selectedRowIndexes = extend([], this.getSelectedRowIndexes(), [], true);
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
this.parent.setProperties({ selectedRowIndex: -1 }, true);
|
|
137
|
+
if (this.selectedRowIndexes.length === 1) {
|
|
138
|
+
this.parent.setProperties({ selectedRowIndex: this.selectedRowIndexes[0] }, true);
|
|
138
139
|
}
|
|
139
140
|
if (!isNullOrUndefined(this.parent.toolbarModule)) {
|
|
140
141
|
this.parent.toolbarModule.refreshToolbarItems();
|
|
@@ -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
|
/**
|
|
@@ -209,8 +211,19 @@ var GanttChart = /** @class */ (function () {
|
|
|
209
211
|
//empty row height
|
|
210
212
|
var emptydivHeight = 36;
|
|
211
213
|
var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
|
|
212
|
-
this.
|
|
213
|
-
|
|
214
|
+
var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
215
|
+
if (emptyHeight >= contentElement['offsetHeight'] || this.parent.height === 'auto') {
|
|
216
|
+
this.chartBodyContent.style.height = formatUnit(emptyHeight);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
|
|
220
|
+
if (contentElement['offsetHeight'] >= scrollHeight) {
|
|
221
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
|
|
225
|
+
}
|
|
226
|
+
} //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
|
|
214
227
|
this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
|
|
215
228
|
this.setVirtualHeight();
|
|
216
229
|
this.parent.notify('updateHeight', {});
|
|
@@ -242,7 +255,21 @@ var GanttChart = /** @class */ (function () {
|
|
|
242
255
|
if (this.chartBodyContent.clientHeight < this.chartBodyContainer.clientHeight) {
|
|
243
256
|
if (lastRow) {
|
|
244
257
|
addClass(lastRow.querySelectorAll('td'), 'e-lastrow');
|
|
245
|
-
|
|
258
|
+
var emptydivHeight = 36;
|
|
259
|
+
var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
|
|
260
|
+
var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
261
|
+
if (emptyHeight >= contentElement['offsetHeight']) {
|
|
262
|
+
this.chartBodyContent.style.height = formatUnit(emptyHeight);
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
|
|
266
|
+
if (contentElement['offsetHeight'] >= scrollHeight) {
|
|
267
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
|
|
271
|
+
}
|
|
272
|
+
}
|
|
246
273
|
}
|
|
247
274
|
}
|
|
248
275
|
}
|
|
@@ -374,7 +401,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
374
401
|
var target = e.target;
|
|
375
402
|
var isOnTaskbarElement = e.target.classList.contains(cls.taskBarMainContainer)
|
|
376
403
|
|| closest(e.target, '.' + cls.taskBarMainContainer);
|
|
377
|
-
if (closest(target, '.e-gantt-parent-taskbar')) {
|
|
404
|
+
if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
|
|
378
405
|
this.chartExpandCollapseRequest(e);
|
|
379
406
|
}
|
|
380
407
|
else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
|
|
@@ -898,6 +925,10 @@ var GanttChart = /** @class */ (function () {
|
|
|
898
925
|
$target.classList.contains('e-headercell') || $target.closest('.e-segmented-taskbar')) {
|
|
899
926
|
e.preventDefault();
|
|
900
927
|
}
|
|
928
|
+
if (isTab && $target.classList.contains('e-rowdragdrop')) {
|
|
929
|
+
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
901
932
|
if ($target.classList.contains('e-rowcell') && (nextElement && nextElement.classList.contains('e-rowcell')) ||
|
|
902
933
|
$target.classList.contains('e-headercell')) { // eslint-disable-line
|
|
903
934
|
if (isTab) {
|
|
@@ -940,7 +971,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
940
971
|
else {
|
|
941
972
|
this.manageFocus($target, 'remove', true);
|
|
942
973
|
}
|
|
943
|
-
if (nextElement.classList.contains('e-rowcell')) {
|
|
974
|
+
if (nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) {
|
|
944
975
|
if (!$target.classList.contains('e-rowcell')) {
|
|
945
976
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
946
977
|
var fmodule = getValue('focusModule', this.parent.treeGrid.grid);
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -290,25 +290,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
290
290
|
* @returns {void} .
|
|
291
291
|
*/
|
|
292
292
|
Gantt.prototype.calculateDimensions = function () {
|
|
293
|
-
var settingsHeight;
|
|
294
|
-
if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
|
|
295
|
-
!this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
|
|
296
|
-
var ganttHeight = void 0;
|
|
297
|
-
if (this.element.parentElement.style.height.indexOf('%') == -1) {
|
|
298
|
-
ganttHeight = Number(this.height.split("%")[0]);
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
ganttHeight = Number(this.element.parentElement.style.height.split("%")[0]);
|
|
302
|
-
}
|
|
303
|
-
ganttHeight = (ganttHeight * window.innerHeight) / 100;
|
|
304
|
-
if (this.height === '100%') {
|
|
305
|
-
ganttHeight = ganttHeight - 16;
|
|
306
|
-
}
|
|
307
|
-
settingsHeight = this.validateDimentionValue(ganttHeight);
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
settingsHeight = this.validateDimentionValue(this.height);
|
|
311
|
-
}
|
|
293
|
+
var settingsHeight = this.validateDimentionValue(this.height);
|
|
312
294
|
var settingsWidth = this.validateDimentionValue(this.width);
|
|
313
295
|
if (!isNullOrUndefined(this.width) && typeof (this.width) === 'string' && this.width.indexOf('%') !== -1) {
|
|
314
296
|
settingsWidth = this.width;
|
|
@@ -451,40 +433,6 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
451
433
|
*/
|
|
452
434
|
Gantt.prototype.windowResize = function () {
|
|
453
435
|
if (!isNullOrUndefined(this.element)) {
|
|
454
|
-
var settingsHeight = void 0;
|
|
455
|
-
if (this.height.indexOf('%') !== -1) {
|
|
456
|
-
var ganttHeight = Number(this.height.split("%")[0]);
|
|
457
|
-
if (this.element.parentElement && (this.element.parentElement.style.height)) {
|
|
458
|
-
var containerHeight = void 0;
|
|
459
|
-
if (this.element.parentElement.style.height.indexOf('%') == -1) {
|
|
460
|
-
containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
|
|
461
|
-
ganttHeight = (ganttHeight * containerHeight) / 100;
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
containerHeight = Number(this.element.parentElement.style.height.split("%")[0]);
|
|
465
|
-
ganttHeight = (window.innerHeight * containerHeight) / 100;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
else {
|
|
469
|
-
ganttHeight = Number(this.height.split("%")[0]);
|
|
470
|
-
ganttHeight = (ganttHeight * window.innerHeight) / 100;
|
|
471
|
-
}
|
|
472
|
-
if (this.height === '100%') {
|
|
473
|
-
ganttHeight = ganttHeight - 16;
|
|
474
|
-
}
|
|
475
|
-
var toolbarHeight = 0;
|
|
476
|
-
if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
|
|
477
|
-
toolbarHeight = this.toolbarModule.element.offsetHeight;
|
|
478
|
-
}
|
|
479
|
-
var contentHeight = ganttHeight - this.ganttChartModule.chartTimelineContainer.offsetHeight - toolbarHeight;
|
|
480
|
-
settingsHeight = this.validateDimentionValue(ganttHeight);
|
|
481
|
-
this.element.style.height = settingsHeight;
|
|
482
|
-
this.element.querySelectorAll('.e-content')[0]['style'].height = contentHeight + 'px';
|
|
483
|
-
this.element.querySelectorAll('.e-content')[2]['style'].height = contentHeight + 'px';
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
settingsHeight = this.validateDimentionValue(this.height);
|
|
487
|
-
}
|
|
488
436
|
this.updateContentHeight();
|
|
489
437
|
this.ganttChartModule.updateWidthAndHeight(); // Updating chart scroll conatiner height for row mismatch
|
|
490
438
|
this.treeGridModule.ensureScrollBar();
|
|
@@ -830,6 +778,18 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
830
778
|
* @private
|
|
831
779
|
*/
|
|
832
780
|
Gantt.prototype.treeDataBound = function (args) {
|
|
781
|
+
this.element.getElementsByClassName('e-chart-root-container')[0]['style'].height = '100%';
|
|
782
|
+
var gridHeight = this.element.getElementsByClassName('e-gridcontent')[0]['style'].height;
|
|
783
|
+
var timelineContainer = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
|
|
784
|
+
gridHeight = 'calc(100% - ' + timelineContainer + 'px)';
|
|
785
|
+
// eslint-disable-next-line
|
|
786
|
+
this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
787
|
+
if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
|
|
788
|
+
this.splitterElement.style.height = 'calc(100% - ' + this.toolbarModule.element.offsetHeight + 'px)';
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
this.splitterElement.style.height = '100%';
|
|
792
|
+
}
|
|
833
793
|
if (this.isLoad) {
|
|
834
794
|
this.updateCurrentViewData();
|
|
835
795
|
if (!this.enableVirtualization) {
|
|
@@ -849,8 +809,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
849
809
|
removeClass(this.treeGrid.element.querySelectorAll('.e-headercell'), cls.timelineSingleHeaderOuterDiv);
|
|
850
810
|
removeClass(this.treeGrid.element.querySelectorAll('.e-columnheader'), cls.timelineSingleHeaderOuterDiv);
|
|
851
811
|
}
|
|
852
|
-
this.treeGrid.height =
|
|
853
|
-
this.treeGrid.grid.getHeaderContent().offsetHeight;
|
|
812
|
+
this.treeGrid.height = '100%';
|
|
854
813
|
this.notify('tree-grid-created', {});
|
|
855
814
|
this.createGanttPopUpElement();
|
|
856
815
|
this.hideSpinner();
|
|
@@ -1361,7 +1320,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1361
1320
|
*/
|
|
1362
1321
|
Gantt.prototype.updateGridLineContainerHeight = function () {
|
|
1363
1322
|
if (this.chartVerticalLineContainer) {
|
|
1364
|
-
this.chartVerticalLineContainer.style.height = formatUnit(this.
|
|
1323
|
+
this.chartVerticalLineContainer.style.height = formatUnit(this.contentHeight);
|
|
1365
1324
|
}
|
|
1366
1325
|
};
|
|
1367
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');
|