@logicflow/extension 2.1.4 → 2.1.6
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +23 -0
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/bpmn-adapter/index.d.ts +84 -1
- package/es/bpmn-adapter/index.js +235 -12
- package/es/bpmn-adapter/json2xml.d.ts +10 -1
- package/es/bpmn-adapter/json2xml.js +28 -4
- package/es/bpmn-adapter/xml2json.js +2 -7
- package/es/components/mini-map/index.js +9 -7
- package/es/components/selection-select/index.d.ts +1 -0
- package/es/components/selection-select/index.js +11 -5
- package/es/tools/proximity-connect/index.d.ts +8 -0
- package/es/tools/proximity-connect/index.js +9 -4
- package/es/tools/snapshot/index.d.ts +8 -0
- package/es/tools/snapshot/index.js +2 -2
- package/lib/bpmn-adapter/index.d.ts +84 -1
- package/lib/bpmn-adapter/index.js +235 -12
- package/lib/bpmn-adapter/json2xml.d.ts +10 -1
- package/lib/bpmn-adapter/json2xml.js +29 -4
- package/lib/bpmn-adapter/xml2json.js +2 -7
- package/lib/components/mini-map/index.js +9 -7
- package/lib/components/selection-select/index.d.ts +1 -0
- package/lib/components/selection-select/index.js +11 -5
- package/lib/tools/proximity-connect/index.d.ts +8 -0
- package/lib/tools/proximity-connect/index.js +9 -4
- package/lib/tools/snapshot/index.d.ts +8 -0
- package/lib/tools/snapshot/index.js +2 -2
- package/package.json +5 -5
- package/src/bpmn-adapter/index.ts +256 -17
- package/src/bpmn-adapter/json2xml.ts +30 -4
- package/src/bpmn-adapter/xml2json.ts +2 -7
- package/src/components/mini-map/index.ts +11 -11
- package/src/components/selection-select/index.ts +11 -8
- package/src/tools/proximity-connect/index.ts +14 -4
- package/src/tools/snapshot/index.ts +10 -2
- package/stats.html +1 -1
|
@@ -9,7 +9,6 @@ var __values = (this && this.__values) || function(o) {
|
|
|
9
9
|
};
|
|
10
10
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
11
11
|
};
|
|
12
|
-
import { createTeleportContainer, destroyTeleportContainer, } from '@logicflow/vue-node-registry';
|
|
13
12
|
var MiniMap = /** @class */ (function () {
|
|
14
13
|
function MiniMap(_a) {
|
|
15
14
|
var lf = _a.lf, LogicFlow = _a.LogicFlow, options = _a.options;
|
|
@@ -95,8 +94,10 @@ var MiniMap = /** @class */ (function () {
|
|
|
95
94
|
*/
|
|
96
95
|
this.show = function (left, top) {
|
|
97
96
|
if (!_this.isShow) {
|
|
97
|
+
_this.initMiniMap();
|
|
98
|
+
_this.lf.on('graph:resize', _this.onGraphResize);
|
|
98
99
|
_this.createMiniMap(left, top);
|
|
99
|
-
_this.setView();
|
|
100
|
+
_this.setView(true);
|
|
100
101
|
}
|
|
101
102
|
_this.isShow = true;
|
|
102
103
|
};
|
|
@@ -105,6 +106,11 @@ var MiniMap = /** @class */ (function () {
|
|
|
105
106
|
*/
|
|
106
107
|
this.hide = function () {
|
|
107
108
|
if (_this.isShow) {
|
|
109
|
+
_this.lf.off('graph:resize', _this.onGraphResize);
|
|
110
|
+
_this.lfMap.destroy();
|
|
111
|
+
// 保证重新创建实例时,小地图中内容偏移正确
|
|
112
|
+
_this.translateX = 0;
|
|
113
|
+
_this.translateY = 0;
|
|
108
114
|
_this.removeMiniMap();
|
|
109
115
|
_this.lf.emit('miniMap:close', {});
|
|
110
116
|
}
|
|
@@ -233,8 +239,6 @@ var MiniMap = /** @class */ (function () {
|
|
|
233
239
|
this.bounds = boundsInit;
|
|
234
240
|
this.elementAreaBounds = boundsInit;
|
|
235
241
|
this.viewPortBounds = boundsInit;
|
|
236
|
-
this.initMiniMap();
|
|
237
|
-
lf.on('graph:resize', this.onGraphResize);
|
|
238
242
|
}
|
|
239
243
|
/**
|
|
240
244
|
* 初始化小地图的配置
|
|
@@ -272,12 +276,11 @@ var MiniMap = /** @class */ (function () {
|
|
|
272
276
|
history: false,
|
|
273
277
|
snapline: false,
|
|
274
278
|
disabledPlugins: this.disabledPlugins,
|
|
279
|
+
isMiniMap: true,
|
|
275
280
|
});
|
|
276
281
|
// minimap中禁用adapter。
|
|
277
282
|
// this.lfMap.adapterIn = (a) => a
|
|
278
283
|
// this.lfMap.adapterOut = (a) => a
|
|
279
|
-
// 创建teleport容器(vue3中生效)
|
|
280
|
-
createTeleportContainer(miniMapWrap, this.lfMap.graphModel.flowId);
|
|
281
284
|
this.miniMapWrap = miniMapWrap;
|
|
282
285
|
this.createViewPort();
|
|
283
286
|
miniMapWrap.addEventListener('click', this.mapClick);
|
|
@@ -519,7 +522,6 @@ var MiniMap = /** @class */ (function () {
|
|
|
519
522
|
this.viewport = div;
|
|
520
523
|
};
|
|
521
524
|
MiniMap.prototype.destroy = function () {
|
|
522
|
-
destroyTeleportContainer(this.lfMap.graphModel.flowId);
|
|
523
525
|
this.lf.off('graph:resize', this.onGraphResize);
|
|
524
526
|
};
|
|
525
527
|
MiniMap.pluginName = 'miniMap';
|
|
@@ -32,6 +32,7 @@ var SelectionSelect = /** @class */ (function () {
|
|
|
32
32
|
this.disabled = true;
|
|
33
33
|
this.isWholeNode = true;
|
|
34
34
|
this.isWholeEdge = true;
|
|
35
|
+
this.originStatusSaved = false;
|
|
35
36
|
this.exclusiveMode = false; // 框选独占模式:true 表示只能进行框选操作,false 表示可以同时进行其他画布操作
|
|
36
37
|
// 用于区分选区和点击事件
|
|
37
38
|
this.mouseDownInfo = null;
|
|
@@ -73,6 +74,11 @@ var SelectionSelect = /** @class */ (function () {
|
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
76
|
this.drawOff = function (e) {
|
|
77
|
+
// 恢复原始的 stopMoveGraph 设置
|
|
78
|
+
_this.lf.updateEditConfig({
|
|
79
|
+
stopMoveGraph: _this.originalStopMoveGraph,
|
|
80
|
+
});
|
|
81
|
+
_this.originStatusSaved = false;
|
|
76
82
|
// 处理鼠标抬起事件
|
|
77
83
|
// 首先判断是否是点击,如果是,则清空框选
|
|
78
84
|
if (_this.mouseDownInfo) {
|
|
@@ -92,10 +98,6 @@ var SelectionSelect = /** @class */ (function () {
|
|
|
92
98
|
if (!_this.exclusiveMode) {
|
|
93
99
|
document.removeEventListener('mouseup', _this.drawOff);
|
|
94
100
|
}
|
|
95
|
-
// 恢复原始的 stopMoveGraph 设置
|
|
96
|
-
_this.lf.updateEditConfig({
|
|
97
|
-
stopMoveGraph: _this.originalStopMoveGraph,
|
|
98
|
-
});
|
|
99
101
|
if (curStartPoint && curEndPoint) {
|
|
100
102
|
var x = curStartPoint.x, y = curStartPoint.y;
|
|
101
103
|
var x1 = curEndPoint.x, y1 = curEndPoint.y;
|
|
@@ -270,7 +272,11 @@ var SelectionSelect = /** @class */ (function () {
|
|
|
270
272
|
time: Date.now(),
|
|
271
273
|
};
|
|
272
274
|
// 记录原始设置并临时禁止画布移动
|
|
273
|
-
|
|
275
|
+
if (!this.originStatusSaved) {
|
|
276
|
+
// 为了防止在开启框选时用户多次点击画布导致缓存的stopMoveGraph变化,所以只在第一次点击时记录原始的stopMoveGraph issue #2263
|
|
277
|
+
this.originalStopMoveGraph = this.lf.getEditConfig().stopMoveGraph;
|
|
278
|
+
this.originStatusSaved = true;
|
|
279
|
+
}
|
|
274
280
|
this.lf.updateEditConfig({
|
|
275
281
|
stopMoveGraph: true,
|
|
276
282
|
});
|
|
@@ -6,10 +6,18 @@ export type ProximityConnectProps = {
|
|
|
6
6
|
distance: number;
|
|
7
7
|
reverseDirection: boolean;
|
|
8
8
|
virtualEdgeStyle: Record<string, unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* proximityConnect 类型:
|
|
11
|
+
* - 'node': 节点-节点连接
|
|
12
|
+
* - 'anchor': 锚点-锚点连接
|
|
13
|
+
* - 'default': 节点-锚点连接
|
|
14
|
+
*/
|
|
15
|
+
type: 'node' | 'anchor' | 'default';
|
|
9
16
|
};
|
|
10
17
|
export declare class ProximityConnect {
|
|
11
18
|
static pluginName: string;
|
|
12
19
|
enable: boolean;
|
|
20
|
+
type: 'node' | 'anchor' | 'default';
|
|
13
21
|
lf: LogicFlow;
|
|
14
22
|
closestNode?: BaseNodeModel;
|
|
15
23
|
currentDistance: number;
|
|
@@ -15,6 +15,7 @@ var ProximityConnect = /** @class */ (function () {
|
|
|
15
15
|
function ProximityConnect(_a) {
|
|
16
16
|
var lf = _a.lf, options = _a.options;
|
|
17
17
|
this.enable = true;
|
|
18
|
+
this.type = 'default';
|
|
18
19
|
this.currentDistance = Infinity; // 当前间距
|
|
19
20
|
this.thresholdDistance = 100; // 节点-节点连接距离阈值
|
|
20
21
|
this.reverseDirection = false; // 节点-节点连线方向,默认是拖拽节点连向最近节点
|
|
@@ -34,6 +35,8 @@ var ProximityConnect = /** @class */ (function () {
|
|
|
34
35
|
// 节点开始拖拽事件
|
|
35
36
|
this.lf.graphModel.eventCenter.on('node:dragstart', function (_a) {
|
|
36
37
|
var data = _a.data;
|
|
38
|
+
if (_this.type === 'anchor')
|
|
39
|
+
return;
|
|
37
40
|
if (!_this.enable)
|
|
38
41
|
return;
|
|
39
42
|
var graphModel = _this.lf.graphModel;
|
|
@@ -42,12 +45,14 @@ var ProximityConnect = /** @class */ (function () {
|
|
|
42
45
|
});
|
|
43
46
|
// 节点拖拽事件
|
|
44
47
|
this.lf.graphModel.eventCenter.on('node:drag', function () {
|
|
48
|
+
if (_this.type === 'anchor')
|
|
49
|
+
return;
|
|
45
50
|
_this.handleNodeDrag();
|
|
46
51
|
});
|
|
47
52
|
// 锚点开始拖拽事件
|
|
48
53
|
this.lf.graphModel.eventCenter.on('anchor:dragstart', function (_a) {
|
|
49
54
|
var data = _a.data, nodeModel = _a.nodeModel;
|
|
50
|
-
if (!_this.enable)
|
|
55
|
+
if (!_this.enable || _this.type === 'node')
|
|
51
56
|
return;
|
|
52
57
|
_this.currentNode = nodeModel;
|
|
53
58
|
_this.currentAnchor = data;
|
|
@@ -55,20 +60,20 @@ var ProximityConnect = /** @class */ (function () {
|
|
|
55
60
|
// 锚点拖拽事件
|
|
56
61
|
this.lf.graphModel.eventCenter.on('anchor:drag', function (_a) {
|
|
57
62
|
var _b = _a.e, clientX = _b.clientX, clientY = _b.clientY;
|
|
58
|
-
if (!_this.enable)
|
|
63
|
+
if (!_this.enable || _this.type === 'node')
|
|
59
64
|
return;
|
|
60
65
|
_this.handleAnchorDrag(clientX, clientY);
|
|
61
66
|
});
|
|
62
67
|
// 节点、锚点拖拽结束事件
|
|
63
68
|
this.lf.graphModel.eventCenter.on('node:drop', function () {
|
|
64
|
-
if (!_this.enable)
|
|
69
|
+
if (!_this.enable || _this.type === 'anchor')
|
|
65
70
|
return;
|
|
66
71
|
_this.handleDrop();
|
|
67
72
|
});
|
|
68
73
|
// 锚点拖拽需要单独判断一下当前拖拽终点是否在某个锚点上,如果是,就不触发插件的连线,以免出现创建了两条连线的问题,表现见 issue 2140
|
|
69
74
|
this.lf.graphModel.eventCenter.on('anchor:dragend', function (_a) {
|
|
70
75
|
var e = _a.e, edgeModel = _a.edgeModel;
|
|
71
|
-
if (!_this.enable)
|
|
76
|
+
if (!_this.enable || _this.type === 'node')
|
|
72
77
|
return;
|
|
73
78
|
var _b = _this.lf.graphModel.getPointByClient({
|
|
74
79
|
x: e.clientX,
|
|
@@ -32,6 +32,14 @@ export type ToImageOptions = {
|
|
|
32
32
|
* - `true`:只导出画面区域内的可见元素
|
|
33
33
|
*/
|
|
34
34
|
partial?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 导出图片时的安全系数,用于确保导出的图片能够容纳所有元素,默认值为 1.1
|
|
37
|
+
*/
|
|
38
|
+
safetyFactor?: number;
|
|
39
|
+
/**
|
|
40
|
+
* 导出图片时的安全边距,用于确保导出的图片能够容纳所有元素,默认值为 40
|
|
41
|
+
*/
|
|
42
|
+
safetyMargin?: number;
|
|
35
43
|
};
|
|
36
44
|
export type SnapshotResponse = {
|
|
37
45
|
data: Blob | string;
|
|
@@ -404,7 +404,7 @@ var Snapshot = /** @class */ (function () {
|
|
|
404
404
|
graphModel = this.lf.graphModel;
|
|
405
405
|
transformModel = graphModel.transformModel;
|
|
406
406
|
SCALE_X = transformModel.SCALE_X, SCALE_Y = transformModel.SCALE_Y, TRANSLATE_X = transformModel.TRANSLATE_X, TRANSLATE_Y = transformModel.TRANSLATE_Y;
|
|
407
|
-
safetyFactor = 1.1 // 安全系数,增加
|
|
407
|
+
safetyFactor = toImageOptions.safetyFactor || 1.1 // 安全系数,增加10%的空间
|
|
408
408
|
;
|
|
409
409
|
actualWidth = (bbox.width / SCALE_X) * safetyFactor;
|
|
410
410
|
actualHeight = (bbox.height / SCALE_Y) * safetyFactor;
|
|
@@ -413,7 +413,7 @@ var Snapshot = /** @class */ (function () {
|
|
|
413
413
|
canvas = document.createElement('canvas');
|
|
414
414
|
canvas.style.width = "".concat(bboxWidth, "px");
|
|
415
415
|
canvas.style.height = "".concat(bboxHeight, "px");
|
|
416
|
-
safetyMargin = 40 // 额外的安全边距
|
|
416
|
+
safetyMargin = toImageOptions.safetyMargin || 40 // 额外的安全边距
|
|
417
417
|
;
|
|
418
418
|
_b = this.getCanvasDimensionsByBrowser(), maxCanvasDimension = _b.maxCanvasDimension, otherMaxCanvasDimension = _b.otherMaxCanvasDimension;
|
|
419
419
|
MAX_CANVAS_DIMENSION = maxCanvasDimension;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LogicFlow 节点配置(导入/导出过程中使用的中间结构)
|
|
3
|
+
* - id/type/x/y:节点基本信息
|
|
4
|
+
* - text:节点文本的中心坐标与内容(值为未转义的原始字符串)
|
|
5
|
+
* - properties:节点的额外属性(会保留到 BPMN 的扩展字段)
|
|
6
|
+
*/
|
|
1
7
|
type NodeConfig = {
|
|
2
8
|
id: string;
|
|
3
9
|
properties?: Record<string, unknown>;
|
|
@@ -10,10 +16,20 @@ type NodeConfig = {
|
|
|
10
16
|
x: number;
|
|
11
17
|
y: number;
|
|
12
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* 点坐标结构(用于边的路径点)
|
|
21
|
+
*/
|
|
13
22
|
type Point = {
|
|
14
23
|
x: number;
|
|
15
24
|
y: number;
|
|
16
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* LogicFlow 边配置(导入/导出过程中使用的中间结构)
|
|
28
|
+
* - id/type/sourceNodeId/targetNodeId:边的基本信息
|
|
29
|
+
* - pointsList:边的路径点(用于 BPMN 的 di:waypoint)
|
|
30
|
+
* - text:边文本的位置与内容(值为未转义的原始字符串)
|
|
31
|
+
* - properties:边的扩展属性
|
|
32
|
+
*/
|
|
17
33
|
type EdgeConfig = {
|
|
18
34
|
id: string;
|
|
19
35
|
sourceNodeId: string;
|
|
@@ -35,11 +51,29 @@ type EdgeConfig = {
|
|
|
35
51
|
pointsList?: Point[];
|
|
36
52
|
properties: Record<string, unknown>;
|
|
37
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* 将普通 JSON 转换为 XML 风格 JSON(xmlJson)
|
|
56
|
+
* 输入:任意 JSON 对象;可选的保留属性字段 retainedFields
|
|
57
|
+
* 输出:遵循 XML 属性前缀约定的 xmlJson(属性键以 '-' 开头)
|
|
58
|
+
* 规则:
|
|
59
|
+
* - 原始字符串直接返回;数组逐项转换;对象根据键类型决定是否加 '-' 前缀。
|
|
60
|
+
* - 保留字段(fields)中出现的键以属性形式(带 '-')保留,否则视为子节点。
|
|
61
|
+
*/
|
|
38
62
|
declare function toXmlJson(retainedFields?: string[]): (json: string | any[] | Record<string, any>) => any;
|
|
39
63
|
/**
|
|
40
|
-
* 将xmlJson
|
|
64
|
+
* 将 XML 风格 JSON(xmlJson)转换回普通 JSON(内部使用)
|
|
65
|
+
* 输入:遵循 '-' 属性前缀约定的 xmlJson
|
|
66
|
+
* 输出:去除前缀并恢复原有结构的普通 JSON
|
|
41
67
|
*/
|
|
42
68
|
declare function toNormalJson(xmlJson: any): {};
|
|
69
|
+
/**
|
|
70
|
+
* BpmnAdapter:基础适配器
|
|
71
|
+
*
|
|
72
|
+
* 作用:在 LogicFlow 数据与 BPMN JSON 之间进行转换,并注入 adapterIn/adapterOut 钩子。
|
|
73
|
+
* - processAttributes:导出时 BPMN process 的基础属性(可配置 isExecutable、id 等)。
|
|
74
|
+
* - definitionAttributes:导出时 BPMN definitions 的基础属性与命名空间声明。
|
|
75
|
+
* - shapeConfigMap:不同 BPMN 元素类型的默认宽高,用于坐标/Bounds 计算。
|
|
76
|
+
*/
|
|
43
77
|
declare class BpmnAdapter {
|
|
44
78
|
static pluginName: string;
|
|
45
79
|
static shapeConfigMap: Map<any, any>;
|
|
@@ -59,6 +93,11 @@ declare class BpmnAdapter {
|
|
|
59
93
|
['-exporterVersion']: string;
|
|
60
94
|
[key: string]: any;
|
|
61
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* 构造函数
|
|
98
|
+
* - 注入 LogicFlow 的 adapterIn/adapterOut(处理 JSON 方向的适配)
|
|
99
|
+
* - 初始化 process 与 definitions 的基础属性
|
|
100
|
+
*/
|
|
62
101
|
constructor({ lf }: {
|
|
63
102
|
lf: any;
|
|
64
103
|
});
|
|
@@ -68,6 +107,13 @@ declare class BpmnAdapter {
|
|
|
68
107
|
* ["properties", "startPoint", "endPoint", "pointsList"]合并,
|
|
69
108
|
* 这意味着出现在这个数组里的字段当它的值是数组或是对象时不会被视为一个节点而是一个属性。
|
|
70
109
|
*/
|
|
110
|
+
/**
|
|
111
|
+
* adapterOut:将 LogicFlow 图数据转换为 BPMN JSON
|
|
112
|
+
* 输入:
|
|
113
|
+
* - data:LogicFlow GraphData
|
|
114
|
+
* - retainedFields:扩展属性保留字段
|
|
115
|
+
* 输出:BPMN JSON(包含 definitions/process/diagram/plane)
|
|
116
|
+
*/
|
|
71
117
|
adapterOut: (data: any, retainedFields?: string[]) => {
|
|
72
118
|
'bpmn:definitions': {
|
|
73
119
|
[key: string]: any;
|
|
@@ -82,18 +128,55 @@ declare class BpmnAdapter {
|
|
|
82
128
|
"-exporterVersion": string;
|
|
83
129
|
};
|
|
84
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* adapterIn:将 BPMN JSON 转换为 LogicFlow 图数据
|
|
133
|
+
* 输入:bpmnData:BPMN JSON
|
|
134
|
+
* 输出:GraphConfigData(nodes/edges)
|
|
135
|
+
*/
|
|
85
136
|
adapterIn: (bpmnData: any) => {
|
|
86
137
|
nodes: NodeConfig[];
|
|
87
138
|
edges: EdgeConfig[];
|
|
88
139
|
} | undefined;
|
|
89
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* BpmnXmlAdapter:XML 适配器(继承 BpmnAdapter)
|
|
143
|
+
*
|
|
144
|
+
* 作用:处理 XML 输入/输出的适配,使用 xml2json/json2xml 完成格式转换。
|
|
145
|
+
* 特殊处理:在 XML 导入前对 name 属性的非法字符进行预处理转义,提升容错。
|
|
146
|
+
*/
|
|
90
147
|
declare class BpmnXmlAdapter extends BpmnAdapter {
|
|
91
148
|
static pluginName: string;
|
|
149
|
+
/**
|
|
150
|
+
* 构造函数
|
|
151
|
+
* - 覆盖 LogicFlow 的 adapterIn/adapterOut,使其面向 XML 输入与输出。
|
|
152
|
+
*/
|
|
92
153
|
constructor(data: any);
|
|
154
|
+
/**
|
|
155
|
+
* 预处理 XML:仅对 name 属性值进行非法字符转义(<, >, &),避免 DOM 解析失败。
|
|
156
|
+
* 注意:不影响已合法的实体(如 &),仅在属性值中生效,不修改其它内容。
|
|
157
|
+
*/
|
|
158
|
+
private sanitizeNameAttributes;
|
|
159
|
+
/**
|
|
160
|
+
* adapterXmlIn:将 BPMN XML 转换为 LogicFlow 图数据
|
|
161
|
+
* 输入:bpmnData:XML 字符串或对象
|
|
162
|
+
* 步骤:
|
|
163
|
+
* 1) 若为字符串,先对 name 属性进行预处理转义;
|
|
164
|
+
* 2) 使用 lfXml2Json 转换为 BPMN JSON;
|
|
165
|
+
* 3) 调用基础 adapterIn 转换为 GraphData。
|
|
166
|
+
*/
|
|
93
167
|
adapterXmlIn: (bpmnData: any) => {
|
|
94
168
|
nodes: NodeConfig[];
|
|
95
169
|
edges: EdgeConfig[];
|
|
96
170
|
} | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* adapterXmlOut:将 LogicFlow 图数据转换为 BPMN XML
|
|
173
|
+
* 输入:
|
|
174
|
+
* - data:GraphData
|
|
175
|
+
* - retainedFields:保留属性字段
|
|
176
|
+
* 步骤:
|
|
177
|
+
* 1) 调用基础 adapterOut 生成 BPMN JSON;
|
|
178
|
+
* 2) 使用 lfJson2Xml 转为合法的 XML 字符串(包含属性与文本的转义)。
|
|
179
|
+
*/
|
|
97
180
|
adapterXmlOut: (data: any, retainedFields?: string[]) => string;
|
|
98
181
|
}
|
|
99
182
|
export { BpmnAdapter, BpmnXmlAdapter, toXmlJson, toNormalJson };
|