@syncfusion/ej2-gantt 19.4.43 → 19.4.47

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 (60) hide show
  1. package/CHANGELOG.md +15 -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 +36 -9
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +36 -9
  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 +14 -14
  12. package/src/gantt/actions/chart-scroll.js +1 -0
  13. package/src/gantt/actions/edit.d.ts +1 -1
  14. package/src/gantt/actions/edit.js +5 -1
  15. package/src/gantt/actions/filter.js +1 -1
  16. package/src/gantt/actions/rowdragdrop.js +1 -1
  17. package/src/gantt/actions/taskbar-edit.js +3 -1
  18. package/src/gantt/base/gantt-chart.js +6 -0
  19. package/src/gantt/base/gantt.js +17 -5
  20. package/src/gantt/renderer/edit-tooltip.js +1 -0
  21. package/src/gantt/renderer/tooltip.js +1 -0
  22. package/styles/bootstrap-dark.css +9 -1
  23. package/styles/bootstrap.css +9 -1
  24. package/styles/bootstrap4.css +9 -1
  25. package/styles/bootstrap5-dark.css +9 -1
  26. package/styles/bootstrap5.css +9 -1
  27. package/styles/fabric-dark.css +9 -1
  28. package/styles/fabric.css +9 -1
  29. package/styles/gantt/_bootstrap-dark-definition.scss +0 -1
  30. package/styles/gantt/_bootstrap-definition.scss +0 -1
  31. package/styles/gantt/_bootstrap4-definition.scss +0 -1
  32. package/styles/gantt/_bootstrap5-definition.scss +0 -1
  33. package/styles/gantt/_fabric-dark-definition.scss +0 -1
  34. package/styles/gantt/_fabric-definition.scss +0 -1
  35. package/styles/gantt/_fluent-definition.scss +0 -1
  36. package/styles/gantt/_highcontrast-definition.scss +0 -1
  37. package/styles/gantt/_highcontrast-light-definition.scss +0 -1
  38. package/styles/gantt/_layout.scss +8 -1
  39. package/styles/gantt/_material-dark-definition.scss +0 -1
  40. package/styles/gantt/_material-definition.scss +0 -1
  41. package/styles/gantt/_tailwind-definition.scss +0 -1
  42. package/styles/gantt/bootstrap-dark.css +9 -1
  43. package/styles/gantt/bootstrap.css +9 -1
  44. package/styles/gantt/bootstrap4.css +9 -1
  45. package/styles/gantt/bootstrap5-dark.css +9 -1
  46. package/styles/gantt/bootstrap5.css +9 -1
  47. package/styles/gantt/fabric-dark.css +9 -1
  48. package/styles/gantt/fabric.css +9 -1
  49. package/styles/gantt/highcontrast-light.css +9 -1
  50. package/styles/gantt/highcontrast.css +9 -1
  51. package/styles/gantt/material-dark.css +9 -1
  52. package/styles/gantt/material.css +9 -1
  53. package/styles/gantt/tailwind-dark.css +9 -1
  54. package/styles/gantt/tailwind.css +9 -1
  55. package/styles/highcontrast-light.css +9 -1
  56. package/styles/highcontrast.css +9 -1
  57. package/styles/material-dark.css +9 -1
  58. package/styles/material.css +9 -1
  59. package/styles/tailwind-dark.css +9 -1
  60. package/styles/tailwind.css +9 -1
@@ -4003,6 +4003,7 @@ class ChartScroll {
4003
4003
  */
4004
4004
  setScrollTop(scrollTop) {
4005
4005
  this.element.scrollTop = scrollTop;
4006
+ this.parent.treeGrid.element.querySelector('.e-content').scrollTop = scrollTop;
4006
4007
  }
4007
4008
  /**
4008
4009
  * To set scroll left for chart scroll container
@@ -4395,6 +4396,12 @@ class GanttChart {
4395
4396
  * @private
4396
4397
  */
4397
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
+ }
4398
4405
  if (!this.isGanttElement) {
4399
4406
  this.parent.notify('chartMouseUp', e);
4400
4407
  }
@@ -11489,6 +11496,7 @@ class Tooltip$1 {
11489
11496
  tooltipPositionY = tooltipPositionY + 10;
11490
11497
  }
11491
11498
  args.element.style.top = tooltipPositionY + 'px';
11499
+ args.element.style.visibility = 'visible';
11492
11500
  }
