gramene-search 1.6.32 → 1.6.34

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
- 242994512
2
- 1752250063384523000
1
+ 261866942
2
+ 1752852912270260000
package/dist/index.js CHANGED
@@ -2279,6 +2279,7 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
2279
2279
  const [atlasExperiment, setAtlasExperiment] = (0, $gXNCa$react.useState)(null);
2280
2280
  const [atlasExperimentList, setAtlasExperimentList] = (0, $gXNCa$react.useState)([]);
2281
2281
  const [isLocal, setIsLocal] = (0, $gXNCa$react.useState)(false);
2282
+ const [activeTab, setActiveTab] = (0, $gXNCa$react.useState)('gene');
2282
2283
  const handleLocalAPIChange = (event)=>{
2283
2284
  setIsLocal(event.target.checked);
2284
2285
  };
@@ -2288,7 +2289,11 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
2288
2289
  let eList = props.expressionStudies[tid];
2289
2290
  if (props.searchResult.hasOwnProperty('expressed_in_gxa_attr_ss')) {
2290
2291
  const in_gxa = new Set(props.searchResult.expressed_in_gxa_attr_ss);
2291
- eList = props.expressionStudies[tid].filter((e)=>in_gxa.has(e._id));
2292
+ eList = props.expressionStudies[tid].filter((e)=>in_gxa.has(e._id)).sort((a, b)=>{
2293
+ const a_name = `${a.type}:${a.description || a._id}`;
2294
+ const b_name = `${b.type}:${b.description || b._id}`;
2295
+ return a_name < b_name ? -1 : 1;
2296
+ });
2292
2297
  }
2293
2298
  setAtlasExperimentList(eList);
2294
2299
  let refExp = eList.filter((e)=>e.isRef);
@@ -2309,6 +2314,8 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
2309
2314
  // }
2310
2315
  if (paralogs.length > 1 && atlasExperiment) paralogs_url = `https://dev.gramene.org/static/atlasWidget.html?genes=${paralogs.join(' ')}&experiment=${atlasExperiment}&localAPI=${isLocal}`;
2311
2316
  return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)((0, $gXNCa$reactbootstrap.Tabs), {
2317
+ activeKey: activeTab,
2318
+ onSelect: (k)=>setActiveTab(k),
2312
2319
  children: [
2313
2320
  paralogs_url && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)((0, $gXNCa$reactbootstrap.Tab), {
2314
2321
  tabClassName: "gxa",
@@ -2328,7 +2335,7 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
2328
2335
  ]
2329
2336
  }, idx))
2330
2337
  }),
2331
- /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$DynamicIframe, {
2338
+ activeTab === "paralogs" && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$DynamicIframe, {
2332
2339
  url: paralogs_url
2333
2340
  })
2334
2341
  ]
@@ -2337,7 +2344,7 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
2337
2344
  tabClassName: "gxa",
2338
2345
  eventKey: "gene",
2339
2346
  title: "All Studies",
2340
- children: /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$DynamicIframe, {
2347
+ children: activeTab === "gene" && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$DynamicIframe, {
2341
2348
  url: gene_url
2342
2349
  })
2343
2350
  }, "gxa"),