@syncfusion/ej2-gantt 20.3.61 → 20.4.38

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 (105) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +5 -0
  3. package/dist/ej2-gantt.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js +2 -2
  5. package/dist/ej2-gantt.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es2015.js +1412 -476
  7. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  8. package/dist/es6/ej2-gantt.es5.js +1438 -484
  9. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  10. package/dist/global/ej2-gantt.min.js +2 -2
  11. package/dist/global/ej2-gantt.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +19 -18
  14. package/src/gantt/actions/chart-scroll.d.ts +5 -1
  15. package/src/gantt/actions/chart-scroll.js +39 -1
  16. package/src/gantt/actions/connector-line-edit.js +2 -0
  17. package/src/gantt/actions/context-menu.js +36 -5
  18. package/src/gantt/actions/critical-path.d.ts +2 -2
  19. package/src/gantt/actions/critical-path.js +23 -16
  20. package/src/gantt/actions/dialog-edit.js +37 -14
  21. package/src/gantt/actions/edit.d.ts +1 -0
  22. package/src/gantt/actions/edit.js +156 -34
  23. package/src/gantt/actions/excel-export.js +13 -0
  24. package/src/gantt/actions/filter.js +3 -0
  25. package/src/gantt/actions/keyboard.js +1 -0
  26. package/src/gantt/actions/pdf-export.js +12 -0
  27. package/src/gantt/actions/rowdragdrop.js +8 -2
  28. package/src/gantt/actions/taskbar-edit.js +140 -43
  29. package/src/gantt/actions/toolbar.js +21 -1
  30. package/src/gantt/base/date-processor.js +1 -1
  31. package/src/gantt/base/gantt-chart.js +31 -3
  32. package/src/gantt/base/gantt-model.d.ts +25 -2
  33. package/src/gantt/base/gantt.d.ts +64 -21
  34. package/src/gantt/base/gantt.js +396 -26
  35. package/src/gantt/base/interface.d.ts +0 -4
  36. package/src/gantt/base/splitter.js +12 -2
  37. package/src/gantt/base/task-processor.js +4 -3
  38. package/src/gantt/base/tree-grid.js +37 -0
  39. package/src/gantt/base/utils.js +1 -0
  40. package/src/gantt/export/pdf-connector-line.js +185 -187
  41. package/src/gantt/models/loading-indicator-model.d.ts +20 -0
  42. package/src/gantt/models/loading-indicator.d.ts +18 -0
  43. package/src/gantt/models/loading-indicator.js +34 -0
  44. package/src/gantt/models/models.d.ts +2 -0
  45. package/src/gantt/models/models.js +1 -0
  46. package/src/gantt/renderer/chart-rows.js +75 -30
  47. package/src/gantt/renderer/connector-line.js +100 -97
  48. package/src/gantt/renderer/edit-tooltip.js +22 -3
  49. package/src/gantt/renderer/event-marker.js +15 -2
  50. package/src/gantt/renderer/nonworking-day.js +4 -2
  51. package/src/gantt/renderer/timeline.js +21 -1
  52. package/src/gantt/renderer/tooltip.js +1 -0
  53. package/styles/bootstrap-dark.css +179 -12
  54. package/styles/bootstrap.css +179 -12
  55. package/styles/bootstrap4.css +178 -10
  56. package/styles/bootstrap5-dark.css +178 -10
  57. package/styles/bootstrap5.css +178 -10
  58. package/styles/fabric-dark.css +179 -12
  59. package/styles/fabric.css +179 -12
  60. package/styles/fluent-dark.css +180 -10
  61. package/styles/fluent.css +180 -10
  62. package/styles/gantt/_bootstrap-dark-definition.scss +6 -2
  63. package/styles/gantt/_bootstrap-definition.scss +6 -3
  64. package/styles/gantt/_bootstrap4-definition.scss +6 -3
  65. package/styles/gantt/_bootstrap5-definition.scss +6 -3
  66. package/styles/gantt/_fabric-dark-definition.scss +6 -3
  67. package/styles/gantt/_fabric-definition.scss +6 -3
  68. package/styles/gantt/_fluent-definition.scss +6 -3
  69. package/styles/gantt/_fusionnew-definition.scss +6 -3
  70. package/styles/gantt/_highcontrast-definition.scss +7 -4
  71. package/styles/gantt/_highcontrast-light-definition.scss +6 -3
  72. package/styles/gantt/_layout.scss +234 -21
  73. package/styles/gantt/_material-dark-definition.scss +6 -3
  74. package/styles/gantt/_material-definition.scss +6 -3
  75. package/styles/gantt/_material3-definition.scss +6 -3
  76. package/styles/gantt/_tailwind-definition.scss +6 -3
  77. package/styles/gantt/_theme.scss +17 -8
  78. package/styles/gantt/bootstrap-dark.css +179 -12
  79. package/styles/gantt/bootstrap.css +179 -12
  80. package/styles/gantt/bootstrap4.css +178 -10
  81. package/styles/gantt/bootstrap5-dark.css +178 -10
  82. package/styles/gantt/bootstrap5.css +178 -10
  83. package/styles/gantt/fabric-dark.css +179 -12
  84. package/styles/gantt/fabric.css +179 -12
  85. package/styles/gantt/fluent-dark.css +180 -10
  86. package/styles/gantt/fluent.css +180 -10
  87. package/styles/gantt/highcontrast-light.css +178 -10
  88. package/styles/gantt/highcontrast.css +179 -12
  89. package/styles/gantt/icons/_bootstrap-dark.scss +1 -1
  90. package/styles/gantt/icons/_bootstrap.scss +1 -1
  91. package/styles/gantt/icons/_fabric-dark.scss +1 -1
  92. package/styles/gantt/icons/_fabric.scss +1 -1
  93. package/styles/gantt/icons/_highcontrast.scss +1 -1
  94. package/styles/gantt/icons/_material-dark.scss +1 -1
  95. package/styles/gantt/icons/_material.scss +1 -1
  96. package/styles/gantt/material-dark.css +177 -12
  97. package/styles/gantt/material.css +179 -12
  98. package/styles/gantt/tailwind-dark.css +178 -10
  99. package/styles/gantt/tailwind.css +178 -10
  100. package/styles/highcontrast-light.css +178 -10
  101. package/styles/highcontrast.css +179 -12
  102. package/styles/material-dark.css +177 -12
  103. package/styles/material.css +179 -12
  104. package/styles/tailwind-dark.css +178 -10
  105. package/styles/tailwind.css +178 -10
