@syncfusion/ej2-gantt 20.1.55 → 20.1.59
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 +28 -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 +22 -13
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +22 -13
- 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/edit.js +4 -0
- package/src/gantt/actions/pdf-export.js +1 -1
- package/src/gantt/base/gantt-chart.js +6 -1
- package/src/gantt/base/gantt.js +2 -5
- package/src/gantt/base/task-processor.js +1 -1
- package/src/gantt/export/export-helper.js +3 -3
- package/src/gantt/renderer/chart-rows.js +1 -1
- package/src/gantt/renderer/connector-line.js +1 -1
- package/src/gantt/renderer/timeline.js +3 -0
- package/styles/bootstrap-dark.css +262 -379
- package/styles/bootstrap.css +264 -387
- package/styles/bootstrap4.css +276 -433
- package/styles/bootstrap5-dark.css +264 -382
- package/styles/bootstrap5.css +264 -382
- package/styles/fabric-dark.css +262 -377
- package/styles/fabric.css +265 -380
- package/styles/fluent-dark.css +262 -378
- package/styles/fluent.css +262 -378
- 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 +262 -379
- package/styles/gantt/bootstrap.css +264 -387
- package/styles/gantt/bootstrap4.css +276 -433
- package/styles/gantt/bootstrap5-dark.css +264 -382
- package/styles/gantt/bootstrap5.css +264 -382
- package/styles/gantt/fabric-dark.css +262 -377
- package/styles/gantt/fabric.css +265 -380
- package/styles/gantt/fluent-dark.css +262 -378
- package/styles/gantt/fluent.css +262 -378
- package/styles/gantt/highcontrast-light.css +230 -364
- package/styles/gantt/highcontrast.css +265 -414
- 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 +266 -371
- package/styles/gantt/material.css +267 -373
- package/styles/gantt/tailwind-dark.css +264 -370
- package/styles/gantt/tailwind.css +264 -370
- package/styles/highcontrast-light.css +230 -364
- package/styles/highcontrast.css +265 -414
- package/styles/material-dark.css +266 -371
- package/styles/material.css +267 -373
- package/styles/tailwind-dark.css +264 -370
- package/styles/tailwind.css +264 -370
|
@@ -1650,7 +1650,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
1650
1650
|
const child = this.parent.taskFields.child;
|
|
1651
1651
|
const resourceData = tempData && tempData[this.parent.taskFields.resourceInfo];
|
|
1652
1652
|
const resourceIdMapping = this.parent.resourceFields.id;
|
|
1653
|
-
if (!tempData[child] && resourceData && resourceData.length) {
|
|
1653
|
+
if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
|
|
1654
1654
|
resourceData.forEach((resource) => {
|
|
1655
1655
|
const id = (typeof resource === 'object') ? resource[resourceIdMapping] :
|
|
1656
1656
|
resource;
|
|
@@ -4662,7 +4662,12 @@ class GanttChart {
|
|
|
4662
4662
|
* @private
|
|
4663
4663
|
*/
|
|
4664
4664
|
getChartRows() {
|
|
4665
|
-
|
|
4665
|
+
if (document.getElementById(this.parent.element.id + 'GanttTaskTableBody') != null) {
|
|
4666
|
+
return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
|
|
4667
|
+
}
|
|
4668
|
+
else {
|
|
4669
|
+
return null;
|
|
4670
|
+
}
|
|
4666
4671
|
}
|
|
4667
4672
|
/**
|
|
4668
4673
|
* Expand Collapse operations from gantt chart side
|
|
@@ -5467,6 +5472,9 @@ class Timeline {
|
|
|
5467
5472
|
this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
|
|
5468
5473
|
}
|
|
5469
5474
|
this.parent.dataOperation.calculateProjectDates();
|
|
5475
|
+
if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
|
|
5476
|
+
this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
|
|
5477
|
+
}
|
|
5470
5478
|
const timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
|
|
5471
5479
|
const totalDays = (timeDifference / (1000 * 3600 * 24));
|
|
5472
5480
|
const chartWidth = this.parent.ganttChartModule.chartElement.offsetWidth;
|
|
@@ -9553,7 +9561,7 @@ class ChartRows extends DateProcessor {
|
|
|
9553
9561
|
const chartRows = this.parent.ganttChartModule.getChartRows();
|
|
9554
9562
|
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
9555
9563
|
if (this.parent.initialChartRowElements) {
|
|
9556
|
-
for (let j = 0; j
|
|
9564
|
+
for (let j = 0; j < this.parent.initialChartRowElements.length; j++) {
|
|
9557
9565
|
if (!isNullOrUndefined(chartRows[j])) {
|
|
9558
9566
|
if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
|
|
9559
9567
|
!isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
|
|
@@ -10468,7 +10476,7 @@ class ConnectorLine {
|
|
|
10468
10476
|
(Math.floor(this.parent.chartRowsModule.milestoneHeight)) : childGanttRecord.width;
|
|
10469
10477
|
connectorObj.parentIndex = parentIndex;
|
|
10470
10478
|
connectorObj.childIndex = childIndex;
|
|
10471
|
-
const rowHeight = this.parent.ganttChartModule.getChartRows()[0] &&
|
|
10479
|
+
const rowHeight = !isNullOrUndefined(this.parent.ganttChartModule.getChartRows()) && this.parent.ganttChartModule.getChartRows()[0] &&
|
|
10472
10480
|
this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;
|
|
10473
10481
|
connectorObj.rowHeight = rowHeight && !isNaN(rowHeight) ? rowHeight : this.parent.rowHeight;
|
|
10474
10482
|
connectorObj.type = predecessor.type;
|
|
@@ -12569,10 +12577,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12569
12577
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
12570
12578
|
}
|
|
12571
12579
|
else {
|
|
12572
|
-
this.treeGrid.dataSource
|
|
12573
|
-
if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
|
|
12574
|
-
this.treeGrid.dataBind();
|
|
12575
|
-
}
|
|
12580
|
+
this.treeGrid.setProperties({ dataSource: this.flatData }, false);
|
|
12576
12581
|
}
|
|
12577
12582
|
}
|
|
12578
12583
|
else {
|
|
@@ -12689,7 +12694,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12689
12694
|
const expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
|
|
12690
12695
|
this.currentViewData : this.getExpandedRecords(this.currentViewData);
|
|
12691
12696
|
let height;
|
|
12692
|
-
const chartRow$$1 = this.ganttChartModule.getChartRows()[0];
|
|
12697
|
+
const chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
|
|
12693
12698
|
if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
|
|
12694
12699
|
height = chartRow$$1.getBoundingClientRect().height;
|
|
12695
12700
|
}
|
|
@@ -21316,7 +21321,11 @@ class Edit$2 {
|
|
|
21316
21321
|
this.parent.isOnEdit = true;
|
|
21317
21322
|
this.validateUpdateValues(data, ganttData, true);
|
|
21318
21323
|
if (data[this.parent.taskFields.resourceInfo]) {
|
|
21324
|
+
if (ganttData.ganttProperties.duration === 0) {
|
|
21325
|
+
this.parent.dataOperation.updateWorkWithDuration(ganttData);
|
|
21326
|
+
}
|
|
21319
21327
|
this.updateResourceRelatedFields(ganttData, 'resource');
|
|
21328
|
+
this.parent.dateValidationModule.calculateEndDate(ganttData);
|
|
21320
21329
|
}
|
|
21321
21330
|
const keys = Object.keys(data);
|
|
21322
21331
|
if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
|
|
@@ -30424,13 +30433,13 @@ class ExportValueFormatter {
|
|
|
30424
30433
|
if (typeof args.column.format === 'string') {
|
|
30425
30434
|
let format;
|
|
30426
30435
|
if (args.column.type === 'date') {
|
|
30427
|
-
format = { type: 'date',
|
|
30436
|
+
format = { type: 'date', format: args.column.format };
|
|
30428
30437
|
}
|
|
30429
30438
|
else if (args.column.type === 'time') {
|
|
30430
|
-
format = { type: 'time',
|
|
30439
|
+
format = { type: 'time', format: args.column.format };
|
|
30431
30440
|
}
|
|
30432
30441
|
else {
|
|
30433
|
-
format = { type: 'dateTime',
|
|
30442
|
+
format = { type: 'dateTime', format: args.column.format };
|
|
30434
30443
|
}
|
|
30435
30444
|
return this.returnFormattedValue(args, format);
|
|
30436
30445
|
}
|
|
@@ -31792,7 +31801,7 @@ class PdfExport {
|
|
|
31792
31801
|
//To set section page size and page orientation.
|
|
31793
31802
|
if (!isNullOrUndefined(pdfExportProperties)) {
|
|
31794
31803
|
const pdfPageSettings = new PdfPageSettings();
|
|
31795
|
-
if (!isNullOrUndefined(pdfExportProperties.pageOrientation && pdfExportProperties.pageOrientation === 'Portrait')
|
|
31804
|
+
if (!isNullOrUndefined(pdfExportProperties.pageOrientation) && pdfExportProperties.pageOrientation === 'Portrait') {
|
|
31796
31805
|
pdfPageSettings.orientation = PdfPageOrientation.Portrait;
|
|
31797
31806
|
}
|
|
31798
31807
|
else {
|