gramene-search 1.7.26 → 2.0.1

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.
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- 299010731
2
- 1777055997815079000
1
+ 299715150
2
+ 1777062532991053000
package/dist/index.js CHANGED
@@ -217,6 +217,7 @@ $parcel$export(module.exports, "Status", () => $693dd8c7a5607c3a$export$96e9906d
217
217
  $parcel$export(module.exports, "Filters", () => $693dd8c7a5607c3a$export$92a576f896a9bf72);
218
218
  $parcel$export(module.exports, "Results", () => $693dd8c7a5607c3a$export$4a34de49b46a2bfa);
219
219
  $parcel$export(module.exports, "Views", () => $693dd8c7a5607c3a$export$5cb791131c501f6a);
220
+ $parcel$export(module.exports, "Auth", () => $c5d403787de8b05f$export$2e2bcd8739ae039);
220
221
 
221
222
 
222
223
 
@@ -1528,12 +1529,14 @@ const $24971af0a229e0e3$var$grameneViews = {
1528
1529
  'list'
1529
1530
  ]);
1530
1531
  const autoDisable = numFound === 0 || !hasFilters;
1532
+ const hasFirebase = !!(config && config.firebaseConfig);
1531
1533
  let options = raw.options;
1534
+ if (!hasFirebase) options = options.filter((v)=>v.id !== 'userLists');
1532
1535
  if (overrides) options = options.filter((v)=>overrides[v.id] !== 'hidden');
