@syncfusion/ej2-gantt 19.4.52 → 19.4.55
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 +27 -0
- package/README.md +1 -1
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +66 -23
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +66 -23
- 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/cell-edit.js +2 -1
- package/src/gantt/actions/rowdragdrop.js +7 -1
- package/src/gantt/actions/selection.js +3 -1
- package/src/gantt/base/date-processor.js +2 -1
- package/src/gantt/renderer/chart-rows.js +51 -18
- package/src/gantt/renderer/timeline.js +1 -1
|
@@ -479,7 +479,8 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
479
479
|
DateProcessor.prototype.calculateDuration = function (ganttData) {
|
|
480
480
|
var ganttProperties = ganttData.ganttProperties;
|
|
481
481
|
var tDuration;
|
|
482
|
-
if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0
|
|
482
|
+
if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0 &&
|
|
483
|
+
!isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
|
|
483
484
|
tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
|
|
484
485
|
}
|
|
485
486
|
else {
|
|
@@ -6585,7 +6586,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6585
6586
|
var validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
|
|
6586
6587
|
var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
6587
6588
|
var isChanged = void 0;
|
|
6588
|
-
if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft
|
|
6589
|
+
if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
6589
6590
|
isChanged = 'prevTimeSpan';
|
|
6590
6591
|
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
6591
6592
|
}
|
|
@@ -8333,7 +8334,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8333
8334
|
var childTaskbarNode = null;
|
|
8334
8335
|
var data = this.templateData;
|
|
8335
8336
|
if (this.childTaskbarTemplateFunction) {
|
|
8336
|
-
childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0]);
|
|
8337
|
+
childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
8337
8338
|
}
|
|
8338
8339
|
else {
|
|
8339
8340
|
var labelString = '';
|
|
@@ -8368,11 +8369,20 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8368
8369
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
8369
8370
|
}
|
|
8370
8371
|
if (labelString !== 'null') {
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8372
|
+
if (isNaN(parseInt(labelString))) {
|
|
8373
|
+
taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
|
|
8374
|
+
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
8375
|
+
'display:' + 'inline-block;' +
|
|
8376
|
+
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
8377
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
8378
|
+
}
|
|
8379
|
+
else {
|
|
8380
|
+
taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
|
|
8381
|
+
(this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : ';') +
|
|
8382
|
+
'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') +
|
|
8383
|
+
'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
8384
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
8385
|
+
}
|
|
8376
8386
|
}
|
|
8377
8387
|
var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
|
|
8378
8388
|
this.splitTaskbar(data, labelString) : (data.ganttProperties.startDate && data.ganttProperties.endDate
|
|
@@ -8763,7 +8773,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8763
8773
|
var milestoneNode = null;
|
|
8764
8774
|
var data = this.templateData;
|
|
8765
8775
|
if (this.milestoneTemplateFunction) {
|
|
8766
|
-
milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0]);
|
|
8776
|
+
milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
8767
8777
|
}
|
|
8768
8778
|
else {
|
|
8769
8779
|
var template = '<div class="' + traceMilestone + '" style="position:absolute;">' +
|
|
@@ -8834,7 +8844,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8834
8844
|
leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
|
|
8835
8845
|
var leftLabelTemplateNode = null;
|
|
8836
8846
|
if (this.leftTaskLabelTemplateFunction) {
|
|
8837
|
-
leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0]);
|
|
8847
|
+
leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0], this.parent.treeGrid['root']);
|
|
8838
8848
|
}
|
|
8839
8849
|
else {
|
|
8840
8850
|
var field = this.parent.labelSettings.leftLabel;
|
|
@@ -8845,6 +8855,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8845
8855
|
}
|
|
8846
8856
|
}
|
|
8847
8857
|
if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
|
|
8858
|
+
if (leftLabelTemplateNode[0]['data'] === 'null') {
|
|
8859
|
+
leftLabelTemplateNode[0]['data'] = '';
|
|
8860
|
+
}
|
|
8848
8861
|
leftLabelNode[0].appendChild([].slice.call(leftLabelTemplateNode)[0]);
|
|
8849
8862
|
}
|
|
8850
8863
|
return leftLabelNode;
|
|
@@ -8874,7 +8887,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8874
8887
|
rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
|
|
8875
8888
|
var rightLabelTemplateNode = null;
|
|
8876
8889
|
if (this.rightTaskLabelTemplateFunction) {
|
|
8877
|
-
rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0]);
|
|
8890
|
+
rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0], this.parent.treeGrid['root']);
|
|
8878
8891
|
}
|
|
8879
8892
|
else {
|
|
8880
8893
|
var field = this.parent.labelSettings.rightLabel;
|
|
@@ -8885,6 +8898,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8885
8898
|
}
|
|
8886
8899
|
}
|
|
8887
8900
|
if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
|
|
8901
|
+
if (rightLabelTemplateNode[0]['data'] === 'null') {
|
|
8902
|
+
rightLabelTemplateNode[0]['data'] = '';
|
|
8903
|
+
}
|
|
8888
8904
|
rightLabelNode[0].appendChild([].slice.call(rightLabelTemplateNode)[0]);
|
|
8889
8905
|
}
|
|
8890
8906
|
return rightLabelNode;
|
|
@@ -8939,7 +8955,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8939
8955
|
var parentTaskbarNode = null;
|
|
8940
8956
|
var data = this.templateData;
|
|
8941
8957
|
if (this.parentTaskbarTemplateFunction) {
|
|
8942
|
-
parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0]);
|
|
8958
|
+
parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
8943
8959
|
}
|
|
8944
8960
|
else {
|
|
8945
8961
|
var labelString = '';
|
|
@@ -8971,11 +8987,20 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8971
8987
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
8972
8988
|
}
|
|
8973
8989
|
if (labelString !== 'null') {
|
|
8974
|
-
|
|
8975
|
-
taskLabel + '" style="line-height:' +
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8990
|
+
if (isNaN(parseInt(labelString))) {
|
|
8991
|
+
labelDiv = this.createDivElement('<span class="' + taskLabel + '" style="line-height:' +
|
|
8992
|
+
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
8993
|
+
'display:' + 'inline-block;' +
|
|
8994
|
+
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
8995
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>');
|
|
8996
|
+
}
|
|
8997
|
+
else {
|
|
8998
|
+
labelDiv = this.createDivElement('<span class="' +
|
|
8999
|
+
taskLabel + '" style="line-height:' +
|
|
9000
|
+
(this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') + 'width:' +
|
|
9001
|
+
(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : ';') + 'px; height:' +
|
|
9002
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>');
|
|
9003
|
+
}
|
|
8979
9004
|
progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
|
|
8980
9005
|
}
|
|
8981
9006
|
var milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
|
|
@@ -9044,10 +9069,19 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9044
9069
|
};
|
|
9045
9070
|
ChartRows.prototype.isTemplate = function (template) {
|
|
9046
9071
|
var result = false;
|
|
9072
|
+
for (var i = 0; i < this.parent.ganttColumns.length; i++) {
|
|
9073
|
+
if (template === this.parent.ganttColumns[i].field) {
|
|
9074
|
+
result = true;
|
|
9075
|
+
break;
|
|
9076
|
+
}
|
|
9077
|
+
}
|
|
9047
9078
|
if (typeof template !== 'string' || template.indexOf('#') === 0 || template.indexOf('<') > -1
|
|
9048
|
-
|| template.indexOf('$') > -1) {
|
|
9079
|
+
|| template.indexOf('$') > -1 || !result) {
|
|
9049
9080
|
result = true;
|
|
9050
9081
|
}
|
|
9082
|
+
else {
|
|
9083
|
+
result = false;
|
|
9084
|
+
}
|
|
9051
9085
|
return result;
|
|
9052
9086
|
};
|
|
9053
9087
|
/**
|
|
@@ -9062,7 +9096,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9062
9096
|
ChartRows.prototype.leftLabelContainer = function () {
|
|
9063
9097
|
var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
|
|
9064
9098
|
leftLabelContainer) + ' ' + '" tabindex="-1" style="height:' +
|
|
9065
|
-
(this.parent.rowHeight -
|
|
9099
|
+
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
9066
9100
|
return this.createDivElement(template);
|
|
9067
9101
|
};
|
|
9068
9102
|
ChartRows.prototype.taskbarContainer = function () {
|
|
@@ -9085,7 +9119,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9085
9119
|
ChartRows.prototype.rightLabelContainer = function () {
|
|
9086
9120
|
var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
|
|
9087
9121
|
rightLabelContainer) + '" ' + ' tabindex="-1" style="left:' + this.getRightLabelLeft(this.templateData) + 'px;height:'
|
|
9088
|
-
+ (this.parent.rowHeight -
|
|
9122
|
+
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
9089
9123
|
return this.createDivElement(template);
|
|
9090
9124
|
};
|
|
9091
9125
|
ChartRows.prototype.childTaskbarLeftResizer = function () {
|
|
@@ -16039,7 +16073,8 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
16039
16073
|
if (!ganttRecord.ganttProperties.isAutoSchedule) {
|
|
16040
16074
|
this.parent.setRecordValue('autoWidth', this.parent.dataOperation.calculateWidth(ganttRecord, false), ganttRecord.ganttProperties, true);
|
|
16041
16075
|
}
|
|
16042
|
-
if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0
|
|
16076
|
+
if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0 &&
|
|
16077
|
+
!isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
|
|
16043
16078
|
this.parent.editModule.taskbarEditModule.updateSegmentProgress(args.data.ganttProperties);
|
|
16044
16079
|
}
|
|
16045
16080
|
if (!args.data.hasChildRecords) {
|
|
@@ -25373,7 +25408,9 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
25373
25408
|
}
|
|
25374
25409
|
this.addRemoveClass(index);
|
|
25375
25410
|
this.selectedRowIndexes = extend([], this.getSelectedRowIndexes(), [], true);
|
|
25376
|
-
this.
|
|
25411
|
+
if (this.selectedRowIndexes.length == 0) {
|
|
25412
|
+
this.parent.setProperties({ selectedRowIndex: -1 }, true);
|
|
25413
|
+
}
|
|
25377
25414
|
if (!isNullOrUndefined(this.parent.toolbarModule)) {
|
|
25378
25415
|
this.parent.toolbarModule.refreshToolbarItems();
|
|
25379
25416
|
}
|
|
@@ -27633,7 +27670,13 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27633
27670
|
}
|
|
27634
27671
|
else {
|
|
27635
27672
|
startIndex = droppedRecord.index;
|
|
27636
|
-
|
|
27673
|
+
var rootChildRecord = draggedRecord;
|
|
27674
|
+
if (rootChildRecord.childRecords.length > 0) {
|
|
27675
|
+
do {
|
|
27676
|
+
rootChildRecord = rootChildRecord.childRecords[rootChildRecord.childRecords.length - 1];
|
|
27677
|
+
} while (rootChildRecord.childRecords.length > 0);
|
|
27678
|
+
}
|
|
27679
|
+
endIndex = rootChildRecord.index;
|
|
27637
27680
|
}
|
|
27638
27681
|
var _loop_2 = function (i_1) {
|
|
27639
27682
|
if (!isNullOrUndefined(data_1[i_1])) {
|