@atlaskit/tree
Version:
A React Component for displaying expandable and sortable tree hierarchies
11 lines (10 loc) • 702 B
TypeScript
import type { FlattenedItem, Path, TreeData, ItemId, TreeItem, TreeSourcePosition, TreeDestinationPosition } from '../types';
export declare const flattenTree: (tree: TreeData, path?: Path) => FlattenedItem[];
export declare const getItem: (tree: TreeData, path: Path) => TreeItem;
export declare const getParent: (tree: TreeData, path: Path) => TreeItem;
export declare const getTreePosition: (tree: TreeData, path: Path) => TreeSourcePosition;
export declare const removeItemFromTree: (tree: TreeData, position: TreeSourcePosition) => {
tree: TreeData;
itemRemoved: ItemId;
};
export declare const addItemToTree: (tree: TreeData, position: TreeDestinationPosition, item: ItemId) => TreeData;