UNPKG

@uniquedj95/vtable

Version:

An advanced datatable for Ionic vue framework

114 lines 3.4 kB
export interface Option { label: string; value: string | number; other?: any; isChecked?: boolean; disabled?: boolean; description?: string; } export interface TableColumnInterface { label: string; path: string; exportable?: boolean; initialSort?: boolean; sortable?: boolean; initialSortOrder?: sortType; sortCaseSensitive?: boolean; drillable?: boolean | ((value: any, row: any) => boolean); preSort?: (value: any) => any; formatter?: (value: any, row: any) => any; thStyles?: Record<string, string>; thClasses?: Array<string>; tdStyles?: Record<string, string> | ((value: any, row: any) => Record<string, string>); tdClasses?: Array<string> | ((value: any, row: any) => Array<string>); customRenderer?: (value: any, row: any, column: TableColumnInterface) => any; slotName?: string; component?: any; componentProps?: (value: any, row: any) => Record<string, any>; } export interface SortQueryInterface { column: TableColumnInterface; order: sortType; } export type sortType = 'asc' | 'desc' | 'none'; export type ButtonSize = 'small' | 'large' | 'default'; export interface PaginationInterface { enabled: boolean; page: number; pageSize: number; start: number; end: number; totalPages: number; visibleBtns: number; pageSizeOptions: number[]; } export interface TableFilterInterface { pagination: PaginationInterface; search: string; sort: SortQueryInterface[]; } export interface ActionButtonInterface { label: string; icon?: string; action: (activeRows: any[], allRows: any[], filters: TableFilterInterface, columns: TableColumnInterface[]) => any; color?: string; size?: ButtonSize; } export interface RowActionButtonInterface { label?: string; icon?: string; action: (row: any, index: number) => any; size?: ButtonSize; color?: string; default?: boolean; condition?: (row: any) => boolean; } export type TextFieldTypes = 'text' | 'number' | 'date'; export interface CustomFilterInterface { id: string; label?: string; value?: any; gridSize?: number; type: TextFieldTypes | 'select' | 'dateRange'; options?: Option[]; placeholder?: string; required?: boolean; multiple?: boolean; onUpdate?: (value: any) => any; slotName?: string; } export interface TableConfigInterface { showSubmitButton?: boolean; showSearchField?: boolean; showIndices?: boolean; pagination?: Partial<PaginationInterface>; } export interface TableGlobalConfig { color: 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'dark' | 'medium' | 'custom'; } export interface PaginationButton { onClick?: () => void; icon?: string; label?: string | number; disabled?: boolean; } /** * Cell component configuration interfaces */ export interface ChipConfig { color?: string; outline?: boolean; size?: 'small' | 'default' | 'large'; } export interface BadgeConfig { color?: string; size?: 'small' | 'default' | 'large'; } export interface StatusConfig { [key: string]: { color: string; label?: string; outline?: boolean; }; } //# sourceMappingURL=types.d.ts.map