/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /// declare type InnerProps = Record; export interface TreeNodeData { isSelected?: boolean; isOpen?: boolean; id: string; label: string; childrenIds?: string[]; } export interface TreeData { rootIds: string[]; nodes: Map; } /** * Default tree node container */ export interface TreeNodeContainerProps { node: T; classPrefix?: string; level: number; onNodeSelect?: (node: T) => void; stepPaddingInRem?: number; innerProps: S; } /** * Tree View Components (default) */ interface TreeViewComponents { TreeNodeView: React.FC>; TreeNodeContainer: React.FC>; } /** * Default tree node view */ export interface TreeNodeViewProps { node: T; classPrefix?: string; level: number; components?: Partial>; onNodeSelect?: (node: T) => void; getChildNodes: (node: T) => T[]; stepPaddingInRem?: number; innerProps: S; } /** * Tree View */ export interface TreeViewProps { treeData: TreeData; getChildNodes: (node: T) => T[]; getRootNodes?: (treeData: TreeData) => T[]; onNodeSelect?: (node: T) => void; components?: Partial>; className?: string; classPrefix?: string; innerProps: S; } export declare const TreeView: (props: TreeViewProps) => import("react").ReactElement, string | import("react").JSXElementConstructor>; export {}; //# sourceMappingURL=TreeView.d.ts.map