1533
1536
  options = options.map((v)=>{
1534
- if (autoDisable && resultDependentIds.has(v.id)) return {
1537
+ if (resultDependentIds.has(v.id) && autoDisable) return {
1535
1538
  ...v,
1536
- show: 'disabled'
1539
+ show: 'off'
1537
1540
  };
1538
1541
  if (!overrides) return v;
1539
1542
  const o = overrides[v.id];
@@ -2034,7 +2037,7 @@ var $0d54502f6cafe273$export$2e2bcd8739ae039 = $0d54502f6cafe273$var$grameneGeno
2034
2037
 
2035
2038
 
2036
2039
  var $65709bd8598fce20$exports = {};
2037
- $65709bd8598fce20$exports = JSON.parse('{"groups":{"core":{"label":"Core identifiers","order":0},"location":{"label":"Genomic location","order":1},"structure":{"label":"Gene structure","order":2},"homology":{"label":"Homology","order":3},"expression":{"label":"Gene expression","order":4},"differential":{"label":"Differential expression","order":5},"hierarchical":{"label":"Hierarchical annotations","order":6},"pathways":{"label":"Pathways","order":7},"GO":{"label":"Gene Ontology","order":7},"PO":{"label":"Plant Ontology","order":8},"lof":{"label":"Loss of function alleles","order":9},"MAKER":{"label":"MAKER transcript metrics","order":10},"xrefs":{"label":"External references","order":11},"other":{"label":"Other","order":99}},"patterns":[{"id":"homology","match":"^homology__(.+)$","group":"homology","multiValued":true,"labelTemplate":"Homology: $1"},{"id":"pathways","match":"^pathways__(.+)$","group":"pathways","multiValued":true,"labelTemplate":"Pathway: $1"},{"id":"maker","match":"^MAKER__(.+)__attr_([a-z])$","group":"MAKER","labelTemplate":"MAKER: $1"},{"id":"xrefs","match":"^(.+)__xrefs$","group":"xrefs","multiValued":true,"labelTemplate":"$1 (xrefs)"},{"id":"expr","match":"^(E[-_][A-Za-z0-9_-]+?)_g(\\\\d+)__expr$","group":"expression","expression":true,"labelTemplate":"$1 \xb7 g$2"},{"id":"diffexpr","match":"^(E[-_][A-Za-z0-9_-]+?)_g(\\\\d+)_g(\\\\d+)_(pval|logfc|l2fc)_attr_([a-z])$","group":"differential","diffExpression":true,"labelTemplate":"$1 \xb7 g$2 vs g$3 \xb7 $4"},{"id":"bins","match":"^(fixed|uniform)_([0-9a-zA-Z]+)__bin$","group":"bins","is_hidden":true,"labelTemplate":"$1 bin ($2)"},{"id":"neighbors","match":".*neighbors_[0-9]+$","group":"neighbors","is_hidden":true,"labelTemplate":"neighbors"},{"id":"vep_merged","match":"^VEP__merged__(NAT|EMS)__attr_ss$","group":"lof","multiValued":true,"labelTemplate":"Merged $1 accessions"},{"id":"vep_detail","match":"^VEP__(.+?)__(homo|het)__(.+?)__(\\\\d+)__attr_ss$","group":"lof","multiValued":true,"labelTemplate":"$1 ($2) $3/$4"},{"id":"generic_attr","match":"^(.+)__attr_([a-z])$","group":"other","labelTemplate":"$1"}],"fields":{"id":{"group":"core","label":"Gene ID","order":1},"name":{"group":"core","label":"Name","order":2},"description":{"group":"core","label":"Description","order":4},"summary":{"group":"core","label":"Summary","order":5},"synonyms":{"group":"core","label":"Synonyms","multiValued":true,"order":3},"biotype":{"group":"core","label":"Biotype","order":6},"taxon_id":{"group":"core","label":"Taxon ID","order":8},"system_name":{"group":"core","label":"System name","order":7},"db_type":{"group":"core","label":"DB type","order":9},"closest_rep_id":{"group":"homology","label":"Closest representative ID","order":1},"closest_rep_name":{"group":"homology","label":"Closest representative name","order":2},"closest_rep_identity":{"group":"homology","label":"Closest representative identity","order":3},"closest_rep_taxon_id":{"group":"homology","label":"Closest representative taxon","order":4},"closest_rep_description":{"group":"homology","label":"Closest representative description","order":5},"model_rep_id":{"group":"homology","label":"Model representative ID","order":6},"model_rep_name":{"group":"homology","label":"Model representative name","order":7},"model_rep_identity":{"group":"homology","label":"Model representative identity","order":8},"model_rep_taxon_id":{"group":"homology","label":"Model representative taxon","order":9},"model_rep_description":{"group":"homology","label":"Model representative description","order":10},"gene_tree":{"group":"homology","label":"Gene tree ID","order":11},"pan_tree":{"group":"homology","label":"Pan-gene tree ID","order":14},"capabilities":{"group":"other","label":"Capabilities","multiValued":true},"map":{"group":"location","label":"Map","order":1},"region":{"group":"location","label":"Region","order":2},"start":{"group":"location","label":"Start","order":3},"end":{"group":"location","label":"End","order":4},"strand":{"group":"location","label":"Strand","order":5},"GO__ancestors":{"group":"hierarchical","label":"GO terms","multiValued":true,"order":1},"PO__ancestors":{"group":"hierarchical","label":"PO terms","multiValued":true,"order":2},"TO__ancestors":{"group":"hierarchical","label":"TO terms","multiValued":true,"order":3},"QTL_TO__ancestors":{"group":"hierarchical","label":"QTL traits (TO)","multiValued":true,"order":7},"domains__ancestors":{"group":"hierarchical","label":"Domains","multiValued":true,"order":4},"taxonomy__ancestors":{"group":"hierarchical","label":"Taxonomy","multiValued":true,"order":6},"supertree_attr_s":{"group":"homology","label":"Supertree","order":13},"gene_tree_root_taxon_id":{"group":"homology","label":"Gene tree root taxon","order":12},"protein__length":{"group":"structure","label":"Protein length"},"transcript__count":{"group":"structure","label":"Transcript count"},"transcript__exons":{"group":"structure","label":"Exon count"},"transcript__length":{"group":"structure","label":"Transcript length"},"expressed_in_gxa_attr_ss":{"group":"expression","label":"Expressed in GXA","multiValued":true},"MAKER__AED__attr_f":{"group":"MAKER","label":"AED","description":"Annotation Edit Distance"},"MAKER__QI1__attr_i":{"group":"MAKER","label":"QI1: Length of the 5\' UTR"},"MAKER__QI2__attr_f":{"group":"MAKER","label":"QI2: Fraction of splice sites confirmed by EST"},"MAKER__QI3__attr_f":{"group":"MAKER","label":"QI3: Fraction of exons overlapping an EST"},"MAKER__QI4__attr_f":{"group":"MAKER","label":"QI4: Fraction of exons overlapping EST or protein"},"MAKER__QI5__attr_f":{"group":"MAKER","label":"QI5: Fraction of splice sites confirmed by SNAP"},"MAKER__QI6__attr_f":{"group":"MAKER","label":"QI6: Fraction of exons overlapping a SNAP"},"MAKER__QI7__attr_i":{"group":"MAKER","label":"QI7: Number of exons in the mRNA"},"MAKER__QI8__attr_i":{"group":"MAKER","label":"QI8: Length of the 3\' UTR"},"MAKER__QI9__attr_i":{"group":"MAKER","label":"QI9: Length of the protein sequence"},"homology__all_orthologs":{"group":"homology","label":"All orthologs","multiValued":true,"order":15},"homology__ortholog_one2one":{"group":"homology","label":"1:1 orthologs","multiValued":true,"order":16},"homology__ortholog_one2many":{"group":"homology","label":"1:many orthologs","multiValued":true,"order":17},"homology__ortholog_many2many":{"group":"homology","label":"Many:many orthologs","multiValued":true,"order":18},"homology__syntenic_ortholog_one2one":{"group":"homology","label":"Syntenic 1:1 orthologs","multiValued":true,"order":19},"homology__within_species_paralog":{"group":"homology","label":"Within-species paralogs","multiValued":true,"order":20},"pathways__ancestors":{"group":"hierarchical","label":"Pathways","multiValued":true,"order":5},"canonical_transcript__attr_s":{"group":"structure","label":"Canonical transcript ID"}},"hidden":["_version_","_terms","score","gene_idx","gene_idx_multi","species_idx","compara_idx","compara_idx_multi","_id","annotations","bins","gene_structure","homology","location","xrefs","domain_roots","familyRoot__ancestors","taxonomy__ancestors","capabilities"]}');
2040
+ $65709bd8598fce20$exports = JSON.parse('{"groups":{"core":{"label":"Core identifiers","order":0},"location":{"label":"Genomic location","order":1},"structure":{"label":"Gene structure","order":2},"homology":{"label":"Homology","order":3},"expression":{"label":"Gene expression","order":4},"differential":{"label":"Differential expression","order":5},"hierarchical":{"label":"Hierarchical annotations","order":6},"pathways":{"label":"Pathways","order":7},"GO":{"label":"Gene Ontology","order":7},"PO":{"label":"Plant Ontology","order":8},"lof":{"label":"Loss of function alleles","order":9},"MAKER":{"label":"MAKER transcript metrics","order":10},"xrefs":{"label":"External references","order":11},"other":{"label":"Other","order":99}},"patterns":[{"id":"homology","match":"^homology__(.+)$","group":"homology","multiValued":true,"labelTemplate":"Homology: $1"},{"id":"pathways","match":"^pathways__(.+)$","group":"pathways","multiValued":true,"labelTemplate":"Pathway: $1"},{"id":"maker","match":"^MAKER__(.+)__attr_([a-z])$","group":"MAKER","labelTemplate":"MAKER: $1"},{"id":"xrefs","match":"^(.+)__xrefs$","group":"xrefs","multiValued":true,"labelTemplate":"$1 (xrefs)"},{"id":"expr","match":"^(E[-_][A-Za-z0-9_-]+?)_g(\\\\d+)__expr$","group":"expression","expression":true,"labelTemplate":"$1 \xb7 g$2"},{"id":"diffexpr","match":"^(E[-_][A-Za-z0-9_-]+?)_g(\\\\d+)_g(\\\\d+)_(pval|logfc|l2fc)_attr_([a-z])$","group":"differential","diffExpression":true,"labelTemplate":"$1 \xb7 g$2 vs g$3 \xb7 $4"},{"id":"bins","match":"^(fixed|uniform)_([0-9a-zA-Z]+)__bin$","group":"bins","is_hidden":true,"labelTemplate":"$1 bin ($2)"},{"id":"neighbors","match":".*neighbors_[0-9]+$","group":"neighbors","is_hidden":true,"labelTemplate":"neighbors"},{"id":"vep_merged","match":"^VEP__merged__(NAT|EMS)__attr_ss$","group":"lof","multiValued":true,"labelTemplate":"Merged $1 accessions"},{"id":"vep_detail","match":"^VEP__(.+?)__(homo|het)__(.+?)__(\\\\d+)__attr_ss$","group":"lof","multiValued":true,"labelTemplate":"$1 ($2) $3/$4"},{"id":"generic_attr","match":"^(.+)__attr_([a-z])$","group":"other","labelTemplate":"$1"}],"fields":{"id":{"group":"core","label":"Gene ID","order":1},"name":{"group":"core","label":"Name","order":2},"description":{"group":"core","label":"Description","order":4},"summary":{"group":"core","label":"Summary","order":5},"synonyms":{"group":"core","label":"Synonyms","multiValued":true,"order":3},"biotype":{"group":"core","label":"Biotype","order":6},"taxon_id":{"group":"core","label":"Taxon ID","order":8},"system_name":{"group":"core","label":"System name","order":7},"db_type":{"group":"core","label":"DB type","order":9},"closest_rep_id":{"group":"homology","label":"Closest representative ID","order":1},"closest_rep_name":{"group":"homology","label":"Closest representative name","order":2},"closest_rep_identity":{"group":"homology","label":"Closest representative identity","order":3},"closest_rep_taxon_id":{"group":"homology","label":"Closest representative taxon","order":4},"closest_rep_description":{"group":"homology","label":"Closest representative description","order":5},"model_rep_id":{"group":"homology","label":"Model representative ID","order":6},"model_rep_name":{"group":"homology","label":"Model representative name","order":7},"model_rep_identity":{"group":"homology","label":"Model representative identity","order":8},"model_rep_taxon_id":{"group":"homology","label":"Model representative taxon","order":9},"model_rep_description":{"group":"homology","label":"Model representative description","order":10},"gene_tree":{"group":"homology","label":"Gene tree ID","order":11},"pan_tree":{"group":"homology","label":"Pan-gene tree ID","order":14},"capabilities":{"group":"other","label":"Capabilities","multiValued":true},"map":{"group":"location","label":"Map","order":1},"region":{"group":"location","label":"Region","order":2},"start":{"group":"location","label":"Start","order":3},"end":{"group":"location","label":"End","order":4},"strand":{"group":"location","label":"Strand","order":5},"GO__ancestors":{"group":"hierarchical","label":"GO terms","multiValued":true,"order":1},"PO__ancestors":{"group":"hierarchical","label":"PO terms","multiValued":true,"order":2},"TO__ancestors":{"group":"hierarchical","label":"TO terms","multiValued":true,"order":3},"QTL_TO__ancestors":{"group":"hierarchical","label":"QTL traits (TO)","multiValued":true,"order":7},"domains__ancestors":{"group":"hierarchical","label":"Domains","multiValued":true,"order":4},"taxonomy__ancestors":{"group":"hierarchical","label":"Taxonomy","multiValued":true,"order":6},"supertree_attr_s":{"group":"homology","label":"Supertree","order":13},"gene_tree_root_taxon_id":{"group":"homology","label":"Gene tree root taxon","order":12},"protein__length":{"group":"structure","label":"Protein length"},"transcript__count":{"group":"structure","label":"Transcript count"},"transcript__exons":{"group":"structure","label":"Exon count"},"transcript__length":{"group":"structure","label":"Transcript length"},"expressed_in_gxa_attr_ss":{"group":"expression","label":"Expressed in GXA","multiValued":true},"MAKER__AED__attr_f":{"group":"MAKER","label":"AED","description":"Annotation Edit Distance"},"MAKER__QI1__attr_i":{"group":"MAKER","label":"QI1: Length of the 5\' UTR"},"MAKER__QI2__attr_f":{"group":"MAKER","label":"QI2: Fraction of splice sites confirmed by EST"},"MAKER__QI3__attr_f":{"group":"MAKER","label":"QI3: Fraction of exons overlapping an EST"},"MAKER__QI4__attr_f":{"group":"MAKER","label":"QI4: Fraction of exons overlapping EST or protein"},"MAKER__QI5__attr_f":{"group":"MAKER","label":"QI5: Fraction of splice sites confirmed by SNAP"},"MAKER__QI6__attr_f":{"group":"MAKER","label":"QI6: Fraction of exons overlapping a SNAP"},"MAKER__QI7__attr_i":{"group":"MAKER","label":"QI7: Number of exons in the mRNA"},"MAKER__QI8__attr_i":{"group":"MAKER","label":"QI8: Length of the 3\' UTR"},"MAKER__QI9__attr_i":{"group":"MAKER","label":"QI9: Length of the protein sequence"},"homology__all_orthologs":{"group":"homology","label":"All orthologs","multiValued":true,"order":15},"homology__ortholog_one2one":{"group":"homology","label":"1:1 orthologs","multiValued":true,"order":16},"homology__ortholog_one2many":{"group":"homology","label":"1:many orthologs","multiValued":true,"order":17},"homology__ortholog_many2many":{"group":"homology","label":"Many:many orthologs","multiValued":true,"order":18},"homology__syntenic_ortholog_one2one":{"group":"homology","label":"Syntenic 1:1 orthologs","multiValued":true,"order":19},"homology__within_species_paralog":{"group":"homology","label":"Within-species paralogs","multiValued":true,"order":20},"pathways__ancestors":{"group":"hierarchical","label":"Pathways","multiValued":true,"order":5},"canonical_transcript__attr_s":{"group":"structure","label":"Canonical transcript ID"}},"hidden":["_version_","_terms","score","gene_idx","gene_idx_multi","species_idx","compara_idx","compara_idx_multi","_id","annotations","bins","gene_structure","homology","location","xrefs","domain_roots","familyRoot__ancestors","taxonomy__ancestors","capabilities","saved_search"]}');
2038
2041
 
2039
2042
 
2040
2043
  const $49d5cbca2ec74b2f$export$428c2f647a2a7545 = {
@@ -2123,10 +2126,24 @@ const $49d5cbca2ec74b2f$export$428c2f647a2a7545 = {
2123
2126
  };
2124
2127
 
2125
2128
 
2126
- const $0f839422d0d8c772$var$SAMPLE_QUERY = 'capabilities:expression';
2127
- const $0f839422d0d8c772$var$SAMPLE_ROWS = 500;
2128
- const $0f839422d0d8c772$var$DIFFEXPR_FL = 'id,*_pval_attr_f,*_logfc_attr_f,*_l2fc_attr_f';
2129
- const $0f839422d0d8c772$var$DIFFEXPR_ROWS_PER_TAXON = 50;
2129
+ // Fields matched by these globs are multi-valued in Solr.
2130
+ const $0f839422d0d8c772$var$MULTIVALUED_PATTERNS = [
2131
+ /__expr$/,
2132
+ /__ancestors$/,
2133
+ /__xrefs$/,
2134
+ /^VEP__/,
2135
+ /^homology__/
2136
+ ];
2137
+ function $0f839422d0d8c772$var$parseCsvHeader(text) {
2138
+ if (!text) return [];
2139
+ const line = text.split(/\r?\n/, 1)[0] || '';
2140
+ return line.split(',').map((s)=>s.trim().replace(/^"|"$/g, '')).filter(Boolean);
2141
+ }
2142
+ function $0f839422d0d8c772$var$synthesizedValue(name) {
2143
+ return $0f839422d0d8c772$var$MULTIVALUED_PATTERNS.some((re)=>re.test(name)) ? [
2144
+ 0
2145
+ ] : 0;
2146
+ }
2130
2147
  function $0f839422d0d8c772$var$applyTemplate(tpl, match) {
2131
2148
  if (!tpl) return null;
2132
2149
  return tpl.replace(/\$(\d+)/g, (_, n)=>match[+n] || '');
@@ -2175,40 +2192,13 @@ function $0f839422d0d8c772$var$inferType(value) {
2175
2192
  if (Array.isArray(value)) return 'array<' + (value.length ? $0f839422d0d8c772$var$inferType(value[0]) : 'unknown') + '>';
2176
2193
  return typeof value;
2177
2194
  }
2178
- function $0f839422d0d8c772$var$extractSwaggerFields(swagger) {
2179
- const defs = swagger && swagger.definitions || {};
2180
- const out = {};
2181
- const collect = (schemaName, prefix = '')=>{
2182
- const def = defs[schemaName];
2183
- if (!def || !def.properties) return;
2184
- for (const [prop, spec] of Object.entries(def.properties)){
2185
- const fullName = prefix ? `${prefix}.${prop}` : prop;
2186
- let type = spec.type || 'object';
2187
- if (spec.$ref) type = 'ref:' + spec.$ref.split('/').pop();
2188
- if (spec.type === 'array') {
2189
- const inner = spec.items || {};
2190
- type = 'array<' + (inner.type || (inner.$ref ? inner.$ref.split('/').pop() : 'unknown')) + '>';
2191
- }
2192
- out[fullName] = {
2193
- name: fullName,
2194
- type: type,
2195
- description: spec.description || '',
2196
- source: 'swagger'
2197
- };
2198
- }
2199
- };
2200
- collect('Result');
2201
- collect('GeneDocument');
2202
- return out;
2203
- }
2204
- function $0f839422d0d8c772$var$buildCatalog(swagger, sampleDocs) {
2195
+ function $0f839422d0d8c772$var$buildCatalog(sampleDocs) {
2205
2196
  const hidden = new Set((0, (/*@__PURE__*/$parcel$interopDefault($65709bd8598fce20$exports))).hidden || []);
2206
2197
  const overlayFields = (0, (/*@__PURE__*/$parcel$interopDefault($65709bd8598fce20$exports))).fields || {};
2207
2198
  const patterns = (0, (/*@__PURE__*/$parcel$interopDefault($65709bd8598fce20$exports))).patterns || [];
2208
2199
  const groupsMeta = (0, (/*@__PURE__*/$parcel$interopDefault($65709bd8598fce20$exports))).groups || {};
2209
- const swaggerFields = $0f839422d0d8c772$var$extractSwaggerFields(swagger);
2210
- // Union keys across sample docs + swagger keys
2211
- const keys = new Set(Object.keys(swaggerFields));
2200
+ // Union keys from overlay.fields (hardcoded catalog entries) and sample docs.
2201
+ const keys = new Set(Object.keys(overlayFields));
2212
2202
  const sampleValues = {};
2213
2203
  for (const doc of sampleDocs || [])for (const [k, v] of Object.entries(doc)){
2214
2204
  keys.add(k);
@@ -2222,8 +2212,7 @@ function $0f839422d0d8c772$var$buildCatalog(swagger, sampleDocs) {
2222
2212
  if (classified && classified.isHidden) continue;
2223
2213
  const sampleVal = sampleValues[name];
2224
2214
  const sampleType = sampleVal !== undefined ? $0f839422d0d8c772$var$inferType(sampleVal) : null;
2225
- const swaggerEntry = swaggerFields[name];
2226
- const group = overlayEntry && overlayEntry.group || classified && classified.group || (swaggerEntry ? 'core' : 'other');
2215
+ const group = overlayEntry && overlayEntry.group || classified && classified.group || 'other';
2227
2216
  let label = overlayEntry && overlayEntry.label || classified && classified.label || name;
2228
2217
  let tsvHeader = null;
2229
2218
  if (classified && classified.patternId === 'vep_detail') {
@@ -2240,13 +2229,13 @@ function $0f839422d0d8c772$var$buildCatalog(swagger, sampleDocs) {
2240
2229
  tsvHeader: tsvHeader,
2241
2230
  group: group,
2242
2231
  order: overlayEntry && overlayEntry.order != null ? overlayEntry.order : null,
2243
- description: overlayEntry && overlayEntry.description || swaggerEntry && swaggerEntry.description || '',
2244
- type: sampleType || swaggerEntry && swaggerEntry.type || 'unknown',
2232
+ description: overlayEntry && overlayEntry.description || '',
2233
+ type: sampleType || 'unknown',
2245
2234
  multiValued: multiValued,
2246
2235
  patternId: classified ? classified.patternId : null,
2247
2236
  matchGroups: classified ? classified.matchGroups : null,
2248
2237
  expression: !!(classified && classified.expression),
2249
- source: overlayEntry ? 'overlay' : swaggerEntry ? 'swagger' : 'sample'
2238
+ source: overlayEntry ? 'overlay' : 'sample'
2250
2239
  };
2251
2240
  }
2252
2241
  // Build groups (explicit overlay.order first, then natural sort by label)
@@ -2270,7 +2259,6 @@ function $0f839422d0d8c772$var$buildCatalog(swagger, sampleDocs) {
2270
2259
  })).sort((a, b)=>a.order - b.order);
2271
2260
  return {
2272
2261
  fetchedAt: Date.now(),
2273
- swaggerInfo: swagger && swagger.info ? swagger.info : null,
2274
2262
  groups: groups,
2275
2263
  fields: fields
2276
2264
  };
@@ -2282,52 +2270,10 @@ const $0f839422d0d8c772$var$grameneFieldCatalog = (0, $gXNCa$reduxbundler.create
2282
2270
  staleAfter: 300000,
2283
2271
  getPromise: ({ store: store })=>{
2284
2272
  const api = store.selectGrameneAPI();
2285
- const swaggerUrl = typeof store.selectGrameneSwaggerURL === 'function' ? store.selectGrameneSwaggerURL() : `${api}/swagger`;
2286
- const sampleUrl = `${api}/search?q=${encodeURIComponent($0f839422d0d8c772$var$SAMPLE_QUERY)}&rows=${$0f839422d0d8c772$var$SAMPLE_ROWS}&fl=*`;
2287
- const experimentsUrl = `${api}/experiments?rows=-1`;
2288
- const mapsUrl = `${api}/maps?rows=-1`;
2289
- return Promise.all([
2290
- fetch(swaggerUrl).then((r)=>r.json()).catch(()=>null),
2291
- fetch(sampleUrl).then((r)=>r.json()).catch(()=>null),
2292
- fetch(experimentsUrl).then((r)=>r.json()).catch(()=>[]),
2293
- fetch(mapsUrl).then((r)=>r.json()).catch(()=>[])
2294
- ]).then(([swagger, sample, experiments, maps])=>{
2295
- const docs = sample && sample.response && sample.response.docs || [];
2296
- // Determine which species (anchor taxa) have differential experiments,
2297
- // then for each run a narrow discovery query scoped to that species'
2298
- // strain taxa so we actually surface their diffexpr field names.
2299
- const diffTaxa = [
2300
- ...new Set((experiments || []).filter((e)=>e && e.type === 'Differential' && e.taxon_id).map((e)=>e.taxon_id))
2301
- ];
2302
- const strainsByAnchor = {};
2303
- for (const m of maps || []){
2304
- const anchor = m && m.anchor_taxon_id;
2305
- if (!anchor) continue;
2306
- (strainsByAnchor[anchor] = strainsByAnchor[anchor] || []).push(m.taxon_id);
2307
- }
2308
- const discoveryFetches = diffTaxa.map((t)=>{
2309
- const strains = strainsByAnchor[t] || [
2310
- t
2311
- ];
2312
- const fq = `taxon_id:(${strains.join(' OR ')})`;
2313
- const url = `${api}/search?q=${encodeURIComponent($0f839422d0d8c772$var$SAMPLE_QUERY)}` + `&rows=${$0f839422d0d8c772$var$DIFFEXPR_ROWS_PER_TAXON}` + `&fl=${encodeURIComponent($0f839422d0d8c772$var$DIFFEXPR_FL)}` + `&fq=${encodeURIComponent(fq)}`;
2314
- return fetch(url).then((r)=>r.json()).catch(()=>null);
2315
- });
2316
- return Promise.all(discoveryFetches).then((results)=>{
2317
- const diffDocs = results.flatMap((r)=>r && r.response && r.response.docs || []);
2318
- return $0f839422d0d8c772$var$buildCatalog(swagger, [
2319
- ...docs,
2320
- ...diffDocs
2321
- ]);
2322
- });
2323
- });
2273
+ const url = `${api}/search?q=*:*&rows=0&wt=csv&fl=*`;
2274
+ return fetch(url).then((r)=>r.text()).then((text)=>$0f839422d0d8c772$var$parseCsvHeader(text)).catch(()=>null);
2324
2275
  }
2325
2276
  });
2326
- $0f839422d0d8c772$var$grameneFieldCatalog.reactGrameneFieldCatalog = (0, $gXNCa$reduxbundler.createSelector)('selectGrameneFieldCatalogShouldUpdate', (shouldUpdate)=>{
2327
- if (shouldUpdate) return {
2328
- actionCreator: 'doFetchGrameneFieldCatalog'
2329
- };
2330
- });
2331
2277
  function $0f839422d0d8c772$var$assayFactorLabel(assay) {
2332
2278
  if (!assay) return '';
2333
2279
  const factors = Array.isArray(assay.factor) ? assay.factor : [];
@@ -2702,7 +2648,48 @@ function $0f839422d0d8c772$var$enrichLabels(catalog, expressionStudies, expressi
2702
2648
  groups: groups
2703
2649
  };
2704
2650
  }
2705
- $0f839422d0d8c772$var$grameneFieldCatalog.selectFieldCatalog = (0, $gXNCa$reduxbundler.createSelector)('selectGrameneFieldCatalog', 'selectExpressionStudies', 'selectExpressionSamples', 'selectGrameneSearch', 'selectGrameneMaps', $0f839422d0d8c772$var$enrichLabels);
2651
+ function $0f839422d0d8c772$var$filterCatalogByPresentFields(catalog, present) {
2652
+ if (!catalog || !catalog.fields || !present) return catalog;
2653
+ const filteredFields = {};
2654
+ for (const [name, f] of Object.entries(catalog.fields))if (present.has(name)) filteredFields[name] = f;
2655
+ const hasContent = (g)=>g.fields && g.fields.length > 0 || g.subgroups && g.subgroups.some(hasContent);
2656
+ const filterGroup = (g)=>{
2657
+ const fields = (g.fields || []).filter((n)=>present.has(n));
2658
+ const subgroups = (g.subgroups || []).map(filterGroup).filter(hasContent);
2659
+ return {
2660
+ ...g,
2661
+ fields: fields,
2662
+ subgroups: subgroups
2663
+ };
2664
+ };
2665
+ const groups = (catalog.groups || []).map(filterGroup).filter(hasContent);
2666
+ return {
2667
+ ...catalog,
2668
+ fields: filteredFields,
2669
+ groups: groups
2670
+ };
2671
+ }
2672
+ $0f839422d0d8c772$var$grameneFieldCatalog.selectFieldCatalog = (0, $gXNCa$reduxbundler.createSelector)('selectGrameneFieldCatalog', 'selectExpressionStudies', 'selectExpressionSamples', 'selectGrameneSearch', 'selectGrameneMaps', (fieldNames, studies, samples, search, maps)=>{
2673
+ if (!fieldNames || !fieldNames.length) return null;
2674
+ const present = new Set(fieldNames);
2675
+ // Build a synthetic doc from the discovered field names; values carry the
2676
+ // right JS type so inferType picks the correct multiValued/type (arrays
2677
+ // for multi-valued fields, scalars otherwise). Derive pval/logfc
2678
+ // companions from every l2fc field.
2679
+ const doc = {};
2680
+ for (const name of present){
2681
+ doc[name] = $0f839422d0d8c772$var$synthesizedValue(name);
2682
+ if (/_l2fc_attr_f$/.test(name)) {
2683
+ doc[name.replace('_l2fc_', '_pval_')] = 0;
2684
+ doc[name.replace('_l2fc_', '_logfc_')] = 0;
2685
+ }
2686
+ }
2687
+ const catalog = $0f839422d0d8c772$var$buildCatalog([
2688
+ doc
2689
+ ]);
2690
+ const enriched = $0f839422d0d8c772$var$enrichLabels(catalog, studies, samples, search, maps);
2691
+ return $0f839422d0d8c772$var$filterCatalogByPresentFields(enriched, present);
2692
+ });
2706
2693
  $0f839422d0d8c772$var$grameneFieldCatalog.selectFieldCatalogGroups = (0, $gXNCa$reduxbundler.createSelector)('selectFieldCatalog', (catalog)=>catalog && catalog.groups || []);
2707
2694
  $0f839422d0d8c772$var$grameneFieldCatalog.selectFieldCatalogByName = (0, $gXNCa$reduxbundler.createSelector)('selectFieldCatalog', (catalog)=>catalog && catalog.fields || {});
2708
2695
  var $0f839422d0d8c772$export$2e2bcd8739ae039 = $0f839422d0d8c772$var$grameneFieldCatalog;
@@ -4528,15 +4515,12 @@ const $5c2c79352d3d7b81$export$b2e089eb3692b073 = (props)=>/*#__PURE__*/ (0, $gX
4528
4515
 
4529
4516
 
4530
4517
 
4531
- const $047461923b1badda$var$firebaseConfig = {
4532
- apiKey: "AIzaSyCyTJmxfWgfuhI6-8uqocSiE9KOWUlkgkk",
4533
- authDomain: "gramene-auth.firebaseapp.com",
4534
- projectId: "gramene-auth",
4535
- storageBucket: "gramene-auth.appspot.com",
4536
- messagingSenderId: "590873346270",
4537
- appId: "1:590873346270:web:f76a31a93619e69439824f"
4518
+ const $047461923b1badda$export$54387eca9e368edc = (config)=>{
4519
+ if (!config) return null;
4520
+ const name = config.projectId || '[DEFAULT]';
4521
+ if ((0, $gXNCa$firebaseapp.getApps)().some((a)=>a.name === name)) return (0, $gXNCa$firebaseapp.getApp)(name);
4522
+ return (0, $gXNCa$firebaseapp.initializeApp)(config, name);
4538
4523
  };
4539
- const $047461923b1badda$export$a4e2c8f07e884e = (0, $gXNCa$firebaseapp.initializeApp)($047461923b1badda$var$firebaseConfig);
4540
4524
  const $047461923b1badda$export$964d88edb00bbcaa = (suggestion)=>{
4541
4525
  return {
4542
4526
  status: 'init',
@@ -8564,7 +8548,6 @@ var $261baeb81c4d4d8a$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.conn
8564
8548
 
8565
8549
 
8566
8550
 
8567
- const $0f50f369018a42ef$var$auth = (0, $gXNCa$firebaseauth.getAuth)((0, $047461923b1badda$export$a4e2c8f07e884e));
8568
8551
  const $0f50f369018a42ef$var$MAX_GENE_IDS = 1000; // Define the maximum number of gene IDs allowed
8569
8552
  const $0f50f369018a42ef$var$formatCreatedAt = (value)=>{
8570
8553
  if (!value) return '';
@@ -8635,7 +8618,8 @@ const $0f50f369018a42ef$var$GeneListDisplayComponent = (props)=>{
8635
8618
  key: 'createdAt',
8636
8619
  dir: 'desc'
8637
8620
  });
8638
- (0, $gXNCa$firebaseauth.onAuthStateChanged)($0f50f369018a42ef$var$auth, (user)=>setUser(user));
8621
+ const auth = props.auth;
8622
+ if (auth) (0, $gXNCa$firebaseauth.onAuthStateChanged)(auth, (user)=>setUser(user));
8639
8623
  const toggleSort = (key)=>setSort((s)=>s.key === key ? {
8640
8624
  key: key,
8641
8625
  dir: s.dir === 'asc' ? 'desc' : 'asc'
@@ -8661,6 +8645,12 @@ const $0f50f369018a42ef$var$GeneListDisplayComponent = (props)=>{
8661
8645
  sort
8662
8646
  ]);
8663
8647
  const fetchPrivateGeneLists = async ()=>{
8648
+ if (!auth) {
8649
+ setPrivateGeneLists([]);
8650
+ setError(null);
8651
+ setNotice(null);
8652
+ return;
8653
+ }
8664
8654
  if (!user || typeof user.getIdToken !== 'function') {
8665
8655
  setPrivateGeneLists([]);
8666
8656
  setError(null);
@@ -9013,7 +9003,8 @@ const $0f50f369018a42ef$var$GeneListComponent = (props)=>{
9013
9003
  const [errorMessage, setErrorMessage] = (0, $gXNCa$react.useState)('');
9014
9004
  const [loading, setLoading] = (0, $gXNCa$react.useState)(false); // New loading state
9015
9005
  const [user, setUser] = (0, $gXNCa$react.useState)({});
9016
- (0, $gXNCa$firebaseauth.onAuthStateChanged)($0f50f369018a42ef$var$auth, (user)=>setUser(user));
9006
+ const auth = props.auth;
9007
+ if (auth) (0, $gXNCa$firebaseauth.onAuthStateChanged)(auth, (user)=>setUser(user));
9017
9008
  // Function to handle gene list input
9018
9009
  const handleGeneListChange = (event)=>{
9019
9010
  setGeneList(event.target.value);
@@ -9226,6 +9217,17 @@ const $0f50f369018a42ef$var$GeneListComponent = (props)=>{
9226
9217
  const $0f50f369018a42ef$var$UserGeneListsComponent = (props)=>{
9227
9218
  const [refreshKey, setRefreshKey] = (0, $gXNCa$react.useState)(0);
9228
9219
  const handleListSaved = ()=>setRefreshKey((k)=>k + 1);
9220
+ const firebaseConfig = props.configuration && props.configuration.firebaseConfig;
9221
+ const auth = (0, $gXNCa$react.useMemo)(()=>{
9222
+ const app = (0, $047461923b1badda$export$54387eca9e368edc)(firebaseConfig);
9223
+ return app ? (0, $gXNCa$firebaseauth.getAuth)(app) : null;
9224
+ }, [
9225
+ firebaseConfig
9226
+ ]);
9227
+ if (!auth) return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Alert), {
9228
+ variant: "info",
9229
+ children: "User gene lists are not available on this site."
9230
+ });
9229
9231
  return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Container), {
9230
9232
  fluid: true,
9231
9233
  children: /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)((0, $gXNCa$reactbootstrap.Row), {
@@ -9234,6 +9236,7 @@ const $0f50f369018a42ef$var$UserGeneListsComponent = (props)=>{
9234
9236
  children: /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($0f50f369018a42ef$var$GeneListComponent, {
9235
9237
  api: props.configuration.grameneData,
9236
9238
  site: props.configuration.id,
9239
+ auth: auth,
9237
9240
  onListSaved: handleListSaved
9238
9241
  })
9239
9242
  }),
@@ -9241,6 +9244,7 @@ const $0f50f369018a42ef$var$UserGeneListsComponent = (props)=>{
9241
9244
  children: /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($0f50f369018a42ef$var$GeneListDisplayComponent, {
9242
9245
  api: props.configuration.grameneData,
9243
9246
  site: props.configuration.id,
9247
+ auth: auth,
9244
9248
  addFilter: props.doAcceptGrameneSuggestion,
9245
9249
  refreshKey: refreshKey
9246
9250
  })
@@ -10059,11 +10063,17 @@ var $76f7f9e488184bf9$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.conn
10059
10063
  const $37b3bb0145d266b0$var$MIN_LEFT_PCT = 15;
10060
10064
  const $37b3bb0145d266b0$var$MAX_LEFT_PCT = 85;
10061
10065
  const $37b3bb0145d266b0$var$ExporterViewCmp = (props)=>{
10062
- const { fieldCatalog: catalog, grameneFieldCatalogIsLoading: isLoading, grameneFieldCatalogRaw: raw } = props;
10066
+ const { fieldCatalog: catalog, grameneFieldCatalogIsLoading: isLoading, grameneFieldCatalogRaw: raw, grameneFieldCatalogShouldUpdate: shouldUpdate, doFetchGrameneFieldCatalog: doFetchGrameneFieldCatalog } = props;
10063
10067
  const [fieldQuery, setFieldQuery] = (0, $gXNCa$react.useState)('');
10064
10068
  const [leftPct, setLeftPct] = (0, $gXNCa$react.useState)(50);
10065
10069
  const [dragging, setDragging] = (0, $gXNCa$react.useState)(false);
10066
10070
  const containerRef = (0, $gXNCa$react.useRef)(null);
10071
+ (0, $gXNCa$react.useEffect)(()=>{
10072
+ if (shouldUpdate) doFetchGrameneFieldCatalog();
10073
+ }, [
10074
+ shouldUpdate,
10075
+ doFetchGrameneFieldCatalog
10076
+ ]);
10067
10077
  const onPointerMove = (0, $gXNCa$react.useCallback)((e)=>{
10068
10078
  const el = containerRef.current;
10069
10079
  if (!el) return;
@@ -10177,7 +10187,7 @@ const $37b3bb0145d266b0$var$ExporterViewCmp = (props)=>{
10177
10187
  ]
10178
10188
  });
10179
10189
  };
10180
- var $37b3bb0145d266b0$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)('selectFieldCatalog', 'selectGrameneFieldCatalogIsLoading', 'selectGrameneFieldCatalogRaw', $37b3bb0145d266b0$var$ExporterViewCmp);
10190
+ var $37b3bb0145d266b0$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)('selectFieldCatalog', 'selectGrameneFieldCatalogIsLoading', 'selectGrameneFieldCatalogRaw', 'selectGrameneFieldCatalogShouldUpdate', 'doFetchGrameneFieldCatalog', $37b3bb0145d266b0$var$ExporterViewCmp);
10181
10191
 
10182
10192
 
10183
10193
 
@@ -10187,26 +10197,33 @@ var $37b3bb0145d266b0$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.conn
10187
10197
 
10188
10198
 
10189
10199
 
10190
- const $c5d403787de8b05f$var$auth = (0, $gXNCa$firebaseauth.getAuth)((0, $047461923b1badda$export$a4e2c8f07e884e));
10191
10200
  const $c5d403787de8b05f$var$provider = new (0, $gXNCa$firebaseauth.GoogleAuthProvider)();
10192
10201
  const $c5d403787de8b05f$var$Auth = (props)=>{
10202
+ const firebaseConfig = props.configuration && props.configuration.firebaseConfig;
10203
+ const auth = (0, $gXNCa$react.useMemo)(()=>{
10204
+ const app = (0, $047461923b1badda$export$54387eca9e368edc)(firebaseConfig);
10205
+ return app ? (0, $gXNCa$firebaseauth.getAuth)(app) : null;
10206
+ }, [
10207
+ firebaseConfig
10208
+ ]);
10193
10209
  const [user, setUser] = (0, $gXNCa$react.useState)({});
10194
- (0, $gXNCa$firebaseauth.onAuthStateChanged)($c5d403787de8b05f$var$auth, (user)=>setUser(user));
10210
+ const [open, setOpen] = (0, $gXNCa$react.useState)(true);
10211
+ if (!auth) return null;
10212
+ (0, $gXNCa$firebaseauth.onAuthStateChanged)(auth, (user)=>setUser(user));
10195
10213
  function handleLogin() {
10196
- (0, $gXNCa$firebaseauth.signInWithPopup)($c5d403787de8b05f$var$auth, $c5d403787de8b05f$var$provider).then((result)=>{
10214
+ (0, $gXNCa$firebaseauth.signInWithPopup)(auth, $c5d403787de8b05f$var$provider).then((result)=>{
10197
10215
  setUser(result.user);
10198
10216
  }).catch((err)=>{
10199
10217
  console.log(err);
10200
10218
  });
10201
10219
  }
10202
10220
  function handleLogout() {
10203
- (0, $gXNCa$firebaseauth.signOut)($c5d403787de8b05f$var$auth).then(()=>{
10221
+ (0, $gXNCa$firebaseauth.signOut)(auth).then(()=>{
10204
10222
  setUser(null);
10205
10223
  }).catch((err)=>{
10206
10224
  console.log(err);
10207
10225
  });
10208
10226
  }
10209
- const [open, setOpen] = (0, $gXNCa$react.useState)(true);
10210
10227
  return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("div", {
10211
10228
  className: props.configuration.id === 'sorghum' ? 'sorghumbase-auth-container' : 'gramene-auth-container',
10212
10229
  children: /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("div", {