@syncfusion/ej2-gantt 20.2.39 → 20.2.43
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 -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 +40 -8
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +40 -8
- 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/context-menu.js +1 -1
- package/src/gantt/actions/edit.js +2 -1
- package/src/gantt/actions/rowdragdrop.js +1 -1
- package/src/gantt/base/date-processor.js +8 -2
- package/src/gantt/base/gantt-chart.d.ts +4 -0
- package/src/gantt/base/gantt-chart.js +20 -2
- package/src/gantt/base/tree-grid.js +1 -0
- package/src/gantt/renderer/chart-rows.js +6 -0
- package/src/gantt/renderer/tooltip.js +1 -1
|
@@ -401,7 +401,7 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
401
401
|
if (hour > this.parent.defaultEndTime) {
|
|
402
402
|
this.setTime(this.parent.defaultEndTime, cloneDate);
|
|
403
403
|
}
|
|
404
|
-
else if (hour <= this.parent.defaultStartTime && !ganttProp.isMilestone) {
|
|
404
|
+
else if (hour <= this.parent.defaultStartTime && !isNullOrUndefined(ganttProp) && !ganttProp.isMilestone) {
|
|
405
405
|
cloneDate.setDate(cloneDate.getDate() - 1);
|
|
406
406
|
this.setTime(this.parent.defaultEndTime, cloneDate);
|
|
407
407
|
}
|
|
@@ -1473,7 +1473,13 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
sortDates(taskRange);
|
|
1475
1475
|
if (!minStartDate || !maxEndDate) {
|
|
1476
|
-
|
|
1476
|
+
if (!minStartDate) {
|
|
1477
|
+
minStartDate = isNullOrUndefined(minStartDate) ? this.getDateFromFormat(new Date()) : minStartDate;
|
|
1478
|
+
minStartDate.setHours(0, 0, 0, 0);
|
|
1479
|
+
}
|
|
1480
|
+
else {
|
|
1481
|
+
minStartDate = isNullOrUndefined(minStartDate) ? this.getDateFromFormat(new Date()) : minStartDate;
|
|
1482
|
+
}
|
|
1477
1483
|
maxEndDate = this.getDateFromFormat(new Date(minStartDate.getTime()));
|
|
1478
1484
|
maxEndDate.setDate(maxEndDate.getDate() + 20);
|
|
1479
1485
|
}
|
|
@@ -4862,7 +4868,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4862
4868
|
* @private
|
|
4863
4869
|
*/
|
|
4864
4870
|
GanttChart.prototype.expandedGanttRow = function (args) {
|
|
4865
|
-
if (isNullOrUndefined(args['gridRow'])) {
|
|
4871
|
+
if (isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) {
|
|
4866
4872
|
return;
|
|
4867
4873
|
}
|
|
4868
4874
|
var record = getValue('data', args);
|
|
@@ -5072,6 +5078,23 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5072
5078
|
$target.closest('.e-chart-row') ? $target.closest('.e-chart-row').rowIndex : -1;
|
|
5073
5079
|
var isTab = (e.action === 'tab') ? true : false;
|
|
5074
5080
|
var nextElement = this.getNextElement($target, isTab, isInEditedState);
|
|
5081
|
+
this.tempNextElement = nextElement;
|
|
5082
|
+
if (!isNullOrUndefined(nextElement['cellIndex'])) {
|
|
5083
|
+
if (this.parent.allowRowDragAndDrop) {
|
|
5084
|
+
this.childrenIndex = nextElement['cellIndex'];
|
|
5085
|
+
this.nextElementIndex = nextElement['cellIndex'] - 1;
|
|
5086
|
+
}
|
|
5087
|
+
else {
|
|
5088
|
+
this.childrenIndex = nextElement['cellIndex'];
|
|
5089
|
+
this.nextElementIndex = nextElement['cellIndex'];
|
|
5090
|
+
}
|
|
5091
|
+
if (!this.parent.ganttColumns[this.nextElementIndex]['allowEditing'] && this.parent.ganttColumns[this.nextElementIndex]['field'] !== this.parent.taskFields.id) {
|
|
5092
|
+
this.isEditableElement = true;
|
|
5093
|
+
}
|
|
5094
|
+
else {
|
|
5095
|
+
this.isEditableElement = false;
|
|
5096
|
+
}
|
|
5097
|
+
}
|
|
5075
5098
|
if (nextElement === 'noNextRow') {
|
|
5076
5099
|
this.manageFocus($target, 'remove', true);
|
|
5077
5100
|
return;
|
|
@@ -5119,7 +5142,8 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5119
5142
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
5120
5143
|
}
|
|
5121
5144
|
}
|
|
5122
|
-
if (!
|
|
5145
|
+
if (!(this.parent.editModule && this.parent.editModule.cellEditModule
|
|
5146
|
+
&& !isNullOrUndefined(this.parent.editModule.cellEditModule.editedColumn))) {
|
|
5123
5147
|
if (nextElement) {
|
|
5124
5148
|
if ($target.classList.contains('e-rowcell')) {
|
|
5125
5149
|
this.manageFocus($target, 'remove', false);
|
|
@@ -6978,6 +7002,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
6978
7002
|
};
|
|
6979
7003
|
GanttTreeGrid.prototype.composeProperties = function () {
|
|
6980
7004
|
this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
|
|
7005
|
+
this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
|
|
6981
7006
|
this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
|
|
6982
7007
|
this.parent.treeGrid.childMapping = isNullOrUndefined(this.parent.taskFields.child) ? '' : this.parent.taskFields.child;
|
|
6983
7008
|
this.parent.treeGrid.treeColumnIndex = this.parent.treeColumnIndex;
|
|
@@ -10028,6 +10053,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10028
10053
|
}
|
|
10029
10054
|
var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
|
|
10030
10055
|
this.parent.treeGrid.grid.setRowData(dataId, data);
|
|
10056
|
+
var nextEditableElement = this.parent.ganttChartModule.tempNextElement;
|
|
10057
|
+
if (this.parent.ganttChartModule.isEditableElement && nextEditableElement) {
|
|
10058
|
+
this.parent.treeGrid.grid.focusModule.focus();
|
|
10059
|
+
addClass([this.parent.treeGrid.getRows()[tr['ariaRowIndex']].children[this.parent.ganttChartModule.childrenIndex]], 'e-focused');
|
|
10060
|
+
this.parent.ganttChartModule.tempNextElement = null;
|
|
10061
|
+
}
|
|
10031
10062
|
var row = this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[index].getAttribute('data-uid'));
|
|
10032
10063
|
row.data = data;
|
|
10033
10064
|
}
|
|
@@ -12226,7 +12257,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
12226
12257
|
if (ganttData) {
|
|
12227
12258
|
data = ganttData.ganttProperties;
|
|
12228
12259
|
taskName = !isNullOrUndefined(data.taskName) ? '<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">' +
|
|
12229
|
-
data.taskName + '</td></tr>' : '';
|
|
12260
|
+
(this.parent.disableHtmlEncode ? data.taskName.replace(/</g, "<").replace(/>/g, ">") : data.taskName) + '</td></tr>' : '';
|
|
12230
12261
|
}
|
|
12231
12262
|
switch (elementType) {
|
|
12232
12263
|
case 'milestone':
|
|
@@ -21784,7 +21815,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
21784
21815
|
if (column.field === this.parent.taskFields.id) {
|
|
21785
21816
|
this.updateIDColumnEditParams(column);
|
|
21786
21817
|
}
|
|
21787
|
-
else if (column.field === this.parent.taskFields.progress) {
|
|
21818
|
+
else if (column.field === this.parent.taskFields.progress && isNullOrUndefined(column.edit)) {
|
|
21788
21819
|
this.updateProgessColumnEditParams(column);
|
|
21789
21820
|
}
|
|
21790
21821
|
else if (column.field === this.parent.taskFields.resourceInfo) {
|
|
@@ -23751,6 +23782,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23751
23782
|
eventArgs.modifiedRecords = args.updatedRecordCollection;
|
|
23752
23783
|
eventArgs.modifiedTaskData = getTaskData(args.updatedRecordCollection, null, null, this.parent);
|
|
23753
23784
|
setValue('action', args.action, eventArgs);
|
|
23785
|
+
this.parent.isOnDelete = false;
|
|
23754
23786
|
this.parent.trigger('actionComplete', eventArgs);
|
|
23755
23787
|
this.deletedTaskDetails = [];
|
|
23756
23788
|
this.parent.initiateEditAction(false);
|
|
@@ -28101,7 +28133,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
28101
28133
|
var rowIndex = -1;
|
|
28102
28134
|
if (args.gridRow) {
|
|
28103
28135
|
// eslint-disable-next-line
|
|
28104
|
-
rowIndex = parseInt(args.gridRow.getAttribute('
|
|
28136
|
+
rowIndex = parseInt(args.gridRow.getAttribute('data-rowindex'), 0);
|
|
28105
28137
|
}
|
|
28106
28138
|
else if (args.chartRow) {
|
|
28107
28139
|
// eslint-disable-next-line
|
|
@@ -28737,7 +28769,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28737
28769
|
ganttDragelem.remove();
|
|
28738
28770
|
}
|
|
28739
28771
|
var gridRow = closest(args.target, '.e-row');
|
|
28740
|
-
var dropIndex = gridRow ? parseInt(gridRow.getAttribute('
|
|
28772
|
+
var dropIndex = gridRow ? parseInt(gridRow.getAttribute('data-rowindex'), 10) : args.dropIndex;
|
|
28741
28773
|
args.dropIndex = dropIndex;
|
|
28742
28774
|
args.dropRecord = this.parent.updatedRecords[args.dropIndex];
|
|
28743
28775
|
this.parent.trigger('rowDrop', args);
|