@syncfusion/ej2-gantt 22.1.37 → 22.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +192 -92
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +192 -92
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +17 -17
- package/src/gantt/actions/context-menu.js +70 -47
- package/src/gantt/actions/dependency.js +6 -0
- package/src/gantt/actions/dialog-edit.js +2 -2
- package/src/gantt/base/date-processor.js +10 -2
- package/src/gantt/base/gantt-chart.js +20 -15
- package/src/gantt/base/tree-grid.js +78 -22
- package/src/gantt/renderer/chart-rows.js +4 -4
- package/src/gantt/renderer/timeline.js +2 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.1.
|
|
3
|
+
* version : 22.1.39
|
|
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@22.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@22.1.38",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-7FedUEMWDQKsmt0e1+CD2/34MjEu9feyw9UQYunIzqsUCu1qDRWFkf4nic/+sA4oY0vBEt2l62pS+co4QgnBwQ==",
|
|
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": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.1.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.1.38.tgz",
|
|
27
|
+
"_shasum": "9e008d4d18aadf6f4e10de761d95397499fd9053",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~22.1.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~22.1.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~22.1.
|
|
41
|
-
"@syncfusion/ej2-data": "~22.1.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~22.1.
|
|
43
|
-
"@syncfusion/ej2-grids": "~22.1.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~22.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~22.1.38",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~22.1.39",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~22.1.38",
|
|
41
|
+
"@syncfusion/ej2-data": "~22.1.38",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~22.1.39",
|
|
43
|
+
"@syncfusion/ej2-grids": "~22.1.39",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~22.1.39",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~22.1.37",
|
|
46
46
|
"@syncfusion/ej2-lists": "~22.1.34",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~22.1.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~22.1.39",
|
|
48
48
|
"@syncfusion/ej2-notifications": "~22.1.34",
|
|
49
|
-
"@syncfusion/ej2-popups": "~22.1.
|
|
50
|
-
"@syncfusion/ej2-richtexteditor": "~22.1.
|
|
51
|
-
"@syncfusion/ej2-svg-base": "~22.1.
|
|
52
|
-
"@syncfusion/ej2-treegrid": "~22.1.
|
|
49
|
+
"@syncfusion/ej2-popups": "~22.1.38",
|
|
50
|
+
"@syncfusion/ej2-richtexteditor": "~22.1.39",
|
|
51
|
+
"@syncfusion/ej2-svg-base": "~22.1.39",
|
|
52
|
+
"@syncfusion/ej2-treegrid": "~22.1.39"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
75
75
|
},
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "22.1.
|
|
77
|
+
"version": "22.1.39",
|
|
78
78
|
"sideEffects": false
|
|
79
79
|
}
|
|
@@ -101,65 +101,79 @@ var ContextMenu = /** @class */ (function () {
|
|
|
101
101
|
}
|
|
102
102
|
switch (this.item) {
|
|
103
103
|
case 'TaskInformation':
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
if (!isNullOrUndefined(this.rowData)) {
|
|
105
|
+
if (isNaN(Number(this.rowData.ganttProperties.rowUniqueID))) {
|
|
106
|
+
this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));
|
|
110
|
+
}
|
|
109
111
|
}
|
|
110
112
|
break;
|
|
111
113
|
case 'Above':
|
|
112
114
|
case 'Below':
|
|
113
115
|
case 'Child':
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
data[taskfields.parentID]
|
|
116
|
+
if (!isNullOrUndefined(this.rowData)) {
|
|
117
|
+
position = this.item;
|
|
118
|
+
data = extend({}, {}, this.rowData.taskData, true);
|
|
119
|
+
taskfields = this.parent.taskFields;
|
|
120
|
+
if (data[taskfields.startDate]) {
|
|
121
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
122
|
+
}
|
|
123
|
+
if (data[taskfields.endDate]) {
|
|
124
|
+
this.parent.setRecordValue(taskfields.endDate, this.rowData.ganttProperties.endDate, data, true);
|
|
125
|
+
}
|
|
126
|
+
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
127
|
+
data[taskfields.dependency] = null;
|
|
128
|
+
}
|
|
129
|
+
if (!isNullOrUndefined(taskfields.child) && data[taskfields.child]) {
|
|
130
|
+
delete data[taskfields.child];
|
|
131
|
+
}
|
|
132
|
+
if (!isNullOrUndefined(taskfields.parentID) && data[taskfields.parentID]) {
|
|
133
|
+
data[taskfields.parentID] = null;
|
|
134
|
+
}
|
|
135
|
+
if (this.rowData) {
|
|
136
|
+
var rowIndex = this.parent.updatedRecords.indexOf(this.rowData);
|
|
137
|
+
this.parent.addRecord(data, position, rowIndex);
|
|
138
|
+
}
|
|
131
139
|
}
|
|
132
|
-
if (this.
|
|
133
|
-
|
|
134
|
-
this.parent.addRecord(data, position, rowIndex);
|
|
140
|
+
else if (this.parent.flatData.length === 0) {
|
|
141
|
+
this.parent.addRecord();
|
|
135
142
|
}
|
|
136
143
|
break;
|
|
137
144
|
case 'Milestone':
|
|
138
145
|
case 'ToMilestone':
|
|
139
|
-
|
|
146
|
+
if (!isNullOrUndefined(this.rowData)) {
|
|
147
|
+
this.parent.convertToMilestone(this.rowData.ganttProperties.rowUniqueID);
|
|
148
|
+
}
|
|
149
|
+
else if (this.parent.flatData.length === 0) {
|
|
150
|
+
this.parent.addRecord();
|
|
151
|
+
}
|
|
140
152
|
break;
|
|
141
153
|
case 'DeleteTask':
|
|
142
154
|
this.parent.editModule.deleteRecord(this.rowData);
|
|
143
155
|
break;
|
|
144
156
|
case 'ToTask':
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (!isNullOrUndefined(data[taskfields.milestone])) {
|
|
158
|
-
if (data[taskfields.milestone] === true) {
|
|
159
|
-
data[taskfields.milestone] = false;
|
|
157
|
+
if (!isNullOrUndefined(this.rowData)) {
|
|
158
|
+
data = extend({}, {}, this.rowData.taskData, true);
|
|
159
|
+
taskfields = this.parent.taskFields;
|
|
160
|
+
if (!isNullOrUndefined(taskfields.duration)) {
|
|
161
|
+
var ganttProp = this.rowData.ganttProperties;
|
|
162
|
+
data[taskfields.duration] = '1 ' + ganttProp.durationUnit;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
data[taskfields.startDate] = new Date(this.rowData.taskData[taskfields.startDate]);
|
|
166
|
+
var endDate = new Date(this.rowData.taskData[taskfields.startDate]);
|
|
167
|
+
endDate.setDate(endDate.getDate() + 1);
|
|
168
|
+
data[taskfields.endDate] = endDate;
|
|
160
169
|
}
|
|
170
|
+
if (!isNullOrUndefined(data[taskfields.milestone])) {
|
|
171
|
+
if (data[taskfields.milestone] === true) {
|
|
172
|
+
data[taskfields.milestone] = false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
this.parent.updateRecordByID(data);
|
|
161
176
|
}
|
|
162
|
-
this.parent.updateRecordByID(data);
|
|
163
177
|
break;
|
|
164
178
|
case 'Cancel':
|
|
165
179
|
this.parent.cancelEdit();
|
|
@@ -315,7 +329,7 @@ var ContextMenu = /** @class */ (function () {
|
|
|
315
329
|
this.contextMenu.enableItems(['Add', 'Save', 'Convert', 'Delete Dependency', 'Delete Task', 'TaskMode', 'Indent', 'Outdent', 'SplitTask', 'MergeTask'], false);
|
|
316
330
|
}
|
|
317
331
|
if ((isNullOrUndefined(args.gridRow) && isNullOrUndefined(args.chartRow)) || this.contentMenuItems.length === 0) {
|
|
318
|
-
if (!isNullOrUndefined(args.parentItem) && !isNullOrUndefined(menuElement)) {
|
|
332
|
+
if (!isNullOrUndefined(args.parentItem) && !isNullOrUndefined(menuElement) || !isNullOrUndefined(closest(target, '.e-content'))) {
|
|
319
333
|
args.cancel = false;
|
|
320
334
|
}
|
|
321
335
|
else {
|
|
@@ -355,7 +369,7 @@ var ContextMenu = /** @class */ (function () {
|
|
|
355
369
|
args.disableItems = this.disableItems;
|
|
356
370
|
args.hideItems = this.hideItems;
|
|
357
371
|
args.hideChildItems = [];
|
|
358
|
-
if (args.rowData.level === 0 && this.parent.viewType === 'ResourceView') {
|
|
372
|
+
if (!isNullOrUndefined(args.rowData) && args.rowData.level === 0 && this.parent.viewType === 'ResourceView') {
|
|
359
373
|
args.cancel = true;
|
|
360
374
|
return;
|
|
361
375
|
}
|
|
@@ -397,6 +411,9 @@ var ContextMenu = /** @class */ (function () {
|
|
|
397
411
|
if (!this.parent.editSettings.allowEditing || !this.parent.editModule) {
|
|
398
412
|
this.updateItemVisibility(item.text);
|
|
399
413
|
}
|
|
414
|
+
if (this.parent.flatData.length === 0) {
|
|
415
|
+
this.hideItems.push(item.text);
|
|
416
|
+
}
|
|
400
417
|
break;
|
|
401
418
|
case 'Add':
|
|
402
419
|
if (!this.parent.editSettings.allowAdding || !this.parent.editModule) {
|
|
@@ -408,14 +425,14 @@ var ContextMenu = /** @class */ (function () {
|
|
|
408
425
|
this.hideItems.push(item.text);
|
|
409
426
|
break;
|
|
410
427
|
case 'Convert':
|
|
411
|
-
if (this.rowData.hasChildRecords) {
|
|
428
|
+
if (!isNullOrUndefined(this.rowData) && this.rowData.hasChildRecords) {
|
|
412
429
|
this.hideItems.push(item.text);
|
|
413
430
|
}
|
|
414
431
|
else if (!this.parent.editSettings.allowEditing || !this.parent.editModule) {
|
|
415
432
|
this.updateItemVisibility(item.text);
|
|
416
433
|
}
|
|
417
434
|
else {
|
|
418
|
-
if (!this.rowData.ganttProperties.isMilestone) {
|
|
435
|
+
if (!isNullOrUndefined(this.rowData) && !this.rowData.ganttProperties.isMilestone) {
|
|
419
436
|
subMenu.push(this.createItemModel(cons.content, 'ToMilestone', this.getLocale('toMilestone')));
|
|
420
437
|
}
|
|
421
438
|
else {
|
|
@@ -423,11 +440,14 @@ var ContextMenu = /** @class */ (function () {
|
|
|
423
440
|
}
|
|
424
441
|
item.items = subMenu;
|
|
425
442
|
}
|
|
443
|
+
if (this.parent.flatData.length === 0) {
|
|
444
|
+
this.hideItems.push(item.text);
|
|
445
|
+
}
|
|
426
446
|
break;
|
|
427
447
|
case 'DeleteDependency':
|
|
428
448
|
{
|
|
429
449
|
var items = this.getPredecessorsItems();
|
|
430
|
-
if (this.rowData.hasChildRecords) {
|
|
450
|
+
if (!isNullOrUndefined(this.rowData) && this.rowData.hasChildRecords) {
|
|
431
451
|
this.hideItems.push(item.text);
|
|
432
452
|
}
|
|
433
453
|
else if (!this.parent.editSettings.allowDeleting || items.length === 0 || !this.parent.editModule) {
|
|
@@ -442,6 +462,9 @@ var ContextMenu = /** @class */ (function () {
|
|
|
442
462
|
if (!this.parent.editSettings.allowDeleting || !this.parent.editModule) {
|
|
443
463
|
this.updateItemVisibility(item.text);
|
|
444
464
|
}
|
|
465
|
+
if (this.parent.flatData.length === 0) {
|
|
466
|
+
this.hideItems.push(item.text);
|
|
467
|
+
}
|
|
445
468
|
break;
|
|
446
469
|
case 'TaskMode':
|
|
447
470
|
if (this.parent.taskMode !== 'Custom') {
|
|
@@ -330,6 +330,9 @@ var Dependency = /** @class */ (function () {
|
|
|
330
330
|
ganttRecord = predecessorsCollection[count];
|
|
331
331
|
if ((!ganttRecord.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
|
|
332
332
|
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
333
|
+
if (!ganttRecord.ganttProperties.isAutoSchedule) {
|
|
334
|
+
this.parent.connectorLineEditModule['calculateOffset'](ganttRecord);
|
|
335
|
+
}
|
|
333
336
|
}
|
|
334
337
|
}
|
|
335
338
|
};
|
|
@@ -760,6 +763,9 @@ var Dependency = /** @class */ (function () {
|
|
|
760
763
|
if (validationOn !== 'predecessor' && this.parent.isValidationEnabled) {
|
|
761
764
|
this.validateChildGanttRecord(parentGanttRecord, record);
|
|
762
765
|
}
|
|
766
|
+
else if (!record.ganttProperties.isAutoSchedule && this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
767
|
+
this.parent.connectorLineEditModule['calculateOffset'](record);
|
|
768
|
+
}
|
|
763
769
|
if (parentGanttRecord.expanded === false || record.expanded === false) {
|
|
764
770
|
if (record) {
|
|
765
771
|
this.validatePredecessor(record, undefined, 'successor');
|
|
@@ -2196,7 +2196,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
2196
2196
|
}
|
|
2197
2197
|
for (var i = 0; i < childNodes.length; i++) {
|
|
2198
2198
|
var div = childNodes[i];
|
|
2199
|
-
var inputElement = div.querySelector('input[id^="' + ganttObj.element.id + '"]');
|
|
2199
|
+
var inputElement = div.querySelector('input[id^="' + ganttObj.element.id + '"]') || div.querySelector('textarea[id^="' + ganttObj.element.id + '"]');
|
|
2200
2200
|
if (inputElement) {
|
|
2201
2201
|
var fieldName = inputElement.id.replace(ganttObj.element.id, '');
|
|
2202
2202
|
var controlObj = div.querySelector('#' + ganttObj.element.id + fieldName).ej2_instances[0];
|
|
@@ -2216,7 +2216,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
2218
|
else if (isCustom && column.editType === 'booleanedit') {
|
|
2219
|
-
if (inputElement.checked === true) {
|
|
2219
|
+
if (inputElement instanceof HTMLInputElement && inputElement.checked === true) {
|
|
2220
2220
|
tasksData[fieldName] = true;
|
|
2221
2221
|
}
|
|
2222
2222
|
else {
|
|
@@ -1270,8 +1270,16 @@ var DateProcessor = /** @class */ (function () {
|
|
|
1270
1270
|
viewData.forEach(function (data) {
|
|
1271
1271
|
taskRange = [];
|
|
1272
1272
|
var task = data.ganttProperties;
|
|
1273
|
-
var tempStartDate
|
|
1274
|
-
var tempEndDate
|
|
1273
|
+
var tempStartDate;
|
|
1274
|
+
var tempEndDate;
|
|
1275
|
+
if (isNullOrUndefined(task.startDate) && isNullOrUndefined(task.endDate)) {
|
|
1276
|
+
tempStartDate = null;
|
|
1277
|
+
tempEndDate = null;
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
tempStartDate = _this.getValidStartDate(task);
|
|
1281
|
+
tempEndDate = _this.getValidEndDate(task);
|
|
1282
|
+
}
|
|
1275
1283
|
addDateToList(minStartDate);
|
|
1276
1284
|
addDateToList(maxEndDate);
|
|
1277
1285
|
addDateToList(tempStartDate);
|
|
@@ -762,7 +762,6 @@ var GanttChart = /** @class */ (function () {
|
|
|
762
762
|
this.updateWidthAndHeight();
|
|
763
763
|
this.reRenderConnectorLines();
|
|
764
764
|
getValue('chartRow', args).setAttribute('aria-expanded', 'false');
|
|
765
|
-
this.parent.trigger('collapsed', args);
|
|
766
765
|
};
|
|
767
766
|
/**
|
|
768
767
|
* To expand gantt rows
|
|
@@ -817,7 +816,6 @@ var GanttChart = /** @class */ (function () {
|
|
|
817
816
|
this.updateWidthAndHeight();
|
|
818
817
|
this.reRenderConnectorLines();
|
|
819
818
|
getValue('chartRow', args).setAttribute('aria-expanded', 'true');
|
|
820
|
-
this.parent.trigger('expanded', args);
|
|
821
819
|
};
|
|
822
820
|
GanttChart.prototype.renderMultiTaskbar = function (record) {
|
|
823
821
|
if (this.parent.enableMultiTaskbar) {
|
|
@@ -861,20 +859,27 @@ var GanttChart = /** @class */ (function () {
|
|
|
861
859
|
removeClass([targetElement[t]], 'e-row-expand');
|
|
862
860
|
}
|
|
863
861
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
862
|
+
if (!this.parent.enableVirtualization) {
|
|
863
|
+
var childRecords = record.childRecords;
|
|
864
|
+
var chartRows = this.getChartRows();
|
|
865
|
+
var rows = [];
|
|
866
|
+
for (var i = 0; i < chartRows.length; i++) {
|
|
867
|
+
if (chartRows[i].classList.contains("gridrowtaskId" +
|
|
868
|
+
record.ganttProperties.rowUniqueID +
|
|
869
|
+
"level" +
|
|
870
|
+
(record.level + 1))) {
|
|
871
|
+
rows.push(chartRows[i]);
|
|
872
|
+
}
|
|
871
873
|
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
874
|
+
for (var i = 0; i < rows.length; i++) {
|
|
875
|
+
rows[i].style.display = displayType;
|
|
876
|
+
if (childRecords[i].childRecords &&
|
|
877
|
+
childRecords[i].childRecords.length &&
|
|
878
|
+
(action === "collapse" ||
|
|
879
|
+
childRecords[i].expanded ||
|
|
880
|
+
this.isExpandAll)) {
|
|
881
|
+
this.expandCollapseChartRows(action, rows[i], childRecords[i], true);
|
|
882
|
+
}
|
|
878
883
|
}
|
|
879
884
|
}
|
|
880
885
|
};
|
|
@@ -241,25 +241,60 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
241
241
|
GanttTreeGrid.prototype.collapsing = function (args) {
|
|
242
242
|
// Collapsing event
|
|
243
243
|
var callBackPromise = new Deferred();
|
|
244
|
+
var collapsingArgs;
|
|
245
|
+
var record = getValue('data', args);
|
|
246
|
+
var recordLength = record.length;
|
|
244
247
|
if (!this.parent.ganttChartModule.isExpandCollapseFromChart) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
if (!isNullOrUndefined(recordLength)) {
|
|
249
|
+
for (var i = 0; i < recordLength; i++) {
|
|
250
|
+
collapsingArgs = this.createExpandCollapseArgs(args, record[i]);
|
|
251
|
+
this.parent.ganttChartModule.collapseGanttRow(collapsingArgs);
|
|
252
|
+
}
|
|
253
|
+
setValue('cancel', getValue('cancel', collapsingArgs), args);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
collapsingArgs = this.createExpandCollapseArgs(args, null);
|
|
257
|
+
this.parent.ganttChartModule.collapseGanttRow(collapsingArgs);
|
|
258
|
+
setValue('cancel', getValue('cancel', collapsingArgs), args);
|
|
259
|
+
}
|
|
248
260
|
}
|
|
249
261
|
};
|
|
250
262
|
GanttTreeGrid.prototype.expanding = function (args) {
|
|
251
263
|
// Expanding event
|
|
252
264
|
var callBackPromise = new Deferred();
|
|
265
|
+
var expandingArgs;
|
|
266
|
+
var record = getValue('data', args);
|
|
267
|
+
var recordLength = record.length;
|
|
253
268
|
if (!this.parent.ganttChartModule.isExpandCollapseFromChart) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
269
|
+
if (!isNullOrUndefined(recordLength)) {
|
|
270
|
+
for (var i = 0; i < recordLength; i++) {
|
|
271
|
+
expandingArgs = this.createExpandCollapseArgs(args, record[i]);
|
|
272
|
+
this.parent.ganttChartModule.expandGanttRow(expandingArgs);
|
|
273
|
+
}
|
|
274
|
+
setValue('cancel', getValue('cancel', expandingArgs), args);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
expandingArgs = this.createExpandCollapseArgs(args, null);
|
|
278
|
+
this.parent.ganttChartModule.expandGanttRow(expandingArgs);
|
|
279
|
+
setValue('cancel', getValue('cancel', expandingArgs), args);
|
|
280
|
+
}
|
|
257
281
|
}
|
|
258
282
|
};
|
|
259
283
|
GanttTreeGrid.prototype.collapsed = function (args) {
|
|
260
284
|
if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
|
|
261
|
-
var collapsedArgs =
|
|
262
|
-
|
|
285
|
+
var collapsedArgs = void 0;
|
|
286
|
+
var record = getValue('data', args);
|
|
287
|
+
var recordLength = record.length;
|
|
288
|
+
if (!isNullOrUndefined(recordLength)) {
|
|
289
|
+
for (var i = 0; i < recordLength; i++) {
|
|
290
|
+
collapsedArgs = this.createExpandCollapseArgs(args, record[i]);
|
|
291
|
+
this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
collapsedArgs = this.createExpandCollapseArgs(args, null);
|
|
296
|
+
this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
|
|
297
|
+
}
|
|
263
298
|
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
|
|
264
299
|
collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
|
|
265
300
|
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
@@ -273,19 +308,29 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
273
308
|
else {
|
|
274
309
|
this.parent.hideSpinner();
|
|
275
310
|
}
|
|
311
|
+
this.parent.trigger('collapsed', args);
|
|
276
312
|
};
|
|
277
313
|
GanttTreeGrid.prototype.expanded = function (args) {
|
|
278
314
|
if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
315
|
+
var expandedArgs = void 0;
|
|
316
|
+
var record = getValue('data', args);
|
|
317
|
+
var recordLength = record.length;
|
|
318
|
+
if (!isNullOrUndefined(recordLength)) {
|
|
319
|
+
for (var i = 0; i < recordLength; i++) {
|
|
320
|
+
expandedArgs = this.createExpandCollapseArgs(args, record[i]);
|
|
321
|
+
this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
|
|
287
322
|
}
|
|
288
323
|
}
|
|
324
|
+
else {
|
|
325
|
+
expandedArgs = this.createExpandCollapseArgs(args, null);
|
|
326
|
+
this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
|
|
327
|
+
}
|
|
328
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
|
|
329
|
+
args['row'].style.height = this.parent.rowHeight + 'px';
|
|
330
|
+
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
331
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
332
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
333
|
+
}
|
|
289
334
|
}
|
|
290
335
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
291
336
|
this.parent.hideMaskRow();
|
|
@@ -293,6 +338,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
293
338
|
else {
|
|
294
339
|
this.parent.hideSpinner();
|
|
295
340
|
}
|
|
341
|
+
this.parent.trigger('expanded', args);
|
|
296
342
|
};
|
|
297
343
|
GanttTreeGrid.prototype.actionBegin = function (args) {
|
|
298
344
|
this.parent.notify('actionBegin', args);
|
|
@@ -316,13 +362,23 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
316
362
|
GanttTreeGrid.prototype.actionFailure = function (args) {
|
|
317
363
|
this.parent.trigger('actionFailure', args);
|
|
318
364
|
};
|
|
319
|
-
GanttTreeGrid.prototype.createExpandCollapseArgs = function (args) {
|
|
320
|
-
var record = getValue('data', args);
|
|
321
|
-
var gridRow = getValue('row', args);
|
|
365
|
+
GanttTreeGrid.prototype.createExpandCollapseArgs = function (args, currentRecord) {
|
|
322
366
|
var chartRow;
|
|
323
|
-
|
|
324
|
-
var
|
|
325
|
-
|
|
367
|
+
var record = getValue('data', args);
|
|
368
|
+
var recordLength = record.length;
|
|
369
|
+
if (!isNullOrUndefined(recordLength)) {
|
|
370
|
+
var gridRow = getValue('row', args);
|
|
371
|
+
chartRow = this.parent.ganttChartModule.getChartRows()[this.parent.currentViewData.indexOf(currentRecord)];
|
|
372
|
+
var eventArgs = { data: currentRecord, gridRow: gridRow, chartRow: chartRow, cancel: false };
|
|
373
|
+
return eventArgs;
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
var record_1 = getValue('data', args);
|
|
377
|
+
var gridRow = getValue('row', args);
|
|
378
|
+
chartRow = this.parent.ganttChartModule.getChartRows()[this.parent.currentViewData.indexOf(record_1)];
|
|
379
|
+
var eventArgs = { data: record_1, gridRow: gridRow, chartRow: chartRow, cancel: false };
|
|
380
|
+
return eventArgs;
|
|
381
|
+
}
|
|
326
382
|
};
|
|
327
383
|
GanttTreeGrid.prototype.treeActionComplete = function (args) {
|
|
328
384
|
var updatedArgs = extend({}, args);
|
|
@@ -1696,8 +1696,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1696
1696
|
taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
|
|
1697
1697
|
}
|
|
1698
1698
|
if (taskbarElement.querySelector(classCollections[0]) &&
|
|
1699
|
-
getComputedStyle(taskbarElement.querySelector(classCollections[0])).
|
|
1700
|
-
taskbarElement.querySelector(classCollections[0]).style.
|
|
1699
|
+
getComputedStyle(taskbarElement.querySelector(classCollections[0])).outlineColor !== args.taskbarBorderColor) {
|
|
1700
|
+
taskbarElement.querySelector(classCollections[0]).style.outlineColor = args.taskbarBorderColor;
|
|
1701
1701
|
}
|
|
1702
1702
|
if (taskbarElement.querySelector(classCollections[1]) &&
|
|
1703
1703
|
getComputedStyle(taskbarElement.querySelector(classCollections[1])).backgroundColor !== args.progressBarBgColor) {
|
|
@@ -1708,8 +1708,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1708
1708
|
taskbarElement.style.backgroundColor = args.taskbarBgColor;
|
|
1709
1709
|
}
|
|
1710
1710
|
if (taskbarElement.classList.contains(cls.traceChildTaskBar) &&
|
|
1711
|
-
getComputedStyle(taskbarElement).
|
|
1712
|
-
taskbarElement.style.
|
|
1711
|
+
getComputedStyle(taskbarElement).outlineColor !== args.taskbarBorderColor) {
|
|
1712
|
+
taskbarElement.style.outlineColor = args.taskbarBorderColor;
|
|
1713
1713
|
}
|
|
1714
1714
|
if (taskbarElement.classList.contains(cls.traceChildProgressBar) &&
|
|
1715
1715
|
getComputedStyle(taskbarElement).backgroundColor !== args.progressBarBgColor) {
|
|
@@ -276,6 +276,8 @@ var Timeline = /** @class */ (function () {
|
|
|
276
276
|
this.parent.showSpinner();
|
|
277
277
|
}
|
|
278
278
|
this.changeTimelineSettings(newTimeline);
|
|
279
|
+
this.isZoomToFit = false;
|
|
280
|
+
this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
|
|
279
281
|
};
|
|
280
282
|
Timeline.prototype.bottomTierCellWidthCalc = function (mode, zoomLevel, date) {
|
|
281
283
|
var convertedMilliSeconds;
|