@ram_28/kf-ai-sdk 1.0.10 → 1.0.12
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/README.md +55 -48
- package/dist/api/client.d.ts +23 -13
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/datetime.d.ts +5 -5
- package/dist/api/datetime.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/metadata.d.ts +2 -2
- package/dist/api/metadata.d.ts.map +1 -1
- package/dist/api.cjs +1 -0
- package/dist/api.d.ts +4 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.mjs +27 -0
- package/dist/api.types.cjs +1 -0
- package/dist/api.types.d.ts +4 -0
- package/dist/api.types.d.ts.map +1 -0
- package/dist/api.types.mjs +1 -0
- package/dist/auth/AuthProvider.d.ts +3 -3
- package/dist/auth/AuthProvider.d.ts.map +1 -1
- package/dist/auth/authClient.d.ts +4 -4
- package/dist/auth/authClient.d.ts.map +1 -1
- package/dist/auth/authConfig.d.ts +5 -5
- package/dist/auth/authConfig.d.ts.map +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/types.d.ts +21 -21
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/useAuth.d.ts +2 -2
- package/dist/auth/useAuth.d.ts.map +1 -1
- package/dist/auth.cjs +1 -0
- package/dist/auth.d.ts +5 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.mjs +280 -0
- package/dist/auth.types.cjs +1 -0
- package/dist/auth.types.d.ts +2 -0
- package/dist/auth.types.d.ts.map +1 -0
- package/dist/auth.types.mjs +1 -0
- package/dist/base-types.d.ts +2 -0
- package/dist/base-types.d.ts.map +1 -0
- package/dist/client-C15j4O5B.cjs +1 -0
- package/dist/client-CfvLiGfP.js +233 -0
- package/dist/cn-Dr87sK3i.js +2775 -0
- package/dist/cn-mXUIg4vp.cjs +1 -0
- package/dist/components/hooks/index.d.ts +3 -3
- package/dist/components/hooks/index.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/index.d.ts +2 -2
- package/dist/components/hooks/useFilter/index.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/types.d.ts +19 -31
- package/dist/components/hooks/useFilter/types.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/useFilter.d.ts +2 -2
- package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -1
- package/dist/components/hooks/useForm/apiClient.d.ts +6 -6
- package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -1
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +7 -7
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/index.d.ts +5 -5
- package/dist/components/hooks/useForm/index.d.ts.map +1 -1
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +10 -10
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +7 -12
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts +7 -7
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/types.d.ts +79 -70
- package/dist/components/hooks/useForm/types.d.ts.map +1 -1
- package/dist/components/hooks/useForm/useForm.d.ts +2 -2
- package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/apiClient.d.ts +16 -16
- package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/context.d.ts +3 -3
- package/dist/components/hooks/useKanban/context.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/dragDropManager.d.ts +7 -7
- package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/index.d.ts +1 -1
- package/dist/components/hooks/useKanban/index.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/types.d.ts +65 -67
- package/dist/components/hooks/useKanban/types.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/useKanban.d.ts +2 -2
- package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -1
- package/dist/components/hooks/useTable/index.d.ts +1 -1
- package/dist/components/hooks/useTable/index.d.ts.map +1 -1
- package/dist/components/hooks/useTable/types.d.ts +10 -10
- package/dist/components/hooks/useTable/types.d.ts.map +1 -1
- package/dist/components/hooks/useTable/useTable.d.ts +2 -2
- package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
- package/dist/filter.cjs +1 -0
- package/dist/filter.d.ts +3 -0
- package/dist/filter.d.ts.map +1 -0
- package/dist/filter.mjs +6 -0
- package/dist/filter.types.cjs +1 -0
- package/dist/filter.types.d.ts +2 -0
- package/dist/filter.types.d.ts.map +1 -0
- package/dist/filter.types.mjs +1 -0
- package/dist/form.cjs +1 -0
- package/dist/form.d.ts +3 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.mjs +1346 -0
- package/dist/form.types.cjs +1 -0
- package/dist/form.types.d.ts +2 -0
- package/dist/form.types.d.ts.map +1 -0
- package/dist/form.types.mjs +1 -0
- package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
- package/dist/jsx-runtime-DGlMoOmv.js +630 -0
- package/dist/kanban.cjs +13 -0
- package/dist/kanban.d.ts +5 -0
- package/dist/kanban.d.ts.map +1 -0
- package/dist/kanban.mjs +694 -0
- package/dist/kanban.types.cjs +1 -0
- package/dist/kanban.types.d.ts +2 -0
- package/dist/kanban.types.d.ts.map +1 -0
- package/dist/kanban.types.mjs +1 -0
- package/dist/kanban.ui.cjs +1 -0
- package/dist/kanban.ui.d.ts +2 -0
- package/dist/kanban.ui.d.ts.map +1 -0
- package/dist/kanban.ui.mjs +104 -0
- package/dist/metadata-2FLBsFcf.cjs +1 -0
- package/dist/metadata-DBcoDth-.js +43 -0
- package/dist/table.cjs +1 -0
- package/dist/table.d.ts +2 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.mjs +148 -0
- package/dist/table.types.cjs +1 -0
- package/dist/table.types.d.ts +2 -0
- package/dist/table.types.d.ts.map +1 -0
- package/dist/table.types.mjs +1 -0
- package/dist/types/base-fields.d.ts +45 -45
- package/dist/types/base-fields.d.ts.map +1 -1
- package/dist/types/common.d.ts +45 -61
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types.cjs +1 -0
- package/dist/types.mjs +1 -0
- package/dist/useFilter-CXFqEHyI.js +129 -0
- package/dist/useFilter-D-bCDo6Z.cjs +1 -0
- package/dist/utils/formatting.d.ts +4 -4
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/utils.cjs +4 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.mjs +105 -0
- package/package.json +147 -9
- package/sdk/api/client.ts +76 -49
- package/sdk/api/datetime.ts +5 -5
- package/sdk/api/index.ts +28 -33
- package/sdk/api/metadata.ts +4 -4
- package/sdk/api.ts +24 -0
- package/sdk/api.types.ts +58 -0
- package/sdk/auth/AuthProvider.tsx +18 -18
- package/sdk/auth/authClient.ts +9 -9
- package/sdk/auth/authConfig.ts +9 -9
- package/sdk/auth/index.ts +5 -5
- package/sdk/auth/types.ts +21 -21
- package/sdk/auth/useAuth.ts +2 -2
- package/sdk/auth.ts +22 -0
- package/sdk/auth.types.ts +28 -0
- package/sdk/base-types.ts +45 -0
- package/sdk/components/hooks/index.ts +22 -22
- package/sdk/components/hooks/useFilter/index.ts +8 -14
- package/sdk/components/hooks/useFilter/types.ts +29 -58
- package/sdk/components/hooks/useFilter/useFilter.ts +41 -44
- package/sdk/components/hooks/useForm/apiClient.ts +8 -8
- package/sdk/components/hooks/useForm/expressionValidator.utils.ts +18 -18
- package/sdk/components/hooks/useForm/index.ts +24 -24
- package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +22 -22
- package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +26 -62
- package/sdk/components/hooks/useForm/schemaParser.utils.ts +24 -24
- package/sdk/components/hooks/useForm/types.ts +85 -75
- package/sdk/components/hooks/useForm/useForm.ts +160 -40
- package/sdk/components/hooks/useKanban/apiClient.ts +54 -54
- package/sdk/components/hooks/useKanban/context.ts +3 -3
- package/sdk/components/hooks/useKanban/dragDropManager.ts +19 -19
- package/sdk/components/hooks/useKanban/index.ts +26 -26
- package/sdk/components/hooks/useKanban/types.ts +69 -71
- package/sdk/components/hooks/useKanban/useKanban.ts +43 -51
- package/sdk/components/hooks/useKanban/useKanbanSimple.ts +4 -4
- package/sdk/components/hooks/useTable/index.ts +5 -1
- package/sdk/components/hooks/useTable/types.ts +10 -10
- package/sdk/components/hooks/useTable/useTable.ts +10 -10
- package/sdk/filter.ts +13 -0
- package/sdk/filter.types.ts +17 -0
- package/sdk/form.ts +15 -0
- package/sdk/form.types.ts +46 -0
- package/sdk/kanban.ts +23 -0
- package/sdk/kanban.types.ts +50 -0
- package/sdk/kanban.ui.ts +16 -0
- package/sdk/table.ts +7 -0
- package/sdk/table.types.ts +13 -0
- package/sdk/types/base-fields.ts +47 -47
- package/sdk/types/common.ts +47 -71
- package/sdk/types/index.ts +1 -1
- package/sdk/utils/formatting.ts +4 -4
- package/sdk/utils.ts +10 -0
- package/dist/index.cjs +0 -45
- package/dist/index.mjs +0 -6327
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useKanban } from './useKanban';
|
|
2
2
|
export { KanbanContext, useKanbanContext } from './context';
|
|
3
|
-
export type {
|
|
3
|
+
export type { UseKanbanOptionsType, UseKanbanReturnType, KanbanCardType, KanbanColumnType, ColumnConfigType, ColumnDefinitionType, CardOperationsType, SearchOperationsType, DragDropStateType, DragDropHandlersType, DragDropManagerType, CardApiResponseType, ColumnApiResponseType, MoveCardRequestType, ReorderRequestType, BulkCardUpdateRequestType, BulkColumnUpdateRequestType, ValidationResultType, CardValidationContextType, ColumnValidationContextType, KanbanEventTypeType, KanbanEventType, ExtractCardTypeType, PartialByType, CreateCardInputType, CreateColumnInputType, } from './types';
|
|
4
4
|
export { mergeCardsIntoColumns, calculateCardPosition, calculateColumnPosition, normalizePositions, handleKanbanApiError, validateApiResponse } from './apiClient';
|
|
5
5
|
export { useDragDropManager } from './dragDropManager';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useKanban/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE5D,YAAY,EAEV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useKanban/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE5D,YAAY,EAEV,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EAGpB,kBAAkB,EAClB,oBAAoB,EAGpB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EAGnB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAG3B,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAG3B,mBAAmB,EACnB,eAAe,EAGf,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,kBAAkB,EACnB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ConditionType, ConditionGroupType, UseFilterReturnType } from "../useFilter";
|
|
2
|
+
import type { ConditionGroupOperatorType } from "../../../types/common";
|
|
3
3
|
/**
|
|
4
4
|
* Static column configuration (no CRUD operations)
|
|
5
5
|
* Columns are defined once in the hook configuration
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface ColumnConfigType {
|
|
8
8
|
/** Unique column identifier */
|
|
9
9
|
id: string;
|
|
10
10
|
/** Display title */
|
|
@@ -20,7 +20,7 @@ export interface ColumnConfig {
|
|
|
20
20
|
* Base kanban card interface
|
|
21
21
|
* @template T - Custom fields for the card
|
|
22
22
|
*/
|
|
23
|
-
export type
|
|
23
|
+
export type KanbanCardType<T = Record<string, any>> = {
|
|
24
24
|
/** Unique identifier */
|
|
25
25
|
_id: string;
|
|
26
26
|
/** Card title */
|
|
@@ -37,11 +37,11 @@ export type KanbanCard<T = Record<string, any>> = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Kanban card with custom fields
|
|
39
39
|
*/
|
|
40
|
-
export type
|
|
40
|
+
export type KanbanCardWithDataType<T> = KanbanCardType<Record<string, never>> & T;
|
|
41
41
|
/**
|
|
42
42
|
* Base kanban card without custom fields
|
|
43
43
|
*/
|
|
44
|
-
export interface
|
|
44
|
+
export interface BaseKanbanCardType {
|
|
45
45
|
/** Unique identifier */
|
|
46
46
|
_id: string;
|
|
47
47
|
/** Card title */
|
|
@@ -59,7 +59,7 @@ export interface BaseKanbanCard {
|
|
|
59
59
|
* Kanban column interface
|
|
60
60
|
* @template T - Custom fields for cards in this column
|
|
61
61
|
*/
|
|
62
|
-
export interface
|
|
62
|
+
export interface KanbanColumnType<T = Record<string, any>> {
|
|
63
63
|
/** Unique identifier */
|
|
64
64
|
_id: string;
|
|
65
65
|
/** Column title */
|
|
@@ -67,7 +67,7 @@ export interface KanbanColumn<T = Record<string, any>> {
|
|
|
67
67
|
/** Position among columns (0-indexed) */
|
|
68
68
|
position: number;
|
|
69
69
|
/** Cards in this column */
|
|
70
|
-
cards:
|
|
70
|
+
cards: KanbanCardType<T>[];
|
|
71
71
|
/** Optional color for the column header */
|
|
72
72
|
color?: string;
|
|
73
73
|
/** Optional limit on number of cards (WIP limit) */
|
|
@@ -83,7 +83,7 @@ export interface KanbanColumn<T = Record<string, any>> {
|
|
|
83
83
|
* Column definition for display and behavior
|
|
84
84
|
* Similar to ColumnDefinition in useTable
|
|
85
85
|
*/
|
|
86
|
-
export interface
|
|
86
|
+
export interface ColumnDefinitionType<T> {
|
|
87
87
|
/** Field name from the card type */
|
|
88
88
|
fieldId: keyof T;
|
|
89
89
|
/** Display label (optional, defaults to fieldId) */
|
|
@@ -98,11 +98,11 @@ export interface ColumnDefinition<T> {
|
|
|
98
98
|
/**
|
|
99
99
|
* Drag and drop state management
|
|
100
100
|
*/
|
|
101
|
-
export interface
|
|
101
|
+
export interface DragDropStateType<T> {
|
|
102
102
|
/** Whether a drag operation is in progress */
|
|
103
103
|
isDragging: boolean;
|
|
104
104
|
/** The card currently being dragged */
|
|
105
|
-
draggedCard:
|
|
105
|
+
draggedCard: KanbanCardType<T> | null;
|
|
106
106
|
/** The column currently being hovered over */
|
|
107
107
|
dragOverColumn: string | null;
|
|
108
108
|
/** The position within the column being hovered over */
|
|
@@ -113,9 +113,9 @@ export interface DragDropState<T> {
|
|
|
113
113
|
/**
|
|
114
114
|
* Drag event handlers
|
|
115
115
|
*/
|
|
116
|
-
export interface
|
|
116
|
+
export interface DragDropHandlersType<T> {
|
|
117
117
|
/** Handle drag start event */
|
|
118
|
-
handleDragStart: (event: DragEvent, card:
|
|
118
|
+
handleDragStart: (event: DragEvent, card: KanbanCardType<T>) => void;
|
|
119
119
|
/** Handle drag over event */
|
|
120
120
|
handleDragOver: (event: DragEvent, columnId?: string) => void;
|
|
121
121
|
/** Handle drop event */
|
|
@@ -123,9 +123,9 @@ export interface DragDropHandlers<T> {
|
|
|
123
123
|
/** Handle drag end event */
|
|
124
124
|
handleDragEnd: () => void;
|
|
125
125
|
/** Handle keyboard navigation */
|
|
126
|
-
handleKeyDown: (event: KeyboardEvent, card:
|
|
126
|
+
handleKeyDown: (event: KeyboardEvent, card: KanbanCardType<T>) => void;
|
|
127
127
|
/** Handle touch start for mobile */
|
|
128
|
-
handleTouchStart: (event: TouchEvent, card:
|
|
128
|
+
handleTouchStart: (event: TouchEvent, card: KanbanCardType<T>) => void;
|
|
129
129
|
/** Handle touch move for mobile */
|
|
130
130
|
handleTouchMove: (event: TouchEvent) => void;
|
|
131
131
|
/** Handle touch end for mobile */
|
|
@@ -134,22 +134,20 @@ export interface DragDropHandlers<T> {
|
|
|
134
134
|
/**
|
|
135
135
|
* Combined drag and drop interface
|
|
136
136
|
*/
|
|
137
|
-
export interface
|
|
137
|
+
export interface DragDropManagerType<T> extends DragDropStateType<T>, DragDropHandlersType<T> {
|
|
138
138
|
/** Announce moves for accessibility */
|
|
139
|
-
announceMove: (card:
|
|
139
|
+
announceMove: (card: KanbanCardType<T>, fromColumn: string, toColumn: string) => void;
|
|
140
140
|
/** Reset drag state */
|
|
141
141
|
reset: () => void;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* Configuration options for the useKanban hook
|
|
145
145
|
*/
|
|
146
|
-
export interface
|
|
146
|
+
export interface UseKanbanOptionsType<T> {
|
|
147
147
|
/** Card data source identifier */
|
|
148
|
-
|
|
149
|
-
/** Card data source identifier (alias for cardSource) */
|
|
150
|
-
source?: string;
|
|
148
|
+
source: string;
|
|
151
149
|
/** Static column definitions (required) */
|
|
152
|
-
columns:
|
|
150
|
+
columns: ColumnConfigType[];
|
|
153
151
|
/** Enable drag and drop functionality */
|
|
154
152
|
enableDragDrop?: boolean;
|
|
155
153
|
/** Enable filtering functionality */
|
|
@@ -159,9 +157,9 @@ export interface UseKanbanOptions<T> {
|
|
|
159
157
|
/** Initial state */
|
|
160
158
|
initialState?: {
|
|
161
159
|
/** Initial filter conditions */
|
|
162
|
-
filters?: Array<
|
|
160
|
+
filters?: Array<ConditionType | ConditionGroupType>;
|
|
163
161
|
/** Initial filter operator for combining filter conditions */
|
|
164
|
-
filterOperator?:
|
|
162
|
+
filterOperator?: ConditionGroupOperatorType;
|
|
165
163
|
/** Initial search query */
|
|
166
164
|
search?: string;
|
|
167
165
|
/** Initial column order */
|
|
@@ -173,9 +171,9 @@ export interface UseKanbanOptions<T> {
|
|
|
173
171
|
};
|
|
174
172
|
};
|
|
175
173
|
/** Event callbacks */
|
|
176
|
-
onCardMove?: (card:
|
|
177
|
-
onCardCreate?: (card:
|
|
178
|
-
onCardUpdate?: (card:
|
|
174
|
+
onCardMove?: (card: KanbanCardType<T>, fromColumnId: string, toColumnId: string) => void;
|
|
175
|
+
onCardCreate?: (card: KanbanCardType<T>) => void;
|
|
176
|
+
onCardUpdate?: (card: KanbanCardType<T>) => void;
|
|
179
177
|
onCardDelete?: (cardId: string) => void;
|
|
180
178
|
onSuccess?: (data: any) => void;
|
|
181
179
|
onError?: (error: Error) => void;
|
|
@@ -183,13 +181,13 @@ export interface UseKanbanOptions<T> {
|
|
|
183
181
|
/**
|
|
184
182
|
* Card operations interface
|
|
185
183
|
*/
|
|
186
|
-
export interface
|
|
184
|
+
export interface CardOperationsType<T> {
|
|
187
185
|
/** Create a new card */
|
|
188
|
-
create: (card: Partial<
|
|
186
|
+
create: (card: Partial<KanbanCardType<T>> & {
|
|
189
187
|
columnId: string;
|
|
190
188
|
}) => Promise<string>;
|
|
191
189
|
/** Update an existing card */
|
|
192
|
-
update: (id: string, updates: Partial<
|
|
190
|
+
update: (id: string, updates: Partial<KanbanCardType<T>>) => Promise<void>;
|
|
193
191
|
/** Delete a card */
|
|
194
192
|
delete: (id: string) => Promise<void>;
|
|
195
193
|
/** Move a card to a different column */
|
|
@@ -200,7 +198,7 @@ export interface CardOperations<T> {
|
|
|
200
198
|
/**
|
|
201
199
|
* Search functionality interface
|
|
202
200
|
*/
|
|
203
|
-
export interface
|
|
201
|
+
export interface SearchOperationsType {
|
|
204
202
|
/** Current search query */
|
|
205
203
|
query: string;
|
|
206
204
|
/** Set search query */
|
|
@@ -212,9 +210,9 @@ export interface SearchOperations {
|
|
|
212
210
|
* Main return interface for useKanban hook
|
|
213
211
|
* Follows useTable pattern with flat access
|
|
214
212
|
*/
|
|
215
|
-
export interface
|
|
213
|
+
export interface UseKanbanReturnType<T> {
|
|
216
214
|
/** All columns with their cards */
|
|
217
|
-
columns:
|
|
215
|
+
columns: KanbanColumnType<T>[];
|
|
218
216
|
/** Total number of cards across all columns */
|
|
219
217
|
totalCards: number;
|
|
220
218
|
/** Initial data loading */
|
|
@@ -226,11 +224,11 @@ export interface UseKanbanReturn<T> {
|
|
|
226
224
|
/** Current error state */
|
|
227
225
|
error: Error | null;
|
|
228
226
|
/** Create a new card */
|
|
229
|
-
createCard: (card: Partial<
|
|
227
|
+
createCard: (card: Partial<KanbanCardType<T>> & {
|
|
230
228
|
columnId: string;
|
|
231
229
|
}) => Promise<string>;
|
|
232
230
|
/** Update an existing card */
|
|
233
|
-
updateCard: (id: string, updates: Partial<
|
|
231
|
+
updateCard: (id: string, updates: Partial<KanbanCardType<T>>) => Promise<void>;
|
|
234
232
|
/** Delete a card */
|
|
235
233
|
deleteCard: (id: string) => Promise<void>;
|
|
236
234
|
/** Move a card to a different column */
|
|
@@ -244,15 +242,15 @@ export interface UseKanbanReturn<T> {
|
|
|
244
242
|
/** Clear search query */
|
|
245
243
|
clearSearch: () => void;
|
|
246
244
|
/** Filter functionality */
|
|
247
|
-
filter:
|
|
245
|
+
filter: UseFilterReturnType;
|
|
248
246
|
/** Whether a drag operation is in progress */
|
|
249
247
|
isDragging: boolean;
|
|
250
248
|
/** The card currently being dragged */
|
|
251
|
-
draggedCard:
|
|
249
|
+
draggedCard: KanbanCardType<T> | null;
|
|
252
250
|
/** The column currently being hovered over during drag */
|
|
253
251
|
dragOverColumn: string | null;
|
|
254
252
|
/** Handle drag start event */
|
|
255
|
-
handleDragStart: (event: DragEvent, card:
|
|
253
|
+
handleDragStart: (event: DragEvent, card: KanbanCardType<T>) => void;
|
|
256
254
|
/** Handle drag over event */
|
|
257
255
|
handleDragOver: (event: DragEvent, columnId?: string) => void;
|
|
258
256
|
/** Handle drop event */
|
|
@@ -260,11 +258,11 @@ export interface UseKanbanReturn<T> {
|
|
|
260
258
|
/** Handle drag end event */
|
|
261
259
|
handleDragEnd: () => void;
|
|
262
260
|
/** Handle keyboard navigation */
|
|
263
|
-
handleKeyDown: (event: KeyboardEvent, card:
|
|
261
|
+
handleKeyDown: (event: KeyboardEvent, card: KanbanCardType<T>) => void;
|
|
264
262
|
/**
|
|
265
263
|
* Get props for a draggable card
|
|
266
264
|
*/
|
|
267
|
-
getCardProps: (card:
|
|
265
|
+
getCardProps: (card: KanbanCardType<T>) => {
|
|
268
266
|
draggable: boolean;
|
|
269
267
|
role: string;
|
|
270
268
|
"aria-selected": boolean;
|
|
@@ -292,19 +290,19 @@ export interface UseKanbanReturn<T> {
|
|
|
292
290
|
/**
|
|
293
291
|
* API response for card operations
|
|
294
292
|
*/
|
|
295
|
-
export interface
|
|
296
|
-
Data:
|
|
293
|
+
export interface CardApiResponseType<T> {
|
|
294
|
+
Data: KanbanCardType<T>[];
|
|
297
295
|
}
|
|
298
296
|
/**
|
|
299
297
|
* API response for column operations
|
|
300
298
|
*/
|
|
301
|
-
export interface
|
|
302
|
-
Data:
|
|
299
|
+
export interface ColumnApiResponseType<T> {
|
|
300
|
+
Data: KanbanColumnType<T>[];
|
|
303
301
|
}
|
|
304
302
|
/**
|
|
305
303
|
* Request payload for moving a card
|
|
306
304
|
*/
|
|
307
|
-
export interface
|
|
305
|
+
export interface MoveCardRequestType {
|
|
308
306
|
cardId: string;
|
|
309
307
|
toColumnId: string;
|
|
310
308
|
position?: number;
|
|
@@ -312,32 +310,32 @@ export interface MoveCardRequest {
|
|
|
312
310
|
/**
|
|
313
311
|
* Request payload for reordering items
|
|
314
312
|
*/
|
|
315
|
-
export interface
|
|
313
|
+
export interface ReorderRequestType {
|
|
316
314
|
itemIds: string[];
|
|
317
315
|
containerId?: string;
|
|
318
316
|
}
|
|
319
317
|
/**
|
|
320
318
|
* Bulk card update request
|
|
321
319
|
*/
|
|
322
|
-
export interface
|
|
320
|
+
export interface BulkCardUpdateRequestType<T> {
|
|
323
321
|
updates: Array<{
|
|
324
322
|
cardId: string;
|
|
325
|
-
data: Partial<
|
|
323
|
+
data: Partial<KanbanCardType<T>>;
|
|
326
324
|
}>;
|
|
327
325
|
}
|
|
328
326
|
/**
|
|
329
327
|
* Bulk column update request
|
|
330
328
|
*/
|
|
331
|
-
export interface
|
|
329
|
+
export interface BulkColumnUpdateRequestType<T> {
|
|
332
330
|
updates: Array<{
|
|
333
331
|
columnId: string;
|
|
334
|
-
data: Partial<
|
|
332
|
+
data: Partial<KanbanColumnType<T>>;
|
|
335
333
|
}>;
|
|
336
334
|
}
|
|
337
335
|
/**
|
|
338
336
|
* Validation result interface
|
|
339
337
|
*/
|
|
340
|
-
export interface
|
|
338
|
+
export interface ValidationResultType {
|
|
341
339
|
isValid: boolean;
|
|
342
340
|
message?: string;
|
|
343
341
|
errors?: Array<{
|
|
@@ -348,48 +346,48 @@ export interface ValidationResult {
|
|
|
348
346
|
/**
|
|
349
347
|
* Card validation context
|
|
350
348
|
*/
|
|
351
|
-
export interface
|
|
352
|
-
card: Partial<
|
|
353
|
-
column?:
|
|
354
|
-
allColumns:
|
|
349
|
+
export interface CardValidationContextType<T> {
|
|
350
|
+
card: Partial<KanbanCardType<T>>;
|
|
351
|
+
column?: KanbanColumnType<T>;
|
|
352
|
+
allColumns: KanbanColumnType<T>[];
|
|
355
353
|
}
|
|
356
354
|
/**
|
|
357
355
|
* Column validation context
|
|
358
356
|
*/
|
|
359
|
-
export interface
|
|
360
|
-
column: Partial<
|
|
361
|
-
allColumns:
|
|
357
|
+
export interface ColumnValidationContextType<T> {
|
|
358
|
+
column: Partial<KanbanColumnType<T>>;
|
|
359
|
+
allColumns: KanbanColumnType<T>[];
|
|
362
360
|
}
|
|
363
361
|
/**
|
|
364
362
|
* Kanban event types for callbacks
|
|
365
363
|
*/
|
|
366
|
-
export type
|
|
364
|
+
export type KanbanEventTypeType = "card-created" | "card-updated" | "card-deleted" | "card-moved" | "cards-reordered";
|
|
367
365
|
/**
|
|
368
366
|
* Kanban event data
|
|
369
367
|
*/
|
|
370
|
-
export interface
|
|
371
|
-
type:
|
|
368
|
+
export interface KanbanEventType<T> {
|
|
369
|
+
type: KanbanEventTypeType;
|
|
372
370
|
timestamp: Date;
|
|
373
371
|
data: any;
|
|
374
|
-
card?:
|
|
375
|
-
column?:
|
|
372
|
+
card?: KanbanCardType<T>;
|
|
373
|
+
column?: KanbanColumnType<T>;
|
|
376
374
|
fromColumnId?: string;
|
|
377
375
|
toColumnId?: string;
|
|
378
376
|
}
|
|
379
377
|
/**
|
|
380
378
|
* Utility type for extracting card type from column
|
|
381
379
|
*/
|
|
382
|
-
export type
|
|
380
|
+
export type ExtractCardTypeType<C> = C extends KanbanColumnType<infer T> ? T : never;
|
|
383
381
|
/**
|
|
384
382
|
* Utility type for making certain fields optional
|
|
385
383
|
*/
|
|
386
|
-
export type
|
|
384
|
+
export type PartialByType<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
387
385
|
/**
|
|
388
386
|
* Utility type for card creation (auto-generated fields optional)
|
|
389
387
|
*/
|
|
390
|
-
export type
|
|
388
|
+
export type CreateCardInputType<T> = PartialByType<KanbanCardType<T>, "_id" | "position" | "_created_at" | "_modified_at">;
|
|
391
389
|
/**
|
|
392
390
|
* Utility type for column creation (auto-generated fields optional)
|
|
393
391
|
*/
|
|
394
|
-
export type
|
|
392
|
+
export type CreateColumnInputType<T> = PartialByType<KanbanColumnType<T>, "_id" | "position" | "cards" | "_created_at" | "_modified_at">;
|
|
395
393
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useKanban/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useKanban/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAMxE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IACpD,wBAAwB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,sCAAsC;IACtC,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB,GAAG,CAAC,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,wBAAw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AK,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,aAAa,CAChD,cAAc,CAAC,CAAC,CAAC,EACjB,KAAK,GAAG,UAAU,GAAG,aAAa,GAAG,cAAc,CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,aAAa,CAClD,gBAAgB,CAAC,CAAC,CAAC,EACnB,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,CAC9D,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function useKanban<T extends Record<string, any> = Record<string, any>>(options:
|
|
1
|
+
import type { UseKanbanOptionsType, UseKanbanReturnType } from "./types";
|
|
2
|
+
export declare function useKanban<T extends Record<string, any> = Record<string, any>>(options: UseKanbanOptionsType<T>): UseKanbanReturnType<T>;
|
|
3
3
|
//# sourceMappingURL=useKanban.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKanban.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useKanban/useKanban.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"useKanban.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useKanban/useKanban.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAOjB,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3E,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,mBAAmB,CAAC,CAAC,CAAC,CAqnBxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useTable/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useTable/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,SAAS,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export interface
|
|
1
|
+
import type { ListResponseType, ConditionGroupOperatorType } from "../../../types/common";
|
|
2
|
+
import type { ConditionType, ConditionGroupType, UseFilterReturnType } from "../useFilter";
|
|
3
|
+
export interface ColumnDefinitionType<T> {
|
|
4
4
|
/** Field name from the data type */
|
|
5
5
|
fieldId: keyof T;
|
|
6
6
|
/** Display label (optional, defaults to fieldId) */
|
|
@@ -12,11 +12,11 @@ export interface ColumnDefinition<T> {
|
|
|
12
12
|
/** Custom transform function (overrides auto-formatting) */
|
|
13
13
|
transform?: (value: any, row: T) => React.ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface UseTableOptionsType<T> {
|
|
16
16
|
/** Data source identifier */
|
|
17
17
|
source: string;
|
|
18
18
|
/** Column configurations */
|
|
19
|
-
columns:
|
|
19
|
+
columns: ColumnDefinitionType<T>[];
|
|
20
20
|
/** Enable sorting functionality */
|
|
21
21
|
enableSorting?: boolean;
|
|
22
22
|
/** Enable filtering functionality */
|
|
@@ -33,15 +33,15 @@ export interface UseTableOptions<T> {
|
|
|
33
33
|
field: keyof T;
|
|
34
34
|
direction: "asc" | "desc";
|
|
35
35
|
};
|
|
36
|
-
filters?: Array<
|
|
37
|
-
filterOperator?:
|
|
36
|
+
filters?: Array<ConditionType | ConditionGroupType>;
|
|
37
|
+
filterOperator?: ConditionGroupOperatorType;
|
|
38
38
|
};
|
|
39
39
|
/** Error callback */
|
|
40
40
|
onError?: (error: Error) => void;
|
|
41
41
|
/** Success callback */
|
|
42
42
|
onSuccess?: (data: T[]) => void;
|
|
43
43
|
}
|
|
44
|
-
export interface
|
|
44
|
+
export interface UseTableReturnType<T> {
|
|
45
45
|
rows: T[];
|
|
46
46
|
totalItems: number;
|
|
47
47
|
isLoading: boolean;
|
|
@@ -59,7 +59,7 @@ export interface UseTableReturn<T> {
|
|
|
59
59
|
clear: () => void;
|
|
60
60
|
set: (field: keyof T, direction: "asc" | "desc") => void;
|
|
61
61
|
};
|
|
62
|
-
filter:
|
|
62
|
+
filter: UseFilterReturnType;
|
|
63
63
|
pagination: {
|
|
64
64
|
currentPage: number;
|
|
65
65
|
pageSize: number;
|
|
@@ -72,6 +72,6 @@ export interface UseTableReturn<T> {
|
|
|
72
72
|
goToPage: (page: number) => void;
|
|
73
73
|
setPageSize: (size: number) => void;
|
|
74
74
|
};
|
|
75
|
-
refetch: () => Promise<
|
|
75
|
+
refetch: () => Promise<ListResponseType<T>>;
|
|
76
76
|
}
|
|
77
77
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useTable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useTable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,m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C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function useTable<T = any>(options:
|
|
1
|
+
import type { UseTableOptionsType, UseTableReturnType } from "./types";
|
|
2
|
+
export declare function useTable<T = any>(options: UseTableOptionsType<T>): UseTableReturnType<T>;
|
|
3
3
|
//# sourceMappingURL=useTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTable.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useTable/useTable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useTable.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useTable/useTable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAwBvE,wBAAgB,QAAQ,CAAC,CAAC,GAAG,GAAG,EAC9B,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC9B,kBAAkB,CAAC,CAAC,CAAC,CAgRvB"}
|
package/dist/filter.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./useFilter-D-bCDo6Z.cjs");exports.isCondition=i.isCondition;exports.isConditionGroup=i.isConditionGroup;exports.useFilter=i.useFilter;
|
package/dist/filter.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../sdk/filter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGnE,OAAO,EACL,WAAW,EACX,gBAAgB,GACjB,MAAM,oCAAoC,CAAC"}
|
package/dist/filter.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.types.d.ts","sourceRoot":"","sources":["../sdk/filter.types.ts"],"names":[],"mappings":"AAKA,YAAY,EAEV,oBAAoB,EACpB,mBAAmB,EAGnB,aAAa,EACb,kBAAkB,EAClB,0BAA0B,EAC1B,UAAU,EACV,iBAAiB,GAClB,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|