@syncfusion/ej2-gantt 20.4.53 → 20.4.54
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 +13 -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 +23 -36
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +25 -38
- 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 +10 -10
- package/src/gantt/actions/critical-path.js +10 -8
- package/src/gantt/actions/edit.js +5 -25
- package/src/gantt/base/gantt.js +1 -0
- package/src/gantt/base/task-processor.js +3 -5
- package/src/gantt/export/export-helper.js +6 -0
|
@@ -3705,7 +3705,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3705
3705
|
}
|
|
3706
3706
|
if (childGanttRecord.hasChildRecords) {
|
|
3707
3707
|
setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
|
|
3708
|
-
setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration, progressValues);
|
|
3708
|
+
setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration ? childGanttRecord.ganttProperties.totalDuration : 0, progressValues);
|
|
3709
3709
|
}
|
|
3710
3710
|
else {
|
|
3711
3711
|
setValue('totalProgress', childGanttRecord.ganttProperties.progress * durationInDay, progressValues);
|
|
@@ -3779,10 +3779,8 @@ class TaskProcessor extends DateProcessor {
|
|
|
3779
3779
|
progressValues = this.getParentProgress(childData);
|
|
3780
3780
|
totalProgress += getValue('totalProgress', progressValues);
|
|
3781
3781
|
if (childData[this.parent.taskFields.duration] < 1) {
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
totalDuration = Number(totalDuration.toFixed(4));
|
|
3785
|
-
}
|
|
3782
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3783
|
+
totalDuration = Number(totalDuration.toFixed(4));
|
|
3786
3784
|
}
|
|
3787
3785
|
else {
|
|
3788
3786
|
totalDuration += getValue('totalDuration', progressValues);
|
|
@@ -14538,6 +14536,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14538
14536
|
case 'enableRtl':
|
|
14539
14537
|
case 'readOnly':
|
|
14540
14538
|
case 'viewType':
|
|
14539
|
+
case 'taskFields':
|
|
14541
14540
|
if (prop === 'locale') {
|
|
14542
14541
|
this.isLocaleChanged = true;
|
|
14543
14542
|
}
|
|
@@ -23659,7 +23658,7 @@ class Edit$2 {
|
|
|
23659
23658
|
}
|
|
23660
23659
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
23661
23660
|
/** validating predecessor for current edited records */
|
|
23662
|
-
if (ganttRecord.ganttProperties.
|
|
23661
|
+
if (ganttRecord.ganttProperties.predecessor) {
|
|
23663
23662
|
this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
|
|
23664
23663
|
if (this.taskbarMoved) {
|
|
23665
23664
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
@@ -25640,7 +25639,7 @@ class Edit$2 {
|
|
|
25640
25639
|
let tempTaskID = this.parent.taskFields.id;
|
|
25641
25640
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
25642
25641
|
this.parent.isDynamicData = true;
|
|
25643
|
-
|
|
25642
|
+
let cAddedRecord = [];
|
|
25644
25643
|
if (isNullOrUndefined(data)) {
|
|
25645
25644
|
this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord);
|
|
25646
25645
|
}
|
|
@@ -25713,7 +25712,6 @@ class Edit$2 {
|
|
|
25713
25712
|
const addedRecords = 'addedRecords';
|
|
25714
25713
|
const insertCrud = data.insert(updatedData[addedRecords], null, query);
|
|
25715
25714
|
insertCrud.then((e) => {
|
|
25716
|
-
const changedRecords = 'changedRecords';
|
|
25717
25715
|
let addedRecords;
|
|
25718
25716
|
if (!isNullOrUndefined(e[0])) {
|
|
25719
25717
|
addedRecords = e[0];
|
|
@@ -25721,26 +25719,7 @@ class Edit$2 {
|
|
|
25721
25719
|
else {
|
|
25722
25720
|
addedRecords = updatedData['addedRecords'][0];
|
|
25723
25721
|
}
|
|
25724
|
-
|
|
25725
|
-
const updateCrud = data.update(this.parent.taskFields.id, updatedData[changedRecords], null, query);
|
|
25726
|
-
updateCrud.then(() => {
|
|
25727
|
-
if (this.parent.taskFields.id && !isNullOrUndefined(addedRecords[this.parent.taskFields.id]) &&
|
|
25728
|
-
addedRecords[this.parent.taskFields.id].toString() !== prevID) {
|
|
25729
|
-
this.parent.setRecordValue('taskId', addedRecords[this.parent.taskFields.id], args.data.ganttProperties, true);
|
|
25730
|
-
this.parent.setRecordValue('taskData.' + this.parent.taskFields.id, addedRecords[this.parent.taskFields.id], args.data);
|
|
25731
|
-
this.parent.setRecordValue(this.parent.taskFields.id, addedRecords[this.parent.taskFields.id], args.data);
|
|
25732
|
-
this.parent.setRecordValue('rowUniqueID', addedRecords[this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
|
|
25733
|
-
const idIndex = this.parent.ids.indexOf(prevID);
|
|
25734
|
-
if (idIndex !== -1) {
|
|
25735
|
-
this.parent.ids[idIndex] = addedRecords[this.parent.taskFields.id].toString();
|
|
25736
|
-
}
|
|
25737
|
-
}
|
|
25738
|
-
this.updateNewRecord(cAddedRecord, args);
|
|
25739
|
-
}).catch((e) => {
|
|
25740
|
-
this.removeAddedRecord();
|
|
25741
|
-
this.dmFailure(e, args);
|
|
25742
|
-
this._resetProperties();
|
|
25743
|
-
});
|
|
25722
|
+
this.updateNewRecord(cAddedRecord, args);
|
|
25744
25723
|
}).catch((e) => {
|
|
25745
25724
|
this.removeAddedRecord();
|
|
25746
25725
|
this.dmFailure(e, args);
|
|
@@ -29182,10 +29161,10 @@ class CriticalPath {
|
|
|
29182
29161
|
for (let i = 0; i < criticalPathIds.length; i++) {
|
|
29183
29162
|
let criticalData;
|
|
29184
29163
|
if (this.parent.viewType === 'ProjectView') {
|
|
29185
|
-
criticalData = this.parent.
|
|
29164
|
+
criticalData = this.parent.flatData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
29186
29165
|
}
|
|
29187
29166
|
else {
|
|
29188
|
-
let currentRecords = this.parent.
|
|
29167
|
+
let currentRecords = this.parent.flatData.filter((data) => {
|
|
29189
29168
|
return (data.ganttProperties.taskId).toString() === criticalPathIds[i].toString();
|
|
29190
29169
|
});
|
|
29191
29170
|
for (let i = 0; i < currentRecords.length; i++) {
|
|
@@ -29198,16 +29177,18 @@ class CriticalPath {
|
|
|
29198
29177
|
const element = this.parent.getRowByIndex(index);
|
|
29199
29178
|
let taskClass;
|
|
29200
29179
|
const columnFields = this.parent.taskFields;
|
|
29201
|
-
if (criticalData.parentItem) {
|
|
29180
|
+
if (criticalData && criticalData.parentItem) {
|
|
29202
29181
|
const parentRecord = this.parent.currentViewData.filter((data) => {
|
|
29203
29182
|
return criticalData.parentItem.uniqueID === data.uniqueID;
|
|
29204
29183
|
});
|
|
29205
|
-
const parentIndex = this.parent.
|
|
29184
|
+
const parentIndex = this.parent.flatData.indexOf(parentRecord[0]);
|
|
29206
29185
|
const parentElement = this.parent.getRowByIndex(parentIndex);
|
|
29207
|
-
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29186
|
+
if (parentElement) {
|
|
29187
|
+
let parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
|
|
29188
|
+
for (let i = 0; i < parentTaskbarElement.length; i++) {
|
|
29189
|
+
if (parentTaskbarElement[i].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
|
|
29190
|
+
addClass(parentTaskbarElement[i].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
29191
|
+
}
|
|
29211
29192
|
}
|
|
29212
29193
|
}
|
|
29213
29194
|
}
|
|
@@ -33553,6 +33534,12 @@ class ExportHelper {
|
|
|
33553
33534
|
cell.style.padding.bottom = padding - style.fontSize;
|
|
33554
33535
|
cell.style.padding.left = 10;
|
|
33555
33536
|
cell.style.padding.right = 10;
|
|
33537
|
+
if (style.padding) {
|
|
33538
|
+
cell.style.padding = style.padding;
|
|
33539
|
+
}
|
|
33540
|
+
if (style.borders) {
|
|
33541
|
+
cell.style.borders = style.borders;
|
|
33542
|
+
}
|
|
33556
33543
|
}
|
|
33557
33544
|
/**
|
|
33558
33545
|
* @param {PdfDocument} pdfDoc .
|