@jbrowse/plugin-data-management 1.7.11 → 2.1.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 +115 -162
- package/dist/AddConnectionWidget/components/AddConnectionWidget.js.map +1 -0
- package/dist/AddConnectionWidget/components/ConfigureConnection.js +33 -32
- package/dist/AddConnectionWidget/components/ConfigureConnection.js.map +1 -0
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.js +48 -64
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.js.map +1 -0
- package/dist/AddConnectionWidget/index.js +10 -20
- package/dist/AddConnectionWidget/index.js.map +1 -0
- package/dist/AddConnectionWidget/model.js +7 -15
- package/dist/AddConnectionWidget/model.js.map +1 -0
- package/dist/AddTrackWidget/components/AddTrackWidget.d.ts +2 -2
- package/dist/AddTrackWidget/components/AddTrackWidget.js +51 -246
- package/dist/AddTrackWidget/components/AddTrackWidget.js.map +1 -0
- package/dist/AddTrackWidget/components/ConfirmTrack.js +267 -385
- package/dist/AddTrackWidget/components/ConfirmTrack.js.map +1 -0
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +7 -0
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.js +222 -0
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.js.map +1 -0
- package/dist/AddTrackWidget/components/TrackSourceSelect.js +28 -55
- package/dist/AddTrackWidget/components/TrackSourceSelect.js.map +1 -0
- package/dist/AddTrackWidget/index.js +10 -20
- package/dist/AddTrackWidget/index.js.map +1 -0
- package/dist/AddTrackWidget/model.js +150 -174
- package/dist/AddTrackWidget/model.js.map +1 -0
- package/dist/AssemblyManager/AssemblyAddForm.js +162 -282
- package/dist/AssemblyManager/AssemblyAddForm.js.map +1 -0
- package/dist/AssemblyManager/AssemblyEditor.js +12 -23
- package/dist/AssemblyManager/AssemblyEditor.js.map +1 -0
- package/dist/AssemblyManager/AssemblyManager.js +102 -132
- package/dist/AssemblyManager/AssemblyManager.js.map +1 -0
- package/dist/AssemblyManager/AssemblyTable.d.ts +1 -1
- package/dist/AssemblyManager/AssemblyTable.js +60 -84
- package/dist/AssemblyManager/AssemblyTable.js.map +1 -0
- package/dist/AssemblyManager/index.js +8 -14
- package/dist/AssemblyManager/index.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/CloseConnectionDialog.js +49 -50
- package/dist/HierarchicalTrackSelectorWidget/components/CloseConnectionDialog.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/DeleteConnectionDialog.js +28 -44
- package/dist/HierarchicalTrackSelectorWidget/components/DeleteConnectionDialog.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/Header.d.ts +10 -0
- package/dist/HierarchicalTrackSelectorWidget/components/Header.js +209 -0
- package/dist/HierarchicalTrackSelectorWidget/components/Header.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.d.ts +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +217 -649
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js +45 -74
- package/dist/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/Node.d.ts +29 -0
- package/dist/HierarchicalTrackSelectorWidget/components/Node.js +207 -0
- package/dist/HierarchicalTrackSelectorWidget/components/Node.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js +57 -91
- package/dist/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/components/util.d.ts +3 -0
- package/dist/HierarchicalTrackSelectorWidget/components/util.js +11 -0
- package/dist/HierarchicalTrackSelectorWidget/components/util.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/configSchema.d.ts +2 -0
- package/dist/HierarchicalTrackSelectorWidget/configSchema.js +6 -0
- package/dist/HierarchicalTrackSelectorWidget/configSchema.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/index.d.ts +4 -2
- package/dist/HierarchicalTrackSelectorWidget/index.js +10 -20
- package/dist/HierarchicalTrackSelectorWidget/index.js.map +1 -0
- package/dist/HierarchicalTrackSelectorWidget/model.d.ts +13 -3
- package/dist/HierarchicalTrackSelectorWidget/model.js +250 -284
- package/dist/HierarchicalTrackSelectorWidget/model.js.map +1 -0
- package/dist/PluginStoreWidget/components/CustomPluginForm.js +140 -202
- package/dist/PluginStoreWidget/components/CustomPluginForm.js.map +1 -0
- package/dist/PluginStoreWidget/components/InstalledPlugin.js +112 -127
- package/dist/PluginStoreWidget/components/InstalledPlugin.js.map +1 -0
- package/dist/PluginStoreWidget/components/InstalledPluginsList.js +22 -45
- package/dist/PluginStoreWidget/components/InstalledPluginsList.js.map +1 -0
- package/dist/PluginStoreWidget/components/PluginCard.js +95 -110
- package/dist/PluginStoreWidget/components/PluginCard.js.map +1 -0
- package/dist/PluginStoreWidget/components/PluginStoreWidget.js +188 -227
- package/dist/PluginStoreWidget/components/PluginStoreWidget.js.map +1 -0
- package/dist/PluginStoreWidget/index.d.ts +0 -1
- package/dist/PluginStoreWidget/index.js +10 -28
- package/dist/PluginStoreWidget/index.js.map +1 -0
- package/dist/PluginStoreWidget/model.js +21 -26
- package/dist/PluginStoreWidget/model.js.map +1 -0
- package/dist/SetDefaultSession/SetDefaultSession.js +34 -58
- package/dist/SetDefaultSession/SetDefaultSession.js.map +1 -0
- package/dist/SetDefaultSession/index.js +8 -14
- package/dist/SetDefaultSession/index.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +109 -147
- package/dist/index.js.map +1 -0
- package/dist/ucsc-trackhub/configSchema.js +18 -28
- package/dist/ucsc-trackhub/configSchema.js.map +1 -0
- package/dist/ucsc-trackhub/index.js +10 -22
- package/dist/ucsc-trackhub/index.js.map +1 -0
- package/dist/ucsc-trackhub/model.js +150 -128
- package/dist/ucsc-trackhub/model.js.map +1 -0
- package/dist/ucsc-trackhub/ucscAssemblies.js +3 -9
- package/dist/ucsc-trackhub/ucscAssemblies.js.map +1 -0
- package/dist/ucsc-trackhub/ucscTrackHub.js +458 -491
- package/dist/ucsc-trackhub/ucscTrackHub.js.map +1 -0
- package/esm/AddConnectionWidget/components/AddConnectionWidget.d.ts +9 -0
- package/esm/AddConnectionWidget/components/AddConnectionWidget.js +86 -0
- package/esm/AddConnectionWidget/components/AddConnectionWidget.js.map +1 -0
- package/esm/AddConnectionWidget/components/ConfigureConnection.d.ts +2 -0
- package/esm/AddConnectionWidget/components/ConfigureConnection.js +11 -0
- package/esm/AddConnectionWidget/components/ConfigureConnection.js.map +1 -0
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.d.ts +8 -0
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.js +24 -0
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.js.map +1 -0
- package/esm/AddConnectionWidget/index.d.ts +2 -0
- package/esm/AddConnectionWidget/index.js +4 -0
- package/esm/AddConnectionWidget/index.js.map +1 -0
- package/esm/AddConnectionWidget/model.d.ts +5 -0
- package/esm/AddConnectionWidget/model.js +7 -0
- package/esm/AddConnectionWidget/model.js.map +1 -0
- package/esm/AddTrackWidget/components/AddTrackWidget.d.ts +7 -0
- package/esm/AddTrackWidget/components/AddTrackWidget.js +26 -0
- package/esm/AddTrackWidget/components/AddTrackWidget.js.map +1 -0
- package/esm/AddTrackWidget/components/ConfirmTrack.d.ts +7 -0
- package/esm/AddTrackWidget/components/ConfirmTrack.js +246 -0
- package/esm/AddTrackWidget/components/ConfirmTrack.js.map +1 -0
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +7 -0
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.js +134 -0
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.js.map +1 -0
- package/esm/AddTrackWidget/components/TrackSourceSelect.d.ts +7 -0
- package/esm/AddTrackWidget/components/TrackSourceSelect.js +27 -0
- package/esm/AddTrackWidget/components/TrackSourceSelect.js.map +1 -0
- package/esm/AddTrackWidget/index.d.ts +2 -0
- package/esm/AddTrackWidget/index.js +4 -0
- package/esm/AddTrackWidget/index.js.map +1 -0
- package/esm/AddTrackWidget/model.d.ts +51 -0
- package/esm/AddTrackWidget/model.js +154 -0
- package/esm/AddTrackWidget/model.js.map +1 -0
- package/esm/AssemblyManager/AssemblyAddForm.d.ts +6 -0
- package/esm/AssemblyManager/AssemblyAddForm.js +132 -0
- package/esm/AssemblyManager/AssemblyAddForm.js.map +1 -0
- package/esm/AssemblyManager/AssemblyEditor.d.ts +5 -0
- package/esm/AssemblyManager/AssemblyEditor.js +8 -0
- package/esm/AssemblyManager/AssemblyEditor.js.map +1 -0
- package/esm/AssemblyManager/AssemblyManager.d.ts +6 -0
- package/esm/AssemblyManager/AssemblyManager.js +69 -0
- package/esm/AssemblyManager/AssemblyManager.js.map +1 -0
- package/esm/AssemblyManager/AssemblyTable.d.ts +13 -0
- package/esm/AssemblyManager/AssemblyTable.js +62 -0
- package/esm/AssemblyManager/AssemblyTable.js.map +1 -0
- package/esm/AssemblyManager/index.d.ts +1 -0
- package/esm/AssemblyManager/index.js +2 -0
- package/esm/AssemblyManager/index.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/CloseConnectionDialog.d.ts +13 -0
- package/esm/HierarchicalTrackSelectorWidget/components/CloseConnectionDialog.js +26 -0
- package/esm/HierarchicalTrackSelectorWidget/components/CloseConnectionDialog.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/DeleteConnectionDialog.d.ts +13 -0
- package/esm/HierarchicalTrackSelectorWidget/components/DeleteConnectionDialog.js +24 -0
- package/esm/HierarchicalTrackSelectorWidget/components/DeleteConnectionDialog.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/Header.d.ts +10 -0
- package/esm/HierarchicalTrackSelectorWidget/components/Header.js +149 -0
- package/esm/HierarchicalTrackSelectorWidget/components/Header.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.d.ts +11 -0
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +127 -0
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.d.ts +10 -0
- package/esm/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js +45 -0
- package/esm/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/Node.d.ts +29 -0
- package/esm/HierarchicalTrackSelectorWidget/components/Node.js +149 -0
- package/esm/HierarchicalTrackSelectorWidget/components/Node.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.d.ts +11 -0
- package/esm/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js +57 -0
- package/esm/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/components/util.d.ts +3 -0
- package/esm/HierarchicalTrackSelectorWidget/components/util.js +5 -0
- package/esm/HierarchicalTrackSelectorWidget/components/util.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/configSchema.d.ts +2 -0
- package/esm/HierarchicalTrackSelectorWidget/configSchema.js +4 -0
- package/esm/HierarchicalTrackSelectorWidget/configSchema.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/index.d.ts +4 -0
- package/esm/HierarchicalTrackSelectorWidget/index.js +4 -0
- package/esm/HierarchicalTrackSelectorWidget/index.js.map +1 -0
- package/esm/HierarchicalTrackSelectorWidget/model.d.ts +69 -0
- package/esm/HierarchicalTrackSelectorWidget/model.js +204 -0
- package/esm/HierarchicalTrackSelectorWidget/model.js.map +1 -0
- package/esm/PluginStoreWidget/components/CustomPluginForm.d.ts +9 -0
- package/esm/PluginStoreWidget/components/CustomPluginForm.js +109 -0
- package/esm/PluginStoreWidget/components/CustomPluginForm.js.map +1 -0
- package/esm/PluginStoreWidget/components/InstalledPlugin.d.ts +11 -0
- package/esm/PluginStoreWidget/components/InstalledPlugin.js +77 -0
- package/esm/PluginStoreWidget/components/InstalledPlugin.js.map +1 -0
- package/esm/PluginStoreWidget/components/InstalledPluginsList.d.ts +9 -0
- package/esm/PluginStoreWidget/components/InstalledPluginsList.js +16 -0
- package/esm/PluginStoreWidget/components/InstalledPluginsList.js.map +1 -0
- package/esm/PluginStoreWidget/components/PluginCard.d.ts +10 -0
- package/esm/PluginStoreWidget/components/PluginCard.js +61 -0
- package/esm/PluginStoreWidget/components/PluginCard.js.map +1 -0
- package/esm/PluginStoreWidget/components/PluginStoreWidget.d.ts +7 -0
- package/esm/PluginStoreWidget/components/PluginStoreWidget.js +106 -0
- package/esm/PluginStoreWidget/components/PluginStoreWidget.js.map +1 -0
- package/esm/PluginStoreWidget/index.d.ts +2 -0
- package/esm/PluginStoreWidget/index.js +4 -0
- package/esm/PluginStoreWidget/index.js.map +1 -0
- package/esm/PluginStoreWidget/model.d.ts +13 -0
- package/esm/PluginStoreWidget/model.js +20 -0
- package/esm/PluginStoreWidget/model.js.map +1 -0
- package/esm/SetDefaultSession/SetDefaultSession.d.ts +6 -0
- package/esm/SetDefaultSession/SetDefaultSession.js +34 -0
- package/esm/SetDefaultSession/SetDefaultSession.js.map +1 -0
- package/esm/SetDefaultSession/index.d.ts +1 -0
- package/esm/SetDefaultSession/index.js +2 -0
- package/esm/SetDefaultSession/index.js.map +1 -0
- package/esm/index.d.ts +30 -0
- package/esm/index.js +70 -0
- package/esm/index.js.map +1 -0
- package/esm/ucsc-trackhub/configSchema.d.ts +2 -0
- package/esm/ucsc-trackhub/configSchema.js +18 -0
- package/esm/ucsc-trackhub/configSchema.js.map +1 -0
- package/esm/ucsc-trackhub/index.d.ts +2 -0
- package/esm/ucsc-trackhub/index.js +3 -0
- package/esm/ucsc-trackhub/index.js.map +1 -0
- package/esm/ucsc-trackhub/model.d.ts +15 -0
- package/esm/ucsc-trackhub/model.js +82 -0
- package/esm/ucsc-trackhub/model.js.map +1 -0
- package/esm/ucsc-trackhub/ucscAssemblies.d.ts +2 -0
- package/esm/ucsc-trackhub/ucscAssemblies.js +201 -0
- package/esm/ucsc-trackhub/ucscAssemblies.js.map +1 -0
- package/esm/ucsc-trackhub/ucscTrackHub.d.ts +6 -0
- package/esm/ucsc-trackhub/ucscTrackHub.js +348 -0
- package/esm/ucsc-trackhub/ucscTrackHub.js.map +1 -0
- package/package.json +21 -13
- package/src/AddConnectionWidget/components/AddConnectionWidget.js +14 -10
- package/src/AddConnectionWidget/components/ConnectionTypeSelect.tsx +2 -4
- package/src/AddConnectionWidget/components/__snapshots__/AddConnectionWidget.test.js.snap +63 -67
- package/src/AddTrackWidget/components/{AddTrackWidget.test.js → AddTrackWidget.test.tsx} +19 -34
- package/src/AddTrackWidget/components/AddTrackWidget.tsx +36 -200
- package/src/AddTrackWidget/components/ConfirmTrack.tsx +32 -32
- package/src/AddTrackWidget/components/DefaultAddTrackWorkflow.tsx +205 -0
- package/src/AddTrackWidget/components/TrackSourceSelect.tsx +9 -5
- package/src/AssemblyManager/AssemblyAddForm.tsx +5 -11
- package/src/AssemblyManager/AssemblyManager.tsx +8 -8
- package/src/AssemblyManager/AssemblyTable.tsx +10 -10
- package/src/HierarchicalTrackSelectorWidget/components/CloseConnectionDialog.tsx +1 -1
- package/src/HierarchicalTrackSelectorWidget/components/DeleteConnectionDialog.tsx +1 -1
- package/src/HierarchicalTrackSelectorWidget/components/Header.tsx +287 -0
- package/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.js +1 -1
- package/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.tsx +23 -440
- package/src/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.tsx +6 -6
- package/src/HierarchicalTrackSelectorWidget/components/Node.tsx +284 -0
- package/src/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.tsx +7 -7
- package/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.js.snap +122 -115
- package/src/HierarchicalTrackSelectorWidget/components/util.ts +11 -0
- package/src/HierarchicalTrackSelectorWidget/configSchema.ts +3 -0
- package/src/HierarchicalTrackSelectorWidget/index.ts +4 -6
- package/src/HierarchicalTrackSelectorWidget/model.ts +45 -41
- package/src/PluginStoreWidget/components/CustomPluginForm.tsx +11 -14
- package/src/PluginStoreWidget/components/InstalledPlugin.tsx +9 -8
- package/src/PluginStoreWidget/components/InstalledPluginsList.tsx +1 -1
- package/src/PluginStoreWidget/components/PluginCard.tsx +10 -11
- package/src/PluginStoreWidget/components/PluginStoreWidget.tsx +9 -9
- package/src/PluginStoreWidget/components/__snapshots__/PluginStoreWidget.test.js.snap +267 -217
- package/src/PluginStoreWidget/index.js +0 -1
- package/src/SetDefaultSession/SetDefaultSession.tsx +1 -1
- package/src/index.ts +4 -1
- package/dist/AddConnectionWidget/components/AddConnectionWidget.test.js +0 -279
- package/dist/AddTrackWidget/components/AddTrackWidget.test.js +0 -218
- package/dist/AddTrackWidget/index.test.js +0 -292
- package/dist/AssemblyManager/AssemblyManager.test.js +0 -113
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.js +0 -191
- package/dist/HierarchicalTrackSelectorWidget/model.test.js +0 -28
- package/dist/PluginStoreWidget/components/PluginStoreWidget.test.js +0 -201
- package/dist/PluginStoreWidget/model.test.js +0 -17
- package/dist/SetDefaultSession/SetDefaultSession.test.js +0 -75
- package/dist/index.test.js +0 -56
- package/src/AddTrackWidget/components/__snapshots__/AddTrackWidget.test.js.snap +0 -350
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import stateModelFactory, { HierarchicalTrackSelectorModel } from './model'
|
|
2
|
+
import configSchema from './configSchema'
|
|
2
3
|
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
'HierarchicalTrackSelectorWidget',
|
|
6
|
-
{},
|
|
7
|
-
)
|
|
4
|
+
export { stateModelFactory, configSchema }
|
|
5
|
+
export type { HierarchicalTrackSelectorModel }
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { types, getParent, Instance } from 'mobx-state-tree'
|
|
1
|
+
import { types, getParent, getEnv, Instance } from 'mobx-state-tree'
|
|
2
2
|
import {
|
|
3
|
-
AnyConfigurationModel,
|
|
4
3
|
getConf,
|
|
5
4
|
readConfObject,
|
|
5
|
+
AnyConfigurationModel,
|
|
6
6
|
} from '@jbrowse/core/configuration'
|
|
7
7
|
import { getSession } from '@jbrowse/core/util'
|
|
8
8
|
import { ElementId } from '@jbrowse/core/util/types/mst'
|
|
9
9
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
10
|
-
import { AbstractView } from 'react'
|
|
11
10
|
|
|
12
11
|
function hasAnyOverlap<T>(a1: T[] = [], a2: T[] = []) {
|
|
13
12
|
return !!a1.find(value => a2.includes(value))
|
|
@@ -18,11 +17,11 @@ function passesFilter(filter: string, config: AnyConfigurationModel) {
|
|
|
18
17
|
const filterLower = filter.toLowerCase()
|
|
19
18
|
return (
|
|
20
19
|
getTrackName(config).toLowerCase().includes(filterLower) ||
|
|
21
|
-
categories?.filter(c => c.toLowerCase().includes(filterLower)).length
|
|
20
|
+
!!categories?.filter(c => c.toLowerCase().includes(filterLower)).length
|
|
22
21
|
)
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
function getTrackName(config: AnyConfigurationModel) {
|
|
24
|
+
function getTrackName(config: AnyConfigurationModel): string {
|
|
26
25
|
if (!config.trackId) {
|
|
27
26
|
throw new Error('not a track')
|
|
28
27
|
}
|
|
@@ -41,6 +40,32 @@ export type TreeNode = {
|
|
|
41
40
|
children: TreeNode[]
|
|
42
41
|
}
|
|
43
42
|
|
|
43
|
+
function filterTracks(
|
|
44
|
+
tracks: AnyConfigurationModel[],
|
|
45
|
+
self: { view: { type: string } },
|
|
46
|
+
assemblyName: string,
|
|
47
|
+
) {
|
|
48
|
+
const { assemblyManager } = getSession(self)
|
|
49
|
+
const { pluginManager } = getEnv(self)
|
|
50
|
+
const assembly = assemblyManager.get(assemblyName)
|
|
51
|
+
|
|
52
|
+
if (!assembly) {
|
|
53
|
+
return []
|
|
54
|
+
}
|
|
55
|
+
return tracks
|
|
56
|
+
.filter(c => {
|
|
57
|
+
const trackConfAssemblies = readConfObject(c, 'assemblyNames')
|
|
58
|
+
const { allAliases } = assembly
|
|
59
|
+
return hasAnyOverlap(allAliases, trackConfAssemblies)
|
|
60
|
+
})
|
|
61
|
+
.filter(c => {
|
|
62
|
+
const { displayTypes } = pluginManager.getViewType(self.view.type)
|
|
63
|
+
const compatDisplays = displayTypes.map((d: { name: string }) => d.name)
|
|
64
|
+
const trackDisplays = c.displays.map((d: { type: string }) => d.type)
|
|
65
|
+
return hasAnyOverlap(compatDisplays, trackDisplays)
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
|
|
44
69
|
export function generateHierarchy(
|
|
45
70
|
model: HierarchicalTrackSelectorModel,
|
|
46
71
|
trackConfigurations: AnyConfigurationModel[],
|
|
@@ -112,8 +137,20 @@ export default function stateTreeFactory(pluginManager: PluginManager) {
|
|
|
112
137
|
pluginManager.pluggableMstType('view', 'stateModel'),
|
|
113
138
|
),
|
|
114
139
|
})
|
|
140
|
+
.volatile(() => ({
|
|
141
|
+
selection: [] as AnyConfigurationModel[],
|
|
142
|
+
}))
|
|
115
143
|
.actions(self => ({
|
|
116
|
-
|
|
144
|
+
addToSelection(elt: AnyConfigurationModel[]) {
|
|
145
|
+
self.selection = [...self.selection, ...elt]
|
|
146
|
+
},
|
|
147
|
+
removeFromSelection(elt: AnyConfigurationModel[]) {
|
|
148
|
+
self.selection = self.selection.filter(f => !elt.includes(f))
|
|
149
|
+
},
|
|
150
|
+
clearSelection() {
|
|
151
|
+
self.selection = []
|
|
152
|
+
},
|
|
153
|
+
setView(view: unknown) {
|
|
117
154
|
self.view = view
|
|
118
155
|
},
|
|
119
156
|
toggleCategory(pathName: string) {
|
|
@@ -156,20 +193,7 @@ export default function stateTreeFactory(pluginManager: PluginManager) {
|
|
|
156
193
|
// filter out tracks that don't match the current assembly (check all
|
|
157
194
|
// assembly aliases) and display types
|
|
158
195
|
return (refseq ? [refseq] : []).concat([
|
|
159
|
-
...tracks
|
|
160
|
-
.filter(c => {
|
|
161
|
-
const trackConfAssemblies = readConfObject(c, 'assemblyNames')
|
|
162
|
-
const { allAliases } = assembly
|
|
163
|
-
return hasAnyOverlap(allAliases, trackConfAssemblies)
|
|
164
|
-
})
|
|
165
|
-
.filter(c => {
|
|
166
|
-
const { displayTypes } = pluginManager.getViewType(self.view.type)
|
|
167
|
-
const compatibleDisplays = displayTypes.map(d => d.name)
|
|
168
|
-
const trackDisplays = c.displays.map(
|
|
169
|
-
(d: { type: string }) => d.type,
|
|
170
|
-
)
|
|
171
|
-
return hasAnyOverlap(compatibleDisplays, trackDisplays)
|
|
172
|
-
}),
|
|
196
|
+
...filterTracks(tracks, self, assemblyName),
|
|
173
197
|
])
|
|
174
198
|
},
|
|
175
199
|
|
|
@@ -184,29 +208,9 @@ export default function stateTreeFactory(pluginManager: PluginManager) {
|
|
|
184
208
|
if (!self.view) {
|
|
185
209
|
return []
|
|
186
210
|
}
|
|
187
|
-
const trackConfigurations = connection.tracks
|
|
188
|
-
const { assemblyManager } = getSession(self)
|
|
189
|
-
const assembly = assemblyManager.get(assemblyName)
|
|
190
|
-
|
|
191
|
-
if (!(assembly && assembly.initialized)) {
|
|
192
|
-
return []
|
|
193
|
-
}
|
|
194
211
|
|
|
195
212
|
// filter out tracks that don't match the current display types
|
|
196
|
-
return
|
|
197
|
-
.filter(c => {
|
|
198
|
-
const trackConfAssemblies = readConfObject(c, 'assemblyNames')
|
|
199
|
-
const { allAliases } = assembly
|
|
200
|
-
return hasAnyOverlap(allAliases, trackConfAssemblies)
|
|
201
|
-
})
|
|
202
|
-
.filter(c => {
|
|
203
|
-
const { displayTypes } = pluginManager.getViewType(self.view.type)
|
|
204
|
-
const compatibleDisplays = displayTypes.map(d => d.name)
|
|
205
|
-
const trackDisplays = c.displays.map(
|
|
206
|
-
(d: { type: string }) => d.type,
|
|
207
|
-
)
|
|
208
|
-
return hasAnyOverlap(compatibleDisplays, trackDisplays)
|
|
209
|
-
})
|
|
213
|
+
return filterTracks(connection.tracks, self, assemblyName)
|
|
210
214
|
},
|
|
211
215
|
}))
|
|
212
216
|
.views(self => ({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
3
|
import { getRoot } from 'mobx-state-tree'
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import { PluginDefinition } from '@jbrowse/core/PluginLoader'
|
|
6
5
|
import {
|
|
7
6
|
Button,
|
|
8
7
|
Collapse,
|
|
@@ -12,20 +11,18 @@ import {
|
|
|
12
11
|
DialogContent,
|
|
13
12
|
DialogContentText,
|
|
14
13
|
TextField,
|
|
15
|
-
|
|
16
|
-
} from '
|
|
14
|
+
} from '@mui/material'
|
|
15
|
+
import { makeStyles } from 'tss-react/mui'
|
|
17
16
|
|
|
18
17
|
// icons
|
|
19
|
-
import IconButton from '@material
|
|
20
|
-
import CloseIcon from '@
|
|
21
|
-
import ExpandMoreIcon from '@
|
|
22
|
-
|
|
23
|
-
import { PluginDefinition } from '@jbrowse/core/PluginLoader'
|
|
18
|
+
import IconButton from '@mui/material/IconButton'
|
|
19
|
+
import CloseIcon from '@mui/icons-material/Close'
|
|
20
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
24
21
|
|
|
25
22
|
// locals
|
|
26
23
|
import { PluginStoreModel } from '../model'
|
|
27
24
|
|
|
28
|
-
const useStyles = makeStyles(theme => ({
|
|
25
|
+
const useStyles = makeStyles()(theme => ({
|
|
29
26
|
closeButton: {
|
|
30
27
|
position: 'absolute',
|
|
31
28
|
right: theme.spacing(1),
|
|
@@ -56,7 +53,7 @@ function CustomPluginForm({
|
|
|
56
53
|
onClose(): void
|
|
57
54
|
model: PluginStoreModel
|
|
58
55
|
}) {
|
|
59
|
-
const classes = useStyles()
|
|
56
|
+
const { classes, cx } = useStyles()
|
|
60
57
|
const [umdPluginName, setUMDPluginName] = useState('')
|
|
61
58
|
const [umdPluginUrl, setUMDPluginUrl] = useState('')
|
|
62
59
|
const [esmPluginUrl, setESMPluginUrl] = useState('')
|
|
@@ -83,8 +80,8 @@ function CustomPluginForm({
|
|
|
83
80
|
setAdvancedOptionsOpen(!advancedOptionsOpen)
|
|
84
81
|
}
|
|
85
82
|
|
|
86
|
-
|
|
87
|
-
const { jbrowse } =
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
84
|
+
const { jbrowse } = getRoot<any>(model)
|
|
88
85
|
|
|
89
86
|
const ready = Boolean(
|
|
90
87
|
(umdPluginName && umdPluginUrl) || esmPluginUrl || cjsPluginUrl,
|
|
@@ -152,7 +149,7 @@ function CustomPluginForm({
|
|
|
152
149
|
/>
|
|
153
150
|
<DialogContentText onClick={handleOpenAdvancedOptions}>
|
|
154
151
|
<IconButton
|
|
155
|
-
className={
|
|
152
|
+
className={cx(classes.expand, {
|
|
156
153
|
[classes.expandOpen]: advancedOptionsOpen,
|
|
157
154
|
})}
|
|
158
155
|
aria-expanded={advancedOptionsOpen}
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
ListItem,
|
|
12
12
|
Tooltip,
|
|
13
13
|
Typography,
|
|
14
|
-
|
|
15
|
-
} from '
|
|
14
|
+
} from '@mui/material'
|
|
15
|
+
import { makeStyles } from 'tss-react/mui'
|
|
16
16
|
|
|
17
|
-
import CloseIcon from '@
|
|
18
|
-
import LockIcon from '@
|
|
17
|
+
import CloseIcon from '@mui/icons-material/Close'
|
|
18
|
+
import LockIcon from '@mui/icons-material/Lock'
|
|
19
19
|
|
|
20
20
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
21
21
|
import { getSession } from '@jbrowse/core/util'
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from '@jbrowse/core/util/types'
|
|
26
26
|
import { PluginStoreModel } from '../model'
|
|
27
27
|
|
|
28
|
-
const useStyles = makeStyles(() => ({
|
|
28
|
+
const useStyles = makeStyles()(() => ({
|
|
29
29
|
closeDialog: {
|
|
30
30
|
position: 'absolute',
|
|
31
31
|
right: 0,
|
|
@@ -40,7 +40,7 @@ const useStyles = makeStyles(() => ({
|
|
|
40
40
|
}))
|
|
41
41
|
|
|
42
42
|
function LockedPlugin() {
|
|
43
|
-
const classes = useStyles()
|
|
43
|
+
const { classes } = useStyles()
|
|
44
44
|
return (
|
|
45
45
|
<Tooltip
|
|
46
46
|
className={classes.lockedPluginTooltip}
|
|
@@ -58,7 +58,7 @@ function PluginDialog({
|
|
|
58
58
|
plugin: string
|
|
59
59
|
onClose: (s?: string) => void
|
|
60
60
|
}) {
|
|
61
|
-
const classes = useStyles()
|
|
61
|
+
const { classes } = useStyles()
|
|
62
62
|
return (
|
|
63
63
|
<Dialog open onClose={() => onClose()}>
|
|
64
64
|
<DialogTitle>
|
|
@@ -123,7 +123,8 @@ function InstalledPlugin({
|
|
|
123
123
|
p => pluginManager.pluginMetadata[plugin.name].url === p.url,
|
|
124
124
|
)
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
127
|
+
const rootModel = getParent<any>(model, 3)
|
|
127
128
|
const { jbrowse, adminMode } = rootModel
|
|
128
129
|
|
|
129
130
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { observer } from 'mobx-react'
|
|
3
|
-
import { List, Typography } from '@material
|
|
3
|
+
import { List, Typography } from '@mui/material'
|
|
4
4
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
5
5
|
import { PluginStoreModel } from '../model'
|
|
6
6
|
import InstalledPlugin from './InstalledPlugin'
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
Button,
|
|
15
15
|
Link,
|
|
16
16
|
Typography,
|
|
17
|
-
|
|
18
|
-
} from '
|
|
17
|
+
} from '@mui/material'
|
|
18
|
+
import { makeStyles } from 'tss-react/mui'
|
|
19
19
|
|
|
20
20
|
// icons
|
|
21
|
-
import PersonIcon from '@
|
|
22
|
-
import AddIcon from '@
|
|
23
|
-
import CheckIcon from '@
|
|
21
|
+
import PersonIcon from '@mui/icons-material/Person'
|
|
22
|
+
import AddIcon from '@mui/icons-material/Add'
|
|
23
|
+
import CheckIcon from '@mui/icons-material/Check'
|
|
24
24
|
import { PluginStoreModel } from '../model'
|
|
25
25
|
|
|
26
|
-
const useStyles = makeStyles(() => ({
|
|
26
|
+
const useStyles = makeStyles()(() => ({
|
|
27
27
|
card: {
|
|
28
28
|
margin: '1em',
|
|
29
29
|
},
|
|
@@ -50,18 +50,17 @@ function PluginCard({
|
|
|
50
50
|
model: PluginStoreModel
|
|
51
51
|
adminMode: boolean
|
|
52
52
|
}) {
|
|
53
|
-
const classes = useStyles()
|
|
53
|
+
const { classes } = useStyles()
|
|
54
54
|
const session = getSession(model)
|
|
55
55
|
const { pluginManager } = getEnv(model) as { pluginManager: PluginManager }
|
|
56
56
|
const isInstalled = Boolean(
|
|
57
|
-
pluginManager.runtimePluginDefinitions.find(
|
|
58
|
-
pluginDefinition => pluginDefinition.url === plugin.url,
|
|
59
|
-
),
|
|
57
|
+
pluginManager.runtimePluginDefinitions.find(def => def.url === plugin.url),
|
|
60
58
|
)
|
|
61
59
|
const [tempDisabled, setTempDisabled] = useState(false)
|
|
62
60
|
const disableButton = isInstalled || tempDisabled
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
+
const rootModel = getParent<any>(model, 3)
|
|
65
64
|
const { jbrowse } = rootModel
|
|
66
65
|
|
|
67
66
|
return (
|
|
@@ -5,21 +5,21 @@ import { getEnv } from 'mobx-state-tree'
|
|
|
5
5
|
import {
|
|
6
6
|
Accordion,
|
|
7
7
|
AccordionSummary,
|
|
8
|
-
TextField,
|
|
9
|
-
InputAdornment,
|
|
10
8
|
Button,
|
|
11
9
|
IconButton,
|
|
10
|
+
InputAdornment,
|
|
11
|
+
TextField,
|
|
12
12
|
Typography,
|
|
13
|
-
|
|
14
|
-
} from '
|
|
13
|
+
} from '@mui/material'
|
|
14
|
+
import { makeStyles } from 'tss-react/mui'
|
|
15
15
|
|
|
16
16
|
import { JBrowsePlugin } from '@jbrowse/core/util/types'
|
|
17
17
|
import { getSession, isElectron } from '@jbrowse/core/util'
|
|
18
18
|
|
|
19
19
|
// icons
|
|
20
|
-
import ExpandMoreIcon from '@
|
|
21
|
-
import ClearIcon from '@
|
|
22
|
-
import InfoOutlinedIcon from '@
|
|
20
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
21
|
+
import ClearIcon from '@mui/icons-material/Clear'
|
|
22
|
+
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'
|
|
23
23
|
|
|
24
24
|
// locals
|
|
25
25
|
import InstalledPluginsList from './InstalledPluginsList'
|
|
@@ -27,7 +27,7 @@ import PluginCard from './PluginCard'
|
|
|
27
27
|
import CustomPluginForm from './CustomPluginForm'
|
|
28
28
|
import { PluginStoreModel } from '../model'
|
|
29
29
|
|
|
30
|
-
const useStyles = makeStyles(theme => ({
|
|
30
|
+
const useStyles = makeStyles()(theme => ({
|
|
31
31
|
root: {
|
|
32
32
|
margin: theme.spacing(1),
|
|
33
33
|
},
|
|
@@ -51,7 +51,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
51
51
|
}))
|
|
52
52
|
|
|
53
53
|
function PluginStoreWidget({ model }: { model: PluginStoreModel }) {
|
|
54
|
-
const classes = useStyles()
|
|
54
|
+
const { classes } = useStyles()
|
|
55
55
|
const [pluginArray, setPluginArray] = useState<JBrowsePlugin[]>()
|
|
56
56
|
const [error, setError] = useState<unknown>()
|
|
57
57
|
const [customPluginFormOpen, setCustomPluginFormOpen] = useState(false)
|