devexpress-gantt 3.1.32 → 4.0.3

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: 3.1.32
4
- * Build date: Fri Nov 19 2021
3
+ * Version: 4.0.3
4
+ * Build date: Wed Jan 12 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: 3.1.32
4
- * Build date: Fri Nov 19 2021
3
+ * Version: 4.0.3
4
+ * Build date: Wed Jan 12 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
  };
@@ -5244,8 +5245,7 @@ var TaskEditController = (function () {
5244
5245
  if (this.task.isMilestone() && !this.viewItem.isCustom)
5245
5246
  this.baseElement.className = this.baseElement.className + " milestone";
5246
5247
  else {
5247
- var isHideTaskEditBox = !this.ganttSettings.editing.enabled || !this.ganttSettings.editing.allowTaskUpdate;
5248
- if (isHideTaskEditBox)
5248
+ if (!this.isTaskUpdateAllowed())
5249
5249
  this.baseElement.className = this.baseElement.className + " hide-updating";
5250
5250
  if (this.viewItem.isCustom) {
5251
5251
  this.baseElement.classList.add(TaskEditController.CLASSNAMES.TASK_EDIT_BOX_CUSTOM);
@@ -5258,7 +5258,8 @@ var TaskEditController = (function () {
5258
5258
  this.displayStartEndEditElements();
5259
5259
  };
5260
5260
  TaskEditController.prototype.displayStartEndEditElements = function () {
5261
- if (!this.canUpdateTask()) {
5261
+ var showElements = this.isTaskUpdateAllowed() && this.canUpdateTask();
5262
+ if (!showElements) {
5262
5263
  this.startEdit.style.display = "none";
5263
5264
  this.endEdit.style.display = "none";
5264
5265
  }
@@ -5268,8 +5269,7 @@ var TaskEditController = (function () {
5268
5269
  }
5269
5270
  };
5270
5271
  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) {
5272
+ if (!this.viewItem.isCustom && this.canUpdateTask() && this.isTaskUpdateAllowed() && this.wrapInfo.size.width > this.wrapInfo.size.height) {
5273
5273
  this.progressEdit.style.display = "block";
5274
5274
  this.progressEdit.style.left = ((this.task.progress / 100) * this.wrapInfo.size.width - (this.progressEdit.offsetWidth / 2)) + "px";
5275
5275
  }
@@ -5344,6 +5344,8 @@ var TaskEditController = (function () {
5344
5344
  this.successorIndex = -1;
5345
5345
  };
5346
5346
  TaskEditController.prototype.processProgress = function (position) {
5347
+ if (!this.isTaskUpdateAllowed())
5348
+ return;
5347
5349
  this.isEditingInProgress = true;
5348
5350
  var progressOffset = position.x - this.wrapInfo.position.x;
5349
5351
  var progress = 0;
@@ -5357,11 +5359,15 @@ var TaskEditController = (function () {
5357
5359
  this.tooltip.showProgress(progress, dom_1.DomUtils.getAbsolutePositionX(this.progressEdit) + this.progressEdit.offsetWidth / 2);
5358
5360
  };
5359
5361
  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);
5362
+ if (this.isTaskUpdateAllowed()) {
5363
+ this.isEditingInProgress = false;
5364
+ var progress = Math.round((this.progressEdit.offsetLeft + (this.progressEdit.offsetWidth / 2)) / this.wrapInfo.size.width * 100);
5365
+ this.commandManager.changeTaskProgressCommand.execute(this.taskId, progress);
5366
+ }
5363
5367
  };
5364
5368
  TaskEditController.prototype.processEnd = function (position) {
5369
+ if (!this.isTaskUpdateAllowed())
5370
+ return;
5365
5371
  this.baseElement.className = this.baseElement.className + " move";
5366
5372
  this.isEditingInProgress = true;
5367
5373
  var positionX = position.x > this.wrapInfo.position.x ? position.x : this.wrapInfo.position.x;
@@ -5377,13 +5383,17 @@ var TaskEditController = (function () {
5377
5383
  this.tooltip.showTime(startDate, this.taskDateRange.end, dom_1.DomUtils.getAbsolutePositionX(this.baseElement) + this.baseElement.clientWidth);
5378
5384
  };
5379
5385
  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();
5386
+ if (this.isTaskUpdateAllowed()) {
5387
+ this.baseElement.className = TaskEditController.CLASSNAMES.TASK_EDIT_BOX;
5388
+ this.isEditingInProgress = false;
5389
+ this.commandManager.changeTaskEndCommand.execute(this.taskId, this.taskDateRange.end);
5390
+ this.hide();
5391
+ this.updateWrapInfo();
5392
+ }
5385
5393
  };
5386
5394
  TaskEditController.prototype.processStart = function (position) {
5395
+ if (!this.isTaskUpdateAllowed())
5396
+ return;
5387
5397
  this.baseElement.className = this.baseElement.className + " move";
5388
5398
  this.isEditingInProgress = true;
5389
5399
  var positionX = position.x < this.wrapInfo.position.x + this.wrapInfo.size.width ? position.x : this.wrapInfo.position.x + this.wrapInfo.size.width;
@@ -5400,14 +5410,16 @@ var TaskEditController = (function () {
5400
5410
  this.tooltip.showTime(this.taskDateRange.start, endDate, dom_1.DomUtils.getAbsolutePositionX(this.baseElement));
5401
5411
  };
5402
5412
  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();
5413
+ if (this.isTaskUpdateAllowed()) {
5414
+ this.baseElement.className = TaskEditController.CLASSNAMES.TASK_EDIT_BOX;
5415
+ this.isEditingInProgress = false;
5416
+ this.commandManager.changeTaskStartCommand.execute(this.taskId, this.taskDateRange.start);
5417
+ this.hide();
5418
+ this.updateWrapInfo();
5419
+ }
5408
5420
  };
5409
5421
  TaskEditController.prototype.processMove = function (delta) {
5410
- if (this.ganttSettings.editing.enabled && this.ganttSettings.editing.allowTaskUpdate && this.isTaskEditBoxShown) {
5422
+ if (this.isTaskUpdateAllowed() && this.isTaskEditBoxShown) {
5411
5423
  this.baseElement.className = this.baseElement.className + " move";
5412
5424
  var left = this.baseElement.offsetLeft + delta;
5413
5425
  this.baseElement.style.left = left + "px";
@@ -5435,7 +5447,7 @@ var TaskEditController = (function () {
5435
5447
  this.taskDateRange.end = newEnd;
5436
5448
  };
5437
5449
  TaskEditController.prototype.confirmMove = function () {
5438
- if (this.ganttSettings.editing.enabled && this.ganttSettings.editing.allowTaskUpdate) {
5450
+ if (this.isTaskUpdateAllowed()) {
5439
5451
  if (!this.ganttSettings.editing.allowDependencyInsert)
5440
5452
  this.baseElement.className = this.baseElement.className + " hide-dependency";
5441
5453
  if (this.isEditingInProgress) {
@@ -5567,6 +5579,10 @@ var TaskEditController = (function () {
5567
5579
  TaskEditController.prototype.canUpdateTask = function () {
5568
5580
  return !this.viewModel.isTaskToCalculateByChildren(this.task.internalId);
5569
5581
  };
5582
+ TaskEditController.prototype.isTaskUpdateAllowed = function () {
5583
+ var settings = this.ganttSettings.editing;
5584
+ return settings.enabled && settings.allowTaskUpdate;
5585
+ };
5570
5586
  TaskEditController.prototype.detachEvents = function () {
5571
5587
  var _a;
5572
5588
  (_a = this.baseElement) === null || _a === void 0 ? void 0 : _a.removeEventListener("mouseleave", this.onMouseLeaveHandler);
@@ -5758,6 +5774,10 @@ var GanttView = (function () {
5758
5774
  GanttView.prototype.showPopupMenu = function (info) {
5759
5775
  this.ganttOwner.showPopupMenu(info);
5760
5776
  };
5777
+ GanttView.prototype.hidePopupMenu = function () {
5778
+ if (this.ganttOwner.hidePopupMenu)
5779
+ this.ganttOwner.hidePopupMenu();
5780
+ };
5761
5781
  GanttView.prototype.collapseAll = function () {
5762
5782
  this.ganttOwner.collapseAll();
5763
5783
  };
@@ -12129,12 +12149,15 @@ var ScaleCalculator = (function () {
12129
12149
  ScaleCalculator.prototype.getScaleIndexByPos = function (pos, scaleType) {
12130
12150
  scaleType !== null && scaleType !== void 0 ? scaleType : (scaleType = this.viewType);
12131
12151
  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;
12152
+ var index = -1;
12153
+ if (items.findIndex)
12154
+ index = items.findIndex(function (i) { return pos >= i.position.x && pos <= i.position.x + i.size.width; });
12155
+ else {
12156
+ var item = items.filter(function (i) { return pos >= i.position.x && pos <= i.position.x + i.size.width; })[0];
12157
+ if (item)
12158
+ index = items.indexOf(item);
12136
12159
  }
12137
- return -1;
12160
+ return index;
12138
12161
  };
12139
12162
  ScaleCalculator.prototype.getScaleBorderPosition = function (index, scaleType) {
12140
12163
  var item = this.getScaleItems(scaleType)[index];
@@ -12229,14 +12252,27 @@ var ScaleCalculator = (function () {
12229
12252
  };
12230
12253
  ScaleCalculator.prototype.calculateTopScale = function (scaleType) {
12231
12254
  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;
12255
+ var endRangeTime = this.range.end.getTime();
12256
+ var itemStartDate = this.range.start;
12257
+ var itemStartPos = 0;
12258
+ var lastBottomIndex = 0;
12259
+ while (itemStartDate.getTime() < endRangeTime) {
12260
+ var itemNextDate = this.getNextScaleDate(itemStartDate, scaleType);
12261
+ var nextDateTime = itemNextDate.getTime();
12262
+ for (var i = lastBottomIndex; i < this.bottomScaleItems.length; i++) {
12263
+ var item = this.bottomScaleItems[i];
12264
+ var startTime = item.start.getTime();
12265
+ var endTime = item.end.getTime();
12266
+ var isNextDateInItem = nextDateTime >= startTime && nextDateTime <= endTime;
12267
+ if (isNextDateInItem) {
12268
+ var itemEndPos = (nextDateTime - startTime) / (endTime - startTime) * item.size.width + item.position.x;
12269
+ items.push(new ScaleItemInfo(itemStartDate, itemNextDate, new point_1.Point(itemStartPos, undefined), new size_1.Size(itemEndPos - itemStartPos, 0)));
12270
+ lastBottomIndex = i;
12271
+ itemStartPos = itemEndPos;
12272
+ itemStartDate = itemNextDate;
12273
+ break;
12274
+ }
12275
+ }
12240
12276
  }
12241
12277
  return items;
12242
12278
  };
@@ -12254,18 +12290,6 @@ var ScaleCalculator = (function () {
12254
12290
  }
12255
12291
  return new Date(this.range.end);
12256
12292
  };
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
12293
  ScaleCalculator.prototype.getNextScaleDate = function (start, scaleType) {
12270
12294
  var date;
12271
12295
  switch (scaleType) {
@@ -17582,7 +17606,10 @@ var TaskAreaDefaultState = (function (_super) {
17582
17606
  function TaskAreaDefaultState() {
17583
17607
  return _super !== null && _super.apply(this, arguments) || this;
17584
17608
  }
17585
- TaskAreaDefaultState.prototype.finish = function () { this.clearTimers(); };
17609
+ TaskAreaDefaultState.prototype.finish = function () {
17610
+ this.clearTimers();
17611
+ this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE);
17612
+ };
17586
17613
  TaskAreaDefaultState.prototype.onMouseDownInternal = function (evt) { this.onPointerDownBase(evt); };
17587
17614
  TaskAreaDefaultState.prototype.onDocumentPointerDownInternal = function (evt) { this.onPointerDownBase(evt); };
17588
17615
  TaskAreaDefaultState.prototype.onDocumentPointerUpInternal = function (evt) { this.onPointerUpBase(evt); };
@@ -17598,7 +17625,11 @@ var TaskAreaDefaultState = (function (_super) {
17598
17625
  if (isMouse)
17599
17626
  this.changeSelectionOnTouchDown(evt);
17600
17627
  else {
17601
- setTimeout(function () { return _this.changeSelectionOnTouchDown(evt); }, 0);
17628
+ setTimeout(function () {
17629
+ if (!TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt))
17630
+ _this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE, evt);
17631
+ _this.changeSelectionOnTouchDown(evt);
17632
+ }, 0);
17602
17633
  clearTimeout(this._contextMenuTimer);
17603
17634
  this._contextMenuTimer = setTimeout(function () { return _this.showContextMenuOnTouchDown(evt); }, TaskAreaDefaultState.defaultContextMenuTimeout);
17604
17635
  }
@@ -17613,6 +17644,8 @@ var TaskAreaDefaultState = (function (_super) {
17613
17644
  if (!this._lastEmulatedClickTime) {
17614
17645
  var clickCanceled = !this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_CLICK, evt, rowIndex);
17615
17646
  clearTimeout(this._dblClickClearTimer);
17647
+ if (TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt))
17648
+ this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE, evt);
17616
17649
  if (!clickCanceled) {
17617
17650
  this._lastEmulatedClickTime = now;
17618
17651
  this._dblClickClearTimer = setTimeout(function () { delete _this._lastEmulatedClickTime; }, TaskAreaDefaultState.defaultDblClickClearTimeout);
@@ -21199,6 +21232,7 @@ var TaskAreaEventsListener = (function () {
21199
21232
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_ZOOM_IN] = this.taskAreaZoomInHandler.bind(this);
21200
21233
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_ZOOM_OUT] = this.taskAreaZoomOutHandler.bind(this);
21201
21234
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_SHOW] = this.taskAreaContextMenuShowHandler.bind(this);
21235
+ handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.CONTEXTMENU_HIDE] = this.taskAreaContextMenuHideHandler.bind(this);
21202
21236
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_SELECTION] = this.taskSelectionHandler.bind(this);
21203
21237
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.DEPENDENCY_SELECTION] = this.dependencySelectionHandler.bind(this);
21204
21238
  handlers[TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_EDIT_START] = this.taskEditStartHandler.bind(this);
@@ -21233,6 +21267,9 @@ var TaskAreaEventsListener = (function () {
21233
21267
  TaskAreaEventsListener.prototype.taskAreaContextMenuShowHandler = function (args) {
21234
21268
  this._owner.onTaskAreaContextMenu(args.rowIndex, args.triggerEvent, args.info["type"]);
21235
21269
  };
21270
+ TaskAreaEventsListener.prototype.taskAreaContextMenuHideHandler = function () {
21271
+ this._owner.hidePopupMenu();
21272
+ };
21236
21273
  TaskAreaEventsListener.prototype.taskAreaScrollHandler = function (args) {
21237
21274
  this._owner.updateView();
21238
21275
  };
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 3.1.32
4
- * Build date: Fri Nov 19 2021
3
+ * Version: 4.0.3
4
+ * Build date: Wed Jan 12 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}