@syncfusion/ej2-gantt 19.4.42 → 19.4.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 +37 -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 +193 -33
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +193 -33
- 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/cell-edit.d.ts +1 -0
- package/src/gantt/actions/cell-edit.js +2 -0
- package/src/gantt/actions/chart-scroll.js +1 -0
- package/src/gantt/actions/dialog-edit.js +18 -2
- package/src/gantt/actions/edit.d.ts +3 -1
- package/src/gantt/actions/edit.js +101 -10
- package/src/gantt/actions/filter.js +1 -1
- package/src/gantt/actions/keyboard.js +1 -1
- package/src/gantt/actions/rowdragdrop.js +1 -1
- package/src/gantt/actions/taskbar-edit.js +3 -1
- package/src/gantt/base/gantt-chart.js +6 -0
- package/src/gantt/base/gantt.js +18 -5
- package/src/gantt/base/task-processor.js +9 -7
- package/src/gantt/renderer/edit-tooltip.js +1 -0
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +30 -5
- package/src/gantt/renderer/tooltip.js +1 -0
- package/styles/bootstrap-dark.css +12 -4
- package/styles/bootstrap.css +12 -4
- package/styles/bootstrap4.css +12 -4
- package/styles/bootstrap5-dark.css +10 -2
- package/styles/bootstrap5.css +10 -2
- package/styles/fabric-dark.css +9 -1
- package/styles/fabric.css +9 -1
- package/styles/gantt/_bootstrap-dark-definition.scss +3 -4
- package/styles/gantt/_bootstrap-definition.scss +3 -4
- package/styles/gantt/_bootstrap4-definition.scss +3 -4
- package/styles/gantt/_bootstrap5-definition.scss +1 -2
- package/styles/gantt/_fabric-dark-definition.scss +0 -1
- package/styles/gantt/_fabric-definition.scss +0 -1
- package/styles/gantt/_fluent-definition.scss +1 -2
- package/styles/gantt/_highcontrast-definition.scss +0 -1
- package/styles/gantt/_highcontrast-light-definition.scss +0 -1
- package/styles/gantt/_layout.scss +8 -1
- package/styles/gantt/_material-dark-definition.scss +0 -1
- package/styles/gantt/_material-definition.scss +0 -1
- package/styles/gantt/_tailwind-definition.scss +3 -4
- package/styles/gantt/bootstrap-dark.css +12 -4
- package/styles/gantt/bootstrap.css +12 -4
- package/styles/gantt/bootstrap4.css +12 -4
- package/styles/gantt/bootstrap5-dark.css +10 -2
- package/styles/gantt/bootstrap5.css +10 -2
- package/styles/gantt/fabric-dark.css +9 -1
- package/styles/gantt/fabric.css +9 -1
- package/styles/gantt/highcontrast-light.css +9 -1
- package/styles/gantt/highcontrast.css +9 -1
- package/styles/gantt/material-dark.css +9 -1
- package/styles/gantt/material.css +9 -1
- package/styles/gantt/tailwind-dark.css +12 -4
- package/styles/gantt/tailwind.css +12 -4
- package/styles/highcontrast-light.css +9 -1
- package/styles/highcontrast.css +9 -1
- package/styles/material-dark.css +9 -1
- package/styles/material.css +9 -1
- package/styles/tailwind-dark.css +12 -4
- package/styles/tailwind.css +12 -4
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.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@19.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@19.4.48",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-fY8JJul26Xe0spdqD4+BjyaglbRjxSyxGCf8cNkkBRfX3bVy/36PHglr5qibrV3KbShkkOPCyWiTgm+Sbme/PA==",
|
|
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.48.tgz",
|
|
27
|
+
"_shasum": "d57e28193070a1ee84904bcb6215e2d999f67ce7",
|
|
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.4.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~19.4.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~19.4.
|
|
41
|
-
"@syncfusion/ej2-data": "~19.4.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~19.4.
|
|
43
|
-
"@syncfusion/ej2-grids": "~19.4.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~19.4.
|
|
45
|
-
"@syncfusion/ej2-layouts": "~19.4.
|
|
46
|
-
"@syncfusion/ej2-lists": "~19.4.
|
|
47
|
-
"@syncfusion/ej2-navigations": "~19.4.
|
|
48
|
-
"@syncfusion/ej2-popups": "~19.4.
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~19.4.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~19.4.
|
|
38
|
+
"@syncfusion/ej2-base": "~19.4.48",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~19.4.50",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~19.4.50",
|
|
41
|
+
"@syncfusion/ej2-data": "~19.4.50",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~19.4.50",
|
|
43
|
+
"@syncfusion/ej2-grids": "~19.4.50",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~19.4.48",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~19.4.48",
|
|
46
|
+
"@syncfusion/ej2-lists": "~19.4.48",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~19.4.50",
|
|
48
|
+
"@syncfusion/ej2-popups": "~19.4.50",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~19.4.50",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~19.4.50"
|
|
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.50",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -10,6 +10,7 @@ var CellEdit = /** @class */ (function () {
|
|
|
10
10
|
* @private
|
|
11
11
|
*/
|
|
12
12
|
this.isCellEdit = false;
|
|
13
|
+
this.isResourceCellEdited = false;
|
|
13
14
|
this.parent = ganttObj;
|
|
14
15
|
this.bindTreeGridProperties();
|
|
15
16
|
}
|
|
@@ -439,6 +440,7 @@ var CellEdit = /** @class */ (function () {
|
|
|
439
440
|
var resourceSettings = this.parent.resourceFields;
|
|
440
441
|
var editedResourceId = editedObj[this.parent.taskFields.resourceInfo];
|
|
441
442
|
if (editedResourceId) {
|
|
443
|
+
this.isResourceCellEdited = true;
|
|
442
444
|
var tempResourceInfo = this.parent.dataOperation.setResourceInfo(editedObj);
|
|
443
445
|
var editedResouceLength = tempResourceInfo.length;
|
|
444
446
|
var previousResource = previousData.ganttProperties.resourceInfo;
|
|
@@ -136,6 +136,7 @@ var ChartScroll = /** @class */ (function () {
|
|
|
136
136
|
*/
|
|
137
137
|
ChartScroll.prototype.setScrollTop = function (scrollTop) {
|
|
138
138
|
this.element.scrollTop = scrollTop;
|
|
139
|
+
this.parent.treeGrid.element.querySelector('.e-content').scrollTop = scrollTop;
|
|
139
140
|
};
|
|
140
141
|
/**
|
|
141
142
|
* To set scroll left for chart scroll container
|
|
@@ -1103,7 +1103,15 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1103
1103
|
field: fields[i], headerText: this_1.localeObj.getConstant(fields[i]), editType: 'stringedit', width: '200px',
|
|
1104
1104
|
edit: {
|
|
1105
1105
|
write: function (args) {
|
|
1106
|
-
var datePickerModel
|
|
1106
|
+
var datePickerModel;
|
|
1107
|
+
if (!isNullOrUndefined(_this.beforeOpenArgs[generalTabString])) {
|
|
1108
|
+
datePickerModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
|
|
1109
|
+
}
|
|
1110
|
+
else {
|
|
1111
|
+
var columnFields = _this.getGeneralColumnFields();
|
|
1112
|
+
var columnModel = _this.getFieldsModel(columnFields);
|
|
1113
|
+
datePickerModel = columnModel[_this.parent.taskFields[fields[i]]];
|
|
1114
|
+
}
|
|
1107
1115
|
var value = args.rowData[args.column.field];
|
|
1108
1116
|
setValue('value', value, datePickerModel);
|
|
1109
1117
|
var datePicker = new _this.inputs[_this.parent.columnByField[_this.parent.taskFields[fields[i]]].editType](datePickerModel);
|
|
@@ -1126,7 +1134,15 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1126
1134
|
field: fields[i], headerText: this_1.localeObj.getConstant(fields[i]), editType: 'stringedit', width: '100px',
|
|
1127
1135
|
edit: {
|
|
1128
1136
|
write: function (args) {
|
|
1129
|
-
var inputTextModel
|
|
1137
|
+
var inputTextModel;
|
|
1138
|
+
if (!isNullOrUndefined(_this.beforeOpenArgs[generalTabString])) {
|
|
1139
|
+
inputTextModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
|
|
1140
|
+
}
|
|
1141
|
+
else {
|
|
1142
|
+
var columnFields = _this.getGeneralColumnFields();
|
|
1143
|
+
var columnModel = _this.getFieldsModel(columnFields);
|
|
1144
|
+
inputTextModel = columnModel[_this.parent.taskFields[fields[i]]];
|
|
1145
|
+
}
|
|
1130
1146
|
inputTextModel.floatLabelType = 'Never';
|
|
1131
1147
|
var value = args.rowData[args.column.field];
|
|
1132
1148
|
if (!isNullOrUndefined(value)) {
|
|
@@ -438,7 +438,7 @@ export declare class Edit {
|
|
|
438
438
|
* @returns {void} .
|
|
439
439
|
* @private
|
|
440
440
|
*/
|
|
441
|
-
updateRealDataSource(addedRecord: IGanttData, rowPosition: RowPosition): void;
|
|
441
|
+
updateRealDataSource(addedRecord: IGanttData | IGanttData[], rowPosition: RowPosition): void;
|
|
442
442
|
/**
|
|
443
443
|
* @param {object[]} dataCollection .
|
|
444
444
|
* @param {IGanttData} record .
|
|
@@ -467,6 +467,7 @@ export declare class Edit {
|
|
|
467
467
|
* @returns {void} .
|
|
468
468
|
* @private
|
|
469
469
|
*/
|
|
470
|
+
createNewRecord(): IGanttData;
|
|
470
471
|
validateTaskPosition(data?: Object | object[], rowPosition?: RowPosition, rowIndex?: number, cAddedRecord?: IGanttData[]): void;
|
|
471
472
|
private updateNewRecord;
|
|
472
473
|
/**
|
|
@@ -515,6 +516,7 @@ export declare class Edit {
|
|
|
515
516
|
private indentOutdentSuccess;
|
|
516
517
|
private refreshDataSource;
|
|
517
518
|
private deleteDragRow;
|
|
519
|
+
private updateIndentedChildRecords;
|
|
518
520
|
private dropMiddle;
|
|
519
521
|
private updateChildRecordLevel;
|
|
520
522
|
private updateChildRecord;
|
|
@@ -821,9 +821,12 @@ var Edit = /** @class */ (function () {
|
|
|
821
821
|
*/
|
|
822
822
|
Edit.prototype.updateParentChildRecord = function (data) {
|
|
823
823
|
var ganttRecord = data;
|
|
824
|
-
if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto') {
|
|
824
|
+
if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
|
|
825
825
|
this.updateChildItems(ganttRecord);
|
|
826
826
|
}
|
|
827
|
+
if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
|
|
828
|
+
this.parent.editModule.cellEditModule.isResourceCellEdited = false;
|
|
829
|
+
}
|
|
827
830
|
};
|
|
828
831
|
/**
|
|
829
832
|
* To update records while changing schedule mode.
|
|
@@ -2275,7 +2278,7 @@ var Edit = /** @class */ (function () {
|
|
|
2275
2278
|
/*Record Updates*/
|
|
2276
2279
|
recordIndex = flatRecords.indexOf(this.addRowSelectedItem);
|
|
2277
2280
|
updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem);
|
|
2278
|
-
this.recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem);
|
|
2281
|
+
this.recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
|
|
2279
2282
|
break;
|
|
2280
2283
|
case 'Below':
|
|
2281
2284
|
currentItemIndex = flatRecords.indexOf(this.addRowSelectedItem);
|
|
@@ -2289,7 +2292,7 @@ var Edit = /** @class */ (function () {
|
|
|
2289
2292
|
recordIndex = currentItemIndex + 1;
|
|
2290
2293
|
updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) + 1;
|
|
2291
2294
|
}
|
|
2292
|
-
this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem);
|
|
2295
|
+
this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
|
|
2293
2296
|
break;
|
|
2294
2297
|
case 'Child':
|
|
2295
2298
|
currentItemIndex = flatRecords.indexOf(this.addRowSelectedItem);
|
|
@@ -2317,7 +2320,7 @@ var Edit = /** @class */ (function () {
|
|
|
2317
2320
|
this.addRowSelectedItem.ganttProperties.segments = null;
|
|
2318
2321
|
}
|
|
2319
2322
|
}
|
|
2320
|
-
this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem);
|
|
2323
|
+
this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
|
|
2321
2324
|
break;
|
|
2322
2325
|
}
|
|
2323
2326
|
this.newlyAddedRecordBackup = record;
|
|
@@ -2331,7 +2334,7 @@ var Edit = /** @class */ (function () {
|
|
|
2331
2334
|
* @returns {void} .
|
|
2332
2335
|
* @private
|
|
2333
2336
|
*/
|
|
2334
|
-
Edit.prototype.recordCollectionUpdate = function (childIndex, recordIndex, updatedCollectionIndex, record, parentItem) {
|
|
2337
|
+
Edit.prototype.recordCollectionUpdate = function (childIndex, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition) {
|
|
2335
2338
|
var flatRecords = this.parent.flatData;
|
|
2336
2339
|
var currentViewData = this.parent.currentViewData;
|
|
2337
2340
|
var ids = this.parent.ids;
|
|
@@ -2353,7 +2356,15 @@ var Edit = /** @class */ (function () {
|
|
|
2353
2356
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
2354
2357
|
var child = this.parent.taskFields.child;
|
|
2355
2358
|
if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
|
|
2356
|
-
|
|
2359
|
+
if (rowPosition === 'Above') {
|
|
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
|
+
}
|
|
2357
2368
|
}
|
|
2358
2369
|
else {
|
|
2359
2370
|
parentItem.taskData[child] = [];
|
|
@@ -2438,13 +2449,13 @@ var Edit = /** @class */ (function () {
|
|
|
2438
2449
|
}
|
|
2439
2450
|
for (var i = 0; i < addedRecord.length; i++) {
|
|
2440
2451
|
if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
|
|
2441
|
-
rowPosition = 'Top';
|
|
2452
|
+
rowPosition = rowPosition === 'Bottom' ? 'Bottom' : 'Top';
|
|
2442
2453
|
}
|
|
2443
2454
|
if (rowPosition === 'Top') {
|
|
2444
2455
|
dataSource.splice(0, 0, addedRecord[i].taskData);
|
|
2445
2456
|
}
|
|
2446
2457
|
else if (rowPosition === 'Bottom') {
|
|
2447
|
-
dataSource.push(addedRecord[i]);
|
|
2458
|
+
dataSource.push(addedRecord[i].taskData);
|
|
2448
2459
|
}
|
|
2449
2460
|
else {
|
|
2450
2461
|
if (!isNullOrUndefined(taskFields.id) && !isNullOrUndefined(taskFields.parentID)) {
|
|
@@ -2597,7 +2608,7 @@ var Edit = /** @class */ (function () {
|
|
|
2597
2608
|
else {
|
|
2598
2609
|
if (_this.parent.viewType === 'ProjectView') {
|
|
2599
2610
|
if ((rowPosition === 'Top' || rowPosition === 'Bottom') ||
|
|
2600
|
-
((rowPosition === 'Above' || rowPosition === 'Below') && !args.data.parentItem)) {
|
|
2611
|
+
((rowPosition === 'Above' || rowPosition === 'Below' || rowPosition === 'Child') && !args.data.parentItem)) {
|
|
2601
2612
|
if (args.data instanceof Array) {
|
|
2602
2613
|
_this.updateRealDataSource(args.data, rowPosition);
|
|
2603
2614
|
}
|
|
@@ -2640,6 +2651,59 @@ var Edit = /** @class */ (function () {
|
|
|
2640
2651
|
* @returns {void} .
|
|
2641
2652
|
* @private
|
|
2642
2653
|
*/
|
|
2654
|
+
Edit.prototype.createNewRecord = function () {
|
|
2655
|
+
var tempRecord = {};
|
|
2656
|
+
var ganttColumns = this.parent.ganttColumns;
|
|
2657
|
+
var taskSettingsFields = this.parent.taskFields;
|
|
2658
|
+
var taskId = this.parent.editModule.getNewTaskId();
|
|
2659
|
+
for (var i = 0; i < ganttColumns.length; i++) {
|
|
2660
|
+
var fieldName = ganttColumns[i].field;
|
|
2661
|
+
if (fieldName === taskSettingsFields.id) {
|
|
2662
|
+
tempRecord[fieldName] = taskId;
|
|
2663
|
+
}
|
|
2664
|
+
else if (ganttColumns[i].field === taskSettingsFields.startDate) {
|
|
2665
|
+
if (isNullOrUndefined(tempRecord[taskSettingsFields.endDate])) {
|
|
2666
|
+
tempRecord[fieldName] = this.parent.editModule.dialogModule.getMinimumStartDate();
|
|
2667
|
+
}
|
|
2668
|
+
else {
|
|
2669
|
+
tempRecord[fieldName] = new Date(tempRecord[taskSettingsFields.endDate]);
|
|
2670
|
+
}
|
|
2671
|
+
if (this.parent.timezone) {
|
|
2672
|
+
tempRecord[fieldName] = this.parent.dateValidationModule.remove(tempRecord[fieldName], this.parent.timezone);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
else if (ganttColumns[i].field === taskSettingsFields.endDate) {
|
|
2676
|
+
if (isNullOrUndefined(tempRecord[taskSettingsFields.startDate])) {
|
|
2677
|
+
tempRecord[fieldName] = this.parent.editModule.dialogModule.getMinimumStartDate();
|
|
2678
|
+
}
|
|
2679
|
+
else {
|
|
2680
|
+
tempRecord[fieldName] = new Date(tempRecord[taskSettingsFields.startDate]);
|
|
2681
|
+
}
|
|
2682
|
+
if (this.parent.timezone) {
|
|
2683
|
+
tempRecord[fieldName] = this.parent.dateValidationModule.remove(tempRecord[fieldName], this.parent.timezone);
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
else if (ganttColumns[i].field === taskSettingsFields.duration) {
|
|
2687
|
+
tempRecord[fieldName] = 1;
|
|
2688
|
+
}
|
|
2689
|
+
else if (ganttColumns[i].field === taskSettingsFields.name) {
|
|
2690
|
+
tempRecord[fieldName] = this.parent.editModule.dialogModule['localeObj'].getConstant('addDialogTitle') + ' ' + taskId;
|
|
2691
|
+
}
|
|
2692
|
+
else if (ganttColumns[i].field === taskSettingsFields.progress) {
|
|
2693
|
+
tempRecord[fieldName] = 0;
|
|
2694
|
+
}
|
|
2695
|
+
else if (ganttColumns[i].field === taskSettingsFields.work) {
|
|
2696
|
+
tempRecord[fieldName] = 0;
|
|
2697
|
+
}
|
|
2698
|
+
else if (ganttColumns[i].field === 'taskType') {
|
|
2699
|
+
tempRecord[fieldName] = this.parent.taskType;
|
|
2700
|
+
}
|
|
2701
|
+
else {
|
|
2702
|
+
tempRecord[this.parent.ganttColumns[i].field] = '';
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
return tempRecord;
|
|
2706
|
+
};
|
|
2643
2707
|
Edit.prototype.validateTaskPosition = function (data, rowPosition, rowIndex, cAddedRecord) {
|
|
2644
2708
|
var selectedRowIndex = isNullOrUndefined(rowIndex) || isNaN(parseInt(rowIndex.toString(), 10)) ?
|
|
2645
2709
|
this.parent.selectionModule ?
|
|
@@ -2651,7 +2715,7 @@ var Edit = /** @class */ (function () {
|
|
|
2651
2715
|
this.parent.selectionModule.getSelectedRowCellIndexes()[0].rowIndex : null : null : rowIndex;
|
|
2652
2716
|
this.addRowSelectedItem = isNullOrUndefined(selectedRowIndex) ? null : this.parent.updatedRecords[selectedRowIndex];
|
|
2653
2717
|
rowPosition = isNullOrUndefined(rowPosition) ? this.parent.editSettings.newRowPosition : rowPosition;
|
|
2654
|
-
data = isNullOrUndefined(data) ? this.
|
|
2718
|
+
data = isNullOrUndefined(data) ? this.createNewRecord() : data;
|
|
2655
2719
|
if (((isNullOrUndefined(selectedRowIndex) || selectedRowIndex < 0 ||
|
|
2656
2720
|
isNullOrUndefined(this.addRowSelectedItem)) && (rowPosition === 'Above'
|
|
2657
2721
|
|| rowPosition === 'Below'
|
|
@@ -2743,6 +2807,10 @@ var Edit = /** @class */ (function () {
|
|
|
2743
2807
|
}
|
|
2744
2808
|
this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
|
|
2745
2809
|
}
|
|
2810
|
+
var flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
|
|
2811
|
+
if (flag !== null) {
|
|
2812
|
+
setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
|
|
2813
|
+
}
|
|
2746
2814
|
this.addSuccess(args);
|
|
2747
2815
|
args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
|
|
2748
2816
|
this.parent.trigger('actionComplete', args);
|
|
@@ -3146,6 +3214,25 @@ var Edit = /** @class */ (function () {
|
|
|
3146
3214
|
var delRow = this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);
|
|
3147
3215
|
this.removeRecords(delRow);
|
|
3148
3216
|
};
|
|
3217
|
+
Edit.prototype.updateIndentedChildRecords = function (indentedRecord) {
|
|
3218
|
+
var createParentItem = {
|
|
3219
|
+
uniqueID: indentedRecord.uniqueID,
|
|
3220
|
+
expanded: indentedRecord.expanded,
|
|
3221
|
+
level: indentedRecord.level,
|
|
3222
|
+
index: indentedRecord.index,
|
|
3223
|
+
taskId: indentedRecord.ganttProperties.rowUniqueID
|
|
3224
|
+
};
|
|
3225
|
+
for (var i = 0; i < indentedRecord.childRecords.length; i++) {
|
|
3226
|
+
this.parent.setRecordValue('parentItem', createParentItem, indentedRecord.childRecords[i]);
|
|
3227
|
+
this.parent.setRecordValue('parentUniqueID', indentedRecord.uniqueID, indentedRecord.childRecords[i]);
|
|
3228
|
+
}
|
|
3229
|
+
if (indentedRecord.hasChildRecords) {
|
|
3230
|
+
indentedRecord = indentedRecord.childRecords;
|
|
3231
|
+
for (var j = 0; j < indentedRecord['length']; j++) {
|
|
3232
|
+
this.updateIndentedChildRecords(indentedRecord[j]);
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
};
|
|
3149
3236
|
Edit.prototype.dropMiddle = function (recordIndex1) {
|
|
3150
3237
|
var obj = this.parent;
|
|
3151
3238
|
var childRec = this.parent.editModule.getChildCount(this.droppedRecord, 0);
|
|
@@ -3161,6 +3248,10 @@ var Edit = /** @class */ (function () {
|
|
|
3161
3248
|
this.recordLevel();
|
|
3162
3249
|
if (this.draggedRecord.hasChildRecords) {
|
|
3163
3250
|
this.updateChildRecord(this.draggedRecord, childRecordsLength, this.droppedRecord.expanded);
|
|
3251
|
+
if (this.parent.enableImmutableMode) {
|
|
3252
|
+
var indentedRecord = this.draggedRecord;
|
|
3253
|
+
this.updateIndentedChildRecords(indentedRecord);
|
|
3254
|
+
}
|
|
3164
3255
|
}
|
|
3165
3256
|
if (isNullOrUndefined(this.draggedRecord.parentItem &&
|
|
3166
3257
|
this.updateParentRecords.indexOf(this.draggedRecord.parentItem) !== -1)) {
|
|
@@ -189,7 +189,7 @@ var Filter = /** @class */ (function () {
|
|
|
189
189
|
var ganttElement = closest(element, '#' + this.parent.element.id)
|
|
190
190
|
|| element.querySelector('#' + this.parent.element.id);
|
|
191
191
|
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element.nodeName === 'HTML'
|
|
192
|
-
|| element.nodeName === 'DIV') {
|
|
192
|
+
|| ((element.nodeName === 'DIV') && (!element.classList.contains('e-day')))) {
|
|
193
193
|
remove(this.filterMenuElement);
|
|
194
194
|
this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
|
|
195
195
|
this.filterMenuElement = null;
|
|
@@ -141,7 +141,7 @@ var FocusModule = /** @class */ (function () {
|
|
|
141
141
|
{
|
|
142
142
|
if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
143
143
|
e.preventDefault();
|
|
144
|
-
ganttObj.addRecord();
|
|
144
|
+
ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition);
|
|
145
145
|
var focussedElement = ganttObj.element;
|
|
146
146
|
focussedElement.focus();
|
|
147
147
|
}
|
|
@@ -457,7 +457,7 @@ var RowDD = /** @class */ (function () {
|
|
|
457
457
|
if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
|
|
458
458
|
var rowPosition = this.dropPosition === 'topSegment' ? 'Above' : 'Below';
|
|
459
459
|
this.parent.editModule.addRowSelectedItem = droppedRecord;
|
|
460
|
-
this.parent.editModule.updateRealDataSource(draggedRecord, rowPosition);
|
|
460
|
+
this.parent.editModule.updateRealDataSource([draggedRecord], rowPosition);
|
|
461
461
|
delete this.parent.editModule.addRowSelectedItem;
|
|
462
462
|
}
|
|
463
463
|
}
|
|
@@ -493,7 +493,9 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
493
493
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
494
494
|
var args = {
|
|
495
495
|
cancel: false,
|
|
496
|
-
requestType: 'taskbarediting'
|
|
496
|
+
requestType: 'taskbarediting',
|
|
497
|
+
taskBarEditAction: this.taskBarEditAction,
|
|
498
|
+
data: this.taskBarEditRecord
|
|
497
499
|
};
|
|
498
500
|
if (this.segmentIndex !== -1) {
|
|
499
501
|
args.requestType = 'mergeSegment';
|
|
@@ -327,6 +327,12 @@ var GanttChart = /** @class */ (function () {
|
|
|
327
327
|
* @private
|
|
328
328
|
*/
|
|
329
329
|
GanttChart.prototype.mouseUp = function (e) {
|
|
330
|
+
if (this.parent.allowRowDragAndDrop) {
|
|
331
|
+
var ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
|
|
332
|
+
if (ganttDragElemet) {
|
|
333
|
+
ganttDragElemet.remove();
|
|
334
|
+
}
|
|
335
|
+
}
|
|
330
336
|
if (!this.isGanttElement) {
|
|
331
337
|
this.parent.notify('chartMouseUp', e);
|
|
332
338
|
}
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -292,8 +292,14 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
292
292
|
Gantt.prototype.calculateDimensions = function () {
|
|
293
293
|
var settingsHeight;
|
|
294
294
|
if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
|
|
295
|
-
!this.element.parentElement.style.height)) {
|
|
296
|
-
var ganttHeight =
|
|
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
|
+
}
|
|
297
303
|
ganttHeight = (ganttHeight * window.innerHeight) / 100;
|
|
298
304
|
if (this.height === '100%') {
|
|
299
305
|
ganttHeight = ganttHeight - 16;
|
|
@@ -448,9 +454,16 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
448
454
|
var settingsHeight = void 0;
|
|
449
455
|
if (this.height.indexOf('%') !== -1) {
|
|
450
456
|
var ganttHeight = Number(this.height.split("%")[0]);
|
|
451
|
-
if (this.element.parentElement && this.element.parentElement.style.height) {
|
|
452
|
-
var containerHeight =
|
|
453
|
-
|
|
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
|
+
}
|
|
454
467
|
}
|
|
455
468
|
else {
|
|
456
469
|
ganttHeight = Number(this.height.split("%")[0]);
|
|
@@ -1227,14 +1227,16 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1227
1227
|
// eslint-disable-next-line
|
|
1228
1228
|
var resourcesId = [];
|
|
1229
1229
|
var resourcesName = [];
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1230
|
+
if (!isNullOrUndefined(resourceData)) {
|
|
1231
|
+
for (var i = 0; i < resourceData.length; i++) {
|
|
1232
|
+
resourcesId.push(resourceData[i][resourceSettings.id]);
|
|
1233
|
+
var resName = resourceData[i][resourceSettings.name];
|
|
1234
|
+
var resourceUnit = resourceData[i][resourceSettings.unit];
|
|
1235
|
+
if (resourceUnit !== 100) {
|
|
1236
|
+
resName += '[' + resourceUnit + '%' + ']';
|
|
1237
|
+
}
|
|
1238
|
+
resourcesName.push(resName);
|
|
1236
1239
|
}
|
|
1237
|
-
resourcesName.push(resName);
|
|
1238
1240
|
}
|
|
1239
1241
|
this.parent.setRecordValue('resourceNames', resourcesName.join(','), ganttProp, true);
|
|
1240
1242
|
this.updateTaskDataResource(ganttData);
|
|
@@ -56,6 +56,7 @@ var EditTooltip = /** @class */ (function () {
|
|
|
56
56
|
tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
|
|
57
57
|
}
|
|
58
58
|
args.element.style.left = tooltipPositionX + 'px';
|
|
59
|
+
args.element.style.visibility = 'visible';
|
|
59
60
|
};
|
|
60
61
|
/**
|
|
61
62
|
* To show/hide taskbar edit tooltip.
|
|
@@ -798,6 +798,7 @@ var Timeline = /** @class */ (function () {
|
|
|
798
798
|
* @private
|
|
799
799
|
*/
|
|
800
800
|
Timeline.prototype.createTimelineTemplate = function (tier) {
|
|
801
|
+
var isFirstCell = false;
|
|
801
802
|
var parent = this.parent;
|
|
802
803
|
var parentTh = '';
|
|
803
804
|
var parentTr = '';
|
|
@@ -814,10 +815,19 @@ var Timeline = /** @class */ (function () {
|
|
|
814
815
|
// PDf export collection
|
|
815
816
|
var timelineCell = {};
|
|
816
817
|
timelineCell.startDate = new Date(startDate.getTime());
|
|
817
|
-
|
|
818
|
+
if (mode === 'Month' && tier === 'bottomTier' && ((this.parent.currentZoomingLevel.level === 5) || (this.parent.currentZoomingLevel.level === 6)) && scheduleDateCollection.length === 0) {
|
|
819
|
+
isFirstCell = true;
|
|
820
|
+
}
|
|
821
|
+
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell, isFirstCell);
|
|
818
822
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
819
|
-
|
|
820
|
-
|
|
823
|
+
if (isFirstCell) {
|
|
824
|
+
newTime = this.calculateQuarterEndDate(startDate).getTime();
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
increment = this.getIncrement(startDate, count, mode);
|
|
828
|
+
newTime = startDate.getTime() + increment;
|
|
829
|
+
}
|
|
830
|
+
isFirstCell = false;
|
|
821
831
|
startDate.setTime(newTime);
|
|
822
832
|
if (startDate >= endDate) {
|
|
823
833
|
/* eslint-disable-next-line */
|
|
@@ -927,6 +937,21 @@ var Timeline = /** @class */ (function () {
|
|
|
927
937
|
mode === 'Hour' || mode === 'Minutes') &&
|
|
928
938
|
this.parent.nonWorkingDayIndex.indexOf(day.getDay()) !== -1;
|
|
929
939
|
};
|
|
940
|
+
Timeline.prototype.calculateQuarterEndDate = function (date) {
|
|
941
|
+
var month = date.getMonth();
|
|
942
|
+
if (month >= 0 && month <= 2) {
|
|
943
|
+
return new Date(date.getFullYear(), 3, 1);
|
|
944
|
+
}
|
|
945
|
+
else if (month >= 3 && month <= 5) {
|
|
946
|
+
return new Date(date.getFullYear(), 6, 1);
|
|
947
|
+
}
|
|
948
|
+
else if (month >= 6 && month <= 8) {
|
|
949
|
+
return new Date(date.getFullYear(), 9, 1);
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
return new Date(date.getFullYear() + 1, 0, 1);
|
|
953
|
+
}
|
|
954
|
+
};
|
|
930
955
|
/**
|
|
931
956
|
* To construct template string.
|
|
932
957
|
*
|
|
@@ -940,7 +965,7 @@ var Timeline = /** @class */ (function () {
|
|
|
940
965
|
* @private
|
|
941
966
|
*/
|
|
942
967
|
/* eslint-disable-next-line */
|
|
943
|
-
Timeline.prototype.getHeaterTemplateString = function (scheduleWeeks, mode, tier, isLast, count, timelineCell) {
|
|
968
|
+
Timeline.prototype.getHeaterTemplateString = function (scheduleWeeks, mode, tier, isLast, count, timelineCell, isFirstCell) {
|
|
944
969
|
var parentTr = '';
|
|
945
970
|
var td = '';
|
|
946
971
|
var format = tier === 'topTier' ?
|
|
@@ -955,7 +980,7 @@ var Timeline = /** @class */ (function () {
|
|
|
955
980
|
this.customFormat(scheduleWeeks, format, tier, mode, formatter);
|
|
956
981
|
thWidth = (this.getIncrement(scheduleWeeks, count, mode) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth;
|
|
957
982
|
var cellWidth = thWidth;
|
|
958
|
-
thWidth = isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate)
|
|
983
|
+
thWidth = isLast || isFirstCell ? isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate) : this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.calculateQuarterEndDate(scheduleWeeks))
|
|
959
984
|
: thWidth;
|
|
960
985
|
var isWeekendCell = this.isWeekendHeaderCell(mode, tier, scheduleWeeks);
|
|
961
986
|
var textClassName = tier === 'topTier' ? ' e-gantt-top-cell-text' : '';
|
|
@@ -500,6 +500,11 @@
|
|
|
500
500
|
white-space: nowrap;
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
+
.e-gantt .e-gantt-chart .e-timeline-header-table-body > tr {
|
|
504
|
+
display: -ms-inline-flexbox;
|
|
505
|
+
display: inline-flex;
|
|
506
|
+
}
|
|
507
|
+
|
|
503
508
|
.e-gantt .e-gantt-chart .e-timeline-top-header-cell,
|
|
504
509
|
.e-gantt .e-gantt-chart .e-timeline-single-header-cell {
|
|
505
510
|
border-spacing: 0;
|
|
@@ -1069,7 +1074,6 @@
|
|
|
1069
1074
|
.e-gantt-dialog .e-edit-form-row {
|
|
1070
1075
|
height: 241px;
|
|
1071
1076
|
overflow-y: auto;
|
|
1072
|
-
padding-bottom: 16px;
|
|
1073
1077
|
}
|
|
1074
1078
|
|
|
1075
1079
|
.e-gantt-dialog .e-edit-form-column:nth-child(odd) {
|
|
@@ -1187,6 +1191,10 @@
|
|
|
1187
1191
|
opacity: 1;
|
|
1188
1192
|
}
|
|
1189
1193
|
|
|
1194
|
+
.e-gantt-tooltip {
|
|
1195
|
+
visibility: hidden;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1190
1198
|
.e-gantt .e-cloneproperties.e-draganddrop .e-row .e-rowcell .e-treecolumn-container .e-icons.e-none::before {
|
|
1191
1199
|
content: '';
|
|
1192
1200
|
}
|
|
@@ -1343,10 +1351,10 @@
|
|
|
1343
1351
|
.e-gantt .e-gantt-chart .e-timeline-header-container {
|
|
1344
1352
|
background: #1a1a1a;
|
|
1345
1353
|
border-bottom-color: #484848;
|
|
1346
|
-
border-bottom-width:
|
|
1354
|
+
border-bottom-width: 0px;
|
|
1347
1355
|
border-right-color: #484848;
|
|
1348
1356
|
color: #f0f0f0;
|
|
1349
|
-
height:
|
|
1357
|
+
height: 64px;
|
|
1350
1358
|
}
|
|
1351
1359
|
|
|
1352
1360
|
.e-gantt .e-gantt-chart .e-timeline-top-header-cell,
|
|
@@ -1365,7 +1373,7 @@
|
|
|
1365
1373
|
}
|
|
1366
1374
|
|
|
1367
1375
|
.e-gantt .e-gantt-chart .e-timeline-top-header-cell {
|
|
1368
|
-
height:
|
|
1376
|
+
height: 32px;
|
|
1369
1377
|
}
|
|
1370
1378
|
|
|
1371
1379
|
.e-gantt .e-gantt-chart .e-chart-root-container {
|