@syncfusion/ej2-gantt 19.4.42 → 19.4.50

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 (67) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/ej2-gantt.umd.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-gantt.es2015.js +193 -33
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +193 -33
  7. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  8. package/dist/global/ej2-gantt.min.js +2 -2
  9. package/dist/global/ej2-gantt.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +18 -18
  12. package/src/gantt/actions/cell-edit.d.ts +1 -0
  13. package/src/gantt/actions/cell-edit.js +2 -0
  14. package/src/gantt/actions/chart-scroll.js +1 -0
  15. package/src/gantt/actions/dialog-edit.js +18 -2
  16. package/src/gantt/actions/edit.d.ts +3 -1
  17. package/src/gantt/actions/edit.js +101 -10
  18. package/src/gantt/actions/filter.js +1 -1
  19. package/src/gantt/actions/keyboard.js +1 -1
  20. package/src/gantt/actions/rowdragdrop.js +1 -1
  21. package/src/gantt/actions/taskbar-edit.js +3 -1
  22. package/src/gantt/base/gantt-chart.js +6 -0
  23. package/src/gantt/base/gantt.js +18 -5
  24. package/src/gantt/base/task-processor.js +9 -7
  25. package/src/gantt/renderer/edit-tooltip.js +1 -0
  26. package/src/gantt/renderer/timeline.d.ts +1 -0
  27. package/src/gantt/renderer/timeline.js +30 -5
  28. package/src/gantt/renderer/tooltip.js +1 -0
  29. package/styles/bootstrap-dark.css +12 -4
  30. package/styles/bootstrap.css +12 -4
  31. package/styles/bootstrap4.css +12 -4
  32. package/styles/bootstrap5-dark.css +10 -2
  33. package/styles/bootstrap5.css +10 -2
  34. package/styles/fabric-dark.css +9 -1
  35. package/styles/fabric.css +9 -1
  36. package/styles/gantt/_bootstrap-dark-definition.scss +3 -4
  37. package/styles/gantt/_bootstrap-definition.scss +3 -4
  38. package/styles/gantt/_bootstrap4-definition.scss +3 -4
  39. package/styles/gantt/_bootstrap5-definition.scss +1 -2
  40. package/styles/gantt/_fabric-dark-definition.scss +0 -1
  41. package/styles/gantt/_fabric-definition.scss +0 -1
  42. package/styles/gantt/_fluent-definition.scss +1 -2
  43. package/styles/gantt/_highcontrast-definition.scss +0 -1
  44. package/styles/gantt/_highcontrast-light-definition.scss +0 -1
  45. package/styles/gantt/_layout.scss +8 -1
  46. package/styles/gantt/_material-dark-definition.scss +0 -1
  47. package/styles/gantt/_material-definition.scss +0 -1
  48. package/styles/gantt/_tailwind-definition.scss +3 -4
  49. package/styles/gantt/bootstrap-dark.css +12 -4
  50. package/styles/gantt/bootstrap.css +12 -4
  51. package/styles/gantt/bootstrap4.css +12 -4
  52. package/styles/gantt/bootstrap5-dark.css +10 -2
  53. package/styles/gantt/bootstrap5.css +10 -2
  54. package/styles/gantt/fabric-dark.css +9 -1
  55. package/styles/gantt/fabric.css +9 -1
  56. package/styles/gantt/highcontrast-light.css +9 -1
  57. package/styles/gantt/highcontrast.css +9 -1
  58. package/styles/gantt/material-dark.css +9 -1
  59. package/styles/gantt/material.css +9 -1
  60. package/styles/gantt/tailwind-dark.css +12 -4
  61. package/styles/gantt/tailwind.css +12 -4
  62. package/styles/highcontrast-light.css +9 -1
  63. package/styles/highcontrast.css +9 -1
  64. package/styles/material-dark.css +9 -1
  65. package/styles/material.css +9 -1
  66. package/styles/tailwind-dark.css +12 -4
  67. package/styles/tailwind.css +12 -4
