@syncfusion/ej2-gantt 24.2.7 → 24.2.9
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 +31 -0
- package/dist/ej2-gantt.min.js +2 -2
- 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 +216 -167
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +216 -167
- 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 +14 -14
- package/src/gantt/actions/dependency.d.ts +23 -0
- package/src/gantt/actions/dependency.js +132 -6
- package/src/gantt/actions/edit.d.ts +1 -22
- package/src/gantt/actions/edit.js +14 -133
- package/src/gantt/actions/selection.js +8 -1
- package/src/gantt/actions/taskbar-edit.js +20 -4
- package/src/gantt/base/gantt.js +14 -1
- package/src/gantt/base/task-processor.js +16 -10
- package/src/gantt/export/pdf-taskbar.js +1 -1
- package/src/gantt/export/pdf-timeline.js +0 -6
- package/src/gantt/renderer/timeline.js +11 -5
- package/styles/bootstrap.css +3 -3
- package/styles/gantt/bootstrap.css +3 -3
package/src/gantt/base/gantt.js
CHANGED
|
@@ -1540,7 +1540,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1540
1540
|
this.treeGridModule.treeGridColumns = [];
|
|
1541
1541
|
this.treeGridModule.validateGanttColumns();
|
|
1542
1542
|
this.treeGrid.columns = this.treeGridModule.treeGridColumns;
|
|
1543
|
-
this.treeGrid.
|
|
1543
|
+
this.treeGrid.refreshColumns();
|
|
1544
1544
|
this.chartRowsModule.initiateTemplates();
|
|
1545
1545
|
this.timelineModule.updateChartByNewTimeline();
|
|
1546
1546
|
break;
|
|
@@ -2587,6 +2587,19 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2587
2587
|
var tempSplitterSettings = {};
|
|
2588
2588
|
tempSplitterSettings[type] = value;
|
|
2589
2589
|
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
|
|
2590
|
+
switch (type) {
|
|
2591
|
+
case 'view':
|
|
2592
|
+
this.splitterSettings.view = tempSplitterSettings[type];
|
|
2593
|
+
break;
|
|
2594
|
+
case 'columnIndex':
|
|
2595
|
+
this.splitterSettings.columnIndex = tempSplitterSettings[type];
|
|
2596
|
+
break;
|
|
2597
|
+
case 'position':
|
|
2598
|
+
this.splitterSettings.position = tempSplitterSettings[type];
|
|
2599
|
+
break;
|
|
2600
|
+
default:
|
|
2601
|
+
break;
|
|
2602
|
+
}
|
|
2590
2603
|
var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
|
|
2591
2604
|
var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
|
|
2592
2605
|
this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
|
|
@@ -687,12 +687,14 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
687
687
|
work = parseFloat(work.toFixed(2));
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
if (ganttData.childRecords
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
690
|
+
if (ganttData.childRecords) {
|
|
691
|
+
if (ganttData.childRecords.length > 0 && this.parent.isOnEdit) {
|
|
692
|
+
var childCompletedWorks = 0;
|
|
693
|
+
for (var i = 0; i < ganttData.childRecords.length; i++) {
|
|
694
|
+
childCompletedWorks += ganttData.childRecords[i].ganttProperties.work;
|
|
695
|
+
}
|
|
696
|
+
work += childCompletedWorks;
|
|
694
697
|
}
|
|
695
|
-
work += childCompletedWorks;
|
|
696
698
|
}
|
|
697
699
|
this.parent.setRecordValue('work', work, ganttData.ganttProperties, true);
|
|
698
700
|
if (!isNullOrUndefined(this.parent.taskFields.work)) {
|
|
@@ -908,7 +910,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
908
910
|
this.parent.setRecordValue('work', work, ganttProperties, true);
|
|
909
911
|
switch (tType) {
|
|
910
912
|
case 'FixedDuration':
|
|
911
|
-
this.
|
|
913
|
+
this.updateWorkWithDuration(ganttData);
|
|
912
914
|
break;
|
|
913
915
|
case 'FixedWork':
|
|
914
916
|
this.updateUnitWithWork(ganttData);
|
|
@@ -1323,14 +1325,18 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1323
1325
|
this.parent.ganttChartModule.scrollObject['isSetScrollLeft'])) && !isFromTimelineVirtulization) {
|
|
1324
1326
|
isValid = false;
|
|
1325
1327
|
}
|
|
1326
|
-
if (this.parent.enableTimelineVirtualization && isValid && !this.parent.timelineModule['performedTimeSpanAction']) {
|
|
1328
|
+
if (!this.parent.editModule && this.parent.enableTimelineVirtualization && isValid && !this.parent.timelineModule['performedTimeSpanAction']) {
|
|
1327
1329
|
leftValueForStartDate = (this.parent.enableTimelineVirtualization && this.parent.ganttChartModule.scrollObject.element.scrollLeft != 0)
|
|
1328
1330
|
? this.parent.ganttChartModule.scrollObject.getTimelineLeft() : null;
|
|
1329
1331
|
}
|
|
1330
|
-
var timelineStartDate = (this.parent.enableTimelineVirtualization && !isNullOrUndefined(leftValueForStartDate))
|
|
1332
|
+
var timelineStartDate = (!this.parent.editModule && this.parent.enableTimelineVirtualization && !isNullOrUndefined(leftValueForStartDate))
|
|
1331
1333
|
? new Date((this.parent.timelineModule['dateByLeftValue'](leftValueForStartDate)).toString()) : new Date(this.parent.timelineModule.timelineStartDate);
|
|
1332
1334
|
if (timelineStartDate) {
|
|
1333
|
-
|
|
1335
|
+
var leftValue = (date.getTime() - timelineStartDate.getTime()) / (1000 * 60 * 60 * 24) * this.parent.perDayWidth;
|
|
1336
|
+
if (this.parent.isInDst(timelineStartDate) && !this.parent.isInDst(startDate) && (this.parent.timelineModule.topTier == 'Hour' || this.parent.timelineModule.bottomTier == 'Hour')) {
|
|
1337
|
+
leftValue = leftValue - this.parent.timelineSettings.timelineUnitSize;
|
|
1338
|
+
}
|
|
1339
|
+
return leftValue;
|
|
1334
1340
|
}
|
|
1335
1341
|
else {
|
|
1336
1342
|
return 0;
|
|
@@ -2408,7 +2414,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2408
2414
|
var deleteUpdate = false;
|
|
2409
2415
|
var ganttProp = parentData.ganttProperties;
|
|
2410
2416
|
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
2411
|
-
if (parentData.childRecords.length > 0) {
|
|
2417
|
+
if (parentData.childRecords && parentData.childRecords.length > 0) {
|
|
2412
2418
|
var previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
|
|
2413
2419
|
var previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
|
|
2414
2420
|
ganttProp.autoEndDate;
|
|
@@ -100,7 +100,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
100
100
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
101
101
|
var isLabelString = false;
|
|
102
102
|
var updatedWidth;
|
|
103
|
-
if (!isNullOrUndefined(this.taskLabel) && (/^[a-zA-
|
|
103
|
+
if (!isNullOrUndefined(this.taskLabel) && (/^[a-zA-Z0-9]/.test(this.taskLabel))) {
|
|
104
104
|
isLabelString = true;
|
|
105
105
|
progressFormat.alignment = PdfTextAlignment.Left;
|
|
106
106
|
}
|
|
@@ -81,12 +81,6 @@ var PdfTimeline = /** @class */ (function () {
|
|
|
81
81
|
}
|
|
82
82
|
//Secondary header Event Arguments
|
|
83
83
|
/* eslint-disable-next-line */
|
|
84
|
-
if (!this.parent.pdfExportModule.gantt.taskbar.isAutoFit() && this.parent.timelineModule.bottomTier !== "Day") {
|
|
85
|
-
var unit = this.parent.perDayWidth;
|
|
86
|
-
if (width < unit || (width > unit)) {
|
|
87
|
-
width = unit;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
84
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false, secondHeader.startDate);
|
|
91
85
|
this.bottomTierPoint.x = (this.parent.pdfExportModule.gantt.taskbar.isAutoFit()) ? this.bottomTierPoint.x + width : this.bottomTierPoint.x + pixelToPoint(width);
|
|
92
86
|
remainWidth -= width;
|
|
@@ -114,17 +114,23 @@ var Timeline = /** @class */ (function () {
|
|
|
114
114
|
this.parent.dateValidationModule.calculateProjectDates();
|
|
115
115
|
}
|
|
116
116
|
if (!isNullOrUndefined(this.parent.zoomingProjectStartDate)) {
|
|
117
|
-
this.parent.cloneProjectStartDate = this.parent.
|
|
118
|
-
|
|
119
|
-
this.parent.cloneProjectEndDate = this.parent.cloneProjectEndDate.getTime() > this.parent.zoomingProjectEndDate.getTime()
|
|
120
|
-
? this.parent.cloneProjectEndDate : this.parent.zoomingProjectEndDate;
|
|
117
|
+
this.parent.cloneProjectStartDate = this.parent.zoomingProjectStartDate;
|
|
118
|
+
this.parent.cloneProjectEndDate = this.parent.zoomingProjectEndDate;
|
|
121
119
|
}
|
|
122
120
|
this.parent.zoomingProjectStartDate = null;
|
|
123
121
|
this.parent.zoomingProjectEndDate = null;
|
|
124
122
|
var currentZoomingLevel = this.checkCurrentZoomingLevel();
|
|
125
123
|
this.isZoomIn = isZoomIn;
|
|
126
124
|
this.isZooming = true;
|
|
127
|
-
var currentLevel
|
|
125
|
+
var currentLevel;
|
|
126
|
+
var level = isZoomIn ? currentZoomingLevel + 1 : currentZoomingLevel - 1;
|
|
127
|
+
var foundLevel = this.parent.zoomingLevels.find(function (tempLevel) { return tempLevel.level === level; });
|
|
128
|
+
if (foundLevel) {
|
|
129
|
+
currentLevel = level;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
currentLevel = currentZoomingLevel;
|
|
133
|
+
}
|
|
128
134
|
if (this.parent.toolbarModule) {
|
|
129
135
|
if (isZoomIn) {
|
|
130
136
|
if (currentLevel === this.parent.zoomingLevels[this.parent.zoomingLevels.length - 1].level) {
|
package/styles/bootstrap.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.e-richtexteditor .e-rte-toolbar.e-extended-toolbar .e-toolbar-items .e-toolbar-item .e-rte-dropdown-btn.e-active.e-tbar-btn {
|
|
2
2
|
background: #e6e6e6;
|
|
3
|
-
border:
|
|
4
|
-
padding-left:
|
|
5
|
-
padding-right:
|
|
3
|
+
border: 0;
|
|
4
|
+
padding-left: 9px;
|
|
5
|
+
padding-right: 3.5px;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.e-bigger .e-richtexteditor .e-rte-toolbar.e-extended-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn.e-control.e-dropdown-btn.e-rte-dropdown-btn.e-active {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.e-richtexteditor .e-rte-toolbar.e-extended-toolbar .e-toolbar-items .e-toolbar-item .e-rte-dropdown-btn.e-active.e-tbar-btn {
|
|
2
2
|
background: #e6e6e6;
|
|
3
|
-
border:
|
|
4
|
-
padding-left:
|
|
5
|
-
padding-right:
|
|
3
|
+
border: 0;
|
|
4
|
+
padding-left: 9px;
|
|
5
|
+
padding-right: 3.5px;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.e-bigger .e-richtexteditor .e-rte-toolbar.e-extended-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn.e-control.e-dropdown-btn.e-rte-dropdown-btn.e-active {
|