devexpress-gantt 4.1.49 → 4.1.51

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.49
4
- * Build date: Thu Sep 14 2023
3
+ * Version: 4.1.51
4
+ * Build date: Fri Dec 08 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 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.49
4
- * Build date: Thu Sep 14 2023
3
+ * Version: 4.1.51
4
+ * Build date: Fri Dec 08 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -8948,6 +8948,7 @@ exports.Task = void 0;
8948
8948
  var tslib_1 = __webpack_require__(655);
8949
8949
  var common_1 = __webpack_require__(2491);
8950
8950
  var DataObject_1 = __webpack_require__(6124);
8951
+ var invalidDateMillseconds = -8000000000000000;
8951
8952
  var Task = (function (_super) {
8952
8953
  tslib_1.__extends(Task, _super);
8953
8954
  function Task() {
@@ -8980,8 +8981,8 @@ var Task = (function (_super) {
8980
8981
  this.parentId = (0, common_1.isDefined)(sourceObj.parentId) ? String(sourceObj.parentId) : null;
8981
8982
  this.description = sourceObj.description;
8982
8983
  this.title = sourceObj.title;
8983
- this.start = typeof sourceObj.start === "string" ? new Date(sourceObj.start) : sourceObj.start || new Date(0);
8984
- this.end = typeof sourceObj.end === "string" ? new Date(sourceObj.end) : sourceObj.end || new Date(0);
8984
+ this.start = typeof sourceObj.start === "string" ? new Date(sourceObj.start) : sourceObj.start || this.createInvalidDate();
8985
+ this.end = typeof sourceObj.end === "string" ? new Date(sourceObj.end) : sourceObj.end || this.createInvalidDate();
8985
8986
  this.duration = sourceObj.duration;
8986
8987
  this.progress = sourceObj.progress;
8987
8988
  this.taskType = sourceObj.taskType;
@@ -9007,8 +9008,14 @@ var Task = (function (_super) {
9007
9008
  Task.prototype.getDuration = function () {
9008
9009
  return this.end.getTime() - this.start.getTime();
9009
9010
  };
9011
+ Task.prototype.isValidStart = function () { return this.isValidTaskaDte(this.start); };
9012
+ Task.prototype.isValidEnd = function () { return this.isValidTaskaDte(this.end); };
9010
9013
  Task.prototype.isValid = function () {
9011
- return !!this.start.getTime() && !!this.end.getTime();
9014
+ return this.isValidStart() && this.isValidEnd();
9015
+ };
9016
+ Task.prototype.createInvalidDate = function () { return new Date(invalidDateMillseconds); };
9017
+ Task.prototype.isValidTaskaDte = function (value) {
9018
+ return !!value && value.getTime() !== invalidDateMillseconds;
9012
9019
  };
9013
9020
  return Task;
9014
9021
  }(DataObject_1.DataObject));
@@ -11161,8 +11168,8 @@ var ViewVisualModel = (function () {
11161
11168
  var parentId = rootId && task.parentId === rootId ? task.parentId : parentTask === null || parentTask === void 0 ? void 0 : parentTask.id;
11162
11169
  var taskObject = {
11163
11170
  id: task.id,
11164
- start: task.start,
11165
- end: task.end,
11171
+ start: task.isValidStart() ? task.start : null,
11172
+ end: task.isValidEnd() ? task.end : null,
11166
11173
  duration: task.duration,
11167
11174
  description: task.description,
11168
11175
  parentId: parentId,
@@ -11562,7 +11569,7 @@ var ViewVisualModel = (function () {
11562
11569
  end !== null && end !== void 0 ? end : (end = this._viewItemList.length - 1);
11563
11570
  for (var i = start; i <= end; i++) {
11564
11571
  var item = this._viewItemList[i];
11565
- if ((item === null || item === void 0 ? void 0 : item.getVisible()) && ((_a = item === null || item === void 0 ? void 0 : item.task) === null || _a === void 0 ? void 0 : _a.isValid))
11572
+ if ((item === null || item === void 0 ? void 0 : item.getVisible()) && ((_a = item === null || item === void 0 ? void 0 : item.task) === null || _a === void 0 ? void 0 : _a.isValid()))
11566
11573
  result.push(i);
11567
11574
  }
11568
11575
  return result;
@@ -17591,7 +17598,8 @@ var ScaleCalculator = (function () {
17591
17598
  var nextDate = this.getNextScaleDate(currentDate, scaleType);
17592
17599
  var isStart = currentDate.getTime() === this.range.start.getTime();
17593
17600
  var isEnd = nextDate.getTime() >= this.range.end.getTime();
17594
- var width = isStart || isEnd ? this.getRangeTickCount(currentDate, nextDate) * defWidth : defWidth;
17601
+ var needWidthCorrection = isStart || isEnd || (scaleType > Enums_1.ViewType.Hours && DateUtils_1.DateUtils.hasDST());
17602
+ var width = needWidthCorrection ? this.getRangeTickCount(currentDate, nextDate) * defWidth : defWidth;
17595
17603
  items.push(new ScaleItemInfo(currentDate, nextDate, new point_1.Point(x, undefined), new size_1.Size(width, 0)));
17596
17604
  currentDate = nextDate;
17597
17605
  x += width;
@@ -19717,6 +19725,8 @@ var TaskRender = (function () {
19717
19725
  if (!viewItem.task.isValid() || !viewItem.visible) {
19718
19726
  var taskDependencies = this.getTaskDependencies(viewItem.task.internalId);
19719
19727
  this.addInvalidTaskDependencies(taskDependencies);
19728
+ if (viewItem.selected)
19729
+ this.createTaskSelectionElement(index);
19720
19730
  return;
19721
19731
  }
19722
19732
  if (!viewItem.isCustom)
@@ -20507,7 +20517,7 @@ var DateUtils = (function () {
20507
20517
  return DateUtils.getRangeMSPeriod(start, end) / DateUtils.getTickTimeSpan(scaleType);
20508
20518
  };
20509
20519
  DateUtils.getRangeMSPeriod = function (start, end) {
20510
- return end.getTime() - DateUtils.getDSTDelta(start, end) - start.getTime();
20520
+ return end.getTime() - DateUtils.getDSTTotalDelta(start, end) - start.getTime();
20511
20521
  };
20512
20522
  DateUtils.getRangeTickCountInMonthsViewType = function (start, end) {
20513
20523
  var startMonthStartDate = new Date(start.getFullYear(), start.getMonth(), 1);
@@ -20543,11 +20553,39 @@ var DateUtils = (function () {
20543
20553
  var timeZoneDiff = DateUtils.getTimezoneOffsetDiff(start, end) * DateUtils.msPerMinute;
20544
20554
  return timeZoneDiff > 0 ? timeZoneDiff : 0;
20545
20555
  };
20556
+ DateUtils.getDSTTotalDelta = function (start, end) {
20557
+ if (!DateUtils.hasDST())
20558
+ return 0;
20559
+ var refDate = start;
20560
+ var delta = 0;
20561
+ var year = refDate.getFullYear();
20562
+ var month = refDate.getMonth();
20563
+ while (refDate < end) {
20564
+ if (month >= 5) {
20565
+ year++;
20566
+ month = 0;
20567
+ }
20568
+ else
20569
+ month = 5;
20570
+ var newRefDate = new Date(year, month, 1);
20571
+ if (newRefDate > end)
20572
+ newRefDate = end;
20573
+ delta += DateUtils.getDSTDelta(refDate, newRefDate);
20574
+ refDate = newRefDate;
20575
+ }
20576
+ return delta;
20577
+ };
20546
20578
  DateUtils.getDSTCorrectedTaskEnd = function (start, period) {
20547
20579
  var time = start.getTime() + period;
20548
- var delta = DateUtils.getDSTDelta(start, new Date(time));
20580
+ var delta = DateUtils.getDSTTotalDelta(start, new Date(time));
20549
20581
  return new Date(time + delta);
20550
20582
  };
20583
+ DateUtils.hasDST = function () {
20584
+ var year = (new Date()).getFullYear();
20585
+ var firstJan = new Date(year, 0, 1);
20586
+ var firstJune = new Date(year, 5, 1);
20587
+ return DateUtils.getTimezoneOffsetDiff(firstJan, firstJune) !== 0;
20588
+ };
20551
20589
  DateUtils.msPerMinute = 60 * 1000;
20552
20590
  DateUtils.msPerHour = 3600000;
20553
20591
  DateUtils.msPerDay = 24 * DateUtils.msPerHour;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.1.49
4
- * Build date: Thu Sep 14 2023
3
+ * Version: 4.1.51
4
+ * Build date: Fri Dec 08 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs