@@ -69,37 +69,70 @@ export interface INodeDecorator {
6969 } ;
7070}
7171
72- export interface BaseNodeInfo {
73- taskType ?: string ;
74- type ?: string ;
75- compositionId ?: string ;
76- isComposition ?: boolean ;
72+ // These also contain properties from NodeInfo (which is a superset of BaseNodeInfo)..
73+ // TODO : move that and have some sort of registration construction so that it can be
74+ // used dynamically by the serialization proces
75+ export interface BaseSettingsNodeInfo {
7776 useInCompositionOnly ?: boolean ;
7877 nodeCannotBeReplaced ?: boolean ;
7978 isAnnotation ?: boolean ;
8079 canBeStartedByTrigger ?: boolean ;
8180 readPropertyFromNodeInfoForInitialTrigger ?: string ;
8281 keepPopupOpenAfterUpdate ?: boolean ;
8382 supportsPreview ?: boolean ;
83+ showFormOnlyInPopup ?: boolean ;
84+ isSettingsPopup ?: boolean ;
85+ hasNoFormPopup ?: boolean ;
86+ meta ?: AllMetaFieldTypes [ ] ;
87+ metaInputs ?: AllMetaFieldTypes [ ] ;
88+ canvasAppInstance ?: IFlowCanvasBase < BaseNodeInfo > ;
89+ initializeOnStartFlow ?: boolean ;
90+ isVariable ?: boolean ;
91+ isUINode ?: boolean ;
92+ supportsDecorators ?: boolean ;
93+ }
94+ const baseSettingsNodeInfoSchema : Record < keyof BaseSettingsNodeInfo , boolean > =
95+ {
96+ useInCompositionOnly : true ,
97+ nodeCannotBeReplaced : true ,
98+ isAnnotation : true ,
99+ canBeStartedByTrigger : true ,
100+ readPropertyFromNodeInfoForInitialTrigger : true ,
101+ keepPopupOpenAfterUpdate : true ,
102+ supportsPreview : true ,
103+ showFormOnlyInPopup : true ,
104+ isSettingsPopup : true ,
105+ hasNoFormPopup : true ,
106+ meta : true ,
107+ metaInputs : true ,
108+ canvasAppInstance : true ,
109+ initializeOnStartFlow : true ,
110+ isVariable : true ,
111+ isUINode : true ,
112+ supportsDecorators : true ,
113+ } ;
114+
115+ export const baseSettingsNodeInfoProperties = Object . keys (
116+ baseSettingsNodeInfoSchema
117+ ) as ( keyof BaseSettingsNodeInfo ) [ ] ;
118+
119+ export interface BaseNodeInfo extends BaseSettingsNodeInfo {
120+ taskType ?: string ;
121+ type ?: string ;
122+ compositionId ?: string ;
123+ isComposition ?: boolean ;
84124 cancelPreview ?: ( ) => void ;
85125 outputConnectionInfo ?: {
86126 text : string ;
87127 fieldName : string ;
88128 form ?: any [ ] ;
89129 onChanged ?: ( connection : IConnectionNodeComponent < BaseNodeInfo > ) => void ;
90130 } ;
91- canvasAppInstance ?: IFlowCanvasBase < BaseNodeInfo > ;
92131
93132 initializeCompute ?: ( ) => void ;
94- showFormOnlyInPopup ?: boolean ;
95- isSettingsPopup ?: boolean ;
96- hasNoFormPopup ?: boolean ;
97133 formElements ?: any [ ] ;
98134 delete ?: ( ) => void ;
99135 formValues ?: any ;
100136 decorators ?: INodeDecorator [ ] ;
101137 update ?: ( ) => void ;
102-
103- meta ?: AllMetaFieldTypes [ ] ;
104- metaInputs ?: AllMetaFieldTypes [ ] ;
105138}
0 commit comments