devexpress-gantt 4.0.9 → 4.0.12

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.0.9
4
- * Build date: Tue Feb 08 2022
3
+ * Version: 4.0.12
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.0.9
4
- * Build date: Tue Feb 08 2022
3
+ * Version: 4.0.12
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();
@@ -5288,7 +5287,7 @@ var TaskEditController = (function () {
5288
5287
  TaskEditController.prototype.displayProgressEdit = function () {
5289
5288
  if (!this.viewItem.isCustom && this.canUpdateTask() && this.isTaskUpdateAllowed() && this.wrapInfo.size.width > this.wrapInfo.size.height) {
5290
5289
  this.progressEdit.style.display = "block";
5291
- this.progressEdit.style.left = ((this.task.progress / 100) * this.wrapInfo.size.width - (this.progressEdit.offsetWidth / 2)) + "px";
5290
+ this.progressEdit.style.left = ((this.task.normalizedProgress / 100) * this.wrapInfo.size.width - (this.progressEdit.offsetWidth / 2)) + "px";
5292
5291
  }
5293
5292
  else
5294
5293
  this.progressEdit.style.display = "none";
@@ -5929,9 +5928,9 @@ var GanttView = (function () {
5929
5928
  var _a, _b;
5930
5929
  return (_b = (_a = this.ganttOwner).getTreeListHeaderInfo) === null || _b === void 0 ? void 0 : _b.call(_a, colIndex);
5931
5930
  };
5932
- GanttView.prototype.getTreeListCellInfo = function (rowIndex, colIndex) {
5931
+ GanttView.prototype.getTreeListCellInfo = function (rowIndex, colIndex, key) {
5933
5932
  var _a, _b;
5934
- return (_b = (_a = this.ganttOwner).getTreeListCellInfo) === null || _b === void 0 ? void 0 : _b.call(_a, rowIndex, colIndex);
5933
+ return (_b = (_a = this.ganttOwner).getTreeListCellInfo) === null || _b === void 0 ? void 0 : _b.call(_a, rowIndex, colIndex, key);
5935
5934
  };
5936
5935
  GanttView.prototype.exportToPdf = function (options) {
5937
5936
  var _a;
@@ -7484,12 +7483,11 @@ var EllipsisHelper = (function () {
7484
7483
  return text;
7485
7484
  var pdfTextWidth = pdfDoc.getTextWidth(text.toString());
7486
7485
  if (pdfTextWidth > size) {
7487
- var outputText = EllipsisHelper.ellipsis;
7488
- var pos = 0;
7489
- while (pdfDoc.getTextWidth(outputText) < size) {
7490
- var char = text[pos];
7491
- outputText = outputText.substr(0, pos) + char + outputText.substr(pos);
7492
- pos++;
7486
+ var outputText = text;
7487
+ var pos = text.length - 1;
7488
+ while (pdfDoc.getTextWidth(outputText) > size && pos > 0) {
7489
+ outputText = outputText.substring(0, pos) + EllipsisHelper.ellipsis;
7490
+ pos--;
7493
7491
  }
7494
7492
  return outputText;
7495
7493
  }
@@ -11712,13 +11710,16 @@ var GanttExportCalculator = (function () {
11712
11710
  this._treeListHeaderMatrix.push(row);
11713
11711
  };
11714
11712
  GanttExportCalculator.prototype.calculateTreeListTableBodyMatrix = function () {
11713
+ var _a;
11715
11714
  this._treeListBodyMatrix = new Array();
11716
11715
  var visibleTaskIndices = this.visibleTaskIndices;
11717
11716
  var colCount = this.treeListHeaderMatrix[0].length;
11718
11717
  for (var i = 0; i < visibleTaskIndices.length; i++) {
11719
11718
  var row = new Array();
11719
+ var visibleIndex = visibleTaskIndices[i];
11720
+ var taskKey = (_a = this._owner.getTask(visibleIndex)) === null || _a === void 0 ? void 0 : _a.id;
11720
11721
  for (var j = 0; j < colCount; j++) {
11721
- var cell = new CellDef_1.CellDef(this._owner.getTreeListCellInfo(visibleTaskIndices[i], j));
11722
+ var cell = new CellDef_1.CellDef(this._owner.getTreeListCellInfo(visibleIndex, j, taskKey));
11722
11723
  if (!cell.styles.cellWidth.hasValue())
11723
11724
  cell.styles.cellWidth.assign(this.getTreeListColumnWidth(j));
11724
11725
  if (this.rowHasChildren(visibleTaskIndices[i]))
@@ -15344,8 +15345,11 @@ var PdfGanttTableDrawer = (function () {
15344
15345
  this._pdfDoc = pdfDoc;
15345
15346
  }
15346
15347
  PdfGanttTableDrawer.prototype.drawTable = function (info) {
15348
+ var _a, _b;
15347
15349
  if (info) {
15348
15350
  var options = this.createTableOptions(info);
15351
+ if ((_a = info.style) === null || _a === void 0 ? void 0 : _a.fontSize)
15352
+ this._pdfDoc.setFontSize((_b = info.style) === null || _b === void 0 ? void 0 : _b.fontSize);
15349
15353
  this._pdfDoc.autoTable(options.getValue());
15350
15354
  }
15351
15355
  };
@@ -20354,6 +20358,13 @@ var Task = (function (_super) {
20354
20358
  _this.color = "";
20355
20359
  return _this;
20356
20360
  }
20361
+ Object.defineProperty(Task.prototype, "normalizedProgress", {
20362
+ get: function () {
20363
+ return Math.max(Math.min(this.progress, 100), 0);
20364
+ },
20365
+ enumerable: false,
20366
+ configurable: true
20367
+ });
20357
20368
  Task.prototype.assignFromObject = function (sourceObj) {
20358
20369
  if ((0, common_1.isDefined)(sourceObj)) {
20359
20370
  _super.prototype.assignFromObject.call(this, sourceObj);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.0.9
4
- * Build date: Tue Feb 08 2022
3
+ * Version: 4.0.12
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