@syncfusion/ej2-gantt 24.2.7 → 24.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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 24.2.7
3
+ * version : 24.2.9
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-gantt@*",
3
- "_id": "@syncfusion/ej2-gantt@24.2.6",
3
+ "_id": "@syncfusion/ej2-gantt@24.2.8",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-X2u9gA4L3DyIe+tijmv/uYOaj/8YppYXjTnea4l5rBrqvx5SQSKxP67rI41ekq6VMAqhSFkwcjvm2sNcdfLKGw==",
5
+ "_integrity": "sha512-xnbjCw726UKHbpGDEoiWYxcruRlt/R/Nljn9yzbuYtI8wqDJ3ArJG1ubaJawDpr2C5UzkUjP0DoKkl6EpJfhmQ==",
6
6
  "_location": "/@syncfusion/ej2-gantt",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-gantt",
24
24
  "/@syncfusion/ej2-vue-gantt"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-24.2.6.tgz",
27
- "_shasum": "7e7ad57f3c6a2bda1014a76f45f1af11d563d364",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-24.2.8.tgz",
27
+ "_shasum": "53883ef2d42b9745316df5591517fa8a8b06d173",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
30
30
  "author": {
@@ -37,19 +37,19 @@
37
37
  "dependencies": {
38
38
  "@syncfusion/ej2-base": "~24.2.7",
39
39
  "@syncfusion/ej2-buttons": "~24.2.7",
40
- "@syncfusion/ej2-calendars": "~24.2.5",
40
+ "@syncfusion/ej2-calendars": "~24.2.9",
41
41
  "@syncfusion/ej2-data": "~24.2.3",
42
- "@syncfusion/ej2-dropdowns": "~24.2.7",
43
- "@syncfusion/ej2-grids": "~24.2.7",
44
- "@syncfusion/ej2-inputs": "~24.2.7",
42
+ "@syncfusion/ej2-dropdowns": "~24.2.9",
43
+ "@syncfusion/ej2-grids": "~24.2.9",
44
+ "@syncfusion/ej2-inputs": "~24.2.9",
45
45
  "@syncfusion/ej2-layouts": "~24.2.4",
46
- "@syncfusion/ej2-lists": "~24.2.4",
47
- "@syncfusion/ej2-navigations": "~24.2.4",
46
+ "@syncfusion/ej2-lists": "~24.2.8",
47
+ "@syncfusion/ej2-navigations": "~24.2.8",
48
48
  "@syncfusion/ej2-notifications": "~24.2.4",
49
- "@syncfusion/ej2-popups": "~24.2.5",
50
- "@syncfusion/ej2-richtexteditor": "~24.2.7",
49
+ "@syncfusion/ej2-popups": "~24.2.9",
50
+ "@syncfusion/ej2-richtexteditor": "~24.2.9",
51
51
  "@syncfusion/ej2-svg-base": "~24.2.3",
52
- "@syncfusion/ej2-treegrid": "~24.2.7"
52
+ "@syncfusion/ej2-treegrid": "~24.2.9"
53
53
  },
54
54
  "deprecated": false,
55
55
  "description": "Essential JS 2 Gantt Component",
@@ -74,6 +74,6 @@
74
74
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
75
75
  },
76
76
  "typings": "index.d.ts",
77
- "version": "24.2.7",
77
+ "version": "24.2.9",
78
78
  "sideEffects": false
79
79
  }
