@syncfusion/ej2-gantt 19.3.47 → 19.3.56

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 (43) hide show
  1. package/CHANGELOG.md +35 -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 +38 -3
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +88 -44
  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/context-menu.js +6 -1
  13. package/src/gantt/actions/dialog-edit.js +3 -1
  14. package/src/gantt/actions/rowdragdrop.js +74 -41
  15. package/src/gantt/actions/taskbar-edit.js +3 -1
  16. package/src/gantt/base/gantt.js +2 -0
  17. package/styles/bootstrap-dark.css +1 -1
  18. package/styles/bootstrap.css +1 -1
  19. package/styles/bootstrap4.css +1 -1
  20. package/styles/bootstrap5-dark.css +2 -1
  21. package/styles/bootstrap5.css +2 -1
  22. package/styles/fabric-dark.css +1 -1
  23. package/styles/fabric.css +1 -1
  24. package/styles/gantt/_layout.scss +1 -1
  25. package/styles/gantt/bootstrap-dark.css +1 -1
  26. package/styles/gantt/bootstrap.css +1 -1
  27. package/styles/gantt/bootstrap4.css +1 -1
  28. package/styles/gantt/bootstrap5-dark.css +2 -1
  29. package/styles/gantt/bootstrap5.css +2 -1
  30. package/styles/gantt/fabric-dark.css +1 -1
  31. package/styles/gantt/fabric.css +1 -1
  32. package/styles/gantt/highcontrast-light.css +1 -1
  33. package/styles/gantt/highcontrast.css +1 -1
  34. package/styles/gantt/material-dark.css +1 -1
  35. package/styles/gantt/material.css +1 -1
  36. package/styles/gantt/tailwind-dark.css +1 -1
  37. package/styles/gantt/tailwind.css +1 -1
  38. package/styles/highcontrast-light.css +1 -1
  39. package/styles/highcontrast.css +1 -1
  40. package/styles/material-dark.css +1 -1
  41. package/styles/material.css +1 -1
  42. package/styles/tailwind-dark.css +1 -1
  43. package/styles/tailwind.css +1 -1
@@ -12686,6 +12686,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12686
12686
  Gantt.prototype.renderGantt = function (isChange) {
12687
12687
  // predecessor calculation
12688
12688
  if (this.predecessorModule && this.taskFields.dependency) {
12689
+ this.predecessorModule['parentIds'] = [];
12690
+ this.predecessorModule['parentRecord'] = [];
12689
12691
  this.predecessorModule.updatePredecessors();
12690
12692
  if (this.isInPredecessorValidation && this.enableValidation) {
12691
12693
  this.predecessorModule.updatedRecordsDateByPredecessor();
@@ -16590,6 +16592,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
16590
16592
  TaskbarEdit.prototype.showHideTaskBarEditingElements = function (element, secondElement, fadeConnectorLine) {
16591
16593
  secondElement = secondElement ? secondElement : this.editElement;
16592
16594
  var isShowProgressResizer = this.parent.taskFields.progress ? true : false;
16595
+ var isShowConnectorPoints = true;
16593
16596
  if (this.parent.readOnly) {
16594
16597
  return;
16595
16598
  }
@@ -16599,6 +16602,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
16599
16602
  if (!isNullOrUndefined(parentRecord)) {
16600
16603
  if (!parentRecord.expanded) {
16601
16604
  isShowProgressResizer = false;
16605
+ isShowConnectorPoints = false;
16602
16606
  }
16603
16607
  }
16604
16608
  }
@@ -16625,7 +16629,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
16625
16629
  if (!isNullOrUndefined(this.parent.taskFields.dependency)
16626
16630
  && (element.querySelector('.' + connectorPointLeft)
16627
16631
  || element.parentElement.querySelector('.' + connectorPointLeft))
16628
- && isShowProgressResizer) {
16632
+ && isShowConnectorPoints) {
16629
16633
  var connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
16630
16634
  element : element.parentElement;
16631
16635
  addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
@@ -18226,7 +18230,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18226
18230
  datetimepickeredit: DateTimePicker,
18227
18231
  maskededit: MaskedTextBox,
18228
18232
  numericedit: NumericTextBox,
18229
- stringedit: TextBox
18233
+ stringedit: TextBox,
18234
+ defaultedit: TextBox
18230
18235
  };
18231
18236
  this.processDialogFields();
18232
18237
  this.wireEvents();
@@ -18882,6 +18887,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18882
18887
  fieldsModel[column.field] = checkboxModel;
18883
18888
  break;
18884
18889
  }
18890
+ case 'defaultedit':
18885
18891
  case 'stringedit':
18886
18892
  {
18887
18893
  var textBox = common;
@@ -26597,6 +26603,11 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
26597
26603
  var target = args.event ? args.event.target :
26598
26604
  !this.parent.focusModule ? this.parent.focusModule.getActiveElement() :
26599
26605
  this.parent.ganttChartModule.targetElement;
26606
+ // Closed edited cell before opening context menu
26607
+ // eslint-disable-next-line
26608
+ if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
26609
+ this.parent.treeGrid.closeEdit();
26610
+ }
26600
26611
  if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
26601
26612
  this.clickedPosition = getValue('event', args).clientX;
26602
26613
  }
@@ -26837,7 +26848,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
26837
26848
  };
