@logicflow/extension 1.1.13 → 1.2.0-alpha.2
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/cjs/NodeResize/Control/Control.js +8 -8
- package/cjs/NodeResize/Control/Util.js +11 -11
- package/cjs/bpmn-adapter/index.js +124 -76
- package/cjs/bpmn-adapter/json2xml.js +5 -2
- package/cjs/bpmn-adapter/xml2json.js +38 -284
- package/cjs/components/context-menu/index.js +2 -2
- package/cjs/components/control/index.js +13 -13
- package/cjs/components/menu/index.js +32 -32
- package/cjs/components/mini-map/index.js +2 -2
- package/cjs/components/selection-select/index.js +5 -5
- package/cjs/index.js +1 -0
- package/cjs/insert-node-in-polyline/edge.js +4 -4
- package/cjs/insert-node-in-polyline/index.js +1 -1
- package/cjs/locale/en-locale/en.js +22 -0
- package/cjs/locale/en-locale/index.js +29 -0
- package/cjs/locale/locale.js +19 -0
- package/cjs/materials/group/GroupNode.js +2 -2
- package/cjs/materials/group/index.js +3 -3
- package/cjs/tools/auto-layout/index.js +9 -9
- package/cjs/turbo-adapter/index.js +2 -2
- package/es/NodeResize/Control/Control.d.ts +1 -1
- package/es/NodeResize/Control/Control.js +9 -9
- package/es/NodeResize/Control/Util.d.ts +3 -3
- package/es/NodeResize/Control/Util.js +7 -7
- package/es/bpmn-adapter/index.d.ts +41 -33
- package/es/bpmn-adapter/index.js +124 -76
- package/es/bpmn-adapter/json2xml.js +5 -2
- package/es/bpmn-adapter/xml2json.js +38 -284
- package/es/components/context-menu/index.js +2 -2
- package/es/components/control/index.d.ts +2 -3
- package/es/components/control/index.js +13 -13
- package/es/components/menu/index.d.ts +2 -3
- package/es/components/menu/index.js +32 -32
- package/es/components/mini-map/index.js +2 -2
- package/es/components/selection-select/index.d.ts +1 -1
- package/es/components/selection-select/index.js +5 -5
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/insert-node-in-polyline/edge.d.ts +3 -3
- package/es/insert-node-in-polyline/edge.js +3 -3
- package/es/insert-node-in-polyline/index.js +2 -2
- package/es/locale/en-locale/en.d.ts +19 -0
- package/es/locale/en-locale/en.js +19 -0
- package/es/locale/en-locale/index.d.ts +9 -0
- package/es/locale/en-locale/index.js +26 -0
- package/es/locale/locale.d.ts +6 -0
- package/es/locale/locale.js +16 -0
- package/es/materials/group/GroupNode.d.ts +1 -1
- package/es/materials/group/GroupNode.js +2 -2
- package/es/materials/group/index.d.ts +1 -1
- package/es/materials/group/index.js +3 -3
- package/es/tools/auto-layout/index.d.ts +2 -2
- package/es/tools/auto-layout/index.js +9 -9
- package/es/turbo-adapter/index.js +2 -2
- package/lib/AutoLayout.js +1 -1
- package/lib/BpmnAdapter.js +1 -1
- package/lib/BpmnElement.js +1 -1
- package/lib/ContextMenu.js +1 -1
- package/lib/Control.js +1 -1
- package/lib/CurvedEdge.js +1 -1
- package/lib/DndPanel.js +1 -1
- package/lib/EnLocale.js +1 -0
- package/lib/FlowPath.js +1 -1
- package/lib/Group.js +1 -1
- package/lib/InsertNodeInPolyline.js +1 -1
- package/lib/Menu.js +1 -1
- package/lib/MiniMap.js +1 -1
- package/lib/NodeResize.js +1 -1
- package/lib/RectLabelNode.js +1 -1
- package/lib/SelectionSelect.js +1 -1
- package/lib/Snapshot.js +1 -1
- package/lib/TurboAdapter.js +1 -1
- package/lib/lfJson2Xml.js +1 -1
- package/lib/lfXml2Json.js +1 -1
- package/package.json +2 -2
- package/types/NodeResize/Control/Control.d.ts +1 -1
- package/types/NodeResize/Control/Util.d.ts +3 -3
- package/types/bpmn-adapter/index.d.ts +41 -33
- package/types/components/control/index.d.ts +2 -3
- package/types/components/menu/index.d.ts +2 -3
- package/types/components/selection-select/index.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/insert-node-in-polyline/edge.d.ts +3 -3
- package/types/locale/en-locale/en.d.ts +19 -0
- package/types/locale/en-locale/index.d.ts +9 -0
- package/types/locale/locale.d.ts +6 -0
- package/types/materials/group/GroupNode.d.ts +1 -1
- package/types/materials/group/index.d.ts +1 -1
- package/types/tools/auto-layout/index.d.ts +2 -2
|
@@ -1,45 +1,53 @@
|
|
|
1
|
-
declare
|
|
2
|
-
pluginName: string;
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
declare class BpmnAdapter {
|
|
2
|
+
static pluginName: string;
|
|
3
|
+
static shapeConfigMap: Map<any, any>;
|
|
4
|
+
processAttributes: {
|
|
5
|
+
['-isExecutable']: string;
|
|
6
|
+
['-id']: string;
|
|
7
|
+
};
|
|
8
|
+
definitionAttributes: {
|
|
9
|
+
['-id']: string;
|
|
10
|
+
['-xmlns:xsi']: string;
|
|
11
|
+
['-xmlns:bpmn']: string;
|
|
12
|
+
['-xmlns:bpmndi']: string;
|
|
13
|
+
['-xmlns:dc']: string;
|
|
14
|
+
['-xmlns:di']: string;
|
|
15
|
+
['-targetNamespace']: string;
|
|
16
|
+
['-exporter']: string;
|
|
17
|
+
['-exporterVersion']: string;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
constructor({ lf }: {
|
|
21
|
+
lf: any;
|
|
22
|
+
});
|
|
5
23
|
setCustomShape(key: any, val: any): void;
|
|
6
|
-
adapterOut(data: any)
|
|
24
|
+
adapterOut: (data: any) => {
|
|
7
25
|
'bpmn:definitions': {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'-id': string;
|
|
19
|
-
'-isExecutable': string;
|
|
20
|
-
};
|
|
21
|
-
'bpmndi:BPMNDiagram': {
|
|
22
|
-
'-id': string;
|
|
23
|
-
'bpmndi:BPMNPlane': {
|
|
24
|
-
'-id': string;
|
|
25
|
-
'-bpmnElement': string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
"-id": string;
|
|
28
|
+
"-xmlns:xsi": string;
|
|
29
|
+
"-xmlns:bpmn": string;
|
|
30
|
+
"-xmlns:bpmndi": string;
|
|
31
|
+
"-xmlns:dc": string;
|
|
32
|
+
"-xmlns:di": string;
|
|
33
|
+
"-targetNamespace": string;
|
|
34
|
+
"-exporter": string;
|
|
35
|
+
"-exporterVersion": string;
|
|
28
36
|
};
|
|
29
37
|
};
|
|
30
|
-
adapterIn(bpmnData: any)
|
|
38
|
+
adapterIn: (bpmnData: any) => {
|
|
31
39
|
nodes: any[];
|
|
32
40
|
edges: any[];
|
|
33
41
|
};
|
|
34
|
-
}
|
|
35
|
-
declare
|
|
36
|
-
pluginName: string;
|
|
37
|
-
|
|
38
|
-
adapterXmlIn(bpmnData: any)
|
|
42
|
+
}
|
|
43
|
+
declare class BpmnXmlAdapter extends BpmnAdapter {
|
|
44
|
+
static pluginName: string;
|
|
45
|
+
constructor(data: any);
|
|
46
|
+
adapterXmlIn: (bpmnData: any) => {
|
|
39
47
|
nodes: any[];
|
|
40
48
|
edges: any[];
|
|
41
49
|
};
|
|
42
|
-
adapterXmlOut(data: any)
|
|
43
|
-
}
|
|
50
|
+
adapterXmlOut: (data: any) => string;
|
|
51
|
+
}
|
|
44
52
|
export { BpmnAdapter, BpmnXmlAdapter, };
|
|
45
53
|
export default BpmnAdapter;
|
|
@@ -9,13 +9,12 @@ declare type ControlItem = {
|
|
|
9
9
|
};
|
|
10
10
|
declare class Control {
|
|
11
11
|
private lf;
|
|
12
|
+
private LogicFlow;
|
|
12
13
|
static pluginName: string;
|
|
13
14
|
private controlItems;
|
|
14
15
|
private domContainer;
|
|
15
16
|
private toolEl;
|
|
16
|
-
constructor(
|
|
17
|
-
lf: any;
|
|
18
|
-
});
|
|
17
|
+
constructor(args: any);
|
|
19
18
|
render(lf: any, domContainer: any): void;
|
|
20
19
|
destroy(): void;
|
|
21
20
|
addItem(item: any): void;
|
|
@@ -13,14 +13,13 @@ export declare type MenuConfig = {
|
|
|
13
13
|
};
|
|
14
14
|
declare class Menu {
|
|
15
15
|
lf: LogicFlow;
|
|
16
|
+
LogicFlow: any;
|
|
16
17
|
private __container;
|
|
17
18
|
private __menuDOM;
|
|
18
19
|
private menuTypeMap;
|
|
19
20
|
private __currentData;
|
|
20
21
|
static pluginName: string;
|
|
21
|
-
constructor(
|
|
22
|
-
lf: any;
|
|
23
|
-
});
|
|
22
|
+
constructor(args: any);
|
|
24
23
|
/**
|
|
25
24
|
* 初始化设置默认内置菜单栏
|
|
26
25
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Point, PolylineEdgeModel, BaseNodeModel } from '@logicflow/core';
|
|
2
2
|
export declare const isInSegment: (point: any, start: any, end: any) => boolean;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const crossPointInSegment: (node: BaseNodeModel, start: Point, end: Point) => {
|
|
4
4
|
startCrossPoint: {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
@@ -10,12 +10,12 @@ export declare const corssPointInSegement: (node: BaseNodeModel, start: Point, e
|
|
|
10
10
|
y: number;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
interface
|
|
13
|
+
interface SegmentCross {
|
|
14
14
|
crossIndex: number;
|
|
15
15
|
crossPoints: {
|
|
16
16
|
startCrossPoint: Point;
|
|
17
17
|
endCrossPoint: Point;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const isNodeInSegment: (node: BaseNodeModel, polyline: PolylineEdgeModel) => SegmentCross;
|
|
21
21
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const en: {
|
|
2
|
+
文本: string;
|
|
3
|
+
开始: string;
|
|
4
|
+
缩小流程图: string;
|
|
5
|
+
缩小: string;
|
|
6
|
+
放大流程图: string;
|
|
7
|
+
放大: string;
|
|
8
|
+
恢复流程原有尺寸: string;
|
|
9
|
+
适应: string;
|
|
10
|
+
回到上一步: string;
|
|
11
|
+
上一步: string;
|
|
12
|
+
移到下一步: string;
|
|
13
|
+
下一步: string;
|
|
14
|
+
删除: string;
|
|
15
|
+
编辑文本: string;
|
|
16
|
+
复制: string;
|
|
17
|
+
};
|
|
18
|
+
export default en;
|
|
19
|
+
export { en };
|
|
@@ -101,7 +101,7 @@ declare class GroupNodeModel extends RectResize.model {
|
|
|
101
101
|
}
|
|
102
102
|
declare class GroupNode extends RectResize.view {
|
|
103
103
|
getControlGroup(): h.JSX.Element;
|
|
104
|
-
|
|
104
|
+
getAddAbleShape(): import("preact").VNode<any>;
|
|
105
105
|
getFoldIcon(): import("preact").VNode<any>;
|
|
106
106
|
getResizeShape(): import("preact").VNode<any>;
|
|
107
107
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 自动布局插件
|
|
3
|
-
* 依赖
|
|
3
|
+
* 依赖flow-path插件
|
|
4
4
|
* 未完善
|
|
5
5
|
*/
|
|
6
6
|
import LogicFlow from '@logicflow/core';
|
|
@@ -26,7 +26,7 @@ declare class AutoLayout {
|
|
|
26
26
|
* source一定在target左边。
|
|
27
27
|
* 1. 如果source和target在同一x, y坐标内容。
|
|
28
28
|
* 2. 如果source在target左上方。
|
|
29
|
-
* 3. 如果
|
|
29
|
+
* 3. 如果source在target左下方。
|
|
30
30
|
*/
|
|
31
31
|
private getRelativePosition;
|
|
32
32
|
/**
|