@flowgram.ai/free-layout-core 0.1.0-alpha.2 → 0.1.0-alpha.21
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-3UW6BHP2.js +7 -0
- package/dist/esm/chunk-3UW6BHP2.js.map +1 -0
- package/dist/esm/chunk-5BT3ZR4D.js +23 -0
- package/dist/esm/chunk-5BT3ZR4D.js.map +1 -0
- package/dist/esm/{chunk-DE4324TR.js → chunk-IKQUOAWQ.js} +1 -1
- package/dist/esm/chunk-IKQUOAWQ.js.map +1 -0
- package/dist/esm/chunk-TQLT57GW.js +1 -0
- package/dist/esm/chunk-TQLT57GW.js.map +1 -0
- package/dist/esm/{chunk-J5FVRRUV.js → chunk-U2XMPOSL.js} +2 -1
- package/dist/esm/chunk-U2XMPOSL.js.map +1 -0
- package/dist/esm/index.js +1392 -642
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/typings/index.js +12 -7
- package/dist/esm/typings/workflow-drag.js +2 -0
- package/dist/esm/typings/workflow-drag.js.map +1 -0
- package/dist/esm/typings/workflow-json.js +1 -1
- package/dist/esm/typings/workflow-line.js +1 -1
- package/dist/esm/typings/workflow-operation.js +8 -0
- package/dist/esm/typings/workflow-operation.js.map +1 -0
- package/dist/index.d.mts +261 -189
- package/dist/index.d.ts +261 -189
- package/dist/index.js +1392 -644
- package/dist/index.js.map +1 -1
- package/dist/typings/index.d.mts +10 -5
- package/dist/typings/index.d.ts +10 -5
- package/dist/typings/index.js +16 -7
- package/dist/typings/index.js.map +1 -1
- package/dist/typings/workflow-drag.d.mts +7 -0
- package/dist/typings/workflow-drag.d.ts +7 -0
- package/dist/typings/workflow-drag.js +19 -0
- package/dist/typings/workflow-drag.js.map +1 -0
- package/dist/typings/workflow-edge.d.mts +5 -0
- package/dist/typings/workflow-edge.d.ts +5 -0
- package/dist/typings/workflow-edge.js.map +1 -1
- package/dist/typings/workflow-json.d.mts +3 -4
- package/dist/typings/workflow-json.d.ts +3 -4
- package/dist/typings/workflow-json.js +1 -0
- package/dist/typings/workflow-json.js.map +1 -1
- package/dist/typings/workflow-line.d.mts +3 -4
- package/dist/typings/workflow-line.d.ts +3 -4
- package/dist/typings/workflow-line.js +8 -5
- package/dist/typings/workflow-line.js.map +1 -1
- package/dist/typings/workflow-node.d.mts +2 -3
- package/dist/typings/workflow-node.d.ts +2 -3
- package/dist/typings/workflow-node.js.map +1 -1
- package/dist/typings/workflow-operation.d.mts +38 -0
- package/dist/typings/workflow-operation.d.ts +38 -0
- package/dist/typings/workflow-operation.js +31 -0
- package/dist/typings/workflow-operation.js.map +1 -0
- package/dist/typings/workflow-registry.d.mts +9 -4
- package/dist/typings/workflow-registry.d.ts +9 -4
- package/dist/typings/workflow-registry.js.map +1 -1
- package/dist/typings/workflow-sub-canvas.d.mts +6 -1
- package/dist/typings/workflow-sub-canvas.d.ts +6 -1
- package/dist/typings/workflow-sub-canvas.js.map +1 -1
- package/dist/workflow-node-entity-DH5qlw7I.d.mts +1147 -0
- package/dist/workflow-node-entity-DWVtlA2a.d.ts +1147 -0
- package/package.json +15 -15
- package/dist/esm/chunk-DE4324TR.js.map +0 -1
- package/dist/esm/chunk-J5FVRRUV.js.map +0 -1
- package/dist/esm/chunk-PT4ZVDZZ.js +0 -20
- package/dist/esm/chunk-PT4ZVDZZ.js.map +0 -1
- package/dist/workflow-line-entity-BJQBRDgJ.d.mts +0 -747
- package/dist/workflow-line-entity-CEitdjhk.d.ts +0 -747
- package/dist/workflow-sub-canvas-DOVla1mw.d.mts +0 -15
- package/dist/workflow-sub-canvas-DOVla1mw.d.ts +0 -15
package/dist/typings/index.d.mts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { L as LineCenterPoint, x as LineColor, y as LineColors, g as LineEventProps, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, t as WorkflowNodeMeta, A as WorkflowSubCanvas, E as onDragLineEndParams } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.mjs';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.mjs';
|
|
4
|
-
export {
|
|
5
|
-
import '@flowgram.ai/utils';
|
|
6
|
-
import '@flowgram.ai/core';
|
|
4
|
+
export { NodePostionUpdateEvent, WorkflowOperationBaseService } from './workflow-operation.mjs';
|
|
7
5
|
import '@flowgram.ai/document';
|
|
8
|
-
import '@flowgram.ai/
|
|
6
|
+
import '@flowgram.ai/core';
|
|
7
|
+
import '@flowgram.ai/utils';
|
|
9
8
|
import 'react';
|
|
9
|
+
import '@flowgram.ai/form-core';
|
|
10
10
|
import '@flowgram.ai/node';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
14
|
+
* SPDX-License-Identifier: MIT
|
|
15
|
+
*/
|
|
16
|
+
|
|
12
17
|
declare const URLParams: unique symbol;
|
|
13
18
|
interface URLParams {
|
|
14
19
|
[key: string]: string;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { L as LineCenterPoint, x as LineColor, y as LineColors, g as LineEventProps, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, t as WorkflowNodeMeta, A as WorkflowSubCanvas, E as onDragLineEndParams } from '../workflow-node-entity-DWVtlA2a.js';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.js';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.js';
|
|
4
|
-
export {
|
|
5
|
-
import '@flowgram.ai/utils';
|
|
6
|
-
import '@flowgram.ai/core';
|
|
4
|
+
export { NodePostionUpdateEvent, WorkflowOperationBaseService } from './workflow-operation.js';
|
|
7
5
|
import '@flowgram.ai/document';
|
|
8
|
-
import '@flowgram.ai/
|
|
6
|
+
import '@flowgram.ai/core';
|
|
7
|
+
import '@flowgram.ai/utils';
|
|
9
8
|
import 'react';
|
|
9
|
+
import '@flowgram.ai/form-core';
|
|
10
10
|
import '@flowgram.ai/node';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
14
|
+
* SPDX-License-Identifier: MIT
|
|
15
|
+
*/
|
|
16
|
+
|
|
12
17
|
declare const URLParams: unique symbol;
|
|
13
18
|
interface URLParams {
|
|
14
19
|
[key: string]: string;
|
package/dist/typings/index.js
CHANGED
|
@@ -23,7 +23,8 @@ __export(typings_exports, {
|
|
|
23
23
|
LineColors: () => LineColors,
|
|
24
24
|
LineType: () => LineType,
|
|
25
25
|
URLParams: () => URLParams,
|
|
26
|
-
WorkflowContentChangeType: () => WorkflowContentChangeType
|
|
26
|
+
WorkflowContentChangeType: () => WorkflowContentChangeType,
|
|
27
|
+
WorkflowOperationBaseService: () => WorkflowOperationBaseService
|
|
27
28
|
});
|
|
28
29
|
module.exports = __toCommonJS(typings_exports);
|
|
29
30
|
|
|
@@ -35,6 +36,7 @@ var WorkflowContentChangeType = /* @__PURE__ */ ((WorkflowContentChangeType2) =>
|
|
|
35
36
|
WorkflowContentChangeType2["NODE_DATA_CHANGE"] = "NODE_DATA_CHANGE";
|
|
36
37
|
WorkflowContentChangeType2["ADD_LINE"] = "ADD_LINE";
|
|
37
38
|
WorkflowContentChangeType2["DELETE_LINE"] = "DELETE_LINE";
|
|
39
|
+
WorkflowContentChangeType2["LINE_DATA_CHANGE"] = "LINE_DATA_CHANGE";
|
|
38
40
|
WorkflowContentChangeType2["META_CHANGE"] = "META_CHANGE";
|
|
39
41
|
return WorkflowContentChangeType2;
|
|
40
42
|
})(WorkflowContentChangeType || {});
|
|
@@ -43,17 +45,23 @@ var WorkflowContentChangeType = /* @__PURE__ */ ((WorkflowContentChangeType2) =>
|
|
|
43
45
|
var LineType = /* @__PURE__ */ ((LineType2) => {
|
|
44
46
|
LineType2[LineType2["BEZIER"] = 0] = "BEZIER";
|
|
45
47
|
LineType2[LineType2["LINE_CHART"] = 1] = "LINE_CHART";
|
|
48
|
+
LineType2[LineType2["STRAIGHT"] = 2] = "STRAIGHT";
|
|
46
49
|
return LineType2;
|
|
47
50
|
})(LineType || {});
|
|
48
51
|
var LineColors = /* @__PURE__ */ ((LineColors2) => {
|
|
49
|
-
LineColors2["HIDDEN"] = "transparent";
|
|
50
|
-
LineColors2["DEFUALT"] = "
|
|
51
|
-
LineColors2["DRAWING"] = "#5DD6E3";
|
|
52
|
-
LineColors2["HOVER"] = "
|
|
53
|
-
LineColors2["
|
|
52
|
+
LineColors2["HIDDEN"] = "var(--g-workflow-line-color-hidden,transparent)";
|
|
53
|
+
LineColors2["DEFUALT"] = "var(--g-workflow-line-color-default,#4d53e8)";
|
|
54
|
+
LineColors2["DRAWING"] = "var(--g-workflow-line-color-drawing, #5DD6E3)";
|
|
55
|
+
LineColors2["HOVER"] = "var(--g-workflow-line-color-hover,#37d0ff)";
|
|
56
|
+
LineColors2["SELECTED"] = "var(--g-workflow-line-color-selected,#37d0ff)";
|
|
57
|
+
LineColors2["ERROR"] = "var(--g-workflow-line-color-error,red)";
|
|
58
|
+
LineColors2["FLOWING"] = "var(--g-workflow-line-color-flowing,#4d53e8)";
|
|
54
59
|
return LineColors2;
|
|
55
60
|
})(LineColors || {});
|
|
56
61
|
|
|
62
|
+
// src/typings/workflow-operation.ts
|
|
63
|
+
var WorkflowOperationBaseService = Symbol("WorkflowOperationBaseService");
|
|
64
|
+
|
|
57
65
|
// src/typings/index.ts
|
|
58
66
|
var URLParams = Symbol("");
|
|
59
67
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -61,6 +69,7 @@ var URLParams = Symbol("");
|
|
|
61
69
|
LineColors,
|
|
62
70
|
LineType,
|
|
63
71
|
URLParams,
|
|
64
|
-
WorkflowContentChangeType
|
|
72
|
+
WorkflowContentChangeType,
|
|
73
|
+
WorkflowOperationBaseService
|
|
65
74
|
});
|
|
66
75
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/index.ts","../../src/typings/workflow-json.ts","../../src/typings/workflow-line.ts"],"sourcesContent":["
|
|
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 STRAIGHT, // 直线\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}\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 LineCenterPoint {\n x: number;\n y: number;\n labelX: number; // Relative to where the line begins\n labelY: number; // Relative to where the line begins\n}\n\nexport interface WorkflowLineRenderContribution {\n entity: WorkflowLineEntity;\n path: string;\n center?: LineCenterPoint;\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\nimport { WorkflowJSON } from './workflow-json';\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 /**\n * 更新节点与线条\n */\n fromJSON(json: WorkflowJSON): 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;AACA,EAAAA,oBAAA;AAHU,SAAAA;AAAA,GAAA;AA+BL,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;;;ACDL,IAAM,+BAA+B,OAAO,8BAA8B;;;AHzB1E,IAAM,YAAY,OAAO,EAAE;","names":["WorkflowContentChangeType","LineType","LineColors"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import '@flowgram.ai/utils';
|
|
3
|
+
import '@flowgram.ai/document';
|
|
4
|
+
import '@flowgram.ai/core';
|
|
5
|
+
export { g as LineEventProps, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, E as onDragLineEndParams } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
6
|
+
import '@flowgram.ai/form-core';
|
|
7
|
+
import './workflow-edge.mjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import '@flowgram.ai/utils';
|
|
3
|
+
import '@flowgram.ai/document';
|
|
4
|
+
import '@flowgram.ai/core';
|
|
5
|
+
export { g as LineEventProps, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, E as onDragLineEndParams } from '../workflow-node-entity-DWVtlA2a.js';
|
|
6
|
+
import '@flowgram.ai/form-core';
|
|
7
|
+
import './workflow-edge.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/typings/workflow-drag.ts
|
|
17
|
+
var workflow_drag_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(workflow_drag_exports);
|
|
19
|
+
//# sourceMappingURL=workflow-drag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-drag.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type React from 'react';\n\nimport { type PositionSchema } from '@flowgram.ai/utils';\nimport { type FlowNodeEntity } from '@flowgram.ai/document';\nimport { PlaygroundDrag, type PlaygroundDragEvent } from '@flowgram.ai/core';\n\nimport { type WorkflowLineEntity, type WorkflowPortEntity } from '../entities';\n\nexport interface LineEventProps {\n type: 'onDrag' | 'onDragEnd';\n onDragNodeId?: string;\n event?: MouseEvent;\n}\n\ninterface INodesDragEvent {\n type: string;\n nodes: FlowNodeEntity[];\n startPositions: PositionSchema[];\n dragEvent: PlaygroundDragEvent;\n triggerEvent: MouseEvent | React.MouseEvent;\n dragger: PlaygroundDrag;\n}\n\nexport interface NodesDragStartEvent extends INodesDragEvent {\n type: 'onDragStart';\n}\n\nexport interface NodesDragEndEvent extends INodesDragEvent {\n type: 'onDragEnd';\n}\n\nexport interface NodesDraggingEvent extends INodesDragEvent {\n type: 'onDragging';\n positions: PositionSchema[];\n}\n\nexport type NodesDragEvent = NodesDragStartEvent | NodesDraggingEvent | NodesDragEndEvent;\n\nexport type onDragLineEndParams = {\n fromPort?: WorkflowPortEntity;\n toPort?: WorkflowPortEntity;\n mousePos: PositionSchema;\n line?: WorkflowLineEntity;\n originLine?: WorkflowLineEntity;\n event: PlaygroundDragEvent;\n};\n\nexport type OnDragLineEnd = (params: onDragLineEndParams) => Promise<void>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* 边数据
|
|
3
7
|
*/
|
|
@@ -6,6 +10,7 @@ interface WorkflowEdgeJSON {
|
|
|
6
10
|
targetNodeID: string;
|
|
7
11
|
sourcePortID?: string | number;
|
|
8
12
|
targetPortID?: string | number;
|
|
13
|
+
data?: any;
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
export type { WorkflowEdgeJSON };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* 边数据
|
|
3
7
|
*/
|
|
@@ -6,6 +10,7 @@ interface WorkflowEdgeJSON {
|
|
|
6
10
|
targetNodeID: string;
|
|
7
11
|
sourcePortID?: string | number;
|
|
8
12
|
targetPortID?: string | number;
|
|
13
|
+
data?: any;
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
export type { WorkflowEdgeJSON };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-edge.ts"],"sourcesContent":["/**\n * 边数据\n */\nexport interface WorkflowEdgeJSON {\n sourceNodeID: string;\n targetNodeID: string;\n sourcePortID?: string | number;\n targetPortID?: string | number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-edge.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * 边数据\n */\nexport interface WorkflowEdgeJSON {\n sourceNodeID: string;\n targetNodeID: string;\n sourcePortID?: string | number;\n targetPortID?: string | number;\n data?: any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export { m as WorkflowContentChangeEvent, l as WorkflowContentChangeType, k as WorkflowJSON } from '../workflow-line-entity-BJQBRDgJ.mjs';
|
|
1
|
+
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
3
2
|
import './workflow-edge.mjs';
|
|
4
3
|
import '@flowgram.ai/document';
|
|
5
|
-
import '@flowgram.ai/utils';
|
|
6
4
|
import '@flowgram.ai/core';
|
|
7
|
-
import '@flowgram.ai/
|
|
5
|
+
import '@flowgram.ai/utils';
|
|
8
6
|
import 'react';
|
|
7
|
+
import '@flowgram.ai/form-core';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export { m as WorkflowContentChangeEvent, l as WorkflowContentChangeType, k as WorkflowJSON } from '../workflow-line-entity-CEitdjhk.js';
|
|
1
|
+
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-DWVtlA2a.js';
|
|
3
2
|
import './workflow-edge.js';
|
|
4
3
|
import '@flowgram.ai/document';
|
|
5
|
-
import '@flowgram.ai/utils';
|
|
6
4
|
import '@flowgram.ai/core';
|
|
7
|
-
import '@flowgram.ai/
|
|
5
|
+
import '@flowgram.ai/utils';
|
|
8
6
|
import 'react';
|
|
7
|
+
import '@flowgram.ai/form-core';
|
|
@@ -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":["
|
|
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,8 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export {
|
|
3
|
-
import '@flowgram.ai/core';
|
|
2
|
+
export { L as LineCenterPoint, x as LineColor, y as LineColors, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
4
3
|
import '@flowgram.ai/document';
|
|
5
|
-
import '
|
|
4
|
+
import '@flowgram.ai/core';
|
|
5
|
+
import 'react';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
7
7
|
import './workflow-edge.mjs';
|
|
8
|
-
import 'react';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export {
|
|
3
|
-
import '@flowgram.ai/core';
|
|
2
|
+
export { L as LineCenterPoint, x as LineColor, y as LineColors, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-DWVtlA2a.js';
|
|
4
3
|
import '@flowgram.ai/document';
|
|
5
|
-
import '
|
|
4
|
+
import '@flowgram.ai/core';
|
|
5
|
+
import 'react';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
7
7
|
import './workflow-edge.js';
|
|
8
|
-
import 'react';
|
|
@@ -27,14 +27,17 @@ module.exports = __toCommonJS(workflow_line_exports);
|
|
|
27
27
|
var LineType = /* @__PURE__ */ ((LineType2) => {
|
|
28
28
|
LineType2[LineType2["BEZIER"] = 0] = "BEZIER";
|
|
29
29
|
LineType2[LineType2["LINE_CHART"] = 1] = "LINE_CHART";
|
|
30
|
+
LineType2[LineType2["STRAIGHT"] = 2] = "STRAIGHT";
|
|
30
31
|
return LineType2;
|
|
31
32
|
})(LineType || {});
|
|
32
33
|
var LineColors = /* @__PURE__ */ ((LineColors2) => {
|
|
33
|
-
LineColors2["HIDDEN"] = "transparent";
|
|
34
|
-
LineColors2["DEFUALT"] = "
|
|
35
|
-
LineColors2["DRAWING"] = "#5DD6E3";
|
|
36
|
-
LineColors2["HOVER"] = "
|
|
37
|
-
LineColors2["
|
|
34
|
+
LineColors2["HIDDEN"] = "var(--g-workflow-line-color-hidden,transparent)";
|
|
35
|
+
LineColors2["DEFUALT"] = "var(--g-workflow-line-color-default,#4d53e8)";
|
|
36
|
+
LineColors2["DRAWING"] = "var(--g-workflow-line-color-drawing, #5DD6E3)";
|
|
37
|
+
LineColors2["HOVER"] = "var(--g-workflow-line-color-hover,#37d0ff)";
|
|
38
|
+
LineColors2["SELECTED"] = "var(--g-workflow-line-color-selected,#37d0ff)";
|
|
39
|
+
LineColors2["ERROR"] = "var(--g-workflow-line-color-error,red)";
|
|
40
|
+
LineColors2["FLOWING"] = "var(--g-workflow-line-color-flowing,#4d53e8)";
|
|
38
41
|
return LineColors2;
|
|
39
42
|
})(LineColors || {});
|
|
40
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["
|
|
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 STRAIGHT, // 直线\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}\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 LineCenterPoint {\n x: number;\n y: number;\n labelX: number; // Relative to where the line begins\n labelY: number; // Relative to where the line begins\n}\n\nexport interface WorkflowLineRenderContribution {\n entity: WorkflowLineEntity;\n path: string;\n center?: LineCenterPoint;\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;AACA,EAAAA,oBAAA;AAHU,SAAAA;AAAA,GAAA;AA+BL,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,8 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
|
-
|
|
4
|
-
export { o as WorkflowNodeJSON, n as WorkflowNodeMeta } from '../workflow-line-entity-BJQBRDgJ.mjs';
|
|
3
|
+
export { h as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
5
4
|
import './workflow-edge.mjs';
|
|
6
5
|
import '@flowgram.ai/core';
|
|
7
|
-
import '@flowgram.ai/form-core';
|
|
8
6
|
import 'react';
|
|
7
|
+
import '@flowgram.ai/form-core';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
|
-
|
|
4
|
-
export { o as WorkflowNodeJSON, n as WorkflowNodeMeta } from '../workflow-line-entity-CEitdjhk.js';
|
|
3
|
+
export { h as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-node-entity-DWVtlA2a.js';
|
|
5
4
|
import './workflow-edge.js';
|
|
6
5
|
import '@flowgram.ai/core';
|
|
7
|
-
import '@flowgram.ai/form-core';
|
|
8
6
|
import 'react';
|
|
7
|
+
import '@flowgram.ai/form-core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-node.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-node.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { IPoint } from '@flowgram.ai/utils';\nimport type { FlowNodeJSON, FlowNodeMeta } from '@flowgram.ai/document';\n\nimport type { WorkflowNodeEntity, WorkflowPorts } from '../entities';\nimport type { WorkflowSubCanvas } from './workflow-sub-canvas';\nimport type { WorkflowEdgeJSON } from './workflow-edge';\n\n/**\n * 节点 meta 信息\n */\nexport interface WorkflowNodeMeta extends FlowNodeMeta {\n position?: IPoint;\n canvasPosition?: IPoint; // 子画布位置\n deleteDisable?: boolean; // 是否禁用删除\n copyDisable?: boolean; // 禁用复制\n inputDisable?: boolean; // 禁用输入点\n outputDisable?: boolean; // 禁用输出点\n defaultPorts?: WorkflowPorts; // 默认点位\n useDynamicPort?: boolean; // 使用动态点位,会计算 data-port-key\n subCanvas?: (node: WorkflowNodeEntity) => WorkflowSubCanvas | undefined;\n isContainer?: boolean; // 是否容器节点\n}\n\n/**\n * 节点数据\n */\nexport interface WorkflowNodeJSON extends FlowNodeJSON {\n id: string;\n type: string | number;\n /**\n * ui 数据\n */\n meta?: WorkflowNodeMeta;\n /**\n * 表单数据\n */\n\n data?: any;\n /**\n * 子节点\n */\n blocks?: WorkflowNodeJSON[];\n /**\n * 子节点间连线\n */\n edges?: WorkflowEdgeJSON[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IPoint, Event } from '@flowgram.ai/utils';
|
|
2
|
+
import { FlowNodeEntity, FlowOperationBaseService, FlowNodeEntityOrId } from '@flowgram.ai/document';
|
|
3
|
+
import { W as WorkflowJSON } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
4
|
+
import '@flowgram.ai/core';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@flowgram.ai/form-core';
|
|
7
|
+
import './workflow-edge.mjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
11
|
+
* SPDX-License-Identifier: MIT
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
interface NodePostionUpdateEvent {
|
|
15
|
+
node: FlowNodeEntity;
|
|
16
|
+
oldPosition: IPoint;
|
|
17
|
+
newPosition: IPoint;
|
|
18
|
+
}
|
|
19
|
+
interface WorkflowOperationBaseService extends FlowOperationBaseService {
|
|
20
|
+
/**
|
|
21
|
+
* 节点位置更新事件
|
|
22
|
+
*/
|
|
23
|
+
readonly onNodePostionUpdate: Event<NodePostionUpdateEvent>;
|
|
24
|
+
/**
|
|
25
|
+
* 更新节点位置
|
|
26
|
+
* @param nodeOrId
|
|
27
|
+
* @param position
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
updateNodePosition(nodeOrId: FlowNodeEntityOrId, position: IPoint): void;
|
|
31
|
+
/**
|
|
32
|
+
* 更新节点与线条
|
|
33
|
+
*/
|
|
34
|
+
fromJSON(json: WorkflowJSON): void;
|
|
35
|
+
}
|
|
36
|
+
declare const WorkflowOperationBaseService: unique symbol;
|
|
37
|
+
|
|
38
|
+
export { type NodePostionUpdateEvent, WorkflowOperationBaseService };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IPoint, Event } from '@flowgram.ai/utils';
|
|
2
|
+
import { FlowNodeEntity, FlowOperationBaseService, FlowNodeEntityOrId } from '@flowgram.ai/document';
|
|
3
|
+
import { W as WorkflowJSON } from '../workflow-node-entity-DWVtlA2a.js';
|
|
4
|
+
import '@flowgram.ai/core';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@flowgram.ai/form-core';
|
|
7
|
+
import './workflow-edge.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
11
|
+
* SPDX-License-Identifier: MIT
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
interface NodePostionUpdateEvent {
|
|
15
|
+
node: FlowNodeEntity;
|
|
16
|
+
oldPosition: IPoint;
|
|
17
|
+
newPosition: IPoint;
|
|
18
|
+
}
|
|
19
|
+
interface WorkflowOperationBaseService extends FlowOperationBaseService {
|
|
20
|
+
/**
|
|
21
|
+
* 节点位置更新事件
|
|
22
|
+
*/
|
|
23
|
+
readonly onNodePostionUpdate: Event<NodePostionUpdateEvent>;
|
|
24
|
+
/**
|
|
25
|
+
* 更新节点位置
|
|
26
|
+
* @param nodeOrId
|
|
27
|
+
* @param position
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
updateNodePosition(nodeOrId: FlowNodeEntityOrId, position: IPoint): void;
|
|
31
|
+
/**
|
|
32
|
+
* 更新节点与线条
|
|
33
|
+
*/
|
|
34
|
+
fromJSON(json: WorkflowJSON): void;
|
|
35
|
+
}
|
|
36
|
+
declare const WorkflowOperationBaseService: unique symbol;
|
|
37
|
+
|
|
38
|
+
export { type NodePostionUpdateEvent, WorkflowOperationBaseService };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/typings/workflow-operation.ts
|
|
21
|
+
var workflow_operation_exports = {};
|
|
22
|
+
__export(workflow_operation_exports, {
|
|
23
|
+
WorkflowOperationBaseService: () => WorkflowOperationBaseService
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(workflow_operation_exports);
|
|
26
|
+
var WorkflowOperationBaseService = Symbol("WorkflowOperationBaseService");
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
WorkflowOperationBaseService
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=workflow-operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-operation.ts"],"sourcesContent":["/**\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\nimport { WorkflowJSON } from './workflow-json';\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 /**\n * 更新节点与线条\n */\n fromJSON(json: WorkflowJSON): void;\n}\n\nexport const WorkflowOperationBaseService = Symbol('WorkflowOperationBaseService');\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCO,IAAM,+BAA+B,OAAO,8BAA8B;","names":[]}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { FormMeta } from '@flowgram.ai/node';
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
|
-
import {
|
|
5
|
-
import { n as WorkflowNodeMeta } from '../workflow-line-entity-BJQBRDgJ.mjs';
|
|
6
|
-
import '@flowgram.ai/utils';
|
|
4
|
+
import { t as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
7
5
|
import '@flowgram.ai/core';
|
|
8
|
-
import '
|
|
6
|
+
import '@flowgram.ai/utils';
|
|
9
7
|
import 'react';
|
|
8
|
+
import './workflow-edge.mjs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
12
|
+
* SPDX-License-Identifier: MIT
|
|
13
|
+
*/
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
16
|
* 节点表单引擎配置
|
|
@@ -17,6 +21,7 @@ type WorkflowNodeFormMeta = FormMetaOrFormMetaGenerator | FormMeta;
|
|
|
17
21
|
*/
|
|
18
22
|
interface WorkflowNodeRegistry extends FlowNodeRegistry<WorkflowNodeMeta> {
|
|
19
23
|
formMeta?: WorkflowNodeFormMeta;
|
|
24
|
+
canAddLine?: (fromPort: WorkflowPortEntity, toPort: WorkflowPortEntity, lines: WorkflowLinesManager, silent?: boolean) => boolean;
|
|
20
25
|
}
|
|
21
26
|
interface WorkflowNodeRenderProps {
|
|
22
27
|
node: WorkflowNodeEntity;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { FormMeta } from '@flowgram.ai/node';
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
|
-
import {
|
|
5
|
-
import { n as WorkflowNodeMeta } from '../workflow-line-entity-CEitdjhk.js';
|
|
6
|
-
import '@flowgram.ai/utils';
|
|
4
|
+
import { t as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-DWVtlA2a.js';
|
|
7
5
|
import '@flowgram.ai/core';
|
|
8
|
-
import '
|
|
6
|
+
import '@flowgram.ai/utils';
|
|
9
7
|
import 'react';
|
|
8
|
+
import './workflow-edge.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
12
|
+
* SPDX-License-Identifier: MIT
|
|
13
|
+
*/
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
16
|
* 节点表单引擎配置
|
|
@@ -17,6 +21,7 @@ type WorkflowNodeFormMeta = FormMetaOrFormMetaGenerator | FormMeta;
|
|
|
17
21
|
*/
|
|
18
22
|
interface WorkflowNodeRegistry extends FlowNodeRegistry<WorkflowNodeMeta> {
|
|
19
23
|
formMeta?: WorkflowNodeFormMeta;
|
|
24
|
+
canAddLine?: (fromPort: WorkflowPortEntity, toPort: WorkflowPortEntity, lines: WorkflowLinesManager, silent?: boolean) => boolean;
|
|
20
25
|
}
|
|
21
26
|
interface WorkflowNodeRenderProps {
|
|
22
27
|
node: WorkflowNodeEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-registry.ts"],"sourcesContent":["
|
|
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":[]}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as WorkflowSubCanvas } from '../workflow-node-entity-DH5qlw7I.mjs';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
|
+
import '@flowgram.ai/core';
|
|
4
|
+
import '@flowgram.ai/utils';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@flowgram.ai/form-core';
|
|
7
|
+
import './workflow-edge.mjs';
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as WorkflowSubCanvas } from '../workflow-node-entity-DWVtlA2a.js';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
|
+
import '@flowgram.ai/core';
|
|
4
|
+
import '@flowgram.ai/utils';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@flowgram.ai/form-core';
|
|
7
|
+
import './workflow-edge.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-sub-canvas.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-sub-canvas.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { WorkflowNodeEntity } from '../entities';\n\n/**\n * 子画布配置\n */\nexport type WorkflowSubCanvas = {\n isCanvas: boolean; // 是否画布节点\n parentNode: WorkflowNodeEntity; // 父节点\n canvasNode: WorkflowNodeEntity; // 画布节点\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|