declare module 'tablixjs' { export interface TableOptions { data?: any[]; columns?: ColumnDefinition[]; pagination?: PaginationOptions; sorting?: SortingOptions; filtering?: FilteringOptions; controls?: ControlsOptions; search?: SearchOptions; selection?: SelectionOptions; virtualScroll?: VirtualScrollOptions; } export interface ColumnDefinition { key: string; title?: string; width?: number | string; minWidth?: number; maxWidth?: number; sortable?: boolean; filterable?: boolean; searchable?: boolean; formatter?: (value: any, row: any, column: ColumnDefinition) => string; headerClass?: string; cellClass?: string | ((value: any, row: any) => string); } export interface PaginationOptions { enabled?: boolean; pageSize?: number; mode?: 'client' | 'server'; showPageNumbers?: boolean; maxPageNumbers?: number; showFirstLast?: boolean; showPrevNext?: boolean; showPageSizes?: boolean; pageSizeOptions?: number[]; serverDataLoader?: (page: number, pageSize: number) => Promise<{ data: any[], totalCount: number }>; } export interface SortingOptions { enabled?: boolean; mode?: 'client' | 'server'; serverSortLoader?: (sortBy: string, direction: string) => Promise; defaultSortType?: string; caseSensitive?: boolean; nullsFirst?: boolean; } export interface FilteringOptions { enabled?: boolean; mode?: 'client' | 'server'; serverFilterLoader?: (filters: any) => Promise; debounceDelay?: number; showBadges?: boolean; showTooltips?: boolean; } export interface ControlsOptions { enabled?: boolean; search?: boolean; pagination?: boolean; pageSize?: boolean; refresh?: boolean; export?: boolean; position?: 'top' | 'bottom' | 'both'; } export interface SearchOptions { enabled?: boolean; placeholder?: string; searchDelay?: number; minLength?: number; caseSensitive?: boolean; } export interface SelectionOptions { enabled?: boolean; mode?: 'single' | 'multi'; dataIdKey?: string; } export interface VirtualScrollOptions { enabled?: boolean; buffer?: number; rowHeight?: number | null; containerHeight?: number; } export interface PaginationInfo { currentPage: number; totalPages: number; pageSize: number; totalCount: number; startIndex: number; endIndex: number; } export interface FilterConfig { type: 'value' | 'condition'; values?: string[]; conditions?: FilterCondition[]; } export interface FilterCondition { operator: string; value: any; } export default class Table { container: HTMLElement; options: TableOptions; constructor(container: string | HTMLElement, options?: TableOptions); // Data management loadData(source: any[] | string | (() => Promise)): Promise; getData(): any[]; getOriginalData(): any[]; // Pagination nextPage(): Promise; prevPage(): Promise; firstPage(): Promise; lastPage(): Promise; goToPage(pageNumber: number): Promise; changePageSize(pageSize: number): Promise; getPaginationInfo(): PaginationInfo | null; setPaginationEnabled(enabled: boolean): Promise; setPaginationMode(mode: 'client' | 'server', serverDataLoader?: Function): Promise; // Sorting sort(columnName: string, direction?: 'asc' | 'desc'): Promise; toggleSort(columnName: string): Promise; clearSorting(): Promise; getSortState(): any; // Filtering applyFilter(columnName: string, filterConfig: FilterConfig): Promise; clearFilter(columnName: string): Promise; clearAllFilters(): Promise; getActiveFilters(): any; getColumnFilter(columnName: string): any; // Search setSearchTerm(searchTerm: string): Promise; getSearchTerm(): string; clearSearch(): Promise; getSearchInfo(): any; // Selection getSelectedData(): any[]; getSelectedIds(): string[]; selectRows(rowIds: string | string[]): void; deselectRows(rowIds: string | string[]): void; clearSelection(): void; isRowSelected(rowId: string): boolean; getSelectionCount(): number; enableSelection(): void; disableSelection(): void; setSelectionMode(mode: 'single' | 'multi'): void; selectAllRows(): number; // Events on(event: string, callback: Function): void; off(event: string, callback: Function): void; clearEvents(event?: string): void; trigger(event: string, data?: any): void; // Utility getOptions(): TableOptions; setOptions(newOptions: Partial): Promise; refreshTable(): Promise; destroy(): void; } export { Table }; export const version: string; }