@digitalsee-ai/rcs 0.0.15 → 1.0.0
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 +237 -237
- package/dist/components/digitalsee/workflow/Canvas/NextConfigModalWrapper.d.ts +9 -0
- package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvas.d.ts +4 -0
- package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvasHeader.d.ts +15 -0
- package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvas.d.ts +1 -12
- package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvasBase.d.ts +4 -0
- package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvasHeader.d.ts +2 -1
- package/dist/components/digitalsee/workflow/Canvas/color.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +75 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +49 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/useCanvasApi.d.ts +22 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/useDataLoading.d.ts +21 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +44 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeFormDraftCache.d.ts +14 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/useWorkflowCanvasState.d.ts +78 -0
- package/dist/components/digitalsee/workflow/Canvas/types.d.ts +91 -0
- package/dist/components/digitalsee/workflow/Edges/BaseEdge.d.ts +3 -2
- package/dist/components/digitalsee/workflow/Edges/EdgeFactory.d.ts +43 -0
- package/dist/components/digitalsee/workflow/NextNodesConfigModal/index.d.ts +13 -0
- package/dist/components/digitalsee/workflow/Nodes/ActionNode.d.ts +3 -3
- package/dist/components/digitalsee/workflow/Nodes/AgentNode.d.ts +2 -2
- package/dist/components/digitalsee/workflow/Nodes/BrowserNode.d.ts +2 -2
- package/dist/components/digitalsee/workflow/Nodes/CustomNode.d.ts +2 -2
- package/dist/components/digitalsee/workflow/Nodes/NextNodeFactory.d.ts +11 -0
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextActionNode.d.ts +9 -0
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextBaseNode.d.ts +15 -0
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextConditionNode.d.ts +10 -0
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextLoopNode.d.ts +10 -0
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextSwitchNode.d.ts +10 -0
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextTriggerNode.d.ts +9 -0
- package/dist/components/digitalsee/workflow/Nodes/NodeFactory.d.ts +3 -12
- package/dist/components/digitalsee/workflow/Nodes/StickyNoteNode.d.ts +2 -2
- package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Nodes/components/NextNodeDescription.d.ts +16 -0
- package/dist/components/digitalsee/workflow/Nodes/components/NextNodeOperations.d.ts +11 -0
- package/dist/components/digitalsee/workflow/Nodes/components/NodeOperations.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/ActionNodeConfig/index.d.ts +7 -1
- package/dist/components/digitalsee/workflow/NodesConfig/ConditionNodeConfig/index.d.ts +5 -4
- package/dist/components/digitalsee/workflow/NodesConfig/ErrorHandler.d.ts +17 -2
- package/dist/components/digitalsee/workflow/NodesConfig/LoopNodeConfig/index.d.ts +2 -3
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CreateCredentialModal.d.ts +13 -0
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CredentialSelect.d.ts +17 -0
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/ModifyCredentialModal.d.ts +17 -0
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/fieldSchemaAdapter.d.ts +10 -0
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/fieldSchemaAdapter.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/index.d.ts +15 -0
- package/dist/components/digitalsee/workflow/NodesConfig/SwitchNodeConfig/index.d.ts +6 -5
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/CreateAccountModal/index.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/CredentialAccountForm.d.ts +10 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/DateField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/DateTimeField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/ExtendObjectField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/FixedObjectField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/PasswordField/index.d.ts +2 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/TextAreaField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/TextField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/TimeField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/ModifyAccountModal/index.d.ts +3 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/index.d.ts +5 -3
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/components/AIFormField.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/DateField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/DateTimeField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/FixedObjectField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/HourMinuteField/index.d.ts +5 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/common-placeholder-theme.d.ts +11 -11
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JavascriptTagEditorField/editor.d.ts +1 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/interface.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/keywords.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/common-placeholder-theme.d.ts +11 -11
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/interface.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/plugin/keywords.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/plugin/keywords.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{MutilRowAIExtractConfigField → MultiRowAIExtractConfigField}/index.d.ts +2 -2
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/RichTagInput/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/RichTagInput/useVariableInfo.d.ts +13 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/TextField/index.d.ts +2 -2
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/TimeField/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/index.d.ts +3 -3
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/next-compatible.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/next-compatible.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeSettings.d.ts +6 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeTest.d.ts +6 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/index.d.ts +6 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/variable-tree-next.d.ts +49 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/variable-tree-next.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/VariableModal/index.d.ts +2 -1
- package/dist/components/digitalsee/workflow/NodesConfig/context.d.ts +4 -0
- package/dist/components/digitalsee/workflow/NodesConfig/define/actions.d.ts +3 -3
- package/dist/components/digitalsee/workflow/NodesConfig/define/condition.d.ts +5 -58
- package/dist/components/digitalsee/workflow/NodesConfig/define/condition.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/NodesConfig/define/flow.d.ts +1 -26
- package/dist/components/digitalsee/workflow/NodesConfig/index.d.ts +3 -6
- package/dist/components/digitalsee/workflow/NodesConfig/utils/credentialRequirement.d.ts +17 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/CategoryTabs.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +17 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.d.ts +2 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/components/NodeListItem.d.ts +8 -0
- package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/hooks/useNodeList.d.ts +14 -0
- package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/index.d.ts +9 -0
- package/dist/components/digitalsee/workflow/api/dip.d.ts +311 -0
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +996 -0
- package/dist/components/digitalsee/workflow/api/index.d.ts +38 -13
- package/dist/components/digitalsee/workflow/api/index.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/builtin/controls/MultiRowGuard/index.d.ts +13 -0
- package/dist/components/digitalsee/workflow/builtin/controls/{MutilRowGuard → MultiRowGuard}/types.d.ts +15 -23
- package/dist/components/digitalsee/workflow/builtin/controls/MutilRowGuard/index.d.ts +9 -9
- package/dist/components/digitalsee/workflow/builtin/globalConfig/index.d.ts +1 -0
- package/dist/components/digitalsee/workflow/builtin/globalConfig/service.d.ts +8 -0
- package/dist/components/digitalsee/workflow/builtin/globalConfig/service.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/builtin/globalConfig/types.d.ts +17 -0
- package/dist/components/digitalsee/workflow/constants/nextHandles.d.ts +1 -0
- package/dist/components/digitalsee/workflow/enums/canvas.d.ts +63 -0
- package/dist/components/digitalsee/workflow/enums/edge.d.ts +10 -0
- package/dist/components/digitalsee/workflow/enums/handle.d.ts +42 -0
- package/dist/components/digitalsee/workflow/enums/index.d.ts +5 -0
- package/dist/components/digitalsee/workflow/enums/node.d.ts +199 -0
- package/dist/components/digitalsee/workflow/enums/workflow.d.ts +90 -0
- package/dist/components/digitalsee/workflow/events/eventBus.d.ts +8 -2
- package/dist/components/digitalsee/workflow/hooks/use-before-unload.d.ts +1 -1
- package/dist/components/digitalsee/workflow/hooks/useCanvasLayout.d.ts +2 -1
- package/dist/components/digitalsee/workflow/hooks/useHandleConnections.d.ts +1 -1
- package/dist/components/digitalsee/workflow/hooks/usePanel.d.ts +26 -0
- package/dist/components/digitalsee/workflow/hooks/useVariables.d.ts +52 -0
- package/dist/components/digitalsee/workflow/hooks/useWorkflow.d.ts +3 -3
- package/dist/components/digitalsee/workflow/index.d.ts +11 -2
- package/dist/components/digitalsee/workflow/store/index.d.ts +17 -0
- package/dist/components/digitalsee/workflow/store/panelSlice.d.ts +5 -5
- package/dist/components/digitalsee/workflow/store/workflowSlice.d.ts +44 -0
- package/dist/components/digitalsee/workflow/store/workflowSlice.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/types/Edge.d.ts +1 -3
- package/dist/components/digitalsee/workflow/types/Handle.d.ts +3 -29
- package/dist/components/digitalsee/workflow/types/Node.d.ts +25 -63
- package/dist/components/digitalsee/workflow/types/NodeProtocol.d.ts +1 -12
- package/dist/components/digitalsee/workflow/types/Workflow.d.ts +4 -26
- package/dist/components/digitalsee/workflow/types/engine.d.ts +2 -0
- package/dist/components/digitalsee/workflow/utils/common.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/flowDataAdapterNext.d.ts +13 -0
- package/dist/components/digitalsee/workflow/utils/glob.d.ts +1 -1
- package/dist/components/digitalsee/workflow/utils/layoutUtils.d.ts +2 -3
- package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.d.ts +6 -0
- package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/nodeDataFormatter.d.ts +1 -1
- package/dist/components/digitalsee/workflow/utils/nodeDataFormatterNext.d.ts +11 -0
- package/dist/components/digitalsee/workflow/utils/nodeSummaryAdapter.d.ts +15 -0
- package/dist/components/dynamic-form/DynamicForm.d.ts +8 -3
- package/dist/components/dynamic-form/DynamicForm.test.d.ts +1 -0
- package/dist/components/dynamic-form/DynamicFormContext.d.ts +4 -0
- package/dist/components/dynamic-form/FieldRenderer.d.ts +6 -2
- package/dist/components/dynamic-form/components/ValueModeWrapper/index.d.ts +7 -1
- package/dist/components/dynamic-form/components/VariableInput/index.d.ts +1 -0
- package/dist/components/dynamic-form/fields/complex/KeyValueField.test.d.ts +1 -0
- package/dist/components/dynamic-form/fields/index.d.ts +12 -0
- package/dist/components/dynamic-form/index.d.ts +6 -6
- package/dist/components/dynamic-form/registry/createFieldComponent.test.d.ts +1 -0
- package/dist/components/dynamic-form/registry/index.d.ts +2 -2
- package/dist/components/dynamic-form/types/field-component.d.ts +12 -3
- package/dist/locales/en-US/common.d.ts +8 -17
- package/dist/locales/en-US/components.d.ts +28 -0
- package/dist/locales/en-US/link/flow.d.ts +9 -5
- package/dist/locales/en-US.d.ts +42 -22
- package/dist/locales/index.d.ts +2 -714
- package/dist/locales/zh-CN/common.d.ts +8 -17
- package/dist/locales/zh-CN/components.d.ts +28 -0
- package/dist/locales/zh-CN/link/flow.d.ts +9 -5
- package/dist/locales/zh-CN.d.ts +42 -22
- package/dist/locales/zh-TW/common.d.ts +8 -17
- package/dist/locales/zh-TW/components.d.ts +28 -0
- package/dist/locales/zh-TW/link/flow.d.ts +9 -5
- package/dist/locales/zh-TW.d.ts +42 -22
- package/dist/postcss.config.js +1 -0
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +55706 -50696
- package/dist/rcs.es.js.map +1 -0
- package/dist/rcs.umd.js +68 -67
- package/dist/rcs.umd.js.map +1 -0
- package/package.json +145 -150
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/HourMiniuteField/index.d.ts +0 -5
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JavscriptTagEditorField/editor.d.ts +0 -1
- package/dist/components/digitalsee/workflow/NodesConfig/define/config-form-item.d.ts +0 -40
- package/dist/components/digitalsee/workflow/de.d.ts +0 -1
- package/dist/components/digitalsee/workflow/types/SaveStatus.d.ts +0 -1
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/extensions.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/index.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/base-theme.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/custom-completions.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/functions.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/hint.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/placeholders.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/hooks/{use-wokflow-id.d.ts → use-workflow-id.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactFlowInstance } from '@xyflow/react';
|
|
2
|
+
import { AppDispatch } from '../../store';
|
|
3
|
+
import { CanvasAPI } from '../../types/engine';
|
|
4
|
+
interface UseCanvasApiParams {
|
|
5
|
+
dispatch: AppDispatch;
|
|
6
|
+
reactFlow: ReactFlowInstance;
|
|
7
|
+
setEdges: (edges: any) => void;
|
|
8
|
+
setNodes: (nodes: any) => void;
|
|
9
|
+
store: {
|
|
10
|
+
getState: () => any;
|
|
11
|
+
};
|
|
12
|
+
setNodeConfigVisible: (nodeId: string | null) => void;
|
|
13
|
+
saveFlowRef: React.RefObject<() => Promise<void>>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 构造对外 Canvas API
|
|
17
|
+
*/
|
|
18
|
+
export declare function useCanvasApi({ dispatch, reactFlow, setEdges, setNodes, store, setNodeConfigVisible, saveFlowRef, }: UseCanvasApiParams): {
|
|
19
|
+
canvasApi: CanvasAPI;
|
|
20
|
+
eventListenersRef: React.RefObject<Map<string, Set<Function>>>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WorkflowCanvasStrategy } from '../types';
|
|
2
|
+
import { AppDispatch } from '../../store';
|
|
3
|
+
interface UseDataLoadingParams {
|
|
4
|
+
workflowId?: string;
|
|
5
|
+
strategy: WorkflowCanvasStrategy;
|
|
6
|
+
setNodes: (nodes: any) => void;
|
|
7
|
+
setEdges: (edges: any) => void;
|
|
8
|
+
fitView: (options?: any) => void;
|
|
9
|
+
setLoading: (v: boolean) => void;
|
|
10
|
+
setUnSave: (v: boolean) => void;
|
|
11
|
+
dispatch: AppDispatch;
|
|
12
|
+
setFlowOpStatusAction: (status: any) => void;
|
|
13
|
+
refreshWorkFlowNum: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 数据加载 Hook
|
|
17
|
+
*
|
|
18
|
+
* @param params 加载所需的依赖
|
|
19
|
+
*/
|
|
20
|
+
export declare function useDataLoading(params: UseDataLoadingParams): void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { WorkflowCanvasStrategy } from '../types';
|
|
2
|
+
import { EngineMode } from '../../enums/workflow';
|
|
3
|
+
import { NodeData as NodeFactoryData } from '../../Nodes/NodeFactory';
|
|
4
|
+
import { ActionItem } from '../../Panels/ModernNodeSelectorPanel/types';
|
|
5
|
+
import { Edge, Node } from '@xyflow/react';
|
|
6
|
+
interface NodeAddInfo {
|
|
7
|
+
sourceNodeId?: string;
|
|
8
|
+
sourceHandle?: string;
|
|
9
|
+
targetNodeId?: string;
|
|
10
|
+
targetHandle?: string;
|
|
11
|
+
position?: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
trigger?: boolean;
|
|
16
|
+
edge?: any;
|
|
17
|
+
sourceNode?: any;
|
|
18
|
+
targetNode?: any;
|
|
19
|
+
protocol?: string;
|
|
20
|
+
refresh?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface UseNodeAddCallbackParams {
|
|
23
|
+
workflowId?: string;
|
|
24
|
+
strategy: WorkflowCanvasStrategy;
|
|
25
|
+
store: {
|
|
26
|
+
getState: () => {
|
|
27
|
+
nodes: Node[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
addNodes: (nodes: Node<NodeFactoryData>[]) => void;
|
|
31
|
+
addEdges: (edges: Edge[]) => void;
|
|
32
|
+
removeEdges: (edgeIds: string[]) => void;
|
|
33
|
+
setNodeAddCallback: (callback: (info: NodeAddInfo, nodeType: ActionItem) => void) => void;
|
|
34
|
+
handleEdgeAddNode: (position: {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
}, edge?: Edge) => void;
|
|
38
|
+
setNodeConfigVisible: (nodeId: string | null) => void;
|
|
39
|
+
setNodeFitHumanView: (nodeId: string) => void;
|
|
40
|
+
saveFlow: () => Promise<void>;
|
|
41
|
+
engineMode: EngineMode;
|
|
42
|
+
}
|
|
43
|
+
export declare function useNodeAddCallback({ workflowId, strategy, store, addNodes, addEdges, removeEdges, setNodeAddCallback, handleEdgeAddNode, setNodeConfigVisible, setNodeFitHumanView, saveFlow, engineMode, }: UseNodeAddCallbackParams): void;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 节点表单草稿缓存 Hook
|
|
3
|
+
*
|
|
4
|
+
* 用于在画布层维护节点配置表单的草稿数据,支持:
|
|
5
|
+
* - 用户填写部分表单后切换节点,草稿保留
|
|
6
|
+
* - 回到原节点时自动回填草稿
|
|
7
|
+
* - 保存成功后清除草稿
|
|
8
|
+
*
|
|
9
|
+
* @returns {Object} 缓存操作方法
|
|
10
|
+
*/
|
|
11
|
+
export declare function useNodeFormDraftCache(): {
|
|
12
|
+
getCachedValues: (nodeId: string) => any;
|
|
13
|
+
handleValuesChange: (nodeId: string, values: any) => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { WorkflowCanvasProps } from '../constants';
|
|
2
|
+
import { SaveStatus } from '../../enums/workflow';
|
|
3
|
+
import { useEdgesInteraction } from '../../hooks/use-edges-interaction';
|
|
4
|
+
import { useFlowDataOperation } from '../../hooks/use-flow-data-operation';
|
|
5
|
+
import { useNodesInteraction } from '../../hooks/use-nodes-interaction';
|
|
6
|
+
import { usePanel } from '../../hooks/usePanel';
|
|
7
|
+
import { useWorkflow } from '../../hooks/useWorkflow';
|
|
8
|
+
import { useAppDispatch } from '../../store';
|
|
9
|
+
import { CanvasAPI } from '../../types/engine';
|
|
10
|
+
import { Connection, Edge, EdgeChange, Node, NodeChange, useEdgesState, useNodesState, useReactFlow, useStoreApi } from '@xyflow/react';
|
|
11
|
+
import { default as React } from 'react';
|
|
12
|
+
export interface WorkflowCanvasStateResult {
|
|
13
|
+
nodes: Node[];
|
|
14
|
+
edges: Edge[];
|
|
15
|
+
setNodes: ReturnType<typeof useNodesState>[1];
|
|
16
|
+
setEdges: ReturnType<typeof useEdgesState>[1];
|
|
17
|
+
unSave: boolean;
|
|
18
|
+
setUnSave: (v: boolean) => void;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
setLoading: (v: boolean) => void;
|
|
21
|
+
debugVisible: boolean;
|
|
22
|
+
setDebugVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
23
|
+
autoSaveStatus: SaveStatus;
|
|
24
|
+
lastSavedTime: string;
|
|
25
|
+
helperLineHorizontal: number | undefined;
|
|
26
|
+
helperLineVertical: number | undefined;
|
|
27
|
+
isPreviewMode: boolean;
|
|
28
|
+
isInteractionDisabled: boolean;
|
|
29
|
+
isOnline: boolean;
|
|
30
|
+
showMiniMap: boolean | undefined;
|
|
31
|
+
showControls: boolean | undefined;
|
|
32
|
+
showCanvasHeader: boolean | undefined;
|
|
33
|
+
showBackground: boolean | undefined;
|
|
34
|
+
showFastOperationButtons: boolean | undefined;
|
|
35
|
+
onNodesChange: (changes: NodeChange[]) => void;
|
|
36
|
+
handleEdgesChange: (changes: EdgeChange[]) => void;
|
|
37
|
+
handleConnect: (params: Connection) => void;
|
|
38
|
+
handleEdgeAddNode: (position: {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
}, edge?: Edge) => void;
|
|
42
|
+
handleOpenNodeSelector: (e: any) => void;
|
|
43
|
+
handleAddNoteNode: () => void;
|
|
44
|
+
handleTidy: () => void;
|
|
45
|
+
onEdgeMouseEnter: ReturnType<typeof useEdgesInteraction>['onEdgeMouseEnter'];
|
|
46
|
+
onEdgeMouseLeave: ReturnType<typeof useEdgesInteraction>['onEdgeMouseLeave'];
|
|
47
|
+
onNodeMouseEnter: ReturnType<typeof useNodesInteraction>['onNodeMouseEnter'];
|
|
48
|
+
onNodeMouseLeave: ReturnType<typeof useNodesInteraction>['onNodeMouseLeave'];
|
|
49
|
+
onNodeContextMenu: (event: React.MouseEvent, node: Node) => void;
|
|
50
|
+
onPaneContextMenu: (event: React.MouseEvent) => void;
|
|
51
|
+
updateSaveStatus: (status: SaveStatus, error?: Error) => void;
|
|
52
|
+
setNodeFitHumanView: (nodeId: string) => void;
|
|
53
|
+
canvasApi: CanvasAPI;
|
|
54
|
+
reactFlow: ReturnType<typeof useReactFlow>;
|
|
55
|
+
dispatch: ReturnType<typeof useAppDispatch>;
|
|
56
|
+
store: ReturnType<typeof useStoreApi>;
|
|
57
|
+
storeEdges: Edge[];
|
|
58
|
+
refreshWorkFlowNum: number;
|
|
59
|
+
addNodes: ReturnType<typeof useFlowDataOperation>['addNodes'];
|
|
60
|
+
addEdges: ReturnType<typeof useFlowDataOperation>['addEdges'];
|
|
61
|
+
removeEdges: ReturnType<typeof useEdgesInteraction>['removeEdges'];
|
|
62
|
+
setNodeAddCallback: ReturnType<typeof usePanel>['setNodeAddCallback'];
|
|
63
|
+
setNodeConfigVisible: ReturnType<typeof useWorkflow>['setNodeConfigVisible'];
|
|
64
|
+
setFlowOpStatusAction: ReturnType<typeof useWorkflow>['setFlowOpStatusAction'];
|
|
65
|
+
autoSaveNum: number;
|
|
66
|
+
setLocked: ReturnType<typeof useWorkflow>['setLocked'];
|
|
67
|
+
openNodeSelector: ReturnType<typeof usePanel>['openNodeSelector'];
|
|
68
|
+
handleManualAdd: ReturnType<typeof usePanel>['handleManualAdd'];
|
|
69
|
+
restNativeProps: Record<string, any>;
|
|
70
|
+
saveFlowRef: React.RefObject<() => Promise<void>>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 工作流画布共享状态 Hook
|
|
74
|
+
*
|
|
75
|
+
* @param props 画布组件 props
|
|
76
|
+
* @param stickyNodeKey 便签节点的 key(classic: '944' / next: 'core.stickyNote')
|
|
77
|
+
*/
|
|
78
|
+
export declare function useWorkflowCanvasState(props: WorkflowCanvasProps, stickyNodeKey: string): WorkflowCanvasStateResult;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { WorkflowCanvasProps } from './constants';
|
|
2
|
+
import { SaveStatus } from '../enums/canvas';
|
|
3
|
+
import { NodeData as NodeFactoryData } from '../Nodes/NodeFactory';
|
|
4
|
+
import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
5
|
+
import { ExecutionControlState } from '../store/workflowSlice';
|
|
6
|
+
import { CanvasAPI } from '../types/engine';
|
|
7
|
+
import { Edge, Node, NodeTypes } from '@xyflow/react';
|
|
8
|
+
export interface CanvasHeaderProps {
|
|
9
|
+
onSave?: () => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
unSave?: boolean;
|
|
12
|
+
preview?: boolean;
|
|
13
|
+
appFlowMode?: boolean;
|
|
14
|
+
autoSaveStatus?: SaveStatus;
|
|
15
|
+
lastSavedTime?: string;
|
|
16
|
+
canvasApi?: CanvasAPI;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateNodeParams {
|
|
19
|
+
/** 工作流 ID */
|
|
20
|
+
workflowId: string;
|
|
21
|
+
/** 节点类型(如 TRIGGER / ACTION / LOOP) */
|
|
22
|
+
nodeType: string;
|
|
23
|
+
/** 动作 ID(classic: actionId,next: nodeKey) */
|
|
24
|
+
actionId: string;
|
|
25
|
+
/** NEXT 兼容节点 key(classic PLUGIN 动作使用) */
|
|
26
|
+
actionKey?: string;
|
|
27
|
+
/** NEXT 兼容节点 schema 版本(classic PLUGIN 动作使用) */
|
|
28
|
+
actionVer?: number;
|
|
29
|
+
/** 节点配置 schema */
|
|
30
|
+
configSchema?: Record<string, any>;
|
|
31
|
+
/** 画布位置 */
|
|
32
|
+
position: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
/** 是否为触发节点 */
|
|
37
|
+
isTrigger?: boolean;
|
|
38
|
+
/** 节点图标 */
|
|
39
|
+
icon?: string;
|
|
40
|
+
/** 节点名称 */
|
|
41
|
+
name?: string;
|
|
42
|
+
/** 连接器名称 */
|
|
43
|
+
connectorName?: string;
|
|
44
|
+
/** 节点版本 */
|
|
45
|
+
nodeVersion?: number;
|
|
46
|
+
/** 当前画布已有节点(用于生成唯一名称) */
|
|
47
|
+
existingNodes?: Node[];
|
|
48
|
+
}
|
|
49
|
+
export interface CreateNodeResult {
|
|
50
|
+
nodeId: string;
|
|
51
|
+
nodeData: Record<string, any>;
|
|
52
|
+
}
|
|
53
|
+
export interface LoadFlowResult {
|
|
54
|
+
nodes: Node[];
|
|
55
|
+
edges: Edge[];
|
|
56
|
+
name: string;
|
|
57
|
+
opStatus?: string;
|
|
58
|
+
executionControl?: ExecutionControlState | null;
|
|
59
|
+
}
|
|
60
|
+
export interface SaveFlowParams {
|
|
61
|
+
nodes: Node[];
|
|
62
|
+
edges: Edge[];
|
|
63
|
+
workflowName: string;
|
|
64
|
+
workflowId: string;
|
|
65
|
+
executionControl?: ExecutionControlState | null;
|
|
66
|
+
}
|
|
67
|
+
export interface WorkflowCanvasStrategy {
|
|
68
|
+
/** 加载工作流数据 */
|
|
69
|
+
loadFlow: (workflowId: string) => Promise<LoadFlowResult>;
|
|
70
|
+
/** 保存工作流数据 */
|
|
71
|
+
saveFlow: (params: SaveFlowParams) => Promise<void>;
|
|
72
|
+
/** 创建节点(返回新节点 ID 和附加数据) */
|
|
73
|
+
createNode: (params: CreateNodeParams) => Promise<CreateNodeResult>;
|
|
74
|
+
/** 将 ActionItem 转换为节点 data(可选,不提供则使用默认的 convertActionItemToNodeData) */
|
|
75
|
+
convertNodeData?: (actionItem: Partial<ActionItem> & Record<string, any>) => NodeFactoryData;
|
|
76
|
+
/** 便签节点的 action ID / nodeKey */
|
|
77
|
+
stickyNodeKey: string;
|
|
78
|
+
/** ReactFlow nodeTypes 注册表(可选,不提供则回退到 NodeFactory.getNodeTypes()) */
|
|
79
|
+
nodeTypes?: NodeTypes;
|
|
80
|
+
/** 头部组件 */
|
|
81
|
+
HeaderComponent: React.ComponentType<CanvasHeaderProps>;
|
|
82
|
+
/** 节点选择面板组件 */
|
|
83
|
+
PanelComponent: React.ComponentType;
|
|
84
|
+
/** 节点配置弹窗组件(可选,不提供则使用节点内嵌弹窗) */
|
|
85
|
+
ConfigModalComponent?: React.ComponentType<any>;
|
|
86
|
+
/** 加载后是否检查触发节点并补 startNode */
|
|
87
|
+
requiresTriggerNode: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface WorkflowCanvasBaseProps extends WorkflowCanvasProps {
|
|
90
|
+
strategy: WorkflowCanvasStrategy;
|
|
91
|
+
}
|
|
@@ -4,12 +4,12 @@ declare enum ConnectionType {
|
|
|
4
4
|
Main = "main",
|
|
5
5
|
NonMain = "nonMain"
|
|
6
6
|
}
|
|
7
|
-
interface CustomEdgeProps extends EdgeProps {
|
|
7
|
+
export interface CustomEdgeProps extends EdgeProps {
|
|
8
8
|
color?: string;
|
|
9
9
|
labelBgColor?: string;
|
|
10
10
|
animated?: boolean;
|
|
11
11
|
className?: string;
|
|
12
|
-
data
|
|
12
|
+
data: {
|
|
13
13
|
label?: ReactNode;
|
|
14
14
|
connectionType?: ConnectionType;
|
|
15
15
|
isHovered?: boolean;
|
|
@@ -23,6 +23,7 @@ interface CustomEdgeProps extends EdgeProps {
|
|
|
23
23
|
onMouseEnter?: (id: string) => void;
|
|
24
24
|
onMouseLeave?: (id: string) => void;
|
|
25
25
|
};
|
|
26
|
+
type: any;
|
|
26
27
|
target: string;
|
|
27
28
|
targetHandle: string;
|
|
28
29
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Edge } from '@xyflow/react';
|
|
2
|
+
import { EdgeData, EdgeDefinition } from '../types/Edge';
|
|
3
|
+
import { EdgeType } from '../enums/edge';
|
|
4
|
+
interface EdgeCreationOptions {
|
|
5
|
+
sourceHandle?: string;
|
|
6
|
+
targetHandle?: string;
|
|
7
|
+
data?: EdgeData;
|
|
8
|
+
onAddNode?: (position: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 连线工厂类,根据连线类型创建对应的连线组件
|
|
15
|
+
*/
|
|
16
|
+
declare class EdgeFactory {
|
|
17
|
+
/**
|
|
18
|
+
* 获取所有注册的连线类型映射
|
|
19
|
+
*/
|
|
20
|
+
static getEdgeTypes(): {
|
|
21
|
+
main: import('react').FC<import('./BaseEdge').CustomEdgeProps>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 根据连线类型获取对应的连线组件
|
|
25
|
+
* @param type 连线类型
|
|
26
|
+
*/
|
|
27
|
+
static getEdgeComponent(type: EdgeType): any;
|
|
28
|
+
/**
|
|
29
|
+
* 创建一个连线实例
|
|
30
|
+
* @param type 连线类型
|
|
31
|
+
* @param id 连线ID
|
|
32
|
+
* @param source 源节点ID
|
|
33
|
+
* @param target 目标节点ID
|
|
34
|
+
* @param options 可选参数,包括sourceHandle, targetHandle, data和回调函数
|
|
35
|
+
*/
|
|
36
|
+
static createEdge(type: EdgeType | string, id: string, source: string, target: string, options?: EdgeCreationOptions): Edge;
|
|
37
|
+
/**
|
|
38
|
+
* 渲染连线
|
|
39
|
+
* @param props 连线属性
|
|
40
|
+
*/
|
|
41
|
+
static renderEdge(props: EdgeDefinition): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
}
|
|
43
|
+
export default EdgeFactory;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NodeType } from '../types/Node';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface NextNodesConfigModalProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
data: any;
|
|
7
|
+
nodeType?: NodeType;
|
|
8
|
+
nodeId?: string;
|
|
9
|
+
cachedValues?: any;
|
|
10
|
+
onValuesChange?: (nodeId: string, values: any) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const NextNodesConfigModal: React.FC<NextNodesConfigModalProps>;
|
|
13
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NodeProps } from '@xyflow/react';
|
|
1
|
+
import { Node, NodeProps } from '@xyflow/react';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import { NodeStatus } from '../types/Node';
|
|
4
|
-
interface ActionNodeProps extends NodeProps {
|
|
3
|
+
import { NodeData, NodeStatus } from '../types/Node';
|
|
4
|
+
interface ActionNodeProps extends NodeProps<Node<NodeData>> {
|
|
5
5
|
status?: NodeStatus;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeProps } from '@xyflow/react';
|
|
1
|
+
import { Node, NodeProps } from '@xyflow/react';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { NodeData } from '../types/Node';
|
|
4
4
|
/**
|
|
@@ -6,5 +6,5 @@ import { NodeData } from '../types/Node';
|
|
|
6
6
|
* @param {NodeProps<NodeData>} props React Flow 代理节点参数。
|
|
7
7
|
* @returns {JSX.Element} 渲染后的 Agent 节点。
|
|
8
8
|
*/
|
|
9
|
-
declare const AgentNode: React.FC<NodeProps<NodeData
|
|
9
|
+
declare const AgentNode: React.FC<NodeProps<Node<NodeData>>>;
|
|
10
10
|
export default AgentNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeProps } from '@xyflow/react';
|
|
1
|
+
import { Node, NodeProps } from '@xyflow/react';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { NodeData } from '../types/Node';
|
|
4
4
|
/**
|
|
@@ -6,5 +6,5 @@ import { NodeData } from '../types/Node';
|
|
|
6
6
|
* @param {NodeProps<NodeData>} props React Flow 浏览器节点参数。
|
|
7
7
|
* @returns {JSX.Element} 渲染后的浏览器节点。
|
|
8
8
|
*/
|
|
9
|
-
declare const BrowserNode: React.FC<NodeProps<NodeData
|
|
9
|
+
declare const BrowserNode: React.FC<NodeProps<Node<NodeData>>>;
|
|
10
10
|
export default BrowserNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeProps } from '@xyflow/react';
|
|
1
|
+
import { Node, NodeProps } from '@xyflow/react';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { NodeData } from '../types/Node';
|
|
4
4
|
/**
|
|
@@ -11,5 +11,5 @@ import { NodeData } from '../types/Node';
|
|
|
11
11
|
* @param {NodeProps<NodeData>} props React Flow 节点与数据。
|
|
12
12
|
* @returns {JSX.Element} 自定义节点 JSX。
|
|
13
13
|
*/
|
|
14
|
-
declare const CustomNode: React.MemoExoticComponent<({ data, id, selected }: NodeProps<NodeData
|
|
14
|
+
declare const CustomNode: React.MemoExoticComponent<({ data, id, selected }: NodeProps<Node<NodeData>>) => import("react/jsx-runtime").JSX.Element>;
|
|
15
15
|
export default CustomNode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* NEXT 模式专属节点工厂
|
|
4
|
+
*
|
|
5
|
+
* 提供 NEXT 模式的 nodeTypes 映射,所有节点基于 DIP Schema 动态渲染锚点
|
|
6
|
+
* 与 classic 模式完全隔离,直接使用 DIP 端口名,无需适配层
|
|
7
|
+
*/
|
|
8
|
+
declare class NextNodeFactory {
|
|
9
|
+
static getNodeTypes(): Record<string, ComponentType<any>>;
|
|
10
|
+
}
|
|
11
|
+
export default NextNodeFactory;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NodeProps } from '@xyflow/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface NextBaseNodeProps extends NodeProps {
|
|
4
|
+
minHeight?: number;
|
|
5
|
+
maxHeight?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* NEXT 模式基础节点组件
|
|
10
|
+
*
|
|
11
|
+
* 根据 DIP Schema 动态渲染锚点,直接使用 DIP 端口名作为 handle ID
|
|
12
|
+
* 不再需要端口适配层,实现 NEXT 模式与 classic 模式的完全隔离
|
|
13
|
+
*/
|
|
14
|
+
declare const NextBaseNode: React.FC<NextBaseNodeProps>;
|
|
15
|
+
export default NextBaseNode;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NodeProps } from '@xyflow/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* NEXT 模式条件节点
|
|
5
|
+
*
|
|
6
|
+
* 基于 NextBaseNode,根据 DIP Schema 动态渲染锚点
|
|
7
|
+
* 通常会有两个输出端口:true 和 false
|
|
8
|
+
*/
|
|
9
|
+
declare const NextConditionNode: React.FC<NodeProps>;
|
|
10
|
+
export default NextConditionNode;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NodeProps } from '@xyflow/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* NEXT 模式循环节点
|
|
5
|
+
*
|
|
6
|
+
* 基于 NextBaseNode,根据 DIP Schema 动态渲染锚点
|
|
7
|
+
* 通常会有多个输出端口:loop(循环体)和 done(完成)
|
|
8
|
+
*/
|
|
9
|
+
declare const NextLoopNode: React.FC<NodeProps>;
|
|
10
|
+
export default NextLoopNode;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NodeProps } from '@xyflow/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* NEXT 模式分支节点
|
|
5
|
+
*
|
|
6
|
+
* 基于 NextBaseNode,根据 DIP Schema 动态渲染锚点
|
|
7
|
+
* 支持多个输出端口(根据配置的分支数量)
|
|
8
|
+
*/
|
|
9
|
+
declare const NextSwitchNode: React.FC<NodeProps>;
|
|
10
|
+
export default NextSwitchNode;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { Node, XYPosition } from '@xyflow/react';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
|
-
import { NodeType } from '../types/Node';
|
|
4
|
-
export
|
|
5
|
-
CUSTOM = "custom"
|
|
6
|
-
}
|
|
7
|
-
export interface NodeData {
|
|
8
|
-
label: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
category?: string;
|
|
11
|
-
isHovered?: boolean;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
}
|
|
3
|
+
import { NodeData, NodeType } from '../types/Node';
|
|
4
|
+
export type { NodeData } from '../types/Node';
|
|
14
5
|
export interface BackendNodeData {
|
|
15
6
|
node_type: string;
|
|
16
7
|
connector_id: string;
|
|
@@ -24,7 +15,7 @@ export interface BackendNodeData {
|
|
|
24
15
|
properties: any;
|
|
25
16
|
}
|
|
26
17
|
declare class NodeFactory {
|
|
27
|
-
static getNodeTypes(): Record<
|
|
18
|
+
static getNodeTypes(): Record<NodeType, ComponentType<any>>;
|
|
28
19
|
static mapTypeToBackendType(type: NodeType | string): string;
|
|
29
20
|
static createNode(type: NodeType, id: string, data: NodeData, position?: XYPosition): Node<NodeData>;
|
|
30
21
|
static toBackendFormat(node: Node<NodeData>): BackendNodeData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeProps } from '@xyflow/react';
|
|
1
|
+
import { Node, NodeProps } from '@xyflow/react';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
/** 便签配置结构 */
|
|
4
4
|
interface StickyNoteConfig {
|
|
@@ -29,5 +29,5 @@ interface StickyNoteNodeData {
|
|
|
29
29
|
*
|
|
30
30
|
* @param {NodeProps<StickyNoteNodeData>} props 节点属性(包含后端 config_schema、选中状态、宽高等)
|
|
31
31
|
*/
|
|
32
|
-
declare const StickyNote: React.FC<NodeProps<StickyNoteNodeData
|
|
32
|
+
declare const StickyNote: React.FC<NodeProps<Node<StickyNoteNodeData>>>;
|
|
33
33
|
export default StickyNote;
|
|
@@ -27,7 +27,7 @@ export interface BaseNodeProps {
|
|
|
27
27
|
toolbarPosition?: Position;
|
|
28
28
|
showNodeDescription?: boolean;
|
|
29
29
|
toolbarVisible?: boolean;
|
|
30
|
-
contentRender?: (data: NodeData) => React.ReactNode;
|
|
30
|
+
contentRender?: (data: NodeData, statusIcon?: React.ReactNode) => React.ReactNode;
|
|
31
31
|
width?: number;
|
|
32
32
|
height?: number;
|
|
33
33
|
className?: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface NextNodeDescriptionProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
note?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
statusIcon?: React.ReactNode;
|
|
8
|
+
onNoteChange?: (note: string) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @description Next 模式节点描述组件,展示节点标题、副标题,并提供备注编辑能力。
|
|
12
|
+
* 无远程接口调用,仅通过 onNoteChange 回调更新本地 Redux 状态。
|
|
13
|
+
* DOM 结构与样式与 NodeDescription 保持一致。
|
|
14
|
+
*/
|
|
15
|
+
declare const NextNodeDescription: React.FC<NextNodeDescriptionProps>;
|
|
16
|
+
export default NextNodeDescription;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NodeType } from '../../types/Node';
|
|
3
|
+
export interface NextNodeOperationsProps {
|
|
4
|
+
nodeId: string;
|
|
5
|
+
type: NodeType;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
handleViewConfig?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const NextNodeOperations: React.FC<NextNodeOperationsProps>;
|
|
11
|
+
export default NextNodeOperations;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
interface ActionNodeConfigProps {
|
|
2
|
+
nodeId: string;
|
|
3
|
+
data: any;
|
|
4
|
+
onSubmit: (values: any, isRunNodeTest?: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ActionNodeConfig: import('react').NamedExoticComponent<ActionNodeConfigProps & import('react').RefAttributes<any>>;
|
|
7
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ConditionNodeConfig: React.FC<{
|
|
1
|
+
interface ConditionNodeConfigProps {
|
|
3
2
|
nodeId: string;
|
|
4
|
-
|
|
3
|
+
onSubmit: (values: any, isRunNodeTest?: boolean) => void;
|
|
5
4
|
config_schema: any;
|
|
6
|
-
}
|
|
5
|
+
}
|
|
6
|
+
export declare const ConditionNodeConfig: import('react').ForwardRefExoticComponent<ConditionNodeConfigProps & import('react').RefAttributes<any>>;
|
|
7
|
+
export {};
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
import { NodeData } from '../types/Node';
|
|
1
2
|
import { default as React } from 'react';
|
|
3
|
+
interface ErrorHandlerConfig {
|
|
4
|
+
retry: boolean;
|
|
5
|
+
retry_times?: number;
|
|
6
|
+
retry_interval?: number;
|
|
7
|
+
step_factor?: number;
|
|
8
|
+
max_retry_interval?: number;
|
|
9
|
+
warn_type: 0 | 1;
|
|
10
|
+
notify_url?: string;
|
|
11
|
+
process_type: 1 | 2;
|
|
12
|
+
apply_all: boolean;
|
|
13
|
+
}
|
|
14
|
+
type ErrorHandlerNodeData = Partial<NodeData> & {
|
|
15
|
+
error_handler?: Partial<ErrorHandlerConfig>;
|
|
16
|
+
};
|
|
2
17
|
interface ErrorHandlerProps {
|
|
3
18
|
nodeId: string;
|
|
4
|
-
data
|
|
5
|
-
|
|
19
|
+
data?: ErrorHandlerNodeData;
|
|
20
|
+
onSubmit: () => void;
|
|
6
21
|
}
|
|
7
22
|
export declare const ErrorHandler: React.FC<ErrorHandlerProps>;
|
|
8
23
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
interface FormComponentProps {
|
|
3
|
-
|
|
2
|
+
onSubmit: (values: any, isRunNodeTest?: boolean) => void;
|
|
4
3
|
nodeId: string;
|
|
5
4
|
config_schema: any;
|
|
6
5
|
}
|
|
7
|
-
export declare const LoopNodeConfig:
|
|
6
|
+
export declare const LoopNodeConfig: import('react').ForwardRefExoticComponent<FormComponentProps & import('react').RefAttributes<any>>;
|
|
8
7
|
export {};
|