import { QTableColumn, QTableProps } from 'quasar'; export interface MediaDetails { filesize: number; } export interface SettingsGeneral { backgroundColor: string; dark: boolean; dense: boolean; separator: 'horizontal' | 'vertical' | 'cell' | 'none' | undefined; textColor: string; } export interface SettingsBottom { backgroundColor: string; hidePagination: boolean; initial: QTableProps['pagination']; rowsPerPageLabel: string; textColor: string; } export interface SettingsColumns { columnsMaxWidth: Record; columnsMinWidth: Record; stickyFirstColumn: boolean; stickyFirstColumnBgColor: string; stickyFirstColumnTextColor: string; stickyLastColumn: boolean; stickyLastColumnBgColor: string; stickyLastColumnTextColor: string; visibleColumns: string[]; hiddenColumns: string[]; } export interface SettingsContent { buttonText: string; buttonBgColor: string; buttonTextColor: string; previewMode: boolean; verticalAlignment: 'bottom' | 'middle' | 'top'; } export interface SettingsCustomCss { cardClass: string; tableClass: string; tableHeaderClass: string; titleClass: string; } export interface SettingsDimensions { tableHeight: number | string | null; tableMaxWidth: string | null; } export interface SettingsTop { hideHeader: boolean; headerBackgroundColor: string; headerTextColor: string; hideTitle: boolean; stickyHeader: boolean; textColor: string; topBackgroundColor: string; } export interface SettingsSearch { color: string; searchOn: boolean; filter: string; searchInputStyle: 'borderless' | 'filled' | 'outlined' | 'standard'; } export interface SettingsSorting { sortingOn: boolean; binaryStateSort: boolean; columnSortOrder: 'ad' | 'da'; } export interface SettingsVirtualScroll { virtualScrollOn: boolean; virtualScrollSliceSize: number; virtualScrollSliceRatioBefore: number; virtualScrollSliceRatioAfter: number; virtualScrollStickySizeStart: number; } export interface Settings { general: SettingsGeneral; bottom: SettingsBottom; customCss: SettingsCustomCss; search: SettingsSearch; sorting: SettingsSorting; top: SettingsTop; virtualScroll: SettingsVirtualScroll; } export interface Table { id: string; title: string; shortcode: string; settings: Settings; createdAt: string | Date; updatedAt: string | Date; content: Record; source: string | null; } export interface Pagination { sortBy: string | undefined; descending: boolean | undefined; page: number; rowsPerPage: number; rowsNumber: number; search: string; } export interface CellMerged { mainCell: number; cells: number[]; } export interface Row { [key: string | number | symbol]: any; } export interface TopRow { cols: QTableColumn[]; } export interface CreateTablePayload { title: string; content: Record; source: string; settings: Settings; }