@@ -11,6 +11,8 @@ export declare class Dependency {
11
11
  private parentPredecessors;
12
12
  private validatedParentIds;
13
13
  isValidatedParentTaskID: string;
14
+ validatedChildItems: IGanttData[];
15
+ private storeId;
14
16
  constructor(gantt: Gantt);
15
17
  /**
16
18
  * Method to populate predecessor collections in records
@@ -156,6 +158,27 @@ export declare class Dependency {
156
158
  * @private
157
159
  */
158
160
  validatePredecessor(childGanttRecord: IGanttData, previousValue: IPredecessor[], validationOn: string): void;
161
+ /**
162
+ *
163
+ * @param {IGanttData} ganttRecord .
164
+ * @returns {void} .
165
+ */
166
+ private updateChildItems;
167
+ /**
168
+ * To get updated child records.
169
+ *
170
+ * @param {IGanttData} parentRecord .
171
+ * @param {IGanttData} childLists .
172
+ * @returns {void} .
173
+ */
174
+ private getUpdatableChildRecords;
175
+ /**
176
+ *
177
+ * @param {IGanttData} data .
178
+ * @param {Date} newStartDate .
179
+ * @returns {void} .
180
+ */
181
+ private calculateDateByRoundOffDuration;
159
182
  /**
160
183
  * Method to get validate able predecessor alone from record
161
184
  *
@@ -6,6 +6,7 @@ var Dependency = /** @class */ (function () {
6
6
  this.parentIds = [];
7
7
  this.parentPredecessors = [];
8
8
  this.validatedParentIds = [];
9
+ this.storeId = null;
9
10
  this.parent = gantt;
10
11
  this.dateValidateModule = this.parent.dateValidationModule;
11
12
  }
@@ -483,7 +484,7 @@ var Dependency = /** @class */ (function () {
483
484
  }
484
485
  if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
485
486
  && this.parent.allowParentDependency) {
486
- this.parent.editModule['updateChildItems'](flatData[count]);
487
+ this.updateChildItems(flatData[count]);
487
488
  }
488
489
  }
489
490
  }
@@ -495,7 +496,7 @@ var Dependency = /** @class */ (function () {
495
496
  var item = this.parentPredecessors[i];
496
497
  this.validatePredecessorDates(item);
497
498
  if (item.ganttProperties.startDate) {
498
- this.parent.editModule['updateChildItems'](item);
499
+ this.updateChildItems(item);
499
500
  }
500
501
  }
501
502
  }
@@ -873,7 +874,15 @@ var Dependency = /** @class */ (function () {
873
874
  continue;
874
875
  }
875
876
  if (record) {
876
- this.validatePredecessor(record, undefined, 'successor');
877
+ if (this.parent.editModule.isFirstCall) {
878
+ this.storeId = JSON.parse(JSON.stringify(this.parent.ids));
879
+ this.parent.editModule.isFirstCall = false;
880
+ }
881
+ var index = (this.storeId && this.storeId.indexOf(record[this.parent.taskFields.id].toString()) !== -1) ? this.storeId.indexOf(record[this.parent.taskFields.id].toString()) : -1;
882
+ if (index !== -1) {
883
+ this.storeId = this.storeId.slice(0, index).concat(this.storeId.slice(index + 1));
884
+ this.validatePredecessor(record, undefined, 'successor');
885
+ }
877
886
  }
878
887
  }
879
888
  if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
