synapse-react-client 4.0.22 → 4.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.js +1 -1
- package/dist/assets/icons/GeneticsIcon.d.ts +3 -0
- package/dist/assets/icons/GeneticsIcon.d.ts.map +1 -0
- package/dist/assets/icons/GeneticsIcon.js +14 -0
- package/dist/assets/icons/GeneticsIcon.js.map +1 -0
- package/dist/components/EntityCitation/EntityCitation.d.ts.map +1 -1
- package/dist/components/EntityCitation/EntityCitation.js +23 -8
- package/dist/components/EntityCitation/EntityCitation.js.map +1 -1
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.d.ts +18 -0
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.d.ts.map +1 -0
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js +112 -0
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js.map +1 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.d.ts +31 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.d.ts.map +1 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.js +198 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.js.map +1 -0
- package/dist/components/GenericCard/SynapseCardLabel.d.ts.map +1 -1
- package/dist/components/GenericCard/SynapseCardLabel.js +4 -8
- package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.d.ts +6 -0
- package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +168 -153
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/IconSvg/IconSvg.d.ts +1 -1
- package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
- package/dist/components/IconSvg/IconSvg.js +19 -18
- package/dist/components/IconSvg/IconSvg.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.d.ts +21 -0
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts +10 -0
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +65 -59
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +2 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +33 -6
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +93 -55
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts +3 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js +39 -37
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js.map +1 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts +3 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js +4 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts +5 -2
- package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.js +68 -51
- package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/menu/ComplexMenu.d.ts +8 -1
- package/dist/components/menu/ComplexMenu.d.ts.map +1 -1
- package/dist/components/menu/ComplexMenu.js +50 -20
- package/dist/components/menu/ComplexMenu.js.map +1 -1
- package/dist/components/widgets/facet-nav/FacetValueChip.d.ts +25 -0
- package/dist/components/widgets/facet-nav/FacetValueChip.d.ts.map +1 -0
- package/dist/components/widgets/facet-nav/FacetValueChip.js +40 -0
- package/dist/components/widgets/facet-nav/FacetValueChip.js.map +1 -0
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.d.ts +10 -5
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.js +10 -17
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.js.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js +11 -10
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +70 -54
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts +2 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js +17 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +2 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +7 -7
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCard.d.ts.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCard.js +99 -45
- package/dist/features/curator/dashboard/components/CurationTaskCard.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +174 -149
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.d.ts +6 -0
- package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.js +19 -2
- package/dist/features/entity/metadata-task/utils/constants.js.map +1 -1
- package/dist/style/components/_total-query-results.scss +10 -34
- package/dist/style/main.css +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.js +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRowGenericCard.js","names":[],"sources":["../../../src/components/GenericCard/TableRowGenericCard.tsx"],"sourcesContent":["import { CommonCardProps } from '@/components/CardContainer/CardConfiguration'\nimport {\n getFileHandleAssociation,\n getLinkParams,\n getValueOrMultiValue,\n} from '@/components/GenericCard/CardUtils'\nimport CroissantButton from '@/components/GenericCard/CroissantButton/CroissantButton'\nimport { GenericCardIcon } from '@/components/GenericCard/GenericCardIcon'\nimport PortalDOI from '@/components/GenericCard/PortalDOI/PortalDOI'\nimport {\n getCandidateDoiId,\n useShowDoiCardLabel,\n} from '@/components/GenericCard/PortalDOI/PortalDOIUtils'\nimport { mapRowToRecord } from '@/components/SynapseTable/SynapseTableUtils'\nimport { useGetEntity } from '@/synapse-queries'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport {\n isDatasetCollection,\n isTableEntity,\n} from '@/utils/functions/EntityTypeUtils'\nimport { PRODUCTION_ENDPOINT_CONFIG } from '@/utils/functions/getEndpoint'\nimport { parseSynId } from '@/utils/functions/RegularExpressions'\nimport { getColumnIndex } from '@/utils/functions/SqlFunctions'\nimport { TargetEnum } from '@/utils/html/TargetEnum'\nimport * as SynapseConstants from '@/utils/SynapseConstants'\nimport { GetAppTwoTone } from '@mui/icons-material'\nimport { Box, Collapse, Link, Stack, Typography } from '@mui/material'\nimport {\n ColumnModel,\n ColumnTypeEnum,\n Entity,\n SelectColumn,\n Table,\n} from '@sage-bionetworks/synapse-types'\nimport React, { useCallback, useMemo, useState } from 'react'\nimport { useInView } from 'react-intersection-observer'\nimport CitationPopover from '../CitationPopover'\nimport { EntityDownloadConfirmation } from '../EntityDownloadConfirmation'\nimport { HeaderCardVariant } from '../HeaderCard'\nimport IconList from '../IconList'\nimport { useQueryContext } from '../QueryContext/QueryContext'\nimport { useQueryVisualizationContext } from '../QueryVisualizationWrapper'\nimport ShareThisPage, {\n ShareThisPageProps,\n} from '../ShareThisPage/ShareThisPage'\nimport { SustainabilityScorecardProps } from '../SustainabilityScorecard/SustainabilityScorecard'\nimport GenericCard from './GenericCard'\nimport GenericCardActionButton from './GenericCardActionButton'\nimport { PortalDOIConfiguration } from './PortalDOI/PortalDOIConfiguration'\nimport { SynapseCardLabel } from './SynapseCardLabel'\nimport { useResolvedSynapseEntity } from './useResolvedSynapseEntity'\n\ntype RowSynapseEntityConfig = {\n /** Use the table rowId to resolve the Synapse entity ID. */\n id: {\n source: 'rowId'\n }\n /** Use the table rowVersionNumber to resolve the Synapse entity version (if available). */\n version?: {\n source: 'rowVersionNumber'\n }\n}\n\ntype ColumnSynapseEntityConfig = {\n /** Use a column value to resolve the Synapse entity ID. */\n id: {\n source: 'column'\n columnName: string\n }\n /** Use a column value to resolve the Synapse entity version. */\n version?: {\n source: 'column'\n columnName: string\n }\n}\n\nexport type SynapseEntityConfig =\n | RowSynapseEntityConfig\n | ColumnSynapseEntityConfig\n\n/**\n * Maps a table query result to a GenericCard.\n */\nexport type TableToGenericCardMapping = {\n /** The 'type' of resource a card refers to. Renders a label on the card with this string value.\n * Can be hidden by setting it to '' (empty string)\n */\n type: string\n /** The column name whose data contains the title of the card */\n title: string\n /** The column name whose data contains the subtitle of the card */\n subTitle?: string\n /** The column name whose data contains the description of the card */\n description?: string\n /** If true, a 'Cite As' button will be displayed for those cards with a DOI in the 'doi' column */\n includeCitation?: boolean\n /** If true, a 'Share this page' button will be displayed */\n includeShareButton?: boolean\n /**\n * Configuration for displaying the SustainabilityScorecard component\n */\n sustainabilityScorecard?: SustainabilityScorecardProps\n /** The initial citation format to use in the 'Cite As' UI */\n defaultCitationFormat?: 'bibtex' | 'apa' | 'ieee' | 'nature' | 'science'\n /** Static text displayed in the 'Cite As' UI */\n citationBoilerplateText?: string\n /** The column name whose data contains the value used to map to the icon */\n icon?: string\n /** The column name whose data contains an image file handle to be displayed on the card */\n imageFileHandleColumnName?: string\n /** Static boolean value used if the image displayed using `imageFileHandleColumnName` requires extra padding */\n thumbnailRequiresPadding?: boolean\n /** Array of column names to be used for labels in the Card Footer */\n secondaryLabels?: string[]\n /** Can be used to add a custom secondary label */\n customSecondaryLabelConfig?: {\n /** The displayed label key */\n key: string\n /** The value to display */\n value: React.ReactNode\n /** Callback to determine visibility of the label\n * @param schema the mapping of columnName to data index\n * @param data the row data\n */\n isVisible: (schema: Record<string, number>, data: string[]) => boolean\n }\n /** Column name of the link value if the title should be linked */\n link?: string\n /** Column name of the STRING_LIST column that includes icon names that represent icons that should be displayed on the card */\n dataTypeIconNames?: string\n /**\n * Ordered list of column names to display to the right of the title area.\n * Each renders as \"Display Name: Value\" on its own line. Rows with empty values are skipped.\n * The display name is derived from getColumnDisplayName (respects column aliases and unCamelCase).\n *\n * Can also be a function that receives the schema and row data and returns the list of column\n * names to display, allowing the displayed details to vary based on the row's actual values.\n */\n titleAreaDetails?:\n | string[]\n | ((schema: Record<string, number>, data: string[]) => string[])\n /** Configuration for resolving the Synapse entity ID/version represented by each card row.\n * The ID and version sources must both reference either row-based values or column-based values.\n */\n synapseEntityConfig?: SynapseEntityConfig\n /** The column name whose data contains a synId that can be used to show a button to add the corresponding entity to the download cart. */\n downloadCartSynId?: string\n /** Configuration to display a DOI, as well as the ability to create one for users with such permission */\n portalDoiConfiguration?: PortalDOIConfiguration\n}\n\nexport type TableRowGenericCardProps = {\n /** The schema that maps a table result to the GenericCard UI */\n genericCardSchema: TableToGenericCardMapping\n /** The table's SelectColumns */\n selectColumns?: SelectColumn[]\n /** The table's ColumnModels */\n columnModels?: ColumnModel[]\n /** If true, the 'type' column will be used as the icon string to choose the icon */\n useTypeColumnForIcon?: boolean\n /** If true, render the card as a HeaderCard */\n isHeader?: boolean\n /** If isHeader is true, use this variant of HeaderCard */\n headerCardVariant?: HeaderCardVariant\n isAlignToLeftNav?: boolean\n /** Mapping of column name to row data index */\n schema: Record<string, number>\n /** The row data */\n data: string[]\n /** The ID of the table row */\n rowId?: number\n /** The versionNumber of the table row */\n versionNumber?: number\n /** Optional props for the ShareThisPage component */\n sharePageLinkButtonProps?: ShareThisPageProps\n /** Optional function that receives schema and data and returns a ReactNode to be rendered next to the card type */\n CardTypeAdornment?: React.ComponentType<{\n schema: Record<string, number>\n data: string[]\n }>\n} & CommonCardProps\n\n// SWC-6115: special rendering of the version column (for Views)\nfunction VersionLabel(props: { synapseId: string; version: string }) {\n const { synapseId, version } = props\n return (\n <span>\n {version} \n <a\n target={TargetEnum.NEW_WINDOW}\n rel=\"noopener noreferrer\"\n href={`${PRODUCTION_ENDPOINT_CONFIG.PORTAL}Synapse:${synapseId}.${version}`}\n >\n (Show Version History on Synapse)\n </a>\n </span>\n )\n}\n\n/**\n * Maps a table row to a GenericCard.\n */\nexport function TableRowGenericCard(props: TableRowGenericCardProps) {\n const [showDownloadConfirmation, setShowDownloadConfirmation] =\n useState(false)\n const [downloadButtonLoading, setDownloadButtonLoading] = useState(false)\n\n const { entityId, versionNumber } = useQueryContext()\n const { getColumnDisplayName } = useQueryVisualizationContext()\n\n const { ref, inView: cardIsInView } = useInView()\n\n const { data: table } = useGetEntity<Table>(entityId, versionNumber)\n\n const {\n schema,\n data,\n rowId,\n versionNumber: rowVersionNumber,\n genericCardSchema,\n secondaryLabelLimit,\n sharePageLinkButtonProps,\n selectColumns,\n columnModels,\n iconOptions,\n useTypeColumnForIcon = false,\n isHeader = false,\n sustainabilityScorecard,\n headerCardVariant,\n titleLinkConfig,\n ctaLinkConfig,\n ctaLinkPosition,\n labelLinkConfig,\n descriptionConfig,\n columnIconOptions,\n CardTypeAdornment,\n charCountCutoff,\n } = props\n\n const {\n link = '',\n type,\n includeCitation,\n includeShareButton,\n defaultCitationFormat,\n citationBoilerplateText,\n downloadCartSynId,\n portalDoiConfiguration,\n } = genericCardSchema\n const title = data[schema[genericCardSchema.title]]\n let subTitle =\n genericCardSchema.subTitle && data[schema[genericCardSchema.subTitle]]\n subTitle =\n genericCardSchema.subTitle &&\n getValueOrMultiValue({\n value: subTitle,\n columnName: genericCardSchema.subTitle,\n selectColumns,\n columnModels,\n }).str\n const description = data[schema[genericCardSchema.description || '']]\n const iconValue = data[schema[genericCardSchema.icon || '']]\n const dataTypeIconNames =\n data[schema[genericCardSchema.dataTypeIconNames || '']]\n const imageFileHandleIdValue =\n data[schema[genericCardSchema.imageFileHandleColumnName || '']]\n const titleColumnModel = columnModels?.find(\n el => genericCardSchema.link === el.name,\n )\n const titleColumnType = titleColumnModel?.columnType\n // wrap link in parens because undefined would throw an error\n const linkValue: string = data[schema[link]] || ''\n const { href, target } = getLinkParams(\n linkValue,\n titleLinkConfig,\n data,\n schema,\n rowId,\n )\n\n const synapseEntityConfig = genericCardSchema.synapseEntityConfig\n\n const getColumnValue = useCallback(\n (columnName?: string) => {\n if (!columnName) {\n return undefined\n }\n const columnIndex = schema[columnName]\n if (columnIndex === undefined) {\n return undefined\n }\n return data[columnIndex]\n },\n [schema, data],\n )\n\n const resolvedTitleAreaRightContent = useMemo(() => {\n const { titleAreaDetails } = genericCardSchema\n if (!titleAreaDetails) return undefined\n const columns =\n typeof titleAreaDetails === 'function'\n ? titleAreaDetails(schema, data)\n : titleAreaDetails\n if (columns.length === 0) return undefined\n const rows = columns\n .map(columnName => {\n const rawValue: string | undefined = data[schema[columnName]]\n if (!rawValue) return null\n return { name: getColumnDisplayName(columnName), rawValue, columnName }\n })\n .filter(Boolean) as {\n name: string\n rawValue: string\n columnName: string\n }[]\n if (rows.length === 0) return undefined\n return (\n <Stack direction=\"column\" gap=\"4px\">\n {rows.map(({ name, rawValue, columnName }) => (\n <Stack key={columnName} direction=\"row\" gap=\"4px\" alignItems=\"center\">\n <Typography component=\"span\" variant=\"body1\">\n {name}:\n </Typography>\n <SynapseCardLabel\n value={rawValue}\n columnName={columnName}\n labelLink={undefined}\n isHeader={isHeader}\n selectColumns={selectColumns}\n columnModels={columnModels}\n rowData={data}\n columnIconOptions={columnIconOptions}\n />\n </Stack>\n ))}\n </Stack>\n )\n }, [\n genericCardSchema,\n data,\n schema,\n getColumnDisplayName,\n isHeader,\n selectColumns,\n columnModels,\n columnIconOptions,\n ])\n\n const {\n entityId: resolvedSynapseEntityId,\n entityVersionNumber: resolvedSynapseEntityVersionNumber,\n } = useResolvedSynapseEntity({\n synapseEntityConfig,\n getColumnValue,\n rowId,\n rowVersionNumber,\n })\n\n let resolvedDownloadCartSynIdValue = resolvedSynapseEntityId\n let resolvedDownloadCartVersionNumber = resolvedSynapseEntityVersionNumber\n\n if (downloadCartSynId) {\n const reference = parseSynId(getColumnValue(downloadCartSynId) ?? '')\n resolvedDownloadCartSynIdValue = reference?.targetId\n resolvedDownloadCartVersionNumber = reference?.targetVersionNumber\n }\n\n // Transform the row to a record of (columnName, value) pairs for compatibility with getCandidateDoiId\n const dataAsRecord: Record<string, string | null> = useMemo(\n () => mapRowToRecord(data, schema),\n [data, schema],\n )\n\n const candidateDoiId = getCandidateDoiId({\n data: dataAsRecord,\n portalDoiConfiguration,\n })\n\n const showDoiCardLabel = useShowDoiCardLabel({\n portalId: portalDoiConfiguration?.portalId,\n resourceId: candidateDoiId,\n })\n\n const values: {\n columnDisplayName: string\n value: React.ReactNode\n columnName?: string\n }[] = []\n const { secondaryLabels = [] } = genericCardSchema\n const customLabelConfig = genericCardSchema.customSecondaryLabelConfig\n\n // PORTALS-3549 - if a DOI exists or can be created by the current user, show it\n if (\n showDoiCardLabel &&\n portalDoiConfiguration &&\n candidateDoiId &&\n cardIsInView\n ) {\n values.push({\n columnDisplayName: 'DOI',\n value: (\n <PortalDOI\n portalId={portalDoiConfiguration.portalId}\n resourceId={candidateDoiId}\n />\n ),\n })\n }\n\n // Overwrite the 'HOW TO DOWNLOAD' link if a synapse ID is available\n if (customLabelConfig?.isVisible(schema, data)) {\n const { key, value } = customLabelConfig\n if (resolvedDownloadCartSynIdValue) {\n values.push({\n columnDisplayName: 'HOW TO DOWNLOAD',\n value: (\n <Link onClick={() => setShowDownloadConfirmation(val => !val)}>\n Click here to add to Synapse download list\n </Link>\n ),\n })\n } else {\n values.push({ columnDisplayName: key, value })\n }\n }\n\n const isView = table && !isTableEntity(table)\n for (let i = 0; i < secondaryLabels.length; i += 1) {\n const columnName = secondaryLabels[i]\n const rawValue: string | undefined = data[schema[columnName]]\n let renderedValue: React.ReactNode = rawValue\n let columnDisplayName\n if (renderedValue && rawValue !== '[]' && rawValue !== '[\"\"]') {\n // PORTALS-2750: special rendering of the datasetSizeInBytes (for Dataset Collections)\n if (\n isDatasetCollection(table as Entity) &&\n columnName === 'datasetSizeInBytes'\n ) {\n columnDisplayName = 'Size'\n renderedValue = calculateFriendlyFileSize(parseInt(rawValue))\n } // SWC-6115: special rendering of the version column (for Views)\n else if (isView && columnName === 'currentVersion') {\n const synapseId = data[schema.id]\n renderedValue = (\n <VersionLabel synapseId={synapseId} version={rawValue} />\n )\n columnDisplayName = 'Version'\n } else {\n const labelLink = labelLinkConfig?.find(\n el => el.matchColumnName === columnName,\n )\n renderedValue = (\n <SynapseCardLabel\n value={rawValue}\n columnName={columnName}\n labelLink={labelLink}\n isHeader={isHeader}\n selectColumns={selectColumns}\n columnModels={columnModels}\n rowData={data}\n columnIconOptions={columnIconOptions}\n />\n )\n columnDisplayName = getColumnDisplayName(columnName)\n }\n values.push({ columnDisplayName, value: renderedValue, columnName })\n }\n }\n\n const fileHandleId = imageFileHandleIdValue || linkValue\n\n /**\n * To show a direct download link to a file, we need to determine the association that gives permission to download the file.\n */\n const fileHandleAssociation = getFileHandleAssociation(\n table,\n fileHandleId,\n data[schema.id],\n )\n\n const descriptionSubTitle = getColumnDisplayName(\n genericCardSchema.description || '',\n )\n\n const doiColumnIndex = getColumnIndex('doi', selectColumns, columnModels)\n const doiValue =\n doiColumnIndex !== undefined ? data[doiColumnIndex] : undefined\n\n // Normalize ctaLinkConfig to array and resolve each config\n const ctaLinkConfigs = ctaLinkConfig\n ? Array.isArray(ctaLinkConfig)\n ? ctaLinkConfig\n : [ctaLinkConfig]\n : []\n const resolvedCtaLinkConfigs = ctaLinkConfigs\n .map(config => {\n const ctaLinkValue: string = data[schema[config.link]] || ''\n if (!ctaLinkValue) return null\n const { href, target } = getLinkParams(\n ctaLinkValue,\n undefined, //card link config\n data,\n schema,\n rowId,\n )\n return {\n text: config.endIcon ? (\n <div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>\n {config.text}\n {config.endIcon}\n </div>\n ) : (\n config.text\n ),\n href,\n target,\n }\n })\n .filter(Boolean) as { text: string; href: string; target?: string }[]\n\n let croissantButton = <></>\n if (\n resolvedSynapseEntityId != null &&\n resolvedSynapseEntityVersionNumber != null\n ) {\n croissantButton = (\n <CroissantButton\n datasetId={resolvedSynapseEntityId}\n datasetVersionNumber={resolvedSynapseEntityVersionNumber}\n />\n )\n }\n\n const resolvedCardTypeAdornment = CardTypeAdornment ? (\n <CardTypeAdornment schema={schema} data={data} />\n ) : null\n\n let isRenderingIcon = true\n if (isHeader && !imageFileHandleIdValue && !iconValue) {\n // For header cards, if there is no image or explicit icon value, we don't show an icon at all\n isRenderingIcon = false\n }\n return (\n <GenericCard\n ref={ref}\n icon={\n isRenderingIcon ? (\n <GenericCardIcon\n type={\n useTypeColumnForIcon\n ? data[schema['type']]\n : genericCardSchema.type\n }\n useTypeForIcon={useTypeColumnForIcon}\n thumbnailRequiresPadding={\n genericCardSchema.thumbnailRequiresPadding\n }\n imageFileHandleId={imageFileHandleIdValue}\n fileHandleAssociation={fileHandleAssociation}\n iconOptions={iconOptions}\n iconValue={iconValue}\n />\n ) : undefined\n }\n isHeader={isHeader}\n sustainabilityScorecard={sustainabilityScorecard}\n headerCardVariant={headerCardVariant}\n type={type}\n title={title}\n subtitle={subTitle}\n titleLinkConfiguration={{ target, href }}\n cardTypeAdornment={resolvedCardTypeAdornment}\n titleAsFileHandleLinkConfiguration={\n !titleLinkConfig &&\n titleColumnType === ColumnTypeEnum.FILEHANDLEID &&\n fileHandleAssociation\n ? {\n fileHandleAssociation: fileHandleAssociation,\n showDownloadIcon: type !== SynapseConstants.EXPERIMENTAL,\n }\n : undefined\n }\n ctaLinkConfig={\n resolvedCtaLinkConfigs.length > 0 ? resolvedCtaLinkConfigs : undefined\n }\n ctaLinkPosition={ctaLinkPosition}\n titleAreaRightContent={resolvedTitleAreaRightContent}\n description={description}\n descriptionSubTitle={descriptionSubTitle}\n descriptionConfig={descriptionConfig}\n charCountCutoff={charCountCutoff}\n labels={values}\n secondaryLabelLimit={secondaryLabelLimit}\n useStylesForDisplayedImage={Boolean(imageFileHandleIdValue)}\n cardTopContent={\n resolvedDownloadCartSynIdValue && (\n <Collapse in={showDownloadConfirmation}>\n <EntityDownloadConfirmation\n entityId={resolvedDownloadCartSynIdValue}\n versionNumber={resolvedDownloadCartVersionNumber}\n handleClose={() => setShowDownloadConfirmation(false)}\n onIsLoadingChange={isLoading => {\n setDownloadButtonLoading(isLoading)\n }}\n />\n </Collapse>\n )\n }\n renderedIconList={\n // If the portal configs has columnIconOptions.columns.dataType option\n // and the column value is not null, display the card data type icons\n columnIconOptions?.columns?.dataType &&\n dataTypeIconNames?.length && (\n <div style={{ marginTop: '20px' }}>\n <IconList\n iconConfigs={columnIconOptions.columns.dataType}\n iconNames={JSON.parse(dataTypeIconNames) as string[]}\n commonIconProps={{\n sx: { fontSize: '40px' },\n }}\n useBackground={true}\n useTheme={true}\n />\n </div>\n )\n }\n cardTopButtons={\n <Box sx={{ display: 'flex', gap: 1 }}>\n {croissantButton}\n {/* PORTALS-3386 Use synapseLink in schema to add entity to download cart */}\n {resolvedDownloadCartSynIdValue && (\n <GenericCardActionButton\n onClick={() => setShowDownloadConfirmation(val => !val)}\n variant=\"outlined\"\n startIcon={<GetAppTwoTone sx={{ height: '12px' }} />}\n loading={downloadButtonLoading}\n >\n Download\n </GenericCardActionButton>\n )}\n {includeCitation && doiValue && (\n <CitationPopover\n title={title}\n doi={doiValue}\n boilerplateText={citationBoilerplateText}\n defaultCitationFormat={defaultCitationFormat}\n />\n )}\n {includeShareButton && isHeader && (\n <ShareThisPage {...sharePageLinkButtonProps} />\n )}\n </Box>\n }\n />\n )\n}\n\nexport default TableRowGenericCard\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuLA,SAAS,GAAa,GAA+C;CACnE,IAAM,EAAE,cAAW,eAAY;CAC/B,OACE,kBAAC,QAAD,EAAA,UAAA;EACG;EAAQ;EACT,kBAAC,KAAD;GACE,QAAQ,EAAW;GACnB,KAAI;GACJ,MAAM,GAAG,EAA2B,OAAO,UAAU,EAAU,GAAG;aACnE;EAEE,CAAA;CACC,EAAA,CAAA;AAEV;AAKA,SAAgB,EAAoB,GAAiC;C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,MAAa;KAC9B,GAAyB,CAAS;IACpC;GACD,CAAA;EACO,CAAA;EAGd,kBAGE,GAAmB,SAAS,YAC5B,GAAmB,UACjB,kBAAC,OAAD;GAAK,OAAO,EAAE,WAAW,OAAO;aAC9B,kBAAC,IAAD;IACE,aAAa,EAAkB,QAAQ;IACvC,WAAW,KAAK,MAAM,CAAiB;IACvC,iBAAiB,EACf,IAAI,EAAE,UAAU,OAAO,EACzB;IACA,eAAe;IACf,UAAU;GACX,CAAA;EACE,CAAA;EAGT,gBACE,kBAAC,IAAD;GAAK,IAAI;IAAE,SAAS;IAAQ,KAAK;GAAE;aAAnC;IACG;IAEA,KACC,kBAAC,IAAD;KACE,eAAe,GAA4B,MAAO,CAAC,CAAG;KACtD,SAAQ;KACR,WAAW,kBAAC,IAAD,EAAe,IAAI,EAAE,QAAQ,OAAO,EAAI,CAAA;KACnD,SAAS;eACV;IAEwB,CAAA;IAE1B,MAAmB,KAClB,kBAAC,IAAD;KACS;KACP,KAAK;KACL,iBAAiB;KACM;IACxB,CAAA;IAEF,MAAsB,KACrB,kBAAC,IAAD,EAAe,GAAI,GAA2B,CAAA;GAE7C;;CAER,CAAA;AAEL"}
|
|
1
|
+
{"version":3,"file":"TableRowGenericCard.js","names":[],"sources":["../../../src/components/GenericCard/TableRowGenericCard.tsx"],"sourcesContent":["import { CommonCardProps } from '@/components/CardContainer/CardConfiguration'\nimport {\n getFileHandleAssociation,\n getLinkParams,\n getValueOrMultiValue,\n} from '@/components/GenericCard/CardUtils'\nimport CroissantButton from '@/components/GenericCard/CroissantButton/CroissantButton'\nimport { GenericCardIcon } from '@/components/GenericCard/GenericCardIcon'\nimport PortalDOI from '@/components/GenericCard/PortalDOI/PortalDOI'\nimport {\n getCandidateDoiId,\n useShowDoiCardLabel,\n} from '@/components/GenericCard/PortalDOI/PortalDOIUtils'\nimport { mapRowToRecord } from '@/components/SynapseTable/SynapseTableUtils'\nimport { useGetEntity } from '@/synapse-queries'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport {\n isDatasetCollection,\n isTableEntity,\n} from '@/utils/functions/EntityTypeUtils'\nimport { PRODUCTION_ENDPOINT_CONFIG } from '@/utils/functions/getEndpoint'\nimport { parseSynId } from '@/utils/functions/RegularExpressions'\nimport { getColumnIndex } from '@/utils/functions/SqlFunctions'\nimport { TargetEnum } from '@/utils/html/TargetEnum'\nimport * as SynapseConstants from '@/utils/SynapseConstants'\nimport { GetAppTwoTone } from '@mui/icons-material'\nimport { Box, Collapse, Link, Stack, Typography } from '@mui/material'\nimport {\n ColumnModel,\n ColumnTypeEnum,\n Entity,\n SelectColumn,\n Table,\n} from '@sage-bionetworks/synapse-types'\nimport React, { useCallback, useMemo, useState } from 'react'\nimport { useInView } from 'react-intersection-observer'\nimport CitationPopover from '../CitationPopover'\nimport { EntityDownloadConfirmation } from '../EntityDownloadConfirmation'\nimport { HeaderCardVariant } from '../HeaderCard'\nimport IconList from '../IconList'\nimport { useQueryContext } from '../QueryContext/QueryContext'\nimport { useQueryVisualizationContext } from '../QueryVisualizationWrapper'\nimport ShareThisPage, {\n ShareThisPageProps,\n} from '../ShareThisPage/ShareThisPage'\nimport { SustainabilityScorecardProps } from '../SustainabilityScorecard/SustainabilityScorecard'\nimport GenericCard from './GenericCard'\nimport GenericCardActionButton from './GenericCardActionButton'\nimport DuoTermTags from './DuoTermTags/DuoTermTags'\nimport { parseDuoModifiers } from './DuoTermTags/duoTerms'\nimport { PortalDOIConfiguration } from './PortalDOI/PortalDOIConfiguration'\nimport { SynapseCardLabel } from './SynapseCardLabel'\nimport { useResolvedSynapseEntity } from './useResolvedSynapseEntity'\n\ntype RowSynapseEntityConfig = {\n /** Use the table rowId to resolve the Synapse entity ID. */\n id: {\n source: 'rowId'\n }\n /** Use the table rowVersionNumber to resolve the Synapse entity version (if available). */\n version?: {\n source: 'rowVersionNumber'\n }\n}\n\ntype ColumnSynapseEntityConfig = {\n /** Use a column value to resolve the Synapse entity ID. */\n id: {\n source: 'column'\n columnName: string\n }\n /** Use a column value to resolve the Synapse entity version. */\n version?: {\n source: 'column'\n columnName: string\n }\n}\n\nexport type SynapseEntityConfig =\n | RowSynapseEntityConfig\n | ColumnSynapseEntityConfig\n\n/**\n * Maps a table query result to a GenericCard.\n */\nexport type TableToGenericCardMapping = {\n /** The 'type' of resource a card refers to. Renders a label on the card with this string value.\n * Can be hidden by setting it to '' (empty string)\n */\n type: string\n /** The column name whose data contains the title of the card */\n title: string\n /** The column name whose data contains the subtitle of the card */\n subTitle?: string\n /** The column name whose data contains the description of the card */\n description?: string\n /** If true, a 'Cite As' button will be displayed for those cards with a DOI in the 'doi' column */\n includeCitation?: boolean\n /** If true, a 'Share this page' button will be displayed */\n includeShareButton?: boolean\n /**\n * Configuration for displaying the SustainabilityScorecard component\n */\n sustainabilityScorecard?: SustainabilityScorecardProps\n /** The initial citation format to use in the 'Cite As' UI */\n defaultCitationFormat?: 'bibtex' | 'apa' | 'ieee' | 'nature' | 'science'\n /** Static text displayed in the 'Cite As' UI */\n citationBoilerplateText?: string\n /** The column name whose data contains the value used to map to the icon */\n icon?: string\n /** The column name whose data contains an image file handle to be displayed on the card */\n imageFileHandleColumnName?: string\n /** Static boolean value used if the image displayed using `imageFileHandleColumnName` requires extra padding */\n thumbnailRequiresPadding?: boolean\n /** Array of column names to be used for labels in the Card Footer */\n secondaryLabels?: string[]\n /** Can be used to add a custom secondary label */\n customSecondaryLabelConfig?: {\n /** The displayed label key */\n key: string\n /** The value to display */\n value: React.ReactNode\n /** Callback to determine visibility of the label\n * @param schema the mapping of columnName to data index\n * @param data the row data\n */\n isVisible: (schema: Record<string, number>, data: string[]) => boolean\n }\n /** Column name of the link value if the title should be linked */\n link?: string\n /** Column name of the STRING_LIST column that includes icon names that represent icons that should be displayed on the card */\n dataTypeIconNames?: string\n /**\n * Ordered list of column names to display to the right of the title area.\n * Each renders as \"Display Name: Value\" on its own line. Rows with empty values are skipped.\n * The display name is derived from getColumnDisplayName (respects column aliases and unCamelCase).\n *\n * Can also be a function that receives the schema and row data and returns the list of column\n * names to display, allowing the displayed details to vary based on the row's actual values.\n */\n titleAreaDetails?:\n | string[]\n | ((schema: Record<string, number>, data: string[]) => string[])\n /** Configuration for resolving the Synapse entity ID/version represented by each card row.\n * The ID and version sources must both reference either row-based values or column-based values.\n */\n synapseEntityConfig?: SynapseEntityConfig\n /** The column name whose data contains a synId that can be used to show a button to add the corresponding entity to the download cart. */\n downloadCartSynId?: string\n /** Configuration to display a DOI, as well as the ability to create one for users with such permission */\n portalDoiConfiguration?: PortalDOIConfiguration\n /**\n * Column name of a STRING_LIST of Data Use Ontology (DUO) values (ontology\n * codes or term names). When set, the values are rendered as DUO tags in a\n * \"Data Usage Restrictions\" row in the card's metadata section.\n */\n dataUseModifiersColumnName?: string\n}\n\nexport type TableRowGenericCardProps = {\n /** The schema that maps a table result to the GenericCard UI */\n genericCardSchema: TableToGenericCardMapping\n /** The table's SelectColumns */\n selectColumns?: SelectColumn[]\n /** The table's ColumnModels */\n columnModels?: ColumnModel[]\n /** If true, the 'type' column will be used as the icon string to choose the icon */\n useTypeColumnForIcon?: boolean\n /** If true, render the card as a HeaderCard */\n isHeader?: boolean\n /** If isHeader is true, use this variant of HeaderCard */\n headerCardVariant?: HeaderCardVariant\n isAlignToLeftNav?: boolean\n /** Mapping of column name to row data index */\n schema: Record<string, number>\n /** The row data */\n data: string[]\n /** The ID of the table row */\n rowId?: number\n /** The versionNumber of the table row */\n versionNumber?: number\n /** Optional props for the ShareThisPage component */\n sharePageLinkButtonProps?: ShareThisPageProps\n /** Optional function that receives schema and data and returns a ReactNode to be rendered next to the card type */\n CardTypeAdornment?: React.ComponentType<{\n schema: Record<string, number>\n data: string[]\n }>\n} & CommonCardProps\n\n// SWC-6115: special rendering of the version column (for Views)\nfunction VersionLabel(props: { synapseId: string; version: string }) {\n const { synapseId, version } = props\n return (\n <span>\n {version} \n <a\n target={TargetEnum.NEW_WINDOW}\n rel=\"noopener noreferrer\"\n href={`${PRODUCTION_ENDPOINT_CONFIG.PORTAL}Synapse:${synapseId}.${version}`}\n >\n (Show Version History on Synapse)\n </a>\n </span>\n )\n}\n\n/**\n * Maps a table row to a GenericCard.\n */\nexport function TableRowGenericCard(props: TableRowGenericCardProps) {\n const [showDownloadConfirmation, setShowDownloadConfirmation] =\n useState(false)\n const [downloadButtonLoading, setDownloadButtonLoading] = useState(false)\n\n const { entityId, versionNumber } = useQueryContext()\n const { getColumnDisplayName } = useQueryVisualizationContext()\n\n const { ref, inView: cardIsInView } = useInView()\n\n const { data: table } = useGetEntity<Table>(entityId, versionNumber)\n\n const {\n schema,\n data,\n rowId,\n versionNumber: rowVersionNumber,\n genericCardSchema,\n secondaryLabelLimit,\n sharePageLinkButtonProps,\n selectColumns,\n columnModels,\n iconOptions,\n useTypeColumnForIcon = false,\n isHeader = false,\n sustainabilityScorecard,\n headerCardVariant,\n titleLinkConfig,\n ctaLinkConfig,\n ctaLinkPosition,\n labelLinkConfig,\n descriptionConfig,\n columnIconOptions,\n CardTypeAdornment,\n charCountCutoff,\n } = props\n\n const {\n link = '',\n type,\n includeCitation,\n includeShareButton,\n defaultCitationFormat,\n citationBoilerplateText,\n downloadCartSynId,\n portalDoiConfiguration,\n } = genericCardSchema\n const title = data[schema[genericCardSchema.title]]\n let subTitle =\n genericCardSchema.subTitle && data[schema[genericCardSchema.subTitle]]\n subTitle =\n genericCardSchema.subTitle &&\n getValueOrMultiValue({\n value: subTitle,\n columnName: genericCardSchema.subTitle,\n selectColumns,\n columnModels,\n }).str\n const description = data[schema[genericCardSchema.description || '']]\n const iconValue = data[schema[genericCardSchema.icon || '']]\n const dataTypeIconNames =\n data[schema[genericCardSchema.dataTypeIconNames || '']]\n const imageFileHandleIdValue =\n data[schema[genericCardSchema.imageFileHandleColumnName || '']]\n const titleColumnModel = columnModels?.find(\n el => genericCardSchema.link === el.name,\n )\n const titleColumnType = titleColumnModel?.columnType\n // wrap link in parens because undefined would throw an error\n const linkValue: string = data[schema[link]] || ''\n const { href, target } = getLinkParams(\n linkValue,\n titleLinkConfig,\n data,\n schema,\n rowId,\n )\n\n const synapseEntityConfig = genericCardSchema.synapseEntityConfig\n\n const getColumnValue = useCallback(\n (columnName?: string) => {\n if (!columnName) {\n return undefined\n }\n const columnIndex = schema[columnName]\n if (columnIndex === undefined) {\n return undefined\n }\n return data[columnIndex]\n },\n [schema, data],\n )\n\n // DUO (Data Use Ontology) tags, when a dataUseModifiers column is configured.\n // Rendered as a \"Data Usage Restrictions\" row in the metadata section.\n const duoContent = useMemo(() => {\n const col = genericCardSchema.dataUseModifiersColumnName\n if (!col) {\n return undefined\n }\n const terms = parseDuoModifiers(data[schema[col]])\n if (terms.length === 0) {\n return undefined\n }\n return <DuoTermTags terms={terms} />\n }, [genericCardSchema, data, schema])\n\n const resolvedTitleAreaRightContent = useMemo(() => {\n const { titleAreaDetails } = genericCardSchema\n if (!titleAreaDetails) return undefined\n const columns =\n typeof titleAreaDetails === 'function'\n ? titleAreaDetails(schema, data)\n : titleAreaDetails\n if (columns.length === 0) return undefined\n const rows = columns\n .map(columnName => {\n const rawValue: string | undefined = data[schema[columnName]]\n if (!rawValue) return null\n return { name: getColumnDisplayName(columnName), rawValue, columnName }\n })\n .filter(Boolean) as {\n name: string\n rawValue: string\n columnName: string\n }[]\n if (rows.length === 0) return undefined\n return (\n <Stack direction=\"column\" gap=\"4px\">\n {rows.map(({ name, rawValue, columnName }) => (\n <Stack key={columnName} direction=\"row\" gap=\"4px\" alignItems=\"center\">\n <Typography component=\"span\" variant=\"body1\">\n {name}:\n </Typography>\n <SynapseCardLabel\n value={rawValue}\n columnName={columnName}\n labelLink={undefined}\n isHeader={isHeader}\n selectColumns={selectColumns}\n columnModels={columnModels}\n rowData={data}\n columnIconOptions={columnIconOptions}\n />\n </Stack>\n ))}\n </Stack>\n )\n }, [\n genericCardSchema,\n data,\n schema,\n getColumnDisplayName,\n isHeader,\n selectColumns,\n columnModels,\n columnIconOptions,\n ])\n\n const {\n entityId: resolvedSynapseEntityId,\n entityVersionNumber: resolvedSynapseEntityVersionNumber,\n } = useResolvedSynapseEntity({\n synapseEntityConfig,\n getColumnValue,\n rowId,\n rowVersionNumber,\n })\n\n let resolvedDownloadCartSynIdValue = resolvedSynapseEntityId\n let resolvedDownloadCartVersionNumber = resolvedSynapseEntityVersionNumber\n\n if (downloadCartSynId) {\n const reference = parseSynId(getColumnValue(downloadCartSynId) ?? '')\n resolvedDownloadCartSynIdValue = reference?.targetId\n resolvedDownloadCartVersionNumber = reference?.targetVersionNumber\n }\n\n // Transform the row to a record of (columnName, value) pairs for compatibility with getCandidateDoiId\n const dataAsRecord: Record<string, string | null> = useMemo(\n () => mapRowToRecord(data, schema),\n [data, schema],\n )\n\n const candidateDoiId = getCandidateDoiId({\n data: dataAsRecord,\n portalDoiConfiguration,\n })\n\n const showDoiCardLabel = useShowDoiCardLabel({\n portalId: portalDoiConfiguration?.portalId,\n resourceId: candidateDoiId,\n })\n\n const values: {\n columnDisplayName: string\n value: React.ReactNode\n columnName?: string\n }[] = []\n const { secondaryLabels = [] } = genericCardSchema\n const customLabelConfig = genericCardSchema.customSecondaryLabelConfig\n\n // DUO tags rendered as a metadata row (alongside \"How to download\", size, …).\n if (duoContent) {\n values.push({\n columnDisplayName: 'Data Usage Restrictions',\n value: duoContent,\n })\n }\n\n // PORTALS-3549 - if a DOI exists or can be created by the current user, show it\n if (\n showDoiCardLabel &&\n portalDoiConfiguration &&\n candidateDoiId &&\n cardIsInView\n ) {\n values.push({\n columnDisplayName: 'DOI',\n value: (\n <PortalDOI\n portalId={portalDoiConfiguration.portalId}\n resourceId={candidateDoiId}\n />\n ),\n })\n }\n\n // Overwrite the 'HOW TO DOWNLOAD' link if a synapse ID is available\n if (customLabelConfig?.isVisible(schema, data)) {\n const { key, value } = customLabelConfig\n if (resolvedDownloadCartSynIdValue) {\n values.push({\n columnDisplayName: 'HOW TO DOWNLOAD',\n value: (\n <Link onClick={() => setShowDownloadConfirmation(val => !val)}>\n Click here to add to Synapse download list\n </Link>\n ),\n })\n } else {\n values.push({ columnDisplayName: key, value })\n }\n }\n\n const isView = table && !isTableEntity(table)\n for (let i = 0; i < secondaryLabels.length; i += 1) {\n const columnName = secondaryLabels[i]\n const rawValue: string | undefined = data[schema[columnName]]\n let renderedValue: React.ReactNode = rawValue\n let columnDisplayName\n if (renderedValue && rawValue !== '[]' && rawValue !== '[\"\"]') {\n // PORTALS-2750: special rendering of the datasetSizeInBytes (for Dataset Collections)\n if (\n isDatasetCollection(table as Entity) &&\n columnName === 'datasetSizeInBytes'\n ) {\n columnDisplayName = 'Size'\n renderedValue = calculateFriendlyFileSize(parseInt(rawValue))\n } // SWC-6115: special rendering of the version column (for Views)\n else if (isView && columnName === 'currentVersion') {\n const synapseId = data[schema.id]\n renderedValue = (\n <VersionLabel synapseId={synapseId} version={rawValue} />\n )\n columnDisplayName = 'Version'\n } else {\n const labelLink = labelLinkConfig?.find(\n el => el.matchColumnName === columnName,\n )\n renderedValue = (\n <SynapseCardLabel\n value={rawValue}\n columnName={columnName}\n labelLink={labelLink}\n isHeader={isHeader}\n selectColumns={selectColumns}\n columnModels={columnModels}\n rowData={data}\n columnIconOptions={columnIconOptions}\n />\n )\n columnDisplayName = getColumnDisplayName(columnName)\n }\n values.push({ columnDisplayName, value: renderedValue, columnName })\n }\n }\n\n const fileHandleId = imageFileHandleIdValue || linkValue\n\n /**\n * To show a direct download link to a file, we need to determine the association that gives permission to download the file.\n */\n const fileHandleAssociation = getFileHandleAssociation(\n table,\n fileHandleId,\n data[schema.id],\n )\n\n const descriptionSubTitle = getColumnDisplayName(\n genericCardSchema.description || '',\n )\n\n const doiColumnIndex = getColumnIndex('doi', selectColumns, columnModels)\n const doiValue =\n doiColumnIndex !== undefined ? data[doiColumnIndex] : undefined\n\n // Normalize ctaLinkConfig to array and resolve each config\n const ctaLinkConfigs = ctaLinkConfig\n ? Array.isArray(ctaLinkConfig)\n ? ctaLinkConfig\n : [ctaLinkConfig]\n : []\n const resolvedCtaLinkConfigs = ctaLinkConfigs\n .map(config => {\n const ctaLinkValue: string = data[schema[config.link]] || ''\n if (!ctaLinkValue) return null\n const { href, target } = getLinkParams(\n ctaLinkValue,\n undefined, //card link config\n data,\n schema,\n rowId,\n )\n return {\n text: config.endIcon ? (\n <div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>\n {config.text}\n {config.endIcon}\n </div>\n ) : (\n config.text\n ),\n href,\n target,\n }\n })\n .filter(Boolean) as { text: string; href: string; target?: string }[]\n\n let croissantButton = <></>\n if (\n resolvedSynapseEntityId != null &&\n resolvedSynapseEntityVersionNumber != null\n ) {\n croissantButton = (\n <CroissantButton\n datasetId={resolvedSynapseEntityId}\n datasetVersionNumber={resolvedSynapseEntityVersionNumber}\n />\n )\n }\n\n const resolvedCardTypeAdornment = CardTypeAdornment ? (\n <CardTypeAdornment schema={schema} data={data} />\n ) : null\n\n let isRenderingIcon = true\n if (isHeader && !imageFileHandleIdValue && !iconValue) {\n // For header cards, if there is no image or explicit icon value, we don't show an icon at all\n isRenderingIcon = false\n }\n const iconNode = isRenderingIcon ? (\n <GenericCardIcon\n type={\n useTypeColumnForIcon ? data[schema['type']] : genericCardSchema.type\n }\n useTypeForIcon={useTypeColumnForIcon}\n thumbnailRequiresPadding={genericCardSchema.thumbnailRequiresPadding}\n imageFileHandleId={imageFileHandleIdValue}\n fileHandleAssociation={fileHandleAssociation}\n iconOptions={iconOptions}\n iconValue={iconValue}\n />\n ) : undefined\n return (\n <GenericCard\n ref={ref}\n icon={iconNode}\n isHeader={isHeader}\n sustainabilityScorecard={sustainabilityScorecard}\n headerCardVariant={headerCardVariant}\n type={type}\n title={title}\n subtitle={subTitle}\n titleLinkConfiguration={{ target, href }}\n cardTypeAdornment={resolvedCardTypeAdornment}\n titleAsFileHandleLinkConfiguration={\n !titleLinkConfig &&\n titleColumnType === ColumnTypeEnum.FILEHANDLEID &&\n fileHandleAssociation\n ? {\n fileHandleAssociation: fileHandleAssociation,\n showDownloadIcon: type !== SynapseConstants.EXPERIMENTAL,\n }\n : undefined\n }\n ctaLinkConfig={\n resolvedCtaLinkConfigs.length > 0 ? resolvedCtaLinkConfigs : undefined\n }\n ctaLinkPosition={ctaLinkPosition}\n titleAreaRightContent={resolvedTitleAreaRightContent}\n description={description}\n descriptionSubTitle={descriptionSubTitle}\n descriptionConfig={descriptionConfig}\n charCountCutoff={charCountCutoff}\n labels={values}\n secondaryLabelLimit={secondaryLabelLimit}\n useStylesForDisplayedImage={Boolean(imageFileHandleIdValue)}\n cardTopContent={\n <>\n {resolvedDownloadCartSynIdValue && (\n <Collapse in={showDownloadConfirmation}>\n <EntityDownloadConfirmation\n entityId={resolvedDownloadCartSynIdValue}\n versionNumber={resolvedDownloadCartVersionNumber}\n handleClose={() => setShowDownloadConfirmation(false)}\n onIsLoadingChange={isLoading => {\n setDownloadButtonLoading(isLoading)\n }}\n />\n </Collapse>\n )}\n </>\n }\n renderedIconList={\n // If the portal configs has columnIconOptions.columns.dataType option\n // and the column value is not null, display the card data type icons\n columnIconOptions?.columns?.dataType &&\n dataTypeIconNames?.length && (\n <div style={{ marginTop: '20px' }}>\n <IconList\n iconConfigs={columnIconOptions.columns.dataType}\n iconNames={JSON.parse(dataTypeIconNames) as string[]}\n commonIconProps={{\n sx: { fontSize: '40px' },\n }}\n useBackground={true}\n useTheme={true}\n />\n </div>\n )\n }\n cardTopButtons={\n <Box sx={{ display: 'flex', gap: 1, alignItems: 'center' }}>\n {croissantButton}\n {/* PORTALS-3386 Use synapseLink in schema to add entity to download cart */}\n {resolvedDownloadCartSynIdValue && (\n <GenericCardActionButton\n onClick={() => setShowDownloadConfirmation(val => !val)}\n variant=\"outlined\"\n startIcon={<GetAppTwoTone sx={{ height: '12px' }} />}\n loading={downloadButtonLoading}\n >\n Download\n </GenericCardActionButton>\n )}\n {includeCitation && doiValue && (\n <CitationPopover\n title={title}\n doi={doiValue}\n boilerplateText={citationBoilerplateText}\n defaultCitationFormat={defaultCitationFormat}\n />\n )}\n {includeShareButton && isHeader && (\n <ShareThisPage {...sharePageLinkButtonProps} />\n )}\n </Box>\n }\n />\n )\n}\n\nexport default TableRowGenericCard\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,SAAS,GAAa,GAA+C;CACnE,IAAM,EAAE,cAAW,eAAY;CAC/B,OACE,kBAAC,QAAD,EAAA,UAAA;EACG;EAAQ;EACT,kBAAC,KAAD;GACE,QAAQ,EAAW;GACnB,KAAI;GACJ,MAAM,GAAG,EAA2B,OAAO,UAAU,EAAU,GAAG;aACnE;EAEE,CAAA;CACC,EAAA,CAAA;AAEV;AAKA,SAAgB,EAAoB,GAAiC;CACnE,IAAM,CAAC,GAA0B,KAC/B,EAAS,EAAK,GACV,CAAC,IAAuB,MAA4B,EAAS,EAAK,GAElE,EAAE,cAAU,sBAAkB,GAAgB,GAC9C,EAAE,4BAAyB,GAA6B,GAExD,EAAE,SAAK,QAAQ,OAAiB,GAAU,GAE1C,EAAE,MAAM,MAAU,GAAoB,IAAU,EAAa,GAE7D,EACJ,WACA,SACA,UACA,eAAe,IACf,sBACA,yBACA,8BACA,kBACA,iBACA,iBACA,0BAAuB,IACvB,cAAW,IACX,6BACA,uBACA,oBACA,kBACA,qBACA,qBACA,uBACA,sBACA,sBACA,wBACE,GAEE,EACJ,WAAO,IACP,SACA,qBACA,wBACA,2BACA,6BACA,sBACA,8BACE,GACE,IAAQ,EAAK,EAAO,EAAkB,SACxC,IACF,EAAkB,YAAY,EAAK,EAAO,EAAkB;CAC9D,IACE,EAAkB,YAClB,GAAqB;EACnB,OAAO;EACP,YAAY,EAAkB;EAC9B;EACA;CACF,CAAC,EAAE;CACL,IAAM,KAAc,EAAK,EAAO,EAAkB,eAAe,MAC3D,IAAY,EAAK,EAAO,EAAkB,QAAQ,MAClD,IACJ,EAAK,EAAO,EAAkB,qBAAqB,MAC/C,IACJ,EAAK,EAAO,EAAkB,6BAA6B,MAIvD,KAHmB,GAAc,MACrC,MAAM,EAA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ACR,WAAW,kBAAC,IAAD,EAAe,IAAI,EAAE,QAAQ,OAAO,EAAI,CAAA;KACnD,SAAS;eACV;IAEwB,CAAA;IAE1B,MAAmB,KAClB,kBAAC,IAAD;KACS;KACP,KAAK;KACL,iBAAiB;KACM;IACxB,CAAA;IAEF,MAAsB,KACrB,kBAAC,IAAD,EAAe,GAAI,GAA2B,CAAA;GAE7C;;CAER,CAAA;AAEL"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
2
|
import { EntityType } from '@sage-bionetworks/synapse-client';
|
|
3
|
-
export declare const IconStrings: readonly ["accessOpen", "accessPending", "accessPendingCloud", "accessClosed", "actionKey", "arrowBack", "arrowForward", "arrowDropUp", "arrowDropDown", "article", "cards", "check", "clear", "cart", "clock", "code", "columns", "openInNewWindow", "dashboard", "delete", "deleteSweep", "filter", "addToCart", "addCircleOutline", "addCircleTwoTone", "reload", "team", "photoCamera", "info", "favTwoTone", "favOutline", "fav", "peopleTwoTone", "challengesTwoTone", "download", "searchOutlined", "search", "history", "time", "login", "helpChatBubble", "helpOutlined", "helpOutlineTwoTone", "expandLess", "expandMore", "rat", "chromatin", "clinical", "contentCopy", "data", "dataLocked", "geneExpression", "geneVariants", "github", "imaging", "inSilicoModel", "modelSystem", "bioChemicalPhysical", "computationalTool", "spatialProfiling", "dataReuse", "lineGraph", "kinomics", "proteomics", "packagableFile", "unpackagableFile", "other", "wiki", "file", "fileOutlined", "folder", "link", "linkOff", "table", "tableRows", "share", "public", "people", "entityview", "submissionview", "challenge", "discussion", "dataset", "datasetcollection", "docker", "accountCertified", "accountRegistered", "accountValidated", "warningOutlined", "removeCircle", "replyTwoTone", "chatTwoTone", "accessManagement", "chevronRight", "chevronLeft", "database", "close", "cross", "verticalEllipsis", "sync", "clipboard", "clipboardCheck", "add", "warning", "circle", "block", "checkCircle", "errorOutlined", "phone", "pushpin", "addBoxOutline", "minusBoxOutline", "italic", "bold", "title", "visibility", "visibilityOff", "strikethrough", "subscript", "superscript", "latex", "image", "edit", "tag", "restore", "label", "upload", "flag", "newFolder", "createVersion", "email", "addConditions", "sortUp", "sortDown", "orcid", "tasks", "google24", "openInFull", "tableview", "fileWithShield", "baseline", "rosetteRibbon", "starTrophy", "awardScroll", "clappingHands", "podium", "openBook", "handWithMoney", "threeStars", "multiFile", "publicVisibility", "openVisibility", "privateVisibility"];
|
|
3
|
+
export declare const IconStrings: readonly ["accessOpen", "accessPending", "accessPendingCloud", "accessClosed", "actionKey", "arrowBack", "arrowForward", "arrowDropUp", "arrowDropDown", "article", "cards", "check", "clear", "cart", "clock", "code", "columns", "openInNewWindow", "dashboard", "delete", "deleteSweep", "filter", "addToCart", "addCircleOutline", "addCircleTwoTone", "reload", "team", "photoCamera", "info", "favTwoTone", "favOutline", "fav", "peopleTwoTone", "challengesTwoTone", "download", "searchOutlined", "search", "history", "time", "login", "helpChatBubble", "helpOutlined", "helpOutlineTwoTone", "expandLess", "expandMore", "rat", "chromatin", "clinical", "contentCopy", "data", "dataLocked", "geneExpression", "geneVariants", "github", "imaging", "inSilicoModel", "modelSystem", "bioChemicalPhysical", "computationalTool", "spatialProfiling", "dataReuse", "lineGraph", "kinomics", "proteomics", "packagableFile", "unpackagableFile", "other", "wiki", "file", "fileOutlined", "folder", "link", "linkOff", "table", "tableRows", "share", "public", "people", "entityview", "submissionview", "challenge", "discussion", "dataset", "datasetcollection", "docker", "accountCertified", "accountRegistered", "accountValidated", "warningOutlined", "removeCircle", "replyTwoTone", "chatTwoTone", "accessManagement", "chevronRight", "chevronLeft", "database", "close", "cross", "verticalEllipsis", "support", "sync", "clipboard", "clipboardCheck", "add", "warning", "circle", "block", "checkCircle", "errorOutlined", "phone", "pushpin", "addBoxOutline", "minusBoxOutline", "italic", "bold", "title", "visibility", "visibilityOff", "strikethrough", "subscript", "superscript", "latex", "image", "edit", "tag", "restore", "label", "upload", "flag", "newFolder", "createVersion", "email", "addConditions", "sortUp", "sortDown", "orcid", "tasks", "google24", "openInFull", "tableview", "fileWithShield", "baseline", "rosetteRibbon", "starTrophy", "awardScroll", "clappingHands", "podium", "openBook", "handWithMoney", "threeStars", "multiFile", "publicVisibility", "openVisibility", "privateVisibility"];
|
|
4
4
|
export type IconName = (typeof IconStrings)[number];
|
|
5
5
|
export type IconSvgProps = {
|
|
6
6
|
icon: IconName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSvg.d.ts","sourceRoot":"","sources":["../../../src/components/IconSvg/IconSvg.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconSvg.d.ts","sourceRoot":"","sources":["../../../src/components/IconSvg/IconSvg.tsx"],"names":[],"mappings":"AAqJA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAG7D,eAAO,MAAM,WAAW,4hEA2Jd,CAAA;AAEV,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,QAAQ,CAAA;IAEd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,GAAG,YAAY,CAAA;AA2UhB,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,2CA2CnC;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,CAezD,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -46,9 +46,9 @@ import I from "../../assets/mui_components/Rat.js";
|
|
|
46
46
|
import L from "../../assets/mui_components/SpatialProfiling.js";
|
|
47
47
|
import { Tooltip as R } from "@mui/material";
|
|
48
48
|
import { Fragment as z, jsx as B } from "react/jsx-runtime";
|
|
49
|
-
import { AccessTimeTwoTone as V, AddBoxOutlined as H, AddCircleOutline as U, AddCircleTwoTone as W, AddShoppingCart as G, AddTwoTone as K, AlternateEmail as ce, ArrowBack as le, ArrowDropDownTwoTone as ue, ArrowDropUpTwoTone as de, ArrowForward as fe, ArticleTwoTone as q, AssessmentTwoTone as J, AssignmentOutlined as pe, AssignmentTurnedInTwoTone as me, Block as he, Cached as ge, ChatTwoTone as _e, Check as ve, CheckCircleTwoTone as ye, ChevronLeft as be, ChevronRight as xe, Clear as Se, CloseTwoTone as Ce, Code as we, ContentCopyTwoTone as Te, CreateNewFolderTwoTone as Ee, DashboardTwoTone as De, DeleteSweepTwoTone as Oe, DeleteTwoTone as ke, EditTwoTone as Ae, ErrorOutlined as je, ExpandLess as Me, ExpandMore as Ne, FactCheckTwoTone as Pe, FilterAltTwoTone as Fe, FlagTwoTone as Ie, FolderTwoTone as Le, FormatBold as Re, FormatItalic as ze, GetAppTwoTone as Be, GitHub as Ve, Group as He, HelpOutlineTwoTone as Ue, HelpOutlined as We, HistoryTwoTone as Ge, Image as Ke, IndeterminateCheckBoxOutlined as qe, InfoOutlined as Je, InsertDriveFileOutlined as Ye, InsertDriveFileTwoTone as Xe, LabelTwoTone as Ze, LanguageTwoTone as Qe, LayersTwoTone as $e, LinkOffTwoTone as et, LinkTwoTone as tt, ListTwoTone as nt, LockOpenTwoTone as rt, LockTwoTone as it, Login as at, MailOutlineTwoTone as ot, MoreVertTwoTone as st, OpenInFull as ct, OpenInNewTwoTone as lt, PeopleTwoTone as Y, PhoneTwoTone as ut, PhotoCameraOutlined as dt, PublicTwoTone as ft, PushPinTwoTone as pt, QuestionAnswerTwoTone as mt, RadioButtonUncheckedTwoTone as ht, RemoveCircleTwoTone as gt, ReplyTwoTone as _t, ReportProblemOutlined as vt, RestoreFromTrashTwoTone as yt, SearchOutlined as bt, SearchTwoTone as xt, ShareTwoTone as St, ShoppingCartOutlined as Ct, Sort as X, Star as wt, StarOutline as Tt, StarTwoTone as Et, StrikethroughS as Dt, Subscript as Ot, Superscript as kt,
|
|
49
|
+
import { AccessTimeTwoTone as V, AddBoxOutlined as H, AddCircleOutline as U, AddCircleTwoTone as W, AddShoppingCart as G, AddTwoTone as K, AlternateEmail as ce, ArrowBack as le, ArrowDropDownTwoTone as ue, ArrowDropUpTwoTone as de, ArrowForward as fe, ArticleTwoTone as q, AssessmentTwoTone as J, AssignmentOutlined as pe, AssignmentTurnedInTwoTone as me, Block as he, Cached as ge, ChatTwoTone as _e, Check as ve, CheckCircleTwoTone as ye, ChevronLeft as be, ChevronRight as xe, Clear as Se, CloseTwoTone as Ce, Code as we, ContentCopyTwoTone as Te, CreateNewFolderTwoTone as Ee, DashboardTwoTone as De, DeleteSweepTwoTone as Oe, DeleteTwoTone as ke, EditTwoTone as Ae, ErrorOutlined as je, ExpandLess as Me, ExpandMore as Ne, FactCheckTwoTone as Pe, FilterAltTwoTone as Fe, FlagTwoTone as Ie, FolderTwoTone as Le, FormatBold as Re, FormatItalic as ze, GetAppTwoTone as Be, GitHub as Ve, Group as He, HelpOutlineTwoTone as Ue, HelpOutlined as We, HistoryTwoTone as Ge, Image as Ke, IndeterminateCheckBoxOutlined as qe, InfoOutlined as Je, InsertDriveFileOutlined as Ye, InsertDriveFileTwoTone as Xe, LabelTwoTone as Ze, LanguageTwoTone as Qe, LayersTwoTone as $e, LinkOffTwoTone as et, LinkTwoTone as tt, ListTwoTone as nt, LockOpenTwoTone as rt, LockTwoTone as it, Login as at, MailOutlineTwoTone as ot, MoreVertTwoTone as st, OpenInFull as ct, OpenInNewTwoTone as lt, PeopleTwoTone as Y, PhoneTwoTone as ut, PhotoCameraOutlined as dt, PublicTwoTone as ft, PushPinTwoTone as pt, QuestionAnswerTwoTone as mt, RadioButtonUncheckedTwoTone as ht, RemoveCircleTwoTone as gt, ReplyTwoTone as _t, ReportProblemOutlined as vt, RestoreFromTrashTwoTone as yt, SearchOutlined as bt, SearchTwoTone as xt, ShareTwoTone as St, ShoppingCartOutlined as Ct, Sort as X, Star as wt, StarOutline as Tt, StarTwoTone as Et, StrikethroughS as Dt, Subscript as Ot, Superscript as kt, Support as At, SyncTwoTone as jt, TableChartTwoTone as Mt, TableRows as Nt, TableViewTwoTone as Pt, Title as Ft, UploadTwoTone as Z, ViewAgendaTwoTone as It, ViewColumnTwoTone as Lt, VisibilityOffTwoTone as Rt, VisibilityTwoTone as zt, VpnKeyTwoTone as Bt, WarningTwoTone as Vt, WatchLater as Ht } from "@mui/icons-material";
|
|
50
50
|
//#region src/components/IconSvg/IconSvg.tsx
|
|
51
|
-
var Q = /* @__PURE__ */ "accessOpen.accessPending.accessPendingCloud.accessClosed.actionKey.arrowBack.arrowForward.arrowDropUp.arrowDropDown.article.cards.check.clear.cart.clock.code.columns.openInNewWindow.dashboard.delete.deleteSweep.filter.addToCart.addCircleOutline.addCircleTwoTone.reload.team.photoCamera.info.favTwoTone.favOutline.fav.peopleTwoTone.challengesTwoTone.download.searchOutlined.search.history.time.login.helpChatBubble.helpOutlined.helpOutlineTwoTone.expandLess.expandMore.rat.chromatin.clinical.contentCopy.data.dataLocked.geneExpression.geneVariants.github.imaging.inSilicoModel.modelSystem.bioChemicalPhysical.computationalTool.spatialProfiling.dataReuse.lineGraph.kinomics.proteomics.packagableFile.unpackagableFile.other.wiki.file.fileOutlined.folder.link.linkOff.table.tableRows.share.public.people.entityview.submissionview.challenge.discussion.dataset.datasetcollection.docker.accountCertified.accountRegistered.accountValidated.warningOutlined.removeCircle.replyTwoTone.chatTwoTone.accessManagement.chevronRight.chevronLeft.database.close.cross.verticalEllipsis.sync.clipboard.clipboardCheck.add.warning.circle.block.checkCircle.errorOutlined.phone.pushpin.addBoxOutline.minusBoxOutline.italic.bold.title.visibility.visibilityOff.strikethrough.subscript.superscript.latex.image.edit.tag.restore.label.upload.flag.newFolder.createVersion.email.addConditions.sortUp.sortDown.orcid.tasks.google24.openInFull.tableview.fileWithShield.baseline.rosetteRibbon.starTrophy.awardScroll.clappingHands.podium.openBook.handWithMoney.threeStars.multiFile.publicVisibility.openVisibility.privateVisibility".split(".");
|
|
51
|
+
var Q = /* @__PURE__ */ "accessOpen.accessPending.accessPendingCloud.accessClosed.actionKey.arrowBack.arrowForward.arrowDropUp.arrowDropDown.article.cards.check.clear.cart.clock.code.columns.openInNewWindow.dashboard.delete.deleteSweep.filter.addToCart.addCircleOutline.addCircleTwoTone.reload.team.photoCamera.info.favTwoTone.favOutline.fav.peopleTwoTone.challengesTwoTone.download.searchOutlined.search.history.time.login.helpChatBubble.helpOutlined.helpOutlineTwoTone.expandLess.expandMore.rat.chromatin.clinical.contentCopy.data.dataLocked.geneExpression.geneVariants.github.imaging.inSilicoModel.modelSystem.bioChemicalPhysical.computationalTool.spatialProfiling.dataReuse.lineGraph.kinomics.proteomics.packagableFile.unpackagableFile.other.wiki.file.fileOutlined.folder.link.linkOff.table.tableRows.share.public.people.entityview.submissionview.challenge.discussion.dataset.datasetcollection.docker.accountCertified.accountRegistered.accountValidated.warningOutlined.removeCircle.replyTwoTone.chatTwoTone.accessManagement.chevronRight.chevronLeft.database.close.cross.verticalEllipsis.support.sync.clipboard.clipboardCheck.add.warning.circle.block.checkCircle.errorOutlined.phone.pushpin.addBoxOutline.minusBoxOutline.italic.bold.title.visibility.visibilityOff.strikethrough.subscript.superscript.latex.image.edit.tag.restore.label.upload.flag.newFolder.createVersion.email.addConditions.sortUp.sortDown.orcid.tasks.google24.openInFull.tableview.fileWithShield.baseline.rosetteRibbon.starTrophy.awardScroll.clappingHands.podium.openBook.handWithMoney.threeStars.multiFile.publicVisibility.openVisibility.privateVisibility".split(".");
|
|
52
52
|
function $(R) {
|
|
53
53
|
let { icon: Q, ...$ } = R;
|
|
54
54
|
switch ($.sx = {
|
|
@@ -56,7 +56,7 @@ function $(R) {
|
|
|
56
56
|
...$.sx
|
|
57
57
|
}, Q) {
|
|
58
58
|
case "accessOpen": return /* @__PURE__ */ B(rt, { ...$ });
|
|
59
|
-
case "accessClosed": return /* @__PURE__ */ B(
|
|
59
|
+
case "accessClosed": return /* @__PURE__ */ B(Bt, { ...$ });
|
|
60
60
|
case "accessPending": return /* @__PURE__ */ B(t, { ...$ });
|
|
61
61
|
case "accessPendingCloud": return /* @__PURE__ */ B(n, { ...$ });
|
|
62
62
|
case "add": return /* @__PURE__ */ B(K, { ...$ });
|
|
@@ -71,10 +71,10 @@ function $(R) {
|
|
|
71
71
|
case "check": return /* @__PURE__ */ B(ve, { ...$ });
|
|
72
72
|
case "clear": return /* @__PURE__ */ B(Se, { ...$ });
|
|
73
73
|
case "cart": return /* @__PURE__ */ B(Ct, { ...$ });
|
|
74
|
-
case "cards": return /* @__PURE__ */ B(
|
|
74
|
+
case "cards": return /* @__PURE__ */ B(It, { ...$ });
|
|
75
75
|
case "clock": return /* @__PURE__ */ B(V, { ...$ });
|
|
76
76
|
case "code": return /* @__PURE__ */ B(we, { ...$ });
|
|
77
|
-
case "columns": return /* @__PURE__ */ B(
|
|
77
|
+
case "columns": return /* @__PURE__ */ B(Lt, { ...$ });
|
|
78
78
|
case "circle": return /* @__PURE__ */ B(ht, { ...$ });
|
|
79
79
|
case "checkCircle": return /* @__PURE__ */ B(ye, { ...$ });
|
|
80
80
|
case "createVersion": return /* @__PURE__ */ B(o, { ...$ });
|
|
@@ -91,8 +91,8 @@ function $(R) {
|
|
|
91
91
|
case "team": return /* @__PURE__ */ B(He, { ...$ });
|
|
92
92
|
case "photoCamera": return /* @__PURE__ */ B(dt, { ...$ });
|
|
93
93
|
case "verticalEllipsis": return /* @__PURE__ */ B(st, { ...$ });
|
|
94
|
-
case "sync": return /* @__PURE__ */ B(
|
|
95
|
-
case "tableRows": return /* @__PURE__ */ B(
|
|
94
|
+
case "sync": return /* @__PURE__ */ B(jt, { ...$ });
|
|
95
|
+
case "tableRows": return /* @__PURE__ */ B(Nt, { ...$ });
|
|
96
96
|
case "share": return /* @__PURE__ */ B(St, { ...$ });
|
|
97
97
|
case "public":
|
|
98
98
|
case "openVisibility": return /* @__PURE__ */ B(ft, { ...$ });
|
|
@@ -111,7 +111,7 @@ function $(R) {
|
|
|
111
111
|
case "searchOutlined": return /* @__PURE__ */ B(bt, { ...$ });
|
|
112
112
|
case "search": return /* @__PURE__ */ B(xt, { ...$ });
|
|
113
113
|
case "history": return /* @__PURE__ */ B(Ge, { ...$ });
|
|
114
|
-
case "time": return /* @__PURE__ */ B(
|
|
114
|
+
case "time": return /* @__PURE__ */ B(Ht, { ...$ });
|
|
115
115
|
case "login": return /* @__PURE__ */ B(at, { ...$ });
|
|
116
116
|
case "helpChatBubble": return /* @__PURE__ */ B(D, { ...$ });
|
|
117
117
|
case "helpOutlineTwoTone": return /* @__PURE__ */ B(Ue, { ...$ });
|
|
@@ -152,8 +152,8 @@ function $(R) {
|
|
|
152
152
|
case "newFolder": return /* @__PURE__ */ B(Ee, { ...$ });
|
|
153
153
|
case "link": return /* @__PURE__ */ B(tt, { ...$ });
|
|
154
154
|
case "linkOff": return /* @__PURE__ */ B(et, { ...$ });
|
|
155
|
-
case "table": return /* @__PURE__ */ B(
|
|
156
|
-
case "tableview": return /* @__PURE__ */ B(
|
|
155
|
+
case "table": return /* @__PURE__ */ B(Mt, { ...$ });
|
|
156
|
+
case "tableview": return /* @__PURE__ */ B(Pt, { ...$ });
|
|
157
157
|
case "entityview": return /* @__PURE__ */ B(nt, { ...$ });
|
|
158
158
|
case "submissionview": return /* @__PURE__ */ B(q, { ...$ });
|
|
159
159
|
case "challenge": return /* @__PURE__ */ B(J, { ...$ });
|
|
@@ -166,7 +166,7 @@ function $(R) {
|
|
|
166
166
|
case "accountRegistered": return /* @__PURE__ */ B(se, { ...$ });
|
|
167
167
|
case "accountValidated": return /* @__PURE__ */ B(p, { ...$ });
|
|
168
168
|
case "warningOutlined": return /* @__PURE__ */ B(vt, { ...$ });
|
|
169
|
-
case "warning": return /* @__PURE__ */ B(
|
|
169
|
+
case "warning": return /* @__PURE__ */ B(Vt, { ...$ });
|
|
170
170
|
case "removeCircle": return /* @__PURE__ */ B(gt, { ...$ });
|
|
171
171
|
case "replyTwoTone": return /* @__PURE__ */ B(_t, { ...$ });
|
|
172
172
|
case "chatTwoTone": return /* @__PURE__ */ B(_e, { ...$ });
|
|
@@ -178,19 +178,20 @@ function $(R) {
|
|
|
178
178
|
case "minusBoxOutline": return /* @__PURE__ */ B(qe, { ...$ });
|
|
179
179
|
case "italic": return /* @__PURE__ */ B(ze, { ...$ });
|
|
180
180
|
case "bold": return /* @__PURE__ */ B(Re, { ...$ });
|
|
181
|
-
case "title": return /* @__PURE__ */ B(
|
|
182
|
-
case "visibility": return /* @__PURE__ */ B(
|
|
183
|
-
case "visibilityOff": return /* @__PURE__ */ B(
|
|
181
|
+
case "title": return /* @__PURE__ */ B(Ft, { ...$ });
|
|
182
|
+
case "visibility": return /* @__PURE__ */ B(zt, { ...$ });
|
|
183
|
+
case "visibilityOff": return /* @__PURE__ */ B(Rt, { ...$ });
|
|
184
184
|
case "strikethrough": return /* @__PURE__ */ B(Dt, { ...$ });
|
|
185
185
|
case "latex": return /* @__PURE__ */ B("span", { children: "TeX" });
|
|
186
186
|
case "image": return /* @__PURE__ */ B(Ke, { ...$ });
|
|
187
187
|
case "superscript": return /* @__PURE__ */ B(kt, { ...$ });
|
|
188
|
+
case "support": return /* @__PURE__ */ B(At, { ...$ });
|
|
188
189
|
case "subscript": return /* @__PURE__ */ B(Ot, { ...$ });
|
|
189
190
|
case "edit": return /* @__PURE__ */ B(Ae, { ...$ });
|
|
190
191
|
case "tag": return /* @__PURE__ */ B(ce, { ...$ });
|
|
191
192
|
case "restore": return /* @__PURE__ */ B(yt, { ...$ });
|
|
192
193
|
case "label": return /* @__PURE__ */ B(Ze, { ...$ });
|
|
193
|
-
case "upload": return /* @__PURE__ */ B(
|
|
194
|
+
case "upload": return /* @__PURE__ */ B(Z, { ...$ });
|
|
194
195
|
case "flag": return /* @__PURE__ */ B(Ie, { ...$ });
|
|
195
196
|
case "email": return /* @__PURE__ */ B(ot, { ...$ });
|
|
196
197
|
case "sortUp": return /* @__PURE__ */ B(X, {
|
|
@@ -220,7 +221,7 @@ function $(R) {
|
|
|
220
221
|
default: return /* @__PURE__ */ B(z, {});
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
|
-
function
|
|
224
|
+
function Ut(e) {
|
|
224
225
|
let { icon: t, label: n = "", onClick: r, wrap: i = !0, ...a } = e, o = `icon-${t}`, s = r ? "button" : "img", c = r ? { cursor: "pointer" } : {}, l = i ? {
|
|
225
226
|
"data-svg": t,
|
|
226
227
|
className: "styled-svg-wrapper",
|
|
@@ -248,7 +249,7 @@ function Ht(e) {
|
|
|
248
249
|
children: u
|
|
249
250
|
});
|
|
250
251
|
}
|
|
251
|
-
var
|
|
252
|
+
var Wt = {
|
|
252
253
|
file: "file",
|
|
253
254
|
project: "dashboard",
|
|
254
255
|
folder: "folder",
|
|
@@ -265,6 +266,6 @@ var Ut = {
|
|
|
265
266
|
searchindex: "search"
|
|
266
267
|
};
|
|
267
268
|
//#endregion
|
|
268
|
-
export { Q as IconStrings,
|
|
269
|
+
export { Q as IconStrings, Ut as default, Wt as type2SvgIconName };
|
|
269
270
|
|
|
270
271
|
//# sourceMappingURL=IconSvg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSvg.js","names":[],"sources":["../../../src/components/IconSvg/IconSvg.tsx"],"sourcesContent":["import { GoogleIcon24 } from '@/assets/GoogleIcon24'\nimport { ReactComponent as AccessPending } from '@/assets/icons/AccessPending.svg'\nimport { ReactComponent as AccessPendingCloud } from '@/assets/icons/AccessPendingCloud.svg'\nimport AwardScroll from '@/assets/icons/AwardScroll'\nimport Baseline from '@/assets/icons/Baseline'\nimport ClappingHands from '@/assets/icons/ClappingHands'\nimport CreateVersion from '@/assets/icons/CreateVersion'\nimport FileWithShield from '@/assets/icons/FileWithShield'\nimport MultiFile from '@/assets/icons/MultiFile'\nimport UnpackagableFile from '@/assets/icons/UnpackagableFile'\nimport HandWithMoney from '@/assets/icons/HandWithMoney'\nimport { ORCIDIcon } from '@/assets/icons/ORCIDIcon'\nimport OpenBook from '@/assets/icons/OpenBook'\nimport Podium from '@/assets/icons/Podium'\nimport RosetteRibbon from '@/assets/icons/RosetteRibbon'\nimport StarTrophy from '@/assets/icons/StarTrophy'\nimport { TasksIcon } from '@/assets/icons/TasksIcon'\nimport ThreeStars from '@/assets/icons/ThreeStars'\nimport AccessManagement from '@/assets/mui_components/AccessManagement'\nimport AccountCertified from '@/assets/mui_components/AccountCertified'\nimport AccountRegistered from '@/assets/mui_components/AccountRegistered'\nimport AccountValidated from '@/assets/mui_components/AccountValidated'\nimport ActionKey from '@/assets/mui_components/ActionKey'\nimport BioChemicalPhysical from '@/assets/mui_components/BioChemicalPhysical'\nimport Chromatin from '@/assets/mui_components/Chromatin'\nimport Clinical from '@/assets/mui_components/Clinical'\nimport ComputationalTool from '@/assets/mui_components/ComputationalTool'\nimport Data from '@/assets/mui_components/Data'\nimport DataLocked from '@/assets/mui_components/DataLocked'\nimport DataReuse from '@/assets/mui_components/DataReuse'\nimport Dataset from '@/assets/mui_components/Dataset'\nimport DatasetCollection from '@/assets/mui_components/DatasetCollection'\nimport Docker from '@/assets/mui_components/Docker'\nimport GeneExpression from '@/assets/mui_components/GeneExpression'\nimport GeneVariants from '@/assets/mui_components/GeneVariants'\nimport HelpChatBubble from '@/assets/mui_components/HelpChatBubble'\nimport Imaging from '@/assets/mui_components/Imaging'\nimport InSilicoModel from '@/assets/mui_components/InSilicoModel'\nimport Kinomics from '@/assets/mui_components/Kinomics'\nimport LineGraph from '@/assets/mui_components/LineGraph'\nimport ModelSystem from '@/assets/mui_components/ModelSystem'\nimport Other from '@/assets/mui_components/Other'\nimport PackagableFile from '@/assets/mui_components/PackagableFile'\nimport Proteomics from '@/assets/mui_components/Proteomics'\nimport Rat from '@/assets/mui_components/Rat'\nimport SpatialProfiling from '@/assets/mui_components/SpatialProfiling'\nimport {\n AccessTimeTwoTone,\n AddBoxOutlined,\n AddCircleOutline,\n AddCircleTwoTone,\n AddShoppingCart,\n AddTwoTone,\n AlternateEmail,\n ArrowBack,\n ArrowDropDownTwoTone,\n ArrowDropUpTwoTone,\n ArrowForward,\n ArticleTwoTone,\n AssessmentTwoTone,\n AssignmentOutlined,\n AssignmentTurnedInTwoTone,\n Block,\n Cached,\n ChatTwoTone,\n Check,\n CheckCircleTwoTone,\n ChevronLeft,\n ChevronRight,\n Clear,\n CloseTwoTone,\n Code,\n ContentCopyTwoTone,\n CreateNewFolderTwoTone,\n DashboardTwoTone,\n DeleteSweepTwoTone,\n DeleteTwoTone,\n EditTwoTone,\n ErrorOutlined,\n ExpandLess,\n ExpandMore,\n FactCheckTwoTone,\n FilterAltTwoTone,\n FlagTwoTone,\n FolderTwoTone,\n FormatBold,\n FormatItalic,\n GetAppTwoTone,\n GitHub,\n Group,\n HelpOutlined,\n HelpOutlineTwoTone,\n HistoryTwoTone,\n Image,\n IndeterminateCheckBoxOutlined,\n InfoOutlined,\n InsertDriveFileOutlined,\n InsertDriveFileTwoTone,\n LabelTwoTone,\n LanguageTwoTone,\n LayersTwoTone,\n LinkOffTwoTone,\n LinkTwoTone,\n ListTwoTone,\n LockOpenTwoTone,\n LockTwoTone,\n Login,\n MailOutlineTwoTone,\n MoreVertTwoTone,\n OpenInFull,\n OpenInNewTwoTone,\n PeopleTwoTone,\n PhoneTwoTone,\n PhotoCameraOutlined,\n PublicTwoTone,\n PushPinTwoTone,\n QuestionAnswerTwoTone,\n RadioButtonUncheckedTwoTone,\n RemoveCircleTwoTone,\n ReplyTwoTone,\n ReportProblemOutlined,\n RestoreFromTrashTwoTone,\n SearchOutlined,\n SearchTwoTone,\n ShareTwoTone,\n ShoppingCartOutlined,\n Sort,\n Star,\n StarOutline,\n StarTwoTone,\n StrikethroughS,\n Subscript,\n Superscript,\n SyncTwoTone,\n TableChartTwoTone,\n TableRows,\n TableViewTwoTone,\n Title,\n UploadTwoTone,\n ViewAgendaTwoTone,\n ViewColumnTwoTone,\n VisibilityOffTwoTone,\n VisibilityTwoTone,\n VpnKeyTwoTone,\n WarningTwoTone,\n WatchLater,\n} from '@mui/icons-material'\nimport { Tooltip } from '@mui/material'\nimport { SvgIconProps } from '@mui/material/SvgIcon'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport { ReactNode } from 'react'\n\nexport const IconStrings = [\n 'accessOpen',\n 'accessPending',\n 'accessPendingCloud',\n 'accessClosed',\n 'actionKey',\n 'arrowBack',\n 'arrowForward',\n 'arrowDropUp',\n 'arrowDropDown',\n 'article',\n 'cards',\n 'check',\n 'clear',\n 'cart',\n 'clock',\n 'code',\n 'columns',\n 'openInNewWindow',\n 'dashboard',\n 'delete',\n 'deleteSweep',\n 'filter',\n 'addToCart',\n 'addCircleOutline',\n 'addCircleTwoTone',\n 'reload',\n 'team',\n 'photoCamera',\n 'info',\n 'favTwoTone',\n 'favOutline',\n 'fav',\n 'peopleTwoTone',\n 'challengesTwoTone',\n 'download',\n 'searchOutlined',\n 'search',\n 'history',\n 'time',\n 'login',\n 'helpChatBubble',\n 'helpOutlined',\n 'helpOutlineTwoTone',\n 'expandLess',\n 'expandMore',\n 'rat',\n 'chromatin',\n 'clinical',\n 'contentCopy',\n 'data',\n 'dataLocked',\n 'geneExpression',\n 'geneVariants',\n 'github',\n 'imaging',\n 'inSilicoModel',\n 'modelSystem',\n 'bioChemicalPhysical',\n 'computationalTool',\n 'spatialProfiling',\n 'dataReuse',\n 'lineGraph',\n 'kinomics',\n 'proteomics',\n 'packagableFile',\n 'unpackagableFile',\n 'other',\n 'wiki',\n 'file',\n 'fileOutlined',\n 'folder',\n 'link',\n 'linkOff',\n 'table',\n 'tableRows',\n 'share',\n 'public',\n 'people',\n 'entityview',\n 'submissionview',\n 'challenge',\n 'discussion',\n 'dataset',\n 'datasetcollection',\n 'docker',\n 'accountCertified',\n 'accountRegistered',\n 'accountValidated',\n 'warningOutlined',\n 'removeCircle',\n 'replyTwoTone',\n 'chatTwoTone',\n 'accessManagement',\n 'chevronRight',\n 'chevronLeft',\n 'database',\n 'close',\n 'cross',\n 'verticalEllipsis',\n 'sync',\n 'clipboard',\n 'clipboardCheck',\n 'add',\n 'warning',\n 'circle',\n 'block',\n 'checkCircle',\n 'errorOutlined',\n 'phone',\n 'pushpin',\n 'addBoxOutline',\n 'minusBoxOutline',\n 'italic',\n 'bold',\n 'title',\n 'visibility',\n 'visibilityOff',\n 'strikethrough',\n 'subscript',\n 'superscript',\n 'latex',\n 'image',\n 'edit',\n 'tag',\n 'restore',\n 'label',\n 'upload',\n 'flag',\n 'newFolder',\n 'createVersion',\n 'email',\n 'addConditions',\n 'sortUp',\n 'sortDown',\n 'orcid',\n 'tasks',\n 'google24',\n 'openInFull',\n 'tableview',\n 'fileWithShield',\n 'baseline',\n 'rosetteRibbon',\n 'starTrophy',\n 'awardScroll',\n 'clappingHands',\n 'podium',\n 'openBook',\n 'handWithMoney',\n 'threeStars',\n 'multiFile',\n 'publicVisibility',\n 'openVisibility',\n 'privateVisibility',\n] as const\n\nexport type IconName = (typeof IconStrings)[number]\n\nexport type IconSvgProps = {\n icon: IconName\n // If provided, will be shown in tooltip\n onClick?: () => void\n label?: string\n wrap?: boolean\n} & SvgIconProps\n\nfunction IconMapping(props: { icon: string } & SvgIconProps) {\n const { icon, ...otherProps } = props\n const color = undefined\n\n otherProps.sx = {\n verticalAlign: 'middle',\n ...otherProps.sx,\n }\n\n switch (icon) {\n case 'accessOpen':\n return <LockOpenTwoTone {...otherProps} />\n case 'accessClosed':\n return <VpnKeyTwoTone {...otherProps} />\n case 'accessPending':\n return <AccessPending {...otherProps} />\n case 'accessPendingCloud':\n return <AccessPendingCloud {...otherProps} />\n case 'add':\n return <AddTwoTone {...otherProps} />\n case 'addConditions':\n return <FactCheckTwoTone {...otherProps} />\n case 'actionKey':\n return <ActionKey {...otherProps} />\n case 'arrowBack':\n return <ArrowBack {...otherProps} />\n case 'arrowForward':\n return <ArrowForward {...otherProps} />\n case 'arrowDropUp':\n return <ArrowDropUpTwoTone {...otherProps} />\n case 'arrowDropDown':\n return <ArrowDropDownTwoTone {...otherProps} />\n case 'article':\n return <ArticleTwoTone {...otherProps} />\n case 'block':\n return <Block {...otherProps} />\n case 'check':\n return <Check {...otherProps} />\n case 'clear':\n return <Clear {...otherProps} />\n case 'cart':\n return <ShoppingCartOutlined {...otherProps} />\n case 'cards':\n return <ViewAgendaTwoTone {...otherProps} />\n case 'clock':\n return <AccessTimeTwoTone {...otherProps} />\n case 'code':\n return <Code {...otherProps} />\n case 'columns':\n return <ViewColumnTwoTone {...otherProps} />\n case 'circle':\n return <RadioButtonUncheckedTwoTone {...otherProps} />\n case 'checkCircle':\n return <CheckCircleTwoTone {...otherProps} />\n case 'createVersion':\n return <CreateVersion {...otherProps} />\n case 'dashboard':\n return <DashboardTwoTone {...otherProps} />\n case 'delete':\n return <DeleteTwoTone {...otherProps} />\n case 'deleteSweep':\n return <DeleteSweepTwoTone {...otherProps} />\n case 'openInNewWindow':\n return <OpenInNewTwoTone {...otherProps} />\n case 'phone':\n return <PhoneTwoTone {...otherProps} />\n case 'people':\n return <PeopleTwoTone {...otherProps} />\n case 'addToCart':\n return <AddShoppingCart {...otherProps} />\n case 'addCircleOutline':\n return <AddCircleOutline {...otherProps} />\n case 'addCircleTwoTone':\n return <AddCircleTwoTone {...otherProps} />\n case 'reload':\n return <Cached {...otherProps} />\n case 'team':\n return <Group {...otherProps} />\n case 'photoCamera':\n return <PhotoCameraOutlined {...otherProps} />\n case 'verticalEllipsis':\n return <MoreVertTwoTone {...otherProps} />\n case 'sync':\n return <SyncTwoTone {...otherProps} />\n case 'tableRows':\n return <TableRows {...otherProps} />\n case 'share':\n return <ShareTwoTone {...otherProps} />\n case 'public':\n case 'openVisibility':\n return <PublicTwoTone {...otherProps} />\n case 'privateVisibility':\n return <LockTwoTone {...otherProps} />\n case 'clipboard':\n return <AssignmentOutlined {...otherProps} />\n case 'clipboardCheck':\n return <AssignmentTurnedInTwoTone {...otherProps} />\n case 'info':\n return <InfoOutlined {...otherProps} />\n case 'favTwoTone':\n return <StarTwoTone {...otherProps} />\n case 'favOutline':\n return <StarOutline {...otherProps} />\n case 'fav':\n return <Star {...otherProps} />\n case 'github':\n return <GitHub {...otherProps} />\n case 'peopleTwoTone':\n return <PeopleTwoTone {...otherProps} />\n case 'challengesTwoTone':\n return <AssessmentTwoTone {...otherProps} />\n case 'download':\n return <GetAppTwoTone {...otherProps} />\n case 'errorOutlined':\n return <ErrorOutlined {...otherProps} />\n case 'searchOutlined':\n return <SearchOutlined {...otherProps} />\n case 'search':\n return <SearchTwoTone {...otherProps} />\n case 'history':\n return <HistoryTwoTone {...otherProps} />\n case 'time':\n return <WatchLater {...otherProps} />\n case 'login':\n return <Login {...otherProps} />\n case 'helpChatBubble':\n return <HelpChatBubble {...otherProps} />\n case 'helpOutlineTwoTone':\n return <HelpOutlineTwoTone {...otherProps} />\n case 'helpOutlined':\n return <HelpOutlined {...otherProps} />\n case 'close':\n case 'cross':\n return <CloseTwoTone {...otherProps} />\n case 'expandLess':\n return <ExpandLess {...otherProps} />\n case 'expandMore':\n return <ExpandMore {...otherProps} />\n case 'rat':\n return <Rat {...otherProps} />\n case 'chromatin':\n return <Chromatin {...otherProps} />\n case 'clinical':\n return <Clinical {...otherProps} />\n case 'contentCopy':\n return <ContentCopyTwoTone {...otherProps} />\n case 'data':\n return <Data {...otherProps} />\n case 'dataLocked':\n return <DataLocked {...otherProps} />\n case 'geneExpression':\n return <GeneExpression {...otherProps} />\n case 'geneVariants':\n return <GeneVariants {...otherProps} />\n case 'imaging':\n return <Imaging {...otherProps} />\n case 'inSilicoModel':\n return <InSilicoModel {...otherProps} />\n case 'modelSystem':\n return <ModelSystem {...otherProps} />\n case 'bioChemicalPhysical':\n return <BioChemicalPhysical {...otherProps} />\n case 'computationalTool':\n return <ComputationalTool {...otherProps} />\n case 'spatialProfiling':\n return <SpatialProfiling {...otherProps} />\n case 'dataReuse':\n return <DataReuse {...otherProps} />\n case 'lineGraph':\n return <LineGraph {...otherProps} />\n case 'kinomics':\n return <Kinomics {...otherProps} />\n case 'proteomics':\n return <Proteomics {...otherProps} />\n case 'packagableFile':\n return <PackagableFile {...otherProps} />\n case 'unpackagableFile':\n return <UnpackagableFile {...otherProps} />\n case 'other':\n return <Other fill={color} {...otherProps} />\n case 'wiki':\n case 'publicVisibility':\n return <LanguageTwoTone {...otherProps} />\n case 'file':\n return <InsertDriveFileTwoTone {...otherProps} />\n case 'fileOutlined':\n return <InsertDriveFileOutlined {...otherProps} />\n case 'folder':\n return <FolderTwoTone {...otherProps} />\n case 'newFolder':\n return <CreateNewFolderTwoTone {...otherProps} />\n case 'link':\n return <LinkTwoTone {...otherProps} />\n case 'linkOff':\n return <LinkOffTwoTone {...otherProps} />\n case 'table':\n return <TableChartTwoTone {...otherProps} />\n case 'tableview':\n return <TableViewTwoTone {...otherProps} />\n case 'entityview':\n return <ListTwoTone {...otherProps} />\n case 'submissionview':\n return <ArticleTwoTone {...otherProps} />\n case 'challenge':\n return <AssessmentTwoTone {...otherProps} />\n case 'discussion':\n return <QuestionAnswerTwoTone {...otherProps} />\n case 'dataset':\n return <Dataset {...otherProps} />\n case 'datasetcollection':\n return <DatasetCollection {...otherProps} />\n case 'database':\n return <LayersTwoTone {...otherProps} />\n case 'docker':\n return <Docker {...otherProps} />\n case 'accountCertified':\n return <AccountCertified {...otherProps} />\n case 'accountRegistered':\n return <AccountRegistered {...otherProps} />\n case 'accountValidated':\n return <AccountValidated {...otherProps} />\n case 'warningOutlined':\n return <ReportProblemOutlined {...otherProps} />\n case 'warning':\n return <WarningTwoTone {...otherProps} />\n case 'removeCircle':\n return <RemoveCircleTwoTone {...otherProps} />\n case 'replyTwoTone':\n return <ReplyTwoTone {...otherProps} />\n case 'chatTwoTone':\n return <ChatTwoTone {...otherProps} />\n case 'accessManagement':\n return <AccessManagement {...otherProps} />\n case 'chevronRight':\n return <ChevronRight {...otherProps} />\n case 'chevronLeft':\n return <ChevronLeft {...otherProps} />\n case 'pushpin':\n return <PushPinTwoTone {...otherProps} />\n case 'addBoxOutline':\n return <AddBoxOutlined {...otherProps} />\n case 'minusBoxOutline':\n return <IndeterminateCheckBoxOutlined {...otherProps} />\n case 'italic':\n return <FormatItalic {...otherProps} />\n case 'bold':\n return <FormatBold {...otherProps} />\n case 'title':\n return <Title {...otherProps} />\n case 'visibility':\n return <VisibilityTwoTone {...otherProps} />\n case 'visibilityOff':\n return <VisibilityOffTwoTone {...otherProps} />\n case 'strikethrough':\n return <StrikethroughS {...otherProps} />\n case 'latex':\n return <span>TeX</span>\n case 'image':\n return <Image {...otherProps} />\n case 'superscript':\n return <Superscript {...otherProps} />\n case 'subscript':\n return <Subscript {...otherProps} />\n case 'edit':\n return <EditTwoTone {...otherProps} />\n case 'tag':\n return <AlternateEmail {...otherProps} />\n case 'restore':\n return <RestoreFromTrashTwoTone {...otherProps} />\n case 'label':\n return <LabelTwoTone {...otherProps} />\n case 'upload':\n return <UploadTwoTone {...otherProps} />\n case 'flag':\n return <FlagTwoTone {...otherProps} />\n case 'email':\n return <MailOutlineTwoTone {...otherProps} />\n case 'sortUp':\n return (\n <Sort\n {...otherProps}\n sx={{\n transform: 'scale(1, -1)',\n ...otherProps.sx,\n }}\n />\n )\n case 'sortDown':\n return <Sort {...otherProps} />\n case 'google24':\n return <GoogleIcon24 {...otherProps} />\n case 'orcid':\n return <ORCIDIcon {...otherProps} />\n case 'tasks':\n return <TasksIcon {...otherProps} />\n case 'filter':\n return <FilterAltTwoTone {...otherProps} />\n case 'openInFull':\n return <OpenInFull {...otherProps} />\n case 'fileWithShield':\n return <FileWithShield {...otherProps} />\n case 'baseline':\n return <Baseline {...otherProps} />\n case 'rosetteRibbon':\n return <RosetteRibbon {...otherProps} />\n case 'starTrophy':\n return <StarTrophy {...otherProps} />\n case 'awardScroll':\n return <AwardScroll {...otherProps} />\n case 'clappingHands':\n return <ClappingHands {...otherProps} />\n case 'podium':\n return <Podium {...otherProps} />\n case 'openBook':\n return <OpenBook {...otherProps} />\n case 'handWithMoney':\n return <HandWithMoney {...otherProps} />\n case 'threeStars':\n return <ThreeStars {...otherProps} />\n case 'multiFile':\n return <MultiFile {...otherProps} />\n\n default:\n return <></>\n }\n}\n\nfunction IconSvg(props: IconSvgProps) {\n const { icon, label = '', onClick, wrap = true, ...svgIconProps } = props\n\n const id = `icon-${icon}`\n const role = onClick ? 'button' : 'img'\n const style = onClick ? { cursor: 'pointer' } : {}\n\n const wrapperProps = wrap\n ? {\n 'data-svg': icon,\n className: 'styled-svg-wrapper',\n id,\n role,\n onClick,\n style,\n }\n : {}\n\n let iconNode: ReactNode\n if (wrap) {\n iconNode = (\n <span {...wrapperProps}>\n <IconMapping icon={icon} {...svgIconProps} />\n </span>\n )\n } else {\n iconNode = (\n <IconMapping\n icon={icon}\n id={id}\n role={role}\n onClick={onClick}\n style={style}\n {...svgIconProps}\n />\n )\n }\n\n return (\n <Tooltip placement=\"top\" title={label}>\n {iconNode}\n </Tooltip>\n )\n}\n\n/**\n * Map entity type values to appropriate icon values supported by IconSvg.\n */\nexport const type2SvgIconName: Record<EntityType, IconName> = {\n file: 'file',\n project: 'dashboard',\n folder: 'folder',\n table: 'table',\n link: 'link',\n entityview: 'actionKey',\n materializedview: 'tableview',\n virtualtable: 'columns',\n dockerrepo: 'docker',\n submissionview: 'submissionview',\n dataset: 'dataset',\n datasetcollection: 'datasetcollection',\n recordset: 'fileWithShield',\n searchindex: 'search',\n}\n\nexport default IconSvg\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwJA,IAAa,IAAc,slDA0J3B;AAYA,SAAS,EAAY,GAAwC;CAC3D,IAAM,EAAE,SAAM,GAAG,MAAe;CAQhC,QALA,EAAW,KAAK;EACd,eAAe;EACf,GAAG,EAAW;CAChB,GAEQ,GAAR;EACE,KAAK,cACH,OAAO,kBAAC,IAAD,EAAiB,GAAI,EAAa,CAAA;EAC3C,KAAK,gBACH,OAAO,kBAAC,IAAD,EAAe,GAAI,EAAa,CAAA;EACzC,KAAK,iBACH,OAAO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c;CACd,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,mBAAmB;CACnB,WAAW;CACX,aAAa;AACf"}
|
|
1
|
+
{"version":3,"file":"IconSvg.js","names":[],"sources":["../../../src/components/IconSvg/IconSvg.tsx"],"sourcesContent":["import { GoogleIcon24 } from '@/assets/GoogleIcon24'\nimport { ReactComponent as AccessPending } from '@/assets/icons/AccessPending.svg'\nimport { ReactComponent as AccessPendingCloud } from '@/assets/icons/AccessPendingCloud.svg'\nimport AwardScroll from '@/assets/icons/AwardScroll'\nimport Baseline from '@/assets/icons/Baseline'\nimport ClappingHands from '@/assets/icons/ClappingHands'\nimport CreateVersion from '@/assets/icons/CreateVersion'\nimport FileWithShield from '@/assets/icons/FileWithShield'\nimport MultiFile from '@/assets/icons/MultiFile'\nimport UnpackagableFile from '@/assets/icons/UnpackagableFile'\nimport HandWithMoney from '@/assets/icons/HandWithMoney'\nimport { ORCIDIcon } from '@/assets/icons/ORCIDIcon'\nimport OpenBook from '@/assets/icons/OpenBook'\nimport Podium from '@/assets/icons/Podium'\nimport RosetteRibbon from '@/assets/icons/RosetteRibbon'\nimport StarTrophy from '@/assets/icons/StarTrophy'\nimport { TasksIcon } from '@/assets/icons/TasksIcon'\nimport ThreeStars from '@/assets/icons/ThreeStars'\nimport AccessManagement from '@/assets/mui_components/AccessManagement'\nimport AccountCertified from '@/assets/mui_components/AccountCertified'\nimport AccountRegistered from '@/assets/mui_components/AccountRegistered'\nimport AccountValidated from '@/assets/mui_components/AccountValidated'\nimport ActionKey from '@/assets/mui_components/ActionKey'\nimport BioChemicalPhysical from '@/assets/mui_components/BioChemicalPhysical'\nimport Chromatin from '@/assets/mui_components/Chromatin'\nimport Clinical from '@/assets/mui_components/Clinical'\nimport ComputationalTool from '@/assets/mui_components/ComputationalTool'\nimport Data from '@/assets/mui_components/Data'\nimport DataLocked from '@/assets/mui_components/DataLocked'\nimport DataReuse from '@/assets/mui_components/DataReuse'\nimport Dataset from '@/assets/mui_components/Dataset'\nimport DatasetCollection from '@/assets/mui_components/DatasetCollection'\nimport Docker from '@/assets/mui_components/Docker'\nimport GeneExpression from '@/assets/mui_components/GeneExpression'\nimport GeneVariants from '@/assets/mui_components/GeneVariants'\nimport HelpChatBubble from '@/assets/mui_components/HelpChatBubble'\nimport Imaging from '@/assets/mui_components/Imaging'\nimport InSilicoModel from '@/assets/mui_components/InSilicoModel'\nimport Kinomics from '@/assets/mui_components/Kinomics'\nimport LineGraph from '@/assets/mui_components/LineGraph'\nimport ModelSystem from '@/assets/mui_components/ModelSystem'\nimport Other from '@/assets/mui_components/Other'\nimport PackagableFile from '@/assets/mui_components/PackagableFile'\nimport Proteomics from '@/assets/mui_components/Proteomics'\nimport Rat from '@/assets/mui_components/Rat'\nimport SpatialProfiling from '@/assets/mui_components/SpatialProfiling'\nimport {\n AccessTimeTwoTone,\n AddBoxOutlined,\n AddCircleOutline,\n AddCircleTwoTone,\n AddShoppingCart,\n AddTwoTone,\n AlternateEmail,\n ArrowBack,\n ArrowDropDownTwoTone,\n ArrowDropUpTwoTone,\n ArrowForward,\n ArticleTwoTone,\n AssessmentTwoTone,\n AssignmentOutlined,\n AssignmentTurnedInTwoTone,\n Block,\n Cached,\n ChatTwoTone,\n Check,\n CheckCircleTwoTone,\n ChevronLeft,\n ChevronRight,\n Clear,\n CloseTwoTone,\n Code,\n ContentCopyTwoTone,\n CreateNewFolderTwoTone,\n DashboardTwoTone,\n DeleteSweepTwoTone,\n DeleteTwoTone,\n EditTwoTone,\n ErrorOutlined,\n ExpandLess,\n ExpandMore,\n FactCheckTwoTone,\n FilterAltTwoTone,\n FlagTwoTone,\n FolderTwoTone,\n FormatBold,\n FormatItalic,\n GetAppTwoTone,\n GitHub,\n Group,\n HelpOutlined,\n HelpOutlineTwoTone,\n HistoryTwoTone,\n Image,\n IndeterminateCheckBoxOutlined,\n InfoOutlined,\n InsertDriveFileOutlined,\n InsertDriveFileTwoTone,\n LabelTwoTone,\n LanguageTwoTone,\n LayersTwoTone,\n LinkOffTwoTone,\n LinkTwoTone,\n ListTwoTone,\n LockOpenTwoTone,\n LockTwoTone,\n Login,\n MailOutlineTwoTone,\n MoreVertTwoTone,\n OpenInFull,\n OpenInNewTwoTone,\n PeopleTwoTone,\n PhoneTwoTone,\n PhotoCameraOutlined,\n PublicTwoTone,\n PushPinTwoTone,\n QuestionAnswerTwoTone,\n RadioButtonUncheckedTwoTone,\n RemoveCircleTwoTone,\n ReplyTwoTone,\n ReportProblemOutlined,\n RestoreFromTrashTwoTone,\n SearchOutlined,\n SearchTwoTone,\n ShareTwoTone,\n ShoppingCartOutlined,\n Sort,\n Star,\n StarOutline,\n StarTwoTone,\n StrikethroughS,\n Subscript,\n Superscript,\n Support,\n SyncTwoTone,\n TableChartTwoTone,\n TableRows,\n TableViewTwoTone,\n Title,\n UploadTwoTone,\n ViewAgendaTwoTone,\n ViewColumnTwoTone,\n VisibilityOffTwoTone,\n VisibilityTwoTone,\n VpnKeyTwoTone,\n WarningTwoTone,\n WatchLater,\n} from '@mui/icons-material'\nimport { Tooltip } from '@mui/material'\nimport { SvgIconProps } from '@mui/material/SvgIcon'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport { ReactNode } from 'react'\n\nexport const IconStrings = [\n 'accessOpen',\n 'accessPending',\n 'accessPendingCloud',\n 'accessClosed',\n 'actionKey',\n 'arrowBack',\n 'arrowForward',\n 'arrowDropUp',\n 'arrowDropDown',\n 'article',\n 'cards',\n 'check',\n 'clear',\n 'cart',\n 'clock',\n 'code',\n 'columns',\n 'openInNewWindow',\n 'dashboard',\n 'delete',\n 'deleteSweep',\n 'filter',\n 'addToCart',\n 'addCircleOutline',\n 'addCircleTwoTone',\n 'reload',\n 'team',\n 'photoCamera',\n 'info',\n 'favTwoTone',\n 'favOutline',\n 'fav',\n 'peopleTwoTone',\n 'challengesTwoTone',\n 'download',\n 'searchOutlined',\n 'search',\n 'history',\n 'time',\n 'login',\n 'helpChatBubble',\n 'helpOutlined',\n 'helpOutlineTwoTone',\n 'expandLess',\n 'expandMore',\n 'rat',\n 'chromatin',\n 'clinical',\n 'contentCopy',\n 'data',\n 'dataLocked',\n 'geneExpression',\n 'geneVariants',\n 'github',\n 'imaging',\n 'inSilicoModel',\n 'modelSystem',\n 'bioChemicalPhysical',\n 'computationalTool',\n 'spatialProfiling',\n 'dataReuse',\n 'lineGraph',\n 'kinomics',\n 'proteomics',\n 'packagableFile',\n 'unpackagableFile',\n 'other',\n 'wiki',\n 'file',\n 'fileOutlined',\n 'folder',\n 'link',\n 'linkOff',\n 'table',\n 'tableRows',\n 'share',\n 'public',\n 'people',\n 'entityview',\n 'submissionview',\n 'challenge',\n 'discussion',\n 'dataset',\n 'datasetcollection',\n 'docker',\n 'accountCertified',\n 'accountRegistered',\n 'accountValidated',\n 'warningOutlined',\n 'removeCircle',\n 'replyTwoTone',\n 'chatTwoTone',\n 'accessManagement',\n 'chevronRight',\n 'chevronLeft',\n 'database',\n 'close',\n 'cross',\n 'verticalEllipsis',\n 'support',\n 'sync',\n 'clipboard',\n 'clipboardCheck',\n 'add',\n 'warning',\n 'circle',\n 'block',\n 'checkCircle',\n 'errorOutlined',\n 'phone',\n 'pushpin',\n 'addBoxOutline',\n 'minusBoxOutline',\n 'italic',\n 'bold',\n 'title',\n 'visibility',\n 'visibilityOff',\n 'strikethrough',\n 'subscript',\n 'superscript',\n 'latex',\n 'image',\n 'edit',\n 'tag',\n 'restore',\n 'label',\n 'upload',\n 'flag',\n 'newFolder',\n 'createVersion',\n 'email',\n 'addConditions',\n 'sortUp',\n 'sortDown',\n 'orcid',\n 'tasks',\n 'google24',\n 'openInFull',\n 'tableview',\n 'fileWithShield',\n 'baseline',\n 'rosetteRibbon',\n 'starTrophy',\n 'awardScroll',\n 'clappingHands',\n 'podium',\n 'openBook',\n 'handWithMoney',\n 'threeStars',\n 'multiFile',\n 'publicVisibility',\n 'openVisibility',\n 'privateVisibility',\n] as const\n\nexport type IconName = (typeof IconStrings)[number]\n\nexport type IconSvgProps = {\n icon: IconName\n // If provided, will be shown in tooltip\n onClick?: () => void\n label?: string\n wrap?: boolean\n} & SvgIconProps\n\nfunction IconMapping(props: { icon: string } & SvgIconProps) {\n const { icon, ...otherProps } = props\n const color = undefined\n\n otherProps.sx = {\n verticalAlign: 'middle',\n ...otherProps.sx,\n }\n\n switch (icon) {\n case 'accessOpen':\n return <LockOpenTwoTone {...otherProps} />\n case 'accessClosed':\n return <VpnKeyTwoTone {...otherProps} />\n case 'accessPending':\n return <AccessPending {...otherProps} />\n case 'accessPendingCloud':\n return <AccessPendingCloud {...otherProps} />\n case 'add':\n return <AddTwoTone {...otherProps} />\n case 'addConditions':\n return <FactCheckTwoTone {...otherProps} />\n case 'actionKey':\n return <ActionKey {...otherProps} />\n case 'arrowBack':\n return <ArrowBack {...otherProps} />\n case 'arrowForward':\n return <ArrowForward {...otherProps} />\n case 'arrowDropUp':\n return <ArrowDropUpTwoTone {...otherProps} />\n case 'arrowDropDown':\n return <ArrowDropDownTwoTone {...otherProps} />\n case 'article':\n return <ArticleTwoTone {...otherProps} />\n case 'block':\n return <Block {...otherProps} />\n case 'check':\n return <Check {...otherProps} />\n case 'clear':\n return <Clear {...otherProps} />\n case 'cart':\n return <ShoppingCartOutlined {...otherProps} />\n case 'cards':\n return <ViewAgendaTwoTone {...otherProps} />\n case 'clock':\n return <AccessTimeTwoTone {...otherProps} />\n case 'code':\n return <Code {...otherProps} />\n case 'columns':\n return <ViewColumnTwoTone {...otherProps} />\n case 'circle':\n return <RadioButtonUncheckedTwoTone {...otherProps} />\n case 'checkCircle':\n return <CheckCircleTwoTone {...otherProps} />\n case 'createVersion':\n return <CreateVersion {...otherProps} />\n case 'dashboard':\n return <DashboardTwoTone {...otherProps} />\n case 'delete':\n return <DeleteTwoTone {...otherProps} />\n case 'deleteSweep':\n return <DeleteSweepTwoTone {...otherProps} />\n case 'openInNewWindow':\n return <OpenInNewTwoTone {...otherProps} />\n case 'phone':\n return <PhoneTwoTone {...otherProps} />\n case 'people':\n return <PeopleTwoTone {...otherProps} />\n case 'addToCart':\n return <AddShoppingCart {...otherProps} />\n case 'addCircleOutline':\n return <AddCircleOutline {...otherProps} />\n case 'addCircleTwoTone':\n return <AddCircleTwoTone {...otherProps} />\n case 'reload':\n return <Cached {...otherProps} />\n case 'team':\n return <Group {...otherProps} />\n case 'photoCamera':\n return <PhotoCameraOutlined {...otherProps} />\n case 'verticalEllipsis':\n return <MoreVertTwoTone {...otherProps} />\n case 'sync':\n return <SyncTwoTone {...otherProps} />\n case 'tableRows':\n return <TableRows {...otherProps} />\n case 'share':\n return <ShareTwoTone {...otherProps} />\n case 'public':\n case 'openVisibility':\n return <PublicTwoTone {...otherProps} />\n case 'privateVisibility':\n return <LockTwoTone {...otherProps} />\n case 'clipboard':\n return <AssignmentOutlined {...otherProps} />\n case 'clipboardCheck':\n return <AssignmentTurnedInTwoTone {...otherProps} />\n case 'info':\n return <InfoOutlined {...otherProps} />\n case 'favTwoTone':\n return <StarTwoTone {...otherProps} />\n case 'favOutline':\n return <StarOutline {...otherProps} />\n case 'fav':\n return <Star {...otherProps} />\n case 'github':\n return <GitHub {...otherProps} />\n case 'peopleTwoTone':\n return <PeopleTwoTone {...otherProps} />\n case 'challengesTwoTone':\n return <AssessmentTwoTone {...otherProps} />\n case 'download':\n return <GetAppTwoTone {...otherProps} />\n case 'errorOutlined':\n return <ErrorOutlined {...otherProps} />\n case 'searchOutlined':\n return <SearchOutlined {...otherProps} />\n case 'search':\n return <SearchTwoTone {...otherProps} />\n case 'history':\n return <HistoryTwoTone {...otherProps} />\n case 'time':\n return <WatchLater {...otherProps} />\n case 'login':\n return <Login {...otherProps} />\n case 'helpChatBubble':\n return <HelpChatBubble {...otherProps} />\n case 'helpOutlineTwoTone':\n return <HelpOutlineTwoTone {...otherProps} />\n case 'helpOutlined':\n return <HelpOutlined {...otherProps} />\n case 'close':\n case 'cross':\n return <CloseTwoTone {...otherProps} />\n case 'expandLess':\n return <ExpandLess {...otherProps} />\n case 'expandMore':\n return <ExpandMore {...otherProps} />\n case 'rat':\n return <Rat {...otherProps} />\n case 'chromatin':\n return <Chromatin {...otherProps} />\n case 'clinical':\n return <Clinical {...otherProps} />\n case 'contentCopy':\n return <ContentCopyTwoTone {...otherProps} />\n case 'data':\n return <Data {...otherProps} />\n case 'dataLocked':\n return <DataLocked {...otherProps} />\n case 'geneExpression':\n return <GeneExpression {...otherProps} />\n case 'geneVariants':\n return <GeneVariants {...otherProps} />\n case 'imaging':\n return <Imaging {...otherProps} />\n case 'inSilicoModel':\n return <InSilicoModel {...otherProps} />\n case 'modelSystem':\n return <ModelSystem {...otherProps} />\n case 'bioChemicalPhysical':\n return <BioChemicalPhysical {...otherProps} />\n case 'computationalTool':\n return <ComputationalTool {...otherProps} />\n case 'spatialProfiling':\n return <SpatialProfiling {...otherProps} />\n case 'dataReuse':\n return <DataReuse {...otherProps} />\n case 'lineGraph':\n return <LineGraph {...otherProps} />\n case 'kinomics':\n return <Kinomics {...otherProps} />\n case 'proteomics':\n return <Proteomics {...otherProps} />\n case 'packagableFile':\n return <PackagableFile {...otherProps} />\n case 'unpackagableFile':\n return <UnpackagableFile {...otherProps} />\n case 'other':\n return <Other fill={color} {...otherProps} />\n case 'wiki':\n case 'publicVisibility':\n return <LanguageTwoTone {...otherProps} />\n case 'file':\n return <InsertDriveFileTwoTone {...otherProps} />\n case 'fileOutlined':\n return <InsertDriveFileOutlined {...otherProps} />\n case 'folder':\n return <FolderTwoTone {...otherProps} />\n case 'newFolder':\n return <CreateNewFolderTwoTone {...otherProps} />\n case 'link':\n return <LinkTwoTone {...otherProps} />\n case 'linkOff':\n return <LinkOffTwoTone {...otherProps} />\n case 'table':\n return <TableChartTwoTone {...otherProps} />\n case 'tableview':\n return <TableViewTwoTone {...otherProps} />\n case 'entityview':\n return <ListTwoTone {...otherProps} />\n case 'submissionview':\n return <ArticleTwoTone {...otherProps} />\n case 'challenge':\n return <AssessmentTwoTone {...otherProps} />\n case 'discussion':\n return <QuestionAnswerTwoTone {...otherProps} />\n case 'dataset':\n return <Dataset {...otherProps} />\n case 'datasetcollection':\n return <DatasetCollection {...otherProps} />\n case 'database':\n return <LayersTwoTone {...otherProps} />\n case 'docker':\n return <Docker {...otherProps} />\n case 'accountCertified':\n return <AccountCertified {...otherProps} />\n case 'accountRegistered':\n return <AccountRegistered {...otherProps} />\n case 'accountValidated':\n return <AccountValidated {...otherProps} />\n case 'warningOutlined':\n return <ReportProblemOutlined {...otherProps} />\n case 'warning':\n return <WarningTwoTone {...otherProps} />\n case 'removeCircle':\n return <RemoveCircleTwoTone {...otherProps} />\n case 'replyTwoTone':\n return <ReplyTwoTone {...otherProps} />\n case 'chatTwoTone':\n return <ChatTwoTone {...otherProps} />\n case 'accessManagement':\n return <AccessManagement {...otherProps} />\n case 'chevronRight':\n return <ChevronRight {...otherProps} />\n case 'chevronLeft':\n return <ChevronLeft {...otherProps} />\n case 'pushpin':\n return <PushPinTwoTone {...otherProps} />\n case 'addBoxOutline':\n return <AddBoxOutlined {...otherProps} />\n case 'minusBoxOutline':\n return <IndeterminateCheckBoxOutlined {...otherProps} />\n case 'italic':\n return <FormatItalic {...otherProps} />\n case 'bold':\n return <FormatBold {...otherProps} />\n case 'title':\n return <Title {...otherProps} />\n case 'visibility':\n return <VisibilityTwoTone {...otherProps} />\n case 'visibilityOff':\n return <VisibilityOffTwoTone {...otherProps} />\n case 'strikethrough':\n return <StrikethroughS {...otherProps} />\n case 'latex':\n return <span>TeX</span>\n case 'image':\n return <Image {...otherProps} />\n case 'superscript':\n return <Superscript {...otherProps} />\n case 'support':\n return <Support {...otherProps} />\n case 'subscript':\n return <Subscript {...otherProps} />\n case 'edit':\n return <EditTwoTone {...otherProps} />\n case 'tag':\n return <AlternateEmail {...otherProps} />\n case 'restore':\n return <RestoreFromTrashTwoTone {...otherProps} />\n case 'label':\n return <LabelTwoTone {...otherProps} />\n case 'upload':\n return <UploadTwoTone {...otherProps} />\n case 'flag':\n return <FlagTwoTone {...otherProps} />\n case 'email':\n return <MailOutlineTwoTone {...otherProps} />\n case 'sortUp':\n return (\n <Sort\n {...otherProps}\n sx={{\n transform: 'scale(1, -1)',\n ...otherProps.sx,\n }}\n />\n )\n case 'sortDown':\n return <Sort {...otherProps} />\n case 'google24':\n return <GoogleIcon24 {...otherProps} />\n case 'orcid':\n return <ORCIDIcon {...otherProps} />\n case 'tasks':\n return <TasksIcon {...otherProps} />\n case 'filter':\n return <FilterAltTwoTone {...otherProps} />\n case 'openInFull':\n return <OpenInFull {...otherProps} />\n case 'fileWithShield':\n return <FileWithShield {...otherProps} />\n case 'baseline':\n return <Baseline {...otherProps} />\n case 'rosetteRibbon':\n return <RosetteRibbon {...otherProps} />\n case 'starTrophy':\n return <StarTrophy {...otherProps} />\n case 'awardScroll':\n return <AwardScroll {...otherProps} />\n case 'clappingHands':\n return <ClappingHands {...otherProps} />\n case 'podium':\n return <Podium {...otherProps} />\n case 'openBook':\n return <OpenBook {...otherProps} />\n case 'handWithMoney':\n return <HandWithMoney {...otherProps} />\n case 'threeStars':\n return <ThreeStars {...otherProps} />\n case 'multiFile':\n return <MultiFile {...otherProps} />\n\n default:\n return <></>\n }\n}\n\nfunction IconSvg(props: IconSvgProps) {\n const { icon, label = '', onClick, wrap = true, ...svgIconProps } = props\n\n const id = `icon-${icon}`\n const role = onClick ? 'button' : 'img'\n const style = onClick ? { cursor: 'pointer' } : {}\n\n const wrapperProps = wrap\n ? {\n 'data-svg': icon,\n className: 'styled-svg-wrapper',\n id,\n role,\n onClick,\n style,\n }\n : {}\n\n let iconNode: ReactNode\n if (wrap) {\n iconNode = (\n <span {...wrapperProps}>\n <IconMapping icon={icon} {...svgIconProps} />\n </span>\n )\n } else {\n iconNode = (\n <IconMapping\n icon={icon}\n id={id}\n role={role}\n onClick={onClick}\n style={style}\n {...svgIconProps}\n />\n )\n }\n\n return (\n <Tooltip placement=\"top\" title={label}>\n {iconNode}\n </Tooltip>\n )\n}\n\n/**\n * Map entity type values to appropriate icon values supported by IconSvg.\n */\nexport const type2SvgIconName: Record<EntityType, IconName> = {\n file: 'file',\n project: 'dashboard',\n folder: 'folder',\n table: 'table',\n link: 'link',\n entityview: 'actionKey',\n materializedview: 'tableview',\n virtualtable: 'columns',\n dockerrepo: 'docker',\n submissionview: 'submissionview',\n dataset: 'dataset',\n datasetcollection: 'datasetcollection',\n recordset: 'fileWithShield',\n searchindex: 'search',\n}\n\nexport default IconSvg\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyJA,IAAa,IAAc,8lDA2J3B;AAYA,SAAS,EAAY,GAAwC;CAC3D,IAAM,EAAE,SAAM,GAAG,MAAe;CAQhC,QALA,EAAW,KAAK;EACd,eAAe;EACf,GAAG,EAAW;CAChB,GAEQ,GAAR;EACE,KAAK,cACH,OAAO,kBAAC,IAAD,EAAiB,GAAI,EAAa,CAAA;EAC3C,KAAK,gBACH,OAAO,kBAAC,IAAD,EAAe,GAAI,EAAa,CAAA;EACzC,KAAK,iBACH,OAAO,kBAAC,GAAD,EAAe,GAAI,EAAa,CAAA;EACzC,KAAK,sBACH,OAAO,kBAAC,GAAD,EAAoB,GAAI,EAAa,CAAA;EAC9C,KAAK,OACH,OAAO,kBAAC,GAAD,EAAY,GAAI,EAAa,CAAA;EACtC,KAAK,iBACH,OAAO,kBAAC,IAAD,EAAkB,GAAI,EAAa,CAAA;EAC5C,KAAK,aACH,OAAO,kBAAC,GAAD,EAAW,GAAI,EAAa,CAAA;EACrC,KAAK,aACH,OAAO,kBAAC,IAAD,EAAW,GAAI,EAAa,CAAA;EACrC,KAAK,gBACH,OAAO,kBAAC,IAAD,EAAc,GAAI,EAAa,CAAA;EACxC,KAAK,eACH,OAAO,kBAAC,IAAD,EAAoB,GAAI,EAAa,CAAA;EAC9C,KAAK,iBACH,OAAO,kBAAC,IAAD,EAAsB,GAAI,EAAa,CAAA;EAChD,KAAK,WACH,OAAO,kBAAC,GAAD,EAAgB,GAAI,EAAa,CAAA;EAC1C,KA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AErC,SACE,OAAO,kBAAA,GAAA,CAAI,CAAA;CACf;AACF;AAEA,SAAS,GAAQ,GAAqB;CACpC,IAAM,EAAE,SAAM,WAAQ,IAAI,YAAS,UAAO,IAAM,GAAG,MAAiB,GAE9D,IAAK,QAAQ,KACb,IAAO,IAAU,WAAW,OAC5B,IAAQ,IAAU,EAAE,QAAQ,UAAU,IAAI,CAAC,GAE3C,IAAe,IACjB;EACE,YAAY;EACZ,WAAW;EACX;EACA;EACA;EACA;CACF,IACA,CAAC,GAED;CAoBJ,OAnBA,AAOE,IAPE,IAEA,kBAAC,QAAD;EAAM,GAAI;YACR,kBAAC,GAAD;GAAmB;GAAM,GAAI;EAAe,CAAA;CACxC,CAAA,IAIN,kBAAC,GAAD;EACQ;EACF;EACE;EACG;EACF;EACP,GAAI;CACL,CAAA,GAKH,kBAAC,GAAD;EAAS,WAAU;EAAM,OAAO;YAC7B;CACM,CAAA;AAEb;AAKA,IAAa,KAAiD;CAC5D,MAAM;CACN,SAAS;CACT,QAAQ;CACR,OAAO;CACP,MAAM;CACN,YAAY;CACZ,kBAAkB;CAClB,cAAc;CACd,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,mBAAmB;CACnB,WAAW;CACX,aAAa;AACf"}
|
|
@@ -2,6 +2,20 @@ import React from 'react';
|
|
|
2
2
|
import { ColumnType } from '@sage-bionetworks/synapse-types';
|
|
3
3
|
import { Dispatch, PropsWithChildren, ReactNode, SetStateAction } from 'react';
|
|
4
4
|
import { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants';
|
|
5
|
+
/**
|
|
6
|
+
* Structured rendering for a single facet value, returned by `renderFacetValue`.
|
|
7
|
+
* Consumers (the facet sidebar, active-filter pills) render this through the
|
|
8
|
+
* shared `FacetValueChip`, so styling, tooltip, and the remove affordance stay
|
|
9
|
+
* consistent and live in one place rather than in each renderer.
|
|
10
|
+
*/
|
|
11
|
+
export type RenderedFacetValueChip = {
|
|
12
|
+
/** The chip label. */
|
|
13
|
+
label: ReactNode;
|
|
14
|
+
/** Optional tooltip content. */
|
|
15
|
+
tooltipTitle?: ReactNode;
|
|
16
|
+
/** Optional leading icon. */
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
};
|
|
5
19
|
export type QueryVisualizationContextType = {
|
|
6
20
|
columnsToShowInTable: string[];
|
|
7
21
|
setColumnsToShowInTable: (newState: string[]) => void;
|
|
@@ -15,6 +29,13 @@ export type QueryVisualizationContextType = {
|
|
|
15
29
|
getHelpText: (columnName: string, jsonPath?: string) => string | undefined;
|
|
16
30
|
/** Given a cell value and a column type, returns the displayed value for the data */
|
|
17
31
|
getDisplayValue: (value: string, columnType: ColumnType) => string;
|
|
32
|
+
/**
|
|
33
|
+
* Optional custom renderer for enumeration facet values, keyed by column. When
|
|
34
|
+
* it returns structured content for a (columnName, value), that content is
|
|
35
|
+
* rendered as a chip in the facet filter and the active-filter ("selected
|
|
36
|
+
* criteria") pills. Returning undefined falls back to the plain text label.
|
|
37
|
+
*/
|
|
38
|
+
renderFacetValue?: (columnName: string, value: string) => RenderedFacetValueChip | undefined;
|
|
18
39
|
/** React node to display in place of cards/table when there are no results. */
|
|
19
40
|
NoContentPlaceholder: () => ReactNode;
|
|
20
41
|
/** The set of external analysis platforms where this component allows users to export data. If this list is empty, then
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVisualizationContext.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAEL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,cAAc,EAEf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA;AAEpG,MAAM,MAAM,6BAA6B,GAAG;IAC1C,oBAAoB,EAAE,MAAM,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C,OAAO,CAAC,CAAC,CAAA;IACnD,mBAAmB,EAAE,OAAO,CAAA;IAC5B,sBAAsB,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IACzD,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CAChD,CAAA;AACD;;GAEG;AACH,eAAO,MAAM,yBAAyB,0DAE1B,CAAA;AACZ,MAAM,MAAM,sCAAsC,GAAG,iBAAiB,CAAC;IACrE,yBAAyB,EAAE,6BAA6B,CAAA;CACzD,CAAC,CAAA;AACF;;GAEG;AACH,eAAO,MAAM,iCAAiC,GAAI,0CAG/C,sCAAsC,KAAG,KAAK,CAAC,SAMjD,CAAA;AAED,wBAAgB,4BAA4B,IAAI,6BAA6B,CAQ5E;AAED,eAAO,MAAM,iCAAiC,2DACV,CAAA"}
|
|
1
|
+
{"version":3,"file":"QueryVisualizationContext.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAEL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,cAAc,EAEf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA;AAEpG;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,sBAAsB;IACtB,KAAK,EAAE,SAAS,CAAA;IAChB,gCAAgC;IAChC,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,uBAAuB,EAAE,CAAC,QAAQ,EAAE,MAAM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a,EAAE,OAAO,CAAA;IACtB,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IACnD,mBAAmB,EAAE,OAAO,CAAA;IAC5B,sBAAsB,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IACzD,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CAChD,CAAA;AACD;;GAEG;AACH,eAAO,MAAM,yBAAyB,0DAE1B,CAAA;AACZ,MAAM,MAAM,sCAAsC,GAAG,iBAAiB,CAAC;IACrE,yBAAyB,EAAE,6BAA6B,CAAA;CACzD,CAAC,CAAA;AACF;;GAEG;AACH,eAAO,MAAM,iCAAiC,GAAI,0CAG/C,sCAAsC,KAAG,KAAK,CAAC,SAMjD,CAAA;AAED,wBAAgB,4BAA4B,IAAI,6BAA6B,CAQ5E;AAED,eAAO,MAAM,iCAAiC,2DACV,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVisualizationContext.js","names":[],"sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"sourcesContent":["import React from 'react'\nimport { ColumnType } from '@sage-bionetworks/synapse-types'\nimport {\n createContext,\n Dispatch,\n PropsWithChildren,\n ReactNode,\n SetStateAction,\n useContext,\n} from 'react'\nimport { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants'\n\nexport type QueryVisualizationContextType = {\n columnsToShowInTable: string[]\n setColumnsToShowInTable: (newState: string[]) => void\n rgbIndex?: number\n unitDescription: string\n /** Whether to show when the table or view was last updated. */\n showLastUpdatedOn?: boolean\n /** Given a column name, return the display name for the column */\n getColumnDisplayName: (columnName: string, jsonPath?: string) => string\n /** Given a column name or JSON facet, return the configured help text */\n getHelpText: (columnName: string, jsonPath?: string) => string | undefined\n /** Given a cell value and a column type, returns the displayed value for the data */\n getDisplayValue: (value: string, columnType: ColumnType) => string\n /** React node to display in place of cards/table when there are no results. */\n NoContentPlaceholder: () => ReactNode\n /** The set of external analysis platforms where this component allows users to export data. If this list is empty, then\n * controls will not be shown. */\n enabledExternalAnalysisPlatforms: ExternalAnalysisPlatform[]\n /** If true, a dialog guiding the user through exporting table query data to an external platform is shown. If this\n * is true, enabledExternalAnalysisPlatforms must be non-empty */\n isShowingExportToAnalysisPlatformModal: boolean\n /** Allows toggling isShowingExportToAnalysisPlatformModal */\n setIsShowingExportToAnalysisPlatformModal: Dispatch<SetStateAction<boolean>>\n showFacetFilter: boolean\n setShowFacetFilter: Dispatch<SetStateAction<boolean>>\n hideSearchBarControl: boolean\n /** When true, the text matches filter pill is shown but cannot be removed. Defaults to true. */\n lockTextMatchesQueryFilterPill: boolean\n showSearchBar: boolean\n setShowSearchBar: Dispatch<SetStateAction<boolean>>\n showDownloadConfirmation: boolean\n setShowDownloadConfirmation: Dispatch<SetStateAction<boolean>>\n showSqlEditor: boolean\n setShowSqlEditor: Dispatch<SetStateAction<boolean>>\n showCopyToClipboard: boolean\n setShowCopyToClipboard: Dispatch<SetStateAction<boolean>>\n showPlots: boolean\n setShowPlots: Dispatch<SetStateAction<boolean>>\n}\n/**\n * This must be exported to use the context in class components.\n */\nexport const QueryVisualizationContext = createContext<\n QueryVisualizationContextType | undefined\n>(undefined)\nexport type QueryVisualizationContextProviderProps = PropsWithChildren<{\n queryVisualizationContext: QueryVisualizationContextType\n}>\n/**\n * Provides fields and functions related to visualizing a Synapse table query. For actual query data, see QueryContextProvider.\n */\nexport const QueryVisualizationContextProvider = ({\n children,\n queryVisualizationContext,\n}: QueryVisualizationContextProviderProps): React.ReactNode => {\n return (\n <QueryVisualizationContext.Provider value={queryVisualizationContext}>\n {children}\n </QueryVisualizationContext.Provider>\n )\n}\n\nexport function useQueryVisualizationContext(): QueryVisualizationContextType {\n const context = useContext(QueryVisualizationContext)\n if (context === undefined) {\n throw new Error(\n 'useQueryVisualizationContext must be used within a QueryVisualizationWrapper',\n )\n }\n return context\n}\n\nexport const QueryVisualizationContextConsumer =\n QueryVisualizationContext.Consumer\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"QueryVisualizationContext.js","names":[],"sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationContext.tsx"],"sourcesContent":["import React from 'react'\nimport { ColumnType } from '@sage-bionetworks/synapse-types'\nimport {\n createContext,\n Dispatch,\n PropsWithChildren,\n ReactNode,\n SetStateAction,\n useContext,\n} from 'react'\nimport { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants'\n\n/**\n * Structured rendering for a single facet value, returned by `renderFacetValue`.\n * Consumers (the facet sidebar, active-filter pills) render this through the\n * shared `FacetValueChip`, so styling, tooltip, and the remove affordance stay\n * consistent and live in one place rather than in each renderer.\n */\nexport type RenderedFacetValueChip = {\n /** The chip label. */\n label: ReactNode\n /** Optional tooltip content. */\n tooltipTitle?: ReactNode\n /** Optional leading icon. */\n icon?: ReactNode\n}\n\nexport type QueryVisualizationContextType = {\n columnsToShowInTable: string[]\n setColumnsToShowInTable: (newState: string[]) => void\n rgbIndex?: number\n unitDescription: string\n /** Whether to show when the table or view was last updated. */\n showLastUpdatedOn?: boolean\n /** Given a column name, return the display name for the column */\n getColumnDisplayName: (columnName: string, jsonPath?: string) => string\n /** Given a column name or JSON facet, return the configured help text */\n getHelpText: (columnName: string, jsonPath?: string) => string | undefined\n /** Given a cell value and a column type, returns the displayed value for the data */\n getDisplayValue: (value: string, columnType: ColumnType) => string\n /**\n * Optional custom renderer for enumeration facet values, keyed by column. When\n * it returns structured content for a (columnName, value), that content is\n * rendered as a chip in the facet filter and the active-filter (\"selected\n * criteria\") pills. Returning undefined falls back to the plain text label.\n */\n renderFacetValue?: (\n columnName: string,\n value: string,\n ) => RenderedFacetValueChip | undefined\n /** React node to display in place of cards/table when there are no results. */\n NoContentPlaceholder: () => ReactNode\n /** The set of external analysis platforms where this component allows users to export data. If this list is empty, then\n * controls will not be shown. */\n enabledExternalAnalysisPlatforms: ExternalAnalysisPlatform[]\n /** If true, a dialog guiding the user through exporting table query data to an external platform is shown. If this\n * is true, enabledExternalAnalysisPlatforms must be non-empty */\n isShowingExportToAnalysisPlatformModal: boolean\n /** Allows toggling isShowingExportToAnalysisPlatformModal */\n setIsShowingExportToAnalysisPlatformModal: Dispatch<SetStateAction<boolean>>\n showFacetFilter: boolean\n setShowFacetFilter: Dispatch<SetStateAction<boolean>>\n hideSearchBarControl: boolean\n /** When true, the text matches filter pill is shown but cannot be removed. Defaults to true. */\n lockTextMatchesQueryFilterPill: boolean\n showSearchBar: boolean\n setShowSearchBar: Dispatch<SetStateAction<boolean>>\n showDownloadConfirmation: boolean\n setShowDownloadConfirmation: Dispatch<SetStateAction<boolean>>\n showSqlEditor: boolean\n setShowSqlEditor: Dispatch<SetStateAction<boolean>>\n showCopyToClipboard: boolean\n setShowCopyToClipboard: Dispatch<SetStateAction<boolean>>\n showPlots: boolean\n setShowPlots: Dispatch<SetStateAction<boolean>>\n}\n/**\n * This must be exported to use the context in class components.\n */\nexport const QueryVisualizationContext = createContext<\n QueryVisualizationContextType | undefined\n>(undefined)\nexport type QueryVisualizationContextProviderProps = PropsWithChildren<{\n queryVisualizationContext: QueryVisualizationContextType\n}>\n/**\n * Provides fields and functions related to visualizing a Synapse table query. For actual query data, see QueryContextProvider.\n */\nexport const QueryVisualizationContextProvider = ({\n children,\n queryVisualizationContext,\n}: QueryVisualizationContextProviderProps): React.ReactNode => {\n return (\n <QueryVisualizationContext.Provider value={queryVisualizationContext}>\n {children}\n </QueryVisualizationContext.Provider>\n )\n}\n\nexport function useQueryVisualizationContext(): QueryVisualizationContextType {\n const context = useContext(QueryVisualizationContext)\n if (context === undefined) {\n throw new Error(\n 'useQueryVisualizationContext must be used within a QueryVisualizationWrapper',\n )\n }\n return context\n}\n\nexport const QueryVisualizationContextConsumer =\n QueryVisualizationContext.Consumer\n"],"mappings":";;;AA+EA,IAAa,IAA4B,EAEvC,KAAA,CAAS,GAOE,KAAqC,EAChD,aACA,mCAGE,kBAAC,EAA0B,UAA3B;CAAoC,OAAO;CACxC;AACiC,CAAA;AAIxC,SAAgB,IAA8D;CAC5E,IAAM,IAAU,EAAW,CAAyB;CACpD,IAAI,MAAY,KAAA,GACd,MAAU,MACR,8EACF;CAEF,OAAO;AACT;AAEA,IAAa,IACX,EAA0B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { NoContentPlaceholderType } from '../SynapseTable/NoContentPlaceholderType';
|
|
3
3
|
import { ExternalAnalysisPlatform } from '../SynapseTable/export/ExternalAnalysisPlatformsConstants';
|
|
4
|
+
import { RenderedFacetValueChip } from './QueryVisualizationContext';
|
|
4
5
|
type ColumnOrFacetHelpConfig = {
|
|
5
6
|
/** Text that describes the column or facet */
|
|
6
7
|
helpText: string;
|
|
@@ -16,6 +17,15 @@ export type QueryVisualizationWrapperProps = {
|
|
|
16
17
|
unitDescription?: string;
|
|
17
18
|
/** Mapping from column name to the name that should be shown for the column */
|
|
18
19
|
columnAliases?: Record<string, string>;
|
|
20
|
+
/** Optional custom renderer for enumeration facet values (see context). */
|
|
21
|
+
renderFacetValue?: (columnName: string, value: string) => RenderedFacetValueChip | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Column name of a STRING_LIST of Data Use Ontology (DUO) values. When set,
|
|
24
|
+
* that column's facet values and active-filter pills are automatically
|
|
25
|
+
* rendered as DUO tags, so portals don't need to supply their own
|
|
26
|
+
* `renderFacetValue` handler. An explicit `renderFacetValue` takes precedence.
|
|
27
|
+
*/
|
|
28
|
+
dataUseModifiersColumnName?: string;
|
|
19
29
|
visibleColumnCount?: number;
|
|
20
30
|
hiddenColumns?: string[];
|
|
21
31
|
defaultShowPlots?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVisualizationWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAA6C,MAAM,OAAO,CAAA;AAI5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA;
|
|
1
|
+
{"version":3,"file":"QueryVisualizationWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/QueryVisualizationWrapper/QueryVisualizationWrapper.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAA6C,MAAM,OAAO,CAAA;AAI5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAA;AAGpG,OAAO,EAGL,sBAAsB,EACvB,MAAM,6BAA6B,CAAA;AAKpC,KAAK,uBAAuB,GAAG;IAC7B,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAA;IAChB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uGAAuG;IACvG,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,CACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,KACV,sBAAsB,GAAG,SAAS,CAAA;IACvC;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,gBAA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