@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
|
@@ -1701,7 +1701,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
if (!this.parent.taskFields.child) {
|
|
1704
|
-
this.parent.taskFields
|
|
1704
|
+
this.parent.setProperties({ taskFields: { child: 'Children' } }, true);
|
|
1705
1705
|
}
|
|
1706
1706
|
this.constructDataSource(data);
|
|
1707
1707
|
hierarchicalData = this.hierarchyData;
|
|
@@ -2149,6 +2149,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2149
2149
|
segment.endDate = !taskSettings.duration && taskSettings.endDate
|
|
2150
2150
|
&& segment.endDate > data.ganttProperties.endDate ? data.ganttProperties.endDate : segment.endDate;
|
|
2151
2151
|
segment.offsetDuration = 1;
|
|
2152
|
+
segment.duration = this.getDuration(segment.startDate, segment.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2152
2153
|
}
|
|
2153
2154
|
}
|
|
2154
2155
|
else {
|
|
@@ -2757,17 +2758,17 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2757
2758
|
var isValid = false;
|
|
2758
2759
|
var modifiedsDate = new Date(startDate.getTime());
|
|
2759
2760
|
var hour = 0;
|
|
2760
|
-
if (ganttData && ganttData.durationUnit == 'hour') {
|
|
2761
|
+
if (!isNullOrUndefined(ganttData) && ganttData.durationUnit == 'hour') {
|
|
2761
2762
|
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 60 * 1000);
|
|
2762
2763
|
}
|
|
2763
|
-
if (ganttData && ganttData.durationUnit == 'minute') {
|
|
2764
|
+
if (!isNullOrUndefined(ganttData) && (ganttData.durationUnit == 'minute') || !isNullOrUndefined(ganttData) && ganttData.durationUnit == "day" && ganttData.duration < 1) {
|
|
2764
2765
|
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 1000);
|
|
2765
2766
|
}
|
|
2766
2767
|
for (var i = 0; i < this.parent.dayWorkingTime.length; i++) {
|
|
2767
2768
|
hour = hour + this.parent.dayWorkingTime[i].to - this.parent.dayWorkingTime[i].from;
|
|
2768
2769
|
}
|
|
2769
2770
|
var dateDiff = modifiedsDate.getTime() - sDate.getTime();
|
|
2770
|
-
if (ganttData && ganttData.durationUnit == 'minute' && ganttData.duration < (hour * 60)) {
|
|
2771
|
+
if (!isNullOrUndefined(ganttData) && (ganttData.durationUnit == 'minute' && ganttData.duration < (hour * 60)) || !isNullOrUndefined(ganttData) && ganttData.durationUnit == "day" && ganttData.duration < 1) {
|
|
2771
2772
|
if (tierMode === 'Day') {
|
|
2772
2773
|
if ((Math.floor((dateDiff / (1000 * 60 * 60)) % 24) >= hour || dateDiff === 0)) {
|
|
2773
2774
|
isValid = true;
|
|
@@ -6549,6 +6550,13 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6549
6550
|
tier = 'bottomTier';
|
|
6550
6551
|
tr = null;
|
|
6551
6552
|
}
|
|
6553
|
+
if (this.parent.height === "Auto" || this.parent.timelineModule.isSingleTier) {
|
|
6554
|
+
var timelineContainer = this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
|
|
6555
|
+
this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
6556
|
+
if (!isNullOrUndefined(this.parent.element.getElementsByClassName('e-gridcontent')[0])) {
|
|
6557
|
+
this.parent.treeGrid.element.getElementsByClassName('e-gridcontent')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6552
6560
|
};
|
|
6553
6561
|
/**
|
|
6554
6562
|
* To validate timeline tier count.
|
|
@@ -7046,7 +7054,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
7046
7054
|
// PDf export collection
|
|
7047
7055
|
timelineCell.value = value;
|
|
7048
7056
|
timelineCell.isWeekend = isWeekendCell;
|
|
7049
|
-
timelineCell.width =
|
|
7057
|
+
timelineCell.width = thWidth;
|
|
7050
7058
|
return parentTr;
|
|
7051
7059
|
};
|
|
7052
7060
|
/**
|
|
@@ -10421,7 +10429,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10421
10429
|
width = endLeft - left;
|
|
10422
10430
|
}
|
|
10423
10431
|
else {
|
|
10424
|
-
left = ganttProp.left < ganttProp.autoLeft ? ganttProp.
|
|
10432
|
+
left = ganttProp.left < ganttProp.autoLeft ? ganttProp.autoLeft : ganttProp.left;
|
|
10425
10433
|
width = ganttProp.autoWidth;
|
|
10426
10434
|
}
|
|
10427
10435
|
return left + width;
|
|
@@ -11685,7 +11693,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11685
11693
|
ganttRecord = predecessorsCollection[count];
|
|
11686
11694
|
if ((!ganttRecord.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
|
|
11687
11695
|
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
11688
|
-
if (!ganttRecord.ganttProperties.isAutoSchedule) {
|
|
11696
|
+
if (!ganttRecord.ganttProperties.isAutoSchedule && this.parent.editSettings.allowEditing) {
|
|
11689
11697
|
this.parent.connectorLineEditModule['calculateOffset'](ganttRecord);
|
|
11690
11698
|
}
|
|
11691
11699
|
}
|
|
@@ -14326,14 +14334,14 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14326
14334
|
};
|
|
14327
14335
|
this.focusModule = new FocusModule(this);
|
|
14328
14336
|
if (this.zoomingLevels.length === 0) {
|
|
14329
|
-
this.zoomingLevels
|
|
14337
|
+
this.setProperties({ zoomingLevels: this.getZoomingLevels() }, true);
|
|
14330
14338
|
}
|
|
14331
14339
|
this.resourceFieldsMapping();
|
|
14332
14340
|
if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
|
|
14333
|
-
this.resourceFields
|
|
14341
|
+
this.setProperties({ resourceFields: { unit: 'unit' } }, true);
|
|
14334
14342
|
}
|
|
14335
14343
|
if (!isNullOrUndefined(this.taskFields.work)) {
|
|
14336
|
-
this.taskType
|
|
14344
|
+
this.setProperties({ taskType: 'FixedWork' }, true);
|
|
14337
14345
|
}
|
|
14338
14346
|
this.taskIds = [];
|
|
14339
14347
|
};
|
|
@@ -31267,7 +31275,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
31267
31275
|
this.parent.ganttChartModule.targetElement;
|
|
31268
31276
|
// Closed edited cell before opening context menu
|
|
31269
31277
|
// eslint-disable-next-line
|
|
31270
|
-
if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
|
|
31278
|
+
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')) {
|
|
31271
31279
|
this.parent.treeGrid.closeEdit();
|
|
31272
31280
|
}
|
|
31273
31281
|
if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
|