@syncfusion/ej2-gantt 19.3.53 → 19.4.38
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 +31 -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 +127 -51
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +124 -48
- 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 +36 -15
- package/src/gantt/actions/dialog-edit.js +7 -2
- package/src/gantt/actions/edit.js +4 -0
- 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 +6 -24
- package/src/gantt/base/gantt.d.ts +17 -0
- package/src/gantt/base/gantt.js +32 -3
- package/src/gantt/base/task-processor.js +20 -3
- package/src/gantt/renderer/timeline.js +17 -1
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +7 -6
- package/styles/bootstrap5.css +7 -6
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/gantt/_bootstrap4-definition.scss +1 -0
- package/styles/gantt/_bootstrap5-definition.scss +1 -1
- package/styles/gantt/_fluent-definition.scss +163 -0
- package/styles/gantt/_layout.scss +2 -7
- package/styles/gantt/_theme.scss +2 -1
- package/styles/gantt/bootstrap-dark.css +1 -1
- package/styles/gantt/bootstrap.css +1 -1
- package/styles/gantt/bootstrap4.css +1 -1
- package/styles/gantt/bootstrap5-dark.css +7 -6
- package/styles/gantt/bootstrap5.css +7 -6
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/fabric.css +1 -1
- package/styles/gantt/highcontrast-light.css +1 -1
- package/styles/gantt/highcontrast.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/material.css +1 -1
- package/styles/gantt/tailwind-dark.css +2 -2
- package/styles/gantt/tailwind.css +2 -2
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/tailwind-dark.css +2 -2
- package/styles/tailwind.css +2 -2
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.38
|
|
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.7.0",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-pCBiP1niGv6kWO+zEiP3M319heaa4WYhbNR9bt+eeEMc848UHgZAAb9PE19YOGcXvIOg2ObmIBx6DVOywyK/lQ==",
|
|
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-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-gantt/-/ej2-gantt-19.7.0.tgz",
|
|
27
|
+
"_shasum": "a19c8392c249d42c5464bef9858792baf7d51b64",
|
|
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.38",
|
|
43
|
+
"@syncfusion/ej2-grids": "~19.4.38",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~19.4.38",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~19.4.38",
|
|
46
|
+
"@syncfusion/ej2-lists": "~19.4.38",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~19.4.38",
|
|
48
|
+
"@syncfusion/ej2-popups": "~19.4.38",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~19.4.38",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~19.4.38"
|
|
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.38",
|
|
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
|
}
|
|
@@ -493,7 +514,7 @@ var ContextMenu = /** @class */ (function () {
|
|
|
493
514
|
};
|
|
494
515
|
ContextMenu.prototype.contextMenuOpen = function (args) {
|
|
495
516
|
this.isOpen = true;
|
|
496
|
-
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide)')[0];
|
|
517
|
+
var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
|
|
497
518
|
addClass([firstMenuItem], 'e-focused');
|
|
498
519
|
};
|
|
499
520
|
ContextMenu.prototype.getMenuItems = function () {
|
|
@@ -53,7 +53,8 @@ var DialogEdit = /** @class */ (function () {
|
|
|
53
53
|
datetimepickeredit: DateTimePicker,
|
|
54
54
|
maskededit: MaskedTextBox,
|
|
55
55
|
numericedit: NumericTextBox,
|
|
56
|
-
stringedit: TextBox
|
|
56
|
+
stringedit: TextBox,
|
|
57
|
+
defaultedit: TextBox
|
|
57
58
|
};
|
|
58
59
|
this.processDialogFields();
|
|
59
60
|
this.wireEvents();
|
|
@@ -710,6 +711,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
710
711
|
fieldsModel[column.field] = checkboxModel;
|
|
711
712
|
break;
|
|
712
713
|
}
|
|
714
|
+
case 'defaultedit':
|
|
713
715
|
case 'stringedit':
|
|
714
716
|
{
|
|
715
717
|
var textBox = common;
|
|
@@ -1104,7 +1106,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1104
1106
|
var datePickerModel = _this.beforeOpenArgs[generalTabString][_this.parent.taskFields[fields[i]]];
|
|
1105
1107
|
var value = args.rowData[args.column.field];
|
|
1106
1108
|
setValue('value', value, datePickerModel);
|
|
1107
|
-
var datePicker = new
|
|
1109
|
+
var datePicker = new _this.inputs[_this.parent.columnByField[_this.parent.taskFields[fields[i]]].editType](datePickerModel);
|
|
1108
1110
|
datePicker.appendTo(args.element);
|
|
1109
1111
|
},
|
|
1110
1112
|
read: function (args) {
|
|
@@ -1991,6 +1993,9 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1991
1993
|
this.rowData.ganttProperties.segments = dataSource;
|
|
1992
1994
|
this.parent.setRecordValue('segments', this.parent.dataOperation.setSegmentsInfo(this.rowData, false), this.rowData.ganttProperties, true);
|
|
1993
1995
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.segments, userData, this.rowData);
|
|
1996
|
+
if (dataSource.length <= 0) {
|
|
1997
|
+
this.validateDuration(this.rowData);
|
|
1998
|
+
}
|
|
1994
1999
|
}
|
|
1995
2000
|
};
|
|
1996
2001
|
// eslint-disable-next-line
|
|
@@ -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);
|
|
@@ -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
|
*
|
|
@@ -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
|
*
|
|
@@ -360,6 +383,8 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
360
383
|
Gantt.prototype.renderGantt = function (isChange) {
|
|
361
384
|
// predecessor calculation
|
|
362
385
|
if (this.predecessorModule && this.taskFields.dependency) {
|
|
386
|
+
this.predecessorModule['parentIds'] = [];
|
|
387
|
+
this.predecessorModule['parentRecord'] = [];
|
|
363
388
|
this.predecessorModule.updatePredecessors();
|
|
364
389
|
if (this.isInPredecessorValidation && this.enableValidation) {
|
|
365
390
|
this.predecessorModule.updatedRecordsDateByPredecessor();
|
|
@@ -379,7 +404,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
379
404
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
380
405
|
}
|
|
381
406
|
else {
|
|
382
|
-
this.treeGrid.dataSource = this.flatData
|
|
407
|
+
this.treeGrid.dataSource = this.flatData;
|
|
383
408
|
}
|
|
384
409
|
}
|
|
385
410
|
else {
|
|
@@ -2427,6 +2452,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2427
2452
|
* @public
|
|
2428
2453
|
*/
|
|
2429
2454
|
Gantt.prototype.updateDataSource = function (dataSource, args) {
|
|
2455
|
+
this.isDynamicData = true;
|
|
2430
2456
|
if (!isNullOrUndefined(args)) {
|
|
2431
2457
|
for (var _i = 0, _a = Object.keys(args); _i < _a.length; _i++) { // eslint-disable-line
|
|
2432
2458
|
var prop = _a[_i];
|
|
@@ -2630,12 +2656,15 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2630
2656
|
if (!isNullOrUndefined(rowData)) {
|
|
2631
2657
|
var data = extend({}, {}, rowData.taskData, true);
|
|
2632
2658
|
var taskfields = this.taskFields;
|
|
2659
|
+
if (data[taskfields.startDate]) {
|
|
2660
|
+
this.setRecordValue(taskfields.startDate, rowData.ganttProperties.startDate, data, true);
|
|
2661
|
+
}
|
|
2633
2662
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
2634
2663
|
data[taskfields.duration] = 0;
|
|
2635
2664
|
}
|
|
2636
2665
|
else {
|
|
2637
|
-
data[taskfields.startDate] = new Date(rowData.
|
|
2638
|
-
data[taskfields.endDate] = new Date(rowData.
|
|
2666
|
+
data[taskfields.startDate] = new Date(rowData.ganttProperties.startDate);
|
|
2667
|
+
data[taskfields.endDate] = new Date(rowData.ganttProperties.endDate);
|
|
2639
2668
|
}
|
|
2640
2669
|
if (!isNullOrUndefined(taskfields.milestone)) {
|
|
2641
2670
|
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
|
}
|
|
@@ -817,6 +817,9 @@ var Timeline = /** @class */ (function () {
|
|
|
817
817
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
|
|
818
818
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
819
819
|
increment = this.getIncrement(startDate, count, mode);
|
|
820
|
+
if (this.parent.isInDst(startDate)) {
|
|
821
|
+
increment = increment + (1000 * 60 * 60);
|
|
822
|
+
}
|
|
820
823
|
newTime = startDate.getTime() + increment;
|
|
821
824
|
startDate.setTime(newTime);
|
|
822
825
|
if (startDate >= endDate) {
|
|
@@ -880,11 +883,19 @@ var Timeline = /** @class */ (function () {
|
|
|
880
883
|
dayIntervel - 1 : dayIntervel : dayIntervel;
|
|
881
884
|
lastDay.setDate(lastDay.getDate() + (dayIntervel + (7 * count)));
|
|
882
885
|
increment = lastDay.getTime() - firstDay.getTime();
|
|
886
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
887
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
888
|
+
increment = increment - (1000 * 60 * 60);
|
|
889
|
+
}
|
|
883
890
|
break;
|
|
884
891
|
}
|
|
885
892
|
case 'Day':
|
|
886
893
|
lastDay.setHours(24, 0, 0, 0);
|
|
887
894
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * 24 * (count - 1));
|
|
895
|
+
if ((this.parent.isInDst(lastDay) && !this.parent.isInDst(firstDay)) ||
|
|
896
|
+
(!this.parent.isInDst(lastDay) && this.parent.isInDst(firstDay))) {
|
|
897
|
+
increment -= (1000 * 60 * 60);
|
|
898
|
+
}
|
|
888
899
|
break;
|
|
889
900
|
case 'Hour':
|
|
890
901
|
lastDay.setMinutes(60);
|
|
@@ -979,7 +990,12 @@ var Timeline = /** @class */ (function () {
|
|
|
979
990
|
* @private
|
|
980
991
|
*/
|
|
981
992
|
Timeline.prototype.calculateWidthBetweenTwoDate = function (mode, scheduleWeeks, endDate) {
|
|
982
|
-
var
|
|
993
|
+
var timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
994
|
+
if ((this.parent.isInDst(scheduleWeeks) && !this.parent.isInDst(endDate)) ||
|
|
995
|
+
(!this.parent.isInDst(scheduleWeeks) && this.parent.isInDst(endDate))) {
|
|
996
|
+
timeDifference = timeDifference - (1000 * 60 * 60);
|
|
997
|
+
}
|
|
998
|
+
var balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
983
999
|
return balanceDay * this.parent.perDayWidth;
|
|
984
1000
|
};
|
|
985
1001
|
/**
|
package/styles/bootstrap.css
CHANGED
package/styles/bootstrap4.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 */
|
|
@@ -868,7 +869,7 @@
|
|
|
868
869
|
.e-gantt .e-gantt-chart .e-right-resize-gripper {
|
|
869
870
|
-ms-flex-align: center;
|
|
870
871
|
align-items: center;
|
|
871
|
-
cursor:
|
|
872
|
+
cursor: ew-resize;
|
|
872
873
|
display: -ms-inline-flexbox;
|
|
873
874
|
display: inline-flex;
|
|
874
875
|
}
|
|
@@ -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 */
|
|
@@ -868,7 +869,7 @@
|
|
|
868
869
|
.e-gantt .e-gantt-chart .e-right-resize-gripper {
|
|
869
870
|
-ms-flex-align: center;
|
|
870
871
|
align-items: center;
|
|
871
|
-
cursor:
|
|
872
|
+
cursor: ew-resize;
|
|
872
873
|
display: -ms-inline-flexbox;
|
|
873
874
|
display: inline-flex;
|
|
874
875
|
}
|
|
@@ -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 {
|
package/styles/fabric-dark.css
CHANGED