@syncfusion/ej2-gantt 19.4.47 → 19.4.53

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +181 -33
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +181 -33
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +18 -18
  13. package/src/gantt/actions/cell-edit.d.ts +1 -0
  14. package/src/gantt/actions/cell-edit.js +2 -0
  15. package/src/gantt/actions/dialog-edit.js +18 -2
  16. package/src/gantt/actions/edit.d.ts +2 -0
  17. package/src/gantt/actions/edit.js +97 -14
  18. package/src/gantt/actions/keyboard.js +1 -1
  19. package/src/gantt/base/tree-grid.js +4 -0
  20. package/src/gantt/renderer/chart-rows.js +28 -10
  21. package/src/gantt/renderer/timeline.d.ts +1 -0
  22. package/src/gantt/renderer/timeline.js +31 -6
  23. package/styles/bootstrap-dark.css +6 -3
  24. package/styles/bootstrap.css +6 -3
  25. package/styles/bootstrap4.css +6 -3
  26. package/styles/bootstrap5-dark.css +4 -1
  27. package/styles/bootstrap5.css +4 -1
  28. package/styles/fabric-dark.css +3 -0
  29. package/styles/fabric.css +3 -0
  30. package/styles/gantt/_bootstrap-dark-definition.scss +3 -3
  31. package/styles/gantt/_bootstrap-definition.scss +3 -3
  32. package/styles/gantt/_bootstrap4-definition.scss +3 -3
  33. package/styles/gantt/_bootstrap5-definition.scss +1 -1
  34. package/styles/gantt/_fluent-definition.scss +1 -1
  35. package/styles/gantt/_layout.scss +3 -0
  36. package/styles/gantt/_tailwind-definition.scss +3 -3
  37. package/styles/gantt/bootstrap-dark.css +6 -3
  38. package/styles/gantt/bootstrap.css +6 -3
  39. package/styles/gantt/bootstrap4.css +6 -3
  40. package/styles/gantt/bootstrap5-dark.css +4 -1
  41. package/styles/gantt/bootstrap5.css +4 -1
  42. package/styles/gantt/fabric-dark.css +3 -0
  43. package/styles/gantt/fabric.css +3 -0
  44. package/styles/gantt/highcontrast-light.css +3 -0
  45. package/styles/gantt/highcontrast.css +3 -0
  46. package/styles/gantt/material-dark.css +3 -0
  47. package/styles/gantt/material.css +3 -0
  48. package/styles/gantt/tailwind-dark.css +6 -3
  49. package/styles/gantt/tailwind.css +6 -3
  50. package/styles/highcontrast-light.css +3 -0
  51. package/styles/highcontrast.css +3 -0
  52. package/styles/material-dark.css +3 -0
  53. package/styles/material.css +3 -0
  54. package/styles/tailwind-dark.css +6 -3
  55. package/styles/tailwind.css +6 -3
