@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.
@@ -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
- if (typeof (getValue('totalDuration', progressValues)) != 'object') {
3783
- totalDuration += getValue('totalDuration', progressValues);
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);
@@ -7148,7 +7146,13 @@ class GanttTreeGrid {
7148
7146
  this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
7149
7147
  this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
7150
7148
  this.treeGridColumns = [];
7149
+ if (!this.parent.isLocaleChanged && this.parent.isLoad) {
7150
+ this.parent.previousGanttColumns = extend([], [], this.parent.columns, true);
7151
+ }
7151
7152
  this.validateGanttColumns();
7153
+ if (this.parent.isLocaleChanged) {
7154
+ this.parent.isLocaleChanged = false;
7155
+ }
7152
7156
  this.addEventListener();
7153
7157
  }
7154
7158
  addEventListener() {
@@ -7566,6 +7570,9 @@ class GanttTreeGrid {
7566
7570
  */
7567
7571
  createTreeGridColumn(column, isDefined) {
7568
7572
  const taskSettings = this.parent.taskFields;
7573
+ let previousColumn = this.parent.previousGanttColumns.filter((prevcolumn) => {
7574
+ return column.field == prevcolumn.field;
7575
+ })[0];
7569
7576
  column.disableHtmlEncode = !isNullOrUndefined(column.disableHtmlEncode) ? column.disableHtmlEncode : this.parent.disableHtmlEncode;
7570
7577
  if (taskSettings.id !== column.field) {
7571
7578
  column.clipMode = column.clipMode ? column.clipMode : 'EllipsisWithTooltip';
@@ -7576,14 +7583,24 @@ class GanttTreeGrid {
7576
7583
  }
7577
7584
  else if (taskSettings.name === column.field) {
7578
7585
  /** Name column */
7579
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('name');
7586
+ if (this.parent.isLocaleChanged && previousColumn) {
7587
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('name');
7588
+ }
7589
+ else {
7590
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('name');
7591
+ }
7580
7592
  column.width = column.width ? column.width : 150;
7581
7593
  column.editType = column.editType ? column.editType : 'stringedit';
7582
7594
  column.type = column.type ? column.type : 'string';
7583
7595
  }
7584
7596
  else if (taskSettings.startDate === column.field) {
7585
7597
  /** Name column */
7586
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('startDate');
7598
+ if (this.parent.isLocaleChanged && previousColumn) {
7599
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('startDate');
7600
+ }
7601
+ else {
7602
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('startDate');
7603
+ }
7587
7604
  column.editType = column.editType ? column.editType :
7588
7605
  this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
7589
7606
  column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
@@ -7591,7 +7608,12 @@ class GanttTreeGrid {
7591
7608
  column.edit = { params: { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) } };
7592
7609
  }
7593
7610
  else if (taskSettings.endDate === column.field) {
7594
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('endDate');
7611
+ if (this.parent.isLocaleChanged && previousColumn) {
7612
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('endDate');
7613
+ }
7614
+ else {
7615
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('endDate');
7616
+ }
7595
7617
  column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
7596
7618
  column.editType = column.editType ? column.editType :
7597
7619
  this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
@@ -7600,7 +7622,12 @@ class GanttTreeGrid {
7600
7622
  }
7601
7623
  else if (taskSettings.duration === column.field) {
7602
7624
  column.width = column.width ? column.width : 150;
7603
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('duration');
7625
+ if (this.parent.isLocaleChanged && previousColumn) {
7626
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('duration');
7627
+ }
7628
+ else {
7629
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('duration');
7630
+ }
7604
7631
  column.valueAccessor = column.valueAccessor ? column.valueAccessor : !isNullOrUndefined(column.edit) ? null :
7605
7632
  this.durationValueAccessor.bind(this);
7606
7633
  column.editType = column.editType ? column.editType : 'stringedit';
@@ -7610,7 +7637,12 @@ class GanttTreeGrid {
7610
7637
  this.composeProgressColumn(column);
7611
7638
  }
7612
7639
  else if (taskSettings.dependency === column.field) {
7613
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('dependency');
7640
+ if (this.parent.isLocaleChanged && previousColumn) {
7641
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('dependency');
7642
+ }
7643
+ else {
7644
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('dependency');
7645
+ }
7614
7646
  column.width = column.width ? column.width : 150;
7615
7647
  column.editType = column.editType ? column.editType : 'stringedit';
7616
7648
  column.type = 'string';
@@ -7620,7 +7652,12 @@ class GanttTreeGrid {
7620
7652
  this.composeResourceColumn(column);
7621
7653
  }
7622
7654
  else if (taskSettings.notes === column.field) {
7623
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('notes');
7655
+ if (this.parent.isLocaleChanged && previousColumn) {
7656
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('notes');
7657
+ }
7658
+ else {
7659
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('notes');
7660
+ }
7624
7661
  column.width = column.width ? column.width : 150;
7625
7662
  column.editType = column.editType ? column.editType : 'stringedit';
7626
7663
  if (!this.parent.showInlineNotes) {
@@ -7635,26 +7672,46 @@ class GanttTreeGrid {
7635
7672
  const colName = (taskSettings.baselineEndDate === column.field) ? 'baselineEndDate' :
7636
7673
  'baselineStartDate';
7637
7674
  column.width = column.width ? column.width : 150;
7638
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant(colName);
7675
+ if (this.parent.isLocaleChanged && previousColumn) {
7676
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant(colName);
7677
+ }
7678
+ else {
7679
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant(colName);
7680
+ }
7639
7681
  column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
7640
7682
  column.editType = column.editType ? column.editType :
7641
7683
  this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
7642
7684
  }
7643
7685
  else if (taskSettings.work === column.field) {
7644
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('work');
7686
+ if (this.parent.isLocaleChanged && previousColumn) {
7687
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('work');
7688
+ }
7689
+ else {
7690
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('work');
7691
+ }
7645
7692
  column.width = column.width ? column.width : 150;
7646
7693
  column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.workValueAccessor.bind(this);
7647
7694
  column.editType = column.editType ? column.editType : 'numericedit';
7648
7695
  }
7649
7696
  else if (taskSettings.type === column.field) {
7650
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskType');
7697
+ if (this.parent.isLocaleChanged && previousColumn) {
7698
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('taskType');
7699
+ }
7700
+ else {
7701
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskType');
7702
+ }
7651
7703
  column.width = column.width ? column.width : 150;
7652
7704
  //column.type = 'string';
7653
7705
  column.editType = 'dropdownedit';
7654
7706
  column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.taskTypeValueAccessor.bind(this);
7655
7707
  }
7656
7708
  else if (taskSettings.manual === column.field && this.parent.taskMode === 'Custom') {
7657
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskMode');
7709
+ if (this.parent.isLocaleChanged && previousColumn) {
7710
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('taskMode');
7711
+ }
7712
+ else {
7713
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskMode');
7714
+ }
7658
7715
  column.width = column.width ? column.width : 120;
7659
7716
  column.editType = column.editType ? column.editType : 'dropdownedit';
7660
7717
  column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.modeValueAccessor.bind(this);
@@ -7678,7 +7735,15 @@ class GanttTreeGrid {
7678
7735
  * @returns {void} .
7679
7736
  */
7680
7737
  composeResourceColumn(column) {
7681
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('resourceName');
7738
+ let previousColumn = this.parent.previousGanttColumns.filter((prevcolumn) => {
7739
+ return column.field == prevcolumn.field;
7740
+ })[0];
7741
+ if (this.parent.isLocaleChanged && previousColumn) {
7742
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('resourceName');
7743
+ }
7744
+ else {
7745
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('resourceName');
7746
+ }
7682
7747
  column.width = column.width ? column.width : 150;
7683
7748
  column.type = 'string';
7684
7749
  column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.resourceValueAccessor.bind(this);
@@ -7713,7 +7778,17 @@ class GanttTreeGrid {
7713
7778
  const lengthDataSource = this.parent.dataSource['length'];
7714
7779
  let taskIDName;
7715
7780
  column.isPrimaryKey = isProjectView ? true : false;
7716
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
7781
+ if (this.parent.isLocaleChanged) {
7782
+ let previousColumn = this.parent.previousGanttColumns.filter((prevcolumn) => {
7783
+ return column.field == prevcolumn.field;
7784
+ })[0];
7785
+ if (previousColumn) {
7786
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('id');
7787
+ }
7788
+ }
7789
+ else {
7790
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
7791
+ }
7717
7792
  column.width = column.width ? column.width : 100;
7718
7793
  for (let i = 0; i < lengthDataSource; i++) {
7719
7794
  if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
@@ -7750,7 +7825,15 @@ class GanttTreeGrid {
7750
7825
  * @returns {void} .
7751
7826
  */
7752
7827
  composeProgressColumn(column) {
7753
- column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('progress');
7828
+ let previousColumn = this.parent.previousGanttColumns.filter((prevcolumn) => {
7829
+ return column.field == prevcolumn.field;
7830
+ })[0];
7831
+ if (this.parent.isLocaleChanged && previousColumn) {
7832
+ column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('progress');
7833
+ }
7834
+ else {
7835
+ column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('progress');
7836
+ }
7754
7837
  column.width = column.width ? column.width : 150;
7755
7838
  column.editType = column.editType ? column.editType : 'numericedit';
7756
7839
  }
@@ -9651,7 +9734,7 @@ class ChartRows extends DateProcessor {
9651
9734
  for (let i = 0; i < this.parent.currentViewData.length; i++) {
9652
9735
  const tempTemplateData = this.parent.currentViewData[i];
9653
9736
  if (this.parent.viewType === 'ResourceView') {
9654
- if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted) {
9737
+ if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted || this.parent.isFromOnPropertyChange) {
9655
9738
  this.parent.initialChartRowElements = this.parent.ganttChartModule.getChartRows();
9656
9739
  this.parent.editModule.isResourceTaskDeleted = false;
9657
9740
  }
@@ -10162,7 +10245,10 @@ class ChartRows extends DateProcessor {
10162
10245
  addClass([cloneElement], 'collpse-parent-border');
10163
10246
  const id = chartRows[i].querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
10164
10247
  const ganttData = this.parent.getRecordByID(id);
10165
- const zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
10248
+ let zIndex = "";
10249
+ if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
10250
+ zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
10251
+ }
10166
10252
  const cloneChildElement = cloneElement.cloneNode(true);
10167
10253
  cloneChildElement.style.zIndex = zIndex;
10168
10254
  parentTrNode[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
@@ -13024,6 +13110,7 @@ let Gantt = class Gantt extends Component {
13024
13110
  super(options, element);
13025
13111
  this.showIndicator = true;
13026
13112
  this.singleTier = 0;
13113
+ this.isLocaleChanged = false;
13027
13114
  /** @hidden */
13028
13115
  this.isCancelled = false;
13029
13116
  /** @hidden */
@@ -14449,6 +14536,10 @@ let Gantt = class Gantt extends Component {
14449
14536
  case 'enableRtl':
14450
14537
  case 'readOnly':
14451
14538
  case 'viewType':
14539
+ case 'taskFields':
14540
+ if (prop === 'locale') {
14541
+ this.isLocaleChanged = true;
14542
+ }
14452
14543
  isRefresh = true;
14453
14544
  break;
14454
14545
  case 'validateManualTasksOnLinking':
@@ -22363,7 +22454,7 @@ class ConnectorLineEdit {
22363
22454
  this.parent.chartRowsModule.refreshRecords([args.data]);
22364
22455
  }
22365
22456
  else if (args.validateMode.removeLink) {
22366
- this.removePredecessors(ganttRecord, this.validationPredecessor);
22457
+ this.checkChildRecords(ganttRecord);
22367
22458
  this.parent.editModule.updateEditedTask(args.editEventArgs);
22368
22459
  }
22369
22460
  else if (args.validateMode.preserveLinkWithEditing) {
@@ -22371,6 +22462,29 @@ class ConnectorLineEdit {
22371
22462
  this.parent.editModule.updateEditedTask(args.editEventArgs);
22372
22463
  }
22373
22464
  }
22465
+ checkChildRecords(ganttRecord) {
22466
+ this.validationPredecessor = ganttRecord.ganttProperties.predecessor;
22467
+ if (!isNullOrUndefined(this.validationPredecessor)) {
22468
+ this.removePredecessors(ganttRecord, this.validationPredecessor);
22469
+ }
22470
+ if (ganttRecord.childRecords.length > 0) {
22471
+ for (let i = 0; i < ganttRecord.childRecords.length; i++) {
22472
+ let childRecord = ganttRecord.childRecords[i];
22473
+ this.validationPredecessor = childRecord.ganttProperties.predecessor;
22474
+ if (!isNullOrUndefined(this.validationPredecessor)) {
22475
+ this.removePredecessors(childRecord, this.validationPredecessor);
22476
+ }
22477
+ if (childRecord.childRecords.length > 0) {
22478
+ this.checkChildRecords(childRecord);
22479
+ }
22480
+ }
22481
+ }
22482
+ else if (!isNullOrUndefined(ganttRecord.parentItem)) {
22483
+ let parentRecord = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
22484
+ this.validationPredecessor = parentRecord.ganttProperties.predecessor;
22485
+ this.removePredecessors(parentRecord, this.validationPredecessor);
22486
+ }
22487
+ }
22374
22488
  calculateOffset(record) {
22375
22489
  const prevPredecessor = extend([], record.ganttProperties.predecessor, [], true);
22376
22490
  const validPredecessor = this.parent.predecessorModule.getValidPredecessor(record);
@@ -22446,6 +22560,9 @@ class ConnectorLineEdit {
22446
22560
  */
22447
22561
  removePredecessors(ganttRecord, predecessor) {
22448
22562
  const prevPredecessor = extend([], [], ganttRecord.ganttProperties.predecessor, true);
22563
+ if (isNullOrUndefined(predecessor)) {
22564
+ return;
22565
+ }
22449
22566
  const preLength = predecessor.length;
22450
22567
  for (let i = 0; i < preLength; i++) {
22451
22568
  const parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[i].from);
@@ -22541,14 +22658,20 @@ class ConnectorLineEdit {
22541
22658
  * @returns {boolean} .
22542
22659
  * @private
22543
22660
  */
22544
- validateTypes(ganttRecord) {
22661
+ validateTypes(ganttRecord, data) {
22545
22662
  const predecessor = this.parent.predecessorModule.getValidPredecessor(ganttRecord);
22546
22663
  let parentGanttRecord;
22664
+ let ganttTaskData;
22547
22665
  this.validationPredecessor = [];
22548
22666
  let violatedParent;
22549
22667
  let violateType;
22550
22668
  const startDate = this.parent.predecessorModule.getPredecessorDate(ganttRecord, predecessor);
22551
- const ganttTaskData = ganttRecord.ganttProperties;
22669
+ if (data) {
22670
+ ganttTaskData = data.ganttProperties;
22671
+ }
22672
+ else {
22673
+ ganttTaskData = ganttRecord.ganttProperties;
22674
+ }
22552
22675
  const endDate = this.parent.allowUnscheduledTasks && isNullOrUndefined(startDate) ?
22553
22676
  ganttTaskData.endDate :
22554
22677
  this.dateValidateModule.getEndDate(startDate, ganttTaskData.duration, ganttTaskData.durationUnit, ganttTaskData, false);
@@ -23429,7 +23552,30 @@ class Edit$2 {
23429
23552
  * @private
23430
23553
  */
23431
23554
  initiateUpdateAction(args) {
23432
- const isValidatePredecessor = this.isCheckPredecessor(args.data);
23555
+ let isValidatePredecessor = this.isCheckPredecessor(args.data);
23556
+ let parentData;
23557
+ let childRecordIndex;
23558
+ if (!isNullOrUndefined(args.data.parentItem) && !isValidatePredecessor) {
23559
+ parentData = this.parent.getRecordByID(args.data.parentItem.taskId);
23560
+ if (this.isTaskbarMoved(args.data) && this.parent.predecessorModule.getValidPredecessor(parentData).length > 0
23561
+ && this.parent.isInPredecessorValidation) {
23562
+ isValidatePredecessor = true;
23563
+ }
23564
+ else {
23565
+ isValidatePredecessor = false;
23566
+ }
23567
+ }
23568
+ else if (args.data.childRecords.length > 0 && !isValidatePredecessor) {
23569
+ isValidatePredecessor = this.isCheckPredecessor(args.data);
23570
+ if (!isValidatePredecessor && this.isTaskbarMoved(args.data)) {
23571
+ for (var i = 0; i < args.data.childRecords.length; i++) {
23572
+ if (this.parent.predecessorModule.getValidPredecessor(args.data.childRecords[i]).length > 0) {
23573
+ childRecordIndex = i;
23574
+ isValidatePredecessor = true;
23575
+ }
23576
+ }
23577
+ }
23578
+ }
23433
23579
  this.taskbarMoved = this.isTaskbarMoved(args.data);
23434
23580
  this.predecessorUpdated = this.isPredecessorUpdated(args.data);
23435
23581
  if (this.predecessorUpdated) {
@@ -23438,7 +23584,15 @@ class Edit$2 {
23438
23584
  }
23439
23585
  let validateObject = {};
23440
23586
  if (isValidatePredecessor) {
23441
- validateObject = this.parent.connectorLineEditModule.validateTypes(args.data);
23587
+ if (!isNullOrUndefined(parentData)) {
23588
+ validateObject = this.parent.connectorLineEditModule.validateTypes(parentData, args.data);
23589
+ }
23590
+ else if (!isNullOrUndefined(childRecordIndex)) {
23591
+ validateObject = this.parent.connectorLineEditModule.validateTypes(args.data.childRecords[childRecordIndex], args.data);
23592
+ }
23593
+ else {
23594
+ validateObject = this.parent.connectorLineEditModule.validateTypes(args.data);
23595
+ }
23442
23596
  this.parent.isConnectorLineUpdate = true;
23443
23597
  if (!isNullOrUndefined(getValue('violationType', validateObject))) {
23444
23598
  const newArgs = this.validateTaskEvent(args);
@@ -23504,7 +23658,7 @@ class Edit$2 {
23504
23658
  }
23505
23659
  this.parent.predecessorModule.isValidatedParentTaskID = '';
23506
23660
  /** validating predecessor for current edited records */
23507
- if (ganttRecord.ganttProperties.predecessorsName) {
23661
+ if (ganttRecord.ganttProperties.predecessor) {
23508
23662
  this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
23509
23663
  if (this.taskbarMoved) {
23510
23664
  this.parent.editedTaskBarItem = ganttRecord;
@@ -25485,7 +25639,7 @@ class Edit$2 {
25485
25639
  let tempTaskID = this.parent.taskFields.id;
25486
25640
  if (this.parent.editModule && this.parent.editSettings.allowAdding) {
25487
25641
  this.parent.isDynamicData = true;
25488
- const cAddedRecord = [];
25642
+ let cAddedRecord = [];
25489
25643
  if (isNullOrUndefined(data)) {
25490
25644
  this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord);
25491
25645
  }
@@ -25558,7 +25712,6 @@ class Edit$2 {
25558
25712
  const addedRecords = 'addedRecords';
25559
25713
  const insertCrud = data.insert(updatedData[addedRecords], null, query);
25560
25714
  insertCrud.then((e) => {
25561
- const changedRecords = 'changedRecords';
25562
25715
  let addedRecords;
25563
25716
  if (!isNullOrUndefined(e[0])) {
25564
25717
  addedRecords = e[0];
@@ -25566,26 +25719,7 @@ class Edit$2 {
25566
25719
  else {
25567
25720
  addedRecords = updatedData['addedRecords'][0];
25568
25721
  }
25569
- /* tslint:disable-next-line */
25570
- const updateCrud = data.update(this.parent.taskFields.id, updatedData[changedRecords], null, query);
25571
- updateCrud.then(() => {
25572
- if (this.parent.taskFields.id && !isNullOrUndefined(addedRecords[this.parent.taskFields.id]) &&
25573
- addedRecords[this.parent.taskFields.id].toString() !== prevID) {
25574
- this.parent.setRecordValue('taskId', addedRecords[this.parent.taskFields.id], args.data.ganttProperties, true);
25575
- this.parent.setRecordValue('taskData.' + this.parent.taskFields.id, addedRecords[this.parent.taskFields.id], args.data);
25576
- this.parent.setRecordValue(this.parent.taskFields.id, addedRecords[this.parent.taskFields.id], args.data);
25577
- this.parent.setRecordValue('rowUniqueID', addedRecords[this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
25578
- const idIndex = this.parent.ids.indexOf(prevID);
25579
- if (idIndex !== -1) {
25580
- this.parent.ids[idIndex] = addedRecords[this.parent.taskFields.id].toString();
25581
- }
25582
- }
25583
- this.updateNewRecord(cAddedRecord, args);
25584
- }).catch((e) => {
25585
- this.removeAddedRecord();
25586
- this.dmFailure(e, args);
25587
- this._resetProperties();
25588
- });
25722
+ this.updateNewRecord(cAddedRecord, args);
25589
25723
  }).catch((e) => {
25590
25724
  this.removeAddedRecord();
25591
25725
  this.dmFailure(e, args);
@@ -29027,10 +29161,10 @@ class CriticalPath {
29027
29161
  for (let i = 0; i < criticalPathIds.length; i++) {
29028
29162
  let criticalData;
29029
29163
  if (this.parent.viewType === 'ProjectView') {
29030
- criticalData = this.parent.currentViewData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
29164
+ criticalData = this.parent.flatData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
29031
29165
  }
29032
29166
  else {
29033
- let currentRecords = this.parent.currentViewData.filter((data) => {
29167
+ let currentRecords = this.parent.flatData.filter((data) => {
29034
29168
  return (data.ganttProperties.taskId).toString() === criticalPathIds[i].toString();
29035
29169
  });
29036
29170
  for (let i = 0; i < currentRecords.length; i++) {
@@ -29043,16 +29177,18 @@ class CriticalPath {
29043
29177
  const element = this.parent.getRowByIndex(index);
29044
29178
  let taskClass;
29045
29179
  const columnFields = this.parent.taskFields;
29046
- if (criticalData.parentItem) {
29180
+ if (criticalData && criticalData.parentItem) {
29047
29181
  const parentRecord = this.parent.currentViewData.filter((data) => {
29048
29182
  return criticalData.parentItem.uniqueID === data.uniqueID;
29049
29183
  });
29050
- const parentIndex = this.parent.currentViewData.indexOf(parentRecord[0]);
29184
+ const parentIndex = this.parent.flatData.indexOf(parentRecord[0]);
29051
29185
  const parentElement = this.parent.getRowByIndex(parentIndex);
29052
- let parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
29053
- for (let i = 0; i < parentTaskbarElement.length; i++) {
29054
- if (parentTaskbarElement[i].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
29055
- addClass(parentTaskbarElement[i].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
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
+ }
29056
29192
  }
29057
29193
  }
29058
29194
  }
@@ -33398,6 +33534,12 @@ class ExportHelper {
33398
33534
  cell.style.padding.bottom = padding - style.fontSize;
33399
33535
  cell.style.padding.left = 10;
33400
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
+ }
33401
33543
  }
33402
33544
  /**
33403
33545
  * @param {PdfDocument} pdfDoc .