view x/static/js/7087.79101e8e.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line source

{"version":3,"file":"static/js/7087.79101e8e.chunk.js","mappings":"yaAeA,MAAMA,GAAiCC,EAAAA,EAAAA,OACrC,IAAM,kCAEFC,GAAkCD,EAAAA,EAAAA,OACtC,IAAM,kCAGR,SAASE,GAAc,WACrBC,EAAU,MACVC,IAKA,MAAMC,GAAUC,EAAAA,EAAAA,YAAWF,GAC3B,OACEG,EAAAA,cAAA,WACEA,EAAAA,cAACC,EAAAA,EAAU,KAAC,iDACZD,EAAAA,cAAA,UACGJ,EAAWM,KAAI,CAACC,EAAWC,IAE1BJ,EAAAA,cAAA,MAAIK,IAAK,GAAGF,KAAaC,KACtBD,EAAW,IACZH,EAAAA,cAACM,EAAAA,EAAI,CACHC,KAAK,IACLC,QAASC,IACPA,EAAMC,iBACN,MAAM,KAAEC,GAASd,EACjB,IACE,IAAIc,EAGF,MAAM,IAAIC,MACR,6DAHFD,EAAKE,iBAAiBV,EAM1B,CAAE,MAAOW,GACPC,QAAQC,MAAMF,GACdhB,EAAQmB,OAAO,GAAGH,IACpB,IAEH,aAQb,CAEA,SAASI,GAA+B,WACtCtB,EAAU,MACVC,EAAK,QACLsB,EAAO,SACPC,IAOA,MAAMtB,GAAUC,EAAAA,EAAAA,YAAWF,GACrBwB,EAAgB,IAAIC,EAAAA,cAAcH,GACxC,OACEnB,EAAAA,cAAA,WACEA,EAAAA,cAACC,EAAAA,EAAU,KAAC,qBACZD,EAAAA,cAAA,UACGJ,EAAWM,KAAIC,GACdH,EAAAA,cAAA,MAAIK,IAAKkB,KAAKC,UAAUrB,IACrB,GAAGgB,EAAQM,WAAWN,EAAQO,YAAYvB,IAAa,IACxDH,EAAAA,cAACM,EAAAA,EAAI,CACHC,KAAK,IACLC,QAASC,IACPA,EAAMC,iBACNZ,EAAQ6B,aAAYC,GAAe,CACjCpC,EACA,CACEoC,cACA/B,QACAsB,QAASE,EAETD,WACAT,KAAMd,EAAMc,KACZkB,aAAchC,EAAMc,KAAKmB,iBAAiB,GAAGD,gBAE/C,GAEL,gBAEO,IACR7B,EAAAA,cAACM,EAAAA,EAAI,CACHC,KAAK,IACLC,QAASC,IACPA,EAAMC,iBACNZ,EAAQ6B,aAAYC,GAAe,CACjClC,EACA,CACEkC,cACA/B,QACAsB,QAASE,EAETD,WACAT,KAAMd,EAAMc,KACZkB,aAAchC,EAAMc,KAAKmB,iBAAiB,GAAGD,gBAE/C,GAEL,oBAQb,CAEe,SAASE,EAAcC,GAKpC,MAAM,MAAEnC,EAAK,WAAED,EAAU,QAAEuB,GAAYa,EACjClC,GAAUC,EAAAA,EAAAA,YAAWF,IACrB,cAAEoC,IAAkBC,EAAAA,EAAAA,QAAOpC,GACjC,IAAIsB,EAEJ,IACEA,EAAWa,EAAcE,YAAY,sBACvC,CAAE,MAAOrB,GACP,CAGF,OACEd,EAAAA,cAACoC,EAAAA,SAAQC,EAAA,GAAKL,EAAK,CAAEM,MAAM,cACzBtC,EAAAA,cAACL,EAAa,CAACE,MAAOA,EAAOD,WAAYA,IACxCwB,EACCpB,EAAAA,cAACkB,EAA8B,CAC7BE,SAAUA,EACVvB,MAAOA,EACPD,WAAYA,EACZuB,QAASA,IAET,KAGV,C","sources":["../../../plugins/variants/src/VariantFeatureWidget/LaunchBreakendPanel.tsx"],"sourcesContent":["import React, { lazy } from 'react'\nimport { Link, Typography } from '@mui/material'\nimport {\n  getEnv,\n  getSession,\n  SimpleFeature,\n  SimpleFeatureSerialized,\n} from '@jbrowse/core/util'\nimport { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail'\nimport { ViewType } from '@jbrowse/core/pluggableElementTypes'\n\n// locals\nimport { VariantFeatureWidgetModel } from './stateModelFactory'\n\n// lazies\nconst BreakendMultiLevelOptionDialog = lazy(\n  () => import('./BreakendMultiLevelOptionDialog'),\n)\nconst BreakendSingleLevelOptionDialog = lazy(\n  () => import('./BreakendSingleLevelOptionDialog'),\n)\n\nfunction LocStringList({\n  locStrings,\n  model,\n}: {\n  locStrings: string[]\n  model: VariantFeatureWidgetModel\n}) {\n  const session = getSession(model)\n  return (\n    <div>\n      <Typography>Navigate to breakend endpoint in linear view:</Typography>\n      <ul>\n        {locStrings.map((locString, index) => (\n          /* biome-ignore lint/suspicious/noArrayIndexKey: */\n          <li key={`${locString}-${index}`}>\n            {locString}{' '}\n            <Link\n              href=\"#\"\n              onClick={event => {\n                event.preventDefault()\n                const { view } = model\n                try {\n                  if (view) {\n                    view.navToLocString?.(locString)\n                  } else {\n                    throw new Error(\n                      'No view associated with this feature detail panel anymore',\n                    )\n                  }\n                } catch (e) {\n                  console.error(e)\n                  session.notify(`${e}`)\n                }\n              }}\n            >\n              (LGV)\n            </Link>\n          </li>\n        ))}\n      </ul>\n    </div>\n  )\n}\n\nfunction LaunchBreakpointSplitViewPanel({\n  locStrings,\n  model,\n  feature,\n  viewType,\n}: {\n  locStrings: string[]\n  model: VariantFeatureWidgetModel\n  feature: SimpleFeatureSerialized\n  viewType: ViewType\n}) {\n  const session = getSession(model)\n  const simpleFeature = new SimpleFeature(feature)\n  return (\n    <div>\n      <Typography>Launch split view</Typography>\n      <ul>\n        {locStrings.map(locString => (\n          <li key={JSON.stringify(locString)}>\n            {`${feature.refName}:${feature.start} // ${locString}`}{' '}\n            <Link\n              href=\"#\"\n              onClick={event => {\n                event.preventDefault()\n                session.queueDialog(handleClose => [\n                  BreakendMultiLevelOptionDialog,\n                  {\n                    handleClose,\n                    model,\n                    feature: simpleFeature,\n                    // @ts-expect-error\n                    viewType,\n                    view: model.view,\n                    assemblyName: model.view.displayedRegions[0].assemblyName,\n                  },\n                ])\n              }}\n            >\n              (top/bottom)\n            </Link>{' '}\n            <Link\n              href=\"#\"\n              onClick={event => {\n                event.preventDefault()\n                session.queueDialog(handleClose => [\n                  BreakendSingleLevelOptionDialog,\n                  {\n                    handleClose,\n                    model,\n                    feature: simpleFeature,\n                    // @ts-expect-error\n                    viewType,\n                    view: model.view,\n                    assemblyName: model.view.displayedRegions[0].assemblyName,\n                  },\n                ])\n              }}\n            >\n              (single row)\n            </Link>\n          </li>\n        ))}\n      </ul>\n    </div>\n  )\n}\n\nexport default function BreakendPanel(props: {\n  locStrings: string[]\n  model: VariantFeatureWidgetModel\n  feature: SimpleFeatureSerialized\n}) {\n  const { model, locStrings, feature } = props\n  const session = getSession(model)\n  const { pluginManager } = getEnv(session)\n  let viewType: ViewType | undefined\n\n  try {\n    viewType = pluginManager.getViewType('BreakpointSplitView')\n  } catch (e) {\n    // ignore\n  }\n\n  return (\n    <BaseCard {...props} title=\"Breakends\">\n      <LocStringList model={model} locStrings={locStrings} />\n      {viewType ? (\n        <LaunchBreakpointSplitViewPanel\n          viewType={viewType}\n          model={model}\n          locStrings={locStrings}\n          feature={feature}\n        />\n      ) : null}\n    </BaseCard>\n  )\n}\n"],"names":["BreakendMultiLevelOptionDialog","lazy","BreakendSingleLevelOptionDialog","LocStringList","locStrings","model","session","getSession","React","Typography","map","locString","index","key","Link","href","onClick","event","preventDefault","view","Error","navToLocString","e","console","error","notify","LaunchBreakpointSplitViewPanel","feature","viewType","simpleFeature","SimpleFeature","JSON","stringify","refName","start","queueDialog","handleClose","assemblyName","displayedRegions","BreakendPanel","props","pluginManager","getEnv","getViewType","BaseCard","_extends","title"],"sourceRoot":""}