@syncfusion/ej2-gantt 22.2.7 → 22.2.8

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.2.7
3
+ * version : 22.2.8
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-gantt@*",
3
- "_id": "@syncfusion/ej2-gantt@22.2.5",
3
+ "_id": "@syncfusion/ej2-gantt@22.2.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-UDwacL/LfLOpFmKDI1ZYpjmlQyZtiKw/Nl11Nm7qIyi2ujoFpfwtx6Ba0e9JdEDR3If8g24FolNt5LRLzO04lQ==",
5
+ "_integrity": "sha512-qEmtJ4SVLRUtGVQ4ydjKAujo32uBoR2yLYtG/4EZHulkKvcO7R7w5unKRejOf79CewBiNYJsXnaKa1qVEAPhPg==",
6
6
  "_location": "/@syncfusion/ej2-gantt",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-gantt",
24
24
  "/@syncfusion/ej2-vue-gantt"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.2.5.tgz",
27
- "_shasum": "95538b88216a3ffdfc5d9ee6cbb720c39e7a50e0",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-22.2.7.tgz",
27
+ "_shasum": "d1938874bfb2e708939be14a9a22d732ef197433",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
30
  "author": {
@@ -36,19 +36,19 @@
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
38
  "@syncfusion/ej2-base": "~22.2.5",
39
- "@syncfusion/ej2-buttons": "~22.2.5",
40
- "@syncfusion/ej2-calendars": "~22.2.5",
39
+ "@syncfusion/ej2-buttons": "~22.2.8",
40
+ "@syncfusion/ej2-calendars": "~22.2.8",
41
41
  "@syncfusion/ej2-data": "~22.2.5",
42
- "@syncfusion/ej2-dropdowns": "~22.2.5",
43
- "@syncfusion/ej2-grids": "~22.2.7",
42
+ "@syncfusion/ej2-dropdowns": "~22.2.8",
43
+ "@syncfusion/ej2-grids": "~22.2.8",
44
44
  "@syncfusion/ej2-inputs": "~22.2.7",
45
45
  "@syncfusion/ej2-layouts": "~22.2.5",
46
- "@syncfusion/ej2-lists": "~22.2.5",
47
- "@syncfusion/ej2-navigations": "~22.2.7",
46
+ "@syncfusion/ej2-lists": "~22.2.8",
47
+ "@syncfusion/ej2-navigations": "~22.2.8",
48
48
  "@syncfusion/ej2-notifications": "~22.2.5",
49
49
  "@syncfusion/ej2-popups": "~22.2.7",
50
50
  "@syncfusion/ej2-richtexteditor": "~22.2.5",
51
- "@syncfusion/ej2-svg-base": "~22.2.5",
51
+ "@syncfusion/ej2-svg-base": "~22.2.8",
52
52
  "@syncfusion/ej2-treegrid": "~22.2.7"
53
53
  },
54
54
  "deprecated": false,
@@ -74,6 +74,6 @@
74
74
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
75
75
  },
76
76
  "typings": "index.d.ts",
77
- "version": "22.2.7",
77
+ "version": "22.2.8",
78
78
  "sideEffects": false
79
79
  }
