@logicflow/extension 1.2.9 → 1.2.11
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/CHANGELOG.md +1727 -0
- package/cjs/NodeResize/Control/Control.js +35 -49
- package/cjs/bpmn/getBpmnId.js +25 -2
- package/cjs/bpmn-elements/index.js +102 -0
- package/cjs/bpmn-elements/presets/Event/EndEventFactory.js +134 -0
- package/cjs/bpmn-elements/presets/Event/IntermediateCatchEvent.js +118 -0
- package/cjs/bpmn-elements/presets/Event/IntermediateThrowEvent.js +119 -0
- package/cjs/bpmn-elements/presets/Event/StartEventFactory.js +133 -0
- package/cjs/bpmn-elements/presets/Event/boundaryEventFactory.js +125 -0
- package/cjs/bpmn-elements/presets/Event/index.js +16 -0
- package/cjs/bpmn-elements/presets/Flow/index.js +9 -0
- package/cjs/bpmn-elements/presets/Flow/sequenceFlow.js +78 -0
- package/cjs/bpmn-elements/presets/Gateway/gateway.js +109 -0
- package/cjs/bpmn-elements/presets/Gateway/index.js +14 -0
- package/cjs/bpmn-elements/presets/Task/index.js +134 -0
- package/cjs/bpmn-elements/presets/Task/subProcess.js +190 -0
- package/cjs/bpmn-elements/presets/Task/task.js +190 -0
- package/cjs/bpmn-elements/presets/icons.js +116 -0
- package/cjs/bpmn-elements/utils.js +45 -0
- package/cjs/bpmn-elements-adapter/constant.js +69 -0
- package/cjs/bpmn-elements-adapter/index.js +1066 -0
- package/cjs/bpmn-elements-adapter/json2xml.js +91 -0
- package/cjs/bpmn-elements-adapter/xml2json.js +554 -0
- package/cjs/components/control/index.js +1 -1
- package/cjs/components/menu/index.js +76 -7
- package/cjs/index.js +3 -1
- package/cjs/materials/group/index.js +16 -7
- package/cjs/tools/snapshot/index.js +14 -0
- package/es/NodeResize/Control/Control.d.ts +1 -0
- package/es/NodeResize/Control/Control.js +36 -50
- package/es/bpmn/getBpmnId.js +25 -2
- package/es/bpmn-elements/index.d.ts +16 -0
- package/es/bpmn-elements/index.js +88 -0
- package/es/bpmn-elements/presets/Event/EndEventFactory.d.ts +5 -0
- package/es/bpmn-elements/presets/Event/EndEventFactory.js +130 -0
- package/es/bpmn-elements/presets/Event/IntermediateCatchEvent.d.ts +5 -0
- package/es/bpmn-elements/presets/Event/IntermediateCatchEvent.js +114 -0
- package/es/bpmn-elements/presets/Event/IntermediateThrowEvent.d.ts +5 -0
- package/es/bpmn-elements/presets/Event/IntermediateThrowEvent.js +115 -0
- package/es/bpmn-elements/presets/Event/StartEventFactory.d.ts +5 -0
- package/es/bpmn-elements/presets/Event/StartEventFactory.js +129 -0
- package/es/bpmn-elements/presets/Event/boundaryEventFactory.d.ts +5 -0
- package/es/bpmn-elements/presets/Event/boundaryEventFactory.js +121 -0
- package/es/bpmn-elements/presets/Event/index.d.ts +2 -0
- package/es/bpmn-elements/presets/Event/index.js +12 -0
- package/es/bpmn-elements/presets/Flow/index.d.ts +7 -0
- package/es/bpmn-elements/presets/Flow/index.js +5 -0
- package/es/bpmn-elements/presets/Flow/sequenceFlow.d.ts +5 -0
- package/es/bpmn-elements/presets/Flow/sequenceFlow.js +74 -0
- package/es/bpmn-elements/presets/Gateway/gateway.d.ts +17 -0
- package/es/bpmn-elements/presets/Gateway/gateway.js +105 -0
- package/es/bpmn-elements/presets/Gateway/index.d.ts +2 -0
- package/es/bpmn-elements/presets/Gateway/index.js +10 -0
- package/es/bpmn-elements/presets/Task/index.d.ts +2 -0
- package/es/bpmn-elements/presets/Task/index.js +130 -0
- package/es/bpmn-elements/presets/Task/subProcess.d.ts +5 -0
- package/es/bpmn-elements/presets/Task/subProcess.js +186 -0
- package/es/bpmn-elements/presets/Task/task.d.ts +12 -0
- package/es/bpmn-elements/presets/Task/task.js +186 -0
- package/es/bpmn-elements/presets/icons.d.ts +25 -0
- package/es/bpmn-elements/presets/icons.js +113 -0
- package/es/bpmn-elements/utils.d.ts +2 -0
- package/es/bpmn-elements/utils.js +40 -0
- package/{types/bpmn → es/bpmn-elements-adapter}/constant.d.ts +20 -0
- package/es/bpmn-elements-adapter/constant.js +66 -0
- package/es/bpmn-elements-adapter/index.d.ts +103 -0
- package/es/bpmn-elements-adapter/index.js +1060 -0
- package/es/bpmn-elements-adapter/json2xml.d.ts +3 -0
- package/es/bpmn-elements-adapter/json2xml.js +87 -0
- package/es/bpmn-elements-adapter/xml2json.js +551 -0
- package/es/components/control/index.js +1 -1
- package/es/components/menu/index.js +76 -7
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/materials/group/index.js +16 -7
- package/es/tools/snapshot/index.js +14 -0
- 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/FlowPath.js +1 -1
- package/lib/Group.js +1 -1
- package/lib/Highlight.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 +3 -3
- package/types/NodeResize/BasicShape/Polygon.d.ts +0 -10
- package/types/NodeResize/BasicShape/Rect.d.ts +0 -17
- package/types/NodeResize/Control/Control.d.ts +0 -65
- package/types/NodeResize/Control/ControlGroup.d.ts +0 -13
- package/types/NodeResize/Control/Util.d.ts +0 -33
- package/types/NodeResize/Node/DiamondResize.d.ts +0 -30
- package/types/NodeResize/Node/EllipseResize.d.ts +0 -30
- package/types/NodeResize/Node/HtmlResize.d.ts +0 -30
- package/types/NodeResize/Node/RectResize.d.ts +0 -32
- package/types/NodeResize/index.d.ts +0 -11
- package/types/bpmn/events/EndEvent.d.ts +0 -21
- package/types/bpmn/events/StartEvent.d.ts +0 -17
- package/types/bpmn/flow/SequenceFlow.d.ts +0 -15
- package/types/bpmn/gateways/ExclusiveGateway.d.ts +0 -16
- package/types/bpmn/getBpmnId.d.ts +0 -1
- package/types/bpmn/index.d.ts +0 -13
- package/types/bpmn/tasks/ServiceTask.d.ts +0 -17
- package/types/bpmn/tasks/UserTask.d.ts +0 -17
- package/types/bpmn-adapter/bpmnIds.d.ts +0 -1
- package/types/bpmn-adapter/index.d.ts +0 -63
- package/types/bpmn-adapter/json2xml.d.ts +0 -3
- package/types/components/context-menu/index.d.ts +0 -34
- package/types/components/control/index.d.ts +0 -26
- package/types/components/dnd-panel/index.d.ts +0 -25
- package/types/components/highlight/index.d.ts +0 -21
- package/types/components/menu/index.d.ts +0 -50
- package/types/components/mini-map/index.d.ts +0 -88
- package/types/components/selection-select/index.d.ts +0 -42
- package/types/index.d.ts +0 -19
- package/types/insert-node-in-polyline/edge.d.ts +0 -31
- package/types/insert-node-in-polyline/index.d.ts +0 -28
- package/types/locale/en-locale/en.d.ts +0 -19
- package/types/locale/en-locale/index.d.ts +0 -9
- package/types/locale/locale.d.ts +0 -6
- package/types/materials/curved-edge/index.d.ts +0 -8
- package/types/materials/curved-edge/searchMiddleIndex.d.ts +0 -1
- package/types/materials/group/GroupNode.d.ts +0 -125
- package/types/materials/group/index.d.ts +0 -56
- package/types/tools/auto-layout/index.d.ts +0 -40
- package/types/tools/flow-path/index.d.ts +0 -47
- package/types/tools/snapshot/index.d.ts +0 -25
- package/types/turbo-adapter/index.d.ts +0 -21
- package/types/type/index.d.ts +0 -6
- /package/{types/bpmn-adapter → es/bpmn-elements-adapter}/xml2json.d.ts +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import RectResize from './Node/RectResize';
|
|
2
|
-
import EllipseResize from './Node/EllipseResize';
|
|
3
|
-
import DiamondResize from './Node/DiamondResize';
|
|
4
|
-
import HtmlResize from './Node/HtmlResize';
|
|
5
|
-
declare const NodeResize: {
|
|
6
|
-
pluginName: string;
|
|
7
|
-
step: number;
|
|
8
|
-
install(lf: any): void;
|
|
9
|
-
};
|
|
10
|
-
export default NodeResize;
|
|
11
|
-
export { NodeResize, RectResize, EllipseResize, DiamondResize, HtmlResize, };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CircleNode, CircleNodeModel } from '@logicflow/core';
|
|
2
|
-
declare class EndEventModel extends CircleNodeModel {
|
|
3
|
-
static extendKey: string;
|
|
4
|
-
constructor(data: any, graphModel: any);
|
|
5
|
-
setAttributes(): void;
|
|
6
|
-
getConnectedSourceRules(): import("@logicflow/core").ConnectRule[];
|
|
7
|
-
}
|
|
8
|
-
declare class EndEventView extends CircleNode {
|
|
9
|
-
static extendKey: string;
|
|
10
|
-
getAnchorStyle(): {
|
|
11
|
-
visibility: string;
|
|
12
|
-
};
|
|
13
|
-
getShape(): import("preact").VNode<any>;
|
|
14
|
-
}
|
|
15
|
-
declare const EndEvent: {
|
|
16
|
-
type: string;
|
|
17
|
-
view: typeof EndEventView;
|
|
18
|
-
model: typeof EndEventModel;
|
|
19
|
-
};
|
|
20
|
-
export { EndEventView, EndEventModel };
|
|
21
|
-
export default EndEvent;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CircleNode, CircleNodeModel } from '@logicflow/core';
|
|
2
|
-
declare class StartEventModel extends CircleNodeModel {
|
|
3
|
-
static extendKey: string;
|
|
4
|
-
constructor(data: any, graphModel: any);
|
|
5
|
-
setAttributes(): void;
|
|
6
|
-
getConnectedTargetRules(): import("@logicflow/core").ConnectRule[];
|
|
7
|
-
}
|
|
8
|
-
declare class StartEventView extends CircleNode {
|
|
9
|
-
static extendKey: string;
|
|
10
|
-
}
|
|
11
|
-
declare const StartEvent: {
|
|
12
|
-
type: string;
|
|
13
|
-
view: typeof StartEventView;
|
|
14
|
-
model: typeof StartEventModel;
|
|
15
|
-
};
|
|
16
|
-
export { StartEventModel, StartEventView };
|
|
17
|
-
export default StartEvent;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PolylineEdge, PolylineEdgeModel } from '@logicflow/core';
|
|
2
|
-
declare class SequenceFlowModel extends PolylineEdgeModel {
|
|
3
|
-
static extendKey: string;
|
|
4
|
-
constructor(data: any, graphModel: any);
|
|
5
|
-
}
|
|
6
|
-
declare class SequenceFlowView extends PolylineEdge {
|
|
7
|
-
static extendKey: string;
|
|
8
|
-
}
|
|
9
|
-
declare const SequenceFlow: {
|
|
10
|
-
type: string;
|
|
11
|
-
view: typeof SequenceFlowView;
|
|
12
|
-
model: typeof SequenceFlowModel;
|
|
13
|
-
};
|
|
14
|
-
export { SequenceFlowView, SequenceFlowModel };
|
|
15
|
-
export default SequenceFlow;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PolygonNode, PolygonNodeModel } from '@logicflow/core';
|
|
2
|
-
declare class ExclusiveGatewayModel extends PolygonNodeModel {
|
|
3
|
-
static extendKey: string;
|
|
4
|
-
constructor(data: any, graphModel: any);
|
|
5
|
-
}
|
|
6
|
-
declare class ExclusiveGatewayView extends PolygonNode {
|
|
7
|
-
static extendKey: string;
|
|
8
|
-
getShape(): import("preact").VNode<any>;
|
|
9
|
-
}
|
|
10
|
-
declare const ExclusiveGateway: {
|
|
11
|
-
type: string;
|
|
12
|
-
view: typeof ExclusiveGatewayView;
|
|
13
|
-
model: typeof ExclusiveGatewayModel;
|
|
14
|
-
};
|
|
15
|
-
export { ExclusiveGatewayView, ExclusiveGatewayModel };
|
|
16
|
-
export default ExclusiveGateway;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getBpmnId(): string;
|
package/types/bpmn/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StartEventModel, StartEventView } from './events/StartEvent';
|
|
2
|
-
import { EndEventView, EndEventModel } from './events/EndEvent';
|
|
3
|
-
import { ExclusiveGatewayView, ExclusiveGatewayModel } from './gateways/ExclusiveGateway';
|
|
4
|
-
import { UserTaskView, UserTaskModel } from './tasks/UserTask';
|
|
5
|
-
import { ServiceTaskView, ServiceTaskModel } from './tasks/ServiceTask';
|
|
6
|
-
import { SequenceFlowView, SequenceFlowModel } from './flow/SequenceFlow';
|
|
7
|
-
declare class BpmnElement {
|
|
8
|
-
static pluginName: string;
|
|
9
|
-
constructor({ lf }: {
|
|
10
|
-
lf: any;
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
export { BpmnElement, StartEventModel, StartEventView, EndEventView, EndEventModel, ExclusiveGatewayView, ExclusiveGatewayModel, UserTaskView, UserTaskModel, ServiceTaskView, ServiceTaskModel, SequenceFlowView, SequenceFlowModel, };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RectNodeModel, RectNode } from '@logicflow/core';
|
|
2
|
-
declare class ServiceTaskModel extends RectNodeModel {
|
|
3
|
-
static extendKey: string;
|
|
4
|
-
constructor(data: any, graphModel: any);
|
|
5
|
-
}
|
|
6
|
-
declare class ServiceTaskView extends RectNode {
|
|
7
|
-
static extendKey: string;
|
|
8
|
-
getLabelShape(): import("preact").VNode<any>;
|
|
9
|
-
getShape(): import("preact").VNode<any>;
|
|
10
|
-
}
|
|
11
|
-
declare const ServiceTask: {
|
|
12
|
-
type: string;
|
|
13
|
-
view: typeof ServiceTaskView;
|
|
14
|
-
model: typeof ServiceTaskModel;
|
|
15
|
-
};
|
|
16
|
-
export { ServiceTaskView, ServiceTaskModel };
|
|
17
|
-
export default ServiceTask;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RectNode, RectNodeModel } from '@logicflow/core';
|
|
2
|
-
declare class UserTaskModel extends RectNodeModel {
|
|
3
|
-
static extendKey: string;
|
|
4
|
-
constructor(data: any, graphModel: any);
|
|
5
|
-
}
|
|
6
|
-
declare class UserTaskView extends RectNode {
|
|
7
|
-
static extendKey: string;
|
|
8
|
-
getLabelShape(): import("preact").VNode<any>;
|
|
9
|
-
getShape(): import("preact").VNode<any>;
|
|
10
|
-
}
|
|
11
|
-
declare const UserTask: {
|
|
12
|
-
type: string;
|
|
13
|
-
view: typeof UserTaskView;
|
|
14
|
-
model: typeof UserTaskModel;
|
|
15
|
-
};
|
|
16
|
-
export { UserTaskView, UserTaskModel };
|
|
17
|
-
export default UserTask;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getBpmnId(): string;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
declare function toXmlJson(retainedFields?: string[]): (json: string | any[] | Object) => any;
|
|
2
|
-
/**
|
|
3
|
-
* 将xmlJson转换为普通的json,在内部使用。
|
|
4
|
-
*/
|
|
5
|
-
declare function toNormalJson(xmlJson: any): {};
|
|
6
|
-
declare class BpmnAdapter {
|
|
7
|
-
static pluginName: string;
|
|
8
|
-
static shapeConfigMap: Map<any, any>;
|
|
9
|
-
processAttributes: {
|
|
10
|
-
['-isExecutable']: string;
|
|
11
|
-
['-id']: string;
|
|
12
|
-
};
|
|
13
|
-
definitionAttributes: {
|
|
14
|
-
['-id']: string;
|
|
15
|
-
['-xmlns:xsi']: string;
|
|
16
|
-
['-xmlns:bpmn']: string;
|
|
17
|
-
['-xmlns:bpmndi']: string;
|
|
18
|
-
['-xmlns:dc']: string;
|
|
19
|
-
['-xmlns:di']: string;
|
|
20
|
-
['-targetNamespace']: string;
|
|
21
|
-
['-exporter']: string;
|
|
22
|
-
['-exporterVersion']: string;
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
constructor({ lf }: {
|
|
26
|
-
lf: any;
|
|
27
|
-
});
|
|
28
|
-
setCustomShape(key: any, val: any): void;
|
|
29
|
-
/**
|
|
30
|
-
* @param retainedFields?: string[] (可选)属性保留字段,retainedField会和默认的defaultRetainedFields:
|
|
31
|
-
* ["properties", "startPoint", "endPoint", "pointsList"]合并,
|
|
32
|
-
* 这意味着出现在这个数组里的字段当它的值是数组或是对象时不会被视为一个节点而是一个属性。
|
|
33
|
-
*/
|
|
34
|
-
adapterOut: (data: any, retainedFields?: string[]) => {
|
|
35
|
-
'bpmn:definitions': {
|
|
36
|
-
[key: string]: any;
|
|
37
|
-
"-id": string;
|
|
38
|
-
"-xmlns:xsi": string;
|
|
39
|
-
"-xmlns:bpmn": string;
|
|
40
|
-
"-xmlns:bpmndi": string;
|
|
41
|
-
"-xmlns:dc": string;
|
|
42
|
-
"-xmlns:di": string;
|
|
43
|
-
"-targetNamespace": string;
|
|
44
|
-
"-exporter": string;
|
|
45
|
-
"-exporterVersion": string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
adapterIn: (bpmnData: any) => {
|
|
49
|
-
nodes: any[];
|
|
50
|
-
edges: any[];
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
declare class BpmnXmlAdapter extends BpmnAdapter {
|
|
54
|
-
static pluginName: string;
|
|
55
|
-
constructor(data: any);
|
|
56
|
-
adapterXmlIn: (bpmnData: any) => {
|
|
57
|
-
nodes: any[];
|
|
58
|
-
edges: any[];
|
|
59
|
-
};
|
|
60
|
-
adapterXmlOut: (data: any, retainedFields?: string[]) => string;
|
|
61
|
-
}
|
|
62
|
-
export { BpmnAdapter, BpmnXmlAdapter, toXmlJson, toNormalJson };
|
|
63
|
-
export default BpmnAdapter;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare class ContextMenu {
|
|
2
|
-
static pluginName: string;
|
|
3
|
-
private __menuDOM;
|
|
4
|
-
private lf;
|
|
5
|
-
private _activeData;
|
|
6
|
-
private menuTypeMap;
|
|
7
|
-
container: any;
|
|
8
|
-
isShow: boolean;
|
|
9
|
-
constructor({ lf }: {
|
|
10
|
-
lf: any;
|
|
11
|
-
});
|
|
12
|
-
render(lf: any, container: any): void;
|
|
13
|
-
setContextMenuByType(type: any, menus: any): void;
|
|
14
|
-
/**
|
|
15
|
-
* 隐藏菜单
|
|
16
|
-
*/
|
|
17
|
-
hideContextMenu(): void;
|
|
18
|
-
/**
|
|
19
|
-
* 显示指定元素菜单
|
|
20
|
-
* @param data 节点id、节点类型、菜单位置
|
|
21
|
-
*/
|
|
22
|
-
showContextMenu(data: any): void;
|
|
23
|
-
setContextMenuItems(menus: any): void;
|
|
24
|
-
/**
|
|
25
|
-
* 获取新菜单位置
|
|
26
|
-
*/
|
|
27
|
-
private getContextMenuPosition;
|
|
28
|
-
private createContextMenu;
|
|
29
|
-
private addNode;
|
|
30
|
-
private showMenu;
|
|
31
|
-
listenDelete: () => void;
|
|
32
|
-
}
|
|
33
|
-
export default ContextMenu;
|
|
34
|
-
export { ContextMenu, };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
declare type ControlItem = {
|
|
2
|
-
key: string;
|
|
3
|
-
iconClass: string;
|
|
4
|
-
title: string;
|
|
5
|
-
text: string;
|
|
6
|
-
onClick?: Function;
|
|
7
|
-
onMouseEnter?: Function;
|
|
8
|
-
onMouseLeave?: Function;
|
|
9
|
-
};
|
|
10
|
-
declare class Control {
|
|
11
|
-
private lf;
|
|
12
|
-
static pluginName: string;
|
|
13
|
-
private controlItems;
|
|
14
|
-
private domContainer;
|
|
15
|
-
private toolEl;
|
|
16
|
-
constructor({ lf }: {
|
|
17
|
-
lf: any;
|
|
18
|
-
});
|
|
19
|
-
render(lf: any, domContainer: any): void;
|
|
20
|
-
destroy(): void;
|
|
21
|
-
addItem(item: any): void;
|
|
22
|
-
removeItem(key: any): ControlItem;
|
|
23
|
-
private getControlTool;
|
|
24
|
-
}
|
|
25
|
-
export default Control;
|
|
26
|
-
export { Control };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import LogicFlow from '@logicflow/core';
|
|
2
|
-
declare type ShapeItem = {
|
|
3
|
-
type?: string;
|
|
4
|
-
text?: string;
|
|
5
|
-
icon?: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
properties?: Record<string, any>;
|
|
9
|
-
callback?: (lf: LogicFlow, container: HTMLElement) => void;
|
|
10
|
-
};
|
|
11
|
-
declare class DndPanel {
|
|
12
|
-
lf: LogicFlow;
|
|
13
|
-
shapeList: ShapeItem[];
|
|
14
|
-
panelEl: HTMLDivElement;
|
|
15
|
-
static pluginName: string;
|
|
16
|
-
domContainer: HTMLElement;
|
|
17
|
-
constructor({ lf }: {
|
|
18
|
-
lf: any;
|
|
19
|
-
});
|
|
20
|
-
render(lf: any, domContainer: any): void;
|
|
21
|
-
destroy(): void;
|
|
22
|
-
setPatternItems(shapeList: any): void;
|
|
23
|
-
private createDndItem;
|
|
24
|
-
}
|
|
25
|
-
export { DndPanel, };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import LogicFlow from '@logicflow/core';
|
|
2
|
-
declare type IMode = 'single' | 'path';
|
|
3
|
-
declare class Highlight {
|
|
4
|
-
lf: LogicFlow;
|
|
5
|
-
static pluginName: string;
|
|
6
|
-
mode: IMode;
|
|
7
|
-
manual: boolean;
|
|
8
|
-
tempStyles: {};
|
|
9
|
-
constructor({ lf }: {
|
|
10
|
-
lf: any;
|
|
11
|
-
});
|
|
12
|
-
setMode(mode: IMode): void;
|
|
13
|
-
setManual(manual: boolean): void;
|
|
14
|
-
private highlightSingle;
|
|
15
|
-
private highlightPath;
|
|
16
|
-
highlight(id: string, mode?: IMode): void;
|
|
17
|
-
restoreHighlight(): void;
|
|
18
|
-
render(lf: any, domContainer: any): void;
|
|
19
|
-
destroy(): void;
|
|
20
|
-
}
|
|
21
|
-
export { Highlight };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import LogicFlow from '@logicflow/core';
|
|
2
|
-
declare type SetType = 'add' | 'reset';
|
|
3
|
-
export declare type MenuItem = {
|
|
4
|
-
text?: string;
|
|
5
|
-
className?: string;
|
|
6
|
-
icon?: boolean;
|
|
7
|
-
callback: (element: any) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare type MenuConfig = {
|
|
10
|
-
nodeMenu?: MenuItem[] | false;
|
|
11
|
-
edgeMenu?: MenuItem[] | false;
|
|
12
|
-
graphMenu?: MenuItem[] | false;
|
|
13
|
-
};
|
|
14
|
-
declare class Menu {
|
|
15
|
-
lf: LogicFlow;
|
|
16
|
-
private __container;
|
|
17
|
-
private __menuDOM;
|
|
18
|
-
private menuTypeMap;
|
|
19
|
-
private __currentData;
|
|
20
|
-
static pluginName: string;
|
|
21
|
-
constructor({ lf }: {
|
|
22
|
-
lf: any;
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* 初始化设置默认内置菜单栏
|
|
26
|
-
*/
|
|
27
|
-
private init;
|
|
28
|
-
render(lf: any, container: any): void;
|
|
29
|
-
destroy(): void;
|
|
30
|
-
private showMenu;
|
|
31
|
-
/**
|
|
32
|
-
* 设置指定类型元素的菜单
|
|
33
|
-
*/
|
|
34
|
-
private setMenuByType;
|
|
35
|
-
/**
|
|
36
|
-
* 获取 Menu DOM
|
|
37
|
-
* @param list 菜单项
|
|
38
|
-
* @return 菜单项 DOM
|
|
39
|
-
*/
|
|
40
|
-
private __getMenuDom;
|
|
41
|
-
setMenuConfig(config: MenuConfig): void;
|
|
42
|
-
addMenuConfig(config: MenuConfig): void;
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated
|
|
45
|
-
* 复写添加
|
|
46
|
-
*/
|
|
47
|
-
changeMenuItem(type: SetType, config: MenuConfig): void;
|
|
48
|
-
}
|
|
49
|
-
export default Menu;
|
|
50
|
-
export { Menu, };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
declare class MiniMap {
|
|
2
|
-
static pluginName: string;
|
|
3
|
-
static width: number;
|
|
4
|
-
static height: number;
|
|
5
|
-
static viewPortWidth: number;
|
|
6
|
-
static viewPortHeight: number;
|
|
7
|
-
static isShowHeader: boolean;
|
|
8
|
-
static isShowCloseIcon: boolean;
|
|
9
|
-
static leftPosition: number;
|
|
10
|
-
static topPosition: number;
|
|
11
|
-
static rightPosition: any;
|
|
12
|
-
static bottomPosition: any;
|
|
13
|
-
static headerTitle: string;
|
|
14
|
-
private lf;
|
|
15
|
-
private container;
|
|
16
|
-
private miniMapWrap;
|
|
17
|
-
private miniMapContainer;
|
|
18
|
-
private lfMap;
|
|
19
|
-
private viewport;
|
|
20
|
-
private width;
|
|
21
|
-
private height;
|
|
22
|
-
private leftPosition;
|
|
23
|
-
private topPosition;
|
|
24
|
-
private rightPosition;
|
|
25
|
-
private bottomPosition;
|
|
26
|
-
private miniMapWidth;
|
|
27
|
-
private miniMapHeight;
|
|
28
|
-
private viewPortTop;
|
|
29
|
-
private viewPortLeft;
|
|
30
|
-
private startPosition;
|
|
31
|
-
private viewPortScale;
|
|
32
|
-
private viewPortWidth;
|
|
33
|
-
private viewPortHeight;
|
|
34
|
-
private resetDataX;
|
|
35
|
-
private resetDataY;
|
|
36
|
-
private LogicFlow;
|
|
37
|
-
private isShow;
|
|
38
|
-
private isShowHeader;
|
|
39
|
-
private isShowCloseIcon;
|
|
40
|
-
private dragging;
|
|
41
|
-
private disabledPlugins;
|
|
42
|
-
constructor({ lf, LogicFlow, options }: {
|
|
43
|
-
lf: any;
|
|
44
|
-
LogicFlow: any;
|
|
45
|
-
options: any;
|
|
46
|
-
});
|
|
47
|
-
render(lf: any, container: any): void;
|
|
48
|
-
init(option: any): void;
|
|
49
|
-
/**
|
|
50
|
-
* 显示mini map
|
|
51
|
-
*/
|
|
52
|
-
show: (leftPosition?: number, topPosition?: number) => void;
|
|
53
|
-
/**
|
|
54
|
-
* 隐藏mini map
|
|
55
|
-
*/
|
|
56
|
-
hide: () => void;
|
|
57
|
-
reset: () => void;
|
|
58
|
-
private setOption;
|
|
59
|
-
private initMiniMap;
|
|
60
|
-
private createMiniMap;
|
|
61
|
-
private removeMiniMap;
|
|
62
|
-
/**
|
|
63
|
-
* 计算所有图形一起,占领的区域范围。
|
|
64
|
-
* @param data
|
|
65
|
-
*/
|
|
66
|
-
private getBounds;
|
|
67
|
-
/**
|
|
68
|
-
* 将负值的平移转换为正值。
|
|
69
|
-
* 保证渲染的时候,minimap能完全展示。
|
|
70
|
-
* 获取将画布所有元素平移到0,0开始时,所有节点数据
|
|
71
|
-
*/
|
|
72
|
-
private resetData;
|
|
73
|
-
/**
|
|
74
|
-
* 显示导航
|
|
75
|
-
* 显示视口范围
|
|
76
|
-
* 1. 基于画布的范围比例,设置视口范围比例。宽度默认为导航宽度。
|
|
77
|
-
*/
|
|
78
|
-
private setView;
|
|
79
|
-
private setViewPort;
|
|
80
|
-
private createViewPort;
|
|
81
|
-
private startDrag;
|
|
82
|
-
private moveViewport;
|
|
83
|
-
private drag;
|
|
84
|
-
private drop;
|
|
85
|
-
private mapClick;
|
|
86
|
-
}
|
|
87
|
-
export default MiniMap;
|
|
88
|
-
export { MiniMap };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import LogicFlow from '@logicflow/core';
|
|
2
|
-
declare class SelectionSelect {
|
|
3
|
-
__domContainer: HTMLElement;
|
|
4
|
-
wrapper: HTMLElement;
|
|
5
|
-
lf: LogicFlow;
|
|
6
|
-
startPoint: {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
};
|
|
10
|
-
endPoint: {
|
|
11
|
-
x: number;
|
|
12
|
-
y: number;
|
|
13
|
-
};
|
|
14
|
-
__disabled: boolean;
|
|
15
|
-
isDefaultStopMoveGraph: boolean;
|
|
16
|
-
isWholeNode: boolean;
|
|
17
|
-
isWholeEdge: boolean;
|
|
18
|
-
static pluginName: string;
|
|
19
|
-
constructor({ lf }: {
|
|
20
|
-
lf: any;
|
|
21
|
-
});
|
|
22
|
-
render(lf: any, domContainer: any): void;
|
|
23
|
-
/**
|
|
24
|
-
* 设置选中的灵敏度
|
|
25
|
-
* @param isWholeEdge 是否要边的起点终点都在选区范围才算选中。默认true
|
|
26
|
-
* @param isWholeNode 是否要节点的全部点都在选区范围才算选中。默认true
|
|
27
|
-
*/
|
|
28
|
-
setSelectionSense(isWholeEdge?: boolean, isWholeNode?: boolean): void;
|
|
29
|
-
/**
|
|
30
|
-
* 开启选区
|
|
31
|
-
*/
|
|
32
|
-
openSelectionSelect(): void;
|
|
33
|
-
/**
|
|
34
|
-
* 关闭选区
|
|
35
|
-
*/
|
|
36
|
-
closeSelectionSelect(): void;
|
|
37
|
-
__draw: (ev: any) => void;
|
|
38
|
-
__drawOff: () => void;
|
|
39
|
-
open(): void;
|
|
40
|
-
close(): void;
|
|
41
|
-
}
|
|
42
|
-
export { SelectionSelect };
|
package/types/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export * from './bpmn';
|
|
2
|
-
export * from './tools/snapshot';
|
|
3
|
-
export * from './bpmn-adapter';
|
|
4
|
-
export * from './turbo-adapter';
|
|
5
|
-
export * from './insert-node-in-polyline';
|
|
6
|
-
export * from './components/control';
|
|
7
|
-
export * from './components/menu';
|
|
8
|
-
export * from './components/context-menu';
|
|
9
|
-
export * from './components/dnd-panel';
|
|
10
|
-
export * from './components/selection-select';
|
|
11
|
-
export * from './components/mini-map';
|
|
12
|
-
export * from './materials/curved-edge';
|
|
13
|
-
export * from './materials/group';
|
|
14
|
-
export * from './NodeResize';
|
|
15
|
-
export * from './tools/flow-path';
|
|
16
|
-
export * from './tools/auto-layout';
|
|
17
|
-
export * from './bpmn-adapter/xml2json';
|
|
18
|
-
export * from './bpmn-adapter/json2xml';
|
|
19
|
-
export * from './components/highlight';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Point, PolylineEdgeModel, BaseNodeModel } from '@logicflow/core';
|
|
2
|
-
/**
|
|
3
|
-
* 判断一个点是否在线段中
|
|
4
|
-
* @param point 判断的点
|
|
5
|
-
* @param start 线段的起点
|
|
6
|
-
* @param end 线段的终点
|
|
7
|
-
* @param deviation 误差范围
|
|
8
|
-
* @returns boolean
|
|
9
|
-
*/
|
|
10
|
-
export declare const isInSegment: (point: any, start: any, end: any, deviation?: number) => boolean;
|
|
11
|
-
export declare const distToSegmentSquared: (p: any, v: any, w: any) => number;
|
|
12
|
-
export declare const distToSegment: (point: Point, start: Point, end: Point) => number;
|
|
13
|
-
export declare const crossPointInSegment: (node: BaseNodeModel, start: Point, end: Point) => {
|
|
14
|
-
startCrossPoint: {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
};
|
|
18
|
-
endCrossPoint: {
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
interface SegmentCross {
|
|
24
|
-
crossIndex: number;
|
|
25
|
-
crossPoints: {
|
|
26
|
-
startCrossPoint: Point;
|
|
27
|
-
endCrossPoint: Point;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export declare const isNodeInSegment: (node: BaseNodeModel, polyline: PolylineEdgeModel, deviation?: number) => SegmentCross;
|
|
31
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import LogicFlow from '@logicflow/core';
|
|
2
|
-
declare class InsertNodeInPolyline {
|
|
3
|
-
static pluginName: string;
|
|
4
|
-
_lf: LogicFlow;
|
|
5
|
-
dndAdd: boolean;
|
|
6
|
-
dropAdd: boolean;
|
|
7
|
-
deviation: number;
|
|
8
|
-
constructor({ lf }: {
|
|
9
|
-
lf: any;
|
|
10
|
-
});
|
|
11
|
-
eventHandler(): void;
|
|
12
|
-
/**
|
|
13
|
-
* 插入节点前校验规则
|
|
14
|
-
* @param sourceNodeId
|
|
15
|
-
* @param targetNodeId
|
|
16
|
-
* @param sourceAnchorId
|
|
17
|
-
* @param targetAnchorId
|
|
18
|
-
* @param nodeData
|
|
19
|
-
*/
|
|
20
|
-
checkRuleBeforeInsetNode(sourceNodeId: any, targetNodeId: any, sourceAnchorId: any, targetAnchorId: any, nodeData: any): {
|
|
21
|
-
isPass: any;
|
|
22
|
-
sourceMsg: any;
|
|
23
|
-
targetMsg: any;
|
|
24
|
-
};
|
|
25
|
-
insetNode(nodeData: any): void;
|
|
26
|
-
}
|
|
27
|
-
export { InsertNodeInPolyline };
|
|
28
|
-
export default InsertNodeInPolyline;
|
|
@@ -1,19 +0,0 @@
|
|
|
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 };
|
package/types/locale/locale.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PolylineEdge, PolylineEdgeModel } from '@logicflow/core';
|
|
2
|
-
declare class CurvedEdge extends PolylineEdge {
|
|
3
|
-
pointFilter(points: any): any;
|
|
4
|
-
getEdge(): import("preact").VNode<any>;
|
|
5
|
-
}
|
|
6
|
-
declare class CurvedEdgeModel extends PolylineEdgeModel {
|
|
7
|
-
}
|
|
8
|
-
export { CurvedEdge, CurvedEdgeModel, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function searchMiddleIndex<T>(arr: Array<T>): [number, number] | false;
|