@syncfusion/ej2-gantt 20.3.49 → 20.3.52

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.
@@ -11051,6 +11051,11 @@ var Dependency = /** @__PURE__ @class */ (function () {
11051
11051
  this.validatePredecessor(record, undefined, 'successor');
11052
11052
  }
11053
11053
  }
11054
+ if (record && record.hasChildRecords && record.ganttProperties.taskId !== this.isValidatedParentTaskID &&
11055
+ this.parent.editModule['taskbarMoved']) {
11056
+ this.parent.editModule['updateChildItems'](record);
11057
+ this.isValidatedParentTaskID = record.ganttProperties.taskId;
11058
+ }
11054
11059
  }
11055
11060
  };
11056
11061
  /**
@@ -12865,7 +12870,14 @@ var FocusModule = /** @__PURE__ @class */ (function () {
12865
12870
  || (ganttObj.editSettings.allowTaskbarEditing && !ganttObj.editModule.taskbarEditModule.touchEdit))) {
12866
12871
  if ((ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectionModule.selectedRowIndexes.length)
12867
12872
  || (ganttObj.selectionSettings.mode === 'Cell' && ganttObj.selectionModule.getSelectedRowCellIndexes().length)) {
12868
- ganttObj.editModule.startDeleteAction();
12873
+ if (!isNullOrUndefined(e.target)) {
12874
+ if (e.target['tagName'] !== 'INPUT') {
12875
+ ganttObj.editModule.startDeleteAction();
12876
+ }
12877
+ }
12878
+ else {
12879
+ ganttObj.editModule.startDeleteAction();
12880
+ }
12869
12881
  }
12870
12882
  }
12871
12883
  break;
@@ -21109,7 +21121,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21109
21121
  if (gridObj.isEdit) {
21110
21122
  gridObj.endEdit();
21111
21123
  }
21112
- if (isEdit) {
21124
+ if (isEdit && gridObj.currentViewData.length != gridObj.dataSource['length']) {
21113
21125
  dataSource = gridObj.dataSource;
21114
21126
  }
21115
21127
  else {
@@ -23026,6 +23038,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23026
23038
  this.parent.predecessorModule.validatePredecessor(child, [], '');
23027
23039
  }
23028
23040
  }
23041
+ this.parent.predecessorModule.isValidatedParentTaskID = '';
23029
23042
  /** validating predecessor for current edited records */
23030
23043
  if (ganttRecord.ganttProperties.predecessor) {
23031
23044
  this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
@@ -23035,7 +23048,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23035
23048
  this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
23036
23049
  }
23037
23050
  if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
23038
- (args.action === "DrawConnectorLine" || args.action === "DialogEditing")) {
23051
+ (args.action === "DrawConnectorLine" || args.action === "CellEditing" || args.action === "DialogEditing")) {
23039
23052
  this.updateChildItems(ganttRecord);
23040
23053
  }
23041
23054
  this.updateParentItemOnEditing();
@@ -23043,6 +23056,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23043
23056
  /** Update parent up-to zeroth level */
23044
23057
  if (ganttRecord.parentItem) {
23045
23058
  this.parent.dataOperation.updateParentItems(ganttRecord, true);
23059
+ var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
23060
+ if (parentData.ganttProperties.predecessor) {
23061
+ this.parent.predecessorModule.validatePredecessor(parentData, [], '');
23062
+ this.updateParentItemOnEditing();
23063
+ }
23046
23064
  }
23047
23065
  this.initiateSaveAction(args);
23048
23066
  };
@@ -29631,20 +29649,20 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
29631
29649
  var draggedParent = void 0;
29632
29650
  var toParent_1;
29633
29651
  if (draggedRecord.parentItem) {
29634
- draggedParent = this.parent.currentViewData[this.parent.ids.indexOf(draggedRecord.parentItem.taskId)];
29652
+ draggedParent = this.parent.flatData[this.parent.ids.indexOf(draggedRecord.parentItem.taskId)];
29635
29653
  }
29636
29654
  else {
29637
29655
  draggedParent = draggedRecord;
29638
29656
  }
29639
29657
  if (droppedRecord.parentItem) {
29640
- toParent_1 = this.parent.currentViewData[this.parent.ids.indexOf(droppedRecord.parentItem.taskId)];
29658
+ toParent_1 = this.parent.flatData[this.parent.ids.indexOf(droppedRecord.parentItem.taskId)];
29641
29659
  }
29642
29660
  else {
29643
29661
  toParent_1 = droppedRecord;
29644
29662
  }
29645
29663
  var validateRecords = void 0;
29646
29664
  if (toParent_1.uniqueID === draggedParent.uniqueID || (draggedParent.parentItem &&
29647
- toParent_1.uniqueID == this.parent.currentViewData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
29665
+ toParent_1.uniqueID == this.parent.flatData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
29648
29666
  validateRecords = this.parent.currentViewData.filter(function (data) {
29649
29667
  if ((data.ganttProperties.predecessor && data.ganttProperties.predecessor.length > 0)) {
29650
29668
  for (var i = 0; i < data.ganttProperties.predecessor.length; i++) {
@@ -33112,7 +33130,8 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
33112
33130
  this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
33113
33131
  //Draw Taskbar
33114
33132
  var font = new PdfStandardFont(this.fontFamily, 9, PdfFontStyle.Regular);
33115
- if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33133
+ if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
33134
+ this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33116
33135
  font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
33117
33136
  }
33118
33137
  var fontColor = null;
@@ -33280,7 +33299,8 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
33280
33299
  !isNullOrUndefined(this.rightTaskLabel.value) && !this.rightTaskLabel.isCompleted) {
33281
33300
  var result = this.getWidth(this.rightTaskLabel.value, detail.endPoint - left, 15);
33282
33301
  var font = new PdfStandardFont(this.fontFamily, 9);
33283
- if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33302
+ if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
33303
+ this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33284
33304
  font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
33285
33305
  }
33286
33306
  var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
@@ -33338,7 +33358,8 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
33338
33358
  && !this.leftTaskLabel.isCompleted) {
33339
33359
  var result = this.getWidth(this.leftTaskLabel.value, detail.endPoint - left, 15);
33340
33360
  var font = new PdfStandardFont(this.fontFamily, 9);
33341
- if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33361
+ if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
33362
+ this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33342
33363
  font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
33343
33364
  }
33344
33365
  var adjustHeight = (pixelToPoint(this.parent.rowHeight) - result.actualSize.height) / 2;
@@ -33369,7 +33390,8 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
33369
33390
  };
33370
33391
  PdfGanttTaskbarCollection.prototype.getWidth = function (value, width, height) {
33371
33392
  var font = new PdfStandardFont(this.fontFamily, 9);
33372
- if (this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33393
+ if (!isNullOrUndefined(this.parent.pdfExportModule['helper']['exportProps'].ganttStyle) &&
33394
+ this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font) {
33373
33395
  font = this.parent.pdfExportModule['helper']['exportProps'].ganttStyle.font;
33374
33396
  }
33375
33397
  var layouter = new PdfStringLayouter();