@syncfusion/ej2-gantt 24.2.3 → 24.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 +22 -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 +83 -21
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +84 -21
- 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 +18 -18
- package/src/gantt/actions/connector-line-edit.d.ts +1 -0
- package/src/gantt/actions/connector-line-edit.js +24 -0
- package/src/gantt/actions/dialog-edit.d.ts +1 -0
- package/src/gantt/actions/dialog-edit.js +4 -1
- package/src/gantt/base/gantt-chart.js +34 -14
- package/src/gantt/base/gantt.js +0 -3
- package/src/gantt/export/pdf-base/pdf-grid-table.js +20 -3
- package/src/gantt/renderer/timeline.js +2 -0
|
@@ -5254,7 +5254,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5254
5254
|
*/
|
|
5255
5255
|
GanttChart.prototype.ganttChartMove = function (e) {
|
|
5256
5256
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
5257
|
-
if (this.parent.element.getElementsByClassName('e-clone-taskbar').length > 0) {
|
|
5257
|
+
if (this.parent.element.getElementsByClassName('e-clone-taskbar').length > 0 && !this.parent.enableRtl) {
|
|
5258
5258
|
var xValue = void 0;
|
|
5259
5259
|
if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
|
|
5260
5260
|
xValue = e['changedTouches'][0].pageX;
|
|
@@ -5738,21 +5738,39 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5738
5738
|
var mouseUp = Browser.touchEndEvent;
|
|
5739
5739
|
var mouseMove = Browser.touchMoveEvent;
|
|
5740
5740
|
var cancel = isIE11Pointer ? 'pointerleave' : 'mouseleave';
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5741
|
+
if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody)) {
|
|
5742
|
+
EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, mouseDown, this.ganttChartMouseDown);
|
|
5743
|
+
}
|
|
5744
|
+
if (!isNullOrUndefined(this.parent.chartPane)) {
|
|
5745
|
+
EventHandler.remove(this.parent.chartPane, cancel, this.ganttChartLeave);
|
|
5746
|
+
EventHandler.remove(this.parent.chartPane, mouseMove, this.ganttChartMove);
|
|
5747
|
+
}
|
|
5744
5748
|
if (this.parent.isAdaptive) {
|
|
5745
|
-
|
|
5746
|
-
|
|
5749
|
+
if (!isNullOrUndefined(this.parent.chartPane)) {
|
|
5750
|
+
EventHandler.remove(this.parent.chartPane, click, this.ganttChartMouseClick);
|
|
5751
|
+
EventHandler.remove(this.parent.chartPane, mouseUp, this.ganttChartMouseUp);
|
|
5752
|
+
}
|
|
5747
5753
|
}
|
|
5748
5754
|
if (!this.parent.isAdaptive) {
|
|
5749
|
-
|
|
5750
|
-
|
|
5755
|
+
if (!isNullOrUndefined(this.parent.element)) {
|
|
5756
|
+
EventHandler.remove(this.parent.element, mouseUp, this.documentMouseUp);
|
|
5757
|
+
}
|
|
5758
|
+
if (!isNullOrUndefined(document)) {
|
|
5759
|
+
EventHandler.remove(document, mouseUp, this.mouseUp);
|
|
5760
|
+
}
|
|
5761
|
+
}
|
|
5762
|
+
if (!isNullOrUndefined(this.parent.element)) {
|
|
5763
|
+
EventHandler.remove(this.parent.element, 'mousemove', this.mouseMoveHandler);
|
|
5764
|
+
}
|
|
5765
|
+
if (!isNullOrUndefined(document)) {
|
|
5766
|
+
EventHandler.remove(document, 'mouseup', this.contextClick);
|
|
5767
|
+
if (!isNullOrUndefined(document.body)) {
|
|
5768
|
+
EventHandler.remove(document.body, 'contextmenu', this.contextClick);
|
|
5769
|
+
}
|
|
5770
|
+
}
|
|
5771
|
+
if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody)) {
|
|
5772
|
+
EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, 'dblclick', this.doubleClickHandler);
|
|
5751
5773
|
}
|
|
5752
|
-
EventHandler.remove(this.parent.element, 'mousemove', this.mouseMoveHandler);
|
|
5753
|
-
EventHandler.remove(document.body, 'contextmenu', this.contextClick);
|
|
5754
|
-
EventHandler.remove(document, 'mouseup', this.contextClick);
|
|
5755
|
-
EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, 'dblclick', this.doubleClickHandler);
|
|
5756
5774
|
};
|
|
5757
5775
|
/**
|
|
5758
5776
|
* To get record by taskbar element.
|
|
@@ -6241,8 +6259,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
6241
6259
|
GanttChart.prototype.destroy = function () {
|
|
6242
6260
|
this.removeEventListener();
|
|
6243
6261
|
this.unWireEvents();
|
|
6244
|
-
this.scrollObject
|
|
6245
|
-
|
|
6262
|
+
if (!isNullOrUndefined(this.scrollObject)) {
|
|
6263
|
+
this.scrollObject.destroy();
|
|
6264
|
+
this.scrollObject = null;
|
|
6265
|
+
}
|
|
6246
6266
|
};
|
|
6247
6267
|
return GanttChart;
|
|
6248
6268
|
}());
|
|
@@ -6342,6 +6362,8 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6342
6362
|
*/
|
|
6343
6363
|
Timeline.prototype.updateChartByNewTimeline = function () {
|
|
6344
6364
|
this.parent.chartRowsModule.refreshChartByTimeline();
|
|
6365
|
+
var currentScrollLeft = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollLeft;
|
|
6366
|
+
this.parent.element.getElementsByClassName('e-timeline-header-container')[0].scrollLeft = currentScrollLeft;
|
|
6345
6367
|
this.parent.notify('refreshDayMarkers', {});
|
|
6346
6368
|
};
|
|
6347
6369
|
/**
|
|
@@ -15073,9 +15095,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15073
15095
|
if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
|
|
15074
15096
|
this.setProperties({ resourceFields: { unit: 'unit' } }, true);
|
|
15075
15097
|
}
|
|
15076
|
-
if (!isNullOrUndefined(this.taskFields.work)) {
|
|
15077
|
-
this.setProperties({ taskType: 'FixedWork' }, true);
|
|
15078
|
-
}
|
|
15079
15098
|
this.taskIds = [];
|
|
15080
15099
|
};
|
|
15081
15100
|
/**
|
|
@@ -24123,6 +24142,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
24123
24142
|
DialogEdit.prototype.createDivElement = function (className, id) {
|
|
24124
24143
|
return createElement('div', { className: className, id: id });
|
|
24125
24144
|
};
|
|
24145
|
+
DialogEdit.prototype.createFormElement = function (className, id) {
|
|
24146
|
+
return createElement('form', { className: className, id: id });
|
|
24147
|
+
};
|
|
24126
24148
|
DialogEdit.prototype.createInputElement = function (className, id, fieldName, type) {
|
|
24127
24149
|
return createElement(type || 'input', {
|
|
24128
24150
|
className: className, attrs: {
|
|
@@ -24237,7 +24259,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
24237
24259
|
DialogEdit.prototype.renderGeneralTab = function (itemName) {
|
|
24238
24260
|
var ganttObj = this.parent;
|
|
24239
24261
|
var itemModel = this.beforeOpenArgs[itemName];
|
|
24240
|
-
var divElement = this.
|
|
24262
|
+
var divElement = this.createFormElement('e-edit-form-row', ganttObj.element.id
|
|
24241
24263
|
+ '' + itemName + 'TabContainer');
|
|
24242
24264
|
for (var _i = 0, _a = Object.keys(itemModel); _i < _a.length; _i++) {
|
|
24243
24265
|
var key = _a[_i];
|
|
@@ -25689,10 +25711,34 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
25689
25711
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
25690
25712
|
}
|
|
25691
25713
|
else if (args.validateMode.preserveLinkWithEditing) {
|
|
25714
|
+
var connectedTaskId_1;
|
|
25692
25715
|
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
25693
25716
|
this.calculateOffset(ganttRecord);
|
|
25717
|
+
var taskId_1 = ganttRecord.ganttProperties.taskId;
|
|
25718
|
+
ganttRecord.ganttProperties.predecessor.forEach(function (predecessor) {
|
|
25719
|
+
if (taskId_1 == predecessor.from) {
|
|
25720
|
+
connectedTaskId_1 = predecessor.to;
|
|
25721
|
+
return;
|
|
25722
|
+
}
|
|
25723
|
+
});
|
|
25694
25724
|
}
|
|
25695
25725
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
25726
|
+
this.processPredecessors(connectedTaskId_1);
|
|
25727
|
+
}
|
|
25728
|
+
};
|
|
25729
|
+
ConnectorLineEdit.prototype.processPredecessors = function (parentId) {
|
|
25730
|
+
var _this = this;
|
|
25731
|
+
if (parentId) {
|
|
25732
|
+
var record_1 = this.parent.getRecordByID(parentId);
|
|
25733
|
+
this.calculateOffset(record_1);
|
|
25734
|
+
if (record_1 && record_1.ganttProperties && record_1.ganttProperties.predecessor) {
|
|
25735
|
+
var predecessors = record_1.ganttProperties.predecessor;
|
|
25736
|
+
predecessors.forEach(function (predecessor) {
|
|
25737
|
+
if (record_1.ganttProperties.taskId == predecessor.from) {
|
|
25738
|
+
_this.processPredecessors(predecessor.to);
|
|
25739
|
+
}
|
|
25740
|
+
});
|
|
25741
|
+
}
|
|
25696
25742
|
}
|
|
25697
25743
|
};
|
|
25698
25744
|
ConnectorLineEdit.prototype.checkChildRecords = function (ganttRecord) {
|
|
@@ -36392,6 +36438,12 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
36392
36438
|
if (typeof this.value === 'string') {
|
|
36393
36439
|
/* eslint-disable-next-line */
|
|
36394
36440
|
var font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
36441
|
+
if (this.row.isParentRow) {
|
|
36442
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, PdfFontStyle.Bold);
|
|
36443
|
+
}
|
|
36444
|
+
else {
|
|
36445
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
36446
|
+
}
|
|
36395
36447
|
if (this.row.treegrid.ganttStyle.font) {
|
|
36396
36448
|
font = this.row.treegrid.ganttStyle.font;
|
|
36397
36449
|
}
|
|
@@ -36427,13 +36479,24 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
36427
36479
|
currentValue = !(isNullOrUndefined(this.remainingString) || this.remainingString === '') ? this.remainingString : this.value;
|
|
36428
36480
|
}
|
|
36429
36481
|
/* eslint-disable */
|
|
36430
|
-
var font =
|
|
36482
|
+
var font = null;
|
|
36483
|
+
if (this.row.isParentRow) {
|
|
36484
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, PdfFontStyle.Bold);
|
|
36485
|
+
}
|
|
36486
|
+
else {
|
|
36487
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
36488
|
+
}
|
|
36431
36489
|
if (this.row.treegrid.ganttStyle.font) {
|
|
36432
36490
|
font = this.row.treegrid.ganttStyle.font;
|
|
36433
36491
|
}
|
|
36434
36492
|
/* eslint-disable */
|
|
36435
36493
|
var slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
|
|
36436
|
-
|
|
36494
|
+
if (currentValue.length > 80) {
|
|
36495
|
+
height += slr.actualSize.height + 20;
|
|
36496
|
+
}
|
|
36497
|
+
else {
|
|
36498
|
+
height += slr.actualSize.height;
|
|
36499
|
+
}
|
|
36437
36500
|
height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
|
|
36438
36501
|
}
|
|
36439
36502
|
height += this.row.treegrid.style.cellPadding.top + this.row.treegrid.style.cellPadding.bottom;
|
|
@@ -36525,7 +36588,7 @@ var PdfTreeGridCell = /** @__PURE__ @class */ (function () {
|
|
|
36525
36588
|
if (this.finishedDrawingCell) {
|
|
36526
36589
|
temp = (this.remainingString === '') ? this.remainingString : this.value;
|
|
36527
36590
|
/* eslint-disable-next-line */
|
|
36528
|
-
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
36591
|
+
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y - 3, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
36529
36592
|
}
|
|
36530
36593
|
else {
|
|
36531
36594
|
/* eslint-disable-next-line */
|