devexpress-gantt 3.1.22 → 3.1.26

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: 3.1.22
4
- * Build date: Tue Sep 28 2021
3
+ * Version: 3.1.26
4
+ * Build date: Tue Oct 26 2021
5
5
  *
6
6
  * Copyright (c) 2012 - 2021 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: 3.1.22
4
- * Build date: Tue Sep 28 2021
3
+ * Version: 3.1.26
4
+ * Build date: Tue Oct 26 2021
5
5
  *
6
6
  * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -5078,6 +5078,7 @@ var GanttView = (function () {
5078
5078
  var _this = this;
5079
5079
  this.currentSelectedTaskID = "";
5080
5080
  this.isFocus = false;
5081
+ this._updateWithModelReloadLocked = false;
5081
5082
  this.scaleCount = 2;
5082
5083
  this.tickSize = new size_1.Size(0, 0);
5083
5084
  this.currentZoom = 1;
@@ -5093,7 +5094,7 @@ var GanttView = (function () {
5093
5094
  this.barManager = new BarManager_1.BarManager(this.commandManager, this.ganttOwner.bars);
5094
5095
  this.initTaskEditController();
5095
5096
  this.initEventManager();
5096
- this.history = new History_1.History();
5097
+ this.history = new History_1.History(this._getHistoryListener());
5097
5098
  this.initFullScreenModeHelper();
5098
5099
  this.onWindowResizelHandler = this.onBrowserWindowResize.bind(this);
5099
5100
  window.addEventListener("resize", this.onWindowResizelHandler);
@@ -5107,6 +5108,21 @@ var GanttView = (function () {
5107
5108
  GanttView.prototype.initGanttViewApi = function () {
5108
5109
  this.ganttViewApi = new GanttViewApi_1.GanttViewApi(this);
5109
5110
  };
5111
+ GanttView.prototype._getHistoryListener = function () {
5112
+ var listener = {
5113
+ onTransactionStart: this.onHistoryTransactionStart.bind(this),
5114
+ onTransactionEnd: this.onHistoryTransactionEnd.bind(this),
5115
+ };
5116
+ return listener;
5117
+ };
5118
+ GanttView.prototype.onHistoryTransactionStart = function () { this._updateWithModelReloadLocked = true; };
5119
+ GanttView.prototype.onHistoryTransactionEnd = function () {
5120
+ this._updateWithModelReloadLocked = false;
5121
+ if (this._pendingUpdateInfo) {
5122
+ this.updateWithDataReload(this._pendingUpdateInfo.keepExpandState);
5123
+ this._pendingUpdateInfo = null;
5124
+ }
5125
+ };
5110
5126
  GanttView.prototype.initValidationController = function () {
5111
5127
  var _this = this;
5112
5128
  var validationControllerSettings = ValidationControllerSettings_1.ValidationControllerSettings.parse({
@@ -5129,7 +5145,8 @@ var GanttView = (function () {
5129
5145
  getGanttSettings: function () { return _this.settings; },
5130
5146
  getViewModel: function () { return _this.viewModel; },
5131
5147
  getCommandManager: function () { return _this.commandManager; },
5132
- getModelManipulator: function () { return _this.modelManipulator; }
5148
+ getModelManipulator: function () { return _this.modelManipulator; },
5149
+ getValidationController: function () { return _this.validationController; }
5133
5150
  });
5134
5151
  this.taskEditController = new TaskEditController_1.TaskEditController(taskEditSettings);
5135
5152
  };
@@ -5311,7 +5328,7 @@ var GanttView = (function () {
5311
5328
  var item = this.getViewItem(index);
5312
5329
  return item === null || item === void 0 ? void 0 : item.selected;
5313
5330
  };
5314
- GanttView.prototype.getAllVisibleTaskIndices = function () { return this.viewModel.getAllVisibleTaskIndices(); };
5331
+ GanttView.prototype.getAllVisibleTaskIndices = function (start, end) { return this.viewModel.getAllVisibleTaskIndices(start, end); };
5315
5332
  GanttView.prototype.getVisibleDependencyKeysByTaskRange = function (indices) {
5316
5333
  var model = this.viewModel;
5317
5334
  var taskKeys = indices.map(function (i) { return model.tasks.items[i].internalId; });
@@ -5392,8 +5409,8 @@ var GanttView = (function () {
5392
5409
  if (autoPositioning === void 0) { autoPositioning = true; }
5393
5410
  this.ganttViewApi.setViewType(viewType, autoPositioning);
5394
5411
  };
5395
- GanttView.prototype.setViewTypeRange = function (start, end) {
5396
- this.ganttViewApi.setViewTypeRange(start, end);
5412
+ GanttView.prototype.setViewTypeRange = function (min, max) {
5413
+ this.ganttViewApi.setViewTypeRange(min, max);
5397
5414
  };
5398
5415
  GanttView.prototype.setTaskTitlePosition = function (taskTitlePosition) {
5399
5416
  if (this.settings.taskTitlePosition !== taskTitlePosition) {
@@ -5563,8 +5580,9 @@ var GanttView = (function () {
5563
5580
  };
5564
5581
  GanttView.prototype.updateTask = function (key, data) {
5565
5582
  var task = this.getTaskByPublicId(key.toString());
5566
- if (task && data)
5567
- this.commandManager.updateTaskCommand.execute(task.internalId, data);
5583
+ var dataToExecute = this._getTaskDataForUpdate(data, task);
5584
+ if (dataToExecute)
5585
+ this.commandManager.updateTaskCommand.execute(task.internalId, dataToExecute);
5568
5586
  };
5569
5587
  GanttView.prototype.getTaskData = function (key) {
5570
5588
  var task = this.getTaskByPublicId(key.toString());
@@ -5579,7 +5597,7 @@ var GanttView = (function () {
5579
5597
  var successorId = String(data.successorId);
5580
5598
  var successor = this.getTaskByPublicId(successorId);
5581
5599
  var type = data.type;
5582
- if (predecessor && successor)
5600
+ if (predecessor && successor && this.validationController.canCreateDependency(predecessorId, successorId))
5583
5601
  this.commandManager.createDependencyCommand.execute(predecessor.internalId, successor.internalId, type);
5584
5602
  };
5585
5603
  GanttView.prototype.deleteDependency = function (key) {
@@ -5640,6 +5658,18 @@ var GanttView = (function () {
5640
5658
  GanttView.prototype.getVisibleResourceAssignmentKeys = function () { return this.viewModel.getVisibleResourceAssignments().map(function (a) { return a.id; }); };
5641
5659
  GanttView.prototype.getTasksExpandedState = function () { return this.viewModel.getTasksExpandedState(); };
5642
5660
  GanttView.prototype.applyTasksExpandedState = function (state) { this.viewModel.applyTasksExpandedState(state); };
5661
+ GanttView.prototype.updateWithDataReload = function (keepExpandState) {
5662
+ if (this._updateWithModelReloadLocked) {
5663
+ this._pendingUpdateInfo = { keepExpandState: keepExpandState };
5664
+ return;
5665
+ }
5666
+ var state = keepExpandState && this.getTasksExpandedState();
5667
+ this.loadOptionsFromGanttOwner();
5668
+ if (keepExpandState)
5669
+ this.applyTasksExpandedState(state);
5670
+ else
5671
+ this.resetAndUpdate();
5672
+ };
5643
5673
  GanttView.prototype.setTaskValue = function (id, fieldName, newValue) {
5644
5674
  var manager = this.commandManager;
5645
5675
  var task = this.getTaskByPublicId(id);
@@ -5784,6 +5814,22 @@ var GanttView = (function () {
5784
5814
  GanttView.prototype.getCommandByKey = function (key) {
5785
5815
  return this.commandManager.getCommand(key);
5786
5816
  };
5817
+ GanttView.prototype._getTaskDataForUpdate = function (data, task) {
5818
+ var result = {};
5819
+ if (task && data) {
5820
+ if ((0, common_1.isDefined)(data.title) && data.title !== task.title)
5821
+ result["title"] = data.title;
5822
+ if ((0, common_1.isDefined)(data.progress) && data.progress !== task.progress)
5823
+ result["progress"] = data.progress;
5824
+ if ((0, common_1.isDefined)(data.start) && data.start !== task.start)
5825
+ result["start"] = data.start;
5826
+ if ((0, common_1.isDefined)(data.end) && data.end !== task.end)
5827
+ result["end"] = data.end;
5828
+ if ((0, common_1.isDefined)(data.color) && data.color !== task.color)
5829
+ result["color"] = data.color;
5830
+ }
5831
+ return Object.keys(result).length > 0 ? result : null;
5832
+ };
5787
5833
  GanttView.cachedPrefix = "cached_";
5788
5834
  GanttView.taskAreaScrollLeftKey = GanttView.cachedPrefix + "taskAreaScrollLeft";
5789
5835
  GanttView.taskAreaScrollTopKey = GanttView.cachedPrefix + "taskAreaScrollTop";
@@ -6642,6 +6688,13 @@ var TaskEditController = (function () {
6642
6688
  enumerable: false,
6643
6689
  configurable: true
6644
6690
  });
6691
+ Object.defineProperty(TaskEditController.prototype, "validationController", {
6692
+ get: function () {
6693
+ return this.settings.getValidationController();
6694
+ },
6695
+ enumerable: false,
6696
+ configurable: true
6697
+ });
6645
6698
  TaskEditController.prototype.raiseTaskMoving = function (task, newStart, newEnd, callback) {
6646
6699
  return this.settings.getModelManipulator().dispatcher.raiseTaskMoving(task, newStart, newEnd, callback);
6647
6700
  };
@@ -6758,10 +6811,9 @@ var TaskEditController = (function () {
6758
6811
  this.wrapInfo.position.x--;
6759
6812
  };
6760
6813
  TaskEditController.prototype.isAllowedToConnectTasks = function (taskIndex) {
6761
- var isAnotherTask = this.successorIndex !== taskIndex && this.taskIndex !== taskIndex;
6814
+ var _a;
6762
6815
  var successorViewItem = this.viewModel.items[taskIndex];
6763
- var isChild = this.viewItem.children.some(function (c) { return c.task.internalId === successorViewItem.task.internalId; });
6764
- return isAnotherTask && !isChild;
6816
+ return this.validationController.canCreateDependency(this.taskId, (_a = successorViewItem.task) === null || _a === void 0 ? void 0 : _a.internalId);
6765
6817
  };
6766
6818
  TaskEditController.prototype.showDependencySuccessor = function (taskIndex) {
6767
6819
  if (this.isAllowedToConnectTasks(taskIndex)) {
@@ -9937,6 +9989,7 @@ var RemoveTaskCommand = (function (_super) {
9937
9989
  this.modelManipulator.dispatcher.notifyTaskRemoving(args);
9938
9990
  if (args.cancel)
9939
9991
  return false;
9992
+ this.control.history.beginTransaction();
9940
9993
  this.control.viewModel.beginUpdate();
9941
9994
  var removeTaskHistoryItem = historyItem || new RemoveTaskHistoryItem_1.RemoveTaskHistoryItem(this.modelManipulator);
9942
9995
  removeTaskHistoryItem.addTask(id);
@@ -9960,6 +10013,7 @@ var RemoveTaskCommand = (function (_super) {
9960
10013
  var parent = this.control.viewModel.findItem(task.parentId);
9961
10014
  if (this.isUpdateParentTaskRequired)
9962
10015
  _super.prototype.updateParent.call(this, parent);
10016
+ this.control.history.endTransaction();
9963
10017
  this.control.viewModel.endUpdate();
9964
10018
  return true;
9965
10019
  };
@@ -13658,13 +13712,9 @@ var TaskAreaExportHelper = (function () {
13658
13712
  return point.x;
13659
13713
  };
13660
13714
  TaskAreaExportHelper.prototype.getTaskIndices = function () {
13661
- var _a, _b, _c, _d;
13662
- if (this.dataMode === Props_1.DataExportMode.all || this.exportRange) {
13663
- var allIndices = this._owner.getAllVisibleTaskIndices();
13664
- var start_1 = (_b = (_a = this.exportRange) === null || _a === void 0 ? void 0 : _a.startIndex) !== null && _b !== void 0 ? _b : allIndices[0];
13665
- var end_1 = (_d = (_c = this.exportRange) === null || _c === void 0 ? void 0 : _c.endIndex) !== null && _d !== void 0 ? _d : allIndices[allIndices.length - 1];
13666
- return allIndices.filter(function (tIndex) { return tIndex >= start_1 && tIndex <= end_1; });
13667
- }
13715
+ var _a, _b;
13716
+ if (this.dataMode === Props_1.DataExportMode.all || this.exportRange)
13717
+ return this._owner.getAllVisibleTaskIndices((_a = this.exportRange) === null || _a === void 0 ? void 0 : _a.startIndex, (_b = this.exportRange) === null || _b === void 0 ? void 0 : _b.endIndex);
13668
13718
  return this.getVisibleTaskIndices();
13669
13719
  };
13670
13720
  TaskAreaExportHelper.prototype.getVisibleTaskIndices = function () {
@@ -14873,12 +14923,13 @@ exports.History = void 0;
14873
14923
  var HistoryItemInfo_1 = __webpack_require__(174);
14874
14924
  var CompositionHistoryItem_1 = __webpack_require__(45);
14875
14925
  var History = (function () {
14876
- function History() {
14926
+ function History(listener) {
14877
14927
  this.historyItems = [];
14878
14928
  this.currentIndex = -1;
14879
14929
  this.currentProcessingItemInfo = null;
14880
14930
  this.transaction = null;
14881
14931
  this.transactionLevel = -1;
14932
+ this._listener = listener;
14882
14933
  }
14883
14934
  History.prototype.undo = function () {
14884
14935
  if (this.canUndo()) {
@@ -14893,11 +14944,14 @@ var History = (function () {
14893
14944
  }
14894
14945
  };
14895
14946
  History.prototype.beginTransaction = function () {
14947
+ var _a;
14896
14948
  this.transactionLevel++;
14897
14949
  if (this.transactionLevel == 0)
14898
14950
  this.transaction = new CompositionHistoryItem_1.CompositionHistoryItem();
14951
+ (_a = this._listener) === null || _a === void 0 ? void 0 : _a.onTransactionStart();
14899
14952
  };
14900
14953
  History.prototype.endTransaction = function () {
14954
+ var _a;
14901
14955
  if (--this.transactionLevel >= 0)
14902
14956
  return;
14903
14957
  var transactionLength = this.transaction.historyItems.length;
@@ -14906,6 +14960,7 @@ var History = (function () {
14906
14960
  else if (transactionLength == 1)
14907
14961
  this.addInternal(this.transaction.historyItems.pop());
14908
14962
  this.transaction = null;
14963
+ (_a = this._listener) === null || _a === void 0 ? void 0 : _a.onTransactionEnd();
14909
14964
  };
14910
14965
  History.prototype.addAndRedo = function (historyItem) {
14911
14966
  this.add(historyItem);
@@ -19169,23 +19224,23 @@ var common_1 = __webpack_require__(1);
19169
19224
  var Enums_1 = __webpack_require__(2);
19170
19225
  var ViewTypeRangeSettings = (function () {
19171
19226
  function ViewTypeRangeSettings() {
19172
- this.start = Enums_1.ViewType.TenMinutes;
19173
- this.end = Enums_1.ViewType.Years;
19227
+ this.min = Enums_1.ViewType.TenMinutes;
19228
+ this.max = Enums_1.ViewType.Years;
19174
19229
  }
19175
19230
  ViewTypeRangeSettings.parse = function (settings) {
19176
19231
  var result = new ViewTypeRangeSettings();
19177
19232
  if (settings) {
19178
- if ((0, common_1.isDefined)(settings.start))
19179
- result.start = settings.start;
19180
- if ((0, common_1.isDefined)(settings.end))
19181
- result.end = settings.end;
19233
+ if ((0, common_1.isDefined)(settings.min))
19234
+ result.min = settings.min;
19235
+ if ((0, common_1.isDefined)(settings.max))
19236
+ result.max = settings.max;
19182
19237
  }
19183
19238
  return result;
19184
19239
  };
19185
19240
  ViewTypeRangeSettings.prototype.equal = function (settings) {
19186
19241
  var result = true;
19187
- result = result && this.start === settings.start;
19188
- result = result && this.end === settings.end;
19242
+ result = result && this.min === settings.min;
19243
+ result = result && this.max === settings.max;
19189
19244
  return result;
19190
19245
  };
19191
19246
  return ViewTypeRangeSettings;
@@ -19226,6 +19281,8 @@ var TaskEditSettings = (function (_super) {
19226
19281
  result.formatDate = settings.formatDate;
19227
19282
  if ((0, common_1.isDefined)(settings.getModelManipulator))
19228
19283
  result.getModelManipulator = settings.getModelManipulator;
19284
+ if ((0, common_1.isDefined)(settings.getValidationController))
19285
+ result.getValidationController = settings.getValidationController;
19229
19286
  }
19230
19287
  return result;
19231
19288
  };
@@ -19558,12 +19615,6 @@ var ValidationController = (function () {
19558
19615
  };
19559
19616
  ValidationController.prototype.updateParentsIfRequired = function (childId) {
19560
19617
  if (this._parentAutoCalc) {
19561
- var task = this.viewModel.findItem(childId);
19562
- var parent_1 = task.parent;
19563
- while (!!parent_1 && !!parent_1.task) {
19564
- this.modelManipulator.dispatcher.notifyParentTaskUpdated(parent_1.task, this.viewModel.getDataUpdateErrorCallback());
19565
- parent_1 = parent_1.parent;
19566
- }
19567
19618
  this.updateParentsRangeByChild(childId);
19568
19619
  this.updateOwnerInAutoParentMode();
19569
19620
  }
@@ -19582,6 +19633,20 @@ var ValidationController = (function () {
19582
19633
  this.updateOwnerInAutoParentMode();
19583
19634
  }
19584
19635
  };
19636
+ ValidationController.prototype.canCreateDependency = function (predecessorId, successorId) {
19637
+ if (!predecessorId || !successorId || predecessorId === successorId)
19638
+ return false;
19639
+ var model = this.viewModel;
19640
+ if (model.dependencies.items.some(function (d) { return (d.predecessorId === predecessorId && d.successorId === successorId) || (d.predecessorId === successorId && d.successorId === predecessorId); }))
19641
+ return false;
19642
+ if (this._parentAutoCalc && this.isValidateDependenciesRequired) {
19643
+ if (model.checkParent(predecessorId, successorId))
19644
+ return false;
19645
+ if (model.checkParent(successorId, predecessorId))
19646
+ return false;
19647
+ }
19648
+ return true;
19649
+ };
19585
19650
  return ValidationController;
19586
19651
  }());
19587
19652
  exports.ValidationController = ValidationController;
@@ -19678,7 +19743,7 @@ var ViewVisualModel = (function () {
19678
19743
  this._itemList = new Array();
19679
19744
  this._viewItemList = new Array();
19680
19745
  this._workTimeCalculator = new WorkingTimeCalculator_1.WorkingTimeCalculator(dateRange, workTimeRules);
19681
- this.updateModel();
19746
+ this.updateModel(true);
19682
19747
  }
19683
19748
  Object.defineProperty(ViewVisualModel.prototype, "renderHelper", {
19684
19749
  get: function () {
@@ -19687,7 +19752,7 @@ var ViewVisualModel = (function () {
19687
19752
  enumerable: false,
19688
19753
  configurable: true
19689
19754
  });
19690
- ViewVisualModel.prototype.updateModel = function () {
19755
+ ViewVisualModel.prototype.updateModel = function (isFirstLoad) {
19691
19756
  this._itemList.splice(0, this._itemList.length);
19692
19757
  var tasks = this.tasks.items;
19693
19758
  for (var i = 0; i < tasks.length; i++) {
@@ -19695,12 +19760,12 @@ var ViewVisualModel = (function () {
19695
19760
  if (task)
19696
19761
  this._itemList.push(new ViewVisualModelItem_1.ViewVisualModelItem(task, this.getAssignedResources(task)));
19697
19762
  }
19698
- this.createHierarchy();
19763
+ this.createHierarchy(isFirstLoad);
19699
19764
  this.populateItemsForView();
19700
19765
  if (this.owner && this.owner.currentSelectedTaskID)
19701
19766
  this.changeTaskSelected(this.owner.currentSelectedTaskID, true);
19702
19767
  };
19703
- ViewVisualModel.prototype.createHierarchy = function () {
19768
+ ViewVisualModel.prototype.createHierarchy = function (isFirstLoad) {
19704
19769
  var _this = this;
19705
19770
  this.root = new ViewVisualModelItem_1.ViewVisualModelItem(null, null);
19706
19771
  var list = this._itemList;
@@ -19711,7 +19776,7 @@ var ViewVisualModel = (function () {
19711
19776
  previous[key] = item;
19712
19777
  return previous;
19713
19778
  }, {});
19714
- var recalculateParentRequired = this.requireFirstLoadParentAutoCalc;
19779
+ var recalculateParentRequired = this.requireFirstLoadParentAutoCalc && isFirstLoad;
19715
19780
  for (var i = 0; i < list.length; i++) {
19716
19781
  var item = list[i];
19717
19782
  var parentId = item.task.parentId;
@@ -19910,6 +19975,22 @@ var ViewVisualModel = (function () {
19910
19975
  task.internalId = hash[id];
19911
19976
  }
19912
19977
  };
19978
+ ViewVisualModel.prototype.getTaskTreeLine = function (taskId) {
19979
+ var result = [];
19980
+ var item = this.findItem(taskId);
19981
+ if (item) {
19982
+ result.push(taskId);
19983
+ item = item.parent;
19984
+ while (item === null || item === void 0 ? void 0 : item.task) {
19985
+ result.push(item === null || item === void 0 ? void 0 : item.task.internalId);
19986
+ item = item.parent;
19987
+ }
19988
+ }
19989
+ return result;
19990
+ };
19991
+ ViewVisualModel.prototype.checkParent = function (childId, parentId) {
19992
+ return this.getTaskTreeLine(childId).indexOf(parentId) > -1;
19993
+ };
19913
19994
  ViewVisualModel.prototype.getTasksExpandedState = function () {
19914
19995
  var items = this.tasks.items;
19915
19996
  var state = {};
@@ -20033,13 +20114,16 @@ var ViewVisualModel = (function () {
20033
20114
  ViewVisualModel.prototype.findAllTaskAssignments = function (taskInternalKey) {
20034
20115
  return this.assignments.items.filter(function (val) { return val.taskId === taskInternalKey; });
20035
20116
  };
20036
- ViewVisualModel.prototype.getAllVisibleTaskIndices = function () {
20037
- var _this = this;
20117
+ ViewVisualModel.prototype.getAllVisibleTaskIndices = function (start, end) {
20118
+ var _a;
20038
20119
  var result = [];
20039
- this.tasks.items.forEach(function (t, index) {
20040
- if (t && _this.getTaskVisibility(t.internalId) && t.isValid())
20041
- result.push(index);
20042
- });
20120
+ start !== null && start !== void 0 ? start : (start = 0);
20121
+ end !== null && end !== void 0 ? end : (end = this._viewItemList.length - 1);
20122
+ for (var i = start; i <= end; i++) {
20123
+ var item = this._viewItemList[i];
20124
+ if (item.getVisible() && ((_a = item.task) === null || _a === void 0 ? void 0 : _a.isValid))
20125
+ result.push(i);
20126
+ }
20043
20127
  return result;
20044
20128
  };
20045
20129
  ViewVisualModel.prototype.getVisibleTasks = function () {
@@ -20922,7 +21006,7 @@ var GanttViewApi = (function () {
20922
21006
  GanttViewApi.prototype.zoomIn = function (leftPos) {
20923
21007
  if (leftPos === void 0) { leftPos = this.getTaskAreaContainerWidth() / 2; }
20924
21008
  var targetDate = this.renderHelper.getTargetDateByPos(leftPos);
20925
- var viewTypeRangeStart = this.settings.viewTypeRange.start;
21009
+ var viewTypeRangeStart = this.settings.viewTypeRange.min;
20926
21010
  if (this.currentZoom < this.maxZoom) {
20927
21011
  this.currentZoom++;
20928
21012
  this.updateTickSizeWidth();
@@ -20937,7 +21021,7 @@ var GanttViewApi = (function () {
20937
21021
  GanttViewApi.prototype.zoomOut = function (leftPos) {
20938
21022
  if (leftPos === void 0) { leftPos = this.renderHelper.getTaskAreaContainerWidth() / 2; }
20939
21023
  var targetDate = this.renderHelper.getTargetDateByPos(leftPos);
20940
- var viewTypeRangeEnd = this.settings.viewTypeRange.end;
21024
+ var viewTypeRangeEnd = this.settings.viewTypeRange.max;
20941
21025
  if (this.currentZoom > 1) {
20942
21026
  this.currentZoom--;
20943
21027
  this.updateTickSizeWidth();
@@ -20963,18 +21047,18 @@ var GanttViewApi = (function () {
20963
21047
  this.ganttOwner.UpdateGanttViewType(viewType);
20964
21048
  }
20965
21049
  };
20966
- GanttViewApi.prototype.setViewTypeRange = function (start, end) {
20967
- if (start !== undefined)
20968
- this.settings.viewTypeRange.start = Math.min(start, end);
20969
- if (end !== undefined)
20970
- this.settings.viewTypeRange.end = Math.max(start, end);
20971
- var viewTypeRangeStart = this.settings.viewTypeRange.start;
20972
- var viewTypeRangeEnd = this.settings.viewTypeRange.end;
21050
+ GanttViewApi.prototype.setViewTypeRange = function (min, max) {
21051
+ if (min !== undefined)
21052
+ this.settings.viewTypeRange.min = Math.min(min, max);
21053
+ if (max !== undefined)
21054
+ this.settings.viewTypeRange.max = Math.max(min, max);
21055
+ var viewTypeRangeMin = this.settings.viewTypeRange.min;
21056
+ var viewTypeRangeMax = this.settings.viewTypeRange.max;
20973
21057
  var viewType = this.settings.viewType;
20974
- if (viewTypeRangeStart > viewType)
20975
- this.setViewType(viewTypeRangeStart);
20976
- else if (viewTypeRangeEnd < viewType)
20977
- this.setViewType(viewTypeRangeEnd);
21058
+ if (viewTypeRangeMin > viewType)
21059
+ this.setViewType(viewTypeRangeMin);
21060
+ else if (viewTypeRangeMax < viewType)
21061
+ this.setViewType(viewTypeRangeMax);
20978
21062
  };
20979
21063
  return GanttViewApi;
20980
21064
  }());
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 3.1.22
4
- * Build date: Tue Sep 28 2021
3
+ * Version: 3.1.26
4
+ * Build date: Tue Oct 26 2021
5
5
  *
6
6
  * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs