@syncfusion/ej2-gantt 20.4.52 → 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 +23 -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 +198 -56
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +199 -57
- 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/connector-line-edit.d.ts +2 -1
- package/src/gantt/actions/connector-line-edit.js +36 -3
- package/src/gantt/actions/critical-path.js +10 -8
- package/src/gantt/actions/edit.js +37 -26
- package/src/gantt/base/gantt.d.ts +2 -0
- package/src/gantt/base/gantt.js +5 -0
- package/src/gantt/base/task-processor.js +3 -5
- package/src/gantt/base/tree-grid.js +98 -13
- package/src/gantt/export/export-helper.js +6 -0
- package/src/gantt/renderer/chart-rows.js +5 -2
- package/GitLeaksReport.json +0 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
|
@@ -3752,7 +3752,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3752
3752
|
}
|
|
3753
3753
|
if (childGanttRecord.hasChildRecords) {
|
|
3754
3754
|
setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
|
|
3755
|
-
setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration, progressValues);
|
|
3755
|
+
setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration ? childGanttRecord.ganttProperties.totalDuration : 0, progressValues);
|
|
3756
3756
|
}
|
|
3757
3757
|
else {
|
|
3758
3758
|
setValue('totalProgress', childGanttRecord.ganttProperties.progress * durationInDay, progressValues);
|
|
@@ -3826,10 +3826,8 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3826
3826
|
progressValues = this.getParentProgress(childData);
|
|
3827
3827
|
totalProgress += getValue('totalProgress', progressValues);
|
|
3828
3828
|
if (childData[this.parent.taskFields.duration] < 1) {
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
totalDuration = Number(totalDuration.toFixed(4));
|
|
3832
|
-
}
|
|
3829
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3830
|
+
totalDuration = Number(totalDuration.toFixed(4));
|
|
3833
3831
|
}
|
|
3834
3832
|
else {
|
|
3835
3833
|
totalDuration += getValue('totalDuration', progressValues);
|
|
@@ -7217,7 +7215,13 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7217
7215
|
this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
|
|
7218
7216
|
this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
|
|
7219
7217
|
this.treeGridColumns = [];
|
|
7218
|
+
if (!this.parent.isLocaleChanged && this.parent.isLoad) {
|
|
7219
|
+
this.parent.previousGanttColumns = extend([], [], this.parent.columns, true);
|
|
7220
|
+
}
|
|
7220
7221
|
this.validateGanttColumns();
|
|
7222
|
+
if (this.parent.isLocaleChanged) {
|
|
7223
|
+
this.parent.isLocaleChanged = false;
|
|
7224
|
+
}
|
|
7221
7225
|
this.addEventListener();
|
|
7222
7226
|
}
|
|
7223
7227
|
GanttTreeGrid.prototype.addEventListener = function () {
|
|
@@ -7639,6 +7643,9 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7639
7643
|
*/
|
|
7640
7644
|
GanttTreeGrid.prototype.createTreeGridColumn = function (column, isDefined) {
|
|
7641
7645
|
var taskSettings = this.parent.taskFields;
|
|
7646
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
7647
|
+
return column.field == prevcolumn.field;
|
|
7648
|
+
})[0];
|
|
7642
7649
|
column.disableHtmlEncode = !isNullOrUndefined(column.disableHtmlEncode) ? column.disableHtmlEncode : this.parent.disableHtmlEncode;
|
|
7643
7650
|
if (taskSettings.id !== column.field) {
|
|
7644
7651
|
column.clipMode = column.clipMode ? column.clipMode : 'EllipsisWithTooltip';
|
|
@@ -7649,14 +7656,24 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7649
7656
|
}
|
|
7650
7657
|
else if (taskSettings.name === column.field) {
|
|
7651
7658
|
/** Name column */
|
|
7652
|
-
|
|
7659
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7660
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('name');
|
|
7661
|
+
}
|
|
7662
|
+
else {
|
|
7663
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('name');
|
|
7664
|
+
}
|
|
7653
7665
|
column.width = column.width ? column.width : 150;
|
|
7654
7666
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
7655
7667
|
column.type = column.type ? column.type : 'string';
|
|
7656
7668
|
}
|
|
7657
7669
|
else if (taskSettings.startDate === column.field) {
|
|
7658
7670
|
/** Name column */
|
|
7659
|
-
|
|
7671
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7672
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('startDate');
|
|
7673
|
+
}
|
|
7674
|
+
else {
|
|
7675
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('startDate');
|
|
7676
|
+
}
|
|
7660
7677
|
column.editType = column.editType ? column.editType :
|
|
7661
7678
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
7662
7679
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
@@ -7664,7 +7681,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7664
7681
|
column.edit = { params: { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) } };
|
|
7665
7682
|
}
|
|
7666
7683
|
else if (taskSettings.endDate === column.field) {
|
|
7667
|
-
|
|
7684
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7685
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('endDate');
|
|
7686
|
+
}
|
|
7687
|
+
else {
|
|
7688
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('endDate');
|
|
7689
|
+
}
|
|
7668
7690
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
7669
7691
|
column.editType = column.editType ? column.editType :
|
|
7670
7692
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
@@ -7673,7 +7695,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7673
7695
|
}
|
|
7674
7696
|
else if (taskSettings.duration === column.field) {
|
|
7675
7697
|
column.width = column.width ? column.width : 150;
|
|
7676
|
-
|
|
7698
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7699
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('duration');
|
|
7700
|
+
}
|
|
7701
|
+
else {
|
|
7702
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('duration');
|
|
7703
|
+
}
|
|
7677
7704
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : !isNullOrUndefined(column.edit) ? null :
|
|
7678
7705
|
this.durationValueAccessor.bind(this);
|
|
7679
7706
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
@@ -7683,7 +7710,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7683
7710
|
this.composeProgressColumn(column);
|
|
7684
7711
|
}
|
|
7685
7712
|
else if (taskSettings.dependency === column.field) {
|
|
7686
|
-
|
|
7713
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7714
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('dependency');
|
|
7715
|
+
}
|
|
7716
|
+
else {
|
|
7717
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('dependency');
|
|
7718
|
+
}
|
|
7687
7719
|
column.width = column.width ? column.width : 150;
|
|
7688
7720
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
7689
7721
|
column.type = 'string';
|
|
@@ -7693,7 +7725,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7693
7725
|
this.composeResourceColumn(column);
|
|
7694
7726
|
}
|
|
7695
7727
|
else if (taskSettings.notes === column.field) {
|
|
7696
|
-
|
|
7728
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7729
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('notes');
|
|
7730
|
+
}
|
|
7731
|
+
else {
|
|
7732
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('notes');
|
|
7733
|
+
}
|
|
7697
7734
|
column.width = column.width ? column.width : 150;
|
|
7698
7735
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
7699
7736
|
if (!this.parent.showInlineNotes) {
|
|
@@ -7708,26 +7745,46 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7708
7745
|
var colName = (taskSettings.baselineEndDate === column.field) ? 'baselineEndDate' :
|
|
7709
7746
|
'baselineStartDate';
|
|
7710
7747
|
column.width = column.width ? column.width : 150;
|
|
7711
|
-
|
|
7748
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7749
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant(colName);
|
|
7750
|
+
}
|
|
7751
|
+
else {
|
|
7752
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant(colName);
|
|
7753
|
+
}
|
|
7712
7754
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
7713
7755
|
column.editType = column.editType ? column.editType :
|
|
7714
7756
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
7715
7757
|
}
|
|
7716
7758
|
else if (taskSettings.work === column.field) {
|
|
7717
|
-
|
|
7759
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7760
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('work');
|
|
7761
|
+
}
|
|
7762
|
+
else {
|
|
7763
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('work');
|
|
7764
|
+
}
|
|
7718
7765
|
column.width = column.width ? column.width : 150;
|
|
7719
7766
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.workValueAccessor.bind(this);
|
|
7720
7767
|
column.editType = column.editType ? column.editType : 'numericedit';
|
|
7721
7768
|
}
|
|
7722
7769
|
else if (taskSettings.type === column.field) {
|
|
7723
|
-
|
|
7770
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7771
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('taskType');
|
|
7772
|
+
}
|
|
7773
|
+
else {
|
|
7774
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskType');
|
|
7775
|
+
}
|
|
7724
7776
|
column.width = column.width ? column.width : 150;
|
|
7725
7777
|
//column.type = 'string';
|
|
7726
7778
|
column.editType = 'dropdownedit';
|
|
7727
7779
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.taskTypeValueAccessor.bind(this);
|
|
7728
7780
|
}
|
|
7729
7781
|
else if (taskSettings.manual === column.field && this.parent.taskMode === 'Custom') {
|
|
7730
|
-
|
|
7782
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7783
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('taskMode');
|
|
7784
|
+
}
|
|
7785
|
+
else {
|
|
7786
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskMode');
|
|
7787
|
+
}
|
|
7731
7788
|
column.width = column.width ? column.width : 120;
|
|
7732
7789
|
column.editType = column.editType ? column.editType : 'dropdownedit';
|
|
7733
7790
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.modeValueAccessor.bind(this);
|
|
@@ -7751,7 +7808,15 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7751
7808
|
* @returns {void} .
|
|
7752
7809
|
*/
|
|
7753
7810
|
GanttTreeGrid.prototype.composeResourceColumn = function (column) {
|
|
7754
|
-
|
|
7811
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
7812
|
+
return column.field == prevcolumn.field;
|
|
7813
|
+
})[0];
|
|
7814
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7815
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('resourceName');
|
|
7816
|
+
}
|
|
7817
|
+
else {
|
|
7818
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('resourceName');
|
|
7819
|
+
}
|
|
7755
7820
|
column.width = column.width ? column.width : 150;
|
|
7756
7821
|
column.type = 'string';
|
|
7757
7822
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.resourceValueAccessor.bind(this);
|
|
@@ -7786,7 +7851,17 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7786
7851
|
var lengthDataSource = this.parent.dataSource['length'];
|
|
7787
7852
|
var taskIDName;
|
|
7788
7853
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
7789
|
-
|
|
7854
|
+
if (this.parent.isLocaleChanged) {
|
|
7855
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
7856
|
+
return column.field == prevcolumn.field;
|
|
7857
|
+
})[0];
|
|
7858
|
+
if (previousColumn) {
|
|
7859
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('id');
|
|
7860
|
+
}
|
|
7861
|
+
}
|
|
7862
|
+
else {
|
|
7863
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
|
|
7864
|
+
}
|
|
7790
7865
|
column.width = column.width ? column.width : 100;
|
|
7791
7866
|
for (var i = 0; i < lengthDataSource; i++) {
|
|
7792
7867
|
if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
|
|
@@ -7823,7 +7898,15 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7823
7898
|
* @returns {void} .
|
|
7824
7899
|
*/
|
|
7825
7900
|
GanttTreeGrid.prototype.composeProgressColumn = function (column) {
|
|
7826
|
-
|
|
7901
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
7902
|
+
return column.field == prevcolumn.field;
|
|
7903
|
+
})[0];
|
|
7904
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
7905
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('progress');
|
|
7906
|
+
}
|
|
7907
|
+
else {
|
|
7908
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('progress');
|
|
7909
|
+
}
|
|
7827
7910
|
column.width = column.width ? column.width : 150;
|
|
7828
7911
|
column.editType = column.editType ? column.editType : 'numericedit';
|
|
7829
7912
|
};
|
|
@@ -10057,7 +10140,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10057
10140
|
for (var i = 0; i < this.parent.currentViewData.length; i++) {
|
|
10058
10141
|
var tempTemplateData = this.parent.currentViewData[i];
|
|
10059
10142
|
if (this.parent.viewType === 'ResourceView') {
|
|
10060
|
-
if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted) {
|
|
10143
|
+
if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted || this.parent.isFromOnPropertyChange) {
|
|
10061
10144
|
this.parent.initialChartRowElements = this.parent.ganttChartModule.getChartRows();
|
|
10062
10145
|
this.parent.editModule.isResourceTaskDeleted = false;
|
|
10063
10146
|
}
|
|
@@ -10569,7 +10652,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10569
10652
|
addClass([cloneElement], 'collpse-parent-border');
|
|
10570
10653
|
var id = chartRows[i].querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
|
|
10571
10654
|
var ganttData = this.parent.getRecordByID(id);
|
|
10572
|
-
var zIndex =
|
|
10655
|
+
var zIndex = "";
|
|
10656
|
+
if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
|
|
10657
|
+
zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
|
|
10658
|
+
}
|
|
10573
10659
|
var cloneChildElement = cloneElement.cloneNode(true);
|
|
10574
10660
|
cloneChildElement.style.zIndex = zIndex;
|
|
10575
10661
|
parentTrNode[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
|
|
@@ -13455,6 +13541,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13455
13541
|
var _this = _super.call(this, options, element) || this;
|
|
13456
13542
|
_this.showIndicator = true;
|
|
13457
13543
|
_this.singleTier = 0;
|
|
13544
|
+
_this.isLocaleChanged = false;
|
|
13458
13545
|
/** @hidden */
|
|
13459
13546
|
_this.isCancelled = false;
|
|
13460
13547
|
/** @hidden */
|
|
@@ -14884,6 +14971,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14884
14971
|
case 'enableRtl':
|
|
14885
14972
|
case 'readOnly':
|
|
14886
14973
|
case 'viewType':
|
|
14974
|
+
case 'taskFields':
|
|
14975
|
+
if (prop === 'locale') {
|
|
14976
|
+
this.isLocaleChanged = true;
|
|
14977
|
+
}
|
|
14887
14978
|
isRefresh = true;
|
|
14888
14979
|
break;
|
|
14889
14980
|
case 'validateManualTasksOnLinking':
|
|
@@ -22882,7 +22973,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22882
22973
|
this.parent.chartRowsModule.refreshRecords([args.data]);
|
|
22883
22974
|
}
|
|
22884
22975
|
else if (args.validateMode.removeLink) {
|
|
22885
|
-
this.
|
|
22976
|
+
this.checkChildRecords(ganttRecord);
|
|
22886
22977
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
22887
22978
|
}
|
|
22888
22979
|
else if (args.validateMode.preserveLinkWithEditing) {
|
|
@@ -22890,6 +22981,29 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22890
22981
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
22891
22982
|
}
|
|
22892
22983
|
};
|
|
22984
|
+
ConnectorLineEdit.prototype.checkChildRecords = function (ganttRecord) {
|
|
22985
|
+
this.validationPredecessor = ganttRecord.ganttProperties.predecessor;
|
|
22986
|
+
if (!isNullOrUndefined(this.validationPredecessor)) {
|
|
22987
|
+
this.removePredecessors(ganttRecord, this.validationPredecessor);
|
|
22988
|
+
}
|
|
22989
|
+
if (ganttRecord.childRecords.length > 0) {
|
|
22990
|
+
for (var i = 0; i < ganttRecord.childRecords.length; i++) {
|
|
22991
|
+
var childRecord = ganttRecord.childRecords[i];
|
|
22992
|
+
this.validationPredecessor = childRecord.ganttProperties.predecessor;
|
|
22993
|
+
if (!isNullOrUndefined(this.validationPredecessor)) {
|
|
22994
|
+
this.removePredecessors(childRecord, this.validationPredecessor);
|
|
22995
|
+
}
|
|
22996
|
+
if (childRecord.childRecords.length > 0) {
|
|
22997
|
+
this.checkChildRecords(childRecord);
|
|
22998
|
+
}
|
|
22999
|
+
}
|
|
23000
|
+
}
|
|
23001
|
+
else if (!isNullOrUndefined(ganttRecord.parentItem)) {
|
|
23002
|
+
var parentRecord = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
|
|
23003
|
+
this.validationPredecessor = parentRecord.ganttProperties.predecessor;
|
|
23004
|
+
this.removePredecessors(parentRecord, this.validationPredecessor);
|
|
23005
|
+
}
|
|
23006
|
+
};
|
|
22893
23007
|
ConnectorLineEdit.prototype.calculateOffset = function (record) {
|
|
22894
23008
|
var prevPredecessor = extend([], record.ganttProperties.predecessor, [], true);
|
|
22895
23009
|
var validPredecessor = this.parent.predecessorModule.getValidPredecessor(record);
|
|
@@ -22965,6 +23079,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22965
23079
|
*/
|
|
22966
23080
|
ConnectorLineEdit.prototype.removePredecessors = function (ganttRecord, predecessor) {
|
|
22967
23081
|
var prevPredecessor = extend([], [], ganttRecord.ganttProperties.predecessor, true);
|
|
23082
|
+
if (isNullOrUndefined(predecessor)) {
|
|
23083
|
+
return;
|
|
23084
|
+
}
|
|
22968
23085
|
var preLength = predecessor.length;
|
|
22969
23086
|
for (var i = 0; i < preLength; i++) {
|
|
22970
23087
|
var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[i].from);
|
|
@@ -23060,14 +23177,20 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
23060
23177
|
* @returns {boolean} .
|
|
23061
23178
|
* @private
|
|
23062
23179
|
*/
|
|
23063
|
-
ConnectorLineEdit.prototype.validateTypes = function (ganttRecord) {
|
|
23180
|
+
ConnectorLineEdit.prototype.validateTypes = function (ganttRecord, data) {
|
|
23064
23181
|
var predecessor = this.parent.predecessorModule.getValidPredecessor(ganttRecord);
|
|
23065
23182
|
var parentGanttRecord;
|
|
23183
|
+
var ganttTaskData;
|
|
23066
23184
|
this.validationPredecessor = [];
|
|
23067
23185
|
var violatedParent;
|
|
23068
23186
|
var violateType;
|
|
23069
23187
|
var startDate = this.parent.predecessorModule.getPredecessorDate(ganttRecord, predecessor);
|
|
23070
|
-
|
|
23188
|
+
if (data) {
|
|
23189
|
+
ganttTaskData = data.ganttProperties;
|
|
23190
|
+
}
|
|
23191
|
+
else {
|
|
23192
|
+
ganttTaskData = ganttRecord.ganttProperties;
|
|
23193
|
+
}
|
|
23071
23194
|
var endDate = this.parent.allowUnscheduledTasks && isNullOrUndefined(startDate) ?
|
|
23072
23195
|
ganttTaskData.endDate :
|
|
23073
23196
|
this.dateValidateModule.getEndDate(startDate, ganttTaskData.duration, ganttTaskData.durationUnit, ganttTaskData, false);
|
|
@@ -23952,6 +24075,29 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23952
24075
|
*/
|
|
23953
24076
|
Edit$$1.prototype.initiateUpdateAction = function (args) {
|
|
23954
24077
|
var isValidatePredecessor = this.isCheckPredecessor(args.data);
|
|
24078
|
+
var parentData;
|
|
24079
|
+
var childRecordIndex;
|
|
24080
|
+
if (!isNullOrUndefined(args.data.parentItem) && !isValidatePredecessor) {
|
|
24081
|
+
parentData = this.parent.getRecordByID(args.data.parentItem.taskId);
|
|
24082
|
+
if (this.isTaskbarMoved(args.data) && this.parent.predecessorModule.getValidPredecessor(parentData).length > 0
|
|
24083
|
+
&& this.parent.isInPredecessorValidation) {
|
|
24084
|
+
isValidatePredecessor = true;
|
|
24085
|
+
}
|
|
24086
|
+
else {
|
|
24087
|
+
isValidatePredecessor = false;
|
|
24088
|
+
}
|
|
24089
|
+
}
|
|
24090
|
+
else if (args.data.childRecords.length > 0 && !isValidatePredecessor) {
|
|
24091
|
+
isValidatePredecessor = this.isCheckPredecessor(args.data);
|
|
24092
|
+
if (!isValidatePredecessor && this.isTaskbarMoved(args.data)) {
|
|
24093
|
+
for (var i = 0; i < args.data.childRecords.length; i++) {
|
|
24094
|
+
if (this.parent.predecessorModule.getValidPredecessor(args.data.childRecords[i]).length > 0) {
|
|
24095
|
+
childRecordIndex = i;
|
|
24096
|
+
isValidatePredecessor = true;
|
|
24097
|
+
}
|
|
24098
|
+
}
|
|
24099
|
+
}
|
|
24100
|
+
}
|
|
23955
24101
|
this.taskbarMoved = this.isTaskbarMoved(args.data);
|
|
23956
24102
|
this.predecessorUpdated = this.isPredecessorUpdated(args.data);
|
|
23957
24103
|
if (this.predecessorUpdated) {
|
|
@@ -23960,7 +24106,15 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23960
24106
|
}
|
|
23961
24107
|
var validateObject = {};
|
|
23962
24108
|
if (isValidatePredecessor) {
|
|
23963
|
-
|
|
24109
|
+
if (!isNullOrUndefined(parentData)) {
|
|
24110
|
+
validateObject = this.parent.connectorLineEditModule.validateTypes(parentData, args.data);
|
|
24111
|
+
}
|
|
24112
|
+
else if (!isNullOrUndefined(childRecordIndex)) {
|
|
24113
|
+
validateObject = this.parent.connectorLineEditModule.validateTypes(args.data.childRecords[childRecordIndex], args.data);
|
|
24114
|
+
}
|
|
24115
|
+
else {
|
|
24116
|
+
validateObject = this.parent.connectorLineEditModule.validateTypes(args.data);
|
|
24117
|
+
}
|
|
23964
24118
|
this.parent.isConnectorLineUpdate = true;
|
|
23965
24119
|
if (!isNullOrUndefined(getValue('violationType', validateObject))) {
|
|
23966
24120
|
var newArgs = this.validateTaskEvent(args);
|
|
@@ -24026,7 +24180,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24026
24180
|
}
|
|
24027
24181
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
24028
24182
|
/** validating predecessor for current edited records */
|
|
24029
|
-
if (ganttRecord.ganttProperties.
|
|
24183
|
+
if (ganttRecord.ganttProperties.predecessor) {
|
|
24030
24184
|
this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
|
|
24031
24185
|
if (this.taskbarMoved) {
|
|
24032
24186
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
@@ -26068,11 +26222,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26068
26222
|
};
|
|
26069
26223
|
var prevID_1 = args.data.ganttProperties.taskId.toString();
|
|
26070
26224
|
/* tslint:disable-next-line */
|
|
26071
|
-
var
|
|
26225
|
+
var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
26072
26226
|
var adaptor = data_2.adaptor;
|
|
26073
26227
|
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_2.dataSource.batchUrl) {
|
|
26074
26228
|
/* tslint:disable-next-line */
|
|
26075
|
-
var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null,
|
|
26229
|
+
var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
|
|
26076
26230
|
crud.then(function (e) {
|
|
26077
26231
|
if (_this.parent.taskFields.id && !isNullOrUndefined(e.addedRecords[0][_this.parent.taskFields.id]) &&
|
|
26078
26232
|
e.addedRecords[0][_this.parent.taskFields.id].toString() == prevID_1) {
|
|
@@ -26094,9 +26248,8 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26094
26248
|
}
|
|
26095
26249
|
else {
|
|
26096
26250
|
var addedRecords = 'addedRecords';
|
|
26097
|
-
var insertCrud = data_2.insert(updatedData_2[addedRecords], null,
|
|
26251
|
+
var insertCrud = data_2.insert(updatedData_2[addedRecords], null, query);
|
|
26098
26252
|
insertCrud.then(function (e) {
|
|
26099
|
-
var changedRecords = 'changedRecords';
|
|
26100
26253
|
var addedRecords;
|
|
26101
26254
|
if (!isNullOrUndefined(e[0])) {
|
|
26102
26255
|
addedRecords = e[0];
|
|
@@ -26104,26 +26257,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26104
26257
|
else {
|
|
26105
26258
|
addedRecords = updatedData_2['addedRecords'][0];
|
|
26106
26259
|
}
|
|
26107
|
-
|
|
26108
|
-
var updateCrud = data_2.update(_this.parent.taskFields.id, updatedData_2[changedRecords], null, query_2);
|
|
26109
|
-
updateCrud.then(function () {
|
|
26110
|
-
if (_this.parent.taskFields.id && !isNullOrUndefined(addedRecords[_this.parent.taskFields.id]) &&
|
|
26111
|
-
addedRecords[_this.parent.taskFields.id].toString() !== prevID_1) {
|
|
26112
|
-
_this.parent.setRecordValue('taskId', addedRecords[_this.parent.taskFields.id], args.data.ganttProperties, true);
|
|
26113
|
-
_this.parent.setRecordValue('taskData.' + _this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
|
|
26114
|
-
_this.parent.setRecordValue(_this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
|
|
26115
|
-
_this.parent.setRecordValue('rowUniqueID', addedRecords[_this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
|
|
26116
|
-
var idIndex = _this.parent.ids.indexOf(prevID_1);
|
|
26117
|
-
if (idIndex !== -1) {
|
|
26118
|
-
_this.parent.ids[idIndex] = addedRecords[_this.parent.taskFields.id].toString();
|
|
26119
|
-
}
|
|
26120
|
-
}
|
|
26121
|
-
_this.updateNewRecord(cAddedRecord_1, args);
|
|
26122
|
-
}).catch(function (e) {
|
|
26123
|
-
_this.removeAddedRecord();
|
|
26124
|
-
_this.dmFailure(e, args);
|
|
26125
|
-
_this._resetProperties();
|
|
26126
|
-
});
|
|
26260
|
+
_this.updateNewRecord(cAddedRecord_1, args);
|
|
26127
26261
|
}).catch(function (e) {
|
|
26128
26262
|
_this.removeAddedRecord();
|
|
26129
26263
|
_this.dmFailure(e, args);
|
|
@@ -29596,10 +29730,10 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
29596
29730
|
var _loop_2 = function (i) {
|
|
29597
29731
|
var criticalData;
|
|
29598
29732
|
if (this_2.parent.viewType === 'ProjectView') {
|
|
29599
|
-
criticalData = this_2.parent.
|
|
29733
|
+
criticalData = this_2.parent.flatData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
29600
29734
|
}
|
|
29601
29735
|
else {
|
|
29602
|
-
var currentRecords = this_2.parent.
|
|
29736
|
+
var currentRecords = this_2.parent.flatData.filter(function (data) {
|
|
29603
29737
|
return (data.ganttProperties.taskId).toString() === criticalPathIds[i].toString();
|
|
29604
29738
|
});
|
|
29605
29739
|
for (var i_1 = 0; i_1 < currentRecords.length; i_1++) {
|
|
@@ -29612,16 +29746,18 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
29612
29746
|
var element = this_2.parent.getRowByIndex(index);
|
|
29613
29747
|
var taskClass = void 0;
|
|
29614
29748
|
var columnFields = this_2.parent.taskFields;
|
|
29615
|
-
if (criticalData.parentItem) {
|
|
29749
|
+
if (criticalData && criticalData.parentItem) {
|
|
29616
29750
|
var parentRecord = this_2.parent.currentViewData.filter(function (data) {
|
|
29617
29751
|
return criticalData.parentItem.uniqueID === data.uniqueID;
|
|
29618
29752
|
});
|
|
29619
|
-
var parentIndex = this_2.parent.
|
|
29753
|
+
var parentIndex = this_2.parent.flatData.indexOf(parentRecord[0]);
|
|
29620
29754
|
var parentElement = this_2.parent.getRowByIndex(parentIndex);
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29624
|
-
|
|
29755
|
+
if (parentElement) {
|
|
29756
|
+
var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
|
|
29757
|
+
for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
|
|
29758
|
+
if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
|
|
29759
|
+
addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
29760
|
+
}
|
|
29625
29761
|
}
|
|
29626
29762
|
}
|
|
29627
29763
|
}
|
|
@@ -34225,6 +34361,12 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
34225
34361
|
cell.style.padding.bottom = padding - style.fontSize;
|
|
34226
34362
|
cell.style.padding.left = 10;
|
|
34227
34363
|
cell.style.padding.right = 10;
|
|
34364
|
+
if (style.padding) {
|
|
34365
|
+
cell.style.padding = style.padding;
|
|
34366
|
+
}
|
|
34367
|
+
if (style.borders) {
|
|
34368
|
+
cell.style.borders = style.borders;
|
|
34369
|
+
}
|
|
34228
34370
|
};
|
|
34229
34371
|
/**
|
|
34230
34372
|
* @param {PdfDocument} pdfDoc .
|