@logicflow/core 1.0.4 → 1.0.7-alpha.1
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/dist/logic-flow.js +2 -2
- package/package.json +1 -1
- package/types/LogicFlow.d.ts +8 -1
- package/types/model/GraphModel.d.ts +1 -1
- package/types/model/node/BaseNodeModel.d.ts +1 -1
- package/types/model/node/CircleNodeModel.d.ts +1 -1
- package/types/model/node/DiamondNodeModel.d.ts +1 -1
- package/types/model/node/EllipseNodeModel.d.ts +1 -1
- package/types/model/node/HtmlNodeModel.d.ts +1 -1
- package/types/model/node/PolygonNodeModel.d.ts +1 -1
- package/types/model/node/RectNodeModel.d.ts +1 -1
- package/types/options.d.ts +9 -1
- package/types/util/edge.d.ts +2 -2
- package/types/view/edge/Arrow.d.ts +1 -1
- package/types/view/edge/PolylineEdge.d.ts +1 -1
package/package.json
CHANGED
package/types/LogicFlow.d.ts
CHANGED
|
@@ -42,6 +42,13 @@ export default class LogicFlow {
|
|
|
42
42
|
options: Options.Definition;
|
|
43
43
|
snaplineModel: SnaplineModel;
|
|
44
44
|
components: ComponentRender[];
|
|
45
|
+
/**
|
|
46
|
+
* 个性配置的插件,覆盖全局配置的插件
|
|
47
|
+
*/
|
|
48
|
+
plugins: Extension[];
|
|
49
|
+
/**
|
|
50
|
+
* 全局配置的插件,所有的LogicFlow都会使用
|
|
51
|
+
*/
|
|
45
52
|
static extensions: Map<string, Extension>;
|
|
46
53
|
/**
|
|
47
54
|
* 自定义数据格式转换方法
|
|
@@ -195,7 +202,7 @@ export default class LogicFlow {
|
|
|
195
202
|
* })
|
|
196
203
|
* @param {object} edgeConfig
|
|
197
204
|
*/
|
|
198
|
-
addEdge(edgeConfig: EdgeConfig):
|
|
205
|
+
addEdge(edgeConfig: EdgeConfig): _Model.BaseEdgeModel;
|
|
199
206
|
/**
|
|
200
207
|
* 删除边
|
|
201
208
|
* @param {string} edgeId 边Id
|
package/types/options.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GridOptions } from './view/overlay/Grid';
|
|
2
2
|
import { BackgroundConfig } from './view/overlay/BackgroundOverlay';
|
|
3
|
-
import { NodeData, EdgeData, GraphConfigData } from './type';
|
|
3
|
+
import { NodeData, EdgeData, Extension, GraphConfigData } from './type';
|
|
4
4
|
import { KeyboardDef } from './keyboard';
|
|
5
5
|
import { EditConfigInterface } from './model/EditConfigModel';
|
|
6
6
|
import { Theme } from './constant/DefaultTheme';
|
|
@@ -85,6 +85,10 @@ export declare type Definition = {
|
|
|
85
85
|
* todo: 将multipleSelect放到插件中
|
|
86
86
|
*/
|
|
87
87
|
disabledTools?: string[];
|
|
88
|
+
/**
|
|
89
|
+
* 是否配置个性插件,覆盖全局配置的插件
|
|
90
|
+
*/
|
|
91
|
+
plugins?: Extension[];
|
|
88
92
|
[key: string]: any;
|
|
89
93
|
} & EditConfigInterface;
|
|
90
94
|
export interface GuardsTypes {
|
|
@@ -169,6 +173,10 @@ export declare function get(options: Definition): {
|
|
|
169
173
|
* todo: 将multipleSelect放到插件中
|
|
170
174
|
*/
|
|
171
175
|
disabledTools?: string[];
|
|
176
|
+
/**
|
|
177
|
+
* 是否配置个性插件,覆盖全局配置的插件
|
|
178
|
+
*/
|
|
179
|
+
plugins?: Extension[];
|
|
172
180
|
} & EditConfigInterface;
|
|
173
181
|
export declare const defaults: {
|
|
174
182
|
background: boolean;
|
package/types/util/edge.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare const isSegmentsInNode: (start: Point, end: Point, node: BaseNode
|
|
|
56
56
|
export declare const isSegmentsCrossNode: (start: Point, end: Point, node: BaseNode) => boolean;
|
|
57
57
|
export declare const getCrossPointInRect: (start: Point, end: Point, node: BaseNode) => Point;
|
|
58
58
|
export declare const segmentDirection: (start: Point, end: Point) => Direction;
|
|
59
|
-
export declare const
|
|
59
|
+
export declare const points2PointsList: (points: string) => PolyPoint[];
|
|
60
60
|
export declare const getSimplePoints: (start: any, end: any, sPoint: any, tPoint: any) => Point[];
|
|
61
61
|
export declare const getBytesLength: (word: string) => number;
|
|
62
62
|
export declare const getTextWidth: (text: any, font: any) => any;
|
|
@@ -67,7 +67,7 @@ declare type AppendAttributesType = {
|
|
|
67
67
|
strokeWidth: number;
|
|
68
68
|
strokeDasharray: string;
|
|
69
69
|
};
|
|
70
|
-
export declare const
|
|
70
|
+
export declare const getAppendAttributes: (appendInfo: any) => AppendAttributesType;
|
|
71
71
|
export declare type IBezierControls = {
|
|
72
72
|
sNext: Point;
|
|
73
73
|
ePre: Point;
|
|
@@ -15,7 +15,7 @@ declare type IProps = {
|
|
|
15
15
|
style: ArrowStyle;
|
|
16
16
|
};
|
|
17
17
|
export default class Arrow extends Component<IProps> {
|
|
18
|
-
|
|
18
|
+
getArrowAttributes(): ArrowAttributesType;
|
|
19
19
|
getShape(): h.JSX.Element;
|
|
20
20
|
render(): h.JSX.Element;
|
|
21
21
|
}
|
|
@@ -25,7 +25,7 @@ export default class PolylineEdge extends BaseEdge {
|
|
|
25
25
|
getEdge(): h.JSX.Element;
|
|
26
26
|
getShape(): h.JSX.Element;
|
|
27
27
|
getArrowInfo(): ArrowInfo;
|
|
28
|
-
|
|
28
|
+
getAppendAttributes(appendInfo: AppendInfo): AppendAttributesType;
|
|
29
29
|
getAppendShape(appendInfo: AppendInfo): h.JSX.Element;
|
|
30
30
|
getAppendWidth(): h.JSX.Element;
|
|
31
31
|
}
|