UNPKG

synapse-react-client

Version:

[![Build Status](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client.svg?branch=main)](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synaps

35 lines (34 loc) 2.35 kB
import React from 'react'; import 'react-reflex/styles.css'; import { Reference } from '../../utils/synapseTypes'; import { EntityType } from '../../utils/synapseTypes/EntityType'; import { FinderScope } from './tree/TreeView'; export declare const NO_VERSION_NUMBER = -1; export declare type EntityFinderProps = { /** Whether or not 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; /** Whether or not versions may be specified when selecting applicable entities */ showVersionSelection?: boolean; /** For versionable entities, require the user to select a numbered version of an entity. This disallows selecting 'Always Latest Version'. Note that the latest version may still be mutable. Default true. */ mustSelectVersionNumber?: boolean; /** 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[]; /** The text to show before the list of selected entities */ selectedCopy?: string; /** Whether to show only the tree. If `true`, the tree will be used to make selections */ treeOnly?: boolean; }; export declare const EntityFinder: React.FunctionComponent<EntityFinderProps>; export default EntityFinder;