import { DataAdapter, DataAdapterRecord, DataAdapterConfig } from "./DataAdapter"; import { Accessor } from "../../data/getAccessor"; import { RenderingContext } from "../RenderingContext"; import { Instance } from "../Instance"; import { View } from "../../data/View"; import { Prop, Sorter, CollatorOptions } from "../Prop"; export interface RecordStoreCache { recordStoreCache: WeakMap; cacheByKey: Record; recordsAccessor?: Accessor; } export interface ArrayAdapterConfig extends DataAdapterConfig { recordsBinding?: Prop; recordsAccessor?: Accessor | string; keyField?: string; cacheByKeyField?: boolean; sortOptions?: CollatorOptions; preserveOrder?: boolean; } export interface ExtendedSorter extends Sorter { comparer?: (a: any, b: any) => number; sortOptions?: CollatorOptions; } export interface ResolvedSorter { getter: (x: any) => any; factor: number; compare: (a: any, b: any) => number; } export declare class ArrayAdapter extends DataAdapter { recordsAccessor: Accessor; recordsBinding?: Prop; keyField: string | null; cacheByKeyField: boolean; sortOptions?: CollatorOptions; preserveOrder?: boolean; isTreeAdapter: boolean; protected sorter?: (data: DataAdapterRecord[]) => DataAdapterRecord[]; constructor(config?: ArrayAdapterConfig); init(): void; initInstance(context: RenderingContext, instance: Instance & Partial): void; getRecords(context: RenderingContext, instance: Instance & Partial, records: T[], parentStore: View): DataAdapterRecord[]; mapRecords(context: RenderingContext, instance: Instance & Partial, records: T[], parentStore: View, recordsAccessor?: Accessor): DataAdapterRecord[]; mapRecord(context: RenderingContext, instance: Instance & Partial, data: T, parentStore: View, recordsAccessor: Accessor | undefined, index: number): DataAdapterRecord; setFilter(filterFn?: (data: T) => boolean): void; getComparer(sortOptions?: CollatorOptions): ((a: any, b: any) => number) | undefined; buildSorter(sorters: ExtendedSorter[]): void; sort(sorters?: Sorter[] | ExtendedSorter[]): void; } //# sourceMappingURL=ArrayAdapter.d.ts.map