devexpress-gantt 3.1.28 → 3.1.32
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 +2 -2
- package/dist/dx-gantt.js +60 -31
- package/dist/dx-gantt.min.css +2 -2
- package/dist/dx-gantt.min.js +5 -5
- package/package.json +1 -1
package/dist/dx-gantt.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt)
|
|
3
|
-
* Version: 3.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 3.1.32
|
|
4
|
+
* Build date: Fri Nov 19 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.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 3.1.32
|
|
4
|
+
* Build date: Fri Nov 19 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
|
|
@@ -3073,7 +3073,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3073
3073
|
return this.getWidthByDateRange(this.range.start, date);
|
|
3074
3074
|
};
|
|
3075
3075
|
GridLayoutCalculator.prototype.getWidthByDateRange = function (start, end) {
|
|
3076
|
-
return DateUtils_1.DateUtils.getRangeTickCount(start, end, this.viewType) * this.tickSize.width;
|
|
3076
|
+
return Math.max(DateUtils_1.DateUtils.getRangeTickCount(start, end, this.viewType) * this.tickSize.width, 0);
|
|
3077
3077
|
};
|
|
3078
3078
|
GridLayoutCalculator.prototype.getDateByPos = function (position) {
|
|
3079
3079
|
if (this.viewType === Enums_1.ViewType.Months || this.viewType === Enums_1.ViewType.Quarter)
|
|
@@ -3283,9 +3283,12 @@ var GridLayoutCalculator = (function () {
|
|
|
3283
3283
|
return result;
|
|
3284
3284
|
};
|
|
3285
3285
|
GridLayoutCalculator.prototype.getRenderedScaleItemIndices = function (scaleType, renderedColIndices) {
|
|
3286
|
-
var
|
|
3287
|
-
var
|
|
3288
|
-
var
|
|
3286
|
+
var isBottomScale = scaleType === this.viewType;
|
|
3287
|
+
var calc = this._scaleCalculator;
|
|
3288
|
+
var firstRenderedIndex = renderedColIndices[0];
|
|
3289
|
+
var lastRenderedIndex = renderedColIndices[renderedColIndices.length - 1];
|
|
3290
|
+
var firstVisibleIndex = isBottomScale ? firstRenderedIndex : calc.getTopScaleIndexByBottomIndex(firstRenderedIndex);
|
|
3291
|
+
var lastVisibleIndex = isBottomScale ? lastRenderedIndex : calc.getTopScaleIndexByBottomIndex(lastRenderedIndex);
|
|
3289
3292
|
var result = new Array();
|
|
3290
3293
|
for (var i = firstVisibleIndex; i <= lastVisibleIndex; i++)
|
|
3291
3294
|
result.push(i);
|
|
@@ -3788,6 +3791,10 @@ var TaskAreaDomHelper = (function () {
|
|
|
3788
3791
|
source === Enums_1.TaskAreaEventSource.TaskEdit_DependencyStart ||
|
|
3789
3792
|
source === Enums_1.TaskAreaEventSource.TaskEdit_DependencyFinish;
|
|
3790
3793
|
};
|
|
3794
|
+
TaskAreaDomHelper.isMouseEvent = function (evt) { return evt instanceof MouseEvent; };
|
|
3795
|
+
TaskAreaDomHelper.isTouchEvent = function (evt) { return window.TouchEvent && (evt instanceof TouchEvent); };
|
|
3796
|
+
TaskAreaDomHelper.isPointerEvent = function (evt) { return window.PointerEvent && (evt instanceof PointerEvent); };
|
|
3797
|
+
TaskAreaDomHelper.isMousePointer = function (evt) { return this.isPointerEvent(evt) && evt.pointerType === "mouse"; };
|
|
3791
3798
|
TaskAreaDomHelper.classToSource = (_a = {},
|
|
3792
3799
|
_a[TaskEditController_1.TaskEditController.CLASSNAMES.TASK_EDIT_PROGRESS] = Enums_1.TaskAreaEventSource.TaskEdit_Progress,
|
|
3793
3800
|
_a[TaskEditController_1.TaskEditController.CLASSNAMES.TASK_EDIT_START] = Enums_1.TaskAreaEventSource.TaskEdit_Start,
|
|
@@ -3829,9 +3836,9 @@ var TaskAreaStateBase = (function () {
|
|
|
3829
3836
|
}
|
|
3830
3837
|
TaskAreaStateBase.prototype.start = function () { };
|
|
3831
3838
|
TaskAreaStateBase.prototype.finish = function () { };
|
|
3832
|
-
TaskAreaStateBase.prototype.isTouchEvent = function (evt) { return evt
|
|
3833
|
-
TaskAreaStateBase.prototype.isPointerEvent = function (evt) { return evt
|
|
3834
|
-
TaskAreaStateBase.prototype.isMouseEvent = function (evt) { return evt
|
|
3839
|
+
TaskAreaStateBase.prototype.isTouchEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isTouchEvent(evt); };
|
|
3840
|
+
TaskAreaStateBase.prototype.isPointerEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isPointerEvent(evt); };
|
|
3841
|
+
TaskAreaStateBase.prototype.isMouseEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isMouseEvent(evt); };
|
|
3835
3842
|
TaskAreaStateBase.prototype.onMouseWheel = function (evt) { };
|
|
3836
3843
|
TaskAreaStateBase.prototype.onScroll = function (evt) { this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_SCROLL); };
|
|
3837
3844
|
TaskAreaStateBase.prototype.onKeyDown = function (evt) {
|
|
@@ -3872,7 +3879,7 @@ var TaskAreaStateBase = (function () {
|
|
|
3872
3879
|
this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_DBLCLICK, evt, this.getClickedRowIndex(evt));
|
|
3873
3880
|
};
|
|
3874
3881
|
TaskAreaStateBase.prototype.onTaskAreaLeave = function (evt) {
|
|
3875
|
-
var isMouseLeave = evt
|
|
3882
|
+
var isMouseLeave = this.isPointerEvent(evt) ? TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt) : true;
|
|
3876
3883
|
if (isMouseLeave) {
|
|
3877
3884
|
this.isCursorInArea = false;
|
|
3878
3885
|
this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_EDIT_END, evt);
|
|
@@ -3902,8 +3909,8 @@ var TaskAreaStateBase = (function () {
|
|
|
3902
3909
|
};
|
|
3903
3910
|
TaskAreaStateBase.prototype.processPointerMove = function (evt) {
|
|
3904
3911
|
var _a;
|
|
3905
|
-
var isTouchEvent = evt
|
|
3906
|
-
var isPointerEvent = evt
|
|
3912
|
+
var isTouchEvent = this.isTouchEvent(evt);
|
|
3913
|
+
var isPointerEvent = this.isPointerEvent(evt);
|
|
3907
3914
|
(_a = this.position) !== null && _a !== void 0 ? _a : (this.position = new point_1.Point(evt_1.EvtUtils.getEventX(evt), evt_1.EvtUtils.getEventY(evt)));
|
|
3908
3915
|
var isMove = Math.abs(this.position.x - evt_1.EvtUtils.getEventX(evt)) > 2 || Math.abs(this.position.y - evt_1.EvtUtils.getEventY(evt)) > 2;
|
|
3909
3916
|
var isOutsideTouch = (isTouchEvent || isPointerEvent) && this.checkAndProcessTouchOutsideArea(evt);
|
|
@@ -3923,7 +3930,7 @@ var TaskAreaStateBase = (function () {
|
|
|
3923
3930
|
TaskAreaStateBase.prototype.processPointerUp = function (evt) {
|
|
3924
3931
|
if (!this.checkAndProcessTouchOutsideArea(evt)) {
|
|
3925
3932
|
evt.preventDefault();
|
|
3926
|
-
if (evt
|
|
3933
|
+
if (this.isTouchEvent(evt))
|
|
3927
3934
|
this.onTouchEndInternal(evt);
|
|
3928
3935
|
else
|
|
3929
3936
|
this.onDocumentPointerUpInternal(evt);
|
|
@@ -5718,8 +5725,13 @@ var GanttView = (function () {
|
|
|
5718
5725
|
this.fullScreenModeHelper = new FullScreenModeHelper_1.FullScreenModeHelper(fullScreenModeSeettings);
|
|
5719
5726
|
};
|
|
5720
5727
|
GanttView.prototype.getDateRange = function (modelStartDate, modelEndDate) {
|
|
5721
|
-
var
|
|
5722
|
-
var
|
|
5728
|
+
var visibleAreaTime = this.getVisibleAreaTime();
|
|
5729
|
+
var start = this.settings.startDateRange || DateUtils_1.DateUtils.adjustStartDateByViewType(new Date(modelStartDate.getTime() - visibleAreaTime), this.settings.viewType, this.settings.firstDayOfWeek);
|
|
5730
|
+
var end = this.settings.endDateRange || DateUtils_1.DateUtils.adjustEndDateByViewType(new Date(modelEndDate.getTime() + visibleAreaTime), this.settings.viewType, this.settings.firstDayOfWeek);
|
|
5731
|
+
if (this.settings.startDateRange && start > end)
|
|
5732
|
+
end = start;
|
|
5733
|
+
else if (this.settings.endDateRange && start > end)
|
|
5734
|
+
start = end;
|
|
5723
5735
|
return new DateRange_1.DateRange(start, end);
|
|
5724
5736
|
};
|
|
5725
5737
|
GanttView.prototype.getVisibleAreaTime = function () {
|
|
@@ -12195,6 +12207,10 @@ var ScaleCalculator = (function () {
|
|
|
12195
12207
|
result = Math.min(result + 10, this.bottomScaleItems.length - 1);
|
|
12196
12208
|
return result;
|
|
12197
12209
|
};
|
|
12210
|
+
ScaleCalculator.prototype.getTopScaleIndexByBottomIndex = function (index) {
|
|
12211
|
+
var bottomItem = this.bottomScaleItems[index];
|
|
12212
|
+
return bottomItem ? this.getScaleIndexByPos(bottomItem.position.x, DateUtils_1.DateUtils.ViewTypeToScaleMap[this.viewType]) : -1;
|
|
12213
|
+
};
|
|
12198
12214
|
ScaleCalculator.prototype.calculateBottomScale = function (scaleType) {
|
|
12199
12215
|
var items = new Array();
|
|
12200
12216
|
var defWidth = this.tickSize.width;
|
|
@@ -16030,6 +16046,9 @@ var RenderHelper = (function () {
|
|
|
16030
16046
|
RenderHelper.prototype.getScaleItemTextByStart = function (start, scaleType) {
|
|
16031
16047
|
return this._elementTextHelper.getScaleItemText(start, scaleType);
|
|
16032
16048
|
};
|
|
16049
|
+
RenderHelper.prototype.getTextWidth = function (text) {
|
|
16050
|
+
return this._elementTextHelper.getTextWidth(text);
|
|
16051
|
+
};
|
|
16033
16052
|
RenderHelper.prototype.getTaskVisibility = function (index) {
|
|
16034
16053
|
return this.gridLayoutCalculator.isTaskInRenderedRange(index) && this._elementTextHelper.getTaskVisibility(index);
|
|
16035
16054
|
};
|
|
@@ -16443,6 +16462,7 @@ exports.ResourseRender = ResourseRender;
|
|
|
16443
16462
|
|
|
16444
16463
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16445
16464
|
exports.ScaleRender = void 0;
|
|
16465
|
+
var dom_1 = __webpack_require__(2);
|
|
16446
16466
|
var Enums_1 = __webpack_require__(3);
|
|
16447
16467
|
var DateUtils_1 = __webpack_require__(21);
|
|
16448
16468
|
var RenderElementUtils_1 = __webpack_require__(14);
|
|
@@ -16574,11 +16594,19 @@ var ScaleRender = (function () {
|
|
|
16574
16594
|
};
|
|
16575
16595
|
ScaleRender.prototype.createScaleElement = function (index, scaleIndex, scaleType) {
|
|
16576
16596
|
var info = this.gridLayoutCalculator.getScaleElementInfo(index, scaleType);
|
|
16577
|
-
var
|
|
16578
|
-
|
|
16579
|
-
|
|
16580
|
-
|
|
16581
|
-
scaleElement.
|
|
16597
|
+
var charWidth = this._renderHelper.getTextWidth("a");
|
|
16598
|
+
if ((info === null || info === void 0 ? void 0 : info.size.width) > charWidth * 5) {
|
|
16599
|
+
var text = this.getScaleItemText(index, scaleType);
|
|
16600
|
+
var scaleElement = this.createScaleElementCore(index, info, scaleIndex, this.scaleElements);
|
|
16601
|
+
scaleElement.innerText = text;
|
|
16602
|
+
scaleElement.style.lineHeight = this.etalonSizeValues.scaleItemHeight + "px";
|
|
16603
|
+
if (scaleType === Enums_1.ViewType.Quarter)
|
|
16604
|
+
scaleElement.style.padding = "0";
|
|
16605
|
+
var style = getComputedStyle(scaleElement);
|
|
16606
|
+
var avaliableTextWidth = info.size.width - dom_1.DomUtils.pxToInt(style.paddingLeft) - dom_1.DomUtils.pxToInt(style.paddingRight);
|
|
16607
|
+
if (avaliableTextWidth < this._renderHelper.getTextWidth(text))
|
|
16608
|
+
scaleElement.title = text;
|
|
16609
|
+
}
|
|
16582
16610
|
};
|
|
16583
16611
|
ScaleRender.prototype.createScaleBorder = function (index, scaleIndex, scaleType) {
|
|
16584
16612
|
var info = this.gridLayoutCalculator.getScaleBorderInfo(index, scaleType);
|
|
@@ -17288,8 +17316,8 @@ var TaskAreaStateController = (function () {
|
|
|
17288
17316
|
var key = evt.pointerId;
|
|
17289
17317
|
delete this._pointers[key];
|
|
17290
17318
|
};
|
|
17291
|
-
TaskAreaStateController.prototype.isTouchEvent = function (evt) { return evt
|
|
17292
|
-
TaskAreaStateController.prototype.isPointerEvent = function (evt) { return evt
|
|
17319
|
+
TaskAreaStateController.prototype.isTouchEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isTouchEvent(evt); };
|
|
17320
|
+
TaskAreaStateController.prototype.isPointerEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isPointerEvent(evt); };
|
|
17293
17321
|
TaskAreaStateController.prototype._getActivePointersCount = function (evt) {
|
|
17294
17322
|
if (this.isTouchEvent(evt))
|
|
17295
17323
|
return evt.touches.length;
|
|
@@ -17302,8 +17330,8 @@ var TaskAreaStateController = (function () {
|
|
|
17302
17330
|
TaskAreaStateController.prototype._canStartDrag = function (evt) {
|
|
17303
17331
|
if (this._getActivePointersCount(evt) > 1)
|
|
17304
17332
|
return false;
|
|
17305
|
-
var isMouse =
|
|
17306
|
-
if (isMouse &&
|
|
17333
|
+
var isMouse = TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt);
|
|
17334
|
+
if (isMouse && evt.buttons !== 1)
|
|
17307
17335
|
return false;
|
|
17308
17336
|
if (TaskAreaDomHelper_1.TaskAreaDomHelper.isConnectorLine(evt))
|
|
17309
17337
|
return false;
|
|
@@ -17566,7 +17594,7 @@ var TaskAreaDefaultState = (function (_super) {
|
|
|
17566
17594
|
var _this = this;
|
|
17567
17595
|
evt.preventDefault();
|
|
17568
17596
|
this._lastTouchRowIndex = this.getClickedRowIndex(evt);
|
|
17569
|
-
var isMouse = this.
|
|
17597
|
+
var isMouse = this.isPointerEvent(evt) ? TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt) : this.isMouseEvent(evt);
|
|
17570
17598
|
if (isMouse)
|
|
17571
17599
|
this.changeSelectionOnTouchDown(evt);
|
|
17572
17600
|
else {
|
|
@@ -17583,10 +17611,12 @@ var TaskAreaDefaultState = (function (_super) {
|
|
|
17583
17611
|
var rowIndex = this.getClickedRowIndex(evt);
|
|
17584
17612
|
var now = new Date();
|
|
17585
17613
|
if (!this._lastEmulatedClickTime) {
|
|
17586
|
-
this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_CLICK, evt, rowIndex);
|
|
17587
|
-
this._lastEmulatedClickTime = now;
|
|
17614
|
+
var clickCanceled = !this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_CLICK, evt, rowIndex);
|
|
17588
17615
|
clearTimeout(this._dblClickClearTimer);
|
|
17589
|
-
|
|
17616
|
+
if (!clickCanceled) {
|
|
17617
|
+
this._lastEmulatedClickTime = now;
|
|
17618
|
+
this._dblClickClearTimer = setTimeout(function () { delete _this._lastEmulatedClickTime; }, TaskAreaDefaultState.defaultDblClickClearTimeout);
|
|
17619
|
+
}
|
|
17590
17620
|
}
|
|
17591
17621
|
else if (now.getTime() - this._lastEmulatedClickTime.getTime() < TaskAreaDefaultState.defaultDblClickTimeout) {
|
|
17592
17622
|
this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_DBLCLICK, evt, rowIndex);
|
|
@@ -17595,10 +17625,9 @@ var TaskAreaDefaultState = (function (_super) {
|
|
|
17595
17625
|
}
|
|
17596
17626
|
};
|
|
17597
17627
|
TaskAreaDefaultState.prototype.canToEmulateClick = function (evt) {
|
|
17598
|
-
var _a;
|
|
17599
17628
|
var isDependency = TaskAreaDomHelper_1.TaskAreaDomHelper.isConnectorLine(evt);
|
|
17600
17629
|
var canEmulate = !isDependency && this.getClickedRowIndex(evt) === this._lastTouchRowIndex;
|
|
17601
|
-
if (canEmulate && (
|
|
17630
|
+
if (canEmulate && TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt))
|
|
17602
17631
|
canEmulate && (canEmulate = evt.button !== 2);
|
|
17603
17632
|
return canEmulate;
|
|
17604
17633
|
};
|
|
@@ -18216,7 +18245,7 @@ var TaskAreaRender = (function () {
|
|
|
18216
18245
|
this.areHorizontalBordersEnabled ?
|
|
18217
18246
|
dom_1.DomUtils.addClassName(element, className) : dom_1.DomUtils.removeClassName(element, className);
|
|
18218
18247
|
var marginTop = parseInt(getComputedStyle(element).getPropertyValue("margin-top")) || 0;
|
|
18219
|
-
var height = "calc(100% - "
|
|
18248
|
+
var height = "calc(100% - ".concat(this.etalonSizeValues.scaleItemHeight * this.scaleCount + marginTop, "px)");
|
|
18220
18249
|
if (this._isExternalTaskAreaContainer)
|
|
18221
18250
|
this.prepareExternalTaskAreaContainer(element, { height: height });
|
|
18222
18251
|
else
|
package/dist/dx-gantt.min.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt.min)
|
|
3
|
-
* Version: 3.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 3.1.32
|
|
4
|
+
* Build date: Fri Nov 19 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
|