UNPKG

@mui/x-tree-view

Version:

The community edition of the MUI X Tree View components.

60 lines 2.14 kB
import { TreeViewItemMeta } from "../../models/index.js"; import { MinimalTreeViewState } from "../../MinimalTreeViewStore/index.js"; export declare const itemsSelectors: { /** * Gets the DOM structure of the Tree View. */ domStructure: (state: MinimalTreeViewState<any, any>) => "flat" | "nested"; /** * Checks whether the disabled items are focusable. */ disabledItemFocusable: (state: MinimalTreeViewState<any, any>) => boolean; /** * Gets the meta-information of all items. */ itemMetaLookup: (state: MinimalTreeViewState<any, any>) => { [itemId: string]: TreeViewItemMeta; }; /** * Gets the ordered children ids of all items. */ itemOrderedChildrenIdsLookup: (state: MinimalTreeViewState<any, any>) => { [parentItemId: string]: string[]; }; /** * Gets the meta-information of an item. */ itemMeta: (state: MinimalTreeViewState<any, any>, itemId: string | null) => TreeViewItemMeta | null; /** * Gets the ordered children ids of an item. */ itemOrderedChildrenIds: (state: MinimalTreeViewState<any, any>, itemId: string | null) => string[]; /** * Gets the model of an item. */ itemModel: (state: MinimalTreeViewState<any, any>, itemId: string) => any; /** * Checks whether an item is disabled. */ isItemDisabled: (state: MinimalTreeViewState<any, any>, itemId: string) => boolean; /** * Gets the index of an item in its parent's children. */ itemIndex: (state: MinimalTreeViewState<any, any>, itemId: string) => number; /** * Gets the id of an item's parent. */ itemParentId: (state: MinimalTreeViewState<any, any>, itemId: string) => string | null; /** * Gets the depth of an item (items at the root level have a depth of 0). */ itemDepth: (state: MinimalTreeViewState<any, any>, itemId: string) => number; /** * Checks whether an item can be focused. */ canItemBeFocused: (state: MinimalTreeViewState<any, any>, itemId: string) => boolean; /** * Gets the identation between an item and its children. */ itemChildrenIndentation: (state: MinimalTreeViewState<any, any>) => string | number; };