Mercurial > repos > fubar > jbrowse2
comparison x/static/js/4806.7e497d7a.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 |
comparison
equal
deleted
inserted
replaced
124:137e08517410 | 125:49f3d3878413 |
---|---|
1 {"version":3,"file":"static/js/4806.7e497d7a.chunk.js","mappings":"uSA8BA,MAiJA,GAjJyBA,EAAAA,EAAAA,WAAS,SAAUC,GAO1C,MAAM,MAAEC,EAAK,YAAEC,GAAgBF,GACxBG,EAAKC,IAAUC,EAAAA,EAAAA,UAAS,KACxBC,EAAQC,IAAaF,EAAAA,EAAAA,aACrBG,EAASC,IAAcJ,EAAAA,EAAAA,WAAS,IAChCK,EAAOC,IAAYN,EAAAA,EAAAA,aACnBO,EAAkBC,IAAuBR,EAAAA,EAAAA,WAAS,GAEnDS,EAAW,wBAAwBC,KAAKZ,GACxCa,EAA2B,IAAfb,EAAIc,SAAiBH,EACjCI,GAAeC,EAAAA,EAAAA,aAAYhB,EAAK,KAwBtC,OAvBAiB,EAAAA,EAAAA,YAAU,KAEP,WACC,IACE,IAAKJ,EAAW,CACdL,OAASU,GACTZ,GAAW,GACX,MAAMa,QAAaC,EAAAA,EAAAA,IAAmB,CACpCC,KAAMvB,EACNE,IAAKe,EACLO,QAASC,EAAAA,EAAAA,mBAAkBzB,GACxB0B,eAELpB,EAAUe,EACZ,CACF,CAAE,MAAOM,GACPC,QAAQnB,MAAMkB,GACdjB,EAASiB,EACX,CAAE,QACAnB,GAAW,EACb,CACD,EAnBA,EAmBG,GACH,CAACR,EAAOe,EAAWE,IAEpBY,EAAAA,cAACC,EAAAA,OAAM,CAACC,MAAI,EAACC,QAAS/B,EAAagC,MAAM,gBACvCJ,EAAAA,cAACK,EAAAA,EAAa,KACZL,EAAAA,cAACM,EAAAA,EAAU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BAC1DC,KAAM,GAAGjB,EAAUiB,QAAQ/E,KAAOyE,IAClCO,cAAU9D,KAECK,EAAAA,EAAAA,mBAAkBzB,GAChBmF,UAAUP,EAAaE,SAC1BI,SAAS,GACnBE,YAAY,CACZC,YAAa,EACbC,YAAa,KACbC,UAAW,CACTrF,MACA0C,MAAO+B,IAGb,CACF,CACA1E,GAAa,GAEhB,UAGD4B,EAAAA,cAAC2B,EAAAA,EAAM,CACLC,QAAQ,YACRrB,MAAM,YACNyB,QAASA,KACP5D,GAAa,GAEhB,WAMT,G","sources":["../../../plugins/alignments/src/LinearPileupDisplay/components/GroupByDialog.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react'\nimport { observer } from 'mobx-react'\nimport {\n Button,\n Checkbox,\n DialogActions,\n DialogContent,\n FormControlLabel,\n TextField,\n Typography,\n} from '@mui/material'\nimport { Dialog, ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui'\nimport { getSnapshot, IAnyStateTreeNode } from 'mobx-state-tree'\nimport {\n getContainingTrack,\n getContainingView,\n getSession,\n useDebounce,\n} from '@jbrowse/core/util'\nimport { AnyConfigurationModel } from '@jbrowse/core/configuration'\nimport { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'\n\n// locals\nimport { getUniqueTagValues } from '../../shared'\nimport { LinearAlignmentsDisplayModel } from '../../LinearAlignmentsDisplay/models/model'\n\nfunction clone(c: unknown) {\n return JSON.parse(JSON.stringify(c))\n}\n\nconst GroupByTagDialog = observer(function (props: {\n model: {\n adapterConfig: AnyConfigurationModel\n configuration: AnyConfigurationModel\n } & IAnyStateTreeNode\n handleClose: () => void\n}) {\n const { model, handleClose } = props\n const [tag, setTag] = useState('')\n const [tagSet, setTagSet] = useState<string[]>()\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<unknown>()\n const [includeUndefined, setIncludeUndefined] = useState(true)\n\n const validTag = /^[A-Za-z][A-Za-z0-9]$/.exec(tag)\n const isInvalid = tag.length === 2 && !validTag\n const debouncedTag = useDebounce(tag, 1000)\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ;(async () => {\n try {\n if (!isInvalid) {\n setError(undefined)\n setLoading(true)\n const vals = await getUniqueTagValues({\n self: model,\n tag: debouncedTag,\n blocks: (getContainingView(model) as LinearGenomeViewModel)\n .staticBlocks,\n })\n setTagSet(vals)\n }\n } catch (e) {\n console.error(e)\n setError(e)\n } finally {\n setLoading(false)\n }\n })()\n }, [model, isInvalid, debouncedTag])\n return (\n <Dialog open onClose={handleClose} title=\"Group by tag\">\n <DialogContent>\n <Typography>\n Set the tag to group by. NOTE: this will make a set of fully\n functional subtracks with the filter by by default set to the values\n of the tag that are visible in the current view\n </Typography>\n <Typography color=\"textSecondary\">\n Examples: HP for haplotype, RG for read group, etc.\n </Typography>\n\n <FormControlLabel\n control={\n <Checkbox\n checked={includeUndefined}\n onChange={() => {\n setIncludeUndefined(!includeUndefined)\n }}\n />\n }\n label=\"Make a new subtrack for undefined values of tag as well?\"\n />\n <TextField\n value={tag}\n onChange={event => {\n setTag(event.target.value)\n }}\n placeholder=\"Enter tag name\"\n inputProps={{\n maxLength: 2,\n 'data-testid': 'group-tag-name-input',\n }}\n error={isInvalid}\n helperText={isInvalid ? 'Not a valid tag' : ''}\n autoComplete=\"off\"\n data-testid=\"group-tag-name\"\n />\n {error ? (\n <ErrorMessage error={error} />\n ) : loading ? (\n <LoadingEllipses title=\"Loading unique tags\" />\n ) : tagSet ? (\n <div>\n <div>Found unique {tag} values:</div>\n <div>{tagSet.join(', ')}</div>\n </div>\n ) : null}\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n disabled={!tagSet}\n autoFocus\n onClick={() => {\n const track = getContainingTrack(model)\n const trackConf = clone(getSnapshot(track.configuration))\n const session = getSession(model)\n if (tagSet) {\n const ret = [...tagSet] as (string | undefined)[]\n if (includeUndefined) {\n ret.push(undefined)\n }\n for (const tagValue of ret) {\n // @ts-expect-error\n const newTrackConf = session.addTrackConf({\n ...trackConf,\n trackId: `${trackConf.trackId}-${tag}:${tagValue}-${+Date.now()}-sessionTrack`,\n name: `${trackConf.name} ${tag}:${tagValue}`,\n displays: undefined,\n })\n const view = getContainingView(model) as LinearGenomeViewModel\n const t = view.showTrack(newTrackConf.trackId)\n const d = t.displays[0] as LinearAlignmentsDisplayModel\n d.setFilterBy({\n flagInclude: 0,\n flagExclude: 1540,\n tagFilter: {\n tag,\n value: tagValue,\n },\n })\n }\n }\n handleClose()\n }}\n >\n Submit\n </Button>\n <Button\n variant=\"contained\"\n color=\"secondary\"\n onClick={() => {\n handleClose()\n }}\n >\n Cancel\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default GroupByTagDialog\n"],"names":["observer","props","model","handleClose","tag","setTag","useState","tagSet","setTagSet","loading","setLoading","error","setError","includeUndefined","setIncludeUndefined","validTag","exec","isInvalid","length","debouncedTag","useDebounce","useEffect","undefined","vals","getUniqueTagValues","self","blocks","getContainingView","staticBlocks","e","console","React","Dialog","open","onClose","title","DialogContent","Typography","color","FormControlLabel","control","Checkbox","checked","onChange","label","TextField","value","event","target","placeholder","inputProps","maxLength","helperText","autoComplete","ErrorMessage","LoadingEllipses","join","DialogActions","Button","variant","type","disabled","autoFocus","onClick","track","getContainingTrack","trackConf","c","getSnapshot","configuration","JSON","parse","stringify","session","getSession","ret","push","tagValue","newTrackConf","addTrackConf","trackId","Date","now","name","displays","showTrack","setFilterBy","flagInclude","flagExclude","tagFilter"],"sourceRoot":""} |