UNPKG

@sheetxl/models

Version:

Models - A Headless javascript spreadsheet library.

41 lines 1.45 kB
import { CellCoords, CellRangeCoords } from "@sheetxl/common"; export type LazyRangeResult<R = any> = { range: CellRangeCoords; value: R; }; /** * This will return a list of LazyCalculatedCoordRange objects. * * This works by allowing for an add/remove of a cell coordinate and then if a query is don't in a given range. */ declare class LazyCoordRanges<M = any, R = any> { private _calcRanges; /** Map of all registered coords */ private _coordsTracked; private _coordsUncalced; private _coordsCalced; private _rangesCalced; private _maxCoords; private _maxRange; private _treeId; constructor(calcRanges: (entries: [CellCoords, M][]) => LazyRangeResult<R>[], maxCoords?: Partial<CellCoords>); setPairs(pairs: [CellCoords, M][]): void; remove(entries: CellCoords[]): void; private _deleteKeys; /** * Remove values from the uncalced cache. Options replace them with new values * @param entries * @param valuesToReplace */ uncalcEntries(entries: CellCoords[], clearCoords?: boolean): void; /** * This does not remove the coords entries but just clears the cache ranges. */ uncalcRanges(range?: CellRangeCoords): void; clear(): void; isEmpty(): boolean; search(range: CellRangeCoords): LazyRangeResult<R>[]; clone(): LazyCoordRanges<M, R>; } export default LazyCoordRanges; //# sourceMappingURL=LazyRangeCoordsRTree.d.ts.map