@@ -3,7 +3,7 @@ import { cloneArray } from '../../core/utils';
3
3
import { DataUtil } from '../../data-operations/data-util' ;
4
4
import { FilteringExpressionsTree , IFilteringExpressionsTree } from '../../data-operations/filtering-expressions-tree' ;
5
5
import { 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' ;
7
7
import {
8
8
DefaultPivotSortingStrategy , DimensionValuesFilteringStrategy , PivotColumnDimensionsStrategy ,
9
9
PivotRowDimensionsStrategy
@@ -15,6 +15,7 @@ import { GridType } from '../common/grid.interface';
15
15
import { GridBaseAPIService } from '../api.service' ;
16
16
import { IgxGridBaseDirective } from '../grid-base.directive' ;
17
17
import { IGridSortingStrategy } from '../common/strategy' ;
18
+
18
19
/**
19
20
* @hidden
20
21
*/
@@ -33,10 +34,7 @@ export class IgxPivotRowPipe implements PipeTransform {
33
34
_pipeTrigger ?: number ,
34
35
__ ?
35
36
) : 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 ;
40
38
const enabledRows = config . rows . filter ( x => x . enabled ) ;
41
39
const rowStrategy = config . rowStrategy || PivotRowDimensionsStrategy . instance ( ) ;
42
40
const data = cloneArray ( collection , true ) ;
@@ -63,10 +61,7 @@ export class IgxPivotRowExpansionPipe implements PipeTransform {
63
61
_pipeTrigger ?: number ,
64
62
__ ?,
65
63
) : 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 ;
70
65
const enabledRows = config . rows . filter ( x => x . enabled ) ;
71
66
const data = collection ? cloneArray ( collection , true ) : [ ] ;
72
67
let totalLlv = 0 ;
@@ -113,10 +108,7 @@ export class IgxPivotColumnPipe implements PipeTransform {
113
108
_pipeTrigger ?: number ,
114
109
__ ?
115
110
) : 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 ;
120
112
const enabledColumns = config . columns . filter ( x => x . enabled ) ;
121
113
const enabledValues = config . values . filter ( x => x . enabled ) ;
122
114
@@ -182,10 +174,7 @@ export class IgxPivotGridColumnSortingPipe implements PipeTransform {
182
174
expressions : ISortingExpression [ ] ,
183
175
sorting : IGridSortingStrategy ,
184
176
pipeTrigger : number ,
185
- pivotKeys : IPivotKeys = {
186
- aggregations : 'aggregations' , records : 'records' , children : 'children' , level : 'level' ,
187
- rowDimensionSeparator : '_' , columnDimensionSeparator : '-'
188
- }
177
+ pivotKeys : IPivotKeys = DEFAULT_PIVOT_KEYS
189
178
) : any [ ] {
190
179
let result : any [ ] ;
191
180
0 commit comments