@@ -3,7 +3,7 @@ import { cloneArray } from '../../core/utils';
33import { DataUtil } from '../../data-operations/data-util' ;
44import { FilteringExpressionsTree , IFilteringExpressionsTree } from '../../data-operations/filtering-expressions-tree' ;
55import { IFilteringStrategy } from '../../data-operations/filtering-strategy' ;
6- import { IPivotConfiguration , IPivotKeys } from './pivot-grid.interface' ;
6+ import { DEFAULT_PIVOT_KEYS , IPivotConfiguration , IPivotKeys } from './pivot-grid.interface' ;
77import {
88 DefaultPivotSortingStrategy , DimensionValuesFilteringStrategy , PivotColumnDimensionsStrategy ,
99 PivotRowDimensionsStrategy
@@ -15,6 +15,7 @@ import { GridType } from '../common/grid.interface';
1515import { GridBaseAPIService } from '../api.service' ;
1616import { IgxGridBaseDirective } from '../grid-base.directive' ;
1717import { IGridSortingStrategy } from '../common/strategy' ;
18+
1819/**
1920 * @hidden
2021 */
@@ -33,10 +34,7 @@ export class IgxPivotRowPipe implements PipeTransform {
3334 _pipeTrigger ?: number ,
3435 __ ?
3536 ) : any [ ] {
36- const pivotKeys = config . pivotKeys || {
37- aggregations : 'aggregations' , records : 'records' , children : 'children' , level : 'level' ,
38- rowDimensionSeparator : '_' , columnDimensionSeparator : '-'
39- } ;
37+ const pivotKeys = config . pivotKeys || DEFAULT_PIVOT_KEYS ;
4038 const enabledRows = config . rows . filter ( x => x . enabled ) ;
4139 const rowStrategy = config . rowStrategy || PivotRowDimensionsStrategy . instance ( ) ;
4240 const data = cloneArray ( collection , true ) ;
@@ -63,10 +61,7 @@ export class IgxPivotRowExpansionPipe implements PipeTransform {
6361 _pipeTrigger ?: number ,
6462 __ ?,
6563 ) : any [ ] {
66- const pivotKeys = config . pivotKeys || {
67- aggregations : 'aggregations' , records : 'records' , children : 'children' , level : 'level' ,
68- rowDimensionSeparator : '_' , columnDimensionSeparator : '-'
69- } ;
64+ const pivotKeys = config . pivotKeys || DEFAULT_PIVOT_KEYS ;
7065 const enabledRows = config . rows . filter ( x => x . enabled ) ;
7166 const data = collection ? cloneArray ( collection , true ) : [ ] ;
7267 let totalLlv = 0 ;
@@ -113,10 +108,7 @@ export class IgxPivotColumnPipe implements PipeTransform {
113108 _pipeTrigger ?: number ,
114109 __ ?
115110 ) : any [ ] {
116- const pivotKeys = config . pivotKeys || {
117- aggregations : 'aggregations' , records : 'records' , children : 'children' , level : 'level' ,
118- rowDimensionSeparator : '_' , columnDimensionSeparator : '-'
119- } ;
111+ const pivotKeys = config . pivotKeys || DEFAULT_PIVOT_KEYS ;
120112 const enabledColumns = config . columns . filter ( x => x . enabled ) ;
121113 const enabledValues = config . values . filter ( x => x . enabled ) ;
122114
@@ -182,10 +174,7 @@ export class IgxPivotGridColumnSortingPipe implements PipeTransform {
182174 expressions : ISortingExpression [ ] ,
183175 sorting : IGridSortingStrategy ,
184176 pipeTrigger : number ,
185- pivotKeys : IPivotKeys = {
186- aggregations : 'aggregations' , records : 'records' , children : 'children' , level : 'level' ,
187- rowDimensionSeparator : '_' , columnDimensionSeparator : '-'
188- }
177+ pivotKeys : IPivotKeys = DEFAULT_PIVOT_KEYS
189178 ) : any [ ] {
190179 let result : any [ ] ;
191180
0 commit comments