@jbrowse/plugin-data-management 1.6.7 → 1.7.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 +178 -0
- package/dist/AddConnectionWidget/components/AddConnectionWidget.test.js +270 -0
- package/dist/AddConnectionWidget/components/ConfigureConnection.js +35 -0
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.js +70 -0
- package/dist/AddConnectionWidget/index.js +21 -0
- package/dist/AddConnectionWidget/model.js +17 -0
- package/dist/AddTrackWidget/components/AddTrackWidget.js +215 -0
- package/dist/AddTrackWidget/components/AddTrackWidget.test.js +218 -0
- package/dist/AddTrackWidget/components/ConfirmTrack.js +277 -0
- package/dist/AddTrackWidget/components/TrackSourceSelect.js +60 -0
- package/dist/AddTrackWidget/index.js +21 -0
- package/dist/AddTrackWidget/index.test.js +291 -0
- package/dist/AddTrackWidget/model.js +167 -0
- package/dist/AssemblyManager/AssemblyAddForm.js +299 -0
- package/dist/AssemblyManager/AssemblyEditor.js +25 -0
- package/dist/AssemblyManager/AssemblyManager.js +144 -0
- package/dist/AssemblyManager/AssemblyManager.test.js +113 -0
- package/dist/AssemblyManager/AssemblyTable.js +92 -0
- package/dist/AssemblyManager/index.js +15 -0
- package/dist/HierarchicalTrackSelectorWidget/components/CloseConnectionDialog.js +55 -0
- package/dist/HierarchicalTrackSelectorWidget/components/DeleteConnectionDialog.js +46 -0
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +648 -0
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.js +191 -0
- package/dist/HierarchicalTrackSelectorWidget/components/ManageConnectionsDialog.js +80 -0
- package/dist/HierarchicalTrackSelectorWidget/components/ToggleConnectionsDialog.js +98 -0
- package/dist/HierarchicalTrackSelectorWidget/index.js +21 -0
- package/dist/HierarchicalTrackSelectorWidget/model.js +306 -0
- package/dist/HierarchicalTrackSelectorWidget/model.test.js +28 -0
- package/dist/PluginStoreWidget/components/CustomPluginForm.js +217 -0
- package/dist/PluginStoreWidget/components/InstalledPlugin.js +138 -0
- package/dist/PluginStoreWidget/components/InstalledPluginsList.js +47 -0
- package/dist/PluginStoreWidget/components/PluginCard.js +121 -0
- package/dist/PluginStoreWidget/components/PluginStoreWidget.js +240 -0
- package/dist/PluginStoreWidget/components/PluginStoreWidget.test.js +201 -0
- package/dist/PluginStoreWidget/index.js +29 -0
- package/dist/PluginStoreWidget/model.js +28 -0
- package/dist/PluginStoreWidget/model.test.js +17 -0
- package/dist/SetDefaultSession/SetDefaultSession.js +64 -0
- package/dist/SetDefaultSession/SetDefaultSession.test.js +75 -0
- package/dist/SetDefaultSession/index.js +15 -0
- package/dist/index.js +159 -6
- package/dist/index.test.js +56 -0
- package/dist/plugin-data-management.cjs.development.js +29 -23
- package/dist/plugin-data-management.cjs.development.js.map +1 -1
- package/dist/plugin-data-management.cjs.production.min.js +1 -1
- package/dist/plugin-data-management.cjs.production.min.js.map +1 -1
- package/dist/plugin-data-management.esm.js +29 -23
- package/dist/plugin-data-management.esm.js.map +1 -1
- package/dist/ucsc-trackhub/configSchema.js +30 -0
- package/dist/ucsc-trackhub/index.js +23 -0
- package/dist/ucsc-trackhub/model.js +130 -0
- package/dist/ucsc-trackhub/ucscAssemblies.js +13 -0
- package/dist/ucsc-trackhub/ucscTrackHub.js +503 -0
- package/package.json +3 -6
- package/src/AddConnectionWidget/components/AddConnectionWidget.test.js +1 -0
- package/src/AddTrackWidget/components/AddTrackWidget.test.js +1 -0
- package/src/AddTrackWidget/components/AddTrackWidget.tsx +1 -1
- package/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +94 -89
- package/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.js +1 -0
- package/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.js.snap +2 -2
- package/src/PluginStoreWidget/components/CustomPluginForm.tsx +1 -1
- package/src/PluginStoreWidget/components/InstalledPlugin.tsx +4 -2
- package/src/PluginStoreWidget/components/PluginCard.tsx +4 -2
- package/src/PluginStoreWidget/components/PluginStoreWidget.test.js +1 -0
- package/src/PluginStoreWidget/model.test.js +1 -0
- package/src/SetDefaultSession/SetDefaultSession.tsx +4 -3
|
@@ -29,7 +29,7 @@ import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown'
|
|
|
29
29
|
import ArrowRightIcon from '@material-ui/icons/ArrowRight'
|
|
30
30
|
import MenuIcon from '@material-ui/icons/Menu'
|
|
31
31
|
import MoreIcon from '@material-ui/icons/MoreHoriz'
|
|
32
|
-
import
|
|
32
|
+
import { Cable } from '@jbrowse/core/ui/Icons'
|
|
33
33
|
|
|
34
34
|
// other
|
|
35
35
|
import AutoSizer from 'react-virtualized-auto-sizer'
|
|
@@ -46,7 +46,7 @@ const ToggleConnectionsDialog = lazy(() => import('./ToggleConnectionsDialog'))
|
|
|
46
46
|
|
|
47
47
|
const useStyles = makeStyles(theme => ({
|
|
48
48
|
searchBox: {
|
|
49
|
-
|
|
49
|
+
margin: theme.spacing(2),
|
|
50
50
|
},
|
|
51
51
|
menuIcon: {
|
|
52
52
|
marginRight: theme.spacing(1),
|
|
@@ -316,48 +316,56 @@ const HierarchicalTrackSelectorContainer = observer(
|
|
|
316
316
|
toolbarHeight={toolbarHeight}
|
|
317
317
|
overrideDimensions={overrideDimensions}
|
|
318
318
|
/>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
319
|
+
{session.addConnectionConf || session.addTrackConf ? (
|
|
320
|
+
<>
|
|
321
|
+
<Fab
|
|
322
|
+
color="secondary"
|
|
323
|
+
className={classes.fab}
|
|
324
|
+
onClick={event => {
|
|
325
|
+
setAnchorEl(event.currentTarget)
|
|
326
|
+
}}
|
|
327
|
+
>
|
|
328
|
+
<AddIcon />
|
|
329
|
+
</Fab>
|
|
330
|
+
<Menu
|
|
331
|
+
anchorEl={anchorEl}
|
|
332
|
+
open={Boolean(anchorEl)}
|
|
333
|
+
onClose={() => setAnchorEl(null)}
|
|
334
|
+
>
|
|
335
|
+
{session.addConnectionConf ? (
|
|
336
|
+
<MenuItem
|
|
337
|
+
onClick={() => {
|
|
338
|
+
handleFabClose()
|
|
339
|
+
const widget = session.addWidget(
|
|
340
|
+
'AddConnectionWidget',
|
|
341
|
+
'addConnectionWidget',
|
|
342
|
+
)
|
|
343
|
+
session.showWidget(widget)
|
|
344
|
+
}}
|
|
345
|
+
>
|
|
346
|
+
Add connection
|
|
347
|
+
</MenuItem>
|
|
348
|
+
) : null}
|
|
349
|
+
{session.addTrackConf ? (
|
|
350
|
+
<MenuItem
|
|
351
|
+
onClick={() => {
|
|
352
|
+
handleFabClose()
|
|
353
|
+
const widget = session.addWidget(
|
|
354
|
+
'AddTrackWidget',
|
|
355
|
+
'addTrackWidget',
|
|
356
|
+
{
|
|
357
|
+
view: model.view.id,
|
|
358
|
+
},
|
|
359
|
+
)
|
|
360
|
+
session.showWidget(widget)
|
|
361
|
+
}}
|
|
362
|
+
>
|
|
363
|
+
Add track
|
|
364
|
+
</MenuItem>
|
|
365
|
+
) : null}
|
|
366
|
+
</Menu>
|
|
367
|
+
</>
|
|
368
|
+
) : null}
|
|
361
369
|
</Wrapper>
|
|
362
370
|
)
|
|
363
371
|
},
|
|
@@ -402,11 +410,24 @@ const HierarchicalTrackSelectorHeader = observer(
|
|
|
402
410
|
label: 'Turn on/off connections...',
|
|
403
411
|
onClick: () => setConnectionToggleOpen(true),
|
|
404
412
|
},
|
|
405
|
-
|
|
413
|
+
]
|
|
414
|
+
|
|
415
|
+
if (session.addConnectionConf) {
|
|
416
|
+
connectionMenuItems.unshift({
|
|
417
|
+
label: 'Add connection',
|
|
418
|
+
onClick: () => {
|
|
419
|
+
session.showWidget(
|
|
420
|
+
session.addWidget('AddConnectionWidget', 'addConnectionWidget'),
|
|
421
|
+
)
|
|
422
|
+
},
|
|
423
|
+
})
|
|
424
|
+
|
|
425
|
+
connectionMenuItems.push({
|
|
406
426
|
label: 'Delete connections...',
|
|
407
427
|
onClick: () => setConnectionManagerOpen(true),
|
|
408
|
-
}
|
|
409
|
-
|
|
428
|
+
})
|
|
429
|
+
}
|
|
430
|
+
|
|
410
431
|
const assemblyMenuItems =
|
|
411
432
|
assemblyNames.length > 1
|
|
412
433
|
? [
|
|
@@ -443,22 +464,28 @@ const HierarchicalTrackSelectorHeader = observer(
|
|
|
443
464
|
data-testid="hierarchical_track_selector"
|
|
444
465
|
>
|
|
445
466
|
<div style={{ display: 'flex' }}>
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
467
|
+
{session.addTrackConf && (
|
|
468
|
+
<IconButton
|
|
469
|
+
className={classes.menuIcon}
|
|
470
|
+
onClick={event => {
|
|
471
|
+
setMenuAnchorEl(event.currentTarget)
|
|
472
|
+
}}
|
|
473
|
+
>
|
|
474
|
+
<MenuIcon />
|
|
475
|
+
</IconButton>
|
|
476
|
+
)}
|
|
477
|
+
|
|
478
|
+
{session.makeConnection && (
|
|
479
|
+
<IconButton
|
|
480
|
+
className={classes.menuIcon}
|
|
481
|
+
onClick={event => {
|
|
482
|
+
setConnectionAnchorEl(event.currentTarget)
|
|
483
|
+
}}
|
|
484
|
+
>
|
|
485
|
+
<Cable />
|
|
486
|
+
</IconButton>
|
|
487
|
+
)}
|
|
488
|
+
|
|
462
489
|
<TextField
|
|
463
490
|
className={classes.searchBox}
|
|
464
491
|
label="Filter tracks"
|
|
@@ -476,7 +503,6 @@ const HierarchicalTrackSelectorHeader = observer(
|
|
|
476
503
|
}}
|
|
477
504
|
/>
|
|
478
505
|
</div>
|
|
479
|
-
|
|
480
506
|
<JBrowseMenu
|
|
481
507
|
anchorEl={connectionAnchorEl}
|
|
482
508
|
open={Boolean(connectionAnchorEl)}
|
|
@@ -484,25 +510,9 @@ const HierarchicalTrackSelectorHeader = observer(
|
|
|
484
510
|
callback()
|
|
485
511
|
setConnectionAnchorEl(undefined)
|
|
486
512
|
}}
|
|
487
|
-
onClose={() =>
|
|
488
|
-
|
|
489
|
-
}}
|
|
490
|
-
menuItems={[
|
|
491
|
-
{
|
|
492
|
-
label: 'Add connection',
|
|
493
|
-
onClick: () => {
|
|
494
|
-
session.showWidget(
|
|
495
|
-
session.addWidget(
|
|
496
|
-
'AddConnectionWidget',
|
|
497
|
-
'addConnectionWidget',
|
|
498
|
-
),
|
|
499
|
-
)
|
|
500
|
-
},
|
|
501
|
-
},
|
|
502
|
-
...connectionMenuItems,
|
|
503
|
-
]}
|
|
513
|
+
onClose={() => setConnectionAnchorEl(undefined)}
|
|
514
|
+
menuItems={connectionMenuItems}
|
|
504
515
|
/>
|
|
505
|
-
|
|
506
516
|
<JBrowseMenu
|
|
507
517
|
anchorEl={menuAnchorEl}
|
|
508
518
|
open={Boolean(menuAnchorEl)}
|
|
@@ -510,12 +520,9 @@ const HierarchicalTrackSelectorHeader = observer(
|
|
|
510
520
|
callback()
|
|
511
521
|
setMenuAnchorEl(undefined)
|
|
512
522
|
}}
|
|
513
|
-
onClose={() =>
|
|
514
|
-
setMenuAnchorEl(undefined)
|
|
515
|
-
}}
|
|
523
|
+
onClose={() => setMenuAnchorEl(undefined)}
|
|
516
524
|
menuItems={menuItems}
|
|
517
525
|
/>
|
|
518
|
-
|
|
519
526
|
<Suspense fallback={<div />}>
|
|
520
527
|
{modalInfo ? (
|
|
521
528
|
<CloseConnectionDialog
|
|
@@ -525,9 +532,7 @@ const HierarchicalTrackSelectorHeader = observer(
|
|
|
525
532
|
/>
|
|
526
533
|
) : deleteDialogDetails ? (
|
|
527
534
|
<DeleteConnectionDialog
|
|
528
|
-
handleClose={() =>
|
|
529
|
-
setDeleteDialogDetails(undefined)
|
|
530
|
-
}}
|
|
535
|
+
handleClose={() => setDeleteDialogDetails(undefined)}
|
|
531
536
|
deleteDialogDetails={deleteDialogDetails}
|
|
532
537
|
session={session}
|
|
533
538
|
/>
|
|
@@ -3,6 +3,7 @@ import { createTheme, ThemeProvider } from '@material-ui/core/styles'
|
|
|
3
3
|
import { cleanup, render } from '@testing-library/react'
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import HierarchicalTrackSelector from './HierarchicalTrackSelector'
|
|
6
|
+
jest.mock('@jbrowse/web/src/makeWorkerInstance', () => () => {})
|
|
6
7
|
|
|
7
8
|
window.requestIdleCallback = cb => cb()
|
|
8
9
|
window.cancelIdleCallback = () => {}
|
|
@@ -71,7 +71,7 @@ exports[`HierarchicalTrackSelector widget renders with a couple of categorized t
|
|
|
71
71
|
viewBox="0 0 24 24"
|
|
72
72
|
>
|
|
73
73
|
<path
|
|
74
|
-
d="
|
|
74
|
+
d="M20 5V4c0-.55-.45-1-1-1h-2c-.55 0-1 .45-1 1v1h-1v4c0 .55.45 1 1 1h1v7c0 1.1-.9 2-2 2s-2-.9-2-2V7c0-2.21-1.79-4-4-4S5 4.79 5 7v7H4c-.55 0-1 .45-1 1v4h1v1c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-1h1v-4c0-.55-.45-1-1-1H7V7c0-1.1.9-2 2-2s2 .9 2 2v10c0 2.21 1.79 4 4 4s4-1.79 4-4v-7h1c.55 0 1-.45 1-1V5h-1z"
|
|
75
75
|
/>
|
|
76
76
|
</svg>
|
|
77
77
|
</span>
|
|
@@ -175,7 +175,7 @@ exports[`HierarchicalTrackSelector widget renders with a couple of uncategorized
|
|
|
175
175
|
viewBox="0 0 24 24"
|
|
176
176
|
>
|
|
177
177
|
<path
|
|
178
|
-
d="
|
|
178
|
+
d="M20 5V4c0-.55-.45-1-1-1h-2c-.55 0-1 .45-1 1v1h-1v4c0 .55.45 1 1 1h1v7c0 1.1-.9 2-2 2s-2-.9-2-2V7c0-2.21-1.79-4-4-4S5 4.79 5 7v7H4c-.55 0-1 .45-1 1v4h1v1c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-1h1v-4c0-.55-.45-1-1-1H7V7c0-1.1.9-2 2-2s2 .9 2 2v10c0 2.21 1.79 4 4 4s4-1.79 4-4v-7h1c.55 0 1-.45 1-1V5h-1z"
|
|
179
179
|
/>
|
|
180
180
|
</svg>
|
|
181
181
|
</span>
|
|
@@ -132,7 +132,7 @@ function CustomPluginForm({
|
|
|
132
132
|
<DialogContent className={classes.dialogContent}>
|
|
133
133
|
<DialogContentText>
|
|
134
134
|
Enter the name of the plugin and its URL. The name should match what
|
|
135
|
-
is defined in the plugin
|
|
135
|
+
is defined in the plugin's build.
|
|
136
136
|
</DialogContentText>
|
|
137
137
|
<TextField
|
|
138
138
|
id="umd-name-input"
|
|
@@ -19,8 +19,10 @@ import LockIcon from '@material-ui/icons/Lock'
|
|
|
19
19
|
|
|
20
20
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
21
21
|
import { getSession } from '@jbrowse/core/util'
|
|
22
|
-
import {
|
|
23
|
-
|
|
22
|
+
import {
|
|
23
|
+
BasePlugin,
|
|
24
|
+
isSessionWithSessionPlugins,
|
|
25
|
+
} from '@jbrowse/core/util/types'
|
|
24
26
|
import { PluginStoreModel } from '../model'
|
|
25
27
|
|
|
26
28
|
const useStyles = makeStyles(() => ({
|
|
@@ -3,8 +3,10 @@ import PluginManager from '@jbrowse/core/PluginManager'
|
|
|
3
3
|
import { observer } from 'mobx-react'
|
|
4
4
|
import { getEnv, getParent } from 'mobx-state-tree'
|
|
5
5
|
import { getSession } from '@jbrowse/core/util'
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
JBrowsePlugin,
|
|
8
|
+
isSessionWithSessionPlugins,
|
|
9
|
+
} from '@jbrowse/core/util/types'
|
|
8
10
|
import {
|
|
9
11
|
Card,
|
|
10
12
|
CardActions,
|
|
@@ -4,6 +4,7 @@ import { render, cleanup, fireEvent, waitFor } from '@testing-library/react'
|
|
|
4
4
|
import { createTestSession } from '@jbrowse/web/src/rootModel'
|
|
5
5
|
|
|
6
6
|
import PluginStoreWidget from './PluginStoreWidget'
|
|
7
|
+
jest.mock('@jbrowse/web/src/makeWorkerInstance', () => () => {})
|
|
7
8
|
|
|
8
9
|
const plugins = {
|
|
9
10
|
plugins: [
|
|
@@ -32,9 +32,10 @@ const SetDefaultSession = observer(
|
|
|
32
32
|
<DialogTitle>Set default session</DialogTitle>
|
|
33
33
|
<DialogContent>
|
|
34
34
|
<Typography>
|
|
35
|
-
Select
|
|
36
|
-
saved to the config file. You can also hit
|
|
37
|
-
which would remove the default
|
|
35
|
+
Select "Set current session as default" to make your
|
|
36
|
+
current session saved to the config file. You can also hit
|
|
37
|
+
"Clear default session", which would remove the default
|
|
38
|
+
session from the config.
|
|
38
39
|
</Typography>
|
|
39
40
|
</DialogContent>
|
|
40
41
|
<DialogActions>
|