@logicflow/extension 1.2.23 → 1.2.25
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/components/dnd-panel/index.js +10 -0
- package/cjs/components/selection-select/index.js +13 -0
- package/cjs/style/index.css +4 -0
- package/es/components/dnd-panel/index.d.ts +1 -0
- package/es/components/dnd-panel/index.js +10 -0
- package/es/components/selection-select/index.d.ts +1 -0
- package/es/components/selection-select/index.js +13 -0
- package/es/style/index.css +4 -0
- package/lib/DndPanel.js +1 -1
- package/lib/SelectionSelect.js +1 -1
- package/lib/style/index.css +4 -0
- package/package.json +2 -2
- package/types/NodeResize/BasicShape/Polygon.d.ts +10 -0
- package/types/NodeResize/BasicShape/Rect.d.ts +17 -0
- package/types/NodeResize/Control/Control.d.ts +66 -0
- package/types/NodeResize/Control/ControlGroup.d.ts +13 -0
- package/types/NodeResize/Control/Util.d.ts +33 -0
- package/types/NodeResize/Node/DiamondResize.d.ts +30 -0
- package/types/NodeResize/Node/EllipseResize.d.ts +30 -0
- package/types/NodeResize/Node/HtmlResize.d.ts +30 -0
- package/types/NodeResize/Node/RectResize.d.ts +32 -0
- package/types/NodeResize/index.d.ts +11 -0
- package/types/bpmn/constant.d.ts +46 -0
- package/types/bpmn/events/EndEvent.d.ts +21 -0
- package/types/bpmn/events/StartEvent.d.ts +17 -0
- package/types/bpmn/flow/SequenceFlow.d.ts +15 -0
- package/types/bpmn/gateways/ExclusiveGateway.d.ts +16 -0
- package/types/bpmn/getBpmnId.d.ts +1 -0
- package/types/bpmn/index.d.ts +13 -0
- package/types/bpmn/tasks/ServiceTask.d.ts +17 -0
- package/types/bpmn/tasks/UserTask.d.ts +17 -0
- package/types/bpmn-adapter/bpmnIds.d.ts +1 -0
- package/types/bpmn-adapter/index.d.ts +63 -0
- package/types/bpmn-adapter/json2xml.d.ts +3 -0
- package/types/bpmn-adapter/xml2json.d.ts +2 -0
- package/types/bpmn-elements/index.d.ts +17 -0
- package/types/bpmn-elements/presets/Event/EndEventFactory.d.ts +5 -0
- package/types/bpmn-elements/presets/Event/IntermediateCatchEvent.d.ts +5 -0
- package/types/bpmn-elements/presets/Event/IntermediateThrowEvent.d.ts +5 -0
- package/types/bpmn-elements/presets/Event/StartEventFactory.d.ts +5 -0
- package/types/bpmn-elements/presets/Event/boundaryEventFactory.d.ts +5 -0
- package/types/bpmn-elements/presets/Event/index.d.ts +2 -0
- package/types/bpmn-elements/presets/Flow/index.d.ts +7 -0
- package/types/bpmn-elements/presets/Flow/sequenceFlow.d.ts +5 -0
- package/types/bpmn-elements/presets/Gateway/gateway.d.ts +17 -0
- package/types/bpmn-elements/presets/Gateway/index.d.ts +2 -0
- package/types/bpmn-elements/presets/Task/index.d.ts +2 -0
- package/types/bpmn-elements/presets/Task/subProcess.d.ts +5 -0
- package/types/bpmn-elements/presets/Task/task.d.ts +12 -0
- package/types/bpmn-elements/presets/icons.d.ts +25 -0
- package/types/bpmn-elements/utils.d.ts +2 -0
- package/types/bpmn-elements-adapter/constant.d.ts +66 -0
- package/types/bpmn-elements-adapter/index.d.ts +103 -0
- package/types/bpmn-elements-adapter/json2xml.d.ts +3 -0
- package/types/bpmn-elements-adapter/xml2json.d.ts +2 -0
- package/types/components/context-menu/index.d.ts +34 -0
- package/types/components/control/index.d.ts +26 -0
- package/types/components/dnd-panel/index.d.ts +26 -0
- package/types/components/highlight/index.d.ts +21 -0
- package/types/components/menu/index.d.ts +50 -0
- package/types/components/mini-map/index.d.ts +88 -0
- package/types/components/selection-select/index.d.ts +43 -0
- package/types/index.d.ts +21 -0
- package/types/insert-node-in-polyline/edge.d.ts +31 -0
- package/types/insert-node-in-polyline/index.d.ts +28 -0
- package/types/materials/curved-edge/index.d.ts +14 -0
- package/types/materials/group/GroupNode.d.ts +125 -0
- package/types/materials/group/index.d.ts +65 -0
- package/types/tools/auto-layout/index.d.ts +40 -0
- package/types/tools/flow-path/index.d.ts +47 -0
- package/types/tools/snapshot/index.d.ts +26 -0
- package/types/turbo-adapter/index.d.ts +21 -0
- package/types/type/index.d.ts +6 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const StartEventConfig: {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const EndEventConfig: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const ExclusiveGatewayConfig: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const ServiceTaskConfig: {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const UserTaskConfig: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const theme: {
|
|
22
|
+
rect: {
|
|
23
|
+
radius: number;
|
|
24
|
+
stroke: string;
|
|
25
|
+
};
|
|
26
|
+
circle: {
|
|
27
|
+
r: number;
|
|
28
|
+
stroke: string;
|
|
29
|
+
};
|
|
30
|
+
polygon: {
|
|
31
|
+
stroke: string;
|
|
32
|
+
};
|
|
33
|
+
polyline: {
|
|
34
|
+
stroke: string;
|
|
35
|
+
hoverStroke: string;
|
|
36
|
+
selectedStroke: string;
|
|
37
|
+
};
|
|
38
|
+
edgeText: {
|
|
39
|
+
background: {
|
|
40
|
+
fill: string;
|
|
41
|
+
height: number;
|
|
42
|
+
stroke: string;
|
|
43
|
+
radius: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -0,0 +1,16 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getBpmnId(): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
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, };
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getBpmnId(): string;
|
|
@@ -0,0 +1,63 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as icons from './presets/icons';
|
|
2
|
+
import * as bpmnUtils from './utils';
|
|
3
|
+
export declare function useDefinition(definition: any): () => any[];
|
|
4
|
+
export declare class BPMNElements {
|
|
5
|
+
static pluginName: string;
|
|
6
|
+
constructor({ lf }: any);
|
|
7
|
+
}
|
|
8
|
+
export * from './presets/Event/EndEventFactory';
|
|
9
|
+
export * from './presets/Event/IntermediateCatchEvent';
|
|
10
|
+
export * from './presets/Event/StartEventFactory';
|
|
11
|
+
export * from './presets/Event/boundaryEventFactory';
|
|
12
|
+
export * from './presets/Event/IntermediateThrowEvent';
|
|
13
|
+
export * from './presets/Flow/sequenceFlow';
|
|
14
|
+
export * from './presets/Task/task';
|
|
15
|
+
export * from './presets/Task/subProcess';
|
|
16
|
+
export * from './presets/Gateway/gateway';
|
|
17
|
+
export { icons, bpmnUtils };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* index 0 排他网关
|
|
3
|
+
* index 1 包容网关
|
|
4
|
+
* index 2 并行网关
|
|
5
|
+
*/
|
|
6
|
+
export declare const gatewayComposable: number[][];
|
|
7
|
+
/**
|
|
8
|
+
* @param type 网关节点的type, 对应其XML定义中的节点名,如<bpmn:inclusiveGateway /> 其type为bpmn:inclusiveGateway
|
|
9
|
+
* @param icon 网关节点左上角的图标,可以是svg path,也可以是h函数生成的svg
|
|
10
|
+
* @param props (可选) 网关节点的属性
|
|
11
|
+
* @returns { type: string, model: any, view: any }
|
|
12
|
+
*/
|
|
13
|
+
export declare function GatewayNodeFactory(type: string, icon: string | object, props?: any): {
|
|
14
|
+
type: string;
|
|
15
|
+
model: any;
|
|
16
|
+
view: any;
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const multiInstanceIcon: any;
|
|
2
|
+
/**
|
|
3
|
+
* @param type 任务节点的type, 对应其XML定义中的节点名,如<bpmn:userTask /> 其type为bpmn:userTask
|
|
4
|
+
* @param icon 任务节点左上角的图标,可以是svg path,也可以是h函数生成的svg
|
|
5
|
+
* @param props (可选) 任务节点的属性
|
|
6
|
+
* @returns { type: string, model: any, view: any }
|
|
7
|
+
*/
|
|
8
|
+
export declare function TaskNodeFactory(type: string, icon: string | any[], props?: any): {
|
|
9
|
+
type: string;
|
|
10
|
+
model: any;
|
|
11
|
+
view: any;
|
|
12
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const messageIcon = "m 8.459999999999999,11.34 l 0,12.6 l 18.900000000000002,0 l 0,-12.6 z l 9.450000000000001,5.4 l 9.450000000000001,-5.4";
|
|
2
|
+
export declare const timerIcon: import("preact").VNode<any>[];
|
|
3
|
+
export declare const errorIcon = "m 7.2,25.991999999999997 0.09350000000000001,-0.025300000000000003 7.3392,-9.610700000000001 7.667000000000001,8.9661 4.7003,-18.2204 -5.8707,11.6501 -7.299600000000001,-9.585400000000002 z";
|
|
4
|
+
export declare const escalationIcon = "M 18,7.2 l 8,20 l -8,-7 l -8,7 Z";
|
|
5
|
+
export declare const compensationIcon = "m 7.92,18 9,-6.5 0,13 z m 9.3,-0.4 8.7,-6.1 0,13 -8.7,-6.1 z";
|
|
6
|
+
export declare const conditionalIcon = "M 10.5,8.5 l 14.5,0 l 0,18 l -14.5,0 Z M 12.5,11.5 l 10.5,0 M 12.5,14.5 l 10.5,0 M 12.5,17.5 l 10.5,0 M 12.5,20.5 l 10.5,0 M 12.5,23.5 l 10.5,0 M 12.5,26.5 l 10.5,0 ";
|
|
7
|
+
export declare const linkIcon = "m 20.52,9.468 0,4.4375 -13.5,0 0,6.75 13.5,0 0,4.4375 9.84375,-7.8125 -9.84375,-7.8125 z";
|
|
8
|
+
export declare const signalIcon = "M 18,7.2 l 9,16.2 l -18,0 Z";
|
|
9
|
+
export declare const terminateIcon: import("preact").VNode<any>[];
|
|
10
|
+
export declare const exclusiveIcon = "m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z";
|
|
11
|
+
export declare const parallelIcon = "m 23,10 0,12.5 -12.5,0 0,5 12.5,0 0,12.5 5,0 0,-12.5 12.5,0 0,-5 -12.5,0 0,-12.5 -5,0 z";
|
|
12
|
+
export declare const inclusiveIcon: import("preact").VNode<any>;
|
|
13
|
+
export declare const serviceTaskIcon = "M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z";
|
|
14
|
+
export declare const userTaskIcon = "M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z";
|
|
15
|
+
export declare const scriptTaskIcon = "M6.402,0.5H20.902C20.902,0.5,15.069,3.333,15.069,6.083S19.486,12.083,19.486,15.25S15.319,20.333,15.319,20.333H0.235C0.235,20.333,5.235,17.665999999999997,5.235,15.332999999999998S0.6520000000000001,8.582999999999998,0.6520000000000001,6.082999999999998S6.402,0.5,6.402,0.5ZM3.5,4.5L13.5,4.5M3.8,8.5L13.8,8.5M6.3,12.5L16.3,12.5M6.5,16.5L16.5,16.5";
|
|
16
|
+
export declare const manualTaskIcon = "M0.5,3.751L4.583,0.5009999999999999C4.583,0.5009999999999999,15.749,0.5839999999999999,16.666,0.5839999999999999S14.249,3.5009999999999994,15.166,3.5009999999999994S26.833,3.5009999999999994,27.75,3.5009999999999994C28.916,5.209,27.582,6.667999999999999,26.916,7.167999999999999S27.791,9.084999999999999,25.916,11.584999999999999C25.166,11.834999999999999,26.666,13.459999999999999,24.583000000000002,14.918C23.416,15.501,25.166,16.46,23.333000000000002,17.750999999999998C22.166,17.750999999999998,2.5000000000000036,17.833999999999996,2.5000000000000036,17.833999999999996L0.5000000000000036,16.500999999999998V3.751ZM13.5,7L27,7M13.5,11L26,11M14,14.5L25,14.5M8.2,3.1L15,3.1";
|
|
17
|
+
export declare const style: {
|
|
18
|
+
throw: string;
|
|
19
|
+
catch: string;
|
|
20
|
+
nonIntermediate: string;
|
|
21
|
+
intermediate: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const parallelMarker = "m44,60 m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10";
|
|
24
|
+
export declare const sequentialMarker = "m47,61 m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0";
|
|
25
|
+
export declare const loopMarker = "m 50,73 c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare const StartEventConfig: {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const EndEventConfig: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const BoundaryEventConfig: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const IntermediateEventConfig: {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const ParallelGatewayConfig: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const InclusiveGatewayConfig: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
export declare const ExclusiveGatewayConfig: {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const ServiceTaskConfig: {
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
};
|
|
33
|
+
export declare const UserTaskConfig: {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
};
|
|
37
|
+
export declare const SubProcessConfig: {
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
41
|
+
export declare const theme: {
|
|
42
|
+
rect: {
|
|
43
|
+
radius: number;
|
|
44
|
+
stroke: string;
|
|
45
|
+
};
|
|
46
|
+
circle: {
|
|
47
|
+
r: number;
|
|
48
|
+
stroke: string;
|
|
49
|
+
};
|
|
50
|
+
polygon: {
|
|
51
|
+
stroke: string;
|
|
52
|
+
};
|
|
53
|
+
polyline: {
|
|
54
|
+
stroke: string;
|
|
55
|
+
hoverStroke: string;
|
|
56
|
+
selectedStroke: string;
|
|
57
|
+
};
|
|
58
|
+
edgeText: {
|
|
59
|
+
background: {
|
|
60
|
+
fill: string;
|
|
61
|
+
height: number;
|
|
62
|
+
stroke: string;
|
|
63
|
+
radius: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
declare type TransformerType = {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
in?: (key: string, data: any) => any;
|
|
4
|
+
out?: (data: any) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
declare type MappingType = {
|
|
8
|
+
in?: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
out?: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare type excludeFieldsType = {
|
|
16
|
+
in?: Set<string>;
|
|
17
|
+
out?: Set<string>;
|
|
18
|
+
};
|
|
19
|
+
declare type ExtraPropsType = {
|
|
20
|
+
retainedAttrsFields?: string[];
|
|
21
|
+
excludeFields?: excludeFieldsType;
|
|
22
|
+
transformer?: TransformerType;
|
|
23
|
+
mapping?: MappingType;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 将普通json转换为xmlJson
|
|
27
|
+
* xmlJson中property会以“-”开头
|
|
28
|
+
* 如果没有“-”表示为子节点
|
|
29
|
+
* fix issue https://github.com/didi/LogicFlow/issues/718, contain the process of #text/#cdata and array
|
|
30
|
+
* @reference node type reference https://www.w3schools.com/xml/dom_nodetype.asp
|
|
31
|
+
* @param retainedAttrsFields retainedAttrsFields会和默认的defaultRetainedProperties:
|
|
32
|
+
* ["properties", "startPoint", "endPoint", "pointsList"]合并
|
|
33
|
+
* 这意味着出现在这个数组里的字段当它的值是数组或是对象时不会被视为一个节点而是一个属性
|
|
34
|
+
* @param excludeFields excludeFields会和默认的defaultExcludeFields合并,出现在这个数组中的字段在转换时会被忽略
|
|
35
|
+
* @param transformer 对应节点或者边的子内容转换规则
|
|
36
|
+
*/
|
|
37
|
+
declare function convertNormalToXml(other?: ExtraPropsType): (object: {
|
|
38
|
+
nodes: any;
|
|
39
|
+
edges: any;
|
|
40
|
+
}) => any;
|
|
41
|
+
/**
|
|
42
|
+
* 将xmlJson转换为普通的json,在内部使用。
|
|
43
|
+
*/
|
|
44
|
+
declare function convertXmlToNormal(xmlJson: any): any;
|
|
45
|
+
declare class BPMNBaseAdapter {
|
|
46
|
+
static pluginName: string;
|
|
47
|
+
static shapeConfigMap: Map<any, any>;
|
|
48
|
+
processAttributes: {
|
|
49
|
+
['-isExecutable']: string;
|
|
50
|
+
['-id']: string;
|
|
51
|
+
};
|
|
52
|
+
definitionAttributes: {
|
|
53
|
+
['-id']: string;
|
|
54
|
+
['-xmlns:xsi']: string;
|
|
55
|
+
['-xmlns:bpmn']: string;
|
|
56
|
+
['-xmlns:bpmndi']: string;
|
|
57
|
+
['-xmlns:dc']: string;
|
|
58
|
+
['-xmlns:di']: string;
|
|
59
|
+
['-targetNamespace']: string;
|
|
60
|
+
['-exporter']: string;
|
|
61
|
+
['-exporterVersion']: string;
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
};
|
|
64
|
+
constructor({ lf }: any);
|
|
65
|
+
setCustomShape(key: string, val: any): void;
|
|
66
|
+
/**
|
|
67
|
+
* @param retainedAttrsFields?: string[] (可选)属性保留字段,retainedField会和默认的defaultRetainedFields:
|
|
68
|
+
* ["properties", "startPoint", "endPoint", "pointsList"]合并,
|
|
69
|
+
* 这意味着出现在这个数组里的字段当它的值是数组或是对象时不会被视为一个节点而是一个属性。
|
|
70
|
+
* @param excludeFields excludeFields会和默认的defaultExcludeFields合并,出现在这个数组中的字段在转换时会被忽略
|
|
71
|
+
* @param transformer 对应节点或者边的内容转换规则
|
|
72
|
+
*/
|
|
73
|
+
adapterOut: (data: any, other?: ExtraPropsType) => {
|
|
74
|
+
'bpmn:definitions': {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
"-id": string;
|
|
77
|
+
"-xmlns:xsi": string;
|
|
78
|
+
"-xmlns:bpmn": string;
|
|
79
|
+
"-xmlns:bpmndi": string;
|
|
80
|
+
"-xmlns:dc": string;
|
|
81
|
+
"-xmlns:di": string;
|
|
82
|
+
"-targetNamespace": string;
|
|
83
|
+
"-exporter": string;
|
|
84
|
+
"-exporterVersion": string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
adapterIn: (bpmnData: any, other?: ExtraPropsType) => {
|
|
88
|
+
nodes: any[];
|
|
89
|
+
edges: any[];
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
declare class BPMNAdapter extends BPMNBaseAdapter {
|
|
93
|
+
static pluginName: string;
|
|
94
|
+
private props;
|
|
95
|
+
constructor(data: any);
|
|
96
|
+
adapterXmlIn: (bpmnData: any) => {
|
|
97
|
+
nodes: any[];
|
|
98
|
+
edges: any[];
|
|
99
|
+
};
|
|
100
|
+
adapterXmlOut: (data: any) => string;
|
|
101
|
+
}
|
|
102
|
+
export { BPMNBaseAdapter, BPMNAdapter, convertNormalToXml, convertXmlToNormal };
|
|
103
|
+
export default BPMNAdapter;
|
|
@@ -0,0 +1,34 @@
|
|
|
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, };
|
|
@@ -0,0 +1,26 @@
|
|
|
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 };
|