@syncfusion/ej2-gantt 19.3.56 → 19.4.41
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 +39 -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 +135 -58
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +132 -55
- 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 +35 -14
- package/src/gantt/actions/dialog-edit.js +6 -3
- package/src/gantt/actions/edit.js +5 -1
- package/src/gantt/actions/keyboard.js +2 -2
- package/src/gantt/actions/rowdragdrop.js +2 -0
- package/src/gantt/actions/taskbar-edit.d.ts +0 -15
- package/src/gantt/actions/taskbar-edit.js +7 -24
- package/src/gantt/base/gantt.d.ts +17 -0
- package/src/gantt/base/gantt.js +32 -7
- package/src/gantt/base/task-processor.js +20 -3
- package/src/gantt/base/tree-grid.js +3 -0
- package/src/gantt/renderer/chart-rows.js +2 -0
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +18 -1
- package/styles/bootstrap5-dark.css +6 -5
- package/styles/bootstrap5.css +6 -5
- package/styles/fabric-dark.css +1 -1
- package/styles/gantt/_bootstrap4-definition.scss +1 -0
- package/styles/gantt/_bootstrap5-definition.scss +1 -1
- package/styles/gantt/_fabric-dark-definition.scss +2 -1
- package/styles/gantt/_fluent-definition.scss +163 -0
- package/styles/gantt/_layout.scss +7 -7
- package/styles/gantt/_material-dark-definition.scss +2 -1
- package/styles/gantt/_theme.scss +2 -1
- package/styles/gantt/bootstrap5-dark.css +6 -5
- package/styles/gantt/bootstrap5.css +6 -5
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/icons/_fluent.scss +112 -0
- package/styles/gantt/icons/_tailwind-dark.scss +112 -112
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.
|
|
3
|
+
* version : 19.4.41
|
|
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.4.40",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-n0OWrN70jN14qD8VVJ5+m4C0QyN8mwF3kaM84Buq3rrw8BydgVTIl+SOJcZlG8LJcCOA+ZPw6lrURZ0I+c5xTg==",
|
|
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.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-19.4.40.tgz",
|
|
27
|
+
"_shasum": "34f02fea46bd04853093f007a0c11a5e26967978",
|
|
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.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~19.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~19.
|
|
41
|
-
"@syncfusion/ej2-data": "~19.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~19.
|
|
43
|
-
"@syncfusion/ej2-grids": "~19.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~19.
|
|
45
|
-
"@syncfusion/ej2-layouts": "~19.
|
|
46
|
-
"@syncfusion/ej2-lists": "~19.
|
|
47
|
-
"@syncfusion/ej2-navigations": "~19.
|
|
48
|
-
"@syncfusion/ej2-popups": "~19.
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~19.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~19.
|
|
38
|
+
"@syncfusion/ej2-base": "~19.4.38",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~19.4.38",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~19.4.38",
|
|
41
|
+
"@syncfusion/ej2-data": "~19.4.38",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~19.4.41",
|
|
43
|
+
"@syncfusion/ej2-grids": "~19.4.41",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~19.4.41",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~19.4.38",
|
|
46
|
+
"@syncfusion/ej2-lists": "~19.4.38",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~19.4.41",
|
|
48
|
+
"@syncfusion/ej2-popups": "~19.4.41",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~19.4.40",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~19.4.41"
|
|
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.
|
|
78
|
+
"version": "19.4.41",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -108,6 +108,12 @@ var ContextMenu = /** @class */ (function () {
|
|
|
108
108
|
position = this.item;
|
|
109
109
|
data = extend({}, {}, this.rowData.taskData, true);
|
|
110
110
|
taskfields = this.parent.taskFields;
|
|
111
|
+
if (data[taskfields.startDate]) {
|
|
112
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
113
|
+
}
|
|
114
|
+
if (data[taskfields.endDate]) {
|
|
115
|
+
this.parent.setRecordValue(taskfields.endDate, this.rowData.ganttProperties.endDate, data, true);
|
|
116
|
+
}
|
|
111
117
|
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
112
118
|
data[taskfields.dependency] = null;
|
|
113
119
|
}
|
|
@@ -301,7 +307,12 @@ var ContextMenu = /** @class */ (function () {
|
|
|
301
307
|
var item = _a[_i];
|
|
302
308
|
// let target: EventTarget = target;
|
|
303
309
|
if (!item.separator) {
|
|
304
|
-
this.
|
|
310
|
+
if ((target.classList.contains('e-gantt-unscheduled-taskbar')) && ((item.text === this.getLocale('splitTask')) || (item.text === this.getLocale('mergeTask')))) {
|
|
311
|
+
this.hideItems.push(item.text);
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
this.updateItemStatus(item, target, rowIndex);
|
|
315
|
+
}
|
|
305
316
|
}
|
|
306
317
|
}
|
|
307
318
|
args.rowData = this.rowData;
|
|
@@ -413,24 +424,34 @@ var ContextMenu = /** @class */ (function () {
|
|
|
413
424
|
break;
|
|
414
425
|
case 'Indent':
|
|
415
426
|
{
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
this.parent.
|
|
422
|
-
|
|
427
|
+
if (!this.parent.allowSelection) {
|
|
428
|
+
this.hideItems.push(item.text);
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
var index = this.parent.selectedRowIndex;
|
|
432
|
+
var isSelected = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
433
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
434
|
+
var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
|
|
435
|
+
if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
|
|
436
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
|
|
437
|
+
this.updateItemVisibility(item.text);
|
|
438
|
+
}
|
|
423
439
|
}
|
|
424
440
|
break;
|
|
425
441
|
}
|
|
426
442
|
case 'Outdent':
|
|
427
443
|
{
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
this.
|
|
444
|
+
if (!this.parent.allowSelection) {
|
|
445
|
+
this.hideItems.push(item.text);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
var ind = this.parent.selectionModule.getSelectedRowIndexes()[0];
|
|
449
|
+
var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
450
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
451
|
+
if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
|
|
452
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
|
|
453
|
+
this.updateItemVisibility(item.text);
|
|
454
|
+
}
|
|
434
455
|
}
|
|
435
456
|
break;
|
|
436
457
|
}
|
|
@@ -262,7 +262,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
262
262
|
tempData.ganttProperties.durationUnit = this.parent.durationUnit.toLocaleLowerCase();
|
|
263
263
|
}
|
|
264
264
|
else if (columns[i].field === taskSettings.name) {
|
|
265
|
-
tempData[field] = '
|
|
265
|
+
tempData[field] = this.localeObj.getConstant('addDialogTitle') + ' ' + id;
|
|
266
266
|
tempData.ganttProperties.taskName = tempData[field];
|
|
267
267
|
}
|
|
268
268
|
else if (columns[i].field === taskSettings.progress) {
|
|
@@ -1106,7 +1106,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1106
1106
|
var datePickerModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
|
|
1107
1107
|
var value = args.rowData[args.column.field];
|
|
1108
1108
|
setValue('value', value, datePickerModel);
|
|
1109
|
-
var datePicker = new
|
|
1109
|
+
var datePicker = new _this.inputs[_this.parent.columnByField[_this.parent.taskFields[fields[i]]].editType](datePickerModel);
|
|
1110
1110
|
datePicker.appendTo(args.element);
|
|
1111
1111
|
},
|
|
1112
1112
|
read: function (args) {
|
|
@@ -1181,7 +1181,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1181
1181
|
inputValue = dialog.querySelector('#' + ganttId + 'SegmentsTabContainer' + columnName)
|
|
1182
1182
|
.ej2_instances[0];
|
|
1183
1183
|
}
|
|
1184
|
-
if (inputValue.value !== tempValue.toString()) {
|
|
1184
|
+
if (inputValue.value.toString() !== tempValue.toString()) {
|
|
1185
1185
|
inputValue.value = tempValue;
|
|
1186
1186
|
inputValue.dataBind();
|
|
1187
1187
|
}
|
|
@@ -1993,6 +1993,9 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1993
1993
|
this.rowData.ganttProperties.segments = dataSource;
|
|
1994
1994
|
this.parent.setRecordValue('segments', this.parent.dataOperation.setSegmentsInfo(this.rowData, false), this.rowData.ganttProperties, true);
|
|
1995
1995
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.segments, userData, this.rowData);
|
|
1996
|
+
if (dataSource.length <= 0) {
|
|
1997
|
+
this.validateDuration(this.rowData);
|
|
1998
|
+
}
|
|
1996
1999
|
}
|
|
1997
2000
|
};
|
|
1998
2001
|
// eslint-disable-next-line
|
|
@@ -799,7 +799,7 @@ var Edit = /** @class */ (function () {
|
|
|
799
799
|
this.updateParentItemOnEditing();
|
|
800
800
|
}
|
|
801
801
|
/** Update parent up-to zeroth level */
|
|
802
|
-
if (ganttRecord.parentItem
|
|
802
|
+
if (ganttRecord.parentItem) {
|
|
803
803
|
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
804
804
|
}
|
|
805
805
|
this.initiateSaveAction(args);
|
|
@@ -2433,6 +2433,9 @@ var Edit = /** @class */ (function () {
|
|
|
2433
2433
|
var taskFields = this.parent.taskFields;
|
|
2434
2434
|
var dataSource = isCountRequired(this.parent) ? getValue('result', this.parent.dataSource) :
|
|
2435
2435
|
this.parent.dataSource;
|
|
2436
|
+
if (this.parent.dataSource instanceof DataManager) {
|
|
2437
|
+
dataSource = this.parent.dataSource.dataSource.json;
|
|
2438
|
+
}
|
|
2436
2439
|
for (var i = 0; i < addedRecord.length; i++) {
|
|
2437
2440
|
if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
|
|
2438
2441
|
rowPosition = 'Top';
|
|
@@ -2505,6 +2508,7 @@ var Edit = /** @class */ (function () {
|
|
|
2505
2508
|
Edit.prototype.addRecord = function (data, rowPosition, rowIndex) {
|
|
2506
2509
|
var _this = this;
|
|
2507
2510
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
2511
|
+
this.parent.isDynamicData = true;
|
|
2508
2512
|
var cAddedRecord_1 = [];
|
|
2509
2513
|
if (isNullOrUndefined(data)) {
|
|
2510
2514
|
this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord_1);
|
|
@@ -137,9 +137,9 @@ var FocusModule = /** @class */ (function () {
|
|
|
137
137
|
{
|
|
138
138
|
if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
139
139
|
e.preventDefault();
|
|
140
|
-
var focussedElement = ganttObj.element.querySelector('.e-gantt-chart');
|
|
141
|
-
focussedElement.focus();
|
|
142
140
|
ganttObj.addRecord();
|
|
141
|
+
var focussedElement = ganttObj.element;
|
|
142
|
+
focussedElement.focus();
|
|
143
143
|
}
|
|
144
144
|
break;
|
|
145
145
|
}
|
|
@@ -541,6 +541,7 @@ var RowDD = /** @class */ (function () {
|
|
|
541
541
|
else {
|
|
542
542
|
var level = 1;
|
|
543
543
|
draggedRecord.level = droppedRecord.level + 1;
|
|
544
|
+
this.parent.setRecordValue('level', this.draggedRecord.level, this.draggedRecord);
|
|
544
545
|
this.updateChildRecordLevel(draggedRecord, level);
|
|
545
546
|
}
|
|
546
547
|
droppedRecord.expanded = true;
|
|
@@ -625,6 +626,7 @@ var RowDD = /** @class */ (function () {
|
|
|
625
626
|
parentData = this.parent.treeGrid[id][record.parentItem.uniqueID];
|
|
626
627
|
}
|
|
627
628
|
currentRecord.level = record.parentItem ? parentData.level + level : record.level + 1;
|
|
629
|
+
this.parent.setRecordValue('level', currentRecord.level, currentRecord);
|
|
628
630
|
if (currentRecord.hasChildRecords) {
|
|
629
631
|
level--;
|
|
630
632
|
level = this.updateChildRecordLevel(currentRecord, level);
|
|
@@ -224,21 +224,6 @@ export declare class TaskbarEdit extends DateProcessor {
|
|
|
224
224
|
* @private
|
|
225
225
|
*/
|
|
226
226
|
getDateByLeft(left: number): Date;
|
|
227
|
-
/**
|
|
228
|
-
* To get timezone offset.
|
|
229
|
-
*
|
|
230
|
-
* @returns {number} .
|
|
231
|
-
* @private
|
|
232
|
-
*/
|
|
233
|
-
private getDefaultTZOffset;
|
|
234
|
-
/**
|
|
235
|
-
* To check whether the date is in DST.
|
|
236
|
-
*
|
|
237
|
-
* @param {Date} date .
|
|
238
|
-
* @returns {boolean} .
|
|
239
|
-
* @private
|
|
240
|
-
*/
|
|
241
|
-
isInDst(date: Date): boolean;
|
|
242
227
|
/**
|
|
243
228
|
* To set item position.
|
|
244
229
|
*
|
|
@@ -493,8 +493,11 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
493
493
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
494
494
|
var args = {
|
|
495
495
|
cancel: false,
|
|
496
|
-
requestType: '
|
|
496
|
+
requestType: 'taskbarediting'
|
|
497
497
|
};
|
|
498
|
+
if (this.segmentIndex !== -1) {
|
|
499
|
+
args.requestType = 'mergeSegment';
|
|
500
|
+
}
|
|
498
501
|
this.parent.trigger('actionBegin', args, function (arg) {
|
|
499
502
|
if (arg.cancel === false) {
|
|
500
503
|
_this.taskBarEditingAction(event, false);
|
|
@@ -1321,36 +1324,15 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1321
1324
|
var tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
|
|
1322
1325
|
this.parent.timelineModule.bottomTier;
|
|
1323
1326
|
if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
|
|
1324
|
-
if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
|
|
1327
|
+
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
1325
1328
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
1326
1329
|
}
|
|
1327
|
-
else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
|
|
1330
|
+
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
1328
1331
|
pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
1329
1332
|
}
|
|
1330
1333
|
}
|
|
1331
1334
|
return pStartDate;
|
|
1332
1335
|
};
|
|
1333
|
-
/**
|
|
1334
|
-
* To get timezone offset.
|
|
1335
|
-
*
|
|
1336
|
-
* @returns {number} .
|
|
1337
|
-
* @private
|
|
1338
|
-
*/
|
|
1339
|
-
TaskbarEdit.prototype.getDefaultTZOffset = function () {
|
|
1340
|
-
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
1341
|
-
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
1342
|
-
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
1343
|
-
};
|
|
1344
|
-
/**
|
|
1345
|
-
* To check whether the date is in DST.
|
|
1346
|
-
*
|
|
1347
|
-
* @param {Date} date .
|
|
1348
|
-
* @returns {boolean} .
|
|
1349
|
-
* @private
|
|
1350
|
-
*/
|
|
1351
|
-
TaskbarEdit.prototype.isInDst = function (date) {
|
|
1352
|
-
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
1353
|
-
};
|
|
1354
1336
|
/**
|
|
1355
1337
|
* To set item position.
|
|
1356
1338
|
*
|
|
@@ -1500,6 +1482,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1500
1482
|
this.isMouseDragged = false;
|
|
1501
1483
|
}
|
|
1502
1484
|
else {
|
|
1485
|
+
this.parent.isOnEdit = false;
|
|
1503
1486
|
this.cancelTaskbarEditActionInMouseLeave();
|
|
1504
1487
|
}
|
|
1505
1488
|
}
|
|
@@ -199,6 +199,8 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
199
199
|
/** @hidden */
|
|
200
200
|
isExpandCollapseLevelMethod: boolean;
|
|
201
201
|
/** @hidden */
|
|
202
|
+
isDynamicData: boolean;
|
|
203
|
+
/** @hidden */
|
|
202
204
|
contentHeight: number;
|
|
203
205
|
/** @hidden */
|
|
204
206
|
isAdaptive: Boolean;
|
|
@@ -1220,6 +1222,21 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
1220
1222
|
* @private
|
|
1221
1223
|
*/
|
|
1222
1224
|
getDateFormat(): string;
|
|
1225
|
+
/**
|
|
1226
|
+
* To get timezone offset.
|
|
1227
|
+
*
|
|
1228
|
+
* @returns {number} .
|
|
1229
|
+
* @private
|
|
1230
|
+
*/
|
|
1231
|
+
private getDefaultTZOffset;
|
|
1232
|
+
/**
|
|
1233
|
+
* To check whether the date is in DST.
|
|
1234
|
+
*
|
|
1235
|
+
* @param {Date} date .
|
|
1236
|
+
* @returns {boolean} .
|
|
1237
|
+
* @private
|
|
1238
|
+
*/
|
|
1239
|
+
isInDst(date: Date): boolean;
|
|
1223
1240
|
/**
|
|
1224
1241
|
* Method to map resource fields.
|
|
1225
1242
|
*
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -72,6 +72,8 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
72
72
|
/** @hidden */
|
|
73
73
|
_this.isExpandCollapseLevelMethod = false;
|
|
74
74
|
/** @hidden */
|
|
75
|
+
_this.isDynamicData = false;
|
|
76
|
+
/** @hidden */
|
|
75
77
|
_this.isConnectorLineUpdate = false;
|
|
76
78
|
/** @hidden */
|
|
77
79
|
_this.staticSelectedRowIndex = -1;
|
|
@@ -229,6 +231,27 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
229
231
|
return ganttDateFormat;
|
|
230
232
|
}
|
|
231
233
|
};
|
|
234
|
+
/**
|
|
235
|
+
* To get timezone offset.
|
|
236
|
+
*
|
|
237
|
+
* @returns {number} .
|
|
238
|
+
* @private
|
|
239
|
+
*/
|
|
240
|
+
Gantt.prototype.getDefaultTZOffset = function () {
|
|
241
|
+
var janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
242
|
+
var julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
243
|
+
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* To check whether the date is in DST.
|
|
247
|
+
*
|
|
248
|
+
* @param {Date} date .
|
|
249
|
+
* @returns {boolean} .
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
Gantt.prototype.isInDst = function (date) {
|
|
253
|
+
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
254
|
+
};
|
|
232
255
|
/**
|
|
233
256
|
* Method to map resource fields.
|
|
234
257
|
*
|
|
@@ -381,7 +404,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
381
404
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
382
405
|
}
|
|
383
406
|
else {
|
|
384
|
-
this.treeGrid.dataSource = this.flatData
|
|
407
|
+
this.treeGrid.dataSource = this.flatData;
|
|
385
408
|
}
|
|
386
409
|
}
|
|
387
410
|
else {
|
|
@@ -943,10 +966,8 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
943
966
|
this.treeGrid.grid.searchSettings = getActualProperties(this.searchSettings);
|
|
944
967
|
this.treeGrid.grid.dataBind();
|
|
945
968
|
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
this.treeGrid.dataBind();
|
|
949
|
-
}
|
|
969
|
+
this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
|
|
970
|
+
this.treeGrid.dataBind();
|
|
950
971
|
if (this.toolbarModule) {
|
|
951
972
|
this.toolbarModule.updateSearchTextBox();
|
|
952
973
|
}
|
|
@@ -2429,6 +2450,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2429
2450
|
* @public
|
|
2430
2451
|
*/
|
|
2431
2452
|
Gantt.prototype.updateDataSource = function (dataSource, args) {
|
|
2453
|
+
this.isDynamicData = true;
|
|
2432
2454
|
if (!isNullOrUndefined(args)) {
|
|
2433
2455
|
for (var _i = 0, _a = Object.keys(args); _i < _a.length; _i++) { // eslint-disable-line
|
|
2434
2456
|
var prop = _a[_i];
|
|
@@ -2632,12 +2654,15 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2632
2654
|
if (!isNullOrUndefined(rowData)) {
|
|
2633
2655
|
var data = extend({}, {}, rowData.taskData, true);
|
|
2634
2656
|
var taskfields = this.taskFields;
|
|
2657
|
+
if (data[taskfields.startDate]) {
|
|
2658
|
+
this.setRecordValue(taskfields.startDate, rowData.ganttProperties.startDate, data, true);
|
|
2659
|
+
}
|
|
2635
2660
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
2636
2661
|
data[taskfields.duration] = 0;
|
|
2637
2662
|
}
|
|
2638
2663
|
else {
|
|
2639
|
-
data[taskfields.startDate] = new Date(rowData.
|
|
2640
|
-
data[taskfields.endDate] = new Date(rowData.
|
|
2664
|
+
data[taskfields.startDate] = new Date(rowData.ganttProperties.startDate);
|
|
2665
|
+
data[taskfields.endDate] = new Date(rowData.ganttProperties.endDate);
|
|
2641
2666
|
}
|
|
2642
2667
|
if (!isNullOrUndefined(taskfields.milestone)) {
|
|
2643
2668
|
if (data[taskfields.milestone] === false) {
|
|
@@ -734,8 +734,16 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
734
734
|
var ganttProperties = ganttData.ganttProperties;
|
|
735
735
|
var duration = data[taskSettings.duration];
|
|
736
736
|
duration = isNullOrUndefined(duration) || duration === '' ? null : duration;
|
|
737
|
-
var startDate
|
|
738
|
-
var endDate
|
|
737
|
+
var startDate;
|
|
738
|
+
var endDate;
|
|
739
|
+
if (ganttProperties.startDate && ganttProperties.endDate) {
|
|
740
|
+
startDate = this.getDateFromFormat(ganttProperties.startDate, true);
|
|
741
|
+
endDate = this.getDateFromFormat(ganttProperties.endDate, true);
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
startDate = this.getDateFromFormat(data[taskSettings.startDate], true);
|
|
745
|
+
endDate = this.getDateFromFormat(data[taskSettings.endDate], true);
|
|
746
|
+
}
|
|
739
747
|
var segments = taskSettings.segments ? (data[taskSettings.segments] ||
|
|
740
748
|
ganttData.taskData[taskSettings.segments]) : null;
|
|
741
749
|
var isMileStone = taskSettings.milestone ? data[taskSettings.milestone] ? true : false : false;
|
|
@@ -1337,7 +1345,10 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1337
1345
|
if (!isNullOrUndefined(value)) {
|
|
1338
1346
|
value = new Date(tempDate.getTime());
|
|
1339
1347
|
}
|
|
1340
|
-
this.parent.
|
|
1348
|
+
if (!this.parent.isLoad && !this.parent.isDynamicData) {
|
|
1349
|
+
this.parent.setRecordValue('taskData.' + mapping, value, task);
|
|
1350
|
+
}
|
|
1351
|
+
this.parent.isDynamicData = false;
|
|
1341
1352
|
};
|
|
1342
1353
|
TaskProcessor.prototype.getDurationInDay = function (duration, durationUnit) {
|
|
1343
1354
|
if (durationUnit === 'day') {
|
|
@@ -2160,7 +2171,13 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2160
2171
|
continue;
|
|
2161
2172
|
}
|
|
2162
2173
|
var startDate = this.getValidStartDate(childData.ganttProperties);
|
|
2174
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
2175
|
+
startDate = childData.ganttProperties.autoStartDate;
|
|
2176
|
+
}
|
|
2163
2177
|
var endDate = this.getValidEndDate(childData.ganttProperties);
|
|
2178
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
2179
|
+
endDate = childData.ganttProperties.autoEndDate;
|
|
2180
|
+
}
|
|
2164
2181
|
if (isNullOrUndefined(minStartDate)) {
|
|
2165
2182
|
minStartDate = this.getDateFromFormat(startDate);
|
|
2166
2183
|
}
|
|
@@ -297,6 +297,9 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
297
297
|
if (getValue('requestType', args) === 'refresh' && isNullOrUndefined(getValue('type', args)) && this.parent.addDeleteRecord) {
|
|
298
298
|
if (this.parent.selectedRowIndex != -1) {
|
|
299
299
|
this.parent.selectRow(this.parent.selectedRowIndex);
|
|
300
|
+
if (this.parent.selectedRowIndex > this.parent.currentViewData.length - 1) {
|
|
301
|
+
this.parent.selectedRowIndex = -1;
|
|
302
|
+
}
|
|
300
303
|
}
|
|
301
304
|
else {
|
|
302
305
|
this.parent.selectRow(0);
|
|
@@ -1204,6 +1204,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
|
+
this.parent.renderTemplates();
|
|
1207
1208
|
this.triggerQueryTaskbarInfo();
|
|
1208
1209
|
this.parent.modifiedRecords = [];
|
|
1209
1210
|
if (collapsedResourceRecord.length) {
|
|
@@ -1568,6 +1569,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1568
1569
|
else {
|
|
1569
1570
|
tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
|
|
1570
1571
|
}
|
|
1572
|
+
this.parent.renderTemplates();
|
|
1571
1573
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
|
|
1572
1574
|
if (isValidateRange) {
|
|
1573
1575
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
@@ -890,6 +890,7 @@ var Timeline = /** @class */ (function () {
|
|
|
890
890
|
lastDay.setMinutes(60);
|
|
891
891
|
lastDay.setSeconds(0);
|
|
892
892
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * (count - 1));
|
|
893
|
+
increment = this.checkDate(firstDay, lastDay, increment, count);
|
|
893
894
|
break;
|
|
894
895
|
case 'Minutes':
|
|
895
896
|
lastDay.setSeconds(60);
|
|
@@ -898,6 +899,21 @@ var Timeline = /** @class */ (function () {
|
|
|
898
899
|
}
|
|
899
900
|
return increment;
|
|
900
901
|
};
|
|
902
|
+
Timeline.prototype.checkDate = function (firstDay, lastDay, increment, count) {
|
|
903
|
+
var date = new Date(firstDay.getTime());
|
|
904
|
+
date.setTime(date.getTime() + increment);
|
|
905
|
+
if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
906
|
+
var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
|
|
907
|
+
if (!this.parent.isInDst(date)) {
|
|
908
|
+
increment += (1000 * 60 * 60 * diffCount);
|
|
909
|
+
}
|
|
910
|
+
else if (this.parent.isInDst(date)) {
|
|
911
|
+
increment -= (1000 * 60 * 60 * diffCount);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
return increment;
|
|
915
|
+
};
|
|
916
|
+
;
|
|
901
917
|
/**
|
|
902
918
|
* Method to find header cell was weekend or not
|
|
903
919
|
*
|
|
@@ -979,7 +995,8 @@ var Timeline = /** @class */ (function () {
|
|
|
979
995
|
* @private
|
|
980
996
|
*/
|
|
981
997
|
Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
|
|
982
|
-
var
|
|
998
|
+
var timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
999
|
+
var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
983
1000
|
return balanceDay * this.parent.perDayWidth;
|
|
984
1001
|
};
|
|
985
1002
|
/**
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
.e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
|
|
63
63
|
.e-float-input.e-control-wrapper.e-ddl input[readonly] {
|
|
64
64
|
background: transparent;
|
|
65
|
-
color: inherit;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
.e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
|
|
@@ -181,6 +180,8 @@
|
|
|
181
180
|
border-left-width: 0;
|
|
182
181
|
}
|
|
183
182
|
|
|
183
|
+
/*! Toolbar's bootstrap5 theme wise override definitions and variables */
|
|
184
|
+
/*! Tab's bootstrap5 theme wise override definitions and variables */
|
|
184
185
|
/*! Horizontal Tab */
|
|
185
186
|
/*! Bootstrap specific themes definition's */
|
|
186
187
|
/*! Vertical Tab */
|
|
@@ -1608,21 +1609,21 @@
|
|
|
1608
1609
|
.e-gantt .e-gantt-chart .e-left-label-temp-container {
|
|
1609
1610
|
color: #ced4da;
|
|
1610
1611
|
font-size: 14px;
|
|
1611
|
-
padding-right:
|
|
1612
|
+
padding-right: 25px;
|
|
1612
1613
|
}
|
|
1613
1614
|
|
|
1614
1615
|
.e-gantt .e-gantt-chart .e-right-label-temp-container {
|
|
1615
1616
|
color: #ced4da;
|
|
1616
1617
|
font-size: 14px;
|
|
1617
|
-
margin-left:
|
|
1618
|
+
margin-left: 25px;
|
|
1618
1619
|
}
|
|
1619
1620
|
|
|
1620
1621
|
.e-gantt .e-gantt-chart .e-right-label-container {
|
|
1621
|
-
margin-left:
|
|
1622
|
+
margin-left: 25px;
|
|
1622
1623
|
}
|
|
1623
1624
|
|
|
1624
1625
|
.e-gantt .e-gantt-chart .e-left-label-container {
|
|
1625
|
-
padding-right:
|
|
1626
|
+
padding-right: 25px;
|
|
1626
1627
|
}
|
|
1627
1628
|
|
|
1628
1629
|
.e-gantt .e-gantt-chart .e-connectorpoint-right {
|
package/styles/bootstrap5.css
CHANGED
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
.e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
|
|
63
63
|
.e-float-input.e-control-wrapper.e-ddl input[readonly] {
|
|
64
64
|
background: transparent;
|
|
65
|
-
color: inherit;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
.e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
|
|
@@ -181,6 +180,8 @@
|
|
|
181
180
|
border-left-width: 0;
|
|
182
181
|
}
|
|
183
182
|
|
|
183
|
+
/*! Toolbar's bootstrap5 theme wise override definitions and variables */
|
|
184
|
+
/*! Tab's bootstrap5 theme wise override definitions and variables */
|
|
184
185
|
/*! Horizontal Tab */
|
|
185
186
|
/*! Bootstrap specific themes definition's */
|
|
186
187
|
/*! Vertical Tab */
|
|
@@ -1608,21 +1609,21 @@
|
|
|
1608
1609
|
.e-gantt .e-gantt-chart .e-left-label-temp-container {
|
|
1609
1610
|
color: #495057;
|
|
1610
1611
|
font-size: 14px;
|
|
1611
|
-
padding-right:
|
|
1612
|
+
padding-right: 25px;
|
|
1612
1613
|
}
|
|
1613
1614
|
|
|
1614
1615
|
.e-gantt .e-gantt-chart .e-right-label-temp-container {
|
|
1615
1616
|
color: #495057;
|
|
1616
1617
|
font-size: 14px;
|
|
1617
|
-
margin-left:
|
|
1618
|
+
margin-left: 25px;
|
|
1618
1619
|
}
|
|
1619
1620
|
|
|
1620
1621
|
.e-gantt .e-gantt-chart .e-right-label-container {
|
|
1621
|
-
margin-left:
|
|
1622
|
+
margin-left: 25px;
|
|
1622
1623
|
}
|
|
1623
1624
|
|
|
1624
1625
|
.e-gantt .e-gantt-chart .e-left-label-container {
|
|
1625
|
-
padding-right:
|
|
1626
|
+
padding-right: 25px;
|
|
1626
1627
|
}
|
|
1627
1628
|
|
|
1628
1629
|
.e-gantt .e-gantt-chart .e-connectorpoint-right {
|