devexpress-gantt 4.1.10 → 4.1.14

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.10
4
- * Build date: Fri Feb 04 2022
3
+ * Version: 4.1.14
4
+ * Build date: Tue Feb 22 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.10
4
- * Build date: Fri Feb 04 2022
3
+ * Version: 4.1.14
4
+ * Build date: Tue Feb 22 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
@@ -1626,9 +1626,6 @@ var Browser = (function () {
1626
1626
  Browser.WindowsPhonePlatform = platform === 'WinPhone';
1627
1627
  Browser.WebKitFamily = Browser.Safari || Browser.Chrome || Browser.Opera && Browser.MajorVersion >= 15;
1628
1628
  Browser.NetscapeFamily = Browser.Netscape || Browser.Mozilla || Browser.Firefox;
1629
- Browser.HardwareAcceleration = (Browser.IE && Browser.MajorVersion >= 9) || (Browser.Firefox && Browser.MajorVersion >= 4) ||
1630
- (Browser.AndroidMobilePlatform && Browser.Chrome) || (Browser.Chrome && Browser.MajorVersion >= 37) ||
1631
- (Browser.Safari && !Browser.WindowsPlatform) || Browser.Edge || (Browser.Opera && Browser.MajorVersion >= 46);
1632
1629
  Browser.WebKitTouchUI = Browser.MacOSMobilePlatform || Browser.AndroidMobilePlatform;
1633
1630
  var isIETouchUI = Browser.IE && Browser.MajorVersion > 9 && Browser.WindowsPlatform && Browser.UserAgent.toLowerCase().indexOf('touch') >= 0;
1634
1631
  Browser.MSTouchUI = isIETouchUI || (Browser.Edge && !!window.navigator.maxTouchPoints);
@@ -2911,8 +2908,7 @@ var GridLayoutCalculator = (function () {
2911
2908
  return new size_1.Size(width, 0);
2912
2909
  };
2913
2910
  GridLayoutCalculator.prototype.getTaskProgressWidth = function (index) {
2914
- var progress = Math.max(Math.min(this.getTask(index).progress, 100), 0);
2915
- return this.getTaskWidth(index) * progress / 100;
2911
+ return this.getTaskWidth(index) * this.getTask(index).normalizedProgress / 100;
2916
2912
  };
2917
2913
  GridLayoutCalculator.prototype.getTaskTextElementInfo = function (index, isInsideText) {
2918
2914
  var result = new GridElementInfo_1.GridElementInfo();
@@ -3091,9 +3087,6 @@ var GridLayoutCalculator = (function () {
3091
3087
  return this.getWidthByDateRange(this.range.start, date);
3092
3088
  };
3093
3089
  GridLayoutCalculator.prototype.getWidthByDateRange = function (start, end) {
3094
- return Math.max(this.getDistanceBetweenDates(start, end), 0);
3095
- };
3096
- GridLayoutCalculator.prototype.getDistanceBetweenDates = function (start, end) {
3097
3090
  return DateUtils_1.DateUtils.getRangeTickCount(start, end, this.viewType) * this.tickSize.width;
3098
3091
  };
3099
3092
  GridLayoutCalculator.prototype.getDateByPos = function (position) {
@@ -5212,7 +5205,7 @@ var TaskEditController = (function () {
5212
5205
  TaskEditController.prototype.displayProgressEdit = function () {
5213
5206
  if (!this.viewItem.isCustom && this.canUpdateTask() && this.isTaskUpdateAllowed() && this.wrapInfo.size.width > this.wrapInfo.size.height) {
5214
5207
  this.progressEdit.style.display = "block";
5215
- 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";
5216
5209
  }
5217
5210
  else
5218
5211
  this.progressEdit.style.display = "none";
@@ -6338,6 +6331,10 @@ var GanttView = (function () {
6338
6331
  GanttView.prototype.destroyTemplate = function (container) {
6339
6332
  this.ganttOwner.destroyTemplate ? this.ganttOwner.destroyTemplate(container) : container.innerHTML = "";
6340
6333
  };
6334
+ GanttView.prototype.onTaskAreaSizeChanged = function (info) {
6335
+ if (this.ganttOwner.onTaskAreaSizeChanged)
6336
+ this.ganttOwner.onTaskAreaSizeChanged(info);
6337
+ };
6341
6338
  GanttView.prototype.showTaskEditDialog = function () {
6342
6339
  this.commandManager.showTaskEditDialog.execute();
6343
6340
  };
@@ -7448,12 +7445,11 @@ var EllipsisHelper = (function () {
7448
7445
  return text;
7449
7446
  var pdfTextWidth = pdfDoc.getTextWidth(text.toString());
7450
7447
  if (pdfTextWidth > size) {
7451
- var outputText = EllipsisHelper.ellipsis;
7452
- var pos = 0;
7453
- while (pdfDoc.getTextWidth(outputText) < size) {
7454
- var char = text[pos];
7455
- outputText = outputText.substr(0, pos) + char + outputText.substr(pos);
7456
- 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--;
7457
7453
  }
7458
7454
  return outputText;
7459
7455
  }
@@ -12401,7 +12397,7 @@ var TaskAreaExportHelper = (function () {
12401
12397
  Object.defineProperty(TaskAreaExportHelper.prototype, "customRangeLeftOffset", {
12402
12398
  get: function () {
12403
12399
  var _a;
12404
- (_a = this._customRangeLeftOffset) !== null && _a !== void 0 ? _a : (this._customRangeLeftOffset = this.layoutCalculator.getDistanceBetweenDates(this.startDate, this.ownerStartDate));
12400
+ (_a = this._customRangeLeftOffset) !== null && _a !== void 0 ? _a : (this._customRangeLeftOffset = this.layoutCalculator.getWidthByDateRange(this.startDate, this.ownerStartDate));
12405
12401
  return this._customRangeLeftOffset;
12406
12402
  },
12407
12403
  enumerable: false,
@@ -15440,8 +15436,11 @@ var PdfGanttTableDrawer = (function () {
15440
15436
  this._pdfDoc = pdfDoc;
15441
15437
  }
15442
15438
  PdfGanttTableDrawer.prototype.drawTable = function (info) {
15439
+ var _a, _b;
15443
15440
  if (info) {
15444
15441
  var options = this.createTableOptions(info);
15442
+ if ((_a = info.style) === null || _a === void 0 ? void 0 : _a.fontSize)
15443
+ this._pdfDoc.setFontSize((_b = info.style) === null || _b === void 0 ? void 0 : _b.fontSize);
15445
15444
  this._pdfDoc.autoTable(options.getValue());
15446
15445
  }
15447
15446
  };
@@ -16146,7 +16145,16 @@ var RenderHelper = (function () {
16146
16145
  parent.appendChild(this._taskArea);
16147
16146
  };
16148
16147
  RenderHelper.prototype.setSizeForTaskArea = function () {
16149
- this._taskAreaRender.setSizeForTaskArea();
16148
+ var width = this.getTaskAreaWidth();
16149
+ var height = this.getTaskAreaHeight();
16150
+ this._taskAreaRender.setSizeForTaskArea(width, height);
16151
+ this._ganttView.onTaskAreaSizeChanged({ width: width, height: height });
16152
+ };
16153
+ RenderHelper.prototype.getTaskAreaWidth = function () {
16154
+ return this.gridLayoutCalculator.getTotalWidth();
16155
+ };
16156
+ RenderHelper.prototype.getTaskAreaHeight = function () {
16157
+ return this.gridLayoutCalculator.getVerticalGridLineHeight();
16150
16158
  };
16151
16159
  RenderHelper.prototype.getTaskAreaContainerScrollLeft = function () {
16152
16160
  return this._taskAreaRender.taskAreaContainer.scrollLeft;
@@ -16172,9 +16180,6 @@ var RenderHelper = (function () {
16172
16180
  RenderHelper.prototype.getSmallTaskWidth = function (etalonPaddingLeft) {
16173
16181
  return this._taskRender.getSmallTaskWidth(etalonPaddingLeft);
16174
16182
  };
16175
- RenderHelper.prototype.getTaskAreaWidth = function () {
16176
- return this._taskAreaRender.getTaskAreaWidth();
16177
- };
16178
16183
  RenderHelper.prototype.createTaskElement = function (index) {
16179
16184
  this._taskRender.createTaskElement(index, this._ganttView.settings.taskContentTemplate);
16180
16185
  };
@@ -18454,15 +18459,9 @@ var TaskAreaRender = (function () {
18454
18459
  TaskAreaRender.prototype.getTaskAreaBordersDictionary = function (isVertical) {
18455
18460
  return isVertical ? this.vertTaskAreaBorders : this.horTaskAreaBorders;
18456
18461
  };
18457
- TaskAreaRender.prototype.setSizeForTaskArea = function () {
18458
- this.taskArea.style.width = this.getTaskAreaWidth() + "px";
18459
- this.taskArea.style.height = this.getTaskAreaHeight() + "px";
18460
- };
18461
- TaskAreaRender.prototype.getTaskAreaWidth = function () {
18462
- return this.gridLayoutCalculator.getTotalWidth();
18463
- };
18464
- TaskAreaRender.prototype.getTaskAreaHeight = function () {
18465
- return this.gridLayoutCalculator.getVerticalGridLineHeight();
18462
+ TaskAreaRender.prototype.setSizeForTaskArea = function (width, height) {
18463
+ this.taskArea.style.width = width + "px";
18464
+ this.taskArea.style.height = height + "px";
18466
18465
  };
18467
18466
  TaskAreaRender.prototype.createHighlightRowElement = function (index) {
18468
18467
  var hlRowInfo = this.gridLayoutCalculator.getHighlightRowInfo(index);
@@ -20450,6 +20449,13 @@ var Task = (function (_super) {
20450
20449
  _this.color = "";
20451
20450
  return _this;
20452
20451
  }
20452
+ Object.defineProperty(Task.prototype, "normalizedProgress", {
20453
+ get: function () {
20454
+ return Math.max(Math.min(this.progress, 100), 0);
20455
+ },
20456
+ enumerable: false,
20457
+ configurable: true
20458
+ });
20453
20459
  Task.prototype.assignFromObject = function (sourceObj) {
20454
20460
  if ((0, common_1.isDefined)(sourceObj)) {
20455
20461
  _super.prototype.assignFromObject.call(this, sourceObj);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.1.10
4
- * Build date: Fri Feb 04 2022
3
+ * Version: 4.1.14
4
+ * Build date: Tue Feb 22 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