@flowgram.ai/free-layout-core 0.1.0-alpha.12 → 0.1.0-alpha.13
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/esm/{chunk-CTGO4RKX.js → chunk-E7ZUQ7LV.js} +1 -1
- package/dist/esm/chunk-E7ZUQ7LV.js.map +1 -0
- package/dist/esm/{chunk-242F2JCI.js → chunk-U2XMPOSL.js} +2 -1
- package/dist/esm/{chunk-242F2JCI.js.map → chunk-U2XMPOSL.js.map} +1 -1
- package/dist/esm/index.js +221 -78
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/typings/index.js +2 -2
- package/dist/esm/typings/workflow-json.js +1 -1
- package/dist/esm/typings/workflow-line.js +1 -1
- package/dist/index.d.mts +14 -9
- package/dist/index.d.ts +14 -9
- package/dist/index.js +201 -57
- package/dist/index.js.map +1 -1
- package/dist/typings/index.d.mts +1 -1
- package/dist/typings/index.d.ts +1 -1
- package/dist/typings/index.js +1 -0
- package/dist/typings/index.js.map +1 -1
- package/dist/typings/workflow-drag.d.mts +1 -1
- package/dist/typings/workflow-drag.d.ts +1 -1
- package/dist/typings/workflow-json.d.mts +1 -1
- package/dist/typings/workflow-json.d.ts +1 -1
- package/dist/typings/workflow-json.js +1 -0
- package/dist/typings/workflow-json.js.map +1 -1
- package/dist/typings/workflow-line.d.mts +1 -1
- package/dist/typings/workflow-line.d.ts +1 -1
- package/dist/typings/workflow-line.js.map +1 -1
- package/dist/typings/workflow-node.d.mts +1 -1
- package/dist/typings/workflow-node.d.ts +1 -1
- package/dist/typings/workflow-registry.d.mts +2 -1
- package/dist/typings/workflow-registry.d.ts +2 -1
- package/dist/typings/workflow-registry.js.map +1 -1
- package/dist/{workflow-line-entity-Iq1OHmuK.d.mts → workflow-line-entity-DSC3qPV1.d.mts} +123 -38
- package/dist/{workflow-line-entity-LhmV98jq.d.ts → workflow-line-entity-I_VrhJ_t.d.ts} +123 -38
- package/package.json +9 -9
- package/dist/esm/chunk-CTGO4RKX.js.map +0 -1
package/dist/typings/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { x as LineColor, y as LineColors, L as LineEventProps, k as LinePoint, w as LinePointLocation, o as LinePosition, m as LineRenderType, v as LineType, B as NodesDragEndEvent, N as NodesDragEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, O as OnDragLineEnd, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, h as WorkflowJSON, n as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, e as WorkflowNodeJSON, u as WorkflowNodeMeta, D as onDragLineEndParams } from '../workflow-line-entity-DSC3qPV1.mjs';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.mjs';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.mjs';
|
|
4
4
|
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.mjs';
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { x as LineColor, y as LineColors, L as LineEventProps, k as LinePoint, w as LinePointLocation, o as LinePosition, m as LineRenderType, v as LineType, B as NodesDragEndEvent, N as NodesDragEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, O as OnDragLineEnd, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, h as WorkflowJSON, n as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, e as WorkflowNodeJSON, u as WorkflowNodeMeta, D as onDragLineEndParams } from '../workflow-line-entity-I_VrhJ_t.js';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.js';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.js';
|
|
4
4
|
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.js';
|
package/dist/typings/index.js
CHANGED
|
@@ -36,6 +36,7 @@ var WorkflowContentChangeType = /* @__PURE__ */ ((WorkflowContentChangeType2) =>
|
|
|
36
36
|
WorkflowContentChangeType2["NODE_DATA_CHANGE"] = "NODE_DATA_CHANGE";
|
|
37
37
|
WorkflowContentChangeType2["ADD_LINE"] = "ADD_LINE";
|
|
38
38
|
WorkflowContentChangeType2["DELETE_LINE"] = "DELETE_LINE";
|
|
39
|
+
WorkflowContentChangeType2["LINE_DATA_CHANGE"] = "LINE_DATA_CHANGE";
|
|
39
40
|
WorkflowContentChangeType2["META_CHANGE"] = "META_CHANGE";
|
|
40
41
|
return WorkflowContentChangeType2;
|
|
41
42
|
})(WorkflowContentChangeType || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/index.ts","../../src/typings/workflow-json.ts","../../src/typings/workflow-line.ts","../../src/typings/workflow-operation.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nexport * from './workflow-json';\nexport * from './workflow-edge';\nexport * from './workflow-node';\nexport * from './workflow-registry';\nexport * from './workflow-line';\nexport * from './workflow-sub-canvas';\nexport * from './workflow-operation';\nexport * from './workflow-drag';\n\nexport const URLParams = Symbol('');\n\nexport interface URLParams {\n [key: string]: string;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { type WorkflowLineEntity, type WorkflowNodeEntity } from '../entities';\nimport { type WorkflowNodeJSON } from './workflow-node';\nimport { type WorkflowEdgeJSON } from './workflow-edge';\n\nexport interface WorkflowJSON {\n nodes: WorkflowNodeJSON[];\n edges: WorkflowEdgeJSON[];\n}\n\nexport enum WorkflowContentChangeType {\n /**\n * 添加节点\n */\n ADD_NODE = 'ADD_NODE',\n /**\n * 删除节点\n */\n DELETE_NODE = 'DELETE_NODE',\n /**\n * 移动节点\n */\n MOVE_NODE = 'MOVE_NODE',\n /**\n * 节点数据更新 (表单引擎数据 或者 extInfo 数据)\n */\n NODE_DATA_CHANGE = 'NODE_DATA_CHANGE',\n /**\n * 添加线条\n */\n ADD_LINE = 'ADD_LINE',\n /**\n * 删除线条\n */\n DELETE_LINE = 'DELETE_LINE',\n /**\n * 节点Meta信息变更\n */\n META_CHANGE = 'META_CHANGE',\n}\n\nexport interface WorkflowContentChangeEvent {\n type: WorkflowContentChangeType;\n /**\n * 当前触发的元素的json数据,toJSON 需要主动触发\n */\n toJSON: () => any;\n /*\n * 当前的事件的 entity\n */\n entity: WorkflowNodeEntity | WorkflowLineEntity;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { Rectangle, IPoint } from '@flowgram.ai/utils';\n\nimport { type WorkflowLineEntity } from '../entities';\n\nexport enum LineType {\n BEZIER, // 贝塞尔曲线\n LINE_CHART, // 折叠线\n}\n\nexport type LineRenderType = LineType | string;\n\nexport interface LinePosition {\n from:
|
|
1
|
+
{"version":3,"sources":["../../src/typings/index.ts","../../src/typings/workflow-json.ts","../../src/typings/workflow-line.ts","../../src/typings/workflow-operation.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nexport * from './workflow-json';\nexport * from './workflow-edge';\nexport * from './workflow-node';\nexport * from './workflow-registry';\nexport * from './workflow-line';\nexport * from './workflow-sub-canvas';\nexport * from './workflow-operation';\nexport * from './workflow-drag';\n\nexport const URLParams = Symbol('');\n\nexport interface URLParams {\n [key: string]: string;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { type WorkflowLineEntity, type WorkflowNodeEntity } from '../entities';\nimport { type WorkflowNodeJSON } from './workflow-node';\nimport { type WorkflowEdgeJSON } from './workflow-edge';\n\nexport interface WorkflowJSON {\n nodes: WorkflowNodeJSON[];\n edges: WorkflowEdgeJSON[];\n}\n\nexport enum WorkflowContentChangeType {\n /**\n * 添加节点\n */\n ADD_NODE = 'ADD_NODE',\n /**\n * 删除节点\n */\n DELETE_NODE = 'DELETE_NODE',\n /**\n * 移动节点\n */\n MOVE_NODE = 'MOVE_NODE',\n /**\n * 节点数据更新 (表单引擎数据 或者 extInfo 数据)\n */\n NODE_DATA_CHANGE = 'NODE_DATA_CHANGE',\n /**\n * 添加线条\n */\n ADD_LINE = 'ADD_LINE',\n /**\n * 删除线条\n */\n DELETE_LINE = 'DELETE_LINE',\n /**\n * 线条数据修改\n */\n LINE_DATA_CHANGE = 'LINE_DATA_CHANGE',\n /**\n * 节点Meta信息变更\n */\n META_CHANGE = 'META_CHANGE',\n}\n\nexport interface WorkflowContentChangeEvent {\n type: WorkflowContentChangeType;\n /**\n * 当前触发的元素的json数据,toJSON 需要主动触发\n */\n toJSON: () => any;\n /**\n * oldValue\n */\n oldValue?: any;\n /*\n * 当前的事件的 entity\n */\n entity: WorkflowNodeEntity | WorkflowLineEntity;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { Rectangle, IPoint } from '@flowgram.ai/utils';\n\nimport { type WorkflowLineEntity } from '../entities';\n\nexport enum LineType {\n BEZIER, // 贝塞尔曲线\n LINE_CHART, // 折叠线\n}\n\nexport type LineRenderType = LineType | string;\n\nexport type LinePointLocation = 'left' | 'top' | 'right' | 'bottom';\n\nexport interface LinePoint {\n x: number;\n y: number;\n location: LinePointLocation;\n}\nexport interface LinePosition {\n from: LinePoint;\n to: LinePoint;\n}\n\nexport interface LineColor {\n hidden: string;\n default: string;\n drawing: string;\n hovered: string;\n selected: string;\n error: string;\n flowing: string;\n}\n\nexport enum LineColors {\n HIDDEN = 'var(--g-workflow-line-color-hidden,transparent)', // 隐藏线条\n DEFUALT = 'var(--g-workflow-line-color-default,#4d53e8)',\n DRAWING = 'var(--g-workflow-line-color-drawing, #5DD6E3)', // '#b5bbf8', // '#9197F1',\n HOVER = 'var(--g-workflow-line-color-hover,#37d0ff)',\n SELECTED = 'var(--g-workflow-line-color-selected,#37d0ff)',\n ERROR = 'var(--g-workflow-line-color-error,red)',\n FLOWING = 'var(--g-workflow-line-color-flowing,#4d53e8)', // 流动线条,默认使用主题色\n}\n\nexport interface WorkflowLineRenderContribution {\n entity: WorkflowLineEntity;\n path: string;\n bounds: Rectangle;\n update: (params: { fromPos: LinePoint; toPos: LinePoint }) => void;\n calcDistance: (pos: IPoint) => number;\n}\n\nexport type WorkflowLineRenderContributionFactory = (new (\n entity: WorkflowLineEntity\n) => WorkflowLineRenderContribution) & {\n type: LineRenderType;\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { IPoint, Event } from '@flowgram.ai/utils';\nimport {\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowOperationBaseService,\n} from '@flowgram.ai/document';\n\nexport interface NodePostionUpdateEvent {\n node: FlowNodeEntity;\n oldPosition: IPoint;\n newPosition: IPoint;\n}\n\nexport interface WorkflowOperationBaseService extends FlowOperationBaseService {\n /**\n * 节点位置更新事件\n */\n readonly onNodePostionUpdate: Event<NodePostionUpdateEvent>;\n /**\n * 更新节点位置\n * @param nodeOrId\n * @param position\n * @returns\n */\n updateNodePosition(nodeOrId: FlowNodeEntityOrId, position: IPoint): void;\n}\n\nexport const WorkflowOperationBaseService = Symbol('WorkflowOperationBaseService');\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,IAAK,4BAAL,kBAAKA,+BAAL;AAIL,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,eAAY;AAIZ,EAAAA,2BAAA,sBAAmB;AAInB,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,sBAAmB;AAInB,EAAAA,2BAAA,iBAAc;AAhCJ,SAAAA;AAAA,GAAA;;;ACLL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,oBAAA;AACA,EAAAA,oBAAA;AAFU,SAAAA;AAAA,GAAA;AA6BL,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,YAAS;AACT,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,cAAW;AACX,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,aAAU;AAPA,SAAAA;AAAA,GAAA;;;ACNL,IAAM,+BAA+B,OAAO,8BAA8B;;;AHlB1E,IAAM,YAAY,OAAO,EAAE;","names":["WorkflowContentChangeType","LineType","LineColors"]}
|
|
@@ -2,7 +2,7 @@ import 'react';
|
|
|
2
2
|
import '@flowgram.ai/utils';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
|
-
export { L as LineEventProps,
|
|
5
|
+
export { L as LineEventProps, B as NodesDragEndEvent, N as NodesDragEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, O as OnDragLineEnd, D as onDragLineEndParams } from '../workflow-line-entity-DSC3qPV1.mjs';
|
|
6
6
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
8
8
|
import './workflow-edge.mjs';
|
|
@@ -2,7 +2,7 @@ import 'react';
|
|
|
2
2
|
import '@flowgram.ai/utils';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
|
-
export { L as LineEventProps,
|
|
5
|
+
export { L as LineEventProps, B as NodesDragEndEvent, N as NodesDragEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, O as OnDragLineEnd, D as onDragLineEndParams } from '../workflow-line-entity-I_VrhJ_t.js';
|
|
6
6
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
8
8
|
import './workflow-edge.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
2
|
-
export {
|
|
2
|
+
export { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, h as WorkflowJSON } from '../workflow-line-entity-DSC3qPV1.mjs';
|
|
3
3
|
import './workflow-edge.mjs';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '@flowgram.ai/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
2
|
-
export {
|
|
2
|
+
export { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, h as WorkflowJSON } from '../workflow-line-entity-I_VrhJ_t.js';
|
|
3
3
|
import './workflow-edge.js';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '@flowgram.ai/utils';
|
|
@@ -30,6 +30,7 @@ var WorkflowContentChangeType = /* @__PURE__ */ ((WorkflowContentChangeType2) =>
|
|
|
30
30
|
WorkflowContentChangeType2["NODE_DATA_CHANGE"] = "NODE_DATA_CHANGE";
|
|
31
31
|
WorkflowContentChangeType2["ADD_LINE"] = "ADD_LINE";
|
|
32
32
|
WorkflowContentChangeType2["DELETE_LINE"] = "DELETE_LINE";
|
|
33
|
+
WorkflowContentChangeType2["LINE_DATA_CHANGE"] = "LINE_DATA_CHANGE";
|
|
33
34
|
WorkflowContentChangeType2["META_CHANGE"] = "META_CHANGE";
|
|
34
35
|
return WorkflowContentChangeType2;
|
|
35
36
|
})(WorkflowContentChangeType || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-json.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { type WorkflowLineEntity, type WorkflowNodeEntity } from '../entities';\nimport { type WorkflowNodeJSON } from './workflow-node';\nimport { type WorkflowEdgeJSON } from './workflow-edge';\n\nexport interface WorkflowJSON {\n nodes: WorkflowNodeJSON[];\n edges: WorkflowEdgeJSON[];\n}\n\nexport enum WorkflowContentChangeType {\n /**\n * 添加节点\n */\n ADD_NODE = 'ADD_NODE',\n /**\n * 删除节点\n */\n DELETE_NODE = 'DELETE_NODE',\n /**\n * 移动节点\n */\n MOVE_NODE = 'MOVE_NODE',\n /**\n * 节点数据更新 (表单引擎数据 或者 extInfo 数据)\n */\n NODE_DATA_CHANGE = 'NODE_DATA_CHANGE',\n /**\n * 添加线条\n */\n ADD_LINE = 'ADD_LINE',\n /**\n * 删除线条\n */\n DELETE_LINE = 'DELETE_LINE',\n /**\n * 节点Meta信息变更\n */\n META_CHANGE = 'META_CHANGE',\n}\n\nexport interface WorkflowContentChangeEvent {\n type: WorkflowContentChangeType;\n /**\n * 当前触发的元素的json数据,toJSON 需要主动触发\n */\n toJSON: () => any;\n /*\n * 当前的事件的 entity\n */\n entity: WorkflowNodeEntity | WorkflowLineEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcO,IAAK,4BAAL,kBAAKA,+BAAL;AAIL,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,eAAY;AAIZ,EAAAA,2BAAA,sBAAmB;AAInB,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,iBAAc;
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-json.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { type WorkflowLineEntity, type WorkflowNodeEntity } from '../entities';\nimport { type WorkflowNodeJSON } from './workflow-node';\nimport { type WorkflowEdgeJSON } from './workflow-edge';\n\nexport interface WorkflowJSON {\n nodes: WorkflowNodeJSON[];\n edges: WorkflowEdgeJSON[];\n}\n\nexport enum WorkflowContentChangeType {\n /**\n * 添加节点\n */\n ADD_NODE = 'ADD_NODE',\n /**\n * 删除节点\n */\n DELETE_NODE = 'DELETE_NODE',\n /**\n * 移动节点\n */\n MOVE_NODE = 'MOVE_NODE',\n /**\n * 节点数据更新 (表单引擎数据 或者 extInfo 数据)\n */\n NODE_DATA_CHANGE = 'NODE_DATA_CHANGE',\n /**\n * 添加线条\n */\n ADD_LINE = 'ADD_LINE',\n /**\n * 删除线条\n */\n DELETE_LINE = 'DELETE_LINE',\n /**\n * 线条数据修改\n */\n LINE_DATA_CHANGE = 'LINE_DATA_CHANGE',\n /**\n * 节点Meta信息变更\n */\n META_CHANGE = 'META_CHANGE',\n}\n\nexport interface WorkflowContentChangeEvent {\n type: WorkflowContentChangeType;\n /**\n * 当前触发的元素的json数据,toJSON 需要主动触发\n */\n toJSON: () => any;\n /**\n * oldValue\n */\n oldValue?: any;\n /*\n * 当前的事件的 entity\n */\n entity: WorkflowNodeEntity | WorkflowLineEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcO,IAAK,4BAAL,kBAAKA,+BAAL;AAIL,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,eAAY;AAIZ,EAAAA,2BAAA,sBAAmB;AAInB,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,sBAAmB;AAInB,EAAAA,2BAAA,iBAAc;AAhCJ,SAAAA;AAAA,GAAA;","names":["WorkflowContentChangeType"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export {
|
|
2
|
+
export { x as LineColor, y as LineColors, k as LinePoint, w as LinePointLocation, o as LinePosition, m as LineRenderType, v as LineType, n as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-line-entity-DSC3qPV1.mjs';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export {
|
|
2
|
+
export { x as LineColor, y as LineColors, k as LinePoint, w as LinePointLocation, o as LinePosition, m as LineRenderType, v as LineType, n as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-line-entity-I_VrhJ_t.js';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { Rectangle, IPoint } from '@flowgram.ai/utils';\n\nimport { type WorkflowLineEntity } from '../entities';\n\nexport enum LineType {\n BEZIER, // 贝塞尔曲线\n LINE_CHART, // 折叠线\n}\n\nexport type LineRenderType = LineType | string;\n\nexport interface LinePosition {\n from:
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { Rectangle, IPoint } from '@flowgram.ai/utils';\n\nimport { type WorkflowLineEntity } from '../entities';\n\nexport enum LineType {\n BEZIER, // 贝塞尔曲线\n LINE_CHART, // 折叠线\n}\n\nexport type LineRenderType = LineType | string;\n\nexport type LinePointLocation = 'left' | 'top' | 'right' | 'bottom';\n\nexport interface LinePoint {\n x: number;\n y: number;\n location: LinePointLocation;\n}\nexport interface LinePosition {\n from: LinePoint;\n to: LinePoint;\n}\n\nexport interface LineColor {\n hidden: string;\n default: string;\n drawing: string;\n hovered: string;\n selected: string;\n error: string;\n flowing: string;\n}\n\nexport enum LineColors {\n HIDDEN = 'var(--g-workflow-line-color-hidden,transparent)', // 隐藏线条\n DEFUALT = 'var(--g-workflow-line-color-default,#4d53e8)',\n DRAWING = 'var(--g-workflow-line-color-drawing, #5DD6E3)', // '#b5bbf8', // '#9197F1',\n HOVER = 'var(--g-workflow-line-color-hover,#37d0ff)',\n SELECTED = 'var(--g-workflow-line-color-selected,#37d0ff)',\n ERROR = 'var(--g-workflow-line-color-error,red)',\n FLOWING = 'var(--g-workflow-line-color-flowing,#4d53e8)', // 流动线条,默认使用主题色\n}\n\nexport interface WorkflowLineRenderContribution {\n entity: WorkflowLineEntity;\n path: string;\n bounds: Rectangle;\n update: (params: { fromPos: LinePoint; toPos: LinePoint }) => void;\n calcDistance: (pos: IPoint) => number;\n}\n\nexport type WorkflowLineRenderContributionFactory = (new (\n entity: WorkflowLineEntity\n) => WorkflowLineRenderContribution) & {\n type: LineRenderType;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,oBAAA;AACA,EAAAA,oBAAA;AAFU,SAAAA;AAAA,GAAA;AA6BL,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,YAAS;AACT,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,cAAW;AACX,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,aAAU;AAPA,SAAAA;AAAA,GAAA;","names":["LineType","LineColors"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
3
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
4
|
-
export { e as WorkflowNodeJSON,
|
|
4
|
+
export { e as WorkflowNodeJSON, u as WorkflowNodeMeta } from '../workflow-line-entity-DSC3qPV1.mjs';
|
|
5
5
|
import './workflow-edge.mjs';
|
|
6
6
|
import '@flowgram.ai/core';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
3
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
4
|
-
export { e as WorkflowNodeJSON,
|
|
4
|
+
export { e as WorkflowNodeJSON, u as WorkflowNodeMeta } from '../workflow-line-entity-I_VrhJ_t.js';
|
|
5
5
|
import './workflow-edge.js';
|
|
6
6
|
import '@flowgram.ai/core';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
@@ -2,7 +2,7 @@ import { FormMeta } from '@flowgram.ai/node';
|
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
4
|
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { u as WorkflowNodeMeta, f as WorkflowPortEntity, b as WorkflowLinesManager } from '../workflow-line-entity-DSC3qPV1.mjs';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.mjs';
|
|
@@ -22,6 +22,7 @@ type WorkflowNodeFormMeta = FormMetaOrFormMetaGenerator | FormMeta;
|
|
|
22
22
|
*/
|
|
23
23
|
interface WorkflowNodeRegistry extends FlowNodeRegistry<WorkflowNodeMeta> {
|
|
24
24
|
formMeta?: WorkflowNodeFormMeta;
|
|
25
|
+
canAddLine?: (fromPort: WorkflowPortEntity, toPort: WorkflowPortEntity, lines: WorkflowLinesManager, silent?: boolean) => boolean;
|
|
25
26
|
}
|
|
26
27
|
interface WorkflowNodeRenderProps {
|
|
27
28
|
node: WorkflowNodeEntity;
|
|
@@ -2,7 +2,7 @@ import { FormMeta } from '@flowgram.ai/node';
|
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
4
|
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-IQzlYvPD.js';
|
|
5
|
-
import {
|
|
5
|
+
import { u as WorkflowNodeMeta, f as WorkflowPortEntity, b as WorkflowLinesManager } from '../workflow-line-entity-I_VrhJ_t.js';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.js';
|
|
@@ -22,6 +22,7 @@ type WorkflowNodeFormMeta = FormMetaOrFormMetaGenerator | FormMeta;
|
|
|
22
22
|
*/
|
|
23
23
|
interface WorkflowNodeRegistry extends FlowNodeRegistry<WorkflowNodeMeta> {
|
|
24
24
|
formMeta?: WorkflowNodeFormMeta;
|
|
25
|
+
canAddLine?: (fromPort: WorkflowPortEntity, toPort: WorkflowPortEntity, lines: WorkflowLinesManager, silent?: boolean) => boolean;
|
|
25
26
|
}
|
|
26
27
|
interface WorkflowNodeRenderProps {
|
|
27
28
|
node: WorkflowNodeEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-registry.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { FormMeta } from '@flowgram.ai/node';\nimport type { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';\nimport type { FlowNodeRegistry } from '@flowgram.ai/document';\n\nimport type { WorkflowNodeEntity } from '../entities';\nimport type { WorkflowNodeMeta } from './workflow-node';\n\n/**\n * 节点表单引擎配置\n */\nexport type WorkflowNodeFormMeta = FormMetaOrFormMetaGenerator | FormMeta;\n\n/**\n * 节点注册\n */\nexport interface WorkflowNodeRegistry extends FlowNodeRegistry<WorkflowNodeMeta> {\n formMeta?: WorkflowNodeFormMeta;\n}\n\nexport interface WorkflowNodeRenderProps {\n node: WorkflowNodeEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-registry.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { FormMeta } from '@flowgram.ai/node';\nimport type { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';\nimport type { FlowNodeRegistry } from '@flowgram.ai/document';\n\nimport type { WorkflowNodeEntity, WorkflowPortEntity } from '../entities';\nimport type { WorkflowNodeMeta } from './workflow-node';\nimport type { WorkflowLinesManager } from '../workflow-lines-manager';\n\n/**\n * 节点表单引擎配置\n */\nexport type WorkflowNodeFormMeta = FormMetaOrFormMetaGenerator | FormMeta;\n\n/**\n * 节点注册\n */\nexport interface WorkflowNodeRegistry extends FlowNodeRegistry<WorkflowNodeMeta> {\n formMeta?: WorkflowNodeFormMeta;\n canAddLine?: (\n fromPort: WorkflowPortEntity,\n toPort: WorkflowPortEntity,\n lines: WorkflowLinesManager,\n silent?: boolean\n ) => boolean;\n}\n\nexport interface WorkflowNodeRenderProps {\n node: WorkflowNodeEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -5,7 +5,7 @@ import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowNo
|
|
|
5
5
|
import { W as WorkflowNodeEntity, a as WorkflowSubCanvas } from './workflow-sub-canvas-IQzlYvPD.mjs';
|
|
6
6
|
import { NodeEngineContext } from '@flowgram.ai/form-core';
|
|
7
7
|
import { WorkflowEdgeJSON } from './typings/workflow-edge.mjs';
|
|
8
|
-
import React from 'react';
|
|
8
|
+
import React$1 from 'react';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
@@ -85,6 +85,10 @@ declare enum WorkflowContentChangeType {
|
|
|
85
85
|
* 删除线条
|
|
86
86
|
*/
|
|
87
87
|
DELETE_LINE = "DELETE_LINE",
|
|
88
|
+
/**
|
|
89
|
+
* 线条数据修改
|
|
90
|
+
*/
|
|
91
|
+
LINE_DATA_CHANGE = "LINE_DATA_CHANGE",
|
|
88
92
|
/**
|
|
89
93
|
* 节点Meta信息变更
|
|
90
94
|
*/
|
|
@@ -96,6 +100,10 @@ interface WorkflowContentChangeEvent {
|
|
|
96
100
|
* 当前触发的元素的json数据,toJSON 需要主动触发
|
|
97
101
|
*/
|
|
98
102
|
toJSON: () => any;
|
|
103
|
+
/**
|
|
104
|
+
* oldValue
|
|
105
|
+
*/
|
|
106
|
+
oldValue?: any;
|
|
99
107
|
entity: WorkflowNodeEntity | WorkflowLineEntity;
|
|
100
108
|
}
|
|
101
109
|
|
|
@@ -109,9 +117,15 @@ declare enum LineType {
|
|
|
109
117
|
LINE_CHART = 1
|
|
110
118
|
}
|
|
111
119
|
type LineRenderType = LineType | string;
|
|
120
|
+
type LinePointLocation = 'left' | 'top' | 'right' | 'bottom';
|
|
121
|
+
interface LinePoint {
|
|
122
|
+
x: number;
|
|
123
|
+
y: number;
|
|
124
|
+
location: LinePointLocation;
|
|
125
|
+
}
|
|
112
126
|
interface LinePosition {
|
|
113
|
-
from:
|
|
114
|
-
to:
|
|
127
|
+
from: LinePoint;
|
|
128
|
+
to: LinePoint;
|
|
115
129
|
}
|
|
116
130
|
interface LineColor {
|
|
117
131
|
hidden: string;
|
|
@@ -136,8 +150,8 @@ interface WorkflowLineRenderContribution {
|
|
|
136
150
|
path: string;
|
|
137
151
|
bounds: Rectangle;
|
|
138
152
|
update: (params: {
|
|
139
|
-
fromPos:
|
|
140
|
-
toPos:
|
|
153
|
+
fromPos: LinePoint;
|
|
154
|
+
toPos: LinePoint;
|
|
141
155
|
}) => void;
|
|
142
156
|
calcDistance: (pos: IPoint) => number;
|
|
143
157
|
}
|
|
@@ -160,7 +174,7 @@ interface INodesDragEvent {
|
|
|
160
174
|
nodes: FlowNodeEntity[];
|
|
161
175
|
startPositions: PositionSchema[];
|
|
162
176
|
dragEvent: PlaygroundDragEvent;
|
|
163
|
-
triggerEvent: MouseEvent | React.MouseEvent;
|
|
177
|
+
triggerEvent: MouseEvent | React$1.MouseEvent;
|
|
164
178
|
dragger: PlaygroundDrag;
|
|
165
179
|
}
|
|
166
180
|
interface NodesDragStartEvent extends INodesDragEvent {
|
|
@@ -214,8 +228,6 @@ interface WorkflowDocumentOptions extends FlowDocumentOptions {
|
|
|
214
228
|
isFlowingLine?: (line: WorkflowLineEntity) => boolean;
|
|
215
229
|
/** 是否禁用线条 */
|
|
216
230
|
isDisabledLine?: (line: WorkflowLineEntity) => boolean;
|
|
217
|
-
/** 是否竖向线条 */
|
|
218
|
-
isVerticalLine?: (line: WorkflowLineEntity) => boolean;
|
|
219
231
|
/** 拖拽线条结束 */
|
|
220
232
|
onDragLineEnd?: (params: onDragLineEndParams) => Promise<void>;
|
|
221
233
|
/** 获取线条渲染器 */
|
|
@@ -404,6 +416,11 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
404
416
|
nodeEngineContext: NodeEngineContext;
|
|
405
417
|
selectServices: WorkflowSelectService;
|
|
406
418
|
get loading(): boolean;
|
|
419
|
+
/**
|
|
420
|
+
* use `ctx.tools.fitView()` instead
|
|
421
|
+
* @deprecated
|
|
422
|
+
* @param easing
|
|
423
|
+
*/
|
|
407
424
|
fitView(easing?: boolean): Promise<void>;
|
|
408
425
|
init(): void;
|
|
409
426
|
load(): Promise<void>;
|
|
@@ -520,9 +537,10 @@ declare class WorkflowLinesManager {
|
|
|
520
537
|
getAllLines(): WorkflowLineEntity[];
|
|
521
538
|
hasLine(portInfo: WorkflowLinePortInfo): boolean;
|
|
522
539
|
getLine(portInfo: WorkflowLinePortInfo): WorkflowLineEntity | undefined;
|
|
540
|
+
getLineById(id: string): WorkflowLineEntity | undefined;
|
|
523
541
|
replaceLine(oldPortInfo: WorkflowLinePortInfo, newPortInfo: WorkflowLinePortInfo): WorkflowLineEntity;
|
|
524
542
|
createLine(options: {
|
|
525
|
-
drawingTo?:
|
|
543
|
+
drawingTo?: LinePoint;
|
|
526
544
|
key?: string;
|
|
527
545
|
} & WorkflowLinePortInfo): WorkflowLineEntity | undefined;
|
|
528
546
|
/**
|
|
@@ -543,7 +561,6 @@ declare class WorkflowLinesManager {
|
|
|
543
561
|
isHideArrowLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
544
562
|
isFlowingLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
545
563
|
isDisabledLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
546
|
-
isVerticalLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
547
564
|
setLineRenderType(line: WorkflowLineEntity): LineRenderType | undefined;
|
|
548
565
|
setLineClassName(line: WorkflowLineEntity): string | undefined;
|
|
549
566
|
getLineColor(line: WorkflowLineEntity): string | undefined;
|
|
@@ -586,6 +603,25 @@ interface WorkflowPort {
|
|
|
586
603
|
* 没有代表 默认连接点,默认 input 类型 为最左边中心,output 类型为最右边中心
|
|
587
604
|
*/
|
|
588
605
|
portID?: string | number;
|
|
606
|
+
/**
|
|
607
|
+
* 输入或者输出点
|
|
608
|
+
*/
|
|
609
|
+
type: WorkflowPortType;
|
|
610
|
+
/**
|
|
611
|
+
* 端口位置
|
|
612
|
+
*/
|
|
613
|
+
location?: LinePointLocation;
|
|
614
|
+
/**
|
|
615
|
+
* 端口热区大小
|
|
616
|
+
*/
|
|
617
|
+
size?: {
|
|
618
|
+
width: number;
|
|
619
|
+
height: number;
|
|
620
|
+
};
|
|
621
|
+
/**
|
|
622
|
+
* 相对于 position 的偏移
|
|
623
|
+
*/
|
|
624
|
+
offset?: IPoint;
|
|
589
625
|
/**
|
|
590
626
|
* 禁用端口
|
|
591
627
|
*/
|
|
@@ -594,10 +630,6 @@ interface WorkflowPort {
|
|
|
594
630
|
* 将点位渲染到该父节点上
|
|
595
631
|
*/
|
|
596
632
|
targetElement?: HTMLElement;
|
|
597
|
-
/**
|
|
598
|
-
* 输入或者输出点
|
|
599
|
-
*/
|
|
600
|
-
type: WorkflowPortType;
|
|
601
633
|
}
|
|
602
634
|
type WorkflowPorts = WorkflowPort[];
|
|
603
635
|
interface WorkflowPortEntityOpts extends EntityOpts, WorkflowPort {
|
|
@@ -612,25 +644,27 @@ interface WorkflowPortEntityOpts extends EntityOpts, WorkflowPort {
|
|
|
612
644
|
declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
|
|
613
645
|
static type: string;
|
|
614
646
|
readonly node: WorkflowNodeEntity;
|
|
615
|
-
targetElement?: HTMLElement;
|
|
616
647
|
readonly portID: string | number;
|
|
617
|
-
readonly
|
|
648
|
+
readonly portType: WorkflowPortType;
|
|
649
|
+
private _disabled?;
|
|
618
650
|
private _hasError;
|
|
651
|
+
private _location?;
|
|
652
|
+
private _size?;
|
|
653
|
+
private _offset?;
|
|
619
654
|
protected readonly _onErrorChangedEmitter: Emitter<void>;
|
|
620
655
|
onErrorChanged: _flowgram_ai_utils.Event<void>;
|
|
621
|
-
|
|
622
|
-
* port 类型
|
|
623
|
-
*/
|
|
624
|
-
portType: WorkflowPortType;
|
|
656
|
+
targetElement?: HTMLElement;
|
|
625
657
|
static getPortEntityId(node: WorkflowNodeEntity, portType: WorkflowPortType, portID?: string | number): string;
|
|
658
|
+
get position(): LinePointLocation | undefined;
|
|
626
659
|
constructor(opts: WorkflowPortEntityOpts);
|
|
627
660
|
get hasError(): boolean;
|
|
628
661
|
set hasError(hasError: boolean);
|
|
629
662
|
validate(): void;
|
|
630
663
|
isErrorPort(): boolean;
|
|
631
|
-
get
|
|
664
|
+
get location(): LinePointLocation;
|
|
665
|
+
get point(): LinePoint;
|
|
632
666
|
/**
|
|
633
|
-
*
|
|
667
|
+
* 端口热区
|
|
634
668
|
*/
|
|
635
669
|
get bounds(): Rectangle;
|
|
636
670
|
isHovered(x: number, y: number): boolean;
|
|
@@ -656,14 +690,10 @@ declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
|
|
|
656
690
|
* 当前点位上连接的线条(包含 isDrawing === true 的线条)
|
|
657
691
|
*/
|
|
658
692
|
get allLines(): WorkflowLineEntity[];
|
|
693
|
+
update(data: Exclude<WorkflowPort, 'portID' | 'type'>): void;
|
|
659
694
|
dispose(): void;
|
|
660
695
|
}
|
|
661
696
|
|
|
662
|
-
/**
|
|
663
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
664
|
-
* SPDX-License-Identifier: MIT
|
|
665
|
-
*/
|
|
666
|
-
|
|
667
697
|
declare const LINE_HOVER_DISTANCE = 8;
|
|
668
698
|
declare const POINT_RADIUS = 10;
|
|
669
699
|
interface WorkflowLinePortInfo {
|
|
@@ -671,25 +701,74 @@ interface WorkflowLinePortInfo {
|
|
|
671
701
|
to?: string;
|
|
672
702
|
fromPort?: string | number;
|
|
673
703
|
toPort?: string | number;
|
|
704
|
+
data?: any;
|
|
674
705
|
}
|
|
675
706
|
interface WorkflowLineEntityOpts extends EntityOpts, WorkflowLinePortInfo {
|
|
676
707
|
document: WorkflowDocument;
|
|
677
708
|
linesManager: WorkflowLinesManager;
|
|
678
|
-
drawingTo?:
|
|
709
|
+
drawingTo?: LinePoint;
|
|
679
710
|
}
|
|
680
711
|
interface WorkflowLineInfo extends WorkflowLinePortInfo {
|
|
681
|
-
drawingTo?:
|
|
682
|
-
isDefaultLine?: boolean;
|
|
712
|
+
drawingTo?: LinePoint;
|
|
683
713
|
}
|
|
684
714
|
interface WorkflowLineUIState {
|
|
715
|
+
/**
|
|
716
|
+
* 是否出错
|
|
717
|
+
*/
|
|
685
718
|
hasError: boolean;
|
|
719
|
+
/**
|
|
720
|
+
* 流动
|
|
721
|
+
*/
|
|
686
722
|
flowing: boolean;
|
|
723
|
+
/**
|
|
724
|
+
* 禁用
|
|
725
|
+
*/
|
|
687
726
|
disabled: boolean;
|
|
688
|
-
|
|
727
|
+
/**
|
|
728
|
+
* 箭头反转
|
|
729
|
+
*/
|
|
689
730
|
reverse: boolean;
|
|
731
|
+
/**
|
|
732
|
+
* 隐藏箭头
|
|
733
|
+
*/
|
|
690
734
|
hideArrow: boolean;
|
|
735
|
+
/**
|
|
736
|
+
* 线条宽度
|
|
737
|
+
* @default 2
|
|
738
|
+
*/
|
|
739
|
+
strokeWidth?: number;
|
|
740
|
+
/**
|
|
741
|
+
* 选中后的线条宽度
|
|
742
|
+
* @default 3
|
|
743
|
+
*/
|
|
744
|
+
strokeWidthSelected?: number;
|
|
745
|
+
/**
|
|
746
|
+
* 收缩
|
|
747
|
+
* @default 10
|
|
748
|
+
*/
|
|
749
|
+
shrink: number;
|
|
750
|
+
/**
|
|
751
|
+
* @deprecated use `lockedColor` instead
|
|
752
|
+
*/
|
|
691
753
|
highlightColor: string;
|
|
754
|
+
/**
|
|
755
|
+
* 曲率
|
|
756
|
+
* only for Bezier,
|
|
757
|
+
* @default 0.25
|
|
758
|
+
*/
|
|
759
|
+
curvature: number;
|
|
760
|
+
/**
|
|
761
|
+
* Line locked color
|
|
762
|
+
*/
|
|
692
763
|
lockedColor: string;
|
|
764
|
+
/**
|
|
765
|
+
* React className
|
|
766
|
+
*/
|
|
767
|
+
className?: string;
|
|
768
|
+
/**
|
|
769
|
+
* React style
|
|
770
|
+
*/
|
|
771
|
+
style?: React.CSSProperties;
|
|
693
772
|
}
|
|
694
773
|
/**
|
|
695
774
|
* 线条
|
|
@@ -701,8 +780,13 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
701
780
|
* @param info
|
|
702
781
|
*/
|
|
703
782
|
static portInfoToLineId(info: WorkflowLinePortInfo): string;
|
|
783
|
+
private _onLineDataChangeEmitter;
|
|
704
784
|
readonly document: WorkflowDocument;
|
|
705
785
|
readonly linesManager: WorkflowLinesManager;
|
|
786
|
+
readonly onLineDataChange: _flowgram_ai_utils.Event<{
|
|
787
|
+
oldValue: any;
|
|
788
|
+
newValue: any;
|
|
789
|
+
}>;
|
|
706
790
|
private _from;
|
|
707
791
|
private _to?;
|
|
708
792
|
private _lineData;
|
|
@@ -724,7 +808,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
724
808
|
* 更新线条扩展数据
|
|
725
809
|
* @param data
|
|
726
810
|
*/
|
|
727
|
-
set lineData(
|
|
811
|
+
set lineData(newValue: any);
|
|
728
812
|
stackIndex: number;
|
|
729
813
|
/**
|
|
730
814
|
* 线条数据
|
|
@@ -748,12 +832,12 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
748
832
|
get inContainer(): boolean;
|
|
749
833
|
/**
|
|
750
834
|
* 获取是否 testrun processing
|
|
751
|
-
* @deprecated use `
|
|
835
|
+
* @deprecated use `flowing` instead
|
|
752
836
|
*/
|
|
753
837
|
get processing(): boolean;
|
|
754
838
|
/**
|
|
755
839
|
* 设置 testrun processing 状态
|
|
756
|
-
* @deprecated use `
|
|
840
|
+
* @deprecated use `flowing` instead
|
|
757
841
|
*/
|
|
758
842
|
set processing(status: boolean);
|
|
759
843
|
get hasError(): boolean;
|
|
@@ -765,11 +849,11 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
765
849
|
/**
|
|
766
850
|
* 设置线条画线时的目标位置
|
|
767
851
|
*/
|
|
768
|
-
set drawingTo(pos:
|
|
852
|
+
set drawingTo(pos: LinePoint | undefined);
|
|
769
853
|
/**
|
|
770
854
|
* 获取线条正在画线的位置
|
|
771
855
|
*/
|
|
772
|
-
get drawingTo():
|
|
856
|
+
get drawingTo(): LinePoint | undefined;
|
|
773
857
|
get highlightColor(): string;
|
|
774
858
|
set highlightColor(highlightColor: string);
|
|
775
859
|
get lockedColor(): string;
|
|
@@ -794,6 +878,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
794
878
|
get hideArrow(): boolean;
|
|
795
879
|
/** 是否流动 */
|
|
796
880
|
get flowing(): boolean;
|
|
881
|
+
set flowing(flowing: boolean);
|
|
797
882
|
/** 是否禁用 */
|
|
798
883
|
get disabled(): boolean;
|
|
799
884
|
/** 是否竖向 */
|
|
@@ -801,7 +886,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
801
886
|
/** 获取线条渲染器类型 */
|
|
802
887
|
get renderType(): LineRenderType | undefined;
|
|
803
888
|
/** 获取线条样式 */
|
|
804
|
-
get className(): string
|
|
889
|
+
get className(): string;
|
|
805
890
|
get color(): string | undefined;
|
|
806
891
|
/**
|
|
807
892
|
* 初始化线条
|
|
@@ -822,4 +907,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
822
907
|
fireRender(): void;
|
|
823
908
|
}
|
|
824
909
|
|
|
825
|
-
export { type
|
|
910
|
+
export { type NodesDragStartEvent as A, type NodesDragEndEvent as B, type NodesDraggingEvent as C, type onDragLineEndParams as D, LINE_HOVER_DISTANCE as E, type WorkflowLinePortInfo as F, type WorkflowLineEntityOpts as G, type WorkflowLineInfo as H, type WorkflowLineUIState as I, PORT_SIZE as J, type WorkflowPortEntityOpts as K, type LineEventProps as L, type WorkflowEntityHoverable as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, type HoverPosition as Q, type WorkfloEntityHoverable as R, WorkflowDocumentProvider as S, WorkflowDocumentOptionsDefault as T, WorkflowHoverService as W, WorkflowDocument as a, WorkflowLinesManager as b, WorkflowSelectService as c, WorkflowDocumentOptions as d, type WorkflowNodeJSON as e, WorkflowPortEntity as f, WorkflowLineEntity as g, type WorkflowJSON as h, type WorkflowPorts as i, type WorkflowPortType as j, type LinePoint as k, type WorkflowPort as l, type LineRenderType as m, type WorkflowLineRenderContribution as n, type LinePosition as o, getPortEntityId as p, WORKFLOW_LINE_ENTITY as q, domReactToBounds as r, WorkflowContentChangeType as s, type WorkflowContentChangeEvent as t, type WorkflowNodeMeta as u, LineType as v, type LinePointLocation as w, type LineColor as x, LineColors as y, type WorkflowLineRenderContributionFactory as z };
|