devexpress-gantt 4.0.0 → 4.0.4

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,9 +1,9 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.0.0
4
- * Build date: Thu Dec 02 2021
3
+ * Version: 4.0.4
4
+ * Build date: Thu Jan 20 2022
5
5
  *
6
- * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
6
+ * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
8
8
  */
9
9
  .dx-gantt-tsac{position:relative;overflow:hidden;background-color:white;z-index:6}.dx-gantt-tsa{position:relative}.dx-gantt-hb{position:absolute;left:0;height:0;z-index:6}.dx-gantt-vb{position:absolute;top:0;width:0;z-index:6}.dx-gantt-tm,.dx-gantt-ti,.dx-gantt-tc{position:absolute;top:0;z-index:6}.dx-gantt-tm:before,.dx-gantt-ti:before,.dx-gantt-tc:before{content:"";position:absolute;top:0;width:6px;margin-left:-3px;z-index:6;height:100%}.dx-gantt-si{position:absolute;top:0;white-space:nowrap;box-sizing:border-box}.dx-gantt-taskWrapper,.dx-gantt-milestoneWrapper,.dx-gantt-taskResWrapper{position:absolute;z-index:10;vertical-align:top;white-space:nowrap}.dx-gantt-taskWrapper>div{vertical-align:top}.dx-gantt-taskResWrapper{pointer-events:none}.dx-gantt-task{position:relative;display:inline-block;white-space:nowrap;vertical-align:top}.dx-gantt-tPrg{position:absolute;top:0;height:100%;z-index:0}.dx-gantt-taskTitle,.dx-gantt-taskRes{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dx-gantt-titleIn{position:relative;width:100%;z-index:1}.dx-gantt-titleOut{display:inline-block;width:500px;margin-left:-500px;text-align:right;text-overflow:ellipsis}.dx-gantt-taskRes{display:inline-block;overflow:hidden}.dx-gantt-task,.dx-gantt-taskTitle,.dx-gantt-titleOut,.dx-gantt-taskRes{box-sizing:border-box}.dx-gantt-sel{position:absolute;z-index:5}.dx-gantt-task.dx-gantt-milestone{transform:rotate(45deg);border-radius:0 !important;padding:0}.dx-gantt-task.dx-gantt-smallTask{text-align:center}.dx-gantt-task.dx-gantt-smallTask .dx-gantt-titleIn{padding:0;visibility:hidden}.dx-gantt-conn-h,.dx-gantt-conn-v,.dx-gantt-arrow{position:absolute;z-index:9}.dx-gantt-conn-v{top:0;width:4px;cursor:pointer;border-left-width:1px;border-left-style:solid}.dx-gantt-conn-v.active{border-left-width:2px !important}.dx-gantt-conn-h{left:0;height:4px;cursor:pointer;border-top-width:1px;border-top-style:solid}.dx-gantt-conn-h.active{border-top-width:2px !important}.dx-gantt-arrow{width:0;height:0}.dx-gantt-arrow.dx-gantt-TA{border-left-color:transparent !important;border-right-color:transparent !important;border-top-color:transparent !important}.dx-gantt-arrow.dx-gantt-RA{border-right-color:transparent !important;border-top-color:transparent !important;border-bottom-color:transparent !important}.dx-gantt-arrow.dx-gantt-BA{border-left-color:transparent !important;border-right-color:transparent !important;border-bottom-color:transparent !important}.dx-gantt-arrow.dx-gantt-LA{border-left-color:transparent !important;border-top-color:transparent !important;border-bottom-color:transparent !important}.dx-gantt-nwi{position:absolute;z-index:3}.dx-gantt-altRow{position:absolute;z-index:2}.dx-gantt-task-edit-wrapper{padding-left:1px}.dx-gantt-task-edit-wrapper,.dx-gantt-task-edit-wrapper-successor{position:absolute;z-index:11}.dx-gantt-task-edit-wrapper-custom{background-color:rgba(90,84,84,0.3)}.dx-gantt-task-edit-wrapper-custom.hide-updating{background-color:transparent;pointer-events:none}.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-frame,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-frame{border:none !important}#dx-gantt-ta.ms-pointer-active,#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame,#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame div{-webkit-appearance:none;-ms-touch-action:none;touch-action:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;-moz-user-select:none}.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-start,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-end,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-start,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-end{display:none}.dx-gantt-task-edit-frame,.dx-gantt-task-edit-frame-successor{box-sizing:border-box;height:100%;width:100%;position:absolute;z-index:9}.dx-gantt-task-edit-frame{border:1px solid #269aff}.dx-gantt-task-edit-progress{position:absolute;width:0;height:0;bottom:0;cursor:pointer;border-style:solid;border-width:0 6px 9px 6px;border-color:transparent transparent #269aff transparent;z-index:10}.dx-gantt-task-edit-progress:before{content:"";width:10px;height:4px;background-color:white;position:absolute;bottom:-14px;left:-6px;border:1px solid #269aff;border-top:none}.dx-gantt-task-edit-progress div{position:absolute;bottom:0;cursor:pointer;border-style:solid;border-width:0 5px 7px 5px;border-color:transparent transparent white transparent;z-index:9;top:2px;left:-5px;pointer-events:none}.dx-gantt-task-edit-tooltip{position:absolute;font-family:sans-serif;width:max-content;line-height:16px;font-size:12px;border-radius:2px;display:none;z-index:12}.dx-gantt-task-edit-tooltip-default{padding:6px;color:white;background-color:rgba(0,0,0,0.64)}.dx-gantt-task-edit-tooltip-after:after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:6px solid rgba(0,0,0,0.64);top:-6px;position:absolute}.dx-gantt-task-edit-tooltip-before:before{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid rgba(0,0,0,0.64);bottom:-6px;position:absolute}.dx-gantt-task-edit-tooltip .dx-gantt-task-title{padding-bottom:3px}.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child{padding-right:3px}.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child,.dx-gantt-task-edit-tooltip .dx-gantt-status-time span:first-child,.dx-gantt-task-edit-tooltip .dx-gantt-task-title{font-weight:600}.dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-successor-dependency-r,.dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-successor-dependency-l{position:absolute;border-radius:50%;top:5px;width:8px;height:8px;background:white;border:1px solid #269aff;cursor:pointer}.dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-successor-dependency-r{left:-10px}.dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-successor-dependency-l{right:-10px}.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch{top:3px;width:11px;height:11px}.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch{left:-15px}.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch{right:-15px}.dx-gantt-task-edit-start,.dx-gantt-task-edit-end{position:absolute;height:100%;width:5px;top:0;cursor:col-resize}.dx-gantt-task-edit-end{right:0}.dx-gantt-task-edit-dependency-line{height:2px;background-color:#269aff;position:absolute;transform-origin:0% 0%;z-index:9}.dx-gantt-touch-action{touch-action:none}
package/dist/dx-gantt.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.0.0
4
- * Build date: Thu Dec 02 2021
3
+ * Version: 4.0.4
4
+ * Build date: Thu Jan 20 2022
5
5
  *
6
- * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
6
+ * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -1796,6 +1796,7 @@ var TaskAreaStateEventNames = (function () {
1796
1796
  TaskAreaStateEventNames.TASK_AREA_ZOOM_IN = "taskAreaZoomIn";
1797
1797
  TaskAreaStateEventNames.TASK_AREA_ZOOM_OUT = "taskAreaZoomOut";
1798
1798
  TaskAreaStateEventNames.CONTEXTMENU_SHOW = "contextMenuShow";
1799
+ TaskAreaStateEventNames.CONTEXTMENU_HIDE = "contextMenuHide";
1799
1800
  TaskAreaStateEventNames.DEPENDENCY_SELECTION = "dependencySelection";
1800
1801
  TaskAreaStateEventNames.STATE_EXIT = "stateExit";
1801
1802
  TaskAreaStateEventNames.TASK_SELECTION = "taskSelection";
@@ -2499,7 +2500,7 @@ var CollectionBase = (function () {
2499
2500
  this.createItemFromObjectAndAdd(source);
2500
2501
  };
2501
2502
  CollectionBase.prototype.createItemFromObjectAndAdd = function (source) {
2502
- if ((0, common_1.isDefined)(source)) {
2503
+ if ((0, common_1.isDefined)(source) && Object.keys(source).length > 0) {
2503
2504
  var item = this.createItem();
2504
2505
  item.assignFromObject(source);
2505
2506
  this.add(item);
@@ -2870,7 +2871,7 @@ var GridLayoutCalculator = (function () {
2870
2871
  var viewItem = this.getViewItem(index);
2871
2872
  if (viewItem.task.isMilestone() && !viewItem.isCustom)
2872
2873
  return this.milestoneWidth;
2873
- if (this.viewModel.isTaskToCalculateByChildren(viewItem.task.id))
2874
+ if (this.viewModel.isTaskToCalculateByChildren(viewItem.task.internalId))
2874
2875
  return this.parentTaskHeight;
2875
2876
  return (viewItem.isCustom && viewItem.size.height) ? viewItem.size.height : this.taskHeight;
2876
2877
  };
@@ -5232,8 +5233,7 @@ var TaskEditController = (function () {
5232
5233
  enumerable: false,
5233
5234
  configurable: true
5234
5235
  });
5235
- TaskEditController.prototype.show = function (taskIndex, delay) {
5236
- if (delay === void 0) { delay = 0; }
5236
+ TaskEditController.prototype.show = function (taskIndex) {
5237
5237
  if (this.isEditingInProgress || this.disableTaskEditBox)
5238
5238
  return;
5239
5239
  this.taskIndex = taskIndex;
@@ -5244,21 +5244,20 @@ var TaskEditController = (function () {
5244
5244
  if (this.task.isMilestone() && !this.viewItem.isCustom)
5245
5245
  this.baseElement.className = this.baseElement.className + " milestone";
5246
5246
  else {
5247
- var isHideTaskEditBox = !this.ganttSettings.editing.enabled || !this.ganttSettings.editing.allowTaskUpdate;
5248
- if (isHideTaskEditBox)
5247
+ if (!this.isTaskUpdateAllowed())
5249
5248
  this.baseElement.className = this.baseElement.className + " hide-updating";
5250
- if (this.viewItem.isCustom) {
5249
+ if (this.viewItem.isCustom)
5251
5250
  this.baseElement.classList.add(TaskEditController.CLASSNAMES.TASK_EDIT_BOX_CUSTOM);
5252
- delay = this.showInfoDelay;
5253
- }
5254
5251
  }
5252
+ var delay = this.settings.getGanttSettings().editing.taskHoverDelay || 0;
5255
5253
  this.taskDateRange = new DateRange_1.DateRange(this.task.start, this.task.end);
5256
5254
  this.displayTaskEditBox(delay);
5257
5255
  this.displayProgressEdit();
5258
5256
  this.displayStartEndEditElements();
5259
5257
  };
5260
5258
  TaskEditController.prototype.displayStartEndEditElements = function () {
5261
- if (!this.canUpdateTask()) {
5259
+ var showElements = this.isTaskUpdateAllowed() && this.canUpdateTask();
5260
+ if (!showElements) {
5262
5261
  this.startEdit.style.display = "none";
5263
5262
  this.endEdit.style.display = "none";
5264
5263
  }
@@ -5268,8 +5267,7 @@ var TaskEditController = (function () {
5268
5267
  }
5269
5268
  };
5270
5269
  TaskEditController.prototype.displayProgressEdit = function () {
5271
- var isEditingAllowed = this.ganttSettings.editing.enabled && this.ganttSettings.editing.allowTaskUpdate;
5272
- if (!this.viewItem.isCustom && this.canUpdateTask() && isEditingAllowed && this.wrapInfo.size.width > this.wrapInfo.size.height) {
5270
+ if (!this.viewItem.isCustom && this.canUpdateTask() && this.isTaskUpdateAllowed() && this.wrapInfo.size.width > this.wrapInfo.size.height) {
5273
5271
  this.progressEdit.style.display = "block";
5274
5272
  this.progressEdit.style.left = ((this.task.progress / 100) * this.wrapInfo.size.width - (this.progressEdit.offsetWidth / 2)) + "px";
5275
5273
  }
@@ -5344,6 +5342,8 @@ var TaskEditController = (function () {
5344
5342
  this.successorIndex = -1;
5345
5343
  };
5346
5344
  TaskEditController.prototype.processProgress = function (position) {
5345
+ if (!this.isTaskUpdateAllowed())
5346
+ return;
5347
5347
  this.isEditingInProgress = true;
5348
5348
  var progressOffset = position.x - this.wrapInfo.position.x;
5349
5349
  var progress = 0;
@@ -5357,11 +5357,15 @@ var TaskEditController = (function () {
5357
5357
  this.tooltip.showProgress(progress, dom_1.DomUtils.getAbsolutePositionX(this.progressEdit) + this.progressEdit.offsetWidth / 2);
5358
5358
  };
5359
5359
  TaskEditController.prototype.confirmProgress = function () {
5360
- this.isEditingInProgress = false;
5361
- var progress = Math.round((this.progressEdit.offsetLeft + (this.progressEdit.offsetWidth / 2)) / this.wrapInfo.size.width * 100);
5362
- this.commandManager.changeTaskProgressCommand.execute(this.taskId, progress);
5360
+ if (this.isTaskUpdateAllowed()) {
5361
+ this.isEditingInProgress = false;
5362
+ var progress = Math.round((this.progressEdit.offsetLeft + (this.progressEdit.offsetWidth / 2)) / this.wrapInfo.size.width * 100);
5363
+ this.commandManager.changeTaskProgressCommand.execute(this.taskId, progress);
5364
+ }
5363
5365
  };
5364
5366
  TaskEditController.prototype.processEnd = function (position) {
5367
+ if (!this.isTaskUpdateAllowed())
5368
+ return;
5365
5369
  this.baseElement.className = this.baseElement.className + " move";
5366
5370
  this.isEditingInProgress = true;
5367
5371
  var positionX = position.x > this.wrapInfo.position.x ? position.x : this.wrapInfo.position.x;
@@ -5377,13 +5381,17 @@ var TaskEditController = (function () {
5377
5381
  this.tooltip.showTime(startDate, this.taskDateRange.end, dom_1.DomUtils.getAbsolutePositionX(this.baseElement) + this.baseElement.clientWidth);
5378
5382
  };
5379
5383
  TaskEditController.prototype.confirmEnd = function () {
5380
- this.baseElement.className = TaskEditController.CLASSNAMES.TASK_EDIT_BOX;
5381
- this.isEditingInProgress = false;
5382
- this.commandManager.changeTaskEndCommand.execute(this.taskId, this.taskDateRange.end);
5383
- this.hide();
5384
- this.updateWrapInfo();
5384
+ if (this.isTaskUpdateAllowed()) {
5385
+ this.baseElement.className = TaskEditController.CLASSNAMES.TASK_EDIT_BOX;
5386
+ this.isEditingInProgress = false;
5387
+ this.commandManager.changeTaskEndCommand.execute(this.taskId, this.taskDateRange.end);
5388
+ this.hide();
5389
+ this.updateWrapInfo();
5390
+ }
5385
5391
  };
5386
5392
  TaskEditController.prototype.processStart = function (position) {
5393
+ if (!this.isTaskUpdateAllowed())
5394
+ return;
5387
5395
  this.baseElement.className = this.baseElement.className + " move";
5388
5396
  this.isEditingInProgress = true;
5389
5397
  var positionX = position.x < this.wrapInfo.position.x + this.wrapInfo.size.width ? position.x : this.wrapInfo.position.x + this.wrapInfo.size.width;
@@ -5400,14 +5408,16 @@ var TaskEditController = (function () {
5400
5408
  this.tooltip.showTime(this.taskDateRange.start, endDate, dom_1.DomUtils.getAbsolutePositionX(this.baseElement));
5401
5409
  };
5402
5410
  TaskEditController.prototype.confirmStart = function () {
5403
- this.baseElement.className = TaskEditController.CLASSNAMES.TASK_EDIT_BOX;
5404
- this.isEditingInProgress = false;
5405
- this.commandManager.changeTaskStartCommand.execute(this.taskId, this.taskDateRange.start);
5406
- this.hide();
5407
- this.updateWrapInfo();
5411
+ if (this.isTaskUpdateAllowed()) {
5412
+ this.baseElement.className = TaskEditController.CLASSNAMES.TASK_EDIT_BOX;
5413
+ this.isEditingInProgress = false;
5414
+ this.commandManager.changeTaskStartCommand.execute(this.taskId, this.taskDateRange.start);
5415
+ this.hide();
5416
+ this.updateWrapInfo();
5417
+ }
5408
5418
  };
5409
5419
  TaskEditController.prototype.processMove = function (delta) {
5410
- if (this.ganttSettings.editing.enabled && this.ganttSettings.editing.allowTaskUpdate && this.isTaskEditBoxShown) {
5420
+ if (this.isTaskUpdateAllowed() && this.isTaskEditBoxShown) {
5411
5421
  this.baseElement.className = this.baseElement.className + " move";
5412
5422
  var left = this.baseElement.offsetLeft + delta;
5413
5423
  this.baseElement.style.left = left + "px";
@@ -5435,7 +5445,7 @@ var TaskEditController = (function () {
5435
5445
  this.taskDateRange.end = newEnd;
5436
5446
  };
5437
5447
  TaskEditController.prototype.confirmMove = function () {
5438
- if (this.ganttSettings.editing.enabled && this.ganttSettings.editing.allowTaskUpdate) {
5448
+ if (this.isTaskUpdateAllowed()) {
5439
5449
  if (!this.ganttSettings.editing.allowDependencyInsert)
5440
5450
  this.baseElement.className = this.baseElement.className + " hide-dependency";
5441
5451
  if (this.isEditingInProgress) {
@@ -5567,6 +5577,10 @@ var TaskEditController = (function () {
5567
5577
  TaskEditController.prototype.canUpdateTask = function () {
5568
5578
  return !this.viewModel.isTaskToCalculateByChildren(this.task.internalId);
5569
5579
  };
5580
+ TaskEditController.prototype.isTaskUpdateAllowed = function () {
5581
+ var settings = this.ganttSettings.editing;
5582
+ return settings.enabled && settings.allowTaskUpdate;
5583
+ };
5570
5584
  TaskEditController.prototype.detachEvents = function () {
5571
5585
  var _a;
5572
5586
  (_a = this.baseElement) === null || _a === void 0 ? void 0 : _a.removeEventListener("mouseleave", this.onMouseLeaveHandler);
@@ -5758,6 +5772,10 @@ var GanttView = (function () {
5758
5772
  GanttView.prototype.showPopupMenu = function (info) {
5759
5773
  this.ganttOwner.showPopupMenu(info);
5760
5774
  };
5775
+ GanttView.prototype.hidePopupMenu = function () {
5776
+ if (this.ganttOwner.hidePopupMenu)
5777
+ this.ganttOwner.hidePopupMenu();
5778
+ };
5761
5779
  GanttView.prototype.collapseAll = function () {
5762
5780
  this.ganttOwner.collapseAll();
5763
5781
  };
@@ -12129,12 +12147,15 @@ var ScaleCalculator = (function () {
12129
12147
  ScaleCalculator.prototype.getScaleIndexByPos = function (pos, scaleType) {
12130
12148
  scaleType !== null && scaleType !== void 0 ? scaleType : (scaleType = this.viewType);
12131
12149
  var items = scaleType === this.viewType ? this.bottomScaleItems : this.topScaleItems;
12132
- for (var i = 0; i < items.length; i++) {
12133
- var item = items[i];
12134
- if (pos >= item.position.x && pos <= item.position.x + item.size.width)
12135
- return i;
12150
+ var index = -1;
12151
+ if (items.findIndex)
12152
+ index = items.findIndex(function (i) { return pos >= i.position.x && pos <= i.position.x + i.size.width; });
12153
+ else {
12154
+ var item = items.filter(function (i) { return pos >= i.position.x && pos <= i.position.x + i.size.width; })[0];
12155
+ if (item)
12156
+ index = items.indexOf(item);
12136
12157
  }
12137
- return -1;
12158
+ return index;
12138
12159
  };
12139
12160
  ScaleCalculator.prototype.getScaleBorderPosition = function (index, scaleType) {
12140
12161
  var item = this.getScaleItems(scaleType)[index];
@@ -12229,14 +12250,27 @@ var ScaleCalculator = (function () {
12229
12250
  };
12230
12251
  ScaleCalculator.prototype.calculateTopScale = function (scaleType) {
12231
12252
  var items = new Array();
12232
- var currentDate = this.range.start;
12233
- var x = 0;
12234
- while (currentDate.getTime() < this.range.end.getTime()) {
12235
- var nextDate = this.getNextScaleDate(currentDate, scaleType);
12236
- var width = this.getPosInScale(nextDate) - this.getPosInScale(currentDate);
12237
- items.push(new ScaleItemInfo(currentDate, nextDate, new point_1.Point(x, undefined), new size_1.Size(width, 0)));
12238
- currentDate = nextDate;
12239
- x += width;
12253
+ var endRangeTime = this.range.end.getTime();
12254
+ var itemStartDate = this.range.start;
12255
+ var itemStartPos = 0;
12256
+ var lastBottomIndex = 0;
12257
+ while (itemStartDate.getTime() < endRangeTime) {
12258
+ var itemNextDate = this.getNextScaleDate(itemStartDate, scaleType);
12259
+ var nextDateTime = itemNextDate.getTime();
12260
+ for (var i = lastBottomIndex; i < this.bottomScaleItems.length; i++) {
12261
+ var item = this.bottomScaleItems[i];
12262
+ var startTime = item.start.getTime();
12263
+ var endTime = item.end.getTime();
12264
+ var isNextDateInItem = nextDateTime >= startTime && nextDateTime <= endTime;
12265
+ if (isNextDateInItem) {
12266
+ var itemEndPos = (nextDateTime - startTime) / (endTime - startTime) * item.size.width + item.position.x;
12267
+ items.push(new ScaleItemInfo(itemStartDate, itemNextDate, new point_1.Point(itemStartPos, undefined), new size_1.Size(itemEndPos - itemStartPos, 0)));
12268
+ lastBottomIndex = i;
12269
+ itemStartPos = itemEndPos;
12270
+ itemStartDate = itemNextDate;
12271
+ break;
12272
+ }
12273
+ }
12240
12274
  }
12241
12275
  return items;
12242
12276
  };
@@ -12254,18 +12288,6 @@ var ScaleCalculator = (function () {
12254
12288
  }
12255
12289
  return new Date(this.range.end);
12256
12290
  };
12257
- ScaleCalculator.prototype.getPosInScale = function (date) {
12258
- var time = date.getTime();
12259
- for (var i = 0; i < this.bottomScaleItems.length; i++) {
12260
- var item = this.bottomScaleItems[i];
12261
- var startTime = item.start.getTime();
12262
- var endTime = item.end.getTime();
12263
- var width = item.size.width;
12264
- if (time >= startTime && time <= endTime)
12265
- return (time - startTime) / (endTime - startTime) * width + item.position.x;
12266
- }
12267
- return 0;
12268
- };
12269
12291
  ScaleCalculator.prototype.getNextScaleDate = function (start, scaleType) {
12270
12292
  var date;
12271
12293
  switch (scaleType) {
@@ -17582,7 +17604,10 @@ var TaskAreaDefaultState = (function (_super) {
17582
17604
  function TaskAreaDefaultState() {
17583
17605
  return _super !== null && _super.apply(this, arguments) || this;
17584
17606
  }
17585
- TaskAreaDefaultState.prototype.finish = function () { this.clearTimers(); };
17607
+ TaskAreaDefaultState.prototype.finish = function () {
17608
+ this.clearTimers();
17609
+ this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE);
17610
+ };
17586
17611
  TaskAreaDefaultState.prototype.onMouseDownInternal = function (evt) { this.onPointerDownBase(evt); };
17587
17612
  TaskAreaDefaultState.prototype.onDocumentPointerDownInternal = function (evt) { this.onPointerDownBase(evt); };
17588
17613
  TaskAreaDefaultState.prototype.onDocumentPointerUpInternal = function (evt) { this.onPointerUpBase(evt); };
@@ -17598,7 +17623,11 @@ var TaskAreaDefaultState = (function (_super) {
17598
17623
  if (isMouse)
17599
17624
  this.changeSelectionOnTouchDown(evt);
17600
17625
  else {
17601
- setTimeout(function () { return _this.changeSelectionOnTouchDown(evt); }, 0);
17626
+ setTimeout(function () {
17627
+ if (!TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt))
17628
+ _this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE, evt);
17629
+ _this.changeSelectionOnTouchDown(evt);
17630
+ }, 0);
17602
17631
  clearTimeout(this._contextMenuTimer);
17603
17632
  this._contextMenuTimer = setTimeout(function () { return _this.showContextMenuOnTouchDown(evt); }, TaskAreaDefaultState.defaultContextMenuTimeout);
17604
17633
  }
@@ -17613,6 +17642,8 @@ var TaskAreaDefaultState = (function (_super) {
17613
17642
  if (!this._lastEmulatedClickTime) {
17614
17643
  var clickCanceled = !this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_CLICK, evt, rowIndex);
17615
17644
  clearTimeout(this._dblClickClearTimer);
17645
+ if (TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt))
17646
+ this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE, evt);
17616
17647
  if (!clickCanceled) {
17617
17648
  this._lastEmulatedClickTime = now;
17618
17649
  this._dblClickClearTimer = setTimeout(function () { delete _this._lastEmulatedClickTime; }, TaskAreaDefaultState.defaultDblClickClearTimeout);
@@ -19200,6 +19231,7 @@ var EditingSettings = (function () {
19200
19231
  this.allowResourceInsert = true;
19201
19232
  this.allowResourceUpdate = true;
19202
19233
  this.allowTaskResourceUpdate = true;
19234
+ this.taskHoverDelay = 0;
19203
19235
  }
19204
19236
  EditingSettings.parse = function (settings) {
19205
19237
  var result = new EditingSettings();
@@ -19224,6 +19256,8 @@ var EditingSettings = (function () {
19224
19256
  result.allowResourceUpdate = settings.allowResourceUpdate;
19225
19257
  if ((0, common_1.isDefined)(settings.allowTaskResourceUpdate))
19226
19258
  result.allowTaskResourceUpdate = settings.allowTaskResourceUpdate;
19259
+ if ((0, common_1.isDefined)(settings.taskHoverDelay))
19260
+ result.taskHoverDelay = settings.taskHoverDelay;
19227
19261
  }
19228
19262
  return result;
19229
19263
  };
@@ -21199,6 +21233,7 @@ var TaskAreaEventsListener = (function () {
21199
21233
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_ZOOM_IN] = this.taskAreaZoomInHandler.bind(this);
21200
21234
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_ZOOM_OUT] = this.taskAreaZoomOutHandler.bind(this);
21201
21235
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_SHOW] = this.taskAreaContextMenuShowHandler.bind(this);
21236
+ handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE] = this.taskAreaContextMenuHideHandler.bind(this);
21202
21237
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_SELECTION] = this.taskSelectionHandler.bind(this);
21203
21238
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.DEPENDENCY_SELECTION] = this.dependencySelectionHandler.bind(this);
21204
21239
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_EDIT_START] = this.taskEditStartHandler.bind(this);
@@ -21233,6 +21268,9 @@ var TaskAreaEventsListener = (function () {
21233
21268
  TaskAreaEventsListener.prototype.taskAreaContextMenuShowHandler = function (args) {
21234
21269
  this._owner.onTaskAreaContextMenu(args.rowIndex, args.triggerEvent, args.info["type"]);
21235
21270
  };
21271
+ TaskAreaEventsListener.prototype.taskAreaContextMenuHideHandler = function () {
21272
+ this._owner.hidePopupMenu();
21273
+ };
21236
21274
  TaskAreaEventsListener.prototype.taskAreaScrollHandler = function (args) {
21237
21275
  this._owner.updateView();
21238
21276
  };
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.0.0
4
- * Build date: Thu Dec 02 2021
3
+ * Version: 4.0.4
4
+ * Build date: Thu Jan 20 2022
5
5
  *
6
- * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
6
+ * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
8
8
  */.dx-gantt-tsac{overflow:hidden;background-color:#fff;z-index:6}.dx-gantt-tsa,.dx-gantt-tsac{position:relative}.dx-gantt-hb{position:absolute;left:0;height:0;z-index:6}.dx-gantt-vb{width:0}.dx-gantt-tc,.dx-gantt-ti,.dx-gantt-tm,.dx-gantt-vb{position:absolute;top:0;z-index:6}.dx-gantt-tc:before,.dx-gantt-ti:before,.dx-gantt-tm:before{content:"";position:absolute;top:0;width:6px;margin-left:-3px;z-index:6;height:100%}.dx-gantt-si{position:absolute;top:0;white-space:nowrap;box-sizing:border-box}.dx-gantt-milestoneWrapper,.dx-gantt-taskResWrapper,.dx-gantt-taskWrapper{position:absolute;z-index:10;vertical-align:top;white-space:nowrap}.dx-gantt-taskWrapper>div{vertical-align:top}.dx-gantt-taskResWrapper{pointer-events:none}.dx-gantt-task{position:relative;display:inline-block;white-space:nowrap;vertical-align:top}.dx-gantt-tPrg{position:absolute;top:0;height:100%;z-index:0}.dx-gantt-taskRes,.dx-gantt-taskTitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dx-gantt-titleIn{position:relative;width:100%;z-index:1}.dx-gantt-titleOut{display:inline-block;width:500px;margin-left:-500px;text-align:right;text-overflow:ellipsis}.dx-gantt-taskRes{display:inline-block;overflow:hidden}.dx-gantt-task,.dx-gantt-taskRes,.dx-gantt-taskTitle,.dx-gantt-titleOut{box-sizing:border-box}.dx-gantt-sel{position:absolute;z-index:5}.dx-gantt-task.dx-gantt-milestone{transform:rotate(45deg);border-radius:0!important;padding:0}.dx-gantt-task.dx-gantt-smallTask{text-align:center}.dx-gantt-task.dx-gantt-smallTask .dx-gantt-titleIn{padding:0;visibility:hidden}.dx-gantt-arrow,.dx-gantt-conn-h,.dx-gantt-conn-v{position:absolute;z-index:9}.dx-gantt-conn-v{top:0;width:4px;cursor:pointer;border-left-width:1px;border-left-style:solid}.dx-gantt-conn-v.active{border-left-width:2px!important}.dx-gantt-conn-h{left:0;height:4px;cursor:pointer;border-top-width:1px;border-top-style:solid}.dx-gantt-conn-h.active{border-top-width:2px!important}.dx-gantt-arrow{width:0;height:0}.dx-gantt-arrow.dx-gantt-TA{border-left-color:transparent!important}.dx-gantt-arrow.dx-gantt-RA,.dx-gantt-arrow.dx-gantt-TA{border-right-color:transparent!important;border-top-color:transparent!important}.dx-gantt-arrow.dx-gantt-RA{border-bottom-color:transparent!important}.dx-gantt-arrow.dx-gantt-BA{border-right-color:transparent!important}.dx-gantt-arrow.dx-gantt-BA,.dx-gantt-arrow.dx-gantt-LA{border-left-color:transparent!important;border-bottom-color:transparent!important}.dx-gantt-arrow.dx-gantt-LA{border-top-color:transparent!important}.dx-gantt-nwi{position:absolute;z-index:3}.dx-gantt-altRow{position:absolute;z-index:2}.dx-gantt-task-edit-wrapper{padding-left:1px}.dx-gantt-task-edit-wrapper,.dx-gantt-task-edit-wrapper-successor{position:absolute;z-index:11}.dx-gantt-task-edit-wrapper-custom{background-color:rgba(90,84,84,.3)}.dx-gantt-task-edit-wrapper-custom.hide-updating{background-color:transparent;pointer-events:none}.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-frame,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-frame{border:none!important}#dx-gantt-ta.ms-pointer-active,#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame,#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame div{-webkit-appearance:none;-ms-touch-action:none;touch-action:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;-moz-user-select:none}.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-end,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-start,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-end,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-start,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-progress{display:none}.dx-gantt-task-edit-frame,.dx-gantt-task-edit-frame-successor{box-sizing:border-box;height:100%;width:100%;position:absolute;z-index:9}.dx-gantt-task-edit-frame{border:1px solid #269aff}.dx-gantt-task-edit-progress{position:absolute;width:0;height:0;bottom:0;cursor:pointer;border-color:transparent transparent #269aff;border-style:solid;border-width:0 6px 9px;z-index:10}.dx-gantt-task-edit-progress:before{content:"";width:10px;height:4px;background-color:#fff;position:absolute;bottom:-14px;left:-6px;border:1px solid #269aff;border-top:none}.dx-gantt-task-edit-progress div{position:absolute;bottom:0;cursor:pointer;border-color:transparent transparent #fff;border-style:solid;border-width:0 5px 7px;z-index:9;top:2px;left:-5px;pointer-events:none}.dx-gantt-task-edit-tooltip{position:absolute;font-family:sans-serif;width:max-content;line-height:16px;font-size:12px;border-radius:2px;display:none;z-index:12}.dx-gantt-task-edit-tooltip-default{padding:6px;color:#fff;background-color:rgba(0,0,0,.64)}.dx-gantt-task-edit-tooltip-after:after{border-bottom:6px solid rgba(0,0,0,.64);top:-6px}.dx-gantt-task-edit-tooltip-after:after,.dx-gantt-task-edit-tooltip-before:before{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute}.dx-gantt-task-edit-tooltip-before:before{border-top:6px solid rgba(0,0,0,.64);bottom:-6px}.dx-gantt-task-edit-tooltip .dx-gantt-task-title{padding-bottom:3px}.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child{padding-right:3px}.dx-gantt-task-edit-tooltip .dx-gantt-status-time span:first-child,.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child,.dx-gantt-task-edit-tooltip .dx-gantt-task-title{font-weight:600}.dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-successor-dependency-l,.dx-gantt-task-edit-successor-dependency-r{position:absolute;border-radius:50%;top:5px;width:8px;height:8px;background:#fff;border:1px solid #269aff;cursor:pointer}.dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-successor-dependency-r{left:-10px}.dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-successor-dependency-l{right:-10px}.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch{top:3px;width:11px;height:11px}.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch{left:-15px}.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch{right:-15px}.dx-gantt-task-edit-end,.dx-gantt-task-edit-start{position:absolute;height:100%;width:5px;top:0;cursor:col-resize}.dx-gantt-task-edit-end{right:0}.dx-gantt-task-edit-dependency-line{height:2px;background-color:#269aff;position:absolute;transform-origin:0 0;z-index:9}.dx-gantt-touch-action{touch-action:none}