Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
react-lineage-dag
Advanced tools
用于表示表与表之间,表和其他关联实体之间关系的图
$ npm install lineage-dag # or (yarn add lineage-dag)
import {LineageTable} from 'lineage-dag';
const data = {
tables: [
{
id: '1',
name: 'table-1',
columns: [
{
name: 'id',
title: 'id'
},
{
name: 'age',
title: 'age'
}
]
},
{
id: '2',
name: 'table-2',
columns: [
{
name: 'id',
title: 'id'
},
{
name: 'age',
title: 'age'
}
]
},
{
id: '3',
name: 'table-3',
columns: [
{
name: 'id',
title: 'id'
},
{
name: 'age',
title: 'age'
}
]
}
],
relations: [
{
srcTableId: '1',
tgtTableId: '2',
srcTableColName: 'id',
tgtTableColName: 'age'
},
{
srcTableId: '1',
tgtTableId: '3',
srcTableColName: 'id',
tgtTableColName: 'age'
}
]
}
const App = () => {
return (
<LineageTable {...data} />
)
}
属性名 | 属性类型 | 默认值 | 说明 |
---|---|---|---|
tables | ITable[] | [] | 具体描述位于表格下方 |
relations | IRelation[] | [] | 具体描述位于表格下方 |
onTableDoubleClick | Function | noop | 表格双击事件 |
onLoaded | Function | noop | butterfly加载完毕时 |
onEachFrame | Function | noop | butterfly每一次数据绘制完毕时重绘 |
interface ITable {
id: string; // 表ID
icon: JSX.Element; // 表头icon
name: string; // 表名(显示名)
isHide: boolean; // 是否折叠所有列
columns: {
name: string; // 列英文名(唯一标识)
icon: string; // 列icon
title: string; // 列显示名
onClick: () => void; // 点击回调函数
}[],
operators: {
compent: JSX.Element // 操作项渲染
}[]
}
interface IRelation {
id?: string; // 关系ID,非必填,建议填写
srcTableId: string; // 源表格ID
tgtTableId: string; // 目标表格ID
srcTableColName: string; // 源表字段名
tgtTableColName: string; // 目标表字段名
}
# clone 本项目后
$ make install && npm start
FAQs
表格/字段血缘React组件
The npm package react-lineage-dag receives a total of 56 weekly downloads. As such, react-lineage-dag popularity was classified as not popular.
We found that react-lineage-dag 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.