@syncfusion/ej2-treegrid
Advanced tools
Comparing version 18.4.35 to 18.4.39
@@ -7,2 +7,10 @@ # Changelog | ||
#### New Features | ||
- `#280065` - Provided support to maintain Tree Grid state(expand/collapse) while on Exporting. | ||
## 18.4.35 (2021-01-19) | ||
### TreeGrid | ||
#### Bug Fixes | ||
@@ -9,0 +17,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 18.4.35 | ||
* version : 18.4.39 | ||
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-treegrid@*", | ||
"_id": "@syncfusion/ej2-treegrid@18.4.34", | ||
"_id": "@syncfusion/ej2-treegrid@18.4.35", | ||
"_inBundle": false, | ||
"_integrity": "sha512-PLIbRs092Q1QGmGuspT5qLAztbz/NGVKvcsG0NZVzJ87N9k2AM3AhOW1IxaboSgEOS42SpfTlgsRxtdf0lwcGw==", | ||
"_integrity": "sha512-vW4TAiyO9GI76WbeF4Eahly+RkdSp+WdE3U51W037E5eTgCtBEnWU9wgvcE5eI94aQluK8ByDAj9Jxskqg/+VQ==", | ||
"_location": "/@syncfusion/ej2-treegrid", | ||
@@ -27,4 +27,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-treegrid/-/ej2-treegrid-18.4.34.tgz", | ||
"_shasum": "25f34ebbbef8ba96d42b980fa54ae4321a261823", | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-treegrid/-/ej2-treegrid-18.4.35.tgz", | ||
"_shasum": "eaeadb189d97753804e13a9fb14a4007204ef2c1", | ||
"_spec": "@syncfusion/ej2-treegrid@*", | ||
@@ -40,6 +40,6 @@ "_where": "/jenkins/workspace/automation_release_18.4.0.1-WOJ6QVY6EU5ONBWOYGQFKS2VU2UW7E67MOXUPKCE5AX7QQX7M5JQ/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~18.4.34", | ||
"@syncfusion/ej2-data": "~18.4.33", | ||
"@syncfusion/ej2-grids": "~18.4.35", | ||
"@syncfusion/ej2-popups": "~18.4.34" | ||
"@syncfusion/ej2-base": "~18.4.39", | ||
"@syncfusion/ej2-data": "~18.4.39", | ||
"@syncfusion/ej2-grids": "~18.4.39", | ||
"@syncfusion/ej2-popups": "~18.4.39" | ||
}, | ||
@@ -65,4 +65,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "18.4.35", | ||
"version": "18.4.39", | ||
"sideEffects": false | ||
} |
@@ -12,2 +12,3 @@ import { TreeGrid } from '../base/treegrid'; | ||
private dataResults; | ||
private isCollapsedStatePersist; | ||
/** | ||
@@ -14,0 +15,0 @@ * Constructor for Excel Export module |
import { getObject, Grid, ExcelExport as GridExcel } from '@syncfusion/ej2-grids'; | ||
import { isRemoteData, isOffline, getParentData } from '../utils'; | ||
import { isRemoteData, isOffline, getParentData, getExpandStatus } from '../utils'; | ||
import { isNullOrUndefined, setValue, extend } from '@syncfusion/ej2-base'; | ||
@@ -15,2 +15,3 @@ import { DataManager, Query } from '@syncfusion/ej2-data'; | ||
function ExcelExport(parent) { | ||
this.isCollapsedStatePersist = false; | ||
Grid.Inject(GridExcel); | ||
@@ -68,2 +69,5 @@ this.parent = parent; | ||
setValue('cancel', false, property); | ||
if (!isNullOrUndefined(excelExportProperties)) { | ||
this.isCollapsedStatePersist = excelExportProperties.isCollapsedStatePersist; | ||
} | ||
return new Promise(function (resolve, reject) { | ||
@@ -117,3 +121,3 @@ var dm = _this.isLocal() && !(dataSource instanceof DataManager) ? new DataManager(dataSource) | ||
} | ||
if (!this.isLocal() || !isNullOrUndefined(this.parent.parentIdMapping)) { | ||
if (!this.isLocal()) { | ||
this.parent.parentData = []; | ||
@@ -164,3 +168,11 @@ this.parent.dataModule.convertToFlatData(getObject('result', queryResult)); | ||
var rowlevel = excelrowobj.level; | ||
excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel, isCollapsed: false }; | ||
var expandedStatus = false; | ||
var sublevelState = false; | ||
var state = getExpandStatus(this.parent, excelrowobj, this.parent.parentData); | ||
if (this.isCollapsedStatePersist && (!state || !this.parent.isLocalData)) { | ||
expandedStatus = true; | ||
sublevelState = excelrowobj.expanded ? false : true; | ||
} | ||
excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel, isCollapsed: sublevelState, | ||
isHidden: expandedStatus }; | ||
} | ||
@@ -167,0 +179,0 @@ } |
@@ -108,6 +108,7 @@ import { getObject, PdfExport as GridPdf, Grid } from '@syncfusion/ej2-grids'; | ||
setValue('isExport', true, args); | ||
setValue('isPdfExport', true, args); | ||
if (!isNullOrUndefined(prop) && !isNullOrUndefined(prop.exportType)) { | ||
setValue('exportType', prop.exportType, args); | ||
} | ||
if (!isLocal || !isNullOrUndefined(this.parent.parentIdMapping)) { | ||
if (!isLocal) { | ||
this.parent.parentData = []; | ||
@@ -114,0 +115,0 @@ this.parent.dataModule.convertToFlatData(getValue('result', queryResult)); |
@@ -5,3 +5,3 @@ import { extend, isNullOrUndefined, setValue, getValue, isBlazor, addClass, removeClass } from '@syncfusion/ej2-base'; | ||
import { getObject, getUid } from '@syncfusion/ej2-grids'; | ||
import { isRemoteData, isOffline, isCountRequired, findChildrenRecords } from '../utils'; | ||
import { isRemoteData, isOffline, isCountRequired, getExpandStatus } from '../utils'; | ||
import * as events from './constant'; | ||
@@ -545,8 +545,9 @@ /** | ||
} | ||
if (isPrinting === true && this.parent.printMode === 'AllPages') { | ||
var isPdfExport = 'isPdfExport'; | ||
if ((isPrinting === true || args[isPdfExport]) && this.parent.printMode === 'AllPages') { | ||
var actualResults = []; | ||
for (var i = 0; i < results.length; i++) { | ||
actualResults.push(results[i]); | ||
if (results[i].expanded === false) { | ||
i += findChildrenRecords(results[i]).length; | ||
var expandStatus = getExpandStatus(this.parent, results[i], this.parent.parentData); | ||
if (expandStatus) { | ||
actualResults.push(results[i]); | ||
} | ||
@@ -553,0 +554,0 @@ } |
import { Column } from '../models/column'; | ||
import { SaveEventArgs, DataStateChangeEventArgs as GridDataStateChangeEventArgs } from '@syncfusion/ej2-grids'; | ||
import { SaveEventArgs, DataStateChangeEventArgs as GridDataStateChangeEventArgs, ExcelExportProperties } from '@syncfusion/ej2-grids'; | ||
/** | ||
@@ -68,2 +68,7 @@ * Specifies FlatData interfaces. | ||
} | ||
/** Specifies the Tree Grid ExcelExport properties */ | ||
export interface TreeGridExcelExportProperties extends ExcelExportProperties { | ||
/** Specifies the collapsed state persistence in exported file */ | ||
isCollapsedStatePersist: boolean; | ||
} | ||
export interface AggregateTemplateContext { | ||
@@ -70,0 +75,0 @@ /** Gets sum aggregate value */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5680524
47061