@jbrowse/plugin-data-management 2.2.1 → 2.2.2
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/AssemblyManager/AssemblyAddForm.js +14 -41
- package/dist/AssemblyManager/AssemblyAddForm.js.map +1 -1
- package/dist/AssemblyManager/AssemblyEditor.js +2 -1
- package/dist/AssemblyManager/AssemblyEditor.js.map +1 -1
- package/dist/AssemblyManager/AssemblyManager.js +14 -54
- package/dist/AssemblyManager/AssemblyManager.js.map +1 -1
- package/dist/AssemblyManager/AssemblyTable.js +24 -47
- package/dist/AssemblyManager/AssemblyTable.js.map +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js +4 -12
- package/dist/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js.map +1 -1
- package/dist/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js +2 -12
- package/dist/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js.map +1 -1
- package/dist/HierarchicalTrackSelectorWidget/model.js +1 -1
- package/dist/HierarchicalTrackSelectorWidget/model.js.map +1 -1
- package/dist/PluginStoreWidget/components/CustomPluginForm.js +1 -11
- package/dist/PluginStoreWidget/components/CustomPluginForm.js.map +1 -1
- package/dist/PluginStoreWidget/components/PluginStoreWidget.js.map +1 -1
- package/esm/AssemblyManager/AssemblyAddForm.js +9 -36
- package/esm/AssemblyManager/AssemblyAddForm.js.map +1 -1
- package/esm/AssemblyManager/AssemblyEditor.js +2 -1
- package/esm/AssemblyManager/AssemblyEditor.js.map +1 -1
- package/esm/AssemblyManager/AssemblyManager.js +15 -55
- package/esm/AssemblyManager/AssemblyManager.js.map +1 -1
- package/esm/AssemblyManager/AssemblyTable.js +25 -48
- package/esm/AssemblyManager/AssemblyTable.js.map +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js +5 -13
- package/esm/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js.map +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js +3 -13
- package/esm/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js.map +1 -1
- package/esm/HierarchicalTrackSelectorWidget/model.js +2 -2
- package/esm/HierarchicalTrackSelectorWidget/model.js.map +1 -1
- package/esm/PluginStoreWidget/components/CustomPluginForm.js +2 -12
- package/esm/PluginStoreWidget/components/CustomPluginForm.js.map +1 -1
- package/esm/PluginStoreWidget/components/PluginStoreWidget.js.map +1 -1
- package/package.json +3 -3
- package/src/AssemblyManager/AssemblyAddForm.tsx +147 -182
- package/src/AssemblyManager/AssemblyEditor.tsx +5 -1
- package/src/AssemblyManager/AssemblyManager.test.tsx +1 -1
- package/src/AssemblyManager/AssemblyManager.tsx +70 -137
- package/src/AssemblyManager/AssemblyTable.tsx +65 -97
- package/src/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.tsx +5 -20
- package/src/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.tsx +7 -21
- package/src/HierarchicalTrackSelectorWidget/model.ts +7 -2
- package/src/PluginStoreWidget/components/CustomPluginForm.tsx +1 -18
- package/src/PluginStoreWidget/components/PluginStoreWidget.tsx +1 -0
|
@@ -9,112 +9,80 @@ import {
|
|
|
9
9
|
TableHead,
|
|
10
10
|
TableRow,
|
|
11
11
|
Paper,
|
|
12
|
-
Typography,
|
|
13
12
|
} from '@mui/material'
|
|
14
|
-
import { makeStyles } from 'tss-react/mui'
|
|
15
|
-
|
|
16
|
-
import CreateIcon from '@mui/icons-material/Create'
|
|
17
|
-
import DeleteIcon from '@mui/icons-material/Delete'
|
|
18
13
|
import {
|
|
19
14
|
readConfObject,
|
|
20
15
|
AnyConfigurationModel,
|
|
21
16
|
} from '@jbrowse/core/configuration'
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
minWidth: 500,
|
|
26
|
-
minHeight: 150,
|
|
27
|
-
},
|
|
28
|
-
buttonCell: {
|
|
29
|
-
padding: 3,
|
|
30
|
-
},
|
|
31
|
-
button: {
|
|
32
|
-
display: 'inline-block',
|
|
33
|
-
padding: 3,
|
|
34
|
-
minHeight: 0,
|
|
35
|
-
minWidth: 0,
|
|
36
|
-
},
|
|
37
|
-
}))
|
|
38
|
-
|
|
39
|
-
const AssemblyTable = observer(
|
|
40
|
-
({
|
|
41
|
-
rootModel,
|
|
42
|
-
setIsAssemblyBeingEdited,
|
|
43
|
-
setAssemblyBeingEdited,
|
|
44
|
-
}: {
|
|
45
|
-
rootModel: {
|
|
46
|
-
jbrowse: {
|
|
47
|
-
removeAssemblyConf: (arg: string) => void
|
|
48
|
-
assemblies: AnyConfigurationModel[]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
setIsAssemblyBeingEdited(arg: boolean): void
|
|
52
|
-
setAssemblyBeingEdited(arg: AnyConfigurationModel): void
|
|
53
|
-
}) => {
|
|
54
|
-
const { classes } = useStyles()
|
|
18
|
+
import CreateIcon from '@mui/icons-material/Create'
|
|
19
|
+
import DeleteIcon from '@mui/icons-material/Delete'
|
|
55
20
|
|
|
56
|
-
|
|
57
|
-
|
|
21
|
+
const AssemblyTable = observer(function ({
|
|
22
|
+
rootModel,
|
|
23
|
+
setIsAssemblyBeingEdited,
|
|
24
|
+
setAssemblyBeingEdited,
|
|
25
|
+
}: {
|
|
26
|
+
rootModel: {
|
|
27
|
+
jbrowse: {
|
|
28
|
+
removeAssemblyConf: (arg: string) => void
|
|
29
|
+
assemblies: AnyConfigurationModel[]
|
|
58
30
|
}
|
|
31
|
+
}
|
|
32
|
+
setIsAssemblyBeingEdited(arg: boolean): void
|
|
33
|
+
setAssemblyBeingEdited(arg: AnyConfigurationModel): void
|
|
34
|
+
}) {
|
|
35
|
+
function removeAssembly(name: string) {
|
|
36
|
+
rootModel.jbrowse.removeAssemblyConf(name)
|
|
37
|
+
}
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
const name = readConfObject(assembly, 'name')
|
|
62
|
-
const displayName = readConfObject(assembly, 'displayName')
|
|
63
|
-
const aliases = readConfObject(assembly, 'aliases')
|
|
64
|
-
return (
|
|
65
|
-
<TableRow key={name}>
|
|
66
|
-
<TableCell>{name}</TableCell>
|
|
67
|
-
<TableCell>{displayName}</TableCell>
|
|
68
|
-
<TableCell>{aliases ? aliases.toString() : ''}</TableCell>
|
|
69
|
-
<TableCell className={classes.buttonCell}>
|
|
70
|
-
<IconButton
|
|
71
|
-
data-testid={`${name}-edit`}
|
|
72
|
-
className={classes.button}
|
|
73
|
-
onClick={() => {
|
|
74
|
-
setIsAssemblyBeingEdited(true)
|
|
75
|
-
setAssemblyBeingEdited(assembly)
|
|
76
|
-
}}
|
|
77
|
-
>
|
|
78
|
-
<CreateIcon color="primary" />
|
|
79
|
-
</IconButton>
|
|
80
|
-
<IconButton
|
|
81
|
-
data-testid={`${name}-delete`}
|
|
82
|
-
className={classes.button}
|
|
83
|
-
onClick={() => {
|
|
84
|
-
removeAssembly(name)
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
<DeleteIcon color="error" />
|
|
88
|
-
</IconButton>
|
|
89
|
-
</TableCell>
|
|
90
|
-
</TableRow>
|
|
91
|
-
)
|
|
92
|
-
})
|
|
39
|
+
const { assemblies } = rootModel.jbrowse
|
|
93
40
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
)
|
|
41
|
+
return (
|
|
42
|
+
<TableContainer component={Paper}>
|
|
43
|
+
<Table>
|
|
44
|
+
<TableHead>
|
|
45
|
+
<TableRow>
|
|
46
|
+
<TableCell>Name</TableCell>
|
|
47
|
+
<TableCell>Display name</TableCell>
|
|
48
|
+
<TableCell>Aliases</TableCell>
|
|
49
|
+
<TableCell>Actions</TableCell>
|
|
50
|
+
</TableRow>
|
|
51
|
+
</TableHead>
|
|
52
|
+
<TableBody>
|
|
53
|
+
{assemblies.map(assembly => {
|
|
54
|
+
const name = readConfObject(assembly, 'name')
|
|
55
|
+
const displayName = readConfObject(assembly, 'displayName')
|
|
56
|
+
const aliases = readConfObject(assembly, 'aliases')
|
|
57
|
+
return (
|
|
58
|
+
<TableRow key={name}>
|
|
59
|
+
<TableCell>{name}</TableCell>
|
|
60
|
+
<TableCell>{displayName}</TableCell>
|
|
61
|
+
<TableCell>{aliases ? aliases.toString() : ''}</TableCell>
|
|
62
|
+
<TableCell>
|
|
63
|
+
<IconButton
|
|
64
|
+
data-testid={`${name}-edit`}
|
|
65
|
+
onClick={() => {
|
|
66
|
+
setIsAssemblyBeingEdited(true)
|
|
67
|
+
setAssemblyBeingEdited(assembly)
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<CreateIcon color="primary" />
|
|
71
|
+
</IconButton>
|
|
72
|
+
<IconButton
|
|
73
|
+
data-testid={`${name}-delete`}
|
|
74
|
+
onClick={() => removeAssembly(name)}
|
|
75
|
+
>
|
|
76
|
+
<DeleteIcon color="error" />
|
|
77
|
+
</IconButton>
|
|
78
|
+
</TableCell>
|
|
79
|
+
</TableRow>
|
|
80
|
+
)
|
|
81
|
+
})}
|
|
82
|
+
</TableBody>
|
|
83
|
+
</Table>
|
|
84
|
+
</TableContainer>
|
|
85
|
+
)
|
|
86
|
+
})
|
|
119
87
|
|
|
120
88
|
export default AssemblyTable
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
|
-
Dialog,
|
|
5
|
-
DialogTitle,
|
|
6
4
|
DialogContent,
|
|
7
5
|
DialogActions,
|
|
8
6
|
IconButton,
|
|
9
7
|
Tooltip,
|
|
10
8
|
Typography,
|
|
11
9
|
} from '@mui/material'
|
|
10
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
12
11
|
import { makeStyles } from 'tss-react/mui'
|
|
13
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
14
12
|
import { observer } from 'mobx-react'
|
|
15
13
|
import {
|
|
16
14
|
AnyConfigurationModel,
|
|
@@ -18,14 +16,10 @@ import {
|
|
|
18
16
|
} from '@jbrowse/core/configuration'
|
|
19
17
|
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
position: 'absolute',
|
|
24
|
-
right: theme.spacing(1),
|
|
25
|
-
top: theme.spacing(1),
|
|
26
|
-
color: theme.palette.grey[500],
|
|
27
|
-
},
|
|
19
|
+
// icons
|
|
20
|
+
import CloseIcon from '@mui/icons-material/Close'
|
|
28
21
|
|
|
22
|
+
const useStyles = makeStyles()(theme => ({
|
|
29
23
|
connectionContainer: {
|
|
30
24
|
margin: theme.spacing(4),
|
|
31
25
|
width: 500,
|
|
@@ -44,16 +38,7 @@ function ManageConnectionsDlg({
|
|
|
44
38
|
const { classes } = useStyles()
|
|
45
39
|
const { adminMode, connections, sessionConnections } = session
|
|
46
40
|
return (
|
|
47
|
-
<Dialog open onClose={handleClose} maxWidth="lg">
|
|
48
|
-
<DialogTitle>
|
|
49
|
-
Delete connections
|
|
50
|
-
<IconButton
|
|
51
|
-
className={classes.closeButton}
|
|
52
|
-
onClick={() => handleClose()}
|
|
53
|
-
>
|
|
54
|
-
<CloseIcon />
|
|
55
|
-
</IconButton>
|
|
56
|
-
</DialogTitle>
|
|
41
|
+
<Dialog open onClose={handleClose} maxWidth="lg" title="Delete connections">
|
|
57
42
|
<DialogContent>
|
|
58
43
|
<Typography>
|
|
59
44
|
Click the X icon to delete the connection from your config completely
|
|
@@ -2,16 +2,13 @@ import React from 'react'
|
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
Checkbox,
|
|
5
|
-
Dialog,
|
|
6
|
-
DialogTitle,
|
|
7
5
|
DialogContent,
|
|
8
6
|
DialogActions,
|
|
9
7
|
FormControlLabel,
|
|
10
|
-
IconButton,
|
|
11
8
|
Typography,
|
|
12
9
|
} from '@mui/material'
|
|
10
|
+
import { Dialog } from '@jbrowse/core/ui'
|
|
13
11
|
import { makeStyles } from 'tss-react/mui'
|
|
14
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
15
12
|
import { observer } from 'mobx-react'
|
|
16
13
|
import {
|
|
17
14
|
AnyConfigurationModel,
|
|
@@ -24,13 +21,6 @@ export function ellipses(slug: string) {
|
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
const useStyles = makeStyles()(theme => ({
|
|
27
|
-
closeButton: {
|
|
28
|
-
position: 'absolute',
|
|
29
|
-
right: theme.spacing(1),
|
|
30
|
-
top: theme.spacing(1),
|
|
31
|
-
color: theme.palette.grey[500],
|
|
32
|
-
},
|
|
33
|
-
|
|
34
24
|
connectionContainer: {
|
|
35
25
|
width: 500,
|
|
36
26
|
margin: theme.spacing(4),
|
|
@@ -49,16 +39,12 @@ function ToggleConnectionDialog({
|
|
|
49
39
|
const { classes } = useStyles()
|
|
50
40
|
const { connections, connectionInstances: instances = [] } = session
|
|
51
41
|
return (
|
|
52
|
-
<Dialog
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
>
|
|
59
|
-
<CloseIcon />
|
|
60
|
-
</IconButton>
|
|
61
|
-
</DialogTitle>
|
|
42
|
+
<Dialog
|
|
43
|
+
open
|
|
44
|
+
onClose={handleClose}
|
|
45
|
+
maxWidth="lg"
|
|
46
|
+
title="Turn on/off connections"
|
|
47
|
+
>
|
|
62
48
|
<DialogContent>
|
|
63
49
|
<Typography>Use the checkbox to turn on/off connections</Typography>
|
|
64
50
|
<div className={classes.connectionContainer}>
|
|
@@ -4,7 +4,12 @@ import {
|
|
|
4
4
|
readConfObject,
|
|
5
5
|
AnyConfigurationModel,
|
|
6
6
|
} from '@jbrowse/core/configuration'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
AbstractSessionModel,
|
|
9
|
+
dedupe,
|
|
10
|
+
getSession,
|
|
11
|
+
getEnv,
|
|
12
|
+
} from '@jbrowse/core/util'
|
|
8
13
|
import { getTrackName } from '@jbrowse/core/util/tracks'
|
|
9
14
|
import { ElementId } from '@jbrowse/core/util/types/mst'
|
|
10
15
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
@@ -135,7 +140,7 @@ export default function stateTreeFactory(pluginManager: PluginManager) {
|
|
|
135
140
|
}))
|
|
136
141
|
.actions(self => ({
|
|
137
142
|
addToSelection(elt: AnyConfigurationModel[]) {
|
|
138
|
-
self.selection = [...self.selection, ...elt]
|
|
143
|
+
self.selection = dedupe([...self.selection, ...elt], e => e.trackId)
|
|
139
144
|
},
|
|
140
145
|
removeFromSelection(elt: AnyConfigurationModel[]) {
|
|
141
146
|
self.selection = self.selection.filter(f => !elt.includes(f))
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
Collapse,
|
|
8
8
|
Dialog,
|
|
9
9
|
DialogActions,
|
|
10
|
-
DialogTitle,
|
|
11
10
|
DialogContent,
|
|
12
11
|
DialogContentText,
|
|
13
12
|
TextField,
|
|
@@ -16,18 +15,12 @@ import { makeStyles } from 'tss-react/mui'
|
|
|
16
15
|
|
|
17
16
|
// icons
|
|
18
17
|
import IconButton from '@mui/material/IconButton'
|
|
19
|
-
import CloseIcon from '@mui/icons-material/Close'
|
|
20
18
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
21
19
|
|
|
22
20
|
// locals
|
|
23
21
|
import { PluginStoreModel } from '../model'
|
|
24
22
|
|
|
25
23
|
const useStyles = makeStyles()(theme => ({
|
|
26
|
-
closeButton: {
|
|
27
|
-
position: 'absolute',
|
|
28
|
-
right: theme.spacing(1),
|
|
29
|
-
top: theme.spacing(1),
|
|
30
|
-
},
|
|
31
24
|
dialogContent: {
|
|
32
25
|
display: 'flex',
|
|
33
26
|
flexDirection: 'column',
|
|
@@ -114,17 +107,7 @@ function CustomPluginForm({
|
|
|
114
107
|
}
|
|
115
108
|
|
|
116
109
|
return (
|
|
117
|
-
<Dialog open={open} onClose={handleClose}>
|
|
118
|
-
<DialogTitle>
|
|
119
|
-
Add custom plugin
|
|
120
|
-
<IconButton
|
|
121
|
-
size="medium"
|
|
122
|
-
className={classes.closeButton}
|
|
123
|
-
onClick={() => onClose()}
|
|
124
|
-
>
|
|
125
|
-
<CloseIcon />
|
|
126
|
-
</IconButton>
|
|
127
|
-
</DialogTitle>
|
|
110
|
+
<Dialog open={open} onClose={handleClose} title="Add custom plugin">
|
|
128
111
|
<form onSubmit={handleSubmit}>
|
|
129
112
|
<DialogContent className={classes.dialogContent}>
|
|
130
113
|
<DialogContentText>
|
|
@@ -61,6 +61,7 @@ function PluginStoreWidget({ model }: { model: PluginStoreModel }) {
|
|
|
61
61
|
const controller = new AbortController()
|
|
62
62
|
const { signal } = controller
|
|
63
63
|
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
64
65
|
;(async () => {
|
|
65
66
|
try {
|
|
66
67
|
const response = await fetch(
|