export type SortOptions = { key: string order: 'desc' | 'asc' } export type FilterType = 'text' | 'number' | 'date' | 'period' | 'select' | 'autocomplete' | 'custom' type FilterValue = | string | number | Date | Array> | { from: string | null, to: string | null } | Record | null | undefined export type TableDensityType = 'default' | 'comfortable' | 'compact' export interface FilterOption { key: string value: FilterValue type: FilterType } export type Items = (Record | object)[] export interface DataOptions { page: number itemsPerPage: number sortBy: SortOptions[] groupBy?: SortOptions[] multiSort?: boolean mustSort?: boolean filters?: FilterOption[] } export type DataTableHeaders = { title?: string text?: string value?: string key?: string filterable?: boolean filterType?: FilterType filterOptions?: Array<{ text: string, value: unknown }> multiple?: boolean chips?: boolean sortable?: boolean hideMessages?: boolean dateFormat?: string align?: 'start' | 'end' | 'center' order?: number hidden?: boolean width?: string | number maxWidth?: string | number minWidth?: string | number headerProps?: Record cellProps?: Record } // Type to handle both Vuetify internal headers and our custom headers export type TableColumnHeader = { title?: string value?: unknown key?: string | null filterable?: boolean filterType?: FilterType filterOptions?: Array<{ text: string, value: unknown }> multiple?: boolean chips?: boolean hideMessages?: boolean dateFormat?: string sort?: unknown filter?: unknown width?: string | number align?: string children?: unknown[] maxWidth?: string | number minWidth?: string | number headerProps?: unknown cellProps?: unknown [key: string]: unknown // Allow for any additional properties from Vuetify } // Component-specific props interfaces export type SyTableProps = { items?: Items suffix: string saveState?: boolean caption?: string showFilters?: boolean filterInputConfig?: Record density?: TableDensityType striped?: boolean resizableColumns?: boolean enableColumnControls?: boolean headers?: DataTableHeaders[] showSelect?: boolean showSelectSingle?: boolean stickySelect?: boolean showExpand?: boolean selectionKey?: string multiSort?: boolean mustSort?: boolean itemsPerPageOptions?: number[] headingLevel?: 1 | 2 | 3 | 4 | 5 | 6 pinnedColumns?: Array pinnedColumnKey?: string clickableRow?: boolean pageInput?: boolean hideDefaultFooter?: boolean } export type SyServerTableProps = { serverItemsLength: number items?: Items suffix: string saveState?: boolean caption?: string showFilters?: boolean resizableColumns?: boolean filterInputConfig?: Record density?: TableDensityType striped?: boolean enableColumnControls?: boolean headers?: DataTableHeaders[] showSelect?: boolean showSelectSingle?: boolean stickySelect?: boolean showExpand?: boolean selectionKey?: string multiSort?: boolean mustSort?: boolean itemsPerPageOptions?: number[] headingLevel?: 1 | 2 | 3 | 4 | 5 | 6 pinnedColumns?: Array pinnedColumnKey?: string clickableRow?: boolean pageInput?: boolean hideDefaultFooter?: boolean }