@syncfusion/ej2-treegrid 32.2.7 → 32.2.9

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 : 32.2.7
3
+ * version : 32.2.9
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-treegrid",
3
- "version": "32.2.7",
3
+ "version": "32.2.9",
4
4
  "description": "Essential JS 2 TreeGrid Component",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,10 +8,10 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-treegrid.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~32.2.6",
11
+ "@syncfusion/ej2-base": "~32.2.9",
12
12
  "@syncfusion/ej2-data": "~32.2.3",
13
- "@syncfusion/ej2-grids": "~32.2.7",
14
- "@syncfusion/ej2-popups": "~32.2.7"
13
+ "@syncfusion/ej2-grids": "~32.2.9",
14
+ "@syncfusion/ej2-popups": "~32.2.8"
15
15
  },
16
16
  "devDependencies": {},
17
17
  "keywords": [
@@ -95,11 +95,22 @@ var ExcelExport = /** @class */ (function () {
95
95
  var query = new Query();
96
96
  if (!_this.isLocal()) {
97
97
  query = _this.generateQuery(query);
98
- query.queries = _this.parent.grid.getDataModule().generateQuery().queries;
99
- query = ExportHelper.getQuery(_this.parent.grid, data);
100
- if (isNullOrUndefined(_this.parent.filterModule)) {
101
- query.queries = query.queries.slice(1, 2);
102
- query.params = query.params.slice(0, 0);
98
+ var hasFilter = _this.parent.grid.filterSettings &&
99
+ Array.isArray(_this.parent.grid.filterSettings.columns) &&
100
+ _this.parent.grid.filterSettings.columns.length > 0;
101
+ var hasSearch = _this.parent.grid.searchSettings &&
102
+ typeof _this.parent.grid.searchSettings.key === 'string' &&
103
+ _this.parent.grid.searchSettings.key.trim().length > 0;
104
+ var hasSorting = _this.parent.grid.sortSettings &&
105
+ Array.isArray(_this.parent.grid.sortSettings.columns) &&
106
+ _this.parent.grid.sortSettings.columns.length > 0;
107
+ if (hasFilter || hasSearch || hasSorting) {
108
+ query.queries = _this.parent.grid.getDataModule().generateQuery().queries;
109
+ query = ExportHelper.getQuery(_this.parent.grid, data);
110
+ if (isNullOrUndefined(_this.parent.filterModule)) {
111
+ query.queries = query.queries.slice(1, 2);
112
+ query.params = query.params.slice(0, 0);
113
+ }
103
114
  }
104
115
  setValue('query', query, property);
105
116
  }
@@ -136,11 +147,30 @@ var ExcelExport = /** @class */ (function () {
136
147
  return query;
137
148
  };
138
149
  ExcelExport.prototype.manipulateExportProperties = function (property, dtSrc, queryResult) {
150
+ var _this = this;
139
151
  //count not required for this query
140
152
  var args = Object();
141
153
  if (!isNullOrUndefined(this.parent.grid.getDataModule())) {
142
154
  setValue('query', this.parent.grid.getDataModule().generateQuery(true), args);
143
155
  }
156
+ if (!this.isLocal() && !isNullOrUndefined(property) &&
157
+ !isNullOrUndefined(property.isCollapsedStatePersist) &&
158
+ property.isCollapsedStatePersist === false) {
159
+ if (args.query && args.query.queries && args.query.queries.length) {
160
+ args.query.queries = args.query.queries.filter(function (q) {
161
+ if (q.fn === 'onWhere' && q.e) {
162
+ var preds = q.e;
163
+ if (preds && preds.field === _this.parent.parentIdMapping && (preds.value === null || preds.value === 'null')) {
164
+ return false;
165
+ }
166
+ }
167
+ return true;
168
+ });
169
+ }
170
+ if (args.query && args.query.params && args.query.params.length) {
171
+ args.query.params = args.query.params.filter(function (param) { return param.key !== 'IdMapping'; });
172
+ }
173
+ }
144
174
  setValue('isExport', true, args);
145
175
  if (!isNullOrUndefined(property) && !isNullOrUndefined(property.exportType)) {
146
176
  setValue('exportType', property.exportType, args);
@@ -123,7 +123,7 @@ var PdfExport = /** @class */ (function () {
123
123
  };
124
124
  PdfExport.prototype.manipulatePdfProperties = function (prop, dtSrc, queryResult) {
125
125
  var _this = this;
126
- var args = {};
126
+ var args = Object();
127
127
  //count not required for this query
128
128
  var isLocal = !isRemoteData(this.parent) && isOffline(this.parent);
129
129
  setValue('query', this.parent.grid.getDataModule().generateQuery(true), args);
@@ -2582,11 +2582,6 @@ var TreeGrid = /** @class */ (function (_super) {
2582
2582
  rowData.hasChildRecords = record.hasChildRecords;
2583
2583
  rowData.parentUniqueID = record.parentUniqueID;
2584
2584
  rowData.expanded = record.expanded;
2585
- if (this.enableVirtualization) {
2586
- this.grid.selectionModule.selectedRowIndexes = this.grid.selectionModule.selectedRowIndexes.indexOf(record.index) === -1
2587
- && (this.selectedRowIndex >= 0 && this.selectedRowIndex !== record.index) ? [record.index] :
2588
- this.grid.selectionModule.selectedRowIndexes;
2589
- }
2590
2585
  this.grid.setRowData(key, rowData);
2591
2586
  var visibleRecords = this.getVisibleRecords();
2592
2587
  if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])["" + primaryKey]) {
@@ -787,6 +787,9 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
787
787
  (this.parent.pageSettings.pageSize / 2) && (this.endIndex - nextSetResIndex) < (this.parent.pageSettings.pageSize / 2)) {
788
788
  this.startIndex = lastIndex - (this.parent.pageSettings.pageSize / 2);
789
789
  }
790
+ if (this.totalRecords < this.parent.pageSettings.pageSize) {
791
+ this.startIndex = 0;
792
+ }
790
793
  if (scrollArgs.offset.top > (rowHeight * this.totalRecords)) {
791
794
  this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
792
795
  }