@@ -2690,14 +2690,16 @@ class TaskProcessor extends DateProcessor {
2690
2690
  // eslint-disable-next-line
2691
2691
  const resourcesId = [];
2692
2692
  let resourcesName = [];
2693
- for (let i = 0; i < resourceData.length; i++) {
2694
- resourcesId.push(resourceData[i][resourceSettings.id]);
2695
- let resName = resourceData[i][resourceSettings.name];
2696
- const resourceUnit = resourceData[i][resourceSettings.unit];
2697
- if (resourceUnit !== 100) {
2698
- resName += '[' + resourceUnit + '%' + ']';
2693
+ if (!isNullOrUndefined(resourceData)) {
2694
+ for (let i = 0; i < resourceData.length; i++) {
2695
+ resourcesId.push(resourceData[i][resourceSettings.id]);
2696
+ let resName = resourceData[i][resourceSettings.name];
2697
+ const resourceUnit = resourceData[i][resourceSettings.unit];
2698
+ if (resourceUnit !== 100) {
2699
+ resName += '[' + resourceUnit + '%' + ']';
2700
+ }
2701
+ resourcesName.push(resName);
2699
2702
  }
2700
- resourcesName.push(resName);
2701
2703
  }
2702
2704
  this.parent.setRecordValue('resourceNames', resourcesName.join(','), ganttProp, true);
2703
2705
  this.updateTaskDataResource(ganttData);
@@ -4001,6 +4003,7 @@ class ChartScroll {
4001
4003
  */
4002
4004
  setScrollTop(scrollTop) {
4003
4005
  this.element.scrollTop = scrollTop;
4006
+ this.parent.treeGrid.element.querySelector('.e-content').scrollTop = scrollTop;
4004
4007
  }
4005
4008
  /**
4006
4009
  * To set scroll left for chart scroll container
@@ -4393,6 +4396,12 @@ class GanttChart {
4393
4396
  * @private
4394
4397
  */
4395
4398
  mouseUp(e) {
4399
+ if (this.parent.allowRowDragAndDrop) {
4400
+ const ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
4401
+ if (ganttDragElemet) {
4402
+ ganttDragElemet.remove();
4403
+ }
4404
+ }
4396
4405
  if (!this.isGanttElement) {
4397
4406
  this.parent.notify('chartMouseUp', e);
4398
4407
  }
@@ -6032,6 +6041,7 @@ class Timeline {
6032
6041
  * @private
6033
6042
  */
6034
6043
  createTimelineTemplate(tier) {
6044
+ var isFirstCell = false;
6035
6045
  const parent = this.parent;
6036
6046
  let parentTh = '';
6037
6047
  let parentTr = '';
@@ -6048,10 +6058,19 @@ class Timeline {
6048
6058
  // PDf export collection
6049
6059
  const timelineCell = {};
6050
6060
  timelineCell.startDate = new Date(startDate.getTime());
6051
- 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);
6052
6065
  scheduleDateCollection.push(new Date(startDate.toString()));
6053
- increment = this.getIncrement(startDate, count, mode);
6054
- 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;
6055
6074
  startDate.setTime(newTime);
6056
6075
  if (startDate >= endDate) {
6057
6076
  /* eslint-disable-next-line */
@@ -6161,6 +6180,21 @@ class Timeline {
6161
6180
  mode === 'Hour' || mode === 'Minutes') &&
6162
6181
  this.parent.nonWorkingDayIndex.indexOf(day.getDay()) !== -1;
6163
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
+ }
6164
6198
  /**
6165
6199
  * To construct template string.
6166
6200
  *
@@ -6174,7 +6208,7 @@ class Timeline {
6174
6208
  * @private
6175
6209
  */
6176
6210
  /* eslint-disable-next-line */
6177
- getHeaterTemplateString(scheduleWeeks, mode, tier, isLast, count, timelineCell) {
6211
+ getHeaterTemplateString(scheduleWeeks, mode, tier, isLast, count, timelineCell, isFirstCell) {
6178
6212
  let parentTr = '';
6179
6213
  let td = '';
6180
6214
  const format = tier === 'topTier' ?
@@ -6189,7 +6223,7 @@ class Timeline {
6189
6223
  this.customFormat(scheduleWeeks, format, tier, mode, formatter);
6190
6224
  thWidth = (this.getIncrement(scheduleWeeks, count, mode) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth;
6191
6225
  const cellWidth = thWidth;
6192
- 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))
6193
6227
  : thWidth;
6194
6228
  const isWeekendCell = this.isWeekendHeaderCell(mode, tier, scheduleWeeks);
6195
6229
  const textClassName = tier === 'topTier' ? ' e-gantt-top-cell-text' : '';
@@ -11487,6 +11521,7 @@ class Tooltip$1 {
11487
11521
  tooltipPositionY = tooltipPositionY + 10;
11488
11522
  }
11489
11523
  args.element.style.top = tooltipPositionY + 'px';
11524
+ args.element.style.visibility = 'visible';
11490
11525
  }
11491
11526
  /**
11492
11527
  * Method to get mouse pointor position
@@ -11851,7 +11886,7 @@ class FocusModule {
11851
11886
  {
11852
11887
  if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
11853
11888
  e.preventDefault();
11854
- ganttObj.addRecord();
11889
+ ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition);
11855
11890
  const focussedElement = ganttObj.element;
11856
11891
  focussedElement.focus();
11857
11892
  }
@@ -12257,8 +12292,14 @@ let Gantt = class Gantt extends Component {
12257
12292
  calculateDimensions() {
12258
12293
  let settingsHeight;
12259
12294
  if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
12260
- !this.element.parentElement.style.height)) {
12261
- let ganttHeight = Number(this.height.split("%")[0]);
12295
+ !this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
12296
+ let ganttHeight;
12297
+ if (this.element.parentElement.style.height.indexOf('%') == -1) {
12298
+ ganttHeight = Number(this.height.split("%")[0]);
12299
+ }
12300
+ else {
12301
+ ganttHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12302
+ }
12262
12303
  ganttHeight = (ganttHeight * window.innerHeight) / 100;
12263
12304
  if (this.height === '100%') {
12264
12305
  ganttHeight = ganttHeight - 16;
@@ -12413,9 +12454,16 @@ let Gantt = class Gantt extends Component {
12413
12454
  let settingsHeight;
12414
12455
  if (this.height.indexOf('%') !== -1) {
12415
12456
  let ganttHeight = Number(this.height.split("%")[0]);
12416
- if (this.element.parentElement && this.element.parentElement.style.height) {
12417
- let containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
12418
- ganttHeight = (ganttHeight * containerHeight) / 100;
12457
+ if (this.element.parentElement && (this.element.parentElement.style.height)) {
12458
+ let containerHeight;
12459
+ if (this.element.parentElement.style.height.indexOf('%') == -1) {
12460
+ containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
12461
+ ganttHeight = (ganttHeight * containerHeight) / 100;
12462
+ }
12463
+ else {
12464
+ containerHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12465
+ ganttHeight = (window.innerHeight * containerHeight) / 100;
12466
+ }
12419
12467
  }
12420
12468
  else {
12421
12469
  ganttHeight = Number(this.height.split("%")[0]);
@@ -15182,6 +15230,7 @@ class CellEdit {
15182
15230
  * @private
15183
15231
  */
15184
15232
  this.isCellEdit = false;
15233
+ this.isResourceCellEdited = false;
15185
15234
  this.parent = ganttObj;
15186
15235
  this.bindTreeGridProperties();
15187
15236
  }
@@ -15610,6 +15659,7 @@ class CellEdit {
15610
15659
  const resourceSettings = this.parent.resourceFields;
15611
15660
  const editedResourceId = editedObj[this.parent.taskFields.resourceInfo];
15612
15661
  if (editedResourceId) {
15662
+ this.isResourceCellEdited = true;
15613
15663
  const tempResourceInfo = this.parent.dataOperation.setResourceInfo(editedObj);
15614
15664
  const editedResouceLength = tempResourceInfo.length;
15615
15665
  const previousResource = previousData.ganttProperties.resourceInfo;
@@ -15781,6 +15831,7 @@ class EditTooltip {
15781
15831
  tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
15782
15832
  }
15783
15833
  args.element.style.left = tooltipPositionX + 'px';
15834
+ args.element.style.visibility = 'visible';
15784
15835
  }
15785
15836
  /**
15786
15837
  * To show/hide taskbar edit tooltip.
@@ -16400,7 +16451,9 @@ class TaskbarEdit extends DateProcessor {
16400
16451
  if (this.isMouseDragged && this.taskBarEditAction) {
16401
16452
  const args = {
16402
16453
  cancel: false,
16403
- requestType: 'taskbarediting'
16454
+ requestType: 'taskbarediting',
16455
+ taskBarEditAction: this.taskBarEditAction,
16456
+ data: this.taskBarEditRecord
16404
16457
  };
16405
16458
  if (this.segmentIndex !== -1) {
16406
16459
  args.requestType = 'mergeSegment';
@@ -18880,7 +18933,15 @@ class DialogEdit {
18880
18933
  field: fields[i], headerText: this.localeObj.getConstant(fields[i]), editType: 'stringedit', width: '200px',
18881
18934
  edit: {
18882
18935
  write: (args) => {
18883
- const datePickerModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18936
+ let datePickerModel;
18937
+ if (!isNullOrUndefined(this.beforeOpenArgs[generalTabString])) {
18938
+ datePickerModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18939
+ }
18940
+ else {
18941
+ let columnFields = this.getGeneralColumnFields();
18942
+ let columnModel = this.getFieldsModel(columnFields);
18943
+ datePickerModel = columnModel[this.parent.taskFields[fields[i]]];
18944
+ }
18884
18945
  const value = args.rowData[args.column.field];
18885
18946
  setValue('value', value, datePickerModel);
18886
18947
  const datePicker = new this.inputs[this.parent.columnByField[this.parent.taskFields[fields[i]]].editType](datePickerModel);
@@ -18903,7 +18964,15 @@ class DialogEdit {
18903
18964
  field: fields[i], headerText: this.localeObj.getConstant(fields[i]), editType: 'stringedit', width: '100px',
18904
18965
  edit: {
18905
18966
  write: (args) => {
18906
- const inputTextModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18967
+ let inputTextModel;
18968
+ if (!isNullOrUndefined(this.beforeOpenArgs[generalTabString])) {
18969
+ inputTextModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
18970
+ }
18971
+ else {
18972
+ let columnFields = this.getGeneralColumnFields();
18973
+ let columnModel = this.getFieldsModel(columnFields);
18974
+ inputTextModel = columnModel[this.parent.taskFields[fields[i]]];
18975
+ }
18907
18976
  inputTextModel.floatLabelType = 'Never';
18908
18977
  const value = args.rowData[args.column.field];
18909
18978
  if (!isNullOrUndefined(value)) {
@@ -21562,9 +21631,12 @@ class Edit$2 {
21562
21631
  */
21563
21632
  updateParentChildRecord(data) {
21564
21633
  const ganttRecord = data;
21565
- if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto') {
21634
+ if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
21566
21635
  this.updateChildItems(ganttRecord);
21567
21636
  }
21637
+ if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
21638
+ this.parent.editModule.cellEditModule.isResourceCellEdited = false;
21639
+ }
21568
21640
  }
21569
21641
  /**
21570
21642
  * To update records while changing schedule mode.
@@ -23014,7 +23086,7 @@ class Edit$2 {
23014
23086
  /*Record Updates*/
23015
23087
  recordIndex = flatRecords.indexOf(this.addRowSelectedItem);
23016
23088
  updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem);
23017
- this.recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem);
23089
+ this.recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
23018
23090
  break;
23019
23091
  case 'Below':
23020
23092
  currentItemIndex = flatRecords.indexOf(this.addRowSelectedItem);
@@ -23028,7 +23100,7 @@ class Edit$2 {
23028
23100
  recordIndex = currentItemIndex + 1;
23029
23101
  updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) + 1;
23030
23102
  }
23031
- this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem);
23103
+ this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
23032
23104
  break;
23033
23105
  case 'Child':
23034
23106
  currentItemIndex = flatRecords.indexOf(this.addRowSelectedItem);
@@ -23056,7 +23128,7 @@ class Edit$2 {
23056
23128
  this.addRowSelectedItem.ganttProperties.segments = null;
23057
23129
  }
23058
23130
  }
23059
- this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem);
23131
+ this.recordCollectionUpdate(childIndex + 1, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition);
23060
23132
  break;
