import { type IBucket, type IInsightDefinition, type ISortItem } from "@gooddata/sdk-model"; import { type MeasureGroupDimension } from "@gooddata/sdk-ui-pivot"; import { type IBucketFilter, type IBucketItem } from "../../../interfaces/Visualization.js"; export declare const adaptReferencePointSortItemsToPivotTable: (originalSortItems: ISortItem[], measures: IBucketItem[], rowAttributes: IBucketItem[], columnAttributes: IBucketItem[], measureGroupDimension: MeasureGroupDimension) => ISortItem[]; export declare const addDefaultSort: (sortItems: ISortItem[], filters: IBucketFilter[], rowAttributes: IBucketItem[], previousRowAttributes: IBucketItem[], columnAttributes?: IBucketItem[]) => ISortItem[]; export declare const isSortItemVisible: (sortItem: ISortItem, filters: IBucketFilter[], columnAttributes: IBucketItem[]) => boolean; export declare const getSanitizedSortItems: (sortItems: ISortItem[] | undefined, measureGroupDimension: MeasureGroupDimension) => ISortItem[]; /** * This function exists to overcome AD weirdness where AD will sometimes send insight without any * sorts even if the pivot table should be sorted by default by the first row attribute in ascending order. Code here * fixes this symptom and ensures the default sort is in place. * * Note: while this may seem small thing, it's actually a messy business. When rendering / switching to the pivot * table the AD will call update/render multiple times. Sometimes with sort items, sometimes without sort items. This * can seriously mess up the pivot table in return: the column resizing is susceptible to race conditions and timing * issues. Because of the flurry of calls, the table may not render or may render not resized at all. */ export declare const getPivotTableSortItems: (insight: IInsightDefinition) => ISortItem[] | undefined; export declare const sanitizePivotTableSorts: (originalSortItems: ISortItem[], buckets: IBucket[], measureGroupDimension: MeasureGroupDimension) => ISortItem[]; //# sourceMappingURL=sortHelpers.d.ts.map