@mui/x-tree-view
Version:
The community edition of the MUI X Tree View components.
60 lines • 2.44 kB
TypeScript
import { TreeViewItemMeta, TreeViewState } from "../../models/index.js";
import { UseTreeViewItemsSignature } from "./useTreeViewItems.types.js";
export declare const itemsSelectors: {
/**
* Gets the DOM structure of the Tree View.
*/
domStructure: (state: TreeViewState<[UseTreeViewItemsSignature]>) => "flat" | "nested";
/**
* Checks whether the disabled items are focusable.
*/
disabledItemFocusable: (state: TreeViewState<[UseTreeViewItemsSignature]>) => boolean;
/**
* Gets the meta-information of all items.
*/
itemMetaLookup: (state: TreeViewState<[UseTreeViewItemsSignature]>) => {
[itemId: string]: TreeViewItemMeta;
};
/**
* Gets the ordered children ids of all items.
*/
itemOrderedChildrenIdsLookup: (state: TreeViewState<[UseTreeViewItemsSignature]>) => {
[parentItemId: string]: string[];
};
/**
* Gets the meta-information of an item.
*/
itemMeta: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string | null) => TreeViewItemMeta | null;
/**
* Gets the ordered children ids of an item.
*/
itemOrderedChildrenIds: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string | null) => string[];
/**
* Gets the model of an item.
*/
itemModel: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string) => import("../../../index.js").TreeViewBaseItem<import("../../../index.js").TreeViewDefaultItemModelProperties>;
/**
* Checks whether an item is disabled.
*/
isItemDisabled: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string) => boolean;
/**
* Gets the index of an item in its parent's children.
*/
itemIndex: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string) => number;
/**
* Gets the id of an item's parent.
*/
itemParentId: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string) => string | null;
/**
* Gets the depth of an item (items at the root level have a depth of 0).
*/
itemDepth: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string) => number;
/**
* Checks whether an item can be focused.
*/
canItemBeFocused: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string) => boolean;
/**
* Checks whether an item is selectable based on the `isItemSelectionDisabled` prop.
*/
isItemSelectable: (state: TreeViewState<[UseTreeViewItemsSignature]>, itemId: string) => boolean;
};