@syncfusion/ej2-gantt 19.3.44 → 19.3.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 +45 -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 +93 -28
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +146 -71
- 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/cell-edit.js +1 -0
- package/src/gantt/actions/context-menu.js +5 -0
- package/src/gantt/actions/dialog-edit.js +6 -6
- package/src/gantt/actions/edit.js +7 -3
- package/src/gantt/actions/rowdragdrop.js +74 -41
- package/src/gantt/actions/taskbar-edit.js +3 -1
- package/src/gantt/base/date-processor.js +4 -1
- package/src/gantt/base/gantt.js +20 -0
- package/src/gantt/base/task-processor.js +11 -2
- package/src/gantt/base/utils.js +3 -3
- package/src/gantt/export/export-helper.js +12 -14
- package/styles/bootstrap-dark.css +99 -99
- package/styles/bootstrap.css +99 -99
- package/styles/bootstrap4.css +104 -99
- package/styles/bootstrap5-dark.css +104 -99
- package/styles/bootstrap5.css +104 -99
- package/styles/fabric-dark.css +99 -99
- package/styles/fabric.css +99 -99
- package/styles/gantt/_bootstrap-dark-definition.scss +0 -1
- package/styles/gantt/_bootstrap-definition.scss +0 -1
- package/styles/gantt/_bootstrap4-definition.scss +0 -1
- package/styles/gantt/_bootstrap5-definition.scss +0 -1
- package/styles/gantt/_fabric-dark-definition.scss +0 -1
- package/styles/gantt/_fabric-definition.scss +0 -1
- package/styles/gantt/_highcontrast-definition.scss +0 -1
- package/styles/gantt/_highcontrast-light-definition.scss +0 -1
- package/styles/gantt/_layout.scss +100 -95
- package/styles/gantt/_material-dark-definition.scss +0 -1
- package/styles/gantt/_material-definition.scss +0 -1
- package/styles/gantt/_tailwind-definition.scss +0 -1
- package/styles/gantt/_theme.scss +76 -81
- package/styles/gantt/bootstrap-dark.css +99 -99
- package/styles/gantt/bootstrap.css +99 -99
- package/styles/gantt/bootstrap4.css +104 -99
- package/styles/gantt/bootstrap5-dark.css +104 -99
- package/styles/gantt/bootstrap5-dark.scss +1 -0
- package/styles/gantt/bootstrap5.css +104 -99
- package/styles/gantt/bootstrap5.scss +1 -0
- package/styles/gantt/fabric-dark.css +99 -99
- package/styles/gantt/fabric.css +99 -99
- package/styles/gantt/highcontrast-light.css +99 -99
- package/styles/gantt/highcontrast.css +99 -99
- package/styles/gantt/material-dark.css +99 -99
- package/styles/gantt/material.css +99 -99
- package/styles/gantt/tailwind-dark.css +99 -99
- package/styles/gantt/tailwind.css +99 -99
- package/styles/highcontrast-light.css +99 -99
- package/styles/highcontrast.css +99 -99
- package/styles/material-dark.css +99 -99
- package/styles/material.css +99 -99
- package/styles/tailwind-dark.css +99 -99
- package/styles/tailwind.css +99 -99
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.3.
|
|
3
|
+
* version : 19.3.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@19.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@19.3.47",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-b5c1uwQz2aT9zbAfjmIPH9ZNpkUpz0+60BYgSupiKRI7ZElmoC1C3NBchWs9OtTueumyUrk/oivtPzsmgvDvcw==",
|
|
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/@syncfusion/ej2-gantt/-/ej2-gantt-19.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-gantt/-/ej2-gantt-19.3.47.tgz",
|
|
27
|
+
"_shasum": "5dba8136915f2bdf188c72cd173b8bf82ebf8ea1",
|
|
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": "~19.3.
|
|
38
|
+
"@syncfusion/ej2-base": "~19.3.47",
|
|
39
39
|
"@syncfusion/ej2-buttons": "~19.3.44",
|
|
40
|
-
"@syncfusion/ej2-calendars": "~19.3.
|
|
41
|
-
"@syncfusion/ej2-data": "~19.3.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~19.3.
|
|
43
|
-
"@syncfusion/ej2-grids": "~19.3.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~19.3.
|
|
45
|
-
"@syncfusion/ej2-layouts": "~19.3.
|
|
46
|
-
"@syncfusion/ej2-lists": "~19.3.
|
|
47
|
-
"@syncfusion/ej2-navigations": "~19.3.
|
|
48
|
-
"@syncfusion/ej2-popups": "~19.3.
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~19.3.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~19.3.
|
|
40
|
+
"@syncfusion/ej2-calendars": "~19.3.46",
|
|
41
|
+
"@syncfusion/ej2-data": "~19.3.47",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~19.3.48",
|
|
43
|
+
"@syncfusion/ej2-grids": "~19.3.48",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~19.3.48",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~19.3.48",
|
|
46
|
+
"@syncfusion/ej2-lists": "~19.3.48",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~19.3.46",
|
|
48
|
+
"@syncfusion/ej2-popups": "~19.3.47",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~19.3.47",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~19.3.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": "19.3.
|
|
78
|
+
"version": "19.3.48",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -481,6 +481,7 @@ var CellEdit = /** @class */ (function () {
|
|
|
481
481
|
this.parent.editModule.dialogModule.isResourceUpdate = true;
|
|
482
482
|
this.parent.editModule.dialogModule.previousResource = previousResource;
|
|
483
483
|
}
|
|
484
|
+
this.updateDates(args);
|
|
484
485
|
this.updateEditedRecord(args);
|
|
485
486
|
}
|
|
486
487
|
};
|
|
@@ -248,6 +248,11 @@ var ContextMenu = /** @class */ (function () {
|
|
|
248
248
|
var target = args.event ? args.event.target :
|
|
249
249
|
!this.parent.focusModule ? this.parent.focusModule.getActiveElement() :
|
|
250
250
|
this.parent.ganttChartModule.targetElement;
|
|
251
|
+
// Closed edited cell before opening context menu
|
|
252
|
+
// eslint-disable-next-line
|
|
253
|
+
if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
|
|
254
|
+
this.parent.treeGrid.closeEdit();
|
|
255
|
+
}
|
|
251
256
|
if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
|
|
252
257
|
this.clickedPosition = getValue('event', args).clientX;
|
|
253
258
|
}
|
|
@@ -360,7 +360,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
360
360
|
dialogModel.position = position;
|
|
361
361
|
//dialogModel.width = '750px';
|
|
362
362
|
dialogModel.height = this.parent.isAdaptive ? '100%' : 'auto';
|
|
363
|
-
dialogModel.target =
|
|
363
|
+
dialogModel.target = document.body;
|
|
364
364
|
dialogModel.close = this.dialogClose.bind(this);
|
|
365
365
|
dialogModel.closeOnEscape = true;
|
|
366
366
|
dialogModel.open = function (args) {
|
|
@@ -648,15 +648,15 @@ var DialogEdit = /** @class */ (function () {
|
|
|
648
648
|
this.resourceSelection(id);
|
|
649
649
|
}
|
|
650
650
|
else if (id === ganttObj.element.id + 'NotesTabContainer') {
|
|
651
|
-
|
|
651
|
+
document.getElementById(id).ej2_instances[0].refresh();
|
|
652
652
|
}
|
|
653
653
|
else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
|
|
654
654
|
if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
|
|
655
|
-
|
|
655
|
+
document.getElementById(id).ej2_instances[0]
|
|
656
656
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], false);
|
|
657
657
|
}
|
|
658
658
|
else {
|
|
659
|
-
|
|
659
|
+
document.getElementById(id).ej2_instances[0]
|
|
660
660
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], true);
|
|
661
661
|
}
|
|
662
662
|
}
|
|
@@ -1616,7 +1616,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1616
1616
|
DialogEdit.prototype.updateResourceCollection = function (args, resourceTreeGridId) {
|
|
1617
1617
|
if (!isNullOrUndefined(args.data) && Object.keys(args.data).length) {
|
|
1618
1618
|
var ganttObj = this.parent;
|
|
1619
|
-
var treeGridId =
|
|
1619
|
+
var treeGridId = document.querySelector('#' + resourceTreeGridId);
|
|
1620
1620
|
var resourceTreeGrid = treeGridId.ej2_instances[0];
|
|
1621
1621
|
if (!isNullOrUndefined(resourceTreeGrid) && resourceTreeGrid.getSelectedRecords().length > 0) {
|
|
1622
1622
|
var tempRecords = resourceTreeGrid.getSelectedRecords();
|
|
@@ -1691,7 +1691,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1691
1691
|
};
|
|
1692
1692
|
DialogEdit.prototype.resourceSelection = function (id) {
|
|
1693
1693
|
var _this = this;
|
|
1694
|
-
var resourceTreeGrid =
|
|
1694
|
+
var resourceTreeGrid = document.querySelector('#' + id).ej2_instances[0];
|
|
1695
1695
|
var currentViewData = resourceTreeGrid.getCurrentViewRecords();
|
|
1696
1696
|
var resources = this.ganttResources;
|
|
1697
1697
|
if (resources && resources.length > 0) {
|
|
@@ -529,7 +529,10 @@ var Edit = /** @class */ (function () {
|
|
|
529
529
|
if (ganttProp.work > 0 || column === 'work') {
|
|
530
530
|
switch (taskType) {
|
|
531
531
|
case 'FixedUnit':
|
|
532
|
-
if (
|
|
532
|
+
if (ganttProp.resourceInfo.length === 0) {
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
else if (isAutoSchedule && ganttProp.resourceInfo.length &&
|
|
533
536
|
(column === 'work' || (column === 'resource'))) {
|
|
534
537
|
this.parent.dataOperation.updateDurationWithWork(currentData);
|
|
535
538
|
}
|
|
@@ -1092,6 +1095,7 @@ var Edit = /** @class */ (function () {
|
|
|
1092
1095
|
var eventArgs = {};
|
|
1093
1096
|
eventArgs.requestType = 'beforeSave';
|
|
1094
1097
|
eventArgs.data = args.data;
|
|
1098
|
+
eventArgs.cancel = false;
|
|
1095
1099
|
eventArgs.modifiedRecords = this.parent.editedRecords;
|
|
1096
1100
|
if (!isNullOrUndefined(args.target)) {
|
|
1097
1101
|
eventArgs.target = args.target;
|
|
@@ -1922,13 +1926,13 @@ var Edit = /** @class */ (function () {
|
|
|
1922
1926
|
changedRecords: eventArg.modifiedTaskData
|
|
1923
1927
|
};
|
|
1924
1928
|
var adaptor = data_1.adaptor;
|
|
1929
|
+
var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
1925
1930
|
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_1.dataSource.batchUrl) {
|
|
1926
|
-
var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id);
|
|
1931
|
+
var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id, null, query_1);
|
|
1927
1932
|
crud.then(function () { return _this.deleteSuccess(args); })
|
|
1928
1933
|
.catch(function (e) { return _this.dmFailure(e, args); });
|
|
1929
1934
|
}
|
|
1930
1935
|
else {
|
|
1931
|
-
var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
1932
1936
|
var deletedRecords = 'deletedRecords';
|
|
1933
1937
|
var deleteCrud = null;
|
|
1934
1938
|
for (var i = 0; i < updatedData_1[deletedRecords].length; i++) {
|
|
@@ -172,80 +172,113 @@ var RowDD = /** @class */ (function () {
|
|
|
172
172
|
}
|
|
173
173
|
var count = 0;
|
|
174
174
|
var dragLength = dragRecords.length;
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
var _loop_1 = function (i) {
|
|
176
|
+
this_1.parent.isOnEdit = true;
|
|
177
177
|
draggedRecord = dragRecords[i];
|
|
178
|
-
|
|
179
|
-
if (
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
this_1.draggedRecord = draggedRecord;
|
|
179
|
+
if (this_1.dropPosition !== 'Invalid') {
|
|
180
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
181
|
+
this_1.checkisSharedTask();
|
|
182
|
+
this_1.previousParent = this_1.draggedRecord.parentItem.uniqueID;
|
|
183
183
|
}
|
|
184
|
-
if (
|
|
185
|
-
return;
|
|
184
|
+
if (this_1.isSharedTask) {
|
|
185
|
+
return { value: void 0 };
|
|
186
186
|
}
|
|
187
187
|
if (isByMethod) {
|
|
188
|
-
|
|
188
|
+
this_1.deleteDragRow();
|
|
189
189
|
}
|
|
190
|
-
var recordIndex1 =
|
|
191
|
-
if (
|
|
192
|
-
|
|
190
|
+
var recordIndex1 = this_1.treeGridData.indexOf(droppedRecord);
|
|
191
|
+
if (this_1.dropPosition === 'topSegment') {
|
|
192
|
+
this_1.dropAtTop(recordIndex1);
|
|
193
193
|
}
|
|
194
|
-
if (
|
|
195
|
-
if (!
|
|
194
|
+
if (this_1.dropPosition === 'bottomSegment') {
|
|
195
|
+
if (!this_1.isSharedTask) {
|
|
196
196
|
if (!droppedRecord.hasChildRecords) {
|
|
197
|
-
if (
|
|
198
|
-
|
|
197
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
198
|
+
this_1.ganttData.splice(recordIndex1 + 1, 0, this_1.draggedRecord.taskData);
|
|
199
199
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
if (
|
|
203
|
-
var taskId =
|
|
204
|
-
|
|
200
|
+
this_1.treeGridData.splice(recordIndex1 + 1, 0, this_1.draggedRecord);
|
|
201
|
+
this_1.parent.ids.splice(recordIndex1 + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
202
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
203
|
+
var taskId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
204
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
else {
|
|
208
|
-
count =
|
|
209
|
-
if (
|
|
210
|
-
|
|
208
|
+
count = this_1.parent.editModule.getChildCount(droppedRecord, 0);
|
|
209
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
210
|
+
this_1.ganttData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.taskData);
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
this_1.treeGridData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord);
|
|
213
213
|
/* eslint-disable-next-line */
|
|
214
|
-
|
|
215
|
-
if (
|
|
216
|
-
var spliceId =
|
|
217
|
-
|
|
214
|
+
this_1.parent.ids.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
215
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
216
|
+
var spliceId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
217
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
this_1.parent.setRecordValue('parentItem', this_1.treeGridData[recordIndex1].parentItem, draggedRecord);
|
|
221
|
+
this_1.parent.setRecordValue('parentUniqueID', this_1.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
|
|
222
|
+
this_1.parent.setRecordValue('level', this_1.treeGridData[recordIndex1].level, draggedRecord);
|
|
223
223
|
if (draggedRecord.hasChildRecords) {
|
|
224
224
|
var level = 1;
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
this_1.updateChildRecordLevel(draggedRecord, level);
|
|
226
|
+
this_1.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
|
|
227
227
|
}
|
|
228
228
|
if (droppedRecord.parentItem) {
|
|
229
|
-
var rec =
|
|
229
|
+
var rec = this_1.parent.getParentTask(droppedRecord.parentItem).childRecords;
|
|
230
230
|
var childRecords = rec;
|
|
231
231
|
var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
|
|
232
232
|
childRecords.splice(droppedRecordIndex, 0, draggedRecord);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
if (
|
|
237
|
-
|
|
236
|
+
if (this_1.dropPosition === 'middleSegment') {
|
|
237
|
+
this_1.dropMiddle(recordIndex1);
|
|
238
238
|
if (droppedRecord.childRecords.length > 0) {
|
|
239
239
|
delete droppedRecord.ganttProperties.segments;
|
|
240
|
-
delete droppedRecord.taskData[
|
|
240
|
+
delete droppedRecord.taskData[this_1.parent.taskFields.segments];
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
// eslint-disable-next-line
|
|
244
|
-
if (!isNullOrUndefined(draggedRecord.parentItem &&
|
|
245
|
-
|
|
244
|
+
if (!isNullOrUndefined(draggedRecord.parentItem && this_1.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
|
|
245
|
+
this_1.updateParentRecords.push(draggedRecord.parentItem);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (!this_1.parent.enableVirtualization) {
|
|
249
|
+
var data_1 = gObj.flatData;
|
|
250
|
+
var startIndex = void 0;
|
|
251
|
+
var endIndex = void 0;
|
|
252
|
+
if (draggedRecord.index < droppedRecord.index) {
|
|
253
|
+
startIndex = draggedRecord.index;
|
|
254
|
+
endIndex = droppedRecord.index;
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
startIndex = droppedRecord.index;
|
|
258
|
+
endIndex = draggedRecord.index;
|
|
259
|
+
}
|
|
260
|
+
var _loop_2 = function (i_1) {
|
|
261
|
+
if (!isNullOrUndefined(data_1[i_1])) {
|
|
262
|
+
data_1[i_1].index = i_1;
|
|
263
|
+
if (!isNullOrUndefined(data_1[i_1].parentItem)) {
|
|
264
|
+
var updatedParent = data_1.filter(function (e) {
|
|
265
|
+
return e.uniqueID === data_1[i_1].parentUniqueID;
|
|
266
|
+
})[0];
|
|
267
|
+
data_1[i_1].parentItem.index = updatedParent.index;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
|
|
272
|
+
_loop_2(i_1);
|
|
246
273
|
}
|
|
247
274
|
}
|
|
248
275
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
276
|
+
};
|
|
277
|
+
var this_1 = this;
|
|
278
|
+
for (var i = 0; i < dragLength; i++) {
|
|
279
|
+
var state_1 = _loop_1(i);
|
|
280
|
+
if (typeof state_1 === "object")
|
|
281
|
+
return state_1.value;
|
|
249
282
|
}
|
|
250
283
|
if (this.dropPosition === 'middleSegment') {
|
|
251
284
|
if (droppedRecord.ganttProperties.predecessor) {
|
|
@@ -311,6 +311,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
311
311
|
TaskbarEdit.prototype.showHideTaskBarEditingElements = function (element, secondElement, fadeConnectorLine) {
|
|
312
312
|
secondElement = secondElement ? secondElement : this.editElement;
|
|
313
313
|
var isShowProgressResizer = this.parent.taskFields.progress ? true : false;
|
|
314
|
+
var isShowConnectorPoints = true;
|
|
314
315
|
if (this.parent.readOnly) {
|
|
315
316
|
return;
|
|
316
317
|
}
|
|
@@ -320,6 +321,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
320
321
|
if (!isNullOrUndefined(parentRecord)) {
|
|
321
322
|
if (!parentRecord.expanded) {
|
|
322
323
|
isShowProgressResizer = false;
|
|
324
|
+
isShowConnectorPoints = false;
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
327
|
}
|
|
@@ -346,7 +348,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
346
348
|
if (!isNullOrUndefined(this.parent.taskFields.dependency)
|
|
347
349
|
&& (element.querySelector('.' + cls.connectorPointLeft)
|
|
348
350
|
|| element.parentElement.querySelector('.' + cls.connectorPointLeft))
|
|
349
|
-
&&
|
|
351
|
+
&& isShowConnectorPoints) {
|
|
350
352
|
var connectorElement = !isNullOrUndefined(element.querySelector('.' + cls.connectorPointLeft)) ?
|
|
351
353
|
element : element.parentElement;
|
|
352
354
|
addClass([connectorElement.querySelector('.' + cls.connectorPointLeft)], [cls.connectorPointLeftHover]);
|
|
@@ -1006,7 +1006,10 @@ var DateProcessor = /** @class */ (function () {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
1008
|
DateProcessor.prototype.remove = function (date, timezone) {
|
|
1009
|
-
|
|
1009
|
+
if (!isNullOrUndefined(date)) {
|
|
1010
|
+
date = this.reverse(date, timezone, date.getTimezoneOffset());
|
|
1011
|
+
}
|
|
1012
|
+
return date;
|
|
1010
1013
|
};
|
|
1011
1014
|
DateProcessor.prototype.reverse = function (date, fromOffset, toOffset) {
|
|
1012
1015
|
if (typeof fromOffset === 'string') {
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -1108,6 +1108,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1108
1108
|
if (this.keyboardModule) {
|
|
1109
1109
|
this.keyboardModule.destroy();
|
|
1110
1110
|
}
|
|
1111
|
+
if (this.editModule && this.editModule.dialogModule) {
|
|
1112
|
+
this.editModule.dialogModule.destroy();
|
|
1113
|
+
}
|
|
1111
1114
|
_super.prototype.destroy.call(this);
|
|
1112
1115
|
this.chartVerticalLineContainer = null;
|
|
1113
1116
|
this.element.innerHTML = '';
|
|
@@ -1354,6 +1357,23 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1354
1357
|
this.treeGrid.height = this.ganttHeight - toolbarHeight -
|
|
1355
1358
|
this.treeGrid.grid.getHeaderContent().offsetHeight;
|
|
1356
1359
|
this.splitterModule.splitterObject.height = (this.ganttHeight - toolbarHeight).toString();
|
|
1360
|
+
if (!isNullOrUndefined(this.chartVerticalLineContainer)) {
|
|
1361
|
+
this.chartVerticalLineContainer.style.height = this.ganttHeight + 'px';
|
|
1362
|
+
}
|
|
1363
|
+
if (!isNullOrUndefined(this.dayMarkersModule)) {
|
|
1364
|
+
var holidayContainer = getValue('nonworkingDayRender.holidayContainer', this.dayMarkersModule);
|
|
1365
|
+
var weekendContainer = getValue('nonworkingDayRender.weekendContainer', this.dayMarkersModule);
|
|
1366
|
+
var eventMarkersContainer = getValue('eventMarkerRender.eventMarkersContainer', this.dayMarkersModule);
|
|
1367
|
+
if (holidayContainer) {
|
|
1368
|
+
holidayContainer.style.height = this.ganttHeight + 'px';
|
|
1369
|
+
}
|
|
1370
|
+
if (weekendContainer) {
|
|
1371
|
+
weekendContainer.style.height = this.ganttHeight + 'px';
|
|
1372
|
+
}
|
|
1373
|
+
if (eventMarkersContainer) {
|
|
1374
|
+
eventMarkersContainer.style.height = this.ganttHeight + 'px';
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1357
1377
|
this.splitterModule.splitterObject.width = this.ganttWidth.toString();
|
|
1358
1378
|
this.ganttChartModule.scrollObject.
|
|
1359
1379
|
setHeight(this.ganttHeight - this.ganttChartModule.chartTimelineContainer.offsetHeight - toolbarHeight);
|
|
@@ -650,6 +650,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
652
|
TaskProcessor.prototype.addTaskData = function (ganttData, data, isLoad) {
|
|
653
|
+
var _this = this;
|
|
653
654
|
var taskSettings = this.parent.taskFields;
|
|
654
655
|
var dataManager = this.parent.dataSource;
|
|
655
656
|
if (isLoad) {
|
|
@@ -658,8 +659,15 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
658
659
|
if (taskSettings.parentID) {
|
|
659
660
|
var id = data[taskSettings.id];
|
|
660
661
|
var index = this.taskIds.indexOf(id.toString());
|
|
661
|
-
var
|
|
662
|
-
this.parent.
|
|
662
|
+
var tempData_1 = (index > -1) ? this.dataArray[index] : {};
|
|
663
|
+
if (!isNullOrUndefined(this.parent.taskFields.segmentId)) {
|
|
664
|
+
var segmentDataCollection = this.segmentCollection.
|
|
665
|
+
filter(function (x) { return x.key === tempData_1[_this.parent.taskFields.id]; });
|
|
666
|
+
if (segmentDataCollection.length > 0) {
|
|
667
|
+
tempData_1[this.parent.taskFields.segments] = segmentDataCollection[0].items;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
this.parent.setRecordValue('taskData', tempData_1, ganttData);
|
|
663
671
|
}
|
|
664
672
|
else {
|
|
665
673
|
this.parent.setRecordValue('taskData', data, ganttData);
|
|
@@ -859,6 +867,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
859
867
|
if (!isNullOrUndefined(ganttProperties.duration)) {
|
|
860
868
|
this.parent.setRecordValue('duration', updatedDuration, ganttProperties, true);
|
|
861
869
|
}
|
|
870
|
+
this.parent.dataOperation.updateMappingData(ganttData, 'duration');
|
|
862
871
|
}
|
|
863
872
|
};
|
|
864
873
|
/**
|
package/src/gantt/base/utils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { isNullOrUndefined, extend, getValue } from '@syncfusion/ej2-base';
|
|
5
5
|
import { DataManager, UrlAdaptor, WebApiAdaptor, ODataAdaptor } from '@syncfusion/ej2-data';
|
|
6
|
-
import { WebMethodAdaptor, CacheAdaptor, RemoteSaveAdaptor, ODataV4Adaptor
|
|
6
|
+
import { WebMethodAdaptor, CacheAdaptor, RemoteSaveAdaptor, ODataV4Adaptor } from '@syncfusion/ej2-data';
|
|
7
7
|
/**
|
|
8
8
|
* @param {Element} elem .
|
|
9
9
|
* @param {string} selector .
|
|
@@ -75,7 +75,7 @@ export function isRemoteData(dataSource) {
|
|
|
75
75
|
return (adaptor instanceof ODataAdaptor || (adaptor instanceof ODataV4Adaptor) ||
|
|
76
76
|
(adaptor instanceof WebApiAdaptor) || (adaptor instanceof WebMethodAdaptor) ||
|
|
77
77
|
(adaptor instanceof CacheAdaptor) || (adaptor instanceof RemoteSaveAdaptor) ||
|
|
78
|
-
|
|
78
|
+
adaptor instanceof UrlAdaptor);
|
|
79
79
|
}
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
@@ -103,7 +103,7 @@ export function getTaskData(records, isNotExtend, eventArgs, parent) {
|
|
|
103
103
|
for (var i = 0; i < records.length; i++) {
|
|
104
104
|
var data = void 0;
|
|
105
105
|
if (!isNullOrUndefined(parent) && parent.timezone) {
|
|
106
|
-
|
|
106
|
+
updateDates(records[i], parent);
|
|
107
107
|
}
|
|
108
108
|
// eslint-disable-next-line
|
|
109
109
|
data = isNotExtend ? (records[i].taskData) : extend({}, records[i].taskData, {}, true);
|
|
@@ -171,7 +171,7 @@ var ExportHelper = /** @class */ (function () {
|
|
|
171
171
|
var taskFields = this.parent.taskFields;
|
|
172
172
|
var ganttProps = data.ganttProperties;
|
|
173
173
|
if (column.editType === 'datepickeredit' || column.editType === 'datetimepickeredit') {
|
|
174
|
-
cell.value =
|
|
174
|
+
cell.value = data[column.field];
|
|
175
175
|
}
|
|
176
176
|
else if (column.field === taskFields.duration) {
|
|
177
177
|
cell.value = this.parent.getDurationString(ganttProps.duration, ganttProps.durationUnit);
|
|
@@ -194,20 +194,18 @@ var ExportHelper = /** @class */ (function () {
|
|
|
194
194
|
else {
|
|
195
195
|
cell.style.format.paragraphIndent = cell.row.level * 10;
|
|
196
196
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
this.parent.trigger('pdfQueryCellInfo', args);
|
|
208
|
-
}
|
|
209
|
-
cell.value = args.value;
|
|
197
|
+
var args = {
|
|
198
|
+
data: data,
|
|
199
|
+
value: cell.value,
|
|
200
|
+
column: column,
|
|
201
|
+
style: cell.style,
|
|
202
|
+
cell: cell
|
|
203
|
+
};
|
|
204
|
+
args.value = this.exportValueFormatter.formatCellValue(args);
|
|
205
|
+
if (this.parent.pdfQueryCellInfo) {
|
|
206
|
+
this.parent.trigger('pdfQueryCellInfo', args);
|
|
210
207
|
}
|
|
208
|
+
cell.value = args.value;
|
|
211
209
|
};
|
|
212
210
|
/**
|
|
213
211
|
* Method for create the taskbar collection for rendering
|