import { ReactNode } from '../../../../node_modules/.pnpm/react@19.1.1/node_modules/react'; import { TTableState } from '../lib/hooks/use-table-states'; import { TTableColumn, TTableColumnOrGroup } from './col.types'; import { TExpandableConfig } from './expand.types'; import { TTableQuickFilter, TTableQuickFiltersConfig } from './filter.types'; export type TTableItem = Record; type HasColumnGroup[]> = Extract extends never ? false : true; type TRowPinning = { top: string[]; bottom: string[]; }; type TColumnPinning[]> = HasColumnGroup extends true ? never : { left: TTableColumn["definition"]["id"][]; right: TTableColumn["definition"]["id"][]; }; export type TTableProps[], Q extends TTableQuickFilter[]> = { columns: T; data: TItem[]; isLoading?: boolean; isNoData?: boolean; quickFilters?: TTableQuickFiltersConfig; /** Массив действий справа в toolbar (кнопки, элементы управления) */ toolbarExtra?: ReactNode[]; /** * Column pinning configuration. * ⚠️ NOT COMPATIBLE with multi-level headers (grouped columns). * See: https://github.com/TanStack/table/issues/5397 */ columnPinning?: TColumnPinning; /** Row identifier for expandable - required when using expandable */ getRowId?: (row: TItem, index: number) => string; /** Expandable rows configuration */ expandable?: TExpandableConfig; /** Row pinning — аналог columnPinning для строк */ rowPinning?: TRowPinning; /** Controlled column visibility state */ columnVisibility?: Record; /** Callback for column visibility changes */ onColumnVisibilityChange?: (visibility: Record) => void; } & TTableState & TTableDrillingProps; export type TTableContainerProps = { columns: readonly TTableColumnOrGroup[]; data: TItem[]; isLoading?: boolean; isNoData: boolean; totalPages: number; nextPage?: () => void; pagination: { pageIndex: number; pageSize: number; }; setPagination: (data: { pageIndex: number; pageSize: number; }) => void; columnPinning?: { left: TTableColumn["definition"]["id"][]; right: TTableColumn["definition"]["id"][]; }; /** Row identifier for expandable - required when using expandable */ getRowId?: (row: TItem, index: number) => string; /** Expandable rows configuration */ expandable?: TExpandableConfig; /** Row pinning — аналог columnPinning для строк */ rowPinning?: TRowPinning; /** Controlled column visibility state */ columnVisibility?: Record; /** Callback for column visibility changes */ onColumnVisibilityChange?: (visibility: Record) => void; } & TTableDrillingProps; export type TTableEmptyState = { description?: string | ReactNode; custom?: ReactNode; }; export type TTableDrillingProps = { isFirstSummaryRow?: boolean; emptyState?: TTableEmptyState; minHeight?: string; maxHeight?: string; /** CSS-классы для условной подсветки строк. Применяются к каждому строки. */ rowClassName?: (record: TItem, index: number) => string | undefined; }; export {}; //# sourceMappingURL=table.types.d.ts.map