devexpress-gantt 3.1.29 → 4.0.0
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 +45 -19
- 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:
|
|
4
|
-
* Build date: Thu
|
|
3
|
+
* Version: 4.0.0
|
|
4
|
+
* Build date: Thu Dec 02 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:
|
|
4
|
-
* Build date: Thu
|
|
3
|
+
* Version: 4.0.0
|
|
4
|
+
* Build date: Thu Dec 02 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);
|
|
@@ -3927,7 +3930,7 @@ var TaskAreaStateBase = (function () {
|
|
|
3927
3930
|
TaskAreaStateBase.prototype.processPointerUp = function (evt) {
|
|
3928
3931
|
if (!this.checkAndProcessTouchOutsideArea(evt)) {
|
|
3929
3932
|
evt.preventDefault();
|
|
3930
|
-
if (evt
|
|
3933
|
+
if (this.isTouchEvent(evt))
|
|
3931
3934
|
this.onTouchEndInternal(evt);
|
|
3932
3935
|
else
|
|
3933
3936
|
this.onDocumentPointerUpInternal(evt);
|
|
@@ -5722,8 +5725,13 @@ var GanttView = (function () {
|
|
|
5722
5725
|
this.fullScreenModeHelper = new FullScreenModeHelper_1.FullScreenModeHelper(fullScreenModeSeettings);
|
|
5723
5726
|
};
|
|
5724
5727
|
GanttView.prototype.getDateRange = function (modelStartDate, modelEndDate) {
|
|
5725
|
-
var
|
|
5726
|
-
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;
|
|
5727
5735
|
return new DateRange_1.DateRange(start, end);
|
|
5728
5736
|
};
|
|
5729
5737
|
GanttView.prototype.getVisibleAreaTime = function () {
|
|
@@ -12199,6 +12207,10 @@ var ScaleCalculator = (function () {
|
|
|
12199
12207
|
result = Math.min(result + 10, this.bottomScaleItems.length - 1);
|
|
12200
12208
|
return result;
|
|
12201
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
|
+
};
|
|
12202
12214
|
ScaleCalculator.prototype.calculateBottomScale = function (scaleType) {
|
|
12203
12215
|
var items = new Array();
|
|
12204
12216
|
var defWidth = this.tickSize.width;
|
|
@@ -16034,6 +16046,9 @@ var RenderHelper = (function () {
|
|
|
16034
16046
|
RenderHelper.prototype.getScaleItemTextByStart = function (start, scaleType) {
|
|
16035
16047
|
return this._elementTextHelper.getScaleItemText(start, scaleType);
|
|
16036
16048
|
};
|
|
16049
|
+
RenderHelper.prototype.getTextWidth = function (text) {
|
|
16050
|
+
return this._elementTextHelper.getTextWidth(text);
|
|
16051
|
+
};
|
|
16037
16052
|
RenderHelper.prototype.getTaskVisibility = function (index) {
|
|
16038
16053
|
return this.gridLayoutCalculator.isTaskInRenderedRange(index) && this._elementTextHelper.getTaskVisibility(index);
|
|
16039
16054
|
};
|
|
@@ -16447,6 +16462,7 @@ exports.ResourseRender = ResourseRender;
|
|
|
16447
16462
|
|
|
16448
16463
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16449
16464
|
exports.ScaleRender = void 0;
|
|
16465
|
+
var dom_1 = __webpack_require__(2);
|
|
16450
16466
|
var Enums_1 = __webpack_require__(3);
|
|
16451
16467
|
var DateUtils_1 = __webpack_require__(21);
|
|
16452
16468
|
var RenderElementUtils_1 = __webpack_require__(14);
|
|
@@ -16578,11 +16594,19 @@ var ScaleRender = (function () {
|
|
|
16578
16594
|
};
|
|
16579
16595
|
ScaleRender.prototype.createScaleElement = function (index, scaleIndex, scaleType) {
|
|
16580
16596
|
var info = this.gridLayoutCalculator.getScaleElementInfo(index, scaleType);
|
|
16581
|
-
var
|
|
16582
|
-
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
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
|
+
}
|
|
16586
16610
|
};
|
|
16587
16611
|
ScaleRender.prototype.createScaleBorder = function (index, scaleIndex, scaleType) {
|
|
16588
16612
|
var info = this.gridLayoutCalculator.getScaleBorderInfo(index, scaleType);
|
|
@@ -17307,7 +17331,7 @@ var TaskAreaStateController = (function () {
|
|
|
17307
17331
|
if (this._getActivePointersCount(evt) > 1)
|
|
17308
17332
|
return false;
|
|
17309
17333
|
var isMouse = TaskAreaDomHelper_1.TaskAreaDomHelper.isMousePointer(evt);
|
|
17310
|
-
if (isMouse &&
|
|
17334
|
+
if (isMouse && evt.buttons !== 1)
|
|
17311
17335
|
return false;
|
|
17312
17336
|
if (TaskAreaDomHelper_1.TaskAreaDomHelper.isConnectorLine(evt))
|
|
17313
17337
|
return false;
|
|
@@ -17587,10 +17611,12 @@ var TaskAreaDefaultState = (function (_super) {
|
|
|
17587
17611
|
var rowIndex = this.getClickedRowIndex(evt);
|
|
17588
17612
|
var now = new Date();
|
|
17589
17613
|
if (!this._lastEmulatedClickTime) {
|
|
17590
|
-
this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_CLICK, evt, rowIndex);
|
|
17591
|
-
this._lastEmulatedClickTime = now;
|
|
17614
|
+
var clickCanceled = !this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_CLICK, evt, rowIndex);
|
|
17592
17615
|
clearTimeout(this._dblClickClearTimer);
|
|
17593
|
-
|
|
17616
|
+
if (!clickCanceled) {
|
|
17617
|
+
this._lastEmulatedClickTime = now;
|
|
17618
|
+
this._dblClickClearTimer = setTimeout(function () { delete _this._lastEmulatedClickTime; }, TaskAreaDefaultState.defaultDblClickClearTimeout);
|
|
17619
|
+
}
|
|
17594
17620
|
}
|
|
17595
17621
|
else if (now.getTime() - this._lastEmulatedClickTime.getTime() < TaskAreaDefaultState.defaultDblClickTimeout) {
|
|
17596
17622
|
this.raiseEvent(TaskAreaStateEventNames_1.TaskAreaStateEventNames.TASK_AREA_DBLCLICK, evt, rowIndex);
|
|
@@ -18219,7 +18245,7 @@ var TaskAreaRender = (function () {
|
|
|
18219
18245
|
this.areHorizontalBordersEnabled ?
|
|
18220
18246
|
dom_1.DomUtils.addClassName(element, className) : dom_1.DomUtils.removeClassName(element, className);
|
|
18221
18247
|
var marginTop = parseInt(getComputedStyle(element).getPropertyValue("margin-top")) || 0;
|
|
18222
|
-
var height = "calc(100% - "
|
|
18248
|
+
var height = "calc(100% - ".concat(this.etalonSizeValues.scaleItemHeight * this.scaleCount + marginTop, "px)");
|
|
18223
18249
|
if (this._isExternalTaskAreaContainer)
|
|
18224
18250
|
this.prepareExternalTaskAreaContainer(element, { height: height });
|
|
18225
18251
|
else
|
package/dist/dx-gantt.min.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt.min)
|
|
3
|
-
* Version:
|
|
4
|
-
* Build date: Thu
|
|
3
|
+
* Version: 4.0.0
|
|
4
|
+
* Build date: Thu Dec 02 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
|