diff --git a/components/ServerDbTable.vue b/components/ServerDbTable.vue index c0726879f44fda662b8390bd6cf1436684a31dfd..fdabd8a52d59a1c6dcbd2d6ad05477ef1634a50e 100644 --- a/components/ServerDbTable.vue +++ b/components/ServerDbTable.vue @@ -137,7 +137,8 @@ const msError = computed(() => { async function searchOrFilter() { try { loading.value = true - const q = queryInputValue.value === null ? "" : queryInputValue.value + // const q = queryInputValue.value === null ? "" : queryInputValue.value + const q = search.value await msSearch(q, { ...reactiveParams, filter: msFilter.value, sort: msSortBy.value }) } catch (error: any) { filterError.value = error @@ -188,10 +189,11 @@ watch(filterInputValues, (newSoF) => { } }) -watch(queryInputValue, (newQuery) => { - searchOrFilter() +watch(search, () => { searchOrFilter() }) +// watch(queryInputValue, (newQuery) => { +// searchOrFilter() -}) +// }) const filterStep = computed(() => { return filterInputValues.value !== null && filterInputValues.value.length > 0 ? filterInputValues.value?.length % 3 : null @@ -322,40 +324,41 @@ function runTextSearch() { </script> <template> <v-card flat> - <v-toolbar floating color="transparent"> - - <v-col cols="5"> - <v-text-field label="Search..." hide-details prepend-inner-icon="mdi-magnify" single-line></v-text-field> - </v-col> - <v-col> - <v-autocomplete ref="autocompleteInput" hide-details single-line v-model:search="search" - v-model:model-value="filterOrSearch" auto-select-first chips clearable label="Filter results..." - :items="autocompleteItems" item-value="value" item-title="title" multiple return-object - append-inner-icon="md:search" @click:appendInner="searchOrFilter" @click:clear="clearFilterOrSearch" - @update:modelValue="() => clearSearch()"> - <template #chip="{ props, item, index }"> - - - <v-chip v-bind="props" :text="item.raw.title" :closable="item.props.deletable" - @click:close="item.props.type === 'text' ? deleteTextFilter(index) : deleteOneFilter(index)"></v-chip> - <!-- <v-chip v-if="(index + 1) % 3 === 0" v-bind="props" :text="item.raw.title" closable + <v-card-text> + <v-row> + <v-col cols="5"> + <v-text-field v-model="search" label="Search..." hide-details prepend-inner-icon="mdi-magnify" + single-line clearable></v-text-field> + </v-col> + <v-col> + <v-autocomplete ref="autocompleteInput" hide-details v-model:model-value="filterOrSearch" + auto-select-first chips clearable label="Filter results..." :items="autocompleteItems" single-line + item-value="value" item-title="title" multiple return-object prepend-inner-icon="md:search" + @click:appendInner="searchOrFilter" @click:clear="clearFilterOrSearch" + @update:modelValue="() => clearSearch()"> + <template #chip="{ props, item, index }"> + + + <v-chip v-bind="props" :text="item.raw.title" :closable="item.props.deletable" + @click:close="item.props.type === 'text' ? deleteTextFilter(index) : deleteOneFilter(index)"></v-chip> + <!-- <v-chip v-if="(index + 1) % 3 === 0" v-bind="props" :text="item.raw.title" closable @click:close="deleteOneFilter(index)"></v-chip> <v-chip v-else v-bind="props" :text="item.raw.title"></v-chip> --> - </template> - <template #item="{ props, item }"> - <v-list-item v-bind="{ ...props, active: false, onClick: () => selectItem(item) }" - :title="item.title" :subtitle="item.raw?.count ? item.raw.count : ''" :value="props.value"> - - </v-list-item> - </template> - <!-- <template #no-data></template> + </template> + <template #item="{ props, item }"> + <v-list-item v-bind="{ ...props, active: false, onClick: () => selectItem(item) }" + :title="item.title" :subtitle="item.raw?.count ? item.raw.count : ''" :value="props.value"> + + </v-list-item> + </template> + <!-- <template #no-data></template> <template #prepend-item> <v-list-item v-if="canAddTextSearch" :title="`Text search: ${search}`" @click="runTextSearch"> </v-list-item> </template> --> - </v-autocomplete> - </v-col> - - </v-toolbar> + </v-autocomplete> + </v-col> + </v-row> + </v-card-text> <v-data-table-server v-if="!msError" v-model:page="reactiveParams.page" v-model:items-per-page="reactiveParams.hitsPerPage" v-model:sortBy="sortByRef" fixed-header :loading="loading" :headers="headers" :items="msResult?.hits ?? []" :items-length="msResult?.totalHits ?? 0" diff --git a/components/content/RefseqDb.vue b/components/content/RefseqDb.vue index 68c2793b5c7dda596158d90eaee927a762b16cbd..5ba5db4687417460f3ef9b897256774a2602140f 100644 --- a/components/content/RefseqDb.vue +++ b/components/content/RefseqDb.vue @@ -10,7 +10,8 @@ const facetStore = useFacetsStore() const sortBy: Ref<{ key: string, order: string }[]> = ref([{ key: 'type', order: "asc" }]) const itemValue = ref("id"); const { width } = useDisplay(); - +const distriTaxoFullscreen = ref(false) +const distriSystemFullscreen = ref(false) const facets = ref([ "type", "Superkingdom", @@ -134,27 +135,34 @@ function capitalize([first, ...rest]) { </script> <template> - <v-row> - <v-col cols="6"> - <v-card flat class="my-3"> - <v-card-title> Systems Distribution</v-card-title> - - <v-card-text> - <PlotFigure :options="unref(computedDistriSystemOptions)" defer></PlotFigure> - </v-card-text> - </v-card> - </v-col> - <v-col cols="6"> - <v-card flat :loading="pending"> - <v-card-title> Taxonomic Distribution</v-card-title> - <v-card-text> - <v-select v-model="selectedTaxoRank" :items="availableTaxo" density="compact" - label="Select taxonomic rank"></v-select> - <PlotFigure defer :options="unref(computedDistriTaxoOptions)"></PlotFigure> - </v-card-text> - </v-card> - </v-col> - </v-row> + <v-card flat class="mb-2"> + <v-row align="start" class="mb-2"> + <v-col :cols="distriSystemFullscreen ? 12 : 6" :class="distriTaxoFullscreen ? 'd-none' : null"> + <v-card flat class="my-3"> + <v-card-title> Systems Distribution <v-btn variant="plain" + :icon="distriSystemFullscreen ? 'md:fullscreen_exit' : 'md:fullscreen'" + @click="distriSystemFullscreen = !distriSystemFullscreen"></v-btn></v-card-title> + + <v-card-text> + <PlotFigure :options="unref(computedDistriSystemOptions)" defer></PlotFigure> + </v-card-text> + </v-card> + </v-col> + <v-col :cols="distriTaxoFullscreen ? 12 : 6" :class="distriSystemFullscreen ? 'd-none' : null"> + <v-card flat> + <v-card-title> Taxonomic Distribution <v-btn variant="plain" + :icon="distriTaxoFullscreen ? 'md:fullscreen_exit' : 'md:fullscreen'" + @click="distriTaxoFullscreen = !distriTaxoFullscreen"></v-btn></v-card-title> + <v-card-text> + <v-select v-model="selectedTaxoRank" :items="availableTaxo" density="compact" + label="Select taxonomic rank"></v-select> + <PlotFigure defer :options="unref(computedDistriTaxoOptions)"></PlotFigure> + </v-card-text> + </v-card> + </v-col> + </v-row> + </v-card> + <ServerDbTable title="RefSeq" db="refseq" :sortBy="sortBy" :headers="computedHeaders" :item-value="itemValue" :facets="facets"> </ServerDbTable> diff --git a/content/4.refseq.md b/content/4.refseq.md index 21e92f20b81a4fd849ba9f359ecb023f69feaf80..f55ac77a3f87a98d2d22d0302d08f8f407898798 100644 --- a/content/4.refseq.md +++ b/content/4.refseq.md @@ -5,7 +5,6 @@ navigation: false -# Refseq ::refseq-db diff --git a/content/5.predicted-structure.md b/content/5.predicted-structure.md index 40299d4a04b9bef24ed621404cc5a6d2df0db290..859a7b74f16fa183f2e26839650e482ef3be0eec 100644 --- a/content/5.predicted-structure.md +++ b/content/5.predicted-structure.md @@ -3,7 +3,6 @@ layout: db navigation: false --- -# Predicted Structures ::structure-db