
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@ant-design/flowchart
Advanced tools
$ npm install @ant-design/flowchart
import React from 'react';
import { Flowchart } from '@ant-design/flowchart';
import 'antd/dist/antd.css';
import '@ant-design/flowchart/dist/index.css';
const DemoFlowchart = () => {
return (
<div style={{ height: 600 }}>
<Flowchart
onSave={(d) => {
console.log(d, JSON.stringify(d));
}}
toolbarPanelProps={{
position: {
top: 0,
left: 0,
right: 0,
},
}}
scaleToolbarPanelProps={{
layout: 'horizontal',
position: {
right: 0,
top: -40,
},
style: {
width: 150,
height: 39,
left: 'auto',
background: 'transparent',
},
}}
canvasProps={{
position: {
top: 40,
left: 0,
right: 0,
bottom: 0,
},
}}
nodePanelProps={{
position: { width: 160, top: 40, bottom: 0, left: 0 },
}}
detailPanelProps={{
position: { width: 200, top: 40, bottom: 0, right: 0 },
}}
/>
</div>
);
};
export default DemoFlowchart;
Preview
<img src=https://gw.alipayobjects.com/zos/antfincdn/gqf81qzYtJ/ae69e47b-2e1c-4dbb-9619-9a852b402d5c.png height=240>
export interface FlowchartProps extends FlowchartContainerProps {
/** 默认数据 */
data?: Datum;
/** 画布是否自动居中 */
isAutoCenter?: boolean;
/** 节点面板配置 */
nodePanelProps?: NodePanelProps;
/** 画布主要区域配置 */
canvasProps?: CanvasProps;
/**
* @title 画布状态
* @description scan 会禁用一些画布事件,例如连线、鼠标右键等
* @default "edit"
*/
mode?: 'edit' | 'scan';
/** toolbar */
toolbarPanelProps?: ToolbarPanelProps;
/** keyBinding */
keyBindingProps?: false | KeybindingConfig;
/** scale toolbar */
scaleToolbarPanelProps?: ScaleToolbarPanelProps;
/** form editor */
detailPanelProps?: DetailPanelProps;
/** 右键菜单配置 */
contextMenuPanelProps?: ContextMenuPanelProps;
/** popover */
popoverProps?: PopoverProps;
/** onReady */
onReady?: (graph: IFlowchartGraph, app: IApplication) => void;
/** 点击回调,仅支持 save-graph-data */
onSave?: (data: Datum) => void;
/** 新增节点时回调 */
onAddNode?: (node: NsGraph.INodeConfig) => void;
/** 新增边时回调 */
onAddEdge?: (edge: NsGraph.IEdgeConfig) => void;
/** xflow app 销毁前的回调 */
onDestroy?: IAppDestroy;
/** xflow app 初始化后的回调 */
onConfigReady?: IAppConfigReady;
/** 节点或边更新数据时调用 */
onConfigChange?: (params: { data: Datum; type: string; config?: NsGraph.INodeConfig | NsGraph.IEdgeConfig }) => void;
}
Your contributions are always welcome! Please Do have a look at the issues first.
DingTalk group number: 44788198
.
MIT
FAQs
Flowchart
The npm package @ant-design/flowchart receives a total of 27,965 weekly downloads. As such, @ant-design/flowchart popularity was classified as popular.
We found that @ant-design/flowchart demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.