@syncfusion/ej2-gantt 20.2.49 → 20.2.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +34 -45
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +52 -59
- 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 +9 -9
- package/src/gantt/actions/dialog-edit.js +14 -1
- package/src/gantt/actions/edit.js +35 -19
- package/src/gantt/actions/filter.d.ts +0 -1
- package/src/gantt/actions/filter.js +2 -38
- package/src/gantt/actions/toolbar.js +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.2.
|
|
3
|
+
* version : 20.2.50
|
|
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@20.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.2.49",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-j65MRf6oB1NnWXX/PvaUdFJYznLcj5VFQ5XbkkhrekSkk1PH7Vd9ipxZQrIdaVqDRnACWmBClPe6+WmNUy2OxQ==",
|
|
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-20.2.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.2.49.tgz",
|
|
27
|
+
"_shasum": "2cf74a3f9e016c1e63b363b06ee8755bddc929fb",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@syncfusion/ej2-base": "~20.2.48",
|
|
39
39
|
"@syncfusion/ej2-buttons": "~20.2.46",
|
|
40
|
-
"@syncfusion/ej2-calendars": "~20.2.
|
|
40
|
+
"@syncfusion/ej2-calendars": "~20.2.50",
|
|
41
41
|
"@syncfusion/ej2-data": "~20.2.45",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~20.2.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.2.50",
|
|
43
43
|
"@syncfusion/ej2-grids": "~20.2.49",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~20.2.48",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~20.2.46",
|
|
46
46
|
"@syncfusion/ej2-lists": "~20.2.46",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~20.2.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.2.50",
|
|
48
48
|
"@syncfusion/ej2-popups": "~20.2.49",
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~20.2.
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~20.2.50",
|
|
50
50
|
"@syncfusion/ej2-treegrid": "~20.2.49"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
@@ -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": "20.2.
|
|
78
|
+
"version": "20.2.50",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -1671,7 +1671,20 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1671
1671
|
var rowResource = ganttData.ganttProperties.resourceInfo;
|
|
1672
1672
|
var inputModel = this.beforeOpenArgs[itemName];
|
|
1673
1673
|
var resourceTreeGridId = ganttObj.element.id + '' + itemName + 'TabContainer';
|
|
1674
|
-
var resourceData =
|
|
1674
|
+
var resourceData = [];
|
|
1675
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
1676
|
+
for (var i = 0; i < ganttObj.currentViewData.length; i++) {
|
|
1677
|
+
for (var j = 0; j < ganttObj.resources.length; j++) {
|
|
1678
|
+
if (ganttObj.currentViewData[i][ganttObj.taskFields.id] === ganttObj.resources[j][resourceSettings.id] &&
|
|
1679
|
+
(ganttObj.currentViewData[i].hasChildRecords || isNullOrUndefined(ganttObj.currentViewData[i].parentItem))) {
|
|
1680
|
+
resourceData.push(ganttObj.resources[j]);
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
else {
|
|
1686
|
+
resourceData = extend([], [], ganttObj.resources, true);
|
|
1687
|
+
}
|
|
1675
1688
|
this.parent.dataOperation.updateResourceUnit(resourceData);
|
|
1676
1689
|
if (!isNullOrUndefined(rowResource)) {
|
|
1677
1690
|
var count = void 0;
|
|
@@ -497,7 +497,7 @@ var Edit = /** @class */ (function () {
|
|
|
497
497
|
this.parent.dataOperation.updateMappingData(ganttData, 'duration');
|
|
498
498
|
this.parent.dataOperation.updateMappingData(ganttData, 'endDate');
|
|
499
499
|
}
|
|
500
|
-
else if (key ===
|
|
500
|
+
else if (key === tasks.type) {
|
|
501
501
|
ganttObj.setRecordValue('taskType', data[key], ganttData.ganttProperties, true);
|
|
502
502
|
//this.parent.dataOperation.updateMappingData(ganttData, 'taskType');
|
|
503
503
|
}
|
|
@@ -1589,14 +1589,22 @@ var Edit = /** @class */ (function () {
|
|
|
1589
1589
|
*/
|
|
1590
1590
|
Edit.prototype.deleteResourceRecords = function (selectedRecords) {
|
|
1591
1591
|
var deleteRecords = [];
|
|
1592
|
-
|
|
1592
|
+
var _loop_1 = function (i) {
|
|
1593
1593
|
if (selectedRecords[i].parentItem) {
|
|
1594
1594
|
var data = selectedRecords[i];
|
|
1595
|
-
|
|
1596
|
-
for (var j = 0; j < ids.length; j++) {
|
|
1597
|
-
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(ids[j].toString())]);
|
|
1598
|
-
}
|
|
1595
|
+
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
1599
1596
|
}
|
|
1597
|
+
else {
|
|
1598
|
+
var resourceParent = this_1.parent.flatData.filter(function (data) {
|
|
1599
|
+
return (parseInt(data.ganttProperties.taskId) == parseInt(selectedRecords[i].ganttProperties.taskId) &&
|
|
1600
|
+
data.hasChildRecords);
|
|
1601
|
+
})[0];
|
|
1602
|
+
deleteRecords.push(resourceParent);
|
|
1603
|
+
}
|
|
1604
|
+
};
|
|
1605
|
+
var this_1 = this;
|
|
1606
|
+
for (var i = 0; i < selectedRecords.length; i++) {
|
|
1607
|
+
_loop_1(i);
|
|
1600
1608
|
}
|
|
1601
1609
|
this.deleteRow(deleteRecords);
|
|
1602
1610
|
};
|
|
@@ -2043,6 +2051,14 @@ var Edit = /** @class */ (function () {
|
|
|
2043
2051
|
eventArgs.modifiedTaskData = getTaskData(args.updatedRecordCollection, null, null, this.parent);
|
|
2044
2052
|
setValue('action', args.action, eventArgs);
|
|
2045
2053
|
this.parent.isOnDelete = false;
|
|
2054
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
2055
|
+
var updateUnAssignedResources = eventArgs.data.filter(function (data) {
|
|
2056
|
+
return !data.hasChildRecords;
|
|
2057
|
+
});
|
|
2058
|
+
for (var i = 0; i < updateUnAssignedResources.length; i++) {
|
|
2059
|
+
this.checkWithUnassignedTask(updateUnAssignedResources[i]);
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2046
2062
|
this.parent.trigger('actionComplete', eventArgs);
|
|
2047
2063
|
this.deletedTaskDetails = [];
|
|
2048
2064
|
this.parent.initiateEditAction(false);
|
|
@@ -2460,27 +2476,27 @@ var Edit = /** @class */ (function () {
|
|
|
2460
2476
|
}
|
|
2461
2477
|
}
|
|
2462
2478
|
}
|
|
2463
|
-
var
|
|
2464
|
-
var originalData =
|
|
2465
|
-
var treeIndex =
|
|
2466
|
-
var uniqueTaskID =
|
|
2467
|
-
originalIndex =
|
|
2479
|
+
var _loop_2 = function (i) {
|
|
2480
|
+
var originalData = this_2.parent.modifiedRecords[i];
|
|
2481
|
+
var treeIndex = this_2.parent.allowRowDragAndDrop ? 1 : 0;
|
|
2482
|
+
var uniqueTaskID = this_2.parent.taskFields.id;
|
|
2483
|
+
originalIndex = this_2.parent.currentViewData.findIndex(function (data) {
|
|
2468
2484
|
return (data[uniqueTaskID] == originalData[uniqueTaskID]);
|
|
2469
2485
|
});
|
|
2470
|
-
if (
|
|
2471
|
-
|
|
2472
|
-
data: originalData, cell:
|
|
2473
|
-
column:
|
|
2486
|
+
if (this_2.parent.treeGrid.getRows()[originalIndex]) {
|
|
2487
|
+
this_2.parent.treeGrid.renderModule.cellRender({
|
|
2488
|
+
data: originalData, cell: this_2.parent.treeGrid.getRows()[originalIndex].cells[this_2.parent.treeColumnIndex + treeIndex],
|
|
2489
|
+
column: this_2.parent.treeGrid.grid.getColumns()[this_2.parent.treeColumnIndex],
|
|
2474
2490
|
requestType: 'rowDragAndDrop'
|
|
2475
2491
|
});
|
|
2476
|
-
|
|
2477
|
-
data: originalData, row:
|
|
2492
|
+
this_2.parent.treeGrid.renderModule.RowModifier({
|
|
2493
|
+
data: originalData, row: this_2.parent.treeGrid.getRows()[originalIndex], rowHeight: this_2.parent.rowHeight
|
|
2478
2494
|
});
|
|
2479
2495
|
}
|
|
2480
2496
|
};
|
|
2481
|
-
var
|
|
2497
|
+
var this_2 = this, originalIndex;
|
|
2482
2498
|
for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
|
|
2483
|
-
|
|
2499
|
+
_loop_2(i);
|
|
2484
2500
|
}
|
|
2485
2501
|
};
|
|
2486
2502
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TreeGrid, Filter as TreeGridFilter } from '@syncfusion/ej2-treegrid';
|
|
2
|
-
import { filterAfterOpen
|
|
2
|
+
import { filterAfterOpen } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { getActualProperties, getCustomDateFormat } from '@syncfusion/ej2-grids';
|
|
4
4
|
import { getValue, isNullOrUndefined, remove, createElement, addClass, closest } from '@syncfusion/ej2-base';
|
|
5
5
|
import { TextBox } from '@syncfusion/ej2-inputs';
|
|
@@ -229,45 +229,9 @@ var Filter = /** @class */ (function () {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
Filter.prototype.setPosition = function (li, ul) {
|
|
233
|
-
var gridPos = this.parent.element.getBoundingClientRect();
|
|
234
|
-
var liPos = li.getBoundingClientRect();
|
|
235
|
-
var left = liPos.right + window.scrollX;
|
|
236
|
-
var top = liPos.top + window.scrollY;
|
|
237
|
-
if (gridPos.right < (left + ul.offsetWidth)) {
|
|
238
|
-
if ((liPos.left - ul.offsetWidth) > gridPos.left) {
|
|
239
|
-
left = (liPos.left - ul.offsetWidth);
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
left -= (left + ul.offsetWidth) - gridPos.right;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
ul.style.top = top + 'px';
|
|
246
|
-
ul.style.left = left + 'px';
|
|
247
|
-
};
|
|
248
232
|
Filter.prototype.updateFilterMenuPosition = function (element, args) {
|
|
249
233
|
addClass([element], 'e-gantt');
|
|
250
|
-
document.querySelector('#' + this.parent.
|
|
251
|
-
var targetElement;
|
|
252
|
-
if (this.parent.showColumnMenu) {
|
|
253
|
-
targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
|
|
254
|
-
element.style.zIndex = targetElement.parentElement.style.zIndex;
|
|
255
|
-
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
256
|
-
this.setPosition(targetElement, getValue('filterModel.dlgObj.element', args));
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
this.setPosition(targetElement, getValue('filterModel.dialogObj.element', args));
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
targetElement = this.parent.treeGrid.grid.getColumnHeaderByField(args.columnName).querySelector('.e-filtermenudiv');
|
|
264
|
-
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
265
|
-
getFilterMenuPostion(targetElement, getValue('filterModel.dlgObj', args));
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
getFilterMenuPostion(targetElement, getValue('filterModel.dialogObj', args));
|
|
269
|
-
}
|
|
270
|
-
}
|
|
234
|
+
document.querySelector('#' + this.parent.treeGrid.grid.element.id).appendChild(element);
|
|
271
235
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
272
236
|
element.querySelector('.e-valid-input').focus();
|
|
273
237
|
}
|
|
@@ -405,7 +405,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
405
405
|
var isDeleteSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length > 0 ||
|
|
406
406
|
gObj.selectionModule.getSelectedRowCellIndexes().length > 0 ? true : false : false;
|
|
407
407
|
// eslint-disable-next-line
|
|
408
|
-
edit.allowDeleting &&
|
|
408
|
+
edit.allowDeleting && hasData && isDeleteSelected && !touchEdit ?
|
|
409
409
|
enableItems.push(gID + '_delete') : disableItems.push(gID + '_delete');
|
|
410
410
|
if (gObj.editSettings.mode === 'Auto' && !isNullOrUndefined(gObj.editModule.cellEditModule)
|
|
411
411
|
&& gObj.editModule.cellEditModule.isCellEdit) {
|