@@ -25,6 +25,7 @@ var Edit = /** @class */ (function () {
25
25
  this.taskbarMoved = false;
26
26
  this.predecessorUpdated = false;
27
27
  this.isBreakLoop = false;
28
+ this.isResourceTaskDeleted = false;
28
29
  /**
29
30
  * @private
30
31
  */
@@ -99,6 +100,7 @@ var Edit = /** @class */ (function () {
99
100
  var editParam = {
100
101
  min: 0,
101
102
  decimals: 0,
103
+ enableRtl: this.parent.enableRtl,
102
104
  validateDecimalOnType: true,
103
105
  format: 'n0',
104
106
  showSpinButton: false
@@ -114,6 +116,7 @@ var Edit = /** @class */ (function () {
114
116
  Edit.prototype.updateProgessColumnEditParams = function (column) {
115
117
  var editParam = {
116
118
  min: 0,
119
+ enableRtl: this.parent.enableRtl,
117
120
  decimals: 0,
118
121
  validateDecimalOnType: true,
119
122
  max: 100,
@@ -172,6 +175,7 @@ var Edit = /** @class */ (function () {
172
175
  editor = new MultiSelect({
173
176
  dataSource: new DataManager(_this.parent.resources),
174
177
  fields: { text: resourceSettings.name, value: resourceSettings.id },
178
+ enableRtl: _this.parent.enableRtl,
175
179
  mode: 'CheckBox',
176
180
  showDropDownIcon: true,
177
181
  popupHeight: '350px',
@@ -233,6 +237,7 @@ var Edit = /** @class */ (function () {
233
237
  _this.parent.treeGridModule.currentEditRow = {};
234
238
  editor = new DropDownList({
235
239
  dataSource: new DataManager(types),
240
+ enableRtl: _this.parent.enableRtl,
236
241
  fields: { value: 'Value' },
237
242
  popupHeight: '350px',
238
243
  value: getValue('taskType', args.rowData.ganttProperties)
@@ -396,8 +401,8 @@ var Edit = /** @class */ (function () {
396
401
  var ganttPropByMapping = getSwapKey(ganttObj.columnMapping);
397
402
  var scheduleFieldNames = [];
398
403
  var isScheduleValueUpdated = false;
399
- for (var _i = 0, _a = Object.keys(data); _i < _a.length; _i++) {
400
- var key = _a[_i];
404
+ for (var _i = 0, _b = Object.keys(data); _i < _b.length; _i++) {
405
+ var key = _b[_i];
401
406
  if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
402
407
  if (isNullOrUndefined(data[key]) && !ganttObj.allowUnscheduledTasks) {
403
408
  continue;
@@ -1118,7 +1123,6 @@ var Edit = /** @class */ (function () {
1118
1123
  */
1119
1124
  Edit.prototype.initiateSaveAction = function (args) {
1120
1125
  var _this = this;
1121
- this.parent.showSpinner();
1122
1126
  var eventArgs = {};
1123
1127
  eventArgs.requestType = 'beforeSave';
1124
1128
  eventArgs.data = args.data;
@@ -1132,6 +1136,12 @@ var Edit = /** @class */ (function () {
1132
1136
  eventArgs.action = 'DrawConnectorLine';
1133
1137
  }
1134
1138
  this.parent.trigger('actionBegin', eventArgs, function (eventArg) {
1139
+ if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
1140
+ _this.parent.showMaskRow();
1141
+ }
1142
+ else {
1143
+ _this.parent.showSpinner();
1144
+ }
1135
1145
  if (eventArg.cancel) {
1136
1146
  _this.reUpdatePreviousRecords();
1137
1147
  _this.parent.chartRowsModule.refreshRecords([args.data]);
@@ -1165,6 +1175,52 @@ var Edit = /** @class */ (function () {
1165
1175
  });
1166
1176
  };
1167
1177
  Edit.prototype.dmSuccess = function (e, args) {
1178
+ var eLength = e['length'];
1179
+ for (var i = 0; i < eLength; i++) {
1180
+ var rec = e[i];
1181
+ var _aLength = Object.keys(rec).length;
1182
+ for (var j = 0, _a = Object.keys(rec); j < _aLength; j++) {
1183
+ var key = _a[j];
1184
+ this.parent.editedRecords[i][key] = rec[key];
1185
+ this.parent.editedRecords[i].taskData[key] = rec[key];
1186
+ }
1187
+ if (this.parent.taskFields.id !== null) {
1188
+ this.parent.editedRecords[i].ganttProperties["taskId"] = rec[this.parent.taskFields.id];
1189
+ }
1190
+ if (this.parent.taskFields.name !== null) {
1191
+ this.parent.editedRecords[i].ganttProperties["taskName"] = rec[this.parent.taskFields.name];
1192
+ }
1193
+ if (this.parent.taskFields.startDate !== null) {
1194
+ this.parent.editedRecords[i].ganttProperties["startDate"] = rec[this.parent.taskFields.startDate];
1195
+ }
1196
+ if (this.parent.taskFields.endDate !== null) {
1197
+ this.parent.editedRecords[i].ganttProperties["endDate"] = rec[this.parent.taskFields.endDate];
1198
+ }
1199
+ if (this.parent.taskFields.duration !== null) {
1200
+ this.parent.editedRecords[i].ganttProperties["duration"] = parseInt(rec[this.parent.taskFields.duration]);
1201
+ }
1202
+ if (this.parent.taskFields.durationUnit !== null) {
1203
+ this.parent.editedRecords[i].ganttProperties["durationUnit"] = rec[this.parent.taskFields.durationUnit];
1204
+ }
1205
+ if (this.parent.taskFields.progress !== null) {
1206
+ this.parent.editedRecords[i].ganttProperties["progress"] = rec[this.parent.taskFields.progress];
1207
+ }
1208
+ if (this.parent.taskFields.dependency !== null) {
1209
+ this.parent.editedRecords[i].ganttProperties["dependency"] = rec[this.parent.taskFields.dependency];
1210
+ }
1211
+ if (this.parent.taskFields.parentID !== null) {
1212
+ this.parent.editedRecords[i].ganttProperties["parentID"] = rec[this.parent.taskFields.parentID];
1213
+ }
1214
+ if (this.parent.taskFields.baselineEndDate !== null) {
1215
+ this.parent.editedRecords[i].ganttProperties["baselineEndDate"] = rec[this.parent.taskFields.baselineEndDate];
1216
+ }
1217
+ if (this.parent.taskFields.baselineStartDate !== null) {
1218
+ this.parent.editedRecords[i].ganttProperties["baselineStartDate"] = rec[this.parent.taskFields.baselineStartDate];
1219
+ }
1220
+ if (this.parent.taskFields.resourceInfo !== null) {
1221
+ this.parent.editedRecords[i].ganttProperties["resources"] = rec[this.parent.taskFields.resourceInfo];
1222
+ }
1223
+ }
1168
1224
  this.saveSuccess(args);
1169
1225
  };
1170
1226
  Edit.prototype.dmFailure = function (e, args) {
@@ -1183,7 +1239,7 @@ var Edit = /** @class */ (function () {
1183
1239
  var ids = data.ganttProperties.sharedTaskUniqueIds;
1184
1240
  for (var i = 0; i < ids.length; i++) {
1185
1241
  var editRecord = this.parent.flatData[this.parent.ids.indexOf(ids[i].toString())];
1186
- if (editRecord.uniqueID !== data.uniqueID) {
1242
+ if (editRecord && editRecord.uniqueID !== data.uniqueID) {
1187
1243
  this.updateGanttProperties(data, editRecord);
1188
1244
  this.parent.setRecordValue('taskData', data.taskData, editRecord, true);
1189
1245
  this.parent.dataOperation.updateTaskData(editRecord);
@@ -1257,6 +1313,12 @@ var Edit = /** @class */ (function () {
1257
1313
  criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
1258
1314
  }
1259
1315
  this.parent.trigger('actionComplete', eventArgs);
1316
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
1317
+ this.parent.hideMaskRow();
1318
+ }
1319
+ else {
1320
+ this.parent.hideSpinner();
1321
+ }
1260
1322
  }
1261
1323
  else {
1262
1324
  this.taskbarEditModule.dependencyCancel = false;
@@ -1278,12 +1340,12 @@ var Edit = /** @class */ (function () {
1278
1340
  for (var index = 0; index < currentLength; index++) {
1279
1341
  var recordIndex = [];
1280
1342
  var resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10).toString();
1281
- if (resourceID === "NaN") {
1343
+ if (resourceID === 'NaN') {
1282
1344
  resourceID = currentResource[index][this.parent.resourceFields.id];
1283
1345
  }
1284
1346
  for (var i = 0; i < prevResource.length; i++) {
1285
1347
  var prevResourceID = parseInt(prevResource[i][this.parent.resourceFields.id], 10).toString();
1286
- if (prevResourceID === "NaN") {
1348
+ if (prevResourceID === 'NaN') {
1287
1349
  prevResourceID = prevResource[i][this.parent.resourceFields.id];
1288
1350
  }
1289
1351
  if (prevResourceID === resourceID) {
@@ -1344,12 +1406,6 @@ var Edit = /** @class */ (function () {
1344
1406
  }
1345
1407
  if (!isNullOrUndefined(unassignedTasks)) {
1346
1408
  this.addNewRecord(updateRecord, unassignedTasks);
1347
- var updatedData = this.parent.currentViewData.filter(function (data) {
1348
- return (data.ganttProperties.taskId === updateRecord.ganttProperties.taskId &&
1349
- (data.hasChildRecords === updateRecord.hasChildRecords));
1350
- })[0];
1351
- updateRecord.parentItem = updatedData.parentItem;
1352
- updateRecord.parentUniqueID = updatedData.parentUniqueID;
1353
1409
  }
1354
1410
  else {
1355
1411
  // Block for create the unassigned task.
@@ -1364,6 +1420,12 @@ var Edit = /** @class */ (function () {
1364
1420
  var parentRecord = this.parent.flatData[this.parent.flatData.length - 1];
1365
1421
  this.addNewRecord(updateRecord, parentRecord);
1366
1422
  }
1423
+ var updatedData = this.parent.currentViewData.filter(function (data) {
1424
+ return (data.ganttProperties.taskId === updateRecord.ganttProperties.taskId &&
1425
+ (data.hasChildRecords === updateRecord.hasChildRecords));
1426
+ })[0];
1427
+ updateRecord.parentItem = updatedData.parentItem;
1428
+ updateRecord.parentUniqueID = updatedData.parentUniqueID;
1367
1429
  };
1368
1430
  Edit.prototype.addRecordAsBottom = function (cAddedRecord) {
1369
1431
  var recordIndex1 = this.parent.flatData.length;
@@ -1570,6 +1632,7 @@ var Edit = /** @class */ (function () {
1570
1632
  width: '320px',
1571
1633
  isModal: true,
1572
1634
  visible: false,
1635
+ enableRtl: this.parent.enableRtl,
1573
1636
  content: this.parent.localeObj.getConstant('confirmDelete'),
1574
1637
  buttons: [
1575
1638
  {
@@ -1622,15 +1685,17 @@ var Edit = /** @class */ (function () {
1622
1685
  var deleteRecords = [];
1623
1686
  var _loop_1 = function (i) {
1624
1687
  if (selectedRecords[i].parentItem) {
1625
- var data = selectedRecords[i];
1626
- var ids = data.ganttProperties.sharedTaskUniqueIds;
1627
- for (var j = 0; j < ids.length; j++) {
1628
- if (this_1.parent.ids.indexOf(ids[j].toString()) !== -1) {
1629
- deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
1688
+ if (selectedRecords[i].ganttProperties.sharedTaskUniqueIds.length === 1) {
1689
+ var data = selectedRecords[i];
1690
+ var ids = data.ganttProperties.sharedTaskUniqueIds;
1691
+ for (var j = 0; j < ids.length; j++) {
1692
+ if (this_1.parent.ids.indexOf(ids[j].toString()) !== -1) {
1693
+ deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
1694
+ }
1695
+ }
1696
+ if (this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID) !== -1) {
1697
+ deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
1630
1698
  }
1631
- }
1632
- if (this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID) !== -1) {
1633
- deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
1634
1699
  }
1635
1700
  }
1636
1701
  else {
@@ -1760,8 +1825,9 @@ var Edit = /** @class */ (function () {
1760
1825
  if (this.deletedTaskDetails.indexOf(deleteRecord) !== -1) {
1761
1826
  continue;
1762
1827
  }
1828
+ var parentTask = this.parent.getParentTask(deleteRecord.parentItem);
1763
1829
  if (deleteRecord.parentItem) {
1764
- var childRecord = this.parent.getParentTask(deleteRecord.parentItem).childRecords;
1830
+ var childRecord = parentTask.childRecords;
1765
1831
  var filteredRecord = childRecord.length === 1 ?
1766
1832
  childRecord : childRecord.filter(function (data) {
1767
1833
  return !data.isDelete;
@@ -1771,7 +1837,12 @@ var Edit = /** @class */ (function () {
1771
1837
  }
1772
1838
  }
1773
1839
  var predecessor = deleteRecord.ganttProperties.predecessor;
1774
- if (predecessor && predecessor.length) {
1840
+ var canDeletePredecessor = true;
1841
+ if (this.parent.viewType === 'ResourceView' && parentTask && parentTask.ganttProperties.taskName !==
1842
+ this.parent.localeObj.getConstant('unassignedTask')) {
1843
+ canDeletePredecessor = false;
1844
+ }
1845
+ if (predecessor && predecessor.length && canDeletePredecessor) {
1775
1846
  this.removePredecessorOnDelete(deleteRecord);
1776
1847
  }
1777
1848
  this.deletedTaskDetails.push(deleteRecord);
@@ -1920,7 +1991,13 @@ var Edit = /** @class */ (function () {
1920
1991
  continue;
1921
1992
  }
1922
1993
  var predecessor = childRecord.ganttProperties.predecessor;
1923
- if (predecessor && predecessor.length) {
1994
+ var canDeletePredecessor = true;
1995
+ var parentTask = this.parent.getParentTask(childRecord.parentItem);
1996
+ if (this.parent.viewType === 'ResourceView' && parentTask && parentTask.ganttProperties.taskName !==
1997
+ this.parent.localeObj.getConstant('unassignedTask')) {
1998
+ canDeletePredecessor = false;
1999
+ }
2000
+ if (predecessor && predecessor.length && canDeletePredecessor) {
1924
2001
  this.removePredecessorOnDelete(childRecord);
1925
2002
  }
1926
2003
  this.deletedTaskDetails.push(childRecord);
@@ -1972,6 +2049,12 @@ var Edit = /** @class */ (function () {
1972
2049
  eventArgs.modifiedRecords = args.updatedRecordCollection;
1973
2050
  eventArgs.modifiedTaskData = getTaskData(args.updatedRecordCollection, null, null, this.parent);
1974
2051
  this.parent.trigger('actionBegin', eventArgs, function (eventArg) {
2052
+ if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
2053
+ _this.parent.showMaskRow();
2054
+ }
2055
+ else {
2056
+ _this.parent.showSpinner();
2057
+ }
1975
2058
  if (eventArg.cancel) {
1976
2059
  var deleteRecords = _this.deletedTaskDetails;
1977
2060
  for (var d = 0; d < deleteRecords.length; d++) {
@@ -2051,6 +2134,14 @@ var Edit = /** @class */ (function () {
2051
2134
  this.parent.ids.splice(flatIndex, 1);
2052
2135
  if (this.parent.viewType === 'ResourceView') {
2053
2136
  this.parent.getTaskIds().splice(flatIndex, 1);
2137
+ this.isResourceTaskDeleted = true;
2138
+ if (!deleteRecord.hasChildRecords) {
2139
+ deleteRecord.ganttProperties.resourceInfo = null;
2140
+ delete deleteRecord.ganttProperties.resourceNames;
2141
+ deleteRecord[this.parent.taskFields.resourceInfo] = null;
2142
+ deleteRecord.ganttProperties.sharedTaskUniqueIds = [];
2143
+ delete deleteRecord.taskData[this.parent.taskFields.resourceInfo];
2144
+ }
2054
2145
  }
2055
2146
  }
2056
2147
  if (deleteRecord.level === 0 && treeGridParentIndex !== -1) {
@@ -2099,9 +2190,12 @@ var Edit = /** @class */ (function () {
2099
2190
  var unassignedTask = this_2.parent.flatData.filter(function (data) {
2100
2191
  return data.ganttProperties.taskName === _this.parent.localeObj.getConstant('unassignedTask');
2101
2192
  })[0];
2102
- var isDuplicate = unassignedTask.childRecords.filter(function (data) {
2103
- return data.ganttProperties.taskId === updateUnAssignedResources_1[i].ganttProperties.taskId;
2104
- });
2193
+ var isDuplicate = [];
2194
+ if (unassignedTask) {
2195
+ isDuplicate = unassignedTask.childRecords.filter(function (data) {
2196
+ return data.ganttProperties.taskId === updateUnAssignedResources_1[i].ganttProperties.taskId;
2197
+ });
2198
+ }
2105
2199
  var parentTask = this_2.parent.getParentTask(updateUnAssignedResources_1[i].parentItem);
2106
2200
  if (parentTask && parentTask.ganttProperties.taskName !==
2107
2201
  this_2.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
@@ -2110,9 +2204,9 @@ var Edit = /** @class */ (function () {
2110
2204
  this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
2111
2205
  }
2112
2206
  }
2113
- else if (!parentTask && isDuplicate.length === 0) {
2207
+ else if (!parentTask && (!isDuplicate || isDuplicate.length === 0)) {
2114
2208
  this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
2115
- if (updateUnAssignedResources_1[i].parentItem) {
2209
+ if (updateUnAssignedResources_1[i].parentItem && unassignedTask) {
2116
2210
  this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
2117
2211
  }
2118
2212
  }
@@ -2125,7 +2219,12 @@ var Edit = /** @class */ (function () {
2125
2219
  this.parent.trigger('actionComplete', eventArgs);
2126
2220
  this.deletedTaskDetails = [];
2127
2221
  this.parent.initiateEditAction(false);
2128
- this.parent.hideSpinner();
2222
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
2223
+ this.parent.hideMaskRow();
2224
+ }
2225
+ else {
2226
+ this.parent.hideSpinner();
2227
+ }
2129
2228
  };
2130
2229
  /**
2131
2230
  *
@@ -2580,8 +2679,8 @@ var Edit = /** @class */ (function () {
2580
2679
  var originalData = this_3.parent.modifiedRecords[i];
2581
2680
  var treeIndex = this_3.parent.allowRowDragAndDrop ? 1 : 0;
2582
2681
  var uniqueTaskID = this_3.parent.taskFields.id;
2583
- originalIndex = this_3.parent.currentViewData.findIndex(function (data) {
2584
- return (data[uniqueTaskID] == originalData[uniqueTaskID]);
2682
+ var originalIndex = this_3.parent.currentViewData.findIndex(function (data) {
2683
+ return (data[uniqueTaskID] === originalData[uniqueTaskID]);
2585
2684
  });
2586
2685
  if (this_3.parent.treeGrid.getRows()[originalIndex]) {
2587
2686
  this_3.parent.treeGrid.renderModule.cellRender({
@@ -2594,7 +2693,7 @@ var Edit = /** @class */ (function () {
2594
2693
  });
2595
2694
  }
2596
2695
  };
2597
- var this_3 = this, originalIndex;
2696
+ var this_3 = this;
2598
2697
  for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
2599
2698
  _loop_3(i);
2600
2699
  }
@@ -2706,8 +2805,13 @@ var Edit = /** @class */ (function () {
2706
2805
  }
2707
2806
  var args = {};
2708
2807
  args = this.constructTaskAddedEventArgs(cAddedRecord_1, this.parent.editedRecords, 'beforeAdd');
2709
- this.parent.showSpinner();
2710
2808
  this.parent.trigger('actionBegin', args, function (args) {
2809
+ if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
2810
+ _this.parent.showMaskRow();
2811
+ }
2812
+ else {
2813
+ _this.parent.showSpinner();
2814
+ }
2711
2815
  if (!isNullOrUndefined(args.data[tempTaskID])) {
2712
2816
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
2713
2817
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
@@ -2911,7 +3015,7 @@ var Edit = /** @class */ (function () {
2911
3015
  switch (rowPosition) {
2912
3016
  case 'Top':
2913
3017
  case 'Bottom':
2914
- if (this.parent.viewType === "ResourceView") {
3018
+ if (this.parent.viewType === 'ResourceView') {
2915
3019
  level = 1;
2916
3020
  }
2917
3021
  else {
@@ -2994,6 +3098,12 @@ var Edit = /** @class */ (function () {
2994
3098
  this.parent.dataOperation.updateWorkWithDuration(cAddedRecord[0]);
2995
3099
  }
2996
3100
  this.parent.trigger('actionComplete', args);
3101
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
3102
+ this.parent.hideMaskRow();
3103
+ }
3104
+ else {
3105
+ this.parent.hideSpinner();
3106
+ }
2997
3107
  if (this.dialogModule.dialog && !this.dialogModule.dialogObj.isDestroyed) {
2998
3108
  this.dialogModule.dialogObj.hide();
2999
3109
  }
@@ -3153,6 +3263,12 @@ var Edit = /** @class */ (function () {
3153
3263
  cancel: false
3154
3264
  };
3155
3265
  this.parent.trigger('actionBegin', actionArgs, function (actionArg) {
3266
+ if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
3267
+ _this.parent.showMaskRow();
3268
+ }
3269
+ else {
3270
+ _this.parent.showSpinner();
3271
+ }
3156
3272
  if (!actionArg.cancel) {
3157
3273
  _this.reArrangeRows(args_1, isByMethod_1);
3158
3274
  }
@@ -3325,6 +3441,12 @@ var Edit = /** @class */ (function () {
3325
3441
  }
3326
3442
  }
3327
3443
  this.parent.trigger('actionComplete', args);
3444
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
3445
+ this.parent.hideMaskRow();
3446
+ }
3447
+ else {
3448
+ this.parent.hideSpinner();
3449
+ }
3328
3450
  this.parent.editedRecords = [];
3329
3451
  };
3330
3452
  Edit.prototype.refreshDataSource = function () {
@@ -1,4 +1,5 @@
1
1
  import { TreeGrid, ExcelExport as TreeGridExcel } from '@syncfusion/ej2-treegrid';
2
+ import { isNullOrUndefined } from '@syncfusion/ej2-base';
2
3
  /**
3
4
  * Gantt Excel Export module
4
5
  *
@@ -44,6 +45,12 @@ var ExcelExport = /** @class */ (function () {
44
45
  var _this = this;
45
46
  this.parent.treeGrid.beforeExcelExport = function (args) {
46
47
  _this.parent.trigger('beforeExcelExport', args);
48
+ if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
49
+ _this.parent.showMaskRow();
50
+ }
51
+ else {
52
+ _this.parent.showSpinner();
53
+ }
47
54
  };
48
55
  this.parent.treeGrid.excelQueryCellInfo = function (args) {
49
56
  _this.parent.trigger('excelQueryCellInfo', args);
@@ -53,6 +60,12 @@ var ExcelExport = /** @class */ (function () {
53
60
  };
54
61
  this.parent.treeGrid.excelExportComplete = function (args) {
55
62
  _this.parent.trigger('excelExportComplete', args);
63
+ if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
64
+ _this.parent.hideMaskRow();
65
+ }
66
+ else {
67
+ _this.parent.hideSpinner();
68
+ }
56
69
  };
57
70
  };
58
71
  return ExcelExport;
@@ -101,6 +101,7 @@ var Filter = /** @class */ (function () {
101
101
  var flValInput = createElement('input', { className: 'flm-input' });
102
102
  args.target.appendChild(flValInput);
103
103
  dropDateInstance = new DatePicker({ placeholder: _this.parent.localeObj.getConstant('enterValue'), format: format });
104
+ dropDateInstance.enableRtl = _this.parent.enableRtl;
104
105
  dropDateInstance.appendTo(flValInput);
105
106
  },
106
107
  write: function (args) {
@@ -124,6 +125,7 @@ var Filter = /** @class */ (function () {
124
125
  var flValInput = createElement('input', { className: 'flm-input' });
125
126
  args.target.appendChild(flValInput);
126
127
  dropInstance = new DateTimePicker({ placeholder: _this.parent.localeObj.getConstant('enterValue'), format: format });
128
+ dropInstance.enableRtl = _this.parent.enableRtl;
127
129
  dropInstance.appendTo(flValInput);
128
130
  },
129
131
  write: function (args) {
@@ -146,6 +148,7 @@ var Filter = /** @class */ (function () {
146
148
  flValInput.setAttribute('placeholder', _this.parent.localeObj.getConstant('enterValue'));
147
149
  args.target.appendChild(flValInput);
148
150
  textBoxInstance = new TextBox();
151
+ textBoxInstance.enableRtl = _this.parent.enableRtl;
149
152
  textBoxInstance.appendTo(flValInput);
150
153
  },
151
154
  write: function (args) {
@@ -230,6 +230,7 @@ var FocusModule = /** @class */ (function () {
230
230
  var top_1 = containerPosition.top + (containerPosition.height / 2);
231
231
  var left = containerPosition.left + (containerPosition.width / 2);
232
232
  this.setActiveElement(e.target);
233
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
233
234
  contextMenu.open(top_1, left);
234
235
  e.preventDefault();
235
236
  break;
@@ -53,6 +53,12 @@ var PdfExport = /** @class */ (function () {
53
53
  cancel: false
54
54
  };
55
55
  this.parent.trigger('beforePdfExport', args);
56
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
57
+ this.parent.showMaskRow();
58
+ }
59
+ else {
60
+ this.parent.showSpinner();
61
+ }
56
62
  if (getValue('cancel', args)) {
57
63
  /* eslint-disable-next-line */
58
64
  return new Promise(function (resolve, reject) {
@@ -85,6 +91,12 @@ var PdfExport = /** @class */ (function () {
85
91
  }
86
92
  this.processExport(data, pdfExportProperties, isMultipleExport).then(function () {
87
93
  _this.parent.trigger('pdfExportComplete', {});
94
+ if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
95
+ _this.parent.hideMaskRow();
96
+ }
97
+ else {
98
+ _this.parent.hideSpinner();
99
+ }
88
100
  resolve(_this.pdfDocument);
89
101
  });
90
102
  };
@@ -151,6 +151,12 @@ var RowDD = /** @class */ (function () {
151
151
  if (!args.cancel) {
152
152
  args.requestType = 'beforeDrop';
153
153
  this.parent.trigger('actionBegin', args);
154
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
155
+ this.parent.showMaskRow();
156
+ }
157
+ else {
158
+ this.parent.showSpinner();
159
+ }
154
160
  if (!args.cancel) {
155
161
  this.dropRows(args, true); // method to update the data collections based on drop action
156
162
  args.cancel = true;
@@ -378,7 +384,7 @@ var RowDD = /** @class */ (function () {
378
384
  }
379
385
  var validateRecords = void 0;
380
386
  if (toParent_1.uniqueID === draggedParent.uniqueID || (draggedParent.parentItem &&
381
- toParent_1.uniqueID == this.parent.flatData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
387
+ toParent_1.uniqueID === this.parent.flatData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
382
388
  validateRecords = this.parent.currentViewData.filter(function (data) {
383
389
  if ((data.ganttProperties.predecessor && data.ganttProperties.predecessor.length > 0)) {
384
390
  for (var i = 0; i < data.ganttProperties.predecessor.length; i++) {
@@ -800,7 +806,7 @@ var RowDD = /** @class */ (function () {
800
806
  }
801
807
  var idx = void 0;
802
808
  var ganttData = dataSource.length > 0 && this.parent.viewType !== 'ResourceView' ?
803
- dataSource : this.parent.flatData;
809
+ dataSource : this.parent.updatedRecords;
804
810
  for (var i = 0; i < ganttData.length; i++) {
805
811
  if (this.parent.viewType === 'ResourceView') {
806
812
  if (ganttData[i].ganttProperties.rowUniqueID === deletedRow.ganttProperties.rowUniqueID) {