11493
11501
  /**
11494
11502
  * Method to get mouse pointor position
@@ -12260,7 +12268,13 @@ let Gantt = class Gantt extends Component {
12260
12268
  let settingsHeight;
12261
12269
  if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
12262
12270
  !this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
12263
- let ganttHeight = Number(this.height.split("%")[0]);
12271
+ let ganttHeight;
12272
+ if (this.element.parentElement.style.height.indexOf('%') == -1) {
12273
+ ganttHeight = Number(this.height.split("%")[0]);
12274
+ }
12275
+ else {
12276
+ ganttHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12277
+ }
12264
12278
  ganttHeight = (ganttHeight * window.innerHeight) / 100;
12265
12279
  if (this.height === '100%') {
12266
12280
  ganttHeight = ganttHeight - 16;
@@ -12415,10 +12429,16 @@ let Gantt = class Gantt extends Component {
12415
12429
  let settingsHeight;
12416
12430
  if (this.height.indexOf('%') !== -1) {
12417
12431
  let ganttHeight = Number(this.height.split("%")[0]);
12418
- if (this.element.parentElement && (this.element.parentElement.style.height
12419
- || this.element.parentElement.style.height.indexOf('%') !== -1)) {
12420
- let containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
12421
- ganttHeight = (ganttHeight * containerHeight) / 100;
12432
+ if (this.element.parentElement && (this.element.parentElement.style.height)) {
12433
+ let containerHeight;
12434
+ if (this.element.parentElement.style.height.indexOf('%') == -1) {
12435
+ containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
12436
+ ganttHeight = (ganttHeight * containerHeight) / 100;
12437
+ }
12438
+ else {
12439
+ containerHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12440
+ ganttHeight = (window.innerHeight * containerHeight) / 100;
12441
+ }
12422
12442
  }
12423
12443
  else {
12424
12444
  ganttHeight = Number(this.height.split("%")[0]);
@@ -15784,6 +15804,7 @@ class EditTooltip {
15784
15804
  tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
15785
15805
  }
15786
15806
  args.element.style.left = tooltipPositionX + 'px';
15807
+ args.element.style.visibility = 'visible';
15787
15808
  }
15788
15809
  /**
15789
15810
  * To show/hide taskbar edit tooltip.
@@ -16403,7 +16424,9 @@ class TaskbarEdit extends DateProcessor {
16403
16424
  if (this.isMouseDragged && this.taskBarEditAction) {
16404
16425
  const args = {
16405
16426
  cancel: false,
16406
- requestType: 'taskbarediting'
16427
+ requestType: 'taskbarediting',
16428
+ taskBarEditAction: this.taskBarEditAction,
16429
+ data: this.taskBarEditRecord
16407
16430
  };
16408
16431
  if (this.segmentIndex !== -1) {
16409
16432
  args.requestType = 'mergeSegment';
@@ -21565,7 +21588,7 @@ class Edit$2 {
21565
21588
  */
21566
21589
  updateParentChildRecord(data) {
21567
21590
  const ganttRecord = data;
21568
- if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto') {
21591
+ if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && this.parent.previousRecords[data.uniqueID].resources === ganttRecord.ganttProperties['resourceNames']) {
21569
21592
  this.updateChildItems(ganttRecord);
21570
21593
  }
21571
21594
  }
@@ -23484,6 +23507,10 @@ class Edit$2 {
23484
23507
  }
23485
23508
  this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
23486
23509
  }
23510
+ let flag = getValue('doubleClickTarget', this.parent.treeGrid.editModule);
23511
+ if (flag !== null) {
23512
+ setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
23513
+ }
23487
23514
  this.addSuccess(args);
23488
23515
  args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
23489
23516
  this.parent.trigger('actionComplete', args);
@@ -24380,7 +24407,7 @@ class Filter$1 {
24380
24407
  const ganttElement = closest(element, '#' + this.parent.element.id)
24381
24408
  || element.querySelector('#' + this.parent.element.id);
24382
24409
  if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element.nodeName === 'HTML'
24383
- || element.nodeName === 'DIV') {
24410
+ || ((element.nodeName === 'DIV') && (!element.classList.contains('e-day')))) {
24384
24411
  remove(this.filterMenuElement);
24385
24412
  this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
24386
24413
  this.filterMenuElement = null;
@@ -27124,7 +27151,7 @@ class RowDD$1 {
27124
27151
  if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
27125
27152
  const rowPosition = this.dropPosition === 'topSegment' ? 'Above' : 'Below';
27126
27153
  this.parent.editModule.addRowSelectedItem = droppedRecord;
27127
- this.parent.editModule.updateRealDataSource(draggedRecord, rowPosition);
27154
+ this.parent.editModule.updateRealDataSource([draggedRecord], rowPosition);
27128
27155
  delete this.parent.editModule.addRowSelectedItem;
27129
27156
  }
27130
27157
  }