/** * * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import { type UniqueIdentifier } from '@dnd-kit/core'; import type React from 'react'; import { type HtmlAttributes } from '../_common/types'; import { type FlattenedTreeItem, type ItemChangedReason, type TreeItem, type TreeItemComponent } from './tree-view-types'; export interface TreeViewProps, E extends HTMLElement> extends React.HTMLAttributes { /** The items to be displayed in the tree view */ items: TreeItem[]; /** A function that is called when the items in the tree view change */ onItemsChanged: (newItems: TreeItem[], itemChangedReason: ItemChangedReason) => void; /** The component to use for the tree items, if not provided the default component will be used */ TreeItemComponent?: TreeItemComponent; /** HTML attributes */ htmlAttributes?: HtmlAttributes<'ol'>; } export declare const TreeView: (, E extends HTMLElement>({ items, TreeItemComponent, onItemsChanged, htmlAttributes, ...restProps }: TreeViewProps) => import("react/jsx-runtime").JSX.Element) & { SortableTreeViewItem: , E extends HTMLElement>({ id, depth, isLast, TreeItemComponent, parent, shouldDisableSorting, sortableProps, keepGhostInPlace, item, onCollapse, trails, onItemsChanged, items, ariaLevel, ariaPosInSet, ariaSetSize, tabIndex, onFocus, ...restProps }: import("./TreeViewItem").TreeItemProps & { id: UniqueIdentifier; TreeItemComponent: TreeItemComponent; shouldDisableSorting?: boolean; sortableProps?: Omit; keepGhostInPlace?: boolean; trails: ("none" | "straight" | "straight-curved" | "curved")[]; onItemsChanged: (newItems: FlattenedTreeItem[], itemChangedReason: ItemChangedReason) => void; items: FlattenedTreeItem[]; ariaLevel?: number; ariaPosInSet?: number; ariaSetSize?: number; tabIndex?: number; onFocus?: () => void; }) => import("react/jsx-runtime").JSX.Element; TreeItemWrapper: >({ depth, shouldDisableInteraction, shouldDisableSorting, isGhost, isIndicator, onCollapse, item, setNodeRef, setActivatorNodeRef, dragHandleProps, style, className, trails, children, indentationWidth, ariaLevel, ariaPosInSet, ariaSetSize, tabIndex, onFocus, ref, ...restProps }: React.PropsWithChildren>) => import("react/jsx-runtime").JSX.Element; TreeViewTextItem: ({ depth, shouldDisableInteraction, shouldDisableSorting, isGhost, indentationWidth, isIndicator, isCollapsed, onCollapse, item, parent, isOver, isOverParent, setNodeRef, setActivatorNodeRef, dragHandleProps, style, trails, onItemsChanged, items, tabIndex, ref, ...restProps }: import("./tree-view-types").TreeItemComponentProps & { ref?: React.Ref; }) => import("react/jsx-runtime").JSX.Element; }; //# sourceMappingURL=TreeView.d.ts.map