/** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2022 Samuel Gratzl */ import React, { ComponentType, CSSProperties, PropsWithChildren, MouseEvent, ReactNode, DetailedHTMLProps, HTMLAttributes, ReactElement, RefObject } from 'react'; import { CommonProps } from '@lineup-lite/components'; import { AnyObject, UnknownObject, UseSortingOptionsColumnProps, UseGroupingOptionsColumnProps, UseRowExpandColumnTableOptions, UseSelectColumnTableOptions, UseRowRankColumnTableOptions, UseGroupingOptionsState, UseGroupingOptionsInstanceProps, LineUpLiteColumn } from '@lineup-lite/hooks'; export { AnyObject, LineUpLiteColumn, UnknownObject, asCategoricalColumn, asCategoricalSetColumn, asColumn, asDateColumn, asDivergingNumberColumn, asNumberBoxPlotColumn, asNumberColumn, asNumbersColumn, asNumbersLineChartColumn, asStackedNumberColumn, asTextColumn, deriveColumn, deriveColumns, useRowRankColumn as featureRowRank } from '@lineup-lite/hooks'; import { ColumnInstance, UseSortByColumnProps, UseGroupByColumnProps, UseFiltersColumnProps, TableOptions, UseFiltersOptions, UseExpandedOptions, UseGroupByOptions, UseRowSelectOptions, UseSortByOptions, TableState, UseFiltersState, UseExpandedState, UseGroupByState, UseRowSelectState, UseSortByState, UseResizeColumnsState, TableInstance, UseFiltersInstanceProps, UseExpandedInstanceProps, UseGroupByInstanceProps, UseRowSelectInstanceProps, UseSortByInstanceProps, PluginHook, HeaderGroup, Cell, Row, UsePaginationOptions, TableDispatch } from 'react-table'; export { Cell, Column, ColumnInstance, HeaderGroup, Row, TableInstance, UseFiltersColumnProps, UseGroupByColumnProps, UseSortByColumnProps, useBlockLayout as featureDefaultLayout, useFilters as featureFilterColumns, useFlexLayout as featureFlexLayout, useResizeColumns as featureResizeColumns } from 'react-table'; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare const LINEUP_LITE_I18N_EN: { hideColumn: string; groupByRemoveColumn: string; groupByAnotherColumn: string; groupByColumn: string; sortByColumn: string; sortByColumnDesc: string; sortByRemoveColumn: string; sortByAnotherColumn: string; sortByAnotherColumnDesc: string; filterColumn: string; }; declare type LineUpLiteI18N = typeof LINEUP_LITE_I18N_EN; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface ActionIcons { groupBy: ComponentType; sortAsc: ComponentType; sortDesc: ComponentType; expandGroup: ComponentType; hideColumn: ComponentType; resetFilter: ComponentType; clearSelection: ComponentType; filterColumn: ComponentType; } interface PaginationIcons { firstPage: ComponentType; previousPage: ComponentType; nextPage: ComponentType; lastPage: ComponentType; } /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare function actionIconsRemixicon(): ActionIcons; declare function paginationIconsRemixicon(): PaginationIcons & ActionIcons; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare const LINEUP_LITE_TEXT_ICONS: PaginationIcons & ActionIcons; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLiteToolbarProps extends ColumnInstance, ActionLineUpProps { className?: string; style?: CSSProperties; } declare function LineUpLiteToolbar(props: PropsWithChildren>): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface CustomSortByAction { (column: ColumnInstance & UseSortByColumnProps & UseSortingOptionsColumnProps, helper: { toggleSortBy(descending?: boolean, multi?: boolean): void; }): { handler(event: MouseEvent): void; children?: ReactNode; } | undefined; } declare function LineUpLiteSortByAction(props: CommonProps & { column: ColumnInstance & UseSortByColumnProps; children?: ReactNode; outerChildren?: ReactNode; iconAsc: ComponentType; iconDesc: ComponentType; onClick?(event: MouseEvent): void; }): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface CustomGroupByAction { (column: ColumnInstance & UseGroupByColumnProps & UseGroupingOptionsColumnProps, helper: { toggleGroupBy(): void; setGroupBy(): void; }): { handler(event: MouseEvent): void; children?: ReactNode; } | undefined; } declare function LineUpLiteGroupByAction(props: CommonProps & { column: UseGroupByColumnProps & ColumnInstance; children?: ReactNode; outerChildren?: ReactNode; icon: ComponentType; onClick?(event: MouseEvent): void; }): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare function LineUpLiteHideAction(props: CommonProps & { column: ColumnInstance; children?: ReactNode; outerChildren?: ReactNode; canHide?: boolean; canResize?: boolean; icon: ComponentType; }): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface CustomFilterByAction { (column: ColumnInstance & UseFiltersColumnProps): { handler(event: MouseEvent): void; children?: ReactNode; } | undefined; } declare function LineUpLiteFilterAction(props: CommonProps & { column: ColumnInstance & UseFiltersColumnProps; children?: ReactNode; outerChildren?: ReactNode; icon: ComponentType; onClick?(event: MouseEvent): void; }): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare type UseLineUpLiteTableOptions = TableOptions & UseFiltersOptions & UseExpandedOptions & UseGroupByOptions & UseRowSelectOptions & UseSortByOptions & UseRowExpandColumnTableOptions & UseSelectColumnTableOptions & UseRowRankColumnTableOptions; interface LineUpLiteState extends TableState, UseFiltersState, UseExpandedState, UseGroupByState, UseRowSelectState, UseSortByState, UseGroupingOptionsState, UseResizeColumnsState { } interface LineUpLiteTableInstance extends TableInstance, UseFiltersInstanceProps, UseExpandedInstanceProps, UseGroupByInstanceProps, UseRowSelectInstanceProps, UseGroupingOptionsInstanceProps, UseSortByInstanceProps { } interface UseLineUpLiteOptions extends UseLineUpLiteTableOptions { defaultColumn?: Partial>; columns: LineUpLiteColumn[]; features: readonly (PluginHook | PluginHook[])[]; onStateChange?: (state: LineUpLiteState) => void; } declare function featureRowSelect(): PluginHook[]; declare function featureSortBy(): PluginHook[]; declare function featureSortAndGroupBy(): PluginHook[]; /** * default feature set including: filters, sorting, grouping, row select, row rank, and default layout */ declare function featureDefault(): PluginHook[]; declare function useLineUpLite({ features, ...props }: UseLineUpLiteOptions, ...extraPlugins: PluginHook[]): LineUpLiteTableInstance; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare type MultiCustomizeKeys = 'tbody' | 'tr' | 'thead' | 'th' | 'thGroup' | 'td' | 'header'; declare type LineUpLiteComponentLike = ComponentType, HTMLElement>>; interface CustomizeLineUpProps { /** * hook for adding extra CSS classnames */ classNames?: Partial>; /** * hoop for adding extra styles */ styles?: Partial>; i18n?: Partial; components?: Partial>; dark?: boolean; } interface ActionLineUpProps { /** * customize the icons to use */ icons?: Partial; /** * callback for generating extra toolbar actions for a column */ actions?: (column: ColumnInstance, icons: ActionIcons) => ReactNode; /** * custom handler for sort by action click */ actionSortBy?: CustomSortByAction; /** * custom handler for group by action click */ actionGroupBy?: CustomGroupByAction; /** * custom handler for filter action click */ actionFilter?: CustomFilterByAction; } interface LineUpLiteProps extends UseLineUpLiteOptions, ActionLineUpProps, CustomizeLineUpProps, CommonProps { icons?: Partial; i18n?: UseLineUpLiteOptions['i18n'] & CustomizeLineUpProps['i18n']; children?: ReactNode; } /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare const _default: (p: LineUpLiteProps & React.RefAttributes) => ReactElement; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare type SizeEstimator = number | [number, number] | ((index: number) => number); interface LineUpLiteVirtualProps extends LineUpLiteProps { estimatedSize: SizeEstimator; rowSpacing?: number; overscan?: number; icons?: Partial; } declare const LineUpLiteVirtual: (p: LineUpLiteVirtualProps & React.RefAttributes) => ReactElement; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLiteTHProps extends ActionLineUpProps { col: HeaderGroup; children?: ReactNode; } declare const LineUpLiteTH: (p: LineUpLiteTHProps & React.RefAttributes) => ReactElement; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLiteTDProps { cell: Cell; children?: ReactNode; } declare const LineUpLiteTD: (p: LineUpLiteTDProps & React.RefAttributes) => ReactElement; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLiteTHeadProps extends ActionLineUpProps { headerGroups: HeaderGroup[]; children?: ReactNode; } declare const LineUpLiteTHead: (p: LineUpLiteTHeadProps & React.RefAttributes) => ReactElement; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLiteTRProps { row: Row; virtualStart?: number; virtualSize?: number; children?: ReactNode; } declare const LineUpLiteTR: (p: LineUpLiteTRProps & React.RefAttributes) => ReactElement; declare const LineUpLiteTRMemo: (p: LineUpLiteTRProps & React.RefAttributes) => ReactElement; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLitePaginatedProps extends LineUpLiteProps, UsePaginationOptions { icons: PaginationIcons & ActionIcons; } declare function LineUpLitePaginated(props: LineUpLitePaginatedProps): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLitePaginationProps { pageIndex: number; pageSize: number; pageCount: number; gotoPage: (updater: ((pageIndex: number) => number) | number) => void; setPageSize: (pageSize: number) => void; icons: PaginationIcons; } declare function LineUpLitePagination({ gotoPage, pageIndex, pageCount, pageSize, setPageSize, icons, }: LineUpLitePaginationProps): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare function LineUpLiteTVirtualBody({ rows, prepareRow, getTableBodyProps, theadRef, estimatedSize, overscan, rowSpacing, }: { getTableBodyProps: TableInstance['getTableBodyProps']; rows: Row[]; theadRef: RefObject; prepareRow: (row: Row) => void; estimatedSize: SizeEstimator; rowSpacing: number; overscan?: number; }): JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare const DATA_SUMMARY_I18N_EN: { dataSummary: string; dataSummaryFiltered: string; dataSummaryResetFilter: string; dataSummarySelected: string; dataSummaryClearSelection: string; }; interface LineUpLiteDataSummaryProps extends CommonProps { instance: LineUpLiteTableInstance; state?: LineUpLiteState; format?: (v: number) => string; icons?: Partial>; } declare const LineUpLiteDataSummary: (p: LineUpLiteDataSummaryProps & React.RefAttributes) => JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare type MultiCustomizePanelKeys = 'dataSummary' | 'tableSummary' | 'th' | 'header'; interface CustomizeLineUpPanelProps { /** * hook for adding extra CSS classnames */ classNames?: Partial>; /** * hoop for adding extra styles */ styles?: Partial>; i18n?: Partial; components?: Partial>; dark?: boolean; } interface LineUpLitePanelProps extends CustomizeLineUpPanelProps, ActionLineUpProps, CommonProps { children?: ReactNode; } /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ declare const LineUpLitePanel: (p: LineUpLitePanelProps & React.RefAttributes) => JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLiteTableSummaryProps extends CommonProps, ActionLineUpProps { instance: LineUpLiteTableInstance; state?: LineUpLiteState; } declare const LineUpLiteTableSummary: (p: LineUpLiteTableSummaryProps & React.RefAttributes) => JSX.Element; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLitePanelContextProps extends Required { dispatch: TableDispatch; dark: boolean; } declare const LineUpLitePanelContext: React.Context; declare function LineUpLitePanelContextProvider(props: PropsWithChildren<{ instance: TableInstance; props: CustomizeLineUpPanelProps; }>): JSX.Element; declare function useLineUpLitePanelContext(): LineUpLitePanelContextProps | undefined; /** * @lineup-lite/table * https://github.com/sgratzl/lineup-lite * * Copyright (c) 2021 Samuel Gratzl */ interface LineUpLiteTableContextProps extends Required { dispatch: TableDispatch; dark: boolean; sortByColumnCount: number; groupByColumnCount: number; } declare const LineUpLiteTableContext: React.Context; declare function LineUpLiteTableContextProvider(props: PropsWithChildren<{ instance: LineUpLiteTableInstance; props: CustomizeLineUpProps; }>): JSX.Element; declare function useLineUpLiteTableContext(): LineUpLiteTableContextProps | undefined; interface LineUpLiteStateContextProps { state?: LineUpLiteState; instance?: LineUpLiteTableInstance; } interface LineUpLiteStateContextSetter { setState(state: LineUpLiteState): void; setInstance(instance: LineUpLiteTableInstance): void; } declare const LineUpLiteStateContext: React.Context | undefined>; declare const LineUpLiteStateSetterContext: React.Context | undefined>; declare function useStateListener(props: { onStateChange?: (state: LineUpLiteState) => void; }, instance: LineUpLiteTableInstance): void; declare function LineUpLiteStateContextProvider(props: { children: ReactNode; }): JSX.Element; declare function useLineUpLiteStateContext(): LineUpLiteStateContextProps | undefined; export { ActionIcons, ActionLineUpProps, CustomFilterByAction, CustomGroupByAction, CustomSortByAction, CustomizeLineUpPanelProps, CustomizeLineUpProps, DATA_SUMMARY_I18N_EN, LINEUP_LITE_I18N_EN, LINEUP_LITE_TEXT_ICONS, _default as LineUpLite, LineUpLiteComponentLike, LineUpLiteDataSummary, LineUpLiteDataSummaryProps, LineUpLiteFilterAction, LineUpLiteGroupByAction, LineUpLiteHideAction, LineUpLiteI18N, LineUpLitePaginated, LineUpLitePaginatedProps, LineUpLitePagination, LineUpLitePaginationProps, LineUpLitePanel, LineUpLitePanelContext, LineUpLitePanelContextProps, LineUpLitePanelContextProvider, LineUpLitePanelProps, LineUpLiteProps, LineUpLiteSortByAction, LineUpLiteState, LineUpLiteStateContext, LineUpLiteStateContextProps, LineUpLiteStateContextProvider, LineUpLiteStateContextSetter, LineUpLiteStateSetterContext, LineUpLiteTD, LineUpLiteTDProps, LineUpLiteTH, LineUpLiteTHProps, LineUpLiteTHead, LineUpLiteTHeadProps, LineUpLiteTR, LineUpLiteTRMemo, LineUpLiteTRProps, LineUpLiteTVirtualBody, LineUpLiteTableContext, LineUpLiteTableContextProps, LineUpLiteTableContextProvider, LineUpLiteTableInstance, LineUpLiteTableSummary, LineUpLiteTableSummaryProps, LineUpLiteToolbar, LineUpLiteToolbarProps, LineUpLiteVirtual, LineUpLiteVirtualProps, MultiCustomizeKeys, MultiCustomizePanelKeys, PaginationIcons, SizeEstimator, UseLineUpLiteOptions, UseLineUpLiteTableOptions, actionIconsRemixicon, _default as default, featureDefault, featureRowSelect, featureSortAndGroupBy, featureSortBy, paginationIconsRemixicon, useLineUpLite, useLineUpLitePanelContext, useLineUpLiteStateContext, useLineUpLiteTableContext, useStateListener }; //# sourceMappingURL=index.d.ts.map