synapse-react-client 4.0.23 → 4.0.25

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.
Files changed (108) hide show
  1. package/dist/SWC.index.d.ts +1 -0
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +2 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
  6. package/dist/components/AclEditor/useUpdateAcl.js.map +1 -1
  7. package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
  8. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  9. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
  10. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  11. package/dist/components/Breadcrumbs/Breadcrumbs.js +43 -30
  12. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  13. package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js.map +1 -1
  14. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
  15. package/dist/components/CopyToClipboardString/CopyToClipboardString.d.ts +7 -1
  16. package/dist/components/CopyToClipboardString/CopyToClipboardString.d.ts.map +1 -1
  17. package/dist/components/CopyToClipboardString/CopyToClipboardString.js +22 -16
  18. package/dist/components/CopyToClipboardString/CopyToClipboardString.js.map +1 -1
  19. package/dist/components/EntityCitation/EntityCitation.d.ts.map +1 -1
  20. package/dist/components/EntityCitation/EntityCitation.js +28 -26
  21. package/dist/components/EntityCitation/EntityCitation.js.map +1 -1
  22. package/dist/components/EntityFinder/tree/EntityTree.js.map +1 -1
  23. package/dist/components/EntityFinder/tree/VirtualizedTree.js.map +1 -1
  24. package/dist/components/EntityIcon.d.ts +1 -0
  25. package/dist/components/EntityIcon.d.ts.map +1 -1
  26. package/dist/components/EntityIcon.js +37 -36
  27. package/dist/components/EntityIcon.js.map +1 -1
  28. package/dist/components/EntitySidebar/EntitySidebar.css +1 -0
  29. package/dist/components/EntitySidebar/EntitySidebar.d.ts +7 -0
  30. package/dist/components/EntitySidebar/EntitySidebar.d.ts.map +1 -0
  31. package/dist/components/EntitySidebar/EntitySidebar.js +62 -0
  32. package/dist/components/EntitySidebar/EntitySidebar.js.map +1 -0
  33. package/dist/components/EntitySidebar/EntitySidebar.module.js +17 -0
  34. package/dist/components/EntitySidebar/EntitySidebar.module.js.map +1 -0
  35. package/dist/components/EntitySidebar/EntitySidebar.module.scss +87 -0
  36. package/dist/components/Evaluation/EvaluationRoundEditorList.js.map +1 -1
  37. package/dist/components/GenericCard/BioregistryRules.js.map +1 -1
  38. package/dist/components/IconSvg/IconSvg.d.ts +2 -1
  39. package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
  40. package/dist/components/IconSvg/IconSvg.js +112 -89
  41. package/dist/components/IconSvg/IconSvg.js.map +1 -1
  42. package/dist/components/Plot/SynapsePlot.d.ts +4 -0
  43. package/dist/components/Plot/SynapsePlot.d.ts.map +1 -1
  44. package/dist/components/Plot/SynapsePlot.js +57 -44
  45. package/dist/components/Plot/SynapsePlot.js.map +1 -1
  46. package/dist/components/Plot/UpsetPlot.js.map +1 -1
  47. package/dist/components/QueryWrapperPlotNav/QueryWrapperSynapsePlot.d.ts.map +1 -1
  48. package/dist/components/QueryWrapperPlotNav/QueryWrapperSynapsePlot.js +77 -34
  49. package/dist/components/QueryWrapperPlotNav/QueryWrapperSynapsePlot.js.map +1 -1
  50. package/dist/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.js.map +1 -1
  51. package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts.map +1 -1
  52. package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js +1 -0
  53. package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js.map +1 -1
  54. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  55. package/dist/components/SynapseTable/TablePagination.js.map +1 -1
  56. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  57. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
  58. package/dist/components/TanStackTable/StyledTanStackTable.js.map +1 -1
  59. package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts +2 -0
  60. package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
  61. package/dist/components/entity/page/action_menu/EntityActionMenu.js +46 -27
  62. package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
  63. package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.d.ts +1 -8
  64. package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.d.ts.map +1 -1
  65. package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.js +17 -13
  66. package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.js.map +1 -1
  67. package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts +1 -0
  68. package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts.map +1 -1
  69. package/dist/components/entity/page/title_bar/EntityPageTitleBar.js +35 -22
  70. package/dist/components/entity/page/title_bar/EntityPageTitleBar.js.map +1 -1
  71. package/dist/components/entity/page/title_bar/EntityTitleBarVersionInfo.d.ts.map +1 -1
  72. package/dist/components/entity/page/title_bar/EntityTitleBarVersionInfo.js +34 -20
  73. package/dist/components/entity/page/title_bar/EntityTitleBarVersionInfo.js.map +1 -1
  74. package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts +0 -1
  75. package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts.map +1 -1
  76. package/dist/components/entity/page/title_bar/TitleBarProperties.js +17 -82
  77. package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +1 -1
  78. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.d.ts.map +1 -1
  79. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js +3 -4
  80. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js.map +1 -1
  81. package/dist/components/favorites/FavoriteButton.d.ts +1 -0
  82. package/dist/components/favorites/FavoriteButton.d.ts.map +1 -1
  83. package/dist/components/favorites/FavoriteButton.js +8 -8
  84. package/dist/components/favorites/FavoriteButton.js.map +1 -1
  85. package/dist/components/menu/ComplexMenu.d.ts.map +1 -1
  86. package/dist/components/menu/ComplexMenu.js +5 -3
  87. package/dist/components/menu/ComplexMenu.js.map +1 -1
  88. package/dist/components/menu/DropdownMenu.d.ts +1 -0
  89. package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
  90. package/dist/components/menu/DropdownMenu.js +24 -24
  91. package/dist/components/menu/DropdownMenu.js.map +1 -1
  92. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
  93. package/dist/components/widgets/facet-nav/FacetNavPanel.js +59 -49
  94. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  95. package/dist/components/widgets/facet-nav/PlotsContainer.d.ts.map +1 -1
  96. package/dist/components/widgets/facet-nav/PlotsContainer.js +8 -2
  97. package/dist/components/widgets/facet-nav/PlotsContainer.js.map +1 -1
  98. package/dist/style/components/facet_nav/_facet-nav-panel.scss +11 -0
  99. package/dist/style/main.css +1 -1
  100. package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
  101. package/dist/tsconfig.build.tsbuildinfo +1 -1
  102. package/dist/types/ThemeTypes.d.ts +2 -2
  103. package/dist/utils/functions/IsEqualTreatUndefinedAsMissing.js.map +1 -1
  104. package/dist/utils/hooks/useDebouncedEffect.js.map +1 -1
  105. package/dist/utils/hooks/useDetectSSOCode.js.map +1 -1
  106. package/dist/utils/hooks/useImmutableTableQuery/useImmutableTableQuery.js.map +1 -1
  107. package/dist/utils/hooks/useLogin.js.map +1 -1
  108. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedTree.js","names":[],"sources":["../../../../src/components/EntityFinder/tree/VirtualizedTree.tsx"],"sourcesContent":["import React from 'react'\nimport { getEntityChildren } from '@/synapse-client'\nimport { useSynapseContext } from '@/utils'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport {\n getEntityTypeFromHeader,\n isContainerType,\n} from '@/utils/functions/EntityTypeUtils'\nimport { Writable } from '@/utils/types/Writable'\nimport { ChevronRight, ExpandMore } from '@mui/icons-material'\nimport { Skeleton, Tooltip, Typography } from '@mui/material'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport { EntityChildrenRequest } from '@sage-bionetworks/synapse-types'\nimport { useQueryClient } from '@tanstack/react-query'\nimport dayjs from 'dayjs'\nimport { cloneDeep } from 'lodash-es'\nimport { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { useInView } from 'react-intersection-observer'\nimport AutoSizer from 'react-virtualized-auto-sizer'\nimport {\n TreeWalker,\n TreeWalkerValue,\n VariableSizeNodeData,\n VariableSizeNodePublicState,\n VariableSizeTree,\n} from 'react-vtree'\nimport { NodeComponentProps } from 'react-vtree/dist/es/Tree'\nimport { EntityBadgeIcons } from '../../EntityBadgeIcons'\nimport { EntityTypeIcon } from '../../EntityIcon'\nimport { SynapseSpinner } from '../../LoadingScreen/LoadingScreen'\nimport { UserBadge } from '../../UserCard/UserBadge'\nimport { EntityFinderHeader } from '../EntityFinderHeader'\nimport { EntitySelectionMapType } from '../useEntitySelection'\n\nexport enum EntityTreeNodeType {\n /** The tree component's appearance and interactions will facilitate selection. Nodes will be larger and styles will indicate primary selection */\n SINGLE_PANE,\n /** The tree component's appearance and interactions will facilitate browsing. Nodes will be smaller and styles will indicate secondary selection */\n DUAL_PANE,\n}\n\ntype NodeChildren = Readonly<{\n /** The node's children. If undefined, then children have not been fetched. */\n children?: EntityHeaderNode[]\n /** The token used to fetch the next page of children for this entity. If this property is nullish and children is defined, then all children have been fetched. */\n childrenNextPageToken?: string | null\n}>\n\nexport type EntityHeaderNode = (\n | EntityFinderHeader\n // Only will have a subset of fields if the node is fetched via the entity path:\n | Pick<EntityFinderHeader, 'id' | 'name' | 'type'>\n) &\n NodeChildren\ntype PaginationNode = { __paginationNode: true }\n\ntype TreeNode = EntityHeaderNode | RootNodeConfiguration | PaginationNode\n\nfunction getTreeNodeType(\n node: TreeNode,\n): 'entityHeader' | 'rootNodeConfiguration' | 'pagination' {\n if ('__paginationNode' in node) {\n return 'pagination'\n }\n return 'id' in node ? 'entityHeader' : 'rootNodeConfiguration'\n}\n\nfunction isPaginationNode(node: TreeNode): node is PaginationNode {\n return getTreeNodeType(node) === 'pagination'\n}\n\nfunction isEntityHeaderNode(node: TreeNode): node is EntityHeaderNode {\n return getTreeNodeType(node) === 'entityHeader'\n}\n\nfunction isRootNodeConfiguration(\n node: TreeNode,\n): node is RootNodeConfiguration {\n return getTreeNodeType(node) === 'rootNodeConfiguration'\n}\n\nfunction hasMoreChildren(node: TreeNode) {\n if (isPaginationNode(node)) {\n return false\n } else if (isRootNodeConfiguration(node)) {\n return node.hasNextPage\n }\n\n return node.children == null || node.childrenNextPageToken != null\n}\n\nfunction isLeafNode(node: TreeNode) {\n if (isPaginationNode(node)) {\n return true\n } else if (isRootNodeConfiguration(node)) {\n return false\n } else {\n return (\n // Entity is not a container\n !isContainerType(getEntityTypeFromHeader(node)) ||\n // OR Children have been fetched (nonnull) and there are 0 children\n (node.children != null && node.children.length === 0)\n )\n }\n}\n\nfunction maybeHasChildren(\n node: TreeNode,\n): node is RootNodeConfiguration | EntityHeaderNode {\n if (isPaginationNode(node)) {\n return false\n } else if (isRootNodeConfiguration(node)) {\n return node.children.length > 0 || node.hasNextPage\n } else {\n return !isLeafNode(node)\n }\n}\n\nexport type TreeData = VariableSizeNodeData &\n Readonly<{\n node: TreeNode\n getNextPageOfChildren: () => Promise<void>\n isLeaf: boolean\n nestingLevel: number\n setSelectedId: (entityId: string) => void\n treeNodeType: EntityTreeNodeType\n isSelected: boolean\n isDisabled: boolean\n }>\n\ntype NodeMeta = Readonly<{\n nestingLevel: number\n node: TreeNode\n}>\n\nexport type RootNodeConfiguration = {\n show: boolean\n nodeText: string\n children: EntityHeaderNode[]\n /** If undefined, no more entities to fetch */\n fetchNextPage: () => Promise<void>\n hasNextPage: boolean\n}\n\n/**\n * Converts a TreeNode and related data into a TreeWalkerValue that react-vtree can use to render the tree.\n * Exported for testing purposes only.\n * @param config\n * @returns\n */\nexport const getNodeData = (config: {\n node: TreeNode\n nestingLevel: number\n getNextPageOfChildren: () => Promise<void>\n setSelectedId: (entityId: string) => void\n treeNodeType: EntityTreeNodeType\n selected: EntitySelectionMapType\n selectableTypes: EntityType[]\n autoExpand: (entityId: string) => boolean\n defaultHeight: number\n currentContainer?: string | 'root' | null\n}): TreeWalkerValue<TreeData, NodeMeta> => {\n const {\n node,\n nestingLevel,\n getNextPageOfChildren,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n defaultHeight,\n currentContainer,\n } = config\n\n if (isPaginationNode(node)) {\n throw new Error('Cannot create data for a pagination node')\n }\n\n const id = isRootNodeConfiguration(node) ? 'root' : node.id\n\n const isSelected =\n treeNodeType === EntityTreeNodeType.SINGLE_PANE\n ? selected.has(id)\n : currentContainer === id\n const isDisabled =\n !isRootNodeConfiguration(node) &&\n !selectableTypes.includes(getEntityTypeFromHeader(node))\n\n const isOpenByDefault = autoExpand(id)\n /*\n * If the node is open by default and we haven't fetched its children,\n * fetch the first page (otherwise we won't fetch unless re-toggled)\n */\n if (isOpenByDefault && node.children == null && hasMoreChildren(node)) {\n getNextPageOfChildren()\n }\n\n return {\n data: {\n node,\n getNextPageOfChildren,\n id: id,\n isLeaf: isLeafNode(node),\n isOpenByDefault: isOpenByDefault,\n nestingLevel,\n setSelectedId,\n treeNodeType,\n isSelected,\n isDisabled,\n defaultHeight,\n },\n nestingLevel,\n node,\n }\n}\n\n/**\n * Node component for the react-vtree virtualized tree. Exported only for testing purposes\n */\nexport function Node(\n props: NodeComponentProps<TreeData, VariableSizeNodePublicState<TreeData>>,\n) {\n const {\n data: {\n node,\n getNextPageOfChildren,\n isLeaf,\n id,\n nestingLevel,\n setSelectedId,\n treeNodeType,\n isSelected,\n isDisabled,\n },\n isOpen,\n style,\n setOpen,\n } = props\n\n const [isLoading, setLoading] = useState(false)\n\n const nodeText = isEntityHeaderNode(node) ? (\n <span>{node.name}</span>\n ) : isRootNodeConfiguration(node) ? (\n <span>{node.nodeText}</span>\n ) : (\n // Pagination node\n <Skeleton width={100} />\n )\n\n // We only use this for pagination nodes. If the pagination node comes into view, then immediately call `getNextPageOfChildren`\n const { ref, inView } = useInView()\n\n useEffect(() => {\n if (isPaginationNode(node) && inView) {\n getNextPageOfChildren()\n }\n }, [node, inView, getNextPageOfChildren])\n\n const toggleExpand = useCallback(async () => {\n if (hasMoreChildren(node)) {\n setLoading(true)\n await getNextPageOfChildren()\n await setOpen(!isOpen)\n setLoading(false)\n } else {\n await setOpen(!isOpen)\n }\n }, [getNextPageOfChildren, node, isOpen, setOpen])\n\n /**\n * If in the dual-pane view, expand a node when it becomes selected\n */\n useEffect(() => {\n if (\n treeNodeType === EntityTreeNodeType.DUAL_PANE &&\n isSelected &&\n !isOpen\n ) {\n toggleExpand()\n }\n // Intentionally only toggle the expanded state when isSelected changes, otherwise the node cannot be un-expanded\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isSelected])\n\n /**\n * If the height is 0, the node is purposefully hidden. Just render a fragment.\n */\n if ('height' in style && style.height === 0) {\n return <></>\n }\n\n let tooltipContent: ReactNode = ''\n if (isEntityHeaderNode(node)) {\n tooltipContent = (\n <div style={{ textAlign: 'center' }}>\n <Typography\n component=\"span\"\n variant=\"smallText1\"\n sx={{\n display: 'inline',\n }}\n >\n {node.name}\n <br />\n <b>ID: </b>\n {node.id}\n {'modifiedBy' in node && (\n <>\n <br />\n <b>Modified By: </b>\n <UserBadge\n userId={node.modifiedBy.toString()}\n showFullName\n disableLink\n showCardOnHover={false}\n />\n </>\n )}\n {'modifiedOn' in node && (\n <>\n <br />\n <b>Modified On: </b>\n {formatDate(dayjs(node.modifiedOn))}\n </>\n )}\n </Typography>\n </div>\n )\n }\n\n const ExpandIcon = isOpen ? ExpandMore : ChevronRight\n\n return (\n <div\n className={`Node ${\n treeNodeType === EntityTreeNodeType.SINGLE_PANE\n ? 'SelectNode'\n : 'BrowseNode'\n }`}\n aria-selected={isSelected}\n aria-disabled={isDisabled}\n onClick={event => {\n event.stopPropagation()\n if (!isDisabled) {\n setSelectedId(id)\n }\n }}\n style={{\n ...style,\n paddingLeft: `${nestingLevel * 20}px`,\n }}\n >\n {!isLeaf && (\n <>\n {isLoading ? (\n <SynapseSpinner size={10} />\n ) : (\n <button\n aria-label={isOpen ? 'Collapse' : 'Expand'}\n onClick={event => {\n event.stopPropagation()\n toggleExpand()\n }}\n >\n <ExpandIcon className=\"ExpandButton\" />\n </button>\n )}\n </>\n )}\n {treeNodeType === EntityTreeNodeType.SINGLE_PANE && ( // SWC-5592\n <div className=\"EntityIcon\">\n {isEntityHeaderNode(node) && (\n <EntityTypeIcon type={getEntityTypeFromHeader(node)} />\n )}\n </div>\n )}\n\n <Tooltip title={tooltipContent} placement=\"right\">\n <div className=\"EntityName\" ref={ref}>\n {nodeText}\n </div>\n </Tooltip>\n\n {treeNodeType === EntityTreeNodeType.SINGLE_PANE && (\n <EntityBadgeIcons\n entityId={id}\n showHasDiscussionThread={false}\n showHasWiki={false}\n showUnlink={false}\n canOpenModal={false}\n />\n )}\n </div>\n )\n}\n\n/**\n * Extracted from the React component for testing purposes\n * @returns a generator function compatible with react-vtree\n */\nexport function getTreeWalkerFunction(\n rootNode: RootNodeConfiguration,\n setSelectedId: VirtualizedTreeProps['setSelectedId'],\n treeNodeType: VirtualizedTreeProps['treeNodeType'],\n selected: VirtualizedTreeProps['selected'],\n selectableTypes: VirtualizedTreeProps['selectableTypes'],\n autoExpand: VirtualizedTreeProps['autoExpand'],\n itemSize: (index?: number) => number,\n currentContainer: VirtualizedTreeProps['currentContainer'],\n fetchNextPageOfChildren: (node: Writable<EntityHeaderNode>) => Promise<void>,\n): TreeWalker<TreeData, NodeMeta> {\n return function* treeWalker() {\n // Step [1]: Define the root node of our tree.\n yield getNodeData({\n node: rootNode,\n nestingLevel: 0,\n getNextPageOfChildren: rootNode.fetchNextPage,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n defaultHeight: itemSize(),\n currentContainer,\n })\n\n while (true) {\n // Step [2]: Get the parent node and nesting level, which will be passed into the Generator.next function by react-vtree.\n // Yielding `undefined` indicates to react-vtree that we've finished iterating children from the last time we were in the loop.\n const parentMeta = yield\n\n if (maybeHasChildren(parentMeta.node)) {\n // Step [3]: Yielding all the known children of the parent\n if (parentMeta.node.children) {\n for (let i = 0; i < parentMeta.node.children.length; i++) {\n const childNode = parentMeta.node.children[i]\n\n yield getNodeData({\n node: childNode,\n nestingLevel: parentMeta.nestingLevel + 1,\n getNextPageOfChildren: () => fetchNextPageOfChildren(childNode),\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n defaultHeight: itemSize(),\n currentContainer,\n })\n }\n }\n\n // Step [4] - If the parent node has more children, render a \"pagination node\" that will fetch more children when it comes into view (via intersection observer)\n if (hasMoreChildren(parentMeta.node)) {\n const paginationNode: PaginationNode = {\n __paginationNode: true,\n }\n const paginationTreeWalkerValue: TreeWalkerValue<TreeData, NodeMeta> =\n {\n data: {\n id: parentMeta.data.id + '-pagination',\n node: paginationNode,\n isOpenByDefault: false,\n getNextPageOfChildren: parentMeta.data.getNextPageOfChildren,\n isLeaf: true,\n isSelected: false,\n defaultHeight: itemSize(),\n isDisabled: true,\n nestingLevel: parentMeta.nestingLevel + 1,\n setSelectedId: () => {},\n treeNodeType,\n },\n nestingLevel: parentMeta.nestingLevel + 1,\n node: {\n __paginationNode: true,\n },\n }\n yield paginationTreeWalkerValue\n }\n }\n }\n }\n}\n\nexport type VirtualizedTreeProps = Readonly<{\n treeNodeType: EntityTreeNodeType\n rootNodeConfiguration: RootNodeConfiguration\n setSelectedId: (entityId: string) => void\n selected: EntitySelectionMapType\n /* currentContainer is the container whose contents are shown on in the right pane in dual-pane configuration, and may only be defined when treeNodeType is DUAL_PANE */\n currentContainer?: string | 'root' | null\n autoExpand: (entityId: string) => boolean\n selectableTypes: EntityType[]\n visibleTypes: EntityType[]\n}>\n\n/**\n * Component that utilizes react-vtree to efficiently display a tree of entities. react-vtree utilizes react-window\n * to only render visible nodes, which eliminates performance issues as seen in SWC-5978.\n */\nexport const VirtualizedTree = (\n props: VirtualizedTreeProps,\n): React.ReactNode => {\n const {\n rootNodeConfiguration,\n setSelectedId,\n treeNodeType,\n selected,\n currentContainer,\n selectableTypes,\n visibleTypes,\n autoExpand,\n } = props\n\n const { accessToken, keyFactory } = useSynapseContext()\n const queryClient = useQueryClient()\n\n const [rootNode, setRootNode] = useState<RootNodeConfiguration>(\n rootNodeConfiguration,\n )\n\n const treeInstance = useRef<VariableSizeTree<TreeData>>(null)\n\n useEffect(() => {\n setRootNode(rootNodeConfiguration)\n }, [rootNodeConfiguration, rootNodeConfiguration.children])\n\n // This function is used by VariableSizeTree to identify the size of each node in the tree.\n const itemSize = useCallback(\n (index?: number) => {\n /**\n * We must have a root node, but we don't always want to show it.\n * In those cases, set the height of the root node to 0.\n */\n if (index === 0 && !rootNodeConfiguration.show) {\n return 0\n }\n /**\n * The height of all other nodes in the tree varies depending on the tree node type.\n */\n return treeNodeType === EntityTreeNodeType.DUAL_PANE ? 30 : 60\n },\n [treeNodeType, rootNodeConfiguration.show],\n )\n\n /**\n * Fetches the next page of children for a given node. After fetching the children, this method will make a deep clone of the\n * full tree, including the new data, and updates the state of the component\n */\n const fetchNextPageOfChildren = useCallback(\n // Because we update the root node with a copy at the end of this function, we can write to the node under update.\n async (node: Writable<EntityHeaderNode>) => {\n // Fetch the children of the node\n const entityChildrenRequest: EntityChildrenRequest = {\n parentId: node.id,\n nextPageToken: node.childrenNextPageToken,\n includeTypes: visibleTypes,\n }\n const children = await queryClient.fetchQuery({\n queryKey: keyFactory.getEntityChildrenQueryKey(\n entityChildrenRequest,\n false,\n ),\n queryFn: () => getEntityChildren(entityChildrenRequest, accessToken),\n })\n // Update the node data -- add the children and store the nextPageToken\n if (node.children) {\n for (const newChild of children.page) {\n // SWC-6751 - Prevent adding duplicate entries in case this function is called twice\n if (!node.children.find(child => child.id == newChild.id)) {\n node.children.push(newChild)\n }\n }\n } else {\n node.children = children.page\n }\n node.childrenNextPageToken = children.nextPageToken\n\n // Ensure the node for which we fetched children is expanded/open\n if (treeInstance.current) {\n await treeInstance.current.recomputeTree({\n [node.id]: {\n open: true,\n },\n })\n }\n\n // cloneDeep is required to re-render the tree with the new children\n setRootNode(cloneDeep(rootNode))\n },\n [visibleTypes, queryClient, keyFactory, rootNode, accessToken],\n )\n\n /**\n * treeWalker is a generator function used by react-vtree to generate the tree structure. The tree is re-built when the function is updated,\n * so the dependencies specified in useCallback are important.\n */\n const memoizedTreeWalker = useCallback(\n getTreeWalkerFunction(\n rootNode,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n itemSize,\n currentContainer,\n fetchNextPageOfChildren,\n ),\n [\n rootNode,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n currentContainer,\n fetchNextPageOfChildren,\n itemSize,\n ],\n )\n\n return (\n <AutoSizer disableWidth>\n {({ height }: { height: number }) => (\n <VariableSizeTree\n ref={treeInstance}\n treeWalker={memoizedTreeWalker}\n itemSize={itemSize}\n height={height}\n async={true}\n width=\"100%\"\n >\n {Node}\n </VariableSizeTree>\n )}\n </AutoSizer>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,cAAA,KAAA,eAEA,EAAA,EAAA,YAAA,KAAA;AACF,EAAA,CAAA,CAAA;AAmBA,SAAS,EACP,GACyD;CAIzD,OAHI,sBAAsB,IACjB,eAEF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C3C,GAMM,IAA0B,EAE9B,OAAO,MAAqC;EAE1C,IAAM,IAA+C;GACnD,UAAU,EAAK;GACf,eAAe,EAAK;GACpB,cAAc;EAChB,GACM,IAAW,MAAM,EAAY,WAAW;GAC5C,UAAU,EAAW,0BACnB,GACA,EACF;GACA,eAAe,EAAkB,GAAuB,CAAW;EACrE,CAAC;EAED,IAAI,EAAK,eACF,IAAM,KAAY,EAAS,MAE9B,AAAK,EAAK,SAAS,MAAK,MAAS,EAAM,MAAM,EAAS,EAAE,KACtD,EAAK,SAAS,KAAK,CAAQ;OAI/B,EAAK,WAAW,EAAS;EAc3B,AAZA,EAAK,wBAAwB,EAAS,eAGlC,EAAa,WACf,MAAM,EAAa,QAAQ,cAAc,GACtC,EAAK,KAAK,EACT,MAAM,GACR,EACF,CAAC,GAIH,EAAY,EAAU,CAAQ,CAAC;CACjC,GACA;EAAC;EAAc;EAAa;EAAY;EAAU;CAAW,CAC/D,GAMM,IAAqB,EACzB,EACE,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,CACF,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAEA,OACE,kBAAC,GAAD;EAAW,cAAA;aACP,EAAE,gBACF,kBAAC,GAAD;GACE,KAAK;GACL,YAAY;GACF;GACF;GACR,OAAO;GACP,OAAM;aAEL;EACe,CAAA;CAEX,CAAA;AAEf"}
1
+ {"version":3,"file":"VirtualizedTree.js","names":[],"sources":["../../../../src/components/EntityFinder/tree/VirtualizedTree.tsx"],"sourcesContent":["import React from 'react'\nimport { getEntityChildren } from '@/synapse-client'\nimport { useSynapseContext } from '@/utils'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport {\n getEntityTypeFromHeader,\n isContainerType,\n} from '@/utils/functions/EntityTypeUtils'\nimport { Writable } from '@/utils/types/Writable'\nimport { ChevronRight, ExpandMore } from '@mui/icons-material'\nimport { Skeleton, Tooltip, Typography } from '@mui/material'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport { EntityChildrenRequest } from '@sage-bionetworks/synapse-types'\nimport { useQueryClient } from '@tanstack/react-query'\nimport dayjs from 'dayjs'\nimport { cloneDeep } from 'lodash-es'\nimport { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { useInView } from 'react-intersection-observer'\nimport AutoSizer from 'react-virtualized-auto-sizer'\nimport {\n TreeWalker,\n TreeWalkerValue,\n VariableSizeNodeData,\n VariableSizeNodePublicState,\n VariableSizeTree,\n} from 'react-vtree'\nimport { NodeComponentProps } from 'react-vtree/dist/es/Tree'\nimport { EntityBadgeIcons } from '../../EntityBadgeIcons'\nimport { EntityTypeIcon } from '../../EntityIcon'\nimport { SynapseSpinner } from '../../LoadingScreen/LoadingScreen'\nimport { UserBadge } from '../../UserCard/UserBadge'\nimport { EntityFinderHeader } from '../EntityFinderHeader'\nimport { EntitySelectionMapType } from '../useEntitySelection'\n\nexport enum EntityTreeNodeType {\n /** The tree component's appearance and interactions will facilitate selection. Nodes will be larger and styles will indicate primary selection */\n SINGLE_PANE,\n /** The tree component's appearance and interactions will facilitate browsing. Nodes will be smaller and styles will indicate secondary selection */\n DUAL_PANE,\n}\n\ntype NodeChildren = Readonly<{\n /** The node's children. If undefined, then children have not been fetched. */\n children?: EntityHeaderNode[]\n /** The token used to fetch the next page of children for this entity. If this property is nullish and children is defined, then all children have been fetched. */\n childrenNextPageToken?: string | null\n}>\n\nexport type EntityHeaderNode = (\n | EntityFinderHeader\n // Only will have a subset of fields if the node is fetched via the entity path:\n | Pick<EntityFinderHeader, 'id' | 'name' | 'type'>\n) &\n NodeChildren\ntype PaginationNode = { __paginationNode: true }\n\ntype TreeNode = EntityHeaderNode | RootNodeConfiguration | PaginationNode\n\nfunction getTreeNodeType(\n node: TreeNode,\n): 'entityHeader' | 'rootNodeConfiguration' | 'pagination' {\n if ('__paginationNode' in node) {\n return 'pagination'\n }\n return 'id' in node ? 'entityHeader' : 'rootNodeConfiguration'\n}\n\nfunction isPaginationNode(node: TreeNode): node is PaginationNode {\n return getTreeNodeType(node) === 'pagination'\n}\n\nfunction isEntityHeaderNode(node: TreeNode): node is EntityHeaderNode {\n return getTreeNodeType(node) === 'entityHeader'\n}\n\nfunction isRootNodeConfiguration(\n node: TreeNode,\n): node is RootNodeConfiguration {\n return getTreeNodeType(node) === 'rootNodeConfiguration'\n}\n\nfunction hasMoreChildren(node: TreeNode) {\n if (isPaginationNode(node)) {\n return false\n } else if (isRootNodeConfiguration(node)) {\n return node.hasNextPage\n }\n\n return node.children == null || node.childrenNextPageToken != null\n}\n\nfunction isLeafNode(node: TreeNode) {\n if (isPaginationNode(node)) {\n return true\n } else if (isRootNodeConfiguration(node)) {\n return false\n } else {\n return (\n // Entity is not a container\n !isContainerType(getEntityTypeFromHeader(node)) ||\n // OR Children have been fetched (nonnull) and there are 0 children\n (node.children != null && node.children.length === 0)\n )\n }\n}\n\nfunction maybeHasChildren(\n node: TreeNode,\n): node is RootNodeConfiguration | EntityHeaderNode {\n if (isPaginationNode(node)) {\n return false\n } else if (isRootNodeConfiguration(node)) {\n return node.children.length > 0 || node.hasNextPage\n } else {\n return !isLeafNode(node)\n }\n}\n\nexport type TreeData = VariableSizeNodeData &\n Readonly<{\n node: TreeNode\n getNextPageOfChildren: () => Promise<void>\n isLeaf: boolean\n nestingLevel: number\n setSelectedId: (entityId: string) => void\n treeNodeType: EntityTreeNodeType\n isSelected: boolean\n isDisabled: boolean\n }>\n\ntype NodeMeta = Readonly<{\n nestingLevel: number\n node: TreeNode\n}>\n\nexport type RootNodeConfiguration = {\n show: boolean\n nodeText: string\n children: EntityHeaderNode[]\n /** If undefined, no more entities to fetch */\n fetchNextPage: () => Promise<void>\n hasNextPage: boolean\n}\n\n/**\n * Converts a TreeNode and related data into a TreeWalkerValue that react-vtree can use to render the tree.\n * Exported for testing purposes only.\n * @param config\n * @returns\n */\nexport const getNodeData = (config: {\n node: TreeNode\n nestingLevel: number\n getNextPageOfChildren: () => Promise<void>\n setSelectedId: (entityId: string) => void\n treeNodeType: EntityTreeNodeType\n selected: EntitySelectionMapType\n selectableTypes: EntityType[]\n autoExpand: (entityId: string) => boolean\n defaultHeight: number\n currentContainer?: string | 'root' | null\n}): TreeWalkerValue<TreeData, NodeMeta> => {\n const {\n node,\n nestingLevel,\n getNextPageOfChildren,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n defaultHeight,\n currentContainer,\n } = config\n\n if (isPaginationNode(node)) {\n throw new Error('Cannot create data for a pagination node')\n }\n\n const id = isRootNodeConfiguration(node) ? 'root' : node.id\n\n const isSelected =\n treeNodeType === EntityTreeNodeType.SINGLE_PANE\n ? selected.has(id)\n : currentContainer === id\n const isDisabled =\n !isRootNodeConfiguration(node) &&\n !selectableTypes.includes(getEntityTypeFromHeader(node))\n\n const isOpenByDefault = autoExpand(id)\n /*\n * If the node is open by default and we haven't fetched its children,\n * fetch the first page (otherwise we won't fetch unless re-toggled)\n */\n if (isOpenByDefault && node.children == null && hasMoreChildren(node)) {\n getNextPageOfChildren()\n }\n\n return {\n data: {\n node,\n getNextPageOfChildren,\n id: id,\n isLeaf: isLeafNode(node),\n isOpenByDefault: isOpenByDefault,\n nestingLevel,\n setSelectedId,\n treeNodeType,\n isSelected,\n isDisabled,\n defaultHeight,\n },\n nestingLevel,\n node,\n }\n}\n\n/**\n * Node component for the react-vtree virtualized tree. Exported only for testing purposes\n */\nexport function Node(\n props: NodeComponentProps<TreeData, VariableSizeNodePublicState<TreeData>>,\n) {\n const {\n data: {\n node,\n getNextPageOfChildren,\n isLeaf,\n id,\n nestingLevel,\n setSelectedId,\n treeNodeType,\n isSelected,\n isDisabled,\n },\n isOpen,\n style,\n setOpen,\n } = props\n\n const [isLoading, setLoading] = useState(false)\n\n const nodeText = isEntityHeaderNode(node) ? (\n <span>{node.name}</span>\n ) : isRootNodeConfiguration(node) ? (\n <span>{node.nodeText}</span>\n ) : (\n // Pagination node\n <Skeleton width={100} />\n )\n\n // We only use this for pagination nodes. If the pagination node comes into view, then immediately call `getNextPageOfChildren`\n const { ref, inView } = useInView()\n\n useEffect(() => {\n if (isPaginationNode(node) && inView) {\n getNextPageOfChildren()\n }\n }, [node, inView, getNextPageOfChildren])\n\n const toggleExpand = useCallback(async () => {\n if (hasMoreChildren(node)) {\n setLoading(true)\n await getNextPageOfChildren()\n await setOpen(!isOpen)\n setLoading(false)\n } else {\n await setOpen(!isOpen)\n }\n }, [getNextPageOfChildren, node, isOpen, setOpen])\n\n /**\n * If in the dual-pane view, expand a node when it becomes selected\n */\n useEffect(() => {\n if (\n treeNodeType === EntityTreeNodeType.DUAL_PANE &&\n isSelected &&\n !isOpen\n ) {\n toggleExpand()\n }\n // Intentionally only toggle the expanded state when isSelected changes, otherwise the node cannot be un-expanded\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, [isSelected])\n\n /**\n * If the height is 0, the node is purposefully hidden. Just render a fragment.\n */\n if ('height' in style && style.height === 0) {\n return <></>\n }\n\n let tooltipContent: ReactNode = ''\n if (isEntityHeaderNode(node)) {\n tooltipContent = (\n <div style={{ textAlign: 'center' }}>\n <Typography\n component=\"span\"\n variant=\"smallText1\"\n sx={{\n display: 'inline',\n }}\n >\n {node.name}\n <br />\n <b>ID: </b>\n {node.id}\n {'modifiedBy' in node && (\n <>\n <br />\n <b>Modified By: </b>\n <UserBadge\n userId={node.modifiedBy.toString()}\n showFullName\n disableLink\n showCardOnHover={false}\n />\n </>\n )}\n {'modifiedOn' in node && (\n <>\n <br />\n <b>Modified On: </b>\n {formatDate(dayjs(node.modifiedOn))}\n </>\n )}\n </Typography>\n </div>\n )\n }\n\n const ExpandIcon = isOpen ? ExpandMore : ChevronRight\n\n return (\n <div\n className={`Node ${\n treeNodeType === EntityTreeNodeType.SINGLE_PANE\n ? 'SelectNode'\n : 'BrowseNode'\n }`}\n aria-selected={isSelected}\n aria-disabled={isDisabled}\n onClick={event => {\n event.stopPropagation()\n if (!isDisabled) {\n setSelectedId(id)\n }\n }}\n style={{\n ...style,\n paddingLeft: `${nestingLevel * 20}px`,\n }}\n >\n {!isLeaf && (\n <>\n {isLoading ? (\n <SynapseSpinner size={10} />\n ) : (\n <button\n aria-label={isOpen ? 'Collapse' : 'Expand'}\n onClick={event => {\n event.stopPropagation()\n toggleExpand()\n }}\n >\n <ExpandIcon className=\"ExpandButton\" />\n </button>\n )}\n </>\n )}\n {treeNodeType === EntityTreeNodeType.SINGLE_PANE && ( // SWC-5592\n <div className=\"EntityIcon\">\n {isEntityHeaderNode(node) && (\n <EntityTypeIcon type={getEntityTypeFromHeader(node)} />\n )}\n </div>\n )}\n\n <Tooltip title={tooltipContent} placement=\"right\">\n <div className=\"EntityName\" ref={ref}>\n {nodeText}\n </div>\n </Tooltip>\n\n {treeNodeType === EntityTreeNodeType.SINGLE_PANE && (\n <EntityBadgeIcons\n entityId={id}\n showHasDiscussionThread={false}\n showHasWiki={false}\n showUnlink={false}\n canOpenModal={false}\n />\n )}\n </div>\n )\n}\n\n/**\n * Extracted from the React component for testing purposes\n * @returns a generator function compatible with react-vtree\n */\nexport function getTreeWalkerFunction(\n rootNode: RootNodeConfiguration,\n setSelectedId: VirtualizedTreeProps['setSelectedId'],\n treeNodeType: VirtualizedTreeProps['treeNodeType'],\n selected: VirtualizedTreeProps['selected'],\n selectableTypes: VirtualizedTreeProps['selectableTypes'],\n autoExpand: VirtualizedTreeProps['autoExpand'],\n itemSize: (index?: number) => number,\n currentContainer: VirtualizedTreeProps['currentContainer'],\n fetchNextPageOfChildren: (node: Writable<EntityHeaderNode>) => Promise<void>,\n): TreeWalker<TreeData, NodeMeta> {\n return function* treeWalker() {\n // Step [1]: Define the root node of our tree.\n yield getNodeData({\n node: rootNode,\n nestingLevel: 0,\n getNextPageOfChildren: rootNode.fetchNextPage,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n defaultHeight: itemSize(),\n currentContainer,\n })\n\n while (true) {\n // Step [2]: Get the parent node and nesting level, which will be passed into the Generator.next function by react-vtree.\n // Yielding `undefined` indicates to react-vtree that we've finished iterating children from the last time we were in the loop.\n const parentMeta = yield\n\n if (maybeHasChildren(parentMeta.node)) {\n // Step [3]: Yielding all the known children of the parent\n if (parentMeta.node.children) {\n for (let i = 0; i < parentMeta.node.children.length; i++) {\n const childNode = parentMeta.node.children[i]\n\n yield getNodeData({\n node: childNode,\n nestingLevel: parentMeta.nestingLevel + 1,\n getNextPageOfChildren: () => fetchNextPageOfChildren(childNode),\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n defaultHeight: itemSize(),\n currentContainer,\n })\n }\n }\n\n // Step [4] - If the parent node has more children, render a \"pagination node\" that will fetch more children when it comes into view (via intersection observer)\n if (hasMoreChildren(parentMeta.node)) {\n const paginationNode: PaginationNode = {\n __paginationNode: true,\n }\n const paginationTreeWalkerValue: TreeWalkerValue<TreeData, NodeMeta> =\n {\n data: {\n id: parentMeta.data.id + '-pagination',\n node: paginationNode,\n isOpenByDefault: false,\n getNextPageOfChildren: parentMeta.data.getNextPageOfChildren,\n isLeaf: true,\n isSelected: false,\n defaultHeight: itemSize(),\n isDisabled: true,\n nestingLevel: parentMeta.nestingLevel + 1,\n setSelectedId: () => {},\n treeNodeType,\n },\n nestingLevel: parentMeta.nestingLevel + 1,\n node: {\n __paginationNode: true,\n },\n }\n yield paginationTreeWalkerValue\n }\n }\n }\n }\n}\n\nexport type VirtualizedTreeProps = Readonly<{\n treeNodeType: EntityTreeNodeType\n rootNodeConfiguration: RootNodeConfiguration\n setSelectedId: (entityId: string) => void\n selected: EntitySelectionMapType\n /* currentContainer is the container whose contents are shown on in the right pane in dual-pane configuration, and may only be defined when treeNodeType is DUAL_PANE */\n currentContainer?: string | 'root' | null\n autoExpand: (entityId: string) => boolean\n selectableTypes: EntityType[]\n visibleTypes: EntityType[]\n}>\n\n/**\n * Component that utilizes react-vtree to efficiently display a tree of entities. react-vtree utilizes react-window\n * to only render visible nodes, which eliminates performance issues as seen in SWC-5978.\n */\nexport const VirtualizedTree = (\n props: VirtualizedTreeProps,\n): React.ReactNode => {\n const {\n rootNodeConfiguration,\n setSelectedId,\n treeNodeType,\n selected,\n currentContainer,\n selectableTypes,\n visibleTypes,\n autoExpand,\n } = props\n\n const { accessToken, keyFactory } = useSynapseContext()\n const queryClient = useQueryClient()\n\n const [rootNode, setRootNode] = useState<RootNodeConfiguration>(\n rootNodeConfiguration,\n )\n\n const treeInstance = useRef<VariableSizeTree<TreeData>>(null)\n\n useEffect(() => {\n setRootNode(rootNodeConfiguration)\n }, [rootNodeConfiguration, rootNodeConfiguration.children])\n\n // This function is used by VariableSizeTree to identify the size of each node in the tree.\n const itemSize = useCallback(\n (index?: number) => {\n /**\n * We must have a root node, but we don't always want to show it.\n * In those cases, set the height of the root node to 0.\n */\n if (index === 0 && !rootNodeConfiguration.show) {\n return 0\n }\n /**\n * The height of all other nodes in the tree varies depending on the tree node type.\n */\n return treeNodeType === EntityTreeNodeType.DUAL_PANE ? 30 : 60\n },\n [treeNodeType, rootNodeConfiguration.show],\n )\n\n /**\n * Fetches the next page of children for a given node. After fetching the children, this method will make a deep clone of the\n * full tree, including the new data, and updates the state of the component\n */\n const fetchNextPageOfChildren = useCallback(\n // Because we update the root node with a copy at the end of this function, we can write to the node under update.\n async (node: Writable<EntityHeaderNode>) => {\n // Fetch the children of the node\n const entityChildrenRequest: EntityChildrenRequest = {\n parentId: node.id,\n nextPageToken: node.childrenNextPageToken,\n includeTypes: visibleTypes,\n }\n const children = await queryClient.fetchQuery({\n queryKey: keyFactory.getEntityChildrenQueryKey(\n entityChildrenRequest,\n false,\n ),\n queryFn: () => getEntityChildren(entityChildrenRequest, accessToken),\n })\n // Update the node data -- add the children and store the nextPageToken\n if (node.children) {\n for (const newChild of children.page) {\n // SWC-6751 - Prevent adding duplicate entries in case this function is called twice\n if (!node.children.find(child => child.id == newChild.id)) {\n node.children.push(newChild)\n }\n }\n } else {\n node.children = children.page\n }\n node.childrenNextPageToken = children.nextPageToken\n\n // Ensure the node for which we fetched children is expanded/open\n if (treeInstance.current) {\n await treeInstance.current.recomputeTree({\n [node.id]: {\n open: true,\n },\n })\n }\n\n // cloneDeep is required to re-render the tree with the new children\n setRootNode(cloneDeep(rootNode))\n },\n [visibleTypes, queryClient, keyFactory, rootNode, accessToken],\n )\n\n /**\n * treeWalker is a generator function used by react-vtree to generate the tree structure. The tree is re-built when the function is updated,\n * so the dependencies specified in useCallback are important.\n */\n const memoizedTreeWalker = useCallback(\n getTreeWalkerFunction(\n rootNode,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n itemSize,\n currentContainer,\n fetchNextPageOfChildren,\n ),\n [\n rootNode,\n setSelectedId,\n treeNodeType,\n selected,\n selectableTypes,\n autoExpand,\n currentContainer,\n fetchNextPageOfChildren,\n itemSize,\n ],\n )\n\n return (\n <AutoSizer disableWidth>\n {({ height }: { height: number }) => (\n <VariableSizeTree\n ref={treeInstance}\n treeWalker={memoizedTreeWalker}\n itemSize={itemSize}\n height={height}\n async={true}\n width=\"100%\"\n >\n {Node}\n </VariableSizeTree>\n )}\n </AutoSizer>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,cAAA,KAAA,eAEA,EAAA,EAAA,YAAA,KAAA;AACF,EAAA,CAAA,CAAA;AAmBA,SAAS,EACP,GACyD;CAIzD,OAHI,sBAAsB,IACjB,eAEF,QAAQ,IAAO,iBAAiB;AACzC;AAEA,SAAS,EAAiB,GAAwC;CAChE,OAAO,EAAgB,CAAI,MAAM;AACnC;AAEA,SAAS,EAAmB,GAA0C;CACpE,OAAO,EAAgB,CAAI,MAAM;AACnC;AAEA,SAAS,EACP,GAC+B;CAC/B,OAAO,EAAgB,CAAI,MAAM;AACnC;AAEA,SAAS,EAAgB,GAAgB;CAOvC,OANI,EAAiB,CAAI,IAChB,KACE,EAAwB,CAAI,IAC9B,EAAK,cAGP,EAAK,YAAY,QAAQ,EAAK,y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AAK,CAAQ;OAI/B,EAAK,WAAW,EAAS;EAc3B,AAZA,EAAK,wBAAwB,EAAS,eAGlC,EAAa,WACf,MAAM,EAAa,QAAQ,cAAc,GACtC,EAAK,KAAK,EACT,MAAM,GACR,EACF,CAAC,GAIH,EAAY,EAAU,CAAQ,CAAC;CACjC,GACA;EAAC;EAAc;EAAa;EAAY;EAAU;CAAW,CAC/D,GAMM,IAAqB,EACzB,EACE,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,CACF,GACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAEA,OACE,kBAAC,GAAD;EAAW,cAAA;aACP,EAAE,gBACF,kBAAC,GAAD;GACE,KAAK;GACL,YAAY;GACF;GACF;GACR,OAAO;GACP,OAAM;aAEL;EACe,CAAA;CAEX,CAAA;AAEf"}
@@ -7,6 +7,7 @@ type EntityTypeIconProps = {
7
7
  className?: string;
8
8
  includeTooltip?: boolean;
9
9
  wrap?: boolean;
10
+ variant?: 'twoTone' | 'outlined';
10
11
  };
11
12
  export declare function EntityTypeIcon(props: Omit<IconSvgProps, 'icon'> & EntityTypeIconProps): import("react/jsx-runtime").JSX.Element;
12
13
  export default EntityTypeIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"EntityIcon.d.ts","sourceRoot":"","sources":["../../src/components/EntityIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAY,MAAM,OAAO,CAAA;AAC/C,OAAgB,EAEd,YAAY,EAEb,MAAM,mBAAmB,CAAA;AAwB1B,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,mBAAmB,2CA6BxD;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"EntityIcon.d.ts","sourceRoot":"","sources":["../../src/components/EntityIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAY,MAAM,OAAO,CAAA;AAC/C,OAAgB,EAEd,YAAY,EAGb,MAAM,mBAAmB,CAAA;AA6B1B,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;CACjC,CAAA;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,mBAAmB,2CA8BxD;AAED,eAAe,cAAc,CAAA"}
@@ -1,51 +1,52 @@
1
1
  import { entityTypeToFriendlyName as e } from "../utils/functions/EntityTypeUtils.js";
2
- import t, { type2SvgIconName as n } from "./IconSvg/IconSvg.js";
3
- import { Fragment as r } from "react";
4
- import { Fragment as i, jsx as a } from "react/jsx-runtime";
5
- import { EntityType as o } from "@sage-bionetworks/synapse-client";
2
+ import t, { type2SvgIconName as n, type2SvgIconNameOutlined as r } from "./IconSvg/IconSvg.js";
3
+ import { Fragment as i } from "react";
4
+ import { Fragment as a, jsx as o } from "react/jsx-runtime";
5
+ import { EntityType as s } from "@sage-bionetworks/synapse-client";
6
6
  //#region src/components/EntityIcon.tsx
7
- var s = (e) => {
7
+ var c = (e, t = "twoTone") => {
8
+ let i = t === "outlined" ? r : n;
8
9
  switch (e) {
9
- case o.project:
10
- case o.folder:
11
- case o.file:
12
- case o.table:
13
- case o.link:
14
- case o.entityview:
15
- case o.dockerrepo:
16
- case o.submissionview:
17
- case o.dataset:
18
- case o.datasetcollection:
19
- case o.materializedview:
20
- case o.virtualtable:
21
- case o.recordset:
22
- case o.searchindex: return n[e];
10
+ case s.project:
11
+ case s.folder:
12
+ case s.file:
13
+ case s.table:
14
+ case s.link:
15
+ case s.entityview:
16
+ case s.dockerrepo:
17
+ case s.submissionview:
18
+ case s.dataset:
19
+ case s.datasetcollection:
20
+ case s.materializedview:
21
+ case s.virtualtable:
22
+ case s.recordset:
23
+ case s.searchindex: return i[e];
23
24
  default: return "";
24
25
  }
25
26
  };
26
- function c(n) {
27
- let { type: o, style: c, className: l, includeTooltip: u = !0, wrap: d = !0, ...f } = n;
28
- if (!o) return /* @__PURE__ */ a(i, {});
29
- let p = s(o);
30
- if (p === "") return console.warn("Could not retrieve icon for Entity with type: ", o), /* @__PURE__ */ a(r, {});
31
- let m = u ? e(o) : void 0;
32
- return d ? /* @__PURE__ */ a("span", {
33
- style: c,
27
+ function l(n) {
28
+ let { type: r, style: s, className: l, includeTooltip: u = !0, wrap: d = !0, variant: f = "twoTone", ...p } = n;
29
+ if (!r) return /* @__PURE__ */ o(a, {});
30
+ let m = c(r, f);
31
+ if (m === "") return console.warn("Could not retrieve icon for Entity with type: ", r), /* @__PURE__ */ o(i, {});
32
+ let h = u ? e(r) : void 0;
33
+ return d ? /* @__PURE__ */ o("span", {
34
+ style: s,
34
35
  className: l,
35
- children: /* @__PURE__ */ a(t, {
36
- icon: p,
37
- label: m,
36
+ children: /* @__PURE__ */ o(t, {
37
+ icon: m,
38
+ label: h,
38
39
  wrap: d,
39
- ...f
40
+ ...p
40
41
  })
41
- }) : /* @__PURE__ */ a(t, {
42
- icon: p,
43
- label: m,
42
+ }) : /* @__PURE__ */ o(t, {
43
+ icon: m,
44
+ label: h,
44
45
  wrap: d,
45
- ...f
46
+ ...p
46
47
  });
47
48
  }
48
49
  //#endregion
49
- export { c as EntityTypeIcon, c as default };
50
+ export { l as EntityTypeIcon, l as default };
50
51
 
51
52
  //# sourceMappingURL=EntityIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityIcon.js","names":[],"sources":["../../src/components/EntityIcon.tsx"],"sourcesContent":["import { entityTypeToFriendlyName } from '@/utils/functions/EntityTypeUtils'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport { CSSProperties, Fragment } from 'react'\nimport IconSvg, {\n IconName,\n IconSvgProps,\n type2SvgIconName,\n} from './IconSvg/IconSvg'\n\nconst getIconTypeForEntity = (type: EntityType): IconName | '' => {\n switch (type) {\n case EntityType.project:\n case EntityType.folder:\n case EntityType.file:\n case EntityType.table:\n case EntityType.link:\n case EntityType.entityview:\n case EntityType.dockerrepo:\n case EntityType.submissionview:\n case EntityType.dataset:\n case EntityType.datasetcollection:\n case EntityType.materializedview:\n case EntityType.virtualtable:\n case EntityType.recordset:\n case EntityType.searchindex:\n return type2SvgIconName[type]\n default:\n return ''\n }\n}\n\ntype EntityTypeIconProps = {\n type: EntityType\n style?: CSSProperties\n className?: string\n includeTooltip?: boolean\n wrap?: boolean\n}\n\nexport function EntityTypeIcon(\n props: Omit<IconSvgProps, 'icon'> & EntityTypeIconProps,\n) {\n const {\n type,\n style,\n className,\n includeTooltip = true,\n wrap = true,\n ...rest\n } = props\n if (!type) {\n return <></>\n }\n const iconType = getIconTypeForEntity(type)\n if (iconType === '') {\n console.warn('Could not retrieve icon for Entity with type: ', type)\n return <Fragment />\n }\n\n const label = includeTooltip ? entityTypeToFriendlyName(type) : undefined\n\n if (wrap) {\n return (\n <span style={style} className={className}>\n <IconSvg icon={iconType} label={label} wrap={wrap} {...rest} />\n </span>\n )\n }\n return <IconSvg icon={iconType} label={label} wrap={wrap} {...rest} />\n}\n\nexport default EntityTypeIcon\n"],"mappings":";;;;;;AASA,IAAM,KAAwB,MAAoC;CAChE,QAAQ,GAAR;EACE,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW,aACd,OAAO,EAAiB;EAC1B,SACE,OAAO;CACX;AACF;AAUA,SAAgB,EACd,GACA;CACA,IAAM,EACJ,SACA,UACA,cACA,oBAAiB,IACjB,UAAO,IACP,GAAG,MACD;CACJ,IAAI,CAAC,GACH,OAAO,kBAAA,GAAA,CAAI,CAAA;CAEb,IAAM,IAAW,EAAqB,CAAI;CAC1C,IAAI,MAAa,IAEf,OADA,QAAQ,KAAK,kDAAkD,CAAI,GAC5D,kBAAC,GAAD,CAAW,CAAA;CAGpB,IAAM,IAAQ,IAAiB,EAAyB,CAAI,IAAI,KAAA;CAShE,OAPI,IAEA,kBAAC,QAAD;EAAa;EAAkB;YAC7B,kBAAC,GAAD;GAAS,MAAM;GAAiB;GAAa;GAAM,GAAI;EAAO,CAAA;CAC1D,CAAA,IAGH,kBAAC,GAAD;EAAS,MAAM;EAAiB;EAAa;EAAM,GAAI;CAAO,CAAA;AACvE"}
1
+ {"version":3,"file":"EntityIcon.js","names":[],"sources":["../../src/components/EntityIcon.tsx"],"sourcesContent":["import { entityTypeToFriendlyName } from '@/utils/functions/EntityTypeUtils'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport { CSSProperties, Fragment } from 'react'\nimport IconSvg, {\n IconName,\n IconSvgProps,\n type2SvgIconName,\n type2SvgIconNameOutlined,\n} from './IconSvg/IconSvg'\n\nconst getIconTypeForEntity = (\n type: EntityType,\n variant: 'twoTone' | 'outlined' = 'twoTone',\n): IconName | '' => {\n const map =\n variant === 'outlined' ? type2SvgIconNameOutlined : type2SvgIconName\n switch (type) {\n case EntityType.project:\n case EntityType.folder:\n case EntityType.file:\n case EntityType.table:\n case EntityType.link:\n case EntityType.entityview:\n case EntityType.dockerrepo:\n case EntityType.submissionview:\n case EntityType.dataset:\n case EntityType.datasetcollection:\n case EntityType.materializedview:\n case EntityType.virtualtable:\n case EntityType.recordset:\n case EntityType.searchindex:\n return map[type]\n default:\n return ''\n }\n}\n\ntype EntityTypeIconProps = {\n type: EntityType\n style?: CSSProperties\n className?: string\n includeTooltip?: boolean\n wrap?: boolean\n variant?: 'twoTone' | 'outlined'\n}\n\nexport function EntityTypeIcon(\n props: Omit<IconSvgProps, 'icon'> & EntityTypeIconProps,\n) {\n const {\n type,\n style,\n className,\n includeTooltip = true,\n wrap = true,\n variant = 'twoTone',\n ...rest\n } = props\n if (!type) {\n return <></>\n }\n const iconType = getIconTypeForEntity(type, variant)\n if (iconType === '') {\n console.warn('Could not retrieve icon for Entity with type: ', type)\n return <Fragment />\n }\n\n const label = includeTooltip ? entityTypeToFriendlyName(type) : undefined\n\n if (wrap) {\n return (\n <span style={style} className={className}>\n <IconSvg icon={iconType} label={label} wrap={wrap} {...rest} />\n </span>\n )\n }\n return <IconSvg icon={iconType} label={label} wrap={wrap} {...rest} />\n}\n\nexport default EntityTypeIcon\n"],"mappings":";;;;;;AAUA,IAAM,KACJ,GACA,IAAkC,cAChB;CAClB,IAAM,IACJ,MAAY,aAAa,IAA2B;CACtD,QAAQ,GAAR;EACE,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW;EAChB,KAAK,EAAW,aACd,OAAO,EAAI;EACb,SACE,OAAO;CACX;AACF;AAWA,SAAgB,EACd,GACA;CACA,IAAM,EACJ,SACA,UACA,cACA,oBAAiB,IACjB,UAAO,IACP,aAAU,WACV,GAAG,MACD;CACJ,IAAI,CAAC,GACH,OAAO,kBAAA,GAAA,CAAI,CAAA;CAEb,IAAM,IAAW,EAAqB,GAAM,CAAO;CACnD,IAAI,MAAa,IAEf,OADA,QAAQ,KAAK,kDAAkD,CAAI,GAC5D,kBAAC,GAAD,CAAW,CAAA;CAGpB,IAAM,IAAQ,IAAiB,EAAyB,CAAI,IAAI,KAAA;CAShE,OAPI,IAEA,kBAAC,QAAD;EAAa;EAAkB;YAC7B,kBAAC,GAAD;GAAS,MAAM;GAAiB;GAAa;GAAM,GAAI;EAAO,CAAA;CAC1D,CAAA,IAGH,kBAAC,GAAD;EAAS,MAAM;EAAiB;EAAa;EAAM,GAAI;CAAO,CAAA;AACvE"}
@@ -0,0 +1 @@
1
+ ._panel_1l7xd_1{flex-direction:column;display:flex;position:relative}._content_1l7xd_7{width:320px;margin-top:40px;padding:0 32px 0 0}@media (width<=1024px){._content_1l7xd_7{width:100%;margin-top:10px;padding:10px 32px 0}}._sidebarHeader_1l7xd_20.MuiTypography-root{color:#616972;font-size:14px;font-weight:540;line-height:20px}._divider_1l7xd_27{margin-top:8px;margin-bottom:16px}._propertyValue_1l7xd_32.MuiTypography-root{color:#4d535a;font-style:normal;font-weight:440;line-height:20px}._propertyTitle_1l7xd_39.MuiTypography-root{color:#747d88;font-size:12px;line-height:12px}._propertiesContainer_1l7xd_45{gap:12px;padding:12px 0}._propertyRow_1l7xd_50{gap:4px}._toggleButton_1l7xd_54.MuiButtonBase-root{white-space:nowrap;flex-direction:row;align-self:flex-start;gap:8px;display:flex;position:absolute;top:0;right:0}@media (width<=1024px){._toggleButton_1l7xd_54.MuiButtonBase-root{margin:10px 0 0 20px;position:static}}._toggleButton_1l7xd_54.MuiButtonBase-root:hover{text-decoration:none}._toggleButtonText_1l7xd_74.MuiTypography-root{color:#616972;font-weight:440;line-height:20px}._icon_1l7xd_80{color:#616972}
@@ -0,0 +1,7 @@
1
+ type EntitySidebarProps = {
2
+ entityId: string;
3
+ versionNumber?: number;
4
+ };
5
+ export default function EntitySidebar(props: EntitySidebarProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=EntitySidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntitySidebar.d.ts","sourceRoot":"","sources":["../../../src/components/EntitySidebar/EntitySidebar.tsx"],"names":[],"mappings":"AAkBA,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAiE9D"}
@@ -0,0 +1,62 @@
1
+ import { entityTypeToFriendlyName as e } from "../../utils/functions/EntityTypeUtils.js";
2
+ import t from "../../utils/hooks/useGetEntityMetadata.js";
3
+ import { useGetEntityTitleBarProperties as n } from "../entity/page/title_bar/useGetEntityTitleBarProperties.js";
4
+ import r from "./EntitySidebar.module.js";
5
+ import { useState as i } from "react";
6
+ import { Box as a, Button as o, Collapse as s, Divider as c, Stack as l, Typography as u, useMediaQuery as d, useTheme as f } from "@mui/material";
7
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ import h from "@mui/icons-material/KeyboardDoubleArrowRight";
9
+ import g from "@mui/icons-material/KeyboardDoubleArrowLeft";
10
+ //#region src/components/EntitySidebar/EntitySidebar.tsx
11
+ function _(_) {
12
+ let { entityId: v, versionNumber: y } = _, b = d(f().breakpoints.down("lg")), { entityBundle: x } = t(v, y), S = x ? e(x.entityType) : "", C = n(v, y), [w, T] = i(!0), E = /* @__PURE__ */ m(a, {
13
+ className: r.content,
14
+ children: [
15
+ /* @__PURE__ */ m(u, {
16
+ variant: "overline",
17
+ className: r.sidebarHeader,
18
+ children: ["About this ", S]
19
+ }),
20
+ /* @__PURE__ */ p(c, { className: r.divider }),
21
+ /* @__PURE__ */ p(l, {
22
+ className: r.propertiesContainer,
23
+ children: C.map((e) => /* @__PURE__ */ m(l, {
24
+ className: r.propertyRow,
25
+ children: [/* @__PURE__ */ p(u, {
26
+ className: r.propertyTitle,
27
+ children: e.title
28
+ }), /* @__PURE__ */ p(u, {
29
+ className: r.propertyValue,
30
+ variant: "smallText1",
31
+ component: "div",
32
+ children: e.value
33
+ })]
34
+ }, e.key))
35
+ })
36
+ ]
37
+ });
38
+ return /* @__PURE__ */ m(a, {
39
+ className: r.panel,
40
+ children: [/* @__PURE__ */ m(o, {
41
+ onClick: () => T((e) => !e),
42
+ className: r.toggleButton,
43
+ children: [/* @__PURE__ */ m(u, {
44
+ variant: "smallText1",
45
+ className: r.toggleButtonText,
46
+ children: [w ? "Collapse" : "Expand", " Sidebar"]
47
+ }), p(w ? h : g, { className: r.icon })]
48
+ }), /* @__PURE__ */ p(s, {
49
+ in: w,
50
+ orientation: b ? "vertical" : "horizontal",
51
+ timeout: {
52
+ enter: 200,
53
+ exit: 200
54
+ },
55
+ children: E
56
+ })]
57
+ });
58
+ }
59
+ //#endregion
60
+ export { _ as default };
61
+
62
+ //# sourceMappingURL=EntitySidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntitySidebar.js","names":[],"sources":["../../../src/components/EntitySidebar/EntitySidebar.tsx"],"sourcesContent":["import { useState } from 'react'\nimport KeyboardDoubleArrowRightIcon from '@mui/icons-material/KeyboardDoubleArrowRight'\nimport KeyboardDoubleArrowLeftIcon from '@mui/icons-material/KeyboardDoubleArrowLeft'\nimport {\n Box,\n Button,\n Divider,\n Collapse,\n Stack,\n Typography,\n useMediaQuery,\n useTheme,\n} from '@mui/material'\nimport { useGetEntityTitleBarProperties } from '@/components/entity/page/title_bar/useGetEntityTitleBarProperties'\nimport styles from './EntitySidebar.module.scss'\nimport useGetEntityMetadata from '@/utils/hooks/useGetEntityMetadata'\nimport { entityTypeToFriendlyName } from '@/utils/functions/EntityTypeUtils'\n\ntype EntitySidebarProps = {\n entityId: string\n versionNumber?: number\n}\n\nexport default function EntitySidebar(props: EntitySidebarProps) {\n const { entityId, versionNumber } = props\n\n const theme = useTheme()\n const isMobile = useMediaQuery(theme.breakpoints.down('lg'))\n\n const { entityBundle } = useGetEntityMetadata(entityId, versionNumber)\n\n const friendlyName = entityBundle\n ? entityTypeToFriendlyName(entityBundle.entityType)\n : ''\n\n const properties = useGetEntityTitleBarProperties(entityId, versionNumber)\n\n const [open, setOpen] = useState(true)\n\n const sidebarContent = (\n <Box className={styles.content}>\n <Typography variant=\"overline\" className={styles.sidebarHeader}>\n About this {friendlyName}\n </Typography>\n <Divider className={styles.divider} />\n <Stack className={styles.propertiesContainer}>\n {properties.map(property => (\n <Stack key={property.key} className={styles.propertyRow}>\n <Typography className={styles.propertyTitle}>\n {property.title}\n </Typography>\n <Typography\n className={styles.propertyValue}\n variant=\"smallText1\"\n component=\"div\"\n >\n {property.value}\n </Typography>\n </Stack>\n ))}\n </Stack>\n </Box>\n )\n\n return (\n <Box className={styles.panel}>\n <Button\n onClick={() => setOpen(prev => !prev)}\n className={styles.toggleButton}\n >\n <Typography variant=\"smallText1\" className={styles.toggleButtonText}>\n {open ? 'Collapse' : 'Expand'} Sidebar\n </Typography>\n {open ? (\n <KeyboardDoubleArrowRightIcon className={styles.icon} />\n ) : (\n <KeyboardDoubleArrowLeftIcon className={styles.icon} />\n )}\n </Button>\n <Collapse\n in={open}\n orientation={isMobile ? 'vertical' : 'horizontal'}\n timeout={{ enter: 200, exit: 200 }}\n >\n {sidebarContent}\n </Collapse>\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;AAuBA,SAAwB,EAAc,GAA2B;CAC/D,IAAM,EAAE,aAAU,qBAAkB,GAG9B,IAAW,EADH,EACiB,EAAM,YAAY,KAAK,IAAI,CAAC,GAErD,EAAE,oBAAiB,EAAqB,GAAU,CAAa,GAE/D,IAAe,IACjB,EAAyB,EAAa,UAAU,IAChD,IAEE,IAAa,EAA+B,GAAU,CAAa,GAEnE,CAAC,GAAM,KAAW,EAAS,EAAI,GAE/B,IACJ,kBAAC,GAAD;EAAK,WAAW,EAAO;YAAvB;GACE,kBAAC,GAAD;IAAY,SAAQ;IAAW,WAAW,EAAO;cAAjD,CAAgE,eAClD,CACF;;GACZ,kBAAC,GAAD,EAAS,WAAW,EAAO,QAAU,CAAA;GACrC,kBAAC,GAAD;IAAO,WAAW,EAAO;cACtB,EAAW,KAAI,MACd,kBAAC,GAAD;KAA0B,WAAW,EAAO;eAA5C,CACE,kBAAC,GAAD;MAAY,WAAW,EAAO;gBAC3B,EAAS;KACA,CAAA,GACZ,kBAAC,GAAD;MACE,WAAW,EAAO;MAClB,SAAQ;MACR,WAAU;gBAET,EAAS;KACA,CAAA,CACP;OAXK,EAAS,GAWd,CACR;GACI,CAAA;EACJ;;CAGP,OACE,kBAAC,GAAD;EAAK,WAAW,EAAO;YAAvB,CACE,kBAAC,GAAD;GACE,eAAe,GAAQ,MAAQ,CAAC,CAAI;GACpC,WAAW,EAAO;aAFpB,CAIE,kBAAC,GAAD;IAAY,SAAQ;IAAa,WAAW,EAAO;cAAnD,CACG,IAAO,aAAa,UAAS,UACpB;OAEV,EADD,IACE,IAEA,GAFD,EAA8B,WAAW,EAAO,KAAO,CAED,CAElD;MACR,kBAAC,GAAD;GACE,IAAI;GACJ,aAAa,IAAW,aAAa;GACrC,SAAS;IAAE,OAAO;IAAK,MAAM;GAAI;aAEhC;EACO,CAAA,CACP;;AAET"}
@@ -0,0 +1,17 @@
1
+ import './EntitySidebar.css';var e = {
2
+ panel: "_panel_1l7xd_1",
3
+ content: "_content_1l7xd_7",
4
+ sidebarHeader: "_sidebarHeader_1l7xd_20",
5
+ divider: "_divider_1l7xd_27",
6
+ propertyValue: "_propertyValue_1l7xd_32",
7
+ propertyTitle: "_propertyTitle_1l7xd_39",
8
+ propertiesContainer: "_propertiesContainer_1l7xd_45",
9
+ propertyRow: "_propertyRow_1l7xd_50",
10
+ toggleButton: "_toggleButton_1l7xd_54",
11
+ toggleButtonText: "_toggleButtonText_1l7xd_74",
12
+ icon: "_icon_1l7xd_80"
13
+ };
14
+ //#endregion
15
+ export { e as default };
16
+
17
+ //# sourceMappingURL=EntitySidebar.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntitySidebar.module.js","names":[],"sources":["../../../src/components/EntitySidebar/EntitySidebar.module.scss"],"sourcesContent":["$sidebar-text-primary: #616972;\n$sidebar-property-title-color: #747d88;\n$sidebar-property-value-color: #4d535a;\n@use 'sass:map';\n@use '../../style/abstracts/variables' as SrcVariables;\n\n.panel {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.content {\n width: 320px;\n margin-top: 40px;\n padding: 0 32px 0 0;\n\n @media (max-width: map.get(SrcVariables.$breakpoints, 'large')) {\n width: 100%;\n margin-top: 10px;\n padding: 10px 32px 0 32px;\n }\n}\n\n.sidebarHeader:global(.MuiTypography-root) {\n font-size: 14px;\n color: $sidebar-text-primary;\n font-weight: 540;\n line-height: 20px; /* 142.857% */\n}\n\n.divider {\n margin-top: 8px;\n margin-bottom: 16px;\n}\n\n.propertyValue:global(.MuiTypography-root) {\n color: $sidebar-property-value-color;\n font-style: normal;\n font-weight: 440;\n line-height: 20px; /* 142.857% */\n}\n\n.propertyTitle:global(.MuiTypography-root) {\n color: $sidebar-property-title-color;\n font-size: 12px;\n line-height: 12px; /* 100% */\n}\n\n.propertiesContainer {\n padding: 12px 0;\n gap: 12px;\n}\n\n.propertyRow {\n gap: 4px;\n}\n\n.toggleButton:global(.MuiButtonBase-root) {\n display: flex;\n flex-direction: row;\n gap: 8px;\n top: 0;\n right: 0;\n white-space: nowrap;\n align-self: flex-start;\n position: absolute;\n\n @media (max-width: map.get(SrcVariables.$breakpoints, 'large')) {\n position: static;\n margin: 10px 0 0 20px;\n }\n\n &:hover {\n text-decoration: none;\n }\n}\n\n.toggleButtonText:global(.MuiTypography-root) {\n color: $sidebar-text-primary;\n font-weight: 440;\n line-height: 20px; /* 142.857% */\n}\n\n.icon {\n color: $sidebar-text-primary;\n}\n"],"mappings":""}
@@ -0,0 +1,87 @@
1
+ $sidebar-text-primary: #616972;
2
+ $sidebar-property-title-color: #747d88;
3
+ $sidebar-property-value-color: #4d535a;
4
+ @use 'sass:map';
5
+ @use '../../style/abstracts/variables' as SrcVariables;
6
+
7
+ .panel {
8
+ display: flex;
9
+ flex-direction: column;
10
+ position: relative;
11
+ }
12
+
13
+ .content {
14
+ width: 320px;
15
+ margin-top: 40px;
16
+ padding: 0 32px 0 0;
17
+
18
+ @media (max-width: map.get(SrcVariables.$breakpoints, 'large')) {
19
+ width: 100%;
20
+ margin-top: 10px;
21
+ padding: 10px 32px 0 32px;
22
+ }
23
+ }
24
+
25
+ .sidebarHeader:global(.MuiTypography-root) {
26
+ font-size: 14px;
27
+ color: $sidebar-text-primary;
28
+ font-weight: 540;
29
+ line-height: 20px; /* 142.857% */
30
+ }
31
+
32
+ .divider {
33
+ margin-top: 8px;
34
+ margin-bottom: 16px;
35
+ }
36
+
37
+ .propertyValue:global(.MuiTypography-root) {
38
+ color: $sidebar-property-value-color;
39
+ font-style: normal;
40
+ font-weight: 440;
41
+ line-height: 20px; /* 142.857% */
42
+ }
43
+
44
+ .propertyTitle:global(.MuiTypography-root) {
45
+ color: $sidebar-property-title-color;
46
+ font-size: 12px;
47
+ line-height: 12px; /* 100% */
48
+ }
49
+
50
+ .propertiesContainer {
51
+ padding: 12px 0;
52
+ gap: 12px;
53
+ }
54
+
55
+ .propertyRow {
56
+ gap: 4px;
57
+ }
58
+
59
+ .toggleButton:global(.MuiButtonBase-root) {
60
+ display: flex;
61
+ flex-direction: row;
62
+ gap: 8px;
63
+ top: 0;
64
+ right: 0;
65
+ white-space: nowrap;
66
+ align-self: flex-start;
67
+ position: absolute;
68
+
69
+ @media (max-width: map.get(SrcVariables.$breakpoints, 'large')) {
70
+ position: static;
71
+ margin: 10px 0 0 20px;
72
+ }
73
+
74
+ &:hover {
75
+ text-decoration: none;
76
+ }
77
+ }
78
+
79
+ .toggleButtonText:global(.MuiTypography-root) {
80
+ color: $sidebar-text-primary;
81
+ font-weight: 440;
82
+ line-height: 20px; /* 142.857% */
83
+ }
84
+
85
+ .icon {
86
+ color: $sidebar-text-primary;
87
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"EvaluationRoundEditorList.js","names":[],"sources":["../../../src/components/Evaluation/EvaluationRoundEditorList.tsx"],"sourcesContent":["import { getEvaluationRoundsList } from '@/synapse-client/SynapseClient'\nimport { useSynapseContext } from '@/utils/context/SynapseContext'\nimport { useListState } from '@/utils/hooks/useListState'\nimport { Button } from '@mui/material'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { EvaluationRoundListResponse } from '@sage-bionetworks/synapse-types'\nimport { useEffect, useState } from 'react'\nimport shortid from 'shortid'\nimport { ErrorBanner } from '../error/ErrorBanner'\nimport { EvaluationRoundEditor } from './EvaluationRoundEditor'\nimport {\n convertEvaluationRoundToInput,\n EvaluationRoundInput,\n} from './input_models/models'\n\nexport type EvaluationRoundEditorListProps = {\n /** id of the Evaluation containing EvaluationRounds to edit*/\n evaluationId: string\n}\n\nconst fetchEvaluationList = (\n evaluationId: string,\n accessToken: string,\n setListCallback: (items: EvaluationRoundInput[]) => void,\n errorHandleCallback: (error: string | SynapseClientError | undefined) => void,\n): void => {\n const allEvaluationRoundInputList: EvaluationRoundInput[] = []\n\n const getEvaluationRounds = (nextPageToken?: string) => {\n getEvaluationRoundsList(\n evaluationId,\n { nextPageToken: nextPageToken },\n accessToken,\n )\n .then((response: EvaluationRoundListResponse) => {\n const convertedToInput: EvaluationRoundInput[] = response.page.map(\n evaluationRound => convertEvaluationRoundToInput(evaluationRound),\n )\n\n allEvaluationRoundInputList.push(...convertedToInput)\n errorHandleCallback(undefined)\n\n if (response.nextPageToken) {\n getEvaluationRounds(response.nextPageToken)\n } else {\n // no more pages left. we can set the list\n setListCallback(allEvaluationRoundInputList)\n }\n })\n .catch(error => {\n errorHandleCallback(error)\n })\n }\n\n //initially no next page token\n getEvaluationRounds(undefined)\n}\n\n/**\n * Edits EvaluationsRounds for an Evaluation.\n */\nexport function EvaluationRoundEditorList({\n evaluationId,\n}: EvaluationRoundEditorListProps) {\n const { accessToken } = useSynapseContext()\n const [error, setError] = useState<string | SynapseClientError | undefined>()\n\n const {\n list: evaluationRoundInputList,\n appendToList: appendToEvaluationRoundInputList,\n handleListChange: handleEvaluationRoundInputListChange,\n handleListRemove: handleEvaluationRoundInputListRemove,\n setList: setEvaluationRoundInputList,\n } = useListState<EvaluationRoundInput>([])\n\n //run only once\n useEffect(\n () => {\n fetchEvaluationList(\n evaluationId,\n accessToken!,\n setEvaluationRoundInputList,\n setError,\n )\n },\n // we explicitly dont want to list setEvaluationRoundInputList nor setError as a dependency\n // if we do, the fetchEvaluationList will re-fetch from the backend on every new render\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [accessToken, evaluationId],\n )\n\n if (error) {\n return <ErrorBanner error={error} />\n }\n\n return (\n <div className=\"evaluation-round-editor-list\">\n <div className=\"evaluation-rounds\">\n {evaluationRoundInputList.map((evaluationRoundInput, index) => {\n return (\n <EvaluationRoundEditor\n key={evaluationRoundInput.reactListKey}\n evaluationRoundInput={evaluationRoundInput}\n onSave={handleEvaluationRoundInputListChange(index)}\n onDelete={handleEvaluationRoundInputListRemove(index)}\n />\n )\n })}\n </div>\n\n <div>\n <Button\n className=\"add-round-button\"\n variant=\"contained\"\n color=\"primary\"\n onClick={() => {\n appendToEvaluationRoundInputList({\n reactListKey: shortid(),\n evaluationId: evaluationId,\n roundStart: '',\n roundEnd: '',\n totalSubmissionLimit: '',\n otherLimits: [],\n })\n }}\n >\n Add Round\n </Button>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;AAoBA,IAAM,KACJ,GACA,GACA,GACA,MACS;CACT,IAAM,IAAsD,CAAC,GAEvD,KAAuB,MAA2B;EACtD,EACE,GACA,EAAiB,iBAAc,GAC/B,CACF,EACG,MAAM,MAA0C;GAC/C,IAAM,IAA2C,EAAS,KAAK,KAC7D,MAAmB,EAA8B,CAAe,CAClE;GAKA,AAHA,EAA4B,KAAK,GAAG,CAAgB,GACpD,EAAoB,KAAA,CAAS,GAEzB,EAAS,gBACX,EAAoB,EAAS,aAAa,IAG1C,EAAgB,CAA2B;EAE/C,CAAC,EACA,OAAM,MAAS;GACd,EAAoB,CAAK;EAC3B,CAAC;CACL;CAGA,EAAoB,KAAA,CAAS;AAC/B;AAKA,SAAgB,EAA0B,EACxC,mBACiC;CACjC,IAAM,EAAE,mBAAgB,EAAkB,GACpC,CAAC,GAAO,KAAY,EAAkD,GAEtE,EACJ,MAAM,GACN,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,SAAS,MACP,EAAmC,CAAC,CAAC;CAsBzC,OAnBA,QACQ;EACJ,EACE,GACA,GACA,GACA,CACF;CACF,GAIA,CAAC,GAAa,CAAY,CAC5B,GAEI,IACK,kBAAC,GAAD,EAAoB,SAAQ,CAAA,IAInC,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAyB,KAAK,GAAsB,MAEjD,kBAAC,GAAD;IAEwB;IACtB,QAAQ,EAAqC,CAAK;IAClD,UAAU,EAAqC,CAAK;GACrD,GAJM,EAAqB,YAI3B,CAEJ;EACE,CAAA,GAEL,kBAAC,OAAD,EAAA,UACE,kBAAC,GAAD;GACE,WAAU;GACV,SAAQ;GACR,OAAM;GACN,eAAe;IACb,EAAiC;KAC/B,cAAc,EAAQ;KACR;KACd,YAAY;KACZ,UAAU;KACV,sBAAsB;KACtB,aAAa,CAAC;IAChB,CAAC;GACH;aACD;EAEO,CAAA,EACL,CAAA,CACF;;AAET"}
1
+ {"version":3,"file":"EvaluationRoundEditorList.js","names":[],"sources":["../../../src/components/Evaluation/EvaluationRoundEditorList.tsx"],"sourcesContent":["import { getEvaluationRoundsList } from '@/synapse-client/SynapseClient'\nimport { useSynapseContext } from '@/utils/context/SynapseContext'\nimport { useListState } from '@/utils/hooks/useListState'\nimport { Button } from '@mui/material'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { EvaluationRoundListResponse } from '@sage-bionetworks/synapse-types'\nimport { useEffect, useState } from 'react'\nimport shortid from 'shortid'\nimport { ErrorBanner } from '../error/ErrorBanner'\nimport { EvaluationRoundEditor } from './EvaluationRoundEditor'\nimport {\n convertEvaluationRoundToInput,\n EvaluationRoundInput,\n} from './input_models/models'\n\nexport type EvaluationRoundEditorListProps = {\n /** id of the Evaluation containing EvaluationRounds to edit*/\n evaluationId: string\n}\n\nconst fetchEvaluationList = (\n evaluationId: string,\n accessToken: string,\n setListCallback: (items: EvaluationRoundInput[]) => void,\n errorHandleCallback: (error: string | SynapseClientError | undefined) => void,\n): void => {\n const allEvaluationRoundInputList: EvaluationRoundInput[] = []\n\n const getEvaluationRounds = (nextPageToken?: string) => {\n getEvaluationRoundsList(\n evaluationId,\n { nextPageToken: nextPageToken },\n accessToken,\n )\n .then((response: EvaluationRoundListResponse) => {\n const convertedToInput: EvaluationRoundInput[] = response.page.map(\n evaluationRound => convertEvaluationRoundToInput(evaluationRound),\n )\n\n allEvaluationRoundInputList.push(...convertedToInput)\n errorHandleCallback(undefined)\n\n if (response.nextPageToken) {\n getEvaluationRounds(response.nextPageToken)\n } else {\n // no more pages left. we can set the list\n setListCallback(allEvaluationRoundInputList)\n }\n })\n .catch(error => {\n errorHandleCallback(error)\n })\n }\n\n //initially no next page token\n getEvaluationRounds(undefined)\n}\n\n/**\n * Edits EvaluationsRounds for an Evaluation.\n */\nexport function EvaluationRoundEditorList({\n evaluationId,\n}: EvaluationRoundEditorListProps) {\n const { accessToken } = useSynapseContext()\n const [error, setError] = useState<string | SynapseClientError | undefined>()\n\n const {\n list: evaluationRoundInputList,\n appendToList: appendToEvaluationRoundInputList,\n handleListChange: handleEvaluationRoundInputListChange,\n handleListRemove: handleEvaluationRoundInputListRemove,\n setList: setEvaluationRoundInputList,\n } = useListState<EvaluationRoundInput>([])\n\n //run only once\n useEffect(\n () => {\n fetchEvaluationList(\n evaluationId,\n accessToken!,\n setEvaluationRoundInputList,\n setError,\n )\n },\n // we explicitly dont want to list setEvaluationRoundInputList nor setError as a dependency\n // if we do, the fetchEvaluationList will re-fetch from the backend on every new render\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n [accessToken, evaluationId],\n )\n\n if (error) {\n return <ErrorBanner error={error} />\n }\n\n return (\n <div className=\"evaluation-round-editor-list\">\n <div className=\"evaluation-rounds\">\n {evaluationRoundInputList.map((evaluationRoundInput, index) => {\n return (\n <EvaluationRoundEditor\n key={evaluationRoundInput.reactListKey}\n evaluationRoundInput={evaluationRoundInput}\n onSave={handleEvaluationRoundInputListChange(index)}\n onDelete={handleEvaluationRoundInputListRemove(index)}\n />\n )\n })}\n </div>\n\n <div>\n <Button\n className=\"add-round-button\"\n variant=\"contained\"\n color=\"primary\"\n onClick={() => {\n appendToEvaluationRoundInputList({\n reactListKey: shortid(),\n evaluationId: evaluationId,\n roundStart: '',\n roundEnd: '',\n totalSubmissionLimit: '',\n otherLimits: [],\n })\n }}\n >\n Add Round\n </Button>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;AAoBA,IAAM,KACJ,GACA,GACA,GACA,MACS;CACT,IAAM,IAAsD,CAAC,GAEvD,KAAuB,MAA2B;EACtD,EACE,GACA,EAAiB,iBAAc,GAC/B,CACF,EACG,MAAM,MAA0C;GAC/C,IAAM,IAA2C,EAAS,KAAK,KAC7D,MAAmB,EAA8B,CAAe,CAClE;GAKA,AAHA,EAA4B,KAAK,GAAG,CAAgB,GACpD,EAAoB,KAAA,CAAS,GAEzB,EAAS,gBACX,EAAoB,EAAS,aAAa,IAG1C,EAAgB,CAA2B;EAE/C,CAAC,EACA,OAAM,MAAS;GACd,EAAoB,CAAK;EAC3B,CAAC;CACL;CAGA,EAAoB,KAAA,CAAS;AAC/B;AAKA,SAAgB,EAA0B,EACxC,mBACiC;CACjC,IAAM,EAAE,mBAAgB,EAAkB,GACpC,CAAC,GAAO,KAAY,EAAkD,GAEtE,EACJ,MAAM,GACN,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,SAAS,MACP,EAAmC,CAAC,CAAC;CAsBzC,OAnBA,QACQ;EACJ,EACE,GACA,GACA,GACA,CACF;CACF,GAIA,CAAC,GAAa,CAAY,CAC5B,GAEI,IACK,kBAAC,GAAD,EAAoB,SAAQ,CAAA,IAInC,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAyB,KAAK,GAAsB,MAEjD,kBAAC,GAAD;IAEwB;IACtB,QAAQ,EAAqC,CAAK;IAClD,UAAU,EAAqC,CAAK;GACrD,GAJM,EAAqB,YAI3B,CAEJ;EACE,CAAA,GAEL,kBAAC,OAAD,EAAA,UACE,kBAAC,GAAD;GACE,WAAU;GACV,SAAQ;GACR,OAAM;GACN,eAAe;IACb,EAAiC;KAC/B,cAAc,EAAQ;KACR;KACd,YAAY;KACZ,UAAU;KACV,sBAAsB;KACtB,aAAa,CAAC;IAChB,CAAC;GACH;aACD;EAEO,CAAA,EACL,CAAA,CACF;;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"BioregistryRules.js","names":[],"sources":["../../../src/components/GenericCard/BioregistryRules.ts"],"sourcesContent":["/* eslint-disable no-useless-escape */\n// This file is auto-generated. Do not edit manually.\n// Generated from bioregistry.io API based on collection.yaml\n\nconst onMatch = (value: string) => `https://bioregistry.io/${value}`\n\nexport const bioregistryRules = [\n {\n regex: /(ado:\\d{7})/,\n onMatch,\n },\n {\n regex: /(agrkb:[1-9][0-9]{14})/,\n onMatch,\n },\n {\n regex: /(anzctr:ACTRN\\d+)/,\n onMatch,\n },\n {\n regex: /(arrayexpress:[AEP]-\\w{4}-\\d+)/,\n onMatch,\n },\n {\n regex: /(arxiv:(?:\\w+(?:\\-\\w+)?(?:\\.\\w+)?\\/?)?\\d{4,7}(?:\\.\\d+(?:v\\d+)?)?)/,\n onMatch,\n },\n {\n regex: /(atc:[A-Z](?:\\d+(?:[A-Z]{1,2}(?:\\d+)?)?)?)/,\n onMatch,\n },\n {\n regex: /(atcc:(?:[a-zA-Z]+-)?\\d+(?:\\.\\d)?)/,\n onMatch,\n },\n {\n regex: /(bacdive:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(bfo:\\d{7})/,\n onMatch,\n },\n {\n regex: /(bgee.gene:[A-Za-z0-9]+)/,\n onMatch,\n },\n {\n regex: /(biocyc:[A-Z-0-9]+(?:\\:)?[A-Za-z0-9+_.%-:]+)/,\n onMatch,\n },\n {\n regex: /(biogrid:\\d+)/,\n onMatch,\n },\n {\n regex: /(bioportal:(?:(?:\\d+)|(?:\\w+)))/,\n onMatch,\n },\n {\n regex: /(bioproject:PRJ[DEN][A-Z]\\d+)/,\n onMatch,\n },\n {\n regex: /(biorxiv:(?:\\d{4}\\.\\d{2}\\.\\d{2}\\.)?\\d{6,8}(?:v\\d{1,3})?)/,\n onMatch,\n },\n {\n regex: /(biosample:SAM[NED](?:\\w)?\\d+)/,\n onMatch,\n },\n {\n regex: /(biostudies:S-[A-Z]{4}[\\-\\_A-Z\\d]+)/,\n onMatch,\n },\n {\n regex: /(bmrb:(?:bmr|bmse|bmst)?[0-9]{1,6})/,\n onMatch,\n },\n {\n regex:\n /(brenda:(?:(?:\\d+\\.-\\.-\\.-)|(?:\\d+\\.\\d+\\.-\\.-)|(?:\\d+\\.\\d+\\.\\d+\\.-)|(?:\\d+\\.\\d+\\.\\d+\\.\\d+)))/,\n onMatch,\n },\n {\n regex: /(brenda.ligand:\\d+)/,\n onMatch,\n },\n {\n regex: /(brenda.ligandgroup:\\d+)/,\n onMatch,\n },\n {\n regex: /(bto:\\d{7})/,\n onMatch,\n },\n {\n regex: /(cath:[1-6]\\.[0-9]+\\.[0-9]+\\.[0-9]+)/,\n onMatch,\n },\n {\n regex: /(cbioportal:[a-z0-9\\_]+)/,\n onMatch,\n },\n {\n regex: /(cdd:(?:cd)?\\d{5})/,\n onMatch,\n },\n {\n regex: /(cellimage:\\d+)/,\n onMatch,\n },\n {\n regex:\n /(cellxgene.collection:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/,\n onMatch,\n },\n {\n regex: /(chebi:\\d+)/,\n onMatch,\n },\n {\n regex: /(chembl:CHEMBL\\d+)/,\n onMatch,\n },\n {\n regex: /(chembl.compound:CHEMBL\\d+)/,\n onMatch,\n },\n {\n regex: /(chemspider:\\d+)/,\n onMatch,\n },\n {\n regex: /(civic.aid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.did:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.eid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.gid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.sid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.tid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.vid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(clinicaltrials:NCT\\d{8})/,\n onMatch,\n },\n {\n regex: /(clinvar:\\d+)/,\n onMatch,\n },\n {\n regex: /(clinvar.record:RCV\\d+(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(complexportal:CPX-[0-9]+)/,\n onMatch,\n },\n {\n regex: /(cosmic:[A-Z0-9][A-Z0-9-]*)/,\n onMatch,\n },\n {\n regex: /(cosmic.cell:\\d+)/,\n onMatch,\n },\n {\n regex: /(cpt:\\d+)/,\n onMatch,\n },\n {\n regex: /(ctd.chemical:[CD]\\d+)/,\n onMatch,\n },\n {\n regex: /(ctri:CTRI\\/\\d{4}\\/\\d{2,3}\\/\\d+)/,\n onMatch,\n },\n {\n regex: /(cvx:\\d+)/,\n onMatch,\n },\n {\n regex: /(dbgap:phs[0-9]{6}(?:.v\\d+.p\\d+)?)/,\n onMatch,\n },\n {\n regex: /(dbsnp:rs\\d+)/,\n onMatch,\n },\n {\n regex: /(decipher:\\d+)/,\n onMatch,\n },\n {\n regex: /(depmap:ACH-\\d+)/,\n onMatch,\n },\n {\n regex: /(dhba:\\d+)/,\n onMatch,\n },\n {\n regex: /(disprot:DP\\d{5})/,\n onMatch,\n },\n {\n regex: /(dmba:\\d+)/,\n onMatch,\n },\n {\n regex: /(doi:10.\\d{2,9}\\/.*)/,\n onMatch,\n },\n {\n regex: /(doid:\\d+)/,\n onMatch,\n },\n {\n regex: /(drks:DRKS\\d+)/,\n onMatch,\n },\n {\n regex: /(drugbank:DB\\d{5})/,\n onMatch,\n },\n {\n regex: /(drugcentral:\\d+)/,\n onMatch,\n },\n {\n regex: /(duo:\\d{7})/,\n onMatch,\n },\n {\n regex:\n /(ec:\\d{1,2}(?:(?:(?:\\.\\d{1,3}){1,3})|(?:\\.\\d+){2}\\.[nB]\\d{1,3}|\\.-\\.-\\.-|\\.\\d{1,3}\\.-\\.-|\\.\\d{1,3}\\.\\d{1,3}\\.-)?)/,\n onMatch,\n },\n {\n regex: /(ecacc:\\d+)/,\n onMatch,\n },\n {\n regex: /(edam:(?:data|topic|operation|format)\\_\\d{4})/,\n onMatch,\n },\n {\n regex: /(edam.data:\\d+)/,\n onMatch,\n },\n {\n regex: /(edam.topic:\\d+)/,\n onMatch,\n },\n {\n regex: /(ega.dataset:EGAD\\d{11})/,\n onMatch,\n },\n {\n regex: /(ega.study:EGAS\\d{11})/,\n onMatch,\n },\n {\n regex: /(emdb:EMD-\\d{4,5})/,\n onMatch,\n },\n {\n regex: /(empiar:\\d+)/,\n onMatch,\n },\n {\n regex: /(ena.embl:[A-Z]+[0-9]+(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex:\n /(ensembl:(?:(?:ENS[FPTG]\\d{11}(?:\\.\\d+)?)|(?:FB\\w{2}\\d{7})|(?:Y[A-Z]{2}\\d{3}[a-zA-Z](?:\\-[A-Z])?)|(?:[A-Z_a-z0-9]+(?:\\.)?(?:t)?(?:\\d+)?(?:[a-z])?)))/,\n onMatch,\n },\n {\n regex: /(ensembl.metazoa:\\w+(?:\\.)?\\d+)/,\n onMatch,\n },\n {\n regex: /(ensembl.plant:\\w+(?:\\.\\d+)?(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(euclinicaltrials:\\d{4}\\-\\d{6}\\-\\d{2})/,\n onMatch,\n },\n {\n regex: /(eupath:\\d{7})/,\n onMatch,\n },\n {\n regex: /(exac.variant:\\d{1,2}\\-\\d+\\-[GATC]\\-[GATC])/,\n onMatch,\n },\n {\n regex: /(fairsharing:(?:bsg-[dscp]?\\d{6})|(?:FAIRsharing\\.\\w+))/,\n onMatch,\n },\n {\n regex: /(flybase:FB\\w{2}\\d{7})/,\n onMatch,\n },\n {\n regex: /(fma:\\d+)/,\n onMatch,\n },\n {\n regex: /(funderregistry:\\d+)/,\n onMatch,\n },\n {\n regex: /(gard:\\d+)/,\n onMatch,\n },\n {\n regex: /(gbif:\\d+)/,\n onMatch,\n },\n {\n regex: /(gdc:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})/,\n onMatch,\n },\n {\n regex: /(genecards:[A-Za-z-0-9_]+(?:\\@)?)/,\n onMatch,\n },\n {\n regex: /(geo:G(?:PL|SM|SE|DS)\\d+)/,\n onMatch,\n },\n {\n regex: /(go:\\d{7})/,\n onMatch,\n },\n {\n regex: /(gramene.gene:GR\\:\\d+)/,\n onMatch,\n },\n {\n regex: /(gramene.growthstage:\\d{7})/,\n onMatch,\n },\n {\n regex: /(gramene.protein:\\d+)/,\n onMatch,\n },\n {\n regex: /(gtdb:[cdfgops]__\\w+\\S+)/,\n onMatch,\n },\n {\n regex: /(hba:\\d+)/,\n onMatch,\n },\n {\n regex: /(hc.trial:\\d+)/,\n onMatch,\n },\n {\n regex: /(hgnc:\\d{1,5})/,\n onMatch,\n },\n {\n regex: /(hl7.v2codesystem:\\d+)/,\n onMatch,\n },\n {\n regex: /(hmdb:HMDB\\d+)/,\n onMatch,\n },\n {\n regex:\n /(icd10:(?:(?:[XVI]+)|(?:[A-Z][0-9]+(?:(?:-[A-Z][0-9]+)|(?:\\.[0-9]))?)))/,\n onMatch,\n },\n {\n regex:\n /(icd9:(?:(?:\\d{1,3}-\\d{1,3})|(?:(?:\\d\\d\\d|V\\d\\d|E[8-9]\\d\\d)(?:\\.\\d{1,2})?)))/,\n onMatch,\n },\n {\n regex: /(icdc:\\d{6})/,\n onMatch,\n },\n {\n regex: /(icf:\\d+)/,\n onMatch,\n },\n {\n regex: /(idr:[0-9]{4})/,\n onMatch,\n },\n {\n regex: /(imgt.hla:[A-Z0-9*:]+)/,\n onMatch,\n },\n {\n regex:\n /(inchi:InChI\\=1S?\\/[A-Za-z0-9\\.]+(?:\\+[0-9]+)?(?:\\/[cnpqbtmsih][A-Za-z0-9\\-\\+\\(?:\\)\\,\\/\\?\\;\\.]+)*)/,\n onMatch,\n },\n {\n regex: /(inchikey:[A-Z]{14}\\-[A-Z]{10}(?:\\-[A-Z])?)/,\n onMatch,\n },\n {\n regex:\n /(insdc:(?:[A-Z]\\d{5}|[A-Z]{2}\\d{6}|[A-Z]{4,6}\\d{8,10}|[A-J][A-Z]{2}\\d{5})(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(insdc.sra:[SED]R[APRSXZ]\\d+)/,\n onMatch,\n },\n {\n regex: /(intact:EBI\\-[0-9]+)/,\n onMatch,\n },\n {\n regex: /(interpro:IPR\\d{6})/,\n onMatch,\n },\n {\n regex: /(iso.3166:\\d+)/,\n onMatch,\n },\n {\n regex: /(isrctn:ISRCTN\\d+)/,\n onMatch,\n },\n {\n regex: /(itis:\\d+)/,\n onMatch,\n },\n {\n regex: /(jaxmice:\\d{6})/,\n onMatch,\n },\n {\n regex:\n /(kegg:(?:(?:[CHDEGTMKR]\\d+)|(?:\\w+:[\\w\\d\\.-]*)|(?:\\w{2,4}\\d{5})|(?:[a-z]{3,5})))/,\n onMatch,\n },\n {\n regex: /(kegg.compound:C\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.disease:H\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.drug:D\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.glycan:G\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.pathway:\\w{2,4}\\d{5})/,\n onMatch,\n },\n {\n regex: /(kegg.reaction:R\\d+)/,\n onMatch,\n },\n {\n regex: /(loinc:(?:\\d|\\w)+-\\d)/,\n onMatch,\n },\n {\n regex: /(massive:MSV\\d+)/,\n onMatch,\n },\n {\n regex: /(mba:\\d+)/,\n onMatch,\n },\n {\n regex: /(mesh:(?:C|D|Q)\\d+)/,\n onMatch,\n },\n {\n regex: /(metabolights:MTBL[CS]\\d+)/,\n onMatch,\n },\n {\n regex: /(metacyc.compound:[A-Za-z0-9+_.%-:]+)/,\n onMatch,\n },\n {\n regex: /(mgi:\\d+)/,\n onMatch,\n },\n {\n regex: /(mir:\\d{8})/,\n onMatch,\n },\n {\n regex: /(mirbase:MI\\d{7})/,\n onMatch,\n },\n {\n regex: /(mondo:\\d{7})/,\n onMatch,\n },\n {\n regex: /(ncbigene:\\d+)/,\n onMatch,\n },\n {\n regex: /(ncbiprotein:\\w+_?\\d+(?:.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(ncbitaxon:(?:(?:\\d+)|(?:[a-zA-Z_]+)))/,\n onMatch,\n },\n {\n regex: /(ncit:(?:C|R|P|A|NHC)\\d+)/,\n onMatch,\n },\n {\n regex: /(ndc:\\d+\\-\\d+\\-\\d+)/,\n onMatch,\n },\n {\n regex: /(ndfrt:N[0-9]{10})/,\n onMatch,\n },\n {\n regex: /(nextprot:NX_\\w+)/,\n onMatch,\n },\n {\n regex: /(nihreporter.project:\\d+)/,\n onMatch,\n },\n {\n regex: /(nord:\\d+)/,\n onMatch,\n },\n {\n regex: /(omim:\\d+)/,\n onMatch,\n },\n {\n regex: /(omop:\\d+)/,\n onMatch,\n },\n {\n regex: /(orcid:\\d{4}-\\d{4}-\\d{4}-\\d{3}(?:\\d|X))/,\n onMatch,\n },\n {\n regex: /(orphanet:C?\\d+)/,\n onMatch,\n },\n {\n regex: /(orphanet.ordo:C?\\d+)/,\n onMatch,\n },\n {\n regex: /(osf:[a-z0-9]{5})/,\n onMatch,\n },\n {\n regex: /(panther.family:PTHR\\d{5}(?:\\:SF\\d{1,3})?)/,\n onMatch,\n },\n {\n regex: /(panther.pathway:P\\d{5})/,\n onMatch,\n },\n {\n regex: /(panther.pthcmp:(?:G|P|U|C|S)\\d{5})/,\n onMatch,\n },\n {\n regex: /(pba:\\d+)/,\n onMatch,\n },\n {\n regex: /(pdb:[0-9][A-Za-z0-9]{3})/,\n onMatch,\n },\n {\n regex: /(pdb-ccd:\\w{1,3})/,\n onMatch,\n },\n {\n regex: /(pdb.ligand:[A-Za-z0-9]+)/,\n onMatch,\n },\n {\n regex: /(pdc.study:PDC\\d+)/,\n onMatch,\n },\n {\n regex: /(peco:\\d{7})/,\n onMatch,\n },\n {\n regex: /(peptideatlas.dataset:PASS\\d{5})/,\n onMatch,\n },\n {\n regex: /(pfam:PF\\d{5})/,\n onMatch,\n },\n {\n regex: /(pfam.clan:CL\\d+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.disease:PA\\d+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.drug:PA\\d+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.gene:PA\\w+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.pathways:PA\\d+)/,\n onMatch,\n },\n {\n regex: /(pmc:PMC\\d+(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(pombase:S\\w+(?:\\.)?\\w+(?:\\.)?)/,\n onMatch,\n },\n {\n regex: /(pride.project:P(?:X|R|A)D\\d{6})/,\n onMatch,\n },\n {\n regex: /(pubchem.compound:\\d+)/,\n onMatch,\n },\n {\n regex: /(pubmed:\\d+)/,\n onMatch,\n },\n {\n regex: /(px:(?:R)?PXD\\d{6})/,\n onMatch,\n },\n {\n regex: /(radlex:RID\\d+)/,\n onMatch,\n },\n {\n regex: /(reactome:R-[A-Z]{3}-\\d+(?:-\\d+)?(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(rebec:RBR-\\w+)/,\n onMatch,\n },\n {\n regex:\n /(refseq:(?:(?:(?:AC|AP|NC|NG|NM|NP|NR|NT|NW|WP|XM|XP|XR|YP|ZP)_\\d+)|(?:NZ_[A-Z]{2,4}\\d+))(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(rfam:RF\\d{5})/,\n onMatch,\n },\n {\n regex: /(rfc:\\d+)/,\n onMatch,\n },\n {\n regex: /(rgd:\\d{4,})/,\n onMatch,\n },\n {\n regex: /(rhea:\\d{5})/,\n onMatch,\n },\n {\n regex: /(rnacentral:URS[0-9A-F]{10}(?:\\_\\d+)?)/,\n onMatch,\n },\n {\n regex: /(ror:0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2})/,\n onMatch,\n },\n {\n regex: /(rrid:[a-zA-Z]+.+)/,\n onMatch,\n },\n {\n regex: /(rrrc:\\d+)/,\n onMatch,\n },\n {\n regex: /(rxnorm:[0-9]{1,7})/,\n onMatch,\n },\n {\n regex: /(scop:\\d+)/,\n onMatch,\n },\n {\n regex: /(sgd:(?:(?:S\\d+$)|(?:Y[A-Z]{2}\\d{3}[a-zA-Z](?:\\-[A-Z])?)))/,\n onMatch,\n },\n {\n regex: /(signor:SIGNOR\\-[A-Z]+\\d+)/,\n onMatch,\n },\n {\n regex: /(snomedct:(?:\\w+)?\\d+)/,\n onMatch,\n },\n {\n regex: /(so:\\d{7})/,\n onMatch,\n },\n {\n regex: /(ssbd.dataset:\\d+)/,\n onMatch,\n },\n {\n regex: /(ssbd.project:\\d+)/,\n onMatch,\n },\n {\n regex: /(stitch:\\w{14})/,\n onMatch,\n },\n {\n regex:\n /(string:(?:(?:[A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|(?:[O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])|(?:[0-9][A-Za-z0-9]{3})))/,\n onMatch,\n },\n {\n regex: /(tao:\\d{7})/,\n onMatch,\n },\n {\n regex: /(tcdb:\\d+(?:\\.[A-Z])?(?:\\.\\d+)?(?:\\.\\d+)?(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(tcia.collection:[A-Za-z0-9][A-Za-z0-9_\\-\\.]*[A-Za-z0-9])/,\n onMatch,\n },\n {\n regex: /(uberon:\\d+)/,\n onMatch,\n },\n {\n regex: /(unii:[A-Z0-9]+)/,\n onMatch,\n },\n {\n regex: /(uniparc:UPI[A-F0-9]{10})/,\n onMatch,\n },\n {\n regex:\n /(uniprot:(?:(?:[A-N,R-Z][0-9](?:[A-Z][A-Z, 0-9][A-Z, 0-9][0-9]){1,2})|(?:[O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(?:\\.\\d+)?(?:-\\d+)?(?:#PRO_\\d+)?))/,\n onMatch,\n },\n {\n regex:\n /(uniprot.isoform:(?:[A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|(?:[O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(?:\\-\\d+))/,\n onMatch,\n },\n {\n regex: /(uniprot.proteome:UP\\d{9})/,\n onMatch,\n },\n {\n regex:\n /(uniref:UniRef(?:100|90|50)_(?:[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9](?:[A-Z][A-Z0-9]{2}[0-9]){1,2}|UPI[A-F0-9]{10}))/,\n onMatch,\n },\n {\n regex: /(wikidata:(?:Q|P|E|L)\\d+)/,\n onMatch,\n },\n {\n regex: /(wikigenes:\\d+)/,\n onMatch,\n },\n {\n regex: /(wikipathways:WP\\d{1,5}(?:\\_r\\d+)?)/,\n onMatch,\n },\n {\n regex: /(wormbase:(?:CE[0-9]{5}|WB[A-Z][a-z]+\\d+))/,\n onMatch,\n },\n {\n regex: /(xenbase:XB\\-\\w+\\-\\d+)/,\n onMatch,\n },\n {\n regex: /(zenodo.record:\\d+)/,\n onMatch,\n },\n {\n regex: /(zfin:ZDB\\-\\w+\\-\\d+\\-\\d+)/,\n onMatch,\n },\n {\n regex: /(zinc:(?:ZINC)?\\d+)/,\n onMatch,\n },\n]\n"],"mappings":";AAIA,IAAM,KAAW,MAAkB,0BAA0B,KAEhD,IAAmB;CAC9B;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;AACF"}
1
+ {"version":3,"file":"BioregistryRules.js","names":[],"sources":["../../../src/components/GenericCard/BioregistryRules.ts"],"sourcesContent":["/* oxlint-disable no-useless-escape */\n// This file is auto-generated. Do not edit manually.\n// Generated from bioregistry.io API based on collection.yaml\n\nconst onMatch = (value: string) => `https://bioregistry.io/${value}`\n\nexport const bioregistryRules = [\n {\n regex: /(ado:\\d{7})/,\n onMatch,\n },\n {\n regex: /(agrkb:[1-9][0-9]{14})/,\n onMatch,\n },\n {\n regex: /(anzctr:ACTRN\\d+)/,\n onMatch,\n },\n {\n regex: /(arrayexpress:[AEP]-\\w{4}-\\d+)/,\n onMatch,\n },\n {\n regex: /(arxiv:(?:\\w+(?:\\-\\w+)?(?:\\.\\w+)?\\/?)?\\d{4,7}(?:\\.\\d+(?:v\\d+)?)?)/,\n onMatch,\n },\n {\n regex: /(atc:[A-Z](?:\\d+(?:[A-Z]{1,2}(?:\\d+)?)?)?)/,\n onMatch,\n },\n {\n regex: /(atcc:(?:[a-zA-Z]+-)?\\d+(?:\\.\\d)?)/,\n onMatch,\n },\n {\n regex: /(bacdive:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(bfo:\\d{7})/,\n onMatch,\n },\n {\n regex: /(bgee.gene:[A-Za-z0-9]+)/,\n onMatch,\n },\n {\n regex: /(biocyc:[A-Z-0-9]+(?:\\:)?[A-Za-z0-9+_.%-:]+)/,\n onMatch,\n },\n {\n regex: /(biogrid:\\d+)/,\n onMatch,\n },\n {\n regex: /(bioportal:(?:(?:\\d+)|(?:\\w+)))/,\n onMatch,\n },\n {\n regex: /(bioproject:PRJ[DEN][A-Z]\\d+)/,\n onMatch,\n },\n {\n regex: /(biorxiv:(?:\\d{4}\\.\\d{2}\\.\\d{2}\\.)?\\d{6,8}(?:v\\d{1,3})?)/,\n onMatch,\n },\n {\n regex: /(biosample:SAM[NED](?:\\w)?\\d+)/,\n onMatch,\n },\n {\n regex: /(biostudies:S-[A-Z]{4}[\\-\\_A-Z\\d]+)/,\n onMatch,\n },\n {\n regex: /(bmrb:(?:bmr|bmse|bmst)?[0-9]{1,6})/,\n onMatch,\n },\n {\n regex:\n /(brenda:(?:(?:\\d+\\.-\\.-\\.-)|(?:\\d+\\.\\d+\\.-\\.-)|(?:\\d+\\.\\d+\\.\\d+\\.-)|(?:\\d+\\.\\d+\\.\\d+\\.\\d+)))/,\n onMatch,\n },\n {\n regex: /(brenda.ligand:\\d+)/,\n onMatch,\n },\n {\n regex: /(brenda.ligandgroup:\\d+)/,\n onMatch,\n },\n {\n regex: /(bto:\\d{7})/,\n onMatch,\n },\n {\n regex: /(cath:[1-6]\\.[0-9]+\\.[0-9]+\\.[0-9]+)/,\n onMatch,\n },\n {\n regex: /(cbioportal:[a-z0-9\\_]+)/,\n onMatch,\n },\n {\n regex: /(cdd:(?:cd)?\\d{5})/,\n onMatch,\n },\n {\n regex: /(cellimage:\\d+)/,\n onMatch,\n },\n {\n regex:\n /(cellxgene.collection:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/,\n onMatch,\n },\n {\n regex: /(chebi:\\d+)/,\n onMatch,\n },\n {\n regex: /(chembl:CHEMBL\\d+)/,\n onMatch,\n },\n {\n regex: /(chembl.compound:CHEMBL\\d+)/,\n onMatch,\n },\n {\n regex: /(chemspider:\\d+)/,\n onMatch,\n },\n {\n regex: /(civic.aid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.did:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.eid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.gid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.sid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.tid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(civic.vid:[0-9]+)/,\n onMatch,\n },\n {\n regex: /(clinicaltrials:NCT\\d{8})/,\n onMatch,\n },\n {\n regex: /(clinvar:\\d+)/,\n onMatch,\n },\n {\n regex: /(clinvar.record:RCV\\d+(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(complexportal:CPX-[0-9]+)/,\n onMatch,\n },\n {\n regex: /(cosmic:[A-Z0-9][A-Z0-9-]*)/,\n onMatch,\n },\n {\n regex: /(cosmic.cell:\\d+)/,\n onMatch,\n },\n {\n regex: /(cpt:\\d+)/,\n onMatch,\n },\n {\n regex: /(ctd.chemical:[CD]\\d+)/,\n onMatch,\n },\n {\n regex: /(ctri:CTRI\\/\\d{4}\\/\\d{2,3}\\/\\d+)/,\n onMatch,\n },\n {\n regex: /(cvx:\\d+)/,\n onMatch,\n },\n {\n regex: /(dbgap:phs[0-9]{6}(?:.v\\d+.p\\d+)?)/,\n onMatch,\n },\n {\n regex: /(dbsnp:rs\\d+)/,\n onMatch,\n },\n {\n regex: /(decipher:\\d+)/,\n onMatch,\n },\n {\n regex: /(depmap:ACH-\\d+)/,\n onMatch,\n },\n {\n regex: /(dhba:\\d+)/,\n onMatch,\n },\n {\n regex: /(disprot:DP\\d{5})/,\n onMatch,\n },\n {\n regex: /(dmba:\\d+)/,\n onMatch,\n },\n {\n regex: /(doi:10.\\d{2,9}\\/.*)/,\n onMatch,\n },\n {\n regex: /(doid:\\d+)/,\n onMatch,\n },\n {\n regex: /(drks:DRKS\\d+)/,\n onMatch,\n },\n {\n regex: /(drugbank:DB\\d{5})/,\n onMatch,\n },\n {\n regex: /(drugcentral:\\d+)/,\n onMatch,\n },\n {\n regex: /(duo:\\d{7})/,\n onMatch,\n },\n {\n regex:\n /(ec:\\d{1,2}(?:(?:(?:\\.\\d{1,3}){1,3})|(?:\\.\\d+){2}\\.[nB]\\d{1,3}|\\.-\\.-\\.-|\\.\\d{1,3}\\.-\\.-|\\.\\d{1,3}\\.\\d{1,3}\\.-)?)/,\n onMatch,\n },\n {\n regex: /(ecacc:\\d+)/,\n onMatch,\n },\n {\n regex: /(edam:(?:data|topic|operation|format)\\_\\d{4})/,\n onMatch,\n },\n {\n regex: /(edam.data:\\d+)/,\n onMatch,\n },\n {\n regex: /(edam.topic:\\d+)/,\n onMatch,\n },\n {\n regex: /(ega.dataset:EGAD\\d{11})/,\n onMatch,\n },\n {\n regex: /(ega.study:EGAS\\d{11})/,\n onMatch,\n },\n {\n regex: /(emdb:EMD-\\d{4,5})/,\n onMatch,\n },\n {\n regex: /(empiar:\\d+)/,\n onMatch,\n },\n {\n regex: /(ena.embl:[A-Z]+[0-9]+(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex:\n /(ensembl:(?:(?:ENS[FPTG]\\d{11}(?:\\.\\d+)?)|(?:FB\\w{2}\\d{7})|(?:Y[A-Z]{2}\\d{3}[a-zA-Z](?:\\-[A-Z])?)|(?:[A-Z_a-z0-9]+(?:\\.)?(?:t)?(?:\\d+)?(?:[a-z])?)))/,\n onMatch,\n },\n {\n regex: /(ensembl.metazoa:\\w+(?:\\.)?\\d+)/,\n onMatch,\n },\n {\n regex: /(ensembl.plant:\\w+(?:\\.\\d+)?(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(euclinicaltrials:\\d{4}\\-\\d{6}\\-\\d{2})/,\n onMatch,\n },\n {\n regex: /(eupath:\\d{7})/,\n onMatch,\n },\n {\n regex: /(exac.variant:\\d{1,2}\\-\\d+\\-[GATC]\\-[GATC])/,\n onMatch,\n },\n {\n regex: /(fairsharing:(?:bsg-[dscp]?\\d{6})|(?:FAIRsharing\\.\\w+))/,\n onMatch,\n },\n {\n regex: /(flybase:FB\\w{2}\\d{7})/,\n onMatch,\n },\n {\n regex: /(fma:\\d+)/,\n onMatch,\n },\n {\n regex: /(funderregistry:\\d+)/,\n onMatch,\n },\n {\n regex: /(gard:\\d+)/,\n onMatch,\n },\n {\n regex: /(gbif:\\d+)/,\n onMatch,\n },\n {\n regex: /(gdc:[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})/,\n onMatch,\n },\n {\n regex: /(genecards:[A-Za-z-0-9_]+(?:\\@)?)/,\n onMatch,\n },\n {\n regex: /(geo:G(?:PL|SM|SE|DS)\\d+)/,\n onMatch,\n },\n {\n regex: /(go:\\d{7})/,\n onMatch,\n },\n {\n regex: /(gramene.gene:GR\\:\\d+)/,\n onMatch,\n },\n {\n regex: /(gramene.growthstage:\\d{7})/,\n onMatch,\n },\n {\n regex: /(gramene.protein:\\d+)/,\n onMatch,\n },\n {\n regex: /(gtdb:[cdfgops]__\\w+\\S+)/,\n onMatch,\n },\n {\n regex: /(hba:\\d+)/,\n onMatch,\n },\n {\n regex: /(hc.trial:\\d+)/,\n onMatch,\n },\n {\n regex: /(hgnc:\\d{1,5})/,\n onMatch,\n },\n {\n regex: /(hl7.v2codesystem:\\d+)/,\n onMatch,\n },\n {\n regex: /(hmdb:HMDB\\d+)/,\n onMatch,\n },\n {\n regex:\n /(icd10:(?:(?:[XVI]+)|(?:[A-Z][0-9]+(?:(?:-[A-Z][0-9]+)|(?:\\.[0-9]))?)))/,\n onMatch,\n },\n {\n regex:\n /(icd9:(?:(?:\\d{1,3}-\\d{1,3})|(?:(?:\\d\\d\\d|V\\d\\d|E[8-9]\\d\\d)(?:\\.\\d{1,2})?)))/,\n onMatch,\n },\n {\n regex: /(icdc:\\d{6})/,\n onMatch,\n },\n {\n regex: /(icf:\\d+)/,\n onMatch,\n },\n {\n regex: /(idr:[0-9]{4})/,\n onMatch,\n },\n {\n regex: /(imgt.hla:[A-Z0-9*:]+)/,\n onMatch,\n },\n {\n regex:\n /(inchi:InChI\\=1S?\\/[A-Za-z0-9\\.]+(?:\\+[0-9]+)?(?:\\/[cnpqbtmsih][A-Za-z0-9\\-\\+\\(?:\\)\\,\\/\\?\\;\\.]+)*)/,\n onMatch,\n },\n {\n regex: /(inchikey:[A-Z]{14}\\-[A-Z]{10}(?:\\-[A-Z])?)/,\n onMatch,\n },\n {\n regex:\n /(insdc:(?:[A-Z]\\d{5}|[A-Z]{2}\\d{6}|[A-Z]{4,6}\\d{8,10}|[A-J][A-Z]{2}\\d{5})(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(insdc.sra:[SED]R[APRSXZ]\\d+)/,\n onMatch,\n },\n {\n regex: /(intact:EBI\\-[0-9]+)/,\n onMatch,\n },\n {\n regex: /(interpro:IPR\\d{6})/,\n onMatch,\n },\n {\n regex: /(iso.3166:\\d+)/,\n onMatch,\n },\n {\n regex: /(isrctn:ISRCTN\\d+)/,\n onMatch,\n },\n {\n regex: /(itis:\\d+)/,\n onMatch,\n },\n {\n regex: /(jaxmice:\\d{6})/,\n onMatch,\n },\n {\n regex:\n /(kegg:(?:(?:[CHDEGTMKR]\\d+)|(?:\\w+:[\\w\\d\\.-]*)|(?:\\w{2,4}\\d{5})|(?:[a-z]{3,5})))/,\n onMatch,\n },\n {\n regex: /(kegg.compound:C\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.disease:H\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.drug:D\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.glycan:G\\d+)/,\n onMatch,\n },\n {\n regex: /(kegg.pathway:\\w{2,4}\\d{5})/,\n onMatch,\n },\n {\n regex: /(kegg.reaction:R\\d+)/,\n onMatch,\n },\n {\n regex: /(loinc:(?:\\d|\\w)+-\\d)/,\n onMatch,\n },\n {\n regex: /(massive:MSV\\d+)/,\n onMatch,\n },\n {\n regex: /(mba:\\d+)/,\n onMatch,\n },\n {\n regex: /(mesh:(?:C|D|Q)\\d+)/,\n onMatch,\n },\n {\n regex: /(metabolights:MTBL[CS]\\d+)/,\n onMatch,\n },\n {\n regex: /(metacyc.compound:[A-Za-z0-9+_.%-:]+)/,\n onMatch,\n },\n {\n regex: /(mgi:\\d+)/,\n onMatch,\n },\n {\n regex: /(mir:\\d{8})/,\n onMatch,\n },\n {\n regex: /(mirbase:MI\\d{7})/,\n onMatch,\n },\n {\n regex: /(mondo:\\d{7})/,\n onMatch,\n },\n {\n regex: /(ncbigene:\\d+)/,\n onMatch,\n },\n {\n regex: /(ncbiprotein:\\w+_?\\d+(?:.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(ncbitaxon:(?:(?:\\d+)|(?:[a-zA-Z_]+)))/,\n onMatch,\n },\n {\n regex: /(ncit:(?:C|R|P|A|NHC)\\d+)/,\n onMatch,\n },\n {\n regex: /(ndc:\\d+\\-\\d+\\-\\d+)/,\n onMatch,\n },\n {\n regex: /(ndfrt:N[0-9]{10})/,\n onMatch,\n },\n {\n regex: /(nextprot:NX_\\w+)/,\n onMatch,\n },\n {\n regex: /(nihreporter.project:\\d+)/,\n onMatch,\n },\n {\n regex: /(nord:\\d+)/,\n onMatch,\n },\n {\n regex: /(omim:\\d+)/,\n onMatch,\n },\n {\n regex: /(omop:\\d+)/,\n onMatch,\n },\n {\n regex: /(orcid:\\d{4}-\\d{4}-\\d{4}-\\d{3}(?:\\d|X))/,\n onMatch,\n },\n {\n regex: /(orphanet:C?\\d+)/,\n onMatch,\n },\n {\n regex: /(orphanet.ordo:C?\\d+)/,\n onMatch,\n },\n {\n regex: /(osf:[a-z0-9]{5})/,\n onMatch,\n },\n {\n regex: /(panther.family:PTHR\\d{5}(?:\\:SF\\d{1,3})?)/,\n onMatch,\n },\n {\n regex: /(panther.pathway:P\\d{5})/,\n onMatch,\n },\n {\n regex: /(panther.pthcmp:(?:G|P|U|C|S)\\d{5})/,\n onMatch,\n },\n {\n regex: /(pba:\\d+)/,\n onMatch,\n },\n {\n regex: /(pdb:[0-9][A-Za-z0-9]{3})/,\n onMatch,\n },\n {\n regex: /(pdb-ccd:\\w{1,3})/,\n onMatch,\n },\n {\n regex: /(pdb.ligand:[A-Za-z0-9]+)/,\n onMatch,\n },\n {\n regex: /(pdc.study:PDC\\d+)/,\n onMatch,\n },\n {\n regex: /(peco:\\d{7})/,\n onMatch,\n },\n {\n regex: /(peptideatlas.dataset:PASS\\d{5})/,\n onMatch,\n },\n {\n regex: /(pfam:PF\\d{5})/,\n onMatch,\n },\n {\n regex: /(pfam.clan:CL\\d+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.disease:PA\\d+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.drug:PA\\d+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.gene:PA\\w+)/,\n onMatch,\n },\n {\n regex: /(pharmgkb.pathways:PA\\d+)/,\n onMatch,\n },\n {\n regex: /(pmc:PMC\\d+(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(pombase:S\\w+(?:\\.)?\\w+(?:\\.)?)/,\n onMatch,\n },\n {\n regex: /(pride.project:P(?:X|R|A)D\\d{6})/,\n onMatch,\n },\n {\n regex: /(pubchem.compound:\\d+)/,\n onMatch,\n },\n {\n regex: /(pubmed:\\d+)/,\n onMatch,\n },\n {\n regex: /(px:(?:R)?PXD\\d{6})/,\n onMatch,\n },\n {\n regex: /(radlex:RID\\d+)/,\n onMatch,\n },\n {\n regex: /(reactome:R-[A-Z]{3}-\\d+(?:-\\d+)?(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(rebec:RBR-\\w+)/,\n onMatch,\n },\n {\n regex:\n /(refseq:(?:(?:(?:AC|AP|NC|NG|NM|NP|NR|NT|NW|WP|XM|XP|XR|YP|ZP)_\\d+)|(?:NZ_[A-Z]{2,4}\\d+))(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(rfam:RF\\d{5})/,\n onMatch,\n },\n {\n regex: /(rfc:\\d+)/,\n onMatch,\n },\n {\n regex: /(rgd:\\d{4,})/,\n onMatch,\n },\n {\n regex: /(rhea:\\d{5})/,\n onMatch,\n },\n {\n regex: /(rnacentral:URS[0-9A-F]{10}(?:\\_\\d+)?)/,\n onMatch,\n },\n {\n regex: /(ror:0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2})/,\n onMatch,\n },\n {\n regex: /(rrid:[a-zA-Z]+.+)/,\n onMatch,\n },\n {\n regex: /(rrrc:\\d+)/,\n onMatch,\n },\n {\n regex: /(rxnorm:[0-9]{1,7})/,\n onMatch,\n },\n {\n regex: /(scop:\\d+)/,\n onMatch,\n },\n {\n regex: /(sgd:(?:(?:S\\d+$)|(?:Y[A-Z]{2}\\d{3}[a-zA-Z](?:\\-[A-Z])?)))/,\n onMatch,\n },\n {\n regex: /(signor:SIGNOR\\-[A-Z]+\\d+)/,\n onMatch,\n },\n {\n regex: /(snomedct:(?:\\w+)?\\d+)/,\n onMatch,\n },\n {\n regex: /(so:\\d{7})/,\n onMatch,\n },\n {\n regex: /(ssbd.dataset:\\d+)/,\n onMatch,\n },\n {\n regex: /(ssbd.project:\\d+)/,\n onMatch,\n },\n {\n regex: /(stitch:\\w{14})/,\n onMatch,\n },\n {\n regex:\n /(string:(?:(?:[A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|(?:[O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])|(?:[0-9][A-Za-z0-9]{3})))/,\n onMatch,\n },\n {\n regex: /(tao:\\d{7})/,\n onMatch,\n },\n {\n regex: /(tcdb:\\d+(?:\\.[A-Z])?(?:\\.\\d+)?(?:\\.\\d+)?(?:\\.\\d+)?)/,\n onMatch,\n },\n {\n regex: /(tcia.collection:[A-Za-z0-9][A-Za-z0-9_\\-\\.]*[A-Za-z0-9])/,\n onMatch,\n },\n {\n regex: /(uberon:\\d+)/,\n onMatch,\n },\n {\n regex: /(unii:[A-Z0-9]+)/,\n onMatch,\n },\n {\n regex: /(uniparc:UPI[A-F0-9]{10})/,\n onMatch,\n },\n {\n regex:\n /(uniprot:(?:(?:[A-N,R-Z][0-9](?:[A-Z][A-Z, 0-9][A-Z, 0-9][0-9]){1,2})|(?:[O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(?:\\.\\d+)?(?:-\\d+)?(?:#PRO_\\d+)?))/,\n onMatch,\n },\n {\n regex:\n /(uniprot.isoform:(?:[A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|(?:[O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(?:\\-\\d+))/,\n onMatch,\n },\n {\n regex: /(uniprot.proteome:UP\\d{9})/,\n onMatch,\n },\n {\n regex:\n /(uniref:UniRef(?:100|90|50)_(?:[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9](?:[A-Z][A-Z0-9]{2}[0-9]){1,2}|UPI[A-F0-9]{10}))/,\n onMatch,\n },\n {\n regex: /(wikidata:(?:Q|P|E|L)\\d+)/,\n onMatch,\n },\n {\n regex: /(wikigenes:\\d+)/,\n onMatch,\n },\n {\n regex: /(wikipathways:WP\\d{1,5}(?:\\_r\\d+)?)/,\n onMatch,\n },\n {\n regex: /(wormbase:(?:CE[0-9]{5}|WB[A-Z][a-z]+\\d+))/,\n onMatch,\n },\n {\n regex: /(xenbase:XB\\-\\w+\\-\\d+)/,\n onMatch,\n },\n {\n regex: /(zenodo.record:\\d+)/,\n onMatch,\n },\n {\n regex: /(zfin:ZDB\\-\\w+\\-\\d+\\-\\d+)/,\n onMatch,\n },\n {\n regex: /(zinc:(?:ZINC)?\\d+)/,\n onMatch,\n },\n]\n"],"mappings":";AAIA,IAAM,KAAW,MAAkB,0BAA0B,KAEhD,IAAmB;CAC9B;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OACE;EACF;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;CACA;EACE,OAAO;EACP;CACF;AACF"}