@libxai/board 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +67 -0
- package/dist/index.cjs +79 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +4378 -0
- package/dist/index.d.ts +4378 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +9102 -0
- package/package.json +134 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4378 @@
|
|
|
1
|
+
import * as _libxai_core from '@libxai/core';
|
|
2
|
+
import { Dependency, BaseViewAdapter, ViewBoardData, ExportFormat as ExportFormat$1, ViewOptions, BoardData, ColumnData, CardData, BoardState, BoardStore, Board as Board$1, Column as Column$2, Card as Card$2, Priority as Priority$1, CardStatus as CardStatus$1, DragState, SelectionState } from '@libxai/core';
|
|
3
|
+
export { AutoScheduleOptions, BaseEntity, Baseline, BaselineCardSnapshot, BoardData, Board as BoardModel, BoardState, BoardStore, CardData, Card as CardModel, ColumnData, Column as ColumnModel, CriticalPath, Dependency, DependencyEngine, DependencyType, DependencyValidation, GanttConfig, GanttState, Milestone, ResourceAllocation, ResourceUtilization, ScheduledTask, Store, StoreEvent, TaskConstraint, TaskConstraintType, UserData } from '@libxai/core';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as React$1 from 'react';
|
|
6
|
+
import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
7
|
+
import { ClassValue } from 'clsx';
|
|
8
|
+
import * as _tanstack_virtual_core from '@tanstack/virtual-core';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Card Stack Types
|
|
12
|
+
* Smart grouping of related cards within columns
|
|
13
|
+
* @module types/card-stack
|
|
14
|
+
*/
|
|
15
|
+
type StackingStrategy = 'manual' | 'ai-similarity' | 'labels' | 'assignee' | 'priority' | 'epic';
|
|
16
|
+
interface CardStack$1 {
|
|
17
|
+
/** Unique stack identifier */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Display title for the stack */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Cards contained in this stack */
|
|
22
|
+
cardIds: string[];
|
|
23
|
+
/** Column this stack belongs to */
|
|
24
|
+
columnId: string;
|
|
25
|
+
/** How this stack was created */
|
|
26
|
+
strategy: StackingStrategy;
|
|
27
|
+
/** Visual color for the stack */
|
|
28
|
+
color?: string;
|
|
29
|
+
/** Whether stack is expanded or collapsed */
|
|
30
|
+
isExpanded: boolean;
|
|
31
|
+
/** Position within the column */
|
|
32
|
+
position: number;
|
|
33
|
+
/** Timestamp when stack was created */
|
|
34
|
+
createdAt: Date;
|
|
35
|
+
/** AI confidence score (0-1) for auto-stacked groups */
|
|
36
|
+
confidence?: number;
|
|
37
|
+
}
|
|
38
|
+
interface StackingConfig {
|
|
39
|
+
/** Enable automatic AI-powered stacking */
|
|
40
|
+
enableAutoStacking: boolean;
|
|
41
|
+
/** Minimum confidence threshold for auto-stacking (0-1) */
|
|
42
|
+
autoStackConfidenceThreshold: number;
|
|
43
|
+
/** Minimum cards required to form a stack */
|
|
44
|
+
minCardsPerStack: number;
|
|
45
|
+
/** Enable manual drag-to-stack */
|
|
46
|
+
enableManualStacking: boolean;
|
|
47
|
+
/** Show stack summaries (card count, assignees, etc.) */
|
|
48
|
+
showStackSummaries: boolean;
|
|
49
|
+
/** Animation duration in ms */
|
|
50
|
+
animationDuration: number;
|
|
51
|
+
}
|
|
52
|
+
interface StackSuggestion {
|
|
53
|
+
/** Suggested stack configuration */
|
|
54
|
+
stack: Omit<CardStack$1, 'id' | 'createdAt' | 'isExpanded' | 'position'>;
|
|
55
|
+
/** Reason for suggestion */
|
|
56
|
+
reason: string;
|
|
57
|
+
/** Confidence score (0-1) */
|
|
58
|
+
confidence: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Core types for ASAKAA Kanban Board
|
|
63
|
+
* @module types
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Priority levels for cards
|
|
68
|
+
*/
|
|
69
|
+
type Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';
|
|
70
|
+
/**
|
|
71
|
+
* Card status types
|
|
72
|
+
*/
|
|
73
|
+
type CardStatus = 'TODO' | 'IN_PROGRESS' | 'REVIEW' | 'DONE' | 'BLOCKED';
|
|
74
|
+
/**
|
|
75
|
+
* Card entity
|
|
76
|
+
* Represents a single task/item in the Kanban board
|
|
77
|
+
*/
|
|
78
|
+
interface Card$1 {
|
|
79
|
+
/** Unique identifier */
|
|
80
|
+
id: string;
|
|
81
|
+
/** Card title (required) */
|
|
82
|
+
title: string;
|
|
83
|
+
/** Card description (optional) */
|
|
84
|
+
description?: string;
|
|
85
|
+
/** Lexicographic position within column (for ordering) */
|
|
86
|
+
position: number;
|
|
87
|
+
/** Parent column ID */
|
|
88
|
+
columnId: string;
|
|
89
|
+
/** Priority level */
|
|
90
|
+
priority?: Priority;
|
|
91
|
+
/** Assigned user ID (legacy - use assignedUserIds) */
|
|
92
|
+
assigneeId?: string;
|
|
93
|
+
/** Assigned user IDs (multiple users) */
|
|
94
|
+
assignedUserIds?: string[];
|
|
95
|
+
/** Tags/labels */
|
|
96
|
+
labels?: string[];
|
|
97
|
+
/** Due date (legacy - use startDate/endDate) */
|
|
98
|
+
dueDate?: Date | string;
|
|
99
|
+
/** Date range - start date */
|
|
100
|
+
startDate?: Date | string;
|
|
101
|
+
/** Date range - end date */
|
|
102
|
+
endDate?: Date | string;
|
|
103
|
+
/** Task dependencies - supports both legacy format (string[]) and new format (Dependency[]) */
|
|
104
|
+
dependencies?: string[] | Dependency[];
|
|
105
|
+
/** Estimated time (in hours) */
|
|
106
|
+
estimatedTime?: number;
|
|
107
|
+
/** Manual progress override (0-100%) */
|
|
108
|
+
progress?: number;
|
|
109
|
+
/** Cover image URL */
|
|
110
|
+
coverImage?: string;
|
|
111
|
+
/** Custom metadata */
|
|
112
|
+
metadata?: Record<string, unknown>;
|
|
113
|
+
createdAt?: Date | string;
|
|
114
|
+
updatedAt?: Date | string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Column entity
|
|
118
|
+
* Represents a stage/status in the workflow
|
|
119
|
+
*/
|
|
120
|
+
interface Column$1 {
|
|
121
|
+
/** Unique identifier */
|
|
122
|
+
id: string;
|
|
123
|
+
/** Column title */
|
|
124
|
+
title: string;
|
|
125
|
+
/** Lexicographic position (for ordering columns) */
|
|
126
|
+
position: number;
|
|
127
|
+
/** Array of card IDs in this column */
|
|
128
|
+
cardIds: string[];
|
|
129
|
+
/** Work-in-progress limit */
|
|
130
|
+
wipLimit?: number;
|
|
131
|
+
/** WIP limit enforcement type: 'soft' = warning, 'hard' = block */
|
|
132
|
+
wipLimitType?: 'soft' | 'hard';
|
|
133
|
+
/** Color for visual distinction */
|
|
134
|
+
color?: string;
|
|
135
|
+
/** Custom metadata */
|
|
136
|
+
metadata?: Record<string, unknown>;
|
|
137
|
+
createdAt?: Date | string;
|
|
138
|
+
updatedAt?: Date | string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Board entity
|
|
142
|
+
* Top-level container for the Kanban board
|
|
143
|
+
*/
|
|
144
|
+
interface Board {
|
|
145
|
+
/** Unique identifier */
|
|
146
|
+
id: string;
|
|
147
|
+
/** Board title */
|
|
148
|
+
title?: string;
|
|
149
|
+
/** Array of columns */
|
|
150
|
+
columns: Column$1[];
|
|
151
|
+
/** Array of all cards */
|
|
152
|
+
cards: Card$1[];
|
|
153
|
+
metadata?: Record<string, any>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Callbacks for board operations
|
|
157
|
+
* These allow the library consumer to persist changes
|
|
158
|
+
*/
|
|
159
|
+
interface BoardCallbacks {
|
|
160
|
+
/** Called when a card is moved to a different position/column */
|
|
161
|
+
onCardMove?: (cardId: string, targetColumnId: string, position: number) => void | Promise<void>;
|
|
162
|
+
/** Called when card properties are updated */
|
|
163
|
+
onCardUpdate?: (cardId: string, updates: Partial<Card$1>) => void | Promise<void>;
|
|
164
|
+
/** Called when a new card is created */
|
|
165
|
+
onCardCreate?: (card: Omit<Card$1, 'id'>) => void | Promise<void>;
|
|
166
|
+
/** Called when a card is deleted */
|
|
167
|
+
onCardDelete?: (cardId: string) => void | Promise<void>;
|
|
168
|
+
/** Called when a new column is created */
|
|
169
|
+
onColumnCreate?: (column: Omit<Column$1, 'id' | 'cardIds'>) => void | Promise<void>;
|
|
170
|
+
/** Called when column properties are updated */
|
|
171
|
+
onColumnUpdate?: (columnId: string, updates: Partial<Column$1>) => void | Promise<void>;
|
|
172
|
+
/** Called when a column is deleted */
|
|
173
|
+
onColumnDelete?: (columnId: string) => void | Promise<void>;
|
|
174
|
+
/** Called when columns are reordered */
|
|
175
|
+
onColumnReorder?: (columnId: string, newPosition: number) => void | Promise<void>;
|
|
176
|
+
/** Called when WIP limit is exceeded (hard limit only) */
|
|
177
|
+
onWipLimitExceeded?: (column: Column$1, card: Card$1) => void;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Insight types generated by AI
|
|
181
|
+
*/
|
|
182
|
+
type InsightType = 'RISK_DELAY' | 'RISK_OVERLOAD' | 'RISK_BLOCKER' | 'OPPORTUNITY' | 'SUGGESTION';
|
|
183
|
+
/**
|
|
184
|
+
* Severity levels for insights
|
|
185
|
+
*/
|
|
186
|
+
type InsightSeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
187
|
+
/**
|
|
188
|
+
* AI-generated insight about the board state
|
|
189
|
+
*/
|
|
190
|
+
interface Insight {
|
|
191
|
+
/** Unique identifier */
|
|
192
|
+
id?: string;
|
|
193
|
+
/** Type of insight */
|
|
194
|
+
type: InsightType;
|
|
195
|
+
/** Severity level */
|
|
196
|
+
severity: InsightSeverity;
|
|
197
|
+
/** Human-readable title */
|
|
198
|
+
title: string;
|
|
199
|
+
/** Detailed description */
|
|
200
|
+
description: string;
|
|
201
|
+
/** AI confidence score (0-1) */
|
|
202
|
+
confidence: number;
|
|
203
|
+
/** Suggested action to take */
|
|
204
|
+
suggestedAction?: string;
|
|
205
|
+
/** Related card IDs */
|
|
206
|
+
relatedCardIds?: string[];
|
|
207
|
+
/** Related column IDs */
|
|
208
|
+
relatedColumnIds?: string[];
|
|
209
|
+
/** Timestamp */
|
|
210
|
+
timestamp?: Date | string;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Result of AI assignee suggestion
|
|
214
|
+
*/
|
|
215
|
+
interface AssigneeSuggestion {
|
|
216
|
+
/** Suggested user ID */
|
|
217
|
+
userId: string;
|
|
218
|
+
/** Confidence score (0-1) */
|
|
219
|
+
confidence: number;
|
|
220
|
+
/** Reasoning for suggestion */
|
|
221
|
+
reasoning: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Result of AI plan generation
|
|
225
|
+
*/
|
|
226
|
+
interface GeneratedPlan {
|
|
227
|
+
/** Generated columns */
|
|
228
|
+
columns: Omit<Column$1, 'id'>[];
|
|
229
|
+
/** Generated cards */
|
|
230
|
+
cards: Omit<Card$1, 'id'>[];
|
|
231
|
+
/** Explanation of the plan */
|
|
232
|
+
explanation?: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* AI callbacks (optional)
|
|
236
|
+
* Consumer provides these if they want AI features
|
|
237
|
+
*/
|
|
238
|
+
interface AICallbacks {
|
|
239
|
+
/** Generate a complete board plan from a text prompt */
|
|
240
|
+
onGeneratePlan?: (prompt: string) => Promise<GeneratedPlan>;
|
|
241
|
+
/** Suggest best assignee for a card */
|
|
242
|
+
onSuggestAssignee?: (card: Card$1) => Promise<AssigneeSuggestion>;
|
|
243
|
+
/** Predict risks and opportunities based on board state */
|
|
244
|
+
onPredictRisks?: (boardState: Board) => Promise<Insight[]>;
|
|
245
|
+
/** Generate subtasks for a card */
|
|
246
|
+
onGenerateSubtasks?: (card: Card$1) => Promise<Omit<Card$1, 'id'>[]>;
|
|
247
|
+
/** Estimate effort for a card */
|
|
248
|
+
onEstimateEffort?: (card: Card$1) => Promise<{
|
|
249
|
+
hours: number;
|
|
250
|
+
confidence: number;
|
|
251
|
+
}>;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Configuration options for the Kanban board
|
|
255
|
+
*/
|
|
256
|
+
interface BoardConfig {
|
|
257
|
+
/** Enable virtualization (auto-enabled if >100 cards) */
|
|
258
|
+
enableVirtualization?: boolean;
|
|
259
|
+
/** Enable AI features */
|
|
260
|
+
enableAI?: boolean;
|
|
261
|
+
/** Animation duration in milliseconds */
|
|
262
|
+
animationDuration?: number;
|
|
263
|
+
/** Fixed column width in pixels */
|
|
264
|
+
columnWidth?: number;
|
|
265
|
+
/** Estimated card height for virtualization */
|
|
266
|
+
cardHeight?: number;
|
|
267
|
+
/** Enable keyboard shortcuts */
|
|
268
|
+
enableKeyboardShortcuts?: boolean;
|
|
269
|
+
/** Show card count in column headers */
|
|
270
|
+
showCardCount?: boolean;
|
|
271
|
+
/** Show WIP limits */
|
|
272
|
+
showWipLimits?: boolean;
|
|
273
|
+
/** Enable column collapsing */
|
|
274
|
+
enableCollapsible?: boolean;
|
|
275
|
+
/** Maximum cards to display per column before showing "show more" */
|
|
276
|
+
maxCardsPerColumn?: number;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Render props for customization
|
|
280
|
+
*/
|
|
281
|
+
interface RenderProps {
|
|
282
|
+
/** Custom card renderer */
|
|
283
|
+
renderCard?: (card: Card$1) => React.ReactNode;
|
|
284
|
+
/** Custom column renderer */
|
|
285
|
+
renderColumn?: (column: Column$1, cards: Card$1[]) => React.ReactNode;
|
|
286
|
+
/** Custom card overlay during drag */
|
|
287
|
+
renderCardOverlay?: (card: Card$1) => React.ReactNode;
|
|
288
|
+
/** Custom column header */
|
|
289
|
+
renderColumnHeader?: (column: Column$1, cardCount: number) => React.ReactNode;
|
|
290
|
+
/** Custom empty state */
|
|
291
|
+
renderEmptyState?: (column: Column$1) => React.ReactNode;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* User entity for assignment
|
|
295
|
+
*/
|
|
296
|
+
interface User$2 {
|
|
297
|
+
id: string;
|
|
298
|
+
name: string;
|
|
299
|
+
initials: string;
|
|
300
|
+
color: string;
|
|
301
|
+
avatar?: string;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Main KanbanBoard component props
|
|
305
|
+
*/
|
|
306
|
+
interface KanbanBoardProps {
|
|
307
|
+
/** Board data (controlled) */
|
|
308
|
+
board: Board;
|
|
309
|
+
/** Callbacks for mutations */
|
|
310
|
+
callbacks: BoardCallbacks;
|
|
311
|
+
/** AI callbacks (optional) */
|
|
312
|
+
aiCallbacks?: AICallbacks;
|
|
313
|
+
/** Card click handler */
|
|
314
|
+
onCardClick?: (card: Card$1) => void;
|
|
315
|
+
/** Render customization */
|
|
316
|
+
renderProps?: RenderProps;
|
|
317
|
+
/** Configuration */
|
|
318
|
+
config?: BoardConfig;
|
|
319
|
+
/** Available users for assignment */
|
|
320
|
+
availableUsers?: User$2[];
|
|
321
|
+
/** Custom CSS class */
|
|
322
|
+
className?: string;
|
|
323
|
+
/** Custom inline styles */
|
|
324
|
+
style?: React.CSSProperties;
|
|
325
|
+
/** Loading state */
|
|
326
|
+
isLoading?: boolean;
|
|
327
|
+
/** Error state */
|
|
328
|
+
error?: Error | string;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Drag event data
|
|
332
|
+
*/
|
|
333
|
+
interface DragData {
|
|
334
|
+
/** Card being dragged */
|
|
335
|
+
card: Card$1;
|
|
336
|
+
/** Source column ID */
|
|
337
|
+
sourceColumnId: string;
|
|
338
|
+
/** Source position */
|
|
339
|
+
sourcePosition: number;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Drop event data
|
|
343
|
+
*/
|
|
344
|
+
interface DropData {
|
|
345
|
+
/** Card being dropped */
|
|
346
|
+
card: Card$1;
|
|
347
|
+
/** Target column ID */
|
|
348
|
+
targetColumnId: string;
|
|
349
|
+
/** Target position */
|
|
350
|
+
targetPosition: number;
|
|
351
|
+
/** Source column ID */
|
|
352
|
+
sourceColumnId: string;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Filter criteria for cards
|
|
356
|
+
*/
|
|
357
|
+
interface CardFilter {
|
|
358
|
+
/** Filter by assignee */
|
|
359
|
+
assigneeIds?: string[];
|
|
360
|
+
/** Filter by priority */
|
|
361
|
+
priorities?: Priority[];
|
|
362
|
+
/** Filter by labels */
|
|
363
|
+
labels?: string[];
|
|
364
|
+
/** Search in title/description */
|
|
365
|
+
search?: string;
|
|
366
|
+
/** Filter by date range */
|
|
367
|
+
dateRange?: {
|
|
368
|
+
start: Date | string;
|
|
369
|
+
end: Date | string;
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Sort options for cards
|
|
374
|
+
*/
|
|
375
|
+
type CardSortKey = 'position' | 'priority' | 'dueDate' | 'createdAt' | 'title';
|
|
376
|
+
interface CardSort {
|
|
377
|
+
key: CardSortKey;
|
|
378
|
+
direction: 'asc' | 'desc';
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Comment on a card
|
|
382
|
+
*/
|
|
383
|
+
interface Comment {
|
|
384
|
+
/** Unique identifier */
|
|
385
|
+
id: string;
|
|
386
|
+
/** Card ID */
|
|
387
|
+
cardId: string;
|
|
388
|
+
/** Author user ID */
|
|
389
|
+
authorId: string;
|
|
390
|
+
/** Comment content */
|
|
391
|
+
content: string;
|
|
392
|
+
/** Timestamp */
|
|
393
|
+
createdAt: Date | string;
|
|
394
|
+
/** Last update timestamp */
|
|
395
|
+
updatedAt?: Date | string;
|
|
396
|
+
/** Mentions (user IDs) */
|
|
397
|
+
mentions?: string[];
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Activity log entry types
|
|
401
|
+
*/
|
|
402
|
+
type ActivityType = 'CARD_CREATED' | 'CARD_UPDATED' | 'CARD_MOVED' | 'CARD_DELETED' | 'COMMENT_ADDED' | 'USER_ASSIGNED' | 'USER_UNASSIGNED' | 'PRIORITY_CHANGED' | 'DUE_DATE_CHANGED' | 'LABEL_ADDED' | 'LABEL_REMOVED' | 'DEPENDENCY_ADDED' | 'DEPENDENCY_REMOVED' | 'ATTACHMENT_ADDED' | 'ATTACHMENT_REMOVED';
|
|
403
|
+
/**
|
|
404
|
+
* Activity log entry
|
|
405
|
+
*/
|
|
406
|
+
interface Activity {
|
|
407
|
+
/** Unique identifier */
|
|
408
|
+
id: string;
|
|
409
|
+
/** Activity type */
|
|
410
|
+
type: ActivityType;
|
|
411
|
+
/** Card ID */
|
|
412
|
+
cardId: string;
|
|
413
|
+
/** User who performed the action */
|
|
414
|
+
userId: string;
|
|
415
|
+
/** Timestamp */
|
|
416
|
+
timestamp: Date | string;
|
|
417
|
+
/** Previous value (for updates) */
|
|
418
|
+
previousValue?: any;
|
|
419
|
+
/** New value (for updates) */
|
|
420
|
+
newValue?: any;
|
|
421
|
+
/** Additional metadata */
|
|
422
|
+
metadata?: Record<string, any>;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* File attachment on a card
|
|
426
|
+
*/
|
|
427
|
+
interface Attachment {
|
|
428
|
+
/** Unique identifier */
|
|
429
|
+
id: string;
|
|
430
|
+
/** Card ID */
|
|
431
|
+
cardId: string;
|
|
432
|
+
/** File name */
|
|
433
|
+
name: string;
|
|
434
|
+
/** File size in bytes */
|
|
435
|
+
size: number;
|
|
436
|
+
/** MIME type */
|
|
437
|
+
type: string;
|
|
438
|
+
/** File URL or data URI */
|
|
439
|
+
url: string;
|
|
440
|
+
/** Upload timestamp */
|
|
441
|
+
uploadedAt: Date | string;
|
|
442
|
+
/** User who uploaded */
|
|
443
|
+
uploadedBy: string;
|
|
444
|
+
/** Thumbnail URL (for images) */
|
|
445
|
+
thumbnailUrl?: string;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Bulk operations callbacks
|
|
449
|
+
*/
|
|
450
|
+
interface BulkOperationsCallbacks {
|
|
451
|
+
/** Called when bulk update is performed */
|
|
452
|
+
onBulkUpdate?: (cardIds: string[], updates: Partial<Card$1>) => void | Promise<void>;
|
|
453
|
+
/** Called when bulk delete is performed */
|
|
454
|
+
onBulkDelete?: (cardIds: string[]) => void | Promise<void>;
|
|
455
|
+
/** Called when bulk move is performed */
|
|
456
|
+
onBulkMove?: (cardIds: string[], targetColumnId: string) => void | Promise<void>;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Grouping options for swimlanes
|
|
460
|
+
*/
|
|
461
|
+
type GroupByOption = 'none' | 'assignee' | 'priority' | 'label' | 'custom';
|
|
462
|
+
/**
|
|
463
|
+
* Swimlane configuration
|
|
464
|
+
*/
|
|
465
|
+
interface SwimlaneConfig {
|
|
466
|
+
/** Grouping option */
|
|
467
|
+
groupBy: GroupByOption;
|
|
468
|
+
/** Custom field ID (when groupBy is 'custom') */
|
|
469
|
+
customFieldId?: string;
|
|
470
|
+
/** Show empty swimlanes */
|
|
471
|
+
showEmptyLanes?: boolean;
|
|
472
|
+
/** Collapsible swimlanes */
|
|
473
|
+
collapsible?: boolean;
|
|
474
|
+
/** Default collapsed state */
|
|
475
|
+
defaultCollapsed?: boolean;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Swimlane (horizontal row grouping cards)
|
|
479
|
+
*/
|
|
480
|
+
interface Swimlane {
|
|
481
|
+
/** Unique identifier */
|
|
482
|
+
id: string;
|
|
483
|
+
/** Swimlane title */
|
|
484
|
+
title: string;
|
|
485
|
+
/** Group value (user ID, priority, label, etc.) */
|
|
486
|
+
groupValue: any;
|
|
487
|
+
/** Card IDs in this swimlane */
|
|
488
|
+
cardIds: string[];
|
|
489
|
+
/** Is collapsed */
|
|
490
|
+
isCollapsed?: boolean;
|
|
491
|
+
/** Color for visual distinction */
|
|
492
|
+
color?: string;
|
|
493
|
+
/** Icon */
|
|
494
|
+
icon?: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Keyboard shortcut action types
|
|
498
|
+
* v0.5.0: Added single-key shortcuts for speed
|
|
499
|
+
*/
|
|
500
|
+
type KeyboardAction = 'navigate_up' | 'navigate_down' | 'navigate_left' | 'navigate_right' | 'open_card' | 'close_modal' | 'select_all' | 'deselect_all' | 'new_card' | 'edit_card' | 'delete_card' | 'focus_search' | 'show_shortcuts' | 'new_card_modal' | 'search' | 'open_filters' | 'save' | 'undo' | 'redo' | 'quick_add' | 'delete_card_confirm';
|
|
501
|
+
/**
|
|
502
|
+
* Keyboard shortcut definition
|
|
503
|
+
*/
|
|
504
|
+
interface KeyboardShortcut {
|
|
505
|
+
/** Shortcut key(s) */
|
|
506
|
+
keys: string | string[];
|
|
507
|
+
/** Action to perform */
|
|
508
|
+
action: KeyboardAction;
|
|
509
|
+
/** Description */
|
|
510
|
+
description: string;
|
|
511
|
+
/** Modifier keys required */
|
|
512
|
+
modifiers?: {
|
|
513
|
+
ctrl?: boolean;
|
|
514
|
+
shift?: boolean;
|
|
515
|
+
alt?: boolean;
|
|
516
|
+
meta?: boolean;
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Card template for quick creation
|
|
521
|
+
*/
|
|
522
|
+
interface CardTemplate {
|
|
523
|
+
/** Unique identifier */
|
|
524
|
+
id: string;
|
|
525
|
+
/** Template name */
|
|
526
|
+
name: string;
|
|
527
|
+
/** Template description */
|
|
528
|
+
description?: string;
|
|
529
|
+
/** Icon or emoji */
|
|
530
|
+
icon?: string;
|
|
531
|
+
/** Pre-filled card data */
|
|
532
|
+
template: Partial<Omit<Card$1, 'id' | 'position' | 'columnId'>>;
|
|
533
|
+
/** Category for organization */
|
|
534
|
+
category?: string;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Export format options
|
|
538
|
+
*/
|
|
539
|
+
type ExportFormat = 'json' | 'csv' | 'pdf';
|
|
540
|
+
/**
|
|
541
|
+
* Export options
|
|
542
|
+
*/
|
|
543
|
+
interface ExportOptions {
|
|
544
|
+
/** Format to export */
|
|
545
|
+
format: ExportFormat;
|
|
546
|
+
/** Include card details */
|
|
547
|
+
includeCardDetails?: boolean;
|
|
548
|
+
/** Include comments */
|
|
549
|
+
includeComments?: boolean;
|
|
550
|
+
/** Include activity log */
|
|
551
|
+
includeActivity?: boolean;
|
|
552
|
+
/** Include attachments */
|
|
553
|
+
includeAttachments?: boolean;
|
|
554
|
+
/** Date range filter */
|
|
555
|
+
dateRange?: {
|
|
556
|
+
start: Date | string;
|
|
557
|
+
end: Date | string;
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Import result
|
|
562
|
+
*/
|
|
563
|
+
interface ImportResult {
|
|
564
|
+
/** Was import successful */
|
|
565
|
+
success: boolean;
|
|
566
|
+
/** Number of cards imported */
|
|
567
|
+
cardsImported?: number;
|
|
568
|
+
/** Number of columns imported */
|
|
569
|
+
columnsImported?: number;
|
|
570
|
+
/** Errors encountered */
|
|
571
|
+
errors?: string[];
|
|
572
|
+
/** Warnings */
|
|
573
|
+
warnings?: string[];
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* KanbanViewAdapter - ViewAdapter implementation for Kanban board
|
|
578
|
+
* @module views/KanbanViewAdapter
|
|
579
|
+
*
|
|
580
|
+
* Implements the ViewAdapter interface from @libxai/core to enable
|
|
581
|
+
* the Kanban board to work with AsakaaRuntime and ViewRegistry.
|
|
582
|
+
*/
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Kanban view configuration
|
|
586
|
+
*/
|
|
587
|
+
interface KanbanViewConfig {
|
|
588
|
+
/**
|
|
589
|
+
* Board callbacks
|
|
590
|
+
*/
|
|
591
|
+
callbacks?: KanbanBoardProps['callbacks'];
|
|
592
|
+
/**
|
|
593
|
+
* Card click handler
|
|
594
|
+
*/
|
|
595
|
+
onCardClick?: KanbanBoardProps['onCardClick'];
|
|
596
|
+
/**
|
|
597
|
+
* Custom render props
|
|
598
|
+
*/
|
|
599
|
+
renderProps?: KanbanBoardProps['renderProps'];
|
|
600
|
+
/**
|
|
601
|
+
* Board configuration
|
|
602
|
+
*/
|
|
603
|
+
config?: KanbanBoardProps['config'];
|
|
604
|
+
/**
|
|
605
|
+
* Available users for assignment
|
|
606
|
+
*/
|
|
607
|
+
availableUsers?: KanbanBoardProps['availableUsers'];
|
|
608
|
+
/**
|
|
609
|
+
* Custom class name
|
|
610
|
+
*/
|
|
611
|
+
className?: string;
|
|
612
|
+
/**
|
|
613
|
+
* Custom inline styles (React.CSSProperties)
|
|
614
|
+
*/
|
|
615
|
+
style?: React.CSSProperties;
|
|
616
|
+
/**
|
|
617
|
+
* View options
|
|
618
|
+
*/
|
|
619
|
+
viewOptions?: ViewOptions;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* KanbanViewAdapter
|
|
623
|
+
*
|
|
624
|
+
* React-based ViewAdapter implementation that wraps the KanbanBoard component.
|
|
625
|
+
* This allows the Kanban board to be used as a view in the ViewRegistry and
|
|
626
|
+
* work seamlessly with AsakaaRuntime.
|
|
627
|
+
*
|
|
628
|
+
* @example
|
|
629
|
+
* ```typescript
|
|
630
|
+
* import { KanbanViewAdapter } from '@libxai/board'
|
|
631
|
+
* import { ViewRegistry } from '@libxai/core'
|
|
632
|
+
*
|
|
633
|
+
* const registry = new ViewRegistry()
|
|
634
|
+
* const kanbanView = new KanbanViewAdapter({
|
|
635
|
+
* callbacks: {
|
|
636
|
+
* onCardMove: (cardId, columnId) => { ... },
|
|
637
|
+
* onCardUpdate: (cardId, updates) => { ... }
|
|
638
|
+
* }
|
|
639
|
+
* })
|
|
640
|
+
*
|
|
641
|
+
* registry.register(kanbanView)
|
|
642
|
+
* await registry.activate('kanban', container, data)
|
|
643
|
+
* ```
|
|
644
|
+
*/
|
|
645
|
+
declare class KanbanViewAdapter extends BaseViewAdapter<ViewBoardData> {
|
|
646
|
+
readonly id = "kanban";
|
|
647
|
+
readonly name = "Kanban Board";
|
|
648
|
+
readonly version = "1.0.0";
|
|
649
|
+
readonly description = "";
|
|
650
|
+
readonly icon = "";
|
|
651
|
+
readonly supportedExports: ExportFormat$1[];
|
|
652
|
+
private root;
|
|
653
|
+
private kanbanConfig;
|
|
654
|
+
constructor(config?: KanbanViewConfig);
|
|
655
|
+
/**
|
|
656
|
+
* Mount the Kanban view
|
|
657
|
+
*
|
|
658
|
+
* @param container - DOM element to mount into
|
|
659
|
+
* @param data - Initial board data
|
|
660
|
+
*/
|
|
661
|
+
mount(container: HTMLElement, data: ViewBoardData): void;
|
|
662
|
+
/**
|
|
663
|
+
* Unmount the Kanban view
|
|
664
|
+
*/
|
|
665
|
+
unmount(): void;
|
|
666
|
+
/**
|
|
667
|
+
* Update the view with new data
|
|
668
|
+
*
|
|
669
|
+
* @param data - New board data
|
|
670
|
+
*/
|
|
671
|
+
update(data: ViewBoardData): void;
|
|
672
|
+
/**
|
|
673
|
+
* Configure the view
|
|
674
|
+
*
|
|
675
|
+
* @param options - View options
|
|
676
|
+
*/
|
|
677
|
+
configure(options: ViewOptions): void;
|
|
678
|
+
/**
|
|
679
|
+
* Export the view to a specific format
|
|
680
|
+
*
|
|
681
|
+
* @param format - Export format
|
|
682
|
+
* @returns Promise resolving to exported data
|
|
683
|
+
*/
|
|
684
|
+
export(format: 'json' | 'csv' | 'pdf' | 'png'): Promise<string | Blob>;
|
|
685
|
+
/**
|
|
686
|
+
* Render the Kanban board
|
|
687
|
+
*/
|
|
688
|
+
private render;
|
|
689
|
+
/**
|
|
690
|
+
* Export board data to CSV format
|
|
691
|
+
*/
|
|
692
|
+
private exportToCSV;
|
|
693
|
+
/**
|
|
694
|
+
* Export board to PDF
|
|
695
|
+
* Uses the PDF export functionality from the Board component
|
|
696
|
+
*/
|
|
697
|
+
private exportToPDF;
|
|
698
|
+
/**
|
|
699
|
+
* Export board to PNG image
|
|
700
|
+
* Uses html2canvas to capture the board
|
|
701
|
+
*/
|
|
702
|
+
private exportToPNG;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Create a new Kanban view adapter
|
|
706
|
+
*
|
|
707
|
+
* @param config - View configuration
|
|
708
|
+
* @returns KanbanViewAdapter instance
|
|
709
|
+
*
|
|
710
|
+
* @example
|
|
711
|
+
* ```typescript
|
|
712
|
+
* const kanbanView = createKanbanView({
|
|
713
|
+
* callbacks: {
|
|
714
|
+
* onCardMove: (cardId, columnId) => console.log('Card moved'),
|
|
715
|
+
* },
|
|
716
|
+
* theme: 'dark',
|
|
717
|
+
* })
|
|
718
|
+
* ```
|
|
719
|
+
*/
|
|
720
|
+
declare function createKanbanView(config?: KanbanViewConfig): KanbanViewAdapter;
|
|
721
|
+
|
|
722
|
+
declare function KanbanBoard({ board, callbacks, onCardClick, renderProps, config, availableUsers, className, style, isLoading, error, children, }: KanbanBoardProps & {
|
|
723
|
+
children?: React.ReactNode;
|
|
724
|
+
}): react_jsx_runtime.JSX.Element;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* User Assignment Selector Component
|
|
728
|
+
* Multi-select user assignment with avatar display
|
|
729
|
+
*/
|
|
730
|
+
interface User$1 {
|
|
731
|
+
id: string;
|
|
732
|
+
name: string;
|
|
733
|
+
avatar?: string;
|
|
734
|
+
initials: string;
|
|
735
|
+
color: string;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
interface ColumnProps {
|
|
739
|
+
/** Column data */
|
|
740
|
+
column: Column$1;
|
|
741
|
+
/** Cards in this column */
|
|
742
|
+
cards: Card$1[];
|
|
743
|
+
/** Custom column renderer */
|
|
744
|
+
renderColumn?: (column: Column$1, cards: Card$1[]) => React.ReactNode;
|
|
745
|
+
/** Custom card renderer */
|
|
746
|
+
renderCard?: (card: Card$1) => React.ReactNode;
|
|
747
|
+
/** Custom header renderer */
|
|
748
|
+
renderHeader?: (column: Column$1, cardCount: number) => React.ReactNode;
|
|
749
|
+
/** Custom empty state */
|
|
750
|
+
renderEmptyState?: (column: Column$1) => React.ReactNode;
|
|
751
|
+
/** Card click handler */
|
|
752
|
+
onCardClick?: (card: Card$1) => void;
|
|
753
|
+
/** Card update handler */
|
|
754
|
+
onCardUpdate?: (cardId: string, updates: Partial<Card$1>) => void;
|
|
755
|
+
/** Available users for assignment */
|
|
756
|
+
availableUsers?: User$1[];
|
|
757
|
+
/** All cards (for dependencies) */
|
|
758
|
+
allCards?: Card$1[];
|
|
759
|
+
/** Enable virtualization */
|
|
760
|
+
enableVirtualization?: boolean;
|
|
761
|
+
/** Estimated card height for virtualization */
|
|
762
|
+
cardHeight?: number;
|
|
763
|
+
/** Is column collapsed */
|
|
764
|
+
isCollapsed?: boolean;
|
|
765
|
+
/** Toggle collapse */
|
|
766
|
+
onToggleCollapse?: () => void;
|
|
767
|
+
/** Column rename handler */
|
|
768
|
+
onColumnRename?: (columnId: string, newTitle: string) => void;
|
|
769
|
+
/** Custom className */
|
|
770
|
+
className?: string;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Column Component
|
|
774
|
+
* Uses virtualization for large lists automatically
|
|
775
|
+
*/
|
|
776
|
+
declare const Column: React$1.NamedExoticComponent<ColumnProps>;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Editable Column Title Component
|
|
780
|
+
* Allows inline editing of column names
|
|
781
|
+
*/
|
|
782
|
+
interface EditableColumnTitleProps {
|
|
783
|
+
title: string;
|
|
784
|
+
onSave: (newTitle: string) => void;
|
|
785
|
+
className?: string;
|
|
786
|
+
}
|
|
787
|
+
declare function EditableColumnTitle({ title, onSave, className, }: EditableColumnTitleProps): react_jsx_runtime.JSX.Element;
|
|
788
|
+
|
|
789
|
+
interface CardProps {
|
|
790
|
+
/** Card data */
|
|
791
|
+
card: Card$1;
|
|
792
|
+
/** Custom render function */
|
|
793
|
+
render?: (card: Card$1) => React.ReactNode;
|
|
794
|
+
/** Click handler */
|
|
795
|
+
onClick?: (card: Card$1) => void;
|
|
796
|
+
/** Is card selected */
|
|
797
|
+
isSelected?: boolean;
|
|
798
|
+
/** Disable drag */
|
|
799
|
+
disableDrag?: boolean;
|
|
800
|
+
/** Custom className */
|
|
801
|
+
className?: string;
|
|
802
|
+
/** Card update handler */
|
|
803
|
+
onUpdate?: (cardId: string, updates: Partial<Card$1>) => void;
|
|
804
|
+
/** Available users for assignment */
|
|
805
|
+
availableUsers?: User$1[];
|
|
806
|
+
/** All cards (for dependencies) */
|
|
807
|
+
allCards?: Card$1[];
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Default Card Component
|
|
811
|
+
* Optimized with memo to prevent unnecessary re-renders
|
|
812
|
+
*/
|
|
813
|
+
declare const Card: React$1.NamedExoticComponent<CardProps>;
|
|
814
|
+
|
|
815
|
+
interface PrioritySelectorProps {
|
|
816
|
+
priority?: Priority;
|
|
817
|
+
onChange: (priority?: Priority) => void;
|
|
818
|
+
className?: string;
|
|
819
|
+
}
|
|
820
|
+
declare function PrioritySelector({ priority, onChange, className }: PrioritySelectorProps): react_jsx_runtime.JSX.Element;
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Date Range Picker V2
|
|
824
|
+
* Quick selection buttons + interactive calendar
|
|
825
|
+
* Uses world-class Dropdown system for perfect positioning
|
|
826
|
+
*/
|
|
827
|
+
interface DateRangePickerProps {
|
|
828
|
+
startDate?: string;
|
|
829
|
+
endDate?: string;
|
|
830
|
+
onChange: (startDate?: string, endDate?: string) => void;
|
|
831
|
+
className?: string;
|
|
832
|
+
}
|
|
833
|
+
declare function DateRangePicker({ startDate, endDate, onChange, className, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* User Assignment Selector V2
|
|
837
|
+
* Multi-select user assignment with avatar display
|
|
838
|
+
* Uses world-class Dropdown system for perfect positioning
|
|
839
|
+
*/
|
|
840
|
+
interface User {
|
|
841
|
+
id: string;
|
|
842
|
+
name: string;
|
|
843
|
+
avatar?: string;
|
|
844
|
+
initials: string;
|
|
845
|
+
color: string;
|
|
846
|
+
}
|
|
847
|
+
interface UserAssignmentSelectorProps {
|
|
848
|
+
assignedUsers?: User[];
|
|
849
|
+
availableUsers: User[];
|
|
850
|
+
onChange: (users: User[]) => void;
|
|
851
|
+
className?: string;
|
|
852
|
+
maxVisibleAvatars?: number;
|
|
853
|
+
}
|
|
854
|
+
declare function UserAssignmentSelector({ assignedUsers, availableUsers, onChange, className, maxVisibleAvatars, }: UserAssignmentSelectorProps): react_jsx_runtime.JSX.Element;
|
|
855
|
+
|
|
856
|
+
interface DependenciesSelectorProps {
|
|
857
|
+
/** Current card (to exclude from dependencies) */
|
|
858
|
+
currentCardId: string;
|
|
859
|
+
/** Currently selected dependencies */
|
|
860
|
+
dependencies?: string[];
|
|
861
|
+
/** All available tasks */
|
|
862
|
+
availableTasks: Card$1[];
|
|
863
|
+
/** Change handler */
|
|
864
|
+
onChange: (dependencies: string[]) => void;
|
|
865
|
+
/** Custom className */
|
|
866
|
+
className?: string;
|
|
867
|
+
}
|
|
868
|
+
declare function DependenciesSelector({ currentCardId, dependencies, availableTasks, onChange, className, }: DependenciesSelectorProps): react_jsx_runtime.JSX.Element;
|
|
869
|
+
|
|
870
|
+
interface ErrorBoundaryProps {
|
|
871
|
+
/** Child components to wrap */
|
|
872
|
+
children: ReactNode;
|
|
873
|
+
/** Custom fallback UI (receives error and reset callback) */
|
|
874
|
+
fallback?: (error: Error, reset: () => void) => ReactNode;
|
|
875
|
+
/** Callback when error is caught */
|
|
876
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
877
|
+
/** Component identifier for error tracking */
|
|
878
|
+
componentName?: string;
|
|
879
|
+
}
|
|
880
|
+
interface ErrorBoundaryState {
|
|
881
|
+
hasError: boolean;
|
|
882
|
+
error: Error | null;
|
|
883
|
+
errorInfo: ErrorInfo | null;
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Error Boundary for catching React errors
|
|
887
|
+
*
|
|
888
|
+
* @example
|
|
889
|
+
* ```tsx
|
|
890
|
+
* <ErrorBoundary
|
|
891
|
+
* onError={(error) => console.error(error)}
|
|
892
|
+
* componentName="KanbanBoard"
|
|
893
|
+
* >
|
|
894
|
+
* <KanbanBoard {...props} />
|
|
895
|
+
* </ErrorBoundary>
|
|
896
|
+
* ```
|
|
897
|
+
*/
|
|
898
|
+
declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
899
|
+
constructor(props: ErrorBoundaryProps);
|
|
900
|
+
static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
|
|
901
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
902
|
+
resetError: () => void;
|
|
903
|
+
render(): ReactNode;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Hook-based error boundary wrapper
|
|
907
|
+
* Use this for functional components
|
|
908
|
+
*/
|
|
909
|
+
declare function withErrorBoundary<P extends object>(Component: React__default.ComponentType<P>, errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>): {
|
|
910
|
+
(props: P): react_jsx_runtime.JSX.Element;
|
|
911
|
+
displayName: string;
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
interface CommandPaletteProps {
|
|
915
|
+
/** Current board state */
|
|
916
|
+
board: Board;
|
|
917
|
+
/** Available users for assignment */
|
|
918
|
+
availableUsers?: User$2[];
|
|
919
|
+
/** Callback to create a new card */
|
|
920
|
+
onCreateCard?: (columnId: string, title: string) => void;
|
|
921
|
+
/** Callback to navigate to a card */
|
|
922
|
+
onNavigateToCard?: (cardId: string) => void;
|
|
923
|
+
/** Callback to search and filter cards */
|
|
924
|
+
onSearch?: (query: string) => void;
|
|
925
|
+
/** Callback to change card priority */
|
|
926
|
+
onChangePriority?: (cardId: string, priority: Priority) => void;
|
|
927
|
+
/** Callback to assign user to card */
|
|
928
|
+
onAssignUser?: (cardId: string, userId: string) => void;
|
|
929
|
+
/** AI Callbacks */
|
|
930
|
+
onGeneratePlan?: () => void;
|
|
931
|
+
onPredictRisks?: () => void;
|
|
932
|
+
onOpenAIUsage?: () => void;
|
|
933
|
+
/** Custom keyboard shortcut (default: Cmd+K / Ctrl+K) */
|
|
934
|
+
shortcut?: string;
|
|
935
|
+
/** Custom CSS class */
|
|
936
|
+
className?: string;
|
|
937
|
+
}
|
|
938
|
+
declare function CommandPalette({ board, onCreateCard, onNavigateToCard, onSearch, onChangePriority, onAssignUser, onGeneratePlan, onPredictRisks, onOpenAIUsage, shortcut, className, }: CommandPaletteProps): react_jsx_runtime.JSX.Element | null;
|
|
939
|
+
|
|
940
|
+
interface CardDetailModalProps {
|
|
941
|
+
/** Card to display */
|
|
942
|
+
card: Card$1 | null;
|
|
943
|
+
/** Whether modal is open */
|
|
944
|
+
isOpen: boolean;
|
|
945
|
+
/** Close callback */
|
|
946
|
+
onClose: () => void;
|
|
947
|
+
/** Update card callback */
|
|
948
|
+
onUpdate?: (cardId: string, updates: Partial<Card$1>) => void;
|
|
949
|
+
/** Delete card callback */
|
|
950
|
+
onDelete?: (cardId: string) => void;
|
|
951
|
+
/** Available users for assignment */
|
|
952
|
+
availableUsers?: User$2[];
|
|
953
|
+
/** Comments for this card */
|
|
954
|
+
comments?: Comment[];
|
|
955
|
+
/** Activity log for this card */
|
|
956
|
+
activities?: Activity[];
|
|
957
|
+
/** AI insights for this card */
|
|
958
|
+
aiInsights?: Insight[];
|
|
959
|
+
/** Attachments for this card */
|
|
960
|
+
attachments?: Attachment[];
|
|
961
|
+
/** Add comment callback */
|
|
962
|
+
onAddComment?: (cardId: string, content: string) => void;
|
|
963
|
+
/** Delete comment callback */
|
|
964
|
+
onDeleteComment?: (commentId: string) => void;
|
|
965
|
+
/** Upload attachments callback */
|
|
966
|
+
onUploadAttachments?: (cardId: string, files: File[]) => Promise<void> | void;
|
|
967
|
+
/** Delete attachment callback */
|
|
968
|
+
onDeleteAttachment?: (attachmentId: string) => void;
|
|
969
|
+
/** Current user ID */
|
|
970
|
+
currentUserId?: string;
|
|
971
|
+
/** AI: Suggest assignee */
|
|
972
|
+
onSuggestAssignee?: (card: Card$1) => Promise<AssigneeSuggestion[]>;
|
|
973
|
+
/** AI: Generate subtasks */
|
|
974
|
+
onGenerateSubtasks?: (card: Card$1) => Promise<Omit<Card$1, 'id'>[]>;
|
|
975
|
+
/** AI: Estimate effort */
|
|
976
|
+
onEstimateEffort?: (card: Card$1) => Promise<{
|
|
977
|
+
hours: number;
|
|
978
|
+
confidence: number;
|
|
979
|
+
}>;
|
|
980
|
+
}
|
|
981
|
+
declare function CardDetailModal({ card, isOpen, onClose, onUpdate, onDelete, availableUsers, comments, activities, aiInsights, attachments, onAddComment, onDeleteComment, onUploadAttachments, onDeleteAttachment, onSuggestAssignee, onGenerateSubtasks, onEstimateEffort, currentUserId, }: CardDetailModalProps): react_jsx_runtime.JSX.Element | null;
|
|
982
|
+
|
|
983
|
+
interface CardDetailModalV2Props {
|
|
984
|
+
/** Card to display */
|
|
985
|
+
card: Card$1 | null;
|
|
986
|
+
/** Whether modal is open */
|
|
987
|
+
isOpen: boolean;
|
|
988
|
+
/** Close callback */
|
|
989
|
+
onClose: () => void;
|
|
990
|
+
/** Update card callback */
|
|
991
|
+
onUpdate?: (cardId: string, updates: Partial<Card$1>) => void;
|
|
992
|
+
/** Delete card callback */
|
|
993
|
+
onDelete?: (cardId: string) => void;
|
|
994
|
+
/** Available users for assignment */
|
|
995
|
+
availableUsers?: User$2[];
|
|
996
|
+
/** Comments for this card */
|
|
997
|
+
comments?: Comment[];
|
|
998
|
+
/** Activity log for this card */
|
|
999
|
+
activities?: Activity[];
|
|
1000
|
+
/** Add comment callback */
|
|
1001
|
+
onAddComment?: (cardId: string, content: string) => void;
|
|
1002
|
+
/** Delete comment callback */
|
|
1003
|
+
onDeleteComment?: (commentId: string) => void;
|
|
1004
|
+
/** Current user */
|
|
1005
|
+
currentUser?: User$2;
|
|
1006
|
+
/** AI: Generate description */
|
|
1007
|
+
onAIGenerateDescription?: (card: Card$1) => Promise<string>;
|
|
1008
|
+
/** AI: Create subtasks */
|
|
1009
|
+
onAICreateSubtasks?: (card: Card$1) => Promise<string[]>;
|
|
1010
|
+
/** AI: Find similar tasks */
|
|
1011
|
+
onAIFindSimilar?: (card: Card$1) => Promise<Card$1[]>;
|
|
1012
|
+
/** Available columns for status */
|
|
1013
|
+
availableColumns?: Array<{
|
|
1014
|
+
id: string;
|
|
1015
|
+
title: string;
|
|
1016
|
+
}>;
|
|
1017
|
+
/** Available labels */
|
|
1018
|
+
availableLabels?: string[];
|
|
1019
|
+
}
|
|
1020
|
+
declare function CardDetailModalV2({ card, isOpen, onClose, onUpdate, onDelete: _onDelete, availableUsers, comments, activities, onAddComment, onDeleteComment: _onDeleteComment, currentUser, onAIGenerateDescription: _onAIGenerateDescription, onAICreateSubtasks: _onAICreateSubtasks, onAIFindSimilar: _onAIFindSimilar, availableColumns, availableLabels, }: CardDetailModalV2Props): react_jsx_runtime.JSX.Element | null;
|
|
1021
|
+
|
|
1022
|
+
interface AttachmentUploaderProps {
|
|
1023
|
+
/** Card ID for attachments */
|
|
1024
|
+
cardId: string;
|
|
1025
|
+
/** Existing attachments */
|
|
1026
|
+
attachments?: Attachment[];
|
|
1027
|
+
/** Callback when files are uploaded */
|
|
1028
|
+
onUpload?: (files: File[]) => Promise<void> | void;
|
|
1029
|
+
/** Callback when attachment is deleted */
|
|
1030
|
+
onDelete?: (attachmentId: string) => void;
|
|
1031
|
+
/** Current user ID */
|
|
1032
|
+
currentUserId?: string;
|
|
1033
|
+
/** Max file size in MB */
|
|
1034
|
+
maxSizeMB?: number;
|
|
1035
|
+
/** Allowed file types (MIME types) */
|
|
1036
|
+
allowedTypes?: string[];
|
|
1037
|
+
/** Max number of files */
|
|
1038
|
+
maxFiles?: number;
|
|
1039
|
+
}
|
|
1040
|
+
declare function AttachmentUploader({ attachments, onUpload, onDelete, maxSizeMB, allowedTypes, maxFiles, }: AttachmentUploaderProps): react_jsx_runtime.JSX.Element;
|
|
1041
|
+
|
|
1042
|
+
interface VelocityDataPoint {
|
|
1043
|
+
/** Period name (e.g., "Week 1", "Sprint 3") */
|
|
1044
|
+
period: string;
|
|
1045
|
+
/** Number of cards completed */
|
|
1046
|
+
completed: number;
|
|
1047
|
+
/** Number of cards planned */
|
|
1048
|
+
planned?: number;
|
|
1049
|
+
/** Average velocity (optional) */
|
|
1050
|
+
average?: number;
|
|
1051
|
+
}
|
|
1052
|
+
interface VelocityChartProps {
|
|
1053
|
+
/** Velocity data points */
|
|
1054
|
+
data: VelocityDataPoint[];
|
|
1055
|
+
/** Chart title */
|
|
1056
|
+
title?: string;
|
|
1057
|
+
/** Chart height in pixels */
|
|
1058
|
+
height?: number;
|
|
1059
|
+
/** Show average line */
|
|
1060
|
+
showAverage?: boolean;
|
|
1061
|
+
/** Show planned line */
|
|
1062
|
+
showPlanned?: boolean;
|
|
1063
|
+
}
|
|
1064
|
+
declare function VelocityChart({ data, title, height, showAverage, showPlanned, }: VelocityChartProps): react_jsx_runtime.JSX.Element;
|
|
1065
|
+
|
|
1066
|
+
interface BurnDownDataPoint {
|
|
1067
|
+
/** Day/Date label */
|
|
1068
|
+
day: string;
|
|
1069
|
+
/** Remaining tasks */
|
|
1070
|
+
remaining: number;
|
|
1071
|
+
/** Ideal burndown line */
|
|
1072
|
+
ideal: number;
|
|
1073
|
+
}
|
|
1074
|
+
interface BurnDownChartProps {
|
|
1075
|
+
/** Burndown data points */
|
|
1076
|
+
data: BurnDownDataPoint[];
|
|
1077
|
+
/** Chart title */
|
|
1078
|
+
title?: string;
|
|
1079
|
+
/** Chart height in pixels */
|
|
1080
|
+
height?: number;
|
|
1081
|
+
/** Total tasks at start */
|
|
1082
|
+
totalTasks?: number;
|
|
1083
|
+
/** Use area chart instead of line */
|
|
1084
|
+
useArea?: boolean;
|
|
1085
|
+
}
|
|
1086
|
+
declare function BurnDownChart({ data, title, height, totalTasks, useArea, }: BurnDownChartProps): react_jsx_runtime.JSX.Element;
|
|
1087
|
+
|
|
1088
|
+
interface DistributionDataPoint {
|
|
1089
|
+
/** Category name */
|
|
1090
|
+
name: string;
|
|
1091
|
+
/** Value/count */
|
|
1092
|
+
value: number;
|
|
1093
|
+
/** Optional color */
|
|
1094
|
+
color?: string;
|
|
1095
|
+
}
|
|
1096
|
+
interface DistributionChartsProps {
|
|
1097
|
+
/** Distribution data */
|
|
1098
|
+
data: DistributionDataPoint[];
|
|
1099
|
+
/** Chart title */
|
|
1100
|
+
title?: string;
|
|
1101
|
+
/** Chart type */
|
|
1102
|
+
type?: 'pie' | 'bar';
|
|
1103
|
+
/** Chart height in pixels */
|
|
1104
|
+
height?: number;
|
|
1105
|
+
/** Show percentages */
|
|
1106
|
+
showPercentages?: boolean;
|
|
1107
|
+
}
|
|
1108
|
+
declare function DistributionCharts({ data, title, type, height, showPercentages, }: DistributionChartsProps): react_jsx_runtime.JSX.Element;
|
|
1109
|
+
|
|
1110
|
+
interface BulkOperationsToolbarProps {
|
|
1111
|
+
/** Selected cards */
|
|
1112
|
+
selectedCards: Card$1[];
|
|
1113
|
+
/** Available users for assignment */
|
|
1114
|
+
availableUsers?: User$1[];
|
|
1115
|
+
/** Callback when selection is cleared */
|
|
1116
|
+
onClearSelection: () => void;
|
|
1117
|
+
/** Bulk operations callbacks */
|
|
1118
|
+
callbacks: BulkOperationsCallbacks;
|
|
1119
|
+
/** Available columns for move operation */
|
|
1120
|
+
columns?: Array<{
|
|
1121
|
+
id: string;
|
|
1122
|
+
title: string;
|
|
1123
|
+
}>;
|
|
1124
|
+
/** Available labels */
|
|
1125
|
+
availableLabels?: string[];
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Bulk Operations Toolbar Component
|
|
1129
|
+
*/
|
|
1130
|
+
declare const BulkOperationsToolbar: React$1.NamedExoticComponent<BulkOperationsToolbarProps>;
|
|
1131
|
+
|
|
1132
|
+
interface SwimlaneBoardViewProps {
|
|
1133
|
+
/** Board data */
|
|
1134
|
+
board: Board;
|
|
1135
|
+
/** Swimlane configuration */
|
|
1136
|
+
swimlaneConfig: SwimlaneConfig;
|
|
1137
|
+
/** All available users */
|
|
1138
|
+
availableUsers?: User$1[];
|
|
1139
|
+
/** Board callbacks */
|
|
1140
|
+
callbacks: {
|
|
1141
|
+
onCardMove?: (cardId: string, targetColumnId: string, position: number) => void;
|
|
1142
|
+
onCardUpdate?: (cardId: string, updates: Partial<Card$1>) => void;
|
|
1143
|
+
onColumnUpdate?: (columnId: string, updates: Partial<Column$1>) => void;
|
|
1144
|
+
onWipLimitExceeded?: (column: Column$1, card: Card$1) => void;
|
|
1145
|
+
};
|
|
1146
|
+
/** Custom className */
|
|
1147
|
+
className?: string;
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* SwimlaneBoardView Component
|
|
1151
|
+
*/
|
|
1152
|
+
declare function SwimlaneBoardView({ board, swimlaneConfig, availableUsers, callbacks, className, }: SwimlaneBoardViewProps): react_jsx_runtime.JSX.Element;
|
|
1153
|
+
|
|
1154
|
+
interface GroupBySelectorProps {
|
|
1155
|
+
/** Current groupBy value */
|
|
1156
|
+
value: GroupByOption;
|
|
1157
|
+
/** Change handler */
|
|
1158
|
+
onChange: (groupBy: GroupByOption) => void;
|
|
1159
|
+
/** Custom className */
|
|
1160
|
+
className?: string;
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* GroupBySelector Component
|
|
1164
|
+
*/
|
|
1165
|
+
declare function GroupBySelector({ value, onChange, className, }: GroupBySelectorProps): react_jsx_runtime.JSX.Element;
|
|
1166
|
+
|
|
1167
|
+
interface KeyboardShortcutsHelpProps {
|
|
1168
|
+
/** Custom shortcuts to display */
|
|
1169
|
+
shortcuts?: KeyboardShortcut[];
|
|
1170
|
+
/** Is modal open */
|
|
1171
|
+
isOpen: boolean;
|
|
1172
|
+
/** Close handler */
|
|
1173
|
+
onClose: () => void;
|
|
1174
|
+
/** Custom className */
|
|
1175
|
+
className?: string;
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* KeyboardShortcutsHelp Component
|
|
1179
|
+
*/
|
|
1180
|
+
declare function KeyboardShortcutsHelp({ shortcuts, isOpen, onClose, className, }: KeyboardShortcutsHelpProps): react_jsx_runtime.JSX.Element | null;
|
|
1181
|
+
|
|
1182
|
+
interface CardTemplateSelectorProps {
|
|
1183
|
+
/** Available templates */
|
|
1184
|
+
templates: CardTemplate[];
|
|
1185
|
+
/** Template selection handler */
|
|
1186
|
+
onSelectTemplate: (template: CardTemplate) => void;
|
|
1187
|
+
/** Custom className */
|
|
1188
|
+
className?: string;
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Default card templates
|
|
1192
|
+
*/
|
|
1193
|
+
declare const DEFAULT_TEMPLATES: CardTemplate[];
|
|
1194
|
+
/**
|
|
1195
|
+
* CardTemplateSelector Component
|
|
1196
|
+
*/
|
|
1197
|
+
declare function CardTemplateSelector({ templates, onSelectTemplate, className, }: CardTemplateSelectorProps): react_jsx_runtime.JSX.Element;
|
|
1198
|
+
|
|
1199
|
+
interface ExportImportModalProps {
|
|
1200
|
+
/** Board data to export */
|
|
1201
|
+
board: Board;
|
|
1202
|
+
/** Is modal open */
|
|
1203
|
+
isOpen: boolean;
|
|
1204
|
+
/** Close handler */
|
|
1205
|
+
onClose: () => void;
|
|
1206
|
+
/** Import handler */
|
|
1207
|
+
onImport?: (result: ImportResult, content: string) => void;
|
|
1208
|
+
/** Board element ref for PDF export */
|
|
1209
|
+
boardElementRef?: React.RefObject<HTMLElement>;
|
|
1210
|
+
/** Custom className */
|
|
1211
|
+
className?: string;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* ExportImportModal Component
|
|
1215
|
+
*/
|
|
1216
|
+
declare function ExportImportModal({ board, isOpen, onClose, onImport, boardElementRef, className, }: ExportImportModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1217
|
+
|
|
1218
|
+
type DateFilter = 'all' | 'overdue' | 'today' | 'this-week' | 'custom';
|
|
1219
|
+
type SortBy = 'created' | 'priority' | 'dueDate' | 'title' | 'estimate' | 'none';
|
|
1220
|
+
type SortOrder = 'asc' | 'desc';
|
|
1221
|
+
interface FilterState {
|
|
1222
|
+
dateFilter: DateFilter;
|
|
1223
|
+
dateRange?: {
|
|
1224
|
+
start: Date;
|
|
1225
|
+
end: Date;
|
|
1226
|
+
};
|
|
1227
|
+
priorities: Priority[];
|
|
1228
|
+
assignees: string[];
|
|
1229
|
+
labels: string[];
|
|
1230
|
+
columns: string[];
|
|
1231
|
+
search: string;
|
|
1232
|
+
}
|
|
1233
|
+
interface SortState {
|
|
1234
|
+
by: SortBy;
|
|
1235
|
+
order: SortOrder;
|
|
1236
|
+
}
|
|
1237
|
+
interface UseFiltersOptions {
|
|
1238
|
+
initialFilters?: Partial<FilterState>;
|
|
1239
|
+
initialSort?: Partial<SortState>;
|
|
1240
|
+
currentUserId?: string;
|
|
1241
|
+
}
|
|
1242
|
+
interface UseFiltersReturn {
|
|
1243
|
+
filters: FilterState;
|
|
1244
|
+
sort: SortState;
|
|
1245
|
+
setFilters: (filters: Partial<FilterState>) => void;
|
|
1246
|
+
setSort: (sort: Partial<SortState>) => void;
|
|
1247
|
+
resetFilters: () => void;
|
|
1248
|
+
filterMyTasks: () => void;
|
|
1249
|
+
filterOverdue: () => void;
|
|
1250
|
+
filterHighPriority: () => void;
|
|
1251
|
+
applyFilters: (cards: Card$1[]) => Card$1[];
|
|
1252
|
+
hasActiveFilters: boolean;
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Hook for filtering and sorting board cards
|
|
1256
|
+
*
|
|
1257
|
+
* @example
|
|
1258
|
+
* ```tsx
|
|
1259
|
+
* const { filters, setFilters, applyFilters, filterMyTasks } = useFilters({
|
|
1260
|
+
* currentUserId: 'user-1'
|
|
1261
|
+
* })
|
|
1262
|
+
*
|
|
1263
|
+
* const filteredCards = applyFilters(board.cards)
|
|
1264
|
+
* ```
|
|
1265
|
+
*/
|
|
1266
|
+
declare function useFilters({ initialFilters, initialSort, currentUserId, }?: UseFiltersOptions): UseFiltersReturn;
|
|
1267
|
+
|
|
1268
|
+
interface FilterBarProps {
|
|
1269
|
+
filters: FilterState;
|
|
1270
|
+
sort: SortState;
|
|
1271
|
+
onFiltersChange: (filters: Partial<FilterState>) => void;
|
|
1272
|
+
onSortChange: (sort: Partial<SortState>) => void;
|
|
1273
|
+
onReset: () => void;
|
|
1274
|
+
onFilterMyTasks?: () => void;
|
|
1275
|
+
onFilterOverdue?: () => void;
|
|
1276
|
+
onFilterHighPriority?: () => void;
|
|
1277
|
+
availableUsers?: User$2[];
|
|
1278
|
+
availableLabels?: string[];
|
|
1279
|
+
availableColumns?: Array<{
|
|
1280
|
+
id: string;
|
|
1281
|
+
title: string;
|
|
1282
|
+
}>;
|
|
1283
|
+
showQuickFilters?: boolean;
|
|
1284
|
+
compact?: boolean;
|
|
1285
|
+
groupBy?: GroupByOption;
|
|
1286
|
+
onGroupByChange?: (value: GroupByOption) => void;
|
|
1287
|
+
}
|
|
1288
|
+
declare function FilterBar({ filters, sort, onFiltersChange, onSortChange, onReset, onFilterMyTasks, onFilterOverdue, onFilterHighPriority, availableUsers, availableLabels, availableColumns: _availableColumns, showQuickFilters, compact, groupBy, onGroupByChange, }: FilterBarProps): react_jsx_runtime.JSX.Element;
|
|
1289
|
+
|
|
1290
|
+
interface ConfigMenuProps {
|
|
1291
|
+
onOpenExport: () => void;
|
|
1292
|
+
onOpenThemes: () => void;
|
|
1293
|
+
onOpenShortcuts: () => void;
|
|
1294
|
+
className?: string;
|
|
1295
|
+
viewMode?: 'kanban' | 'gantt';
|
|
1296
|
+
onExportGanttPDF?: () => Promise<void>;
|
|
1297
|
+
onExportGanttExcel?: () => Promise<void>;
|
|
1298
|
+
onExportGanttPNG?: () => Promise<void>;
|
|
1299
|
+
onExportGanttCSV?: () => void;
|
|
1300
|
+
}
|
|
1301
|
+
declare function ConfigMenu({ onOpenExport, onOpenThemes, onOpenShortcuts, className, viewMode, onExportGanttPDF, onExportGanttExcel, onExportGanttPNG, onExportGanttCSV, }: ConfigMenuProps): react_jsx_runtime.JSX.Element;
|
|
1302
|
+
|
|
1303
|
+
interface ThemeModalProps {
|
|
1304
|
+
isOpen: boolean;
|
|
1305
|
+
onClose: () => void;
|
|
1306
|
+
className?: string;
|
|
1307
|
+
}
|
|
1308
|
+
declare function ThemeModal({ isOpen, onClose, className }: ThemeModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1309
|
+
|
|
1310
|
+
interface TaskSegment {
|
|
1311
|
+
startDate: Date;
|
|
1312
|
+
endDate: Date;
|
|
1313
|
+
}
|
|
1314
|
+
interface Task {
|
|
1315
|
+
id: string;
|
|
1316
|
+
name: string;
|
|
1317
|
+
startDate?: Date;
|
|
1318
|
+
endDate?: Date;
|
|
1319
|
+
progress: number;
|
|
1320
|
+
assignees?: Array<{
|
|
1321
|
+
name: string;
|
|
1322
|
+
avatar?: string;
|
|
1323
|
+
initials: string;
|
|
1324
|
+
color: string;
|
|
1325
|
+
}>;
|
|
1326
|
+
status?: 'todo' | 'in-progress' | 'completed';
|
|
1327
|
+
dependencies?: string[];
|
|
1328
|
+
subtasks?: Task[];
|
|
1329
|
+
isExpanded?: boolean;
|
|
1330
|
+
isMilestone?: boolean;
|
|
1331
|
+
isCriticalPath?: boolean;
|
|
1332
|
+
segments?: TaskSegment[];
|
|
1333
|
+
parentId?: string;
|
|
1334
|
+
level?: number;
|
|
1335
|
+
position?: number;
|
|
1336
|
+
}
|
|
1337
|
+
type TimeScale = 'day' | 'week' | 'month';
|
|
1338
|
+
type Theme$1 = 'dark' | 'light' | 'neutral';
|
|
1339
|
+
type RowDensity = 'compact' | 'comfortable' | 'spacious';
|
|
1340
|
+
type ColumnType = 'name' | 'startDate' | 'endDate' | 'duration' | 'assignees' | 'status' | 'progress';
|
|
1341
|
+
interface GanttColumn {
|
|
1342
|
+
id: ColumnType;
|
|
1343
|
+
label: string;
|
|
1344
|
+
width: number;
|
|
1345
|
+
visible: boolean;
|
|
1346
|
+
sortable?: boolean;
|
|
1347
|
+
}
|
|
1348
|
+
interface Assignee {
|
|
1349
|
+
name: string;
|
|
1350
|
+
initials: string;
|
|
1351
|
+
color: string;
|
|
1352
|
+
}
|
|
1353
|
+
interface GanttTheme {
|
|
1354
|
+
bgPrimary: string;
|
|
1355
|
+
bgSecondary: string;
|
|
1356
|
+
bgGrid: string;
|
|
1357
|
+
bgWeekend: string;
|
|
1358
|
+
border: string;
|
|
1359
|
+
borderLight: string;
|
|
1360
|
+
textPrimary: string;
|
|
1361
|
+
textSecondary: string;
|
|
1362
|
+
textTertiary: string;
|
|
1363
|
+
accent: string;
|
|
1364
|
+
accentHover: string;
|
|
1365
|
+
accentLight: string;
|
|
1366
|
+
taskBarPrimary: string;
|
|
1367
|
+
taskBarProgress: string;
|
|
1368
|
+
taskBarHandle: string;
|
|
1369
|
+
dependency: string;
|
|
1370
|
+
dependencyHover: string;
|
|
1371
|
+
criticalPath: string;
|
|
1372
|
+
criticalPathLight: string;
|
|
1373
|
+
today: string;
|
|
1374
|
+
todayLight: string;
|
|
1375
|
+
milestone: string;
|
|
1376
|
+
milestoneLight: string;
|
|
1377
|
+
statusTodo: string;
|
|
1378
|
+
statusInProgress: string;
|
|
1379
|
+
statusCompleted: string;
|
|
1380
|
+
hoverBg: string;
|
|
1381
|
+
focusRing: string;
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* Templates for customizing Gantt rendering
|
|
1385
|
+
* Similar to DHTMLX gantt.templates.*
|
|
1386
|
+
*/
|
|
1387
|
+
interface GanttTemplates {
|
|
1388
|
+
/**
|
|
1389
|
+
* Customize task tooltip content
|
|
1390
|
+
* @param task - The task to render tooltip for
|
|
1391
|
+
* @returns Tooltip content (string or JSX)
|
|
1392
|
+
*/
|
|
1393
|
+
taskTooltip?: (task: Task) => string | React.ReactNode;
|
|
1394
|
+
/**
|
|
1395
|
+
* Customize task label in timeline
|
|
1396
|
+
* @param task - The task to render label for
|
|
1397
|
+
* @returns Label content (string or JSX)
|
|
1398
|
+
*/
|
|
1399
|
+
taskLabel?: (task: Task) => string | React.ReactNode;
|
|
1400
|
+
/**
|
|
1401
|
+
* Customize grid cell content
|
|
1402
|
+
* @param task - The task for this row
|
|
1403
|
+
* @param column - The column type
|
|
1404
|
+
* @param value - Default cell value
|
|
1405
|
+
* @returns Cell content (string or JSX)
|
|
1406
|
+
*/
|
|
1407
|
+
gridCell?: (task: Task, column: ColumnType, value: any) => string | React.ReactNode;
|
|
1408
|
+
/**
|
|
1409
|
+
* Add custom CSS classes to task bar
|
|
1410
|
+
* @param task - The task to style
|
|
1411
|
+
* @returns Space-separated CSS class names
|
|
1412
|
+
*/
|
|
1413
|
+
taskClass?: (task: Task) => string;
|
|
1414
|
+
/**
|
|
1415
|
+
* Customize milestone rendering
|
|
1416
|
+
* @param task - The milestone task
|
|
1417
|
+
* @returns Milestone content (string or JSX)
|
|
1418
|
+
*/
|
|
1419
|
+
milestoneContent?: (task: Task) => string | React.ReactNode;
|
|
1420
|
+
/**
|
|
1421
|
+
* Format date display
|
|
1422
|
+
* @param date - Date to format
|
|
1423
|
+
* @returns Formatted date string
|
|
1424
|
+
*/
|
|
1425
|
+
dateFormat?: (date: Date) => string;
|
|
1426
|
+
/**
|
|
1427
|
+
* Format duration display
|
|
1428
|
+
* @param days - Duration in days
|
|
1429
|
+
* @returns Formatted duration string
|
|
1430
|
+
*/
|
|
1431
|
+
durationFormat?: (days: number) => string;
|
|
1432
|
+
/**
|
|
1433
|
+
* Format progress display
|
|
1434
|
+
* @param progress - Progress percentage (0-100)
|
|
1435
|
+
* @returns Formatted progress string
|
|
1436
|
+
*/
|
|
1437
|
+
progressFormat?: (progress: number) => string;
|
|
1438
|
+
}
|
|
1439
|
+
/**
|
|
1440
|
+
* Permissions interface for controlling Gantt operations
|
|
1441
|
+
* Useful for integrating with authorization libraries like CASL
|
|
1442
|
+
* @example
|
|
1443
|
+
*
|
|
1444
|
+
* // With CASL integration
|
|
1445
|
+
* const ability = useAbility();
|
|
1446
|
+
*
|
|
1447
|
+
* <GanttBoard
|
|
1448
|
+
* tasks={tasks}
|
|
1449
|
+
* config={{
|
|
1450
|
+
* permissions: {
|
|
1451
|
+
* canCreateTask: ability.can('create', 'Task'),
|
|
1452
|
+
* canUpdateTask: ability.can('update', 'Task'),
|
|
1453
|
+
* canDeleteTask: ability.can('delete', 'Task'),
|
|
1454
|
+
* canCreateDependency: ability.can('create', 'Dependency'),
|
|
1455
|
+
* canUpdateProgress: ability.can('update', 'TaskProgress'),
|
|
1456
|
+
* }
|
|
1457
|
+
* }}
|
|
1458
|
+
* />
|
|
1459
|
+
*
|
|
1460
|
+
*/
|
|
1461
|
+
interface GanttPermissions {
|
|
1462
|
+
canCreateTask?: boolean;
|
|
1463
|
+
canUpdateTask?: boolean;
|
|
1464
|
+
canDeleteTask?: boolean;
|
|
1465
|
+
canCreateDependency?: boolean;
|
|
1466
|
+
canDeleteDependency?: boolean;
|
|
1467
|
+
canUpdateProgress?: boolean;
|
|
1468
|
+
canAssignUsers?: boolean;
|
|
1469
|
+
canModifyHierarchy?: boolean;
|
|
1470
|
+
canDuplicateTask?: boolean;
|
|
1471
|
+
canReorderTasks?: boolean;
|
|
1472
|
+
canExport?: boolean;
|
|
1473
|
+
canToggleExpansion?: boolean;
|
|
1474
|
+
canPerformAction?: (task: Task, action: 'create' | 'update' | 'delete' | 'assign' | 'progress') => boolean;
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Scroll behavior configuration for timeline interactions
|
|
1478
|
+
* Controls how the Gantt chart viewport behaves during user interactions
|
|
1479
|
+
*
|
|
1480
|
+
* @example
|
|
1481
|
+
* // Disable all automatic scrolling during drag operations
|
|
1482
|
+
* <GanttBoard
|
|
1483
|
+
* config={{
|
|
1484
|
+
* scrollBehavior: {
|
|
1485
|
+
* preventAutoScroll: true,
|
|
1486
|
+
* axis: 'horizontal'
|
|
1487
|
+
* }
|
|
1488
|
+
* }}
|
|
1489
|
+
* />
|
|
1490
|
+
*
|
|
1491
|
+
* @example
|
|
1492
|
+
* // Allow vertical auto-scroll but prevent horizontal
|
|
1493
|
+
* <GanttBoard
|
|
1494
|
+
* config={{
|
|
1495
|
+
* scrollBehavior: {
|
|
1496
|
+
* preventAutoScroll: true,
|
|
1497
|
+
* axis: 'horizontal',
|
|
1498
|
+
* onScrollPrevented: (axis, scrollDelta) => {
|
|
1499
|
+
* console.log(`Prevented ${axis} scroll by ${scrollDelta}px`);
|
|
1500
|
+
* }
|
|
1501
|
+
* }
|
|
1502
|
+
* }}
|
|
1503
|
+
* />
|
|
1504
|
+
*/
|
|
1505
|
+
interface GanttScrollBehavior {
|
|
1506
|
+
/**
|
|
1507
|
+
* Prevent automatic viewport scrolling during drag operations
|
|
1508
|
+
* When true, the viewport will not automatically center on dragged tasks
|
|
1509
|
+
* Users can still manually scroll using scrollbars or mouse wheel
|
|
1510
|
+
* @default false
|
|
1511
|
+
*/
|
|
1512
|
+
preventAutoScroll?: boolean;
|
|
1513
|
+
/**
|
|
1514
|
+
* Which axis to prevent auto-scroll on
|
|
1515
|
+
* - 'horizontal': Only prevent horizontal auto-scroll (recommended for Gantt charts)
|
|
1516
|
+
* - 'vertical': Only prevent vertical auto-scroll
|
|
1517
|
+
* - 'both': Prevent both horizontal and vertical auto-scroll
|
|
1518
|
+
* @default 'horizontal'
|
|
1519
|
+
*/
|
|
1520
|
+
axis?: 'horizontal' | 'vertical' | 'both';
|
|
1521
|
+
/**
|
|
1522
|
+
* Callback fired when auto-scroll is prevented
|
|
1523
|
+
* Useful for debugging or showing user feedback
|
|
1524
|
+
* @param axis - Which axis was prevented ('x' or 'y')
|
|
1525
|
+
* @param scrollDelta - How many pixels of scroll were prevented
|
|
1526
|
+
*/
|
|
1527
|
+
onScrollPrevented?: (axis: 'x' | 'y', scrollDelta: number) => void;
|
|
1528
|
+
/**
|
|
1529
|
+
* Allow auto-scroll if task would go out of viewport bounds
|
|
1530
|
+
* When true, auto-scroll is only prevented if task remains visible
|
|
1531
|
+
* @default false
|
|
1532
|
+
*/
|
|
1533
|
+
allowScrollWhenOutOfBounds?: boolean;
|
|
1534
|
+
}
|
|
1535
|
+
interface GanttConfig {
|
|
1536
|
+
theme?: Theme$1;
|
|
1537
|
+
timeScale?: TimeScale;
|
|
1538
|
+
rowDensity?: RowDensity;
|
|
1539
|
+
showThemeSelector?: boolean;
|
|
1540
|
+
availableUsers?: Array<{
|
|
1541
|
+
id: string;
|
|
1542
|
+
name: string;
|
|
1543
|
+
initials: string;
|
|
1544
|
+
color: string;
|
|
1545
|
+
}>;
|
|
1546
|
+
templates?: GanttTemplates;
|
|
1547
|
+
permissions?: GanttPermissions;
|
|
1548
|
+
disableScrollSync?: boolean;
|
|
1549
|
+
/**
|
|
1550
|
+
* v0.9.2: Advanced scroll behavior configuration
|
|
1551
|
+
* Controls how the timeline viewport behaves during drag operations
|
|
1552
|
+
* Provides fine-grained control over auto-scroll prevention with events
|
|
1553
|
+
* @see GanttScrollBehavior
|
|
1554
|
+
*/
|
|
1555
|
+
scrollBehavior?: GanttScrollBehavior;
|
|
1556
|
+
onThemeChange?: (theme: Theme$1) => void;
|
|
1557
|
+
onTaskClick?: (task: Task) => void;
|
|
1558
|
+
onTaskDblClick?: (task: Task) => void;
|
|
1559
|
+
onTaskContextMenu?: (task: Task, event: React.MouseEvent) => void;
|
|
1560
|
+
onTaskUpdate?: (task: Task) => void;
|
|
1561
|
+
onTaskDateChange?: (task: Task, startDate: Date, endDate: Date) => void;
|
|
1562
|
+
onProgressChange?: (taskId: string, oldProgress: number, newProgress: number) => void;
|
|
1563
|
+
onDependencyCreate?: (fromTaskId: string, toTaskId: string) => void;
|
|
1564
|
+
onDependencyDelete?: (taskId: string, dependencyId: string) => void;
|
|
1565
|
+
onBeforeTaskAdd?: (task: Task) => boolean | void;
|
|
1566
|
+
onAfterTaskAdd?: (task: Task) => void;
|
|
1567
|
+
onBeforeTaskUpdate?: (taskId: string, newData: Partial<Task>) => boolean | void;
|
|
1568
|
+
onAfterTaskUpdate?: (task: Task) => void;
|
|
1569
|
+
onBeforeTaskDelete?: (taskId: string) => boolean | void;
|
|
1570
|
+
onAfterTaskDelete?: (taskId: string) => void;
|
|
1571
|
+
onTaskCreate?: (parentId: string | undefined, position: number) => void;
|
|
1572
|
+
onTaskDelete?: (taskId: string) => void;
|
|
1573
|
+
onTaskDuplicate?: (taskId: string) => void;
|
|
1574
|
+
onTaskMove?: (taskId: string, direction: 'up' | 'down') => void;
|
|
1575
|
+
onTaskIndent?: (taskId: string) => void;
|
|
1576
|
+
onTaskOutdent?: (taskId: string) => void;
|
|
1577
|
+
onTaskRename?: (taskId: string, newName: string) => void;
|
|
1578
|
+
onTaskToggleExpand?: (taskId: string) => void;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* GanttBoardRef - Imperative API for GanttBoard component
|
|
1583
|
+
* Similar to DHTMLX gantt.* methods for programmatic control
|
|
1584
|
+
*/
|
|
1585
|
+
interface GanttBoardRef {
|
|
1586
|
+
/**
|
|
1587
|
+
* Get a task by ID
|
|
1588
|
+
* Similar to: gantt.getTask(id)
|
|
1589
|
+
*/
|
|
1590
|
+
getTask: (id: string) => Task | undefined;
|
|
1591
|
+
/**
|
|
1592
|
+
* Add a new task
|
|
1593
|
+
* Similar to: gantt.addTask(task)
|
|
1594
|
+
*/
|
|
1595
|
+
addTask: (task: Task, parentId?: string) => void;
|
|
1596
|
+
/**
|
|
1597
|
+
* Update a task by ID
|
|
1598
|
+
* Similar to: gantt.updateTask(id, updates)
|
|
1599
|
+
*/
|
|
1600
|
+
updateTask: (id: string, updates: Partial<Task>) => void;
|
|
1601
|
+
/**
|
|
1602
|
+
* Delete a task by ID
|
|
1603
|
+
* Similar to: gantt.deleteTask(id)
|
|
1604
|
+
*/
|
|
1605
|
+
deleteTask: (id: string) => void;
|
|
1606
|
+
/**
|
|
1607
|
+
* Delete multiple tasks by IDs
|
|
1608
|
+
*/
|
|
1609
|
+
deleteTasks: (ids: string[]) => void;
|
|
1610
|
+
/**
|
|
1611
|
+
* Duplicate a task
|
|
1612
|
+
*/
|
|
1613
|
+
duplicateTask: (id: string) => void;
|
|
1614
|
+
/**
|
|
1615
|
+
* Split a task (create GAP in the middle, like Bryntum/DHTMLX) (v0.8.1)
|
|
1616
|
+
* Same task, but work is paused for some days then continues
|
|
1617
|
+
* Example: Jan 1-10 → Split at Jan 5 with 3 day gap → Jan 1-4 [GAP] Jan 8-13
|
|
1618
|
+
* @param id - Task ID to split
|
|
1619
|
+
* @param splitDate - Date where gap starts
|
|
1620
|
+
* @param gapDays - Number of days to pause (default: 3)
|
|
1621
|
+
*/
|
|
1622
|
+
splitTask: (id: string, splitDate: Date, gapDays?: number) => void;
|
|
1623
|
+
/**
|
|
1624
|
+
* Calculate end date based on start date and duration
|
|
1625
|
+
* Similar to: gantt.calculateEndDate(start, duration)
|
|
1626
|
+
*/
|
|
1627
|
+
calculateEndDate: (start: Date, durationDays: number) => Date;
|
|
1628
|
+
/**
|
|
1629
|
+
* Calculate duration in days between two dates
|
|
1630
|
+
* Similar to: gantt.calculateDuration(start, end)
|
|
1631
|
+
*/
|
|
1632
|
+
calculateDuration: (start: Date, end: Date) => number;
|
|
1633
|
+
/**
|
|
1634
|
+
* Validate if creating a dependency would create a circular reference
|
|
1635
|
+
*/
|
|
1636
|
+
validateDependency: (fromTaskId: string, toTaskId: string) => boolean;
|
|
1637
|
+
/**
|
|
1638
|
+
* Get all tasks (including subtasks) as a flat array
|
|
1639
|
+
* Similar to: gantt.getTaskByTime()
|
|
1640
|
+
*/
|
|
1641
|
+
getAllTasks: () => Task[];
|
|
1642
|
+
/**
|
|
1643
|
+
* Get tasks filtered by status
|
|
1644
|
+
*/
|
|
1645
|
+
getTasksByStatus: (status: 'todo' | 'in-progress' | 'completed') => Task[];
|
|
1646
|
+
/**
|
|
1647
|
+
* Get tasks by parent ID
|
|
1648
|
+
*/
|
|
1649
|
+
getTasksByParent: (parentId?: string) => Task[];
|
|
1650
|
+
/**
|
|
1651
|
+
* Get the critical path tasks
|
|
1652
|
+
*/
|
|
1653
|
+
getCriticalPath: () => Task[];
|
|
1654
|
+
/**
|
|
1655
|
+
* Indent task(s) - make them children of previous sibling
|
|
1656
|
+
*/
|
|
1657
|
+
indentTask: (taskId: string) => void;
|
|
1658
|
+
/**
|
|
1659
|
+
* Outdent task(s) - move them to parent's level
|
|
1660
|
+
*/
|
|
1661
|
+
outdentTask: (taskId: string) => void;
|
|
1662
|
+
/**
|
|
1663
|
+
* Move task up or down in the list
|
|
1664
|
+
*/
|
|
1665
|
+
moveTask: (taskId: string, direction: 'up' | 'down') => void;
|
|
1666
|
+
/**
|
|
1667
|
+
* Create a subtask under a parent task
|
|
1668
|
+
*/
|
|
1669
|
+
createSubtask: (parentId: string) => void;
|
|
1670
|
+
/**
|
|
1671
|
+
* Scroll to a specific task
|
|
1672
|
+
*/
|
|
1673
|
+
scrollToTask: (id: string) => void;
|
|
1674
|
+
/**
|
|
1675
|
+
* Highlight a task temporarily
|
|
1676
|
+
*/
|
|
1677
|
+
highlightTask: (id: string, duration?: number) => void;
|
|
1678
|
+
/**
|
|
1679
|
+
* Expand a task to show its subtasks
|
|
1680
|
+
*/
|
|
1681
|
+
expandTask: (id: string) => void;
|
|
1682
|
+
/**
|
|
1683
|
+
* Collapse a task to hide its subtasks
|
|
1684
|
+
*/
|
|
1685
|
+
collapseTask: (id: string) => void;
|
|
1686
|
+
/**
|
|
1687
|
+
* Expand all tasks
|
|
1688
|
+
*/
|
|
1689
|
+
expandAll: () => void;
|
|
1690
|
+
/**
|
|
1691
|
+
* Collapse all tasks
|
|
1692
|
+
*/
|
|
1693
|
+
collapseAll: () => void;
|
|
1694
|
+
/**
|
|
1695
|
+
* Undo last change
|
|
1696
|
+
* Similar to: gantt.undo()
|
|
1697
|
+
*/
|
|
1698
|
+
undo: () => void;
|
|
1699
|
+
/**
|
|
1700
|
+
* Redo last undone change
|
|
1701
|
+
* Similar to: gantt.redo()
|
|
1702
|
+
*/
|
|
1703
|
+
redo: () => void;
|
|
1704
|
+
/**
|
|
1705
|
+
* Check if undo is available
|
|
1706
|
+
*/
|
|
1707
|
+
canUndo: () => boolean;
|
|
1708
|
+
/**
|
|
1709
|
+
* Check if redo is available
|
|
1710
|
+
*/
|
|
1711
|
+
canRedo: () => boolean;
|
|
1712
|
+
/**
|
|
1713
|
+
* Clear undo/redo history
|
|
1714
|
+
*/
|
|
1715
|
+
clearHistory: () => void;
|
|
1716
|
+
/**
|
|
1717
|
+
* Export Gantt chart to PNG image
|
|
1718
|
+
* Similar to: gantt.exportToPNG()
|
|
1719
|
+
*/
|
|
1720
|
+
exportToPNG: () => Promise<Blob>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Export tasks to PDF format
|
|
1723
|
+
* Similar to: gantt.exportToPDF()
|
|
1724
|
+
*/
|
|
1725
|
+
exportToPDF: (filename?: string) => Promise<void>;
|
|
1726
|
+
/**
|
|
1727
|
+
* Export tasks to Excel format
|
|
1728
|
+
* Similar to: gantt.exportToExcel()
|
|
1729
|
+
*/
|
|
1730
|
+
exportToExcel: (filename?: string) => Promise<void>;
|
|
1731
|
+
/**
|
|
1732
|
+
* Export tasks to JSON string
|
|
1733
|
+
* Similar to: gantt.serialize()
|
|
1734
|
+
*/
|
|
1735
|
+
exportToJSON: () => string;
|
|
1736
|
+
/**
|
|
1737
|
+
* Export tasks to CSV format
|
|
1738
|
+
*/
|
|
1739
|
+
exportToCSV: () => string;
|
|
1740
|
+
/**
|
|
1741
|
+
* Import tasks from JSON string
|
|
1742
|
+
* Similar to: gantt.parse(data)
|
|
1743
|
+
*/
|
|
1744
|
+
importFromJSON: (json: string) => void;
|
|
1745
|
+
/**
|
|
1746
|
+
* Get current tasks state
|
|
1747
|
+
*/
|
|
1748
|
+
getTasks: () => Task[];
|
|
1749
|
+
/**
|
|
1750
|
+
* Refresh/re-render the Gantt chart
|
|
1751
|
+
* Similar to: gantt.render()
|
|
1752
|
+
*/
|
|
1753
|
+
refresh: () => void;
|
|
1754
|
+
/**
|
|
1755
|
+
* Clear all tasks
|
|
1756
|
+
* Similar to: gantt.clearAll()
|
|
1757
|
+
*/
|
|
1758
|
+
clearAll: () => void;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
interface GanttBoardProps {
|
|
1762
|
+
tasks: Task[];
|
|
1763
|
+
config?: GanttConfig;
|
|
1764
|
+
onTasksChange?: (tasks: Task[]) => void;
|
|
1765
|
+
}
|
|
1766
|
+
declare const GanttBoard: React$1.ForwardRefExoticComponent<GanttBoardProps & React$1.RefAttributes<GanttBoardRef>>;
|
|
1767
|
+
|
|
1768
|
+
interface GanttToolbarProps {
|
|
1769
|
+
theme: any;
|
|
1770
|
+
timeScale: TimeScale;
|
|
1771
|
+
onTimeScaleChange: (scale: TimeScale) => void;
|
|
1772
|
+
zoom: number;
|
|
1773
|
+
onZoomChange: (zoom: number) => void;
|
|
1774
|
+
currentTheme: Theme$1;
|
|
1775
|
+
onThemeChange: (theme: Theme$1) => void;
|
|
1776
|
+
rowDensity: RowDensity;
|
|
1777
|
+
onRowDensityChange: (density: RowDensity) => void;
|
|
1778
|
+
showThemeSelector?: boolean;
|
|
1779
|
+
}
|
|
1780
|
+
declare function GanttToolbar({ theme, timeScale, onTimeScaleChange, zoom, onZoomChange, currentTheme, onThemeChange, rowDensity, onRowDensityChange, showThemeSelector, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
|
|
1781
|
+
|
|
1782
|
+
interface TaskGridProps {
|
|
1783
|
+
tasks: Task[];
|
|
1784
|
+
theme: any;
|
|
1785
|
+
rowHeight: number;
|
|
1786
|
+
availableUsers?: Array<{
|
|
1787
|
+
id: string;
|
|
1788
|
+
name: string;
|
|
1789
|
+
initials: string;
|
|
1790
|
+
color: string;
|
|
1791
|
+
}>;
|
|
1792
|
+
templates: Required<GanttTemplates>;
|
|
1793
|
+
onTaskClick?: (task: Task) => void;
|
|
1794
|
+
onTaskDblClick?: (task: Task) => void;
|
|
1795
|
+
onTaskContextMenu?: (task: Task, event: React.MouseEvent) => void;
|
|
1796
|
+
onTaskToggle?: (taskId: string) => void;
|
|
1797
|
+
scrollTop: number;
|
|
1798
|
+
columns: GanttColumn[];
|
|
1799
|
+
onToggleColumn: (columnType: ColumnType) => void;
|
|
1800
|
+
onTaskUpdate?: (taskId: string, updates: Partial<Task>) => void;
|
|
1801
|
+
onTaskDelete?: (taskId: string) => void;
|
|
1802
|
+
onTaskIndent?: (taskIds: string[]) => void;
|
|
1803
|
+
onTaskOutdent?: (taskIds: string[]) => void;
|
|
1804
|
+
onTaskMove?: (taskIds: string[], direction: 'up' | 'down') => void;
|
|
1805
|
+
onMultiTaskDelete?: (taskIds: string[]) => void;
|
|
1806
|
+
onTaskDuplicate?: (taskIds: string[]) => void;
|
|
1807
|
+
onTaskCreate?: (afterTaskId: string, direction: 'above' | 'below') => void;
|
|
1808
|
+
onTaskRename?: (taskId: string, newName: string) => void;
|
|
1809
|
+
onCreateSubtask?: (parentTaskId: string) => void;
|
|
1810
|
+
onOpenTaskModal?: (task: Task) => void;
|
|
1811
|
+
}
|
|
1812
|
+
declare function TaskGrid({ tasks, theme, rowHeight: ROW_HEIGHT, availableUsers, templates: _templates, // TODO: Use templates for custom rendering
|
|
1813
|
+
onTaskClick, onTaskDblClick, // v0.8.0
|
|
1814
|
+
onTaskContextMenu, // v0.8.0
|
|
1815
|
+
onTaskToggle, scrollTop: _scrollTop, columns, onToggleColumn, onTaskUpdate, onTaskDelete, onTaskIndent, onTaskOutdent, onTaskMove, onMultiTaskDelete, onTaskDuplicate, onTaskCreate, onTaskRename, onCreateSubtask, onOpenTaskModal, }: TaskGridProps): react_jsx_runtime.JSX.Element;
|
|
1816
|
+
|
|
1817
|
+
interface TimelineProps {
|
|
1818
|
+
tasks: Task[];
|
|
1819
|
+
theme: any;
|
|
1820
|
+
rowHeight: number;
|
|
1821
|
+
timeScale: TimeScale;
|
|
1822
|
+
startDate: Date;
|
|
1823
|
+
endDate: Date;
|
|
1824
|
+
zoom: number;
|
|
1825
|
+
templates: Required<GanttTemplates>;
|
|
1826
|
+
onTaskClick?: (task: Task) => void;
|
|
1827
|
+
onTaskDblClick?: (task: Task) => void;
|
|
1828
|
+
onTaskContextMenu?: (task: Task, event: React.MouseEvent) => void;
|
|
1829
|
+
onTaskDateChange?: (task: Task, newStart: Date, newEnd: Date) => void;
|
|
1830
|
+
onDependencyCreate?: (fromTask: Task, toTaskId: string) => void;
|
|
1831
|
+
onDependencyDelete?: (taskId: string, dependencyId: string) => void;
|
|
1832
|
+
}
|
|
1833
|
+
interface TaskPosition {
|
|
1834
|
+
id: string;
|
|
1835
|
+
x: number;
|
|
1836
|
+
y: number;
|
|
1837
|
+
width: number;
|
|
1838
|
+
height: number;
|
|
1839
|
+
}
|
|
1840
|
+
declare function Timeline({ tasks, theme, rowHeight: ROW_HEIGHT, timeScale, startDate, endDate, zoom, templates, onTaskClick, onTaskDblClick, // v0.8.0
|
|
1841
|
+
onTaskContextMenu, // v0.8.0
|
|
1842
|
+
onTaskDateChange, onDependencyCreate, onDependencyDelete, }: TimelineProps): react_jsx_runtime.JSX.Element;
|
|
1843
|
+
|
|
1844
|
+
interface TaskBarProps {
|
|
1845
|
+
task: Task;
|
|
1846
|
+
x: number;
|
|
1847
|
+
y: number;
|
|
1848
|
+
width: number;
|
|
1849
|
+
theme: any;
|
|
1850
|
+
dayWidth: number;
|
|
1851
|
+
startDate: Date;
|
|
1852
|
+
templates: Required<GanttTemplates>;
|
|
1853
|
+
onClick?: (task: Task) => void;
|
|
1854
|
+
onDoubleClick?: (task: Task) => void;
|
|
1855
|
+
onContextMenu?: (task: Task, event: React.MouseEvent) => void;
|
|
1856
|
+
onDateChange?: (task: Task, newStart: Date, newEnd: Date) => void;
|
|
1857
|
+
onDependencyCreate?: (fromTask: Task, toTaskId: string) => void;
|
|
1858
|
+
allTaskPositions?: TaskPosition[];
|
|
1859
|
+
}
|
|
1860
|
+
declare function TaskBar({ task, x, y, width, theme, dayWidth, startDate, templates, onClick, onDoubleClick, // v0.8.0
|
|
1861
|
+
onContextMenu, // v0.8.0
|
|
1862
|
+
onDateChange, onDependencyCreate, allTaskPositions }: TaskBarProps): react_jsx_runtime.JSX.Element;
|
|
1863
|
+
|
|
1864
|
+
interface DependencyLineProps {
|
|
1865
|
+
x1: number;
|
|
1866
|
+
y1: number;
|
|
1867
|
+
x2: number;
|
|
1868
|
+
y2: number;
|
|
1869
|
+
theme: any;
|
|
1870
|
+
onDelete?: () => void;
|
|
1871
|
+
}
|
|
1872
|
+
declare function DependencyLine({ x1, y1, x2, y2, theme, onDelete }: DependencyLineProps): react_jsx_runtime.JSX.Element;
|
|
1873
|
+
|
|
1874
|
+
interface MilestoneProps {
|
|
1875
|
+
task: Task;
|
|
1876
|
+
x: number;
|
|
1877
|
+
y: number;
|
|
1878
|
+
theme: any;
|
|
1879
|
+
onClick?: (task: Task) => void;
|
|
1880
|
+
}
|
|
1881
|
+
declare function Milestone({ task, x, y, theme, onClick }: MilestoneProps): react_jsx_runtime.JSX.Element;
|
|
1882
|
+
|
|
1883
|
+
interface ColumnManagerProps {
|
|
1884
|
+
columns: GanttColumn[];
|
|
1885
|
+
onToggleColumn: (columnId: ColumnType) => void;
|
|
1886
|
+
theme: any;
|
|
1887
|
+
}
|
|
1888
|
+
declare function ColumnManager({ columns, onToggleColumn, theme }: ColumnManagerProps): react_jsx_runtime.JSX.Element;
|
|
1889
|
+
|
|
1890
|
+
interface ContextMenuItem {
|
|
1891
|
+
id: string;
|
|
1892
|
+
label: string;
|
|
1893
|
+
icon?: React.ReactNode;
|
|
1894
|
+
onClick: () => void;
|
|
1895
|
+
separator?: boolean;
|
|
1896
|
+
disabled?: boolean;
|
|
1897
|
+
submenu?: ContextMenuItem[];
|
|
1898
|
+
}
|
|
1899
|
+
interface ContextMenuProps {
|
|
1900
|
+
isOpen: boolean;
|
|
1901
|
+
x: number;
|
|
1902
|
+
y: number;
|
|
1903
|
+
items: ContextMenuItem[];
|
|
1904
|
+
onClose: () => void;
|
|
1905
|
+
theme: any;
|
|
1906
|
+
}
|
|
1907
|
+
declare function ContextMenu({ isOpen, x, y, items, onClose, theme }: ContextMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
1908
|
+
declare const MenuIcons: {
|
|
1909
|
+
Edit: react_jsx_runtime.JSX.Element;
|
|
1910
|
+
Delete: react_jsx_runtime.JSX.Element;
|
|
1911
|
+
Add: react_jsx_runtime.JSX.Element;
|
|
1912
|
+
Remove: react_jsx_runtime.JSX.Element;
|
|
1913
|
+
Link: react_jsx_runtime.JSX.Element;
|
|
1914
|
+
Progress: react_jsx_runtime.JSX.Element;
|
|
1915
|
+
Sort: react_jsx_runtime.JSX.Element;
|
|
1916
|
+
SortAsc: react_jsx_runtime.JSX.Element;
|
|
1917
|
+
SortDesc: react_jsx_runtime.JSX.Element;
|
|
1918
|
+
Hide: react_jsx_runtime.JSX.Element;
|
|
1919
|
+
Show: react_jsx_runtime.JSX.Element;
|
|
1920
|
+
Settings: react_jsx_runtime.JSX.Element;
|
|
1921
|
+
Split: react_jsx_runtime.JSX.Element;
|
|
1922
|
+
};
|
|
1923
|
+
|
|
1924
|
+
interface TaskFormData {
|
|
1925
|
+
name: string;
|
|
1926
|
+
startDate?: Date;
|
|
1927
|
+
endDate?: Date;
|
|
1928
|
+
progress: number;
|
|
1929
|
+
status: 'todo' | 'in-progress' | 'completed';
|
|
1930
|
+
isMilestone: boolean;
|
|
1931
|
+
assignees?: Array<{
|
|
1932
|
+
name: string;
|
|
1933
|
+
avatar?: string;
|
|
1934
|
+
initials: string;
|
|
1935
|
+
color: string;
|
|
1936
|
+
}>;
|
|
1937
|
+
dependencies?: string[];
|
|
1938
|
+
}
|
|
1939
|
+
interface TaskFormModalProps {
|
|
1940
|
+
/** Is modal open */
|
|
1941
|
+
isOpen: boolean;
|
|
1942
|
+
/** Close handler */
|
|
1943
|
+
onClose: () => void;
|
|
1944
|
+
/** Task to edit (undefined for create mode) */
|
|
1945
|
+
task?: Task;
|
|
1946
|
+
/** Available tasks for dependencies */
|
|
1947
|
+
availableTasks?: Task[];
|
|
1948
|
+
/** Available users for assignment */
|
|
1949
|
+
availableUsers?: Array<{
|
|
1950
|
+
id: string;
|
|
1951
|
+
name: string;
|
|
1952
|
+
avatar?: string;
|
|
1953
|
+
}>;
|
|
1954
|
+
/** Submit handler */
|
|
1955
|
+
onSubmit: (data: TaskFormData) => void | Promise<void>;
|
|
1956
|
+
/** Is submitting */
|
|
1957
|
+
isLoading?: boolean;
|
|
1958
|
+
/** Mode: create or edit */
|
|
1959
|
+
mode?: 'create' | 'edit';
|
|
1960
|
+
/** Theme: dark, light, or neutral (zen) */
|
|
1961
|
+
theme?: Theme$1;
|
|
1962
|
+
}
|
|
1963
|
+
declare function TaskFormModal({ isOpen, onClose, task, availableTasks, availableUsers, onSubmit, isLoading, mode, theme, }: TaskFormModalProps): react_jsx_runtime.JSX.Element;
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* Public utility functions for Gantt operations
|
|
1967
|
+
* Similar to DHTMLX gantt.* utility methods
|
|
1968
|
+
*/
|
|
1969
|
+
declare const ganttUtils: {
|
|
1970
|
+
/**
|
|
1971
|
+
* Calculate end date based on start date and duration in days
|
|
1972
|
+
* @param start - Start date
|
|
1973
|
+
* @param durationDays - Duration in days
|
|
1974
|
+
* @returns End date
|
|
1975
|
+
*/
|
|
1976
|
+
calculateEndDate: (start: Date, durationDays: number) => Date;
|
|
1977
|
+
/**
|
|
1978
|
+
* Calculate duration in days between two dates
|
|
1979
|
+
* @param start - Start date
|
|
1980
|
+
* @param end - End date
|
|
1981
|
+
* @returns Duration in days (rounded up)
|
|
1982
|
+
*/
|
|
1983
|
+
calculateDuration: (start: Date, end: Date) => number;
|
|
1984
|
+
/**
|
|
1985
|
+
* Calculate working days between two dates (excluding weekends)
|
|
1986
|
+
* @param start - Start date
|
|
1987
|
+
* @param end - End date
|
|
1988
|
+
* @returns Number of working days
|
|
1989
|
+
*/
|
|
1990
|
+
calculateWorkingDays: (start: Date, end: Date) => number;
|
|
1991
|
+
/**
|
|
1992
|
+
* Add working days to a date (excluding weekends)
|
|
1993
|
+
* @param start - Start date
|
|
1994
|
+
* @param workingDays - Number of working days to add
|
|
1995
|
+
* @returns End date
|
|
1996
|
+
*/
|
|
1997
|
+
addWorkingDays: (start: Date, workingDays: number) => Date;
|
|
1998
|
+
/**
|
|
1999
|
+
* Check if a date is a weekend
|
|
2000
|
+
* @param date - Date to check
|
|
2001
|
+
* @returns True if weekend
|
|
2002
|
+
*/
|
|
2003
|
+
isWeekend: (date: Date) => boolean;
|
|
2004
|
+
/**
|
|
2005
|
+
* Validate if creating a dependency would create a circular reference
|
|
2006
|
+
* Uses Depth-First Search (DFS) algorithm
|
|
2007
|
+
* @param tasks - All tasks
|
|
2008
|
+
* @param fromTaskId - Source task ID
|
|
2009
|
+
* @param toTaskId - Target task ID
|
|
2010
|
+
* @returns True if would create circular dependency
|
|
2011
|
+
*/
|
|
2012
|
+
validateDependencies: (tasks: Task[], fromTaskId: string, toTaskId: string) => boolean;
|
|
2013
|
+
/**
|
|
2014
|
+
* Flatten nested tasks into a single array
|
|
2015
|
+
* @param tasks - Tasks with potential subtasks
|
|
2016
|
+
* @returns Flat array of all tasks
|
|
2017
|
+
*/
|
|
2018
|
+
flattenTasks: (tasks: Task[]) => Task[];
|
|
2019
|
+
/**
|
|
2020
|
+
* Find a task by ID in nested structure
|
|
2021
|
+
* @param tasks - Tasks to search
|
|
2022
|
+
* @param taskId - ID to find
|
|
2023
|
+
* @returns Task if found, undefined otherwise
|
|
2024
|
+
*/
|
|
2025
|
+
findTaskById: (tasks: Task[], taskId: string) => Task | undefined;
|
|
2026
|
+
/**
|
|
2027
|
+
* Get all parent tasks recursively
|
|
2028
|
+
* @param tasks - All tasks
|
|
2029
|
+
* @param taskId - Child task ID
|
|
2030
|
+
* @returns Array of parent tasks
|
|
2031
|
+
*/
|
|
2032
|
+
getParentTasks: (tasks: Task[], taskId: string) => Task[];
|
|
2033
|
+
/**
|
|
2034
|
+
* Export tasks to JSON string
|
|
2035
|
+
* @param tasks - Tasks to export
|
|
2036
|
+
* @returns JSON string
|
|
2037
|
+
*/
|
|
2038
|
+
exportToJSON: (tasks: Task[]) => string;
|
|
2039
|
+
/**
|
|
2040
|
+
* Import tasks from JSON string
|
|
2041
|
+
* @param json - JSON string
|
|
2042
|
+
* @returns Parsed tasks
|
|
2043
|
+
*/
|
|
2044
|
+
importFromJSON: (json: string) => Task[];
|
|
2045
|
+
/**
|
|
2046
|
+
* Export tasks to CSV format
|
|
2047
|
+
* @param tasks - Tasks to export
|
|
2048
|
+
* @returns CSV string
|
|
2049
|
+
*/
|
|
2050
|
+
exportToCSV: (tasks: Task[]) => string;
|
|
2051
|
+
/**
|
|
2052
|
+
* Format date to string (YYYY-MM-DD)
|
|
2053
|
+
* @param date - Date to format
|
|
2054
|
+
* @returns Formatted string
|
|
2055
|
+
*/
|
|
2056
|
+
formatDate: (date: Date) => string;
|
|
2057
|
+
/**
|
|
2058
|
+
* Parse date from string (YYYY-MM-DD)
|
|
2059
|
+
* @param dateString - Date string
|
|
2060
|
+
* @returns Parsed Date
|
|
2061
|
+
*/
|
|
2062
|
+
parseDate: (dateString: string) => Date;
|
|
2063
|
+
/**
|
|
2064
|
+
* Get date range for a task
|
|
2065
|
+
* @param task - Task to get range for
|
|
2066
|
+
* @returns Object with start and end dates, or null if no dates
|
|
2067
|
+
*/
|
|
2068
|
+
getTaskDateRange: (task: Task) => {
|
|
2069
|
+
start: Date;
|
|
2070
|
+
end: Date;
|
|
2071
|
+
} | null;
|
|
2072
|
+
/**
|
|
2073
|
+
* Get the earliest start date from tasks
|
|
2074
|
+
* @param tasks - Tasks to search
|
|
2075
|
+
* @returns Earliest date or null
|
|
2076
|
+
*/
|
|
2077
|
+
getEarliestStartDate: (tasks: Task[]) => Date | null;
|
|
2078
|
+
/**
|
|
2079
|
+
* Get the latest end date from tasks
|
|
2080
|
+
* @param tasks - Tasks to search
|
|
2081
|
+
* @returns Latest date or null
|
|
2082
|
+
*/
|
|
2083
|
+
getLatestEndDate: (tasks: Task[]) => Date | null;
|
|
2084
|
+
/**
|
|
2085
|
+
* Check if two tasks overlap in time
|
|
2086
|
+
* @param task1 - First task
|
|
2087
|
+
* @param task2 - Second task
|
|
2088
|
+
* @returns True if tasks overlap
|
|
2089
|
+
*/
|
|
2090
|
+
tasksOverlap: (task1: Task, task2: Task) => boolean;
|
|
2091
|
+
/**
|
|
2092
|
+
* Get all tasks that depend on a given task (children in dependency tree)
|
|
2093
|
+
* @param tasks - All tasks
|
|
2094
|
+
* @param taskId - Task ID to find dependents for
|
|
2095
|
+
* @returns Array of tasks that depend on this task
|
|
2096
|
+
*/
|
|
2097
|
+
getDependentTasks: (tasks: Task[], taskId: string) => Task[];
|
|
2098
|
+
/**
|
|
2099
|
+
* Get all tasks that a given task depends on (parents in dependency tree)
|
|
2100
|
+
* @param tasks - All tasks
|
|
2101
|
+
* @param taskId - Task ID to find dependencies for
|
|
2102
|
+
* @returns Array of tasks this task depends on
|
|
2103
|
+
*/
|
|
2104
|
+
getDependencyTasks: (tasks: Task[], taskId: string) => Task[];
|
|
2105
|
+
/**
|
|
2106
|
+
* Filter tasks by status
|
|
2107
|
+
* @param tasks - Tasks to filter
|
|
2108
|
+
* @param status - Status to filter by
|
|
2109
|
+
* @returns Filtered tasks
|
|
2110
|
+
*/
|
|
2111
|
+
filterByStatus: (tasks: Task[], status: "todo" | "in-progress" | "completed") => Task[];
|
|
2112
|
+
/**
|
|
2113
|
+
* Filter tasks by date range
|
|
2114
|
+
* @param tasks - Tasks to filter
|
|
2115
|
+
* @param startDate - Range start
|
|
2116
|
+
* @param endDate - Range end
|
|
2117
|
+
* @returns Tasks that fall within the date range
|
|
2118
|
+
*/
|
|
2119
|
+
filterByDateRange: (tasks: Task[], startDate: Date, endDate: Date) => Task[];
|
|
2120
|
+
/**
|
|
2121
|
+
* Sort tasks by start date
|
|
2122
|
+
* @param tasks - Tasks to sort
|
|
2123
|
+
* @param ascending - Sort ascending (default) or descending
|
|
2124
|
+
* @returns Sorted tasks
|
|
2125
|
+
*/
|
|
2126
|
+
sortByStartDate: (tasks: Task[], ascending?: boolean) => Task[];
|
|
2127
|
+
/**
|
|
2128
|
+
* Sort tasks by end date
|
|
2129
|
+
* @param tasks - Tasks to sort
|
|
2130
|
+
* @param ascending - Sort ascending (default) or descending
|
|
2131
|
+
* @returns Sorted tasks
|
|
2132
|
+
*/
|
|
2133
|
+
sortByEndDate: (tasks: Task[], ascending?: boolean) => Task[];
|
|
2134
|
+
/**
|
|
2135
|
+
* Sort tasks by progress
|
|
2136
|
+
* @param tasks - Tasks to sort
|
|
2137
|
+
* @param ascending - Sort ascending (default) or descending
|
|
2138
|
+
* @returns Sorted tasks
|
|
2139
|
+
*/
|
|
2140
|
+
sortByProgress: (tasks: Task[], ascending?: boolean) => Task[];
|
|
2141
|
+
/**
|
|
2142
|
+
* Calculate total progress across all tasks
|
|
2143
|
+
* @param tasks - Tasks to calculate
|
|
2144
|
+
* @returns Average progress percentage
|
|
2145
|
+
*/
|
|
2146
|
+
calculateTotalProgress: (tasks: Task[]) => number;
|
|
2147
|
+
/**
|
|
2148
|
+
* Get task by path (array of indices in nested structure)
|
|
2149
|
+
* @param tasks - Root tasks
|
|
2150
|
+
* @param path - Array of indices [0, 2, 1] means tasks[0].subtasks[2].subtasks[1]
|
|
2151
|
+
* @returns Task at path or undefined
|
|
2152
|
+
*/
|
|
2153
|
+
getTaskByPath: (tasks: Task[], path: number[]) => Task | undefined;
|
|
2154
|
+
/**
|
|
2155
|
+
* Clone a task deeply (including subtasks)
|
|
2156
|
+
* @param task - Task to clone
|
|
2157
|
+
* @param newId - Optional new ID for the clone
|
|
2158
|
+
* @returns Cloned task
|
|
2159
|
+
*/
|
|
2160
|
+
cloneTask: (task: Task, newId?: string) => Task;
|
|
2161
|
+
/**
|
|
2162
|
+
* Export tasks to PDF format
|
|
2163
|
+
* @param tasks - Tasks to export
|
|
2164
|
+
* @param filename - Optional filename (default: 'gantt-chart.pdf')
|
|
2165
|
+
* @returns Promise<void>
|
|
2166
|
+
*/
|
|
2167
|
+
exportToPDF: (tasks: Task[], filename?: string) => Promise<void>;
|
|
2168
|
+
/**
|
|
2169
|
+
* Export tasks to Excel format
|
|
2170
|
+
* @param tasks - Tasks to export
|
|
2171
|
+
* @param filename - Optional filename (default: 'gantt-chart.xlsx')
|
|
2172
|
+
* @returns Promise<void>
|
|
2173
|
+
*/
|
|
2174
|
+
exportToExcel: (tasks: Task[], filename?: string) => Promise<void>;
|
|
2175
|
+
/**
|
|
2176
|
+
* Calculate Critical Path Method (CPM) - identifies tasks with zero slack
|
|
2177
|
+
* @param tasks - All tasks
|
|
2178
|
+
* @returns Array of task IDs on the critical path
|
|
2179
|
+
*/
|
|
2180
|
+
calculateCriticalPath: (tasks: Task[]) => string[];
|
|
2181
|
+
/**
|
|
2182
|
+
* Calculate slack (float) time for a task
|
|
2183
|
+
* @param tasks - All tasks
|
|
2184
|
+
* @param taskId - Task ID to calculate slack for
|
|
2185
|
+
* @returns Slack in days, or null if cannot be calculated
|
|
2186
|
+
*/
|
|
2187
|
+
calculateSlack: (tasks: Task[], taskId: string) => number | null;
|
|
2188
|
+
/**
|
|
2189
|
+
* Check if a task is on the critical path
|
|
2190
|
+
* @param tasks - All tasks
|
|
2191
|
+
* @param taskId - Task ID to check
|
|
2192
|
+
* @returns True if task is on critical path
|
|
2193
|
+
*/
|
|
2194
|
+
isOnCriticalPath: (tasks: Task[], taskId: string) => boolean;
|
|
2195
|
+
/**
|
|
2196
|
+
* Auto-schedule dependent tasks when a task changes
|
|
2197
|
+
* @param tasks - All tasks
|
|
2198
|
+
* @param changedTaskId - Task that was changed
|
|
2199
|
+
* @returns Updated tasks with rescheduled dependencies
|
|
2200
|
+
*/
|
|
2201
|
+
autoScheduleDependents: (tasks: Task[], changedTaskId: string) => Task[];
|
|
2202
|
+
/**
|
|
2203
|
+
* 🚀 KILLER FEATURE #3: Split a task (create GAP in the middle, like Bryntum/DHTMLX)
|
|
2204
|
+
* Same task, but work is paused for some days then continues
|
|
2205
|
+
* Example: Jan 1-10 → Split at Jan 5 with 3 day gap → Jan 1-4 [GAP] Jan 8-13
|
|
2206
|
+
* @param tasks - All tasks
|
|
2207
|
+
* @param taskId - Task to split
|
|
2208
|
+
* @param splitDate - Date where gap starts
|
|
2209
|
+
* @param gapDays - Number of days to pause (default: 3)
|
|
2210
|
+
* @returns Updated tasks with split segments
|
|
2211
|
+
*/
|
|
2212
|
+
splitTask: (tasks: Task[], taskId: string, splitDate: Date, gapDays?: number) => Task[];
|
|
2213
|
+
};
|
|
2214
|
+
|
|
2215
|
+
declare const themes$1: Record<string, GanttTheme>;
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Type adapters for converting between ASAKAA Card types and Gantt Task types
|
|
2219
|
+
* @module Gantt/adapters
|
|
2220
|
+
*/
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* Converts an ASAKAA Card to a Gantt Task
|
|
2224
|
+
*
|
|
2225
|
+
* @param card - ASAKAA Card object
|
|
2226
|
+
* @param allCards - All cards in the board (for resolving subtasks)
|
|
2227
|
+
* @param users - Available users for assignee mapping
|
|
2228
|
+
* @returns Gantt Task object
|
|
2229
|
+
*/
|
|
2230
|
+
declare function cardToGanttTask(card: Card$1, allCards?: Card$1[], users?: Array<{
|
|
2231
|
+
id: string;
|
|
2232
|
+
name: string;
|
|
2233
|
+
initials: string;
|
|
2234
|
+
color: string;
|
|
2235
|
+
}>): Task;
|
|
2236
|
+
/**
|
|
2237
|
+
* Converts a Gantt Task back to an ASAKAA Card (partial update)
|
|
2238
|
+
* Note: This only returns the fields that Gantt can modify
|
|
2239
|
+
*
|
|
2240
|
+
* @param task - Gantt Task object
|
|
2241
|
+
* @param users - Available users for reverse mapping assignees to userIds
|
|
2242
|
+
* @returns Partial Card update object
|
|
2243
|
+
*/
|
|
2244
|
+
declare function ganttTaskToCardUpdate(task: Task, users?: Array<{
|
|
2245
|
+
id: string;
|
|
2246
|
+
name: string;
|
|
2247
|
+
initials: string;
|
|
2248
|
+
color: string;
|
|
2249
|
+
}>): Partial<Card$1>;
|
|
2250
|
+
/**
|
|
2251
|
+
* Converts an array of Cards to an array of Gantt Tasks
|
|
2252
|
+
*
|
|
2253
|
+
* @param cards - Array of ASAKAA Card objects
|
|
2254
|
+
* @param users - Available users for assignee mapping
|
|
2255
|
+
* @returns Array of Gantt Task objects
|
|
2256
|
+
*/
|
|
2257
|
+
declare function cardsToGanttTasks(cards: Card$1[], users?: Array<{
|
|
2258
|
+
id: string;
|
|
2259
|
+
name: string;
|
|
2260
|
+
initials: string;
|
|
2261
|
+
color: string;
|
|
2262
|
+
}>): Task[];
|
|
2263
|
+
|
|
2264
|
+
interface CardStackProps {
|
|
2265
|
+
/** Stack configuration */
|
|
2266
|
+
stack: CardStack$1;
|
|
2267
|
+
/** All cards in the board */
|
|
2268
|
+
cards: Card$1[];
|
|
2269
|
+
/** Card render function */
|
|
2270
|
+
renderCard?: (card: Card$1) => React.ReactNode;
|
|
2271
|
+
/** Click handler for individual cards */
|
|
2272
|
+
onCardClick?: (card: Card$1) => void;
|
|
2273
|
+
/** Expand/collapse handler */
|
|
2274
|
+
onToggleExpand?: (stackId: string) => void;
|
|
2275
|
+
/** Unstack handler (remove card from stack) */
|
|
2276
|
+
onUnstack?: (stackId: string, cardId: string) => void;
|
|
2277
|
+
/** Delete entire stack handler */
|
|
2278
|
+
onDeleteStack?: (stackId: string) => void;
|
|
2279
|
+
/** Custom className */
|
|
2280
|
+
className?: string;
|
|
2281
|
+
}
|
|
2282
|
+
/**
|
|
2283
|
+
* CardStack - Collapsible group of related cards
|
|
2284
|
+
*/
|
|
2285
|
+
declare function CardStack({ stack, cards, renderCard, onCardClick, onToggleExpand, onUnstack, onDeleteStack, className, }: CardStackProps): react_jsx_runtime.JSX.Element;
|
|
2286
|
+
|
|
2287
|
+
/**
|
|
2288
|
+
* Card History & Time Travel Types
|
|
2289
|
+
* Tracks all changes to cards with full reproducibility
|
|
2290
|
+
* @module types/card-history
|
|
2291
|
+
*/
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* Types of events that can occur in a card's history
|
|
2295
|
+
*/
|
|
2296
|
+
type CardHistoryEventType = 'created' | 'status_changed' | 'assignee_changed' | 'priority_changed' | 'moved' | 'title_updated' | 'description_updated' | 'dates_changed' | 'labels_changed' | 'dependency_added' | 'dependency_removed' | 'comment_added' | 'archived' | 'restored';
|
|
2297
|
+
/**
|
|
2298
|
+
* Represents a single change in a card's history
|
|
2299
|
+
*/
|
|
2300
|
+
interface CardHistoryEvent {
|
|
2301
|
+
/** Unique event ID */
|
|
2302
|
+
id: string;
|
|
2303
|
+
/** Card this event belongs to */
|
|
2304
|
+
cardId: string;
|
|
2305
|
+
/** When the event occurred */
|
|
2306
|
+
timestamp: Date;
|
|
2307
|
+
/** Type of change */
|
|
2308
|
+
type: CardHistoryEventType;
|
|
2309
|
+
/** User who made the change */
|
|
2310
|
+
userId: string;
|
|
2311
|
+
/** User display name (for UI) */
|
|
2312
|
+
userName?: string;
|
|
2313
|
+
/** User avatar URL (for UI) */
|
|
2314
|
+
userAvatar?: string;
|
|
2315
|
+
/** Detailed changes (before/after) */
|
|
2316
|
+
changes: Record<string, {
|
|
2317
|
+
from: any;
|
|
2318
|
+
to: any;
|
|
2319
|
+
}>;
|
|
2320
|
+
/** Additional context */
|
|
2321
|
+
metadata?: {
|
|
2322
|
+
/** Column names for moves */
|
|
2323
|
+
fromColumn?: string;
|
|
2324
|
+
toColumn?: string;
|
|
2325
|
+
/** Comment text for comment events */
|
|
2326
|
+
commentText?: string;
|
|
2327
|
+
/** Reason for change */
|
|
2328
|
+
reason?: string;
|
|
2329
|
+
/** Related card IDs */
|
|
2330
|
+
relatedCards?: string[];
|
|
2331
|
+
};
|
|
2332
|
+
}
|
|
2333
|
+
/**
|
|
2334
|
+
* Filter configuration for history events
|
|
2335
|
+
*/
|
|
2336
|
+
interface HistoryFilter {
|
|
2337
|
+
/** Filter by event types */
|
|
2338
|
+
types?: CardHistoryEventType[];
|
|
2339
|
+
/** Filter by users */
|
|
2340
|
+
users?: string[];
|
|
2341
|
+
/** Filter by date range */
|
|
2342
|
+
dateRange?: {
|
|
2343
|
+
start: Date;
|
|
2344
|
+
end: Date;
|
|
2345
|
+
};
|
|
2346
|
+
/** Search in change descriptions */
|
|
2347
|
+
searchTerm?: string;
|
|
2348
|
+
}
|
|
2349
|
+
/**
|
|
2350
|
+
* State for the replay/time-travel feature
|
|
2351
|
+
*/
|
|
2352
|
+
interface ReplayState {
|
|
2353
|
+
/** Current position in history (0 = oldest, length-1 = newest) */
|
|
2354
|
+
currentIndex: number;
|
|
2355
|
+
/** Is replay actively playing */
|
|
2356
|
+
isPlaying: boolean;
|
|
2357
|
+
/** Playback speed (1 = normal, 2 = 2x, etc.) */
|
|
2358
|
+
speed: number;
|
|
2359
|
+
/** Card state at current index */
|
|
2360
|
+
cardState: Card$1;
|
|
2361
|
+
/** Total number of events */
|
|
2362
|
+
totalEvents: number;
|
|
2363
|
+
/** Can go back */
|
|
2364
|
+
canGoBack: boolean;
|
|
2365
|
+
/** Can go forward */
|
|
2366
|
+
canGoForward: boolean;
|
|
2367
|
+
}
|
|
2368
|
+
/**
|
|
2369
|
+
* Timeline visualization configuration
|
|
2370
|
+
*/
|
|
2371
|
+
interface TimelineConfig {
|
|
2372
|
+
/** Show event icons */
|
|
2373
|
+
showIcons: boolean;
|
|
2374
|
+
/** Show user avatars */
|
|
2375
|
+
showAvatars: boolean;
|
|
2376
|
+
/** Group events by day */
|
|
2377
|
+
groupByDay: boolean;
|
|
2378
|
+
/** Show relative times (e.g. "2 hours ago") */
|
|
2379
|
+
useRelativeTime: boolean;
|
|
2380
|
+
/** Compact mode (less spacing) */
|
|
2381
|
+
compact: boolean;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
interface CardHistoryTimelineProps {
|
|
2385
|
+
/** History events to display */
|
|
2386
|
+
events: CardHistoryEvent[];
|
|
2387
|
+
/** Current filter */
|
|
2388
|
+
filter: HistoryFilter;
|
|
2389
|
+
/** Update filter */
|
|
2390
|
+
onFilterChange: (filter: HistoryFilter) => void;
|
|
2391
|
+
/** Clear filter */
|
|
2392
|
+
onClearFilter: () => void;
|
|
2393
|
+
/** Click on event */
|
|
2394
|
+
onEventClick?: (event: CardHistoryEvent) => void;
|
|
2395
|
+
/** Selected event ID */
|
|
2396
|
+
selectedEventId?: string;
|
|
2397
|
+
/** Timeline configuration */
|
|
2398
|
+
config?: Partial<TimelineConfig>;
|
|
2399
|
+
/** Custom className */
|
|
2400
|
+
className?: string;
|
|
2401
|
+
}
|
|
2402
|
+
/**
|
|
2403
|
+
* Timeline component showing card history
|
|
2404
|
+
*/
|
|
2405
|
+
declare function CardHistoryTimeline({ events, filter, onFilterChange, onClearFilter, onEventClick, selectedEventId, config: customConfig, className, }: CardHistoryTimelineProps): react_jsx_runtime.JSX.Element;
|
|
2406
|
+
|
|
2407
|
+
interface CardHistoryReplayProps {
|
|
2408
|
+
/** Current replay state */
|
|
2409
|
+
replayState: ReplayState | null;
|
|
2410
|
+
/** All history events */
|
|
2411
|
+
events: CardHistoryEvent[];
|
|
2412
|
+
/** Start replay */
|
|
2413
|
+
onStartReplay: () => void;
|
|
2414
|
+
/** Stop replay */
|
|
2415
|
+
onStopReplay: () => void;
|
|
2416
|
+
/** Toggle play/pause */
|
|
2417
|
+
onTogglePlayback: () => void;
|
|
2418
|
+
/** Go to previous event */
|
|
2419
|
+
onPrevious: () => void;
|
|
2420
|
+
/** Go to next event */
|
|
2421
|
+
onNext: () => void;
|
|
2422
|
+
/** Go to specific event */
|
|
2423
|
+
onGoToEvent: (index: number) => void;
|
|
2424
|
+
/** Change playback speed */
|
|
2425
|
+
onSpeedChange: (speed: number) => void;
|
|
2426
|
+
/** Custom className */
|
|
2427
|
+
className?: string;
|
|
2428
|
+
}
|
|
2429
|
+
/**
|
|
2430
|
+
* Replay controls for time-travel functionality
|
|
2431
|
+
*/
|
|
2432
|
+
declare function CardHistoryReplay({ replayState, events, onStartReplay, onStopReplay, onTogglePlayback, onPrevious, onNext, onGoToEvent, onSpeedChange, className, }: CardHistoryReplayProps): react_jsx_runtime.JSX.Element;
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* Card Relationships & Graph Types
|
|
2436
|
+
* Force-directed graph visualization for card dependencies and relationships
|
|
2437
|
+
* @module types/card-relationships
|
|
2438
|
+
*/
|
|
2439
|
+
|
|
2440
|
+
/**
|
|
2441
|
+
* Types of relationships between cards
|
|
2442
|
+
*/
|
|
2443
|
+
type RelationshipType = 'blocks' | 'blocked_by' | 'depends_on' | 'required_by' | 'relates_to' | 'duplicates' | 'parent_of' | 'child_of' | 'similar_to';
|
|
2444
|
+
/**
|
|
2445
|
+
* Node in the relationship graph
|
|
2446
|
+
*/
|
|
2447
|
+
interface GraphNode {
|
|
2448
|
+
/** Card ID */
|
|
2449
|
+
id: string;
|
|
2450
|
+
/** Card reference */
|
|
2451
|
+
card: Card$1;
|
|
2452
|
+
/** X position (calculated by force simulation) */
|
|
2453
|
+
x?: number;
|
|
2454
|
+
/** Y position (calculated by force simulation) */
|
|
2455
|
+
y?: number;
|
|
2456
|
+
/** X velocity (for force simulation) */
|
|
2457
|
+
vx?: number;
|
|
2458
|
+
/** Y velocity (for force simulation) */
|
|
2459
|
+
vy?: number;
|
|
2460
|
+
/** Fixed position (prevent movement) */
|
|
2461
|
+
fx?: number | null;
|
|
2462
|
+
/** Fixed position (prevent movement) */
|
|
2463
|
+
fy?: number | null;
|
|
2464
|
+
/** Node degree (number of connections) */
|
|
2465
|
+
degree?: number;
|
|
2466
|
+
/** Is this node on the critical path */
|
|
2467
|
+
onCriticalPath?: boolean;
|
|
2468
|
+
/** Cluster ID (for grouping) */
|
|
2469
|
+
clusterId?: string;
|
|
2470
|
+
}
|
|
2471
|
+
/**
|
|
2472
|
+
* Edge in the relationship graph
|
|
2473
|
+
*/
|
|
2474
|
+
interface GraphEdge {
|
|
2475
|
+
/** Relationship ID */
|
|
2476
|
+
id: string;
|
|
2477
|
+
/** Source node ID */
|
|
2478
|
+
source: string | GraphNode;
|
|
2479
|
+
/** Target node ID */
|
|
2480
|
+
target: string | GraphNode;
|
|
2481
|
+
/** Relationship type */
|
|
2482
|
+
type: RelationshipType;
|
|
2483
|
+
/** Edge strength (for styling) */
|
|
2484
|
+
strength?: number;
|
|
2485
|
+
/** Is this edge on the critical path */
|
|
2486
|
+
onCriticalPath?: boolean;
|
|
2487
|
+
}
|
|
2488
|
+
/**
|
|
2489
|
+
* Graph layout algorithms
|
|
2490
|
+
*/
|
|
2491
|
+
type GraphLayout = 'force' | 'hierarchical' | 'circular' | 'radial' | 'grid';
|
|
2492
|
+
/**
|
|
2493
|
+
* Graph visualization configuration
|
|
2494
|
+
*/
|
|
2495
|
+
interface GraphConfig {
|
|
2496
|
+
/** Layout algorithm */
|
|
2497
|
+
layout: GraphLayout;
|
|
2498
|
+
/** Width of the graph container */
|
|
2499
|
+
width: number;
|
|
2500
|
+
/** Height of the graph container */
|
|
2501
|
+
height: number;
|
|
2502
|
+
/** Enable node dragging */
|
|
2503
|
+
enableDragging: boolean;
|
|
2504
|
+
/** Enable zoom and pan */
|
|
2505
|
+
enableZoom: boolean;
|
|
2506
|
+
/** Show node labels */
|
|
2507
|
+
showLabels: boolean;
|
|
2508
|
+
/** Show edge labels */
|
|
2509
|
+
showEdgeLabels: boolean;
|
|
2510
|
+
/** Highlight critical path */
|
|
2511
|
+
highlightCriticalPath: boolean;
|
|
2512
|
+
/** Node size */
|
|
2513
|
+
nodeSize: number;
|
|
2514
|
+
/** Edge width */
|
|
2515
|
+
edgeWidth: number;
|
|
2516
|
+
/** Animation duration */
|
|
2517
|
+
animationDuration: number;
|
|
2518
|
+
/** Force simulation strength */
|
|
2519
|
+
forceStrength: number;
|
|
2520
|
+
/** Link distance */
|
|
2521
|
+
linkDistance: number;
|
|
2522
|
+
/** Charge strength (repulsion) */
|
|
2523
|
+
chargeStrength: number;
|
|
2524
|
+
/** Center force strength */
|
|
2525
|
+
centerForce: number;
|
|
2526
|
+
/** Color scheme */
|
|
2527
|
+
colorScheme: 'status' | 'priority' | 'assignee' | 'cluster';
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Graph filters
|
|
2531
|
+
*/
|
|
2532
|
+
interface GraphFilter {
|
|
2533
|
+
/** Filter by relationship types */
|
|
2534
|
+
types?: RelationshipType[];
|
|
2535
|
+
/** Filter by card IDs */
|
|
2536
|
+
cardIds?: string[];
|
|
2537
|
+
/** Filter by columns */
|
|
2538
|
+
columnIds?: string[];
|
|
2539
|
+
/** Minimum relationship strength */
|
|
2540
|
+
minStrength?: number;
|
|
2541
|
+
/** Show only critical path */
|
|
2542
|
+
criticalPathOnly?: boolean;
|
|
2543
|
+
/** Maximum depth from selected node */
|
|
2544
|
+
maxDepth?: number;
|
|
2545
|
+
}
|
|
2546
|
+
/**
|
|
2547
|
+
* Critical path analysis result
|
|
2548
|
+
*/
|
|
2549
|
+
interface CriticalPath {
|
|
2550
|
+
/** Cards on the critical path */
|
|
2551
|
+
cardIds: string[];
|
|
2552
|
+
/** Relationships on the critical path */
|
|
2553
|
+
relationshipIds: string[];
|
|
2554
|
+
/** Total estimated time */
|
|
2555
|
+
totalDuration: number;
|
|
2556
|
+
/** Bottleneck cards */
|
|
2557
|
+
bottlenecks: string[];
|
|
2558
|
+
}
|
|
2559
|
+
/**
|
|
2560
|
+
* Graph statistics
|
|
2561
|
+
*/
|
|
2562
|
+
interface GraphStats {
|
|
2563
|
+
/** Total nodes */
|
|
2564
|
+
totalNodes: number;
|
|
2565
|
+
/** Total edges */
|
|
2566
|
+
totalEdges: number;
|
|
2567
|
+
/** Average degree */
|
|
2568
|
+
averageDegree: number;
|
|
2569
|
+
/** Density (0-1) */
|
|
2570
|
+
density: number;
|
|
2571
|
+
/** Number of clusters */
|
|
2572
|
+
clusters: number;
|
|
2573
|
+
/** Isolated nodes (no connections) */
|
|
2574
|
+
isolatedNodes: string[];
|
|
2575
|
+
/** Hub nodes (most connections) */
|
|
2576
|
+
hubNodes: Array<{
|
|
2577
|
+
cardId: string;
|
|
2578
|
+
degree: number;
|
|
2579
|
+
}>;
|
|
2580
|
+
/** Most common relationship type */
|
|
2581
|
+
mostCommonRelationType: RelationshipType;
|
|
2582
|
+
}
|
|
2583
|
+
/**
|
|
2584
|
+
* Graph interaction event
|
|
2585
|
+
*/
|
|
2586
|
+
interface GraphInteraction {
|
|
2587
|
+
/** Event type */
|
|
2588
|
+
type: 'node-click' | 'node-hover' | 'edge-click' | 'edge-hover' | 'canvas-click';
|
|
2589
|
+
/** Selected node */
|
|
2590
|
+
node?: GraphNode;
|
|
2591
|
+
/** Selected edge */
|
|
2592
|
+
edge?: GraphEdge;
|
|
2593
|
+
/** Mouse position */
|
|
2594
|
+
position?: {
|
|
2595
|
+
x: number;
|
|
2596
|
+
y: number;
|
|
2597
|
+
};
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
interface CardRelationshipsGraphProps {
|
|
2601
|
+
/** Graph nodes */
|
|
2602
|
+
nodes: GraphNode[];
|
|
2603
|
+
/** Graph edges */
|
|
2604
|
+
edges: GraphEdge[];
|
|
2605
|
+
/** Graph configuration */
|
|
2606
|
+
config: GraphConfig;
|
|
2607
|
+
/** Current filter */
|
|
2608
|
+
filter: GraphFilter;
|
|
2609
|
+
/** Update filter */
|
|
2610
|
+
onFilterChange: (filter: GraphFilter) => void;
|
|
2611
|
+
/** Critical path */
|
|
2612
|
+
criticalPath: CriticalPath | null;
|
|
2613
|
+
/** Graph statistics */
|
|
2614
|
+
stats: GraphStats;
|
|
2615
|
+
/** Interaction callback */
|
|
2616
|
+
onInteraction?: (interaction: GraphInteraction) => void;
|
|
2617
|
+
/** Custom className */
|
|
2618
|
+
className?: string;
|
|
2619
|
+
}
|
|
2620
|
+
/**
|
|
2621
|
+
* Graph visualization component
|
|
2622
|
+
*/
|
|
2623
|
+
declare function CardRelationshipsGraph({ nodes, edges, config, filter: _filter, onFilterChange: _onFilterChange, criticalPath, stats, onInteraction, className, }: CardRelationshipsGraphProps): react_jsx_runtime.JSX.Element;
|
|
2624
|
+
|
|
2625
|
+
interface GeneratePlanModalProps {
|
|
2626
|
+
/** Is modal open */
|
|
2627
|
+
isOpen: boolean;
|
|
2628
|
+
/** Close handler */
|
|
2629
|
+
onClose: () => void;
|
|
2630
|
+
/** Plan generated callback */
|
|
2631
|
+
onPlanGenerated: (plan: GeneratedPlan) => void;
|
|
2632
|
+
/** Generate plan function (from useAI hook) */
|
|
2633
|
+
onGeneratePlan: (prompt: string) => Promise<GeneratedPlan>;
|
|
2634
|
+
/** Is AI loading */
|
|
2635
|
+
isLoading?: boolean;
|
|
2636
|
+
}
|
|
2637
|
+
declare function GeneratePlanModal({ isOpen, onClose, onPlanGenerated, onGeneratePlan, isLoading: externalLoading, }: GeneratePlanModalProps): react_jsx_runtime.JSX.Element | null;
|
|
2638
|
+
|
|
2639
|
+
/**
|
|
2640
|
+
* AI Usage Dashboard
|
|
2641
|
+
* Display AI usage statistics and costs
|
|
2642
|
+
*/
|
|
2643
|
+
interface AIUsageDashboardProps {
|
|
2644
|
+
/** Is dashboard open */
|
|
2645
|
+
isOpen: boolean;
|
|
2646
|
+
/** Close handler */
|
|
2647
|
+
onClose: () => void;
|
|
2648
|
+
/** Current plan tier */
|
|
2649
|
+
planTier?: 'hobby' | 'pro' | 'enterprise';
|
|
2650
|
+
}
|
|
2651
|
+
declare function AIUsageDashboard({ isOpen, onClose, planTier, }: AIUsageDashboardProps): react_jsx_runtime.JSX.Element | null;
|
|
2652
|
+
|
|
2653
|
+
/**
|
|
2654
|
+
* Generate Gantt Tasks Dialog
|
|
2655
|
+
* AI-powered Gantt task generation with cost control
|
|
2656
|
+
*/
|
|
2657
|
+
interface GanttTask {
|
|
2658
|
+
id: string;
|
|
2659
|
+
name: string;
|
|
2660
|
+
start: string;
|
|
2661
|
+
end: string;
|
|
2662
|
+
duration: number;
|
|
2663
|
+
progress: number;
|
|
2664
|
+
dependencies: string[];
|
|
2665
|
+
type: string;
|
|
2666
|
+
priority: 'high' | 'medium' | 'low';
|
|
2667
|
+
}
|
|
2668
|
+
interface GeneratedTasksResponse {
|
|
2669
|
+
tasks: {
|
|
2670
|
+
tasks: GanttTask[];
|
|
2671
|
+
};
|
|
2672
|
+
from_cache: boolean;
|
|
2673
|
+
tokens_used: number;
|
|
2674
|
+
mock_mode?: boolean;
|
|
2675
|
+
similarity?: number;
|
|
2676
|
+
tokens_saved?: number;
|
|
2677
|
+
}
|
|
2678
|
+
interface GenerateGanttTasksDialogProps {
|
|
2679
|
+
/** Is dialog open */
|
|
2680
|
+
isOpen: boolean;
|
|
2681
|
+
/** Close handler */
|
|
2682
|
+
onClose: () => void;
|
|
2683
|
+
/** Tasks generated callback */
|
|
2684
|
+
onTasksGenerated: (tasks: GanttTask[]) => void;
|
|
2685
|
+
/** Generate tasks function (calls Supabase Edge Function) */
|
|
2686
|
+
onGenerateTasks: (params: {
|
|
2687
|
+
prompt: string;
|
|
2688
|
+
projectName?: string;
|
|
2689
|
+
startDate?: string;
|
|
2690
|
+
endDate?: string;
|
|
2691
|
+
}) => Promise<GeneratedTasksResponse>;
|
|
2692
|
+
/** Is AI loading */
|
|
2693
|
+
isLoading?: boolean;
|
|
2694
|
+
/** Project ID (optional) */
|
|
2695
|
+
projectId?: string;
|
|
2696
|
+
/** Project name (optional) */
|
|
2697
|
+
projectName?: string;
|
|
2698
|
+
}
|
|
2699
|
+
declare function GenerateGanttTasksDialog({ isOpen, onClose, onTasksGenerated, onGenerateTasks, isLoading: externalLoading, projectName, }: GenerateGanttTasksDialogProps): react_jsx_runtime.JSX.Element | null;
|
|
2700
|
+
|
|
2701
|
+
/**
|
|
2702
|
+
* useKanbanState Hook
|
|
2703
|
+
* Optional hook for managing board state locally
|
|
2704
|
+
* Consumers can use this or manage state themselves
|
|
2705
|
+
* @module hooks/useKanbanState
|
|
2706
|
+
*/
|
|
2707
|
+
|
|
2708
|
+
interface UseKanbanStateOptions {
|
|
2709
|
+
/** Initial board state */
|
|
2710
|
+
initialBoard: Board;
|
|
2711
|
+
/** Persist changes (e.g., to localStorage, API) */
|
|
2712
|
+
onPersist?: (board: Board) => void | Promise<void>;
|
|
2713
|
+
/** Enable optimistic updates (default: true) */
|
|
2714
|
+
optimistic?: boolean;
|
|
2715
|
+
}
|
|
2716
|
+
interface UseKanbanStateReturn {
|
|
2717
|
+
/** Current board state */
|
|
2718
|
+
board: Board;
|
|
2719
|
+
/** Callbacks for the KanbanBoard component */
|
|
2720
|
+
callbacks: BoardCallbacks;
|
|
2721
|
+
/** Direct state setters (advanced usage) */
|
|
2722
|
+
setBoard: React.Dispatch<React.SetStateAction<Board>>;
|
|
2723
|
+
/** Helper functions */
|
|
2724
|
+
helpers: {
|
|
2725
|
+
addCard: (card: Omit<Card$1, 'id'>) => string;
|
|
2726
|
+
addColumn: (column: Omit<Column$1, 'id' | 'cardIds'>) => string;
|
|
2727
|
+
deleteCard: (cardId: string) => void;
|
|
2728
|
+
deleteColumn: (columnId: string) => void;
|
|
2729
|
+
clearBoard: () => void;
|
|
2730
|
+
};
|
|
2731
|
+
}
|
|
2732
|
+
/**
|
|
2733
|
+
* Hook for managing Kanban board state
|
|
2734
|
+
*
|
|
2735
|
+
* @example
|
|
2736
|
+
* ```tsx
|
|
2737
|
+
* const { board, callbacks } = useKanbanState({
|
|
2738
|
+
* initialBoard: myBoard,
|
|
2739
|
+
* onPersist: async (board) => {
|
|
2740
|
+
* await api.updateBoard(board)
|
|
2741
|
+
* }
|
|
2742
|
+
* })
|
|
2743
|
+
*
|
|
2744
|
+
* return <KanbanBoard board={board} callbacks={callbacks} />
|
|
2745
|
+
* ```
|
|
2746
|
+
*/
|
|
2747
|
+
declare function useKanbanState({ initialBoard, onPersist, }: UseKanbanStateOptions): UseKanbanStateReturn;
|
|
2748
|
+
|
|
2749
|
+
interface UseBoardOptions {
|
|
2750
|
+
initialData: Board;
|
|
2751
|
+
availableUsers?: User$2[];
|
|
2752
|
+
onSave?: (board: Board) => void | Promise<void>;
|
|
2753
|
+
saveDelay?: number;
|
|
2754
|
+
}
|
|
2755
|
+
interface UseBoardReturn$1 {
|
|
2756
|
+
props: Pick<KanbanBoardProps, 'board' | 'callbacks' | 'availableUsers'>;
|
|
2757
|
+
board: Board;
|
|
2758
|
+
callbacks: BoardCallbacks;
|
|
2759
|
+
utils: {
|
|
2760
|
+
addCard: (columnId: string, title: string, data?: Partial<any>) => void;
|
|
2761
|
+
addColumn: (title: string, position?: number) => void;
|
|
2762
|
+
reset: () => void;
|
|
2763
|
+
};
|
|
2764
|
+
}
|
|
2765
|
+
/**
|
|
2766
|
+
* Simplified hook for Kanban board state management
|
|
2767
|
+
*
|
|
2768
|
+
* @example
|
|
2769
|
+
* ```tsx
|
|
2770
|
+
* import { KanbanBoard, useBoard } from '@libxai/board'
|
|
2771
|
+
*
|
|
2772
|
+
* function App() {
|
|
2773
|
+
* const board = useBoard({
|
|
2774
|
+
* initialData: myData,
|
|
2775
|
+
* onSave: (board) => localStorage.setItem('board', JSON.stringify(board))
|
|
2776
|
+
* })
|
|
2777
|
+
*
|
|
2778
|
+
* return <KanbanBoard {...board.props} />
|
|
2779
|
+
* }
|
|
2780
|
+
* ```
|
|
2781
|
+
*/
|
|
2782
|
+
declare function useBoard$1({ initialData, availableUsers, onSave, }: UseBoardOptions): UseBoardReturn$1;
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* useAI Hook
|
|
2786
|
+
* Optional AI features using Vercel AI SDK
|
|
2787
|
+
* Requires 'ai' package to be installed
|
|
2788
|
+
* @module hooks/useAI
|
|
2789
|
+
*/
|
|
2790
|
+
|
|
2791
|
+
interface UseAIOptions {
|
|
2792
|
+
/** API key for AI provider */
|
|
2793
|
+
apiKey?: string;
|
|
2794
|
+
/** Model to use */
|
|
2795
|
+
model?: 'gpt-4' | 'gpt-4-turbo' | 'claude-3-5-sonnet' | string;
|
|
2796
|
+
/** Custom API endpoint */
|
|
2797
|
+
endpoint?: string;
|
|
2798
|
+
/** Base URL */
|
|
2799
|
+
baseURL?: string;
|
|
2800
|
+
}
|
|
2801
|
+
interface UseAIReturn extends AICallbacks {
|
|
2802
|
+
/** Is AI available (SDK installed + API key provided) */
|
|
2803
|
+
isAvailable: boolean;
|
|
2804
|
+
/** Is AI currently processing */
|
|
2805
|
+
isLoading: boolean;
|
|
2806
|
+
/** Last error */
|
|
2807
|
+
error: Error | null;
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* Hook for AI features
|
|
2811
|
+
*
|
|
2812
|
+
* @example
|
|
2813
|
+
* ```tsx
|
|
2814
|
+
* const ai = useAI({
|
|
2815
|
+
* apiKey: process.env.OPENAI_API_KEY,
|
|
2816
|
+
* model: 'gpt-4-turbo'
|
|
2817
|
+
* })
|
|
2818
|
+
*
|
|
2819
|
+
* if (ai.isAvailable) {
|
|
2820
|
+
* const plan = await ai.onGeneratePlan('Build a todo app')
|
|
2821
|
+
* }
|
|
2822
|
+
* ```
|
|
2823
|
+
*/
|
|
2824
|
+
declare function useAI(options?: UseAIOptions): UseAIReturn;
|
|
2825
|
+
|
|
2826
|
+
/**
|
|
2827
|
+
* Multi-select hook for bulk operations
|
|
2828
|
+
* Supports keyboard modifiers (Cmd/Ctrl, Shift) for selection
|
|
2829
|
+
* @module hooks/useMultiSelect
|
|
2830
|
+
*/
|
|
2831
|
+
|
|
2832
|
+
interface UseMultiSelectReturn {
|
|
2833
|
+
/** Selected card IDs */
|
|
2834
|
+
selectedCardIds: string[];
|
|
2835
|
+
/** Last selected card ID */
|
|
2836
|
+
lastSelectedCardId: string | null;
|
|
2837
|
+
/** Check if a card is selected */
|
|
2838
|
+
isCardSelected: (cardId: string) => boolean;
|
|
2839
|
+
/** Select a card */
|
|
2840
|
+
selectCard: (cardId: string, event?: React.MouseEvent) => void;
|
|
2841
|
+
/** Deselect a card */
|
|
2842
|
+
deselectCard: (cardId: string) => void;
|
|
2843
|
+
/** Clear all selections */
|
|
2844
|
+
clearSelection: () => void;
|
|
2845
|
+
/** Select all cards */
|
|
2846
|
+
selectAll: () => void;
|
|
2847
|
+
/** Toggle card selection */
|
|
2848
|
+
toggleCard: (cardId: string) => void;
|
|
2849
|
+
/** Get selected cards */
|
|
2850
|
+
getSelectedCards: () => Card$1[];
|
|
2851
|
+
}
|
|
2852
|
+
interface UseMultiSelectOptions {
|
|
2853
|
+
/** Board cards (required for range selection and selectAll) */
|
|
2854
|
+
cards: Card$1[];
|
|
2855
|
+
}
|
|
2856
|
+
/**
|
|
2857
|
+
* Hook for multi-select functionality
|
|
2858
|
+
*
|
|
2859
|
+
* @param options - Configuration options
|
|
2860
|
+
*/
|
|
2861
|
+
declare function useMultiSelect(options: UseMultiSelectOptions): UseMultiSelectReturn;
|
|
2862
|
+
|
|
2863
|
+
/**
|
|
2864
|
+
* useKeyboardShortcuts Hook
|
|
2865
|
+
* Global keyboard shortcuts system for board navigation and actions
|
|
2866
|
+
* @module hooks/keyboard
|
|
2867
|
+
*/
|
|
2868
|
+
|
|
2869
|
+
interface UseKeyboardShortcutsOptions {
|
|
2870
|
+
/** Shortcuts configuration */
|
|
2871
|
+
shortcuts?: KeyboardShortcut[];
|
|
2872
|
+
/** Enable/disable shortcuts */
|
|
2873
|
+
enabled?: boolean;
|
|
2874
|
+
/** Prevent default browser behavior */
|
|
2875
|
+
preventDefault?: boolean;
|
|
2876
|
+
}
|
|
2877
|
+
interface UseKeyboardShortcutsReturn {
|
|
2878
|
+
/** Register a keyboard shortcut dynamically */
|
|
2879
|
+
registerShortcut: (shortcut: KeyboardShortcut) => void;
|
|
2880
|
+
/** Unregister a keyboard shortcut */
|
|
2881
|
+
unregisterShortcut: (action: KeyboardAction) => void;
|
|
2882
|
+
/** Check if shortcuts are enabled */
|
|
2883
|
+
isEnabled: boolean;
|
|
2884
|
+
}
|
|
2885
|
+
/**
|
|
2886
|
+
* Default keyboard shortcuts for Kanban board
|
|
2887
|
+
*/
|
|
2888
|
+
declare const DEFAULT_SHORTCUTS: KeyboardShortcut[];
|
|
2889
|
+
/**
|
|
2890
|
+
* useKeyboardShortcuts Hook
|
|
2891
|
+
*
|
|
2892
|
+
* @example
|
|
2893
|
+
* ```tsx
|
|
2894
|
+
* const { registerShortcut } = useKeyboardShortcuts({
|
|
2895
|
+
* shortcuts: DEFAULT_SHORTCUTS,
|
|
2896
|
+
* enabled: true,
|
|
2897
|
+
* preventDefault: true,
|
|
2898
|
+
* })
|
|
2899
|
+
*
|
|
2900
|
+
* // Listen for keyboard actions
|
|
2901
|
+
* useEffect(() => {
|
|
2902
|
+
* const handleKeyboardAction = (event: CustomEvent<KeyboardAction>) => {
|
|
2903
|
+
* console.log('Action triggered:', event.detail)
|
|
2904
|
+
* }
|
|
2905
|
+
*
|
|
2906
|
+
* window.addEventListener('keyboard-action', handleKeyboardAction)
|
|
2907
|
+
* return () => window.removeEventListener('keyboard-action', handleKeyboardAction)
|
|
2908
|
+
* }, [])
|
|
2909
|
+
* ```
|
|
2910
|
+
*/
|
|
2911
|
+
declare function useKeyboardShortcuts(options?: UseKeyboardShortcutsOptions): UseKeyboardShortcutsReturn;
|
|
2912
|
+
|
|
2913
|
+
/**
|
|
2914
|
+
* useCardStacking Hook
|
|
2915
|
+
* Manages card stack state and AI-powered grouping suggestions
|
|
2916
|
+
* @module hooks/useCardStacking
|
|
2917
|
+
*/
|
|
2918
|
+
|
|
2919
|
+
interface UseCardStackingOptions {
|
|
2920
|
+
/** Board cards */
|
|
2921
|
+
cards: Card$1[];
|
|
2922
|
+
/** Configuration */
|
|
2923
|
+
config?: Partial<StackingConfig>;
|
|
2924
|
+
/** AI service for similarity detection (optional) */
|
|
2925
|
+
aiService?: {
|
|
2926
|
+
findSimilar: (card: Card$1, candidates: Card$1[]) => Promise<{
|
|
2927
|
+
card: Card$1;
|
|
2928
|
+
similarity: number;
|
|
2929
|
+
}[]>;
|
|
2930
|
+
};
|
|
2931
|
+
}
|
|
2932
|
+
interface UseCardStackingResult {
|
|
2933
|
+
/** All card stacks */
|
|
2934
|
+
stacks: CardStack$1[];
|
|
2935
|
+
/** Create a new stack */
|
|
2936
|
+
createStack: (title: string, cardIds: string[], columnId: string, strategy: StackingStrategy, color?: string) => void;
|
|
2937
|
+
/** Delete a stack */
|
|
2938
|
+
deleteStack: (stackId: string) => void;
|
|
2939
|
+
/** Toggle stack expand/collapse */
|
|
2940
|
+
toggleStack: (stackId: string) => void;
|
|
2941
|
+
/** Add card to stack */
|
|
2942
|
+
addToStack: (stackId: string, cardId: string) => void;
|
|
2943
|
+
/** Remove card from stack */
|
|
2944
|
+
removeFromStack: (stackId: string, cardId: string) => void;
|
|
2945
|
+
/** Get stacks for a specific column */
|
|
2946
|
+
getStacksForColumn: (columnId: string) => CardStack$1[];
|
|
2947
|
+
/** Get AI-powered stack suggestions */
|
|
2948
|
+
getSuggestions: (columnId: string) => Promise<StackSuggestion[]>;
|
|
2949
|
+
/** Apply a suggestion */
|
|
2950
|
+
applySuggestion: (suggestion: StackSuggestion) => void;
|
|
2951
|
+
/** Configuration */
|
|
2952
|
+
config: StackingConfig;
|
|
2953
|
+
}
|
|
2954
|
+
/**
|
|
2955
|
+
* Hook for managing card stacking
|
|
2956
|
+
*/
|
|
2957
|
+
declare function useCardStacking(options: UseCardStackingOptions): UseCardStackingResult;
|
|
2958
|
+
|
|
2959
|
+
/**
|
|
2960
|
+
* Board Provider Props
|
|
2961
|
+
*/
|
|
2962
|
+
interface BoardProviderProps {
|
|
2963
|
+
children: React__default.ReactNode;
|
|
2964
|
+
initialData?: {
|
|
2965
|
+
board?: BoardData;
|
|
2966
|
+
columns?: ColumnData[];
|
|
2967
|
+
cards?: CardData[];
|
|
2968
|
+
};
|
|
2969
|
+
onStateChange?: (state: BoardState) => void;
|
|
2970
|
+
}
|
|
2971
|
+
/**
|
|
2972
|
+
* BoardProvider component
|
|
2973
|
+
*
|
|
2974
|
+
* Wraps your app with BoardStore context
|
|
2975
|
+
*
|
|
2976
|
+
* @example
|
|
2977
|
+
* ```tsx
|
|
2978
|
+
* <BoardProvider initialData={{ columns: [], cards: [] }}>
|
|
2979
|
+
* <Board />
|
|
2980
|
+
* </BoardProvider>
|
|
2981
|
+
* ```
|
|
2982
|
+
*/
|
|
2983
|
+
declare function BoardProvider({ children, initialData, onStateChange }: BoardProviderProps): react_jsx_runtime.JSX.Element;
|
|
2984
|
+
/**
|
|
2985
|
+
* Hook to access BoardStore from context
|
|
2986
|
+
*
|
|
2987
|
+
* @throws Error if used outside BoardProvider
|
|
2988
|
+
*/
|
|
2989
|
+
declare function useBoardStore(): BoardStore;
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* Return type for useBoard hook
|
|
2993
|
+
*/
|
|
2994
|
+
interface UseBoardReturn {
|
|
2995
|
+
board: Board$1 | null;
|
|
2996
|
+
columns: Column$2[];
|
|
2997
|
+
cards: Card$2[];
|
|
2998
|
+
updateBoard: (changes: Partial<Omit<_libxai_core.BoardData, 'id' | 'createdAt'>>) => void;
|
|
2999
|
+
addColumn: (columnData: Omit<ColumnData, 'createdAt' | 'updatedAt'>) => void;
|
|
3000
|
+
updateColumn: (columnId: string, changes: Partial<Omit<ColumnData, 'id' | 'createdAt'>>) => void;
|
|
3001
|
+
deleteColumn: (columnId: string) => void;
|
|
3002
|
+
getColumn: (columnId: string) => Column$2 | undefined;
|
|
3003
|
+
addCard: (cardData: Omit<CardData, 'createdAt' | 'updatedAt'>) => void;
|
|
3004
|
+
updateCard: (cardId: string, changes: Partial<Omit<CardData, 'id' | 'createdAt'>>) => void;
|
|
3005
|
+
deleteCard: (cardId: string) => void;
|
|
3006
|
+
moveCard: (cardId: string, toColumnId: string, newPosition: number) => void;
|
|
3007
|
+
getCard: (cardId: string) => Card$2 | undefined;
|
|
3008
|
+
getCardsByColumn: (columnId: string) => Card$2[];
|
|
3009
|
+
}
|
|
3010
|
+
/**
|
|
3011
|
+
* Main hook for board operations
|
|
3012
|
+
*
|
|
3013
|
+
* Provides reactive state and methods for managing board, columns, and cards
|
|
3014
|
+
*
|
|
3015
|
+
* @example
|
|
3016
|
+
* ```tsx
|
|
3017
|
+
* function MyBoard() {
|
|
3018
|
+
* const { board, columns, cards, addCard, moveCard } = useBoard()
|
|
3019
|
+
*
|
|
3020
|
+
* return (
|
|
3021
|
+
* <div>
|
|
3022
|
+
* {columns.map(column => (
|
|
3023
|
+
* <div key={column.id}>
|
|
3024
|
+
* <h2>{column.title}</h2>
|
|
3025
|
+
* {cards
|
|
3026
|
+
* .filter(card => card.columnId === column.id)
|
|
3027
|
+
* .map(card => (
|
|
3028
|
+
* <div key={card.id}>{card.title}</div>
|
|
3029
|
+
* ))}
|
|
3030
|
+
* </div>
|
|
3031
|
+
* ))}
|
|
3032
|
+
* </div>
|
|
3033
|
+
* )
|
|
3034
|
+
* }
|
|
3035
|
+
* ```
|
|
3036
|
+
*/
|
|
3037
|
+
declare function useBoard(): UseBoardReturn;
|
|
3038
|
+
|
|
3039
|
+
/**
|
|
3040
|
+
* useFilteredCards - Hook for filtering cards with memoization
|
|
3041
|
+
* @module adapters/react
|
|
3042
|
+
*/
|
|
3043
|
+
|
|
3044
|
+
/**
|
|
3045
|
+
* Filter options for cards
|
|
3046
|
+
*/
|
|
3047
|
+
interface CardFilters {
|
|
3048
|
+
searchQuery?: string;
|
|
3049
|
+
priorities?: Priority$1[];
|
|
3050
|
+
statuses?: CardStatus$1[];
|
|
3051
|
+
assignedUserIds?: string[];
|
|
3052
|
+
labels?: string[];
|
|
3053
|
+
columnIds?: string[];
|
|
3054
|
+
isOverdue?: boolean;
|
|
3055
|
+
}
|
|
3056
|
+
/**
|
|
3057
|
+
* Hook for filtered and sorted cards
|
|
3058
|
+
*
|
|
3059
|
+
* Automatically memoizes results for performance
|
|
3060
|
+
*
|
|
3061
|
+
* @param filters - Filter criteria
|
|
3062
|
+
* @returns Filtered cards array
|
|
3063
|
+
*
|
|
3064
|
+
* @example
|
|
3065
|
+
* ```tsx
|
|
3066
|
+
* function CardList() {
|
|
3067
|
+
* const filteredCards = useFilteredCards({
|
|
3068
|
+
* priorities: ['HIGH', 'URGENT'],
|
|
3069
|
+
* isOverdue: true
|
|
3070
|
+
* })
|
|
3071
|
+
*
|
|
3072
|
+
* return <div>{filteredCards.length} urgent overdue tasks</div>
|
|
3073
|
+
* }
|
|
3074
|
+
* ```
|
|
3075
|
+
*/
|
|
3076
|
+
declare function useFilteredCards(filters?: CardFilters): Card$2[];
|
|
3077
|
+
/**
|
|
3078
|
+
* Hook for sorted cards
|
|
3079
|
+
*
|
|
3080
|
+
* @param sortBy - Sort field
|
|
3081
|
+
* @param sortOrder - Sort order ('asc' | 'desc')
|
|
3082
|
+
* @returns Sorted cards array
|
|
3083
|
+
*/
|
|
3084
|
+
declare function useSortedCards(sortBy?: 'title' | 'priority' | 'createdAt' | 'updatedAt' | 'position', sortOrder?: 'asc' | 'desc'): Card$2[];
|
|
3085
|
+
|
|
3086
|
+
/**
|
|
3087
|
+
* Class name utility (cn)
|
|
3088
|
+
* Combines clsx and tailwind-merge for optimal Tailwind class handling
|
|
3089
|
+
*/
|
|
3090
|
+
|
|
3091
|
+
/**
|
|
3092
|
+
* Merge class names intelligently
|
|
3093
|
+
* Handles Tailwind class conflicts properly
|
|
3094
|
+
*
|
|
3095
|
+
* @example
|
|
3096
|
+
* cn('px-2 py-1', 'px-4') // => 'py-1 px-4'
|
|
3097
|
+
* cn('text-red-500', condition && 'text-blue-500') // => 'text-blue-500' if condition is true
|
|
3098
|
+
*/
|
|
3099
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* Lexicographic positioning utilities
|
|
3103
|
+
* Uses fractional indexing for efficient reordering without touching all items
|
|
3104
|
+
* @module utils/positioning
|
|
3105
|
+
*/
|
|
3106
|
+
/**
|
|
3107
|
+
* Calculate position between two items
|
|
3108
|
+
* Uses lexicographic ordering (fractional indexing)
|
|
3109
|
+
*
|
|
3110
|
+
* @param before - Position of item before (or null if first)
|
|
3111
|
+
* @param after - Position of item after (or null if last)
|
|
3112
|
+
* @returns New position value
|
|
3113
|
+
*
|
|
3114
|
+
* @example
|
|
3115
|
+
* calculatePosition(null, 1000) // => 500 (before first item)
|
|
3116
|
+
* calculatePosition(1000, 2000) // => 1500 (between two items)
|
|
3117
|
+
* calculatePosition(1000, null) // => 2000 (after last item)
|
|
3118
|
+
*/
|
|
3119
|
+
declare function calculatePosition(before: number | null, after: number | null): number;
|
|
3120
|
+
/**
|
|
3121
|
+
* Generate initial positions for an array of items
|
|
3122
|
+
* Spaces them 1000 apart for room to insert
|
|
3123
|
+
*
|
|
3124
|
+
* @param count - Number of items
|
|
3125
|
+
* @returns Array of position values
|
|
3126
|
+
*/
|
|
3127
|
+
declare function generateInitialPositions(count: number): number[];
|
|
3128
|
+
|
|
3129
|
+
/**
|
|
3130
|
+
* Retry utilities with exponential backoff
|
|
3131
|
+
* For resilient API calls and persistence operations
|
|
3132
|
+
* @module utils/retry
|
|
3133
|
+
*/
|
|
3134
|
+
interface RetryOptions {
|
|
3135
|
+
/** Maximum number of retry attempts (default: 3) */
|
|
3136
|
+
maxAttempts?: number;
|
|
3137
|
+
/** Initial delay in ms (default: 1000) */
|
|
3138
|
+
initialDelay?: number;
|
|
3139
|
+
/** Multiplier for exponential backoff (default: 2) */
|
|
3140
|
+
backoffMultiplier?: number;
|
|
3141
|
+
/** Maximum delay in ms (default: 10000) */
|
|
3142
|
+
maxDelay?: number;
|
|
3143
|
+
/** Function to determine if error should be retried */
|
|
3144
|
+
shouldRetry?: (error: Error, attempt: number) => boolean;
|
|
3145
|
+
/** Callback when retry is attempted */
|
|
3146
|
+
onRetry?: (error: Error, attempt: number, delay: number) => void;
|
|
3147
|
+
}
|
|
3148
|
+
interface RetryResult<T> {
|
|
3149
|
+
data?: T;
|
|
3150
|
+
error?: Error;
|
|
3151
|
+
attempts: number;
|
|
3152
|
+
success: boolean;
|
|
3153
|
+
}
|
|
3154
|
+
/**
|
|
3155
|
+
* Retry a function with exponential backoff
|
|
3156
|
+
*
|
|
3157
|
+
* @example
|
|
3158
|
+
* ```ts
|
|
3159
|
+
* const result = await retryWithBackoff(
|
|
3160
|
+
* () => api.updateBoard(board),
|
|
3161
|
+
* {
|
|
3162
|
+
* maxAttempts: 3,
|
|
3163
|
+
* onRetry: (error, attempt) => {
|
|
3164
|
+
* console.log(`Retry attempt ${attempt}: ${error.message}`)
|
|
3165
|
+
* }
|
|
3166
|
+
* }
|
|
3167
|
+
* )
|
|
3168
|
+
* ```
|
|
3169
|
+
*/
|
|
3170
|
+
declare function retryWithBackoff<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<RetryResult<T>>;
|
|
3171
|
+
/**
|
|
3172
|
+
* Retry a function synchronously (for non-async operations)
|
|
3173
|
+
* No backoff, just immediate retries
|
|
3174
|
+
*/
|
|
3175
|
+
declare function retrySyncOperation<T>(fn: () => T, maxAttempts?: number): {
|
|
3176
|
+
data?: T;
|
|
3177
|
+
error?: Error;
|
|
3178
|
+
success: boolean;
|
|
3179
|
+
};
|
|
3180
|
+
/**
|
|
3181
|
+
* Create a retry wrapper function
|
|
3182
|
+
* Returns a function that automatically retries on failure
|
|
3183
|
+
*
|
|
3184
|
+
* @example
|
|
3185
|
+
* ```ts
|
|
3186
|
+
* const saveBoard = createRetryWrapper(
|
|
3187
|
+
* api.saveBoard,
|
|
3188
|
+
* { maxAttempts: 3 }
|
|
3189
|
+
* )
|
|
3190
|
+
*
|
|
3191
|
+
* const result = await saveBoard(boardData)
|
|
3192
|
+
* ```
|
|
3193
|
+
*/
|
|
3194
|
+
declare function createRetryWrapper<TArgs extends any[], TReturn>(fn: (...args: TArgs) => Promise<TReturn>, options?: RetryOptions): (...args: TArgs) => Promise<RetryResult<TReturn>>;
|
|
3195
|
+
/**
|
|
3196
|
+
* Retry with circuit breaker pattern
|
|
3197
|
+
* Stops retrying if too many failures occur
|
|
3198
|
+
*/
|
|
3199
|
+
declare class CircuitBreaker {
|
|
3200
|
+
private threshold;
|
|
3201
|
+
private resetTimeout;
|
|
3202
|
+
private failures;
|
|
3203
|
+
private lastFailureTime;
|
|
3204
|
+
private isOpen;
|
|
3205
|
+
constructor(threshold?: number, resetTimeout?: number);
|
|
3206
|
+
execute<T>(fn: () => Promise<T>): Promise<T>;
|
|
3207
|
+
private onSuccess;
|
|
3208
|
+
private onFailure;
|
|
3209
|
+
private reset;
|
|
3210
|
+
getStatus(): {
|
|
3211
|
+
failures: number;
|
|
3212
|
+
isOpen: boolean;
|
|
3213
|
+
};
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
/**
|
|
3217
|
+
* Supported AI Models
|
|
3218
|
+
*/
|
|
3219
|
+
declare const AI_MODELS: {
|
|
3220
|
+
readonly 'gpt-4-turbo': {
|
|
3221
|
+
readonly provider: "openai";
|
|
3222
|
+
readonly name: "GPT-4 Turbo";
|
|
3223
|
+
readonly contextWindow: 128000;
|
|
3224
|
+
readonly costPer1kInput: 0.01;
|
|
3225
|
+
readonly costPer1kOutput: 0.03;
|
|
3226
|
+
readonly supportsVision: true;
|
|
3227
|
+
readonly supportsJSON: true;
|
|
3228
|
+
};
|
|
3229
|
+
readonly 'gpt-4': {
|
|
3230
|
+
readonly provider: "openai";
|
|
3231
|
+
readonly name: "GPT-4";
|
|
3232
|
+
readonly contextWindow: 8192;
|
|
3233
|
+
readonly costPer1kInput: 0.03;
|
|
3234
|
+
readonly costPer1kOutput: 0.06;
|
|
3235
|
+
readonly supportsVision: false;
|
|
3236
|
+
readonly supportsJSON: true;
|
|
3237
|
+
};
|
|
3238
|
+
readonly 'gpt-3.5-turbo': {
|
|
3239
|
+
readonly provider: "openai";
|
|
3240
|
+
readonly name: "GPT-3.5 Turbo";
|
|
3241
|
+
readonly contextWindow: 16385;
|
|
3242
|
+
readonly costPer1kInput: 0.0005;
|
|
3243
|
+
readonly costPer1kOutput: 0.0015;
|
|
3244
|
+
readonly supportsVision: false;
|
|
3245
|
+
readonly supportsJSON: true;
|
|
3246
|
+
};
|
|
3247
|
+
readonly 'claude-3-5-sonnet-20241022': {
|
|
3248
|
+
readonly provider: "anthropic";
|
|
3249
|
+
readonly name: "Claude 3.5 Sonnet";
|
|
3250
|
+
readonly contextWindow: 200000;
|
|
3251
|
+
readonly costPer1kInput: 0.003;
|
|
3252
|
+
readonly costPer1kOutput: 0.015;
|
|
3253
|
+
readonly supportsVision: true;
|
|
3254
|
+
readonly supportsJSON: true;
|
|
3255
|
+
};
|
|
3256
|
+
readonly 'claude-3-opus-20240229': {
|
|
3257
|
+
readonly provider: "anthropic";
|
|
3258
|
+
readonly name: "Claude 3 Opus";
|
|
3259
|
+
readonly contextWindow: 200000;
|
|
3260
|
+
readonly costPer1kInput: 0.015;
|
|
3261
|
+
readonly costPer1kOutput: 0.075;
|
|
3262
|
+
readonly supportsVision: true;
|
|
3263
|
+
readonly supportsJSON: true;
|
|
3264
|
+
};
|
|
3265
|
+
readonly 'claude-3-haiku-20240307': {
|
|
3266
|
+
readonly provider: "anthropic";
|
|
3267
|
+
readonly name: "Claude 3 Haiku";
|
|
3268
|
+
readonly contextWindow: 200000;
|
|
3269
|
+
readonly costPer1kInput: 0.00025;
|
|
3270
|
+
readonly costPer1kOutput: 0.00125;
|
|
3271
|
+
readonly supportsVision: true;
|
|
3272
|
+
readonly supportsJSON: true;
|
|
3273
|
+
};
|
|
3274
|
+
};
|
|
3275
|
+
type AIModelKey = keyof typeof AI_MODELS;
|
|
3276
|
+
/**
|
|
3277
|
+
* Rate Limits by Plan
|
|
3278
|
+
*/
|
|
3279
|
+
declare const RATE_LIMITS: {
|
|
3280
|
+
readonly hobby: {
|
|
3281
|
+
readonly requestsPerMonth: 50;
|
|
3282
|
+
readonly maxConcurrent: 1;
|
|
3283
|
+
readonly maxTokensPerRequest: 4096;
|
|
3284
|
+
};
|
|
3285
|
+
readonly pro: {
|
|
3286
|
+
readonly requestsPerMonth: 500;
|
|
3287
|
+
readonly maxConcurrent: 3;
|
|
3288
|
+
readonly maxTokensPerRequest: 8192;
|
|
3289
|
+
};
|
|
3290
|
+
readonly enterprise: {
|
|
3291
|
+
readonly requestsPerMonth: 2000;
|
|
3292
|
+
readonly maxConcurrent: 10;
|
|
3293
|
+
readonly maxTokensPerRequest: 16384;
|
|
3294
|
+
};
|
|
3295
|
+
};
|
|
3296
|
+
/**
|
|
3297
|
+
* Feature Flags for AI
|
|
3298
|
+
*/
|
|
3299
|
+
declare const AI_FEATURES: {
|
|
3300
|
+
readonly generatePlan: {
|
|
3301
|
+
readonly enabled: true;
|
|
3302
|
+
readonly minPlanTier: "hobby";
|
|
3303
|
+
readonly estimatedTokens: 2000;
|
|
3304
|
+
};
|
|
3305
|
+
readonly predictRisks: {
|
|
3306
|
+
readonly enabled: true;
|
|
3307
|
+
readonly minPlanTier: "pro";
|
|
3308
|
+
readonly estimatedTokens: 1500;
|
|
3309
|
+
};
|
|
3310
|
+
readonly suggestAssignee: {
|
|
3311
|
+
readonly enabled: true;
|
|
3312
|
+
readonly minPlanTier: "hobby";
|
|
3313
|
+
readonly estimatedTokens: 800;
|
|
3314
|
+
};
|
|
3315
|
+
readonly generateReport: {
|
|
3316
|
+
readonly enabled: true;
|
|
3317
|
+
readonly minPlanTier: "enterprise";
|
|
3318
|
+
readonly estimatedTokens: 3000;
|
|
3319
|
+
};
|
|
3320
|
+
readonly generateSubtasks: {
|
|
3321
|
+
readonly enabled: true;
|
|
3322
|
+
readonly minPlanTier: "hobby";
|
|
3323
|
+
readonly estimatedTokens: 1000;
|
|
3324
|
+
};
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3327
|
+
/**
|
|
3328
|
+
* AI Cost Tracking
|
|
3329
|
+
* Calculate and track AI API usage costs
|
|
3330
|
+
*/
|
|
3331
|
+
|
|
3332
|
+
interface AIOperation {
|
|
3333
|
+
id: string;
|
|
3334
|
+
feature: 'generatePlan' | 'predictRisks' | 'suggestAssignee' | 'generateSubtasks' | 'estimateEffort';
|
|
3335
|
+
model: AIModelKey;
|
|
3336
|
+
inputTokens: number;
|
|
3337
|
+
outputTokens: number;
|
|
3338
|
+
cost: number;
|
|
3339
|
+
duration: number;
|
|
3340
|
+
timestamp: Date;
|
|
3341
|
+
success: boolean;
|
|
3342
|
+
error?: string;
|
|
3343
|
+
}
|
|
3344
|
+
interface UsageStats {
|
|
3345
|
+
totalOperations: number;
|
|
3346
|
+
totalCost: number;
|
|
3347
|
+
totalInputTokens: number;
|
|
3348
|
+
totalOutputTokens: number;
|
|
3349
|
+
operationsByFeature: Record<string, number>;
|
|
3350
|
+
costsByFeature: Record<string, number>;
|
|
3351
|
+
averageDuration: number;
|
|
3352
|
+
successRate: number;
|
|
3353
|
+
}
|
|
3354
|
+
/**
|
|
3355
|
+
* Format cost as USD string
|
|
3356
|
+
*/
|
|
3357
|
+
declare function formatCost(cost: number): string;
|
|
3358
|
+
/**
|
|
3359
|
+
* AI Usage Tracker
|
|
3360
|
+
* In-memory tracking of AI operations
|
|
3361
|
+
* In production, this would persist to a database
|
|
3362
|
+
*/
|
|
3363
|
+
declare class AIUsageTracker {
|
|
3364
|
+
private operations;
|
|
3365
|
+
private listeners;
|
|
3366
|
+
/**
|
|
3367
|
+
* Record a new AI operation
|
|
3368
|
+
*/
|
|
3369
|
+
record(operation: Omit<AIOperation, 'id' | 'timestamp' | 'cost'>): AIOperation;
|
|
3370
|
+
/**
|
|
3371
|
+
* Get usage statistics
|
|
3372
|
+
*/
|
|
3373
|
+
getStats(timeRange?: {
|
|
3374
|
+
start: Date;
|
|
3375
|
+
end: Date;
|
|
3376
|
+
}): UsageStats;
|
|
3377
|
+
/**
|
|
3378
|
+
* Get recent operations
|
|
3379
|
+
*/
|
|
3380
|
+
getRecentOperations(limit?: number): AIOperation[];
|
|
3381
|
+
/**
|
|
3382
|
+
* Check if usage is within limits
|
|
3383
|
+
*/
|
|
3384
|
+
checkLimit(planTier: 'hobby' | 'pro' | 'enterprise', period?: 'month' | 'day'): {
|
|
3385
|
+
used: number;
|
|
3386
|
+
limit: number;
|
|
3387
|
+
remaining: number;
|
|
3388
|
+
percentUsed: number;
|
|
3389
|
+
isExceeded: boolean;
|
|
3390
|
+
};
|
|
3391
|
+
/**
|
|
3392
|
+
* Subscribe to operation events
|
|
3393
|
+
*/
|
|
3394
|
+
subscribe(listener: (operation: AIOperation) => void): () => void;
|
|
3395
|
+
/**
|
|
3396
|
+
* Clear all tracked operations
|
|
3397
|
+
*/
|
|
3398
|
+
clear(): void;
|
|
3399
|
+
/**
|
|
3400
|
+
* Export operations as JSON
|
|
3401
|
+
*/
|
|
3402
|
+
export(): string;
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Global usage tracker instance
|
|
3406
|
+
*/
|
|
3407
|
+
declare const aiUsageTracker: AIUsageTracker;
|
|
3408
|
+
|
|
3409
|
+
/**
|
|
3410
|
+
* useDragState - React hook for drag state management
|
|
3411
|
+
* @module hooks/useDragState
|
|
3412
|
+
*
|
|
3413
|
+
* Replacement for Jotai's useAtom(dragStateAtom)
|
|
3414
|
+
*/
|
|
3415
|
+
|
|
3416
|
+
/**
|
|
3417
|
+
* Hook return type
|
|
3418
|
+
*/
|
|
3419
|
+
type UseDragStateReturn = [
|
|
3420
|
+
state: DragState,
|
|
3421
|
+
setState: (state: DragState) => void
|
|
3422
|
+
];
|
|
3423
|
+
/**
|
|
3424
|
+
* React hook for drag state
|
|
3425
|
+
*
|
|
3426
|
+
* Drop-in replacement for `useAtom(dragStateAtom)`
|
|
3427
|
+
*
|
|
3428
|
+
* @example
|
|
3429
|
+
* ```tsx
|
|
3430
|
+
* function MyComponent() {
|
|
3431
|
+
* const [dragState, setDragState] = useDragState()
|
|
3432
|
+
*
|
|
3433
|
+
* const handleDragStart = () => {
|
|
3434
|
+
* setDragState({
|
|
3435
|
+
* isDragging: true,
|
|
3436
|
+
* draggedCardId: 'card-1',
|
|
3437
|
+
* sourceColumnId: 'col-1',
|
|
3438
|
+
* targetColumnId: 'col-1',
|
|
3439
|
+
* })
|
|
3440
|
+
* }
|
|
3441
|
+
*
|
|
3442
|
+
* return <div>{dragState.isDragging ? 'Dragging...' : 'Idle'}</div>
|
|
3443
|
+
* }
|
|
3444
|
+
* ```
|
|
3445
|
+
*/
|
|
3446
|
+
declare function useDragState(): UseDragStateReturn;
|
|
3447
|
+
|
|
3448
|
+
/**
|
|
3449
|
+
* useSelectionState - React hook for selection state management
|
|
3450
|
+
* @module hooks/useSelectionState
|
|
3451
|
+
*
|
|
3452
|
+
* Replacement for Jotai's useAtom(selectionStateAtom)
|
|
3453
|
+
*/
|
|
3454
|
+
|
|
3455
|
+
/**
|
|
3456
|
+
* Hook return type
|
|
3457
|
+
*/
|
|
3458
|
+
type UseSelectionStateReturn = [
|
|
3459
|
+
state: SelectionState,
|
|
3460
|
+
setState: (state: SelectionState) => void
|
|
3461
|
+
];
|
|
3462
|
+
/**
|
|
3463
|
+
* React hook for selection state
|
|
3464
|
+
*
|
|
3465
|
+
* Drop-in replacement for `useAtom(selectionStateAtom)`
|
|
3466
|
+
*
|
|
3467
|
+
* @example
|
|
3468
|
+
* ```tsx
|
|
3469
|
+
* function MyComponent() {
|
|
3470
|
+
* const [selectionState, setSelectionState] = useSelectionState()
|
|
3471
|
+
*
|
|
3472
|
+
* const handleSelect = (cardId: string) => {
|
|
3473
|
+
* setSelectionState({
|
|
3474
|
+
* selectedCardIds: [cardId],
|
|
3475
|
+
* lastSelectedCardId: cardId,
|
|
3476
|
+
* })
|
|
3477
|
+
* }
|
|
3478
|
+
*
|
|
3479
|
+
* return (
|
|
3480
|
+
* <div>
|
|
3481
|
+
* {selectionState.selectedCardIds.length} cards selected
|
|
3482
|
+
* </div>
|
|
3483
|
+
* )
|
|
3484
|
+
* }
|
|
3485
|
+
* ```
|
|
3486
|
+
*/
|
|
3487
|
+
declare function useSelectionState(): UseSelectionStateReturn;
|
|
3488
|
+
|
|
3489
|
+
/**
|
|
3490
|
+
* Plugin System Types
|
|
3491
|
+
* Extensible plugin architecture for ASAKAA
|
|
3492
|
+
* @module plugins/types
|
|
3493
|
+
*/
|
|
3494
|
+
|
|
3495
|
+
interface PluginContext {
|
|
3496
|
+
/** Current board state */
|
|
3497
|
+
board: Board;
|
|
3498
|
+
/** Board callbacks */
|
|
3499
|
+
callbacks: BoardCallbacks;
|
|
3500
|
+
/** Set board state */
|
|
3501
|
+
setBoard: (board: Board) => void;
|
|
3502
|
+
/** Get plugin config */
|
|
3503
|
+
getConfig: <T = any>(key: string) => T | undefined;
|
|
3504
|
+
/** Set plugin config */
|
|
3505
|
+
setConfig: (key: string, value: any) => void;
|
|
3506
|
+
}
|
|
3507
|
+
interface PluginHooks {
|
|
3508
|
+
/** Called when plugin is registered */
|
|
3509
|
+
onInit?: (context: PluginContext) => void | Promise<void>;
|
|
3510
|
+
/** Called when plugin is unregistered */
|
|
3511
|
+
onDestroy?: () => void | Promise<void>;
|
|
3512
|
+
/** Called before board is loaded */
|
|
3513
|
+
onBeforeBoardLoad?: (board: Board, context: PluginContext) => Board | Promise<Board>;
|
|
3514
|
+
/** Called after board is loaded */
|
|
3515
|
+
onAfterBoardLoad?: (board: Board, context: PluginContext) => void | Promise<void>;
|
|
3516
|
+
/** Called before card is created */
|
|
3517
|
+
onBeforeCardCreate?: (card: Partial<Card$1>, context: PluginContext) => Partial<Card$1> | Promise<Partial<Card$1>>;
|
|
3518
|
+
/** Called after card is created */
|
|
3519
|
+
onAfterCardCreate?: (card: Card$1, context: PluginContext) => void | Promise<void>;
|
|
3520
|
+
/** Called before card is updated */
|
|
3521
|
+
onBeforeCardUpdate?: (cardId: string, updates: Partial<Card$1>, context: PluginContext) => Partial<Card$1> | Promise<Partial<Card$1>>;
|
|
3522
|
+
/** Called after card is updated */
|
|
3523
|
+
onAfterCardUpdate?: (card: Card$1, context: PluginContext) => void | Promise<void>;
|
|
3524
|
+
/** Called before card is moved */
|
|
3525
|
+
onBeforeCardMove?: (cardId: string, fromColumn: string, toColumn: string, position: number, context: PluginContext) => {
|
|
3526
|
+
toColumn: string;
|
|
3527
|
+
position: number;
|
|
3528
|
+
} | Promise<{
|
|
3529
|
+
toColumn: string;
|
|
3530
|
+
position: number;
|
|
3531
|
+
}>;
|
|
3532
|
+
/** Called after card is moved */
|
|
3533
|
+
onAfterCardMove?: (cardId: string, fromColumn: string, toColumn: string, context: PluginContext) => void | Promise<void>;
|
|
3534
|
+
/** Called before card is deleted */
|
|
3535
|
+
onBeforeCardDelete?: (cardId: string, context: PluginContext) => boolean | Promise<boolean>;
|
|
3536
|
+
/** Called after card is deleted */
|
|
3537
|
+
onAfterCardDelete?: (cardId: string, context: PluginContext) => void | Promise<void>;
|
|
3538
|
+
/** Called before column is created */
|
|
3539
|
+
onBeforeColumnCreate?: (column: Partial<Column$1>, context: PluginContext) => Partial<Column$1> | Promise<Partial<Column$1>>;
|
|
3540
|
+
/** Called after column is created */
|
|
3541
|
+
onAfterColumnCreate?: (column: Column$1, context: PluginContext) => void | Promise<void>;
|
|
3542
|
+
/** Called before column is deleted */
|
|
3543
|
+
onBeforeColumnDelete?: (columnId: string, context: PluginContext) => boolean | Promise<boolean>;
|
|
3544
|
+
/** Called after column is deleted */
|
|
3545
|
+
onAfterColumnDelete?: (columnId: string, context: PluginContext) => void | Promise<void>;
|
|
3546
|
+
/** Called on board state change */
|
|
3547
|
+
onBoardChange?: (board: Board, prevBoard: Board, context: PluginContext) => void | Promise<void>;
|
|
3548
|
+
}
|
|
3549
|
+
interface Plugin extends PluginHooks {
|
|
3550
|
+
/** Unique plugin identifier */
|
|
3551
|
+
id: string;
|
|
3552
|
+
/** Plugin name */
|
|
3553
|
+
name: string;
|
|
3554
|
+
/** Plugin version */
|
|
3555
|
+
version: string;
|
|
3556
|
+
/** Plugin description */
|
|
3557
|
+
description?: string;
|
|
3558
|
+
/** Plugin author */
|
|
3559
|
+
author?: string;
|
|
3560
|
+
/** Plugin dependencies (other plugin IDs) */
|
|
3561
|
+
dependencies?: string[];
|
|
3562
|
+
/** Plugin configuration schema */
|
|
3563
|
+
configSchema?: Record<string, any>;
|
|
3564
|
+
/** Default configuration */
|
|
3565
|
+
defaultConfig?: Record<string, any>;
|
|
3566
|
+
}
|
|
3567
|
+
interface IPluginManager {
|
|
3568
|
+
/** Register a plugin */
|
|
3569
|
+
register(plugin: Plugin): void;
|
|
3570
|
+
/** Unregister a plugin */
|
|
3571
|
+
unregister(pluginId: string): void;
|
|
3572
|
+
/** Get registered plugin */
|
|
3573
|
+
getPlugin(pluginId: string): Plugin | undefined;
|
|
3574
|
+
/** Get all registered plugins */
|
|
3575
|
+
getPlugins(): Plugin[];
|
|
3576
|
+
/** Check if plugin is registered */
|
|
3577
|
+
hasPlugin(pluginId: string): boolean;
|
|
3578
|
+
/** Enable/disable plugin */
|
|
3579
|
+
setEnabled(pluginId: string, enabled: boolean): void;
|
|
3580
|
+
/** Check if plugin is enabled */
|
|
3581
|
+
isEnabled(pluginId: string): boolean;
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
/**
|
|
3585
|
+
* Plugin Manager Implementation
|
|
3586
|
+
* Manages plugin lifecycle and execution
|
|
3587
|
+
* @module plugins/PluginManager
|
|
3588
|
+
*/
|
|
3589
|
+
|
|
3590
|
+
declare class PluginManager implements IPluginManager {
|
|
3591
|
+
private plugins;
|
|
3592
|
+
private enabled;
|
|
3593
|
+
private config;
|
|
3594
|
+
private context;
|
|
3595
|
+
private pluginLogger;
|
|
3596
|
+
/**
|
|
3597
|
+
* Set plugin context (board state, callbacks, etc.)
|
|
3598
|
+
*/
|
|
3599
|
+
setContext(context: PluginContext): void;
|
|
3600
|
+
/**
|
|
3601
|
+
* Register a plugin
|
|
3602
|
+
*/
|
|
3603
|
+
register(plugin: Plugin): void;
|
|
3604
|
+
/**
|
|
3605
|
+
* Unregister a plugin
|
|
3606
|
+
*/
|
|
3607
|
+
unregister(pluginId: string): void;
|
|
3608
|
+
/**
|
|
3609
|
+
* Get registered plugin
|
|
3610
|
+
*/
|
|
3611
|
+
getPlugin(pluginId: string): Plugin | undefined;
|
|
3612
|
+
/**
|
|
3613
|
+
* Get all registered plugins
|
|
3614
|
+
*/
|
|
3615
|
+
getPlugins(): Plugin[];
|
|
3616
|
+
/**
|
|
3617
|
+
* Check if plugin is registered
|
|
3618
|
+
*/
|
|
3619
|
+
hasPlugin(pluginId: string): boolean;
|
|
3620
|
+
/**
|
|
3621
|
+
* Enable/disable plugin
|
|
3622
|
+
*/
|
|
3623
|
+
setEnabled(pluginId: string, enabled: boolean): void;
|
|
3624
|
+
/**
|
|
3625
|
+
* Check if plugin is enabled
|
|
3626
|
+
*/
|
|
3627
|
+
isEnabled(pluginId: string): boolean;
|
|
3628
|
+
/**
|
|
3629
|
+
* Get plugin config
|
|
3630
|
+
*/
|
|
3631
|
+
getConfig<T = any>(pluginId: string, key: string): T | undefined;
|
|
3632
|
+
/**
|
|
3633
|
+
* Set plugin config
|
|
3634
|
+
*/
|
|
3635
|
+
setConfig(pluginId: string, key: string, value: any): void;
|
|
3636
|
+
/**
|
|
3637
|
+
* Execute plugin hooks
|
|
3638
|
+
*/
|
|
3639
|
+
executeHook<T = any>(hookName: keyof Plugin, args: any[], defaultValue?: T): Promise<T | undefined>;
|
|
3640
|
+
/**
|
|
3641
|
+
* Execute plugin hooks in parallel
|
|
3642
|
+
*/
|
|
3643
|
+
executeHookParallel(hookName: keyof Plugin, args: any[]): Promise<void>;
|
|
3644
|
+
}
|
|
3645
|
+
/**
|
|
3646
|
+
* Global plugin manager instance
|
|
3647
|
+
*/
|
|
3648
|
+
declare const pluginManager: PluginManager;
|
|
3649
|
+
|
|
3650
|
+
interface VirtualListProps<T> {
|
|
3651
|
+
/** Array of items to render */
|
|
3652
|
+
items: T[];
|
|
3653
|
+
/** Height of the scrollable container in pixels */
|
|
3654
|
+
height: number | string;
|
|
3655
|
+
/** Estimated size of each item in pixels */
|
|
3656
|
+
estimateSize: number;
|
|
3657
|
+
/** Render function for each item */
|
|
3658
|
+
renderItem: (item: T, index: number) => React__default.ReactNode;
|
|
3659
|
+
/** Optional className for the container */
|
|
3660
|
+
className?: string;
|
|
3661
|
+
/** Overscan count (number of items to render outside viewport) */
|
|
3662
|
+
overscan?: number;
|
|
3663
|
+
/** Enable horizontal scrolling instead of vertical */
|
|
3664
|
+
horizontal?: boolean;
|
|
3665
|
+
/** Optional gap between items in pixels */
|
|
3666
|
+
gap?: number;
|
|
3667
|
+
/** Optional key extractor function */
|
|
3668
|
+
getItemKey?: (item: T, index: number) => string | number;
|
|
3669
|
+
}
|
|
3670
|
+
/**
|
|
3671
|
+
* VirtualList component for efficient rendering of large lists
|
|
3672
|
+
*
|
|
3673
|
+
* Uses @tanstack/react-virtual for windowing/virtualization
|
|
3674
|
+
*
|
|
3675
|
+
* @example
|
|
3676
|
+
* ```tsx
|
|
3677
|
+
* <VirtualList
|
|
3678
|
+
* items={cards}
|
|
3679
|
+
* height={600}
|
|
3680
|
+
* estimateSize={100}
|
|
3681
|
+
* renderItem={(card) => <CardComponent card={card} />}
|
|
3682
|
+
* getItemKey={(card) => card.id}
|
|
3683
|
+
* />
|
|
3684
|
+
* ```
|
|
3685
|
+
*/
|
|
3686
|
+
declare function VirtualList<T>({ items, height, estimateSize, renderItem, className, overscan, horizontal, gap, getItemKey, }: VirtualListProps<T>): react_jsx_runtime.JSX.Element;
|
|
3687
|
+
/**
|
|
3688
|
+
* Hook to access virtualizer instance for advanced use cases
|
|
3689
|
+
*/
|
|
3690
|
+
declare function useVirtualList<T>(options: {
|
|
3691
|
+
items: T[];
|
|
3692
|
+
scrollElement: HTMLElement | null;
|
|
3693
|
+
estimateSize: number;
|
|
3694
|
+
overscan?: number;
|
|
3695
|
+
horizontal?: boolean;
|
|
3696
|
+
gap?: number;
|
|
3697
|
+
}): _tanstack_virtual_core.Virtualizer<HTMLElement, Element>;
|
|
3698
|
+
|
|
3699
|
+
interface VirtualGridProps<T> {
|
|
3700
|
+
/** Array of items to render */
|
|
3701
|
+
items: T[];
|
|
3702
|
+
/** Height of the scrollable container in pixels */
|
|
3703
|
+
height: number | string;
|
|
3704
|
+
/** Width of the scrollable container in pixels */
|
|
3705
|
+
width?: number | string;
|
|
3706
|
+
/** Estimated width of each column in pixels */
|
|
3707
|
+
estimateColumnWidth: number;
|
|
3708
|
+
/** Render function for each column */
|
|
3709
|
+
renderColumn: (item: T, index: number) => React__default.ReactNode;
|
|
3710
|
+
/** Optional className for the container */
|
|
3711
|
+
className?: string;
|
|
3712
|
+
/** Overscan count (number of columns to render outside viewport) */
|
|
3713
|
+
overscan?: number;
|
|
3714
|
+
/** Optional gap between columns in pixels */
|
|
3715
|
+
gap?: number;
|
|
3716
|
+
/** Optional key extractor function */
|
|
3717
|
+
getItemKey?: (item: T, index: number) => string | number;
|
|
3718
|
+
/** Enable horizontal scrolling only */
|
|
3719
|
+
horizontal?: boolean;
|
|
3720
|
+
}
|
|
3721
|
+
/**
|
|
3722
|
+
* VirtualGrid component for efficient rendering of large horizontal lists/grids
|
|
3723
|
+
*
|
|
3724
|
+
* Optimized for Kanban boards with many columns
|
|
3725
|
+
*
|
|
3726
|
+
* @example
|
|
3727
|
+
* ```tsx
|
|
3728
|
+
* <VirtualGrid
|
|
3729
|
+
* items={columns}
|
|
3730
|
+
* height="100%"
|
|
3731
|
+
* estimateColumnWidth={320}
|
|
3732
|
+
* renderColumn={(column) => <ColumnComponent column={column} />}
|
|
3733
|
+
* getItemKey={(column) => column.id}
|
|
3734
|
+
* />
|
|
3735
|
+
* ```
|
|
3736
|
+
*/
|
|
3737
|
+
declare function VirtualGrid<T>({ items, height, width, estimateColumnWidth, renderColumn, className, overscan, gap, getItemKey, horizontal, }: VirtualGridProps<T>): react_jsx_runtime.JSX.Element;
|
|
3738
|
+
/**
|
|
3739
|
+
* Hook for advanced 2D virtualization with both rows and columns
|
|
3740
|
+
*/
|
|
3741
|
+
declare function useVirtualGrid<T>(options: {
|
|
3742
|
+
items: T[];
|
|
3743
|
+
scrollElement: HTMLElement | null;
|
|
3744
|
+
estimateColumnWidth: number;
|
|
3745
|
+
estimateRowHeight?: number;
|
|
3746
|
+
overscan?: number;
|
|
3747
|
+
gap?: number;
|
|
3748
|
+
}): {
|
|
3749
|
+
columnVirtualizer: _tanstack_virtual_core.Virtualizer<HTMLElement, Element>;
|
|
3750
|
+
virtualColumns: _tanstack_virtual_core.VirtualItem[];
|
|
3751
|
+
totalWidth: number;
|
|
3752
|
+
};
|
|
3753
|
+
/**
|
|
3754
|
+
* Utility to determine if grid should use virtualization
|
|
3755
|
+
*/
|
|
3756
|
+
declare function shouldVirtualizeGrid(columnCount: number, threshold?: number): boolean;
|
|
3757
|
+
|
|
3758
|
+
/**
|
|
3759
|
+
* Design Tokens - Centralized design system tokens
|
|
3760
|
+
* @module tokens/design-tokens
|
|
3761
|
+
*/
|
|
3762
|
+
/**
|
|
3763
|
+
* Spacing tokens (in pixels)
|
|
3764
|
+
*/
|
|
3765
|
+
declare const spacing: {
|
|
3766
|
+
readonly none: 0;
|
|
3767
|
+
readonly xs: 4;
|
|
3768
|
+
readonly sm: 8;
|
|
3769
|
+
readonly md: 12;
|
|
3770
|
+
readonly lg: 16;
|
|
3771
|
+
readonly xl: 20;
|
|
3772
|
+
readonly '2xl': 24;
|
|
3773
|
+
readonly '3xl': 32;
|
|
3774
|
+
readonly '4xl': 40;
|
|
3775
|
+
readonly '5xl': 48;
|
|
3776
|
+
readonly '6xl': 64;
|
|
3777
|
+
};
|
|
3778
|
+
/**
|
|
3779
|
+
* Border radius tokens (in pixels)
|
|
3780
|
+
*/
|
|
3781
|
+
declare const borderRadius: {
|
|
3782
|
+
readonly none: 0;
|
|
3783
|
+
readonly sm: 4;
|
|
3784
|
+
readonly md: 8;
|
|
3785
|
+
readonly lg: 12;
|
|
3786
|
+
readonly xl: 16;
|
|
3787
|
+
readonly '2xl': 20;
|
|
3788
|
+
readonly full: 9999;
|
|
3789
|
+
};
|
|
3790
|
+
/**
|
|
3791
|
+
* Font size tokens (in pixels)
|
|
3792
|
+
*/
|
|
3793
|
+
declare const fontSize: {
|
|
3794
|
+
readonly xs: 12;
|
|
3795
|
+
readonly sm: 14;
|
|
3796
|
+
readonly base: 16;
|
|
3797
|
+
readonly lg: 18;
|
|
3798
|
+
readonly xl: 20;
|
|
3799
|
+
readonly '2xl': 24;
|
|
3800
|
+
readonly '3xl': 30;
|
|
3801
|
+
readonly '4xl': 36;
|
|
3802
|
+
readonly '5xl': 48;
|
|
3803
|
+
};
|
|
3804
|
+
/**
|
|
3805
|
+
* Font weight tokens
|
|
3806
|
+
*/
|
|
3807
|
+
declare const fontWeight: {
|
|
3808
|
+
readonly light: 300;
|
|
3809
|
+
readonly normal: 400;
|
|
3810
|
+
readonly medium: 500;
|
|
3811
|
+
readonly semibold: 600;
|
|
3812
|
+
readonly bold: 700;
|
|
3813
|
+
readonly extrabold: 800;
|
|
3814
|
+
};
|
|
3815
|
+
/**
|
|
3816
|
+
* Line height tokens
|
|
3817
|
+
*/
|
|
3818
|
+
declare const lineHeight: {
|
|
3819
|
+
readonly none: 1;
|
|
3820
|
+
readonly tight: 1.25;
|
|
3821
|
+
readonly snug: 1.375;
|
|
3822
|
+
readonly normal: 1.5;
|
|
3823
|
+
readonly relaxed: 1.625;
|
|
3824
|
+
readonly loose: 2;
|
|
3825
|
+
};
|
|
3826
|
+
/**
|
|
3827
|
+
* Z-index layers
|
|
3828
|
+
*/
|
|
3829
|
+
declare const zIndex: {
|
|
3830
|
+
readonly base: 0;
|
|
3831
|
+
readonly dropdown: 1000;
|
|
3832
|
+
readonly sticky: 1020;
|
|
3833
|
+
readonly fixed: 1030;
|
|
3834
|
+
readonly modalBackdrop: 1040;
|
|
3835
|
+
readonly modal: 1050;
|
|
3836
|
+
readonly popover: 1060;
|
|
3837
|
+
readonly tooltip: 1070;
|
|
3838
|
+
};
|
|
3839
|
+
/**
|
|
3840
|
+
* Transition durations (in milliseconds)
|
|
3841
|
+
*/
|
|
3842
|
+
declare const duration: {
|
|
3843
|
+
readonly instant: 0;
|
|
3844
|
+
readonly fastest: 75;
|
|
3845
|
+
readonly faster: 100;
|
|
3846
|
+
readonly fast: 150;
|
|
3847
|
+
readonly normal: 200;
|
|
3848
|
+
readonly slow: 300;
|
|
3849
|
+
readonly slower: 400;
|
|
3850
|
+
readonly slowest: 500;
|
|
3851
|
+
};
|
|
3852
|
+
/**
|
|
3853
|
+
* Transition timing functions
|
|
3854
|
+
*/
|
|
3855
|
+
declare const easing: {
|
|
3856
|
+
readonly linear: "linear";
|
|
3857
|
+
readonly ease: "ease";
|
|
3858
|
+
readonly easeIn: "ease-in";
|
|
3859
|
+
readonly easeOut: "ease-out";
|
|
3860
|
+
readonly easeInOut: "ease-in-out";
|
|
3861
|
+
readonly smooth: "cubic-bezier(0.4, 0.0, 0.2, 1)";
|
|
3862
|
+
readonly sharp: "cubic-bezier(0.4, 0.0, 0.6, 1)";
|
|
3863
|
+
readonly bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)";
|
|
3864
|
+
};
|
|
3865
|
+
/**
|
|
3866
|
+
* Shadow tokens
|
|
3867
|
+
*/
|
|
3868
|
+
declare const shadows: {
|
|
3869
|
+
readonly none: "none";
|
|
3870
|
+
readonly sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
|
|
3871
|
+
readonly base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)";
|
|
3872
|
+
readonly md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)";
|
|
3873
|
+
readonly lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)";
|
|
3874
|
+
readonly xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)";
|
|
3875
|
+
readonly '2xl': "0 25px 50px -12px rgba(0, 0, 0, 0.25)";
|
|
3876
|
+
readonly inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)";
|
|
3877
|
+
};
|
|
3878
|
+
/**
|
|
3879
|
+
* Opacity tokens
|
|
3880
|
+
*/
|
|
3881
|
+
declare const opacity: {
|
|
3882
|
+
readonly 0: 0;
|
|
3883
|
+
readonly 5: 0.05;
|
|
3884
|
+
readonly 10: 0.1;
|
|
3885
|
+
readonly 20: 0.2;
|
|
3886
|
+
readonly 30: 0.3;
|
|
3887
|
+
readonly 40: 0.4;
|
|
3888
|
+
readonly 50: 0.5;
|
|
3889
|
+
readonly 60: 0.6;
|
|
3890
|
+
readonly 70: 0.7;
|
|
3891
|
+
readonly 80: 0.8;
|
|
3892
|
+
readonly 90: 0.9;
|
|
3893
|
+
readonly 100: 1;
|
|
3894
|
+
};
|
|
3895
|
+
/**
|
|
3896
|
+
* Kanban-specific tokens
|
|
3897
|
+
*/
|
|
3898
|
+
declare const kanban: {
|
|
3899
|
+
readonly column: {
|
|
3900
|
+
readonly width: 320;
|
|
3901
|
+
readonly minWidth: 280;
|
|
3902
|
+
readonly maxWidth: 400;
|
|
3903
|
+
readonly gap: 16;
|
|
3904
|
+
readonly padding: 12;
|
|
3905
|
+
readonly headerHeight: 48;
|
|
3906
|
+
};
|
|
3907
|
+
readonly card: {
|
|
3908
|
+
readonly minHeight: 80;
|
|
3909
|
+
readonly maxHeight: 400;
|
|
3910
|
+
readonly padding: 12;
|
|
3911
|
+
readonly gap: 8;
|
|
3912
|
+
};
|
|
3913
|
+
readonly board: {
|
|
3914
|
+
readonly padding: 16;
|
|
3915
|
+
readonly gap: 16;
|
|
3916
|
+
};
|
|
3917
|
+
};
|
|
3918
|
+
/**
|
|
3919
|
+
* Gantt-specific tokens
|
|
3920
|
+
*/
|
|
3921
|
+
declare const gantt: {
|
|
3922
|
+
readonly timeline: {
|
|
3923
|
+
readonly headerHeight: 60;
|
|
3924
|
+
readonly rowHeight: 44;
|
|
3925
|
+
readonly minRowHeight: 32;
|
|
3926
|
+
readonly maxRowHeight: 80;
|
|
3927
|
+
readonly taskPadding: 4;
|
|
3928
|
+
readonly gridLineWidth: 1;
|
|
3929
|
+
};
|
|
3930
|
+
readonly task: {
|
|
3931
|
+
readonly height: 28;
|
|
3932
|
+
readonly minHeight: 20;
|
|
3933
|
+
readonly maxHeight: 40;
|
|
3934
|
+
readonly borderRadius: 4;
|
|
3935
|
+
readonly padding: 6;
|
|
3936
|
+
};
|
|
3937
|
+
readonly dependency: {
|
|
3938
|
+
readonly lineWidth: 2;
|
|
3939
|
+
readonly arrowSize: 8;
|
|
3940
|
+
};
|
|
3941
|
+
readonly scale: {
|
|
3942
|
+
readonly day: {
|
|
3943
|
+
readonly columnWidth: 40;
|
|
3944
|
+
readonly minColumnWidth: 30;
|
|
3945
|
+
readonly maxColumnWidth: 60;
|
|
3946
|
+
};
|
|
3947
|
+
readonly week: {
|
|
3948
|
+
readonly columnWidth: 80;
|
|
3949
|
+
readonly minColumnWidth: 60;
|
|
3950
|
+
readonly maxColumnWidth: 120;
|
|
3951
|
+
};
|
|
3952
|
+
readonly month: {
|
|
3953
|
+
readonly columnWidth: 120;
|
|
3954
|
+
readonly minColumnWidth: 80;
|
|
3955
|
+
readonly maxColumnWidth: 200;
|
|
3956
|
+
};
|
|
3957
|
+
readonly quarter: {
|
|
3958
|
+
readonly columnWidth: 200;
|
|
3959
|
+
readonly minColumnWidth: 150;
|
|
3960
|
+
readonly maxColumnWidth: 300;
|
|
3961
|
+
};
|
|
3962
|
+
};
|
|
3963
|
+
readonly milestone: {
|
|
3964
|
+
readonly size: 16;
|
|
3965
|
+
readonly rotation: 45;
|
|
3966
|
+
};
|
|
3967
|
+
};
|
|
3968
|
+
/**
|
|
3969
|
+
* Combined design tokens
|
|
3970
|
+
*/
|
|
3971
|
+
declare const designTokens: {
|
|
3972
|
+
readonly spacing: {
|
|
3973
|
+
readonly none: 0;
|
|
3974
|
+
readonly xs: 4;
|
|
3975
|
+
readonly sm: 8;
|
|
3976
|
+
readonly md: 12;
|
|
3977
|
+
readonly lg: 16;
|
|
3978
|
+
readonly xl: 20;
|
|
3979
|
+
readonly '2xl': 24;
|
|
3980
|
+
readonly '3xl': 32;
|
|
3981
|
+
readonly '4xl': 40;
|
|
3982
|
+
readonly '5xl': 48;
|
|
3983
|
+
readonly '6xl': 64;
|
|
3984
|
+
};
|
|
3985
|
+
readonly borderRadius: {
|
|
3986
|
+
readonly none: 0;
|
|
3987
|
+
readonly sm: 4;
|
|
3988
|
+
readonly md: 8;
|
|
3989
|
+
readonly lg: 12;
|
|
3990
|
+
readonly xl: 16;
|
|
3991
|
+
readonly '2xl': 20;
|
|
3992
|
+
readonly full: 9999;
|
|
3993
|
+
};
|
|
3994
|
+
readonly fontSize: {
|
|
3995
|
+
readonly xs: 12;
|
|
3996
|
+
readonly sm: 14;
|
|
3997
|
+
readonly base: 16;
|
|
3998
|
+
readonly lg: 18;
|
|
3999
|
+
readonly xl: 20;
|
|
4000
|
+
readonly '2xl': 24;
|
|
4001
|
+
readonly '3xl': 30;
|
|
4002
|
+
readonly '4xl': 36;
|
|
4003
|
+
readonly '5xl': 48;
|
|
4004
|
+
};
|
|
4005
|
+
readonly fontWeight: {
|
|
4006
|
+
readonly light: 300;
|
|
4007
|
+
readonly normal: 400;
|
|
4008
|
+
readonly medium: 500;
|
|
4009
|
+
readonly semibold: 600;
|
|
4010
|
+
readonly bold: 700;
|
|
4011
|
+
readonly extrabold: 800;
|
|
4012
|
+
};
|
|
4013
|
+
readonly lineHeight: {
|
|
4014
|
+
readonly none: 1;
|
|
4015
|
+
readonly tight: 1.25;
|
|
4016
|
+
readonly snug: 1.375;
|
|
4017
|
+
readonly normal: 1.5;
|
|
4018
|
+
readonly relaxed: 1.625;
|
|
4019
|
+
readonly loose: 2;
|
|
4020
|
+
};
|
|
4021
|
+
readonly zIndex: {
|
|
4022
|
+
readonly base: 0;
|
|
4023
|
+
readonly dropdown: 1000;
|
|
4024
|
+
readonly sticky: 1020;
|
|
4025
|
+
readonly fixed: 1030;
|
|
4026
|
+
readonly modalBackdrop: 1040;
|
|
4027
|
+
readonly modal: 1050;
|
|
4028
|
+
readonly popover: 1060;
|
|
4029
|
+
readonly tooltip: 1070;
|
|
4030
|
+
};
|
|
4031
|
+
readonly duration: {
|
|
4032
|
+
readonly instant: 0;
|
|
4033
|
+
readonly fastest: 75;
|
|
4034
|
+
readonly faster: 100;
|
|
4035
|
+
readonly fast: 150;
|
|
4036
|
+
readonly normal: 200;
|
|
4037
|
+
readonly slow: 300;
|
|
4038
|
+
readonly slower: 400;
|
|
4039
|
+
readonly slowest: 500;
|
|
4040
|
+
};
|
|
4041
|
+
readonly easing: {
|
|
4042
|
+
readonly linear: "linear";
|
|
4043
|
+
readonly ease: "ease";
|
|
4044
|
+
readonly easeIn: "ease-in";
|
|
4045
|
+
readonly easeOut: "ease-out";
|
|
4046
|
+
readonly easeInOut: "ease-in-out";
|
|
4047
|
+
readonly smooth: "cubic-bezier(0.4, 0.0, 0.2, 1)";
|
|
4048
|
+
readonly sharp: "cubic-bezier(0.4, 0.0, 0.6, 1)";
|
|
4049
|
+
readonly bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)";
|
|
4050
|
+
};
|
|
4051
|
+
readonly shadows: {
|
|
4052
|
+
readonly none: "none";
|
|
4053
|
+
readonly sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
|
|
4054
|
+
readonly base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)";
|
|
4055
|
+
readonly md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)";
|
|
4056
|
+
readonly lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)";
|
|
4057
|
+
readonly xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)";
|
|
4058
|
+
readonly '2xl': "0 25px 50px -12px rgba(0, 0, 0, 0.25)";
|
|
4059
|
+
readonly inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)";
|
|
4060
|
+
};
|
|
4061
|
+
readonly opacity: {
|
|
4062
|
+
readonly 0: 0;
|
|
4063
|
+
readonly 5: 0.05;
|
|
4064
|
+
readonly 10: 0.1;
|
|
4065
|
+
readonly 20: 0.2;
|
|
4066
|
+
readonly 30: 0.3;
|
|
4067
|
+
readonly 40: 0.4;
|
|
4068
|
+
readonly 50: 0.5;
|
|
4069
|
+
readonly 60: 0.6;
|
|
4070
|
+
readonly 70: 0.7;
|
|
4071
|
+
readonly 80: 0.8;
|
|
4072
|
+
readonly 90: 0.9;
|
|
4073
|
+
readonly 100: 1;
|
|
4074
|
+
};
|
|
4075
|
+
readonly kanban: {
|
|
4076
|
+
readonly column: {
|
|
4077
|
+
readonly width: 320;
|
|
4078
|
+
readonly minWidth: 280;
|
|
4079
|
+
readonly maxWidth: 400;
|
|
4080
|
+
readonly gap: 16;
|
|
4081
|
+
readonly padding: 12;
|
|
4082
|
+
readonly headerHeight: 48;
|
|
4083
|
+
};
|
|
4084
|
+
readonly card: {
|
|
4085
|
+
readonly minHeight: 80;
|
|
4086
|
+
readonly maxHeight: 400;
|
|
4087
|
+
readonly padding: 12;
|
|
4088
|
+
readonly gap: 8;
|
|
4089
|
+
};
|
|
4090
|
+
readonly board: {
|
|
4091
|
+
readonly padding: 16;
|
|
4092
|
+
readonly gap: 16;
|
|
4093
|
+
};
|
|
4094
|
+
};
|
|
4095
|
+
readonly gantt: {
|
|
4096
|
+
readonly timeline: {
|
|
4097
|
+
readonly headerHeight: 60;
|
|
4098
|
+
readonly rowHeight: 44;
|
|
4099
|
+
readonly minRowHeight: 32;
|
|
4100
|
+
readonly maxRowHeight: 80;
|
|
4101
|
+
readonly taskPadding: 4;
|
|
4102
|
+
readonly gridLineWidth: 1;
|
|
4103
|
+
};
|
|
4104
|
+
readonly task: {
|
|
4105
|
+
readonly height: 28;
|
|
4106
|
+
readonly minHeight: 20;
|
|
4107
|
+
readonly maxHeight: 40;
|
|
4108
|
+
readonly borderRadius: 4;
|
|
4109
|
+
readonly padding: 6;
|
|
4110
|
+
};
|
|
4111
|
+
readonly dependency: {
|
|
4112
|
+
readonly lineWidth: 2;
|
|
4113
|
+
readonly arrowSize: 8;
|
|
4114
|
+
};
|
|
4115
|
+
readonly scale: {
|
|
4116
|
+
readonly day: {
|
|
4117
|
+
readonly columnWidth: 40;
|
|
4118
|
+
readonly minColumnWidth: 30;
|
|
4119
|
+
readonly maxColumnWidth: 60;
|
|
4120
|
+
};
|
|
4121
|
+
readonly week: {
|
|
4122
|
+
readonly columnWidth: 80;
|
|
4123
|
+
readonly minColumnWidth: 60;
|
|
4124
|
+
readonly maxColumnWidth: 120;
|
|
4125
|
+
};
|
|
4126
|
+
readonly month: {
|
|
4127
|
+
readonly columnWidth: 120;
|
|
4128
|
+
readonly minColumnWidth: 80;
|
|
4129
|
+
readonly maxColumnWidth: 200;
|
|
4130
|
+
};
|
|
4131
|
+
readonly quarter: {
|
|
4132
|
+
readonly columnWidth: 200;
|
|
4133
|
+
readonly minColumnWidth: 150;
|
|
4134
|
+
readonly maxColumnWidth: 300;
|
|
4135
|
+
};
|
|
4136
|
+
};
|
|
4137
|
+
readonly milestone: {
|
|
4138
|
+
readonly size: 16;
|
|
4139
|
+
readonly rotation: 45;
|
|
4140
|
+
};
|
|
4141
|
+
};
|
|
4142
|
+
};
|
|
4143
|
+
/**
|
|
4144
|
+
* Type helpers
|
|
4145
|
+
*/
|
|
4146
|
+
type SpacingToken = keyof typeof spacing;
|
|
4147
|
+
type BorderRadiusToken = keyof typeof borderRadius;
|
|
4148
|
+
type FontSizeToken = keyof typeof fontSize;
|
|
4149
|
+
type FontWeightToken = keyof typeof fontWeight;
|
|
4150
|
+
type LineHeightToken = keyof typeof lineHeight;
|
|
4151
|
+
type ZIndexToken = keyof typeof zIndex;
|
|
4152
|
+
type DurationToken = keyof typeof duration;
|
|
4153
|
+
type EasingToken = keyof typeof easing;
|
|
4154
|
+
type ShadowToken = keyof typeof shadows;
|
|
4155
|
+
type OpacityToken = keyof typeof opacity;
|
|
4156
|
+
/**
|
|
4157
|
+
* Design token value types
|
|
4158
|
+
*/
|
|
4159
|
+
type DesignTokens = typeof designTokens;
|
|
4160
|
+
type TokenValue = string | number;
|
|
4161
|
+
/**
|
|
4162
|
+
* Utility to get token value with fallback
|
|
4163
|
+
*/
|
|
4164
|
+
declare function getToken<T extends TokenValue>(tokens: Record<string, T>, key: string, fallback: T): T;
|
|
4165
|
+
|
|
4166
|
+
/**
|
|
4167
|
+
* CSS Custom Properties Generator
|
|
4168
|
+
* Generates CSS variables from design tokens
|
|
4169
|
+
* @module tokens/css-generator
|
|
4170
|
+
*/
|
|
4171
|
+
/**
|
|
4172
|
+
* Generate CSS custom properties from design tokens
|
|
4173
|
+
*/
|
|
4174
|
+
declare function generateCSSVariables(prefix?: string): string;
|
|
4175
|
+
/**
|
|
4176
|
+
* Generate CSS custom properties for a specific theme
|
|
4177
|
+
*/
|
|
4178
|
+
interface ThemeColors$1 {
|
|
4179
|
+
background: {
|
|
4180
|
+
primary: string;
|
|
4181
|
+
secondary: string;
|
|
4182
|
+
tertiary: string;
|
|
4183
|
+
card: string;
|
|
4184
|
+
hover: string;
|
|
4185
|
+
active: string;
|
|
4186
|
+
};
|
|
4187
|
+
text: {
|
|
4188
|
+
primary: string;
|
|
4189
|
+
secondary: string;
|
|
4190
|
+
tertiary: string;
|
|
4191
|
+
disabled: string;
|
|
4192
|
+
inverse: string;
|
|
4193
|
+
};
|
|
4194
|
+
border: {
|
|
4195
|
+
default: string;
|
|
4196
|
+
hover: string;
|
|
4197
|
+
focus: string;
|
|
4198
|
+
active: string;
|
|
4199
|
+
};
|
|
4200
|
+
status: {
|
|
4201
|
+
success: string;
|
|
4202
|
+
warning: string;
|
|
4203
|
+
error: string;
|
|
4204
|
+
info: string;
|
|
4205
|
+
};
|
|
4206
|
+
priority: {
|
|
4207
|
+
low: string;
|
|
4208
|
+
medium: string;
|
|
4209
|
+
high: string;
|
|
4210
|
+
urgent: string;
|
|
4211
|
+
};
|
|
4212
|
+
interactive: {
|
|
4213
|
+
primary: string;
|
|
4214
|
+
primaryHover: string;
|
|
4215
|
+
primaryActive: string;
|
|
4216
|
+
secondary: string;
|
|
4217
|
+
secondaryHover: string;
|
|
4218
|
+
secondaryActive: string;
|
|
4219
|
+
};
|
|
4220
|
+
gantt: {
|
|
4221
|
+
gridLine: string;
|
|
4222
|
+
todayLine: string;
|
|
4223
|
+
taskBackground: string;
|
|
4224
|
+
taskBorder: string;
|
|
4225
|
+
criticalPath: string;
|
|
4226
|
+
milestone: string;
|
|
4227
|
+
dependency: string;
|
|
4228
|
+
weekend: string;
|
|
4229
|
+
};
|
|
4230
|
+
}
|
|
4231
|
+
/**
|
|
4232
|
+
* Generate theme CSS variables
|
|
4233
|
+
*/
|
|
4234
|
+
declare function generateThemeVariables(theme: ThemeColors$1, prefix?: string): string;
|
|
4235
|
+
/**
|
|
4236
|
+
* Dark theme colors
|
|
4237
|
+
*/
|
|
4238
|
+
declare const darkTheme$1: ThemeColors$1;
|
|
4239
|
+
/**
|
|
4240
|
+
* Light theme colors
|
|
4241
|
+
*/
|
|
4242
|
+
declare const lightTheme$1: ThemeColors$1;
|
|
4243
|
+
/**
|
|
4244
|
+
* Neutral theme colors
|
|
4245
|
+
*/
|
|
4246
|
+
declare const neutralTheme$1: ThemeColors$1;
|
|
4247
|
+
/**
|
|
4248
|
+
* Generate complete CSS with all tokens and theme
|
|
4249
|
+
*/
|
|
4250
|
+
declare function generateCompleteCSS(theme?: ThemeColors$1, prefix?: string): string;
|
|
4251
|
+
/**
|
|
4252
|
+
* Export CSS to file content
|
|
4253
|
+
*/
|
|
4254
|
+
declare function exportTokensToCSS(): string;
|
|
4255
|
+
|
|
4256
|
+
/**
|
|
4257
|
+
* Theme System Types
|
|
4258
|
+
* ASAKAA v0.5.0
|
|
4259
|
+
*/
|
|
4260
|
+
type ThemeName = 'dark' | 'light' | 'neutral';
|
|
4261
|
+
interface ThemeColors {
|
|
4262
|
+
bgPrimary: string;
|
|
4263
|
+
bgSecondary: string;
|
|
4264
|
+
bgTertiary: string;
|
|
4265
|
+
bgCard: string;
|
|
4266
|
+
bgHover: string;
|
|
4267
|
+
bgActive: string;
|
|
4268
|
+
bgInput: string;
|
|
4269
|
+
textPrimary: string;
|
|
4270
|
+
textSecondary: string;
|
|
4271
|
+
textTertiary: string;
|
|
4272
|
+
textDisabled: string;
|
|
4273
|
+
textInverse: string;
|
|
4274
|
+
accentPrimary: string;
|
|
4275
|
+
accentHover: string;
|
|
4276
|
+
borderPrimary: string;
|
|
4277
|
+
borderSecondary: string;
|
|
4278
|
+
borderDefault: string;
|
|
4279
|
+
borderHover: string;
|
|
4280
|
+
borderSubtle: string;
|
|
4281
|
+
interactivePrimary: string;
|
|
4282
|
+
interactivePrimaryHover: string;
|
|
4283
|
+
interactivePrimaryBorder: string;
|
|
4284
|
+
interactivePrimaryBackground: string;
|
|
4285
|
+
interactivePrimaryBackgroundHover: string;
|
|
4286
|
+
success?: string;
|
|
4287
|
+
warning?: string;
|
|
4288
|
+
error?: string;
|
|
4289
|
+
info?: string;
|
|
4290
|
+
danger: string;
|
|
4291
|
+
dangerBorder: string;
|
|
4292
|
+
dangerBackground: string;
|
|
4293
|
+
dangerBackgroundHover: string;
|
|
4294
|
+
}
|
|
4295
|
+
interface Theme {
|
|
4296
|
+
name: ThemeName;
|
|
4297
|
+
displayName: string;
|
|
4298
|
+
emoji: string;
|
|
4299
|
+
colors: ThemeColors;
|
|
4300
|
+
shadows: {
|
|
4301
|
+
sm: string;
|
|
4302
|
+
md: string;
|
|
4303
|
+
lg: string;
|
|
4304
|
+
};
|
|
4305
|
+
radii: {
|
|
4306
|
+
sm: string;
|
|
4307
|
+
md: string;
|
|
4308
|
+
lg: string;
|
|
4309
|
+
full: string;
|
|
4310
|
+
};
|
|
4311
|
+
spacing: {
|
|
4312
|
+
xs: string;
|
|
4313
|
+
sm: string;
|
|
4314
|
+
md: string;
|
|
4315
|
+
lg: string;
|
|
4316
|
+
xl: string;
|
|
4317
|
+
};
|
|
4318
|
+
}
|
|
4319
|
+
interface ThemeContextValue {
|
|
4320
|
+
theme: ThemeName;
|
|
4321
|
+
setTheme: (theme: ThemeName) => void;
|
|
4322
|
+
themes: Record<ThemeName, Theme>;
|
|
4323
|
+
}
|
|
4324
|
+
|
|
4325
|
+
interface ThemeProviderProps {
|
|
4326
|
+
children: ReactNode;
|
|
4327
|
+
defaultTheme?: ThemeName;
|
|
4328
|
+
storageKey?: string;
|
|
4329
|
+
}
|
|
4330
|
+
declare function ThemeProvider({ children, defaultTheme: initialTheme, storageKey, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
4331
|
+
/**
|
|
4332
|
+
* Hook to access theme context
|
|
4333
|
+
*/
|
|
4334
|
+
declare function useTheme(): ThemeContextValue;
|
|
4335
|
+
|
|
4336
|
+
interface ThemeSwitcherProps {
|
|
4337
|
+
/** Show labels for each theme */
|
|
4338
|
+
showLabels?: boolean;
|
|
4339
|
+
/** Compact mode (icon-only) */
|
|
4340
|
+
compact?: boolean;
|
|
4341
|
+
/** Custom class name */
|
|
4342
|
+
className?: string;
|
|
4343
|
+
}
|
|
4344
|
+
declare function ThemeSwitcher({ showLabels, compact, className }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
4345
|
+
|
|
4346
|
+
/**
|
|
4347
|
+
* Theme Definitions
|
|
4348
|
+
* ASAKAA v0.5.0 - Elite Theming System
|
|
4349
|
+
*/
|
|
4350
|
+
|
|
4351
|
+
/**
|
|
4352
|
+
* DARK THEME (Enhanced) - DEFAULT
|
|
4353
|
+
* Philosophy: Speed, efficiency, focus
|
|
4354
|
+
* Optimized for developer productivity
|
|
4355
|
+
*/
|
|
4356
|
+
declare const darkTheme: Theme;
|
|
4357
|
+
/**
|
|
4358
|
+
* LIGHT THEME (Accessible Standard)
|
|
4359
|
+
* Philosophy: Clarity, legibility, professionalism
|
|
4360
|
+
* WCAG AAA compliant (7:1 contrast)
|
|
4361
|
+
*/
|
|
4362
|
+
declare const lightTheme: Theme;
|
|
4363
|
+
/**
|
|
4364
|
+
* NEUTRAL THEME (Zen Mode)
|
|
4365
|
+
* Philosophy: Minimalism, calm technology, maximum concentration
|
|
4366
|
+
* Strictly monochromatic - states communicated via icons/typography
|
|
4367
|
+
*/
|
|
4368
|
+
declare const neutralTheme: Theme;
|
|
4369
|
+
/**
|
|
4370
|
+
* All themes registry
|
|
4371
|
+
*/
|
|
4372
|
+
declare const themes: Record<ThemeName, Theme>;
|
|
4373
|
+
/**
|
|
4374
|
+
* Default theme
|
|
4375
|
+
*/
|
|
4376
|
+
declare const defaultTheme: ThemeName;
|
|
4377
|
+
|
|
4378
|
+
export { type AICallbacks, type GanttTask as AIGanttTask, type AIModelKey, type AIOperation, AIUsageDashboard, type AIUsageDashboardProps, AI_FEATURES, AI_MODELS, type Activity, type ActivityType, type AssigneeSuggestion, type Attachment, AttachmentUploader, type AttachmentUploaderProps, type Board, type BoardCallbacks, type BoardConfig, BoardProvider, type BoardProviderProps, type BorderRadiusToken, BulkOperationsToolbar, type BulkOperationsToolbarProps, BurnDownChart, type BurnDownChartProps, type BurnDownDataPoint, Card, CardDetailModal, type CardDetailModalProps, CardDetailModalV2, type CardDetailModalV2Props, type CardFilter, type CardFilters, CardHistoryReplay, type CardHistoryReplayProps, CardHistoryTimeline, type CardHistoryTimelineProps, type CardProps, CardRelationshipsGraph, type CardRelationshipsGraphProps, type CardSort, type CardSortKey, CardStack, type CardStackProps, type CardStack$1 as CardStackType, type CardStatus, type CardTemplate, CardTemplateSelector, type CardTemplateSelectorProps, type Card$1 as CardType, CircuitBreaker, Column, ColumnManager, type ColumnProps, type Column$1 as ColumnType, CommandPalette, type CommandPaletteProps, type Comment, ConfigMenu, type ConfigMenuProps, ContextMenu, DEFAULT_SHORTCUTS, DEFAULT_TEMPLATES, type DateFilter, DateRangePicker, type DateRangePickerProps, DependenciesSelector, type DependenciesSelectorProps, DependencyLine, type DesignTokens, DistributionCharts, type DistributionChartsProps, type DistributionDataPoint, type DragData, type DropData, type DurationToken, type EasingToken, EditableColumnTitle, type EditableColumnTitleProps, ErrorBoundary, type ErrorBoundaryProps, type ExportFormat, ExportImportModal, type ExportImportModalProps, type ExportOptions, FilterBar, type FilterBarProps, type FilterState, type FontSizeToken, type FontWeightToken, type Assignee as GanttAssignee, GanttBoard, type GanttConfig as GanttBoardConfig, type GanttBoardRef, type GanttColumn, type ColumnType as GanttColumnType, Milestone as GanttMilestone, type GanttPermissions, type Task as GanttTask, type GanttTemplates, type Theme$1 as GanttTheme, type GanttTheme as GanttThemeConfig, GanttToolbar, GenerateGanttTasksDialog, type GenerateGanttTasksDialogProps, GeneratePlanModal, type GeneratePlanModalProps, type GeneratedPlan, type GeneratedTasksResponse, type GroupByOption, GroupBySelector, type GroupBySelectorProps, type IPluginManager, type ImportResult, type Insight, type InsightSeverity, type InsightType, KanbanBoard, type KanbanBoardProps, KanbanViewAdapter, type KanbanViewConfig, type KeyboardAction, type KeyboardShortcut, KeyboardShortcutsHelp, type KeyboardShortcutsHelpProps, type LineHeightToken, MenuIcons, type OpacityToken, type Plugin, type PluginContext, type PluginHooks, PluginManager, type Priority, PrioritySelector, type PrioritySelectorProps, RATE_LIMITS, type RenderProps, type RetryOptions, type RetryResult, type ShadowToken, type SortBy, type SortOrder, type SortState, type SpacingToken, type StackSuggestion, type StackingConfig, type StackingStrategy, type Swimlane, SwimlaneBoardView, type SwimlaneBoardViewProps, type SwimlaneConfig, TaskBar, type TaskFormData, TaskFormModal, type TaskFormModalProps, TaskGrid, type Theme, type ThemeColors, type ThemeContextValue, ThemeModal, type ThemeModalProps, type ThemeName, ThemeProvider, ThemeSwitcher, type TimeScale, Timeline, type ThemeColors$1 as TokenThemeColors, type TokenValue, type UsageStats, type UseAIOptions, type UseAIReturn, type UseBoardReturn as UseBoardCoreReturn, type UseBoardOptions, type UseBoardReturn$1 as UseBoardReturn, type UseCardStackingOptions, type UseCardStackingResult, type UseDragStateReturn, type UseFiltersOptions, type UseFiltersReturn, type UseKanbanStateOptions, type UseKanbanStateReturn, type UseKeyboardShortcutsOptions, type UseKeyboardShortcutsReturn, type UseMultiSelectReturn, type UseSelectionStateReturn, type User$2 as User, UserAssignmentSelector, type UserAssignmentSelectorProps, VelocityChart, type VelocityChartProps, type VelocityDataPoint, VirtualGrid, type VirtualGridProps, VirtualList, type VirtualListProps, type ZIndexToken, aiUsageTracker, borderRadius, calculatePosition, cardToGanttTask, cardsToGanttTasks, cn, createKanbanView, createRetryWrapper, darkTheme, darkTheme$1 as darkTokenTheme, defaultTheme, designTokens, duration, easing, exportTokensToCSS, fontSize, fontWeight, formatCost, ganttTaskToCardUpdate, themes$1 as ganttThemes, gantt as ganttTokens, ganttUtils, generateCSSVariables, generateCompleteCSS, generateInitialPositions, generateThemeVariables, getToken, kanban as kanbanTokens, lightTheme, lightTheme$1 as lightTokenTheme, lineHeight, neutralTheme, neutralTheme$1 as neutralTokenTheme, opacity, pluginManager, retrySyncOperation, retryWithBackoff, shadows, shouldVirtualizeGrid, spacing, themes, useAI, useBoard$1 as useBoard, useBoard as useBoardCore, useBoardStore, useCardStacking, useDragState, useFilteredCards, useFilters, useKanbanState, useKeyboardShortcuts, useMultiSelect, useSelectionState, useSortedCards, useTheme, useVirtualGrid, useVirtualList, withErrorBoundary, zIndex };
|