@@ -12,32 +12,32 @@ import {
1212 Fieldset ,
1313} from "@chakra-ui/react" ;
1414import { Save , X , FileCode } from "lucide-react" ;
15- import { FlowClassDefinition } from "@trustgraph/react-state" ;
15+ import { FlowBlueprintDefinition } from "@trustgraph/react-state" ;
1616
17- interface FlowClassEditPanelProps {
18- flowClass : FlowClassDefinition ;
19- onSave ?: ( flowClass : FlowClassDefinition ) => void ;
17+ interface FlowBlueprintsEditPanelProps {
18+ flowBlueprints : FlowBlueprintDefinition ;
19+ onSave ?: ( flowBlueprints : FlowBlueprintDefinition ) => void ;
2020 onCancel ?: ( ) => void ;
2121 isLoading ?: boolean ;
2222}
2323
24- const FlowClassEditPanel : React . FC < FlowClassEditPanelProps > = ( {
25- flowClass ,
24+ const FlowBlueprintsEditPanel : React . FC < FlowBlueprintEditPanelProps > = ( {
25+ flowBlueprints ,
2626 onSave,
2727 onCancel,
2828 isLoading = false ,
2929} ) => {
30- const [ description , setDescription ] = useState ( flowClass . description || "" ) ;
31- const [ tags , setTags ] = useState ( ( flowClass . tags || [ ] ) . join ( ", " ) ) ;
30+ const [ description , setDescription ] = useState ( flowBlueprints . description || "" ) ;
31+ const [ tags , setTags ] = useState ( ( flowBlueprints . tags || [ ] ) . join ( ", " ) ) ;
3232
3333 useEffect ( ( ) => {
34- setDescription ( flowClass . description || "" ) ;
35- setTags ( ( flowClass . tags || [ ] ) . join ( ", " ) ) ;
36- } , [ flowClass ] ) ;
34+ setDescription ( flowBlueprints . description || "" ) ;
35+ setTags ( ( flowBlueprints . tags || [ ] ) . join ( ", " ) ) ;
36+ } , [ flowBlueprints ] ) ;
3737
3838 const handleSave = ( ) => {
39- const updatedFlowClass : FlowClassDefinition = {
40- ...flowClass ,
39+ const updatedFlowBlueprints : FlowBlueprintDefinition = {
40+ ...flowBlueprints ,
4141 description : description . trim ( ) || undefined ,
4242 tags : tags
4343 . split ( "," )
@@ -46,16 +46,16 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
4646 . slice ( 0 , 10 ) , // Limit to 10 tags
4747 } ;
4848
49- onSave ?.( updatedFlowClass ) ;
49+ onSave ?.( updatedFlowBlueprints ) ;
5050 } ;
5151
5252 const hasChanges =
53- description !== ( flowClass . description || "" ) ||
54- tags !== ( flowClass . tags || [ ] ) . join ( ", " ) ;
53+ description !== ( flowBlueprints . description || "" ) ||
54+ tags !== ( flowBlueprints . tags || [ ] ) . join ( ", " ) ;
5555
56- const classCount = Object . keys ( flowClass . class || { } ) . length ;
57- const flowCount = Object . keys ( flowClass . flow || { } ) . length ;
58- const interfaceCount = Object . keys ( flowClass . interfaces || { } ) . length ;
56+ const blueprintCount = Object . keys ( flowBlueprints . blueprint || { } ) . length ;
57+ const flowCount = Object . keys ( flowBlueprints . flow || { } ) . length ;
58+ const interfaceCount = Object . keys ( flowBlueprints . interfaces || { } ) . length ;
5959
6060 return (
6161 < Box
@@ -78,7 +78,7 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
7878 < HStack gap = { 3 } >
7979 < FileCode size = { 20 } />
8080 < Text fontSize = "lg" fontWeight = "semibold" >
81- Edit Flow Class : { flowClass . id }
81+ Edit Flow Blueprints : { flowBlueprint . id }
8282 </ Text >
8383 </ HStack >
8484 < HStack gap = { 2 } >
@@ -121,7 +121,7 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
121121 < Textarea
122122 value = { description }
123123 onChange = { ( e ) => setDescription ( e . target . value ) }
124- placeholder = "Enter flow class description..."
124+ placeholder = "Enter flow blueprint description..."
125125 rows = { 3 }
126126 resize = "none"
127127 />
@@ -148,12 +148,12 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
148148 { /* Right Column - Statistics */ }
149149 < VStack gap = { 4 } align = "stretch" minW = "300px" >
150150 < Fieldset . Root >
151- < Fieldset . Legend > Flow Class Statistics</ Fieldset . Legend >
151+ < Fieldset . Legend > Flow Blueprints Statistics</ Fieldset . Legend >
152152 < Fieldset . Content >
153153 < VStack gap = { 3 } align = "stretch" >
154154 < HStack justify = "space-between" >
155- < Text fontSize = "sm" > Class Processors:</ Text >
156- < Badge colorPalette = "blue" > { classCount } </ Badge >
155+ < Text fontSize = "sm" > Blueprints Processors:</ Text >
156+ < Badge colorPalette = "blue" > { blueprintCount } </ Badge >
157157 </ HStack >
158158
159159 < HStack justify = "space-between" >
@@ -169,21 +169,21 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
169169 < HStack justify = "space-between" >
170170 < Text fontSize = "sm" > Total Components:</ Text >
171171 < Badge colorPalette = "gray" >
172- { classCount + flowCount + interfaceCount }
172+ { blueprintCount + flowCount + interfaceCount }
173173 </ Badge >
174174 </ HStack >
175175 </ VStack >
176176 </ Fieldset . Content >
177177 </ Fieldset . Root >
178178
179179 { /* Preview of current tags */ }
180- { flowClass . tags && flowClass . tags . length > 0 && (
180+ { flowBlueprints . tags && flowBlueprint . tags . length > 0 && (
181181 < Box >
182182 < Text fontSize = "sm" fontWeight = "medium" mb = { 2 } >
183183 Current Tags
184184 </ Text >
185185 < HStack gap = { 1 } flexWrap = "wrap" >
186- { flowClass . tags . map ( ( tag , index ) => (
186+ { flowBlueprints . tags . map ( ( tag , index ) => (
187187 < Badge
188188 key = { index }
189189 colorPalette = "gray"
@@ -203,4 +203,4 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
203203 ) ;
204204} ;
205205
206- export default FlowClassEditPanel ;
206+ export default FlowBlueprintsEditPanel ;
0 commit comments