@libxai/board 0.17.158 → 0.17.159
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/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1076 -1070
- package/dist/index.d.ts +1076 -1070
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7,661 +7,1057 @@ import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
8
8
|
import * as _tanstack_virtual_core from '@tanstack/virtual-core';
|
|
9
9
|
|
|
10
|
+
interface TaskSegment {
|
|
11
|
+
startDate: Date;
|
|
12
|
+
endDate: Date;
|
|
13
|
+
}
|
|
10
14
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @module types/card-stack
|
|
15
|
+
* v0.17.158: Tag/Label for tasks (ClickUp-style)
|
|
16
|
+
* Tags are workspace-scoped and can be applied to multiple tasks
|
|
14
17
|
*/
|
|
15
|
-
|
|
16
|
-
interface CardStack$1 {
|
|
17
|
-
/** Unique stack identifier */
|
|
18
|
+
interface TaskTag {
|
|
18
19
|
id: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
name: string;
|
|
21
|
+
color: string;
|
|
22
|
+
}
|
|
23
|
+
interface Task {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
startDate?: Date;
|
|
27
|
+
endDate?: Date;
|
|
28
|
+
progress: number;
|
|
29
|
+
assignees?: Array<{
|
|
30
|
+
name: string;
|
|
31
|
+
avatar?: string;
|
|
32
|
+
initials: string;
|
|
33
|
+
color: string;
|
|
34
|
+
}>;
|
|
35
|
+
status?: string;
|
|
36
|
+
dependencies?: string[];
|
|
37
|
+
subtasks?: Task[];
|
|
38
|
+
isExpanded?: boolean;
|
|
39
|
+
isMilestone?: boolean;
|
|
40
|
+
isCriticalPath?: boolean;
|
|
28
41
|
color?: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/** AI confidence score (0-1) for auto-stacked groups */
|
|
36
|
-
confidence?: number;
|
|
42
|
+
priority?: 'low' | 'medium' | 'high' | 'urgent';
|
|
43
|
+
tags?: TaskTag[];
|
|
44
|
+
segments?: TaskSegment[];
|
|
45
|
+
parentId?: string;
|
|
46
|
+
level?: number;
|
|
47
|
+
position?: number;
|
|
37
48
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
type TimeScale = 'day' | 'week' | 'month';
|
|
50
|
+
type Theme$1 = 'dark' | 'light' | 'neutral';
|
|
51
|
+
type RowDensity = 'compact' | 'comfortable' | 'spacious';
|
|
52
|
+
type ColumnType = 'name' | 'startDate' | 'endDate' | 'duration' | 'assignees' | 'status' | 'progress' | 'priority';
|
|
53
|
+
interface GanttColumn {
|
|
54
|
+
id: ColumnType;
|
|
55
|
+
label: string;
|
|
56
|
+
width: number;
|
|
57
|
+
minWidth?: number;
|
|
58
|
+
maxWidth?: number;
|
|
59
|
+
visible: boolean;
|
|
60
|
+
sortable?: boolean;
|
|
61
|
+
resizable?: boolean;
|
|
51
62
|
}
|
|
52
|
-
interface
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
interface Assignee {
|
|
64
|
+
name: string;
|
|
65
|
+
initials: string;
|
|
66
|
+
color: string;
|
|
67
|
+
}
|
|
68
|
+
interface GanttTheme {
|
|
69
|
+
bgPrimary: string;
|
|
70
|
+
bgSecondary: string;
|
|
71
|
+
bgGrid: string;
|
|
72
|
+
bgWeekend: string;
|
|
73
|
+
border: string;
|
|
74
|
+
borderLight: string;
|
|
75
|
+
textPrimary: string;
|
|
76
|
+
textSecondary: string;
|
|
77
|
+
textTertiary: string;
|
|
78
|
+
accent: string;
|
|
79
|
+
accentHover: string;
|
|
80
|
+
accentLight: string;
|
|
81
|
+
taskBarPrimary: string;
|
|
82
|
+
taskBarProgress: string;
|
|
83
|
+
taskBarHandle: string;
|
|
84
|
+
dependency: string;
|
|
85
|
+
dependencyHover: string;
|
|
86
|
+
criticalPath: string;
|
|
87
|
+
criticalPathLight: string;
|
|
88
|
+
today: string;
|
|
89
|
+
todayLight: string;
|
|
90
|
+
milestone: string;
|
|
91
|
+
milestoneLight: string;
|
|
92
|
+
statusTodo: string;
|
|
93
|
+
statusInProgress: string;
|
|
94
|
+
statusCompleted: string;
|
|
95
|
+
hoverBg: string;
|
|
96
|
+
focusRing: string;
|
|
59
97
|
}
|
|
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
98
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
99
|
+
* Templates for customizing Gantt rendering
|
|
100
|
+
* Similar to DHTMLX gantt.templates.*
|
|
73
101
|
*/
|
|
74
|
-
interface
|
|
75
|
-
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
102
|
+
interface GanttTemplates {
|
|
103
|
+
/**
|
|
104
|
+
* Customize task tooltip content
|
|
105
|
+
* @param task - The task to render tooltip for
|
|
106
|
+
* @returns Tooltip content (string or JSX)
|
|
107
|
+
*/
|
|
108
|
+
taskTooltip?: (task: Task) => string | React.ReactNode;
|
|
109
|
+
/**
|
|
110
|
+
* Customize task label in timeline
|
|
111
|
+
* @param task - The task to render label for
|
|
112
|
+
* @returns Label content (string or JSX)
|
|
113
|
+
*/
|
|
114
|
+
taskLabel?: (task: Task) => string | React.ReactNode;
|
|
115
|
+
/**
|
|
116
|
+
* Customize grid cell content
|
|
117
|
+
* @param task - The task for this row
|
|
118
|
+
* @param column - The column type
|
|
119
|
+
* @param value - Default cell value
|
|
120
|
+
* @returns Cell content (string or JSX)
|
|
121
|
+
*/
|
|
122
|
+
gridCell?: (task: Task, column: ColumnType, value: any) => string | React.ReactNode;
|
|
123
|
+
/**
|
|
124
|
+
* Add custom CSS classes to task bar
|
|
125
|
+
* @param task - The task to style
|
|
126
|
+
* @returns Space-separated CSS class names
|
|
127
|
+
*/
|
|
128
|
+
taskClass?: (task: Task) => string;
|
|
129
|
+
/**
|
|
130
|
+
* Customize milestone rendering
|
|
131
|
+
* @param task - The milestone task
|
|
132
|
+
* @returns Milestone content (string or JSX)
|
|
133
|
+
*/
|
|
134
|
+
milestoneContent?: (task: Task) => string | React.ReactNode;
|
|
135
|
+
/**
|
|
136
|
+
* Format date display
|
|
137
|
+
* @param date - Date to format
|
|
138
|
+
* @returns Formatted date string
|
|
139
|
+
*/
|
|
140
|
+
dateFormat?: (date: Date) => string;
|
|
141
|
+
/**
|
|
142
|
+
* Format duration display
|
|
143
|
+
* @param days - Duration in days
|
|
144
|
+
* @returns Formatted duration string
|
|
145
|
+
*/
|
|
146
|
+
durationFormat?: (days: number) => string;
|
|
147
|
+
/**
|
|
148
|
+
* Format progress display
|
|
149
|
+
* @param progress - Progress percentage (0-100)
|
|
150
|
+
* @returns Formatted progress string
|
|
151
|
+
*/
|
|
152
|
+
progressFormat?: (progress: number) => string;
|
|
91
153
|
}
|
|
92
154
|
/**
|
|
93
|
-
*
|
|
155
|
+
* Permissions interface for controlling Gantt operations
|
|
156
|
+
* Useful for integrating with authorization libraries like CASL
|
|
157
|
+
* @example
|
|
158
|
+
*
|
|
159
|
+
* // With CASL integration
|
|
160
|
+
* const ability = useAbility();
|
|
161
|
+
*
|
|
162
|
+
* <GanttBoard
|
|
163
|
+
* tasks={tasks}
|
|
164
|
+
* config={{
|
|
165
|
+
* permissions: {
|
|
166
|
+
* canCreateTask: ability.can('create', 'Task'),
|
|
167
|
+
* canUpdateTask: ability.can('update', 'Task'),
|
|
168
|
+
* canDeleteTask: ability.can('delete', 'Task'),
|
|
169
|
+
* canCreateDependency: ability.can('create', 'Dependency'),
|
|
170
|
+
* canUpdateProgress: ability.can('update', 'TaskProgress'),
|
|
171
|
+
* }
|
|
172
|
+
* }}
|
|
173
|
+
* />
|
|
174
|
+
*
|
|
94
175
|
*/
|
|
95
|
-
|
|
176
|
+
interface GanttPermissions {
|
|
177
|
+
canCreateTask?: boolean;
|
|
178
|
+
canUpdateTask?: boolean;
|
|
179
|
+
canDeleteTask?: boolean;
|
|
180
|
+
canCreateDependency?: boolean;
|
|
181
|
+
canDeleteDependency?: boolean;
|
|
182
|
+
canUpdateProgress?: boolean;
|
|
183
|
+
canAssignUsers?: boolean;
|
|
184
|
+
canModifyHierarchy?: boolean;
|
|
185
|
+
canDuplicateTask?: boolean;
|
|
186
|
+
canReorderTasks?: boolean;
|
|
187
|
+
canExport?: boolean;
|
|
188
|
+
canToggleExpansion?: boolean;
|
|
189
|
+
canPerformAction?: (task: Task, action: 'create' | 'update' | 'delete' | 'assign' | 'progress') => boolean;
|
|
190
|
+
}
|
|
96
191
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
endDate?: Date | string;
|
|
125
|
-
/** Task dependencies - supports both legacy format (string[]) and new format (Dependency[]) */
|
|
126
|
-
dependencies?: string[] | Dependency[];
|
|
127
|
-
/** Estimated time (in hours) */
|
|
128
|
-
estimatedTime?: number;
|
|
129
|
-
/** Manual progress override (0-100%) */
|
|
130
|
-
progress?: number;
|
|
131
|
-
/** Cover image URL */
|
|
132
|
-
coverImage?: string;
|
|
133
|
-
/** Subtasks/checklist items */
|
|
134
|
-
subtasks?: Subtask[];
|
|
135
|
-
/** v0.17.29: Custom color for visual identification (hex color) */
|
|
136
|
-
color?: string;
|
|
137
|
-
/** Custom metadata */
|
|
138
|
-
metadata?: Record<string, unknown>;
|
|
139
|
-
createdAt?: Date | string;
|
|
140
|
-
updatedAt?: Date | string;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Column entity
|
|
144
|
-
* Represents a stage/status in the workflow
|
|
192
|
+
* Scroll behavior configuration for timeline interactions
|
|
193
|
+
* Controls how the Gantt chart viewport behaves during user interactions
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* // Disable all automatic scrolling during drag operations
|
|
197
|
+
* <GanttBoard
|
|
198
|
+
* config={{
|
|
199
|
+
* scrollBehavior: {
|
|
200
|
+
* preventAutoScroll: true,
|
|
201
|
+
* axis: 'horizontal'
|
|
202
|
+
* }
|
|
203
|
+
* }}
|
|
204
|
+
* />
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* // Allow vertical auto-scroll but prevent horizontal
|
|
208
|
+
* <GanttBoard
|
|
209
|
+
* config={{
|
|
210
|
+
* scrollBehavior: {
|
|
211
|
+
* preventAutoScroll: true,
|
|
212
|
+
* axis: 'horizontal',
|
|
213
|
+
* onScrollPrevented: (axis, scrollDelta) => {
|
|
214
|
+
* console.log(`Prevented ${axis} scroll by ${scrollDelta}px`);
|
|
215
|
+
* }
|
|
216
|
+
* }
|
|
217
|
+
* }}
|
|
218
|
+
* />
|
|
145
219
|
*/
|
|
146
|
-
interface
|
|
147
|
-
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
220
|
+
interface GanttScrollBehavior {
|
|
221
|
+
/**
|
|
222
|
+
* Prevent automatic viewport scrolling during drag operations
|
|
223
|
+
* When true, the viewport will not automatically center on dragged tasks
|
|
224
|
+
* Users can still manually scroll using scrollbars or mouse wheel
|
|
225
|
+
* @default false
|
|
226
|
+
*/
|
|
227
|
+
preventAutoScroll?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Which axis to prevent auto-scroll on
|
|
230
|
+
* - 'horizontal': Only prevent horizontal auto-scroll (recommended for Gantt charts)
|
|
231
|
+
* - 'vertical': Only prevent vertical auto-scroll
|
|
232
|
+
* - 'both': Prevent both horizontal and vertical auto-scroll
|
|
233
|
+
* @default 'horizontal'
|
|
234
|
+
*/
|
|
235
|
+
axis?: 'horizontal' | 'vertical' | 'both';
|
|
236
|
+
/**
|
|
237
|
+
* Callback fired when auto-scroll is prevented
|
|
238
|
+
* Useful for debugging or showing user feedback
|
|
239
|
+
* @param axis - Which axis was prevented ('x' or 'y')
|
|
240
|
+
* @param scrollDelta - How many pixels of scroll were prevented
|
|
241
|
+
*/
|
|
242
|
+
onScrollPrevented?: (axis: 'x' | 'y', scrollDelta: number) => void;
|
|
243
|
+
/**
|
|
244
|
+
* Allow auto-scroll if task would go out of viewport bounds
|
|
245
|
+
* When true, auto-scroll is only prevented if task remains visible
|
|
246
|
+
* @default false
|
|
247
|
+
*/
|
|
248
|
+
allowScrollWhenOutOfBounds?: boolean;
|
|
165
249
|
}
|
|
166
250
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
251
|
+
* AI chat message interface
|
|
252
|
+
* @version 0.17.42
|
|
169
253
|
*/
|
|
170
|
-
interface
|
|
171
|
-
/** Unique identifier */
|
|
254
|
+
interface AIMessage {
|
|
172
255
|
id: string;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
cards: Card$1[];
|
|
179
|
-
metadata?: Record<string, any>;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Callbacks for board operations
|
|
183
|
-
* These allow the library consumer to persist changes
|
|
184
|
-
*/
|
|
185
|
-
interface BoardCallbacks {
|
|
186
|
-
/** Called when a card is moved to a different position/column */
|
|
187
|
-
onCardMove?: (cardId: string, targetColumnId: string, position: number) => void | Promise<void>;
|
|
188
|
-
/** Called when card properties are updated */
|
|
189
|
-
onCardUpdate?: (cardId: string, updates: Partial<Card$1>) => void | Promise<void>;
|
|
190
|
-
/** Called when a new card is created */
|
|
191
|
-
onCardCreate?: (card: Omit<Card$1, 'id'>) => void | Promise<void>;
|
|
192
|
-
/** Called when a card is deleted */
|
|
193
|
-
onCardDelete?: (cardId: string) => void | Promise<void>;
|
|
194
|
-
/** Called when a new column is created */
|
|
195
|
-
onColumnCreate?: (column: Omit<Column$1, 'id' | 'cardIds'>) => void | Promise<void>;
|
|
196
|
-
/** Called when column properties are updated */
|
|
197
|
-
onColumnUpdate?: (columnId: string, updates: Partial<Column$1>) => void | Promise<void>;
|
|
198
|
-
/** Called when a column is deleted */
|
|
199
|
-
onColumnDelete?: (columnId: string) => void | Promise<void>;
|
|
200
|
-
/** Called when columns are reordered */
|
|
201
|
-
onColumnReorder?: (columnId: string, newPosition: number) => void | Promise<void>;
|
|
202
|
-
/** Called when WIP limit is exceeded (hard limit only) */
|
|
203
|
-
onWipLimitExceeded?: (column: Column$1, card: Card$1) => void;
|
|
256
|
+
role: 'user' | 'assistant';
|
|
257
|
+
content: string;
|
|
258
|
+
timestamp: Date;
|
|
259
|
+
command?: AICommandResult;
|
|
260
|
+
isLoading?: boolean;
|
|
204
261
|
}
|
|
205
262
|
/**
|
|
206
|
-
*
|
|
207
|
-
|
|
208
|
-
type InsightType = 'RISK_DELAY' | 'RISK_OVERLOAD' | 'RISK_BLOCKER' | 'OPPORTUNITY' | 'SUGGESTION';
|
|
209
|
-
/**
|
|
210
|
-
* Severity levels for insights
|
|
211
|
-
*/
|
|
212
|
-
type InsightSeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
213
|
-
/**
|
|
214
|
-
* AI-generated insight about the board state
|
|
263
|
+
* Configuration for persisting AI chat history in localStorage
|
|
264
|
+
* @version 0.17.42
|
|
215
265
|
*/
|
|
216
|
-
interface
|
|
217
|
-
/**
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
|
|
223
|
-
/** Human-readable title */
|
|
224
|
-
title: string;
|
|
225
|
-
/** Detailed description */
|
|
226
|
-
description: string;
|
|
227
|
-
/** AI confidence score (0-1) */
|
|
228
|
-
confidence: number;
|
|
229
|
-
/** Suggested action to take */
|
|
230
|
-
suggestedAction?: string;
|
|
231
|
-
/** Related card IDs */
|
|
232
|
-
relatedCardIds?: string[];
|
|
233
|
-
/** Related column IDs */
|
|
234
|
-
relatedColumnIds?: string[];
|
|
235
|
-
/** Timestamp */
|
|
236
|
-
timestamp?: Date | string;
|
|
266
|
+
interface PersistHistoryConfig {
|
|
267
|
+
/** Enable history persistence in localStorage */
|
|
268
|
+
enabled: boolean;
|
|
269
|
+
/** Maximum messages to persist (default: 5) */
|
|
270
|
+
maxMessages?: number;
|
|
271
|
+
/** Custom storage key (default: 'gantt-ai-history') */
|
|
272
|
+
storageKey?: string;
|
|
237
273
|
}
|
|
238
274
|
/**
|
|
239
|
-
*
|
|
275
|
+
* AI Assistant configuration for natural language task editing
|
|
276
|
+
* @version 0.14.0
|
|
277
|
+
* @updated 0.17.42 - Added persistHistory option
|
|
240
278
|
*/
|
|
241
|
-
interface
|
|
242
|
-
/**
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
|
|
279
|
+
interface GanttAIAssistantConfig {
|
|
280
|
+
/** Enable AI assistant (default: false) */
|
|
281
|
+
enabled?: boolean;
|
|
282
|
+
/** Custom placeholder text */
|
|
283
|
+
placeholder?: string;
|
|
284
|
+
/** Position of the chat button */
|
|
285
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
286
|
+
/** Handler for AI commands - should return task updates */
|
|
287
|
+
onCommand?: (command: string, tasks: Task[]) => Promise<AICommandResult>;
|
|
288
|
+
/** Custom suggestions for the command palette */
|
|
289
|
+
suggestions?: string[];
|
|
290
|
+
/** Maximum messages to keep in memory history */
|
|
291
|
+
maxHistory?: number;
|
|
292
|
+
/** Persist chat history in localStorage @version 0.17.42 */
|
|
293
|
+
persistHistory?: PersistHistoryConfig;
|
|
248
294
|
}
|
|
249
295
|
/**
|
|
250
|
-
*
|
|
296
|
+
* AI Command result interface
|
|
297
|
+
* @version 0.14.0
|
|
251
298
|
*/
|
|
252
|
-
interface
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
299
|
+
interface AICommandResult {
|
|
300
|
+
type: 'move_task' | 'resize_task' | 'rename_task' | 'delete_task' | 'create_task' | 'link_tasks' | 'unlink_tasks' | 'assign_task' | 'set_progress' | 'set_status' | 'split_task' | 'group_tasks' | 'unknown';
|
|
301
|
+
taskId?: string;
|
|
302
|
+
taskName?: string;
|
|
303
|
+
updates?: Partial<Task>;
|
|
304
|
+
newTask?: Task;
|
|
305
|
+
dependencyFrom?: string;
|
|
306
|
+
dependencyTo?: string;
|
|
307
|
+
message: string;
|
|
308
|
+
success: boolean;
|
|
309
|
+
error?: string;
|
|
259
310
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/** Generate subtasks for a card */
|
|
272
|
-
onGenerateSubtasks?: (card: Card$1) => Promise<Omit<Card$1, 'id'>[]>;
|
|
273
|
-
/** Estimate effort for a card */
|
|
274
|
-
onEstimateEffort?: (card: Card$1) => Promise<{
|
|
275
|
-
hours: number;
|
|
276
|
-
confidence: number;
|
|
311
|
+
interface GanttConfig {
|
|
312
|
+
theme?: Theme$1;
|
|
313
|
+
timeScale?: TimeScale;
|
|
314
|
+
rowDensity?: RowDensity;
|
|
315
|
+
showThemeSelector?: boolean;
|
|
316
|
+
showExportButton?: boolean;
|
|
317
|
+
availableUsers?: Array<{
|
|
318
|
+
id: string;
|
|
319
|
+
name: string;
|
|
320
|
+
initials: string;
|
|
321
|
+
color: string;
|
|
277
322
|
}>;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
theme?: 'dark' | 'light' | 'neutral';
|
|
285
|
-
/** Locale for i18n */
|
|
323
|
+
/**
|
|
324
|
+
* v0.15.0: Internationalization (i18n) support
|
|
325
|
+
* Set the locale for all UI text in the Gantt chart
|
|
326
|
+
* Built-in support for 'en' (English) and 'es' (Spanish)
|
|
327
|
+
* @default 'en'
|
|
328
|
+
*/
|
|
286
329
|
locale?: 'en' | 'es' | string;
|
|
287
|
-
/**
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
330
|
+
/**
|
|
331
|
+
* v0.15.0: Custom translations to override default locale strings
|
|
332
|
+
* Allows partial overrides while keeping defaults for missing keys
|
|
333
|
+
* @see GanttTranslations in i18n.ts
|
|
334
|
+
*/
|
|
335
|
+
customTranslations?: Record<string, any>;
|
|
336
|
+
aiAssistant?: GanttAIAssistantConfig;
|
|
337
|
+
showCreateTaskButton?: boolean;
|
|
338
|
+
createTaskLabel?: string;
|
|
339
|
+
onCreateTask?: () => void;
|
|
340
|
+
templates?: GanttTemplates;
|
|
341
|
+
permissions?: GanttPermissions;
|
|
342
|
+
disableScrollSync?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* v0.9.2: Advanced scroll behavior configuration
|
|
345
|
+
* Controls how the timeline viewport behaves during drag operations
|
|
346
|
+
* Provides fine-grained control over auto-scroll prevention with events
|
|
347
|
+
* @see GanttScrollBehavior
|
|
348
|
+
*/
|
|
349
|
+
scrollBehavior?: GanttScrollBehavior;
|
|
350
|
+
/**
|
|
351
|
+
* v0.11.1: Enable automatic Critical Path Method (CPM) calculation
|
|
352
|
+
* When true (default), tasks with zero slack are automatically marked as critical (red)
|
|
353
|
+
* When false, preserves custom task colors and disables automatic CPM marking
|
|
354
|
+
* @default true
|
|
355
|
+
*/
|
|
356
|
+
enableAutoCriticalPath?: boolean;
|
|
357
|
+
onThemeChange?: (theme: Theme$1) => void;
|
|
358
|
+
onTaskClick?: (task: Task) => void;
|
|
359
|
+
onTaskDblClick?: (task: Task) => void;
|
|
360
|
+
onTaskContextMenu?: (task: Task, event: React.MouseEvent) => void;
|
|
361
|
+
onTaskUpdate?: (task: Task) => void;
|
|
362
|
+
onTaskDateChange?: (task: Task, startDate: Date, endDate: Date) => void;
|
|
363
|
+
onProgressChange?: (taskId: string, oldProgress: number, newProgress: number) => void;
|
|
364
|
+
/**
|
|
365
|
+
* Called when user clicks "Edit Task" in context menu
|
|
366
|
+
* If not provided, the built-in TaskFormModal will be used
|
|
367
|
+
*/
|
|
368
|
+
onTaskEdit?: (task: Task) => void;
|
|
369
|
+
/**
|
|
370
|
+
* Called when user clicks "Add Subtask" in context menu
|
|
371
|
+
* If not provided, the built-in subtask creation will be used
|
|
372
|
+
*/
|
|
373
|
+
onTaskAddSubtask?: (parentTask: Task) => void;
|
|
374
|
+
/**
|
|
375
|
+
* Called when user clicks "Mark Incomplete" in context menu
|
|
376
|
+
* Sets task status to 'todo' and progress to 0
|
|
377
|
+
*/
|
|
378
|
+
onTaskMarkIncomplete?: (task: Task) => void;
|
|
379
|
+
/**
|
|
380
|
+
* Called when user clicks "Set In Progress" in context menu
|
|
381
|
+
* Sets task status to 'in-progress'
|
|
382
|
+
*/
|
|
383
|
+
onTaskSetInProgress?: (task: Task) => void;
|
|
384
|
+
onDependencyCreate?: (fromTaskId: string, toTaskId: string) => void;
|
|
385
|
+
onDependencyDelete?: (taskId: string, dependencyId: string) => void;
|
|
386
|
+
onBeforeTaskAdd?: (task: Task) => boolean | void | Promise<boolean | void>;
|
|
387
|
+
onAfterTaskAdd?: (task: Task) => void;
|
|
388
|
+
onBeforeTaskUpdate?: (taskId: string, newData: Partial<Task>) => boolean | void | Promise<boolean | void>;
|
|
389
|
+
onAfterTaskUpdate?: (task: Task) => void;
|
|
390
|
+
onBeforeTaskDelete?: (taskId: string) => boolean | void | Promise<boolean | void>;
|
|
391
|
+
onAfterTaskDelete?: (taskId: string) => void;
|
|
392
|
+
onTaskCreate?: (parentId: string | undefined, position: number) => void;
|
|
393
|
+
onTaskDelete?: (taskId: string) => void;
|
|
394
|
+
onMultiTaskDelete?: (taskIds: string[]) => void;
|
|
395
|
+
onTaskDuplicate?: (taskId: string) => void;
|
|
396
|
+
onTaskMove?: (taskId: string, direction: 'up' | 'down') => void;
|
|
397
|
+
onTaskIndent?: (taskId: string) => void;
|
|
398
|
+
onTaskOutdent?: (taskId: string) => void;
|
|
399
|
+
onTaskRename?: (taskId: string, newName: string) => void;
|
|
400
|
+
onTaskToggleExpand?: (taskId: string) => void;
|
|
401
|
+
onTaskReparent?: (taskId: string, newParentId: string | null, position?: number) => void;
|
|
322
402
|
}
|
|
403
|
+
|
|
323
404
|
/**
|
|
324
|
-
*
|
|
405
|
+
* Card Stack Types
|
|
406
|
+
* Smart grouping of related cards within columns
|
|
407
|
+
* @module types/card-stack
|
|
325
408
|
*/
|
|
326
|
-
|
|
409
|
+
type StackingStrategy = 'manual' | 'ai-similarity' | 'labels' | 'assignee' | 'priority' | 'epic';
|
|
410
|
+
interface CardStack$1 {
|
|
411
|
+
/** Unique stack identifier */
|
|
327
412
|
id: string;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
413
|
+
/** Display title for the stack */
|
|
414
|
+
title: string;
|
|
415
|
+
/** Cards contained in this stack */
|
|
416
|
+
cardIds: string[];
|
|
417
|
+
/** Column this stack belongs to */
|
|
418
|
+
columnId: string;
|
|
419
|
+
/** How this stack was created */
|
|
420
|
+
strategy: StackingStrategy;
|
|
421
|
+
/** Visual color for the stack */
|
|
422
|
+
color?: string;
|
|
423
|
+
/** Whether stack is expanded or collapsed */
|
|
424
|
+
isExpanded: boolean;
|
|
425
|
+
/** Position within the column */
|
|
426
|
+
position: number;
|
|
427
|
+
/** Timestamp when stack was created */
|
|
428
|
+
createdAt: Date;
|
|
429
|
+
/** AI confidence score (0-1) for auto-stacked groups */
|
|
430
|
+
confidence?: number;
|
|
431
|
+
}
|
|
432
|
+
interface StackingConfig {
|
|
433
|
+
/** Enable automatic AI-powered stacking */
|
|
434
|
+
enableAutoStacking: boolean;
|
|
435
|
+
/** Minimum confidence threshold for auto-stacking (0-1) */
|
|
436
|
+
autoStackConfidenceThreshold: number;
|
|
437
|
+
/** Minimum cards required to form a stack */
|
|
438
|
+
minCardsPerStack: number;
|
|
439
|
+
/** Enable manual drag-to-stack */
|
|
440
|
+
enableManualStacking: boolean;
|
|
441
|
+
/** Show stack summaries (card count, assignees, etc.) */
|
|
442
|
+
showStackSummaries: boolean;
|
|
443
|
+
/** Animation duration in ms */
|
|
444
|
+
animationDuration: number;
|
|
445
|
+
}
|
|
446
|
+
interface StackSuggestion {
|
|
447
|
+
/** Suggested stack configuration */
|
|
448
|
+
stack: Omit<CardStack$1, 'id' | 'createdAt' | 'isExpanded' | 'position'>;
|
|
449
|
+
/** Reason for suggestion */
|
|
450
|
+
reason: string;
|
|
451
|
+
/** Confidence score (0-1) */
|
|
452
|
+
confidence: number;
|
|
332
453
|
}
|
|
454
|
+
|
|
333
455
|
/**
|
|
334
|
-
*
|
|
456
|
+
* Core types for ASAKAA Kanban Board
|
|
457
|
+
* @module types
|
|
335
458
|
*/
|
|
336
|
-
|
|
337
|
-
/** Board data (controlled) */
|
|
338
|
-
board: Board;
|
|
339
|
-
/** Callbacks for mutations */
|
|
340
|
-
callbacks: BoardCallbacks;
|
|
341
|
-
/** AI callbacks (optional) */
|
|
342
|
-
aiCallbacks?: AICallbacks;
|
|
343
|
-
/** Card click handler */
|
|
344
|
-
onCardClick?: (card: Card$1) => void;
|
|
345
|
-
/** Render customization */
|
|
346
|
-
renderProps?: RenderProps;
|
|
347
|
-
/** Configuration */
|
|
348
|
-
config?: BoardConfig;
|
|
349
|
-
/** Available users for assignment */
|
|
350
|
-
availableUsers?: User$1[];
|
|
351
|
-
/** Custom CSS class */
|
|
352
|
-
className?: string;
|
|
353
|
-
/** Custom inline styles */
|
|
354
|
-
style?: React.CSSProperties;
|
|
355
|
-
/** Loading state */
|
|
356
|
-
isLoading?: boolean;
|
|
357
|
-
/** Error state */
|
|
358
|
-
error?: Error | string;
|
|
359
|
-
}
|
|
459
|
+
|
|
360
460
|
/**
|
|
361
|
-
*
|
|
461
|
+
* Priority levels for cards
|
|
362
462
|
*/
|
|
363
|
-
|
|
364
|
-
/** Card being dragged */
|
|
365
|
-
card: Card$1;
|
|
366
|
-
/** Source column ID */
|
|
367
|
-
sourceColumnId: string;
|
|
368
|
-
/** Source position */
|
|
369
|
-
sourcePosition: number;
|
|
370
|
-
}
|
|
463
|
+
type Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';
|
|
371
464
|
/**
|
|
372
|
-
*
|
|
465
|
+
* Subtask entity
|
|
466
|
+
* Represents a checklist item within a card
|
|
373
467
|
*/
|
|
374
|
-
interface
|
|
375
|
-
/**
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
|
|
468
|
+
interface Subtask {
|
|
469
|
+
/** Unique identifier */
|
|
470
|
+
id: string;
|
|
471
|
+
/** Subtask title */
|
|
472
|
+
title: string;
|
|
473
|
+
/** Completion status */
|
|
474
|
+
completed: boolean;
|
|
475
|
+
/** Position within the subtask list */
|
|
476
|
+
position?: number;
|
|
477
|
+
/** Assigned user ID (optional) */
|
|
478
|
+
assigneeId?: string;
|
|
479
|
+
/** Due date (optional) */
|
|
480
|
+
dueDate?: Date | string;
|
|
481
|
+
/** Created timestamp */
|
|
482
|
+
createdAt?: Date | string;
|
|
483
|
+
/** Updated timestamp */
|
|
484
|
+
updatedAt?: Date | string;
|
|
383
485
|
}
|
|
384
486
|
/**
|
|
385
|
-
*
|
|
487
|
+
* Card status types
|
|
386
488
|
*/
|
|
387
|
-
|
|
388
|
-
/** Filter by assignee */
|
|
389
|
-
assigneeIds?: string[];
|
|
390
|
-
/** Filter by priority */
|
|
391
|
-
priorities?: Priority[];
|
|
392
|
-
/** Filter by labels */
|
|
393
|
-
labels?: string[];
|
|
394
|
-
/** Search in title/description */
|
|
395
|
-
search?: string;
|
|
396
|
-
/** Filter by date range */
|
|
397
|
-
dateRange?: {
|
|
398
|
-
start: Date | string;
|
|
399
|
-
end: Date | string;
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Sort options for cards
|
|
404
|
-
*/
|
|
405
|
-
type CardSortKey = 'position' | 'priority' | 'dueDate' | 'createdAt' | 'title';
|
|
406
|
-
interface CardSort {
|
|
407
|
-
key: CardSortKey;
|
|
408
|
-
direction: 'asc' | 'desc';
|
|
409
|
-
}
|
|
489
|
+
type CardStatus = 'TODO' | 'IN_PROGRESS' | 'REVIEW' | 'DONE' | 'BLOCKED';
|
|
410
490
|
/**
|
|
411
|
-
*
|
|
491
|
+
* Card entity
|
|
492
|
+
* Represents a single task/item in the Kanban board
|
|
412
493
|
*/
|
|
413
|
-
interface
|
|
494
|
+
interface Card$1 {
|
|
414
495
|
/** Unique identifier */
|
|
415
496
|
id: string;
|
|
416
|
-
/** Card
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
|
|
424
|
-
/**
|
|
497
|
+
/** Card title (required) */
|
|
498
|
+
title: string;
|
|
499
|
+
/** Card description (optional) */
|
|
500
|
+
description?: string;
|
|
501
|
+
/** Lexicographic position within column (for ordering) */
|
|
502
|
+
position: number;
|
|
503
|
+
/** Parent column ID */
|
|
504
|
+
columnId: string;
|
|
505
|
+
/** Priority level */
|
|
506
|
+
priority?: Priority;
|
|
507
|
+
/** Assigned user ID (legacy - use assignedUserIds) */
|
|
508
|
+
assigneeId?: string;
|
|
509
|
+
/** Assigned user IDs (multiple users) */
|
|
510
|
+
assignedUserIds?: string[];
|
|
511
|
+
/** Tags/labels */
|
|
512
|
+
labels?: string[];
|
|
513
|
+
/** Due date (legacy - use startDate/endDate) */
|
|
514
|
+
dueDate?: Date | string;
|
|
515
|
+
/** Date range - start date */
|
|
516
|
+
startDate?: Date | string;
|
|
517
|
+
/** Date range - end date */
|
|
518
|
+
endDate?: Date | string;
|
|
519
|
+
/** Task dependencies - supports both legacy format (string[]) and new format (Dependency[]) */
|
|
520
|
+
dependencies?: string[] | Dependency[];
|
|
521
|
+
/** Estimated time (in hours) */
|
|
522
|
+
estimatedTime?: number;
|
|
523
|
+
/** Manual progress override (0-100%) */
|
|
524
|
+
progress?: number;
|
|
525
|
+
/** Cover image URL */
|
|
526
|
+
coverImage?: string;
|
|
527
|
+
/** Subtasks/checklist items */
|
|
528
|
+
subtasks?: Subtask[];
|
|
529
|
+
/** v0.17.29: Custom color for visual identification (hex color) */
|
|
530
|
+
color?: string;
|
|
531
|
+
/** v0.17.158: Tags with colors (ClickUp-style) */
|
|
532
|
+
tags?: TaskTag[];
|
|
533
|
+
/** Custom metadata */
|
|
534
|
+
metadata?: Record<string, unknown>;
|
|
535
|
+
createdAt?: Date | string;
|
|
425
536
|
updatedAt?: Date | string;
|
|
426
|
-
/** Mentions (user IDs) */
|
|
427
|
-
mentions?: string[];
|
|
428
537
|
}
|
|
429
538
|
/**
|
|
430
|
-
*
|
|
431
|
-
|
|
432
|
-
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';
|
|
433
|
-
/**
|
|
434
|
-
* Activity log entry
|
|
539
|
+
* Column entity
|
|
540
|
+
* Represents a stage/status in the workflow
|
|
435
541
|
*/
|
|
436
|
-
interface
|
|
542
|
+
interface Column$1 {
|
|
437
543
|
/** Unique identifier */
|
|
438
544
|
id: string;
|
|
439
|
-
/**
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
metadata?: Record<string,
|
|
545
|
+
/** Column title */
|
|
546
|
+
title: string;
|
|
547
|
+
/** Lexicographic position (for ordering columns) */
|
|
548
|
+
position: number;
|
|
549
|
+
/** Array of card IDs in this column */
|
|
550
|
+
cardIds: string[];
|
|
551
|
+
/** Work-in-progress limit */
|
|
552
|
+
wipLimit?: number;
|
|
553
|
+
/** WIP limit enforcement type: 'soft' = warning, 'hard' = block */
|
|
554
|
+
wipLimitType?: 'soft' | 'hard';
|
|
555
|
+
/** Color for visual distinction */
|
|
556
|
+
color?: string;
|
|
557
|
+
/** Custom metadata */
|
|
558
|
+
metadata?: Record<string, unknown>;
|
|
559
|
+
createdAt?: Date | string;
|
|
560
|
+
updatedAt?: Date | string;
|
|
453
561
|
}
|
|
454
562
|
/**
|
|
455
|
-
*
|
|
563
|
+
* Board entity
|
|
564
|
+
* Top-level container for the Kanban board
|
|
456
565
|
*/
|
|
457
|
-
interface
|
|
566
|
+
interface Board {
|
|
458
567
|
/** Unique identifier */
|
|
459
568
|
id: string;
|
|
460
|
-
/**
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
type: string;
|
|
468
|
-
/** File URL or data URI */
|
|
469
|
-
url: string;
|
|
470
|
-
/** Upload timestamp */
|
|
471
|
-
uploadedAt: Date | string;
|
|
472
|
-
/** User who uploaded */
|
|
473
|
-
uploadedBy: string;
|
|
474
|
-
/** Thumbnail URL (for images) */
|
|
475
|
-
thumbnailUrl?: string;
|
|
569
|
+
/** Board title */
|
|
570
|
+
title?: string;
|
|
571
|
+
/** Array of columns */
|
|
572
|
+
columns: Column$1[];
|
|
573
|
+
/** Array of all cards */
|
|
574
|
+
cards: Card$1[];
|
|
575
|
+
metadata?: Record<string, any>;
|
|
476
576
|
}
|
|
477
577
|
/**
|
|
478
|
-
*
|
|
578
|
+
* Callbacks for board operations
|
|
579
|
+
* These allow the library consumer to persist changes
|
|
479
580
|
*/
|
|
480
|
-
interface
|
|
481
|
-
/** Called when
|
|
482
|
-
|
|
483
|
-
/** Called when
|
|
484
|
-
|
|
485
|
-
/** Called when
|
|
486
|
-
|
|
581
|
+
interface BoardCallbacks {
|
|
582
|
+
/** Called when a card is moved to a different position/column */
|
|
583
|
+
onCardMove?: (cardId: string, targetColumnId: string, position: number) => void | Promise<void>;
|
|
584
|
+
/** Called when card properties are updated */
|
|
585
|
+
onCardUpdate?: (cardId: string, updates: Partial<Card$1>) => void | Promise<void>;
|
|
586
|
+
/** Called when a new card is created */
|
|
587
|
+
onCardCreate?: (card: Omit<Card$1, 'id'>) => void | Promise<void>;
|
|
588
|
+
/** Called when a card is deleted */
|
|
589
|
+
onCardDelete?: (cardId: string) => void | Promise<void>;
|
|
590
|
+
/** Called when a new column is created */
|
|
591
|
+
onColumnCreate?: (column: Omit<Column$1, 'id' | 'cardIds'>) => void | Promise<void>;
|
|
592
|
+
/** Called when column properties are updated */
|
|
593
|
+
onColumnUpdate?: (columnId: string, updates: Partial<Column$1>) => void | Promise<void>;
|
|
594
|
+
/** Called when a column is deleted */
|
|
595
|
+
onColumnDelete?: (columnId: string) => void | Promise<void>;
|
|
596
|
+
/** Called when columns are reordered */
|
|
597
|
+
onColumnReorder?: (columnId: string, newPosition: number) => void | Promise<void>;
|
|
598
|
+
/** Called when WIP limit is exceeded (hard limit only) */
|
|
599
|
+
onWipLimitExceeded?: (column: Column$1, card: Card$1) => void;
|
|
487
600
|
}
|
|
488
601
|
/**
|
|
489
|
-
*
|
|
602
|
+
* Insight types generated by AI
|
|
490
603
|
*/
|
|
491
|
-
type
|
|
604
|
+
type InsightType = 'RISK_DELAY' | 'RISK_OVERLOAD' | 'RISK_BLOCKER' | 'OPPORTUNITY' | 'SUGGESTION';
|
|
492
605
|
/**
|
|
493
|
-
*
|
|
606
|
+
* Severity levels for insights
|
|
494
607
|
*/
|
|
495
|
-
|
|
496
|
-
/** Grouping option */
|
|
497
|
-
groupBy: GroupByOption;
|
|
498
|
-
/** Custom field ID (when groupBy is 'custom') */
|
|
499
|
-
customFieldId?: string;
|
|
500
|
-
/** Show empty swimlanes */
|
|
501
|
-
showEmptyLanes?: boolean;
|
|
502
|
-
/** Collapsible swimlanes */
|
|
503
|
-
collapsible?: boolean;
|
|
504
|
-
/** Default collapsed state */
|
|
505
|
-
defaultCollapsed?: boolean;
|
|
506
|
-
}
|
|
608
|
+
type InsightSeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
507
609
|
/**
|
|
508
|
-
*
|
|
610
|
+
* AI-generated insight about the board state
|
|
509
611
|
*/
|
|
510
|
-
interface
|
|
612
|
+
interface Insight {
|
|
511
613
|
/** Unique identifier */
|
|
512
|
-
id
|
|
513
|
-
/**
|
|
614
|
+
id?: string;
|
|
615
|
+
/** Type of insight */
|
|
616
|
+
type: InsightType;
|
|
617
|
+
/** Severity level */
|
|
618
|
+
severity: InsightSeverity;
|
|
619
|
+
/** Human-readable title */
|
|
514
620
|
title: string;
|
|
515
|
-
/**
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
|
|
621
|
+
/** Detailed description */
|
|
622
|
+
description: string;
|
|
623
|
+
/** AI confidence score (0-1) */
|
|
624
|
+
confidence: number;
|
|
625
|
+
/** Suggested action to take */
|
|
626
|
+
suggestedAction?: string;
|
|
627
|
+
/** Related card IDs */
|
|
628
|
+
relatedCardIds?: string[];
|
|
629
|
+
/** Related column IDs */
|
|
630
|
+
relatedColumnIds?: string[];
|
|
631
|
+
/** Timestamp */
|
|
632
|
+
timestamp?: Date | string;
|
|
525
633
|
}
|
|
526
634
|
/**
|
|
527
|
-
*
|
|
528
|
-
* v0.5.0: Added single-key shortcuts for speed
|
|
529
|
-
*/
|
|
530
|
-
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';
|
|
531
|
-
/**
|
|
532
|
-
* Keyboard shortcut definition
|
|
635
|
+
* Result of AI assignee suggestion
|
|
533
636
|
*/
|
|
534
|
-
interface
|
|
535
|
-
/**
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
|
|
541
|
-
/** Modifier keys required */
|
|
542
|
-
modifiers?: {
|
|
543
|
-
ctrl?: boolean;
|
|
544
|
-
shift?: boolean;
|
|
545
|
-
alt?: boolean;
|
|
546
|
-
meta?: boolean;
|
|
547
|
-
};
|
|
637
|
+
interface AssigneeSuggestion {
|
|
638
|
+
/** Suggested user ID */
|
|
639
|
+
userId: string;
|
|
640
|
+
/** Confidence score (0-1) */
|
|
641
|
+
confidence: number;
|
|
642
|
+
/** Reasoning for suggestion */
|
|
643
|
+
reasoning: string;
|
|
548
644
|
}
|
|
549
645
|
/**
|
|
550
|
-
*
|
|
646
|
+
* Result of AI plan generation
|
|
551
647
|
*/
|
|
552
|
-
interface
|
|
553
|
-
/**
|
|
648
|
+
interface GeneratedPlan {
|
|
649
|
+
/** Generated columns */
|
|
650
|
+
columns: Omit<Column$1, 'id'>[];
|
|
651
|
+
/** Generated cards */
|
|
652
|
+
cards: Omit<Card$1, 'id'>[];
|
|
653
|
+
/** Explanation of the plan */
|
|
654
|
+
explanation?: string;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* AI callbacks (optional)
|
|
658
|
+
* Consumer provides these if they want AI features
|
|
659
|
+
*/
|
|
660
|
+
interface AICallbacks {
|
|
661
|
+
/** Generate a complete board plan from a text prompt */
|
|
662
|
+
onGeneratePlan?: (prompt: string) => Promise<GeneratedPlan>;
|
|
663
|
+
/** Suggest best assignee for a card */
|
|
664
|
+
onSuggestAssignee?: (card: Card$1) => Promise<AssigneeSuggestion>;
|
|
665
|
+
/** Predict risks and opportunities based on board state */
|
|
666
|
+
onPredictRisks?: (boardState: Board) => Promise<Insight[]>;
|
|
667
|
+
/** Generate subtasks for a card */
|
|
668
|
+
onGenerateSubtasks?: (card: Card$1) => Promise<Omit<Card$1, 'id'>[]>;
|
|
669
|
+
/** Estimate effort for a card */
|
|
670
|
+
onEstimateEffort?: (card: Card$1) => Promise<{
|
|
671
|
+
hours: number;
|
|
672
|
+
confidence: number;
|
|
673
|
+
}>;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Configuration options for the Kanban board
|
|
677
|
+
*/
|
|
678
|
+
interface BoardConfig {
|
|
679
|
+
/** Theme: 'dark' | 'light' | 'neutral' */
|
|
680
|
+
theme?: 'dark' | 'light' | 'neutral';
|
|
681
|
+
/** Locale for i18n */
|
|
682
|
+
locale?: 'en' | 'es' | string;
|
|
683
|
+
/** Enable virtualization (auto-enabled if >100 cards) */
|
|
684
|
+
enableVirtualization?: boolean;
|
|
685
|
+
/** Enable AI features */
|
|
686
|
+
enableAI?: boolean;
|
|
687
|
+
/** Animation duration in milliseconds */
|
|
688
|
+
animationDuration?: number;
|
|
689
|
+
/** Fixed column width in pixels */
|
|
690
|
+
columnWidth?: number;
|
|
691
|
+
/** Estimated card height for virtualization */
|
|
692
|
+
cardHeight?: number;
|
|
693
|
+
/** Enable keyboard shortcuts */
|
|
694
|
+
enableKeyboardShortcuts?: boolean;
|
|
695
|
+
/** Show card count in column headers */
|
|
696
|
+
showCardCount?: boolean;
|
|
697
|
+
/** Show WIP limits */
|
|
698
|
+
showWipLimits?: boolean;
|
|
699
|
+
/** Enable column collapsing */
|
|
700
|
+
enableCollapsible?: boolean;
|
|
701
|
+
/** Maximum cards to display per column before showing "show more" */
|
|
702
|
+
maxCardsPerColumn?: number;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Render props for customization
|
|
706
|
+
*/
|
|
707
|
+
interface RenderProps {
|
|
708
|
+
/** Custom card renderer */
|
|
709
|
+
renderCard?: (card: Card$1) => React.ReactNode;
|
|
710
|
+
/** Custom column renderer */
|
|
711
|
+
renderColumn?: (column: Column$1, cards: Card$1[]) => React.ReactNode;
|
|
712
|
+
/** Custom card overlay during drag */
|
|
713
|
+
renderCardOverlay?: (card: Card$1) => React.ReactNode;
|
|
714
|
+
/** Custom column header */
|
|
715
|
+
renderColumnHeader?: (column: Column$1, cardCount: number) => React.ReactNode;
|
|
716
|
+
/** Custom empty state */
|
|
717
|
+
renderEmptyState?: (column: Column$1) => React.ReactNode;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* User entity for assignment
|
|
721
|
+
*/
|
|
722
|
+
interface User$1 {
|
|
554
723
|
id: string;
|
|
555
|
-
/** Template name */
|
|
556
724
|
name: string;
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
icon?: string;
|
|
561
|
-
/** Pre-filled card data */
|
|
562
|
-
template: Partial<Omit<Card$1, 'id' | 'position' | 'columnId'>>;
|
|
563
|
-
/** Category for organization */
|
|
564
|
-
category?: string;
|
|
725
|
+
initials: string;
|
|
726
|
+
color: string;
|
|
727
|
+
avatar?: string;
|
|
565
728
|
}
|
|
566
729
|
/**
|
|
567
|
-
*
|
|
730
|
+
* Main KanbanBoard component props
|
|
568
731
|
*/
|
|
569
|
-
|
|
732
|
+
interface KanbanBoardProps {
|
|
733
|
+
/** Board data (controlled) */
|
|
734
|
+
board: Board;
|
|
735
|
+
/** Callbacks for mutations */
|
|
736
|
+
callbacks: BoardCallbacks;
|
|
737
|
+
/** AI callbacks (optional) */
|
|
738
|
+
aiCallbacks?: AICallbacks;
|
|
739
|
+
/** Card click handler */
|
|
740
|
+
onCardClick?: (card: Card$1) => void;
|
|
741
|
+
/** Render customization */
|
|
742
|
+
renderProps?: RenderProps;
|
|
743
|
+
/** Configuration */
|
|
744
|
+
config?: BoardConfig;
|
|
745
|
+
/** Available users for assignment */
|
|
746
|
+
availableUsers?: User$1[];
|
|
747
|
+
/** Custom CSS class */
|
|
748
|
+
className?: string;
|
|
749
|
+
/** Custom inline styles */
|
|
750
|
+
style?: React.CSSProperties;
|
|
751
|
+
/** Loading state */
|
|
752
|
+
isLoading?: boolean;
|
|
753
|
+
/** Error state */
|
|
754
|
+
error?: Error | string;
|
|
755
|
+
}
|
|
570
756
|
/**
|
|
571
|
-
*
|
|
757
|
+
* Drag event data
|
|
572
758
|
*/
|
|
573
|
-
interface
|
|
574
|
-
/**
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
759
|
+
interface DragData {
|
|
760
|
+
/** Card being dragged */
|
|
761
|
+
card: Card$1;
|
|
762
|
+
/** Source column ID */
|
|
763
|
+
sourceColumnId: string;
|
|
764
|
+
/** Source position */
|
|
765
|
+
sourcePosition: number;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Drop event data
|
|
769
|
+
*/
|
|
770
|
+
interface DropData {
|
|
771
|
+
/** Card being dropped */
|
|
772
|
+
card: Card$1;
|
|
773
|
+
/** Target column ID */
|
|
774
|
+
targetColumnId: string;
|
|
775
|
+
/** Target position */
|
|
776
|
+
targetPosition: number;
|
|
777
|
+
/** Source column ID */
|
|
778
|
+
sourceColumnId: string;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Filter criteria for cards
|
|
782
|
+
*/
|
|
783
|
+
interface CardFilter {
|
|
784
|
+
/** Filter by assignee */
|
|
785
|
+
assigneeIds?: string[];
|
|
786
|
+
/** Filter by priority */
|
|
787
|
+
priorities?: Priority[];
|
|
788
|
+
/** Filter by labels */
|
|
789
|
+
labels?: string[];
|
|
790
|
+
/** Search in title/description */
|
|
791
|
+
search?: string;
|
|
792
|
+
/** Filter by date range */
|
|
585
793
|
dateRange?: {
|
|
586
794
|
start: Date | string;
|
|
587
795
|
end: Date | string;
|
|
588
796
|
};
|
|
589
797
|
}
|
|
590
798
|
/**
|
|
591
|
-
*
|
|
799
|
+
* Sort options for cards
|
|
592
800
|
*/
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
cardsImported?: number;
|
|
598
|
-
/** Number of columns imported */
|
|
599
|
-
columnsImported?: number;
|
|
600
|
-
/** Errors encountered */
|
|
601
|
-
errors?: string[];
|
|
602
|
-
/** Warnings */
|
|
603
|
-
warnings?: string[];
|
|
801
|
+
type CardSortKey = 'position' | 'priority' | 'dueDate' | 'createdAt' | 'title';
|
|
802
|
+
interface CardSort {
|
|
803
|
+
key: CardSortKey;
|
|
804
|
+
direction: 'asc' | 'desc';
|
|
604
805
|
}
|
|
605
|
-
|
|
606
806
|
/**
|
|
607
|
-
*
|
|
608
|
-
* @module views/KanbanViewAdapter
|
|
609
|
-
*
|
|
610
|
-
* Implements the ViewAdapter interface from @libxai/core to enable
|
|
611
|
-
* the Kanban board to work with AsakaaRuntime and ViewRegistry.
|
|
807
|
+
* Comment on a card
|
|
612
808
|
*/
|
|
613
|
-
|
|
809
|
+
interface Comment {
|
|
810
|
+
/** Unique identifier */
|
|
811
|
+
id: string;
|
|
812
|
+
/** Card ID */
|
|
813
|
+
cardId: string;
|
|
814
|
+
/** Author user ID */
|
|
815
|
+
authorId: string;
|
|
816
|
+
/** Comment content */
|
|
817
|
+
content: string;
|
|
818
|
+
/** Timestamp */
|
|
819
|
+
createdAt: Date | string;
|
|
820
|
+
/** Last update timestamp */
|
|
821
|
+
updatedAt?: Date | string;
|
|
822
|
+
/** Mentions (user IDs) */
|
|
823
|
+
mentions?: string[];
|
|
824
|
+
}
|
|
614
825
|
/**
|
|
615
|
-
*
|
|
826
|
+
* Activity log entry types
|
|
616
827
|
*/
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Board callbacks
|
|
620
|
-
*/
|
|
621
|
-
callbacks?: KanbanBoardProps['callbacks'];
|
|
622
|
-
/**
|
|
623
|
-
* Card click handler
|
|
624
|
-
*/
|
|
625
|
-
onCardClick?: KanbanBoardProps['onCardClick'];
|
|
626
|
-
/**
|
|
627
|
-
* Custom render props
|
|
628
|
-
*/
|
|
629
|
-
renderProps?: KanbanBoardProps['renderProps'];
|
|
630
|
-
/**
|
|
631
|
-
* Board configuration
|
|
632
|
-
*/
|
|
633
|
-
config?: KanbanBoardProps['config'];
|
|
634
|
-
/**
|
|
635
|
-
* Available users for assignment
|
|
636
|
-
*/
|
|
637
|
-
availableUsers?: KanbanBoardProps['availableUsers'];
|
|
638
|
-
/**
|
|
639
|
-
* Custom class name
|
|
640
|
-
*/
|
|
641
|
-
className?: string;
|
|
642
|
-
/**
|
|
643
|
-
* Custom inline styles (React.CSSProperties)
|
|
644
|
-
*/
|
|
645
|
-
style?: React.CSSProperties;
|
|
646
|
-
/**
|
|
647
|
-
* View options
|
|
648
|
-
*/
|
|
649
|
-
viewOptions?: ViewOptions;
|
|
650
|
-
}
|
|
828
|
+
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';
|
|
651
829
|
/**
|
|
652
|
-
*
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
830
|
+
* Activity log entry
|
|
831
|
+
*/
|
|
832
|
+
interface Activity {
|
|
833
|
+
/** Unique identifier */
|
|
834
|
+
id: string;
|
|
835
|
+
/** Activity type */
|
|
836
|
+
type: ActivityType;
|
|
837
|
+
/** Card ID */
|
|
838
|
+
cardId: string;
|
|
839
|
+
/** User who performed the action */
|
|
840
|
+
userId: string;
|
|
841
|
+
/** Timestamp */
|
|
842
|
+
timestamp: Date | string;
|
|
843
|
+
/** Previous value (for updates) */
|
|
844
|
+
previousValue?: any;
|
|
845
|
+
/** New value (for updates) */
|
|
846
|
+
newValue?: any;
|
|
847
|
+
/** Additional metadata */
|
|
848
|
+
metadata?: Record<string, any>;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* File attachment on a card
|
|
852
|
+
*/
|
|
853
|
+
interface Attachment {
|
|
854
|
+
/** Unique identifier */
|
|
855
|
+
id: string;
|
|
856
|
+
/** Card ID */
|
|
857
|
+
cardId: string;
|
|
858
|
+
/** File name */
|
|
859
|
+
name: string;
|
|
860
|
+
/** File size in bytes */
|
|
861
|
+
size: number;
|
|
862
|
+
/** MIME type */
|
|
863
|
+
type: string;
|
|
864
|
+
/** File URL or data URI */
|
|
865
|
+
url: string;
|
|
866
|
+
/** Upload timestamp */
|
|
867
|
+
uploadedAt: Date | string;
|
|
868
|
+
/** User who uploaded */
|
|
869
|
+
uploadedBy: string;
|
|
870
|
+
/** Thumbnail URL (for images) */
|
|
871
|
+
thumbnailUrl?: string;
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Bulk operations callbacks
|
|
875
|
+
*/
|
|
876
|
+
interface BulkOperationsCallbacks {
|
|
877
|
+
/** Called when bulk update is performed */
|
|
878
|
+
onBulkUpdate?: (cardIds: string[], updates: Partial<Card$1>) => void | Promise<void>;
|
|
879
|
+
/** Called when bulk delete is performed */
|
|
880
|
+
onBulkDelete?: (cardIds: string[]) => void | Promise<void>;
|
|
881
|
+
/** Called when bulk move is performed */
|
|
882
|
+
onBulkMove?: (cardIds: string[], targetColumnId: string) => void | Promise<void>;
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Grouping options for swimlanes
|
|
886
|
+
*/
|
|
887
|
+
type GroupByOption = 'none' | 'assignee' | 'priority' | 'label' | 'custom';
|
|
888
|
+
/**
|
|
889
|
+
* Swimlane configuration
|
|
890
|
+
*/
|
|
891
|
+
interface SwimlaneConfig {
|
|
892
|
+
/** Grouping option */
|
|
893
|
+
groupBy: GroupByOption;
|
|
894
|
+
/** Custom field ID (when groupBy is 'custom') */
|
|
895
|
+
customFieldId?: string;
|
|
896
|
+
/** Show empty swimlanes */
|
|
897
|
+
showEmptyLanes?: boolean;
|
|
898
|
+
/** Collapsible swimlanes */
|
|
899
|
+
collapsible?: boolean;
|
|
900
|
+
/** Default collapsed state */
|
|
901
|
+
defaultCollapsed?: boolean;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Swimlane (horizontal row grouping cards)
|
|
905
|
+
*/
|
|
906
|
+
interface Swimlane {
|
|
907
|
+
/** Unique identifier */
|
|
908
|
+
id: string;
|
|
909
|
+
/** Swimlane title */
|
|
910
|
+
title: string;
|
|
911
|
+
/** Group value (user ID, priority, label, etc.) */
|
|
912
|
+
groupValue: any;
|
|
913
|
+
/** Card IDs in this swimlane */
|
|
914
|
+
cardIds: string[];
|
|
915
|
+
/** Is collapsed */
|
|
916
|
+
isCollapsed?: boolean;
|
|
917
|
+
/** Color for visual distinction */
|
|
918
|
+
color?: string;
|
|
919
|
+
/** Icon */
|
|
920
|
+
icon?: string;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Keyboard shortcut action types
|
|
924
|
+
* v0.5.0: Added single-key shortcuts for speed
|
|
925
|
+
*/
|
|
926
|
+
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';
|
|
927
|
+
/**
|
|
928
|
+
* Keyboard shortcut definition
|
|
929
|
+
*/
|
|
930
|
+
interface KeyboardShortcut {
|
|
931
|
+
/** Shortcut key(s) */
|
|
932
|
+
keys: string | string[];
|
|
933
|
+
/** Action to perform */
|
|
934
|
+
action: KeyboardAction;
|
|
935
|
+
/** Description */
|
|
936
|
+
description: string;
|
|
937
|
+
/** Modifier keys required */
|
|
938
|
+
modifiers?: {
|
|
939
|
+
ctrl?: boolean;
|
|
940
|
+
shift?: boolean;
|
|
941
|
+
alt?: boolean;
|
|
942
|
+
meta?: boolean;
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Card template for quick creation
|
|
947
|
+
*/
|
|
948
|
+
interface CardTemplate {
|
|
949
|
+
/** Unique identifier */
|
|
950
|
+
id: string;
|
|
951
|
+
/** Template name */
|
|
952
|
+
name: string;
|
|
953
|
+
/** Template description */
|
|
954
|
+
description?: string;
|
|
955
|
+
/** Icon or emoji */
|
|
956
|
+
icon?: string;
|
|
957
|
+
/** Pre-filled card data */
|
|
958
|
+
template: Partial<Omit<Card$1, 'id' | 'position' | 'columnId'>>;
|
|
959
|
+
/** Category for organization */
|
|
960
|
+
category?: string;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Export format options
|
|
964
|
+
*/
|
|
965
|
+
type ExportFormat = 'json' | 'csv' | 'pdf';
|
|
966
|
+
/**
|
|
967
|
+
* Export options
|
|
968
|
+
*/
|
|
969
|
+
interface ExportOptions {
|
|
970
|
+
/** Format to export */
|
|
971
|
+
format: ExportFormat;
|
|
972
|
+
/** Include card details */
|
|
973
|
+
includeCardDetails?: boolean;
|
|
974
|
+
/** Include comments */
|
|
975
|
+
includeComments?: boolean;
|
|
976
|
+
/** Include activity log */
|
|
977
|
+
includeActivity?: boolean;
|
|
978
|
+
/** Include attachments */
|
|
979
|
+
includeAttachments?: boolean;
|
|
980
|
+
/** Date range filter */
|
|
981
|
+
dateRange?: {
|
|
982
|
+
start: Date | string;
|
|
983
|
+
end: Date | string;
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Import result
|
|
988
|
+
*/
|
|
989
|
+
interface ImportResult {
|
|
990
|
+
/** Was import successful */
|
|
991
|
+
success: boolean;
|
|
992
|
+
/** Number of cards imported */
|
|
993
|
+
cardsImported?: number;
|
|
994
|
+
/** Number of columns imported */
|
|
995
|
+
columnsImported?: number;
|
|
996
|
+
/** Errors encountered */
|
|
997
|
+
errors?: string[];
|
|
998
|
+
/** Warnings */
|
|
999
|
+
warnings?: string[];
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* KanbanViewAdapter - ViewAdapter implementation for Kanban board
|
|
1004
|
+
* @module views/KanbanViewAdapter
|
|
1005
|
+
*
|
|
1006
|
+
* Implements the ViewAdapter interface from @libxai/core to enable
|
|
1007
|
+
* the Kanban board to work with AsakaaRuntime and ViewRegistry.
|
|
1008
|
+
*/
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Kanban view configuration
|
|
1012
|
+
*/
|
|
1013
|
+
interface KanbanViewConfig {
|
|
1014
|
+
/**
|
|
1015
|
+
* Board callbacks
|
|
1016
|
+
*/
|
|
1017
|
+
callbacks?: KanbanBoardProps['callbacks'];
|
|
1018
|
+
/**
|
|
1019
|
+
* Card click handler
|
|
1020
|
+
*/
|
|
1021
|
+
onCardClick?: KanbanBoardProps['onCardClick'];
|
|
1022
|
+
/**
|
|
1023
|
+
* Custom render props
|
|
1024
|
+
*/
|
|
1025
|
+
renderProps?: KanbanBoardProps['renderProps'];
|
|
1026
|
+
/**
|
|
1027
|
+
* Board configuration
|
|
1028
|
+
*/
|
|
1029
|
+
config?: KanbanBoardProps['config'];
|
|
1030
|
+
/**
|
|
1031
|
+
* Available users for assignment
|
|
1032
|
+
*/
|
|
1033
|
+
availableUsers?: KanbanBoardProps['availableUsers'];
|
|
1034
|
+
/**
|
|
1035
|
+
* Custom class name
|
|
1036
|
+
*/
|
|
1037
|
+
className?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Custom inline styles (React.CSSProperties)
|
|
1040
|
+
*/
|
|
1041
|
+
style?: React.CSSProperties;
|
|
1042
|
+
/**
|
|
1043
|
+
* View options
|
|
1044
|
+
*/
|
|
1045
|
+
viewOptions?: ViewOptions;
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* KanbanViewAdapter
|
|
1049
|
+
*
|
|
1050
|
+
* React-based ViewAdapter implementation that wraps the KanbanBoard component.
|
|
1051
|
+
* This allows the Kanban board to be used as a view in the ViewRegistry and
|
|
1052
|
+
* work seamlessly with AsakaaRuntime.
|
|
1053
|
+
*
|
|
1054
|
+
* @example
|
|
1055
|
+
* ```typescript
|
|
1056
|
+
* import { KanbanViewAdapter } from '@libxai/board'
|
|
1057
|
+
* import { ViewRegistry } from '@libxai/core'
|
|
1058
|
+
*
|
|
1059
|
+
* const registry = new ViewRegistry()
|
|
1060
|
+
* const kanbanView = new KanbanViewAdapter({
|
|
665
1061
|
* callbacks: {
|
|
666
1062
|
* onCardMove: (cardId, columnId) => { ... },
|
|
667
1063
|
* onCardUpdate: (cardId, updates) => { ... }
|
|
@@ -1171,8 +1567,12 @@ interface CardDetailModalV2Props {
|
|
|
1171
1567
|
id: string;
|
|
1172
1568
|
title: string;
|
|
1173
1569
|
}>;
|
|
1174
|
-
/** Available labels */
|
|
1570
|
+
/** Available labels (legacy - use availableTags for colored tags) */
|
|
1175
1571
|
availableLabels?: string[];
|
|
1572
|
+
/** v0.17.158: Available tags with colors (ClickUp-style) */
|
|
1573
|
+
availableTags?: TaskTag[];
|
|
1574
|
+
/** v0.17.158: Callback to create a new tag */
|
|
1575
|
+
onCreateTag?: (name: string, color: string) => Promise<TaskTag | null>;
|
|
1176
1576
|
/** Upload cover image callback (optional - returns public URL) */
|
|
1177
1577
|
onUploadCoverImage?: (file: File) => Promise<string>;
|
|
1178
1578
|
/** Unsplash API key for cover images (optional) */
|
|
@@ -1182,7 +1582,7 @@ interface CardDetailModalV2Props {
|
|
|
1182
1582
|
/** Callback when subtasks are changed (for persistence) */
|
|
1183
1583
|
onSubtasksChange?: (cardId: string, subtasks: Subtask[]) => void;
|
|
1184
1584
|
}
|
|
1185
|
-
declare function CardDetailModalV2({ card, isOpen, onClose, onUpdate, onDelete: _onDelete, availableUsers, comments, activities, onAddComment, onDeleteComment: _onDeleteComment, currentUser, onAIGenerateDescription: _onAIGenerateDescription, onAICreateSubtasks: _onAICreateSubtasks, onAIFindSimilar: _onAIFindSimilar, availableColumns, availableLabels, onUploadCoverImage: _onUploadCoverImage, unsplashAccessKey: _unsplashAccessKey, theme, onSubtasksChange, }: CardDetailModalV2Props): react_jsx_runtime.JSX.Element | null;
|
|
1585
|
+
declare function CardDetailModalV2({ card, isOpen, onClose, onUpdate, onDelete: _onDelete, availableUsers, comments, activities, onAddComment, onDeleteComment: _onDeleteComment, currentUser, onAIGenerateDescription: _onAIGenerateDescription, onAICreateSubtasks: _onAICreateSubtasks, onAIFindSimilar: _onAIFindSimilar, availableColumns, availableLabels, availableTags, onCreateTag, onUploadCoverImage: _onUploadCoverImage, unsplashAccessKey: _unsplashAccessKey, theme, onSubtasksChange, }: CardDetailModalV2Props): react_jsx_runtime.JSX.Element | null;
|
|
1186
1586
|
|
|
1187
1587
|
interface AttachmentUploaderProps {
|
|
1188
1588
|
/** Card ID for attachments */
|
|
@@ -1341,530 +1741,136 @@ interface KeyboardShortcutsHelpProps {
|
|
|
1341
1741
|
}
|
|
1342
1742
|
/**
|
|
1343
1743
|
* KeyboardShortcutsHelp Component
|
|
1344
|
-
*/
|
|
1345
|
-
declare function KeyboardShortcutsHelp({ shortcuts, isOpen, onClose, className, }: KeyboardShortcutsHelpProps): react_jsx_runtime.JSX.Element | null;
|
|
1346
|
-
|
|
1347
|
-
interface CardTemplateSelectorProps {
|
|
1348
|
-
/** Available templates */
|
|
1349
|
-
templates: CardTemplate[];
|
|
1350
|
-
/** Template selection handler */
|
|
1351
|
-
onSelectTemplate: (template: CardTemplate) => void;
|
|
1352
|
-
/** Custom className */
|
|
1353
|
-
className?: string;
|
|
1354
|
-
}
|
|
1355
|
-
/**
|
|
1356
|
-
* Default card templates
|
|
1357
|
-
*/
|
|
1358
|
-
declare const DEFAULT_TEMPLATES: CardTemplate[];
|
|
1359
|
-
/**
|
|
1360
|
-
* CardTemplateSelector Component
|
|
1361
|
-
*/
|
|
1362
|
-
declare function CardTemplateSelector({ templates, onSelectTemplate, className, }: CardTemplateSelectorProps): react_jsx_runtime.JSX.Element;
|
|
1363
|
-
|
|
1364
|
-
interface ExportImportModalProps {
|
|
1365
|
-
/** Board data to export */
|
|
1366
|
-
board: Board;
|
|
1367
|
-
/** Is modal open */
|
|
1368
|
-
isOpen: boolean;
|
|
1369
|
-
/** Close handler */
|
|
1370
|
-
onClose: () => void;
|
|
1371
|
-
/** Import handler */
|
|
1372
|
-
onImport?: (result: ImportResult, content: string) => void;
|
|
1373
|
-
/** Board element ref for PDF export */
|
|
1374
|
-
boardElementRef?: React.RefObject<HTMLElement>;
|
|
1375
|
-
/** Custom className */
|
|
1376
|
-
className?: string;
|
|
1377
|
-
}
|
|
1378
|
-
/**
|
|
1379
|
-
* ExportImportModal Component
|
|
1380
|
-
*/
|
|
1381
|
-
declare function ExportImportModal({ board, isOpen, onClose, onImport, boardElementRef, className, }: ExportImportModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1382
|
-
|
|
1383
|
-
type DateFilter = 'all' | 'overdue' | 'today' | 'this-week' | 'custom';
|
|
1384
|
-
type SortBy = 'created' | 'priority' | 'dueDate' | 'title' | 'estimate' | 'none';
|
|
1385
|
-
type SortOrder = 'asc' | 'desc';
|
|
1386
|
-
interface FilterState {
|
|
1387
|
-
dateFilter: DateFilter;
|
|
1388
|
-
dateRange?: {
|
|
1389
|
-
start: Date;
|
|
1390
|
-
end: Date;
|
|
1391
|
-
};
|
|
1392
|
-
priorities: Priority[];
|
|
1393
|
-
assignees: string[];
|
|
1394
|
-
labels: string[];
|
|
1395
|
-
columns: string[];
|
|
1396
|
-
search: string;
|
|
1397
|
-
}
|
|
1398
|
-
interface SortState {
|
|
1399
|
-
by: SortBy;
|
|
1400
|
-
order: SortOrder;
|
|
1401
|
-
}
|
|
1402
|
-
interface UseFiltersOptions {
|
|
1403
|
-
initialFilters?: Partial<FilterState>;
|
|
1404
|
-
initialSort?: Partial<SortState>;
|
|
1405
|
-
currentUserId?: string;
|
|
1406
|
-
}
|
|
1407
|
-
interface UseFiltersReturn {
|
|
1408
|
-
filters: FilterState;
|
|
1409
|
-
sort: SortState;
|
|
1410
|
-
setFilters: (filters: Partial<FilterState>) => void;
|
|
1411
|
-
setSort: (sort: Partial<SortState>) => void;
|
|
1412
|
-
resetFilters: () => void;
|
|
1413
|
-
filterMyTasks: () => void;
|
|
1414
|
-
filterOverdue: () => void;
|
|
1415
|
-
filterHighPriority: () => void;
|
|
1416
|
-
applyFilters: (cards: Card$1[]) => Card$1[];
|
|
1417
|
-
hasActiveFilters: boolean;
|
|
1418
|
-
}
|
|
1419
|
-
/**
|
|
1420
|
-
* Hook for filtering and sorting board cards
|
|
1421
|
-
*
|
|
1422
|
-
* @example
|
|
1423
|
-
* ```tsx
|
|
1424
|
-
* const { filters, setFilters, applyFilters, filterMyTasks } = useFilters({
|
|
1425
|
-
* currentUserId: 'user-1'
|
|
1426
|
-
* })
|
|
1427
|
-
*
|
|
1428
|
-
* const filteredCards = applyFilters(board.cards)
|
|
1429
|
-
* ```
|
|
1430
|
-
*/
|
|
1431
|
-
declare function useFilters({ initialFilters, initialSort, currentUserId, }?: UseFiltersOptions): UseFiltersReturn;
|
|
1432
|
-
|
|
1433
|
-
interface FilterBarProps {
|
|
1434
|
-
filters: FilterState;
|
|
1435
|
-
sort: SortState;
|
|
1436
|
-
onFiltersChange: (filters: Partial<FilterState>) => void;
|
|
1437
|
-
onSortChange: (sort: Partial<SortState>) => void;
|
|
1438
|
-
onReset: () => void;
|
|
1439
|
-
onFilterMyTasks?: () => void;
|
|
1440
|
-
onFilterOverdue?: () => void;
|
|
1441
|
-
onFilterHighPriority?: () => void;
|
|
1442
|
-
availableUsers?: User$1[];
|
|
1443
|
-
availableLabels?: string[];
|
|
1444
|
-
availableColumns?: Array<{
|
|
1445
|
-
id: string;
|
|
1446
|
-
title: string;
|
|
1447
|
-
}>;
|
|
1448
|
-
showQuickFilters?: boolean;
|
|
1449
|
-
compact?: boolean;
|
|
1450
|
-
groupBy?: GroupByOption;
|
|
1451
|
-
onGroupByChange?: (value: GroupByOption) => void;
|
|
1452
|
-
}
|
|
1453
|
-
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;
|
|
1454
|
-
|
|
1455
|
-
interface ConfigMenuProps {
|
|
1456
|
-
onOpenExport: () => void;
|
|
1457
|
-
onOpenThemes: () => void;
|
|
1458
|
-
onOpenShortcuts: () => void;
|
|
1459
|
-
className?: string;
|
|
1460
|
-
viewMode?: 'kanban' | 'gantt';
|
|
1461
|
-
onExportGanttPDF?: () => Promise<void>;
|
|
1462
|
-
onExportGanttExcel?: () => Promise<void>;
|
|
1463
|
-
onExportGanttPNG?: () => Promise<void>;
|
|
1464
|
-
onExportGanttCSV?: () => void;
|
|
1465
|
-
}
|
|
1466
|
-
declare function ConfigMenu({ onOpenExport, onOpenThemes, onOpenShortcuts, className, viewMode, onExportGanttPDF, onExportGanttExcel, onExportGanttPNG, onExportGanttCSV, }: ConfigMenuProps): react_jsx_runtime.JSX.Element;
|
|
1467
|
-
|
|
1468
|
-
interface ThemeModalProps {
|
|
1469
|
-
isOpen: boolean;
|
|
1470
|
-
onClose: () => void;
|
|
1471
|
-
className?: string;
|
|
1472
|
-
}
|
|
1473
|
-
declare function ThemeModal({ isOpen, onClose, className }: ThemeModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1474
|
-
|
|
1475
|
-
interface TaskSegment {
|
|
1476
|
-
startDate: Date;
|
|
1477
|
-
endDate: Date;
|
|
1478
|
-
}
|
|
1479
|
-
/**
|
|
1480
|
-
* v0.17.158: Tag/Label for tasks (ClickUp-style)
|
|
1481
|
-
* Tags are workspace-scoped and can be applied to multiple tasks
|
|
1482
|
-
*/
|
|
1483
|
-
interface TaskTag {
|
|
1484
|
-
id: string;
|
|
1485
|
-
name: string;
|
|
1486
|
-
color: string;
|
|
1487
|
-
}
|
|
1488
|
-
interface Task {
|
|
1489
|
-
id: string;
|
|
1490
|
-
name: string;
|
|
1491
|
-
startDate?: Date;
|
|
1492
|
-
endDate?: Date;
|
|
1493
|
-
progress: number;
|
|
1494
|
-
assignees?: Array<{
|
|
1495
|
-
name: string;
|
|
1496
|
-
avatar?: string;
|
|
1497
|
-
initials: string;
|
|
1498
|
-
color: string;
|
|
1499
|
-
}>;
|
|
1500
|
-
status?: string;
|
|
1501
|
-
dependencies?: string[];
|
|
1502
|
-
subtasks?: Task[];
|
|
1503
|
-
isExpanded?: boolean;
|
|
1504
|
-
isMilestone?: boolean;
|
|
1505
|
-
isCriticalPath?: boolean;
|
|
1506
|
-
color?: string;
|
|
1507
|
-
priority?: 'low' | 'medium' | 'high' | 'urgent';
|
|
1508
|
-
tags?: TaskTag[];
|
|
1509
|
-
segments?: TaskSegment[];
|
|
1510
|
-
parentId?: string;
|
|
1511
|
-
level?: number;
|
|
1512
|
-
position?: number;
|
|
1513
|
-
}
|
|
1514
|
-
type TimeScale = 'day' | 'week' | 'month';
|
|
1515
|
-
type Theme$1 = 'dark' | 'light' | 'neutral';
|
|
1516
|
-
type RowDensity = 'compact' | 'comfortable' | 'spacious';
|
|
1517
|
-
type ColumnType = 'name' | 'startDate' | 'endDate' | 'duration' | 'assignees' | 'status' | 'progress' | 'priority';
|
|
1518
|
-
interface GanttColumn {
|
|
1519
|
-
id: ColumnType;
|
|
1520
|
-
label: string;
|
|
1521
|
-
width: number;
|
|
1522
|
-
minWidth?: number;
|
|
1523
|
-
maxWidth?: number;
|
|
1524
|
-
visible: boolean;
|
|
1525
|
-
sortable?: boolean;
|
|
1526
|
-
resizable?: boolean;
|
|
1527
|
-
}
|
|
1528
|
-
interface Assignee {
|
|
1529
|
-
name: string;
|
|
1530
|
-
initials: string;
|
|
1531
|
-
color: string;
|
|
1532
|
-
}
|
|
1533
|
-
interface GanttTheme {
|
|
1534
|
-
bgPrimary: string;
|
|
1535
|
-
bgSecondary: string;
|
|
1536
|
-
bgGrid: string;
|
|
1537
|
-
bgWeekend: string;
|
|
1538
|
-
border: string;
|
|
1539
|
-
borderLight: string;
|
|
1540
|
-
textPrimary: string;
|
|
1541
|
-
textSecondary: string;
|
|
1542
|
-
textTertiary: string;
|
|
1543
|
-
accent: string;
|
|
1544
|
-
accentHover: string;
|
|
1545
|
-
accentLight: string;
|
|
1546
|
-
taskBarPrimary: string;
|
|
1547
|
-
taskBarProgress: string;
|
|
1548
|
-
taskBarHandle: string;
|
|
1549
|
-
dependency: string;
|
|
1550
|
-
dependencyHover: string;
|
|
1551
|
-
criticalPath: string;
|
|
1552
|
-
criticalPathLight: string;
|
|
1553
|
-
today: string;
|
|
1554
|
-
todayLight: string;
|
|
1555
|
-
milestone: string;
|
|
1556
|
-
milestoneLight: string;
|
|
1557
|
-
statusTodo: string;
|
|
1558
|
-
statusInProgress: string;
|
|
1559
|
-
statusCompleted: string;
|
|
1560
|
-
hoverBg: string;
|
|
1561
|
-
focusRing: string;
|
|
1562
|
-
}
|
|
1563
|
-
/**
|
|
1564
|
-
* Templates for customizing Gantt rendering
|
|
1565
|
-
* Similar to DHTMLX gantt.templates.*
|
|
1566
|
-
*/
|
|
1567
|
-
interface GanttTemplates {
|
|
1568
|
-
/**
|
|
1569
|
-
* Customize task tooltip content
|
|
1570
|
-
* @param task - The task to render tooltip for
|
|
1571
|
-
* @returns Tooltip content (string or JSX)
|
|
1572
|
-
*/
|
|
1573
|
-
taskTooltip?: (task: Task) => string | React.ReactNode;
|
|
1574
|
-
/**
|
|
1575
|
-
* Customize task label in timeline
|
|
1576
|
-
* @param task - The task to render label for
|
|
1577
|
-
* @returns Label content (string or JSX)
|
|
1578
|
-
*/
|
|
1579
|
-
taskLabel?: (task: Task) => string | React.ReactNode;
|
|
1580
|
-
/**
|
|
1581
|
-
* Customize grid cell content
|
|
1582
|
-
* @param task - The task for this row
|
|
1583
|
-
* @param column - The column type
|
|
1584
|
-
* @param value - Default cell value
|
|
1585
|
-
* @returns Cell content (string or JSX)
|
|
1586
|
-
*/
|
|
1587
|
-
gridCell?: (task: Task, column: ColumnType, value: any) => string | React.ReactNode;
|
|
1588
|
-
/**
|
|
1589
|
-
* Add custom CSS classes to task bar
|
|
1590
|
-
* @param task - The task to style
|
|
1591
|
-
* @returns Space-separated CSS class names
|
|
1592
|
-
*/
|
|
1593
|
-
taskClass?: (task: Task) => string;
|
|
1594
|
-
/**
|
|
1595
|
-
* Customize milestone rendering
|
|
1596
|
-
* @param task - The milestone task
|
|
1597
|
-
* @returns Milestone content (string or JSX)
|
|
1598
|
-
*/
|
|
1599
|
-
milestoneContent?: (task: Task) => string | React.ReactNode;
|
|
1600
|
-
/**
|
|
1601
|
-
* Format date display
|
|
1602
|
-
* @param date - Date to format
|
|
1603
|
-
* @returns Formatted date string
|
|
1604
|
-
*/
|
|
1605
|
-
dateFormat?: (date: Date) => string;
|
|
1606
|
-
/**
|
|
1607
|
-
* Format duration display
|
|
1608
|
-
* @param days - Duration in days
|
|
1609
|
-
* @returns Formatted duration string
|
|
1610
|
-
*/
|
|
1611
|
-
durationFormat?: (days: number) => string;
|
|
1612
|
-
/**
|
|
1613
|
-
* Format progress display
|
|
1614
|
-
* @param progress - Progress percentage (0-100)
|
|
1615
|
-
* @returns Formatted progress string
|
|
1616
|
-
*/
|
|
1617
|
-
progressFormat?: (progress: number) => string;
|
|
1618
|
-
}
|
|
1619
|
-
/**
|
|
1620
|
-
* Permissions interface for controlling Gantt operations
|
|
1621
|
-
* Useful for integrating with authorization libraries like CASL
|
|
1622
|
-
* @example
|
|
1623
|
-
*
|
|
1624
|
-
* // With CASL integration
|
|
1625
|
-
* const ability = useAbility();
|
|
1626
|
-
*
|
|
1627
|
-
* <GanttBoard
|
|
1628
|
-
* tasks={tasks}
|
|
1629
|
-
* config={{
|
|
1630
|
-
* permissions: {
|
|
1631
|
-
* canCreateTask: ability.can('create', 'Task'),
|
|
1632
|
-
* canUpdateTask: ability.can('update', 'Task'),
|
|
1633
|
-
* canDeleteTask: ability.can('delete', 'Task'),
|
|
1634
|
-
* canCreateDependency: ability.can('create', 'Dependency'),
|
|
1635
|
-
* canUpdateProgress: ability.can('update', 'TaskProgress'),
|
|
1636
|
-
* }
|
|
1637
|
-
* }}
|
|
1638
|
-
* />
|
|
1639
|
-
*
|
|
1640
|
-
*/
|
|
1641
|
-
interface GanttPermissions {
|
|
1642
|
-
canCreateTask?: boolean;
|
|
1643
|
-
canUpdateTask?: boolean;
|
|
1644
|
-
canDeleteTask?: boolean;
|
|
1645
|
-
canCreateDependency?: boolean;
|
|
1646
|
-
canDeleteDependency?: boolean;
|
|
1647
|
-
canUpdateProgress?: boolean;
|
|
1648
|
-
canAssignUsers?: boolean;
|
|
1649
|
-
canModifyHierarchy?: boolean;
|
|
1650
|
-
canDuplicateTask?: boolean;
|
|
1651
|
-
canReorderTasks?: boolean;
|
|
1652
|
-
canExport?: boolean;
|
|
1653
|
-
canToggleExpansion?: boolean;
|
|
1654
|
-
canPerformAction?: (task: Task, action: 'create' | 'update' | 'delete' | 'assign' | 'progress') => boolean;
|
|
1655
|
-
}
|
|
1656
|
-
/**
|
|
1657
|
-
* Scroll behavior configuration for timeline interactions
|
|
1658
|
-
* Controls how the Gantt chart viewport behaves during user interactions
|
|
1659
|
-
*
|
|
1660
|
-
* @example
|
|
1661
|
-
* // Disable all automatic scrolling during drag operations
|
|
1662
|
-
* <GanttBoard
|
|
1663
|
-
* config={{
|
|
1664
|
-
* scrollBehavior: {
|
|
1665
|
-
* preventAutoScroll: true,
|
|
1666
|
-
* axis: 'horizontal'
|
|
1667
|
-
* }
|
|
1668
|
-
* }}
|
|
1669
|
-
* />
|
|
1670
|
-
*
|
|
1671
|
-
* @example
|
|
1672
|
-
* // Allow vertical auto-scroll but prevent horizontal
|
|
1673
|
-
* <GanttBoard
|
|
1674
|
-
* config={{
|
|
1675
|
-
* scrollBehavior: {
|
|
1676
|
-
* preventAutoScroll: true,
|
|
1677
|
-
* axis: 'horizontal',
|
|
1678
|
-
* onScrollPrevented: (axis, scrollDelta) => {
|
|
1679
|
-
* console.log(`Prevented ${axis} scroll by ${scrollDelta}px`);
|
|
1680
|
-
* }
|
|
1681
|
-
* }
|
|
1682
|
-
* }}
|
|
1683
|
-
* />
|
|
1684
|
-
*/
|
|
1685
|
-
interface GanttScrollBehavior {
|
|
1686
|
-
/**
|
|
1687
|
-
* Prevent automatic viewport scrolling during drag operations
|
|
1688
|
-
* When true, the viewport will not automatically center on dragged tasks
|
|
1689
|
-
* Users can still manually scroll using scrollbars or mouse wheel
|
|
1690
|
-
* @default false
|
|
1691
|
-
*/
|
|
1692
|
-
preventAutoScroll?: boolean;
|
|
1693
|
-
/**
|
|
1694
|
-
* Which axis to prevent auto-scroll on
|
|
1695
|
-
* - 'horizontal': Only prevent horizontal auto-scroll (recommended for Gantt charts)
|
|
1696
|
-
* - 'vertical': Only prevent vertical auto-scroll
|
|
1697
|
-
* - 'both': Prevent both horizontal and vertical auto-scroll
|
|
1698
|
-
* @default 'horizontal'
|
|
1699
|
-
*/
|
|
1700
|
-
axis?: 'horizontal' | 'vertical' | 'both';
|
|
1701
|
-
/**
|
|
1702
|
-
* Callback fired when auto-scroll is prevented
|
|
1703
|
-
* Useful for debugging or showing user feedback
|
|
1704
|
-
* @param axis - Which axis was prevented ('x' or 'y')
|
|
1705
|
-
* @param scrollDelta - How many pixels of scroll were prevented
|
|
1706
|
-
*/
|
|
1707
|
-
onScrollPrevented?: (axis: 'x' | 'y', scrollDelta: number) => void;
|
|
1708
|
-
/**
|
|
1709
|
-
* Allow auto-scroll if task would go out of viewport bounds
|
|
1710
|
-
* When true, auto-scroll is only prevented if task remains visible
|
|
1711
|
-
* @default false
|
|
1712
|
-
*/
|
|
1713
|
-
allowScrollWhenOutOfBounds?: boolean;
|
|
1744
|
+
*/
|
|
1745
|
+
declare function KeyboardShortcutsHelp({ shortcuts, isOpen, onClose, className, }: KeyboardShortcutsHelpProps): react_jsx_runtime.JSX.Element | null;
|
|
1746
|
+
|
|
1747
|
+
interface CardTemplateSelectorProps {
|
|
1748
|
+
/** Available templates */
|
|
1749
|
+
templates: CardTemplate[];
|
|
1750
|
+
/** Template selection handler */
|
|
1751
|
+
onSelectTemplate: (template: CardTemplate) => void;
|
|
1752
|
+
/** Custom className */
|
|
1753
|
+
className?: string;
|
|
1714
1754
|
}
|
|
1715
1755
|
/**
|
|
1716
|
-
*
|
|
1717
|
-
* @version 0.17.42
|
|
1756
|
+
* Default card templates
|
|
1718
1757
|
*/
|
|
1719
|
-
|
|
1720
|
-
id: string;
|
|
1721
|
-
role: 'user' | 'assistant';
|
|
1722
|
-
content: string;
|
|
1723
|
-
timestamp: Date;
|
|
1724
|
-
command?: AICommandResult;
|
|
1725
|
-
isLoading?: boolean;
|
|
1726
|
-
}
|
|
1758
|
+
declare const DEFAULT_TEMPLATES: CardTemplate[];
|
|
1727
1759
|
/**
|
|
1728
|
-
*
|
|
1729
|
-
* @version 0.17.42
|
|
1760
|
+
* CardTemplateSelector Component
|
|
1730
1761
|
*/
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
/**
|
|
1735
|
-
|
|
1736
|
-
/**
|
|
1737
|
-
|
|
1762
|
+
declare function CardTemplateSelector({ templates, onSelectTemplate, className, }: CardTemplateSelectorProps): react_jsx_runtime.JSX.Element;
|
|
1763
|
+
|
|
1764
|
+
interface ExportImportModalProps {
|
|
1765
|
+
/** Board data to export */
|
|
1766
|
+
board: Board;
|
|
1767
|
+
/** Is modal open */
|
|
1768
|
+
isOpen: boolean;
|
|
1769
|
+
/** Close handler */
|
|
1770
|
+
onClose: () => void;
|
|
1771
|
+
/** Import handler */
|
|
1772
|
+
onImport?: (result: ImportResult, content: string) => void;
|
|
1773
|
+
/** Board element ref for PDF export */
|
|
1774
|
+
boardElementRef?: React.RefObject<HTMLElement>;
|
|
1775
|
+
/** Custom className */
|
|
1776
|
+
className?: string;
|
|
1738
1777
|
}
|
|
1739
1778
|
/**
|
|
1740
|
-
*
|
|
1741
|
-
* @version 0.14.0
|
|
1742
|
-
* @updated 0.17.42 - Added persistHistory option
|
|
1779
|
+
* ExportImportModal Component
|
|
1743
1780
|
*/
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1781
|
+
declare function ExportImportModal({ board, isOpen, onClose, onImport, boardElementRef, className, }: ExportImportModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1782
|
+
|
|
1783
|
+
type DateFilter = 'all' | 'overdue' | 'today' | 'this-week' | 'custom';
|
|
1784
|
+
type SortBy = 'created' | 'priority' | 'dueDate' | 'title' | 'estimate' | 'none';
|
|
1785
|
+
type SortOrder = 'asc' | 'desc';
|
|
1786
|
+
interface FilterState {
|
|
1787
|
+
dateFilter: DateFilter;
|
|
1788
|
+
dateRange?: {
|
|
1789
|
+
start: Date;
|
|
1790
|
+
end: Date;
|
|
1791
|
+
};
|
|
1792
|
+
priorities: Priority[];
|
|
1793
|
+
assignees: string[];
|
|
1794
|
+
labels: string[];
|
|
1795
|
+
columns: string[];
|
|
1796
|
+
search: string;
|
|
1797
|
+
}
|
|
1798
|
+
interface SortState {
|
|
1799
|
+
by: SortBy;
|
|
1800
|
+
order: SortOrder;
|
|
1801
|
+
}
|
|
1802
|
+
interface UseFiltersOptions {
|
|
1803
|
+
initialFilters?: Partial<FilterState>;
|
|
1804
|
+
initialSort?: Partial<SortState>;
|
|
1805
|
+
currentUserId?: string;
|
|
1806
|
+
}
|
|
1807
|
+
interface UseFiltersReturn {
|
|
1808
|
+
filters: FilterState;
|
|
1809
|
+
sort: SortState;
|
|
1810
|
+
setFilters: (filters: Partial<FilterState>) => void;
|
|
1811
|
+
setSort: (sort: Partial<SortState>) => void;
|
|
1812
|
+
resetFilters: () => void;
|
|
1813
|
+
filterMyTasks: () => void;
|
|
1814
|
+
filterOverdue: () => void;
|
|
1815
|
+
filterHighPriority: () => void;
|
|
1816
|
+
applyFilters: (cards: Card$1[]) => Card$1[];
|
|
1817
|
+
hasActiveFilters: boolean;
|
|
1759
1818
|
}
|
|
1760
1819
|
/**
|
|
1761
|
-
*
|
|
1762
|
-
*
|
|
1820
|
+
* Hook for filtering and sorting board cards
|
|
1821
|
+
*
|
|
1822
|
+
* @example
|
|
1823
|
+
* ```tsx
|
|
1824
|
+
* const { filters, setFilters, applyFilters, filterMyTasks } = useFilters({
|
|
1825
|
+
* currentUserId: 'user-1'
|
|
1826
|
+
* })
|
|
1827
|
+
*
|
|
1828
|
+
* const filteredCards = applyFilters(board.cards)
|
|
1829
|
+
* ```
|
|
1763
1830
|
*/
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
timeScale?: TimeScale;
|
|
1779
|
-
rowDensity?: RowDensity;
|
|
1780
|
-
showThemeSelector?: boolean;
|
|
1781
|
-
showExportButton?: boolean;
|
|
1782
|
-
availableUsers?: Array<{
|
|
1831
|
+
declare function useFilters({ initialFilters, initialSort, currentUserId, }?: UseFiltersOptions): UseFiltersReturn;
|
|
1832
|
+
|
|
1833
|
+
interface FilterBarProps {
|
|
1834
|
+
filters: FilterState;
|
|
1835
|
+
sort: SortState;
|
|
1836
|
+
onFiltersChange: (filters: Partial<FilterState>) => void;
|
|
1837
|
+
onSortChange: (sort: Partial<SortState>) => void;
|
|
1838
|
+
onReset: () => void;
|
|
1839
|
+
onFilterMyTasks?: () => void;
|
|
1840
|
+
onFilterOverdue?: () => void;
|
|
1841
|
+
onFilterHighPriority?: () => void;
|
|
1842
|
+
availableUsers?: User$1[];
|
|
1843
|
+
availableLabels?: string[];
|
|
1844
|
+
availableColumns?: Array<{
|
|
1783
1845
|
id: string;
|
|
1784
|
-
|
|
1785
|
-
initials: string;
|
|
1786
|
-
color: string;
|
|
1846
|
+
title: string;
|
|
1787
1847
|
}>;
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
templates?: GanttTemplates;
|
|
1806
|
-
permissions?: GanttPermissions;
|
|
1807
|
-
disableScrollSync?: boolean;
|
|
1808
|
-
/**
|
|
1809
|
-
* v0.9.2: Advanced scroll behavior configuration
|
|
1810
|
-
* Controls how the timeline viewport behaves during drag operations
|
|
1811
|
-
* Provides fine-grained control over auto-scroll prevention with events
|
|
1812
|
-
* @see GanttScrollBehavior
|
|
1813
|
-
*/
|
|
1814
|
-
scrollBehavior?: GanttScrollBehavior;
|
|
1815
|
-
/**
|
|
1816
|
-
* v0.11.1: Enable automatic Critical Path Method (CPM) calculation
|
|
1817
|
-
* When true (default), tasks with zero slack are automatically marked as critical (red)
|
|
1818
|
-
* When false, preserves custom task colors and disables automatic CPM marking
|
|
1819
|
-
* @default true
|
|
1820
|
-
*/
|
|
1821
|
-
enableAutoCriticalPath?: boolean;
|
|
1822
|
-
onThemeChange?: (theme: Theme$1) => void;
|
|
1823
|
-
onTaskClick?: (task: Task) => void;
|
|
1824
|
-
onTaskDblClick?: (task: Task) => void;
|
|
1825
|
-
onTaskContextMenu?: (task: Task, event: React.MouseEvent) => void;
|
|
1826
|
-
onTaskUpdate?: (task: Task) => void;
|
|
1827
|
-
onTaskDateChange?: (task: Task, startDate: Date, endDate: Date) => void;
|
|
1828
|
-
onProgressChange?: (taskId: string, oldProgress: number, newProgress: number) => void;
|
|
1829
|
-
/**
|
|
1830
|
-
* Called when user clicks "Edit Task" in context menu
|
|
1831
|
-
* If not provided, the built-in TaskFormModal will be used
|
|
1832
|
-
*/
|
|
1833
|
-
onTaskEdit?: (task: Task) => void;
|
|
1834
|
-
/**
|
|
1835
|
-
* Called when user clicks "Add Subtask" in context menu
|
|
1836
|
-
* If not provided, the built-in subtask creation will be used
|
|
1837
|
-
*/
|
|
1838
|
-
onTaskAddSubtask?: (parentTask: Task) => void;
|
|
1839
|
-
/**
|
|
1840
|
-
* Called when user clicks "Mark Incomplete" in context menu
|
|
1841
|
-
* Sets task status to 'todo' and progress to 0
|
|
1842
|
-
*/
|
|
1843
|
-
onTaskMarkIncomplete?: (task: Task) => void;
|
|
1844
|
-
/**
|
|
1845
|
-
* Called when user clicks "Set In Progress" in context menu
|
|
1846
|
-
* Sets task status to 'in-progress'
|
|
1847
|
-
*/
|
|
1848
|
-
onTaskSetInProgress?: (task: Task) => void;
|
|
1849
|
-
onDependencyCreate?: (fromTaskId: string, toTaskId: string) => void;
|
|
1850
|
-
onDependencyDelete?: (taskId: string, dependencyId: string) => void;
|
|
1851
|
-
onBeforeTaskAdd?: (task: Task) => boolean | void | Promise<boolean | void>;
|
|
1852
|
-
onAfterTaskAdd?: (task: Task) => void;
|
|
1853
|
-
onBeforeTaskUpdate?: (taskId: string, newData: Partial<Task>) => boolean | void | Promise<boolean | void>;
|
|
1854
|
-
onAfterTaskUpdate?: (task: Task) => void;
|
|
1855
|
-
onBeforeTaskDelete?: (taskId: string) => boolean | void | Promise<boolean | void>;
|
|
1856
|
-
onAfterTaskDelete?: (taskId: string) => void;
|
|
1857
|
-
onTaskCreate?: (parentId: string | undefined, position: number) => void;
|
|
1858
|
-
onTaskDelete?: (taskId: string) => void;
|
|
1859
|
-
onMultiTaskDelete?: (taskIds: string[]) => void;
|
|
1860
|
-
onTaskDuplicate?: (taskId: string) => void;
|
|
1861
|
-
onTaskMove?: (taskId: string, direction: 'up' | 'down') => void;
|
|
1862
|
-
onTaskIndent?: (taskId: string) => void;
|
|
1863
|
-
onTaskOutdent?: (taskId: string) => void;
|
|
1864
|
-
onTaskRename?: (taskId: string, newName: string) => void;
|
|
1865
|
-
onTaskToggleExpand?: (taskId: string) => void;
|
|
1866
|
-
onTaskReparent?: (taskId: string, newParentId: string | null, position?: number) => void;
|
|
1848
|
+
showQuickFilters?: boolean;
|
|
1849
|
+
compact?: boolean;
|
|
1850
|
+
groupBy?: GroupByOption;
|
|
1851
|
+
onGroupByChange?: (value: GroupByOption) => void;
|
|
1852
|
+
}
|
|
1853
|
+
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;
|
|
1854
|
+
|
|
1855
|
+
interface ConfigMenuProps {
|
|
1856
|
+
onOpenExport: () => void;
|
|
1857
|
+
onOpenThemes: () => void;
|
|
1858
|
+
onOpenShortcuts: () => void;
|
|
1859
|
+
className?: string;
|
|
1860
|
+
viewMode?: 'kanban' | 'gantt';
|
|
1861
|
+
onExportGanttPDF?: () => Promise<void>;
|
|
1862
|
+
onExportGanttExcel?: () => Promise<void>;
|
|
1863
|
+
onExportGanttPNG?: () => Promise<void>;
|
|
1864
|
+
onExportGanttCSV?: () => void;
|
|
1867
1865
|
}
|
|
1866
|
+
declare function ConfigMenu({ onOpenExport, onOpenThemes, onOpenShortcuts, className, viewMode, onExportGanttPDF, onExportGanttExcel, onExportGanttPNG, onExportGanttCSV, }: ConfigMenuProps): react_jsx_runtime.JSX.Element;
|
|
1867
|
+
|
|
1868
|
+
interface ThemeModalProps {
|
|
1869
|
+
isOpen: boolean;
|
|
1870
|
+
onClose: () => void;
|
|
1871
|
+
className?: string;
|
|
1872
|
+
}
|
|
1873
|
+
declare function ThemeModal({ isOpen, onClose, className }: ThemeModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1868
1874
|
|
|
1869
1875
|
/**
|
|
1870
1876
|
* GanttBoardRef - Imperative API for GanttBoard component
|