From 733a6f7d9d7e6127231cdf3940a592b24e33eb7b Mon Sep 17 00:00:00 2001 From: bioinsilico Date: Tue, 28 Nov 2023 16:09:34 -0800 Subject: [PATCH] `SingleFacets` cyclic dependency bug fixed --- CHANGELOG.md | 4 +++ package.json | 2 +- src/RcsbSeacrh/FacetStore/SingleFacets.ts | 39 +++++++++++------------ src/RcsbSeacrh/SearchQueryTools.ts | 7 ++-- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9bb0dfe3..448c6bdeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ [Semantic Versioning](https://semver.org/) +## [6.0.3] - 2023-11-28 +### Bug fix +- `SingleFacets` cyclic dependency bug fixed + ## [6.0.2] - 2023-11-28 ### Improvement - `FacetMemberInterface.facetConfig` interface attribute to encode histogram data transformations and other configuration diff --git a/package.json b/package.json index b6a3cb33a..98de398c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rcsb/rcsb-saguaro-app", - "version": "6.0.2", + "version": "6.0.3", "description": "RCSB 1D Saguaro Web App", "main": "build/app.js", "files": [ diff --git a/src/RcsbSeacrh/FacetStore/SingleFacets.ts b/src/RcsbSeacrh/FacetStore/SingleFacets.ts index 1c0bafaf3..93a7d10b6 100644 --- a/src/RcsbSeacrh/FacetStore/SingleFacets.ts +++ b/src/RcsbSeacrh/FacetStore/SingleFacets.ts @@ -5,8 +5,7 @@ import {ChartType} from "@rcsb/rcsb-charts/lib/RcsbChartComponent/ChartConfigInt import {ChartDataValueInterface} from "@rcsb/rcsb-charts/lib/RcsbChartDataProvider/ChartDataProviderInterface"; import {GroupChartMap} from "../../RcsbGroupWeb/RcsbGroupView/RcsbGroupChart/GroupChartTools"; import {BucketDataType} from "@rcsb/rcsb-search-tools/lib/SearchParseTools/SearchFacetInterface"; -import {SearchQueryTools as SQT} from "../SearchQueryTools"; - +import {buildAttributeQuery} from "@rcsb/rcsb-search-tools/lib/SearchQueryTools/SearchQueryTools"; export const EXPERIMENTAL_METHOD_FACET: FacetMemberInterface = { id: "method", @@ -122,26 +121,26 @@ export const CHIMERIC_FACET: FacetMemberInterface = { }, bucketClickSearchQuery: (datum, data, e) => { if(datum.x == "Wild Type") - return SQT.searchAttributeQuery( - CHIMERIC_FACET.attribute, - 1, - Operator.Equals, - Service.Text - ); + return buildAttributeQuery({ + attribute: CHIMERIC_FACET.attribute, + value: 1, + operator: Operator.Equals, + service: Service.Text + }); else if(datum.x == "Synthetic") - return SQT.searchAttributeQuery( - CHIMERIC_FACET.attribute, - 0, - Operator.Equals, - Service.Text - ); + return buildAttributeQuery({ + attribute: CHIMERIC_FACET.attribute, + value: 0, + operator: Operator.Equals, + service: Service.Text + }); else - return SQT.searchAttributeQuery( - CHIMERIC_FACET.attribute, - 1, - Operator.Greater, - Service.Text - ); + return buildAttributeQuery({ + attribute: CHIMERIC_FACET.attribute, + value: 1, + operator: Operator.Greater, + service: Service.Text + }); } }, facet: { diff --git a/src/RcsbSeacrh/SearchQueryTools.ts b/src/RcsbSeacrh/SearchQueryTools.ts index 8cfb25950..6df631281 100644 --- a/src/RcsbSeacrh/SearchQueryTools.ts +++ b/src/RcsbSeacrh/SearchQueryTools.ts @@ -16,15 +16,16 @@ import { import {FacetStoreInterface} from "./FacetStore/FacetStoreInterface"; import {cloneDeep} from 'lodash'; import {GroupProvenanceId} from "@rcsb/rcsb-api-tools/build/RcsbDw/Types/DwEnums"; -import {depositionGroupFacetStore} from "./FacetStore/DepositionGroupFacetStore"; -import {sequenceGroupFacetStore} from "./FacetStore/SequenceGroupFacetStore"; -import {uniprotGroupFacetStore} from "./FacetStore/UniprotGroupFacetStore"; import {SearchQueryType} from "@rcsb/rcsb-search-tools/lib/SearchQueryTools/SearchQueryInterfaces"; import { buildAttributeQuery, buildRequestFromCombinedSearchQuery, buildRequestFromSearchQuery } from "@rcsb/rcsb-search-tools/lib/SearchQueryTools/SearchQueryTools"; +import {depositionGroupFacetStore} from "./FacetStore/DepositionGroupFacetStore"; +import {sequenceGroupFacetStore} from "./FacetStore/SequenceGroupFacetStore"; +import {uniprotGroupFacetStore} from "./FacetStore/UniprotGroupFacetStore"; + export namespace SearchQueryTools { export function searchGroupQuery(groupProvenance: GroupProvenanceId, groupId: string, service?: Service.Text | Service.TextChem): SearchQueryType {