@mui/x-tree-view
Version:
The community edition of the MUI X Tree View components.
65 lines • 3.13 kB
TypeScript
import type { TreeViewItemId, TreeViewItemSelectionStatus } from "../../../models/index.js";
import type { MinimalTreeViewState } from "../../MinimalTreeViewStore/index.js";
declare const isItemSelectableSelector: (state: MinimalTreeViewState<any, any>, itemId: TreeViewItemId) => boolean;
declare const isItemSelectedSelector: (state: MinimalTreeViewState<any, any>, itemId: TreeViewItemId) => boolean;
declare const canItemBeSelectedSelector: (state: MinimalTreeViewState<any, any>, itemId: TreeViewItemId) => boolean;
declare const propagationRulesSelector: (state: MinimalTreeViewState<any, any>) => import("../../../index.js").TreeViewSelectionPropagation;
declare const itemSelectionStatusSelector: (state: MinimalTreeViewState<any, any>, itemId: TreeViewItemId) => TreeViewItemSelectionStatus;
export declare const selectionSelectors: {
/**
* Gets the selected items as provided to the component.
*/
selectedItemsRaw: (state: MinimalTreeViewState<any, any>) => string | readonly string[] | readonly string[] | null;
/**
* Gets the selected items as an array.
*/
selectedItems: (args_0: MinimalTreeViewState<any, any>) => any[];
/**
* Gets the selected items as a Map.
*/
selectedItemsMap: (args_0: MinimalTreeViewState<any, any>) => Map<string, true>;
/**
* Checks whether selection is enabled.
*/
enabled: (state: MinimalTreeViewState<any, any>) => boolean;
/**
* Checks whether multi selection is enabled.
*/
isMultiSelectEnabled: (state: MinimalTreeViewState<any, any>) => boolean;
/**
* Checks whether checkbox selection is enabled.
*/
isCheckboxSelectionEnabled: (state: MinimalTreeViewState<any, any>) => boolean;
/**
* Gets the selection propagation rules.
*/
propagationRules: typeof propagationRulesSelector;
/**
* Checks whether an item is selected.
*/
isItemSelected: typeof isItemSelectedSelector;
/**
* Gets the selection status of an item.
* An item that is not selected is `indeterminate` when some of its selectable descendants are selected.
* When `selectionPropagation.parents` is enabled, an item whose selectable descendants are all selected is `selected`.
*/
itemSelectionStatus: typeof itemSelectionStatusSelector;
/**
* Checks whether an item is indeterminate (it is not selected but some of its selectable descendants are).
*/
isItemIndeterminate: (state: MinimalTreeViewState<any, any>, itemId: TreeViewItemId) => boolean;
/**
* Checks whether the selection feature is enabled for an item.
* Returns `true` when selection is enabled on the Tree View and the item is selectable (even if the item is disabled).
*/
isFeatureEnabledForItem: (state: MinimalTreeViewState<any, any>, itemId: TreeViewItemId) => boolean;
/**
* Checks whether an item can be selected (if selection is enabled, if the item is not disabled, and if the item is selectable).
*/
canItemBeSelected: typeof canItemBeSelectedSelector;
/**
* Checks whether an item is selectable based on the `isItemSelectionDisabled` prop.
*/
isItemSelectable: typeof isItemSelectableSelector;
};
export {};