@syncfusion/ej2-treegrid 20.4.44 → 20.4.49

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 : 20.4.44
3
+ * version : 20.4.49
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-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@20.4.42",
3
+ "_id": "@syncfusion/ej2-treegrid@20.4.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-4BEI5jPbbwzL7FhOoFAfzaHx5w0qAMckaOCsGwkSnoWjvY8CFI8T2+Lqm5raJ68DPzs2MLl9Urf1o8V24eMmyQ==",
5
+ "_integrity": "sha512-NRlw/ywxzKYY5q9cUANRk/6tugpUmfAaTplVtlYLNV23/c6x7pcLRzFZH5zfknFEC/xGhX6g31jJ/0VkIAThRg==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.4.42.tgz",
28
- "_shasum": "26189c9b94c232d691adaf4996ed7bc9216d2faa",
27
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.4.48.tgz",
28
+ "_shasum": "726b6c765fdd07b8862064cd3bd1eba05e686e98",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~20.4.44",
40
- "@syncfusion/ej2-data": "~20.4.44",
41
- "@syncfusion/ej2-grids": "~20.4.44",
42
- "@syncfusion/ej2-popups": "~20.4.44"
39
+ "@syncfusion/ej2-base": "~20.4.48",
40
+ "@syncfusion/ej2-data": "~20.4.48",
41
+ "@syncfusion/ej2-grids": "~20.4.49",
42
+ "@syncfusion/ej2-popups": "~20.4.49"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -66,6 +66,6 @@
66
66
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
67
67
  },
68
68
  "typings": "index.d.ts",
69
- "version": "20.4.44",
69
+ "version": "20.4.49",
70
70
  "sideEffects": false
71
71
  }
@@ -1,6 +1,6 @@
1
1
  import { ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer, FreezeContentRender, FreezeRender, parentsUntil, RenderType } from '@syncfusion/ej2-grids';
2
2
  import { Grid, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';
3
- import { addClass, getValue } from '@syncfusion/ej2-base';
3
+ import { addClass, getValue, isNullOrUndefined } from '@syncfusion/ej2-base';
4
4
  import { ColumnVirtualTreeFreezeRenderer, VirtualTreeFreezeRenderer, VirtualTreeFreezeHdrRenderer } from '../renderer/virtual-tree-freeze-render';
5
5
  /**
6
6
  * TreeGrid Freeze module
@@ -87,14 +87,15 @@ var Freeze = /** @class */ (function () {
87
87
  rows = args.detailrows;
88
88
  }
89
89
  for (var i = 0; i < rows.length; i++) {
90
- var rData = this.parent.grid.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-Uid')).data;
91
- rows[parseInt(i.toString(), 10)].style.display = args.action;
92
- if (freeze && frozenRightRows.length) {
93
- frozenRightRows[parseInt(i.toString(), 10)].style.display = args.action;
90
+ var row = rows[parseInt(i.toString(), 10)];
91
+ var rData = this.parent.grid.getRowObjectFromUID(row.getAttribute('data-Uid')).data;
92
+ if (!isNullOrUndefined(movableRows) && row.parentElement.firstElementChild.clientHeight > 0) {
93
+ row.style.height = row.parentElement.firstElementChild.clientHeight + 'px';
94
94
  }
95
+ row.style.display = args.action;
95
96
  var queryselector = args.action === 'none' ? '.e-treecolumn-container .e-treegridcollapse'
96
97
  : '.e-treecolumn-container .e-treegridexpand';
97
- if (frozenrows[rows[parseInt(i.toString(), 10)].rowIndex].querySelector(queryselector)) {
98
+ if (frozenrows[row.rowIndex].querySelector(queryselector)) {
98
99
  var cRow = [];
99
100
  for (var i_1 = 0; i_1 < movableRows.length; i_1++) {
100
101
  if (movableRows[parseInt(i_1.toString(), 10)].querySelector('.e-gridrowindex' + rData.index + 'level' + (rData.level + 1))) {
@@ -2255,6 +2255,17 @@ var TreeGrid = /** @class */ (function (_super) {
2255
2255
  if (this.grid.columns.length !== this.columnModel.length) {
2256
2256
  this.stackedHeader = true;
2257
2257
  }
2258
+ if (this.stackedHeader && this.enablePersistence && this.allowResizing) {
2259
+ for (var i = 0; i < this.columns.length; i++) {
2260
+ if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].columns)) {
2261
+ for (var j = 0; j < this.columns[parseInt(i.toString(), 10)].columns.length; j++) {
2262
+ var stackedColumn = this.columns[parseInt(i.toString(), 10)].columns[parseInt(j.toString(), 10)];
2263
+ var currentColumn = this.grid.getColumnByField(stackedColumn.field);
2264
+ stackedColumn.width = currentColumn.width;
2265
+ }
2266
+ }
2267
+ }
2268
+ }
2258
2269
  if (!this.stackedHeader) {
2259
2270
  merge(this.columns, this.columnModel);
2260
2271
  }
@@ -2858,6 +2869,7 @@ var TreeGrid = /** @class */ (function (_super) {
2858
2869
  this.isCollapseAll = false;
2859
2870
  };
2860
2871
  TreeGrid.prototype.expandCollapse = function (action, row, record, isChild) {
2872
+ var _this = this;
2861
2873
  var expandingArgs = { row: row, data: record, childData: [], requestType: action };
2862
2874
  var childRecords = this.getCurrentViewRecords().filter(function (e) {
2863
2875
  return e.parentUniqueID === record.uniqueID;
@@ -2941,9 +2953,18 @@ var TreeGrid = /** @class */ (function (_super) {
2941
2953
  if ((!isCountRequired(this) || childRecords.length) || action === 'collapse') {
2942
2954
  this.localExpand(action, row, record);
2943
2955
  }
2956
+ var lastrowIdx = this.getVisibleRecords()[this.getVisibleRecords().length - 1]['index'];
2957
+ var lastRow = this.getRowByIndex(lastrowIdx);
2958
+ if (this.grid.getContentTable().clientHeight <= this.grid.getContent().clientHeight && !isNullOrUndefined(lastRow) && !lastRow.cells[0].classList.contains('e-lastrowcell')) {
2959
+ this.lastRowBorder(lastRow, true);
2960
+ }
2944
2961
  }
2945
2962
  if (isCountRequired(this) && action === 'expand') {
2946
- this.dataResults.result = this.getCurrentViewRecords();
2963
+ var currentData = this.getCurrentViewRecords();
2964
+ var visibleRecords = currentData.filter(function (e) {
2965
+ return getExpandStatus(_this, e, _this.parentData);
2966
+ });
2967
+ this.dataResults.result = visibleRecords;
2947
2968
  }
2948
2969
  if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
2949
2970
  targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');