@syncfusion/ej2-gantt 19.4.43 → 19.4.52
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/README.md +1 -1
- 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 +186 -29
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +186 -29
- 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 +97 -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 +17 -5
- package/src/gantt/base/tree-grid.js +4 -0
- package/src/gantt/renderer/chart-rows.js +3 -3
- 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 +15 -4
- package/styles/bootstrap.css +15 -4
- package/styles/bootstrap4.css +15 -4
- package/styles/bootstrap5-dark.css +13 -2
- package/styles/bootstrap5.css +13 -2
- package/styles/fabric-dark.css +12 -1
- package/styles/fabric.css +12 -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 +11 -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 +15 -4
- package/styles/gantt/bootstrap.css +15 -4
- package/styles/gantt/bootstrap4.css +15 -4
- package/styles/gantt/bootstrap5-dark.css +13 -2
- package/styles/gantt/bootstrap5.css +13 -2
- package/styles/gantt/fabric-dark.css +12 -1
- package/styles/gantt/fabric.css +12 -1
- package/styles/gantt/highcontrast-light.css +12 -1
- package/styles/gantt/highcontrast.css +12 -1
- package/styles/gantt/material-dark.css +12 -1
- package/styles/gantt/material.css +12 -1
- package/styles/gantt/tailwind-dark.css +15 -4
- package/styles/gantt/tailwind.css +15 -4
- package/styles/highcontrast-light.css +12 -1
- package/styles/highcontrast.css +12 -1
- package/styles/material-dark.css +12 -1
- package/styles/material.css +12 -1
- package/styles/tailwind-dark.css +15 -4
- package/styles/tailwind.css +15 -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.52
|
|
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.50",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-imVvajBdyXAI+FP/7Jb5/pmTr4SyPCEdAS5qE86A0+n1sopZo3IvQdwtdwjVudxDhpD3yvwtYR8h8cvuMgu51Q==",
|
|
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.50.tgz",
|
|
27
|
+
"_shasum": "6a6e8627885346972eec6cc8031235561d0e4029",
|
|
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.52",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~19.4.52",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~19.4.52",
|
|
41
|
+
"@syncfusion/ej2-data": "~19.4.52",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~19.4.52",
|
|
43
|
+
"@syncfusion/ej2-grids": "~19.4.52",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~19.4.52",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~19.4.52",
|
|
46
|
+
"@syncfusion/ej2-lists": "~19.4.52",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~19.4.52",
|
|
48
|
+
"@syncfusion/ej2-popups": "~19.4.52",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~19.4.52",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~19.4.52"
|
|
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.52",
|
|
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'
|
|
@@ -3146,6 +3210,25 @@ var Edit = /** @class */ (function () {
|
|
|
3146
3210
|
var delRow = this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);
|
|
3147
3211
|
this.removeRecords(delRow);
|
|
3148
3212
|
};
|
|
3213
|
+
Edit.prototype.updateIndentedChildRecords = function (indentedRecord) {
|
|
3214
|
+
var createParentItem = {
|
|
3215
|
+
uniqueID: indentedRecord.uniqueID,
|
|
3216
|
+
expanded: indentedRecord.expanded,
|
|
3217
|
+
level: indentedRecord.level,
|
|
3218
|
+
index: indentedRecord.index,
|
|
3219
|
+
taskId: indentedRecord.ganttProperties.rowUniqueID
|
|
3220
|
+
};
|
|
3221
|
+
for (var i = 0; i < indentedRecord.childRecords.length; i++) {
|
|
3222
|
+
this.parent.setRecordValue('parentItem', createParentItem, indentedRecord.childRecords[i]);
|
|
3223
|
+
this.parent.setRecordValue('parentUniqueID', indentedRecord.uniqueID, indentedRecord.childRecords[i]);
|
|
3224
|
+
}
|
|
3225
|
+
if (indentedRecord.hasChildRecords) {
|
|
3226
|
+
indentedRecord = indentedRecord.childRecords;
|
|
3227
|
+
for (var j = 0; j < indentedRecord['length']; j++) {
|
|
3228
|
+
this.updateIndentedChildRecords(indentedRecord[j]);
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3149
3232
|
Edit.prototype.dropMiddle = function (recordIndex1) {
|
|
3150
3233
|
var obj = this.parent;
|
|
3151
3234
|
var childRec = this.parent.editModule.getChildCount(this.droppedRecord, 0);
|
|
@@ -3161,6 +3244,10 @@ var Edit = /** @class */ (function () {
|
|
|
3161
3244
|
this.recordLevel();
|
|
3162
3245
|
if (this.draggedRecord.hasChildRecords) {
|
|
3163
3246
|
this.updateChildRecord(this.draggedRecord, childRecordsLength, this.droppedRecord.expanded);
|
|
3247
|
+
if (this.parent.enableImmutableMode) {
|
|
3248
|
+
var indentedRecord = this.draggedRecord;
|
|
3249
|
+
this.updateIndentedChildRecords(indentedRecord);
|
|
3250
|
+
}
|
|
3164
3251
|
}
|
|
3165
3252
|
if (isNullOrUndefined(this.draggedRecord.parentItem &&
|
|
3166
3253
|
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
|
@@ -293,7 +293,13 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
293
293
|
var settingsHeight;
|
|
294
294
|
if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
|
|
295
295
|
!this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
|
|
296
|
-
var ganttHeight =
|
|
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,10 +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
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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
|
+
}
|
|
455
467
|
}
|
|
456
468
|
else {
|
|
457
469
|
ganttHeight = Number(this.height.split("%")[0]);
|
|
@@ -238,6 +238,10 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
238
238
|
};
|
|
239
239
|
GanttTreeGrid.prototype.actionBegin = function (args) {
|
|
240
240
|
this.parent.notify('actionBegin', args);
|
|
241
|
+
var flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
|
|
242
|
+
if (flag !== null) {
|
|
243
|
+
setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
|
|
244
|
+
}
|
|
241
245
|
this.parent.trigger('actionBegin', args);
|
|
242
246
|
}; // eslint-disable-next-line
|
|
243
247
|
GanttTreeGrid.prototype.created = function (args) {
|
|
@@ -176,9 +176,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
176
176
|
}
|
|
177
177
|
if (labelString !== 'null') {
|
|
178
178
|
taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
179
|
-
(this.taskBarHeight - 1) + 'px; text-align:
|
|
180
|
-
'display:' +
|
|
181
|
-
'width:' + (
|
|
179
|
+
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
180
|
+
'display:' + 'inline-block;' +
|
|
181
|
+
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
182
182
|
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
183
183
|
}
|
|
184
184
|
var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
|
|
@@ -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;
|
|
@@ -824,7 +829,10 @@
|
|
|
824
829
|
font-weight: normal;
|
|
825
830
|
margin-left: 8px;
|
|
826
831
|
margin-right: 15px;
|
|
832
|
+
overflow: hidden;
|
|
833
|
+
text-overflow: ellipsis;
|
|
827
834
|
vertical-align: middle;
|
|
835
|
+
white-space: nowrap;
|
|
828
836
|
}
|
|
829
837
|
|
|
830
838
|
.e-gantt .e-gantt-chart .e-task-table {
|
|
@@ -1069,7 +1077,6 @@
|
|
|
1069
1077
|
.e-gantt-dialog .e-edit-form-row {
|
|
1070
1078
|
height: 241px;
|
|
1071
1079
|
overflow-y: auto;
|
|
1072
|
-
padding-bottom: 16px;
|
|
1073
1080
|
}
|
|
1074
1081
|
|
|
1075
1082
|
.e-gantt-dialog .e-edit-form-column:nth-child(odd) {
|
|
@@ -1187,6 +1194,10 @@
|
|
|
1187
1194
|
opacity: 1;
|
|
1188
1195
|
}
|
|
1189
1196
|
|
|
1197
|
+
.e-gantt-tooltip {
|
|
1198
|
+
visibility: hidden;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1190
1201
|
.e-gantt .e-cloneproperties.e-draganddrop .e-row .e-rowcell .e-treecolumn-container .e-icons.e-none::before {
|
|
1191
1202
|
content: '';
|
|
1192
1203
|
}
|
|
@@ -1343,10 +1354,10 @@
|
|
|
1343
1354
|
.e-gantt .e-gantt-chart .e-timeline-header-container {
|
|
1344
1355
|
background: #1a1a1a;
|
|
1345
1356
|
border-bottom-color: #484848;
|
|
1346
|
-
border-bottom-width:
|
|
1357
|
+
border-bottom-width: 0px;
|
|
1347
1358
|
border-right-color: #484848;
|
|
1348
1359
|
color: #f0f0f0;
|
|
1349
|
-
height:
|
|
1360
|
+
height: 64px;
|
|
1350
1361
|
}
|
|
1351
1362
|
|
|
1352
1363
|
.e-gantt .e-gantt-chart .e-timeline-top-header-cell,
|
|
@@ -1365,7 +1376,7 @@
|
|
|
1365
1376
|
}
|
|
1366
1377
|
|
|
1367
1378
|
.e-gantt .e-gantt-chart .e-timeline-top-header-cell {
|
|
1368
|
-
height:
|
|
1379
|
+
height: 32px;
|
|
1369
1380
|
}
|
|
1370
1381
|
|
|
1371
1382
|
.e-gantt .e-gantt-chart .e-chart-root-container {
|