@syncfusion/ej2-gantt 19.4.55 → 20.1.48
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/CHANGELOG.md +34 -1
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +242 -138
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +264 -146
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +18 -18
- package/src/gantt/actions/cell-edit.js +2 -1
- package/src/gantt/actions/dialog-edit.js +2 -1
- package/src/gantt/actions/edit.js +36 -9
- package/src/gantt/actions/filter.js +4 -2
- package/src/gantt/actions/rowdragdrop.js +41 -17
- package/src/gantt/actions/selection.js +3 -2
- package/src/gantt/base/date-processor.js +0 -1
- package/src/gantt/base/gantt-chart.js +36 -5
- package/src/gantt/base/gantt.js +15 -56
- package/src/gantt/base/splitter.js +1 -0
- package/src/gantt/base/tree-grid.js +3 -1
- package/src/gantt/renderer/chart-rows.js +36 -24
- package/src/gantt/renderer/connector-line.js +22 -18
- package/src/gantt/renderer/event-marker.js +1 -0
- package/src/gantt/renderer/nonworking-day.js +13 -6
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +40 -1
- package/src/gantt/renderer/tooltip.js +10 -3
- package/styles/bootstrap-dark.css +37 -10
- package/styles/bootstrap.css +37 -10
- package/styles/bootstrap4.css +37 -10
- package/styles/bootstrap5-dark.css +53 -19
- package/styles/bootstrap5.css +53 -19
- package/styles/fabric-dark.css +34 -7
- package/styles/fabric.css +37 -10
- package/styles/fluent-dark.css +1942 -0
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +1942 -0
- package/styles/fluent.scss +1 -0
- package/styles/gantt/_bootstrap-dark-definition.scss +10 -2
- package/styles/gantt/_bootstrap-definition.scss +11 -3
- package/styles/gantt/_bootstrap4-definition.scss +10 -2
- package/styles/gantt/_bootstrap5-definition.scss +17 -9
- package/styles/gantt/_fabric-dark-definition.scss +8 -0
- package/styles/gantt/_fabric-definition.scss +10 -2
- package/styles/gantt/_fluent-dark-definition.scss +1 -0
- package/styles/gantt/_fluent-definition.scss +21 -13
- package/styles/gantt/_highcontrast-definition.scss +9 -1
- package/styles/gantt/_highcontrast-light-definition.scss +9 -1
- package/styles/gantt/_layout.scss +53 -2
- package/styles/gantt/_material-dark-definition.scss +9 -1
- package/styles/gantt/_material-definition.scss +10 -2
- package/styles/gantt/_tailwind-definition.scss +13 -5
- package/styles/gantt/_theme.scss +2 -5
- package/styles/gantt/bootstrap-dark.css +37 -10
- package/styles/gantt/bootstrap.css +37 -10
- package/styles/gantt/bootstrap4.css +37 -10
- package/styles/gantt/bootstrap5-dark.css +53 -19
- package/styles/gantt/bootstrap5.css +53 -19
- package/styles/gantt/fabric-dark.css +34 -7
- package/styles/gantt/fabric.css +37 -10
- package/styles/gantt/fluent-dark.css +1942 -0
- package/styles/gantt/fluent-dark.scss +22 -0
- package/styles/gantt/fluent.css +1942 -0
- package/styles/gantt/fluent.scss +22 -0
- package/styles/gantt/highcontrast-light.css +34 -7
- package/styles/gantt/highcontrast.css +34 -7
- package/styles/gantt/icons/_fluent-dark.scss +1 -0
- package/styles/gantt/icons/_fluent.scss +1 -1
- package/styles/gantt/icons/_tailwind-dark.scss +28 -29
- package/styles/gantt/icons/_tailwind.scss +26 -27
- package/styles/gantt/material-dark.css +37 -10
- package/styles/gantt/material.css +37 -10
- package/styles/gantt/tailwind-dark.css +70 -99
- package/styles/gantt/tailwind.css +70 -99
- package/styles/highcontrast-light.css +34 -7
- package/styles/highcontrast.css +34 -7
- package/styles/material-dark.css +37 -10
- package/styles/material.css +37 -10
- package/styles/tailwind-dark.css +70 -99
- package/styles/tailwind.css +70 -99
|
@@ -484,7 +484,6 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
484
484
|
tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
|
|
485
485
|
}
|
|
486
486
|
else {
|
|
487
|
-
// eslint-disable-next-line
|
|
488
487
|
if (!isNullOrUndefined(ganttProperties.startDate) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
489
488
|
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
|
|
490
489
|
tDuration = 1;
|
|
@@ -4130,6 +4129,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4130
4129
|
this.chartTimelineContainer = null;
|
|
4131
4130
|
this.rangeViewContainer =
|
|
4132
4131
|
createElement('div', { className: rangeContainer });
|
|
4132
|
+
this.rangeViewContainer.setAttribute("role", "RangeContainer");
|
|
4133
4133
|
this.virtualRender = new VirtualContentRenderer(this.parent);
|
|
4134
4134
|
this.addEventListener();
|
|
4135
4135
|
}
|
|
@@ -4284,6 +4284,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4284
4284
|
GanttChart.prototype.renderTimelineContainer = function () {
|
|
4285
4285
|
this.chartTimelineContainer =
|
|
4286
4286
|
createElement('div', { className: timelineHeaderContainer });
|
|
4287
|
+
this.chartTimelineContainer.setAttribute("role", "TimelineHeader");
|
|
4287
4288
|
this.chartElement.appendChild(this.chartTimelineContainer);
|
|
4288
4289
|
};
|
|
4289
4290
|
/**
|
|
@@ -4323,8 +4324,19 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4323
4324
|
//empty row height
|
|
4324
4325
|
var emptydivHeight = 36;
|
|
4325
4326
|
var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
|
|
4326
|
-
this.
|
|
4327
|
-
|
|
4327
|
+
var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
4328
|
+
if (emptyHeight >= contentElement['offsetHeight'] || this.parent.height === 'auto') {
|
|
4329
|
+
this.chartBodyContent.style.height = formatUnit(emptyHeight);
|
|
4330
|
+
}
|
|
4331
|
+
else {
|
|
4332
|
+
var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
|
|
4333
|
+
if (contentElement['offsetHeight'] >= scrollHeight) {
|
|
4334
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
|
|
4335
|
+
}
|
|
4336
|
+
else {
|
|
4337
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
|
|
4338
|
+
}
|
|
4339
|
+
} //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
|
|
4328
4340
|
this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
|
|
4329
4341
|
this.setVirtualHeight();
|
|
4330
4342
|
this.parent.notify('updateHeight', {});
|
|
@@ -4356,7 +4368,21 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4356
4368
|
if (this.chartBodyContent.clientHeight < this.chartBodyContainer.clientHeight) {
|
|
4357
4369
|
if (lastRow) {
|
|
4358
4370
|
addClass(lastRow.querySelectorAll('td'), 'e-lastrow');
|
|
4359
|
-
|
|
4371
|
+
var emptydivHeight = 36;
|
|
4372
|
+
var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
|
|
4373
|
+
var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
4374
|
+
if (emptyHeight >= contentElement['offsetHeight']) {
|
|
4375
|
+
this.chartBodyContent.style.height = formatUnit(emptyHeight);
|
|
4376
|
+
}
|
|
4377
|
+
else {
|
|
4378
|
+
var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
|
|
4379
|
+
if (contentElement['offsetHeight'] >= scrollHeight) {
|
|
4380
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
|
|
4381
|
+
}
|
|
4382
|
+
else {
|
|
4383
|
+
this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4360
4386
|
}
|
|
4361
4387
|
}
|
|
4362
4388
|
}
|
|
@@ -4488,7 +4514,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4488
4514
|
var target = e.target;
|
|
4489
4515
|
var isOnTaskbarElement = e.target.classList.contains(taskBarMainContainer)
|
|
4490
4516
|
|| closest(e.target, '.' + taskBarMainContainer);
|
|
4491
|
-
if (closest(target, '.e-gantt-parent-taskbar')) {
|
|
4517
|
+
if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
|
|
4492
4518
|
this.chartExpandCollapseRequest(e);
|
|
4493
4519
|
}
|
|
4494
4520
|
else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
|
|
@@ -5012,6 +5038,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5012
5038
|
$target.classList.contains('e-headercell') || $target.closest('.e-segmented-taskbar')) {
|
|
5013
5039
|
e.preventDefault();
|
|
5014
5040
|
}
|
|
5041
|
+
if (isTab && $target.classList.contains('e-rowdragdrop')) {
|
|
5042
|
+
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
5043
|
+
return;
|
|
5044
|
+
}
|
|
5015
5045
|
if ($target.classList.contains('e-rowcell') && (nextElement && nextElement.classList.contains('e-rowcell')) ||
|
|
5016
5046
|
$target.classList.contains('e-headercell')) { // eslint-disable-line
|
|
5017
5047
|
if (isTab) {
|
|
@@ -5054,7 +5084,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5054
5084
|
else {
|
|
5055
5085
|
this.manageFocus($target, 'remove', true);
|
|
5056
5086
|
}
|
|
5057
|
-
if (nextElement.classList.contains('e-rowcell')) {
|
|
5087
|
+
if (nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) {
|
|
5058
5088
|
if (!$target.classList.contains('e-rowcell')) {
|
|
5059
5089
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
5060
5090
|
var fmodule = getValue('focusModule', this.parent.treeGrid.grid);
|
|
@@ -5433,6 +5463,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5433
5463
|
}
|
|
5434
5464
|
}
|
|
5435
5465
|
}
|
|
5466
|
+
currentLevel = this.parent.zoomingLevels.findIndex(function (tempLevel) {
|
|
5467
|
+
return tempLevel.level === currentLevel;
|
|
5468
|
+
});
|
|
5436
5469
|
var newTimeline = this.parent.zoomingLevels[currentLevel];
|
|
5437
5470
|
var args = {
|
|
5438
5471
|
requestType: isZoomIn ? 'beforeZoomIn' : 'beforeZoomOut',
|
|
@@ -6150,6 +6183,40 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6150
6183
|
} while ((startDate < endDate));
|
|
6151
6184
|
return parentTh;
|
|
6152
6185
|
};
|
|
6186
|
+
Timeline.prototype.updateTimelineAfterZooming = function (endDate, resized) {
|
|
6187
|
+
var timeDiff;
|
|
6188
|
+
var perDayWidth;
|
|
6189
|
+
var totWidth;
|
|
6190
|
+
var contentElement = document.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
6191
|
+
if (!isNullOrUndefined(contentElement)) {
|
|
6192
|
+
var contentWidth = contentElement['offsetWidth'];
|
|
6193
|
+
var contentHeight = contentElement['offsetHeight'];
|
|
6194
|
+
var scrollHeight = document.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
|
|
6195
|
+
timeDiff = Math.abs(this.timelineStartDate.getTime() - endDate.getTime());
|
|
6196
|
+
timeDiff = timeDiff / (1000 * 3600 * 24);
|
|
6197
|
+
if (this.bottomTier === 'None') {
|
|
6198
|
+
perDayWidth = this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize, this.customTimelineSettings.topTier.count, this.topTier);
|
|
6199
|
+
}
|
|
6200
|
+
else {
|
|
6201
|
+
perDayWidth = this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize, this.customTimelineSettings.bottomTier.count, this.bottomTier);
|
|
6202
|
+
}
|
|
6203
|
+
if (contentHeight < scrollHeight) {
|
|
6204
|
+
totWidth = (perDayWidth * timeDiff) + 17;
|
|
6205
|
+
}
|
|
6206
|
+
else {
|
|
6207
|
+
totWidth = (perDayWidth * timeDiff);
|
|
6208
|
+
}
|
|
6209
|
+
if (contentWidth >= totWidth) {
|
|
6210
|
+
var widthDiff = contentWidth - totWidth;
|
|
6211
|
+
widthDiff = Math.round(widthDiff / perDayWidth);
|
|
6212
|
+
endDate.setDate(endDate.getDate() + widthDiff);
|
|
6213
|
+
this.parent.timelineModule.timelineEndDate = endDate;
|
|
6214
|
+
if (resized) {
|
|
6215
|
+
this.parent.updateProjectDates(this.timelineStartDate, this.timelineEndDate, this.parent.isTimelineRoundOff);
|
|
6216
|
+
}
|
|
6217
|
+
}
|
|
6218
|
+
}
|
|
6219
|
+
};
|
|
6153
6220
|
Timeline.prototype.getTimelineRoundOffEndDate = function (date) {
|
|
6154
6221
|
var tierMode = this.topTier === 'None' ? this.bottomTier : this.topTier;
|
|
6155
6222
|
var endDate = new Date(date.toString());
|
|
@@ -6164,6 +6231,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6164
6231
|
endDate.setHours(24, 0, 0, 0);
|
|
6165
6232
|
}
|
|
6166
6233
|
}
|
|
6234
|
+
if (this.isZooming || this.parent.isLoad) {
|
|
6235
|
+
this.updateTimelineAfterZooming(endDate, false);
|
|
6236
|
+
}
|
|
6167
6237
|
return endDate;
|
|
6168
6238
|
};
|
|
6169
6239
|
/**
|
|
@@ -6233,7 +6303,6 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6233
6303
|
}
|
|
6234
6304
|
return increment;
|
|
6235
6305
|
};
|
|
6236
|
-
|
|
6237
6306
|
/**
|
|
6238
6307
|
* Method to find header cell was weekend or not
|
|
6239
6308
|
*
|
|
@@ -6815,6 +6884,8 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
6815
6884
|
GanttTreeGrid.prototype.renderTreeGrid = function () {
|
|
6816
6885
|
this.composeProperties();
|
|
6817
6886
|
this.bindEvents();
|
|
6887
|
+
var root = 'root';
|
|
6888
|
+
this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
|
|
6818
6889
|
this.parent.treeGrid.appendTo(this.treeGridElement);
|
|
6819
6890
|
this.wireEvents();
|
|
6820
6891
|
};
|
|
@@ -6878,7 +6949,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
6878
6949
|
var scrollWidth = this.getScrollbarWidth();
|
|
6879
6950
|
var isMobile = /Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6880
6951
|
if (scrollWidth !== 0) {
|
|
6881
|
-
content.style.cssText += 'width: calc(100% + ' + scrollWidth + 'px);';
|
|
6952
|
+
content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);';
|
|
6882
6953
|
}
|
|
6883
6954
|
else {
|
|
6884
6955
|
content.classList.add('e-gantt-scroll-padding');
|
|
@@ -8222,7 +8293,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8222
8293
|
_this.milestoneHeight = 0;
|
|
8223
8294
|
_this.milesStoneRadius = 0;
|
|
8224
8295
|
_this.baselineTop = 0;
|
|
8225
|
-
_this.baselineHeight =
|
|
8296
|
+
_this.baselineHeight = 8;
|
|
8226
8297
|
_this.touchLeftConnectorpoint = '';
|
|
8227
8298
|
_this.touchRightConnectorpoint = '';
|
|
8228
8299
|
_this.dropSplit = false;
|
|
@@ -8305,7 +8376,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8305
8376
|
* @private
|
|
8306
8377
|
*/
|
|
8307
8378
|
ChartRows.prototype.getIndicatorNode = function (indicator) {
|
|
8308
|
-
var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"
|
|
8379
|
+
var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '" role="LabelIndicator" style="line-height:'
|
|
8309
8380
|
+ (this.parent.rowHeight) + 'px;' +
|
|
8310
8381
|
'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
|
|
8311
8382
|
return this.createDivElement(templateString);
|
|
@@ -8378,9 +8449,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8378
8449
|
}
|
|
8379
8450
|
else {
|
|
8380
8451
|
taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
|
|
8381
|
-
(this.taskBarHeight - 1) + 'px;
|
|
8382
|
-
|
|
8383
|
-
|
|
8452
|
+
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'text-align: left;' : '') +
|
|
8453
|
+
+(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
8454
|
+
+(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
8384
8455
|
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
8385
8456
|
}
|
|
8386
8457
|
}
|
|
@@ -8797,7 +8868,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8797
8868
|
*/
|
|
8798
8869
|
ChartRows.prototype.getTaskBaselineNode = function () {
|
|
8799
8870
|
var data = this.templateData;
|
|
8800
|
-
var template = '<div class="' + baselineBar + ' ' + '" style="margin-top:' + this.baselineTop +
|
|
8871
|
+
var template = '<div class="' + baselineBar + ' ' + '" role="BaselineBar" style="margin-top:' + this.baselineTop +
|
|
8801
8872
|
'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
|
|
8802
8873
|
'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
|
|
8803
8874
|
this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
|
|
@@ -8811,9 +8882,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8811
8882
|
*/
|
|
8812
8883
|
ChartRows.prototype.getMilestoneBaselineNode = function () {
|
|
8813
8884
|
var data = this.templateData;
|
|
8885
|
+
var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
|
|
8814
8886
|
var template = '<div class="' + baselineMilestoneContainer + ' ' + '" style="' +
|
|
8815
8887
|
'left:' + (data.ganttProperties.baselineLeft - this.milesStoneRadius) + 'px;' +
|
|
8816
|
-
'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) +
|
|
8888
|
+
'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) +
|
|
8817
8889
|
'px">' + '<div class="' + baselineMilestoneDiv + '">' + '<div class="' + baselineMilestoneDiv +
|
|
8818
8890
|
' ' + baselineMilestoneTop + '" ' +
|
|
8819
8891
|
'style="top:' + (-this.milestoneHeight) + 'px;border-right:' + this.milesStoneRadius +
|
|
@@ -8841,7 +8913,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8841
8913
|
*/
|
|
8842
8914
|
ChartRows.prototype.getLeftLabelNode = function (i) {
|
|
8843
8915
|
var leftLabelNode = this.leftLabelContainer();
|
|
8844
|
-
|
|
8916
|
+
if (this.generateTaskLabelAriaLabel('left') !== "") {
|
|
8917
|
+
leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
|
|
8918
|
+
}
|
|
8845
8919
|
var leftLabelTemplateNode = null;
|
|
8846
8920
|
if (this.leftTaskLabelTemplateFunction) {
|
|
8847
8921
|
leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0], this.parent.treeGrid['root']);
|
|
@@ -8863,9 +8937,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8863
8937
|
return leftLabelNode;
|
|
8864
8938
|
};
|
|
8865
8939
|
ChartRows.prototype.getLableText = function (labelString, labelDiv) {
|
|
8940
|
+
var leftLabelHeight = this.parent.renderBaseline ? ((this.parent.rowHeight - this.taskBarHeight) / 2) : this.taskBarMarginTop;
|
|
8866
8941
|
var templateString = createElement('div', {
|
|
8867
8942
|
className: labelDiv, styles: 'height:' + (this.taskBarHeight) + 'px;' +
|
|
8868
|
-
'margin-top:' +
|
|
8943
|
+
'margin-top:' + leftLabelHeight + 'px;'
|
|
8869
8944
|
});
|
|
8870
8945
|
var spanElem = createElement('span', { className: label });
|
|
8871
8946
|
var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
@@ -8884,7 +8959,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8884
8959
|
*/
|
|
8885
8960
|
ChartRows.prototype.getRightLabelNode = function (i) {
|
|
8886
8961
|
var rightLabelNode = this.rightLabelContainer();
|
|
8887
|
-
|
|
8962
|
+
if (this.generateTaskLabelAriaLabel('right') !== "") {
|
|
8963
|
+
rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
|
|
8964
|
+
}
|
|
8888
8965
|
var rightLabelTemplateNode = null;
|
|
8889
8966
|
if (this.rightTaskLabelTemplateFunction) {
|
|
8890
8967
|
rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0], this.parent.treeGrid['root']);
|
|
@@ -8997,8 +9074,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8997
9074
|
else {
|
|
8998
9075
|
labelDiv = this.createDivElement('<span class="' +
|
|
8999
9076
|
taskLabel + '" style="line-height:' +
|
|
9000
|
-
(this.taskBarHeight - 1) + 'px;
|
|
9001
|
-
(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '
|
|
9077
|
+
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
9078
|
+
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9079
|
+
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
9080
|
+
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9002
9081
|
this.taskBarHeight + 'px;">' + labelString + '</span>');
|
|
9003
9082
|
}
|
|
9004
9083
|
progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
|
|
@@ -9027,10 +9106,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9027
9106
|
var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
9028
9107
|
'e-chart-row-border' : '';
|
|
9029
9108
|
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
|
|
9030
|
-
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
9109
|
+
'role="ChartRow" style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
9031
9110
|
this.parent.rowHeight + 'px;">' +
|
|
9032
9111
|
'<td class="' + chartRowCell + ' ' + className
|
|
9033
|
-
+ '" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
9112
|
+
+ '" role="ChartCell" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
9034
9113
|
return table.childNodes;
|
|
9035
9114
|
};
|
|
9036
9115
|
/**
|
|
@@ -9095,7 +9174,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9095
9174
|
};
|
|
9096
9175
|
ChartRows.prototype.leftLabelContainer = function () {
|
|
9097
9176
|
var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
|
|
9098
|
-
leftLabelContainer) + ' ' + '" tabindex="-1" style="height:' +
|
|
9177
|
+
leftLabelContainer) + ' ' + '" tabindex="-1" role="LeftLabel" style="height:' +
|
|
9099
9178
|
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
9100
9179
|
return this.createDivElement(template);
|
|
9101
9180
|
};
|
|
@@ -9107,7 +9186,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9107
9186
|
var template = '<div class="' + taskBarMainContainer + ' ' +
|
|
9108
9187
|
this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
|
|
9109
9188
|
((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
|
|
9110
|
-
' tabindex="-1" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
9189
|
+
' tabindex="-1" role="TaskBar" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
9111
9190
|
('width:' + this.milestoneHeight + 'px;height:' +
|
|
9112
9191
|
this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
|
|
9113
9192
|
(this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
|
|
@@ -9118,26 +9197,26 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9118
9197
|
};
|
|
9119
9198
|
ChartRows.prototype.rightLabelContainer = function () {
|
|
9120
9199
|
var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
|
|
9121
|
-
rightLabelContainer) + '" ' + ' tabindex="-1" style="left:' + this.getRightLabelLeft(this.templateData) + 'px;height:'
|
|
9200
|
+
rightLabelContainer) + '" ' + ' tabindex="-1" role="RightLabel" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
|
|
9122
9201
|
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
9123
9202
|
return this.createDivElement(template);
|
|
9124
9203
|
};
|
|
9125
9204
|
ChartRows.prototype.childTaskbarLeftResizer = function () {
|
|
9126
9205
|
var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
|
|
9127
9206
|
var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
9128
|
-
' style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9207
|
+
' role="LeftResizer" style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9129
9208
|
return this.createDivElement(template);
|
|
9130
9209
|
};
|
|
9131
9210
|
ChartRows.prototype.childTaskbarRightResizer = function () {
|
|
9132
9211
|
var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
|
|
9133
9212
|
var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
9134
|
-
' style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
9213
|
+
' role="RightResizer" style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
9135
9214
|
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9136
9215
|
return this.createDivElement(template);
|
|
9137
9216
|
};
|
|
9138
9217
|
ChartRows.prototype.childTaskbarProgressResizer = function () {
|
|
9139
9218
|
var template = '<div class="' + childProgressResizer + '"' +
|
|
9140
|
-
' style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
9219
|
+
' role="ProgressResizer" style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
9141
9220
|
(this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
|
|
9142
9221
|
'><div class="' + progressHandlerElement + '"></div>' +
|
|
9143
9222
|
'<div class="' + progressBarHandlerAfter + '"></div></div>';
|
|
@@ -9335,10 +9414,13 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9335
9414
|
* @private
|
|
9336
9415
|
*/
|
|
9337
9416
|
ChartRows.prototype.initChartHelperPrivateVariable = function () {
|
|
9417
|
+
var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
|
|
9418
|
+
var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
|
|
9419
|
+
var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
|
|
9338
9420
|
this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
|
|
9339
9421
|
this.parent.baselineColor !== '' ? this.parent.baselineColor : null;
|
|
9340
9422
|
this.taskBarHeight = isNullOrUndefined(this.parent.taskbarHeight) || this.parent.taskbarHeight >= this.parent.rowHeight ?
|
|
9341
|
-
Math.floor(this.parent.rowHeight *
|
|
9423
|
+
Math.floor(this.parent.rowHeight * taskbarHeightValue) : this.parent.taskbarHeight; // 0.62 -- Standard Ratio.
|
|
9342
9424
|
if (this.parent.renderBaseline) {
|
|
9343
9425
|
var height = void 0;
|
|
9344
9426
|
if ((this.taskBarHeight + this.baselineHeight) <= this.parent.rowHeight) {
|
|
@@ -9349,11 +9431,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9349
9431
|
}
|
|
9350
9432
|
this.taskBarHeight = height;
|
|
9351
9433
|
}
|
|
9352
|
-
this.milestoneHeight = Math.floor(this.taskBarHeight *
|
|
9353
|
-
this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) /
|
|
9434
|
+
this.milestoneHeight = Math.floor(this.taskBarHeight * milestoneHeightValue); // 0.82 -- Standard Ratio.
|
|
9435
|
+
this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) / taskBarMarginTopValue);
|
|
9354
9436
|
this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
|
|
9355
9437
|
this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
|
|
9356
|
-
this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) -
|
|
9438
|
+
this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
|
|
9357
9439
|
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
|
|
9358
9440
|
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
|
|
9359
9441
|
};
|
|
@@ -9547,6 +9629,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9547
9629
|
var indicators = this.templateData.ganttProperties.indicators;
|
|
9548
9630
|
for (var indicatorIndex = 0; indicatorIndex < indicators.length; indicatorIndex++) {
|
|
9549
9631
|
taskIndicatorNode = this.getIndicatorNode(indicators[indicatorIndex]);
|
|
9632
|
+
taskIndicatorNode[0].setAttribute('aria-label', indicators[indicatorIndex].name);
|
|
9550
9633
|
if (indicators[indicatorIndex].name.indexOf('$') > -1 || indicators[indicatorIndex].name.indexOf('#') > -1) {
|
|
9551
9634
|
taskIndicatorTextFunction = this.templateCompiler(indicators[indicatorIndex].name);
|
|
9552
9635
|
taskIndicatorTextNode = taskIndicatorTextFunction(extend({ index: i }, this.templateData), this.parent, 'indicatorLabelText');
|
|
@@ -10771,7 +10854,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
10771
10854
|
for (var i = 0; i < childNodes.length; i++) {
|
|
10772
10855
|
var innerChild = childNodes[i].childNodes;
|
|
10773
10856
|
for (var j = 0; j < innerChild.length; j++) {
|
|
10774
|
-
var ariaString = this.parent.connectorLineModule.generateAriaLabel(ariaConnector[i]);
|
|
10857
|
+
var ariaString = 'Connector Line ' + this.parent.connectorLineModule.generateAriaLabel(ariaConnector[i]);
|
|
10775
10858
|
innerChild[j].setAttribute('aria-label', ariaString);
|
|
10776
10859
|
}
|
|
10777
10860
|
}
|
|
@@ -11028,7 +11111,11 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11028
11111
|
var connectorContainer = '';
|
|
11029
11112
|
var isVirtual = this.parent.virtualScrollModule && this.parent.enableVirtualization;
|
|
11030
11113
|
var connectorLine$$1 = this.getPosition(data, this.getParentPosition(data), height);
|
|
11031
|
-
var
|
|
11114
|
+
var isMilestoneValue = 0;
|
|
11115
|
+
if (this.parent.renderBaseline) {
|
|
11116
|
+
isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
|
|
11117
|
+
}
|
|
11118
|
+
var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
|
|
11032
11119
|
if (this.getParentPosition(data)) {
|
|
11033
11120
|
connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
|
|
11034
11121
|
var div = '<div class="' + connectorLineContainer +
|
|
@@ -11056,7 +11143,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11056
11143
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11057
11144
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
11058
11145
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11059
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11146
|
+
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11060
11147
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
11061
11148
|
div = div + eLine;
|
|
11062
11149
|
div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -11077,7 +11164,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11077
11164
|
}
|
|
11078
11165
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
11079
11166
|
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
|
|
11080
|
-
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11167
|
+
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11081
11168
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
11082
11169
|
div = div + eLine;
|
|
11083
11170
|
div = div + 'left:' + (isMilestoneParent ? data.parentWidth - 1 : data.parentWidth) + 'px;width:' +
|
|
@@ -11108,7 +11195,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11108
11195
|
}
|
|
11109
11196
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
11110
11197
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11111
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
|
|
11198
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11112
11199
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
11113
11200
|
div = div + rightArrow;
|
|
11114
11201
|
div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
|
|
@@ -11138,7 +11225,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11138
11225
|
}
|
|
11139
11226
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
11140
11227
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11141
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11228
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11142
11229
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
11143
11230
|
div = div + rightArrow;
|
|
11144
11231
|
div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -11164,7 +11251,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11164
11251
|
}
|
|
11165
11252
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
11166
11253
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11167
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11254
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11168
11255
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
11169
11256
|
div = div + rightArrow;
|
|
11170
11257
|
div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -11177,7 +11264,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11177
11264
|
}
|
|
11178
11265
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
11179
11266
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11180
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11267
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11181
11268
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
11182
11269
|
div = div + rightArrow;
|
|
11183
11270
|
div = div + 'left:10px;' + duplicateStingTwo;
|
|
@@ -11190,7 +11277,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11190
11277
|
}
|
|
11191
11278
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
11192
11279
|
div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11193
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
|
|
11280
|
+
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11194
11281
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
11195
11282
|
div = div + eLine;
|
|
11196
11283
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
@@ -11211,7 +11298,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11211
11298
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
11212
11299
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11213
11300
|
((data.parentIndex * data.rowHeight) +
|
|
11214
|
-
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
|
|
11301
|
+
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11215
11302
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
11216
11303
|
div = div + eLine;
|
|
11217
11304
|
div = div + 'width:' + (data.parentLeft - data.childLeft + 21) + 'px;' +
|
|
@@ -11228,7 +11315,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11228
11315
|
}
|
|
11229
11316
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
11230
11317
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11231
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
|
|
11318
|
+
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11232
11319
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
11233
11320
|
div = div + eLine;
|
|
11234
11321
|
div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -11252,7 +11339,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11252
11339
|
}
|
|
11253
11340
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
11254
11341
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11255
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
|
|
11342
|
+
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11256
11343
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
11257
11344
|
div = div + eLine;
|
|
11258
11345
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
|
|
@@ -11278,7 +11365,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11278
11365
|
}
|
|
11279
11366
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
11280
11367
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11281
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11368
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11282
11369
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
11283
11370
|
div = div + duplicateStingOne;
|
|
11284
11371
|
div = div + eLine;
|
|
@@ -11301,7 +11388,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11301
11388
|
}
|
|
11302
11389
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
11303
11390
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11304
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11391
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11305
11392
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
11306
11393
|
div = div + leftArrow;
|
|
11307
11394
|
div = div + ('left:' + ((data.childLeft + data.childWidth) -
|
|
@@ -11330,7 +11417,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11330
11417
|
}
|
|
11331
11418
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
11332
11419
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11333
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;width:1px;' +
|
|
11420
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11334
11421
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
11335
11422
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
11336
11423
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -11358,7 +11445,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11358
11445
|
}
|
|
11359
11446
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
11360
11447
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11361
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11448
|
+
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11362
11449
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
11363
11450
|
div = div + duplicateStingOne;
|
|
11364
11451
|
div = div + eLine;
|
|
@@ -11376,7 +11463,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11376
11463
|
}
|
|
11377
11464
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
11378
11465
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11379
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
|
|
11466
|
+
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11380
11467
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
11381
11468
|
div = div + eLine;
|
|
11382
11469
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11401,7 +11488,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11401
11488
|
}
|
|
11402
11489
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
11403
11490
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11404
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
|
|
11491
|
+
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11405
11492
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
11406
11493
|
div = div + eLine;
|
|
11407
11494
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -11645,6 +11732,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
11645
11732
|
_this.splitterObject.paneSettings[1].size = null;
|
|
11646
11733
|
_this.splitterObject.paneSettings[1].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionChart);
|
|
11647
11734
|
}
|
|
11735
|
+
_this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
|
|
11648
11736
|
callBackPromise.resolve(splitterResizedArgs);
|
|
11649
11737
|
});
|
|
11650
11738
|
return callBackPromise;
|
|
@@ -11927,6 +12015,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
11927
12015
|
* @returns {void} .
|
|
11928
12016
|
*/
|
|
11929
12017
|
Tooltip$$1.prototype.updateTooltipPosition = function (args) {
|
|
12018
|
+
args.element.style.visibility = 'visible';
|
|
11930
12019
|
if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
|
|
11931
12020
|
return;
|
|
11932
12021
|
}
|
|
@@ -11956,7 +12045,6 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
11956
12045
|
tooltipPositionY = tooltipPositionY + 10;
|
|
11957
12046
|
}
|
|
11958
12047
|
args.element.style.top = tooltipPositionY + 'px';
|
|
11959
|
-
args.element.style.visibility = 'visible';
|
|
11960
12048
|
};
|
|
11961
12049
|
/**
|
|
11962
12050
|
* Method to get mouse pointor position
|
|
@@ -11998,9 +12086,16 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
11998
12086
|
switch (elementType) {
|
|
11999
12087
|
case 'milestone':
|
|
12000
12088
|
{
|
|
12001
|
-
var
|
|
12089
|
+
var milestoneStartDate = void 0;
|
|
12090
|
+
if (args.target.className.includes('e-baseline-gantt-milestone') && !isNullOrUndefined(data.baselineStartDate)) {
|
|
12091
|
+
milestoneStartDate = data.baselineStartDate;
|
|
12092
|
+
}
|
|
12093
|
+
else if (!isNullOrUndefined(data.startDate)) {
|
|
12094
|
+
milestoneStartDate = data.startDate;
|
|
12095
|
+
}
|
|
12096
|
+
var sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
|
|
12002
12097
|
'<td class = "e-gantt-tooltip-value">' +
|
|
12003
|
-
this.parent.getFormatedDate(
|
|
12098
|
+
this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
|
|
12004
12099
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
12005
12100
|
taskName + sDate + '</tbody></table>';
|
|
12006
12101
|
break;
|
|
@@ -12742,25 +12837,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12742
12837
|
* @returns {void} .
|
|
12743
12838
|
*/
|
|
12744
12839
|
Gantt.prototype.calculateDimensions = function () {
|
|
12745
|
-
var settingsHeight;
|
|
12746
|
-
if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
|
|
12747
|
-
!this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
|
|
12748
|
-
var ganttHeight = void 0;
|
|
12749
|
-
if (this.element.parentElement.style.height.indexOf('%') == -1) {
|
|
12750
|
-
ganttHeight = Number(this.height.split("%")[0]);
|
|
12751
|
-
}
|
|
12752
|
-
else {
|
|
12753
|
-
ganttHeight = Number(this.element.parentElement.style.height.split("%")[0]);
|
|
12754
|
-
}
|
|
12755
|
-
ganttHeight = (ganttHeight * window.innerHeight) / 100;
|
|
12756
|
-
if (this.height === '100%') {
|
|
12757
|
-
ganttHeight = ganttHeight - 16;
|
|
12758
|
-
}
|
|
12759
|
-
settingsHeight = this.validateDimentionValue(ganttHeight);
|
|
12760
|
-
}
|
|
12761
|
-
else {
|
|
12762
|
-
settingsHeight = this.validateDimentionValue(this.height);
|
|
12763
|
-
}
|
|
12840
|
+
var settingsHeight = this.validateDimentionValue(this.height);
|
|
12764
12841
|
var settingsWidth = this.validateDimentionValue(this.width);
|
|
12765
12842
|
if (!isNullOrUndefined(this.width) && typeof (this.width) === 'string' && this.width.indexOf('%') !== -1) {
|
|
12766
12843
|
settingsWidth = this.width;
|
|
@@ -12903,40 +12980,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12903
12980
|
*/
|
|
12904
12981
|
Gantt.prototype.windowResize = function () {
|
|
12905
12982
|
if (!isNullOrUndefined(this.element)) {
|
|
12906
|
-
var settingsHeight = void 0;
|
|
12907
|
-
if (this.height.indexOf('%') !== -1) {
|
|
12908
|
-
var ganttHeight = Number(this.height.split("%")[0]);
|
|
12909
|
-
if (this.element.parentElement && (this.element.parentElement.style.height)) {
|
|
12910
|
-
var containerHeight = void 0;
|
|
12911
|
-
if (this.element.parentElement.style.height.indexOf('%') == -1) {
|
|
12912
|
-
containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
|
|
12913
|
-
ganttHeight = (ganttHeight * containerHeight) / 100;
|
|
12914
|
-
}
|
|
12915
|
-
else {
|
|
12916
|
-
containerHeight = Number(this.element.parentElement.style.height.split("%")[0]);
|
|
12917
|
-
ganttHeight = (window.innerHeight * containerHeight) / 100;
|
|
12918
|
-
}
|
|
12919
|
-
}
|
|
12920
|
-
else {
|
|
12921
|
-
ganttHeight = Number(this.height.split("%")[0]);
|
|
12922
|
-
ganttHeight = (ganttHeight * window.innerHeight) / 100;
|
|
12923
|
-
}
|
|
12924
|
-
if (this.height === '100%') {
|
|
12925
|
-
ganttHeight = ganttHeight - 16;
|
|
12926
|
-
}
|
|
12927
|
-
var toolbarHeight = 0;
|
|
12928
|
-
if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
|
|
12929
|
-
toolbarHeight = this.toolbarModule.element.offsetHeight;
|
|
12930
|
-
}
|
|
12931
|
-
var contentHeight = ganttHeight - this.ganttChartModule.chartTimelineContainer.offsetHeight - toolbarHeight;
|
|
12932
|
-
settingsHeight = this.validateDimentionValue(ganttHeight);
|
|
12933
|
-
this.element.style.height = settingsHeight;
|
|
12934
|
-
this.element.querySelectorAll('.e-content')[0]['style'].height = contentHeight + 'px';
|
|
12935
|
-
this.element.querySelectorAll('.e-content')[2]['style'].height = contentHeight + 'px';
|
|
12936
|
-
}
|
|
12937
|
-
else {
|
|
12938
|
-
settingsHeight = this.validateDimentionValue(this.height);
|
|
12939
|
-
}
|
|
12940
12983
|
this.updateContentHeight();
|
|
12941
12984
|
this.ganttChartModule.updateWidthAndHeight(); // Updating chart scroll conatiner height for row mismatch
|
|
12942
12985
|
this.treeGridModule.ensureScrollBar();
|
|
@@ -13282,6 +13325,18 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13282
13325
|
* @private
|
|
13283
13326
|
*/
|
|
13284
13327
|
Gantt.prototype.treeDataBound = function (args) {
|
|
13328
|
+
this.element.getElementsByClassName('e-chart-root-container')[0]['style'].height = '100%';
|
|
13329
|
+
var gridHeight = this.element.getElementsByClassName('e-gridcontent')[0]['style'].height;
|
|
13330
|
+
var timelineContainer = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
|
|
13331
|
+
gridHeight = 'calc(100% - ' + timelineContainer + 'px)';
|
|
13332
|
+
// eslint-disable-next-line
|
|
13333
|
+
this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
13334
|
+
if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
|
|
13335
|
+
this.splitterElement.style.height = 'calc(100% - ' + this.toolbarModule.element.offsetHeight + 'px)';
|
|
13336
|
+
}
|
|
13337
|
+
else {
|
|
13338
|
+
this.splitterElement.style.height = '100%';
|
|
13339
|
+
}
|
|
13285
13340
|
if (this.isLoad) {
|
|
13286
13341
|
this.updateCurrentViewData();
|
|
13287
13342
|
if (!this.enableVirtualization) {
|
|
@@ -13301,8 +13356,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13301
13356
|
removeClass(this.treeGrid.element.querySelectorAll('.e-headercell'), timelineSingleHeaderOuterDiv);
|
|
13302
13357
|
removeClass(this.treeGrid.element.querySelectorAll('.e-columnheader'), timelineSingleHeaderOuterDiv);
|
|
13303
13358
|
}
|
|
13304
|
-
this.treeGrid.height =
|
|
13305
|
-
this.treeGrid.grid.getHeaderContent().offsetHeight;
|
|
13359
|
+
this.treeGrid.height = '100%';
|
|
13306
13360
|
this.notify('tree-grid-created', {});
|
|
13307
13361
|
this.createGanttPopUpElement();
|
|
13308
13362
|
this.hideSpinner();
|
|
@@ -13813,7 +13867,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13813
13867
|
*/
|
|
13814
13868
|
Gantt.prototype.updateGridLineContainerHeight = function () {
|
|
13815
13869
|
if (this.chartVerticalLineContainer) {
|
|
13816
|
-
this.chartVerticalLineContainer.style.height = formatUnit(this.
|
|
13870
|
+
this.chartVerticalLineContainer.style.height = formatUnit(this.contentHeight);
|
|
13817
13871
|
}
|
|
13818
13872
|
};
|
|
13819
13873
|
/**
|
|
@@ -15724,7 +15778,8 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
15724
15778
|
args.cancel = true;
|
|
15725
15779
|
return;
|
|
15726
15780
|
}
|
|
15727
|
-
if (data.hasChildRecords && (field === taskSettings.endDate
|
|
15781
|
+
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
15782
|
+
data['isManual'] == false) || this.parent.taskMode == 'Auto')) || field === taskSettings.duration
|
|
15728
15783
|
|| field === taskSettings.dependency || field === taskSettings.progress
|
|
15729
15784
|
|| field === taskSettings.work || field === 'taskType')) {
|
|
15730
15785
|
args.cancel = true;
|
|
@@ -19866,7 +19921,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19866
19921
|
disabled = true;
|
|
19867
19922
|
}
|
|
19868
19923
|
if (this.editedRecord.hasChildRecords) {
|
|
19869
|
-
if (column.field === this.parent.taskFields.endDate
|
|
19924
|
+
if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
|
|
19925
|
+
this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
|
|
19870
19926
|
column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
|
|
19871
19927
|
column.field === 'taskType') {
|
|
19872
19928
|
disabled = true;
|
|
@@ -23701,7 +23757,15 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23701
23757
|
}
|
|
23702
23758
|
/* data Source update */
|
|
23703
23759
|
if (!isNullOrUndefined(parentItem)) {
|
|
23704
|
-
|
|
23760
|
+
if (rowPosition == 'Above') {
|
|
23761
|
+
childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem);
|
|
23762
|
+
}
|
|
23763
|
+
else if (rowPosition == 'Below') {
|
|
23764
|
+
childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem) + 1;
|
|
23765
|
+
}
|
|
23766
|
+
else {
|
|
23767
|
+
childIndex = parentItem.childRecords.length;
|
|
23768
|
+
}
|
|
23705
23769
|
/*Child collection update*/
|
|
23706
23770
|
parentItem.childRecords.splice(childIndex, 0, record);
|
|
23707
23771
|
if ((this.parent.dataSource instanceof DataManager &&
|
|
@@ -23709,12 +23773,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23709
23773
|
!isNullOrUndefined(this.parent.dataSource)) {
|
|
23710
23774
|
var child = this.parent.taskFields.child;
|
|
23711
23775
|
if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
|
|
23712
|
-
if (rowPosition === 'Above') {
|
|
23776
|
+
if (rowPosition === 'Above' || rowPosition === 'Below') {
|
|
23713
23777
|
parentItem.taskData[child].splice(childIndex, 0, record.taskData);
|
|
23714
23778
|
}
|
|
23715
|
-
else if (rowPosition === 'Below') {
|
|
23716
|
-
parentItem.taskData[child].splice(childIndex + 1, 0, record.taskData);
|
|
23717
|
-
}
|
|
23718
23779
|
else {
|
|
23719
23780
|
parentItem.taskData[child].push(record.taskData);
|
|
23720
23781
|
}
|
|
@@ -23780,11 +23841,27 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23780
23841
|
}
|
|
23781
23842
|
};
|
|
23782
23843
|
Edit$$1.prototype.refreshRecordInImmutableMode = function () {
|
|
23844
|
+
var _loop_1 = function (i) {
|
|
23845
|
+
var originalData = this_1.parent.modifiedRecords[i];
|
|
23846
|
+
var treeIndex = this_1.parent.allowRowDragAndDrop ? 1 : 0;
|
|
23847
|
+
var uniqueTaskID = this_1.parent.taskFields.id;
|
|
23848
|
+
originalIndex = this_1.parent.currentViewData.findIndex(function (data) {
|
|
23849
|
+
return (data[uniqueTaskID] == originalData[uniqueTaskID]);
|
|
23850
|
+
});
|
|
23851
|
+
if (this_1.parent.treeGrid.getRows()[originalIndex]) {
|
|
23852
|
+
this_1.parent.treeGrid.renderModule.cellRender({
|
|
23853
|
+
data: originalData, cell: this_1.parent.treeGrid.getRows()[originalIndex].cells[this_1.parent.treeColumnIndex + treeIndex],
|
|
23854
|
+
column: this_1.parent.treeGrid.grid.getColumns()[this_1.parent.treeColumnIndex],
|
|
23855
|
+
requestType: 'rowDragAndDrop'
|
|
23856
|
+
});
|
|
23857
|
+
this_1.parent.treeGrid.renderModule.RowModifier({
|
|
23858
|
+
data: originalData, row: this_1.parent.treeGrid.getRows()[originalIndex], rowHeight: this_1.parent.rowHeight
|
|
23859
|
+
});
|
|
23860
|
+
}
|
|
23861
|
+
};
|
|
23862
|
+
var this_1 = this, originalIndex;
|
|
23783
23863
|
for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
|
|
23784
|
-
|
|
23785
|
-
var dataId = this.parent.viewType === 'ProjectView' ?
|
|
23786
|
-
originalData.ganttProperties.taskId : originalData.ganttProperties.rowUniqueID;
|
|
23787
|
-
this.parent.treeGrid.grid.setRowData(dataId, originalData);
|
|
23864
|
+
_loop_1(i);
|
|
23788
23865
|
}
|
|
23789
23866
|
};
|
|
23790
23867
|
/**
|
|
@@ -24162,6 +24239,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24162
24239
|
}
|
|
24163
24240
|
this.addSuccess(args);
|
|
24164
24241
|
args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
|
|
24242
|
+
if (this.dialogModule.isAddNewResource && !this.parent.isEdit && this.parent.taskFields.work) {
|
|
24243
|
+
this.parent.dataOperation.updateWorkWithDuration(cAddedRecord[0]);
|
|
24244
|
+
}
|
|
24165
24245
|
this.parent.trigger('actionComplete', args);
|
|
24166
24246
|
if (this.dialogModule.dialog && !this.dialogModule.dialogObj.isDestroyed) {
|
|
24167
24247
|
this.dialogModule.dialogObj.hide();
|
|
@@ -24538,15 +24618,18 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24538
24618
|
if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
|
|
24539
24619
|
draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
|
|
24540
24620
|
draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
|
|
24621
|
+
draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.parentID];
|
|
24541
24622
|
}
|
|
24542
24623
|
else {
|
|
24543
24624
|
draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
|
|
24544
24625
|
draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
|
|
24626
|
+
draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.id];
|
|
24545
24627
|
}
|
|
24546
24628
|
}
|
|
24547
24629
|
else {
|
|
24548
24630
|
draggedRec[this.parent.taskFields.parentID] = null;
|
|
24549
24631
|
draggedRec.taskData[this.parent.taskFields.parentID] = null;
|
|
24632
|
+
draggedRec.ganttProperties['parentId'] = null;
|
|
24550
24633
|
}
|
|
24551
24634
|
}
|
|
24552
24635
|
};
|
|
@@ -25085,11 +25168,13 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25085
25168
|
// ...
|
|
25086
25169
|
};
|
|
25087
25170
|
Filter$$1.prototype.closeFilterOnContextClick = function (element) {
|
|
25171
|
+
var datePickerElement = document.querySelector('body > div.e-datepicker');
|
|
25172
|
+
var dateTimePickerElement = document.querySelector('body > div.e-datetimepicker');
|
|
25088
25173
|
if (this.filterMenuElement && document.body.contains(this.filterMenuElement)) {
|
|
25089
25174
|
var ganttElement = closest(element, '#' + this.parent.element.id)
|
|
25090
25175
|
|| element.querySelector('#' + this.parent.element.id);
|
|
25091
|
-
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element
|
|
25092
|
-
|
|
25176
|
+
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || (!(this.filterMenuElement.contains(element)) && (isNullOrUndefined(datePickerElement))
|
|
25177
|
+
&& (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML')))) {
|
|
25093
25178
|
remove(this.filterMenuElement);
|
|
25094
25179
|
this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
|
|
25095
25180
|
this.filterMenuElement = null;
|
|
@@ -25408,8 +25493,9 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
25408
25493
|
}
|
|
25409
25494
|
this.addRemoveClass(index);
|
|
25410
25495
|
this.selectedRowIndexes = extend([], this.getSelectedRowIndexes(), [], true);
|
|
25411
|
-
|
|
25412
|
-
|
|
25496
|
+
this.parent.setProperties({ selectedRowIndex: -1 }, true);
|
|
25497
|
+
if (this.selectedRowIndexes.length === 1) {
|
|
25498
|
+
this.parent.setProperties({ selectedRowIndex: this.selectedRowIndexes[0] }, true);
|
|
25413
25499
|
}
|
|
25414
25500
|
if (!isNullOrUndefined(this.parent.toolbarModule)) {
|
|
25415
25501
|
this.parent.toolbarModule.refreshToolbarItems();
|
|
@@ -26291,6 +26377,7 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26291
26377
|
this.nonworkingContainer = createElement('div', {
|
|
26292
26378
|
className: nonworkingContainer
|
|
26293
26379
|
});
|
|
26380
|
+
this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
|
|
26294
26381
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
|
|
26295
26382
|
}
|
|
26296
26383
|
};
|
|
@@ -26328,8 +26415,11 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26328
26415
|
var toDate;
|
|
26329
26416
|
var container = createElement('div');
|
|
26330
26417
|
var height = this.parent.contentHeight;
|
|
26331
|
-
var
|
|
26332
|
-
|
|
26418
|
+
var toolbarHeight = 0;
|
|
26419
|
+
if (!isNullOrUndefined(this.parent.toolbarModule)) {
|
|
26420
|
+
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
26421
|
+
}
|
|
26422
|
+
var viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
|
|
26333
26423
|
for (var i = 0; i < this.parent.holidays.length; i++) {
|
|
26334
26424
|
if (this.parent.holidays[i].from && this.parent.holidays[i].to) {
|
|
26335
26425
|
fromDate = this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[i].from);
|
|
@@ -26422,9 +26512,12 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26422
26512
|
return container;
|
|
26423
26513
|
};
|
|
26424
26514
|
NonWorkingDay.prototype.updateHolidayLabelHeight = function () {
|
|
26425
|
-
var height = this.parent.
|
|
26426
|
-
var
|
|
26427
|
-
|
|
26515
|
+
var height = this.parent.getContentHeight();
|
|
26516
|
+
var toolbarHeight = 0;
|
|
26517
|
+
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
26518
|
+
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
26519
|
+
}
|
|
26520
|
+
var viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
|
|
26428
26521
|
var top = (viewportHeight < height) ? viewportHeight / 2 : height / 2;
|
|
26429
26522
|
var labels = this.holidayContainer.querySelectorAll('.' + holidayLabel);
|
|
26430
26523
|
for (var i = 0; i < labels.length; i++) {
|
|
@@ -26481,6 +26574,7 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
|
|
|
26481
26574
|
this.eventMarkersContainer = createElement('div', {
|
|
26482
26575
|
className: eventMarkersContainer
|
|
26483
26576
|
});
|
|
26577
|
+
this.eventMarkersContainer.setAttribute("role", "EventMarker");
|
|
26484
26578
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
|
|
26485
26579
|
}
|
|
26486
26580
|
this.eventMarkersContainer.innerHTML = '';
|
|
@@ -27564,10 +27658,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27564
27658
|
}
|
|
27565
27659
|
}
|
|
27566
27660
|
if (!args.cancel) {
|
|
27567
|
-
args.cancel = true;
|
|
27568
27661
|
args.requestType = 'beforeDrop';
|
|
27569
27662
|
this.parent.trigger('actionBegin', args);
|
|
27570
|
-
|
|
27663
|
+
if (!args.cancel) {
|
|
27664
|
+
this.dropRows(args, true); // method to update the data collections based on drop action
|
|
27665
|
+
args.cancel = true;
|
|
27666
|
+
}
|
|
27571
27667
|
}
|
|
27572
27668
|
};
|
|
27573
27669
|
RowDD$$1.prototype.dropRows = function (args, isByMethod) {
|
|
@@ -27664,33 +27760,55 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27664
27760
|
var data_1 = gObj.flatData;
|
|
27665
27761
|
var startIndex = void 0;
|
|
27666
27762
|
var endIndex = void 0;
|
|
27763
|
+
var ganttData_1 = this_1.parent.dataSource;
|
|
27764
|
+
var uniqueTaskID_1 = this_1.parent.taskFields.id;
|
|
27667
27765
|
if (draggedRecord.index < droppedRecord.index) {
|
|
27668
27766
|
startIndex = draggedRecord.index;
|
|
27669
|
-
|
|
27767
|
+
var _loop_2 = function (i_1) {
|
|
27768
|
+
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
27769
|
+
return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
|
|
27770
|
+
})[0];
|
|
27771
|
+
if (currentData.index > droppedRecord.index) {
|
|
27772
|
+
endIndex = currentData.index;
|
|
27773
|
+
return "break";
|
|
27774
|
+
}
|
|
27775
|
+
};
|
|
27776
|
+
for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
|
|
27777
|
+
var state_2 = _loop_2(i_1);
|
|
27778
|
+
if (state_2 === "break")
|
|
27779
|
+
break;
|
|
27780
|
+
}
|
|
27670
27781
|
}
|
|
27671
27782
|
else {
|
|
27672
27783
|
startIndex = droppedRecord.index;
|
|
27673
|
-
var
|
|
27674
|
-
|
|
27675
|
-
|
|
27676
|
-
|
|
27677
|
-
|
|
27784
|
+
var _loop_3 = function (i_2) {
|
|
27785
|
+
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
27786
|
+
return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
|
|
27787
|
+
})[0];
|
|
27788
|
+
if (currentData.index > draggedRecord.index) {
|
|
27789
|
+
endIndex = currentData.index;
|
|
27790
|
+
return "break";
|
|
27791
|
+
}
|
|
27792
|
+
};
|
|
27793
|
+
for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
|
|
27794
|
+
var state_3 = _loop_3(i_2);
|
|
27795
|
+
if (state_3 === "break")
|
|
27796
|
+
break;
|
|
27678
27797
|
}
|
|
27679
|
-
endIndex = rootChildRecord.index;
|
|
27680
27798
|
}
|
|
27681
|
-
var
|
|
27682
|
-
if (!isNullOrUndefined(data_1[
|
|
27683
|
-
data_1[
|
|
27684
|
-
if (!isNullOrUndefined(data_1[
|
|
27799
|
+
var _loop_4 = function (i_3) {
|
|
27800
|
+
if (!isNullOrUndefined(data_1[i_3])) {
|
|
27801
|
+
data_1[i_3].index = i_3;
|
|
27802
|
+
if (!isNullOrUndefined(data_1[i_3].parentItem)) {
|
|
27685
27803
|
var updatedParent = data_1.filter(function (e) {
|
|
27686
|
-
return e.uniqueID === data_1[
|
|
27804
|
+
return e.uniqueID === data_1[i_3].parentUniqueID;
|
|
27687
27805
|
})[0];
|
|
27688
|
-
data_1[
|
|
27806
|
+
data_1[i_3].parentItem.index = updatedParent.index;
|
|
27689
27807
|
}
|
|
27690
27808
|
}
|
|
27691
27809
|
};
|
|
27692
|
-
for (var
|
|
27693
|
-
|
|
27810
|
+
for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
|
|
27811
|
+
_loop_4(i_3);
|
|
27694
27812
|
}
|
|
27695
27813
|
}
|
|
27696
27814
|
gObj.rowDragAndDropModule.refreshDataSource();
|