synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
46 lines • 2.27 kB
TypeScript
import { EntityType } from '@sage-bionetworks/synapse-client';
import { Reference } from '@sage-bionetworks/synapse-types';
import { Dispatch, SetStateAction } from 'react';
import { BreadcrumbItem } from '../Breadcrumbs';
import { EntityDetailsListDataConfiguration } from '../details/EntityDetailsList';
import { EntitySelectionMapType } from '../useEntitySelection';
import { EntityTreeNodeType } from './VirtualizedTree';
export declare enum FinderScope {
CURRENT_PROJECT = "Current Project",
ALL_PROJECTS = "All Projects",
CREATED_BY_ME = "Projects Created By Me",
FAVORITES = "My Favorites"
}
/**
* Indicates which container is selected when the tree is used to control another component. If 'root', then the top-level entities
* should be shown in the other component. If a synID, then that entity's children should be shown in the other component. If null,
* then a selection has not been made.
*/
export type EntityTreeContainer = string | 'root' | null;
export type EntityTreeProps = {
initialScope?: FinderScope;
/** To show the current project, projectId must be defined */
projectId?: string;
initialContainer: EntityTreeContainer;
currentContainer: EntityTreeContainer;
setCurrentContainer: Dispatch<SetStateAction<EntityTreeContainer>>;
showDropdown: boolean;
selectedEntities: EntitySelectionMapType;
visibleTypes?: EntityType[];
toggleSelection?: (entity: Reference) => void;
setDetailsViewConfiguration?: (configuration: EntityDetailsListDataConfiguration) => void;
setBreadcrumbItems?: (items: BreadcrumbItem[]) => void;
/** Determines whether to show the root node corresponding to the selected scope */
showScopeAsRootNode?: boolean;
treeNodeType: EntityTreeNodeType;
/** The entity types that may be selected. */
selectableTypes: EntityType[];
hideScopeSelector?: boolean;
};
/**
* The TreeView displays a user's entities hierarchically, allowing a user to quickly dive into an entity tree.
*
* The tree view currently can only be used to drive a DetailsView using the `setDetailsViewConfiguration` property.
*/
export declare function EntityTree(props: EntityTreeProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=EntityTree.d.ts.map