@syncfusion/ej2-gantt 21.2.3 → 21.2.5
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 +25 -1
- 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 +37 -10
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +37 -10
- 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 +19 -16
- package/src/gantt/actions/dependency.js +3 -0
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +4 -1
- package/src/gantt/actions/taskbar-edit.js +3 -0
- package/src/gantt/base/gantt-chart.js +4 -1
- package/src/gantt/base/gantt.js +1 -1
- package/src/gantt/base/splitter.js +3 -0
- package/src/gantt/renderer/chart-rows.js +12 -2
- package/src/gantt/renderer/nonworking-day.js +1 -1
- package/src/gantt/renderer/timeline.js +5 -3
|
@@ -4658,7 +4658,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4658
4658
|
GanttChart.prototype.setVirtualHeight = function () {
|
|
4659
4659
|
if (this.parent.virtualScrollModule && this.parent.enableVirtualization) {
|
|
4660
4660
|
var wrapper = getValue('virtualTrack', this.parent.ganttChartModule.virtualRender);
|
|
4661
|
-
wrapper.style.height = this.parent.
|
|
4661
|
+
wrapper.style.height = this.parent.treeGrid.element.getElementsByClassName('e-virtualtable')[0].style.height;
|
|
4662
|
+
var wrapper1 = getValue('wrapper', this.parent.ganttChartModule.virtualRender);
|
|
4663
|
+
var treegridVirtualHeight = this.parent.treeGrid.element.getElementsByClassName('e-virtualtable')[0].style.transform;
|
|
4664
|
+
wrapper1.style.transform = treegridVirtualHeight;
|
|
4662
4665
|
}
|
|
4663
4666
|
};
|
|
4664
4667
|
/**
|
|
@@ -5828,6 +5831,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5828
5831
|
if (isZoomIn) {
|
|
5829
5832
|
if (currentLevel === this.parent.zoomingLevels[this.parent.zoomingLevels.length - 1].level) {
|
|
5830
5833
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomin'], false); // disable toolbar items.
|
|
5834
|
+
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomout'], true);
|
|
5831
5835
|
}
|
|
5832
5836
|
else {
|
|
5833
5837
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomout'], true); // disable toolbar items.
|
|
@@ -5836,6 +5840,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5836
5840
|
else {
|
|
5837
5841
|
if (currentLevel === this.parent.zoomingLevels[0].level) {
|
|
5838
5842
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomout'], false); // disable toolbar items.
|
|
5843
|
+
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomin'], true);
|
|
5839
5844
|
}
|
|
5840
5845
|
else {
|
|
5841
5846
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomin'], true); // enable toolbar items.
|
|
@@ -5941,7 +5946,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5941
5946
|
var secondValue;
|
|
5942
5947
|
var zoomingCollections = this.parent.zoomingLevels.slice();
|
|
5943
5948
|
var sortedCollectons = zoomingCollections.sort(function (a, b) {
|
|
5944
|
-
return (a.perDayWidth < b.perDayWidth) ? 1 : -1;
|
|
5949
|
+
return (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1);
|
|
5945
5950
|
});
|
|
5946
5951
|
if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
|
|
5947
5952
|
return;
|
|
@@ -6177,10 +6182,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6177
6182
|
}
|
|
6178
6183
|
var sortedUnitLevels = sameUnitLevels.sort(function (a, b) {
|
|
6179
6184
|
if (tier === "bottomTier") {
|
|
6180
|
-
return (a.bottomTier.count < b.bottomTier.count) ? 1 : -1;
|
|
6185
|
+
return (!a.bottomTier.count || !b.bottomTier.count) ? 0 : ((a.bottomTier.count < b.bottomTier.count) ? 1 : -1);
|
|
6181
6186
|
}
|
|
6182
6187
|
else {
|
|
6183
|
-
return (a.topTier.count < b.topTier.count) ? 1 : -1;
|
|
6188
|
+
return (!a.topTier.count || !b.topTier.count) ? 0 : ((a.topTier.count < b.topTier.count) ? 1 : -1);
|
|
6184
6189
|
}
|
|
6185
6190
|
});
|
|
6186
6191
|
for (var i = 0; i < sortedUnitLevels.length; i++) {
|
|
@@ -9182,7 +9187,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9182
9187
|
data.ganttProperties.segments.length === 0))) {
|
|
9183
9188
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
9184
9189
|
var templateElement = this.createDivElement(template)[0];
|
|
9185
|
-
|
|
9190
|
+
if (this.parent.disableHtmlEncode) {
|
|
9191
|
+
templateElement.innerText = labelString;
|
|
9192
|
+
}
|
|
9193
|
+
else {
|
|
9194
|
+
templateElement.innerHTML = labelString;
|
|
9195
|
+
}
|
|
9186
9196
|
var childLabel = this.parent.labelSettings.taskLabel;
|
|
9187
9197
|
if (childLabel && childLabel['elementRef'])
|
|
9188
9198
|
templateElement.appendChild(tempDiv);
|
|
@@ -9848,7 +9858,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9848
9858
|
this.taskBarHeight + 'px;"></span>';
|
|
9849
9859
|
}
|
|
9850
9860
|
var labelElement = this.createDivElement(labelDiv)[0];
|
|
9851
|
-
|
|
9861
|
+
if (this.parent.disableHtmlEncode) {
|
|
9862
|
+
labelElement.innerText = labelString;
|
|
9863
|
+
}
|
|
9864
|
+
else {
|
|
9865
|
+
labelElement.innerHTML = labelString;
|
|
9866
|
+
}
|
|
9852
9867
|
var parentLabel = this.parent.labelSettings.taskLabel;
|
|
9853
9868
|
if (parentLabel && parentLabel['elementRef'])
|
|
9854
9869
|
labelElement.appendChild(div);
|
|
@@ -11833,6 +11848,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11833
11848
|
if ((predecessorLength && predecessorNames !== predecessorLength)) {
|
|
11834
11849
|
validUpdate = true;
|
|
11835
11850
|
}
|
|
11851
|
+
else if (record.hasChildRecords && record.ganttProperties.predecessor.length > 0 && ganttProp.hasChildRecords && !ganttProp.ganttProperties.predecessor) {
|
|
11852
|
+
validUpdate = true;
|
|
11853
|
+
}
|
|
11836
11854
|
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
11837
11855
|
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
11838
11856
|
this.parent.editModule['updateChildItems'](record);
|
|
@@ -12974,6 +12992,9 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
12974
12992
|
_this.parent.trigger('splitterResizing', args);
|
|
12975
12993
|
},
|
|
12976
12994
|
resizeStop: function (args) {
|
|
12995
|
+
var leftPane = args.pane[0];
|
|
12996
|
+
_this.splitterPreviousPositionGrid = leftPane.scrollWidth + 1 + 'px';
|
|
12997
|
+
_this.splitterObject.paneSettings[0].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionGrid);
|
|
12977
12998
|
var callBackPromise = new Deferred();
|
|
12978
12999
|
_this.parent.trigger('splitterResized', args, function (splitterResizedArgs) {
|
|
12979
13000
|
if (splitterResizedArgs.cancel === true) {
|
|
@@ -15560,7 +15581,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15560
15581
|
args: [this]
|
|
15561
15582
|
});
|
|
15562
15583
|
}
|
|
15563
|
-
if (this.toolbar) {
|
|
15584
|
+
if (this.toolbar && this.toolbar.length > 0) {
|
|
15564
15585
|
modules.push({
|
|
15565
15586
|
member: 'toolbar',
|
|
15566
15587
|
args: [this]
|
|
@@ -20120,6 +20141,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20120
20141
|
if ((this.taskBarEditAction === 'ConnectorPointLeftDrag' ||
|
|
20121
20142
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor) {
|
|
20122
20143
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
20144
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
20145
|
+
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
20146
|
+
}
|
|
20123
20147
|
}
|
|
20124
20148
|
else {
|
|
20125
20149
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -22938,7 +22962,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
22938
22962
|
var ganttObj = this.parent;
|
|
22939
22963
|
var rte = notesElement.ej2_instances[0];
|
|
22940
22964
|
if (this.isEdit) {
|
|
22941
|
-
if (ganttObj.columnByField[ganttObj.taskFields.notes].disableHtmlEncode) {
|
|
22965
|
+
if (ganttObj.columnByField[ganttObj.taskFields.notes].disableHtmlEncode === false) {
|
|
22942
22966
|
this.parent.setRecordValue('notes', rte.getHtml(), this.rowData.ganttProperties, true);
|
|
22943
22967
|
}
|
|
22944
22968
|
else {
|
|
@@ -24383,7 +24407,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24383
24407
|
}
|
|
24384
24408
|
else if ([tasks.progress, tasks.notes, tasks.durationUnit, tasks.expandState,
|
|
24385
24409
|
tasks.milestone, tasks.name, tasks.baselineStartDate,
|
|
24386
|
-
tasks.baselineEndDate, tasks.id, tasks.segments].indexOf(key) !== -1) {
|
|
24410
|
+
tasks.baselineEndDate, tasks.id, tasks.segments, tasks.cssClass].indexOf(key) !== -1) {
|
|
24387
24411
|
var column = ganttObj.columnByField[key];
|
|
24388
24412
|
/* eslint-disable-next-line */
|
|
24389
24413
|
var value = data[key];
|
|
@@ -24397,6 +24421,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24397
24421
|
else if (key === tasks.name) {
|
|
24398
24422
|
ganttPropKey = 'taskName';
|
|
24399
24423
|
}
|
|
24424
|
+
else if (key === tasks.cssClass) {
|
|
24425
|
+
ganttPropKey = 'cssClass';
|
|
24426
|
+
}
|
|
24400
24427
|
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
24401
24428
|
ganttPropKey = 'segments';
|
|
24402
24429
|
/* eslint-disable-next-line */
|
|
@@ -29533,7 +29560,7 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
29533
29560
|
};
|
|
29534
29561
|
NonWorkingDay.prototype.updateHolidayLabelHeight = function () {
|
|
29535
29562
|
var height = this.parent.getContentHeight();
|
|
29536
|
-
var gantttable =
|
|
29563
|
+
var gantttable = this.parent.element;
|
|
29537
29564
|
// eslint-disable-next-line
|
|
29538
29565
|
var toolbarHeight = 0;
|
|
29539
29566
|
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|