@digitalsee-ai/rcs 2.0.3-beta2 → 2.0.3-beta4
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/digitalsee/workflow/Edges/EdgeFactory.d.ts +7 -5
- package/dist/components/digitalsee/workflow/Nodes/classicPortLayout.d.ts +2 -0
- package/dist/components/digitalsee/workflow/enums/node.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/flowDataAdapter.d.ts +1 -1
- package/dist/{index-tbqx9Tx8.mjs → index-B3QynWAR.mjs} +11947 -11889
- package/dist/{index-WqyoKZXD.mjs → index-Ep9pr_NO.mjs} +2 -2
- package/dist/rcs.es.js +1 -1
- package/dist/rcs.umd.js +69 -69
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { EdgeType } from '../enums/edge';
|
|
2
2
|
import { EdgeData } from '../types/Edge';
|
|
3
|
-
import { Edge } from '@xyflow/react';
|
|
4
|
-
interface EdgeCreationOptions {
|
|
3
|
+
import { Edge, Node } from '@xyflow/react';
|
|
4
|
+
export interface EdgeCreationOptions {
|
|
5
5
|
sourceHandle?: string;
|
|
6
6
|
targetHandle?: string;
|
|
7
|
+
sourceNode?: Node | null;
|
|
8
|
+
targetNode?: Node | null;
|
|
7
9
|
data?: EdgeData;
|
|
8
10
|
onAddNode?: (position: {
|
|
9
11
|
x: number;
|
|
@@ -27,12 +29,12 @@ declare class EdgeFactory {
|
|
|
27
29
|
static getEdgeComponent(type: EdgeType): import('react').FC<import('./BaseEdge').CustomEdgeProps>;
|
|
28
30
|
/**
|
|
29
31
|
* 创建一个连线实例
|
|
30
|
-
* @param type
|
|
32
|
+
* @param type 连线类型(若不提供或为 MAIN,则仅当 source/target 为 NodePackage 节点时取其 handle 对应类型,否则为 MAIN)
|
|
31
33
|
* @param id 连线ID
|
|
32
34
|
* @param source 源节点ID
|
|
33
35
|
* @param target 目标节点ID
|
|
34
|
-
* @param options 可选参数,包括sourceHandle, targetHandle, data和回调函数
|
|
36
|
+
* @param options 可选参数,包括sourceHandle, targetHandle, sourceNode, targetNode, data和回调函数
|
|
35
37
|
*/
|
|
36
|
-
static createEdge(type: EdgeType | string, id: string, source: string, target: string, options?: EdgeCreationOptions): Edge;
|
|
38
|
+
static createEdge(type: EdgeType | string | undefined | null, id: string, source: string, target: string, options?: EdgeCreationOptions): Edge;
|
|
37
39
|
}
|
|
38
40
|
export default EdgeFactory;
|
|
@@ -23,6 +23,8 @@ export interface NodePortSchema extends Omit<DipPortSchema, 'protocol'> {
|
|
|
23
23
|
style?: React.CSSProperties;
|
|
24
24
|
/** isMain 覆盖;缺省 name === 'main' */
|
|
25
25
|
isMain?: boolean;
|
|
26
|
+
/** 针对某种支持多种协议的情况 */
|
|
27
|
+
protocols?: string[];
|
|
26
28
|
}
|
|
27
29
|
/** (type, protocol) 维度的端口覆盖声明;省略一侧即继承 type 级默认。 */
|
|
28
30
|
export interface NodePortsDeclaration {
|
|
@@ -51,7 +51,7 @@ export declare function convertNodesToReactFlowFormat(backendNodes: BackendNode[
|
|
|
51
51
|
/**
|
|
52
52
|
* 将后端连接数据转换为前端可用的边数据
|
|
53
53
|
*/
|
|
54
|
-
export declare function convertConnectionsToReactFlowEdges(connections: BackendConnection): Edge[];
|
|
54
|
+
export declare function convertConnectionsToReactFlowEdges(connections: BackendConnection, nodes?: Node[]): Edge[];
|
|
55
55
|
/**
|
|
56
56
|
* 将后端响应数据转换为前端工作流数据
|
|
57
57
|
*/
|