@@ -6041,6 +6041,7 @@ class Timeline {
6041
6041
  * @private
6042
6042
  */
6043
6043
  createTimelineTemplate(tier) {
6044
+ var isFirstCell = false;
6044
6045
  const parent = this.parent;
6045
6046
  let parentTh = '';
6046
6047
  let parentTr = '';
@@ -6057,10 +6058,19 @@ class Timeline {
6057
6058
  // PDf export collection
6058
6059
  const timelineCell = {};
6059
6060
  timelineCell.startDate = new Date(startDate.getTime());
6060
- parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell);
6061
+ if (mode === 'Month' && tier === 'bottomTier' && ((this.parent.currentZoomingLevel.level === 5) || (this.parent.currentZoomingLevel.level === 6)) && scheduleDateCollection.length === 0) {
6062
+ isFirstCell = true;
6063
+ }
6064
+ parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell, isFirstCell);
6061
6065
  scheduleDateCollection.push(new Date(startDate.toString()));
6062
- increment = this.getIncrement(startDate, count, mode);
6063
- newTime = startDate.getTime() + increment;
6066
+ if (isFirstCell) {
6067
+ newTime = this.calculateQuarterEndDate(startDate).getTime();
6068
+ }
6069
+ else {
6070
+ increment = this.getIncrement(startDate, count, mode);
6071
+ newTime = startDate.getTime() + increment;
6072
+ }
6073
+ isFirstCell = false;
6064
6074
  startDate.setTime(newTime);
6065
6075
  if (startDate >= endDate) {
6066
6076
  /* eslint-disable-next-line */
@@ -6170,6 +6180,21 @@ class Timeline {
6170
6180
  mode === 'Hour' || mode === 'Minutes') &&
6171
6181
  this.parent.nonWorkingDayIndex.indexOf(day.getDay()) !== -1;
6172
6182
  }
6183
+ calculateQuarterEndDate(date) {
6184
+ const month = date.getMonth();
6185
+ if (month >= 0 && month <= 2) {
6186
+ return new Date(date.getFullYear(), 3, 1);
6187
+ }
6188
+ else if (month >= 3 && month <= 5) {
6189
+ return new Date(date.getFullYear(), 6, 1);
6190
+ }
6191
+ else if (month >= 6 && month <= 8) {
6192
+ return new Date(date.getFullYear(), 9, 1);
6193
+ }
6194
+ else {
6195
+ return new Date(date.getFullYear() + 1, 0, 1);
6196
+ }
6197
+ }
6173
6198
  /**
6174
6199
  * To construct template string.
6175
6200
  *
@@ -6183,7 +6208,7 @@ class Timeline {
6183
6208
  * @private
6184
6209
  */
6185
6210
  /* eslint-disable-next-line */
6186
- getHeaterTemplateString(scheduleWeeks, mode, tier, isLast, count, timelineCell) {
6211
+ getHeaterTemplateString(scheduleWeeks, mode, tier, isLast, count, timelineCell, isFirstCell) {
6187
6212
  let parentTr = '';
6188
6213
  let td = '';
6189
6214
  const format = tier === 'topTier' ?
@@ -6198,7 +6223,7 @@ class Timeline {
6198
6223
  this.customFormat(scheduleWeeks, format, tier, mode, formatter);
6199
6224
  thWidth = (this.getIncrement(scheduleWeeks, count, mode) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth;
6200
6225
  const cellWidth = thWidth;
6201
- thWidth = isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate)
6226
+ thWidth = isLast || isFirstCell ? isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate) : this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.calculateQuarterEndDate(scheduleWeeks))
6202
6227
  : thWidth;
6203
6228
  const isWeekendCell = this.isWeekendHeaderCell(mode, tier, scheduleWeeks);
6204
6229
  const textClassName = tier === 'topTier' ? ' e-gantt-top-cell-text' : '';
@@ -6494,7 +6519,7 @@ class Timeline {
6494
6519
  const validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
6495
6520
  const validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
6496
6521
  let isChanged;
6497
- if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft <= this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
6522
+ if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
6498
6523
  isChanged = 'prevTimeSpan';
6499
6524
  minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
6500
6525
  }
@@ -6866,6 +6891,10 @@ class GanttTreeGrid {
6866
6891
  }
6867
6892
  actionBegin(args) {
6868
6893
  this.parent.notify('actionBegin', args);
6894
+ let flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
6895
+ if (flag !== null) {
6896
+ setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
6897
+ }
6869
6898
  this.parent.trigger('actionBegin', args);
6870
6899
  } // eslint-disable-next-line
6871
6900
  created(args) {
@@ -7951,11 +7980,20 @@ class ChartRows extends DateProcessor {
7951
7980
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
7952
7981
  }
7953
7982
  if (labelString !== 'null') {
7954
- taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
7955
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : '') +
7956
- 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : '') +
7957
- 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
7958
- this.taskBarHeight + 'px;">' + labelString + '</span>';
7983
+ if (isNaN(parseInt(labelString))) {
7984
+ taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
7985
+ (this.taskBarHeight - 1) + 'px; text-align: left;' +
7986
+ 'display:' + 'inline-block;' +
7987
+ 'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
7988
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
7989
+ }
7990
+ else {
7991
+ taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
7992
+ (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : ';') +
7993
+ 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') +
7994
+ 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
7995
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
7996
+ }
7959
7997
  }
7960
7998
  const template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
7961
7999
  this.splitTaskbar(data, labelString) : (data.ganttProperties.startDate && data.ganttProperties.endDate
@@ -8554,11 +8592,20 @@ class ChartRows extends DateProcessor {
8554
8592
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
8555
8593
  }
8556
8594
  if (labelString !== 'null') {
8557
- labelDiv = this.createDivElement('<span class="' +
8558
- taskLabel + '" style="line-height:' +
8559
- (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : '') + 'width:' +
8560
- (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8561
- this.taskBarHeight + 'px;">' + labelString + '</span>');
8595
+ if (isNaN(parseInt(labelString))) {
8596
+ labelDiv = this.createDivElement('<span class="' + taskLabel + '" style="line-height:' +
8597
+ (this.taskBarHeight - 1) + 'px; text-align: left;' +
8598
+ 'display:' + 'inline-block;' +
8599
+ 'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
8600
+ this.taskBarHeight + 'px;">' + labelString + '</span>');
8601
+ }
8602
+ else {
8603
+ labelDiv = this.createDivElement('<span class="' +
8604
+ taskLabel + '" style="line-height:' +
8605
+ (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') + 'width:' +
8606
+ (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : ';') + 'px; height:' +
8607
+ this.taskBarHeight + 'px;">' + labelString + '</span>');
8608
+ }
8562
8609
  progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
8563
8610
  }
8564
8611
  const milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
@@ -11861,7 +11908,7 @@ class FocusModule {
11861
11908
  {
11862
11909
  if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
11863
11910
  e.preventDefault();
11864
- ganttObj.addRecord();
11911
+ ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition);
11865
11912
  const focussedElement = ganttObj.element;
11866
11913
  focussedElement.focus();
11867
11914
  }
@@ -15205,6 +15252,7 @@ class CellEdit {
15205
15252
  * @private
15206
15253
  */
15207
15254
  this.isCellEdit = false;
15255
+ this.isResourceCellEdited = false;
15208
15256
  this.parent = ganttObj;
15209
15257
  this.bindTreeGridProperties();
15210
15258
  }
@@ -15633,6 +15681,7 @@ class CellEdit {
15633
15681
  const resourceSettings = this.parent.resourceFields;
15634
15682
  const editedResourceId = editedObj[this.parent.taskFields.resourceInfo];
15635
15683
  if (editedResourceId) {
15684
+ this.isResourceCellEdited = true;
15636
15685
  const tempResourceInfo = this.parent.dataOperation.setResourceInfo(editedObj);
15637
15686
  const editedResouceLength = tempResourceInfo.length;
15638
15687
  const previousResource = previousData.ganttProperties.resourceInfo;
@@ -18906,7 +18955,15 @@ class DialogEdit {
18906
18955
  field: fields[i], headerText: this.localeObj.getConstant(fields[i]), editType: 'stringedit', width: '200px',
18907
18956
  edit: {
18908
18957
  write: (args) => {
18909
- const datePickerModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18958
+ let datePickerModel;
18959
+ if (!isNullOrUndefined(this.beforeOpenArgs[generalTabString])) {
18960
+ datePickerModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18961
+ }
18962
+ else {
18963
+ let columnFields = this.getGeneralColumnFields();
18964
+ let columnModel = this.getFieldsModel(columnFields);
18965
+ datePickerModel = columnModel[this.parent.taskFields[fields[i]]];
18966
+ }
18910
18967
  const value = args.rowData[args.column.field];
18911
18968
  setValue('value', value, datePickerModel);
18912
18969
  const datePicker = new this.inputs[this.parent.columnByField[this.parent.taskFields[fields[i]]].editType](datePickerModel);
@@ -18929,7 +18986,15 @@ class DialogEdit {
18929
18986
  field: fields[i], headerText: this.localeObj.getConstant(fields[i]), editType: 'stringedit', width: '100px',
18930
18987
  edit: {
18931
18988
  write: (args) => {
18932
- const inputTextModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18989
+ let inputTextModel;
18990
+ if (!isNullOrUndefined(this.beforeOpenArgs[generalTabString])) {
18991
+ inputTextModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18992
+ }
18993
+ else {
18994
+ let columnFields = this.getGeneralColumnFields();
18995
+ let columnModel = this.getFieldsModel(columnFields);
18996
+ inputTextModel = columnModel[this.parent.taskFields[fields[i]]];
18997
+ }
18933
18998
  inputTextModel.floatLabelType = 'Never';
18934
18999
  const value = args.rowData[args.column.field];
18935
19000
  if (!isNullOrUndefined(value)) {
@@ -21588,9 +21653,12 @@ class Edit$2 {
21588
21653
  */
21589
21654
  updateParentChildRecord(data) {
21590
21655
  const ganttRecord = data;
21591
- if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && this.parent.previousRecords[data.uniqueID].resources === ganttRecord.ganttProperties['resourceNames']) {
21656
+ if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
21592
21657
  this.updateChildItems(ganttRecord);
21593
21658
  }
21659
+ if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
21660
+ this.parent.editModule.cellEditModule.isResourceCellEdited = false;
21661
+ }
21594
21662
  }
21595
21663
  /**
21596
21664
  * To update records while changing schedule mode.
@@ -23040,7 +23108,7 @@ class Edit$2 {
23040
23108
  /*Record Updates*/
23041
23109
  recordIndex = flatRecords.indexOf(this.addRowSelectedItem);
23042
23110
  updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem);
23043
- this.recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem);
23111
+ this.recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
23044
23112
  break;
23045
23113
  case 'Below':
23046
23114
  currentItemIndex = flatRecords.indexOf(this.addRowSelectedItem);
@@ -23054,7 +23122,7 @@ class Edit$2 {
23054
23122
  recordIndex = currentItemIndex + 1;
23055
23123
  updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) + 1;
23056
23124
  }
23057
- this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem);
23125
+ this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
23058
23126
  break;
23059
23127
  case 'Child':
23060
23128
  currentItemIndex = flatRecords.indexOf(this.addRowSelectedItem);
@@ -23082,7 +23150,7 @@ class Edit$2 {
23082
23150
  this.addRowSelectedItem.ganttProperties.segments = null;
23083
23151
  }
23084
23152
  }
23085
- this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem);
23153
+ this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
23086
23154
  break;
23087
23155
  }
23088
23156
  this.newlyAddedRecordBackup = record;
@@ -23096,7 +23164,7 @@ class Edit$2 {
23096
23164
  * @returns {void} .
23097
23165
  * @private
23098
23166
  */
23099
- recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem) {
23167
+ recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition) {
23100
23168
  const flatRecords = this.parent.flatData;
23101
23169
  const currentViewData = this.parent.currentViewData;
23102
23170
  const ids = this.parent.ids;
@@ -23118,7 +23186,15 @@ class Edit$2 {
23118
23186
  !isNullOrUndefined(this.parent.dataSource)) {
23119
23187
  const child = this.parent.taskFields.child;
23120
23188
  if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
23121
- parentItem.taskData[child].push(record.taskData);
23189
+ if (rowPosition === 'Above') {
23190
+ parentItem.taskData[child].splice(childIndex, 0, record.taskData);
23191
+ }
23192
+ else if (rowPosition === 'Below') {
23193
+ parentItem.taskData[child].splice(childIndex + 1, 0, record.taskData);
23194
+ }
23195
+ else {
23196
+ parentItem.taskData[child].push(record.taskData);
23197
+ }
23122
23198
  }
23123
23199
  else {
23124
23200
  parentItem.taskData[child] = [];
@@ -23203,13 +23279,13 @@ class Edit$2 {
23203
23279
  }
23204
23280
  for (let i = 0; i < addedRecord.length; i++) {
23205
23281
  if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
23206
- rowPosition = 'Top';
23282
+ rowPosition = rowPosition === 'Bottom' ? 'Bottom' : 'Top';
23207
23283
  }
23208
23284
  if (rowPosition === 'Top') {
23209
23285
  dataSource.splice(0, 0, addedRecord[i].taskData);
23210
23286
  }
23211
23287
  else if (rowPosition === 'Bottom') {
23212
- dataSource.push(addedRecord[i]);
23288
+ dataSource.push(addedRecord[i].taskData);
23213
23289
  }
23214
23290
  else {
23215
23291
  if (!isNullOrUndefined(taskFields.id) && !isNullOrUndefined(taskFields.parentID)) {
@@ -23361,7 +23437,7 @@ class Edit$2 {
23361
23437
  else {
23362
23438
  if (this.parent.viewType === 'ProjectView') {
23363
23439
  if ((rowPosition === 'Top' || rowPosition === 'Bottom') ||
23364
- ((rowPosition === 'Above' || rowPosition === 'Below') && !args.data.parentItem)) {
23440
+ ((rowPosition === 'Above' || rowPosition === 'Below' || rowPosition === 'Child') && !args.data.parentItem)) {
23365
23441
  if (args.data instanceof Array) {
23366
23442
  this.updateRealDataSource(args.data, rowPosition);
23367
23443
  }
@@ -23404,6 +23480,59 @@ class Edit$2 {
23404
23480
  * @returns {void} .
23405
23481
  * @private
23406
23482
  */
23483
+ createNewRecord() {
23484
+ const tempRecord = {};
23485
+ const ganttColumns = this.parent.ganttColumns;
23486
+ const taskSettingsFields = this.parent.taskFields;
23487
+ const taskId = this.parent.editModule.getNewTaskId();
23488
+ for (let i = 0; i < ganttColumns.length; i++) {
23489
+ const fieldName = ganttColumns[i].field;
23490
+ if (fieldName === taskSettingsFields.id) {
23491
+ tempRecord[fieldName] = taskId;
23492
+ }
23493
+ else if (ganttColumns[i].field === taskSettingsFields.startDate) {
23494
+ if (isNullOrUndefined(tempRecord[taskSettingsFields.endDate])) {
23495
+ tempRecord[fieldName] = this.parent.editModule.dialogModule.getMinimumStartDate();
23496
+ }
23497
+ else {
23498
+ tempRecord[fieldName] = new Date(tempRecord[taskSettingsFields.endDate]);
23499
+ }
23500
+ if (this.parent.timezone) {
23501
+ tempRecord[fieldName] = this.parent.dateValidationModule.remove(tempRecord[fieldName], this.parent.timezone);
23502
+ }
23503
+ }
23504
+ else if (ganttColumns[i].field === taskSettingsFields.endDate) {
23505
+ if (isNullOrUndefined(tempRecord[taskSettingsFields.startDate])) {
23506
+ tempRecord[fieldName] = this.parent.editModule.dialogModule.getMinimumStartDate();
23507
+ }
23508
+ else {
23509
+ tempRecord[fieldName] = new Date(tempRecord[taskSettingsFields.startDate]);
23510
+ }
23511
+ if (this.parent.timezone) {
23512
+ tempRecord[fieldName] = this.parent.dateValidationModule.remove(tempRecord[fieldName], this.parent.timezone);
23513
+ }
23514
+ }
23515
+ else if (ganttColumns[i].field === taskSettingsFields.duration) {
23516
+ tempRecord[fieldName] = 1;
23517
+ }
23518
+ else if (ganttColumns[i].field === taskSettingsFields.name) {
23519
+ tempRecord[fieldName] = this.parent.editModule.dialogModule['localeObj'].getConstant('addDialogTitle') + ' ' + taskId;
23520
+ }
23521
+ else if (ganttColumns[i].field === taskSettingsFields.progress) {
23522
+ tempRecord[fieldName] = 0;
23523
+ }
23524
+ else if (ganttColumns[i].field === taskSettingsFields.work) {
23525
+ tempRecord[fieldName] = 0;
23526
+ }
23527
+ else if (ganttColumns[i].field === 'taskType') {
23528
+ tempRecord[fieldName] = this.parent.taskType;
23529
+ }
23530
+ else {
23531
+ tempRecord[this.parent.ganttColumns[i].field] = '';
23532
+ }
23533
+ }
23534
+ return tempRecord;
23535
+ }
23407
23536
  validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord) {
23408
23537
  const selectedRowIndex = isNullOrUndefined(rowIndex) || isNaN(parseInt(rowIndex.toString(), 10)) ?
23409
23538
  this.parent.selectionModule ?
@@ -23415,7 +23544,7 @@ class Edit$2 {
23415
23544
  this.parent.selectionModule.getSelectedRowCellIndexes()[0].rowIndex : null : null : rowIndex;
23416
23545
  this.addRowSelectedItem = isNullOrUndefined(selectedRowIndex) ? null : this.parent.updatedRecords[selectedRowIndex];
23417
23546
  rowPosition = isNullOrUndefined(rowPosition) ? this.parent.editSettings.newRowPosition : rowPosition;
23418
- data = isNullOrUndefined(data) ? this.parent.editModule.dialogModule.composeAddRecord() : data;
23547
+ data = isNullOrUndefined(data) ? this.createNewRecord() : data;
23419
23548
  if (((isNullOrUndefined(selectedRowIndex) || selectedRowIndex < 0 ||
23420
23549
  isNullOrUndefined(this.addRowSelectedItem)) && (rowPosition === 'Above'
23421
23550
  || rowPosition === 'Below'
@@ -23507,10 +23636,6 @@ class Edit$2 {
23507
23636
  }
23508
23637
  this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
23509
23638
  }
23510
- let flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
23511
- if (flag !== null) {
23512
- setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
23513
- }
23514
23639
  this.addSuccess(args);
23515
23640
  args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
23516
23641
  this.parent.trigger('actionComplete', args);
@@ -23912,6 +24037,25 @@ class Edit$2 {
23912
24037
  const delRow = this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);
23913
24038
  this.removeRecords(delRow);
23914
24039
  }
24040
+ updateIndentedChildRecords(indentedRecord) {
24041
+ let createParentItem = {
24042
+ uniqueID: indentedRecord.uniqueID,
24043
+ expanded: indentedRecord.expanded,
24044
+ level: indentedRecord.level,
24045
+ index: indentedRecord.index,
24046
+ taskId: indentedRecord.ganttProperties.rowUniqueID
24047
+ };
24048
+ for (let i = 0; i < indentedRecord.childRecords.length; i++) {
24049
+ this.parent.setRecordValue('parentItem', createParentItem, indentedRecord.childRecords[i]);
24050
+ this.parent.setRecordValue('parentUniqueID', indentedRecord.uniqueID, indentedRecord.childRecords[i]);
24051
+ }
24052
+ if (indentedRecord.hasChildRecords) {
24053
+ indentedRecord = indentedRecord.childRecords;
24054
+ for (let j = 0; j < indentedRecord['length']; j++) {
24055
+ this.updateIndentedChildRecords(indentedRecord[j]);
24056
+ }
24057
+ }
24058
+ }
23915
24059
  dropMiddle(recordIndex1) {
23916
24060
  const obj = this.parent;
23917
24061
  const childRec = this.parent.editModule.getChildCount(this.droppedRecord, 0);
@@ -23927,6 +24071,10 @@ class Edit$2 {
23927
24071
  this.recordLevel();
23928
24072
  if (this.draggedRecord.hasChildRecords) {
23929
24073
  this.updateChildRecord(this.draggedRecord, childRecordsLength, this.droppedRecord.expanded);
24074
+ if (this.parent.enableImmutableMode) {
24075
+ let indentedRecord = this.draggedRecord;
24076
+ this.updateIndentedChildRecords(indentedRecord);
24077
+ }
23930
24078
  }
23931
24079
  if (isNullOrUndefined(this.draggedRecord.parentItem &&
23932
24080
  this.updateParentRecords.indexOf(this.draggedRecord.parentItem) !== -1)) {