@syncfusion/ej2-gantt 19.4.41 → 19.4.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 +36 -0
- 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 +87 -20
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +87 -20
- 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/chart-scroll.js +1 -0
- package/src/gantt/actions/edit.d.ts +2 -1
- package/src/gantt/actions/edit.js +28 -1
- package/src/gantt/actions/filter.js +1 -1
- package/src/gantt/actions/keyboard.js +4 -0
- package/src/gantt/actions/rowdragdrop.js +1 -1
- package/src/gantt/actions/taskbar-edit.js +3 -1
- package/src/gantt/base/date-processor.js +8 -1
- package/src/gantt/base/gantt-chart.js +6 -2
- package/src/gantt/base/gantt.js +18 -5
- package/src/gantt/base/task-processor.js +15 -8
- package/src/gantt/renderer/edit-tooltip.js +1 -0
- package/src/gantt/renderer/tooltip.js +1 -0
- package/styles/bootstrap-dark.css +9 -1
- package/styles/bootstrap.css +9 -1
- package/styles/bootstrap4.css +9 -1
- package/styles/bootstrap5-dark.css +9 -1
- package/styles/bootstrap5.css +9 -1
- package/styles/fabric-dark.css +9 -1
- package/styles/fabric.css +9 -1
- package/styles/gantt/_bootstrap-dark-definition.scss +0 -1
- package/styles/gantt/_bootstrap-definition.scss +0 -1
- package/styles/gantt/_bootstrap4-definition.scss +0 -1
- package/styles/gantt/_bootstrap5-definition.scss +0 -1
- package/styles/gantt/_fabric-dark-definition.scss +0 -1
- package/styles/gantt/_fabric-definition.scss +0 -1
- package/styles/gantt/_fluent-definition.scss +0 -1
- package/styles/gantt/_highcontrast-definition.scss +0 -1
- package/styles/gantt/_highcontrast-light-definition.scss +0 -1
- package/styles/gantt/_layout.scss +8 -1
- package/styles/gantt/_material-dark-definition.scss +0 -1
- package/styles/gantt/_material-definition.scss +0 -1
- package/styles/gantt/_tailwind-definition.scss +0 -1
- package/styles/gantt/bootstrap-dark.css +9 -1
- package/styles/gantt/bootstrap.css +9 -1
- package/styles/gantt/bootstrap4.css +9 -1
- package/styles/gantt/bootstrap5-dark.css +9 -1
- package/styles/gantt/bootstrap5.css +9 -1
- package/styles/gantt/fabric-dark.css +9 -1
- package/styles/gantt/fabric.css +9 -1
- package/styles/gantt/highcontrast-light.css +9 -1
- package/styles/gantt/highcontrast.css +9 -1
- package/styles/gantt/material-dark.css +9 -1
- package/styles/gantt/material.css +9 -1
- package/styles/gantt/tailwind-dark.css +9 -1
- package/styles/gantt/tailwind.css +9 -1
- package/styles/highcontrast-light.css +9 -1
- package/styles/highcontrast.css +9 -1
- package/styles/material-dark.css +9 -1
- package/styles/material.css +9 -1
- package/styles/tailwind-dark.css +9 -1
- package/styles/tailwind.css +9 -1
|
@@ -483,7 +483,14 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
483
483
|
tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
|
|
484
484
|
}
|
|
485
485
|
else {
|
|
486
|
-
|
|
486
|
+
// eslint-disable-next-line
|
|
487
|
+
if (!isNullOrUndefined(ganttProperties.startDate) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
488
|
+
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
|
|
489
|
+
tDuration = 1;
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
tDuration = this.getDuration(ganttProperties.startDate, ganttProperties.endDate, ganttProperties.durationUnit, ganttProperties.isAutoSchedule, ganttProperties.isMilestone);
|
|
493
|
+
}
|
|
487
494
|
}
|
|
488
495
|
this.parent.setRecordValue('duration', tDuration, ganttProperties, true);
|
|
489
496
|
var col = this.parent.columnByField[this.parent.columnMapping.duration];
|
|
@@ -2628,7 +2635,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2628
2635
|
eDate.setHours(0, 0, 0, 0);
|
|
2629
2636
|
}
|
|
2630
2637
|
}
|
|
2631
|
-
|
|
2638
|
+
if ((sDate).getTime() === (eDate).getTime()) {
|
|
2639
|
+
return (this.parent.perDayWidth);
|
|
2640
|
+
}
|
|
2641
|
+
else {
|
|
2642
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2643
|
+
}
|
|
2632
2644
|
};
|
|
2633
2645
|
/**
|
|
2634
2646
|
* Get task left value
|
|
@@ -2717,14 +2729,16 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2717
2729
|
// eslint-disable-next-line
|
|
2718
2730
|
var resourcesId = [];
|
|
2719
2731
|
var resourcesName = [];
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2732
|
+
if (!isNullOrUndefined(resourceData)) {
|
|
2733
|
+
for (var i = 0; i < resourceData.length; i++) {
|
|
2734
|
+
resourcesId.push(resourceData[i][resourceSettings.id]);
|
|
2735
|
+
var resName = resourceData[i][resourceSettings.name];
|
|
2736
|
+
var resourceUnit = resourceData[i][resourceSettings.unit];
|
|
2737
|
+
if (resourceUnit !== 100) {
|
|
2738
|
+
resName += '[' + resourceUnit + '%' + ']';
|
|
2739
|
+
}
|
|
2740
|
+
resourcesName.push(resName);
|
|
2726
2741
|
}
|
|
2727
|
-
resourcesName.push(resName);
|
|
2728
2742
|
}
|
|
2729
2743
|
this.parent.setRecordValue('resourceNames', resourcesName.join(','), ganttProp, true);
|
|
2730
2744
|
this.updateTaskDataResource(ganttData);
|
|
@@ -4035,6 +4049,7 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
|
|
|
4035
4049
|
*/
|
|
4036
4050
|
ChartScroll.prototype.setScrollTop = function (scrollTop) {
|
|
4037
4051
|
this.element.scrollTop = scrollTop;
|
|
4052
|
+
this.parent.treeGrid.element.querySelector('.e-content').scrollTop = scrollTop;
|
|
4038
4053
|
};
|
|
4039
4054
|
/**
|
|
4040
4055
|
* To set scroll left for chart scroll container
|
|
@@ -4425,6 +4440,12 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4425
4440
|
* @private
|
|
4426
4441
|
*/
|
|
4427
4442
|
GanttChart.prototype.mouseUp = function (e) {
|
|
4443
|
+
if (this.parent.allowRowDragAndDrop) {
|
|
4444
|
+
var ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
|
|
4445
|
+
if (ganttDragElemet) {
|
|
4446
|
+
ganttDragElemet.remove();
|
|
4447
|
+
}
|
|
4448
|
+
}
|
|
4428
4449
|
if (!this.isGanttElement) {
|
|
4429
4450
|
this.parent.notify('chartMouseUp', e);
|
|
4430
4451
|
}
|
|
@@ -4873,8 +4894,6 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4873
4894
|
this.parent.treeGrid.collapseAll();
|
|
4874
4895
|
}
|
|
4875
4896
|
this.isExpandAll = false;
|
|
4876
|
-
var focussedElement = this.parent.element.querySelector('.e-treegrid');
|
|
4877
|
-
focussedElement.focus();
|
|
4878
4897
|
};
|
|
4879
4898
|
/**
|
|
4880
4899
|
* Public method to expand particular level of rows.
|
|
@@ -11874,6 +11893,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
11874
11893
|
tooltipPositionY = tooltipPositionY + 10;
|
|
11875
11894
|
}
|
|
11876
11895
|
args.element.style.top = tooltipPositionY + 'px';
|
|
11896
|
+
args.element.style.visibility = 'visible';
|
|
11877
11897
|
};
|
|
11878
11898
|
/**
|
|
11879
11899
|
* Method to get mouse pointor position
|
|
@@ -12123,6 +12143,10 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12123
12143
|
FocusModule.prototype.onKeyPress = function (e) {
|
|
12124
12144
|
var ganttObj = this.parent;
|
|
12125
12145
|
var expandedRecords = ganttObj.getExpandedRecords(ganttObj.currentViewData);
|
|
12146
|
+
if (isNullOrUndefined(this.parent.focusModule.getActiveElement()) && (e.action === 'expandAll' || e.action === 'collapseAll')) {
|
|
12147
|
+
var focussedElement = this.parent.element.querySelector('.e-treegrid');
|
|
12148
|
+
focussedElement.focus();
|
|
12149
|
+
}
|
|
12126
12150
|
var targetElement = this.parent.focusModule.getActiveElement();
|
|
12127
12151
|
if (e.action === 'home' || e.action === 'end' || e.action === 'downArrow' || e.action === 'upArrow' || e.action === 'delete' ||
|
|
12128
12152
|
e.action === 'rightArrow' || e.action === 'leftArrow' || e.action === 'focusTask' || e.action === 'focusSearch' ||
|
|
@@ -12657,8 +12681,14 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12657
12681
|
Gantt.prototype.calculateDimensions = function () {
|
|
12658
12682
|
var settingsHeight;
|
|
12659
12683
|
if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
|
|
12660
|
-
!this.element.parentElement.style.height)) {
|
|
12661
|
-
var ganttHeight =
|
|
12684
|
+
!this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
|
|
12685
|
+
var ganttHeight = void 0;
|
|
12686
|
+
if (this.element.parentElement.style.height.indexOf('%') == -1) {
|
|
12687
|
+
ganttHeight = Number(this.height.split("%")[0]);
|
|
12688
|
+
}
|
|
12689
|
+
else {
|
|
12690
|
+
ganttHeight = Number(this.element.parentElement.style.height.split("%")[0]);
|
|
12691
|
+
}
|
|
12662
12692
|
ganttHeight = (ganttHeight * window.innerHeight) / 100;
|
|
12663
12693
|
if (this.height === '100%') {
|
|
12664
12694
|
ganttHeight = ganttHeight - 16;
|
|
@@ -12813,9 +12843,16 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12813
12843
|
var settingsHeight = void 0;
|
|
12814
12844
|
if (this.height.indexOf('%') !== -1) {
|
|
12815
12845
|
var ganttHeight = Number(this.height.split("%")[0]);
|
|
12816
|
-
if (this.element.parentElement && this.element.parentElement.style.height) {
|
|
12817
|
-
var containerHeight =
|
|
12818
|
-
|
|
12846
|
+
if (this.element.parentElement && (this.element.parentElement.style.height)) {
|
|
12847
|
+
var containerHeight = void 0;
|
|
12848
|
+
if (this.element.parentElement.style.height.indexOf('%') == -1) {
|
|
12849
|
+
containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
|
|
12850
|
+
ganttHeight = (ganttHeight * containerHeight) / 100;
|
|
12851
|
+
}
|
|
12852
|
+
else {
|
|
12853
|
+
containerHeight = Number(this.element.parentElement.style.height.split("%")[0]);
|
|
12854
|
+
ganttHeight = (window.innerHeight * containerHeight) / 100;
|
|
12855
|
+
}
|
|
12819
12856
|
}
|
|
12820
12857
|
else {
|
|
12821
12858
|
ganttHeight = Number(this.height.split("%")[0]);
|
|
@@ -16191,6 +16228,7 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
|
|
|
16191
16228
|
tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
|
|
16192
16229
|
}
|
|
16193
16230
|
args.element.style.left = tooltipPositionX + 'px';
|
|
16231
|
+
args.element.style.visibility = 'visible';
|
|
16194
16232
|
};
|
|
16195
16233
|
/**
|
|
16196
16234
|
* To show/hide taskbar edit tooltip.
|
|
@@ -16838,7 +16876,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16838
16876
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
16839
16877
|
var args = {
|
|
16840
16878
|
cancel: false,
|
|
16841
|
-
requestType: 'taskbarediting'
|
|
16879
|
+
requestType: 'taskbarediting',
|
|
16880
|
+
taskBarEditAction: this.taskBarEditAction,
|
|
16881
|
+
data: this.taskBarEditRecord
|
|
16842
16882
|
};
|
|
16843
16883
|
if (this.segmentIndex !== -1) {
|
|
16844
16884
|
args.requestType = 'mergeSegment';
|
|
@@ -22052,7 +22092,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
22052
22092
|
*/
|
|
22053
22093
|
Edit$$1.prototype.updateParentChildRecord = function (data) {
|
|
22054
22094
|
var ganttRecord = data;
|
|
22055
|
-
if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto') {
|
|
22095
|
+
if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && this.parent.previousRecords[data.uniqueID].resources === ganttRecord.ganttProperties['resourceNames']) {
|
|
22056
22096
|
this.updateChildItems(ganttRecord);
|
|
22057
22097
|
}
|
|
22058
22098
|
};
|
|
@@ -23974,6 +24014,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23974
24014
|
}
|
|
23975
24015
|
this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
|
|
23976
24016
|
}
|
|
24017
|
+
var flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
|
|
24018
|
+
if (flag !== null) {
|
|
24019
|
+
setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
|
|
24020
|
+
}
|
|
23977
24021
|
this.addSuccess(args);
|
|
23978
24022
|
args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
|
|
23979
24023
|
this.parent.trigger('actionComplete', args);
|
|
@@ -24377,6 +24421,25 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24377
24421
|
var delRow = this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);
|
|
24378
24422
|
this.removeRecords(delRow);
|
|
24379
24423
|
};
|
|
24424
|
+
Edit$$1.prototype.updateIndentedChildRecords = function (indentedRecord) {
|
|
24425
|
+
var createParentItem = {
|
|
24426
|
+
uniqueID: indentedRecord.uniqueID,
|
|
24427
|
+
expanded: indentedRecord.expanded,
|
|
24428
|
+
level: indentedRecord.level,
|
|
24429
|
+
index: indentedRecord.index,
|
|
24430
|
+
taskId: indentedRecord.ganttProperties.rowUniqueID
|
|
24431
|
+
};
|
|
24432
|
+
for (var i = 0; i < indentedRecord.childRecords.length; i++) {
|
|
24433
|
+
this.parent.setRecordValue('parentItem', createParentItem, indentedRecord.childRecords[i]);
|
|
24434
|
+
this.parent.setRecordValue('parentUniqueID', indentedRecord.uniqueID, indentedRecord.childRecords[i]);
|
|
24435
|
+
}
|
|
24436
|
+
if (indentedRecord.hasChildRecords) {
|
|
24437
|
+
indentedRecord = indentedRecord.childRecords;
|
|
24438
|
+
for (var j = 0; j < indentedRecord['length']; j++) {
|
|
24439
|
+
this.updateIndentedChildRecords(indentedRecord[j]);
|
|
24440
|
+
}
|
|
24441
|
+
}
|
|
24442
|
+
};
|
|
24380
24443
|
Edit$$1.prototype.dropMiddle = function (recordIndex1) {
|
|
24381
24444
|
var obj = this.parent;
|
|
24382
24445
|
var childRec = this.parent.editModule.getChildCount(this.droppedRecord, 0);
|
|
@@ -24392,6 +24455,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24392
24455
|
this.recordLevel();
|
|
24393
24456
|
if (this.draggedRecord.hasChildRecords) {
|
|
24394
24457
|
this.updateChildRecord(this.draggedRecord, childRecordsLength, this.droppedRecord.expanded);
|
|
24458
|
+
if (this.parent.enableImmutableMode) {
|
|
24459
|
+
var indentedRecord = this.draggedRecord;
|
|
24460
|
+
this.updateIndentedChildRecords(indentedRecord);
|
|
24461
|
+
}
|
|
24395
24462
|
}
|
|
24396
24463
|
if (isNullOrUndefined(this.draggedRecord.parentItem &&
|
|
24397
24464
|
this.updateParentRecords.indexOf(this.draggedRecord.parentItem) !== -1)) {
|
|
@@ -24880,7 +24947,7 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
24880
24947
|
var ganttElement = closest(element, '#' + this.parent.element.id)
|
|
24881
24948
|
|| element.querySelector('#' + this.parent.element.id);
|
|
24882
24949
|
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element.nodeName === 'HTML'
|
|
24883
|
-
|| element.nodeName === 'DIV') {
|
|
24950
|
+
|| ((element.nodeName === 'DIV') && (!element.classList.contains('e-day')))) {
|
|
24884
24951
|
remove(this.filterMenuElement);
|
|
24885
24952
|
this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
|
|
24886
24953
|
this.filterMenuElement = null;
|
|
@@ -27661,7 +27728,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27661
27728
|
if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
|
|
27662
27729
|
var rowPosition = this.dropPosition === 'topSegment' ? 'Above' : 'Below';
|
|
27663
27730
|
this.parent.editModule.addRowSelectedItem = droppedRecord;
|
|
27664
|
-
this.parent.editModule.updateRealDataSource(draggedRecord, rowPosition);
|
|
27731
|
+
this.parent.editModule.updateRealDataSource([draggedRecord], rowPosition);
|
|
27665
27732
|
delete this.parent.editModule.addRowSelectedItem;
|
|
27666
27733
|
}
|
|
27667
27734
|
}
|