@syncfusion/ej2-gantt 21.2.4 → 21.2.6
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 +23 -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 +28 -9
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +28 -9
- 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 +16 -16
- package/src/gantt/actions/dependency.js +3 -0
- package/src/gantt/actions/edit.js +2 -3
- package/src/gantt/actions/keyboard.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 +3 -0
- package/src/gantt/base/splitter.js +3 -0
- package/src/gantt/base/task-processor.js +1 -1
- package/src/gantt/renderer/nonworking-day.js +1 -1
- package/src/gantt/renderer/timeline.js +4 -2
|
@@ -1741,7 +1741,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1741
1741
|
TaskProcessor.prototype.constructResourceViewDataSource = function (resources, data, unassignedTasks) {
|
|
1742
1742
|
var _loop_1 = function (i) {
|
|
1743
1743
|
var tempData = data[i];
|
|
1744
|
-
var child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : 'Children';
|
|
1744
|
+
var child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : this_1.parent.taskFields.child = 'Children';
|
|
1745
1745
|
var resourceData = tempData && tempData[this_1.parent.taskFields.resourceInfo];
|
|
1746
1746
|
var resourceIdMapping = this_1.parent.resourceFields.id;
|
|
1747
1747
|
if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
|
|
@@ -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.
|
|
@@ -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++) {
|
|
@@ -11843,6 +11848,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11843
11848
|
if ((predecessorLength && predecessorNames !== predecessorLength)) {
|
|
11844
11849
|
validUpdate = true;
|
|
11845
11850
|
}
|
|
11851
|
+
else if (record.hasChildRecords && record.ganttProperties.predecessor.length > 0 && ganttProp.hasChildRecords && !ganttProp.ganttProperties.predecessor) {
|
|
11852
|
+
validUpdate = true;
|
|
11853
|
+
}
|
|
11846
11854
|
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
11847
11855
|
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
11848
11856
|
this.parent.editModule['updateChildItems'](record);
|
|
@@ -12984,6 +12992,9 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
12984
12992
|
_this.parent.trigger('splitterResizing', args);
|
|
12985
12993
|
},
|
|
12986
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);
|
|
12987
12998
|
var callBackPromise = new Deferred();
|
|
12988
12999
|
_this.parent.trigger('splitterResized', args, function (splitterResizedArgs) {
|
|
12989
13000
|
if (splitterResizedArgs.cancel === true) {
|
|
@@ -13750,7 +13761,10 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
13750
13761
|
break;
|
|
13751
13762
|
case 'addRow':
|
|
13752
13763
|
{
|
|
13753
|
-
if (
|
|
13764
|
+
if (ganttObj.editModule && ganttObj.editModule.cellEditModule && ganttObj.editModule.cellEditModule.isCellEdit) {
|
|
13765
|
+
e.stopPropagation();
|
|
13766
|
+
}
|
|
13767
|
+
else if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
13754
13768
|
e.preventDefault();
|
|
13755
13769
|
ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition);
|
|
13756
13770
|
var focussedElement = ganttObj.element;
|
|
@@ -14288,6 +14302,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14288
14302
|
var ganttHeader = this.chartPane.childNodes[0].childNodes[0];
|
|
14289
14303
|
this.scrollLeftValue = this.chartPane.childNodes[0].childNodes[0]['scrollLeft'];
|
|
14290
14304
|
var ganttContent = this.chartPane.childNodes[0].childNodes[1];
|
|
14305
|
+
if (this.treeGrid.element) {
|
|
14306
|
+
this.ganttChartModule['setVirtualHeight']();
|
|
14307
|
+
}
|
|
14291
14308
|
if (!this.contentMaskTable) {
|
|
14292
14309
|
if (ganttContent) {
|
|
14293
14310
|
var content$$1 = ganttContent;
|
|
@@ -20130,6 +20147,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20130
20147
|
if ((this.taskBarEditAction === 'ConnectorPointLeftDrag' ||
|
|
20131
20148
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor) {
|
|
20132
20149
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
20150
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
20151
|
+
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
20152
|
+
}
|
|
20133
20153
|
}
|
|
20134
20154
|
else {
|
|
20135
20155
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -24619,9 +24639,8 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24619
24639
|
(isNullOrUndefined(taskData.startDate) && !isNullOrUndefined(prevStart)) ||
|
|
24620
24640
|
(isNullOrUndefined(taskData.endDate) && !isNullOrUndefined(prevEnd)) ||
|
|
24621
24641
|
(prevStart && prevStart.getTime() !== taskData.startDate.getTime())
|
|
24622
|
-
|
|
24623
|
-
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration
|
|
24624
|
-
|| (!isNullOrUndefined(prevDuration) && prevDuration === taskData.duration &&
|
|
24642
|
+
&& (prevEnd && prevEnd.getTime() !== taskData.endDate.getTime())
|
|
24643
|
+
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration &&
|
|
24625
24644
|
prevDurationUnit !== taskData.durationUnit)) {
|
|
24626
24645
|
isMoved = true;
|
|
24627
24646
|
}
|
|
@@ -29546,7 +29565,7 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
29546
29565
|
};
|
|
29547
29566
|
NonWorkingDay.prototype.updateHolidayLabelHeight = function () {
|
|
29548
29567
|
var height = this.parent.getContentHeight();
|
|
29549
|
-
var gantttable =
|
|
29568
|
+
var gantttable = this.parent.element;
|
|
29550
29569
|
// eslint-disable-next-line
|
|
29551
29570
|
var toolbarHeight = 0;
|
|
29552
29571
|
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|