import * as H from 'history'; import * as React from 'react'; import { AbsoluteRepo } from '../repo'; interface Props extends AbsoluteRepo { history: H.History; location: H.Location; scrollRootSelector?: string; /** The tree entry that is currently active, or '' if none (which means the root). */ activePath: string; /** Whether the active path is a directory (including the root directory). False if it is a file. */ activePathIsDir: boolean; } interface State { /** * The root of the tree to show, or undefined for the root. * * This is initially the directory containing the first file viewed, but it can be changed to be an ancestor of * itself if the user browses to higher levels in the tree. */ parentPath?: string; /** Directories (including descendents multiple levels below this dir) that are expanded. */ resolveTo: string[]; /** The tree node currently in focus */ selectedNode: TreeNode; /** The tree node of the file or directory currently being viewed */ activeNode: TreeNode; } export interface TreeNode { index: number; parent: TreeNode | null; childNodes: TreeNode[]; path: string; url: string; } export declare class Tree extends React.PureComponent { private componentUpdates; private expandDirectoryChanges; private subscriptions; node: TreeNode; private treeElement; private handlers; constructor(props: Props); componentDidMount(): void; componentDidUpdate(nextProps: Props): void; componentWillUnmount(): void; render(): JSX.Element | null; private setChildNode; private onArrowDown; private onArrowUp; private isExpanded; private onArrowLeft; private onArrowRight; private onEnter; private selectNode; /** Set active node sets the active node when a directory or file is selected. It also sets the selected node in this case. */ private setActiveNode; /** Called when a tree entry is expanded or collapsed. */ private toggleExpandDirectory; private onKeyDown; private setTreeElement; } export {}; //# sourceMappingURL=Tree.d.ts.map