Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@logicflow/core

Package Overview
Dependencies
Maintainers
5
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logicflow/core - npm Package Compare versions

Comparing version 0.6.16 to 0.7.0

8

package.json
{
"name": "@logicflow/core",
"version": "0.6.16",
"version": "0.7.0",
"description": "LogicFlow core, to quickly build flowchart editor",
"main": "dist/logic-flow.js",
"license": "Apache 2.0",
"license": "Apache-2.0",
"types": "types/index.d.ts",
"scripts": {
"dev": "cross-env NODE_ENV=development MOCK_TYPE=mock webpack-dev-server --client-log-level warning --config scripts/webpack.config.dev.js",
"dev": "cross-env NODE_ENV=development webpack-dev-server --client-log-level warning --config scripts/webpack.config.dev.js",
"clean": "rimraf dist lib esm cjs",

@@ -84,3 +84,3 @@ "build": "npm run build:umd",

],
"gitHead": "28a1129c567aceb0a2b485ad3b382ba919cf79ed"
"gitHead": "ab8cc6126e9dfa5c4fb18037538a374d3a0b0521"
}

@@ -67,3 +67,4 @@ export declare enum ElementState {

HISTORY_CHANGE = "history:change",
TEXT_UPDATE = "text:update"
TEXT_UPDATE = "text:update",
GRAPH_TRANSFORM = "graph:transform"
}

@@ -70,0 +71,0 @@ export declare enum SegmentDirection {

@@ -77,6 +77,6 @@ import GraphModel from './model/GraphModel';

getTransform(): {
SCALE_X: number;
SCALE_Y: number;
TRANSLATE_X: number;
TRANSLATE_Y: number;
SCALE_X: any;
SCALE_Y: any;
TRANSLATE_X: any;
TRANSLATE_Y: any;
};

@@ -194,6 +194,3 @@ /**

*/
getGraphRawData(): {
nodes: import("./type").NodeData[];
edges: EdgeData[];
};
getGraphRawData(): GraphConfigData;
/**

@@ -212,2 +209,9 @@ * 设置元素的自定义属性

/**
* 修改节点的id, 如果
* @returns 是否修改成功
*/
changeNodeId<T extends string>(oldId: string, newId?: T): false | T | string;
changeEdgeId<T extends string>(oldId: string, newId?: T): false | T | string;
updateGraphId(): void;
/**
* 更新流程图编辑相关设置

@@ -234,4 +238,4 @@ */

canvasOverlayPosition: {
x: number;
y: number;
x: any;
y: any;
};

@@ -246,3 +250,5 @@ };

nodes: any[];
edges: any[];
edges: any[]; /**
* 获取缩放的值和平移的值。
*/
};

@@ -249,0 +255,0 @@ /**

import { ElementState } from '../constant/constant';
import { TextConfig, AdditionData } from '../type';
interface IBaseModel {
readonly id: string;
id: string;
modelType: string;

@@ -6,0 +6,0 @@ type: string;

@@ -6,3 +6,3 @@ import { IBaseModel } from '../BaseModel';

declare class BaseEdgeModel implements IBaseModel {
readonly id: string;
id: string;
readonly BaseType = ElementType.EDGE;

@@ -9,0 +9,0 @@ state: number;

@@ -29,2 +29,3 @@ import BaseEdgeModel from './BaseEdgeModel';

updatePoints(): void;
updatePath(): void;
updateStartPoint(anchor: any): void;

@@ -31,0 +32,0 @@ updateEndPoint(anchor: any): void;

import BaseNodeModel from './node/BaseNodeModel';
import BaseEdgeModel from './edge/BaseEdgeModel';
import EditConfigModel from './EditConfigModel';
import TransfromModel from './TransformModel';
import { IBaseModel } from './BaseModel';

@@ -22,3 +21,3 @@ import { ElementState, ModelType, ElementType } from '../constant/constant';

selectElement: BaseNodeModel | BaseEdgeModel;
idGenerator: () => number | string;
idGenerator: (type?: string) => number | string;
nodeMoveRules: NodeMoveRule[];

@@ -36,3 +35,3 @@ edgeType: string;

background: any;
transformMatrix: TransfromModel;
transformMatrix: any;
editConfig: EditConfigModel;

@@ -78,4 +77,4 @@ gridSize: number;

canvasOverlayPosition: {
x: number;
y: number;
x: any;
y: any;
};

@@ -108,2 +107,7 @@ };

updateAttributes(id: string, attributes: object): void;
/**
* 修改指定节点id
*/
changeNodeId<T extends string>(oldId: any, newId?: T | string): false | T | string;
changeEdgeId<T extends string>(oldId: string, newId?: string): false | T | string;
setFakerNode(nodeModel: BaseNodeModel): void;

@@ -110,0 +114,0 @@ removeFakerNode(): void;

@@ -15,3 +15,3 @@ import { ElementState, ModelType, ElementType } from '../../constant/constant';

export default class BaseNodeModel implements IBaseModel {
readonly id: string;
id: string;
readonly BaseType = ElementType.NODE;

@@ -63,3 +63,3 @@ modelType: ModelType;

initNodeData(data: any): void;
createId(): any;
createId(): string;
formatText(data: any): void;

@@ -66,0 +66,0 @@ setAttributes(): void;

@@ -0,1 +1,2 @@

import EventEmitter from '../event/eventEmitter';
import { PointTuple } from '../type';

@@ -27,2 +28,4 @@ export interface TransfromInterface {

ZOOM_SIZE: number;
eventCenter: EventEmitter;
constructor(eventCenter: any);
setZoomMiniSize(size: number): void;

@@ -55,2 +58,3 @@ setZoomMaxSize(size: number): void;

zoom(isZoomIn?: boolean, point?: PointTuple): boolean;
private emitGraphTransform;
resetZoom(): void;

@@ -57,0 +61,0 @@ translate(x: number, y: number): void;

@@ -0,1 +1,6 @@

import { GraphConfigData } from '..';
export declare const createUuid: () => string;
/**
* 重新刷新流程图的所有id
*/
export declare const refreshGraphId: (graphData: GraphConfigData, prefix?: string) => GraphConfigData;

@@ -13,3 +13,2 @@ import { h, Component } from 'preact';

startTime: number;
preStartTime: number;
contextMenuTime: number;

@@ -16,0 +15,0 @@ clickTimer: number;

import { h } from 'preact';
import BaseNode from './BaseNode';
export default class HtmlNode extends BaseNode {
rootElId: string;
constructor(props: any);
ref: HTMLElement;
setRef: (dom: any) => void;
get rootEl(): HTMLElement;

@@ -7,0 +7,0 @@ setHtml(rootEl: HTMLElement): void;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc