synapse-react-client
Version:
[](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [](https://badge.fury.io/js/synaps
43 lines (42 loc) • 1.76 kB
TypeScript
import { Map } from 'immutable';
import React from 'react';
import { EntityHeader, EntityType, ProjectHeader, Reference } from '../../../utils/synapseTypes';
import { GetProjectsParameters } from '../../../utils/synapseTypes/GetProjectsParams';
import { SearchQuery } from '../../../utils/synapseTypes/Search';
export declare enum EntityDetailsListDataConfigurationType {
HEADER_LIST = 0,
PARENT_CONTAINER = 1,
USER_PROJECTS = 2,
USER_FAVORITES = 3,
ENTITY_SEARCH = 4,
PROMPT = 5
}
export declare type EntityDetailsListDataConfiguration = {
type: EntityDetailsListDataConfigurationType;
/** Defined if type is HEADER_LIST */
headerList?: (Pick<EntityHeader, 'name' | 'id' | 'type'> | ProjectHeader)[];
/** Defined if type is PARENT_CONTAINER */
parentContainerId?: string;
/** Defined if type is USER_PROJECTS */
getProjectParams?: GetProjectsParameters;
/** Defined if type is ENTITY_SEARCH */
query?: SearchQuery;
};
/**
* These props are set by a parent to this component, but they are not affected by the configuration.
* We collect them into this type to simplify passing them through to the view.
*/
export declare type EntityDetailsListSharedProps = {
showVersionSelection: boolean;
mustSelectVersionNumber: boolean;
selectColumnType: 'checkbox' | 'none';
enableSelectAll: boolean;
visibleTypes: EntityType[];
selected: Map<string, number>;
selectableTypes: EntityType[];
toggleSelection: (entity: Reference | Reference[]) => void;
};
export declare type EntityDetailsListProps = EntityDetailsListSharedProps & {
configuration: EntityDetailsListDataConfiguration;
};
export declare const EntityDetailsList: React.FunctionComponent<EntityDetailsListProps>;