react-lineage-map
Version:
Build out field level lineage mappings, visualizations, and transformations using react
72 lines (68 loc) • 1.7 kB
TypeScript
import { JSX } from 'react';
interface FieldNodeProp extends BaseNode {
type: 'field';
tableId?: string;
transformation?: string;
note?: string;
}
type NodeProp = TableNode | FieldNodeProp;
interface EdgeProp {
id?: string;
source: string;
target: string;
}
interface GraphProp {
nodes: NodeProp[];
edges: EdgeProp[];
}
interface BaseNode {
id: string;
name: string;
}
interface TableNode extends BaseNode {
type: 'table';
note?: string;
}
interface FieldNode extends BaseNode {
type: 'field';
tableId: string;
transformation?: string;
note?: string;
}
type Node = TableNode | FieldNode;
interface Edge {
id: string;
source: string;
target: string;
type?: 'field-field' | 'table-table';
}
interface Graph {
nodes: Node[];
edges: Edge[];
}
interface LineageMapOptions {
width?: string | number;
height?: string | number;
tableWidth?: number;
tableHeight?: number;
fieldHeight?: number;
fieldSpacing?: number;
levelPadding?: number;
verticalPadding?: number;
popUpWidth?: number;
popUpFloat?: "high" | "low";
maxCurveOffset?: number;
}
interface LineageMapProps {
data: GraphProp;
width?: string | number;
height?: string | number;
options?: LineageMapOptions;
className?: string;
}
interface Position {
x: number;
y: number;
}
declare const LineageMapComponent: ({ data, width, height, options, className, }: LineageMapProps) => JSX.Element;
export { type Edge, type EdgeProp, type FieldNodeProp, type Graph, type GraphProp, LineageMapComponent, type LineageMapOptions, type LineageMapProps, type Node, type NodeProp, type Position };