UNPKG

@neo4j-ndl/react

Version:

React implementation of Neo4j Design System

74 lines 3.35 kB
/** * * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ import { type RowData, type Table as DataGridType } from '@tanstack/react-table'; import { type Skeleton } from '../skeleton'; import { type ActionButton, type ActionCell, type Body, type BodyCell, type BodyRow, type ColumnControls, type Header, type HeaderCell, type HeaderTitle, type LoadingPlaceholder, type Navigation, type NoDataPlaceholder, type Pagination, type PaginationArrowButton, type PaginationNumericButton, type PaginationNumericButtons, type ResizingBar, type RowsPerPage, type Scrollable, type TableResults } from './Components'; import { type DataGridNav } from './data-grid-nav/data-grid-nav'; type Nullable<T> = T | null; export interface DataGridComponentsInterface<T extends RowData> { ResizingBar?: Nullable<typeof ResizingBar<T>>; /** * Header Section */ Header?: Nullable<typeof Header>; HeaderCell?: Nullable<typeof HeaderCell<T>>; HeaderTitle?: Nullable<typeof HeaderTitle<T>>; ActionButton?: Nullable<typeof ActionButton>; ColumnControls?: Nullable<typeof ColumnControls>; /** * Body Section */ Scrollable?: Nullable<typeof Scrollable>; Body?: Nullable<typeof Body>; BodyCell?: Nullable<typeof BodyCell<T>>; BodyRow?: Nullable<typeof BodyRow<T>>; ActionCell?: Nullable<typeof ActionCell<T>>; LoadingPlaceholder?: Nullable<typeof LoadingPlaceholder>; NoDataPlaceholder?: Nullable<typeof NoDataPlaceholder>; /** * Navigation Section */ Navigation?: Nullable<typeof Navigation>; Pagination?: Nullable<typeof Pagination>; PaginationArrowButton?: Nullable<typeof PaginationArrowButton>; TableResults?: Nullable<typeof TableResults>; RowsPerPage?: Nullable<typeof RowsPerPage>; PaginationNumericButtons?: Nullable<typeof PaginationNumericButtons>; PaginationNumericButton?: Nullable<typeof PaginationNumericButton>; } export interface DataGridContextType<T extends RowData> { isResizable: boolean; tableProps: DataGridType<T>; components: DataGridComponentsInterface<T>; isLoading: boolean; hasResizeColumns: boolean; isKeyboardNavigationEnabled: boolean; isSkeletonLoading: boolean; skeletonProps: React.ComponentProps<typeof Skeleton>; dataGridNav: DataGridNav; portalTarget: HTMLElement | null; isMediumNavigation: boolean; isSmallNavigation: boolean; } export declare const DataGridContext: import("react").Context<DataGridContextType<any>>; export declare function useDataGridContext<T extends RowData>(): DataGridContextType<T>; export {}; //# sourceMappingURL=data-grid-context.d.ts.map