gramene-search 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -6
package/dist/index.js
CHANGED
|
@@ -634,11 +634,16 @@ const $9d9aeaf9299e61a1$var$grameneTaxDist = {
|
|
|
634
634
|
};
|
|
635
635
|
},
|
|
636
636
|
selectGrameneTaxDist: (0, $gXNCa$reduxbundler.createSelector)('selectGrameneSearch', 'selectGrameneTaxonomy', 'selectGrameneMaps', (grameneSearch, grameneTaxonomy, grameneMaps)=>{
|
|
637
|
-
|
|
637
|
+
// The bin facet can be absent during a saved-view restore (a search is
|
|
638
|
+
// present but its faceted response with `fixed_1000__bin` hasn't landed
|
|
639
|
+
// yet, or a non-faceted search is transiently in state). Bail to null
|
|
640
|
+
// until it's there rather than crashing on `a.length`.
|
|
641
|
+
const binFacet = grameneSearch && grameneSearch.facet_counts && grameneSearch.facet_counts.facet_fields && grameneSearch.facet_counts.facet_fields.fixed_1000__bin;
|
|
642
|
+
if (binFacet && grameneTaxonomy && grameneMaps) {
|
|
638
643
|
(0, ($parcel$interopDefault($gXNCa$lodash))).forIn(grameneMaps, (map, tid)=>{
|
|
639
|
-
grameneTaxonomy[tid].name = map.display_name;
|
|
644
|
+
if (grameneTaxonomy[tid]) grameneTaxonomy[tid].name = map.display_name;
|
|
640
645
|
});
|
|
641
|
-
const binnedResults = $9d9aeaf9299e61a1$var$formatFacetCountsForViz(
|
|
646
|
+
const binnedResults = $9d9aeaf9299e61a1$var$formatFacetCountsForViz(binFacet);
|
|
642
647
|
let speciesTree = (0, ($parcel$interopDefault($gXNCa$gramenetreesclientsrctaxonomy))).tree(Object.values(grameneTaxonomy));
|
|
643
648
|
let binMapper = (0, ($parcel$interopDefault($gXNCa$gramenebinsclientsrcbins)))(grameneMaps);
|
|
644
649
|
let taxDist = (0, $gXNCa$gramenetaxonomywithgenomes.build)(binMapper, speciesTree);
|
|
@@ -1618,14 +1623,16 @@ const $24971af0a229e0e3$var$grameneViews = {
|
|
|
1618
1623
|
const touched = raw.touched || {};
|
|
1619
1624
|
const numFound = search && search.response && search.response.numFound || 0;
|
|
1620
1625
|
const hasFilters = !!(filters && filters.rightIdx > 1);
|
|
1626
|
+
// Views whose content depends on a current search: auto-off when no
|
|
1627
|
+
// filters are set or no results came back. userLists is deliberately
|
|
1628
|
+
// NOT here — it's user-owned and meaningful regardless of search state.
|
|
1621
1629
|
const resultDependentIds = new Set([
|
|
1622
1630
|
'taxonomy',
|
|
1623
1631
|
'taxTree',
|
|
1624
1632
|
'list',
|
|
1625
1633
|
'export',
|
|
1626
1634
|
'exprViz',
|
|
1627
|
-
'ontologyEnrichment'
|
|
1628
|
-
'userLists'
|
|
1635
|
+
'ontologyEnrichment'
|
|
1629
1636
|
]);
|
|
1630
1637
|
const autoDisable = numFound === 0 || !hasFilters;
|
|
1631
1638
|
const hasFirebase = !!(config && config.firebaseConfig);
|
|
@@ -17944,8 +17951,8 @@ function $15504f5eba8e73bd$var$computeSelectedTaxa({ grameneSearch: grameneSearc
|
|
|
17944
17951
|
const selected = {};
|
|
17945
17952
|
if (!grameneSearch) return selected;
|
|
17946
17953
|
if (collapseEmpties) {
|
|
17947
|
-
const tids = grameneSearch.facet_counts.facet_fields.taxon_id;
|
|
17948
|
-
for(let i = 0; i < tids.length; i += 2)selected[tids[i]] = true;
|
|
17954
|
+
const tids = grameneSearch.facet_counts && grameneSearch.facet_counts.facet_fields && grameneSearch.facet_counts.facet_fields.taxon_id;
|
|
17955
|
+
if (tids) for(let i = 0; i < tids.length; i += 2)selected[tids[i]] = true;
|
|
17949
17956
|
} else {
|
|
17950
17957
|
const active = grameneGenomes && grameneGenomes.active || {};
|
|
17951
17958
|
if (Object.keys(active).length === 0 && grameneMaps) Object.keys(grameneMaps).forEach((tid)=>{
|
|
@@ -17998,7 +18005,7 @@ const $15504f5eba8e73bd$var$TaxDistTbrowse = (props)=>{
|
|
|
17998
18005
|
doAcceptGrameneSuggestion
|
|
17999
18006
|
]);
|
|
18000
18007
|
const hostData = (0, $gXNCa$react.useMemo)(()=>{
|
|
18001
|
-
const facet = props.grameneSearch && props.grameneSearch.facet_counts && props.grameneSearch.facet_counts.facet_fields.taxon_id;
|
|
18008
|
+
const facet = props.grameneSearch && props.grameneSearch.facet_counts && props.grameneSearch.facet_counts.facet_fields && props.grameneSearch.facet_counts.facet_fields.taxon_id;
|
|
18002
18009
|
return {
|
|
18003
18010
|
bins: (0, $bfd29d54a0f0e853$export$390e10a52782f018)(grameneTaxDist),
|
|
18004
18011
|
geneCounts: adapter ? (0, $15275c4f5939e11d$export$ce87f9041549c2e9)(adapter.tree, facet) : null,
|