@jbrowse/plugin-data-management 2.18.0 → 3.0.1
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.d.ts +1 -2
- package/dist/AddConnectionWidget/components/AddConnectionWidget.js +28 -57
- package/dist/AddConnectionWidget/components/ConfigureConnection.d.ts +1 -2
- package/dist/AddConnectionWidget/components/ConfigureConnection.js +3 -26
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.d.ts +1 -2
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.js +5 -30
- package/dist/AddConnectionWidget/index.js +17 -7
- package/dist/AddTrackWidget/components/AddTrackStatusMessage.d.ts +9 -0
- package/dist/AddTrackWidget/components/AddTrackStatusMessage.js +16 -0
- package/dist/AddTrackWidget/components/AddTrackUnknownAdapterPrompt.d.ts +4 -0
- package/dist/AddTrackWidget/components/AddTrackUnknownAdapterPrompt.js +19 -0
- package/dist/AddTrackWidget/components/AddTrackWidget.d.ts +1 -2
- package/dist/AddTrackWidget/components/AddTrackWidget.js +5 -32
- package/dist/AddTrackWidget/components/ConfirmTrack.d.ts +1 -2
- package/dist/AddTrackWidget/components/ConfirmTrack.js +33 -91
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +1 -2
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.js +22 -104
- package/dist/AddTrackWidget/components/PasteConfigWorkflow.d.ts +1 -2
- package/dist/AddTrackWidget/components/PasteConfigWorkflow.js +29 -49
- package/dist/AddTrackWidget/components/TextIndexingConfig.d.ts +1 -2
- package/dist/AddTrackWidget/components/TextIndexingConfig.js +35 -70
- package/dist/AddTrackWidget/components/TrackAdapterSelector.d.ts +1 -2
- package/dist/AddTrackWidget/components/TrackAdapterSelector.js +12 -33
- package/dist/AddTrackWidget/components/TrackSourceSelect.d.ts +1 -2
- package/dist/AddTrackWidget/components/TrackSourceSelect.js +2 -8
- package/dist/AddTrackWidget/components/TrackTypeSelector.d.ts +2 -3
- package/dist/AddTrackWidget/components/TrackTypeSelector.js +7 -15
- package/dist/AddTrackWidget/components/Unsupported.d.ts +1 -0
- package/dist/AddTrackWidget/components/Unsupported.js +15 -0
- package/dist/AddTrackWidget/components/doSubmit.d.ts +4 -0
- package/dist/AddTrackWidget/components/doSubmit.js +50 -0
- package/dist/AddTrackWidget/components/util.d.ts +2 -0
- package/dist/AddTrackWidget/components/util.js +15 -0
- package/dist/AddTrackWidget/index.js +17 -7
- package/dist/AddTrackWidget/model.d.ts +13 -0
- package/dist/AddTrackWidget/model.js +43 -3
- package/dist/AssemblyManager/AssemblyAddForm.d.ts +1 -2
- package/dist/AssemblyManager/AssemblyAddForm.js +73 -120
- package/dist/AssemblyManager/AssemblyEditor.d.ts +1 -2
- package/dist/AssemblyManager/AssemblyEditor.js +4 -11
- package/dist/AssemblyManager/AssemblyManager.d.ts +1 -2
- package/dist/AssemblyManager/AssemblyManager.js +14 -36
- package/dist/AssemblyManager/AssemblyTable.d.ts +1 -2
- package/dist/AssemblyManager/AssemblyTable.js +31 -43
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalFab.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalFab.js +19 -46
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +6 -32
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +18 -7
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.js +7 -18
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.js +8 -16
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.js +10 -22
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.js +7 -16
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +17 -51
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +22 -20
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDataGrid.d.ts +9 -0
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDataGrid.js +71 -0
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.js +2 -4
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +46 -79
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +15 -107
- package/dist/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.js +5 -30
- package/dist/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.js +4 -7
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +122 -119
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +6 -14
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +3 -26
- package/dist/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.js +4 -7
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.js +44 -72
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +17 -11
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.js +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.d.ts +1 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.js +6 -9
- package/dist/HierarchicalTrackSelectorWidget/components/util.js +1 -3
- package/dist/HierarchicalTrackSelectorWidget/facetedModel.d.ts +1 -0
- package/dist/HierarchicalTrackSelectorWidget/facetedModel.js +6 -6
- package/dist/HierarchicalTrackSelectorWidget/index.js +17 -7
- package/dist/PluginStoreWidget/components/AddCustomPluginDialog.d.ts +1 -2
- package/dist/PluginStoreWidget/components/AddCustomPluginDialog.js +15 -54
- package/dist/PluginStoreWidget/components/DeletePluginDialog.d.ts +1 -2
- package/dist/PluginStoreWidget/components/DeletePluginDialog.js +9 -21
- package/dist/PluginStoreWidget/components/InstalledPlugin.d.ts +1 -2
- package/dist/PluginStoreWidget/components/InstalledPlugin.js +38 -31
- package/dist/PluginStoreWidget/components/InstalledPluginsList.d.ts +1 -2
- package/dist/PluginStoreWidget/components/InstalledPluginsList.js +4 -4
- package/dist/PluginStoreWidget/components/PluginCard.d.ts +1 -2
- package/dist/PluginStoreWidget/components/PluginCard.js +14 -46
- package/dist/PluginStoreWidget/components/PluginStoreWidget.d.ts +1 -2
- package/dist/PluginStoreWidget/components/PluginStoreWidget.js +40 -52
- package/dist/PluginStoreWidget/index.js +17 -7
- package/dist/UCSCTrackHub/doConnect.js +18 -10
- package/dist/UCSCTrackHub/model.js +17 -7
- package/dist/UCSCTrackHub/ucscTrackHub.d.ts +53 -36
- package/dist/UCSCTrackHub/ucscTrackHub.js +141 -165
- package/dist/UCSCTrackHub/util.d.ts +22 -0
- package/dist/UCSCTrackHub/util.js +41 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -7
- package/esm/AddConnectionWidget/components/AddConnectionWidget.d.ts +1 -2
- package/esm/AddConnectionWidget/components/AddConnectionWidget.js +28 -34
- package/esm/AddConnectionWidget/components/ConfigureConnection.d.ts +1 -2
- package/esm/AddConnectionWidget/components/ConfigureConnection.js +3 -3
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.d.ts +1 -2
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.js +5 -7
- package/esm/AddTrackWidget/components/AddTrackStatusMessage.d.ts +9 -0
- package/esm/AddTrackWidget/components/AddTrackStatusMessage.js +13 -0
- package/esm/AddTrackWidget/components/AddTrackUnknownAdapterPrompt.d.ts +4 -0
- package/esm/AddTrackWidget/components/AddTrackUnknownAdapterPrompt.js +13 -0
- package/esm/AddTrackWidget/components/AddTrackWidget.d.ts +1 -2
- package/esm/AddTrackWidget/components/AddTrackWidget.js +5 -9
- package/esm/AddTrackWidget/components/ConfirmTrack.d.ts +1 -2
- package/esm/AddTrackWidget/components/ConfirmTrack.js +35 -70
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +1 -2
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.js +24 -83
- package/esm/AddTrackWidget/components/PasteConfigWorkflow.d.ts +1 -2
- package/esm/AddTrackWidget/components/PasteConfigWorkflow.js +29 -26
- package/esm/AddTrackWidget/components/TextIndexingConfig.d.ts +1 -2
- package/esm/AddTrackWidget/components/TextIndexingConfig.js +35 -47
- package/esm/AddTrackWidget/components/TrackAdapterSelector.d.ts +1 -2
- package/esm/AddTrackWidget/components/TrackAdapterSelector.js +12 -30
- package/esm/AddTrackWidget/components/TrackSourceSelect.d.ts +1 -2
- package/esm/AddTrackWidget/components/TrackSourceSelect.js +2 -5
- package/esm/AddTrackWidget/components/TrackTypeSelector.d.ts +2 -3
- package/esm/AddTrackWidget/components/TrackTypeSelector.js +7 -12
- package/esm/AddTrackWidget/components/Unsupported.d.ts +1 -0
- package/esm/AddTrackWidget/components/Unsupported.js +12 -0
- package/esm/AddTrackWidget/components/doSubmit.d.ts +4 -0
- package/esm/AddTrackWidget/components/doSubmit.js +47 -0
- package/esm/AddTrackWidget/components/util.d.ts +2 -0
- package/esm/AddTrackWidget/components/util.js +12 -0
- package/esm/AddTrackWidget/model.d.ts +13 -0
- package/esm/AddTrackWidget/model.js +40 -3
- package/esm/AssemblyManager/AssemblyAddForm.d.ts +1 -2
- package/esm/AssemblyManager/AssemblyAddForm.js +73 -97
- package/esm/AssemblyManager/AssemblyEditor.d.ts +1 -2
- package/esm/AssemblyManager/AssemblyEditor.js +4 -8
- package/esm/AssemblyManager/AssemblyManager.d.ts +1 -2
- package/esm/AssemblyManager/AssemblyManager.js +14 -13
- package/esm/AssemblyManager/AssemblyTable.d.ts +1 -2
- package/esm/AssemblyManager/AssemblyTable.js +31 -43
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalFab.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalFab.js +19 -23
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.js +6 -9
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +18 -7
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.js +7 -15
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.js +8 -13
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.js +10 -22
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.js +7 -13
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +17 -28
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +22 -20
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDataGrid.d.ts +9 -0
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDataGrid.js +69 -0
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.js +2 -4
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +46 -56
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +15 -84
- package/esm/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/DropdownTrackSelector.js +5 -7
- package/esm/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/FavoriteTracks.js +4 -7
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +105 -112
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +6 -14
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +3 -3
- package/esm/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/RecentlyUsedTracks.js +4 -7
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackCategory.js +44 -49
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +17 -11
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabelMenu.js +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.d.ts +1 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackListNode.js +6 -9
- package/esm/HierarchicalTrackSelectorWidget/components/util.js +1 -3
- package/esm/HierarchicalTrackSelectorWidget/facetedModel.d.ts +1 -0
- package/esm/HierarchicalTrackSelectorWidget/facetedModel.js +7 -7
- package/esm/PluginStoreWidget/components/AddCustomPluginDialog.d.ts +1 -2
- package/esm/PluginStoreWidget/components/AddCustomPluginDialog.js +15 -31
- package/esm/PluginStoreWidget/components/DeletePluginDialog.d.ts +1 -2
- package/esm/PluginStoreWidget/components/DeletePluginDialog.js +9 -18
- package/esm/PluginStoreWidget/components/InstalledPlugin.d.ts +1 -2
- package/esm/PluginStoreWidget/components/InstalledPlugin.js +21 -24
- package/esm/PluginStoreWidget/components/InstalledPluginsList.d.ts +1 -2
- package/esm/PluginStoreWidget/components/InstalledPluginsList.js +4 -4
- package/esm/PluginStoreWidget/components/PluginCard.d.ts +1 -2
- package/esm/PluginStoreWidget/components/PluginCard.js +14 -23
- package/esm/PluginStoreWidget/components/PluginStoreWidget.d.ts +1 -2
- package/esm/PluginStoreWidget/components/PluginStoreWidget.js +23 -45
- package/esm/UCSCTrackHub/doConnect.js +12 -4
- package/esm/UCSCTrackHub/ucscTrackHub.d.ts +53 -36
- package/esm/UCSCTrackHub/ucscTrackHub.js +139 -158
- package/esm/UCSCTrackHub/util.d.ts +22 -0
- package/esm/UCSCTrackHub/util.js +33 -0
- package/esm/index.d.ts +2 -2
- package/package.json +14 -13
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getEnv } from '@jbrowse/core/util';
|
|
3
3
|
import { MenuItem, TextField } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
|
|
6
|
-
const useStyles = makeStyles()(theme => ({
|
|
7
|
-
spacing: {
|
|
8
|
-
marginBottom: theme.spacing(3),
|
|
9
|
-
},
|
|
10
|
-
}));
|
|
11
|
-
const TrackTypeSelector = observer(({ model }) => {
|
|
12
|
-
const { classes } = useStyles();
|
|
5
|
+
const TrackTypeSelector = observer(function ({ model, }) {
|
|
13
6
|
const { pluginManager } = getEnv(model);
|
|
14
7
|
const { trackType } = model;
|
|
15
8
|
const trackTypes = pluginManager.getTrackElements();
|
|
16
|
-
return (
|
|
9
|
+
return (_jsx(TextField, { value: trackType, variant: "outlined", label: "Track type", select: true, fullWidth: true, onChange: event => {
|
|
17
10
|
model.setTrackType(event.target.value);
|
|
18
11
|
}, slotProps: {
|
|
19
12
|
select: {
|
|
20
|
-
SelectDisplayProps: {
|
|
13
|
+
SelectDisplayProps: {
|
|
14
|
+
'data-testid': 'trackTypeSelect',
|
|
15
|
+
},
|
|
21
16
|
},
|
|
22
|
-
}
|
|
17
|
+
}, children: trackTypes.map(({ name, displayName }) => (_jsx(MenuItem, { value: name, children: displayName }, name))) }));
|
|
23
18
|
});
|
|
24
19
|
export default TrackTypeSelector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Unsupported(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Link, Typography } from '@mui/material';
|
|
3
|
+
import { makeStyles } from 'tss-react/mui';
|
|
4
|
+
const useStyles = makeStyles()(theme => ({
|
|
5
|
+
spacing: {
|
|
6
|
+
marginBottom: theme.spacing(3),
|
|
7
|
+
},
|
|
8
|
+
}));
|
|
9
|
+
export default function Unsupported() {
|
|
10
|
+
const { classes } = useStyles();
|
|
11
|
+
return (_jsxs(Typography, { className: classes.spacing, children: ["This version of JBrowse cannot display data of this type. It is possible, however, that there is a newer version that can display them. You can", ' ', _jsx(Link, { href: "https://github.com/GMOD/jbrowse-components/releases", target: "_blank", rel: "noopener noreferrer", children: "check for new releases" }), ' ', "of JBrowse or", ' ', _jsx(Link, { href: "https://github.com/GMOD/jbrowse-components/issues/new", target: "_blank", rel: "noopener noreferrer", children: "file an issue" }), ' ', "and add a feature request for this data type."] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getSession, isElectron, isSessionModelWithWidgets, isSessionWithAddTracks, isSupportedIndexingAdapter, } from '@jbrowse/core/util';
|
|
2
|
+
import { getRoot } from 'mobx-state-tree';
|
|
3
|
+
function doTextIndexTrack({ model }) {
|
|
4
|
+
const { textIndexingConf, trackConfig, trackName, assembly } = model;
|
|
5
|
+
const { jobsManager } = getRoot(model);
|
|
6
|
+
const attr = textIndexingConf || {
|
|
7
|
+
attributes: ['Name', 'ID'],
|
|
8
|
+
exclude: ['CDS', 'exon'],
|
|
9
|
+
};
|
|
10
|
+
const indexName = `${trackName}-index`;
|
|
11
|
+
jobsManager.queueJob({
|
|
12
|
+
indexingParams: {
|
|
13
|
+
...attr,
|
|
14
|
+
assemblies: [assembly],
|
|
15
|
+
tracks: [trackConfig.trackId],
|
|
16
|
+
indexType: 'perTrack',
|
|
17
|
+
name: indexName,
|
|
18
|
+
timestamp: new Date().toISOString(),
|
|
19
|
+
},
|
|
20
|
+
name: indexName,
|
|
21
|
+
cancelCallback: () => jobsManager.abortJob(),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export function doSubmit({ model }) {
|
|
25
|
+
var _a;
|
|
26
|
+
const { textIndexTrack, trackConfig, trackAdapter, view } = model;
|
|
27
|
+
const session = getSession(model);
|
|
28
|
+
if (!isSessionWithAddTracks(session)) {
|
|
29
|
+
throw new Error("Can't add tracks to this session");
|
|
30
|
+
}
|
|
31
|
+
else if (trackConfig && trackAdapter) {
|
|
32
|
+
session.addTrackConf(trackConfig);
|
|
33
|
+
(_a = view === null || view === void 0 ? void 0 : view.showTrack) === null || _a === void 0 ? void 0 : _a.call(view, trackConfig.trackId);
|
|
34
|
+
if (isElectron &&
|
|
35
|
+
textIndexTrack &&
|
|
36
|
+
isSupportedIndexingAdapter(trackAdapter.type)) {
|
|
37
|
+
doTextIndexTrack({ model });
|
|
38
|
+
}
|
|
39
|
+
model.clearData();
|
|
40
|
+
if (isSessionModelWithWidgets(session)) {
|
|
41
|
+
session.hideWidget(model);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw new Error('Failed to add track.\nThe configuration of this file is not currently supported.');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function categorizeAdapters(adaptersList) {
|
|
2
|
+
var _a;
|
|
3
|
+
const map = {};
|
|
4
|
+
for (const adapter of adaptersList) {
|
|
5
|
+
const key = ((_a = adapter.adapterMetadata) === null || _a === void 0 ? void 0 : _a.category) || 'Default';
|
|
6
|
+
if (!map[key]) {
|
|
7
|
+
map[key] = [];
|
|
8
|
+
}
|
|
9
|
+
map[key].push(adapter);
|
|
10
|
+
}
|
|
11
|
+
return map;
|
|
12
|
+
}
|
|
@@ -19,7 +19,9 @@ export default function f(pluginManager: PluginManager): import("mobx-state-tree
|
|
|
19
19
|
adapterHint: string;
|
|
20
20
|
textIndexTrack: boolean;
|
|
21
21
|
textIndexingConf: IndexingAttr | undefined;
|
|
22
|
+
mixinData: {};
|
|
22
23
|
} & {
|
|
24
|
+
setMixinData(arg: Record<string, unknown>): void;
|
|
23
25
|
setAdapterHint(obj: string): void;
|
|
24
26
|
setTrackSource(str: string): void;
|
|
25
27
|
setTextIndexingConf(conf: IndexingAttr): void;
|
|
@@ -42,8 +44,19 @@ export default function f(pluginManager: PluginManager): import("mobx-state-tree
|
|
|
42
44
|
readonly wrongProtocol: any;
|
|
43
45
|
readonly unsupported: boolean;
|
|
44
46
|
readonly assembly: any;
|
|
47
|
+
readonly trackAdapterType: string | undefined;
|
|
45
48
|
readonly trackType: string;
|
|
46
49
|
} & {
|
|
50
|
+
readonly trackConfig: {
|
|
51
|
+
trackId: string;
|
|
52
|
+
type: string;
|
|
53
|
+
name: string;
|
|
54
|
+
assemblyNames: any[];
|
|
55
|
+
adapter: {
|
|
56
|
+
sequenceAdapter: any;
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
} | undefined;
|
|
47
60
|
readonly warningMessage: "" | "Warning: JBrowse cannot access files using the ftp protocol" | "Warning: one or more of your files do not provide the protocol e.g.\n https://, please provide an absolute URL unless you are sure a\n relative URL is intended." | "Warning: You entered a http:// resources but we cannot access HTTP\n resources from JBrowse when it is running on https. Please use an\n https URL for your track, or access the JBrowse app from the http\n protocol";
|
|
48
61
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
49
62
|
export type AddTrackStateModel = ReturnType<typeof f>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { getConf } from '@jbrowse/core/configuration';
|
|
2
|
+
import { getSession } from '@jbrowse/core/util';
|
|
1
3
|
import { UNSUPPORTED, getFileName, guessAdapter, guessTrackType, } from '@jbrowse/core/util/tracks';
|
|
2
4
|
import { ElementId } from '@jbrowse/core/util/types/mst';
|
|
5
|
+
import deepmerge from 'deepmerge';
|
|
3
6
|
import { types } from 'mobx-state-tree';
|
|
4
7
|
function isAbsoluteUrl(url = '') {
|
|
5
8
|
try {
|
|
@@ -27,8 +30,12 @@ export default function f(pluginManager) {
|
|
|
27
30
|
adapterHint: '',
|
|
28
31
|
textIndexTrack: true,
|
|
29
32
|
textIndexingConf: undefined,
|
|
33
|
+
mixinData: {},
|
|
30
34
|
}))
|
|
31
35
|
.actions(self => ({
|
|
36
|
+
setMixinData(arg) {
|
|
37
|
+
self.mixinData = arg;
|
|
38
|
+
},
|
|
32
39
|
setAdapterHint(obj) {
|
|
33
40
|
self.adapterHint = obj;
|
|
34
41
|
},
|
|
@@ -117,14 +124,42 @@ export default function f(pluginManager) {
|
|
|
117
124
|
var _a;
|
|
118
125
|
return self.altAssemblyName || ((_a = self.view.assemblyNames) === null || _a === void 0 ? void 0 : _a[0]);
|
|
119
126
|
},
|
|
127
|
+
get trackAdapterType() {
|
|
128
|
+
var _a;
|
|
129
|
+
return (_a = this.trackAdapter) === null || _a === void 0 ? void 0 : _a.type;
|
|
130
|
+
},
|
|
120
131
|
get trackType() {
|
|
121
132
|
return (self.altTrackType ||
|
|
122
|
-
(this.
|
|
123
|
-
? guessTrackType(this.
|
|
133
|
+
(this.trackAdapterType
|
|
134
|
+
? guessTrackType(this.trackAdapterType, self)
|
|
124
135
|
: ''));
|
|
125
136
|
},
|
|
126
137
|
}))
|
|
127
138
|
.views(self => ({
|
|
139
|
+
get trackConfig() {
|
|
140
|
+
const session = getSession(self);
|
|
141
|
+
const assemblyInstance = session.assemblyManager.get(self.assembly);
|
|
142
|
+
return assemblyInstance &&
|
|
143
|
+
self.trackAdapter &&
|
|
144
|
+
self.trackAdapter.type !== 'UNKNOWN'
|
|
145
|
+
? deepmerge({
|
|
146
|
+
trackId: [
|
|
147
|
+
`${self.trackName.toLowerCase().replaceAll(' ', '_')}-${Date.now()}`,
|
|
148
|
+
session.adminMode ? '' : '-sessionTrack',
|
|
149
|
+
].join(''),
|
|
150
|
+
type: self.trackType,
|
|
151
|
+
name: self.trackName,
|
|
152
|
+
assemblyNames: [self.assembly],
|
|
153
|
+
adapter: {
|
|
154
|
+
...self.trackAdapter,
|
|
155
|
+
sequenceAdapter: getConf(assemblyInstance, [
|
|
156
|
+
'sequence',
|
|
157
|
+
'adapter',
|
|
158
|
+
]),
|
|
159
|
+
},
|
|
160
|
+
}, self.mixinData)
|
|
161
|
+
: undefined;
|
|
162
|
+
},
|
|
128
163
|
get warningMessage() {
|
|
129
164
|
if (self.isFtp) {
|
|
130
165
|
return 'Warning: JBrowse cannot access files using the ftp protocol';
|
|
@@ -140,7 +175,9 @@ export default function f(pluginManager) {
|
|
|
140
175
|
https URL for your track, or access the JBrowse app from the http
|
|
141
176
|
protocol`;
|
|
142
177
|
}
|
|
143
|
-
|
|
178
|
+
else {
|
|
179
|
+
return '';
|
|
180
|
+
}
|
|
144
181
|
},
|
|
145
182
|
}));
|
|
146
183
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AbstractSessionModel } from '@jbrowse/core/util/types';
|
|
3
2
|
declare const AssemblyAddForm: ({ session, onClose, }: {
|
|
4
3
|
session: AbstractSessionModel;
|
|
5
4
|
onClose: () => void;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default AssemblyAddForm;
|
|
@@ -1,56 +1,40 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
4
|
import { Alert, Button, DialogActions, DialogContent, MenuItem, TextField, } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
6
|
const AdapterSelector = observer(function ({ adapterSelection, setAdapterSelection, adapterTypes, }) {
|
|
6
|
-
return (
|
|
7
|
+
return (_jsx(TextField, { value: adapterSelection, variant: "outlined", select: true, helperText: "Type of adapter to use", fullWidth: true, onChange: event => {
|
|
7
8
|
setAdapterSelection(event.target.value);
|
|
8
|
-
}
|
|
9
|
+
}, children: adapterTypes.map(str => (_jsx(MenuItem, { value: str, children: str }, str))) }));
|
|
9
10
|
});
|
|
10
11
|
const UnindexedFastaAdapterInput = observer(function ({ fastaLocation, setFastaLocation, }) {
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
React.createElement(FileSelector, { inline: true, name: "fastaLocation", location: fastaLocation, setLocation: loc => {
|
|
15
|
-
setFastaLocation(loc);
|
|
16
|
-
} }))));
|
|
12
|
+
return (_jsxs(_Fragment, { children: [_jsx(Alert, { severity: "warning", style: { margin: 30 }, children: "Note: use only relatively small files for this type, it is loaded into memory" }), _jsx("div", { children: _jsx(FileSelector, { inline: true, name: "fastaLocation", location: fastaLocation, setLocation: loc => {
|
|
13
|
+
setFastaLocation(loc);
|
|
14
|
+
} }) })] }));
|
|
17
15
|
});
|
|
18
16
|
const IndexedFastaAdapterInput = observer(function ({ fastaLocation, faiLocation, setFaiLocation, setFastaLocation, }) {
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
React.createElement("div", null,
|
|
25
|
-
React.createElement(FileSelector, { inline: true, name: "faiLocation", location: faiLocation, setLocation: loc => {
|
|
26
|
-
setFaiLocation(loc);
|
|
27
|
-
} }))));
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { children: _jsx(FileSelector, { inline: true, name: "fastaLocation", location: fastaLocation, setLocation: loc => {
|
|
18
|
+
setFastaLocation(loc);
|
|
19
|
+
} }) }), _jsx("div", { children: _jsx(FileSelector, { inline: true, name: "faiLocation", location: faiLocation, setLocation: loc => {
|
|
20
|
+
setFaiLocation(loc);
|
|
21
|
+
} }) })] }));
|
|
28
22
|
});
|
|
29
23
|
const BgzipFastaAdapterInput = observer(function ({ fastaLocation, faiLocation, gziLocation, setFaiLocation, setGziLocation, setFastaLocation, }) {
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
setFaiLocation(loc);
|
|
38
|
-
} })),
|
|
39
|
-
React.createElement("div", null,
|
|
40
|
-
React.createElement(FileSelector, { inline: true, name: "gziLocation", location: gziLocation, setLocation: loc => {
|
|
41
|
-
setGziLocation(loc);
|
|
42
|
-
} }))));
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { children: _jsx(FileSelector, { inline: true, name: "fastaLocation", location: fastaLocation, setLocation: loc => {
|
|
25
|
+
setFastaLocation(loc);
|
|
26
|
+
} }) }), _jsx("div", { children: _jsx(FileSelector, { inline: true, name: "faiLocation", location: faiLocation, setLocation: loc => {
|
|
27
|
+
setFaiLocation(loc);
|
|
28
|
+
} }) }), _jsx("div", { children: _jsx(FileSelector, { inline: true, name: "gziLocation", location: gziLocation, setLocation: loc => {
|
|
29
|
+
setGziLocation(loc);
|
|
30
|
+
} }) })] }));
|
|
43
31
|
});
|
|
44
32
|
const TwoBitAdapterInput = observer(function ({ twoBitLocation, chromSizesLocation, setTwoBitLocation, setChromSizesLocation, }) {
|
|
45
|
-
return (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
React.createElement("div", null,
|
|
51
|
-
React.createElement(FileSelector, { inline: true, name: "chromSizesLocation (optional, can be added to speed up loading 2bit files with many contigs)", location: chromSizesLocation, setLocation: loc => {
|
|
52
|
-
setChromSizesLocation(loc);
|
|
53
|
-
} }))));
|
|
33
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { children: _jsx(FileSelector, { inline: true, name: "twoBitLocation", location: twoBitLocation, setLocation: loc => {
|
|
34
|
+
setTwoBitLocation(loc);
|
|
35
|
+
} }) }), _jsx("div", { children: _jsx(FileSelector, { inline: true, name: "chromSizesLocation (optional, can be added to speed up loading 2bit files with many contigs)", location: chromSizesLocation, setLocation: loc => {
|
|
36
|
+
setChromSizesLocation(loc);
|
|
37
|
+
} }) })] }));
|
|
54
38
|
});
|
|
55
39
|
const blank = { uri: '' };
|
|
56
40
|
const adapterTypes = [
|
|
@@ -68,65 +52,57 @@ const AssemblyAddForm = observer(function ({ session, onClose, }) {
|
|
|
68
52
|
const [gziLocation, setGziLocation] = useState(blank);
|
|
69
53
|
const [twoBitLocation, setTwoBitLocation] = useState(blank);
|
|
70
54
|
const [chromSizesLocation, setChromSizesLocation] = useState(blank);
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
session.addAssembly({
|
|
95
|
-
name: assemblyName,
|
|
96
|
-
displayName: assemblyDisplayName,
|
|
97
|
-
sequence: {
|
|
98
|
-
type: 'ReferenceSequenceTrack',
|
|
99
|
-
trackId: `${assemblyName}-${performance.now()}`,
|
|
100
|
-
adapter: adapterSelection === 'IndexedFastaAdapter'
|
|
101
|
-
? {
|
|
102
|
-
type: 'IndexedFastaAdapter',
|
|
103
|
-
fastaLocation,
|
|
104
|
-
faiLocation,
|
|
105
|
-
}
|
|
106
|
-
: adapterSelection === 'BgzipFastaAdapter'
|
|
107
|
-
? {
|
|
108
|
-
type: 'BgzipFastaAdapter',
|
|
109
|
-
fastaLocation,
|
|
110
|
-
faiLocation,
|
|
111
|
-
gziLocation,
|
|
112
|
-
}
|
|
113
|
-
: adapterSelection === 'UnindexedFastaAdapter'
|
|
55
|
+
return (_jsxs(_Fragment, { children: [_jsxs(DialogContent, { children: [_jsx(TextField, { id: "assembly-name", label: "Assembly name", helperText: "The assembly name e.g. hg38", variant: "outlined", value: assemblyName, onChange: event => {
|
|
56
|
+
setAssemblyName(event.target.value);
|
|
57
|
+
}, slotProps: {
|
|
58
|
+
htmlInput: { 'data-testid': 'assembly-name' },
|
|
59
|
+
} }), _jsx(TextField, { id: "assembly-name", label: "Assembly display name", helperText: '(optional) A human readable display name for the assembly e.g. "Homo sapiens (hg38)"', variant: "outlined", value: assemblyDisplayName, onChange: event => {
|
|
60
|
+
setAssemblyDisplayName(event.target.value);
|
|
61
|
+
}, slotProps: {
|
|
62
|
+
htmlInput: {
|
|
63
|
+
'data-testid': 'assembly-display-name',
|
|
64
|
+
},
|
|
65
|
+
} }), _jsx(AdapterSelector, { adapterSelection: adapterSelection, adapterTypes: adapterTypes, setAdapterSelection: setAdapterSelection }), adapterSelection === 'IndexedFastaAdapter' ? (_jsx(IndexedFastaAdapterInput, { fastaLocation: fastaLocation, faiLocation: faiLocation, setFaiLocation: setFaiLocation, setFastaLocation: setFastaLocation })) : adapterSelection === 'UnindexedFastaAdapter' ? (_jsx(UnindexedFastaAdapterInput, { fastaLocation: fastaLocation, setFastaLocation: setFastaLocation })) : adapterSelection === 'TwoBitAdapter' ? (_jsx(TwoBitAdapterInput, { twoBitLocation: twoBitLocation, chromSizesLocation: chromSizesLocation, setTwoBitLocation: setTwoBitLocation, setChromSizesLocation: setChromSizesLocation })) : (_jsx(BgzipFastaAdapterInput, { fastaLocation: fastaLocation, gziLocation: gziLocation, faiLocation: faiLocation, setFaiLocation: setFaiLocation, setGziLocation: setGziLocation, setFastaLocation: setFastaLocation }))] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "primary", onClick: () => {
|
|
66
|
+
if (assemblyName === '') {
|
|
67
|
+
session.notify("Can't create an assembly without a name");
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
onClose();
|
|
71
|
+
session.addAssembly({
|
|
72
|
+
name: assemblyName,
|
|
73
|
+
displayName: assemblyDisplayName,
|
|
74
|
+
sequence: {
|
|
75
|
+
type: 'ReferenceSequenceTrack',
|
|
76
|
+
trackId: `${assemblyName}-${performance.now()}`,
|
|
77
|
+
adapter: adapterSelection === 'IndexedFastaAdapter'
|
|
114
78
|
? {
|
|
115
|
-
type: '
|
|
79
|
+
type: 'IndexedFastaAdapter',
|
|
116
80
|
fastaLocation,
|
|
81
|
+
faiLocation,
|
|
117
82
|
}
|
|
118
|
-
:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
83
|
+
: adapterSelection === 'BgzipFastaAdapter'
|
|
84
|
+
? {
|
|
85
|
+
type: 'BgzipFastaAdapter',
|
|
86
|
+
fastaLocation,
|
|
87
|
+
faiLocation,
|
|
88
|
+
gziLocation,
|
|
89
|
+
}
|
|
90
|
+
: adapterSelection === 'UnindexedFastaAdapter'
|
|
91
|
+
? {
|
|
92
|
+
type: 'UnindexedFastaAdapter',
|
|
93
|
+
fastaLocation,
|
|
94
|
+
}
|
|
95
|
+
: {
|
|
96
|
+
type: 'TwoBitAdapter',
|
|
97
|
+
twoBitLocation,
|
|
98
|
+
chromSizesLocation,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
session.notify(`Added "${assemblyName}"`, 'success');
|
|
103
|
+
}
|
|
104
|
+
}, children: "Submit" }), _jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
105
|
+
onClose();
|
|
106
|
+
}, children: "Cancel" })] })] }));
|
|
131
107
|
});
|
|
132
108
|
export default AssemblyAddForm;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
declare const AssemblyEditor: ({ assembly, onClose, }: {
|
|
4
3
|
assembly?: AnyConfigurationModel;
|
|
5
4
|
onClose: () => void;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default AssemblyEditor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConfigurationEditor } from '@jbrowse/plugin-config';
|
|
3
3
|
import { Button, DialogActions, DialogContent } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
@@ -11,12 +11,8 @@ const useStyles = makeStyles()({
|
|
|
11
11
|
});
|
|
12
12
|
const AssemblyEditor = observer(function ({ assembly, onClose, }) {
|
|
13
13
|
const { classes } = useStyles();
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
React.createElement(DialogActions, null,
|
|
18
|
-
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
19
|
-
onClose();
|
|
20
|
-
} }, "Back"))));
|
|
14
|
+
return (_jsxs(_Fragment, { children: [_jsx(DialogContent, { children: _jsx("div", { className: classes.container, children: assembly ? (_jsx(ConfigurationEditor, { model: { target: assembly } })) : (_jsx("div", { children: "No assembly" })) }) }), _jsx(DialogActions, { children: _jsx(Button, { variant: "contained", onClick: () => {
|
|
15
|
+
onClose();
|
|
16
|
+
}, children: "Back" }) })] }));
|
|
21
17
|
});
|
|
22
18
|
export default AssemblyEditor;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AbstractSessionModel } from '@jbrowse/core/util';
|
|
3
2
|
declare const AssemblyManager: ({ session, onClose, }: {
|
|
4
3
|
session: AbstractSessionModel;
|
|
5
4
|
onClose: () => void;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default AssemblyManager;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Dialog } from '@jbrowse/core/ui';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
5
|
import AssemblyAddForm from './AssemblyAddForm';
|
|
@@ -7,18 +8,18 @@ import AssemblyTable from './AssemblyTable';
|
|
|
7
8
|
const AssemblyManager = observer(function ({ session, onClose, }) {
|
|
8
9
|
const [isFormOpen, setFormOpen] = useState(false);
|
|
9
10
|
const [editingAssembly, setEditingAssembly] = useState();
|
|
10
|
-
return (
|
|
11
|
+
return (_jsx(Dialog, { open: true, title: "Assembly manager", onClose: () => {
|
|
11
12
|
onClose();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
}, children: editingAssembly ? (_jsx(AssemblyEditor, { assembly: editingAssembly, onClose: () => {
|
|
14
|
+
setEditingAssembly(undefined);
|
|
15
|
+
} })) : isFormOpen ? (_jsx(AssemblyAddForm, { session: session, onClose: () => {
|
|
16
|
+
setFormOpen(false);
|
|
17
|
+
} })) : (_jsx(AssemblyTable, { session: session, onClose: () => {
|
|
18
|
+
onClose();
|
|
19
|
+
}, onAddAssembly: () => {
|
|
20
|
+
setFormOpen(true);
|
|
21
|
+
}, onEditAssembly: arg => {
|
|
22
|
+
setEditingAssembly(arg);
|
|
23
|
+
} })) }));
|
|
23
24
|
});
|
|
24
25
|
export default AssemblyManager;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
import type { AbstractSessionModel } from '@jbrowse/core/util';
|
|
4
3
|
declare const AssemblyTable: ({ onEditAssembly, onAddAssembly, onClose, session, }: {
|
|
@@ -6,5 +5,5 @@ declare const AssemblyTable: ({ onEditAssembly, onAddAssembly, onClose, session,
|
|
|
6
5
|
onAddAssembly: () => void;
|
|
7
6
|
onClose: () => void;
|
|
8
7
|
session: AbstractSessionModel;
|
|
9
|
-
}) =>
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default AssemblyTable;
|