import { LitElement } from 'lit'; import { ColumnConfig, FilterValue, GristConfig, GristData, GristRecord, PaginationConfig, SortersConfig } from './types.js'; export declare class DataManipulator extends LitElement { config: GristConfig; data: GristData; sorters: SortersConfig; filters: FilterValue[]; pagination: PaginationConfig; /** The row a shift-click selects from - the last one clicked on its own (`selectionChange`). */ private selectAnchor?; /** The latest edit of each field - an edit still being validated applies only while it is the latest. */ private fieldEdits; /** New rows an edit has added to the records. One that is gone again was deleted, not waiting to be added. */ private addedRecords; private _appendRecord?; constructor(); onFieldChange({ after, before, column, record, row }: { after: any; before: any; column: ColumnConfig; record: GristRecord; row: number; }): Promise; /** * The empty row an appendable view shows after the records. It stays the same object until an edit adds it, so * the fields typed into it while an earlier one is still being validated end up in one new row. */ get appendRecord(): GristRecord; /** The owner replaced the rows (reset, undo, redo, a restored draft): edits still being validated were typed into rows that are gone. */ discardPendingEdits(): void; private indexOfRecord; onSelectRecordChanged({ selectedRecords, added, removed, range }: { selectedRecords: GristRecord[]; added: GristRecord[]; removed: GristRecord[]; /** Shift was held: the rows from the last one clicked to this one take its new state. */ range?: boolean; }): void; onRecordChanged(recordData: GristRecord, row: number, column: ColumnConfig | null, /** The new row object being added - the append row keeps its identity so later edits of it find it. */ newRecord?: GristRecord): void; collapseAll(): void; expandAll(): void; collapseNode(record: GristRecord): void; expandNode(record: GristRecord): void; addSiblingNode(record: GristRecord): void; addChildNode(record: GristRecord): void; onCheckInTree(e: CustomEvent): void; /** * Forced internal data to be reflected on the screen * Data changing through a normal method is automatically reflected on the screen, so it is a method that does not need to be used in general. * Therefore, it will be deprecated. * @method */ refresh(forceExpandOrCollapse?: boolean): void; private traverseRefresh; }