23061
23133
  }
23062
23134
  this.newlyAddedRecordBackup = record;
@@ -23070,7 +23142,7 @@ class Edit$2 {
23070
23142
  * @returns {void} .
23071
23143
  * @private
23072
23144
  */
23073
- recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem) {
23145
+ recordCollectionUpdate(childIndex, recordIndex, updatedCollectionIndex, record, parentItem, rowPosition) {
23074
23146
  const flatRecords = this.parent.flatData;
23075
23147
  const currentViewData = this.parent.currentViewData;
23076
23148
  const ids = this.parent.ids;
@@ -23092,7 +23164,15 @@ class Edit$2 {
23092
23164
  !isNullOrUndefined(this.parent.dataSource)) {
23093
23165
  const child = this.parent.taskFields.child;
23094
23166
  if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
23095
- parentItem.taskData[child].push(record.taskData);
23167
+ if (rowPosition === 'Above') {
23168
+ parentItem.taskData[child].splice(childIndex, 0, record.taskData);
23169
+ }
23170
+ else if (rowPosition === 'Below') {
23171
+ parentItem.taskData[child].splice(childIndex + 1, 0, record.taskData);
23172
+ }
23173
+ else {
23174
+ parentItem.taskData[child].push(record.taskData);
23175
+ }
23096
23176
  }
23097
23177
  else {
23098
23178
  parentItem.taskData[child] = [];
@@ -23177,13 +23257,13 @@ class Edit$2 {
23177
23257
  }
23178
23258
  for (let i = 0; i < addedRecord.length; i++) {
23179
23259
  if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
23180
- rowPosition = 'Top';
23260
+ rowPosition = rowPosition === 'Bottom' ? 'Bottom' : 'Top';
23181
23261
  }
23182
23262
  if (rowPosition === 'Top') {
23183
23263
  dataSource.splice(0, 0, addedRecord[i].taskData);
23184
23264
  }
23185
23265
  else if (rowPosition === 'Bottom') {
23186
- dataSource.push(addedRecord[i]);
23266
+ dataSource.push(addedRecord[i].taskData);
23187
23267
  }
23188
23268
  else {
23189
23269
  if (!isNullOrUndefined(taskFields.id) && !isNullOrUndefined(taskFields.parentID)) {
@@ -23335,7 +23415,7 @@ class Edit$2 {
23335
23415
  else {
23336
23416
  if (this.parent.viewType === 'ProjectView') {
23337
23417
  if ((rowPosition === 'Top' || rowPosition === 'Bottom') ||
23338
- ((rowPosition === 'Above' || rowPosition === 'Below') && !args.data.parentItem)) {
23418
+ ((rowPosition === 'Above' || rowPosition === 'Below' || rowPosition === 'Child') && !args.data.parentItem)) {
23339
23419
  if (args.data instanceof Array) {
23340
23420
  this.updateRealDataSource(args.data, rowPosition);
23341
23421
  }
@@ -23378,6 +23458,59 @@ class Edit$2 {
23378
23458
  * @returns {void} .
23379
23459
  * @private
23380
23460
  */
23461
+ createNewRecord() {
23462
+ const tempRecord = {};
23463
+ const ganttColumns = this.parent.ganttColumns;
23464
+ const taskSettingsFields = this.parent.taskFields;
23465
+ const taskId = this.parent.editModule.getNewTaskId();
23466
+ for (let i = 0; i < ganttColumns.length; i++) {
23467
+ const fieldName = ganttColumns[i].field;
23468
+ if (fieldName === taskSettingsFields.id) {
23469
+ tempRecord[fieldName] = taskId;
23470
+ }
23471
+ else if (ganttColumns[i].field === taskSettingsFields.startDate) {
23472
+ if (isNullOrUndefined(tempRecord[taskSettingsFields.endDate])) {
23473
+ tempRecord[fieldName] = this.parent.editModule.dialogModule.getMinimumStartDate();
23474
+ }
23475
+ else {
23476
+ tempRecord[fieldName] = new Date(tempRecord[taskSettingsFields.endDate]);
23477
+ }
23478
+ if (this.parent.timezone) {
23479
+ tempRecord[fieldName] = this.parent.dateValidationModule.remove(tempRecord[fieldName], this.parent.timezone);
23480
+ }
23481
+ }
23482
+ else if (ganttColumns[i].field === taskSettingsFields.endDate) {
23483
+ if (isNullOrUndefined(tempRecord[taskSettingsFields.startDate])) {
23484
+ tempRecord[fieldName] = this.parent.editModule.dialogModule.getMinimumStartDate();
23485
+ }
23486
+ else {
23487
+ tempRecord[fieldName] = new Date(tempRecord[taskSettingsFields.startDate]);
23488
+ }
23489
+ if (this.parent.timezone) {
23490
+ tempRecord[fieldName] = this.parent.dateValidationModule.remove(tempRecord[fieldName], this.parent.timezone);
23491
+ }
23492
+ }
23493
+ else if (ganttColumns[i].field === taskSettingsFields.duration) {
23494
+ tempRecord[fieldName] = 1;
23495
+ }
23496
+ else if (ganttColumns[i].field === taskSettingsFields.name) {
23497
+ tempRecord[fieldName] = this.parent.editModule.dialogModule['localeObj'].getConstant('addDialogTitle') + ' ' + taskId;
23498
+ }
23499
+ else if (ganttColumns[i].field === taskSettingsFields.progress) {
23500
+ tempRecord[fieldName] = 0;
23501
+ }
23502
+ else if (ganttColumns[i].field === taskSettingsFields.work) {
23503
+ tempRecord[fieldName] = 0;
23504
+ }
23505
+ else if (ganttColumns[i].field === 'taskType') {
23506
+ tempRecord[fieldName] = this.parent.taskType;
23507
+ }
23508
+ else {
23509
+ tempRecord[this.parent.ganttColumns[i].field] = '';
23510
+ }
23511
+ }
23512
+ return tempRecord;
23513
+ }
23381
23514
  validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord) {
23382
23515
  const selectedRowIndex = isNullOrUndefined(rowIndex) || isNaN(parseInt(rowIndex.toString(), 10)) ?
23383
23516
  this.parent.selectionModule ?
@@ -23389,7 +23522,7 @@ class Edit$2 {
23389
23522
  this.parent.selectionModule.getSelectedRowCellIndexes()[0].rowIndex : null : null : rowIndex;
23390
23523
  this.addRowSelectedItem = isNullOrUndefined(selectedRowIndex) ? null : this.parent.updatedRecords[selectedRowIndex];
23391
23524
  rowPosition = isNullOrUndefined(rowPosition) ? this.parent.editSettings.newRowPosition : rowPosition;
23392
- data = isNullOrUndefined(data) ? this.parent.editModule.dialogModule.composeAddRecord() : data;
23525
+ data = isNullOrUndefined(data) ? this.createNewRecord() : data;
23393
23526
  if (((isNullOrUndefined(selectedRowIndex) || selectedRowIndex < 0 ||
23394
23527
  isNullOrUndefined(this.addRowSelectedItem)) && (rowPosition === 'Above'
23395
23528
  || rowPosition === 'Below'
@@ -23481,6 +23614,10 @@ class Edit$2 {
23481
23614
  }
23482
23615
  this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
23483
23616
  }
23617
+ let flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
23618
+ if (flag !== null) {
23619
+ setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
23620
+ }
23484
23621
  this.addSuccess(args);
23485
23622
  args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
23486
23623
  this.parent.trigger('actionComplete', args);
@@ -23882,6 +24019,25 @@ class Edit$2 {
23882
24019
  const delRow = this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);
23883
24020
  this.removeRecords(delRow);
23884
24021
  }
24022
+ updateIndentedChildRecords(indentedRecord) {
24023
+ let createParentItem = {
24024
+ uniqueID: indentedRecord.uniqueID,
24025
+ expanded: indentedRecord.expanded,
24026
+ level: indentedRecord.level,
24027
+ index: indentedRecord.index,
24028
+ taskId: indentedRecord.ganttProperties.rowUniqueID
24029
+ };
24030
+ for (let i = 0; i < indentedRecord.childRecords.length; i++) {
24031
+ this.parent.setRecordValue('parentItem', createParentItem, indentedRecord.childRecords[i]);
24032
+ this.parent.setRecordValue('parentUniqueID', indentedRecord.uniqueID, indentedRecord.childRecords[i]);
24033
+ }
24034
+ if (indentedRecord.hasChildRecords) {
24035
+ indentedRecord = indentedRecord.childRecords;
24036
+ for (let j = 0; j < indentedRecord['length']; j++) {
24037
+ this.updateIndentedChildRecords(indentedRecord[j]);
24038
+ }
24039
+ }
24040
+ }
23885
24041
  dropMiddle(recordIndex1) {
23886
24042
  const obj = this.parent;
23887
24043
  const childRec = this.parent.editModule.getChildCount(this.droppedRecord, 0);
@@ -23897,6 +24053,10 @@ class Edit$2 {
23897
24053
  this.recordLevel();
23898
24054
  if (this.draggedRecord.hasChildRecords) {
23899
24055
  this.updateChildRecord(this.draggedRecord, childRecordsLength, this.droppedRecord.expanded);
24056
+ if (this.parent.enableImmutableMode) {
24057
+ let indentedRecord = this.draggedRecord;
24058
+ this.updateIndentedChildRecords(indentedRecord);
24059
+ }
23900
24060
  }
23901
24061
  if (isNullOrUndefined(this.draggedRecord.parentItem &&
23902
24062
  this.updateParentRecords.indexOf(this.draggedRecord.parentItem) !== -1)) {
@@ -24377,7 +24537,7 @@ class Filter$1 {
24377
24537
  const ganttElement = closest(element, '#' + this.parent.element.id)
24378
24538
  || element.querySelector('#' + this.parent.element.id);
24379
24539
  if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element.nodeName === 'HTML'
24380
- || element.nodeName === 'DIV') {
24540
+ || ((element.nodeName === 'DIV') && (!element.classList.contains('e-day')))) {
24381
24541
  remove(this.filterMenuElement);
24382
24542
  this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
24383
24543
  this.filterMenuElement = null;
@@ -27121,7 +27281,7 @@ class RowDD$1 {
27121
27281
  if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
27122
27282
  const rowPosition = this.dropPosition === 'topSegment' ? 'Above' : 'Below';
27123
27283
  this.parent.editModule.addRowSelectedItem = droppedRecord;
27124
- this.parent.editModule.updateRealDataSource(draggedRecord, rowPosition);
27284
+ this.parent.editModule.updateRealDataSource([draggedRecord], rowPosition);
27125
27285
  delete this.parent.editModule.addRowSelectedItem;
27126
27286
  }
27127
27287
  }