UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

33 lines (32 loc) 1.83 kB
import type { GridSpec } from "../../../types"; import type { UseClientDataSourceParams } from "../../use-client-data-source"; import type { SourceState } from "../use-controlled-ds-state"; import { type RowLeaf } from "@1771technologies/lytenyte-shared"; import { type LeafNodeTuple } from "@1771technologies/lytenyte-core/internal"; import { type ControlledPivotState } from "./use-pivot-state.js"; export declare function usePivotData<Spec extends GridSpec>(props: UseClientDataSourceParams<Spec>, [, leafs, , pinMap]: LeafNodeTuple<Spec["data"]>, c: SourceState, controlled: ControlledPivotState): { tree: import("../use-group-tree/use-group-tree.js").RootNode<Spec["data"]> | null; maxDepth: number; flatten: import("@1771technologies/lytenyte-shared").RowNode<any>[]; rowByIdRef: import("react").RefObject<Map<string, import("@1771technologies/lytenyte-shared").RowNode<any>>>; rowByIndexRef: import("react").RefObject<Map<number, import("@1771technologies/lytenyte-shared").RowNode<any>>>; rowIdToRowIndexRef: import("react").RefObject<Map<string, number>>; leafIdsRef: import("react").RefObject<Map<string, RowLeaf<Spec["data"]>>>; leafsTop: RowLeaf<any>[] | { id: string; data: Record<string, unknown>; kind: "aggregated"; depth: number; }[]; leafs: RowLeaf<Spec["data"]>[]; leafsBot: RowLeaf<any>[] | { id: string; data: Record<string, unknown>; kind: "aggregated"; depth: number; }[]; sorted: number[]; pivotPiece: import("@1771technologies/lytenyte-core").Piece<import("../../../types").Column<Spec>[] | null>; pivotGroupPiece: import("@1771technologies/lytenyte-core").Piece<Record<string, boolean>>; groupFn: import("@1771technologies/lytenyte-shared").GroupFn<Spec["data"]> | null; };