import * as H from 'history'; import * as React from 'react'; import * as GQL from '../backend/graphqlschema'; import { AbsoluteRepo } from '../repo'; import { ErrorLike } from '../util/errors'; import { TreeNode } from './Tree'; import { TreeEntryInfo } from './util'; export interface TreeLayerProps extends AbsoluteRepo { history: H.History; location: H.Location; activeNode: TreeNode; activePath: string; depth: number; expandedTrees: string[]; parent: TreeNode | null; parentPath?: string; index: number; isExpanded: boolean; /** EntryInfo is information we need to render this layer. */ entryInfo: TreeEntryInfo; selectedNode: TreeNode; onHover: (filePath: string) => void; onSelect: (node: TreeNode) => void; onToggleExpand: (path: string, expanded: boolean, node: TreeNode) => void; setChildNodes: (node: TreeNode, index: number) => void; setActiveNode: (node: TreeNode) => void; } declare const LOADING: 'loading'; interface TreeLayerState { treeOrError?: typeof LOADING | GQL.IGitTree | ErrorLike; } export declare class TreeLayer extends React.Component { node: TreeNode; private subscriptions; private componentUpdates; private rowHovers; constructor(props: TreeLayerProps); componentDidMount(): void; shouldComponentUpdate(nextProps: TreeLayerProps): boolean; componentDidUpdate(prevProps: TreeLayerProps): void; componentWillUnmount(): void; render(): JSX.Element | null; /** * Non-root tree layers call this to activate a prefetch request in the root tree layer */ private invokeOnHover; private handleTreeClick; /** * noopRowClick is the click handler for rows of the tree element * that shouldn't update URL on click w/o modifier key (but should retain * anchor element properties, like right click "Copy link address"). */ private noopRowClick; /** * linkRowClick is the click handler for */ private linkRowClick; private setChildNode; } export {}; //# sourceMappingURL=TreeLayer.d.ts.map