UNPKG

@1771technologies/lytenyte-pro

Version:

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

122 lines (121 loc) 7.25 kB
export { activateLicense } from "./license.js"; import { Grid as GridCore } from "@1771technologies/lytenyte-core"; import type { PropsWithChildren, ReactNode } from "react"; import { Root } from "./root/root.js"; import type { RowSource } from "@1771technologies/lytenyte-shared"; import type * as LnTypes from "./types/index.js"; export interface GridComponent { <Spec extends Root.GridSpec = Root.GridSpec>(props: PropsWithChildren<Root.Props<Spec> & (undefined extends Spec["api"] ? unknown : { apiExtension: ((incomplete: Root.API<Spec>) => Spec["api"] | null) | Spec["api"]; })>): ReactNode; Header: typeof GridCore.Header; HeaderRow: typeof GridCore.HeaderRow; HeaderCell: typeof GridCore.HeaderCell; HeaderGroupCell: typeof GridCore.HeaderGroupCell; RowsContainer: typeof GridCore.RowsContainer; RowsTop: typeof GridCore.RowsTop; RowsCenter: typeof GridCore.RowsCenter; RowsBottom: typeof GridCore.RowsBottom; Row: typeof GridCore.Row; RowFullWidth: typeof GridCore.RowFullWidth; Cell: typeof GridCore.Cell; Viewport: typeof GridCore.Viewport; } export declare const Grid: GridComponent; export declare namespace Grid { type GridSpec<T = unknown, C extends Record<string, any> = object, S extends RowSource<T> = RowSource, E extends Record<string, any> = object> = Root.GridSpec<T, C, S, E>; type Props<Spec extends GridSpec = GridSpec> = Root.Props<Spec>; type API<Spec extends GridSpec = GridSpec> = Root.API<Spec>; type Column<Spec extends GridSpec = GridSpec> = Root.Column<Spec>; type ColumnBase<Spec extends GridSpec = GridSpec> = Required<Root.Props<Spec>>["columnBase"]; type ColumnMarker<Spec extends GridSpec = GridSpec> = Required<Root.Props<Spec>>["columnMarker"]; type RowGroupColumn<Spec extends GridSpec = GridSpec> = Required<Root.Props<Spec>>["rowGroupColumn"]; type Events<Spec extends GridSpec = GridSpec> = Required<Root.Props<Spec>>["events"]; type Style = LnTypes.GridStyle; namespace Components { type Header = GridCore.Components.Header; type HeaderRow = GridCore.Components.HeaderRow; type HeaderCell = GridCore.Components.HeaderCell; type HeaderGroupCell = GridCore.Components.HeaderGroupCell; type RowsContainer = GridCore.Components.RowsContainer; type RowsTop = GridCore.Components.RowsTop; type RowsCenter = GridCore.Components.RowsCenter; type RowsBottom = GridCore.Components.RowsBottom; type Row = GridCore.Components.Row; type RowFullWidth = GridCore.Components.RowFullWidth; type Cell = GridCore.Components.Cell; type Viewport = GridCore.Components.Viewport; } namespace T { type AggregationFn<T> = LnTypes.AggregationFn<T>; type Aggregator<T> = LnTypes.Aggregator<T>; type CellParams<Spec extends GridSpec> = LnTypes.CellParams<Spec>; type CellParamsWithIndex<Spec extends GridSpec> = LnTypes.CellParamsWithIndex<Spec>; type CellRendererParams<Spec extends GridSpec> = LnTypes.CellRendererParams<Spec>; type DataRect = LnTypes.DataRect; type Dimension<T> = LnTypes.Dimension<T>; type DimensionAgg<T> = LnTypes.DimensionAgg<T>; type DimensionSort<T> = LnTypes.DimensionSort<T>; type EditParams<Spec extends GridSpec> = LnTypes.EditParams<Spec>; type ExportDataRectResult<Spec extends GridSpec> = LnTypes.ExportDataRectResult<Spec>; type Field<T> = LnTypes.Field<T>; type FilterFn<T> = LnTypes.FilterFn<T>; type GroupFn<T> = LnTypes.GroupFn<T>; type GroupIdFn = LnTypes.GroupIdFn; type HeaderGroupParams<Spec extends GridSpec> = LnTypes.HeaderGroupParams<Spec>; type HeaderParams<Spec extends GridSpec> = LnTypes.HeaderParams<Spec>; type LeafIdFn<T> = LnTypes.LeafIdFn<T>; type PathField = LnTypes.PathField; type RowParams<Spec extends GridSpec> = LnTypes.RowParams<Spec>; type RowSelectionState = LnTypes.RowSelectionState; type SortFn<T> = LnTypes.SortFn<T>; type RowFullWidthRendererParams<Spec extends GridSpec> = LnTypes.RowFullWidthRendererParams<Spec>; type RowSelectionIsolated = LnTypes.RowSelectionIsolated; type RowSelectionLinked = LnTypes.RowSelectionLinked; type RowSelectNode = LnTypes.RowSelectNode; type RowDragPlaceholderFn = GridCore.T.RowDragPlaceholderFn; type DragItem = GridCore.T.DragItem; type DragItemSiteLocal = GridCore.T.DragItemSiteLocal; type DragItemTransfer = GridCore.T.DragItemTransfer; type RowNode<T> = LnTypes.RowNode<T>; type RowLeaf<T> = LnTypes.RowLeaf<T>; type RowGroup = LnTypes.RowGroup; type RowAggregated = LnTypes.RowAggregated; type ColumnPin = LnTypes.ColumnPin; type LayoutCell = LnTypes.LayoutCell; type LayoutHeader = LnTypes.LayoutHeader; type LayoutHeaderCell = LnTypes.LayoutHeaderCell; type LayoutHeaderGroup = LnTypes.LayoutHeaderGroup; type LayoutHeaderFloating = LnTypes.LayoutHeaderFloating; type LayoutFullWidthRow = LnTypes.LayoutFullWidthRow; type LayoutRow = LnTypes.LayoutRow; type LayoutRowWithCells = LnTypes.LayoutRowWithCells; type PositionDetailCell = LnTypes.PositionDetailCell; type PositionFloatingCell = LnTypes.PositionFloatingCell; type PositionFullWidthRow = LnTypes.PositionFullWidthRow; type PositionGridCell = LnTypes.PositionGridCell; type PositionGridCellRoot = LnTypes.PositionGridCellRoot; type PositionHeaderCell = LnTypes.PositionHeaderCell; type PositionHeaderGroupCell = LnTypes.PositionHeaderGroupCell; type PositionUnion = LnTypes.PositionUnion; type DataRectSplit = LnTypes.DataRectSplit; type HavingFilterFn = LnTypes.HavingFilterFn; type LabelFilter = LnTypes.LabelFilter; type PivotField<Spec extends GridSpec> = LnTypes.PivotField<Spec>; type PivotModel<Spec extends GridSpec> = LnTypes.PivotModel<Spec>; type PivotState = LnTypes.PivotState; type VirtualTarget = LnTypes.VirtualTarget; } } export type { UseClientDataSourceParams, RowSourceClient, } from "./data-source-client/use-client-data-source.js"; export { useClientDataSource } from "./data-source-client/use-client-data-source.js"; export type { UseServerDataSourceParams, RowSourceServer, } from "./data-source-server/use-server-data-source.js"; export { useServerDataSource } from "./data-source-server/use-server-data-source.js"; export type * from "./data-source-server/types.js"; export type { RowSourceTree, UseTreeDataSourceParams } from "./data-source-tree/use-tree-data-source.js"; export { useTreeDataSource } from "./data-source-tree/use-tree-data-source.js"; export { measureText, moveRelative, equal, arrayShallow } from "@1771technologies/lytenyte-shared"; export { getRowDragData, computeField } from "@1771technologies/lytenyte-core/internal"; export { virtualFromXY } from "./components/virtual-from-coordinates.js"; export type { Piece, PieceWritable } from "@1771technologies/lytenyte-core"; export { usePiece } from "@1771technologies/lytenyte-core";