@syncfusion/ej2-gantt 19.4.55 → 19.4.56
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 +14 -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 +77 -74
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +81 -74
- 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 +11 -11
- package/src/gantt/actions/edit.js +33 -15
- package/src/gantt/actions/selection.js +3 -2
- package/src/gantt/base/gantt-chart.js +28 -2
- package/src/gantt/base/gantt.js +14 -55
- package/src/gantt/renderer/timeline.js +3 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.4.
|
|
3
|
+
* version : 19.4.56
|
|
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.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@19.4.55",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-gZWXMRL9cYEDUGsm8sokogX51ecVxkU/WFkb4+yH88KmjX/hb2jQn1SWtweE/UEIe310KERxFu9fxtBlBwbIIA==",
|
|
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-19.4.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-19.4.55.tgz",
|
|
27
|
+
"_shasum": "63cf81d6fdc34d12a5659d652bf45a03a70186cb",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@syncfusion/ej2-base": "~19.4.52",
|
|
39
39
|
"@syncfusion/ej2-buttons": "~19.4.55",
|
|
40
|
-
"@syncfusion/ej2-calendars": "~19.4.
|
|
40
|
+
"@syncfusion/ej2-calendars": "~19.4.56",
|
|
41
41
|
"@syncfusion/ej2-data": "~19.4.54",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~19.4.
|
|
43
|
-
"@syncfusion/ej2-grids": "~19.4.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~19.4.56",
|
|
43
|
+
"@syncfusion/ej2-grids": "~19.4.56",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~19.4.52",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~19.4.52",
|
|
46
46
|
"@syncfusion/ej2-lists": "~19.4.55",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~19.4.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~19.4.56",
|
|
48
48
|
"@syncfusion/ej2-popups": "~19.4.53",
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~19.4.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~19.4.
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~19.4.56",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~19.4.56"
|
|
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": "19.4.
|
|
78
|
+
"version": "19.4.56",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -2348,23 +2348,22 @@ var Edit = /** @class */ (function () {
|
|
|
2348
2348
|
}
|
|
2349
2349
|
/* data Source update */
|
|
2350
2350
|
if (!isNullOrUndefined(parentItem)) {
|
|
2351
|
-
|
|
2352
|
-
|
|
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
|
+
} /*Child collection update*/
|
|
2353
2360
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
2354
2361
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
2355
2362
|
isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
|
|
2356
2363
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
2357
2364
|
var child = this.parent.taskFields.child;
|
|
2358
2365
|
if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
|
|
2359
|
-
|
|
2360
|
-
parentItem.taskData[child].splice(childIndex, 0, record.taskData);
|
|
2361
|
-
}
|
|
2362
|
-
else if (rowPosition === 'Below') {
|
|
2363
|
-
parentItem.taskData[child].splice(childIndex + 1, 0, record.taskData);
|
|
2364
|
-
}
|
|
2365
|
-
else {
|
|
2366
|
-
parentItem.taskData[child].push(record.taskData);
|
|
2367
|
-
}
|
|
2366
|
+
parentItem.taskData[child].splice(childIndex, 0, record.taskData);
|
|
2368
2367
|
}
|
|
2369
2368
|
else {
|
|
2370
2369
|
parentItem.taskData[child] = [];
|
|
@@ -2427,11 +2426,27 @@ var Edit = /** @class */ (function () {
|
|
|
2427
2426
|
}
|
|
2428
2427
|
};
|
|
2429
2428
|
Edit.prototype.refreshRecordInImmutableMode = function () {
|
|
2429
|
+
var _loop_1 = function (i) {
|
|
2430
|
+
var originalData = this_1.parent.modifiedRecords[i];
|
|
2431
|
+
var treeIndex = this_1.parent.allowRowDragAndDrop ? 1 : 0;
|
|
2432
|
+
var uniqueTaskID = this_1.parent.taskFields.id;
|
|
2433
|
+
originalIndex = this_1.parent.currentViewData.findIndex(function (data) {
|
|
2434
|
+
return (data[uniqueTaskID] == originalData[uniqueTaskID]);
|
|
2435
|
+
});
|
|
2436
|
+
if (this_1.parent.treeGrid.getRows()[originalIndex]) {
|
|
2437
|
+
this_1.parent.treeGrid.renderModule.cellRender({
|
|
2438
|
+
data: originalData, cell: this_1.parent.treeGrid.getRows()[originalIndex].cells[this_1.parent.treeColumnIndex + treeIndex],
|
|
2439
|
+
column: this_1.parent.treeGrid.grid.getColumns()[this_1.parent.treeColumnIndex],
|
|
2440
|
+
requestType: 'rowDragAndDrop'
|
|
2441
|
+
});
|
|
2442
|
+
this_1.parent.treeGrid.renderModule.RowModifier({
|
|
2443
|
+
data: originalData, row: this_1.parent.treeGrid.getRows()[originalIndex], rowHeight: this_1.parent.rowHeight
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
};
|
|
2447
|
+
var this_1 = this, originalIndex;
|
|
2430
2448
|
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);
|
|
2449
|
+
_loop_1(i);
|
|
2435
2450
|
}
|
|
2436
2451
|
};
|
|
2437
2452
|
/**
|
|
@@ -3185,15 +3200,18 @@ var Edit = /** @class */ (function () {
|
|
|
3185
3200
|
if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
|
|
3186
3201
|
draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
|
|
3187
3202
|
draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
|
|
3203
|
+
draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.parentID];
|
|
3188
3204
|
}
|
|
3189
3205
|
else {
|
|
3190
3206
|
draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
|
|
3191
3207
|
draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
|
|
3208
|
+
draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.id];
|
|
3192
3209
|
}
|
|
3193
3210
|
}
|
|
3194
3211
|
else {
|
|
3195
3212
|
draggedRec[this.parent.taskFields.parentID] = null;
|
|
3196
3213
|
draggedRec.taskData[this.parent.taskFields.parentID] = null;
|
|
3214
|
+
draggedRec.ganttProperties['parentId'] = null;
|
|
3197
3215
|
}
|
|
3198
3216
|
}
|
|
3199
3217
|
};
|
|
@@ -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();
|
|
@@ -209,7 +209,19 @@ var GanttChart = /** @class */ (function () {
|
|
|
209
209
|
//empty row height
|
|
210
210
|
var emptydivHeight = 36;
|
|
211
211
|
var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
|
|
212
|
-
this.
|
|
212
|
+
var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
213
|
+
if (emptyHeight >= contentElement['offsetHeight']) {
|
|
214
|
+
this.chartBodyContent.style.height = formatUnit(emptyHeight);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
|
|
218
|
+
if (contentElement['offsetHeight'] >= scrollHeight) {
|
|
219
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
|
|
223
|
+
}
|
|
224
|
+
}
|
|
213
225
|
//let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
|
|
214
226
|
this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
|
|
215
227
|
this.setVirtualHeight();
|
|
@@ -242,7 +254,21 @@ var GanttChart = /** @class */ (function () {
|
|
|
242
254
|
if (this.chartBodyContent.clientHeight < this.chartBodyContainer.clientHeight) {
|
|
243
255
|
if (lastRow) {
|
|
244
256
|
addClass(lastRow.querySelectorAll('td'), 'e-lastrow');
|
|
245
|
-
|
|
257
|
+
var emptydivHeight = 36;
|
|
258
|
+
var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
|
|
259
|
+
var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
260
|
+
if (emptyHeight >= contentElement['offsetHeight']) {
|
|
261
|
+
this.chartBodyContent.style.height = formatUnit(emptyHeight);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
|
|
265
|
+
if (contentElement['offsetHeight'] >= scrollHeight) {
|
|
266
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
|
|
270
|
+
}
|
|
271
|
+
}
|
|
246
272
|
}
|
|
247
273
|
}
|
|
248
274
|
}
|
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)) {
|
|
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();
|
|
@@ -123,6 +123,9 @@ var Timeline = /** @class */ (function () {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
+
currentLevel = this.parent.zoomingLevels.findIndex(function (tempLevel) {
|
|
127
|
+
return tempLevel.level === currentLevel;
|
|
128
|
+
});
|
|
126
129
|
var newTimeline = this.parent.zoomingLevels[currentLevel];
|
|
127
130
|
var args = {
|
|
128
131
|
requestType: isZoomIn ? 'beforeZoomIn' : 'beforeZoomOut',
|