@@ -888,13 +897,13 @@ var Dependency = /** @class */ (function () {
888
897
  if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
889
898
  if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
890
899
  if (!ganttProp.hasChildRecords && record.hasChildRecords) {
891
- this.parent.editModule['updateChildItems'](record);
900
+ this.updateChildItems(record);
892
901
  this.isValidatedParentTaskID = record.ganttProperties.taskId;
893
902
  }
894
903
  }
895
904
  else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
896
905
  (record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
897
- this.parent.editModule['updateChildItems'](record);
906
+ this.updateChildItems(record);
898
907
  this.isValidatedParentTaskID = record.ganttProperties.taskId;
899
908
  }
900
909
  if (!ganttProp.hasChildRecords) {
@@ -902,10 +911,127 @@ var Dependency = /** @class */ (function () {
902
911
  }
903
912
  }
904
913
  else if (record && record.hasChildRecords && !ganttProp) {
905
- this.parent.editModule['updateChildItems'](record);
914
+ this.updateChildItems(record);
915
+ }
916
+ }
917
+ }
918
+ };
919
+ /**
920
+ *
921
+ * @param {IGanttData} ganttRecord .
922
+ * @returns {void} .
923
+ */
924
+ Dependency.prototype.updateChildItems = function (ganttRecord) {
925
+ var previousData = this.parent.previousRecords[ganttRecord.uniqueID];
926
+ var previousStartDate;
927
+ if (isNullOrUndefined(previousData) ||
928
+ (isNullOrUndefined(previousData) && !isNullOrUndefined(previousData.ganttProperties))) {
929
+ previousStartDate = new Date(ganttRecord.ganttProperties.startDate.getTime());
930
+ }
931
+ else {
932
+ if (!isNullOrUndefined(previousData.ganttProperties.startDate)) {
933
+ previousStartDate = new Date(previousData.ganttProperties.startDate.getTime());
934
+ }
935
+ }
936
+ var currentStartDate = ganttRecord.ganttProperties.startDate;
937
+ var childRecords = [];
938
+ var validStartDate;
939
+ var validEndDate;
940
+ var calcEndDate;
941
+ var isRightMove;
942
+ var durationDiff;
943
+ this.getUpdatableChildRecords(ganttRecord, childRecords);
944
+ if (childRecords.length === 0) {
945
+ return;
946
+ }
947
+ if (!isNullOrUndefined(previousStartDate) && !isNullOrUndefined(currentStartDate) && previousStartDate.getTime() > currentStartDate.getTime()) {
948
+ validStartDate = this.parent.dateValidationModule.checkStartDate(currentStartDate);
949
+ validEndDate = this.parent.dateValidationModule.checkEndDate(previousStartDate, ganttRecord.ganttProperties);
950
+ isRightMove = false;
951
+ }
952
+ else {
953
+ validStartDate = this.parent.dateValidationModule.checkStartDate(previousStartDate);
954
+ validEndDate = this.parent.dateValidationModule.checkEndDate(currentStartDate, ganttRecord.ganttProperties);
955
+ isRightMove = true;
956
+ }
957
+ //Get Duration
958
+ if (!isNullOrUndefined(validStartDate) && !isNullOrUndefined(validEndDate) && validStartDate.getTime() >= validEndDate.getTime()) {
959
+ durationDiff = 0;
960
+ }
961
+ else {
962
+ durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
963
+ }
964
+ for (var i = 0; i < childRecords.length; i++) {
965
+ if (childRecords[i].ganttProperties.isAutoSchedule) {
966
+ if (durationDiff > 0) {
967
+ var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
968
+ childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
969
+ childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.endDate ?
970
+ childRecords[i].ganttProperties.endDate : new Date(previousStartDate.toString());
971
+ if (isRightMove) {
972
+ calcEndDate = this.parent.dateValidationModule.getEndDate(this.parent.dateValidationModule.checkStartDate(startDate, childRecords[i].ganttProperties, childRecords[i].ganttProperties.isMilestone), durationDiff, 'minute', childRecords[i].ganttProperties, false);
973
+ }
974
+ else {
975
+ calcEndDate = this.parent.dateValidationModule.getStartDate(this.parent.dateValidationModule.checkEndDate(startDate, childRecords[i].ganttProperties), durationDiff, 'minute', childRecords[i].ganttProperties);
976
+ }
977
+ this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
978
+ if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
979
+ this.validatedChildItems.push(childRecords[i]);
980
+ }
906
981
  }
982
+ else if (isNullOrUndefined(previousData)) {
983
+ calcEndDate = previousStartDate;
984
+ this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
985
+ if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
986
+ this.validatedChildItems.push(childRecords[i]);
987
+ }
988
+ }
989
+ }
990
+ }
991
+ if (childRecords.length) {
992
+ this.parent.dataOperation.updateParentItems(ganttRecord, true);
993
+ }
994
+ };
995
+ /**
996
+ * To get updated child records.
997
+ *
998
+ * @param {IGanttData} parentRecord .
999
+ * @param {IGanttData} childLists .
1000
+ * @returns {void} .
1001
+ */
1002
+ Dependency.prototype.getUpdatableChildRecords = function (parentRecord, childLists) {
1003
+ var childRecords = parentRecord.childRecords;
1004
+ for (var i = 0; i < childRecords.length; i++) {
1005
+ if (childRecords[i].ganttProperties.isAutoSchedule) {
1006
+ childLists.push(childRecords[i]);
1007
+ if (childRecords[i].hasChildRecords) {
1008
+ this.getUpdatableChildRecords(childRecords[i], childLists);
1009
+ }
1010
+ }
1011
+ }
1012
+ };
1013
+ /**
1014
+ *
1015
+ * @param {IGanttData} data .
1016
+ * @param {Date} newStartDate .
1017
+ * @returns {void} .
1018
+ */
1019
+ Dependency.prototype.calculateDateByRoundOffDuration = function (data, newStartDate) {
1020
+ var ganttRecord = data;
1021
+ var taskData = ganttRecord.ganttProperties;
1022
+ var projectStartDate = new Date(newStartDate.getTime());
1023
+ if (!isNullOrUndefined(taskData.endDate) && isNullOrUndefined(taskData.startDate)) {
1024
+ var endDate = this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, null);
1025
+ this.parent.setRecordValue('endDate', this.parent.dateValidationModule.checkEndDate(endDate, ganttRecord.ganttProperties), taskData, true);
1026
+ }
1027
+ else {
1028
+ this.parent.setRecordValue('startDate', this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, false), taskData, true);
1029
+ if (!isNullOrUndefined(taskData.duration)) {
1030
+ this.parent.dateValidationModule.calculateEndDate(ganttRecord);
907
1031
  }
