/** * Dashboard domain models and types */ export type DashboardViewMode = 'view' | 'edit'; export type DashboardLayoutMode = 'row-based' | 'freeform'; export type DashboardViewFrame = 'auto' | 'standard' | 'wide' | 'tablet' | 'mobile' | 'report'; export type WidgetType = 'counter' | 'chart-area' | 'chart-line' | 'chart-bar' | 'chart-donut' | 'chart-pie' | 'chart-heatmap' | 'table' | 'list'; export interface WidgetLayout { x: number; y: number; w: number; h: number; minW?: number; minH?: number; maxW?: number; maxH?: number; } export interface WidgetDataConfig { dataSource?: string; query?: string; filters?: Record; groupBy?: string; aggregation?: string; limit?: number; refreshInterval?: number; } export interface Widget { id: string; type: WidgetType; title: string; subtitle?: string; layout: WidgetLayout; dataConfig?: WidgetDataConfig; options?: Record; metadata?: Record; } export interface Dashboard { id: string; name: string; description?: string; tags?: string[]; createdAt: string; updatedAt: string; createdBy?: string; layoutEngine: 'gridstack' | 'grid-layout'; layoutMode: DashboardLayoutMode; widgets: Widget[]; filters?: Record; refreshInterval?: number; metadata?: Record; } export interface DashboardTemplate { id: string; name: string; description: string; thumbnail?: string; category: string; widgets: Omit[]; }