File tree 8 files changed +23
-23
lines changed
components/app/nodes/form-node
packages/shared/src/protocol/transition
8 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 8
8
StateNode as StateNodeType ,
9
9
TargetHandle ,
10
10
useReactFlowStore ,
11
- DRAGGABLE_NODE_ID ,
12
- DraggableNodeType ,
13
- useDrop ,
14
11
} from '@shellagent/flow-engine' ;
15
12
import { TValues } from '@shellagent/form-engine' ;
16
13
import { RefSceneEnum } from '@shellagent/shared/protocol/app-scope' ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { getIntroSchema } from '@/stores/app/schema/get-intro-schema';
8
8
import { getStateSchema } from '@/stores/app/schema/get-state-schema' ;
9
9
import { generateUUID } from '@/utils/common-helper' ;
10
10
11
- import { getConditionStateSchema } from './schema/condition-state-schema' ;
11
+ import { conditionConfigSchema } from './schema/condition-state-schema' ;
12
12
import { formConfigSchema } from './schema/form-config' ;
13
13
import { introConfigSchema } from './schema/intro-config' ;
14
14
import { startSchema } from './schema/start-node' ;
@@ -109,7 +109,7 @@ export const SchemaProvider: React.FC<SchemaProviderProps> = ({
109
109
}
110
110
111
111
if ( type === 'condition-state-config' ) {
112
- return getConditionStateSchema ;
112
+ return conditionConfigSchema ;
113
113
}
114
114
115
115
if ( type === NodeTypeEnum . state ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { FieldModeEnum } from '@shellagent/shared/protocol/extend-config';
4
4
import { validateCustomKey } from '@/stores/app/utils/validator' ;
5
5
import { ENABLE_MIME } from '@/utils/file-types' ;
6
6
7
- export const getConditionStateSchema : ISchema = {
7
+ export const conditionConfigSchema : ISchema = {
8
8
type : 'object' ,
9
9
'x-type' : 'Block' ,
10
10
'x-title-size' : 'h5' ,
Original file line number Diff line number Diff line change @@ -789,20 +789,5 @@ export const formConfigSchema: ISchema = {
789
789
'x-collapsible' : true ,
790
790
'x-addable' : true ,
791
791
} ,
792
- id : {
793
- type : 'string' ,
794
- default : '' ,
795
- 'x-hidden' : true ,
796
- } ,
797
- name : {
798
- type : 'string' ,
799
- default : '' ,
800
- 'x-hidden' : true ,
801
- } ,
802
- type : {
803
- type : 'string' ,
804
- default : 'state' ,
805
- 'x-hidden' : true ,
806
- } ,
807
792
} ,
808
793
} ;
Original file line number Diff line number Diff line change @@ -12,5 +12,22 @@ export const getFormSchema = (name: string): ISchema => {
12
12
'p-3 border-b-[0.3px] border-default bg-utility-khaki-10 rounded-t-lg' ,
13
13
'x-class' : 'px-3 pb-3 rounded-lg mt-0' ,
14
14
'x-title-copiable' : false ,
15
+ properties : {
16
+ id : {
17
+ type : 'string' ,
18
+ default : '' ,
19
+ 'x-hidden' : true ,
20
+ } ,
21
+ name : {
22
+ type : 'string' ,
23
+ default : '' ,
24
+ 'x-hidden' : true ,
25
+ } ,
26
+ type : {
27
+ type : 'string' ,
28
+ default : 'form' ,
29
+ 'x-hidden' : true ,
30
+ } ,
31
+ } ,
15
32
} ;
16
33
} ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const getIntroSchema = (name: string): ISchema => {
32
32
} ,
33
33
type : {
34
34
type : 'string' ,
35
- default : 'state ' ,
35
+ default : 'intro ' ,
36
36
'x-hidden' : true ,
37
37
} ,
38
38
render : {
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export const introConfigSchema: ISchema = {
149
149
} ,
150
150
type : {
151
151
type : 'string' ,
152
- default : 'state ' ,
152
+ default : 'intro ' ,
153
153
'x-hidden' : true ,
154
154
} ,
155
155
} ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export enum TransitionTypeEnum {
23
23
intro = NodeTypeEnum . intro ,
24
24
state = NodeTypeEnum . state ,
25
25
condition_state = NodeTypeEnum . condition_state ,
26
+ form = NodeTypeEnum . form ,
26
27
}
27
28
28
29
// 临时
You can’t perform that action at this time.
0 commit comments