@logicflow/extension 1.2.22 → 1.2.24
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/cjs/tools/snapshot/index.js +1 -2
- 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/es/tools/snapshot/index.js +1 -2
- package/lib/DndPanel.js +1 -1
- package/lib/SelectionSelect.js +1 -1
- package/lib/Snapshot.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 +25 -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,17 @@
|
|
|
1
|
+
import { h, Point, Size } from '@logicflow/core';
|
|
2
|
+
declare type IProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
radius?: number;
|
|
5
|
+
stroke?: string;
|
|
6
|
+
strokeDasharray?: string;
|
|
7
|
+
} & Point & Size;
|
|
8
|
+
declare function Rect(props: IProps): h.JSX.Element;
|
|
9
|
+
declare namespace Rect {
|
|
10
|
+
var defaultProps: {
|
|
11
|
+
radius: number;
|
|
12
|
+
stroke: string;
|
|
13
|
+
strokeDasharray: string;
|
|
14
|
+
className: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export default Rect;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { h, Component } from 'preact';
|
|
2
|
+
import { BaseNodeModel, GraphModel, LogicFlowUtil } from '@logicflow/core';
|
|
3
|
+
interface IProps {
|
|
4
|
+
index: number;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
model: BaseNodeModel;
|
|
8
|
+
graphModel: GraphModel;
|
|
9
|
+
style?: CSSStyleDeclaration;
|
|
10
|
+
}
|
|
11
|
+
declare class Control extends Component<IProps> {
|
|
12
|
+
index: number;
|
|
13
|
+
nodeModel: BaseNodeModel;
|
|
14
|
+
graphModel: GraphModel;
|
|
15
|
+
dragHandler: LogicFlowUtil.StepDrag;
|
|
16
|
+
constructor(props: any);
|
|
17
|
+
getNodeEdges(nodeId: any): {
|
|
18
|
+
sourceEdges: any[];
|
|
19
|
+
targetEdges: any[];
|
|
20
|
+
};
|
|
21
|
+
updatePosition: ({ deltaX, deltaY }: {
|
|
22
|
+
deltaX: any;
|
|
23
|
+
deltaY: any;
|
|
24
|
+
}) => void;
|
|
25
|
+
getResize: ({ index, deltaX, deltaY, width, height, PCTResizeInfo, pct }: {
|
|
26
|
+
index: any;
|
|
27
|
+
deltaX: any;
|
|
28
|
+
deltaY: any;
|
|
29
|
+
width: any;
|
|
30
|
+
height: any;
|
|
31
|
+
PCTResizeInfo: any;
|
|
32
|
+
pct?: number;
|
|
33
|
+
}) => {
|
|
34
|
+
width: any;
|
|
35
|
+
height: any;
|
|
36
|
+
deltaX: any;
|
|
37
|
+
deltaY: any;
|
|
38
|
+
};
|
|
39
|
+
updateEdgePointByAnchors: () => void;
|
|
40
|
+
updateRect: ({ deltaX, deltaY }: {
|
|
41
|
+
deltaX: any;
|
|
42
|
+
deltaY: any;
|
|
43
|
+
}) => void;
|
|
44
|
+
updateEllipse: ({ deltaX, deltaY }: {
|
|
45
|
+
deltaX: any;
|
|
46
|
+
deltaY: any;
|
|
47
|
+
}) => void;
|
|
48
|
+
updateDiamond: ({ deltaX, deltaY }: {
|
|
49
|
+
deltaX: any;
|
|
50
|
+
deltaY: any;
|
|
51
|
+
}) => void;
|
|
52
|
+
eventEmit: ({ beforeNode, afterNode }: {
|
|
53
|
+
beforeNode: any;
|
|
54
|
+
afterNode: any;
|
|
55
|
+
}) => void;
|
|
56
|
+
onDragging: ({ deltaX, deltaY }: {
|
|
57
|
+
deltaX: any;
|
|
58
|
+
deltaY: any;
|
|
59
|
+
}) => void;
|
|
60
|
+
/**
|
|
61
|
+
* 由于将拖拽放大缩小改成丝滑模式,这个时候需要在拖拽结束的时候,将节点的位置更新到grid上.
|
|
62
|
+
*/
|
|
63
|
+
onDragEnd: () => void;
|
|
64
|
+
render(): h.JSX.Element;
|
|
65
|
+
}
|
|
66
|
+
export default Control;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { h, Component } from 'preact';
|
|
2
|
+
import { BaseNodeModel, GraphModel } from '@logicflow/core';
|
|
3
|
+
interface IProps {
|
|
4
|
+
model: BaseNodeModel;
|
|
5
|
+
graphModel: GraphModel;
|
|
6
|
+
}
|
|
7
|
+
declare class ControlGroup extends Component<IProps> {
|
|
8
|
+
constructor();
|
|
9
|
+
getResizeControl(): h.JSX.Element[];
|
|
10
|
+
getGroupSolid(): h.JSX.Element;
|
|
11
|
+
render(): h.JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export default ControlGroup;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare enum ModelType {
|
|
2
|
+
NODE = "node",
|
|
3
|
+
CIRCLE_NODE = "circle-node",
|
|
4
|
+
POLYGON_NODE = "polygon-node",
|
|
5
|
+
RECT_NODE = "rect-node",
|
|
6
|
+
HTML_NODE = "html-node",
|
|
7
|
+
TEXT_NODE = "text-node",
|
|
8
|
+
ELLIPSE_NODE = "ellipse-node",
|
|
9
|
+
DIAMOND_NODE = "diamond-node",
|
|
10
|
+
EDGE = "edge",
|
|
11
|
+
LINE_EDGE = "line-edge",
|
|
12
|
+
POLYLINE_EDGE = "polyline-edge",
|
|
13
|
+
BEZIER_EDGE = "bezier-edge",
|
|
14
|
+
GRAPH = "graph"
|
|
15
|
+
}
|
|
16
|
+
export declare function getRectResizeEdgePoint({ point, beforeNode, afterNode }: {
|
|
17
|
+
point: any;
|
|
18
|
+
beforeNode: any;
|
|
19
|
+
afterNode: any;
|
|
20
|
+
}): {
|
|
21
|
+
x: any;
|
|
22
|
+
y: any;
|
|
23
|
+
};
|
|
24
|
+
export declare function getEllipseResizeEdgePoint({ point, beforeNode, afterNode }: {
|
|
25
|
+
point: any;
|
|
26
|
+
beforeNode: any;
|
|
27
|
+
afterNode: any;
|
|
28
|
+
}): any;
|
|
29
|
+
export declare function getDiamondResizeEdgePoint({ point, beforeNode, afterNode }: {
|
|
30
|
+
point: any;
|
|
31
|
+
beforeNode: any;
|
|
32
|
+
afterNode: any;
|
|
33
|
+
}): any;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { h, DiamondNode, DiamondNodeModel } from '@logicflow/core';
|
|
2
|
+
declare class DiamondResizeModel extends DiamondNodeModel {
|
|
3
|
+
private PCTResizeInfo;
|
|
4
|
+
constructor(data: any, graphModel: any);
|
|
5
|
+
initNodeData(data: any): void;
|
|
6
|
+
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
7
|
+
getResizeOutlineStyle(): {
|
|
8
|
+
stroke: string;
|
|
9
|
+
strokeWidth: number;
|
|
10
|
+
strokeDasharray: string;
|
|
11
|
+
};
|
|
12
|
+
getControlPointStyle(): {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
fill: string;
|
|
16
|
+
stroke: string;
|
|
17
|
+
};
|
|
18
|
+
enableProportionResize(turnOn?: boolean): void;
|
|
19
|
+
}
|
|
20
|
+
declare class DiamondResizeView extends DiamondNode {
|
|
21
|
+
getControlGroup(): h.JSX.Element;
|
|
22
|
+
getResizeShape(): h.JSX.Element;
|
|
23
|
+
getShape(): h.JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
declare const EllipseResize: {
|
|
26
|
+
type: string;
|
|
27
|
+
view: typeof DiamondResizeView;
|
|
28
|
+
model: typeof DiamondResizeModel;
|
|
29
|
+
};
|
|
30
|
+
export default EllipseResize;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { h, EllipseNode, EllipseNodeModel } from '@logicflow/core';
|
|
2
|
+
declare class EllipseResizeModel extends EllipseNodeModel {
|
|
3
|
+
private PCTResizeInfo;
|
|
4
|
+
constructor(data: any, graphModel: any);
|
|
5
|
+
initNodeData(data: any): void;
|
|
6
|
+
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
7
|
+
getResizeOutlineStyle(): {
|
|
8
|
+
stroke: string;
|
|
9
|
+
strokeWidth: number;
|
|
10
|
+
strokeDasharray: string;
|
|
11
|
+
};
|
|
12
|
+
getControlPointStyle(): {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
fill: string;
|
|
16
|
+
stroke: string;
|
|
17
|
+
};
|
|
18
|
+
enableProportionResize(turnOn?: boolean): void;
|
|
19
|
+
}
|
|
20
|
+
declare class EllipseResizeView extends EllipseNode {
|
|
21
|
+
getControlGroup(): h.JSX.Element;
|
|
22
|
+
getResizeShape(): h.JSX.Element;
|
|
23
|
+
getShape(): h.JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
declare const EllipseResize: {
|
|
26
|
+
type: string;
|
|
27
|
+
view: typeof EllipseResizeView;
|
|
28
|
+
model: typeof EllipseResizeModel;
|
|
29
|
+
};
|
|
30
|
+
export default EllipseResize;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { h, HtmlNode, HtmlNodeModel } from '@logicflow/core';
|
|
2
|
+
declare class HtmlResizeModel extends HtmlNodeModel {
|
|
3
|
+
private PCTResizeInfo;
|
|
4
|
+
constructor(data: any, graphModel: any);
|
|
5
|
+
initNodeData(data: any): void;
|
|
6
|
+
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
7
|
+
getResizeOutlineStyle(): {
|
|
8
|
+
stroke: string;
|
|
9
|
+
strokeWidth: number;
|
|
10
|
+
strokeDasharray: string;
|
|
11
|
+
};
|
|
12
|
+
getControlPointStyle(): {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
fill: string;
|
|
16
|
+
stroke: string;
|
|
17
|
+
};
|
|
18
|
+
enableProportionResize(turnOn?: boolean): void;
|
|
19
|
+
}
|
|
20
|
+
declare class HtmlResizeView extends HtmlNode {
|
|
21
|
+
getControlGroup(): h.JSX.Element;
|
|
22
|
+
getResizeShape(): h.JSX.Element;
|
|
23
|
+
getShape(): h.JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
declare const HtmlResize: {
|
|
26
|
+
type: string;
|
|
27
|
+
view: typeof HtmlResizeView;
|
|
28
|
+
model: typeof HtmlResizeModel;
|
|
29
|
+
};
|
|
30
|
+
export default HtmlResize;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { h, RectNode, RectNodeModel } from '@logicflow/core';
|
|
2
|
+
declare class RectResizeModel extends RectNodeModel {
|
|
3
|
+
private PCTResizeInfo;
|
|
4
|
+
constructor(data: any, graphModel: any);
|
|
5
|
+
initNodeData(data: any): void;
|
|
6
|
+
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
7
|
+
getResizeOutlineStyle(): {
|
|
8
|
+
fill: string;
|
|
9
|
+
stroke: string;
|
|
10
|
+
strokeWidth: number;
|
|
11
|
+
strokeDasharray: string;
|
|
12
|
+
};
|
|
13
|
+
getControlPointStyle(): {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
fill: string;
|
|
17
|
+
stroke: string;
|
|
18
|
+
};
|
|
19
|
+
resize(deltaX: any, deltaY: any): void;
|
|
20
|
+
enableProportionResize(turnOn?: boolean): void;
|
|
21
|
+
}
|
|
22
|
+
declare class RectResizeView extends RectNode {
|
|
23
|
+
getControlGroup(): h.JSX.Element;
|
|
24
|
+
getResizeShape(): h.JSX.Element;
|
|
25
|
+
getShape(): h.JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
declare const RectResize: {
|
|
28
|
+
type: string;
|
|
29
|
+
view: typeof RectResizeView;
|
|
30
|
+
model: typeof RectResizeModel;
|
|
31
|
+
};
|
|
32
|
+
export default RectResize;
|
|
@@ -0,0 +1,11 @@
|
|
|
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, };
|
|
@@ -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
|
+
};
|