UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

33 lines 2.48 kB
import { EntityType } from '@sage-bionetworks/synapse-client'; import { Reference } from '@sage-bionetworks/synapse-types'; import React from 'react'; import 'react-reflex/styles.css'; import { FinderScope } from './tree/EntityTree'; import { VersionSelectionType } from './VersionSelectionType'; export type EntityFinderProps = { /** Whether it is possible to select multiple entities */ selectMultiple: boolean; /** Callback invoked when the selection changes */ onSelectedChange: (selected: Reference[]) => void; /** The initial appearance of the entity finder. Possible values include "Current Project", "All Projects", "Projects Created By Me", "My Favorites" */ initialScope: FinderScope; /** The SynID of the 'Current Project'. If this is not a defined, then the scope cannot be "Current Project" */ projectId?: string; /** The SynID of the entity that should open by default. If this is a Syn ID, then it must be in the project specified in `projectId` */ initialContainer: string | 'root' | null; /** Determines if versions are selectable, and if so, how they should be shown. Default is "TRACKED" */ versionSelection?: VersionSelectionType; /** The entity types to show in the details view (right pane). Any types specified in `selectableTypes` will automatically be included. */ visibleTypesInList?: EntityType[]; /** The entity types that may be selected. Types in `visibleTypesInList` that are not in `selectableTypes` will appear as disabled options. Only the types in `selectableTypes` will appear in search */ selectableTypes?: EntityType[]; /** The types to show in the tree used to navigate. If `treeOnly` is true, any types specified in `selectableTypes` will automatically be included. */ visibleTypesInTree?: EntityType[]; /** Whether to show only the tree. If `true`, the tree will be used to make selections */ treeOnly?: boolean; /** If provided, the initial selection will be set to this list of references. The selection will be reset to this value if this object changes, so it should be memoized. */ initialSelected?: Reference[]; }; export declare function EntityFinder({ initialScope, projectId, initialContainer, selectMultiple, onSelectedChange, versionSelection, selectableTypes, visibleTypesInList, visibleTypesInTree, treeOnly, initialSelected, }: EntityFinderProps): React.ReactNode; export default EntityFinder; //# sourceMappingURL=EntityFinder.d.ts.map