@app-studio/web 0.9.37 → 0.9.39
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/components/ChatInput/ChatInput/ChatInput.style.d.ts +31 -0
- package/dist/components/Drawer/Drawer/Drawer.props.d.ts +61 -0
- package/dist/components/Drawer/Drawer/Drawer.style.d.ts +4 -0
- package/dist/components/Drawer/Drawer/Drawer.view.d.ts +7 -0
- package/dist/components/Drawer/Drawer.d.ts +2 -0
- package/dist/components/Title/Title/Title.style.d.ts +0 -1
- package/dist/components/index.d.ts +2 -22
- package/dist/pages/drawer.page.d.ts +3 -0
- package/dist/utils/apiConfig.d.ts +2 -2
- package/dist/utils/typography.d.ts +3 -4
- package/dist/web.cjs.development.js +2410 -12482
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +2585 -12648
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +2424 -12493
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Accordion.mdx +4 -4
- package/docs/components/Alert.mdx +1 -1
- package/docs/components/Background.mdx +5 -5
- package/docs/components/Badge.mdx +1 -1
- package/docs/components/Card.mdx +8 -8
- package/docs/components/Carousel.mdx +6 -6
- package/docs/components/ColorInput.mdx +1 -1
- package/docs/components/Drawer.mdx +164 -0
- package/docs/components/Gradient.mdx +6 -6
- package/docs/components/HoverCard.mdx +5 -5
- package/docs/components/KanbanBoard.mdx +128 -2
- package/docs/components/Link.mdx +2 -2
- package/docs/components/Menubar.mdx +1 -1
- package/docs/components/Message.mdx +4 -4
- package/docs/components/Modal.mdx +4 -4
- package/docs/components/OKR.mdx +40 -63
- package/docs/components/Tabs.mdx +1 -1
- package/docs/components/ToggleGroup.mdx +4 -4
- package/docs/components/Tooltip.mdx +2 -2
- package/docs/conventions.md +1 -1
- package/package.json +2 -2
- package/dist/components/Calendar/Calendar/Calendar.props.d.ts +0 -82
- package/dist/components/Calendar/Calendar/Calendar.style.d.ts +0 -107
- package/dist/components/Calendar/Calendar/Calendar.utils.d.ts +0 -91
- package/dist/components/Calendar/Calendar/Calendar.view.d.ts +0 -3
- package/dist/components/Calendar/Calendar.d.ts +0 -1
- package/dist/components/Flow/Flow/Flow.props.d.ts +0 -144
- package/dist/components/Flow/Flow/Flow.state.d.ts +0 -95
- package/dist/components/Flow/Flow/Flow.style.d.ts +0 -40
- package/dist/components/Flow/Flow/Flow.type.d.ts +0 -181
- package/dist/components/Flow/Flow/Flow.view.d.ts +0 -28
- package/dist/components/Flow/Flow.d.ts +0 -2
- package/dist/components/Flow/index.d.ts +0 -2
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.props.d.ts +0 -52
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.state.d.ts +0 -17
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.view.d.ts +0 -3
- package/dist/components/KanbanBoard/KanbanBoard.d.ts +0 -3
- package/dist/components/OKR/OKR/OKR.props.d.ts +0 -72
- package/dist/components/OKR/OKR/OKR.style.d.ts +0 -19
- package/dist/components/OKR/OKR/OKR.view.d.ts +0 -4
- package/dist/components/OKR/OKR.d.ts +0 -4
- package/dist/components/Text/Text/Text.props.d.ts +0 -29
- package/dist/components/Text/Text/Text.style.d.ts +0 -27
- package/dist/components/Text/Text/Text.utils.d.ts +0 -2
- package/dist/components/Text/Text/Text.view.d.ts +0 -19
- package/dist/components/Text/Text.d.ts +0 -5
- package/dist/components/Tree/Tree/Tree.props.d.ts +0 -106
- package/dist/components/Tree/Tree/Tree.state.d.ts +0 -38
- package/dist/components/Tree/Tree/Tree.style.d.ts +0 -41
- package/dist/components/Tree/Tree/Tree.type.d.ts +0 -133
- package/dist/components/Tree/Tree/Tree.view.d.ts +0 -36
- package/dist/components/Tree/Tree.d.ts +0 -2
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.props.d.ts +0 -180
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.state.d.ts +0 -24
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.style.d.ts +0 -132
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.view.d.ts +0 -12
- package/dist/components/adk/AgentChat/AgentChat/AgentMessage.d.ts +0 -21
- package/dist/components/adk/AgentChat/AgentChat/AgentRunProgress.d.ts +0 -11
- package/dist/components/adk/AgentChat/AgentChat/AgentTypingIndicator.d.ts +0 -7
- package/dist/components/adk/AgentChat/AgentChat/MessageAttachmentPreview.d.ts +0 -12
- package/dist/components/adk/AgentChat/AgentChat.d.ts +0 -41
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.props.d.ts +0 -213
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.state.d.ts +0 -27
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.style.d.ts +0 -144
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.view.d.ts +0 -12
- package/dist/components/adk/AgentEval/AgentEval/EvaluationCreator.d.ts +0 -17
- package/dist/components/adk/AgentEval/AgentEval/EvaluationList.d.ts +0 -23
- package/dist/components/adk/AgentEval/AgentEval/EvaluationMetrics.d.ts +0 -15
- package/dist/components/adk/AgentEval/AgentEval/EvaluationResults.d.ts +0 -19
- package/dist/components/adk/AgentEval/AgentEval.d.ts +0 -41
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.props.d.ts +0 -170
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.state.d.ts +0 -32
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.style.d.ts +0 -105
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.view.d.ts +0 -12
- package/dist/components/adk/AgentSession/AgentSession/SessionActions.d.ts +0 -20
- package/dist/components/adk/AgentSession/AgentSession/SessionFilters.d.ts +0 -14
- package/dist/components/adk/AgentSession/AgentSession/SessionListItem.d.ts +0 -26
- package/dist/components/adk/AgentSession/AgentSession.d.ts +0 -42
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.props.d.ts +0 -194
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.state.d.ts +0 -27
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.style.d.ts +0 -146
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.view.d.ts +0 -12
- package/dist/components/adk/AgentTrace/AgentTrace/TraceEventList.d.ts +0 -20
- package/dist/components/adk/AgentTrace/AgentTrace/TraceFilters.d.ts +0 -13
- package/dist/components/adk/AgentTrace/AgentTrace/TraceMetrics.d.ts +0 -16
- package/dist/components/adk/AgentTrace/AgentTrace/TraceTimeline.d.ts +0 -19
- package/dist/components/adk/AgentTrace/AgentTrace/TraceVisualization.d.ts +0 -19
- package/dist/components/adk/AgentTrace/AgentTrace.d.ts +0 -44
- package/dist/components/adk/useAdk.d.ts +0 -42
- package/dist/pages/adk/CompleteAgentApp.d.ts +0 -30
- package/dist/pages/adk/adkComponents.page.d.ts +0 -8
- package/dist/pages/adk/adkIntegration.page.d.ts +0 -6
- package/dist/pages/adk/agentChat.page.d.ts +0 -8
- package/dist/pages/adk/providers/AdkProvider.d.ts +0 -83
- package/dist/pages/adk/providers/index.d.ts +0 -1
- package/dist/pages/adk/services/AgentService.d.ts +0 -167
- package/dist/pages/adk/services/AgentServiceProvider.d.ts +0 -83
- package/dist/pages/adk/services/AgentServiceUtils.d.ts +0 -176
- package/dist/pages/adk/services/index.d.ts +0 -50
- package/dist/pages/calendar.page.d.ts +0 -3
- package/dist/pages/flow.page.d.ts +0 -3
- package/dist/pages/kanbanBoard.page.d.ts +0 -3
- package/dist/pages/okr.page.d.ts +0 -3
- package/dist/pages/text.page.d.ts +0 -3
- package/dist/pages/tree.page.d.ts +0 -3
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ViewProps } from 'app-studio';
|
|
3
|
-
import { Size, Variant, FlowNode, NodeConnection, FlowComponentType, FlowViewport, NodePosition } from './Flow.type';
|
|
4
|
-
/**
|
|
5
|
-
* Props for the Flow component
|
|
6
|
-
*/
|
|
7
|
-
export interface FlowProps extends Omit<ViewProps, 'position'> {
|
|
8
|
-
/**
|
|
9
|
-
* Child elements for compound component pattern
|
|
10
|
-
* Note: Flow component primarily uses `nodes` and `edges` props for data.
|
|
11
|
-
* Children could be used for custom overlays or context providers if needed.
|
|
12
|
-
*/
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* Array of nodes in the flow
|
|
16
|
-
*/
|
|
17
|
-
nodes?: FlowNode[];
|
|
18
|
-
/**
|
|
19
|
-
* Array of edges/connections between nodes
|
|
20
|
-
*/
|
|
21
|
-
edges?: NodeConnection[];
|
|
22
|
-
/**
|
|
23
|
-
* Size of the flow nodes
|
|
24
|
-
* @default 'md'
|
|
25
|
-
*/
|
|
26
|
-
size?: Size;
|
|
27
|
-
/**
|
|
28
|
-
* Visual variant of the flow nodes (affects node appearance)
|
|
29
|
-
* @default 'default'
|
|
30
|
-
*/
|
|
31
|
-
variant?: Variant;
|
|
32
|
-
/**
|
|
33
|
-
* Direction of the flow layout (influences default new node placement)
|
|
34
|
-
* @default 'vertical'
|
|
35
|
-
*/
|
|
36
|
-
direction?: 'vertical' | 'horizontal';
|
|
37
|
-
/**
|
|
38
|
-
* Whether to show the controls (zoom, etc.)
|
|
39
|
-
* @default true
|
|
40
|
-
*/
|
|
41
|
-
showControls?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Whether to allow adding nodes
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
|
-
allowAddingNodes?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to allow deleting nodes (functionality not fully implemented in this simplified version)
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
|
-
allowDeletingNodes?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Whether to allow connecting nodes (functionality not fully implemented in this simplified version)
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
allowConnectingNodes?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Whether to allow dragging nodes to reposition them
|
|
59
|
-
* @default true
|
|
60
|
-
*/
|
|
61
|
-
allowDraggingNodes?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Callback when nodes change (e.g., added, position changed)
|
|
64
|
-
*/
|
|
65
|
-
onNodesChange?: (nodes: FlowNode[]) => void;
|
|
66
|
-
/**
|
|
67
|
-
* Callback when edges change (e.g., added)
|
|
68
|
-
*/
|
|
69
|
-
onEdgesChange?: (edges: NodeConnection[]) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Callback when a node is selected
|
|
72
|
-
*/
|
|
73
|
-
onNodeSelect?: (nodeId: string) => void;
|
|
74
|
-
/**
|
|
75
|
-
* Callback when a node is added by user interaction
|
|
76
|
-
* The `newNode` passed will have an ID and default data, but its position
|
|
77
|
-
* will be determined by the `addNodeAfter` logic in `useFlowState`.
|
|
78
|
-
*/
|
|
79
|
-
onNodeAdd?: (newNode: FlowNode) => void;
|
|
80
|
-
/**
|
|
81
|
-
* Callback when a node is deleted
|
|
82
|
-
*/
|
|
83
|
-
onNodeDelete?: (nodeId: string) => void;
|
|
84
|
-
/**
|
|
85
|
-
* Callback when a connection is created
|
|
86
|
-
*/
|
|
87
|
-
onConnect?: (connection: NodeConnection) => void;
|
|
88
|
-
/**
|
|
89
|
-
* Callback when a node drag starts
|
|
90
|
-
*/
|
|
91
|
-
onNodeDragStart?: (nodeId: string, event: React.MouseEvent | React.TouchEvent) => void;
|
|
92
|
-
/**
|
|
93
|
-
* Callback when a node is being dragged
|
|
94
|
-
*/
|
|
95
|
-
onNodeDrag?: (nodeId: string, position: NodePosition, event: MouseEvent | TouchEvent) => void;
|
|
96
|
-
/**
|
|
97
|
-
* Callback when a node drag ends
|
|
98
|
-
*/
|
|
99
|
-
onNodeDragEnd?: (nodeId: string, position: NodePosition) => void;
|
|
100
|
-
/**
|
|
101
|
-
* ID of the selected node (controlled mode)
|
|
102
|
-
*/
|
|
103
|
-
selectedNodeId?: string;
|
|
104
|
-
/**
|
|
105
|
-
* Initial viewport state (zoom, pan)
|
|
106
|
-
*/
|
|
107
|
-
initialViewport?: FlowViewport;
|
|
108
|
-
/**
|
|
109
|
-
* Controlled viewport state
|
|
110
|
-
*/
|
|
111
|
-
viewport?: FlowViewport;
|
|
112
|
-
/**
|
|
113
|
-
* Callback when viewport changes
|
|
114
|
-
*/
|
|
115
|
-
onViewportChange?: (viewport: FlowViewport) => void;
|
|
116
|
-
/**
|
|
117
|
-
* Custom views for styling different parts of the component
|
|
118
|
-
*/
|
|
119
|
-
views?: {
|
|
120
|
-
container?: ViewProps;
|
|
121
|
-
node?: {
|
|
122
|
-
container?: ViewProps;
|
|
123
|
-
content?: ViewProps;
|
|
124
|
-
icon?: ViewProps;
|
|
125
|
-
};
|
|
126
|
-
edge?: {
|
|
127
|
-
path?: ViewProps;
|
|
128
|
-
label?: ViewProps;
|
|
129
|
-
};
|
|
130
|
-
controls?: {
|
|
131
|
-
container?: ViewProps;
|
|
132
|
-
button?: ViewProps;
|
|
133
|
-
};
|
|
134
|
-
addButton?: {
|
|
135
|
-
container?: ViewProps;
|
|
136
|
-
icon?: ViewProps;
|
|
137
|
-
};
|
|
138
|
-
fixedControlsContainer?: ViewProps;
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Type for the Flow component with sub-components
|
|
143
|
-
*/
|
|
144
|
-
export declare type FlowType = FlowComponentType<FlowProps>;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FlowNode, NodeConnection, FlowViewport, NodePosition } from './Flow.type';
|
|
3
|
-
interface UseFlowStateProps {
|
|
4
|
-
/**
|
|
5
|
-
* Initial nodes
|
|
6
|
-
*/
|
|
7
|
-
initialNodes?: FlowNode[];
|
|
8
|
-
/**
|
|
9
|
-
* Initial edges/connections
|
|
10
|
-
*/
|
|
11
|
-
initialEdges?: NodeConnection[];
|
|
12
|
-
/**
|
|
13
|
-
* Controlled nodes
|
|
14
|
-
*/
|
|
15
|
-
nodes?: FlowNode[];
|
|
16
|
-
/**
|
|
17
|
-
* Controlled edges/connections
|
|
18
|
-
*/
|
|
19
|
-
edges?: NodeConnection[];
|
|
20
|
-
/**
|
|
21
|
-
* Callback when nodes change
|
|
22
|
-
*/
|
|
23
|
-
onNodesChange?: (nodes: FlowNode[]) => void;
|
|
24
|
-
/**
|
|
25
|
-
* Callback when edges change
|
|
26
|
-
*/
|
|
27
|
-
onEdgesChange?: (edges: NodeConnection[]) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Callback when a node is selected
|
|
30
|
-
*/
|
|
31
|
-
onNodeSelect?: (nodeId: string) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Controlled selected node ID
|
|
34
|
-
*/
|
|
35
|
-
selectedNodeId?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Direction of the flow
|
|
38
|
-
*/
|
|
39
|
-
direction?: 'vertical' | 'horizontal';
|
|
40
|
-
/**
|
|
41
|
-
* Initial viewport state (zoom, pan)
|
|
42
|
-
*/
|
|
43
|
-
initialViewport?: FlowViewport;
|
|
44
|
-
/**
|
|
45
|
-
* Controlled viewport state
|
|
46
|
-
*/
|
|
47
|
-
viewport?: FlowViewport;
|
|
48
|
-
/**
|
|
49
|
-
* Callback when viewport changes
|
|
50
|
-
*/
|
|
51
|
-
onViewportChange?: (viewport: FlowViewport) => void;
|
|
52
|
-
/**
|
|
53
|
-
* Whether to allow dragging nodes
|
|
54
|
-
*/
|
|
55
|
-
allowDraggingNodes?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Callback when a node drag starts
|
|
58
|
-
*/
|
|
59
|
-
onNodeDragStart?: (nodeId: string, event: React.MouseEvent | React.TouchEvent) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Callback when a node is being dragged
|
|
62
|
-
*/
|
|
63
|
-
onNodeDrag?: (nodeId: string, position: NodePosition, event: MouseEvent | TouchEvent) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Callback when a node drag ends
|
|
66
|
-
*/
|
|
67
|
-
onNodeDragEnd?: (nodeId: string, position: NodePosition) => void;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Custom hook for managing Flow component state
|
|
71
|
-
*/
|
|
72
|
-
export declare const useFlowState: ({ initialNodes, initialEdges, nodes: controlledNodes, edges: controlledEdges, onNodesChange, onEdgesChange, onNodeSelect, selectedNodeId: controlledSelectedNodeId, direction, initialViewport, viewport: controlledViewport, onViewportChange, allowDraggingNodes, onNodeDragStart, onNodeDrag, onNodeDragEnd, }: UseFlowStateProps) => {
|
|
73
|
-
baseId: string;
|
|
74
|
-
nodes: FlowNode[];
|
|
75
|
-
edges: NodeConnection[];
|
|
76
|
-
selectedNodeId: string | undefined;
|
|
77
|
-
viewport: any;
|
|
78
|
-
updateNodes: (newNodes: FlowNode[]) => void;
|
|
79
|
-
updateEdges: (newEdges: NodeConnection[]) => void;
|
|
80
|
-
updateViewport: (newViewport: FlowViewport) => void;
|
|
81
|
-
selectNode: (nodeId: string) => void;
|
|
82
|
-
addNode: (node: FlowNode) => void;
|
|
83
|
-
addNodeAfter: (afterNodeId: string | null, newNodeData: Omit<FlowNode, 'position'>, position?: "top" | "bottom" | "right" | "left" | undefined) => FlowNode;
|
|
84
|
-
deleteNode: (nodeId: string) => void;
|
|
85
|
-
connectNodes: (connection: NodeConnection) => void;
|
|
86
|
-
zoomIn: () => void;
|
|
87
|
-
zoomOut: () => void;
|
|
88
|
-
resetViewport: () => void;
|
|
89
|
-
draggedNodeId: string | null;
|
|
90
|
-
startNodeDrag: (nodeId: string, event: React.MouseEvent | React.TouchEvent) => void;
|
|
91
|
-
updateNodeDrag: (event: MouseEvent | TouchEvent) => void;
|
|
92
|
-
endNodeDrag: () => void;
|
|
93
|
-
allowDraggingNodes: boolean;
|
|
94
|
-
};
|
|
95
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ViewProps } from 'app-studio';
|
|
2
|
-
import { Size, Variant } from './Flow.type';
|
|
3
|
-
/**
|
|
4
|
-
* Default styles for the Flow component
|
|
5
|
-
*/
|
|
6
|
-
export declare const DefaultFlowStyles: {
|
|
7
|
-
container: ViewProps;
|
|
8
|
-
node: ViewProps;
|
|
9
|
-
startNode: ViewProps;
|
|
10
|
-
selectedNode: ViewProps;
|
|
11
|
-
edge: ViewProps;
|
|
12
|
-
edgeArrow: ViewProps;
|
|
13
|
-
edgeLabel: ViewProps;
|
|
14
|
-
controls: ViewProps;
|
|
15
|
-
controlButton: ViewProps;
|
|
16
|
-
addNodeButton: ViewProps;
|
|
17
|
-
nodeContent: ViewProps;
|
|
18
|
-
nodeIcon: ViewProps;
|
|
19
|
-
nodeInfo: ViewProps;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Size variations for the FlowNodeView component
|
|
23
|
-
* These apply to the node's container.
|
|
24
|
-
*/
|
|
25
|
-
export declare const FlowNodeSizes: Record<Size, ViewProps>;
|
|
26
|
-
/**
|
|
27
|
-
* Variant styles for the FlowNodeView component
|
|
28
|
-
* These apply to the node's container.
|
|
29
|
-
*/
|
|
30
|
-
export declare const FlowNodeVariants: Record<Variant, ViewProps>;
|
|
31
|
-
/**
|
|
32
|
-
* Node states (applied to FlowNodeView container)
|
|
33
|
-
*/
|
|
34
|
-
export declare const FlowNodeStates: {
|
|
35
|
-
selected: ViewProps;
|
|
36
|
-
hover: {
|
|
37
|
-
borderColor: string;
|
|
38
|
-
boxShadow: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ViewProps } from 'app-studio';
|
|
3
|
-
interface FlowPropsPlaceholder {
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Size options for FlowNodeView
|
|
7
|
-
*/
|
|
8
|
-
export declare type Size = 'sm' | 'md' | 'lg';
|
|
9
|
-
/**
|
|
10
|
-
* Variant options for FlowNodeView
|
|
11
|
-
*/
|
|
12
|
-
export declare type Variant = 'default' | 'outline' | 'filled';
|
|
13
|
-
/**
|
|
14
|
-
* Position of a node in the flow
|
|
15
|
-
*/
|
|
16
|
-
export interface NodePosition {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Connection between nodes
|
|
22
|
-
*/
|
|
23
|
-
export interface NodeConnection {
|
|
24
|
-
/**
|
|
25
|
-
* Unique ID for the connection (edge)
|
|
26
|
-
* Recommended to be `edge-${sourceNodeId}-${targetNodeId}` or similar
|
|
27
|
-
*/
|
|
28
|
-
id: string;
|
|
29
|
-
/**
|
|
30
|
-
* Source node ID
|
|
31
|
-
*/
|
|
32
|
-
source: string;
|
|
33
|
-
/**
|
|
34
|
-
* Target node ID
|
|
35
|
-
*/
|
|
36
|
-
target: string;
|
|
37
|
-
/**
|
|
38
|
-
* Optional label for the connection
|
|
39
|
-
*/
|
|
40
|
-
label?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Optional custom styling for the connection (applied to FlowEdgeView path)
|
|
43
|
-
*/
|
|
44
|
-
style?: ViewProps;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Flow node data structure
|
|
48
|
-
*/
|
|
49
|
-
export interface FlowNode {
|
|
50
|
-
/**
|
|
51
|
-
* Unique identifier for the node
|
|
52
|
-
*/
|
|
53
|
-
id: string;
|
|
54
|
-
/**
|
|
55
|
-
* Node type (used for rendering different node types)
|
|
56
|
-
*/
|
|
57
|
-
type?: 'default' | 'start' | 'end' | 'decision' | 'process' | string;
|
|
58
|
-
/**
|
|
59
|
-
* Position of the node. Essential for layout in a full flow library.
|
|
60
|
-
*/
|
|
61
|
-
position: NodePosition;
|
|
62
|
-
/**
|
|
63
|
-
* Data associated with the node
|
|
64
|
-
*/
|
|
65
|
-
data?: {
|
|
66
|
-
/**
|
|
67
|
-
* Label text for the node
|
|
68
|
-
*/
|
|
69
|
-
label?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Subtitle text for the node
|
|
72
|
-
*/
|
|
73
|
-
subtitle?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Optional icon to display
|
|
76
|
-
*/
|
|
77
|
-
icon?: React.ReactNode;
|
|
78
|
-
/**
|
|
79
|
-
* Optional number/index for the node
|
|
80
|
-
*/
|
|
81
|
-
number?: number;
|
|
82
|
-
/**
|
|
83
|
-
* Any additional data
|
|
84
|
-
*/
|
|
85
|
-
[key: string]: any;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Whether the node is selected (typically managed by state, not set directly on node data)
|
|
89
|
-
* This field can be used if nodes are passed with pre-selected state, but `selectedNodeId` prop is preferred.
|
|
90
|
-
*/
|
|
91
|
-
selected?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Whether the node is currently being dragged
|
|
94
|
-
*/
|
|
95
|
-
isDragging?: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Whether the node can be dragged
|
|
98
|
-
*/
|
|
99
|
-
draggable?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Custom styling for the node (applied to FlowNodeView container)
|
|
102
|
-
*/
|
|
103
|
-
style?: ViewProps;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Flow viewport state (relevant for pan and zoom, not used in simplified view)
|
|
107
|
-
*/
|
|
108
|
-
export interface FlowViewport {
|
|
109
|
-
zoom: number;
|
|
110
|
-
x: number;
|
|
111
|
-
y: number;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Props for the FlowNodeView component (individual node)
|
|
115
|
-
*/
|
|
116
|
-
export interface FlowNodeProps extends ViewProps {
|
|
117
|
-
node: FlowNode;
|
|
118
|
-
onSelect?: (nodeId: string) => void;
|
|
119
|
-
isSelected?: boolean;
|
|
120
|
-
isDragging?: boolean;
|
|
121
|
-
onDragStart?: (nodeId: string, event: React.MouseEvent | React.TouchEvent) => void;
|
|
122
|
-
onDrag?: (nodeId: string, position: NodePosition, event: MouseEvent | TouchEvent) => void;
|
|
123
|
-
onDragEnd?: (nodeId: string, position: NodePosition) => void;
|
|
124
|
-
size?: Size;
|
|
125
|
-
variant?: Variant;
|
|
126
|
-
views?: {
|
|
127
|
-
container?: ViewProps;
|
|
128
|
-
content?: ViewProps;
|
|
129
|
-
icon?: ViewProps;
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Props for the FlowEdgeView component (connection line)
|
|
134
|
-
*/
|
|
135
|
-
export interface FlowEdgeProps extends ViewProps {
|
|
136
|
-
edge: NodeConnection;
|
|
137
|
-
sourceNode?: FlowNode;
|
|
138
|
-
targetNode?: FlowNode;
|
|
139
|
-
views?: {
|
|
140
|
-
path?: ViewProps;
|
|
141
|
-
label?: ViewProps;
|
|
142
|
-
};
|
|
143
|
-
nodeSize?: Size;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Props for the FlowControlsView component (zoom/pan buttons)
|
|
147
|
-
*/
|
|
148
|
-
export interface FlowControlsProps extends ViewProps {
|
|
149
|
-
onZoomIn?: () => void;
|
|
150
|
-
onZoomOut?: () => void;
|
|
151
|
-
onReset?: () => void;
|
|
152
|
-
views?: {
|
|
153
|
-
container?: ViewProps;
|
|
154
|
-
button?: ViewProps;
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Props for the FlowAddNodeButtonView component (the small '+' button)
|
|
159
|
-
*/
|
|
160
|
-
export interface FlowAddNodeButtonProps extends Omit<ViewProps, 'position'> {
|
|
161
|
-
onClick?: () => void;
|
|
162
|
-
/**
|
|
163
|
-
* Visual position relative to the element it's attached to (for styling hints, not layout)
|
|
164
|
-
*/
|
|
165
|
-
attachmentPosition?: 'top' | 'right' | 'bottom' | 'left';
|
|
166
|
-
views?: {
|
|
167
|
-
container?: ViewProps;
|
|
168
|
-
icon?: ViewProps;
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Flow component type with sub-components.
|
|
173
|
-
* P represents the props of the main Flow component (e.g., FlowProps).
|
|
174
|
-
*/
|
|
175
|
-
export interface FlowComponentType<P = FlowPropsPlaceholder> extends React.FC<P> {
|
|
176
|
-
Node: React.FC<FlowNodeProps>;
|
|
177
|
-
Edge: React.FC<FlowEdgeProps>;
|
|
178
|
-
Controls: React.FC<FlowControlsProps>;
|
|
179
|
-
AddNodeButton: React.FC<FlowAddNodeButtonProps>;
|
|
180
|
-
}
|
|
181
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ViewProps } from 'app-studio';
|
|
3
|
-
import { FlowNode as FlowNodeType, // Renamed to avoid conflict with component name
|
|
4
|
-
NodeConnection, FlowNodeProps, FlowEdgeProps, FlowControlsProps, FlowAddNodeButtonProps, FlowViewport, NodePosition } from './Flow.type';
|
|
5
|
-
import { FlowProps } from './Flow.props';
|
|
6
|
-
export declare const FlowNodeView: React.FC<FlowNodeProps>;
|
|
7
|
-
export declare const FlowEdgeView: React.FC<FlowEdgeProps>;
|
|
8
|
-
export declare const FlowControlsView: React.FC<FlowControlsProps>;
|
|
9
|
-
export declare const FlowAddNodeButtonView: React.FC<FlowAddNodeButtonProps>;
|
|
10
|
-
interface InternalFlowViewProps extends Pick<FlowProps, 'size' | 'variant' | 'direction' | 'showControls' | 'allowAddingNodes' | 'allowDraggingNodes' | 'views'>, Omit<ViewProps, keyof Pick<FlowProps, 'size' | 'variant' | 'direction' | 'showControls' | 'allowAddingNodes' | 'allowDraggingNodes' | 'views'>> {
|
|
11
|
-
nodes: FlowNodeType[];
|
|
12
|
-
edges: NodeConnection[];
|
|
13
|
-
selectedNodeId?: string;
|
|
14
|
-
draggedNodeId?: string | null;
|
|
15
|
-
onNodeSelect: (nodeId: string) => void;
|
|
16
|
-
onAddNode: (afterNodeId: string, position?: 'top' | 'bottom' | 'right' | 'left') => void;
|
|
17
|
-
onNodeDragStart?: (nodeId: string, event: React.MouseEvent | React.TouchEvent) => void;
|
|
18
|
-
onNodeDrag?: (nodeId: string, position: NodePosition, event: MouseEvent | TouchEvent) => void;
|
|
19
|
-
onNodeDragEnd?: (nodeId: string, position: NodePosition) => void;
|
|
20
|
-
baseId: string;
|
|
21
|
-
viewport?: FlowViewport;
|
|
22
|
-
onZoomIn?: () => void;
|
|
23
|
-
onZoomOut?: () => void;
|
|
24
|
-
onReset?: () => void;
|
|
25
|
-
onViewportChange?: (viewport: FlowViewport) => void;
|
|
26
|
-
}
|
|
27
|
-
export declare const FlowView: React.FC<InternalFlowViewProps>;
|
|
28
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ViewProps } from 'app-studio';
|
|
3
|
-
import { TextProps } from '../../Text/Text/Text.props';
|
|
4
|
-
export interface KanbanBoardCard {
|
|
5
|
-
id: string;
|
|
6
|
-
title: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
metadata?: Record<string, unknown>;
|
|
9
|
-
[key: string]: unknown;
|
|
10
|
-
}
|
|
11
|
-
export interface KanbanBoardColumn {
|
|
12
|
-
id: string;
|
|
13
|
-
title: string;
|
|
14
|
-
cards: KanbanBoardCard[];
|
|
15
|
-
footer?: React.ReactNode;
|
|
16
|
-
metadata?: Record<string, unknown>;
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
export interface KanbanBoardProps {
|
|
20
|
-
columns: KanbanBoardColumn[];
|
|
21
|
-
onChange?: (columns: KanbanBoardColumn[]) => void;
|
|
22
|
-
onCardMove?: (card: KanbanBoardCard, fromColumn: KanbanBoardColumn, toColumn: KanbanBoardColumn) => void;
|
|
23
|
-
onCardCreate?: (card: KanbanBoardCard, column: KanbanBoardColumn) => void;
|
|
24
|
-
onCardDelete?: (card: KanbanBoardCard, column: KanbanBoardColumn) => void;
|
|
25
|
-
onCardTitleChange?: (card: KanbanBoardCard, column: KanbanBoardColumn, newTitle: string) => void;
|
|
26
|
-
onCardDescriptionChange?: (card: KanbanBoardCard, column: KanbanBoardColumn, newDescription: string) => void;
|
|
27
|
-
renderCard?: (card: KanbanBoardCard, column: KanbanBoardColumn) => React.ReactNode;
|
|
28
|
-
renderColumnHeader?: (column: KanbanBoardColumn) => React.ReactNode;
|
|
29
|
-
renderEmptyState?: (column: KanbanBoardColumn) => React.ReactNode;
|
|
30
|
-
views?: {
|
|
31
|
-
board?: ViewProps;
|
|
32
|
-
column?: ViewProps;
|
|
33
|
-
columnHeader?: ViewProps;
|
|
34
|
-
columnTitle?: TextProps;
|
|
35
|
-
columnBody?: ViewProps;
|
|
36
|
-
columnFooter?: ViewProps;
|
|
37
|
-
card?: ViewProps;
|
|
38
|
-
cardContent?: ViewProps;
|
|
39
|
-
emptyState?: ViewProps;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
export interface KanbanBoardViewProps extends KanbanBoardProps {
|
|
43
|
-
columns: KanbanBoardColumn[];
|
|
44
|
-
draggedCardId: string | null;
|
|
45
|
-
hoveredColumnId: string | null;
|
|
46
|
-
onCardDragStart: (columnId: string, cardId: string, event: React.DragEvent<HTMLDivElement>) => void;
|
|
47
|
-
onCardDragEnd: () => void;
|
|
48
|
-
onCardDrop: (columnId: string, cardId: string | null, event: React.DragEvent<HTMLDivElement>) => void;
|
|
49
|
-
onColumnDrop: (columnId: string, event: React.DragEvent<HTMLDivElement>) => void;
|
|
50
|
-
onCardDragOver: (columnId: string, cardId: string | null, event: React.DragEvent<HTMLDivElement>) => void;
|
|
51
|
-
onColumnDragOver: (columnId: string, event: React.DragEvent<HTMLDivElement>) => void;
|
|
52
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { KanbanBoardCard, KanbanBoardColumn, KanbanBoardProps } from './KanbanBoard.props';
|
|
3
|
-
export declare const useKanbanBoardState: ({ columns: initialColumns, onChange, onCardMove, onCardCreate: onCardCreateProp, onCardDelete: onCardDeleteProp, onCardTitleChange: onCardTitleChangeProp, onCardDescriptionChange: onCardDescriptionChangeProp, }: KanbanBoardProps) => {
|
|
4
|
-
columns: KanbanBoardColumn[];
|
|
5
|
-
draggedCardId: string | null;
|
|
6
|
-
hoveredColumnId: string | null;
|
|
7
|
-
onCardDragStart: (columnId: string, cardId: string, event: React.DragEvent<HTMLDivElement>) => void;
|
|
8
|
-
onCardDragEnd: () => void;
|
|
9
|
-
onColumnDragOver: (columnId: string, event: React.DragEvent<HTMLDivElement>) => void;
|
|
10
|
-
onCardDragOver: (columnId: string, cardId: string | null, event: React.DragEvent<HTMLDivElement>) => void;
|
|
11
|
-
onColumnDrop: (columnId: string, event: React.DragEvent<HTMLDivElement>) => void;
|
|
12
|
-
onCardDrop: (columnId: string, cardId: string | null, event: React.DragEvent<HTMLDivElement>) => void;
|
|
13
|
-
onCardCreate: (card: KanbanBoardCard, column: KanbanBoardColumn) => void;
|
|
14
|
-
onCardDelete: (card: KanbanBoardCard, column: KanbanBoardColumn) => void;
|
|
15
|
-
onCardTitleChange: (card: KanbanBoardCard, column: KanbanBoardColumn, newTitle: string) => void;
|
|
16
|
-
onCardDescriptionChange: (card: KanbanBoardCard, column: KanbanBoardColumn, newDescription: string) => void;
|
|
17
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { ViewProps } from 'app-studio';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import type { ProgressBarStyles } from '../../ProgressBar/ProgressBar/ProgressBar.props';
|
|
4
|
-
import type { StatusIndicatorStyles } from '../../StatusIndicator/StatusIndicator/StatusIndicator.type';
|
|
5
|
-
import type { TextProps } from '../../Text/Text/Text.props';
|
|
6
|
-
export declare type OKRStatus = 'notStarted' | 'onTrack' | 'atRisk' | 'offTrack' | 'achieved';
|
|
7
|
-
export interface OKRKeyResult {
|
|
8
|
-
id: string;
|
|
9
|
-
title: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
progress?: number;
|
|
12
|
-
metric?: string;
|
|
13
|
-
target?: string;
|
|
14
|
-
current?: string;
|
|
15
|
-
owner?: string;
|
|
16
|
-
status?: OKRStatus;
|
|
17
|
-
confidence?: 'low' | 'medium' | 'high';
|
|
18
|
-
lastUpdated?: string;
|
|
19
|
-
tags?: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface OKRObjective {
|
|
22
|
-
id: string;
|
|
23
|
-
title: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
owner?: string;
|
|
26
|
-
timeframe?: string;
|
|
27
|
-
tags?: string[];
|
|
28
|
-
progress?: number;
|
|
29
|
-
status?: OKRStatus;
|
|
30
|
-
keyResults: OKRKeyResult[];
|
|
31
|
-
}
|
|
32
|
-
export interface OKRViews {
|
|
33
|
-
container?: ViewProps;
|
|
34
|
-
objectiveCard?: ViewProps;
|
|
35
|
-
objectiveHeader?: ViewProps;
|
|
36
|
-
objectiveTitle?: TextProps;
|
|
37
|
-
objectiveDescription?: TextProps;
|
|
38
|
-
objectiveMeta?: ViewProps;
|
|
39
|
-
objectiveOwner?: TextProps;
|
|
40
|
-
objectiveTimeframe?: TextProps;
|
|
41
|
-
objectiveTags?: ViewProps;
|
|
42
|
-
tag?: ViewProps;
|
|
43
|
-
tagText?: TextProps;
|
|
44
|
-
objectiveProgressSection?: ViewProps;
|
|
45
|
-
objectiveProgressLabel?: TextProps;
|
|
46
|
-
objectiveProgressValue?: TextProps;
|
|
47
|
-
objectiveProgressBar?: ProgressBarStyles;
|
|
48
|
-
objectiveStatus?: StatusIndicatorStyles;
|
|
49
|
-
keyResultList?: ViewProps;
|
|
50
|
-
keyResultItem?: ViewProps;
|
|
51
|
-
keyResultHeader?: ViewProps;
|
|
52
|
-
keyResultTitle?: TextProps;
|
|
53
|
-
keyResultDescription?: TextProps;
|
|
54
|
-
keyResultMeta?: ViewProps;
|
|
55
|
-
keyResultOwner?: TextProps;
|
|
56
|
-
keyResultStatus?: StatusIndicatorStyles;
|
|
57
|
-
keyResultTags?: ViewProps;
|
|
58
|
-
keyResultTag?: ViewProps;
|
|
59
|
-
keyResultTagText?: TextProps;
|
|
60
|
-
keyResultProgressSection?: ViewProps;
|
|
61
|
-
keyResultProgressValue?: TextProps;
|
|
62
|
-
keyResultProgressBar?: ProgressBarStyles;
|
|
63
|
-
footer?: ViewProps;
|
|
64
|
-
}
|
|
65
|
-
export interface OKRProps {
|
|
66
|
-
objectives: OKRObjective[];
|
|
67
|
-
themeMode?: 'light' | 'dark';
|
|
68
|
-
views?: OKRViews;
|
|
69
|
-
onKeyResultClick?: (keyResult: OKRKeyResult, objective: OKRObjective) => void;
|
|
70
|
-
renderObjectiveFooter?: (objective: OKRObjective) => ReactNode;
|
|
71
|
-
renderKeyResultFooter?: (keyResult: OKRKeyResult, objective: OKRObjective) => ReactNode;
|
|
72
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ViewProps } from 'app-studio';
|
|
2
|
-
import type { Status } from '../../StatusIndicator/StatusIndicator/StatusIndicator.type';
|
|
3
|
-
import type { OKRStatus } from './OKR.props';
|
|
4
|
-
declare type ThemeMode = 'light' | 'dark';
|
|
5
|
-
declare type OKRTheme = {
|
|
6
|
-
container: ViewProps;
|
|
7
|
-
objectiveCard: ViewProps;
|
|
8
|
-
tag: ViewProps;
|
|
9
|
-
keyResultItem: ViewProps;
|
|
10
|
-
divider: ViewProps;
|
|
11
|
-
};
|
|
12
|
-
export declare const getOKRTheme: (mode: ThemeMode) => OKRTheme;
|
|
13
|
-
export declare const STATUS_METADATA: Record<OKRStatus, {
|
|
14
|
-
indicator: Status;
|
|
15
|
-
label: string;
|
|
16
|
-
}>;
|
|
17
|
-
export declare const deriveStatusFromProgress: (progress: number) => OKRStatus;
|
|
18
|
-
export declare const clampProgress: (value?: number | undefined) => number;
|
|
19
|
-
export {};
|