diff --git a/package-lock.json b/package-lock.json index 9a6355be9..66bae2b44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@apollo/client": "^3.5.10", "@dnd-kit/core": "^4.0.3", "@dnd-kit/sortable": "^5.1.0", - "@ferlab/ui": "^7.14.0", + "@ferlab/ui": "^7.14.2", "@loadable/component": "^5.15.2", "@react-keycloak/core": "^3.2.0", "@react-keycloak/web": "^3.4.0", @@ -2757,9 +2757,9 @@ } }, "node_modules/@ferlab/ui": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@ferlab/ui/-/ui-7.14.0.tgz", - "integrity": "sha512-VwLz/ISxEFeaA9xoNjdm3ryYWsmqqxCUd/M8NSGNKQQBg+9exeMlJFE4tO+9kMxMN4Ea3pHKX63FC9aMOJq4Pg==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@ferlab/ui/-/ui-7.14.2.tgz", + "integrity": "sha512-QQxqxuQe25zfWPfywdhyKbfhIF2TwwBUz9io4s1ksES+PJrESUfGgcCfySykhQNZ9J/OR6PjGPpmKMiVMZcKXA==", "dependencies": { "@ant-design/icons": "^4.7.0", "@dnd-kit/core": "^4.0.3", @@ -35053,9 +35053,9 @@ "dev": true }, "@ferlab/ui": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@ferlab/ui/-/ui-7.14.0.tgz", - "integrity": "sha512-VwLz/ISxEFeaA9xoNjdm3ryYWsmqqxCUd/M8NSGNKQQBg+9exeMlJFE4tO+9kMxMN4Ea3pHKX63FC9aMOJq4Pg==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@ferlab/ui/-/ui-7.14.2.tgz", + "integrity": "sha512-QQxqxuQe25zfWPfywdhyKbfhIF2TwwBUz9io4s1ksES+PJrESUfGgcCfySykhQNZ9J/OR6PjGPpmKMiVMZcKXA==", "requires": { "@ant-design/icons": "^4.7.0", "@dnd-kit/core": "^4.0.3", diff --git a/package.json b/package.json index 0275c9ca6..f3d3b878b 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@apollo/client": "^3.5.10", "@dnd-kit/core": "^4.0.3", "@dnd-kit/sortable": "^5.1.0", - "@ferlab/ui": "^7.14.0", + "@ferlab/ui": "^7.14.2", "@loadable/component": "^5.15.2", "@react-keycloak/core": "^3.2.0", "@react-keycloak/web": "^3.4.0", diff --git a/src/views/DataExploration/components/PageContent/index.tsx b/src/views/DataExploration/components/PageContent/index.tsx index b0cfdc656..f41a17c96 100644 --- a/src/views/DataExploration/components/PageContent/index.tsx +++ b/src/views/DataExploration/components/PageContent/index.tsx @@ -88,7 +88,7 @@ const PageContent = ({ participantMapping, tabId = TAB_IDS.SUMMARY, }: OwnProps) => { - const dispatch = useDispatch(); + const dispatch = useDispatch(); const history = useHistory(); const { savedSets } = useSavedSet(); const { queryList, activeQuery, selectedSavedFilter, savedFilterList } = diff --git a/src/views/VariantEntity/FerlabComponent/EntityGeneConsequence.tsx b/src/views/VariantEntity/FerlabComponent/EntityGeneConsequence.tsx index 6e50ce0f8..46dee17cf 100644 --- a/src/views/VariantEntity/FerlabComponent/EntityGeneConsequence.tsx +++ b/src/views/VariantEntity/FerlabComponent/EntityGeneConsequence.tsx @@ -1,8 +1,10 @@ import React from 'react'; +import { NO_GENE } from '@ferlab/ui/core/components/Consequences/Cell'; import { ProColumnType } from '@ferlab/ui/core/components/ProTable/types'; import { IArrangerEdge } from '@ferlab/ui/core/graphql/types'; import { hydrateResults } from '@ferlab/ui/core/graphql/utils'; import { EntityExpandableTableMultiple } from '@ferlab/ui/core/pages/EntityPage'; + import { IGeneEntity } from '../../../graphql/variants/models'; import EntityGeneConsequenceSubtitle from './EntityGeneConsequenceSubtitle'; @@ -38,22 +40,24 @@ export const EntityGeneConsequences = ({ id={id} loading={loading} tables={ - genes?.map((gene) => ({ - columns, - data: hydrateResults(gene?.node?.consequences?.hits?.edges || []), - subTitle: ( - - ), - })) || [] + genes + ?.filter((gene) => gene.node.symbol !== NO_GENE) + .map((gene) => ({ + columns, + data: hydrateResults(gene?.node?.consequences?.hits?.edges || []), + subTitle: ( + + ), + })) || [] } title={title} /> diff --git a/src/views/VariantEntity/FerlabComponent/Pathogenecity.utils.tsx b/src/views/VariantEntity/FerlabComponent/Pathogenecity.utils.tsx index f41e5bbde..d08e09b50 100644 --- a/src/views/VariantEntity/FerlabComponent/Pathogenecity.utils.tsx +++ b/src/views/VariantEntity/FerlabComponent/Pathogenecity.utils.tsx @@ -6,6 +6,7 @@ import { } from '@ferlab/ui/core/pages/EntityPage/type'; import { groupRowsBySource } from '@ferlab/ui/core/pages/EntityPage/utils/pathogenicity'; import { toKebabCase } from '@ferlab/ui/core/utils/stringUtils'; + import { IGeneCosmic, IGeneDdd, @@ -92,7 +93,7 @@ export const makeUnGroupedDataRows = (genes: IArrangerEdge[]) => { } return genes.map((gene) => { - const rowOrphanet = orphanetFromEdges(gene, gene.node.orphanet.hits.edges || []); + const rowOrphanet = orphanetFromEdges(gene, gene.node.orphanet?.hits?.edges || []); const rowOmim = omimFromEdges(gene, keepOnlyOmimWithId(gene.node.omim?.hits?.edges || [])); const rowCosmic = cosmicFromEdges(gene, gene.node.cosmic?.hits?.edges || []); const rowHpo = hpoFromEdges(gene, gene.node.hpo?.hits?.edges || []); diff --git a/src/views/VariantEntity/utils/consequences.tsx b/src/views/VariantEntity/utils/consequences.tsx index 4cf091e5f..a0a79dd2f 100644 --- a/src/views/VariantEntity/utils/consequences.tsx +++ b/src/views/VariantEntity/utils/consequences.tsx @@ -13,11 +13,12 @@ import { } from '@ferlab/ui/core/pages/EntityPage/utils/consequences'; import { removeUnderscoreAndCapitalize } from '@ferlab/ui/core/utils/stringUtils'; import { Space, Tooltip, Typography } from 'antd'; -import { IConsequenceEntity, Impact } from '../../../graphql/variants/models'; import { capitalize } from 'lodash'; import { TABLE_EMPTY_PLACE_HOLDER } from 'common/constants'; import { getEntityConsequenceDictionary } from 'utils/translation'; + +import { IConsequenceEntity, Impact } from '../../../graphql/variants/models'; const { Text } = Typography; import { getPredictionScore } from '../FerlabComponent/Consequences.utils'; diff --git a/src/views/VariantEntity/utils/summary.tsx b/src/views/VariantEntity/utils/summary.tsx index 6c13e9fb4..cf9e5a271 100644 --- a/src/views/VariantEntity/utils/summary.tsx +++ b/src/views/VariantEntity/utils/summary.tsx @@ -1,4 +1,5 @@ import intl from 'react-intl-universal'; +import { NO_GENE } from '@ferlab/ui/core/components/Consequences/Cell'; import ExternalLink from '@ferlab/ui/core/components/ExternalLink'; import { IEntitySummaryColumns } from '@ferlab/ui/core/pages/EntityPage/EntitySummary'; import { @@ -49,22 +50,24 @@ export const getSummaryItems = (variant?: IVariantEntity): IEntitySummaryColumns }, { label: intl.get('screen.variants.summary.genes'), - value: variant?.genes?.hits?.edges?.length - ? variant.genes.hits.edges.map((gene) => { - if (!gene?.node?.symbol) { - return; - } - return ( - - {gene.node.symbol} - - ); - }) - : TABLE_EMPTY_PLACE_HOLDER, + value: + variant?.genes?.hits?.edges?.length && + variant.genes.hits.edges.filter((gene) => gene?.node?.symbol !== NO_GENE).length + ? variant.genes.hits.edges.map((gene) => { + if (!gene?.node?.symbol) { + return; + } + return ( + + {gene.node.symbol} + + ); + }) + : TABLE_EMPTY_PLACE_HOLDER, }, { label: intl.get('screen.variants.summary.omim'), diff --git a/src/views/Variants/components/PageContent/index.tsx b/src/views/Variants/components/PageContent/index.tsx index 55a6087f9..c39bd238f 100644 --- a/src/views/Variants/components/PageContent/index.tsx +++ b/src/views/Variants/components/PageContent/index.tsx @@ -56,7 +56,7 @@ const addTagToFilter = (filter: ISavedFilter) => ({ }); const PageContent = ({ variantMapping }: OwnProps) => { - const dispatch = useDispatch(); + const dispatch = useDispatch(); const { userInfo } = useUser(); const { savedSets } = useSavedSet(); const { queryList, activeQuery, selectedSavedFilter, savedFilterList } =