@logicflow/core
Advanced tools
Comparing version 1.2.0-alpha.3 to 1.2.0-alpha.4
{ | ||
"name": "@logicflow/core", | ||
"version": "1.2.0-alpha.3", | ||
"version": "1.2.0-alpha.4", | ||
"description": "LogicFlow core, to quickly build flowchart editor", | ||
@@ -22,3 +22,3 @@ "main": "dist/logic-flow.js", | ||
"build-analyse": "cross-env analyse=true npm run build", | ||
"types": "tsc -d --declarationDir ./types --outDir temp && rimraf temp", | ||
"types": "tsc -d --declarationDir ./tempTypes --outDir temp && rimraf types && mv ./tempTypes/src ./types && rimraf temp && rimraf tempTypes", | ||
"lint": "eslint . --ext .ts,.tsx", | ||
@@ -77,5 +77,4 @@ "publish-lib": "npm run types & npm run clean && npm run build && npm publish", | ||
"lodash-es": "^4.17.15", | ||
"mobx": "^5.15.7", | ||
"mobx-react": "^6.3.0", | ||
"mobx-utils": "^5.6.1", | ||
"mobx": "^6.5.0", | ||
"mobx-react": "^7.3.0", | ||
"prettier": "^2.2.1", | ||
@@ -82,0 +81,0 @@ "rimraf": "^3.0.2", |
@@ -49,2 +49,4 @@ export declare enum ElementState { | ||
NODE_MOUSELEAVE = "node:mouseleave", | ||
NODE_TEXT_UPDATE = "node:text-update", | ||
NODE_PROPERTY_UPDATE = "node:property-update", | ||
NODE_CONTEXTMENU = "node:contextmenu", | ||
@@ -57,2 +59,4 @@ EDGE_DELETE = "edge:delete", | ||
EDGE_MOUSELEAVE = "edge:mouseleave", | ||
EDGE_TEXT_UPDATE = "edge:text-update", | ||
EDGE_PROPERTY_UPDATE = "edge:property-update", | ||
EDGE_CONTEXTMENU = "edge:contextmenu", | ||
@@ -81,3 +85,5 @@ EDGE_ADJUST = "edge:adjust", | ||
HISTORY_CHANGE = "history:change", | ||
HISTORY_INSERT = "history:insert", | ||
TEXT_UPDATE = "text:update", | ||
TEXT_DROP = "text:drop", | ||
GRAPH_TRANSFORM = "graph:transform", | ||
@@ -84,0 +90,0 @@ GRAPH_RENDERED = "graph:rendered" |
@@ -11,3 +11,4 @@ import EventEmitter from '../event/eventEmitter'; | ||
eventCenter: EventEmitter; | ||
constructor(eventCenter: any); | ||
model: any; | ||
constructor(graphModel: any, isPropertiesChangeHistory: any); | ||
add(data: any): void; | ||
@@ -18,5 +19,6 @@ undoAble(): boolean; | ||
redo(): any; | ||
watch(model: any): void; | ||
emitHistoryChange(): void; | ||
listenHistoryChange: () => void; | ||
} | ||
export { History }; | ||
export default History; |
@@ -1,7 +0,7 @@ | ||
import { h } from 'preact'; | ||
import LogicFlow from './LogicFlow'; | ||
import * as LogicFlowUtil from './util'; | ||
export declare function observer<P>(props: P): any; | ||
export { LogicFlow, h }; | ||
export { LogicFlowUtil }; | ||
import { version } from '../package.json'; | ||
export { h } from 'preact'; | ||
export * from './util/stateUtil'; | ||
export { LogicFlowUtil, version, LogicFlow }; | ||
export * from './type/index'; | ||
@@ -8,0 +8,0 @@ export * from './view'; |
@@ -471,3 +471,3 @@ import GraphModel from './model/GraphModel'; | ||
*/ | ||
emit(evt: string, arg: any): void; | ||
emit(evt: string, arg?: any): void; | ||
/** | ||
@@ -523,3 +523,3 @@ * 添加扩展, 待讨论,这里是不是静态方法好一些? | ||
static t(text: string): string; | ||
renderRawData(graphRawData: any): void; | ||
renderRawData(graphRawData: any, isForce?: boolean): void; | ||
/** | ||
@@ -553,3 +553,3 @@ * 渲染图 | ||
*/ | ||
render(graphData?: {}): void; | ||
render(graphData?: {}, isForce?: boolean): void; | ||
/** | ||
@@ -556,0 +556,0 @@ * 内部保留方法 |
@@ -41,2 +41,3 @@ import { IBaseModel } from '../BaseModel'; | ||
constructor(data: EdgeConfig, graphModel: GraphModel); | ||
init(): void; | ||
/** | ||
@@ -43,0 +44,0 @@ * @override 支持重写 |
@@ -8,2 +8,3 @@ import BaseEdgeModel from './BaseEdgeModel'; | ||
path: string; | ||
constructor(data: any, graphModel: any); | ||
initEdgeData(data: any): void; | ||
@@ -10,0 +11,0 @@ getEdgeStyle(): { |
@@ -9,2 +9,3 @@ import { ModelType } from '../../constant/constant'; | ||
dbClickPosition: Point; | ||
constructor(data: any, graphModel: any); | ||
initEdgeData(data: any): void; | ||
@@ -11,0 +12,0 @@ getEdgeStyle(): { |
@@ -62,2 +62,3 @@ import { OutlineTheme } from '../../constant/DefaultTheme'; | ||
constructor(data: NodeConfig, graphModel: GraphModel); | ||
init(): void; | ||
/** | ||
@@ -109,2 +110,3 @@ * 获取进入当前节点的边和节点 | ||
getData(): NodeData; | ||
setIsDragging(isDragging: any): void; | ||
/** | ||
@@ -198,3 +200,6 @@ * 用于在历史记录时获取节点数据, | ||
setZIndex(zIndex?: number): void; | ||
/** | ||
* @deprecated 不推荐直接使用updateAttributes,请使用setProperties、updateText、move等方法更新节点属性。 | ||
*/ | ||
updateAttributes(attributes: any): void; | ||
} |
@@ -6,2 +6,3 @@ import BaseNodeModel from './BaseNodeModel'; | ||
r: number; | ||
constructor(data: any, graphData: any); | ||
get width(): number; | ||
@@ -8,0 +9,0 @@ get height(): number; |
@@ -8,2 +8,3 @@ import { Point, PointTuple } from '../../type'; | ||
ry: number; | ||
constructor(data: any, graphData: any); | ||
getNodeStyle(): { | ||
@@ -10,0 +11,0 @@ [x: string]: any; |
@@ -7,2 +7,3 @@ import BaseNodeModel from './BaseNodeModel'; | ||
ry: number; | ||
constructor(data: any, graphData: any); | ||
getNodeStyle(): { | ||
@@ -9,0 +10,0 @@ [x: string]: any; |
@@ -7,2 +7,3 @@ import { Point, PointTuple } from '../../type'; | ||
points: PointTuple[]; | ||
constructor(data: any, graphModel: any); | ||
getNodeStyle(): { | ||
@@ -9,0 +10,0 @@ [x: string]: any; |
@@ -6,2 +6,3 @@ import BaseNodeModel from './BaseNodeModel'; | ||
radius: number; | ||
constructor(data: any, graphModel: any); | ||
getDefaultAnchor(): { | ||
@@ -8,0 +9,0 @@ x: number; |
@@ -5,2 +5,3 @@ import BaseNodeModel from './BaseNodeModel'; | ||
modelType: ModelType; | ||
constructor(data: any, graphModel: any); | ||
getTextStyle(): { | ||
@@ -7,0 +8,0 @@ [x: string]: any; |
@@ -64,2 +64,9 @@ import { GridOptions } from './view/overlay/Grid'; | ||
/** | ||
* 节点、连线的属性的变化是否会记录到history中,默认是。 | ||
* 例如:节点的一个属性为active, 在自定义节点时这个属性为true节点高亮。 | ||
* 那么在isPropertiesChangeHistory为true的情况下,将节点active设置为true | ||
* 会在历史记录中多一个active为false的快照。 | ||
*/ | ||
isPropertiesChangeHistory?: boolean; | ||
/** | ||
* 是否开启局部渲染,默认不开启 | ||
@@ -111,2 +118,3 @@ */ | ||
textEdit: boolean; | ||
isPropertiesChangeHistory: boolean; | ||
disabledTools: any[]; | ||
@@ -161,2 +169,9 @@ } & { | ||
/** | ||
* 节点、连线的属性的变化是否会记录到history中,默认是。 | ||
* 例如:节点的一个属性为active, 在自定义节点时这个属性为true节点高亮。 | ||
* 那么在isPropertiesChangeHistory为true的情况下,将节点active设置为true | ||
* 会在历史记录中多一个active为false的快照。 | ||
*/ | ||
isPropertiesChangeHistory?: boolean; | ||
/** | ||
* 是否开启局部渲染,默认不开启 | ||
@@ -203,4 +218,5 @@ */ | ||
textEdit: boolean; | ||
isPropertiesChangeHistory: boolean; | ||
disabledTools: any[]; | ||
}; | ||
export {}; |
@@ -31,2 +31,3 @@ import { h, Component } from 'preact'; | ||
inputHandler: (ev: any) => void; | ||
keydownHandler: (ev: any) => void; | ||
placeCaretAtEnd(el: any): void; | ||
@@ -33,0 +34,0 @@ render(): h.JSX.Element; |
@@ -16,3 +16,8 @@ import { h, Component } from 'preact'; | ||
stepScrollY: number; | ||
ref: HTMLElement; | ||
constructor(props: IProps); | ||
componentDidMount(): void; | ||
componentWillUnmount(): void; | ||
setRef: (dom: any) => void; | ||
get rootEl(): HTMLElement; | ||
onDragging: ({ deltaX, deltaY }: { | ||
@@ -19,0 +24,0 @@ deltaX: any; |
@@ -25,2 +25,3 @@ import { h, Component } from 'preact'; | ||
}) => void; | ||
onDragEnd: (e: any) => void; | ||
dblClickHandler: () => void; | ||
@@ -27,0 +28,0 @@ mouseDownHandle: (ev: MouseEvent) => void; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
48
4268
589735
98