import ReportQuery from '../../../types/ReportQuery'; import { SummaryTemplate } from '../../../types/Templates'; import { AsyncSummary } from '../../../types/UserReports'; import { components } from '../../../types/api'; import { SectionedData, SectionKey } from './types'; type OrderedRow = Record & { index: string; }; type OrderedSummary = Omit & { data: OrderedRow[]; }; export declare class SectionedDataHelper { sections: Array; data: Array>; fields: components['schemas']['FieldDefinition'][]; summariesData: OrderedSummary[]; sectionedDataArray: SectionedData[]; sectionedData: SectionedData; reportQuery: ReportQuery; createSectionKey(row: Record): { keyObj: SectionKey[]; key: string; }; createSectionTitle(keyObj: SectionKey[], fields: components['schemas']['FieldDefinition'][] | components['schemas']['SummaryField'][]): string; /** * Groups the data into sections * * @return {*} {SectionedData} * @memberof SectionedDataBuilder */ groupBySections(data: Array>, fields: components['schemas']['FieldDefinition'][] | components['schemas']['SummaryField'][], summary?: { template: SummaryTemplate; id: string; }): void; createSummarySections(): void; mergeSections(): SectionedData; getSortField(): string[]; getSortDirection(): 1 | -1; private enforceSummaryRowOrder; /** * Sorts sections based on keyObj values using an optional nameOrder override. * - nameOrder can be partial; unspecified names fall back to default order * - Default order is derived from the first section's keyObj sequence */ sortSections(sectionedData: SectionedData): SectionedData; withSections(sections: string[]): this; withFields(fields: components['schemas']['FieldDefinition'][]): this; withData(data: Array>): this; withSummaries(summaryData: Array): this; withReportQuery(reportQuery: ReportQuery): this; build(): SectionedData; } export {};