@syncfusion/ej2-gantt 22.2.8 → 22.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 +14 -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 +19 -11
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +19 -11
- 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 +16 -16
- package/src/gantt/actions/context-menu.js +1 -1
- package/src/gantt/actions/dependency.js +1 -1
- package/src/gantt/base/gantt.js +3 -3
- package/src/gantt/base/task-processor.js +5 -4
- package/src/gantt/renderer/chart-rows.js +1 -1
- package/src/gantt/renderer/timeline.js +8 -1
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/gantt/_layout.scss +1 -1
- package/styles/gantt/bootstrap-dark.css +1 -1
- package/styles/gantt/bootstrap.css +1 -1
- package/styles/gantt/bootstrap4.css +1 -1
- package/styles/gantt/bootstrap5-dark.css +1 -1
- package/styles/gantt/bootstrap5.css +1 -1
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/fabric.css +1 -1
- package/styles/gantt/fluent-dark.css +1 -1
- package/styles/gantt/fluent.css +1 -1
- package/styles/gantt/highcontrast-light.css +1 -1
- package/styles/gantt/highcontrast.css +1 -1
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/material.css +1 -1
- package/styles/gantt/material3-dark.css +1 -1
- package/styles/gantt/material3.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -1677,7 +1677,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
1679
|
if (!this.parent.taskFields.child) {
|
|
1680
|
-
this.parent.taskFields
|
|
1680
|
+
this.parent.setProperties({ taskFields: { child: 'Children' } }, true);
|
|
1681
1681
|
}
|
|
1682
1682
|
this.constructDataSource(data);
|
|
1683
1683
|
hierarchicalData = this.hierarchyData;
|
|
@@ -2111,6 +2111,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
2111
2111
|
segment.endDate = !taskSettings.duration && taskSettings.endDate
|
|
2112
2112
|
&& segment.endDate > data.ganttProperties.endDate ? data.ganttProperties.endDate : segment.endDate;
|
|
2113
2113
|
segment.offsetDuration = 1;
|
|
2114
|
+
segment.duration = this.getDuration(segment.startDate, segment.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2114
2115
|
}
|
|
2115
2116
|
}
|
|
2116
2117
|
else {
|
|
@@ -2718,17 +2719,17 @@ class TaskProcessor extends DateProcessor {
|
|
|
2718
2719
|
let isValid = false;
|
|
2719
2720
|
let modifiedsDate = new Date(startDate.getTime());
|
|
2720
2721
|
let hour = 0;
|
|
2721
|
-
if (ganttData && ganttData.durationUnit == 'hour') {
|
|
2722
|
+
if (!isNullOrUndefined(ganttData) && ganttData.durationUnit == 'hour') {
|
|
2722
2723
|
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 60 * 1000);
|
|
2723
2724
|
}
|
|
2724
|
-
if (ganttData && ganttData.durationUnit == 'minute') {
|
|
2725
|
+
if (!isNullOrUndefined(ganttData) && (ganttData.durationUnit == 'minute') || !isNullOrUndefined(ganttData) && ganttData.durationUnit == "day" && ganttData.duration < 1) {
|
|
2725
2726
|
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 1000);
|
|
2726
2727
|
}
|
|
2727
2728
|
for (let i = 0; i < this.parent.dayWorkingTime.length; i++) {
|
|
2728
2729
|
hour = hour + this.parent.dayWorkingTime[i].to - this.parent.dayWorkingTime[i].from;
|
|
2729
2730
|
}
|
|
2730
2731
|
let dateDiff = modifiedsDate.getTime() - sDate.getTime();
|
|
2731
|
-
if (ganttData && ganttData.durationUnit == 'minute' && ganttData.duration < (hour * 60)) {
|
|
2732
|
+
if (!isNullOrUndefined(ganttData) && (ganttData.durationUnit == 'minute' && ganttData.duration < (hour * 60)) || !isNullOrUndefined(ganttData) && ganttData.durationUnit == "day" && ganttData.duration < 1) {
|
|
2732
2733
|
if (tierMode === 'Day') {
|
|
2733
2734
|
if ((Math.floor((dateDiff / (1000 * 60 * 60)) % 24) >= hour || dateDiff === 0)) {
|
|
2734
2735
|
isValid = true;
|
|
@@ -6485,6 +6486,13 @@ class Timeline {
|
|
|
6485
6486
|
tier = 'bottomTier';
|
|
6486
6487
|
tr = null;
|
|
6487
6488
|
}
|
|
6489
|
+
if (this.parent.height === "Auto" || this.parent.timelineModule.isSingleTier) {
|
|
6490
|
+
var timelineContainer = this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
|
|
6491
|
+
this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
6492
|
+
if (!isNullOrUndefined(this.parent.element.getElementsByClassName('e-gridcontent')[0])) {
|
|
6493
|
+
this.parent.treeGrid.element.getElementsByClassName('e-gridcontent')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
6494
|
+
}
|
|
6495
|
+
}
|
|
6488
6496
|
}
|
|
6489
6497
|
/**
|
|
6490
6498
|
* To validate timeline tier count.
|
|
@@ -6981,7 +6989,7 @@ class Timeline {
|
|
|
6981
6989
|
// PDf export collection
|
|
6982
6990
|
timelineCell.value = value;
|
|
6983
6991
|
timelineCell.isWeekend = isWeekendCell;
|
|
6984
|
-
timelineCell.width =
|
|
6992
|
+
timelineCell.width = thWidth;
|
|
6985
6993
|
return parentTr;
|
|
6986
6994
|
}
|
|
6987
6995
|
/**
|
|
@@ -10015,7 +10023,7 @@ class ChartRows extends DateProcessor {
|
|
|
10015
10023
|
width = endLeft - left;
|
|
10016
10024
|
}
|
|
10017
10025
|
else {
|
|
10018
|
-
left = ganttProp.left < ganttProp.autoLeft ? ganttProp.
|
|
10026
|
+
left = ganttProp.left < ganttProp.autoLeft ? ganttProp.autoLeft : ganttProp.left;
|
|
10019
10027
|
width = ganttProp.autoWidth;
|
|
10020
10028
|
}
|
|
10021
10029
|
return left + width;
|
|
@@ -11275,7 +11283,7 @@ class Dependency {
|
|
|
11275
11283
|
ganttRecord = predecessorsCollection[count];
|
|
11276
11284
|
if ((!ganttRecord.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
|
|
11277
11285
|
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
11278
|
-
if (!ganttRecord.ganttProperties.isAutoSchedule) {
|
|
11286
|
+
if (!ganttRecord.ganttProperties.isAutoSchedule && this.parent.editSettings.allowEditing) {
|
|
11279
11287
|
this.parent.connectorLineEditModule['calculateOffset'](ganttRecord);
|
|
11280
11288
|
}
|
|
11281
11289
|
}
|
|
@@ -13893,14 +13901,14 @@ let Gantt = class Gantt extends Component {
|
|
|
13893
13901
|
};
|
|
13894
13902
|
this.focusModule = new FocusModule(this);
|
|
13895
13903
|
if (this.zoomingLevels.length === 0) {
|
|
13896
|
-
this.zoomingLevels
|
|
13904
|
+
this.setProperties({ zoomingLevels: this.getZoomingLevels() }, true);
|
|
13897
13905
|
}
|
|
13898
13906
|
this.resourceFieldsMapping();
|
|
13899
13907
|
if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
|
|
13900
|
-
this.resourceFields
|
|
13908
|
+
this.setProperties({ resourceFields: { unit: 'unit' } }, true);
|
|
13901
13909
|
}
|
|
13902
13910
|
if (!isNullOrUndefined(this.taskFields.work)) {
|
|
13903
|
-
this.taskType
|
|
13911
|
+
this.setProperties({ taskType: 'FixedWork' }, true);
|
|
13904
13912
|
}
|
|
13905
13913
|
this.taskIds = [];
|
|
13906
13914
|
}
|
|
@@ -30688,7 +30696,7 @@ class ContextMenu$2 {
|
|
|
30688
30696
|
this.parent.ganttChartModule.targetElement;
|
|
30689
30697
|
// Closed edited cell before opening context menu
|
|
30690
30698
|
// eslint-disable-next-line
|
|
30691
|
-
if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
|
|
30699
|
+
if ((!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) || target.parentElement.classList.contains('e-treecolumn-container')) {
|
|
30692
30700
|
this.parent.treeGrid.closeEdit();
|
|
30693
30701
|
}
|
|
30694
30702
|
if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
|