From e973a16e4f6b13d9a77f1983d99685b6d302170b Mon Sep 17 00:00:00 2001 From: David Mendez <dmendez@ebi.ac.uk> Date: Wed, 6 Oct 2021 14:16:45 +0100 Subject: [PATCH] Eubopen search: Implement highlights in results page. --- .../free_text/CompoundsResults.vue | 44 ------------------- .../free_text/EntitySearchResults.vue | 1 + .../free_text/FreeTextResults.vue | 1 + .../free_text/TargetsResults.vue | 42 ------------------ web-components-submodule | 2 +- 5 files changed, 3 insertions(+), 87 deletions(-) delete mode 100644 components/search_results/free_text/CompoundsResults.vue delete mode 100644 components/search_results/free_text/TargetsResults.vue diff --git a/components/search_results/free_text/CompoundsResults.vue b/components/search_results/free_text/CompoundsResults.vue deleted file mode 100644 index cfde3b0..0000000 --- a/components/search_results/free_text/CompoundsResults.vue +++ /dev/null @@ -1,44 +0,0 @@ -<template> - <SearchResultsCard - :store-module-name="storeModuleName" - :dataset-state="datasetState" - /> -</template> - -<script> -import CompoundResults from '~/web-components-submodule/store/datasets/generators/eubopen/searchResults/CompoundResults.js' -import { datasetMixin } from '~/web-components-submodule/mixins/datasets/datasetMixin.js' -import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js' -import SearchResultsCard from '~/web-components-submodule/components/common/SearchResults/SearchResultsCard.vue' - -export default { - components: { - SearchResultsCard, - }, - mixins: [datasetMixin], - props: { - storeModuleName: { - type: String, - default: () => `eubopen_compound_results`, - }, - }, - data() { - return { - propertiesGroups: { - 1: { id: 'eubopen_search_results', selected: true, allHeaders: [] }, - }, - entityID: EntityNames.EubopenCompound.entityID, - pluralEntityName: EntityNames.EubopenCompound.pluralEntityName, - } - }, - computed: { - starterParams() { - return CompoundResults.getSearchResultsStarterParams( - this.propertiesGroups - ) - }, - }, -} -</script> - -<style></style> diff --git a/components/search_results/free_text/EntitySearchResults.vue b/components/search_results/free_text/EntitySearchResults.vue index 9abf85d..e7d949e 100644 --- a/components/search_results/free_text/EntitySearchResults.vue +++ b/components/search_results/free_text/EntitySearchResults.vue @@ -33,6 +33,7 @@ export default { 1: { id: 'eubopen_search_results', selected: true, allHeaders: [] }, }, entityID: this.entityResultsConfig.entityID, + searchTerm: this.entityResultsConfig.searchTerm, pluralEntityName: EntityNames[this.entityResultsConfig.entityID].pluralEntityName, } diff --git a/components/search_results/free_text/FreeTextResults.vue b/components/search_results/free_text/FreeTextResults.vue index b21afda..2838ce8 100644 --- a/components/search_results/free_text/FreeTextResults.vue +++ b/components/search_results/free_text/FreeTextResults.vue @@ -88,6 +88,7 @@ export default { resultsPerEntity.push({ entityID: entityKey, searchQuery: entityResults, + searchTerm: this.searchTerm, }) if (entityKey === highestScoringEntity) { this.selectedTab = currentIndex diff --git a/components/search_results/free_text/TargetsResults.vue b/components/search_results/free_text/TargetsResults.vue deleted file mode 100644 index d1d9744..0000000 --- a/components/search_results/free_text/TargetsResults.vue +++ /dev/null @@ -1,42 +0,0 @@ -<template> - <SearchResultsCard - :store-module-name="storeModuleName" - :dataset-state="datasetState" - /> -</template> - -<script> -import TargetResults from '~/web-components-submodule/store/datasets/generators/eubopen/searchResults/TargetResults.js' -import SearchResultsCard from '~/web-components-submodule/components/common/SearchResults/SearchResultsCard.vue' -import { datasetMixin } from '~/web-components-submodule/mixins/datasets/datasetMixin.js' -import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js' - -export default { - components: { - SearchResultsCard, - }, - mixins: [datasetMixin], - props: { - storeModuleName: { - type: String, - default: () => `eubopen_target_results`, - }, - }, - data() { - return { - propertiesGroups: { - 1: { id: 'eubopen_search_results', selected: true, allHeaders: [] }, - }, - entityID: EntityNames.EubopenTarget.entityID, - pluralEntityName: EntityNames.EubopenTarget.pluralEntityName, - } - }, - computed: { - starterParams() { - return TargetResults.getSearchResultsStarterParams(this.propertiesGroups) - }, - }, -} -</script> - -<style></style> diff --git a/web-components-submodule b/web-components-submodule index 1bcfae9..8b32108 160000 --- a/web-components-submodule +++ b/web-components-submodule @@ -1 +1 @@ -Subproject commit 1bcfae97878d4d0ad238704194df546f76d8c1b6 +Subproject commit 8b321085926059824db8192fff2d2bc70a28c1a7 -- GitLab