26838
26849
  ContextMenu$$1.prototype.contextMenuOpen = function (args) {
26839
26850
  this.isOpen = true;
26840
- var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide)')[0];
26851
+ var firstMenuItem = args.element.querySelectorAll('li:not(.e-menu-hide):not(.e-disabled)')[0];
26841
26852
  addClass([firstMenuItem], 'e-focused');
26842
26853
  };
26843
26854
  ContextMenu$$1.prototype.getMenuItems = function () {
@@ -27290,80 +27301,113 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27290
27301
  }
27291
27302
  var count = 0;
27292
27303
  var dragLength = dragRecords.length;
27293
- for (var i = 0; i < dragLength; i++) {
27294
- this.parent.isOnEdit = true;
27304
+ var _loop_1 = function (i) {
27305
+ this_1.parent.isOnEdit = true;
27295
27306
  draggedRecord = dragRecords[i];
27296
- this.draggedRecord = draggedRecord;
27297
- if (this.dropPosition !== 'Invalid') {
27298
- if (this.parent.viewType === 'ResourceView') {
27299
- this.checkisSharedTask();
27300
- this.previousParent = this.draggedRecord.parentItem.uniqueID;
27307
+ this_1.draggedRecord = draggedRecord;
27308
+ if (this_1.dropPosition !== 'Invalid') {
27309
+ if (this_1.parent.viewType === 'ResourceView') {
27310
+ this_1.checkisSharedTask();
27311
+ this_1.previousParent = this_1.draggedRecord.parentItem.uniqueID;
27301
27312
  }
27302
- if (this.isSharedTask) {
27303
- return;
27313
+ if (this_1.isSharedTask) {
27314
+ return { value: void 0 };
27304
27315
  }
27305
27316
  if (isByMethod) {
27306
- this.deleteDragRow();
27317
+ this_1.deleteDragRow();
27307
27318
  }
27308
- var recordIndex1 = this.treeGridData.indexOf(droppedRecord);
27309
- if (this.dropPosition === 'topSegment') {
27310
- this.dropAtTop(recordIndex1);
27319
+ var recordIndex1 = this_1.treeGridData.indexOf(droppedRecord);
27320
+ if (this_1.dropPosition === 'topSegment') {
27321
+ this_1.dropAtTop(recordIndex1);
27311
27322
  }
27312
- if (this.dropPosition === 'bottomSegment') {
27313
- if (!this.isSharedTask) {
27323
+ if (this_1.dropPosition === 'bottomSegment') {
27324
+ if (!this_1.isSharedTask) {
27314
27325
  if (!droppedRecord.hasChildRecords) {
27315
- if (this.parent.taskFields.parentID && this.ganttData.length > 0) {
27316
- this.ganttData.splice(recordIndex1 + 1, 0, this.draggedRecord.taskData);
27326
+ if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
27327
+ this_1.ganttData.splice(recordIndex1 + 1, 0, this_1.draggedRecord.taskData);
27317
27328
  }
27318
- this.treeGridData.splice(recordIndex1 + 1, 0, this.draggedRecord);
27319
- this.parent.ids.splice(recordIndex1 + 1, 0, this.draggedRecord.ganttProperties.rowUniqueID.toString());
27320
- if (this.parent.viewType === 'ResourceView') {
27321
- var taskId = this.draggedRecord.level === 0 ? 'R' + this.draggedRecord.ganttProperties.taskId : 'T' + this.draggedRecord.ganttProperties.taskId;
27322
- this.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
27329
+ this_1.treeGridData.splice(recordIndex1 + 1, 0, this_1.draggedRecord);
27330
+ this_1.parent.ids.splice(recordIndex1 + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
27331
+ if (this_1.parent.viewType === 'ResourceView') {
27332
+ var taskId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
27333
+ this_1.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
27323
27334
  }
27324
27335
  }
27325
27336
  else {
27326
- count = this.parent.editModule.getChildCount(droppedRecord, 0);
27327
- if (this.parent.taskFields.parentID && this.ganttData.length > 0) {
27328
- this.ganttData.splice(recordIndex1 + count + 1, 0, this.draggedRecord.taskData);
27337
+ count = this_1.parent.editModule.getChildCount(droppedRecord, 0);
27338
+ if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
27339
+ this_1.ganttData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.taskData);
27329
27340
  }
27330
- this.treeGridData.splice(recordIndex1 + count + 1, 0, this.draggedRecord);
27341
+ this_1.treeGridData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord);
27331
27342
  /* eslint-disable-next-line */
27332
- this.parent.ids.splice(recordIndex1 + count + 1, 0, this.draggedRecord.ganttProperties.rowUniqueID.toString());
27333
- if (this.parent.viewType === 'ResourceView') {
27334
- var spliceId = this.draggedRecord.level === 0 ? 'R' + this.draggedRecord.ganttProperties.taskId : 'T' + this.draggedRecord.ganttProperties.taskId;
27335
- this.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
27343
+ this_1.parent.ids.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
27344
+ if (this_1.parent.viewType === 'ResourceView') {
27345
+ var spliceId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
27346
+ this_1.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
27336
27347
  }
27337
27348
  }
27338
- this.parent.setRecordValue('parentItem', this.treeGridData[recordIndex1].parentItem, draggedRecord);
27339
- this.parent.setRecordValue('parentUniqueID', this.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
27340
- this.parent.setRecordValue('level', this.treeGridData[recordIndex1].level, draggedRecord);
27349
+ this_1.parent.setRecordValue('parentItem', this_1.treeGridData[recordIndex1].parentItem, draggedRecord);
27350
+ this_1.parent.setRecordValue('parentUniqueID', this_1.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
27351
+ this_1.parent.setRecordValue('level', this_1.treeGridData[recordIndex1].level, draggedRecord);
27341
27352
  if (draggedRecord.hasChildRecords) {
27342
27353
  var level = 1;
27343
- this.updateChildRecordLevel(draggedRecord, level);
27344
- this.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
27354
+ this_1.updateChildRecordLevel(draggedRecord, level);
27355
+ this_1.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
27345
27356
  }
27346
27357
  if (droppedRecord.parentItem) {
27347
- var rec = this.parent.getParentTask(droppedRecord.parentItem).childRecords;
27358
+ var rec = this_1.parent.getParentTask(droppedRecord.parentItem).childRecords;
27348
27359
  var childRecords = rec;
27349
27360
  var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
27350
27361
  childRecords.splice(droppedRecordIndex, 0, draggedRecord);
27351
27362
  }
27352
27363
  }
27353
27364
  }
27354
- if (this.dropPosition === 'middleSegment') {
27355
- this.dropMiddle(recordIndex1);
27365
+ if (this_1.dropPosition === 'middleSegment') {
27366
+ this_1.dropMiddle(recordIndex1);
27356
27367
  if (droppedRecord.childRecords.length > 0) {
27357
27368
  delete droppedRecord.ganttProperties.segments;
27358
- delete droppedRecord.taskData[this.parent.taskFields.segments];
27369
+ delete droppedRecord.taskData[this_1.parent.taskFields.segments];
27359
27370
  }
27360
27371
  }
27361
27372
  // eslint-disable-next-line
27362
- if (!isNullOrUndefined(draggedRecord.parentItem && this.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
27363
- this.updateParentRecords.push(draggedRecord.parentItem);
27373
+ if (!isNullOrUndefined(draggedRecord.parentItem && this_1.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
27374
+ this_1.updateParentRecords.push(draggedRecord.parentItem);
27375
+ }
27376
+ }
27377
+ if (!this_1.parent.enableVirtualization) {
27378
+ var data_1 = gObj.flatData;
27379
+ var startIndex = void 0;
27380
+ var endIndex = void 0;
27381
+ if (draggedRecord.index < droppedRecord.index) {
27382
+ startIndex = draggedRecord.index;
27383
+ endIndex = droppedRecord.index;
27384
+ }
27385
+ else {
27386
+ startIndex = droppedRecord.index;
27387
+ endIndex = draggedRecord.index;
27388
+ }
27389
+ var _loop_2 = function (i_1) {
27390
+ if (!isNullOrUndefined(data_1[i_1])) {
27391
+ data_1[i_1].index = i_1;
27392
+ if (!isNullOrUndefined(data_1[i_1].parentItem)) {
27393
+ var updatedParent = data_1.filter(function (e) {
27394
+ return e.uniqueID === data_1[i_1].parentUniqueID;
27395
+ })[0];
27396
+ data_1[i_1].parentItem.index = updatedParent.index;
27397
+ }
27398
+ }
27399
+ };
27400
+ for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
27401
+ _loop_2(i_1);
27364
27402
  }
27365
27403
  }
27366
27404
  gObj.rowDragAndDropModule.refreshDataSource();
27405
+ };
27406
+ var this_1 = this;
27407
+ for (var i = 0; i < dragLength; i++) {
27408
+ var state_1 = _loop_1(i);
27409
+ if (typeof state_1 === "object")
27410
+ return state_1.value;
27367
27411
  }
27368
27412
  if (this.dropPosition === 'middleSegment') {
27369
27413
  if (droppedRecord.ganttProperties.predecessor) {