908
1032
  }
1033
+ this.parent.dataOperation.updateWidthLeft(data);
1034
+ this.parent.dataOperation.updateTaskData(ganttRecord);
909
1035
  };
910
1036
  /**
911
1037
  * Method to get validate able predecessor alone from record
@@ -12,11 +12,11 @@ import { Dialog } from '@syncfusion/ej2-popups';
12
12
  */
13
13
  export declare class Edit {
14
14
  private parent;
15
- validatedChildItems: IGanttData[];
16
15
  private isFromDeleteMethod;
17
16
  private targetedRecords;
18
17
  private isNewRecordAdded;
19
18
  private isValidatedEditedRecord;
19
+ isFirstCall: boolean;
20
20
  /**
21
21
  * @private
22
22
  */
@@ -204,13 +204,6 @@ export declare class Edit {
204
204
  * @private
205
205
  */
206
206
  updateTaskScheduleModes(data: IGanttData): void;
207
- /**
208
- *
209
- * @param {IGanttData} data .
210
- * @param {Date} newStartDate .
211
- * @returns {void} .
212
- */
213
- private calculateDateByRoundOffDuration;
214
207
  /**
215
208
  * To update progress value of parent tasks
216
209
  *
@@ -250,20 +243,6 @@ export declare class Edit {
250
243
  * @private
251
244
  */
252
245
  private updateScheduleDatesOnEditing;
253
- /**
254
- *
255
- * @param {IGanttData} ganttRecord .
256
- * @returns {void} .
257
- */
258
- private updateChildItems;
259
- /**
260
- * To get updated child records.
261
- *
262
- * @param {IGanttData} parentRecord .
263
- * @param {IGanttData} childLists .
264
- * @returns {void} .
265
- */
266
- private getUpdatableChildRecords;
267
246
  /**
268
247
  * @param {ITaskbarEditedEventArgs} args .
269
248
  * @returns {void} .
@@ -43,7 +43,7 @@ var Edit = /** @class */ (function () {
43
43
  */
44
44
  this.deletedTaskDetails = [];
45
45
  this.parent = parent;
46
- this.validatedChildItems = [];
46
+ this.parent.predecessorModule.validatedChildItems = [];
47
47
  if (this.parent.editSettings.allowEditing && this.parent.editSettings.mode === 'Auto') {
48
48
  this.cellEditModule = new CellEdit(this.parent);
49
49
  }
@@ -880,8 +880,8 @@ var Edit = /** @class */ (function () {
880
880
  }
881
881
  if (this.parent.isConnectorLineUpdate && this.parent.autoCalculateDateScheduling) {
882
882
  /* validating predecessor for updated child items */
883
- for (var i = 0; i < this.validatedChildItems.length; i++) {
884
- var child = this.validatedChildItems[i];
883
+ for (var i = 0; i < this.parent.predecessorModule.validatedChildItems.length; i++) {
884
+ var child = this.parent.predecessorModule.validatedChildItems[i];
885
885
  if (child.ganttProperties.predecessor && child.ganttProperties.predecessor.length > 0) {
886
886
  this.parent.editedTaskBarItem = child;
887
887
  this.parent.predecessorModule.validatePredecessor(child, [], '');
@@ -895,6 +895,7 @@ var Edit = /** @class */ (function () {
895
895
  this.parent.editedTaskBarItem = ganttRecord;
896
896
  }
897
897
  if (!this.isValidatedEditedRecord) {
898
+ this.isFirstCall = true;
898
899
  this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
899
900
  }
900
901
  this.isValidatedEditedRecord = false;
@@ -902,7 +903,7 @@ var Edit = /** @class */ (function () {
902
903
  }
903
904
  if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
904
905
  (args.action === "DrawConnectorLine")) {
905
- this.updateChildItems(ganttRecord);
906
+ this.parent.predecessorModule['updateChildItems'](ganttRecord);
906
907
  }
907
908
  this.updateParentItemOnEditing();
908
909
  this.parent.dataOperation.updateParentItems(ganttRecord, true);
@@ -915,6 +916,7 @@ var Edit = /** @class */ (function () {
915
916
  var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
916
917
  if (!isNullOrUndefined(parentData)) {
917
918
  if (!parentData.ganttProperties.predecessorsName) {
919
+ this.isFirstCall = true;
918
920
  this.parent.predecessorModule.validatePredecessor(parentData, [], '');
919
921
  this.updateParentItemOnEditing();
920
922
  this.parent.ganttChartModule.reRenderConnectorLines();
@@ -945,7 +947,7 @@ var Edit = /** @class */ (function () {
945
947
  Edit.prototype.updateParentChildRecord = function (data) {
946
948
  var ganttRecord = data;
947
949
  if (ganttRecord.hasChildRecords && this.taskbarMoved && (ganttRecord[this.parent.taskFields.manual] === false || this.parent.taskMode === 'Auto') && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
948
- this.updateChildItems(ganttRecord);
950
+ this.parent.predecessorModule['updateChildItems'](ganttRecord);
949
951
  }
950
952
  if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
951
953
  this.parent.editModule.cellEditModule.isResourceCellEdited = false;
@@ -990,29 +992,6 @@ var Edit = /** @class */ (function () {
990
992
  this.parent.dataOperation.updateWidthLeft(data);
991
993
  }
992
994
  };
993
- /**
994
- *
995
- * @param {IGanttData} data .
996
- * @param {Date} newStartDate .
997
- * @returns {void} .
998
- */
999
- Edit.prototype.calculateDateByRoundOffDuration = function (data, newStartDate) {
1000
- var ganttRecord = data;
1001
- var taskData = ganttRecord.ganttProperties;
1002
- var projectStartDate = new Date(newStartDate.getTime());
1003
- if (!isNullOrUndefined(taskData.endDate) && isNullOrUndefined(taskData.startDate)) {
1004
- var endDate = this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, null);
1005
- this.parent.setRecordValue('endDate', this.parent.dateValidationModule.checkEndDate(endDate, ganttRecord.ganttProperties), taskData, true);
1006
- }
1007
- else {
1008
- this.parent.setRecordValue('startDate', this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, false), taskData, true);
1009
- if (!isNullOrUndefined(taskData.duration)) {
1010
- this.parent.dateValidationModule.calculateEndDate(ganttRecord);
1011
- }
1012
- }
1013
- this.parent.dataOperation.updateWidthLeft(data);
1014
- this.parent.dataOperation.updateTaskData(ganttRecord);
1015
- };
1016
995
  /**
1017
996
  * To update progress value of parent tasks
1018
997
  *
@@ -1122,106 +1101,6 @@ var Edit = /** @class */ (function () {
1122
1101
  Edit.prototype.updateScheduleDatesOnEditing = function (args) {
1123
1102
  //..
1124
1103
  };
1125
- /**
1126
- *
1127
- * @param {IGanttData} ganttRecord .
1128
- * @returns {void} .
1129
- */
1130
- Edit.prototype.updateChildItems = function (ganttRecord) {
1131
- var previousData = this.parent.previousRecords[ganttRecord.uniqueID];
1132
- var previousStartDate;
1133
- if (isNullOrUndefined(previousData) ||
1134
- (isNullOrUndefined(previousData) && !isNullOrUndefined(previousData.ganttProperties))) {
1135
- previousStartDate = new Date(ganttRecord.ganttProperties.startDate.getTime());
1136
- }
1137
- else {
1138
- if (!isNullOrUndefined(previousData.ganttProperties.startDate)) {
1139
- previousStartDate = new Date(previousData.ganttProperties.startDate.getTime());
1140
- }
1141
- }
1142
- var currentStartDate = ganttRecord.ganttProperties.startDate;
1143
- var childRecords = [];
1144
- var validStartDate;
1145
- var validEndDate;
1146
- var calcEndDate;
1147
- var isRightMove;
1148
- var durationDiff;
1149
- this.getUpdatableChildRecords(ganttRecord, childRecords);
1150
- if (childRecords.length === 0) {
1151
- return;
1152
- }
1153
- if (!isNullOrUndefined(previousStartDate) && !isNullOrUndefined(currentStartDate) && previousStartDate.getTime() > currentStartDate.getTime()) {
1154
- validStartDate = this.parent.dateValidationModule.checkStartDate(currentStartDate);
1155
- validEndDate = this.parent.dateValidationModule.checkEndDate(previousStartDate, ganttRecord.ganttProperties);
1156
- isRightMove = false;
1157
- }
1158
- else {
1159
- validStartDate = this.parent.dateValidationModule.checkStartDate(previousStartDate);
1160
- validEndDate = this.parent.dateValidationModule.checkEndDate(currentStartDate, ganttRecord.ganttProperties);
1161
- isRightMove = true;
1162
- }
1163
- //Get Duration
1164
- if (!isNullOrUndefined(validStartDate) && !isNullOrUndefined(validEndDate) && validStartDate.getTime() >= validEndDate.getTime()) {
1165
- durationDiff = 0;
1166
- }
1167
- else {
1168
- durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
1169
- }
1170
- for (var i = 0; i < childRecords.length; i++) {
1171
- if (childRecords[i].ganttProperties.isAutoSchedule) {
1172
- if (durationDiff > 0) {
1173
- var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
1174
- childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
1175
- childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.endDate ?
1176
- childRecords[i].ganttProperties.endDate : new Date(previousStartDate.toString());
1177
- if (isRightMove) {
1178
- calcEndDate = this.parent.dateValidationModule.getEndDate(this.parent.dateValidationModule.checkStartDate(startDate, childRecords[i].ganttProperties, childRecords[i].ganttProperties.isMilestone), durationDiff, 'minute', childRecords[i].ganttProperties, false);
1179
- }
1180
- else {
1181
- calcEndDate = this.parent.dateValidationModule.getStartDate(this.parent.dateValidationModule.checkEndDate(startDate, childRecords[i].ganttProperties), durationDiff, 'minute', childRecords[i].ganttProperties);
1182
- }
1183
- this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
1184
- if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
1185
- this.validatedChildItems.push(childRecords[i]);
1186
- }
1187
- }
1188
- else if (isNullOrUndefined(previousData)) {
1189
- calcEndDate = previousStartDate;
1190
- var initialData = this.parent.initialLoadData[childRecords[i].index];
1191
- if (this.parent.isLoad) {
1192
- this.calculateDateByRoundOffDuration(initialData, calcEndDate);
1193
- }
1194
- else {
1195
- this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
1196
- }
1197
- if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
1198
- this.validatedChildItems.push(childRecords[i]);
1199
- }
1200
- }
1201
- }
1202
- }
1203
- if (childRecords.length) {
1204
- this.parent.dataOperation.updateParentItems(ganttRecord, true);
1205
- }
1206
- };
1207
- /**
1208
- * To get updated child records.
1209
- *
1210
- * @param {IGanttData} parentRecord .
1211
- * @param {IGanttData} childLists .
1212
- * @returns {void} .
1213
- */
1214
- Edit.prototype.getUpdatableChildRecords = function (parentRecord, childLists) {
1215
- var childRecords = parentRecord.childRecords;
1216
- for (var i = 0; i < childRecords.length; i++) {
1217
- if (childRecords[i].ganttProperties.isAutoSchedule) {
1218
- childLists.push(childRecords[i]);
1219
- if (childRecords[i].hasChildRecords) {
1220
- this.getUpdatableChildRecords(childRecords[i], childLists);
1221
- }
1222
- }
1223
- }
1224
- };
1225
1104
  /**
1226
1105
  * @param {ITaskbarEditedEventArgs} args .
1227
1106
  * @returns {void} .
@@ -1734,7 +1613,7 @@ var Edit = /** @class */ (function () {
1734
1613
  this.resetValidateArgs();
1735
1614
  this.parent.editedTaskBarItem = null;
1736
1615
  this.parent.isOnEdit = false;
1737
- this.validatedChildItems = [];
1616
+ this.parent.predecessorModule.validatedChildItems = [];
1738
1617
  this.parent.isConnectorLineUpdate = false;
1739
1618
  this.parent.editedTaskBarItem = null;
1740
1619
  this.taskbarMoved = false;
@@ -2580,7 +2459,7 @@ var Edit = /** @class */ (function () {
2580
2459
  var fromRecord = this.parent.getRecordByID(predecessorCollection[count].from);
2581
2460
  var toRecord = this.parent.getRecordByID(predecessorCollection[count].to);
2582
2461
  validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
2583
- if (!validPredecessor) {
2462
+ if (!validPredecessor || !this.parent.allowParentDependency) {
2584
2463
  if (predecessorCollection[count].to === parentRecordTaskData.rowUniqueID.toString()) {
2585
2464
  childRecord = this.parent.getRecordByID(predecessorCollection[count].from);
2586
2465
  predecessorIndex = getIndex(predecessorCollection[count], 'from', childRecord.ganttProperties.predecessor, 'to');
@@ -2606,7 +2485,7 @@ var Edit = /** @class */ (function () {
2606
2485
  }
2607
2486
  }
2608
2487
  }
2609
- if (!validPredecessor) {
2488
+ if (!validPredecessor || !this.parent.allowParentDependency) {
2610
2489
  this.parent.setRecordValue('predecessor', updatedPredecessor, parentRecord.ganttProperties, true);
2611
2490
  this.parent.setRecordValue('predecessorsName', '', parentRecord.ganttProperties, true);
2612
2491
  }
@@ -2848,14 +2727,15 @@ var Edit = /** @class */ (function () {
2848
2727
  }
2849
2728
  var _loop_3 = function (i) {
2850
2729
  var originalData = this_3.parent.modifiedRecords[i];
2851
- var treeIndex = this_3.parent.allowRowDragAndDrop ? 1 : 0;
2730
+ var treeIndex = this_3.parent.rowDragAndDropModule && this_3.parent.allowRowDragAndDrop ? 1 : 0;
2852
2731
  var uniqueTaskID = this_3.parent.taskFields.id;
2853
2732
  var originalIndex = this_3.parent.currentViewData.findIndex(function (data) {
2854
2733
  return (data[uniqueTaskID] === originalData[uniqueTaskID]);
2855
2734
  });
2856
2735
  if (this_3.parent.treeGrid.getRows()[originalIndex]) {
2736
+ var row = this_3.parent.treeGrid.grid.getRowObjectFromUID(this_3.parent.treeGrid.grid.getDataRows()[originalIndex].getAttribute('data-uid'));
2857
2737
  this_3.parent.treeGrid.renderModule.cellRender({
2858
- data: originalData, cell: this_3.parent.treeGrid.getRows()[originalIndex].cells[this_3.parent.treeColumnIndex + treeIndex],
2738
+ data: row.data, cell: this_3.parent.treeGrid.getRows()[originalIndex].cells[this_3.parent.treeColumnIndex + treeIndex],
2859
2739
  column: this_3.parent.treeGrid.grid.getColumns()[this_3.parent.treeColumnIndex],
2860
2740
  requestType: 'rowDragAndDrop'
2861
2741
  });
@@ -3641,6 +3521,7 @@ var Edit = /** @class */ (function () {
3641
3521
  for (var k = 0; k < this.updateParentRecords.length; k++) {
3642
3522
  this.parent.dataOperation.updateParentItems(this.updateParentRecords[k]);
3643
3523
  }
3524
+ this.isFirstCall = true;
3644
3525
  this.parent.editedRecords.forEach(function (record) {
3645
3526
  _this.parent.predecessorModule.validatePredecessor(record, [], '');
3646
3527
  });
@@ -93,7 +93,14 @@ var Selection = /** @class */ (function () {
93
93
  if (this.parent.enableTimelineVirtualization) {
94
94
  this.parent['isRowSelected'] = true;
95
95
  }
96
- this.parent.ganttChartModule.updateScrollLeft(getValue('data.ganttProperties.left', args));
96
+ if (args.data && !isNullOrUndefined(args.data['length'])) {
97
+ for (var i = 0; i < args.data['length']; i++) {
98
+ this.parent.ganttChartModule.updateScrollLeft(args.data[i].ganttProperties.left);
99
+ }
100
+ }
101
+ else {
102
+ this.parent.ganttChartModule.updateScrollLeft(getValue('data.ganttProperties.left', args));
103
+ }
97
104
  }
98
105
  args.target = this.actualTarget;
99
106
  if (!isNullOrUndefined(args.foreignKeyData) && Object.keys(args.foreignKeyData).length === 0) {
@@ -733,7 +733,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
733
733
  event.preventDefault();
734
734
  if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
735
735
  var currentElement = this.editElement.parentElement;
736
- currentElement.style.setProperty("position", "absolute");
736
+ if (this.parent.enableTimelineVirtualization && this.parent.timelineModule.wholeTimelineWidth > this.parent.element.offsetWidth * 3) {
737
+ currentElement.style.setProperty("position", "relative");
738
+ }
739
+ else {
740
+ currentElement.style.setProperty("position", "absolute");
741
+ }
737
742
  if ((this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'LeftResizing') && !isNullOrUndefined(this.currentIndex) && !isNullOrUndefined(this.currentIndex) ? Number(this.currentIndex) === 0 : false) {
738
743
  this.taskbarElement.childNodes[0].childNodes[0].style.setProperty("top", currentElement.parentElement.offsetTop + "px");
739
744
  if (this.parent.allowTaskbarDragAndDrop && this.taskBarEditAction !== 'LeftResizing' && this.taskBarEditAction !== 'RightResizing' && this.taskBarEditAction !== 'ProgressResizing') {
@@ -752,8 +757,14 @@ var TaskbarEdit = /** @class */ (function (_super) {
752
757
  }
753
758
  }
754
759
  if (this.taskBarEditAction !== 'ProgressResizing') {
755
- var rootElement = this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-rows-container");
756
- rootElement[0].appendChild(this.taskbarResizer);
760
+ if (this.parent.enableTimelineVirtualization && this.parent.timelineModule.wholeTimelineWidth > this.parent.element.offsetWidth * 3) {
761
+ var rootElement = this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-scroll-container");
762
+ rootElement[0].appendChild(this.taskbarResizer);
763
+ }
764
+ else {
765
+ var rootElement = this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-rows-container");
766
+ rootElement[0].appendChild(this.taskbarResizer);
767
+ }
757
768
  }
758
769
  }
759
770
  if (this.parent.allowTaskbarDragAndDrop && (this.taskBarEditAction === "ChildDrag" || this.taskBarEditAction === "ParentDrag" ||
@@ -1880,7 +1891,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
1880
1891
  currentElement.style.position = null;
1881
1892
  }
1882
1893
  else {
1883
- currentElement.style.setProperty("position", "absolute");
1894
+ if (this.parent.enableTimelineVirtualization && this.parent.timelineModule.wholeTimelineWidth > this.parent.element.offsetWidth * 3) {
1895
+ currentElement.style.setProperty("position", "relative");
1896
+ }
1897
+ else {
1898
+ currentElement.style.setProperty("position", "absolute");
1899
+ }
1884
1900
  }
1885
1901
  }
1886
1902
  var item = this.taskBarEditRecord.ganttProperties;