@logicflow/core
Advanced tools
Comparing version 0.3.0-beta.0 to 0.3.0-beta.1
@@ -6,2 +6,26 @@ # Change Log | ||
# [0.3.0-beta.1](https://github.com/didi/LogicFlow/compare/@logicflow/core@0.3.0-alpha.1...@logicflow/core@0.3.0-beta.1) (2021-04-06) | ||
### Bug Fixes | ||
* edge updateText position ([e333787](https://github.com/didi/LogicFlow/commit/e3337878bed766eaab9345c9110e202cc477a56c)) | ||
* invalid setTheme for rect size ([4ed7e1a](https://github.com/didi/LogicFlow/commit/4ed7e1af69ddf31956e454748da4ea5adcb03be6)) | ||
* **core:** fix the bug when drag edges ([36aed3a](https://github.com/didi/LogicFlow/commit/36aed3a455e9bfd04ad5a0b4aae294863184069c)) | ||
* the text content misalignment caused by switching nodes ([38193f7](https://github.com/didi/LogicFlow/commit/38193f7a28cb004c18dc7717f854d83269bf4194)) | ||
* **extension:** mini-map default disable control & selection-select ([297cecf](https://github.com/didi/LogicFlow/commit/297cecf4637ca7a045619a10cd9298feacc631ea)) | ||
* minimap extension custom disabled plugin ([3768d14](https://github.com/didi/LogicFlow/commit/3768d149b6a72e4c251e287432b6070dcbfabce6)) | ||
* **all:** add rimraf ([c526ad8](https://github.com/didi/LogicFlow/commit/c526ad840b1e2620a3221d416f7a03e9c6d3583c)) | ||
* move clone guard to shortcut ([c5643da](https://github.com/didi/LogicFlow/commit/c5643daa8ca7b2f905db81357444e5bba64a5ee7)) | ||
### Features | ||
* change cloneElements to addElements ([6c59d74](https://github.com/didi/LogicFlow/commit/6c59d749a53e5263f5cf630702453054347215f6)) | ||
* edge text support hover style ([ffc75d4](https://github.com/didi/LogicFlow/commit/ffc75d45e0ef42b9dbca1be489fa749186aa81b0)) | ||
# [0.3.0-beta.0](https://github.com/didi/LogicFlow/compare/@logicflow/core@0.3.0-alpha.1...@logicflow/core@0.3.0-beta.0) (2021-04-06) | ||
@@ -8,0 +32,0 @@ |
{ | ||
"name": "@logicflow/core", | ||
"version": "0.3.0-beta.0", | ||
"version": "0.3.0-beta.1", | ||
"description": "LogicFlow core, to quickly build flowchart editor", | ||
@@ -95,3 +95,3 @@ "main": "dist/logic-flow.js", | ||
}, | ||
"gitHead": "f907ca210189204b799953ce7a0d59fe5ce7c460" | ||
"gitHead": "86b2eb5c6042524860306e5311ebdf22fce0485e" | ||
} |
@@ -29,9 +29,5 @@ import { h } from 'preact'; | ||
import Keyboard from './keyboard'; | ||
import { EdgeConfig, EdgeFilter, NodeConfig, NodeAttribute, Extension, ComponentRender, FocusOnArgs, RegisterElementFn, EdgeAttribute, EdgeData } from './type'; | ||
import { EdgeConfig, EdgeFilter, NodeConfig, NodeAttribute, Extension, ComponentRender, FocusOnArgs, RegisterElementFn, EdgeAttribute, EdgeData, GraphConfigData } from './type'; | ||
import SnaplineModel from './model/SnaplineModel'; | ||
import { EditConfigInterface } from './model/EditConfigModel'; | ||
declare type GraphConfigData = { | ||
nodes: NodeConfig[]; | ||
edges: EdgeConfig[]; | ||
}; | ||
declare type GraphConfigModel = { | ||
@@ -64,3 +60,2 @@ nodes: BaseNodeModel[]; | ||
emit(evt: string, arg: Record<string, string | number | object>): void; | ||
getEvents(): void; | ||
/** | ||
@@ -72,3 +67,3 @@ * 添加扩展, 待讨论,这里是不是静态方法好一些? | ||
static use(extension: Extension): void; | ||
installPlugins(activePlugins: any): void; | ||
installPlugins(disabledPlugins?: any[]): void; | ||
__installPlugin(extension: any): void; | ||
@@ -129,8 +124,15 @@ register(type: string, fn: RegisterElementFn): void; | ||
focusOn(focusOnArgs: FocusOnArgs): void; | ||
setTheme(style: any): void; | ||
/** | ||
* 删除节点 | ||
* @param {string} nodeId 节点Id | ||
* 设置默认的连线类型 | ||
* @param type Options.EdgeType | ||
*/ | ||
deleteNode(nodeId: string): void; | ||
setDefaultEdgeType(type: Options.EdgeType): void; | ||
/** | ||
* 更新节点或连线文案 | ||
* @param id 节点或者连线id | ||
* @param value 文案内容 | ||
*/ | ||
updateText(id: string, value: string): void; | ||
/** | ||
* 添加节点 | ||
@@ -141,15 +143,7 @@ * @param nodeConfig 节点配置 | ||
/** | ||
* 添加多个元素, 包括连线和节点。 | ||
* 删除节点 | ||
* @param {string} nodeId 节点Id | ||
*/ | ||
cloneElements({ nodes, edges }: GraphConfigData): GraphConfigModel; | ||
clearSelectElements(): void; | ||
deleteNode(nodeId: string): void; | ||
/** | ||
* 获取选中的元素数据 | ||
* @param isIgnoreCheck 是否包括sourceNode和targetNode没有被选中的连线,默认包括。 | ||
* 复制的时候不能包括此类连线, 因为复制的时候不允许悬空的连线。 | ||
*/ | ||
getSelectElements(isIgnoreCheck?: boolean): void; | ||
setProperties(id: string, properties: Object): void; | ||
getProperties(id: string): Object; | ||
/** | ||
* 显示节点文本编辑框 | ||
@@ -164,15 +158,2 @@ * @param nodeId 节点id | ||
cloneNode(nodeId: string): BaseNodeModel; | ||
/** | ||
* 获取节点对象 | ||
* @param nodeId 节点Id | ||
*/ | ||
getNodeModel(nodeId: string): BaseNodeModel; | ||
/** | ||
* 获取节点数据 | ||
* @param nodeId 节点Id | ||
*/ | ||
getNodeData(nodeId: string): NodeAttribute; | ||
setNodeData(nodeAttribute: NodeAttribute): void; | ||
setView(type: string, component: IReactComponent): void; | ||
getView: (type: string) => any; | ||
createEdge(edgeConfig: EdgeConfig): void; | ||
@@ -188,17 +169,12 @@ /** | ||
}): void; | ||
/** | ||
* 更新节点或连线文案 | ||
* @param id 节点或者连线id | ||
* @param value 文案内容 | ||
*/ | ||
updateText(id: string, value: string): void; | ||
getEdge(config: EdgeFilter): BaseEdgeModel[]; | ||
/** | ||
* 获取边的model | ||
* @param edgeId 边的Id | ||
* 获取节点对象 | ||
* @param nodeId 节点Id | ||
*/ | ||
getEdgeModelById(edgeId: string): BaseEdgeModel; | ||
getNodeModel(nodeId: string): BaseNodeModel; | ||
getNodeData(nodeId: string): NodeAttribute; | ||
setNodeData(nodeAttribute: NodeAttribute): void; | ||
getEdgeData(edgeId: string): EdgeData; | ||
setEdgeData(edgeAttribute: EdgeAttribute): void; | ||
setDefaultEdgeType(type: Options.EdgeType): void; | ||
/** | ||
@@ -216,7 +192,15 @@ * 获取流程绘图数据 | ||
}; | ||
setTheme(style: any): void; | ||
createFakerNode(nodeConfig: any): any; | ||
removeFakerNode(): void; | ||
setNodeSnapLine(data: any): void; | ||
/** | ||
* 设置元素的自定义属性 | ||
* @param id 元素的id | ||
* @param properties 自定义属性 | ||
*/ | ||
setProperties(id: string, properties: Object): void; | ||
/** | ||
* 获取元素的自定义属性 | ||
* @param id 元素的id | ||
* @returns 自定义属性 | ||
*/ | ||
getProperties(id: string): Object; | ||
/** | ||
* 更新流程图编辑相关设置 | ||
@@ -226,13 +210,6 @@ */ | ||
/** | ||
* 获取 | ||
* 获取流程图编辑相关设置 | ||
*/ | ||
getEditConfig(): Partial<import("./model/EditConfigModel").default>; | ||
/** | ||
* 获取指定区域坐标,此区域必须是DOM层,也就是可视区域。 | ||
* @param leftTopPoint 区域左上角坐标, dom层坐标 | ||
* @param rightBottomPoint 区域右下角坐标,dom层坐标 | ||
*/ | ||
getAreaElement(leftTopPoint: any, rightBottomPoint: any): any[]; | ||
removeNodeSnapLine(): void; | ||
/** | ||
* 获取事件位置相对于画布左上角的坐标 | ||
@@ -255,4 +232,32 @@ * @param {number} x 事件x坐标 | ||
}; | ||
/** | ||
* 获取选中的元素数据 | ||
* @param isIgnoreCheck 是否包括sourceNode和targetNode没有被选中的连线,默认包括。 | ||
* 复制的时候不能包括此类连线, 因为复制的时候不允许悬空的连线。 | ||
*/ | ||
getSelectElements(isIgnoreCheck?: boolean): void; | ||
/** | ||
* 添加多个元素, 包括连线和节点。 | ||
*/ | ||
addElements({ nodes, edges }: GraphConfigData): GraphConfigModel; | ||
clearSelectElements(): void; | ||
createFakerNode(nodeConfig: any): any; | ||
removeFakerNode(): void; | ||
setNodeSnapLine(data: any): void; | ||
/** | ||
* 获取指定区域坐标,此区域必须是DOM层,也就是可视区域。 | ||
* @param leftTopPoint 区域左上角坐标, dom层坐标 | ||
* @param rightBottomPoint 区域右下角坐标,dom层坐标 | ||
*/ | ||
getAreaElement(leftTopPoint: any, rightBottomPoint: any): any[]; | ||
removeNodeSnapLine(): void; | ||
/** | ||
* 获取边的model | ||
* @param edgeId 边的Id | ||
*/ | ||
getEdgeModelById(edgeId: string): BaseEdgeModel; | ||
setView(type: string, component: IReactComponent): void; | ||
getView: (type: string) => any; | ||
render(graphData?: {}): void; | ||
} | ||
export { BaseEdge, BaseEdgeModel, BaseNode, BaseNodeModel, RectNode, RectNodeModel, CircleNode, CircleNodeModel, PolygonNode, PolygonNodeModel, TextNode, TextNodeModel, LineEdge, LineEdgeModel, PolylineEdge, PolylineEdgeModel, EllipseNode, EllipseNodeModel, mobx, h, }; |
@@ -9,3 +9,2 @@ import { Point } from '../../type'; | ||
constructor(data: any, graphModel: GraphModel); | ||
setAttributes(): void; | ||
get anchors(): Point[]; | ||
@@ -12,0 +11,0 @@ } |
import { DndOptions } from './view/behavior/DnD'; | ||
import { GridOptions } from './view/overlay/Grid'; | ||
import { BackgroundConfig } from './view/overlay/BackgroundOverlay'; | ||
import { Style, NodeData, EdgeData } from './type'; | ||
import { Style, NodeData, EdgeData, GraphConfigData } from './type'; | ||
import { KeyboardDef } from './keyboard'; | ||
@@ -18,3 +18,3 @@ export declare type EdgeType = 'line' | 'polyline' | 'bezier'; | ||
isSilentMode?: boolean; | ||
activePlugins?: string[]; | ||
disabledPlugins?: string[]; | ||
edgeType?: EdgeType; | ||
@@ -32,3 +32,3 @@ snapline?: boolean; | ||
export interface GuardsTypes { | ||
beforeClone?: (data: NodeData) => boolean; | ||
beforeClone?: (data: NodeData | GraphConfigData) => boolean; | ||
beforeDelete?: (data: NodeData | EdgeData) => boolean; | ||
@@ -35,0 +35,0 @@ } |
@@ -38,2 +38,6 @@ import mobx from 'mobx'; | ||
} & Point; | ||
export declare type GraphConfigData = { | ||
nodes: NodeConfig[]; | ||
edges: EdgeConfig[]; | ||
}; | ||
export declare type NodeConfig = { | ||
@@ -186,2 +190,7 @@ id?: string; | ||
fontFamily?: string; | ||
textHoverStyle?: { | ||
fill?: string; | ||
stroke?: string; | ||
radius?: number; | ||
}; | ||
}; | ||
@@ -223,3 +232,2 @@ export declare type NodeTextStyle = TextStyle; | ||
export declare type FocusOnArgs = { | ||
type?: string; | ||
id?: string; | ||
@@ -226,0 +234,0 @@ coordinate?: { |
@@ -13,3 +13,6 @@ import { h, Component } from 'preact'; | ||
}; | ||
export default class BaseText extends Component<IProps> { | ||
declare type IState = { | ||
isHoverd: boolean; | ||
}; | ||
export default class BaseText extends Component<IProps, IState> { | ||
dragHandler: (ev: MouseEvent) => void; | ||
@@ -16,0 +19,0 @@ sumDeltaX: number; |
import { h } from 'preact'; | ||
import BaseText from './BaseText'; | ||
export default class LineText extends BaseText { | ||
constructor(config: any); | ||
getBackgroud(): h.JSX.Element; | ||
setHoverON: () => void; | ||
setHoverOFF: () => void; | ||
getShape(): h.JSX.Element; | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
552871
3093