devexpress-gantt 4.1.12 → 4.1.15

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/dist/dx-gantt.css CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.1.12
4
- * Build date: Tue Feb 08 2022
3
+ * Version: 4.1.15
4
+ * Build date: Fri Feb 25 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
package/dist/dx-gantt.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.1.12
4
- * Build date: Tue Feb 08 2022
3
+ * Version: 4.1.15
4
+ * Build date: Fri Feb 25 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -2908,8 +2908,7 @@ var GridLayoutCalculator = (function () {
2908
2908
  return new size_1.Size(width, 0);
2909
2909
  };
2910
2910
  GridLayoutCalculator.prototype.getTaskProgressWidth = function (index) {
2911
- var progress = Math.max(Math.min(this.getTask(index).progress, 100), 0);
2912
- return this.getTaskWidth(index) * progress / 100;
2911
+ return this.getTaskWidth(index) * this.getTask(index).normalizedProgress / 100;
2913
2912
  };
2914
2913
  GridLayoutCalculator.prototype.getTaskTextElementInfo = function (index, isInsideText) {
2915
2914
  var result = new GridElementInfo_1.GridElementInfo();
@@ -5206,7 +5205,7 @@ var TaskEditController = (function () {
5206
5205
  TaskEditController.prototype.displayProgressEdit = function () {
5207
5206
  if (!this.viewItem.isCustom && this.canUpdateTask() && this.isTaskUpdateAllowed() && this.wrapInfo.size.width > this.wrapInfo.size.height) {
5208
5207
  this.progressEdit.style.display = "block";
5209
- this.progressEdit.style.left = ((this.task.progress / 100) * this.wrapInfo.size.width - (this.progressEdit.offsetWidth / 2)) + "px";
5208
+ this.progressEdit.style.left = ((this.task.normalizedProgress / 100) * this.wrapInfo.size.width - (this.progressEdit.offsetWidth / 2)) + "px";
5210
5209
  }
5211
5210
  else
5212
5211
  this.progressEdit.style.display = "none";
@@ -5847,9 +5846,9 @@ var GanttView = (function () {
5847
5846
  var _a, _b;
5848
5847
  return (_b = (_a = this.ganttOwner).getTreeListHeaderInfo) === null || _b === void 0 ? void 0 : _b.call(_a, colIndex);
5849
5848
  };
5850
- GanttView.prototype.getTreeListCellInfo = function (rowIndex, colIndex) {
5849
+ GanttView.prototype.getTreeListCellInfo = function (rowIndex, colIndex, key) {
5851
5850
  var _a, _b;
5852
- return (_b = (_a = this.ganttOwner).getTreeListCellInfo) === null || _b === void 0 ? void 0 : _b.call(_a, rowIndex, colIndex);
5851
+ return (_b = (_a = this.ganttOwner).getTreeListCellInfo) === null || _b === void 0 ? void 0 : _b.call(_a, rowIndex, colIndex, key);
5853
5852
  };
5854
5853
  GanttView.prototype.exportToPdf = function (options) {
5855
5854
  var _a;
@@ -7446,12 +7445,11 @@ var EllipsisHelper = (function () {
7446
7445
  return text;
7447
7446
  var pdfTextWidth = pdfDoc.getTextWidth(text.toString());
7448
7447
  if (pdfTextWidth > size) {
7449
- var outputText = EllipsisHelper.ellipsis;
7450
- var pos = 0;
7451
- while (pdfDoc.getTextWidth(outputText) < size) {
7452
- var char = text[pos];
7453
- outputText = outputText.substr(0, pos) + char + outputText.substr(pos);
7454
- pos++;
7448
+ var outputText = text;
7449
+ var pos = text.length - 1;
7450
+ while (pdfDoc.getTextWidth(outputText) > size && pos > 0) {
7451
+ outputText = outputText.substring(0, pos) + EllipsisHelper.ellipsis;
7452
+ pos--;
7455
7453
  }
7456
7454
  return outputText;
7457
7455
  }
@@ -11653,13 +11651,16 @@ var GanttExportCalculator = (function () {
11653
11651
  this._treeListHeaderMatrix.push(row);
11654
11652
  };
11655
11653
  GanttExportCalculator.prototype.calculateTreeListTableBodyMatrix = function () {
11654
+ var _a;
11656
11655
  this._treeListBodyMatrix = new Array();
11657
11656
  var visibleTaskIndices = this.visibleTaskIndices;
11658
11657
  var colCount = this.treeListHeaderMatrix[0].length;
11659
11658
  for (var i = 0; i < visibleTaskIndices.length; i++) {
11660
11659
  var row = new Array();
11660
+ var visibleIndex = visibleTaskIndices[i];
11661
+ var taskKey = (_a = this._owner.getTask(visibleIndex)) === null || _a === void 0 ? void 0 : _a.id;
11661
11662
  for (var j = 0; j < colCount; j++) {
11662
- var cell = new CellDef_1.CellDef(this._owner.getTreeListCellInfo(visibleTaskIndices[i], j));
11663
+ var cell = new CellDef_1.CellDef(this._owner.getTreeListCellInfo(visibleIndex, j, taskKey));
11663
11664
  if (!cell.styles.cellWidth.hasValue())
11664
11665
  cell.styles.cellWidth.assign(this.getTreeListColumnWidth(j));
11665
11666
  if (this.rowHasChildren(visibleTaskIndices[i]))
@@ -15438,8 +15439,11 @@ var PdfGanttTableDrawer = (function () {
15438
15439
  this._pdfDoc = pdfDoc;
15439
15440
  }
15440
15441
  PdfGanttTableDrawer.prototype.drawTable = function (info) {
15442
+ var _a, _b;
15441
15443
  if (info) {
15442
15444
  var options = this.createTableOptions(info);
15445
+ if ((_a = info.style) === null || _a === void 0 ? void 0 : _a.fontSize)
15446
+ this._pdfDoc.setFontSize((_b = info.style) === null || _b === void 0 ? void 0 : _b.fontSize);
15443
15447
  this._pdfDoc.autoTable(options.getValue());
15444
15448
  }
15445
15449
  };
@@ -20448,6 +20452,13 @@ var Task = (function (_super) {
20448
20452
  _this.color = "";
20449
20453
  return _this;
20450
20454
  }
20455
+ Object.defineProperty(Task.prototype, "normalizedProgress", {
20456
+ get: function () {
20457
+ return Math.max(Math.min(this.progress, 100), 0);
20458
+ },
20459
+ enumerable: false,
20460
+ configurable: true
20461
+ });
20451
20462
  Task.prototype.assignFromObject = function (sourceObj) {
20452
20463
  if ((0, common_1.isDefined)(sourceObj)) {
20453
20464
  _super.prototype.assignFromObject.call(this, sourceObj);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.1.12
4
- * Build date: Tue Feb 08 2022
3
+ * Version: 4.1.15
4
+ * Build date: Fri Feb 25 2022
5
5
  *
6
6
  * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs