@syncfusion/ej2-gantt 22.2.5 → 22.2.7
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 +17 -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 +216 -174
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +216 -174
- 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 +10 -10
- package/src/gantt/actions/critical-path.js +14 -3
- package/src/gantt/actions/edit.js +5 -2
- package/src/gantt/actions/taskbar-edit.js +10 -1
- package/src/gantt/base/gantt-chart.js +3 -0
- package/src/gantt/base/interface.d.ts +0 -2
- package/src/gantt/base/task-processor.js +1 -0
- package/src/gantt/base/tree-grid.js +20 -4
- package/src/gantt/renderer/chart-rows.js +13 -6
- package/src/gantt/renderer/connector-line.d.ts +0 -2
- package/src/gantt/renderer/connector-line.js +130 -153
- package/src/gantt/renderer/timeline.js +1 -2
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/gantt/_layout.scss +1 -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 +1 -1
- package/styles/gantt/bootstrap5.css +1 -1
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/fabric.css +1 -1
- package/styles/gantt/fluent-dark.css +1 -1
- package/styles/gantt/fluent.css +1 -1
- package/styles/gantt/highcontrast-light.css +1 -1
- package/styles/gantt/highcontrast.css +1 -1
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/material.css +1 -1
- package/styles/gantt/material3-dark.css +1 -1
- package/styles/gantt/material3.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- 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/material3-dark.css +1 -1
- package/styles/material3.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 : 22.2.
|
|
3
|
+
* version : 22.2.7
|
|
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@22.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@22.2.5",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-UDwacL/LfLOpFmKDI1ZYpjmlQyZtiKw/Nl11Nm7qIyi2ujoFpfwtx6Ba0e9JdEDR3If8g24FolNt5LRLzO04lQ==",
|
|
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-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.2.5.tgz",
|
|
27
|
+
"_shasum": "95538b88216a3ffdfc5d9ee6cbb720c39e7a50e0",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"@syncfusion/ej2-calendars": "~22.2.5",
|
|
41
41
|
"@syncfusion/ej2-data": "~22.2.5",
|
|
42
42
|
"@syncfusion/ej2-dropdowns": "~22.2.5",
|
|
43
|
-
"@syncfusion/ej2-grids": "~22.2.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~22.2.
|
|
43
|
+
"@syncfusion/ej2-grids": "~22.2.7",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~22.2.7",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~22.2.5",
|
|
46
46
|
"@syncfusion/ej2-lists": "~22.2.5",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~22.2.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~22.2.7",
|
|
48
48
|
"@syncfusion/ej2-notifications": "~22.2.5",
|
|
49
|
-
"@syncfusion/ej2-popups": "~22.2.
|
|
49
|
+
"@syncfusion/ej2-popups": "~22.2.7",
|
|
50
50
|
"@syncfusion/ej2-richtexteditor": "~22.2.5",
|
|
51
51
|
"@syncfusion/ej2-svg-base": "~22.2.5",
|
|
52
|
-
"@syncfusion/ej2-treegrid": "~22.2.
|
|
52
|
+
"@syncfusion/ej2-treegrid": "~22.2.7"
|
|
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.2.
|
|
77
|
+
"version": "22.2.7",
|
|
78
78
|
"sideEffects": false
|
|
79
79
|
}
|
|
@@ -619,7 +619,7 @@ var CriticalPath = /** @class */ (function () {
|
|
|
619
619
|
}
|
|
620
620
|
var predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
621
621
|
var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
622
|
-
for (var i =
|
|
622
|
+
for (var i = predecessorLength.length - 1; i >= 0; i--) {
|
|
623
623
|
var toID = void 0;
|
|
624
624
|
if (this.parent.viewType === 'ProjectView') {
|
|
625
625
|
toID = this.parent.ids.indexOf(predecessorLength[i].to);
|
|
@@ -630,8 +630,19 @@ var CriticalPath = /** @class */ (function () {
|
|
|
630
630
|
var dateDifference = void 0;
|
|
631
631
|
var currentData = flatRecords[index].ganttProperties;
|
|
632
632
|
if (predecessorLength[i].type === 'FS') {
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
if (predecessorLength[i].to != currentData.taskId.toString() || this.parent.viewType === 'ResourceView') {
|
|
634
|
+
/* eslint-disable-next-line */
|
|
635
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
toID = this.parent.ids.indexOf(predecessorLength[i].from);
|
|
639
|
+
/* eslint-disable-next-line */
|
|
640
|
+
dateDifference = this.parent.dataOperation.getDuration(flatRecords[toID].ganttProperties.endDate, currentData.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
641
|
+
if (dateDifference === 0 && index !== toID && flatRecords[index].slack == noSlackValue) {
|
|
642
|
+
flatRecords[toID].slack = flatRecords[index].slack;
|
|
643
|
+
flatRecords[toID].ganttProperties.slack = flatRecords[index].slack;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
635
646
|
if (dateDifference === 0 && index !== toID && flatRecords[index].slack !== noSlackValue) {
|
|
636
647
|
flatRecords[index].slack = flatRecords[toID].slack;
|
|
637
648
|
flatRecords[index].ganttProperties.slack = flatRecords[toID].slack;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isNullOrUndefined, isUndefined, extend, setValue, getValue, deleteObject, createElement } from '@syncfusion/ej2-base';
|
|
2
|
-
import { DataManager, Query, ODataAdaptor, WebApiAdaptor } from '@syncfusion/ej2-data';
|
|
2
|
+
import { DataManager, Query, ODataAdaptor, WebApiAdaptor, ODataV4Adaptor } from '@syncfusion/ej2-data';
|
|
3
3
|
import { getUid } from '@syncfusion/ej2-grids';
|
|
4
4
|
import { getSwapKey, isScheduledTask, getTaskData, isRemoteData, getIndex, isCountRequired, updateDates } from '../base/utils';
|
|
5
5
|
import { CellEdit } from './cell-edit';
|
|
@@ -2926,7 +2926,7 @@ var Edit = /** @class */ (function () {
|
|
|
2926
2926
|
/* tslint:disable-next-line */
|
|
2927
2927
|
var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
2928
2928
|
var adaptor = data_2.adaptor;
|
|
2929
|
-
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_2.dataSource.batchUrl) {
|
|
2929
|
+
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor && adaptor instanceof ODataV4Adaptor) || data_2.dataSource.batchUrl) {
|
|
2930
2930
|
/* tslint:disable-next-line */
|
|
2931
2931
|
var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
|
|
2932
2932
|
crud.then(function (e) {
|
|
@@ -3061,6 +3061,9 @@ var Edit = /** @class */ (function () {
|
|
|
3061
3061
|
else if (ganttColumns[i].field === 'taskType') {
|
|
3062
3062
|
tempRecord[fieldName] = this.parent.taskType;
|
|
3063
3063
|
}
|
|
3064
|
+
else if (ganttColumns[i].field === taskSettingsFields.milestone) {
|
|
3065
|
+
tempRecord[fieldName] = null;
|
|
3066
|
+
}
|
|
3064
3067
|
else {
|
|
3065
3068
|
tempRecord[this.parent.ganttColumns[i].field] = '';
|
|
3066
3069
|
}
|
|
@@ -1110,7 +1110,16 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
else {
|
|
1112
1112
|
if (this.mouseMoveX < (item.left + segment.left)) {
|
|
1113
|
-
|
|
1113
|
+
var segmentWidth = (this.parent.timelineModule.isSingleTier &&
|
|
1114
|
+
(this.parent.timelineModule.customTimelineSettings.bottomTier.unit === "Hour" ||
|
|
1115
|
+
this.parent.timelineModule.customTimelineSettings.topTier.unit === "Hour" ||
|
|
1116
|
+
this.parent.timelineModule.customTimelineSettings.bottomTier.unit === "Minutes" ||
|
|
1117
|
+
this.parent.timelineModule.customTimelineSettings.topTier.unit === "Minutes")) ||
|
|
1118
|
+
(this.parent.timelineModule.customTimelineSettings.bottomTier.unit === "Hour" ||
|
|
1119
|
+
this.parent.timelineModule.customTimelineSettings.bottomTier.unit === "Minutes") ?
|
|
1120
|
+
this.parent.timelineModule.customTimelineSettings.timelineUnitSize :
|
|
1121
|
+
this.parent.perDayWidth;
|
|
1122
|
+
segment.width = segmentWidth;
|
|
1114
1123
|
}
|
|
1115
1124
|
}
|
|
1116
1125
|
}
|
|
@@ -120,6 +120,9 @@ var GanttChart = /** @class */ (function () {
|
|
|
120
120
|
}
|
|
121
121
|
this.updateWidthAndHeight();
|
|
122
122
|
this.parent.notify('selectRowByIndex', {});
|
|
123
|
+
if (this.parent.timelineModule.isZoomToFit) {
|
|
124
|
+
this.parent.timelineModule.processZoomToFit();
|
|
125
|
+
}
|
|
123
126
|
};
|
|
124
127
|
/**
|
|
125
128
|
* @param {IGanttData[]} records .
|
|
@@ -401,8 +401,6 @@ export interface IConnectorLineObject {
|
|
|
401
401
|
isCritical?: boolean;
|
|
402
402
|
parentEndPoint?: number;
|
|
403
403
|
childEndPoint?: number;
|
|
404
|
-
isManualChild?: boolean;
|
|
405
|
-
isManualParent?: boolean;
|
|
406
404
|
}
|
|
407
405
|
export interface ISplitterResizedEventArgs {
|
|
408
406
|
/** Defines the element. */
|
|
@@ -2430,6 +2430,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2430
2430
|
this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
|
|
2431
2431
|
this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
|
|
2432
2432
|
this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
|
|
2433
|
+
this.parent.setRecordValue('autoDuration', parentProp.duration, parentProp, true);
|
|
2433
2434
|
if (!parentProp.isAutoSchedule) {
|
|
2434
2435
|
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
2435
2436
|
this.updateAutoWidthLeft(parentData);
|
|
@@ -620,8 +620,16 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
620
620
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
621
621
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
622
622
|
column.width = column.width ? column.width : 150;
|
|
623
|
-
if (
|
|
624
|
-
column.edit =
|
|
623
|
+
if (column.edit && column.edit.params) {
|
|
624
|
+
column.edit.params['renderDayCell'] = this.parent.renderWorkingDayCell.bind(this.parent);
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
if (column.edit) {
|
|
628
|
+
column.edit.params = { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) };
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
column.edit = { params: { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) } };
|
|
632
|
+
}
|
|
625
633
|
}
|
|
626
634
|
}
|
|
627
635
|
else if (taskSettings.endDate === column.field) {
|
|
@@ -635,8 +643,16 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
635
643
|
column.editType = column.editType ? column.editType :
|
|
636
644
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
637
645
|
column.width = column.width ? column.width : 150;
|
|
638
|
-
if (
|
|
639
|
-
column.edit =
|
|
646
|
+
if (column.edit && column.edit.params) {
|
|
647
|
+
column.edit.params['renderDayCell'] = this.parent.renderWorkingDayCell.bind(this.parent);
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
if (column.edit) {
|
|
651
|
+
column.edit.params = { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) };
|
|
652
|
+
}
|
|
653
|
+
else {
|
|
654
|
+
column.edit = { params: { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) } };
|
|
655
|
+
}
|
|
640
656
|
}
|
|
641
657
|
}
|
|
642
658
|
else if (taskSettings.duration === column.field) {
|
|
@@ -256,7 +256,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
256
256
|
childTaskbarNode = this.createDivElement(template);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
if (this.parent.enableRtl && childTaskbarNode[0] && childTaskbarNode[0].querySelector('.e-task-label')) {
|
|
259
|
+
if (this.parent.enableRtl && !isNullOrUndefined(childTaskbarNode) && childTaskbarNode[0] && childTaskbarNode[0].querySelector('.e-task-label')) {
|
|
260
260
|
childTaskbarNode[0].querySelector('.e-task-label').style.marginLeft = '15px';
|
|
261
261
|
childTaskbarNode[0].querySelector('.e-task-label').style.marginRight = '8px';
|
|
262
262
|
if (childTaskbarNode[0].querySelector('.e-gantt-child-progressbar')) {
|
|
@@ -638,8 +638,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
638
638
|
milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
639
639
|
}
|
|
640
640
|
else {
|
|
641
|
-
var template = '<div class="' + cls.traceMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight
|
|
642
|
-
((this.parent.renderBaseline ? this.taskBarHeight
|
|
641
|
+
var template = '<div class="' + cls.traceMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;height:' +
|
|
642
|
+
((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);top:' + (this.parent.rowHeight > 40 ? 0 : 1) + 'px;left:' + 1 + 'px;"> </div>';
|
|
643
643
|
milestoneNode = this.createDivElement(template);
|
|
644
644
|
}
|
|
645
645
|
return milestoneNode;
|
|
@@ -667,9 +667,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
667
667
|
ChartRows.prototype.getMilestoneBaselineNode = function () {
|
|
668
668
|
var data = this.templateData;
|
|
669
669
|
var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
|
|
670
|
-
var template = '<div class="' + cls.baselineMilestoneContainer + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight
|
|
671
|
-
((this.parent.renderBaseline ? this.taskBarHeight
|
|
672
|
-
(this.milestoneHeight / 2) + 3) : (data.ganttProperties.
|
|
670
|
+
var template = '<div class="' + cls.baselineMilestoneContainer + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 10)) + 'px;height:' +
|
|
671
|
+
((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 10)) + 'px;position:absolute;transform:rotate(45deg);' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.parent.enableRtl ? (data.ganttProperties.left -
|
|
672
|
+
(this.milestoneHeight / 2) + 3) : (data.ganttProperties.left - (this.milestoneHeight / 2) + 1)) + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + 'margin-top:' + ((-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) + 2) + 'px"> </div>';
|
|
673
673
|
return this.createDivElement(template);
|
|
674
674
|
};
|
|
675
675
|
/**
|
|
@@ -1355,6 +1355,12 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1355
1355
|
(_a = this.ganttChartTableBody).replaceChildren.apply(_a, dupChartBody.childNodes);
|
|
1356
1356
|
this.parent.initialChartRowElements = this.parent.ganttChartModule.getChartRows();
|
|
1357
1357
|
}
|
|
1358
|
+
if (this.parent.enableCriticalPath && this.parent.criticalPathModule) {
|
|
1359
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
1360
|
+
if (criticalModule.criticalPathCollection) {
|
|
1361
|
+
this.parent.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1358
1364
|
this.parent.renderTemplates();
|
|
1359
1365
|
this.triggerQueryTaskbarInfo();
|
|
1360
1366
|
this.parent.modifiedRecords = [];
|
|
@@ -1369,6 +1375,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1369
1375
|
}
|
|
1370
1376
|
}
|
|
1371
1377
|
}
|
|
1378
|
+
this.parent.isGanttChartRendered = true;
|
|
1372
1379
|
this.parent.renderTemplates();
|
|
1373
1380
|
};
|
|
1374
1381
|
/**
|