@syncfusion/ej2-gantt 22.2.9 → 22.2.11
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 +19 -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 +80 -27
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +80 -27
- 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 +13 -13
- package/src/gantt/actions/critical-path.js +59 -18
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +1 -1
- package/src/gantt/actions/filter.js +6 -1
- package/src/gantt/actions/keyboard.js +1 -1
- package/src/gantt/base/gantt.js +5 -2
- package/src/gantt/base/splitter.js +4 -0
- package/src/gantt/base/task-processor.js +3 -3
- package/styles/gantt/material.css +1 -1
- package/styles/material.css +1 -1
|
@@ -2026,9 +2026,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2026
2026
|
}
|
|
2027
2027
|
else {
|
|
2028
2028
|
var uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
|
|
2029
|
-
if (this.parent.viewType === 'ResourceView' && typeof
|
|
2030
|
-
|
|
2031
|
-
}
|
|
2029
|
+
// if (this.parent.viewType === 'ResourceView' && typeof(ganttData.ganttProperties.taskId) === "string") {
|
|
2030
|
+
// uniqueId = ganttProperties.taskId.toString();
|
|
2031
|
+
// }
|
|
2032
2032
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
|
|
2033
2033
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
|
|
2034
2034
|
this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
|
|
@@ -13169,8 +13169,12 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
13169
13169
|
},
|
|
13170
13170
|
resizing: function (args) {
|
|
13171
13171
|
_this.parent.trigger('splitterResizing', args);
|
|
13172
|
+
if (_this.parent.timelineModule.isZoomToFit) {
|
|
13173
|
+
_this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
|
|
13174
|
+
}
|
|
13172
13175
|
},
|
|
13173
13176
|
resizeStop: function (args) {
|
|
13177
|
+
_this.parent['calculateDimensions']();
|
|
13174
13178
|
var leftPane = args.pane[0];
|
|
13175
13179
|
_this.splitterPreviousPositionGrid = leftPane.scrollWidth + 1 + 'px';
|
|
13176
13180
|
_this.splitterObject.paneSettings[0].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionGrid);
|
|
@@ -13978,7 +13982,7 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
13978
13982
|
}
|
|
13979
13983
|
else if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
13980
13984
|
e.preventDefault();
|
|
13981
|
-
ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition);
|
|
13985
|
+
ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition, this.parent.selectedRowIndex);
|
|
13982
13986
|
var focussedElement = ganttObj.element;
|
|
13983
13987
|
focussedElement.focus();
|
|
13984
13988
|
}
|
|
@@ -14951,6 +14955,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14951
14955
|
this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
|
|
14952
14956
|
this.splitterModule.splitterObject.paneSettings[0].size = this.splitterModule['getSpliterPositionInPercentage'](this.splitterModule.splitterPreviousPositionGrid);
|
|
14953
14957
|
this.splitterModule.splitterObject.paneSettings[1].size = this.splitterModule.splitterPreviousPositionChart;
|
|
14958
|
+
if (this.timelineModule.isZoomToFit) {
|
|
14959
|
+
this.timelineModule.processZoomToFit();
|
|
14960
|
+
}
|
|
14954
14961
|
}
|
|
14955
14962
|
};
|
|
14956
14963
|
Gantt.prototype.keyActionHandler = function (e) {
|
|
@@ -17372,8 +17379,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
17372
17379
|
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
17373
17380
|
data[taskfields.dependency] = null;
|
|
17374
17381
|
}
|
|
17375
|
-
var position =
|
|
17376
|
-
this.addRecord(data, position);
|
|
17382
|
+
var position = this.editSettings.newRowPosition;
|
|
17383
|
+
this.addRecord(data, position, this.selectedRowIndex);
|
|
17377
17384
|
}
|
|
17378
17385
|
else {
|
|
17379
17386
|
if (!rowData.hasChildRecords && !rowData.ganttProperties.isMilestone) {
|
|
@@ -23083,7 +23090,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
23083
23090
|
}
|
|
23084
23091
|
}
|
|
23085
23092
|
else {
|
|
23086
|
-
this.parent.editModule.addRecord(this.addedRecord, this.parent.editSettings.newRowPosition);
|
|
23093
|
+
this.parent.editModule.addRecord(this.addedRecord, this.parent.editSettings.newRowPosition, this.parent.selectedRowIndex);
|
|
23087
23094
|
}
|
|
23088
23095
|
}
|
|
23089
23096
|
return true;
|
|
@@ -25631,7 +25638,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25631
25638
|
this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
|
|
25632
25639
|
}
|
|
25633
25640
|
if (this.parent.viewType === 'ResourceView') {
|
|
25634
|
-
if (args.action === 'TaskbarEditing') {
|
|
25641
|
+
if (args.action === 'TaskbarEditing' || args.action === 'DrawConnectorLine') {
|
|
25635
25642
|
this.updateSharedTask(args.data);
|
|
25636
25643
|
}
|
|
25637
25644
|
else if (args.action === 'DialogEditing' || args.action === 'CellEditing' || args.action === 'methodUpdate') {
|
|
@@ -28517,8 +28524,13 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
28517
28524
|
break;
|
|
28518
28525
|
}
|
|
28519
28526
|
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
28527
|
+
if (parentNode.parentNode instanceof HTMLDocument) {
|
|
28528
|
+
break;
|
|
28529
|
+
}
|
|
28520
28530
|
parentNode = parentNode.parentNode;
|
|
28521
|
-
|
|
28531
|
+
if (parentNode.parentNode && parentNode.parentNode.style) {
|
|
28532
|
+
marginTop = parentNode.parentNode.style.marginTop;
|
|
28533
|
+
}
|
|
28522
28534
|
}
|
|
28523
28535
|
parentNodeTop = parentNode.getBoundingClientRect().top;
|
|
28524
28536
|
}
|
|
@@ -30761,14 +30773,68 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30761
30773
|
var criticalPathIds = [];
|
|
30762
30774
|
var index;
|
|
30763
30775
|
var predecessorFrom;
|
|
30764
|
-
|
|
30776
|
+
var slackindexes = [];
|
|
30777
|
+
var indexes = [];
|
|
30778
|
+
for (var z = flatRecords.length - 1; z >= 0; z--) {
|
|
30779
|
+
if (flatRecords[parseInt(z.toString(), 10)].slack === '0 day') {
|
|
30780
|
+
var index1 = flatRecords[parseInt(z.toString(), 10)].index;
|
|
30781
|
+
slackindexes.push(index1);
|
|
30782
|
+
}
|
|
30783
|
+
}
|
|
30784
|
+
var num = 0;
|
|
30785
|
+
indexes.push(slackindexes[parseInt(num.toString(), 10)]);
|
|
30786
|
+
for (var j = 0; j < indexes.length; j++) {
|
|
30787
|
+
var i = flatRecords[indexes[parseInt(j.toString(), 10)]].ganttProperties.predecessor;
|
|
30788
|
+
if (!isNullOrUndefined(i)) {
|
|
30789
|
+
for (var f = i.length - 1; f >= 0; f--) {
|
|
30790
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30791
|
+
var q = modelRecordIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30792
|
+
for (var k = 0; k < indexes.length; k++) {
|
|
30793
|
+
var item = indexes[parseInt(j.toString(), 10)];
|
|
30794
|
+
if (item !== q) {
|
|
30795
|
+
indexes.push(q);
|
|
30796
|
+
}
|
|
30797
|
+
break;
|
|
30798
|
+
}
|
|
30799
|
+
}
|
|
30800
|
+
else {
|
|
30801
|
+
var q = this.resourceCollectionIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30802
|
+
for (var k = 0; k < indexes.length; k++) {
|
|
30803
|
+
var item = indexes[parseInt(j.toString(), 10)];
|
|
30804
|
+
if (item !== q) {
|
|
30805
|
+
indexes.push(q);
|
|
30806
|
+
}
|
|
30807
|
+
break;
|
|
30808
|
+
}
|
|
30809
|
+
}
|
|
30810
|
+
}
|
|
30811
|
+
}
|
|
30812
|
+
}
|
|
30813
|
+
for (var x = 0; x < indexes.length; x++) {
|
|
30765
30814
|
if (this.parent.viewType === 'ProjectView') {
|
|
30766
|
-
index = modelRecordIds.indexOf(
|
|
30815
|
+
index = modelRecordIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['ganttProperties']['taskId'].toString());
|
|
30767
30816
|
}
|
|
30768
30817
|
else {
|
|
30769
|
-
index = this.resourceCollectionIds.indexOf(
|
|
30818
|
+
index = this.resourceCollectionIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['TaskID'].toString());
|
|
30770
30819
|
}
|
|
30771
30820
|
var predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
30821
|
+
if (isNullOrUndefined(predecessorLength)) {
|
|
30822
|
+
if (taskBeyondEnddate.length > 0) {
|
|
30823
|
+
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30824
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30825
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30826
|
+
}
|
|
30827
|
+
else {
|
|
30828
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30829
|
+
}
|
|
30830
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30831
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
30832
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30833
|
+
}
|
|
30834
|
+
}
|
|
30835
|
+
}
|
|
30836
|
+
break;
|
|
30837
|
+
}
|
|
30772
30838
|
var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
30773
30839
|
for (var i = predecessorLength.length - 1; i >= 0; i--) {
|
|
30774
30840
|
var toID = void 0;
|
|
@@ -30832,21 +30898,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30832
30898
|
flatRecords[index].isCritical = true;
|
|
30833
30899
|
flatRecords[index].ganttProperties.isCritical = true;
|
|
30834
30900
|
this.criticalTasks.push(flatRecords[index]);
|
|
30835
|
-
|
|
30836
|
-
|
|
30837
|
-
}
|
|
30838
|
-
}
|
|
30839
|
-
if (taskBeyondEnddate.length > 0) {
|
|
30840
|
-
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30841
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30842
|
-
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30843
|
-
}
|
|
30844
|
-
else {
|
|
30845
|
-
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30846
|
-
}
|
|
30847
|
-
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30848
|
-
this.criticalTasks.push(flatRecords[index]);
|
|
30849
|
-
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30901
|
+
var num_1 = flatRecords[parseInt(index.toString(), 10)]['ganttProperties']['taskId'];
|
|
30902
|
+
criticalPathIds.push(num_1);
|
|
30850
30903
|
}
|
|
30851
30904
|
}
|
|
30852
30905
|
}
|