@syncfusion/ej2-gantt 22.1.34 → 22.1.37
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 +26 -0
- package/dist/ej2-gantt.min.js +2 -2
- 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 +94 -40
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +94 -40
- 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 +15 -15
- package/src/gantt/actions/selection.js +2 -1
- package/src/gantt/actions/taskbar-edit.js +1 -0
- package/src/gantt/actions/toolbar.d.ts +1 -0
- package/src/gantt/actions/toolbar.js +9 -0
- package/src/gantt/base/date-processor.js +1 -0
- package/src/gantt/base/gantt-chart.js +5 -5
- package/src/gantt/base/gantt.d.ts +1 -0
- package/src/gantt/base/gantt.js +7 -5
- package/src/gantt/base/splitter.js +2 -1
- package/src/gantt/base/task-processor.js +41 -20
- package/src/gantt/base/tree-grid.js +9 -2
- package/src/gantt/renderer/chart-rows.js +4 -4
- package/src/gantt/renderer/timeline.js +4 -1
- package/src/gantt/renderer/tooltip.js +11 -3
- package/styles/gantt/material3-dark.css +20 -11
- package/styles/gantt/material3.css +20 -11
- package/styles/material3-dark.css +20 -11
- package/styles/material3.css +20 -11
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.1.
|
|
3
|
+
* version : 22.1.37
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@22.1.36",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-7MEx9csM58T3eHOhm9EkmpfUp3StyM/nXSx0wTSmAWKJ9zD/98YfEgd1yTSnx94hHHgXOQxngHnAxxVLVx8Ypg==",
|
|
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": "https://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.1.36.tgz",
|
|
27
|
+
"_shasum": "c45c61ba695de72b2b0d8e80c56d87ac2577aed3",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@syncfusion/ej2-base": "~22.1.34",
|
|
39
|
-
"@syncfusion/ej2-buttons": "~22.1.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~22.1.
|
|
41
|
-
"@syncfusion/ej2-data": "~22.1.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~22.1.
|
|
43
|
-
"@syncfusion/ej2-grids": "~22.1.
|
|
39
|
+
"@syncfusion/ej2-buttons": "~22.1.36",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~22.1.36",
|
|
41
|
+
"@syncfusion/ej2-data": "~22.1.36",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~22.1.37",
|
|
43
|
+
"@syncfusion/ej2-grids": "~22.1.37",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~22.1.34",
|
|
45
|
-
"@syncfusion/ej2-layouts": "~22.1.
|
|
45
|
+
"@syncfusion/ej2-layouts": "~22.1.37",
|
|
46
46
|
"@syncfusion/ej2-lists": "~22.1.34",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~22.1.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~22.1.36",
|
|
48
48
|
"@syncfusion/ej2-notifications": "~22.1.34",
|
|
49
|
-
"@syncfusion/ej2-popups": "~22.1.
|
|
50
|
-
"@syncfusion/ej2-richtexteditor": "~22.1.
|
|
49
|
+
"@syncfusion/ej2-popups": "~22.1.37",
|
|
50
|
+
"@syncfusion/ej2-richtexteditor": "~22.1.36",
|
|
51
51
|
"@syncfusion/ej2-svg-base": "~22.1.34",
|
|
52
|
-
"@syncfusion/ej2-treegrid": "~22.1.
|
|
52
|
+
"@syncfusion/ej2-treegrid": "~22.1.37"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
75
75
|
},
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "22.1.
|
|
77
|
+
"version": "22.1.37",
|
|
78
78
|
"sideEffects": false
|
|
79
79
|
}
|
|
@@ -447,6 +447,7 @@ var Selection = /** @class */ (function () {
|
|
|
447
447
|
*/
|
|
448
448
|
Selection.prototype.mouseUpHandler = function (e) {
|
|
449
449
|
var isTaskbarEdited = false;
|
|
450
|
+
var elements = document.querySelectorAll('.e-drag-item');
|
|
450
451
|
var targetElement = null;
|
|
451
452
|
if (e.target.closest('.e-rowcell')) {
|
|
452
453
|
targetElement = e.target;
|
|
@@ -464,7 +465,7 @@ var Selection = /** @class */ (function () {
|
|
|
464
465
|
isTaskbarEdited = true;
|
|
465
466
|
}
|
|
466
467
|
}
|
|
467
|
-
if (!isTaskbarEdited && this.parent.element.contains(e.target)) {
|
|
468
|
+
if (!isTaskbarEdited && this.parent.element.contains(e.target) && !(elements.length === 1)) {
|
|
468
469
|
var parent_1 = parentsUntil(e.target, 'e-chart-row');
|
|
469
470
|
var isSelected = e.target.classList.contains('e-rowcell') ||
|
|
470
471
|
e.target.classList.contains('e-row') ||
|
|
@@ -89,6 +89,12 @@ var Toolbar = /** @class */ (function () {
|
|
|
89
89
|
this.createToolbar();
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
+
Toolbar.prototype.addReactToolbarPortals = function (args) {
|
|
93
|
+
if (this.parent.isReact && args) {
|
|
94
|
+
this.parent.portals = this.parent.portals.concat(args);
|
|
95
|
+
this.parent.renderTemplates();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
92
98
|
Toolbar.prototype.createToolbar = function () {
|
|
93
99
|
var items = this.getItems();
|
|
94
100
|
this.toolbar = new NavToolbar({
|
|
@@ -98,6 +104,8 @@ var Toolbar = /** @class */ (function () {
|
|
|
98
104
|
height: this.parent.isAdaptive ? 48 : 'auto'
|
|
99
105
|
});
|
|
100
106
|
this.toolbar.isStringTemplate = true;
|
|
107
|
+
this.toolbar.isReact = this.parent.isReact;
|
|
108
|
+
this.toolbar.on('render-react-toolbar-template', this.addReactToolbarPortals, this);
|
|
101
109
|
this.toolbar.appendTo(this.element);
|
|
102
110
|
var cancelItem = this.element.querySelector('#' + this.parent.element.id + '_cancel');
|
|
103
111
|
var updateItem = this.element.querySelector('#' + this.parent.element.id + '_update');
|
|
@@ -514,6 +522,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
514
522
|
if (this.parent.isDestroyed) {
|
|
515
523
|
return;
|
|
516
524
|
}
|
|
525
|
+
this.toolbar.off('render-react-toolbar-template', this.addReactToolbarPortals);
|
|
517
526
|
this.toolbar.destroy();
|
|
518
527
|
if (this.parent.filterModule) {
|
|
519
528
|
this.unWireEvent();
|
|
@@ -110,9 +110,9 @@ var GanttChart = /** @class */ (function () {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
this.parent.criticalPathModule.criticalConnectorLine(
|
|
113
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
114
|
+
if (this.parent.enableCriticalPath && criticalModule && criticalModule.criticalPathCollection) {
|
|
115
|
+
this.parent.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, this.parent.enableCriticalPath, criticalModule.predecessorCollectionTaskIds);
|
|
116
116
|
}
|
|
117
117
|
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
|
|
118
118
|
this.renderOverAllocationContainer();
|
|
@@ -707,8 +707,8 @@ var GanttChart = /** @class */ (function () {
|
|
|
707
707
|
this.parent.updatedConnectorLineCollection = [];
|
|
708
708
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
709
709
|
this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection);
|
|
710
|
-
|
|
711
|
-
|
|
710
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
711
|
+
if (this.parent.enableCriticalPath && criticalModule && criticalModule.criticalPathCollection) {
|
|
712
712
|
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
713
713
|
}
|
|
714
714
|
};
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -827,8 +827,8 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
827
827
|
this.updateRowHeightInConnectorLine(this.updatedConnectorLineCollection);
|
|
828
828
|
this.connectorLineModule.renderConnectorLines(this.updatedConnectorLineCollection);
|
|
829
829
|
}
|
|
830
|
-
|
|
831
|
-
|
|
830
|
+
var criticalModule = this.criticalPathModule;
|
|
831
|
+
if (this.enableCriticalPath && criticalModule && criticalModule.criticalPathCollection) {
|
|
832
832
|
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
833
833
|
}
|
|
834
834
|
}
|
|
@@ -1267,8 +1267,8 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1267
1267
|
document.getElementsByClassName('e-timeline-header-table-container')[i].children[0].children[0].children[j].children[0].setAttribute('tabindex', '-1');
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1270
|
+
var criticalModule = this.criticalPathModule;
|
|
1271
|
+
if (this.enableCriticalPath && criticalModule && criticalModule.criticalPathCollection) {
|
|
1272
1272
|
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
1273
1273
|
}
|
|
1274
1274
|
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
@@ -1371,7 +1371,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1371
1371
|
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
1372
1372
|
this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
|
|
1373
1373
|
var criticalModule = this.criticalPathModule;
|
|
1374
|
-
|
|
1374
|
+
if (criticalModule.criticalPathCollection) {
|
|
1375
|
+
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
1376
|
+
}
|
|
1375
1377
|
}
|
|
1376
1378
|
else {
|
|
1377
1379
|
this.removeCriticalPathStyles();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
1
|
+
import { createElement, isNullOrUndefined, addClass } from '@syncfusion/ej2-base';
|
|
2
2
|
import * as cls from '../base/css-constants';
|
|
3
3
|
import { Splitter as SplitterLayout } from '@syncfusion/ej2-layouts';
|
|
4
4
|
import { Deferred } from '@syncfusion/ej2-data';
|
|
@@ -20,6 +20,7 @@ var Splitter = /** @class */ (function () {
|
|
|
20
20
|
this.parent.splitterElement = createElement('div', { className: cls.splitter });
|
|
21
21
|
this.parent.treeGridPane = createElement('div', { className: cls.treeGridPane });
|
|
22
22
|
this.parent.chartPane = createElement('div', { className: cls.ganttChartPane });
|
|
23
|
+
addClass([this.parent.chartPane], 'e-droppable');
|
|
23
24
|
if (this.parent.enableRtl) {
|
|
24
25
|
this.parent.splitterElement.appendChild(this.parent.chartPane);
|
|
25
26
|
this.parent.splitterElement.appendChild(this.parent.treeGridPane);
|
|
@@ -548,7 +548,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
548
548
|
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
549
549
|
}
|
|
550
550
|
else if (!taskSettings.duration && taskSettings.endDate) {
|
|
551
|
-
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime()
|
|
551
|
+
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() <
|
|
552
552
|
data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
|
|
553
553
|
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
554
554
|
if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
|
|
@@ -1192,38 +1192,59 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1192
1192
|
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 60 * 1000);
|
|
1193
1193
|
}
|
|
1194
1194
|
if (ganttData && ganttData.durationUnit == 'minute') {
|
|
1195
|
-
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 *
|
|
1195
|
+
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 1000);
|
|
1196
1196
|
}
|
|
1197
1197
|
for (var i = 0; i < this.parent.dayWorkingTime.length; i++) {
|
|
1198
1198
|
hour = hour + this.parent.dayWorkingTime[i].to - this.parent.dayWorkingTime[i].from;
|
|
1199
1199
|
}
|
|
1200
1200
|
var dateDiff = modifiedsDate.getTime() - sDate.getTime();
|
|
1201
|
-
if (
|
|
1202
|
-
if (
|
|
1203
|
-
|
|
1201
|
+
if (ganttData && ganttData.durationUnit == 'minute' && ganttData.duration < (hour * 60)) {
|
|
1202
|
+
if (tierMode === 'Day') {
|
|
1203
|
+
if ((Math.floor((dateDiff / (1000 * 60 * 60)) % 24) >= hour || dateDiff === 0)) {
|
|
1204
|
+
isValid = true;
|
|
1205
|
+
}
|
|
1206
|
+
if (this.getSecondsInDecimal(sDate) === this.parent.defaultStartTime && isValid) {
|
|
1207
|
+
sDate.setHours(0, 0, 0, 0);
|
|
1208
|
+
}
|
|
1209
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
|
|
1210
|
+
eDate.setHours(24);
|
|
1211
|
+
}
|
|
1212
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
|
|
1213
|
+
eDate.setHours(0, 0, 0, 0);
|
|
1214
|
+
}
|
|
1204
1215
|
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1216
|
+
else {
|
|
1217
|
+
isValid = true;
|
|
1207
1218
|
}
|
|
1208
|
-
if (
|
|
1209
|
-
|
|
1219
|
+
if ((sDate).getTime() === (eDate).getTime()) {
|
|
1220
|
+
return (this.parent.perDayWidth);
|
|
1210
1221
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1222
|
+
else {
|
|
1223
|
+
if (isValid) {
|
|
1224
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
1225
|
+
}
|
|
1226
|
+
else {
|
|
1227
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * hour)) * this.parent.perDayWidth);
|
|
1228
|
+
}
|
|
1213
1229
|
}
|
|
1214
1230
|
}
|
|
1215
1231
|
else {
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1232
|
+
if (tierMode === 'Day') {
|
|
1233
|
+
if (this.getSecondsInDecimal(sDate) === this.parent.defaultStartTime) {
|
|
1234
|
+
sDate.setHours(0, 0, 0, 0);
|
|
1235
|
+
}
|
|
1236
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
|
|
1237
|
+
eDate.setHours(24);
|
|
1238
|
+
}
|
|
1239
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
|
|
1240
|
+
eDate.setHours(0, 0, 0, 0);
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
if ((sDate).getTime() === (eDate).getTime()) {
|
|
1244
|
+
return (this.parent.perDayWidth);
|
|
1224
1245
|
}
|
|
1225
1246
|
else {
|
|
1226
|
-
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 *
|
|
1247
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
1227
1248
|
}
|
|
1228
1249
|
}
|
|
1229
1250
|
};
|
|
@@ -111,6 +111,9 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
111
111
|
var root = 'root';
|
|
112
112
|
this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
|
|
113
113
|
this.parent.treeGrid.appendTo(this.treeGridElement);
|
|
114
|
+
if (this.parent.treeGrid.grid && this.parent.toolbarModule && this.parent.isReact) {
|
|
115
|
+
this.parent.treeGrid.grid.portals = this.parent.portals;
|
|
116
|
+
}
|
|
114
117
|
this.wireEvents();
|
|
115
118
|
};
|
|
116
119
|
GanttTreeGrid.prototype.composeProperties = function () {
|
|
@@ -552,7 +555,9 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
552
555
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
553
556
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
554
557
|
column.width = column.width ? column.width : 150;
|
|
555
|
-
column.edit
|
|
558
|
+
if (!column.edit || (column.edit && !column.edit.create)) {
|
|
559
|
+
column.edit = { params: { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) } };
|
|
560
|
+
}
|
|
556
561
|
}
|
|
557
562
|
else if (taskSettings.endDate === column.field) {
|
|
558
563
|
if (this.parent.isLocaleChanged && previousColumn) {
|
|
@@ -565,7 +570,9 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
565
570
|
column.editType = column.editType ? column.editType :
|
|
566
571
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
567
572
|
column.width = column.width ? column.width : 150;
|
|
568
|
-
column.edit
|
|
573
|
+
if (!column.edit || (column.edit && !column.edit.create)) {
|
|
574
|
+
column.edit = { params: { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) } };
|
|
575
|
+
}
|
|
569
576
|
}
|
|
570
577
|
else if (taskSettings.duration === column.field) {
|
|
571
578
|
column.width = column.width ? column.width : 150;
|
|
@@ -834,7 +834,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
834
834
|
if (this.taskLabelTemplateFunction) {
|
|
835
835
|
var parentTaskLabelNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressBarInnerDiv[0]);
|
|
836
836
|
if (parentTaskLabelNode && parentTaskLabelNode.length > 0) {
|
|
837
|
-
|
|
837
|
+
append(parentTaskLabelNode, div);
|
|
838
838
|
labelString = div.innerHTML;
|
|
839
839
|
}
|
|
840
840
|
}
|
|
@@ -1423,7 +1423,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1423
1423
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
1424
1424
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
1425
1425
|
taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
1426
|
-
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.
|
|
1426
|
+
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.getTime() === this.templateData.ganttProperties.endDate.getTime())) &&
|
|
1427
1427
|
this.templateData.ganttProperties.isMilestone))
|
|
1428
1428
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
1429
1429
|
}
|
|
@@ -1436,7 +1436,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1436
1436
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
1437
1437
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
1438
1438
|
taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
1439
|
-
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.
|
|
1439
|
+
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.getTime() === this.templateData.ganttProperties.endDate.getTime())) &&
|
|
1440
1440
|
this.templateData.ganttProperties.isMilestone))
|
|
1441
1441
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
1442
1442
|
}
|
|
@@ -1484,7 +1484,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1484
1484
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
1485
1485
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
1486
1486
|
taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
1487
|
-
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.
|
|
1487
|
+
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.getTime() === this.templateData.ganttProperties.endDate.getTime())) &&
|
|
1488
1488
|
this.templateData.ganttProperties.isMilestone))
|
|
1489
1489
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
1490
1490
|
}
|
|
@@ -96,6 +96,9 @@ var Timeline = /** @class */ (function () {
|
|
|
96
96
|
*/
|
|
97
97
|
Timeline.prototype.processZooming = function (isZoomIn) {
|
|
98
98
|
this.isZoomToFit = false;
|
|
99
|
+
if (!this.parent['isProjectDateUpdated']) {
|
|
100
|
+
this.parent.dateValidationModule.calculateProjectDates();
|
|
101
|
+
}
|
|
99
102
|
if (!isNullOrUndefined(this.parent.zoomingProjectStartDate)) {
|
|
100
103
|
this.parent.cloneProjectStartDate = this.parent.cloneProjectStartDate.getTime() < this.parent.zoomingProjectStartDate.getTime()
|
|
101
104
|
? this.parent.cloneProjectStartDate : this.parent.zoomingProjectStartDate;
|
|
@@ -214,10 +217,10 @@ var Timeline = /** @class */ (function () {
|
|
|
214
217
|
this.parent.zoomingProjectStartDate = this.parent.cloneProjectStartDate;
|
|
215
218
|
this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
|
|
216
219
|
}
|
|
217
|
-
this.parent.dataOperation.calculateProjectDates();
|
|
218
220
|
if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
|
|
219
221
|
this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
|
|
220
222
|
}
|
|
223
|
+
this.parent.dataOperation.calculateProjectDates();
|
|
221
224
|
var timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
|
|
222
225
|
var totalDays = (timeDifference / (1000 * 3600 * 24));
|
|
223
226
|
var chartWidth = this.parent.ganttChartModule.chartElement.offsetWidth;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Tooltip as TooltipComponent } from '@syncfusion/ej2-popups';
|
|
2
2
|
import { parentsUntil } from '../base/utils';
|
|
3
3
|
import * as cls from '../base/css-constants';
|
|
4
|
-
import { extend, isNullOrUndefined, getValue, EventHandler, closest, SanitizeHtmlHelper, initializeCSPTemplate } from '@syncfusion/ej2-base';
|
|
4
|
+
import { extend, isNullOrUndefined, getValue, EventHandler, closest, SanitizeHtmlHelper, initializeCSPTemplate, append } from '@syncfusion/ej2-base';
|
|
5
5
|
import { Deferred } from '@syncfusion/ej2-data';
|
|
6
6
|
/**
|
|
7
7
|
* File for handling tooltip in Gantt.
|
|
@@ -84,7 +84,11 @@ var Tooltip = /** @class */ (function () {
|
|
|
84
84
|
if (parent.tooltipSettings.taskbar) {
|
|
85
85
|
taskbarTemplateNode = parent.tooltipModule.templateCompiler(parent.tooltipSettings.taskbar, parent, data, 'TooltipTaskbarTemplate');
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
var tooltipTemplate = document.createElement('div');
|
|
88
|
+
if (taskbarTemplateNode) {
|
|
89
|
+
append(taskbarTemplateNode, tooltipTemplate);
|
|
90
|
+
}
|
|
91
|
+
argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate :
|
|
88
92
|
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args);
|
|
89
93
|
}
|
|
90
94
|
else if (args.target.classList.contains('e-baseline-bar') ||
|
|
@@ -93,7 +97,11 @@ var Tooltip = /** @class */ (function () {
|
|
|
93
97
|
if ((parent.tooltipSettings.baseline)) {
|
|
94
98
|
baseLineTemplateNode = parent.tooltipModule.templateCompiler(parent.tooltipSettings.baseline, parent, data, 'TooltipBaselineTemplate');
|
|
95
99
|
}
|
|
96
|
-
|
|
100
|
+
var baselineTemplate = document.createElement('div');
|
|
101
|
+
if (baseLineTemplateNode) {
|
|
102
|
+
append(baseLineTemplateNode, baselineTemplate);
|
|
103
|
+
}
|
|
104
|
+
argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate :
|
|
97
105
|
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args);
|
|
98
106
|
}
|
|
99
107
|
else if (args.target.classList.contains('e-event-markers')) {
|
|
@@ -115,21 +115,26 @@
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon {
|
|
118
|
-
margin:
|
|
119
|
-
min-height:
|
|
120
|
-
min-width:
|
|
121
|
-
padding: 6px;
|
|
118
|
+
margin: 0 6px;
|
|
119
|
+
min-height: 30px;
|
|
120
|
+
min-width: 30px;
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
.e-bigger .e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon,
|
|
125
124
|
.e-bigger.e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon {
|
|
126
|
-
min-height:
|
|
127
|
-
min-width:
|
|
125
|
+
min-height: 38px;
|
|
126
|
+
min-width: 38px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon,
|
|
130
|
+
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon {
|
|
131
|
+
min-height: 22px;
|
|
132
|
+
min-width: 22px;
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
.e-bigger .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-filter,
|
|
131
136
|
.e-bigger.e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-filter {
|
|
132
|
-
padding:
|
|
137
|
+
padding: 4px 16px 4px 0;
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
.e-input-group.e-ddl,
|
|
@@ -149,7 +154,7 @@
|
|
|
149
154
|
.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus.e-small .e-clear-icon,
|
|
150
155
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus .e-clear-icon,
|
|
151
156
|
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus .e-clear-icon {
|
|
152
|
-
margin:
|
|
157
|
+
margin: 4px;
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group .e-input-filter,
|
|
@@ -158,7 +163,7 @@
|
|
|
158
163
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group.e-input-focus .e-input-filter,
|
|
159
164
|
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group.e-input-focus .e-input-filter,
|
|
160
165
|
.e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group.e-small.e-input-focus .e-input-filter {
|
|
161
|
-
padding:
|
|
166
|
+
padding: 4px 5px 4px 12px;
|
|
162
167
|
}
|
|
163
168
|
|
|
164
169
|
.e-bigger.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon,
|
|
@@ -168,8 +173,8 @@
|
|
|
168
173
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-bigger .e-clear-icon,
|
|
169
174
|
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-bigger .e-clear-icon,
|
|
170
175
|
.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-bigger.e-small .e-clear-icon {
|
|
171
|
-
min-height:
|
|
172
|
-
min-width:
|
|
176
|
+
min-height: 34px;
|
|
177
|
+
min-width: 34px;
|
|
173
178
|
}
|
|
174
179
|
|
|
175
180
|
.e-bigger.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group .e-input-filter,
|
|
@@ -182,6 +187,10 @@
|
|
|
182
187
|
padding: 8px 16px;
|
|
183
188
|
}
|
|
184
189
|
|
|
190
|
+
.e-bigger.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus .e-clear-icon {
|
|
191
|
+
margin: 0 4px;
|
|
192
|
+
}
|
|
193
|
+
|
|
185
194
|
.e-ddl.e-popup.e-outline .e-filter-parent {
|
|
186
195
|
padding: 4px 8px;
|
|
187
196
|
}
|
|
@@ -171,21 +171,26 @@
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
.e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon {
|
|
174
|
-
margin:
|
|
175
|
-
min-height:
|
|
176
|
-
min-width:
|
|
177
|
-
padding: 6px;
|
|
174
|
+
margin: 0 6px;
|
|
175
|
+
min-height: 30px;
|
|
176
|
+
min-width: 30px;
|
|
178
177
|
}
|
|
179
178
|
|
|
180
179
|
.e-bigger .e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon,
|
|
181
180
|
.e-bigger.e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon {
|
|
182
|
-
min-height:
|
|
183
|
-
min-width:
|
|
181
|
+
min-height: 38px;
|
|
182
|
+
min-width: 38px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon,
|
|
186
|
+
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon {
|
|
187
|
+
min-height: 22px;
|
|
188
|
+
min-width: 22px;
|
|
184
189
|
}
|
|
185
190
|
|
|
186
191
|
.e-bigger .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-filter,
|
|
187
192
|
.e-bigger.e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-filter {
|
|
188
|
-
padding:
|
|
193
|
+
padding: 4px 16px 4px 0;
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
.e-input-group.e-ddl,
|
|
@@ -205,7 +210,7 @@
|
|
|
205
210
|
.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus.e-small .e-clear-icon,
|
|
206
211
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus .e-clear-icon,
|
|
207
212
|
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus .e-clear-icon {
|
|
208
|
-
margin:
|
|
213
|
+
margin: 4px;
|
|
209
214
|
}
|
|
210
215
|
|
|
211
216
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group .e-input-filter,
|
|
@@ -214,7 +219,7 @@
|
|
|
214
219
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group.e-input-focus .e-input-filter,
|
|
215
220
|
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group.e-input-focus .e-input-filter,
|
|
216
221
|
.e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group.e-small.e-input-focus .e-input-filter {
|
|
217
|
-
padding:
|
|
222
|
+
padding: 4px 5px 4px 12px;
|
|
218
223
|
}
|
|
219
224
|
|
|
220
225
|
.e-bigger.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group .e-clear-icon,
|
|
@@ -224,8 +229,8 @@
|
|
|
224
229
|
.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-bigger .e-clear-icon,
|
|
225
230
|
.e-small.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-bigger .e-clear-icon,
|
|
226
231
|
.e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-bigger.e-small .e-clear-icon {
|
|
227
|
-
min-height:
|
|
228
|
-
min-width:
|
|
232
|
+
min-height: 34px;
|
|
233
|
+
min-width: 34px;
|
|
229
234
|
}
|
|
230
235
|
|
|
231
236
|
.e-bigger.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-filter-parent .e-input-group .e-input-filter,
|
|
@@ -238,6 +243,10 @@
|
|
|
238
243
|
padding: 8px 16px;
|
|
239
244
|
}
|
|
240
245
|
|
|
246
|
+
.e-bigger.e-small .e-popup.e-ddl:not(.e-ddl-device) .e-input-group.e-input-focus .e-clear-icon {
|
|
247
|
+
margin: 0 4px;
|
|
248
|
+
}
|
|
249
|
+
|
|
241
250
|
.e-ddl.e-popup.e-outline .e-filter-parent {
|
|
242
251
|
padding: 4px 8px;
|
|
243
252
|
}
|