@syncfusion/ej2-gantt 20.1.56 → 20.1.60
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 +30 -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 +31 -18
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +31 -18
- 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 +15 -15
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +5 -1
- package/src/gantt/actions/taskbar-edit.js +1 -3
- package/src/gantt/actions/toolbar.js +2 -0
- package/src/gantt/base/gantt-chart.js +6 -1
- package/src/gantt/base/gantt.js +2 -5
- package/src/gantt/base/task-processor.js +7 -3
- package/src/gantt/export/export-helper.js +3 -3
- package/src/gantt/renderer/connector-line.js +1 -1
- package/src/gantt/renderer/timeline.js +3 -0
- package/styles/bootstrap-dark.css +217 -11
- package/styles/bootstrap.css +218 -13
- package/styles/bootstrap4.css +220 -11
- package/styles/bootstrap5-dark.css +218 -13
- package/styles/bootstrap5.css +218 -13
- package/styles/fabric-dark.css +216 -10
- package/styles/fabric.css +217 -11
- package/styles/fluent-dark.css +217 -11
- package/styles/fluent.css +217 -11
- package/styles/gantt/_bootstrap-dark-definition.scss +41 -4
- package/styles/gantt/_bootstrap-definition.scss +41 -4
- package/styles/gantt/_bootstrap4-definition.scss +42 -4
- package/styles/gantt/_bootstrap5-definition.scss +41 -4
- package/styles/gantt/_fabric-dark-definition.scss +40 -3
- package/styles/gantt/_fabric-definition.scss +41 -4
- package/styles/gantt/_fluent-definition.scss +41 -4
- package/styles/gantt/_highcontrast-definition.scss +41 -4
- package/styles/gantt/_highcontrast-light-definition.scss +41 -4
- package/styles/gantt/_layout.scss +298 -7
- package/styles/gantt/_material-dark-definition.scss +42 -4
- package/styles/gantt/_material-definition.scss +42 -4
- package/styles/gantt/_tailwind-definition.scss +42 -4
- package/styles/gantt/bootstrap-dark.css +217 -11
- package/styles/gantt/bootstrap.css +218 -13
- package/styles/gantt/bootstrap4.css +220 -11
- package/styles/gantt/bootstrap5-dark.css +218 -13
- package/styles/gantt/bootstrap5.css +218 -13
- package/styles/gantt/fabric-dark.css +216 -10
- package/styles/gantt/fabric.css +217 -11
- package/styles/gantt/fluent-dark.css +217 -11
- package/styles/gantt/fluent.css +217 -11
- package/styles/gantt/highcontrast-light.css +209 -11
- package/styles/gantt/highcontrast.css +217 -11
- package/styles/gantt/icons/_bootstrap-dark.scss +8 -0
- package/styles/gantt/icons/_bootstrap.scss +8 -0
- package/styles/gantt/icons/_bootstrap4.scss +8 -0
- package/styles/gantt/icons/_bootstrap5.scss +8 -0
- package/styles/gantt/icons/_fabric-dark.scss +8 -0
- package/styles/gantt/icons/_fabric.scss +8 -0
- package/styles/gantt/icons/_fluent.scss +8 -0
- package/styles/gantt/icons/_highcontrast.scss +8 -0
- package/styles/gantt/icons/_material-dark.scss +8 -0
- package/styles/gantt/icons/_material.scss +8 -0
- package/styles/gantt/icons/_tailwind-dark.scss +8 -0
- package/styles/gantt/icons/_tailwind.scss +8 -0
- package/styles/gantt/material-dark.css +224 -11
- package/styles/gantt/material.css +224 -11
- package/styles/gantt/tailwind-dark.css +223 -11
- package/styles/gantt/tailwind.css +223 -11
- package/styles/highcontrast-light.css +209 -11
- package/styles/highcontrast.css +217 -11
- package/styles/material-dark.css +224 -11
- package/styles/material.css +224 -11
- package/styles/tailwind-dark.css +223 -11
- package/styles/tailwind.css +223 -11
|
@@ -2070,6 +2070,13 @@ class TaskProcessor extends DateProcessor {
|
|
|
2070
2070
|
work = parseFloat(work.toFixed(2));
|
|
2071
2071
|
}
|
|
2072
2072
|
}
|
|
2073
|
+
if (ganttData.childRecords.length > 0) {
|
|
2074
|
+
let childCompletedWorks = 0;
|
|
2075
|
+
for (let i = 0; i < ganttData.childRecords.length; i++) {
|
|
2076
|
+
childCompletedWorks += ganttData.childRecords[i][this.parent.taskFields.work];
|
|
2077
|
+
}
|
|
2078
|
+
work += childCompletedWorks;
|
|
2079
|
+
}
|
|
2073
2080
|
this.parent.setRecordValue('work', work, ganttData.ganttProperties, true);
|
|
2074
2081
|
if (!isNullOrUndefined(this.parent.taskFields.work)) {
|
|
2075
2082
|
this.parent.dataOperation.updateMappingData(ganttData, 'work');
|
|
@@ -3623,7 +3630,6 @@ class TaskProcessor extends DateProcessor {
|
|
|
3623
3630
|
let maxEndDate = null;
|
|
3624
3631
|
let milestoneCount = 0;
|
|
3625
3632
|
let totalProgress = 0;
|
|
3626
|
-
let childCompletedWorks = 0;
|
|
3627
3633
|
let childData;
|
|
3628
3634
|
for (let count = 0; count < childLength; count++) {
|
|
3629
3635
|
childData = childRecords[count];
|
|
@@ -3661,7 +3667,6 @@ class TaskProcessor extends DateProcessor {
|
|
|
3661
3667
|
else {
|
|
3662
3668
|
milestoneCount++;
|
|
3663
3669
|
}
|
|
3664
|
-
childCompletedWorks += childData.ganttProperties.work;
|
|
3665
3670
|
}
|
|
3666
3671
|
if (!deleteUpdate) {
|
|
3667
3672
|
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
@@ -3687,7 +3692,6 @@ class TaskProcessor extends DateProcessor {
|
|
|
3687
3692
|
}
|
|
3688
3693
|
this.updateWorkWithDuration(parentData);
|
|
3689
3694
|
let parentWork = parentProp.work;
|
|
3690
|
-
parentWork += childCompletedWorks;
|
|
3691
3695
|
this.parent.setRecordValue('work', parentWork, parentProp, true);
|
|
3692
3696
|
this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
|
|
3693
3697
|
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
@@ -4662,7 +4666,12 @@ class GanttChart {
|
|
|
4662
4666
|
* @private
|
|
4663
4667
|
*/
|
|
4664
4668
|
getChartRows() {
|
|
4665
|
-
|
|
4669
|
+
if (document.getElementById(this.parent.element.id + 'GanttTaskTableBody') != null) {
|
|
4670
|
+
return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
|
|
4671
|
+
}
|
|
4672
|
+
else {
|
|
4673
|
+
return null;
|
|
4674
|
+
}
|
|
4666
4675
|
}
|
|
4667
4676
|
/**
|
|
4668
4677
|
* Expand Collapse operations from gantt chart side
|
|
@@ -5467,6 +5476,9 @@ class Timeline {
|
|
|
5467
5476
|
this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
|
|
5468
5477
|
}
|
|
5469
5478
|
this.parent.dataOperation.calculateProjectDates();
|
|
5479
|
+
if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
|
|
5480
|
+
this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
|
|
5481
|
+
}
|
|
5470
5482
|
const timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
|
|
5471
5483
|
const totalDays = (timeDifference / (1000 * 3600 * 24));
|
|
5472
5484
|
const chartWidth = this.parent.ganttChartModule.chartElement.offsetWidth;
|
|
@@ -10468,7 +10480,7 @@ class ConnectorLine {
|
|
|
10468
10480
|
(Math.floor(this.parent.chartRowsModule.milestoneHeight)) : childGanttRecord.width;
|
|
10469
10481
|
connectorObj.parentIndex = parentIndex;
|
|
10470
10482
|
connectorObj.childIndex = childIndex;
|
|
10471
|
-
const rowHeight = this.parent.ganttChartModule.getChartRows()[0] &&
|
|
10483
|
+
const rowHeight = !isNullOrUndefined(this.parent.ganttChartModule.getChartRows()) && this.parent.ganttChartModule.getChartRows()[0] &&
|
|
10472
10484
|
this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;
|
|
10473
10485
|
connectorObj.rowHeight = rowHeight && !isNaN(rowHeight) ? rowHeight : this.parent.rowHeight;
|
|
10474
10486
|
connectorObj.type = predecessor.type;
|
|
@@ -12569,10 +12581,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12569
12581
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
12570
12582
|
}
|
|
12571
12583
|
else {
|
|
12572
|
-
this.treeGrid.dataSource
|
|
12573
|
-
if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
|
|
12574
|
-
this.treeGrid.dataBind();
|
|
12575
|
-
}
|
|
12584
|
+
this.treeGrid.setProperties({ dataSource: this.flatData }, false);
|
|
12576
12585
|
}
|
|
12577
12586
|
}
|
|
12578
12587
|
else {
|
|
@@ -12689,7 +12698,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12689
12698
|
const expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
|
|
12690
12699
|
this.currentViewData : this.getExpandedRecords(this.currentViewData);
|
|
12691
12700
|
let height;
|
|
12692
|
-
const chartRow$$1 = this.ganttChartModule.getChartRows()[0];
|
|
12701
|
+
const chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
|
|
12693
12702
|
if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
|
|
12694
12703
|
height = chartRow$$1.getBoundingClientRect().height;
|
|
12695
12704
|
}
|
|
@@ -16443,9 +16452,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16443
16452
|
addClass([element], [activeParentTask]);
|
|
16444
16453
|
}
|
|
16445
16454
|
}
|
|
16446
|
-
|
|
16447
|
-
addClass(this.parent.ganttChartModule.scrollElement.querySelectorAll('.' + connectorLineContainer), [connectorLineZIndex]);
|
|
16448
|
-
}
|
|
16455
|
+
addClass(this.parent.ganttChartModule.scrollElement.querySelectorAll('.' + connectorLineContainer), [connectorLineZIndex]);
|
|
16449
16456
|
if (!isNullOrUndefined(this.parent.taskFields.dependency)
|
|
16450
16457
|
&& (element.querySelector('.' + connectorPointLeft)
|
|
16451
16458
|
|| element.parentElement.querySelector('.' + connectorPointLeft))
|
|
@@ -18892,7 +18899,7 @@ class DialogEdit {
|
|
|
18892
18899
|
}
|
|
18893
18900
|
else if (isScheduledTask(ganttProp) || !isNullOrUndefined(ganttProp.startDate)) {
|
|
18894
18901
|
if (ganttData.ganttProperties.isMilestone && ganttData.ganttProperties.duration !== 0) {
|
|
18895
|
-
this.parent.dateValidationModule.
|
|
18902
|
+
this.parent.dateValidationModule.checkStartDate(ganttProp.startDate);
|
|
18896
18903
|
}
|
|
18897
18904
|
this.parent.dateValidationModule.calculateEndDate(ganttData);
|
|
18898
18905
|
}
|
|
@@ -21315,8 +21322,12 @@ class Edit$2 {
|
|
|
21315
21322
|
if (!isNullOrUndefined(this.parent.editModule) && ganttData) {
|
|
21316
21323
|
this.parent.isOnEdit = true;
|
|
21317
21324
|
this.validateUpdateValues(data, ganttData, true);
|
|
21318
|
-
if (data[this.parent.taskFields.resourceInfo]
|
|
21325
|
+
if (data[this.parent.taskFields.resourceInfo]) {
|
|
21326
|
+
if (ganttData.ganttProperties.duration === 0) {
|
|
21327
|
+
this.parent.dataOperation.updateWorkWithDuration(ganttData);
|
|
21328
|
+
}
|
|
21319
21329
|
this.updateResourceRelatedFields(ganttData, 'resource');
|
|
21330
|
+
this.parent.dateValidationModule.calculateEndDate(ganttData);
|
|
21320
21331
|
}
|
|
21321
21332
|
const keys = Object.keys(data);
|
|
21322
21333
|
if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
|
|
@@ -25824,6 +25835,8 @@ class Toolbar$3 {
|
|
|
25824
25835
|
disableItems.push(gID + '_edit');
|
|
25825
25836
|
disableItems.push(gID + '_update');
|
|
25826
25837
|
disableItems.push(gID + '_cancel');
|
|
25838
|
+
disableItems.push(gID + '_indent');
|
|
25839
|
+
disableItems.push(gID + '_outdent');
|
|
25827
25840
|
}
|
|
25828
25841
|
for (let e = 0; e < enableItems.length; e++) {
|
|
25829
25842
|
let index;
|
|
@@ -30424,13 +30437,13 @@ class ExportValueFormatter {
|
|
|
30424
30437
|
if (typeof args.column.format === 'string') {
|
|
30425
30438
|
let format;
|
|
30426
30439
|
if (args.column.type === 'date') {
|
|
30427
|
-
format = { type: 'date',
|
|
30440
|
+
format = { type: 'date', format: args.column.format };
|
|
30428
30441
|
}
|
|
30429
30442
|
else if (args.column.type === 'time') {
|
|
30430
|
-
format = { type: 'time',
|
|
30443
|
+
format = { type: 'time', format: args.column.format };
|
|
30431
30444
|
}
|
|
30432
30445
|
else {
|
|
30433
|
-
format = { type: 'dateTime',
|
|
30446
|
+
format = { type: 'dateTime', format: args.column.format };
|
|
30434
30447
|
}
|
|
30435
30448
|
return this.returnFormattedValue(args, format);
|
|
30436
30449
|
}
|