@@ -68,7 +68,11 @@ export type WidgetComponentType =
|
||||
| "TasksWidget"
|
||||
| "CalendarWidget"
|
||||
| "QuickCaptureWidget"
|
||||
| "AgentStatusWidget";
|
||||
| "AgentStatusWidget"
|
||||
| "StatCardWidget"
|
||||
| "ChartWidget"
|
||||
| "ListWidget"
|
||||
| "CalendarPreviewWidget";
|
||||
|
||||
/**
|
||||
* Props for individual widgets
|
||||
@@ -79,3 +83,83 @@ export interface WidgetProps {
|
||||
onEdit?: () => void;
|
||||
onRemove?: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Widget configuration types
|
||||
*/
|
||||
export interface StatCardConfig {
|
||||
title?: string;
|
||||
dataSource: "tasks" | "events" | "projects";
|
||||
metric: "count" | "completed" | "overdue" | "upcoming";
|
||||
filter?: Record<string, unknown>;
|
||||
color?: string;
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
export interface ChartConfig {
|
||||
title?: string;
|
||||
chartType: "bar" | "line" | "pie" | "donut";
|
||||
dataSource: "tasks" | "events" | "projects";
|
||||
groupBy: "status" | "priority" | "project" | "day" | "week" | "month";
|
||||
filter?: Record<string, unknown>;
|
||||
colors?: string[];
|
||||
}
|
||||
|
||||
export interface ListConfig {
|
||||
title?: string;
|
||||
dataSource: "tasks" | "events" | "projects";
|
||||
sortBy?: string;
|
||||
sortOrder?: "asc" | "desc";
|
||||
limit?: number;
|
||||
filter?: Record<string, unknown>;
|
||||
showStatus?: boolean;
|
||||
showDueDate?: boolean;
|
||||
}
|
||||
|
||||
export interface CalendarPreviewConfig {
|
||||
title?: string;
|
||||
view: "day" | "week" | "agenda";
|
||||
showTasks?: boolean;
|
||||
showEvents?: boolean;
|
||||
daysAhead?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Widget data response types
|
||||
*/
|
||||
export interface WidgetStatData {
|
||||
value: number;
|
||||
change?: number;
|
||||
changePercent?: number;
|
||||
previousValue?: number;
|
||||
}
|
||||
|
||||
export interface WidgetChartData {
|
||||
labels: string[];
|
||||
datasets: {
|
||||
label: string;
|
||||
data: number[];
|
||||
backgroundColor?: string[];
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface WidgetListItem {
|
||||
id: string;
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
status?: string;
|
||||
priority?: string;
|
||||
dueDate?: string;
|
||||
startTime?: string;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
export interface WidgetCalendarItem {
|
||||
id: string;
|
||||
title: string;
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
allDay?: boolean;
|
||||
type: "task" | "event";
|
||||
color?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user