forked from bkrem/react-d3-tree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact-d3-tree.d.ts
66 lines (61 loc) · 2.03 KB
/
react-d3-tree.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
declare module "react-d3-tree" {
type NodeSvgShape = {
shape?: string,
shapeProps?: object
}
type ReactD3TreeItem = {
name?: string,
attributes?: {
[key: string]: string,
};
children?: ReactD3TreeItem[],
_collapsed?: boolean,
nodeSvgShape?: NodeSvgShape
};
type ReactD3TreeTranslate = {x: number, y: number}
type ReactD3TreeProps = {
data: ReactD3TreeItem[] | ReactD3TreeItem,
nodeSvgShape?: NodeSvgShape,
nodeLabelComponent?: object,
onClick?: (targetNode: ReactD3TreeItem, event: Event) => any,
onMouseOver?: (targetNode: ReactD3TreeItem, event: Event) => any,
onMouseOut?: (targetNode: ReactD3TreeItem, event: Event) => any,
onLinkClick?: (linkSource: ReactD3TreeItem, linkTarget: ReactD3TreeItem, event: Event) => any,
onLinkMouseOver?: (linkSource: ReactD3TreeItem, linkTarget: ReactD3TreeItem, event: Event) => any,
onLinkMouseOut?: (linkSource: ReactD3TreeItem, linkTarget: ReactD3TreeItem, event: Event) => any,
onUpdate?: (updateTarget: { targetNode: ReactD3TreeItem | null, currentTranslate: ReactD3TreeTranslate, currentZoom: number}) => any,
orientation?: "horizontal" | "vertical",
translate?: Partial<ReactD3TreeTranslate>,
pathFunc?: ("diagonal" | "elbow" | "straight") | ((...args: any[]) => any),
transitionDuration?: number,
depthFactor?: number,
collapsible?: boolean,
useCollapseData?: boolean,
initialDepth?: number,
zoomable?: boolean,
zoom?: number,
scaleExtent?: {
min?: number,
max?: number
},
nodeSize?: {
x?: number,
y?: number
},
separation?: {
siblings?: number,
nonSiblings?: number
},
textLayout?: object,
allowForeignObjects?: boolean,
shouldCollapseNeighborNodes?: boolean,
circleRadius?: number,
styles?: {
nodes?: object,
links?: object
}
};
var Tree: React.ComponentClass<ReactD3TreeProps>;
export {Tree, ReactD3TreeProps, ReactD3TreeItem, ReactD3TreeTranslate, NodeSvgShape};
export default Tree;
}