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

67 lines 2.79 kB
import { EntityType } from '@sage-bionetworks/synapse-client'; import { EntityChildrenRequest } from '@sage-bionetworks/synapse-types'; import { OnChangeFn, SortingState } from '@tanstack/react-table'; import { ReactNode } from 'react'; import { EntityFinderHeader } from '../../EntityFinderHeader'; import { EntityDetailsListSharedProps } from '../EntityDetailsList'; /** * Set of all columns that can be shown in the DetailsView * Note: Some of these values are used as accessors, so ensure that those columns match the accessor key in the row data */ export declare enum DetailsViewColumn { NAME = "name", ENTITY_TYPE = "entityType", ID = "id", CREATED_ON = "createdOn", MODIFIED_ON = "modifiedOn", MODIFIED_BY = "modifiedBy", ADD_TO_DOWNLOAD_CART = "addToDownloadCart", DIRECT_DOWNLOAD = "directDownload", SELECTED = "selected", VERSION = "version", SIZE = "size", MD5 = "md5", BADGES = "badges" } export type DetailsViewProps = EntityDetailsListSharedProps & { entities: EntityFinderHeader[]; isLoading: boolean; hasNextPage?: boolean; fetchNextPage?: () => Promise<unknown>; isFetchingNextPage?: boolean; enableSorting?: boolean; enableMultiSort?: boolean; sortableColumns?: DetailsViewColumn[]; /** The current sort of the view. */ sorting?: SortingState; /** If enableSorting is true, `setSort` will be invoked when the user tries to change the sort */ onSortingChange?: OnChangeFn<SortingState>; noResultsPlaceholder?: ReactNode; /** We defer to the configuration component to determine this */ selectAllIsChecked?: boolean; /** This request object is only used to tell react-query to cancel fetching all children at once. */ getChildrenInfiniteRequestObject?: EntityChildrenRequest; /** The total number of entities that can be retrieved */ totalEntities?: number; }; /** * Describes the shape of the data passed to the BaseTable */ export type EntityFinderTableViewRowData = EntityFinderHeader & { entityId: string; versionNumber?: number; entityType: EntityType; isSelected: boolean; isDisabled: boolean; isVersionableEntity: boolean; currentSelectedVersion?: number; }; /** * Displays a list of entities in a table. * * If the list of entities is paginated, the `hasNextPage` prop can be set to indicate that there is more data to load. * When the view is ready to load more data, the `fetchNextPage` callback will be invoked. The view is designed to handle * an "infinite scroll" pattern, so entities should not be removed from the list when loading the next page. */ export declare function DetailsView(props: DetailsViewProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=DetailsView.d.ts.map