/** * Copyright © INOVUA TRADING. * * This source code is licensed under the Commercial License found in the * LICENSE file in the root directory of this source tree. */ import { TypeSummaryReducer, TypeComputedColumnsMap, TypeGroupDataItem, TypeShowGroupSummaryRow, TypePivotSummaryShape, TypePivotItem, TypePivotColumnSummaryReducer, TypePivotUniqueValuesDescriptor } from '../../../types'; type TypeGroupBucket = { key: string | null; keyPath: string[]; field: string | null; fieldPath: string[]; groupSummary: any | null; groupColumnSummary: { [colName: string]: any; } | null; pivotSummary: TypePivotSummaryShape | null; pivotColumnSummary?: TypePivotSummaryShape | null; data: { [key: string]: TypeGroupBucket; } | null; array: any[]; depth: number; order: string[]; }; export declare const flatten: (bucket: TypeGroupBucket, { pivot, groupSummaryReducer, groupColumnSummaryReducers, pivotColumnSummaryReducers, isCollapsed, showGroupSummaryRow, }: { isCollapsed?: ((group: TypeGroupDataItem) => boolean) | undefined; pivot: TypePivotItem[] | null; showGroupSummaryRow: TypeShowGroupSummaryRow | null; groupSummaryReducer: TypeSummaryReducer | null; groupColumnSummaryReducers: { [key: string]: TypeSummaryReducer; } | null; pivotColumnSummaryReducers?: { [key: string]: TypePivotColumnSummaryReducer; } | null | undefined; }) => { data: any[]; bucket: TypeGroupBucket; indexesInGroups: number[]; groupCounts: number[]; }; type TypeMasterGroupBucket = TypeGroupBucket & { pivotUniqueValuesPerColumn?: TypePivotUniqueValuesDescriptor; }; declare const groupAndPivot: (data: any[], { groupBy, pivot, columnsMap, stringify, groupSummaryReducer, groupColumnSummaryReducers, pivotColumnSummaryReducers, }: { groupBy: string[]; pivot?: TypePivotItem[] | undefined; columnsMap: TypeComputedColumnsMap; groupSummaryReducer?: TypeSummaryReducer | undefined; groupColumnSummaryReducers?: { [key: string]: TypeSummaryReducer; } | undefined; pivotColumnSummaryReducers?: { [key: string]: TypePivotColumnSummaryReducer; } | undefined; stringify?: ((v: any, ...args: any[]) => string) | undefined; }) => TypeMasterGroupBucket; export declare const updateBucketSummaries: (currentBucket: { groupSummary: any | null; groupColumnSummary: { [colName: string]: any; } | null; }, item: any, { groupSummaryReducer, groupColumnSummaryReducers, columnsMap, }: { groupSummaryReducer?: TypeSummaryReducer | undefined; groupColumnSummaryReducers?: { [key: string]: TypeSummaryReducer; } | undefined; columnsMap: TypeComputedColumnsMap; }) => void; export declare const getDefaultGroupSummaryValue: (groupColumnSummaryReducers?: { [key: string]: TypeSummaryReducer | TypePivotColumnSummaryReducer; } | undefined) => { [key: string]: any; } | null; export default groupAndPivot;