@syncfusion/ej2-treegrid 32.2.4 → 32.2.7
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.
- package/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +42 -17
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +43 -17
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/treegrid/actions/pdf-export.d.ts +1 -0
- package/src/treegrid/actions/pdf-export.js +31 -0
- package/src/treegrid/actions/sort.d.ts +1 -0
- package/src/treegrid/actions/sort.js +6 -0
- package/src/treegrid/base/treegrid.js +6 -17
|
@@ -5851,23 +5851,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5851
5851
|
if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
|
|
5852
5852
|
_this.grid.refresh();
|
|
5853
5853
|
}
|
|
5854
|
-
if (args.action === 'filter') {
|
|
5855
|
-
if (!args.isCollapseMaintain && _this.filterModule['currentFilterObject'] !== '' && _this.enableVirtualization && !_this.initialRender && !_this.expandStateMapping && !(isRemoteData(_this) && _this.enableVirtualization)) {
|
|
5856
|
-
_this.expandAll();
|
|
5857
|
-
}
|
|
5858
|
-
}
|
|
5859
|
-
if (args.requestType === 'searching') {
|
|
5860
|
-
if (!args.isCollapseMaintain && _this.searchSettings.key !== '' && _this.enableVirtualization && !_this.initialRender && !_this.expandStateMapping && !(isRemoteData(_this) && _this.enableVirtualization)) {
|
|
5861
|
-
_this.expandAll();
|
|
5862
|
-
}
|
|
5863
|
-
}
|
|
5864
|
-
if (args.action === 'clearFilter' && _this.enableCollapseAll) {
|
|
5865
|
-
_this.collapseAll();
|
|
5866
|
-
}
|
|
5867
|
-
if (args.action === 'clearFilter' && _this.enableInfiniteScrolling) {
|
|
5868
|
-
_this.expandAll();
|
|
5869
|
-
}
|
|
5870
|
-
if (args.requestType === 'sorting' && _this.enableInfiniteScrolling) {
|
|
5854
|
+
if ((args.action === 'clearFilter' || args.action === 'clear-filter' || args.requestType === 'sorting') && _this.enableInfiniteScrolling) {
|
|
5871
5855
|
_this.expandAll();
|
|
5872
5856
|
}
|
|
5873
5857
|
if (_this.action === 'indenting' || _this.action === 'outdenting') {
|
|
@@ -6866,6 +6850,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6866
6850
|
rowData.hasChildRecords = record.hasChildRecords;
|
|
6867
6851
|
rowData.parentUniqueID = record.parentUniqueID;
|
|
6868
6852
|
rowData.expanded = record.expanded;
|
|
6853
|
+
if (this.enableVirtualization) {
|
|
6854
|
+
this.grid.selectionModule.selectedRowIndexes = this.grid.selectionModule.selectedRowIndexes.indexOf(record.index) === -1
|
|
6855
|
+
&& (this.selectedRowIndex >= 0 && this.selectedRowIndex !== record.index) ? [record.index] :
|
|
6856
|
+
this.grid.selectionModule.selectedRowIndexes;
|
|
6857
|
+
}
|
|
6869
6858
|
this.grid.setRowData(key, rowData);
|
|
6870
6859
|
var visibleRecords = this.getVisibleRecords();
|
|
6871
6860
|
if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])["" + primaryKey]) {
|
|
@@ -12031,6 +12020,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
12031
12020
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
12032
12021
|
*/
|
|
12033
12022
|
function PdfExport(parent) {
|
|
12023
|
+
this.isCollapsedStatePersist = false;
|
|
12034
12024
|
Grid.Inject(PdfExport$1);
|
|
12035
12025
|
this.parent = parent;
|
|
12036
12026
|
this.dataResults = {};
|
|
@@ -12084,6 +12074,18 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
12084
12074
|
var prop = Object();
|
|
12085
12075
|
var isLocal = !isRemoteData(this.parent) && isOffline(this.parent);
|
|
12086
12076
|
setValue('cancel', false, prop);
|
|
12077
|
+
if (!isNullOrUndefined(pdfExportProperties)) {
|
|
12078
|
+
this.isCollapsedStatePersist = pdfExportProperties.isCollapsedStatePersist;
|
|
12079
|
+
}
|
|
12080
|
+
if (!isNullOrUndefined(pdfExportProperties)) {
|
|
12081
|
+
if (!isLocal && !isNullOrUndefined(pdfExportProperties.dataSource) && !pdfExportProperties.dataSource['dataSource']) {
|
|
12082
|
+
return this.parent.grid.pdfExportModule.Map(this.parent.grid, pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
12083
|
+
}
|
|
12084
|
+
if (pdfExportProperties.exportType === 'CurrentPage') {
|
|
12085
|
+
pdfExportProperties.dataSource = this.parent.getCurrentViewRecords();
|
|
12086
|
+
return this.parent.grid.pdfExportModule.Map(this.parent.grid, pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
12087
|
+
}
|
|
12088
|
+
}
|
|
12087
12089
|
return new Promise(function (resolve) {
|
|
12088
12090
|
var dm = isLocal && !(dtSrc instanceof DataManager) ? new DataManager(dtSrc)
|
|
12089
12091
|
: _this.parent.dataSource;
|
|
@@ -12125,10 +12127,28 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
12125
12127
|
return query;
|
|
12126
12128
|
};
|
|
12127
12129
|
PdfExport.prototype.manipulatePdfProperties = function (prop, dtSrc, queryResult) {
|
|
12130
|
+
var _this = this;
|
|
12128
12131
|
var args = {};
|
|
12129
12132
|
//count not required for this query
|
|
12130
12133
|
var isLocal = !isRemoteData(this.parent) && isOffline(this.parent);
|
|
12131
12134
|
setValue('query', this.parent.grid.getDataModule().generateQuery(true), args);
|
|
12135
|
+
if (!isLocal && !isNullOrUndefined(prop) && !isNullOrUndefined(prop.isCollapsedStatePersist)
|
|
12136
|
+
&& prop.isCollapsedStatePersist === false) {
|
|
12137
|
+
if (args.query && args.query.queries && args.query.queries.length) {
|
|
12138
|
+
args.query.queries = args.query.queries.filter(function (q) {
|
|
12139
|
+
if (q.fn === 'onWhere' && q.e) {
|
|
12140
|
+
var preds = q.e;
|
|
12141
|
+
if (preds && preds.field === _this.parent.parentIdMapping && (preds.value === null || preds.value === 'null')) {
|
|
12142
|
+
return false;
|
|
12143
|
+
}
|
|
12144
|
+
}
|
|
12145
|
+
return true;
|
|
12146
|
+
});
|
|
12147
|
+
}
|
|
12148
|
+
if (args.query && args.query.params && args.query.params.length) {
|
|
12149
|
+
args.query.params = args.query.params.filter(function (param) { return param.key !== 'IdMapping'; });
|
|
12150
|
+
}
|
|
12151
|
+
}
|
|
12132
12152
|
setValue('isExport', true, args);
|
|
12133
12153
|
setValue('isPdfExport', true, args);
|
|
12134
12154
|
if (!isNullOrUndefined(prop) && !isNullOrUndefined(prop.isCollapsedStatePersist)) {
|
|
@@ -12833,6 +12853,12 @@ var Sort = /** @__PURE__ @class */ (function () {
|
|
|
12833
12853
|
this.iterateSort(data, srtQry);
|
|
12834
12854
|
this.storedIndex = -1;
|
|
12835
12855
|
sortParams.modifiedData = this.flatSortedData;
|
|
12856
|
+
if (srtQry.queries.filter(function (q) { return q.fn === 'onSortBy'; }).length > 0) {
|
|
12857
|
+
this.sortedResult = this.flatSortedData.filter(function (item) { return !item.isSummaryRow; });
|
|
12858
|
+
}
|
|
12859
|
+
else {
|
|
12860
|
+
this.sortedResult = [];
|
|
12861
|
+
}
|
|
12836
12862
|
this.flatSortedData = [];
|
|
12837
12863
|
};
|
|
12838
12864
|
Sort.prototype.iterateSort = function (data, srtQry) {
|