UNPKG

@mui/x-tree-view

Version:

The community edition of the MUI X Tree View components.

102 lines 4.57 kB
import { UseTreeViewLabelSignature } from "./useTreeViewLabel.types.js"; import { TreeViewRootSelector } from "../../utils/selectors.js"; /** * Check if an item is editable. * @param {TreeViewState<[UseTreeViewItemsSignature]>} state The state of the tree view. * @param {TreeViewItemId} itemId The id of the item to check. * @returns {boolean} `true` if the item is editable, `false` otherwise. */ export declare const selectorIsItemEditable: ((state: any, itemId: string) => boolean) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; } & { resultFunc: (resultFuncArgs_0: { isItemEditable: ((item: any) => boolean) | boolean; editedItemId: string | null; } | undefined, resultFuncArgs_1: import("../../../index.js").TreeViewBaseItem<import("../../../index.js").TreeViewDefaultItemModelProperties>) => boolean; memoizedResultFunc: ((resultFuncArgs_0: { isItemEditable: ((item: any) => boolean) | boolean; editedItemId: string | null; } | undefined, resultFuncArgs_1: import("../../../index.js").TreeViewBaseItem<import("../../../index.js").TreeViewDefaultItemModelProperties>) => boolean) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }; lastResult: () => boolean; dependencies: [TreeViewRootSelector<UseTreeViewLabelSignature, true>, (state: any, itemId: string) => import("../../../index.js").TreeViewBaseItem<import("../../../index.js").TreeViewDefaultItemModelProperties>]; recomputations: () => number; resetRecomputations: () => void; dependencyRecomputations: () => number; resetDependencyRecomputations: () => void; } & { memoize: typeof import("reselect").weakMapMemoize; argsMemoize: typeof import("reselect").weakMapMemoize; }; /** * Check if the given item is being edited. * @param {TreeViewState<[UseTreeViewLabelSignature]>} state The state of the tree view. * @param {TreeViewItemId} itemId The id of the item to check. * @returns {boolean} `true` if the item is being edited, `false` otherwise. */ export declare const selectorIsItemBeingEdited: ((state: any, itemId: string | null) => boolean) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; } & { resultFunc: (resultFuncArgs_0: { isItemEditable: ((item: any) => boolean) | boolean; editedItemId: string | null; } | undefined, resultFuncArgs_1: string | null) => boolean; memoizedResultFunc: ((resultFuncArgs_0: { isItemEditable: ((item: any) => boolean) | boolean; editedItemId: string | null; } | undefined, resultFuncArgs_1: string | null) => boolean) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }; lastResult: () => boolean; dependencies: [TreeViewRootSelector<UseTreeViewLabelSignature, true>, (_: any, itemId: string | null) => string | null]; recomputations: () => number; resetRecomputations: () => void; dependencyRecomputations: () => number; resetDependencyRecomputations: () => void; } & { memoize: typeof import("reselect").weakMapMemoize; argsMemoize: typeof import("reselect").weakMapMemoize; }; /** * Check if an item is being edited. * @param {TreeViewState<[UseTreeViewLabelSignature]>} state The state of the tree view. * @returns {boolean} `true` if an item is being edited, `false` otherwise. */ export declare const selectorIsAnyItemBeingEdited: ((state: import("../../corePlugins/useTreeViewId/useTreeViewId.types.js").UseTreeViewIdState & Partial<import("./useTreeViewLabel.types.js").UseTreeViewLabelState> & { cacheKey: import("../../models/index.js").TreeViewStateCacheKey; }) => boolean) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; } & { resultFunc: (resultFuncArgs_0: { isItemEditable: ((item: any) => boolean) | boolean; editedItemId: string | null; } | undefined) => boolean; memoizedResultFunc: ((resultFuncArgs_0: { isItemEditable: ((item: any) => boolean) | boolean; editedItemId: string | null; } | undefined) => boolean) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }; lastResult: () => boolean; dependencies: [TreeViewRootSelector<UseTreeViewLabelSignature, true>]; recomputations: () => number; resetRecomputations: () => void; dependencyRecomputations: () => number; resetDependencyRecomputations: () => void; } & { memoize: typeof import("reselect").weakMapMemoize; argsMemoize: typeof import("reselect").weakMapMemoize; };