@@ -151,7 +151,13 @@ var ContextMenu = /** @class */ (function () {
151
151
  }
152
152
  break;
153
153
  case 'DeleteTask':
154
- this.parent.editModule.deleteRecord(this.rowData);
154
+ if ((this.parent.selectionSettings.mode !== 'Cell' && this.parent.selectionModule.selectedRowIndexes.length > 1)
155
+ || (this.parent.selectionSettings.mode === 'Cell' && this.parent.selectionModule.getSelectedRowCellIndexes().length)) {
156
+ this.parent.editModule.startDeleteAction();
157
+ }
158
+ else {
159
+ this.parent.editModule.deleteRecord(this.rowData);
160
+ }
155
161
  break;
156
162
  case 'ToTask':
157
163
  if (!isNullOrUndefined(this.rowData)) {
@@ -482,6 +482,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
482
482
  */
483
483
  TaskbarEdit.prototype.updateMouseDownProperties = function (event) {
484
484
  var e = this.getCoordinate(event);
485
+ var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
486
+ if (parentWithZoomStyle) {
487
+ var zoom1 = parseFloat(getComputedStyle(parentWithZoomStyle).zoom);
488
+ e.pageX = e.pageX / zoom1;
489
+ e.pageY = e.pageY / zoom1;
490
+ }
485
491
  if (e.pageX || e.pageY) {
486
492
  var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
487
493
  if (this.parent.enableRtl) {
@@ -693,6 +699,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
693
699
  TaskbarEdit.prototype.updateMouseMoveProperties = function (event) {
694
700
  var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
695
701
  var e = this.getCoordinate(event);
702
+ var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
703
+ if (parentWithZoomStyle) {
704
+ var zoom1 = parseFloat(getComputedStyle(parentWithZoomStyle).zoom);
705
+ e.pageX = e.pageX / zoom1;
706
+ e.pageY = e.pageY / zoom1;
707
+ }
696
708
  if (e.pageX || e.pageY) {
697
709
  if (this.parent.enableRtl) {
698
710
  this.mouseMoveX = Math.abs(e.pageX - (containerPosition.left +
@@ -2084,6 +2096,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
2084
2096
  };
2085
2097
  // eslint-disable-next-line
2086
2098
  TaskbarEdit.prototype.triggerDependencyEvent = function (e, mouseUp) {
2099
+ var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
2100
+ var zoomedPageY;
2101
+ if (parentWithZoomStyle) {
2102
+ var zoom1 = parseFloat(getComputedStyle(parentWithZoomStyle).zoom);
2103
+ zoomedPageY = e.pageY / zoom1;
2104
+ }
2087
2105
  var fromItem = this.taskBarEditRecord.ganttProperties;
2088
2106
  var toItem = this.connectorSecondRecord ? this.connectorSecondRecord.ganttProperties : null;
2089
2107
  var predecessor;
@@ -2145,7 +2163,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
2145
2163
  table[1].innerText = toItem.taskName;
2146
2164
  table[2].innerText = this.parent.localeObj.getConstant(currentTarget);
2147
2165
  var tooltipElement = this.parent.connectorLineModule.tooltipTable.parentElement.parentElement;
2148
- if (tooltipElement.offsetTop + tooltipElement.offsetHeight > e.pageY) {
2166
+ if (tooltipElement.offsetTop + tooltipElement.offsetHeight > zoomedPageY) {
2149
2167
  tooltipElement.style.top = (e.pageY - tooltipElement.offsetHeight - 20) + 'px';
2150
2168
  }
2151
2169
  }
@@ -46,6 +46,7 @@ export declare const chartRowCell: string;
46
46
  export declare const chartRow: string;
47
47
  export declare const rowExpand: string;
48
48
  export declare const rowCollapse: string;
49
+ export declare const collapseParent: string;
49
50
  export declare const taskBarLeftResizer: string;
50
51
  export declare const taskBarRightResizer: string;
51
52
  export declare const childProgressResizer: string;
@@ -48,6 +48,7 @@ export var chartRowCell = 'e-chart-row-cell';
48
48
  export var chartRow = 'e-chart-row';
49
49
  export var rowExpand = 'e-row-expand';
50
50
  export var rowCollapse = 'e-row-collapse';
51
+ export var collapseParent = 'e-collapse-parent';
51
52
  export var taskBarLeftResizer = 'e-taskbar-left-resizer';
52
53
  export var taskBarRightResizer = 'e-taskbar-right-resizer';
53
54
  export var childProgressResizer = 'e-child-progress-resizer';
@@ -831,6 +831,13 @@ var Gantt = /** @class */ (function (_super) {
831
831
  if (this.enableCriticalPath && criticalModule && criticalModule.criticalPathCollection) {
832
832
  this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
833
833
  }
834
+ this.calculateDimensions();
835
+ var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
836
+ var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
837
+ this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
838
+ this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
839
+ this.splitterModule.splitterObject.paneSettings[0].size = this.splitterModule['getSpliterPositionInPercentage'](this.splitterModule.splitterPreviousPositionGrid);
840
+ this.splitterModule.splitterObject.paneSettings[1].size = this.splitterModule.splitterPreviousPositionChart;
834
841
  }
835
842
  };
836
843
  Gantt.prototype.keyActionHandler = function (e) {
@@ -1698,6 +1698,18 @@ var ChartRows = /** @class */ (function (_super) {
1698
1698
  }
1699
1699
  }
1700
1700
  else if (taskbarElement) {
1701
+ if (taskbarElement && this.parent.enableVirtualization && !args.data.expanded) {
1702
+ var childElement = trElement.querySelector('.' + cls.collapseParent);
1703
+ if (childElement) {
1704
+ for (var i = 0; i < childElement.childNodes.length; i++) {
1705
+ var taskbar = childElement.childNodes[i];
1706
+ var mainTaskbar = taskbar.querySelector('.' + cls.traceChildTaskBar);
1707
+ if (mainTaskbar) {
1708
+ mainTaskbar.style.backgroundColor = args.taskbarBgColor;
1709
+ }
1710
+ }
1711
+ }
1712
+ }
1701
1713
  if (taskbarElement.querySelector(classCollections[0]) &&
1702
1714
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
1703
1715
  taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
@@ -50,13 +50,13 @@ var EditTooltip = /** @class */ (function () {
50
50
  * @returns {void} .
51
51
  */
52
52
  EditTooltip.prototype.updateTooltipPosition = function (args) {
53
- var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
54
- var leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
55
- var tooltipPositionX = args.element.offsetLeft;
56
- if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
57
- tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
58
- }
59
- args.element.style.left = tooltipPositionX + 'px';
53
+ // const containerPosition: { top: number, left: number } = this.parent.getOffsetRect(this.parent.chartPane);
54
+ // const leftEnd: number = containerPosition.left + this.parent.chartPane.offsetWidth;
55
+ // let tooltipPositionX: number = args.element.offsetLeft;
56
+ // if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
57
+ // tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
58
+ // }
59
+ // args.element.style.left = tooltipPositionX + 'px';
60
60
  args.element.style.visibility = 'visible';
61
61
  };
62
62
  /**
@@ -185,35 +185,34 @@ var Tooltip = /** @class */ (function () {
185
185
  */
186
186
  Tooltip.prototype.updateTooltipPosition = function (args) {
187
187
  args.element.style.visibility = 'visible';
188
- if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
189
- return;
190
- }
191
- var postion = this.getPointorPosition(this.tooltipMouseEvent);
192
- var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
193
- var topEnd = containerPosition.top + this.parent.chartPane.offsetHeight;
194
- var leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
195
- var tooltipPositionX = postion.x;
196
- var tooltipPositionY = postion.y;
197
- if (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
198
- while (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
199
- tooltipPositionX = leftEnd - args.element.offsetWidth - 10;
200
- args.element.style.left = tooltipPositionX + 'px';
201
- }
202
- }
203
- else {
204
- tooltipPositionX = tooltipPositionX + 10;
205
- args.element.style.left = tooltipPositionX + 'px';
206
- }
207
- if (window.innerHeight < args.element.offsetHeight + tooltipPositionY) {
208
- tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
209
- }
210
- if ((topEnd < (tooltipPositionY + args.element.offsetHeight + 20))) {
211
- tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
212
- }
213
- else {
214
- tooltipPositionY = tooltipPositionY + 10;
215
- }
216
- args.element.style.top = tooltipPositionY + 'px';
188
+ // if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
189
+ // return;
190
+ // }
191
+ // const postion: { x: number, y: number } = this.getPointorPosition(this.tooltipMouseEvent);
192
+ // const containerPosition: { top: number, left: number, width?: number, height?: number } =
193
+ // this.parent.getOffsetRect(this.parent.chartPane);
194
+ // const topEnd: number = containerPosition.top + this.parent.chartPane.offsetHeight;
195
+ // const leftEnd: number = containerPosition.left + this.parent.chartPane.offsetWidth;
196
+ // let tooltipPositionX: number = postion.x;
197
+ // let tooltipPositionY: number = postion.y;
198
+ // if (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
199
+ // while (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
200
+ // tooltipPositionX = leftEnd - args.element.offsetWidth - 10;
201
+ // args.element.style.left = tooltipPositionX + 'px';
202
+ // }
203
+ // } else {
204
+ // tooltipPositionX = tooltipPositionX + 10;
205
+ // args.element.style.left = tooltipPositionX + 'px';
206
+ // }
207
+ // if (window.innerHeight < args.element.offsetHeight + tooltipPositionY) {
208
+ // tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
209
+ // }
210
+ // if ((topEnd < (tooltipPositionY + args.element.offsetHeight + 20))) {
211
+ // tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
212
+ // } else {
213
+ // tooltipPositionY = tooltipPositionY + 10;
214
+ // }
215
+ // args.element.style.top = tooltipPositionY + 'px';
217
216
  };
218
217
  /**
219
218
  * Method to get mouse pointor position