diff --git a/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap b/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap index 686d52ff7e..4b36467a6f 100644 --- a/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap +++ b/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap @@ -1265,6 +1265,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch aria-hidden="true" aria-invalid="false" class="MuiSelect-nativeInput css-yf8vq0-MuiSelect-nativeInput" + name=":ri:" tabindex="-1" value="PileupRenderer" /> @@ -1319,8 +1320,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1328,10 +1329,10 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" > @@ -1350,7 +1351,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch

the color of each feature in a pileup alignment

@@ -1407,8 +1408,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1416,13 +1417,13 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" >
read sequencer orientation. fr is normal "reads pointing at each other ---> <--- while some other sequencers can use other options @@ -1485,8 +1487,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1494,13 +1496,13 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" >
Alternative display modes @@ -1563,8 +1566,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1572,10 +1575,10 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" > @@ -1594,7 +1597,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch
the minimum width in px for a pileup mismatch feature. use for increasing/decreasing mismatch marker widths when zoomed out, e.g. 0 or 1 @@ -1618,8 +1621,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1627,10 +1630,10 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" > @@ -1649,7 +1652,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch
the maximum height to be used in a pileup rendering @@ -1673,8 +1676,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1682,10 +1685,10 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" > @@ -1704,7 +1707,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch
the max clip size to be used in a pileup rendering @@ -1728,8 +1731,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1737,10 +1740,10 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" > @@ -1759,7 +1762,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch
the height of each feature in a pileup alignment @@ -1857,8 +1860,8 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch @@ -1866,10 +1869,10 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl css-md26zr-MuiInputBase-root-MuiOutlinedInput-root" > @@ -1888,7 +1891,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch
scale at which to draw the large insertion indicators (bp/pixel) diff --git a/plugins/data-management/package.json b/plugins/data-management/package.json index 6c0f3c442f..0b1fdb01ab 100644 --- a/plugins/data-management/package.json +++ b/plugins/data-management/package.json @@ -36,7 +36,7 @@ "clean": "rimraf dist esm *.tsbuildinfo" }, "dependencies": { - "@gmod/ucsc-hub": "^0.1.6", + "@gmod/ucsc-hub": "^0.3.0", "@mui/icons-material": "^5.0.1", "@mui/x-data-grid": "^6.0.1", "clsx": "^2.0.0", diff --git a/plugins/data-management/src/AddConnectionWidget/components/__snapshots__/AddConnectionWidget.test.tsx.snap b/plugins/data-management/src/AddConnectionWidget/components/__snapshots__/AddConnectionWidget.test.tsx.snap index f4adf06dc4..ed0ef61785 100644 --- a/plugins/data-management/src/AddConnectionWidget/components/__snapshots__/AddConnectionWidget.test.tsx.snap +++ b/plugins/data-management/src/AddConnectionWidget/components/__snapshots__/AddConnectionWidget.test.tsx.snap @@ -96,6 +96,7 @@ exports[`renders 1`] = ` aria-hidden="true" aria-invalid="false" class="MuiSelect-nativeInput css-yf8vq0-MuiSelect-nativeInput" + name=":r2:" tabindex="-1" value="UCSCTrackHubConnection" /> diff --git a/plugins/data-management/src/AddTrackWidget/model.ts b/plugins/data-management/src/AddTrackWidget/model.ts index a8b0f9a5b9..5866a28d61 100644 --- a/plugins/data-management/src/AddTrackWidget/model.ts +++ b/plugins/data-management/src/AddTrackWidget/model.ts @@ -21,11 +21,24 @@ interface IndexingAttr { attributes: string[] exclude: string[] } + +/** + * #stateModel AddTrackModel + */ export default function f(pluginManager: PluginManager) { return types .model('AddTrackModel', { + /** + * #property + */ id: ElementId, + /** + * #property + */ type: types.literal('AddTrackWidget'), + /** + * #property + */ view: types.safeReference( pluginManager.pluggableMstType('view', 'stateModel'), ), @@ -45,34 +58,63 @@ export default function f(pluginManager: PluginManager) { textIndexingConf: undefined as IndexingAttr | undefined, })) .actions(self => ({ + /** + * #action + */ setAdapterHint(obj: string) { self.adapterHint = obj }, + /** + * #action + */ setTrackSource(str: string) { self.trackSource = str }, + /** + * #action + */ setTextIndexingConf(conf: IndexingAttr) { self.textIndexingConf = conf }, + /** + * #action + */ setTextIndexTrack(flag: boolean) { self.textIndexTrack = flag }, + /** + * #action + */ setTrackData(obj: FileLocation) { self.trackData = obj }, + /** + * #action + */ setIndexTrackData(obj: FileLocation) { self.indexTrackData = obj }, + /** + * #action + */ setAssembly(str: string) { self.altAssemblyName = str }, + /** + * #action + */ setTrackName(str: string) { self.altTrackName = str }, + /** + * #action + */ setTrackType(str: string) { self.altTrackType = str }, - + /** + * #action + */ clearData() { self.trackSource = '' self.altTrackName = '' @@ -86,6 +128,9 @@ export default function f(pluginManager: PluginManager) { }, })) .views(self => ({ + /** + * #getter + */ get trackAdapter() { const { trackData, indexTrackData, adapterHint } = self @@ -94,6 +139,9 @@ export default function f(pluginManager: PluginManager) { : undefined }, + /** + * #getter + */ get trackName() { return ( self.altTrackName || @@ -101,6 +149,9 @@ export default function f(pluginManager: PluginManager) { ) }, + /** + * #getter + */ get isFtp() { const { trackData: track, indexTrackData: index } = self return !!( @@ -109,29 +160,47 @@ export default function f(pluginManager: PluginManager) { ) }, + /** + * #getter + */ get isRelativeTrackUrl() { // @ts-expect-error const uri = self.trackData?.uri return uri ? !isAbsoluteUrl(uri) : false }, + /** + * #getter + */ get isRelativeIndexUrl() { // @ts-expect-error const uri = self.indexTrackData?.uri return uri ? !isAbsoluteUrl(uri) : false }, + /** + * #getter + */ get isRelativeUrl() { return this.isRelativeIndexUrl || this.isRelativeTrackUrl }, + /** + * #getter + */ get trackHttp() { // @ts-expect-error return self.trackData?.uri?.startsWith('http://') }, + /** + * #getter + */ get indexHttp() { // @ts-expect-error return self.indexTrackData?.uri?.startsWith('http://') }, + /** + * #getter + */ get wrongProtocol() { return ( window.location.protocol === 'https:' && @@ -139,14 +208,23 @@ export default function f(pluginManager: PluginManager) { ) }, + /** + * #getter + */ get unsupported() { return this.trackAdapter?.type === UNSUPPORTED }, + /** + * #getter + */ get assembly() { return self.altAssemblyName || self.view.assemblyNames?.[0] }, + /** + * #getter + */ get trackType() { return ( self.altTrackType || @@ -157,6 +235,9 @@ export default function f(pluginManager: PluginManager) { }, })) .views(self => ({ + /** + * #getter + */ get warningMessage() { if (self.isFtp) { return `Warning: JBrowse cannot access files using the ftp protocol` diff --git a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap index 418a0e1d74..628bee023f 100644 --- a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap +++ b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap @@ -32,7 +32,7 @@ exports[`renders nothing with no assembly 1`] = ` class="MuiFormControl-root MuiFormControl-marginDense MuiFormControl-fullWidth MuiTextField-root css-rlnh8o-MuiFormControl-root-MuiTextField-root-searchBox" >