@jbrowse/plugin-data-management 2.17.0 → 2.18.0
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.
- package/dist/AddConnectionWidget/components/AddConnectionWidget.js +3 -5
- package/dist/AddConnectionWidget/components/ConfigureConnection.d.ts +3 -3
- package/dist/AddConnectionWidget/components/ConfigureConnection.js +2 -2
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.d.ts +1 -1
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.js +1 -2
- package/dist/AddConnectionWidget/index.d.ts +1 -1
- package/dist/AddConnectionWidget/index.js +1 -1
- package/dist/AddConnectionWidget/model.js +1 -1
- package/dist/AddTrackWidget/components/AddTrackWidget.d.ts +1 -1
- package/dist/AddTrackWidget/components/AddTrackWidget.js +2 -3
- package/dist/AddTrackWidget/components/ConfirmTrack.d.ts +1 -1
- package/dist/AddTrackWidget/components/ConfirmTrack.js +5 -6
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +1 -1
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.js +4 -5
- package/dist/AddTrackWidget/components/PasteConfigWorkflow.d.ts +1 -1
- package/dist/AddTrackWidget/components/PasteConfigWorkflow.js +2 -2
- package/dist/AddTrackWidget/components/TextIndexingConfig.d.ts +1 -1
- package/dist/AddTrackWidget/components/TextIndexingConfig.js +4 -7
- package/dist/AddTrackWidget/components/TrackAdapterSelector.d.ts +1 -1
- package/dist/AddTrackWidget/components/TrackAdapterSelector.js +2 -8
- package/dist/AddTrackWidget/components/TrackSourceSelect.d.ts +1 -1
- package/dist/AddTrackWidget/components/TrackSourceSelect.js +2 -2
- package/dist/AddTrackWidget/components/TrackTypeSelector.d.ts +1 -1
- package/dist/AddTrackWidget/components/TrackTypeSelector.js +1 -2
- package/dist/AddTrackWidget/index.d.ts +1 -1
- package/dist/AddTrackWidget/index.js +1 -1
- package/dist/AddTrackWidget/model.d.ts +3 -84
- package/dist/AddTrackWidget/model.js +3 -91
- package/dist/AssemblyManager/AssemblyAddForm.d.ts +4 -4
- package/dist/AssemblyManager/AssemblyAddForm.js +100 -99
- package/dist/AssemblyManager/AssemblyEditor.d.ts +3 -2
- package/dist/AssemblyManager/AssemblyEditor.js +10 -3
- package/dist/AssemblyManager/AssemblyManager.d.ts +4 -3
- package/dist/AssemblyManager/AssemblyManager.js +17 -31
- package/dist/AssemblyManager/AssemblyTable.d.ts +7 -10
- package/dist/AssemblyManager/AssemblyTable.js +53 -34
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalFab.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalFab.js +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +1 -3
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.js +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.js +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.js +4 -5
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.js +3 -3
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +5 -8
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +0 -6
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.js +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +1 -3
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +5 -8
- package/dist/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.d.ts +3 -3
- package/dist/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.js +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.js +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +2 -5
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +2 -3
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +2 -14
- package/dist/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.js +2 -3
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.js +2 -6
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +2 -4
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.js +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.js +1 -11
- package/dist/HierarchicalTrackSelectorWidget/components/util.d.ts +4 -4
- package/dist/HierarchicalTrackSelectorWidget/components/util.js +0 -1
- package/dist/HierarchicalTrackSelectorWidget/facetedModel.d.ts +1 -61
- package/dist/HierarchicalTrackSelectorWidget/facetedModel.js +12 -74
- package/dist/HierarchicalTrackSelectorWidget/filterTracks.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/generateHierarchy.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/generateHierarchy.js +0 -13
- package/dist/HierarchicalTrackSelectorWidget/index.d.ts +1 -1
- package/dist/HierarchicalTrackSelectorWidget/index.js +3 -3
- package/dist/HierarchicalTrackSelectorWidget/model.d.ts +3 -177
- package/dist/HierarchicalTrackSelectorWidget/model.js +3 -183
- package/dist/HierarchicalTrackSelectorWidget/util.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/util.js +0 -3
- package/dist/PluginStoreWidget/components/AddCustomPluginDialog.d.ts +1 -1
- package/dist/PluginStoreWidget/components/AddCustomPluginDialog.js +4 -5
- package/dist/PluginStoreWidget/components/DeletePluginDialog.js +1 -2
- package/dist/PluginStoreWidget/components/InstalledPlugin.d.ts +2 -2
- package/dist/PluginStoreWidget/components/InstalledPlugin.js +28 -27
- package/dist/PluginStoreWidget/components/InstalledPluginsList.d.ts +2 -2
- package/dist/PluginStoreWidget/components/InstalledPluginsList.js +1 -1
- package/dist/PluginStoreWidget/components/PluginCard.d.ts +3 -4
- package/dist/PluginStoreWidget/components/PluginCard.js +20 -18
- package/dist/PluginStoreWidget/components/PluginStoreWidget.d.ts +1 -1
- package/dist/PluginStoreWidget/components/PluginStoreWidget.js +24 -20
- package/dist/PluginStoreWidget/components/util.d.ts +1 -1
- package/dist/PluginStoreWidget/components/util.js +0 -1
- package/dist/PluginStoreWidget/index.d.ts +1 -1
- package/dist/PluginStoreWidget/index.js +1 -1
- package/dist/PluginStoreWidget/model.d.ts +2 -8
- package/dist/PluginStoreWidget/model.js +1 -19
- package/dist/{ucsc-trackhub → UCSCTrackHub}/configSchema.d.ts +0 -6
- package/dist/{ucsc-trackhub → UCSCTrackHub}/configSchema.js +2 -14
- package/{esm/ucsc-trackhub → dist/UCSCTrackHub}/doConnect.d.ts +1 -1
- package/dist/{ucsc-trackhub → UCSCTrackHub}/doConnect.js +1 -5
- package/dist/{ucsc-trackhub → UCSCTrackHub}/index.d.ts +1 -1
- package/dist/{ucsc-trackhub → UCSCTrackHub}/index.js +11 -9
- package/dist/{ucsc-trackhub → UCSCTrackHub}/model.d.ts +1 -14
- package/dist/{ucsc-trackhub → UCSCTrackHub}/model.js +1 -16
- package/dist/{ucsc-trackhub → UCSCTrackHub}/ucscAssemblies.js +0 -3
- package/dist/{ucsc-trackhub → UCSCTrackHub}/ucscTrackHub.d.ts +1 -1
- package/dist/{ucsc-trackhub → UCSCTrackHub}/ucscTrackHub.js +1 -15
- package/dist/index.d.ts +9 -9
- package/dist/index.js +4 -4
- package/esm/AddConnectionWidget/components/AddConnectionWidget.js +3 -5
- package/esm/AddConnectionWidget/components/ConfigureConnection.d.ts +3 -3
- package/esm/AddConnectionWidget/components/ConfigureConnection.js +2 -2
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.d.ts +1 -1
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.js +1 -2
- package/esm/AddConnectionWidget/index.d.ts +1 -1
- package/esm/AddConnectionWidget/index.js +1 -1
- package/esm/AddConnectionWidget/model.js +1 -1
- package/esm/AddTrackWidget/components/AddTrackWidget.d.ts +1 -1
- package/esm/AddTrackWidget/components/AddTrackWidget.js +2 -3
- package/esm/AddTrackWidget/components/ConfirmTrack.d.ts +1 -1
- package/esm/AddTrackWidget/components/ConfirmTrack.js +5 -6
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +1 -1
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.js +4 -5
- package/esm/AddTrackWidget/components/PasteConfigWorkflow.d.ts +1 -1
- package/esm/AddTrackWidget/components/PasteConfigWorkflow.js +2 -2
- package/esm/AddTrackWidget/components/TextIndexingConfig.d.ts +1 -1
- package/esm/AddTrackWidget/components/TextIndexingConfig.js +5 -8
- package/esm/AddTrackWidget/components/TrackAdapterSelector.d.ts +1 -1
- package/esm/AddTrackWidget/components/TrackAdapterSelector.js +2 -8
- package/esm/AddTrackWidget/components/TrackSourceSelect.d.ts +1 -1
- package/esm/AddTrackWidget/components/TrackSourceSelect.js +2 -2
- package/esm/AddTrackWidget/components/TrackTypeSelector.d.ts +1 -1
- package/esm/AddTrackWidget/components/TrackTypeSelector.js +1 -2
- package/esm/AddTrackWidget/index.d.ts +1 -1
- package/esm/AddTrackWidget/index.js +1 -1
- package/esm/AddTrackWidget/model.d.ts +3 -84
- package/esm/AddTrackWidget/model.js +3 -91
- package/esm/AssemblyManager/AssemblyAddForm.d.ts +4 -4
- package/esm/AssemblyManager/AssemblyAddForm.js +100 -96
- package/esm/AssemblyManager/AssemblyEditor.d.ts +3 -2
- package/esm/AssemblyManager/AssemblyEditor.js +10 -3
- package/esm/AssemblyManager/AssemblyManager.d.ts +4 -3
- package/esm/AssemblyManager/AssemblyManager.js +17 -31
- package/esm/AssemblyManager/AssemblyTable.d.ts +7 -10
- package/esm/AssemblyManager/AssemblyTable.js +54 -35
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalFab.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalFab.js +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +1 -3
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.js +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.js +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.js +4 -5
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.js +3 -3
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +5 -8
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +0 -6
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.js +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +1 -3
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +5 -8
- package/esm/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.d.ts +3 -3
- package/esm/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.js +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.js +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +3 -6
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +2 -3
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +3 -15
- package/esm/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.js +2 -3
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.js +2 -6
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +2 -4
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.js +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.js +1 -11
- package/esm/HierarchicalTrackSelectorWidget/components/util.d.ts +4 -4
- package/esm/HierarchicalTrackSelectorWidget/components/util.js +0 -1
- package/esm/HierarchicalTrackSelectorWidget/facetedModel.d.ts +1 -61
- package/esm/HierarchicalTrackSelectorWidget/facetedModel.js +6 -68
- package/esm/HierarchicalTrackSelectorWidget/filterTracks.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/filterTracks.js +1 -1
- package/esm/HierarchicalTrackSelectorWidget/generateHierarchy.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/generateHierarchy.js +1 -14
- package/esm/HierarchicalTrackSelectorWidget/index.d.ts +1 -1
- package/esm/HierarchicalTrackSelectorWidget/index.js +3 -3
- package/esm/HierarchicalTrackSelectorWidget/model.d.ts +3 -177
- package/esm/HierarchicalTrackSelectorWidget/model.js +4 -184
- package/esm/HierarchicalTrackSelectorWidget/util.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/util.js +1 -4
- package/esm/PluginStoreWidget/components/AddCustomPluginDialog.d.ts +1 -1
- package/esm/PluginStoreWidget/components/AddCustomPluginDialog.js +4 -5
- package/esm/PluginStoreWidget/components/DeletePluginDialog.js +1 -2
- package/esm/PluginStoreWidget/components/InstalledPlugin.d.ts +2 -2
- package/esm/PluginStoreWidget/components/InstalledPlugin.js +29 -28
- package/esm/PluginStoreWidget/components/InstalledPluginsList.d.ts +2 -2
- package/esm/PluginStoreWidget/components/InstalledPluginsList.js +1 -1
- package/esm/PluginStoreWidget/components/PluginCard.d.ts +3 -4
- package/esm/PluginStoreWidget/components/PluginCard.js +22 -20
- package/esm/PluginStoreWidget/components/PluginStoreWidget.d.ts +1 -1
- package/esm/PluginStoreWidget/components/PluginStoreWidget.js +25 -21
- package/esm/PluginStoreWidget/components/util.d.ts +1 -1
- package/esm/PluginStoreWidget/components/util.js +1 -2
- package/esm/PluginStoreWidget/index.d.ts +1 -1
- package/esm/PluginStoreWidget/index.js +1 -1
- package/esm/PluginStoreWidget/model.d.ts +2 -8
- package/esm/PluginStoreWidget/model.js +1 -19
- package/esm/{ucsc-trackhub → UCSCTrackHub}/configSchema.d.ts +0 -6
- package/esm/{ucsc-trackhub → UCSCTrackHub}/configSchema.js +2 -14
- package/{dist/ucsc-trackhub → esm/UCSCTrackHub}/doConnect.d.ts +1 -1
- package/esm/{ucsc-trackhub → UCSCTrackHub}/doConnect.js +1 -5
- package/esm/{ucsc-trackhub → UCSCTrackHub}/index.d.ts +1 -1
- package/esm/UCSCTrackHub/index.js +15 -0
- package/esm/{ucsc-trackhub → UCSCTrackHub}/model.d.ts +1 -14
- package/esm/{ucsc-trackhub → UCSCTrackHub}/model.js +1 -16
- package/esm/{ucsc-trackhub → UCSCTrackHub}/ucscAssemblies.js +0 -3
- package/esm/{ucsc-trackhub → UCSCTrackHub}/ucscTrackHub.d.ts +1 -1
- package/esm/{ucsc-trackhub → UCSCTrackHub}/ucscTrackHub.js +2 -16
- package/esm/index.d.ts +9 -9
- package/esm/index.js +3 -3
- package/package.json +2 -2
- package/esm/ucsc-trackhub/index.js +0 -13
- /package/dist/{ucsc-trackhub → UCSCTrackHub}/ucscAssemblies.d.ts +0 -0
- /package/esm/{ucsc-trackhub → UCSCTrackHub}/ucscAssemblies.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
-
import { AbstractSessionModel } from '@jbrowse/core/util';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { AbstractSessionModel } from '@jbrowse/core/util';
|
|
3
3
|
export declare function hasAnyOverlap<T>(a1?: T[], a2?: T[]): boolean;
|
|
4
4
|
export declare function hasAllOverlap<T>(a1?: T[], a2?: T[]): boolean;
|
|
5
5
|
export declare function matches(query: string, conf: AnyConfigurationModel, session: AbstractSessionModel): boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { readConfObject
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
2
|
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
3
3
|
export function hasAnyOverlap(a1 = [], a2 = []) {
|
|
4
|
-
// shortcut case is that arrays are single entries, and are equal
|
|
5
|
-
// long case is that we use a set
|
|
6
4
|
if (a1[0] === a2[0]) {
|
|
7
5
|
return true;
|
|
8
6
|
}
|
|
@@ -26,7 +24,6 @@ export function findSubCategories(obj, paths, depth = 0) {
|
|
|
26
24
|
for (const elt of obj) {
|
|
27
25
|
if (elt.children.length) {
|
|
28
26
|
const hasSubCategories = findSubCategories(elt.children, paths, depth + 1);
|
|
29
|
-
// avoid pushing the root "Tracks" node by checking depth>0
|
|
30
27
|
if (hasSubCategories && depth > 0) {
|
|
31
28
|
paths.push(elt.id);
|
|
32
29
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
2
|
import { Dialog } from '@jbrowse/core/ui';
|
|
4
|
-
import { Button, Collapse, DialogActions, DialogContent, DialogContentText, TextField, } from '@mui/material';
|
|
5
|
-
import { makeStyles } from 'tss-react/mui';
|
|
6
3
|
import { getSession } from '@jbrowse/core/util';
|
|
7
|
-
// icons
|
|
8
|
-
import IconButton from '@mui/material/IconButton';
|
|
9
4
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
5
|
+
import { Button, Collapse, DialogActions, DialogContent, DialogContentText, TextField, } from '@mui/material';
|
|
6
|
+
import IconButton from '@mui/material/IconButton';
|
|
7
|
+
import { observer } from 'mobx-react';
|
|
8
|
+
import { makeStyles } from 'tss-react/mui';
|
|
10
9
|
const useStyles = makeStyles()(theme => ({
|
|
11
10
|
dialogContent: {
|
|
12
11
|
display: 'flex',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Button, DialogActions, DialogContent, Typography } from '@mui/material';
|
|
3
2
|
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
+
import { Button, DialogActions, DialogContent, Typography } from '@mui/material';
|
|
4
4
|
export default function DeletePluginDialog({ onClose, plugin, }) {
|
|
5
5
|
return (React.createElement(Dialog, { open: true, onClose: () => {
|
|
6
6
|
onClose();
|
|
@@ -13,7 +13,6 @@ export default function DeletePluginDialog({ onClose, plugin, }) {
|
|
|
13
13
|
React.createElement(Typography, { color: "error" }, "Note: if any resources in this session still use this plugin, it may cause your session to crash")),
|
|
14
14
|
React.createElement(DialogActions, null,
|
|
15
15
|
React.createElement(Button, { variant: "contained", color: "primary", onClick: () => {
|
|
16
|
-
// avoid showing runtime plugin warning
|
|
17
16
|
window.setTimeout(() => {
|
|
18
17
|
onClose(plugin);
|
|
19
18
|
}, 500);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { PluginStoreModel } from '../model';
|
|
3
|
+
import type { BasePlugin } from '@jbrowse/core/util/types';
|
|
4
4
|
declare const InstalledPlugin: ({ plugin, model, }: {
|
|
5
5
|
plugin: BasePlugin;
|
|
6
6
|
model: PluginStoreModel;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
1
|
+
import React, { lazy } from 'react';
|
|
2
|
+
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
3
|
+
import { isSessionWithSessionPlugins } from '@jbrowse/core/util/types';
|
|
5
4
|
import CloseIcon from '@mui/icons-material/Close';
|
|
6
5
|
import LockIcon from '@mui/icons-material/Lock';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
6
|
+
import { IconButton, ListItem, Tooltip, Typography } from '@mui/material';
|
|
7
|
+
import { observer } from 'mobx-react';
|
|
8
|
+
import { makeStyles } from 'tss-react/mui';
|
|
10
9
|
const DeletePluginDialog = lazy(() => import('./DeletePluginDialog'));
|
|
11
10
|
const useStyles = makeStyles()(() => ({
|
|
12
11
|
lockedPluginTooltip: {
|
|
@@ -19,32 +18,34 @@ function LockedPlugin() {
|
|
|
19
18
|
React.createElement(LockIcon, null)));
|
|
20
19
|
}
|
|
21
20
|
const InstalledPlugin = observer(function ({ plugin, model, }) {
|
|
22
|
-
const [dialogPlugin, setDialogPlugin] = useState();
|
|
23
21
|
const { pluginManager } = getEnv(model);
|
|
24
22
|
const session = getSession(model);
|
|
25
23
|
const { jbrowse, adminMode } = session;
|
|
26
24
|
const isSessionPlugin = isSessionWithSessionPlugins(session)
|
|
27
25
|
? session.sessionPlugins.some(p => { var _a; return ((_a = pluginManager.pluginMetadata[plugin.name]) === null || _a === void 0 ? void 0 : _a.url) === p.url; })
|
|
28
26
|
: false;
|
|
29
|
-
return (React.createElement(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
return (React.createElement(ListItem, { key: plugin.name },
|
|
28
|
+
adminMode || isSessionPlugin ? (React.createElement(IconButton, { "data-testid": `removePlugin-${plugin.name}`, onClick: () => {
|
|
29
|
+
session.queueDialog(onClose => [
|
|
30
|
+
DeletePluginDialog,
|
|
31
|
+
{
|
|
32
|
+
plugin: plugin.name,
|
|
33
|
+
onClose: (name) => {
|
|
34
|
+
if (name) {
|
|
35
|
+
const pluginMetadata = pluginManager.pluginMetadata[plugin.name];
|
|
36
|
+
if (adminMode) {
|
|
37
|
+
jbrowse.removePlugin(pluginMetadata);
|
|
38
|
+
}
|
|
39
|
+
else if (isSessionWithSessionPlugins(session)) {
|
|
40
|
+
session.removeSessionPlugin(pluginMetadata);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
onClose();
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
]);
|
|
47
|
+
} },
|
|
48
|
+
React.createElement(CloseIcon, null))) : (React.createElement(LockedPlugin, null)),
|
|
49
|
+
React.createElement(Typography, null, plugin.name)));
|
|
49
50
|
});
|
|
50
51
|
export default InstalledPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import type { PluginStoreModel } from '../model';
|
|
3
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
4
4
|
declare const InstalledPluginsList: ({ pluginManager, model, }: {
|
|
5
5
|
pluginManager: PluginManager;
|
|
6
6
|
model: PluginStoreModel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
2
|
import { List, Typography } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
import InstalledPlugin from './InstalledPlugin';
|
|
5
5
|
const InstalledPluginsList = observer(function InstalledPluginsList({ pluginManager, model, }) {
|
|
6
6
|
const { plugins } = pluginManager;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
declare const PluginCard: ({ plugin, model,
|
|
2
|
+
import type { PluginStoreModel } from '../model';
|
|
3
|
+
import type { JBrowsePlugin } from '@jbrowse/core/util/types';
|
|
4
|
+
declare const PluginCard: ({ plugin, model, }: {
|
|
5
5
|
plugin: JBrowsePlugin;
|
|
6
6
|
model: PluginStoreModel;
|
|
7
|
-
adminMode: boolean;
|
|
8
7
|
}) => React.JSX.Element;
|
|
9
8
|
export default PluginCard;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { getSession, getEnv } from '@jbrowse/core/util';
|
|
5
|
-
import { isSessionWithSessionPlugins, } from '@jbrowse/core/util/types';
|
|
6
|
-
import { Card, CardActions, CardContent, Button, Link, Typography, } from '@mui/material';
|
|
7
|
-
import { makeStyles } from 'tss-react/mui';
|
|
8
|
-
// icons
|
|
9
|
-
import PersonIcon from '@mui/icons-material/Person';
|
|
2
|
+
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
3
|
+
import { isSessionWithSessionPlugins } from '@jbrowse/core/util/types';
|
|
10
4
|
import AddIcon from '@mui/icons-material/Add';
|
|
11
5
|
import CheckIcon from '@mui/icons-material/Check';
|
|
6
|
+
import PersonIcon from '@mui/icons-material/Person';
|
|
7
|
+
import { Button, Card, CardActions, CardContent, Link, Typography, } from '@mui/material';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
import { makeStyles } from 'tss-react/mui';
|
|
12
10
|
const useStyles = makeStyles()({
|
|
13
11
|
card: {
|
|
14
12
|
margin: '0.5em',
|
|
@@ -24,35 +22,39 @@ const useStyles = makeStyles()({
|
|
|
24
22
|
display: 'flex',
|
|
25
23
|
alignItems: 'center',
|
|
26
24
|
},
|
|
25
|
+
mr: {
|
|
26
|
+
marginRight: '0.5em',
|
|
27
|
+
},
|
|
27
28
|
});
|
|
28
|
-
const PluginCard = observer(function PluginCard({ plugin, model,
|
|
29
|
+
const PluginCard = observer(function PluginCard({ plugin, model, }) {
|
|
29
30
|
const { classes } = useStyles();
|
|
30
31
|
const session = getSession(model);
|
|
31
32
|
const { pluginManager } = getEnv(model);
|
|
32
33
|
const { runtimePluginDefinitions } = pluginManager;
|
|
33
|
-
|
|
34
|
-
const isInstalled = runtimePluginDefinitions.some(d => d.url === plugin.url);
|
|
34
|
+
const isInstalled = runtimePluginDefinitions.some(d => 'url' in d && d.url === plugin.url);
|
|
35
35
|
const [tempDisabled, setTempDisabled] = useState(false);
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
return (React.createElement(Card, { variant: "outlined", key: plugin.name, className: classes.card },
|
|
36
|
+
const { adminMode, jbrowse } = session;
|
|
37
|
+
const { name, authors, description } = plugin;
|
|
38
|
+
return (React.createElement(Card, { variant: "outlined", key: name, className: classes.card },
|
|
40
39
|
React.createElement(CardContent, null,
|
|
41
40
|
React.createElement(Typography, { variant: "h5" },
|
|
42
41
|
React.createElement(Link, { href: `${plugin.location}#readme`, target: "_blank", rel: "noopener" }, plugin.name)),
|
|
43
42
|
React.createElement("div", { className: classes.dataField },
|
|
44
|
-
React.createElement(PersonIcon, {
|
|
45
|
-
React.createElement(Typography, null,
|
|
43
|
+
React.createElement(PersonIcon, { className: classes.mr }),
|
|
44
|
+
React.createElement(Typography, null, authors.join(', '))),
|
|
46
45
|
React.createElement(Typography, { className: classes.bold }, "Description:"),
|
|
47
|
-
React.createElement(Typography, null,
|
|
46
|
+
React.createElement(Typography, null, description)),
|
|
48
47
|
React.createElement(CardActions, null,
|
|
49
|
-
React.createElement(Button, { variant: "contained", disabled:
|
|
48
|
+
React.createElement(Button, { variant: "contained", disabled: isInstalled || tempDisabled, startIcon: isInstalled ? React.createElement(CheckIcon, null) : React.createElement(AddIcon, null), onClick: () => {
|
|
50
49
|
if (adminMode) {
|
|
51
|
-
jbrowse.addPlugin(
|
|
50
|
+
jbrowse.addPlugin(plugin);
|
|
52
51
|
}
|
|
53
52
|
else if (isSessionWithSessionPlugins(session)) {
|
|
54
53
|
session.addSessionPlugin(plugin);
|
|
55
54
|
}
|
|
55
|
+
else {
|
|
56
|
+
session.notify('No way to install plugin');
|
|
57
|
+
}
|
|
56
58
|
setTempDisabled(true);
|
|
57
59
|
} }, isInstalled ? 'Installed' : 'Install'))));
|
|
58
60
|
});
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { Accordion, AccordionSummary, Button, IconButton, InputAdornment, TextField, Typography, } from '@mui/material';
|
|
3
|
-
import { makeStyles } from 'tss-react/mui';
|
|
4
|
-
import { observer } from 'mobx-react';
|
|
5
|
-
import { getEnv } from 'mobx-state-tree';
|
|
1
|
+
import React, { lazy } from 'react';
|
|
6
2
|
import { LoadingEllipses } from '@jbrowse/core/ui';
|
|
7
3
|
import { getSession, isElectron } from '@jbrowse/core/util';
|
|
8
|
-
// icons
|
|
9
|
-
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
10
4
|
import ClearIcon from '@mui/icons-material/Clear';
|
|
5
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
11
6
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
12
|
-
|
|
7
|
+
import { Accordion, AccordionSummary, Button, IconButton, InputAdornment, TextField, Typography, } from '@mui/material';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
import { getEnv } from 'mobx-state-tree';
|
|
10
|
+
import { makeStyles } from 'tss-react/mui';
|
|
13
11
|
import InstalledPluginsList from './InstalledPluginsList';
|
|
14
12
|
import PluginCard from './PluginCard';
|
|
15
13
|
import { useFetchPlugins } from './util';
|
|
16
|
-
// lazies
|
|
17
14
|
const AddCustomPluginDialog = lazy(() => import('./AddCustomPluginDialog'));
|
|
18
15
|
const useStyles = makeStyles()(theme => ({
|
|
19
16
|
expandIcon: {
|
|
@@ -30,28 +27,36 @@ const useStyles = makeStyles()(theme => ({
|
|
|
30
27
|
margin: '1em auto',
|
|
31
28
|
display: 'flex',
|
|
32
29
|
},
|
|
30
|
+
mr: {
|
|
31
|
+
marginRight: '0.3em',
|
|
32
|
+
},
|
|
33
|
+
m: {
|
|
34
|
+
margin: '1em',
|
|
35
|
+
},
|
|
33
36
|
}));
|
|
34
37
|
const PluginStoreWidget = observer(function ({ model, }) {
|
|
35
38
|
const { classes } = useStyles();
|
|
36
39
|
const { plugins, error } = useFetchPlugins();
|
|
37
|
-
const
|
|
38
|
-
const { adminMode } =
|
|
40
|
+
const session = getSession(model);
|
|
41
|
+
const { adminMode } = session;
|
|
39
42
|
const { pluginManager } = getEnv(model);
|
|
40
43
|
return (React.createElement("div", null,
|
|
41
44
|
adminMode && (React.createElement(React.Fragment, null,
|
|
42
45
|
!isElectron && (React.createElement("div", { className: classes.adminBadge },
|
|
43
|
-
React.createElement(InfoOutlinedIcon, {
|
|
46
|
+
React.createElement(InfoOutlinedIcon, { className: classes.mr }),
|
|
44
47
|
React.createElement(Typography, null,
|
|
45
48
|
"You are using the ",
|
|
46
49
|
React.createElement("code", null, "admin-server"),
|
|
47
50
|
". Any changes you make will be saved to your configuration file. You also have the ability to add custom plugins that are not in the store."))),
|
|
48
51
|
React.createElement(Button, { className: classes.customPluginButton, variant: "contained", onClick: () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
session.queueDialog(onClose => [
|
|
53
|
+
AddCustomPluginDialog,
|
|
54
|
+
{
|
|
55
|
+
model,
|
|
56
|
+
onClose,
|
|
57
|
+
},
|
|
58
|
+
]);
|
|
59
|
+
} }, "Add custom plugin"))),
|
|
55
60
|
React.createElement(TextField, { label: "Filter plugins", value: model.filterText, onChange: event => {
|
|
56
61
|
model.setFilterText(event.target.value);
|
|
57
62
|
}, fullWidth: true, slotProps: {
|
|
@@ -66,19 +71,18 @@ const PluginStoreWidget = observer(function ({ model, }) {
|
|
|
66
71
|
React.createElement(Accordion, { defaultExpanded: true },
|
|
67
72
|
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, { className: classes.expandIcon }) },
|
|
68
73
|
React.createElement(Typography, { variant: "h5" }, "Installed plugins")),
|
|
69
|
-
React.createElement("div", {
|
|
74
|
+
React.createElement("div", { className: classes.m },
|
|
70
75
|
React.createElement(InstalledPluginsList, { pluginManager: pluginManager, model: model }))),
|
|
71
76
|
React.createElement(Accordion, { defaultExpanded: true },
|
|
72
77
|
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, { className: classes.expandIcon }) },
|
|
73
78
|
React.createElement(Typography, { variant: "h5" }, "Available plugins")),
|
|
74
79
|
error ? (React.createElement(Typography, { color: "error" }, `${error}`)) : plugins ? (plugins
|
|
75
80
|
.filter(plugin => {
|
|
76
|
-
// If plugin only has cjsUrl, don't display outside desktop
|
|
77
81
|
return (!(isElectron && plugin.cjsUrl) &&
|
|
78
82
|
plugin.name
|
|
79
83
|
.toLowerCase()
|
|
80
84
|
.includes(model.filterText.toLowerCase()));
|
|
81
85
|
})
|
|
82
|
-
.map(plugin => (React.createElement(PluginCard, { key: plugin.name, plugin: plugin, model: model
|
|
86
|
+
.map(plugin => (React.createElement(PluginCard, { key: plugin.name, plugin: plugin, model: model })))) : (React.createElement(LoadingEllipses, null)))));
|
|
83
87
|
});
|
|
84
88
|
export default PluginStoreWidget;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
2
|
export function useFetchPlugins() {
|
|
3
3
|
const [plugins, setPlugins] = useState();
|
|
4
4
|
const [error, setError] = useState();
|
|
5
5
|
useEffect(() => {
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
7
6
|
;
|
|
8
7
|
(async () => {
|
|
9
8
|
try {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function PluginStoreWidgetF(pluginManager: PluginManager): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
1
2
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
3
|
import { WidgetType } from '@jbrowse/core/pluggableElementTypes';
|
|
3
|
-
import { lazy } from 'react';
|
|
4
4
|
import stateModelFactory from './model';
|
|
5
5
|
const configSchema = ConfigurationSchema('PluginStoreWidget', {});
|
|
6
6
|
export default function PluginStoreWidgetF(pluginManager) {
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { Instance } from 'mobx-state-tree';
|
|
3
3
|
export default function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
4
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
5
|
type: import("mobx-state-tree").ISimpleType<"PluginStoreWidget">;
|
|
6
6
|
filterText: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
7
7
|
view: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
|
|
8
8
|
}, {
|
|
9
|
-
/**
|
|
10
|
-
* #action
|
|
11
|
-
*/
|
|
12
9
|
clearFilterText(): void;
|
|
13
|
-
/**
|
|
14
|
-
* #action
|
|
15
|
-
*/
|
|
16
10
|
setFilterText(newText: string): void;
|
|
17
11
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
18
12
|
export type PluginStoreStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -1,35 +1,17 @@
|
|
|
1
|
-
import { types } from 'mobx-state-tree';
|
|
2
1
|
import { ElementId } from '@jbrowse/core/util/types/mst';
|
|
2
|
+
import { types } from 'mobx-state-tree';
|
|
3
3
|
export default function stateModelFactory(pluginManager) {
|
|
4
4
|
return types
|
|
5
5
|
.model('PluginStoreModel', {
|
|
6
|
-
/**
|
|
7
|
-
* #property
|
|
8
|
-
*/
|
|
9
6
|
id: ElementId,
|
|
10
|
-
/**
|
|
11
|
-
* #property
|
|
12
|
-
*/
|
|
13
7
|
type: types.literal('PluginStoreWidget'),
|
|
14
|
-
/**
|
|
15
|
-
* #property
|
|
16
|
-
*/
|
|
17
8
|
filterText: '',
|
|
18
|
-
/**
|
|
19
|
-
* #property
|
|
20
|
-
*/
|
|
21
9
|
view: types.safeReference(pluginManager.pluggableMstType('view', 'stateModel')),
|
|
22
10
|
})
|
|
23
11
|
.actions(self => ({
|
|
24
|
-
/**
|
|
25
|
-
* #action
|
|
26
|
-
*/
|
|
27
12
|
clearFilterText() {
|
|
28
13
|
self.filterText = '';
|
|
29
14
|
},
|
|
30
|
-
/**
|
|
31
|
-
* #action
|
|
32
|
-
*/
|
|
33
15
|
setFilterText(newText) {
|
|
34
16
|
self.filterText = newText;
|
|
35
17
|
},
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const UCSCTrackHubConnection: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
hubTxtLocation: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -10,9 +7,6 @@ declare const UCSCTrackHubConnection: import("@jbrowse/core/configuration/config
|
|
|
10
7
|
};
|
|
11
8
|
description: string;
|
|
12
9
|
};
|
|
13
|
-
/**
|
|
14
|
-
* #slot
|
|
15
|
-
*/
|
|
16
10
|
assemblyNames: {
|
|
17
11
|
type: string;
|
|
18
12
|
defaultValue: never[];
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { baseConnectionConfig } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { baseConnectionConfig } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
|
+
function x() { }
|
|
7
4
|
const UCSCTrackHubConnection = ConfigurationSchema('UCSCTrackHubConnection', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
5
|
hubTxtLocation: {
|
|
12
6
|
type: 'fileLocation',
|
|
13
7
|
defaultValue: {
|
|
@@ -16,18 +10,12 @@ const UCSCTrackHubConnection = ConfigurationSchema('UCSCTrackHubConnection', {
|
|
|
16
10
|
},
|
|
17
11
|
description: 'location of the hub file (usually called hub.txt)',
|
|
18
12
|
},
|
|
19
|
-
/**
|
|
20
|
-
* #slot
|
|
21
|
-
*/
|
|
22
13
|
assemblyNames: {
|
|
23
14
|
type: 'stringArray',
|
|
24
15
|
defaultValue: [],
|
|
25
16
|
description: 'optional list of genomes to import from this track hub, if empty all genomes will be imported',
|
|
26
17
|
},
|
|
27
18
|
}, {
|
|
28
|
-
/**
|
|
29
|
-
* #baseConfiguration
|
|
30
|
-
*/
|
|
31
19
|
baseConfiguration: baseConnectionConfig,
|
|
32
20
|
});
|
|
33
21
|
export default UCSCTrackHubConnection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
2
|
export declare function doConnect(self: {
|
|
3
3
|
configuration: AnyConfigurationModel;
|
|
4
4
|
addTrackConfs: (arg: Record<string, unknown>[]) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HubFile, SingleFileHub } from '@gmod/ucsc-hub';
|
|
2
|
-
import { generateTracks, fetchGenomesFile, fetchTrackDbFile, } from './ucscTrackHub';
|
|
3
2
|
import { getConf } from '@jbrowse/core/configuration';
|
|
4
3
|
import { getSession } from '@jbrowse/core/util';
|
|
5
4
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
6
5
|
import { nanoid } from '@jbrowse/core/util/nanoid';
|
|
6
|
+
import { fetchGenomesFile, fetchTrackDbFile, generateTracks, } from './ucscTrackHub';
|
|
7
7
|
function resolve(uri, baseUri) {
|
|
8
8
|
return new URL(uri, baseUri).href;
|
|
9
9
|
}
|
|
@@ -14,7 +14,6 @@ export async function doConnect(self) {
|
|
|
14
14
|
try {
|
|
15
15
|
const hubFileLocation = getConf(self, 'hubTxtLocation');
|
|
16
16
|
const hubFileText = await openLocation(hubFileLocation).readFile('utf8');
|
|
17
|
-
// @ts-expect-error
|
|
18
17
|
const hubUri = resolve(hubFileLocation.uri, hubFileLocation.baseUri);
|
|
19
18
|
const { assemblyManager } = session;
|
|
20
19
|
if (hubFileText.includes('useOneFile on')) {
|
|
@@ -23,7 +22,6 @@ export async function doConnect(self) {
|
|
|
23
22
|
const genomeName = genome.name;
|
|
24
23
|
const asm = assemblyManager.get(genomeName);
|
|
25
24
|
if (!asm) {
|
|
26
|
-
// @ts-expect-error
|
|
27
25
|
session.addSessionAssembly({
|
|
28
26
|
name: genomeName,
|
|
29
27
|
sequence: {
|
|
@@ -57,7 +55,6 @@ export async function doConnect(self) {
|
|
|
57
55
|
if (!genomeFile) {
|
|
58
56
|
throw new Error('genomesFile not found on hub');
|
|
59
57
|
}
|
|
60
|
-
// @ts-expect-error
|
|
61
58
|
const hubUri = resolve(hubFileLocation.uri, hubFileLocation.baseUri);
|
|
62
59
|
const genomesFileLocation = hubUri
|
|
63
60
|
? {
|
|
@@ -80,7 +77,6 @@ export async function doConnect(self) {
|
|
|
80
77
|
notLoadedAssemblies.push(genomeName);
|
|
81
78
|
continue;
|
|
82
79
|
}
|
|
83
|
-
// @ts-expect-error
|
|
84
80
|
const db = genome.data.trackDb;
|
|
85
81
|
if (!db) {
|
|
86
82
|
throw new Error('genomesFile not found on hub');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function UCSCTrackHubConnectionF(pluginManager: PluginManager): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConnectionType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
|
+
import configSchema from './configSchema';
|
|
3
|
+
import stateModelFactory from './model';
|
|
4
|
+
export default function UCSCTrackHubConnectionF(pluginManager) {
|
|
5
|
+
pluginManager.addConnectionType(() => {
|
|
6
|
+
return new ConnectionType({
|
|
7
|
+
name: 'UCSCTrackHubConnection',
|
|
8
|
+
configSchema,
|
|
9
|
+
stateModel: stateModelFactory(pluginManager),
|
|
10
|
+
displayName: 'UCSC Track Hub',
|
|
11
|
+
description: 'A track or assembly hub in the Track Hub format',
|
|
12
|
+
url: 'https://genome.ucsc.edu/goldenPath/help/hgTrackHubHelp.html#Intro',
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #stateModel UCSCTrackHubConnection
|
|
4
|
-
* extends BaseConnectionModel
|
|
5
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
6
2
|
export default function UCSCTrackHubConnection(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
7
3
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
8
4
|
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
@@ -19,9 +15,6 @@ export default function UCSCTrackHubConnection(pluginManager: PluginManager): im
|
|
|
19
15
|
};
|
|
20
16
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
21
17
|
} & {
|
|
22
|
-
/**
|
|
23
|
-
* #property
|
|
24
|
-
*/
|
|
25
18
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
26
19
|
hubTxtLocation: {
|
|
27
20
|
type: string;
|
|
@@ -48,9 +41,6 @@ export default function UCSCTrackHubConnection(pluginManager: PluginManager): im
|
|
|
48
41
|
description: string;
|
|
49
42
|
};
|
|
50
43
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>, undefined>>;
|
|
51
|
-
/**
|
|
52
|
-
* #property
|
|
53
|
-
*/
|
|
54
44
|
type: import("mobx-state-tree").ISimpleType<"UCSCTrackHubConnection">;
|
|
55
45
|
}, {
|
|
56
46
|
connect(_arg: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
@@ -81,8 +71,5 @@ export default function UCSCTrackHubConnection(pluginManager: PluginManager): im
|
|
|
81
71
|
setTrackConfs(trackConfs: import("@jbrowse/core/configuration").AnyConfigurationModel[]): void;
|
|
82
72
|
clear(): void;
|
|
83
73
|
} & {
|
|
84
|
-
/**
|
|
85
|
-
* #action
|
|
86
|
-
*/
|
|
87
74
|
connect(): Promise<void>;
|
|
88
75
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|