Mercurial > repos > fubar > jbrowse2
view x/static/js/2018.9ce7fb06.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/2018.9ce7fb06.chunk.js","mappings":"mOAYA,MAAMA,GAAYC,EAAAA,EAAAA,KAAAA,EAAaC,IAAS,CACtCC,QAAS,CACPC,MAAO,QAETC,MAAO,CACLC,OAAQJ,EAAMK,UACdC,QAASN,EAAMK,WAEjBE,OAAQ,CACNC,UAAW,GACXC,aAAc,IACdC,QAAS,aAIE,SAASC,GAAkB,MAAEC,IAC1C,MAAM,QAAEC,GAAYf,KACbgB,EAAKC,IAAUC,EAAAA,EAAAA,UAAS,KACxBC,EAAWC,IAAgBF,EAAAA,EAAAA,UAAS,gBAAeG,KAAKC,OAC/D,OACEC,EAAAA,cAACC,EAAAA,EAAK,CAACC,UAAWV,EAAQV,OACxBkB,EAAAA,cAAA,UACEA,EAAAA,cAAA,UAAI,sDACJA,EAAAA,cAAA,UAAI,6EAMNA,EAAAA,cAACG,EAAAA,EAAS,CACRC,WAAS,EACTC,KAAM,GACNC,MAAOb,EACPc,SAAUC,IACRd,EAAOc,EAAMC,OAAOH,MAAM,EAE5BI,YAAa,sDACbC,QAAQ,WACRT,UAAWV,EAAQZ,UAGrBoB,EAAAA,cAACY,EAAAA,EAAM,CAACD,QAAQ,WAAWE,UAAU,SAAQ,kCAE3Cb,EAAAA,cAAA,SACEc,KAAK,OACLC,QAAM,EACNC,UAAQ,EACRT,SAAUA,EAAGE,aACX,MAAMQ,EAAM,IAAKR,EAAOS,OAAS,IAAKC,KAAIC,IAAQ,CAChDN,KAAM,gBACNO,eAAgBC,EAAAA,WACZ,CACEC,UAAYH,EAAiCI,KAC7CC,aAAc,sBAEhBC,EAAAA,EAAAA,mBAAkB,CAAEC,KAAMP,IAC9BQ,OAAQR,EAAKS,SAEfnC,EAAOoC,KAAKC,UAAUd,EAAK,KAAM,GAAG,KAI1CjB,EAAAA,cAACG,EAAAA,EAAS,CACRG,MAAOV,EACPW,SAAUC,IACRX,EAAaW,EAAMC,OAAOH,MAAM,EAElC0B,WAAW,eAEbhC,EAAAA,cAACY,EAAAA,EAAM,CACLD,QAAQ,YACRT,UAAWV,EAAQN,OACnB+C,QAASA,KACP,MAAMC,GAAUC,EAAAA,EAAAA,YAAW5C,GAErB6C,EAAU,CACd,GAAGxC,EAAUyC,cAAcC,WAAW,IAAK,QAAQxC,KAAKC,QACxDmC,EAAQK,UAAY,GAAK,iBACzBC,KAAK,IAGP,IAAIC,EACJ,IACEA,EAAUX,KAAKY,MAAMjD,EACvB,CAAE,MAAOkD,GACPF,EAAUhD,EACPmD,MAAM,cACNzB,KAAI0B,GAAKA,EAAEC,SACXC,QAAOF,KAAOA,GACnB,CACA,MAAMG,EACkB,iBAAfP,EAAQ,GACX,CAAEA,WACF,CAAEQ,YAAaR,IAEjBS,EAAAA,EAAAA,wBAAuBhB,KACzBA,EAAQiB,aAAa,CACnBf,UACAtB,KAAM,yBACNe,KAAMjC,EACNwD,cAAe,CAAC7D,EAAM8D,UACtBC,QAAS,CACPxC,KAAM,wBACHkC,KAIPzD,EAAMgE,MAAMC,UAAUpB,IAExB7C,EAAMkE,aACFC,EAAAA,EAAAA,2BAA0BxB,IAC5BA,EAAQyB,WAAWpE,EACrB,GAEH,UAIDS,EAAAA,cAAA,SAAG,sBACHA,EAAAA,cAAA,UACEA,EAAAA,cAAA,UAAI,6FAEoB,IACtBA,EAAAA,cAAA,YAAO,2HAAkI,IAAI,iDAG/IA,EAAAA,cAAA,UAAI,oHAOZ,C","sources":["../../../plugins/wiggle/src/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport { Button, Paper, TextField } from '@mui/material'\nimport { makeStyles } from 'tss-react/mui'\nimport {\n getSession,\n isElectron,\n isSessionModelWithWidgets,\n isSessionWithAddTracks,\n} from '@jbrowse/core/util'\nimport { storeBlobLocation } from '@jbrowse/core/util/tracks'\nimport { AddTrackModel } from '@jbrowse/plugin-data-management'\n\nconst useStyles = makeStyles()(theme => ({\n textbox: {\n width: '100%',\n },\n paper: {\n margin: theme.spacing(),\n padding: theme.spacing(),\n },\n submit: {\n marginTop: 25,\n marginBottom: 100,\n display: 'block',\n },\n}))\n\nexport default function MultiWiggleWidget({ model }: { model: AddTrackModel }) {\n const { classes } = useStyles()\n const [val, setVal] = useState('')\n const [trackName, setTrackName] = useState(`MultiWiggle${+Date.now()}`)\n return (\n <Paper className={classes.paper}>\n <ul>\n <li>Enter list of URLs for bigwig files in the textbox</li>\n <li>\n Or, use the button below the text box to select files from your\n computer\n </li>\n </ul>\n\n <TextField\n multiline\n rows={10}\n value={val}\n onChange={event => {\n setVal(event.target.value)\n }}\n placeholder={'Paste list of URLs here, or use file selector below'}\n variant=\"outlined\"\n className={classes.textbox}\n />\n\n <Button variant=\"outlined\" component=\"label\">\n Choose Files from your computer\n <input\n type=\"file\"\n hidden\n multiple\n onChange={({ target }) => {\n const res = [...(target.files || [])].map(file => ({\n type: 'BigWigAdapter',\n bigWigLocation: isElectron\n ? {\n localPath: (file as File & { path: string }).path,\n locationType: 'LocalPathLocation',\n }\n : storeBlobLocation({ blob: file }),\n source: file.name,\n }))\n setVal(JSON.stringify(res, null, 2))\n }}\n />\n </Button>\n <TextField\n value={trackName}\n onChange={event => {\n setTrackName(event.target.value)\n }}\n helperText=\"Track name\"\n />\n <Button\n variant=\"contained\"\n className={classes.submit}\n onClick={() => {\n const session = getSession(model)\n\n const trackId = [\n `${trackName.toLowerCase().replaceAll(' ', '_')}-${Date.now()}`,\n session.adminMode ? '' : '-sessionTrack',\n ].join('')\n\n // allow list of bigwigs in JSON format or line-by-line\n let bigWigs: unknown[]\n try {\n bigWigs = JSON.parse(val)\n } catch (e) {\n bigWigs = val\n .split(/\\n|\\r\\n|\\r/)\n .map(f => f.trim())\n .filter(f => !!f)\n }\n const obj =\n typeof bigWigs[0] === 'string'\n ? { bigWigs }\n : { subadapters: bigWigs }\n\n if (isSessionWithAddTracks(session)) {\n session.addTrackConf({\n trackId,\n type: 'MultiQuantitativeTrack',\n name: trackName,\n assemblyNames: [model.assembly],\n adapter: {\n type: 'MultiWiggleAdapter',\n ...obj,\n },\n })\n\n model.view?.showTrack(trackId)\n }\n model.clearData()\n if (isSessionModelWithWidgets(session)) {\n session.hideWidget(model)\n }\n }}\n >\n Submit\n </Button>\n\n <p>Additional notes: </p>\n <ul>\n <li>\n The list of bigwig files in the text box can be a list of URLs, or a\n list of elements like{' '}\n <code>{`[{\"type\":\"BigWigAdapter\",\"bigWigLocation\":{\"uri\":\"http://host/file.bw\"}, \"color\":\"green\",\"source\":\"name for subtrack\"}]`}</code>{' '}\n to apply e.g. the color attribute to the view\n </li>\n <li>\n Adding local files will update the textbox with JSON contents that are\n ready to submit with the \"Submit\" button\n </li>\n </ul>\n </Paper>\n )\n}\n"],"names":["useStyles","makeStyles","theme","textbox","width","paper","margin","spacing","padding","submit","marginTop","marginBottom","display","MultiWiggleWidget","model","classes","val","setVal","useState","trackName","setTrackName","Date","now","React","Paper","className","TextField","multiline","rows","value","onChange","event","target","placeholder","variant","Button","component","type","hidden","multiple","res","files","map","file","bigWigLocation","isElectron","localPath","path","locationType","storeBlobLocation","blob","source","name","JSON","stringify","helperText","onClick","session","getSession","trackId","toLowerCase","replaceAll","adminMode","join","bigWigs","parse","e","split","f","trim","filter","obj","subadapters","isSessionWithAddTracks","addTrackConf","assemblyNames","assembly","adapter","view","showTrack","clearData","isSessionModelWithWidgets","hideWidget"],"sourceRoot":""}