diff --git a/CHANGELOG b/CHANGELOG index 9eeab52fa77f5ad0bf33727bb31f4acc2a4f89a1..6a39df06153f9c662122a976baa6745e8e3b6e5a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,13 @@ minerva-front (19.0.0~alpha.0) stable; urgency=medium -- Piotr Gawron <piotr.gawron@uni.lu> Fri, 18 Oct 2024 13:00:00 +0200 +minerva-front (18.0.3) stable; urgency=medium + * Bug fix: Molart froze after clicking (#313) + * Bug fix: missing description and modifications added to element and + reaction summary (#314) + + -- Piotr Gawron <piotr.gawron@uni.lu> Fri, 08 Nov 2024 13:00:00 +0200 + minerva-front (18.0.2) stable; urgency=medium * Bug fix: Terms of Service modal is not hidden by Select project modal when login via ORCID (#305) @@ -17,7 +24,7 @@ minerva-front (18.0.2) stable; urgency=medium -- Piotr Gawron <piotr.gawron@uni.lu> Wed, 30 Oct 2024 13:00:00 +0200 minerva-front (18.0.1) stable; urgency=medium - * Bug fix: show cookie baner only when cookie baner link is provided (#304) + * Bug fix: show cookie banner only when cookie banner link is provided (#304) * Bug fix: when link to submap is provided add submap name (#303) * Bug fix: some old maps could not be opened (#311) diff --git a/package-lock.json b/package-lock.json index a8c77b0daf921b7a27c57979e477ca57e1f6d196..77d0a6c9888306f99de8fca6b475bf1d921583c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "downshift": "8.3.1", "eslint-config-next": "13.4.19", "is-uuid": "1.0.2", - "molart": "github:davidhoksza/MolArt", + "molart": "1.15.0", "next": "13.4.19", "ol": "10.2.0", "polished": "4.3.1", @@ -10442,22 +10442,22 @@ } }, "node_modules/molart": { - "version": "1.16.0", - "resolved": "git+ssh://git@github.com/davidhoksza/MolArt.git#7fa1d23558af0938bd74621ff2ee125f9a4c8d05", - "license": "Apache-2.0", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/molart/-/molart-1.15.0.tgz", + "integrity": "sha512-9Mq880f/wEh0uQz/pvwNJPA3Fe+ZQZH19/K0yfU9ruNFLoouxzfza6Bc6NU9o7IIv8PULQbXyNToO6HPeaUxTw==", "dependencies": { "@types/downloadjs": "^1.4.2", - "color-blend": "1.0.0", + "color-blend": "^1.0.0", "downloadjs": "^1.4.7", "events": "^1.1.1", "jquery": "^3.6.0", "litemol": "github:dsehnal/LiteMol", "lodash": "^4.17.21", "ProtVista": "git+https://github.com/davidhoksza/protvista.git#scaling", - "semantic-ui-button": "2.2.12", - "semantic-ui-dropdown": "2.2.12", - "semantic-ui-label": "2.2.12", - "semantic-ui-transition": "2.2.12" + "semantic-ui-button": "^2.3.2", + "semantic-ui-dropdown": "^2.2.12", + "semantic-ui-label": "^2.2.12", + "semantic-ui-transition": "^2.2.12" } }, "node_modules/moo-color": { @@ -12319,9 +12319,9 @@ "integrity": "sha512-xvTNwcbeDayXotnV32zLb3duQsP+4XosHpb/F+tu6VzEZFmIjzPdNk6/O+QOOx5XTh08KL2ufdXeCO33p380pQ==" }, "node_modules/semantic-ui-button": { - "version": "2.2.12", - "resolved": "https://registry.npmjs.org/semantic-ui-button/-/semantic-ui-button-2.2.12.tgz", - "integrity": "sha512-z5E23bbb2txw60/Dgekf/1qDyFvU1JahiG05/XqOLaLCutXoep3cMtcFRoeyID6b2EwPQ84IHFXVskL3LNXQuQ==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/semantic-ui-button/-/semantic-ui-button-2.5.0.tgz", + "integrity": "sha512-Td9gq4hO97Wz/9SbW1ZOQvm2+GiHjomCKfo3tbk8QTcMMKO3C4nsirxOf6IFqXxaOoYfrOlsw/srGD7shHcIqA==" }, "node_modules/semantic-ui-dropdown": { "version": "2.2.12", @@ -21721,21 +21721,22 @@ "dev": true }, "molart": { - "version": "git+ssh://git@github.com/davidhoksza/MolArt.git#7fa1d23558af0938bd74621ff2ee125f9a4c8d05", - "from": "molart@github:davidhoksza/MolArt", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/molart/-/molart-1.15.0.tgz", + "integrity": "sha512-9Mq880f/wEh0uQz/pvwNJPA3Fe+ZQZH19/K0yfU9ruNFLoouxzfza6Bc6NU9o7IIv8PULQbXyNToO6HPeaUxTw==", "requires": { "@types/downloadjs": "^1.4.2", - "color-blend": "1.0.0", + "color-blend": "^1.0.0", "downloadjs": "^1.4.7", "events": "^1.1.1", "jquery": "^3.6.0", "litemol": "github:dsehnal/LiteMol", "lodash": "^4.17.21", "ProtVista": "git+https://github.com/davidhoksza/protvista.git#scaling", - "semantic-ui-button": "2.2.12", - "semantic-ui-dropdown": "2.2.12", - "semantic-ui-label": "2.2.12", - "semantic-ui-transition": "2.2.12" + "semantic-ui-button": "^2.3.2", + "semantic-ui-dropdown": "^2.2.12", + "semantic-ui-label": "^2.2.12", + "semantic-ui-transition": "^2.2.12" } }, "moo-color": { @@ -22984,9 +22985,9 @@ "integrity": "sha512-xvTNwcbeDayXotnV32zLb3duQsP+4XosHpb/F+tu6VzEZFmIjzPdNk6/O+QOOx5XTh08KL2ufdXeCO33p380pQ==" }, "semantic-ui-button": { - "version": "2.2.12", - "resolved": "https://registry.npmjs.org/semantic-ui-button/-/semantic-ui-button-2.2.12.tgz", - "integrity": "sha512-z5E23bbb2txw60/Dgekf/1qDyFvU1JahiG05/XqOLaLCutXoep3cMtcFRoeyID6b2EwPQ84IHFXVskL3LNXQuQ==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/semantic-ui-button/-/semantic-ui-button-2.5.0.tgz", + "integrity": "sha512-Td9gq4hO97Wz/9SbW1ZOQvm2+GiHjomCKfo3tbk8QTcMMKO3C4nsirxOf6IFqXxaOoYfrOlsw/srGD7shHcIqA==" }, "semantic-ui-dropdown": { "version": "2.2.12", diff --git a/package.json b/package.json index 1af11969e0c145b489c02814b0f62d0c0554fb43..a19fb274a4bdcc004b41353e7c7da027bc5d5cd2 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "downshift": "8.3.1", "eslint-config-next": "13.4.19", "is-uuid": "1.0.2", - "molart": "github:davidhoksza/MolArt", + "molart": "1.15.0", "next": "13.4.19", "ol": "10.2.0", "polished": "4.3.1", diff --git a/src/components/FunctionalArea/Modal/MolArtModal/MolArtModal.component.tsx b/src/components/FunctionalArea/Modal/MolArtModal/MolArtModal.component.tsx index 73a3e0f00a6a92c1374cc84bd2b554e5e181404f..8e5483d381e690f4bb5fa445050012720244d4be 100644 --- a/src/components/FunctionalArea/Modal/MolArtModal/MolArtModal.component.tsx +++ b/src/components/FunctionalArea/Modal/MolArtModal/MolArtModal.component.tsx @@ -21,6 +21,7 @@ export const MolArtModal: React.FC = () => { molart = new MolArt({ uniprotId: uniprot, containerId, + customDataSources: [], }); } catch (e) { // eslint-disable-next-line no-console diff --git a/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx b/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx index 6d8f627c22e443de30fde139ed5a4612d87b1d95..853c8e22a178ad7489022c3a49640ca3c68384b0 100644 --- a/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx +++ b/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx @@ -14,6 +14,7 @@ import { DrawerHeading } from '@/shared/DrawerHeading'; import { ElementSearchResultType } from '@/types/models'; import { CommentItem } from '@/components/Map/Drawer/BioEntityDrawer/Comments/CommentItem.component'; import { getTypeBySBOTerm } from '@/utils/bioEntity/getTypeBySBOTerm'; +import { ModificationResidueItem } from '@/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem'; import { CollapsibleSection } from '../ExportDrawer/CollapsibleSection'; import { AnnotationItem } from './AnnotationItem'; import { AssociatedSubmap } from './AssociatedSubmap'; @@ -42,6 +43,10 @@ export const BioEntityDrawer = (): React.ReactNode => { const isReferenceAvailable = bioEntityData.references.length > ZERO; const isCommentAvailable = commentsData.length > ZERO; + const modificationResidues = ( + bioEntityData.modificationResidues ? bioEntityData.modificationResidues : [] + ).filter(modificationResidue => modificationResidue.state && modificationResidue.state !== ''); + const isModificationAvailable = modificationResidues.length > ZERO; const type = getTypeBySBOTerm(bioEntityData.sboTerm); @@ -64,6 +69,17 @@ export const BioEntityDrawer = (): React.ReactNode => { Full name: <b className="font-semibold">{bioEntityData.fullName}</b> </div> )} + {bioEntityData.notes && <div className="text-sm font-normal">{bioEntityData.notes}</div>} + {isModificationAvailable && ( + <h3 className="font-semibold">Post-translational modifications:</h3> + )} + {isModificationAvailable && ( + <ul className="ml-5 list-disc"> + {modificationResidues.map(residue => ( + <ModificationResidueItem key={residue.id} state={residue.state} name={residue.name} /> + ))} + </ul> + )} <h3 className="font-semibold"> Annotations:{' '} {!isReferenceAvailable && <span className="font-normal">No annotations</span>} diff --git a/src/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem/ModificationResidueItem.component.tsx b/src/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem/ModificationResidueItem.component.tsx new file mode 100644 index 0000000000000000000000000000000000000000..6aee2f8c6f5a2f5c5cb6e61459c0426591d2679c --- /dev/null +++ b/src/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem/ModificationResidueItem.component.tsx @@ -0,0 +1,14 @@ +import { ModificationResidue } from '@/types/models'; + +type ModificationResidueItemProps = Pick<ModificationResidue, 'state' | 'name'>; + +export const ModificationResidueItem = ({ + state, + name, +}: ModificationResidueItemProps): JSX.Element => ( + <li> + <span> + {state} {name && <span>at position {name}</span>} + </span> + </li> +); diff --git a/src/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem/index.ts b/src/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..222316a9294eb1053e1938beeebb854d2923d82b --- /dev/null +++ b/src/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem/index.ts @@ -0,0 +1 @@ +export { ModificationResidueItem } from './ModificationResidueItem.component'; diff --git a/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx b/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx index ea1396ea0af8a1956983723000c72c5a2f4e91c2..1423ef7d11a71e2b51e8206a047ba28d3c0e4d83 100644 --- a/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx +++ b/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx @@ -37,6 +37,7 @@ export const ReactionDrawer = (): React.ReactNode => { Type: <b className="font-semibold">{reaction.type}</b> </div> <hr className="border-b border-b-divide" /> + {reaction.notes && <div className="text-sm font-normal">{reaction.notes}</div>} <h3 className="font-semibold">Annotations:</h3> {referencesGrouped.map(group => ( <ReferenceGroup key={group.source} group={group} /> diff --git a/src/types/models.ts b/src/types/models.ts index a8e996c6b250725e0244c80715a64e4f771fd510..35d90c37ca5d2b5f8bce51eb29a7afdb46f6e703 100644 --- a/src/types/models.ts +++ b/src/types/models.ts @@ -83,6 +83,7 @@ import { shapeRelAbsBezierPointSchema } from '@/models/shapeRelAbsBezierPointSch import { newReactionSchema } from '@/models/newReactionSchema'; import { reactionProduct } from '@/models/reactionProduct'; import { operatorSchema } from '@/models/operatorSchema'; +import { modificationResiduesSchema } from '@/models/modificationResiduesSchema'; export type Project = z.infer<typeof projectSchema>; export type OverviewImageView = z.infer<typeof overviewImageView>; @@ -164,6 +165,7 @@ export type MarkerSurface = z.infer<typeof markerSurfaceSchema>; export type MarkerLine = z.infer<typeof markerLineSchema>; export type MarkerWithPosition = z.infer<typeof markerWithPositionSchema>; export type Marker = z.infer<typeof markerSchema>; +export type ModificationResidue = z.infer<typeof modificationResiduesSchema>; export type JavaStacktrace = z.infer<typeof javaStacktraceSchema>; export type Comment = z.infer<typeof commentSchema>;