@jbrowse/plugin-data-management 2.6.3 → 2.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.d.ts +2 -2
- package/dist/AddConnectionWidget/components/AddConnectionWidget.js +17 -8
- package/dist/AddConnectionWidget/components/ConfigureConnection.d.ts +2 -2
- package/dist/AddConnectionWidget/components/ConfigureConnection.js +2 -1
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.d.ts +2 -2
- package/dist/AddConnectionWidget/components/ConnectionTypeSelect.js +5 -3
- package/dist/AddTrackWidget/components/AddTrackWidget.d.ts +3 -4
- package/dist/AddTrackWidget/components/AddTrackWidget.js +3 -3
- package/dist/AddTrackWidget/components/ConfirmTrack.d.ts +2 -2
- package/dist/AddTrackWidget/components/ConfirmTrack.js +3 -2
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +3 -4
- package/dist/AddTrackWidget/components/DefaultAddTrackWorkflow.js +32 -27
- package/dist/AddTrackWidget/components/PasteConfigWorkflow.d.ts +3 -4
- package/dist/AddTrackWidget/components/PasteConfigWorkflow.js +10 -7
- package/dist/AddTrackWidget/components/TrackAdapterSelector.js +1 -1
- package/dist/AddTrackWidget/components/TrackSourceSelect.d.ts +3 -4
- package/dist/AddTrackWidget/components/TrackSourceSelect.js +3 -3
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalFab.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/HierarchicalFab.js +2 -1
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +2 -1
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.d.ts +3 -5
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.js +2 -1
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.d.ts +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.js +5 -8
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.d.ts +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.js +3 -3
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.d.ts +2 -3
- package/dist/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.js +2 -3
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +13 -0
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +72 -0
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +31 -77
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.d.ts +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.js +3 -3
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +5 -3
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +10 -4
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +50 -29
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +4 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.d.ts +3 -4
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +3 -3
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +5 -6
- package/dist/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +2 -2
- package/dist/HierarchicalTrackSelectorWidget/components/util.js +1 -2
- package/dist/HierarchicalTrackSelectorWidget/generateHierarchy.d.ts +2 -2
- package/dist/HierarchicalTrackSelectorWidget/model.js +8 -10
- package/dist/PluginStoreWidget/components/AddCustomPluginDialog.d.ts +2 -2
- package/dist/PluginStoreWidget/components/AddCustomPluginDialog.js +2 -1
- package/dist/PluginStoreWidget/components/InstalledPlugin.d.ts +2 -2
- package/dist/PluginStoreWidget/components/InstalledPlugin.js +8 -4
- package/dist/PluginStoreWidget/components/InstalledPluginsList.d.ts +2 -2
- package/dist/PluginStoreWidget/components/InstalledPluginsList.js +2 -1
- package/dist/PluginStoreWidget/components/PluginCard.d.ts +2 -2
- package/dist/PluginStoreWidget/components/PluginCard.js +2 -1
- package/dist/PluginStoreWidget/components/PluginStoreWidget.d.ts +3 -4
- package/dist/PluginStoreWidget/components/PluginStoreWidget.js +3 -3
- package/dist/index.d.ts +1 -9
- package/dist/index.js +1 -4
- package/dist/ucsc-trackhub/model.js +2 -2
- package/esm/AddConnectionWidget/components/AddConnectionWidget.d.ts +2 -2
- package/esm/AddConnectionWidget/components/AddConnectionWidget.js +19 -10
- package/esm/AddConnectionWidget/components/ConfigureConnection.d.ts +2 -2
- package/esm/AddConnectionWidget/components/ConfigureConnection.js +2 -1
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.d.ts +2 -2
- package/esm/AddConnectionWidget/components/ConnectionTypeSelect.js +5 -3
- package/esm/AddTrackWidget/components/AddTrackWidget.d.ts +3 -4
- package/esm/AddTrackWidget/components/AddTrackWidget.js +3 -3
- package/esm/AddTrackWidget/components/ConfirmTrack.d.ts +2 -2
- package/esm/AddTrackWidget/components/ConfirmTrack.js +4 -3
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.d.ts +3 -4
- package/esm/AddTrackWidget/components/DefaultAddTrackWorkflow.js +33 -28
- package/esm/AddTrackWidget/components/PasteConfigWorkflow.d.ts +3 -4
- package/esm/AddTrackWidget/components/PasteConfigWorkflow.js +11 -8
- package/esm/AddTrackWidget/components/TrackAdapterSelector.js +1 -1
- package/esm/AddTrackWidget/components/TrackSourceSelect.d.ts +3 -4
- package/esm/AddTrackWidget/components/TrackSourceSelect.js +3 -3
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalFab.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/HierarchicalFab.js +2 -1
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/ShoppingCart.js +2 -1
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.d.ts +3 -5
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/CloseConnectionDialog.js +2 -1
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.d.ts +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/DeleteConnectionDialog.js +6 -9
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.d.ts +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ManageConnectionsDialog.js +3 -3
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.d.ts +2 -3
- package/esm/HierarchicalTrackSelectorWidget/components/dialogs/ToggleConnectionsDialog.js +3 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.d.ts +13 -0
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilter.js +43 -0
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetFilters.js +31 -54
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.d.ts +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedDialog.js +3 -3
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.d.ts +5 -3
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedHeader.js +10 -4
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/faceted/FacetedSelector.js +50 -29
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HamburgerMenu.js +4 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.d.ts +3 -4
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalHeader.js +3 -3
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/components/tree/HierarchicalTree.js +5 -6
- package/esm/HierarchicalTrackSelectorWidget/components/tree/TrackLabel.js +1 -1
- package/esm/HierarchicalTrackSelectorWidget/components/util.js +1 -2
- package/esm/HierarchicalTrackSelectorWidget/generateHierarchy.d.ts +2 -2
- package/esm/HierarchicalTrackSelectorWidget/model.js +8 -10
- package/esm/PluginStoreWidget/components/AddCustomPluginDialog.d.ts +2 -2
- package/esm/PluginStoreWidget/components/AddCustomPluginDialog.js +2 -1
- package/esm/PluginStoreWidget/components/InstalledPlugin.d.ts +2 -2
- package/esm/PluginStoreWidget/components/InstalledPlugin.js +8 -4
- package/esm/PluginStoreWidget/components/InstalledPluginsList.d.ts +2 -2
- package/esm/PluginStoreWidget/components/InstalledPluginsList.js +2 -1
- package/esm/PluginStoreWidget/components/PluginCard.d.ts +2 -2
- package/esm/PluginStoreWidget/components/PluginCard.js +2 -1
- package/esm/PluginStoreWidget/components/PluginStoreWidget.d.ts +3 -4
- package/esm/PluginStoreWidget/components/PluginStoreWidget.js +3 -3
- package/esm/index.d.ts +1 -9
- package/esm/index.js +1 -3
- package/esm/ucsc-trackhub/model.js +2 -2
- package/package.json +5 -4
- package/dist/SetDefaultSession/SetDefaultSession.d.ts +0 -6
- package/dist/SetDefaultSession/SetDefaultSession.js +0 -38
- package/dist/SetDefaultSession/index.d.ts +0 -1
- package/dist/SetDefaultSession/index.js +0 -8
- package/esm/SetDefaultSession/SetDefaultSession.d.ts +0 -6
- package/esm/SetDefaultSession/SetDefaultSession.js +0 -33
- package/esm/SetDefaultSession/index.d.ts +0 -1
- package/esm/SetDefaultSession/index.js +0 -1
|
@@ -9,9 +9,11 @@ import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
|
9
9
|
import { ResizeHandle } from '@jbrowse/core/ui';
|
|
10
10
|
import SanitizedHTML from '@jbrowse/core/ui/SanitizedHTML';
|
|
11
11
|
import JBrowseMenu from '@jbrowse/core/ui/Menu';
|
|
12
|
-
import ResizeBar
|
|
13
|
-
import { getEnv, getSession, measureGridWidth, useDebounce, } from '@jbrowse/core/util';
|
|
12
|
+
import ResizeBar from '@jbrowse/core/ui/ResizeBar';
|
|
13
|
+
import { getEnv, getSession, measureGridWidth, useDebounce, useLocalStorage, } from '@jbrowse/core/util';
|
|
14
14
|
import { readConfObject, } from '@jbrowse/core/configuration';
|
|
15
|
+
import { useResizeBar } from '@jbrowse/core/ui/useResizeBar';
|
|
16
|
+
import { makeStyles } from 'tss-react/mui';
|
|
15
17
|
// icons
|
|
16
18
|
import MoreHoriz from '@mui/icons-material/MoreHoriz';
|
|
17
19
|
import { matches } from '../../util';
|
|
@@ -19,24 +21,31 @@ import FacetedHeader from './FacetedHeader';
|
|
|
19
21
|
import FacetFilters from './FacetFilters';
|
|
20
22
|
import { getRootKeys } from './util';
|
|
21
23
|
const nonMetadataKeys = ['category', 'adapter', 'description'];
|
|
24
|
+
const useStyles = makeStyles()({
|
|
25
|
+
cell: {
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
overflow: 'hidden',
|
|
28
|
+
textOverflow: 'ellipsis',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
22
31
|
const frac = 0.75;
|
|
23
|
-
|
|
32
|
+
const FacetedSelector = observer(function FacetedSelector({ model, }) {
|
|
24
33
|
var _a, _b;
|
|
34
|
+
const { classes } = useStyles();
|
|
25
35
|
const { view, selection } = model;
|
|
26
36
|
const { pluginManager } = getEnv(model);
|
|
27
37
|
const { ref, scrollLeft } = useResizeBar();
|
|
28
38
|
const [filterText, setFilterText] = useState('');
|
|
29
|
-
const [showOptions, setShowOptions] =
|
|
39
|
+
const [showOptions, setShowOptions] = useLocalStorage('facet-showTableOptions', false);
|
|
30
40
|
const [info, setInfo] = useState();
|
|
31
41
|
const [useShoppingCart, setUseShoppingCart] = useState(false);
|
|
32
|
-
const [
|
|
33
|
-
const [
|
|
42
|
+
const [showSparse, setShowSparse] = useLocalStorage('facet-showSparse', false);
|
|
43
|
+
const [showFilters, setShowFilters] = useLocalStorage('facet-showFilters', true);
|
|
44
|
+
const [panelWidth, setPanelWidth] = useLocalStorage('facet-panelWidth', 400);
|
|
34
45
|
const session = getSession(model);
|
|
35
46
|
const filterDebounced = useDebounce(filterText, 400);
|
|
36
47
|
const tracks = view.tracks;
|
|
37
|
-
const [filters, dispatch] = useReducer((state, update) => {
|
|
38
|
-
return { ...state, [update.key]: update.val };
|
|
39
|
-
}, {});
|
|
48
|
+
const [filters, dispatch] = useReducer((state, update) => ({ ...state, [update.key]: update.val }), {});
|
|
40
49
|
const rows = useMemo(() => {
|
|
41
50
|
// metadata is spread onto the object for easier access and sorting
|
|
42
51
|
// by the mui data grid (it's unable to sort by nested objects)
|
|
@@ -57,10 +66,10 @@ export default observer(function FacetedSelector({ model, }) {
|
|
|
57
66
|
};
|
|
58
67
|
});
|
|
59
68
|
}, [model, filterDebounced, session]);
|
|
60
|
-
const filteredNonMetadataKeys = useMemo(() => nonMetadataKeys.filter(f =>
|
|
61
|
-
const filteredMetadataKeys = useMemo(() => [...new Set(rows.flatMap(row => getRootKeys(row.metadata)))].filter(f =>
|
|
69
|
+
const filteredNonMetadataKeys = useMemo(() => nonMetadataKeys.filter(f => showSparse ? true : rows.map(r => r[f]).filter(f => !!f).length > 5), [showSparse, rows]);
|
|
70
|
+
const filteredMetadataKeys = useMemo(() => [...new Set(rows.flatMap(row => getRootKeys(row.metadata)))].filter(f => showSparse
|
|
62
71
|
? true
|
|
63
|
-
: rows.map(r => r.metadata[f]).filter(f => !!f).length > 5), [
|
|
72
|
+
: rows.map(r => r.metadata[f]).filter(f => !!f).length > 5), [showSparse, rows]);
|
|
64
73
|
const fields = useMemo(() => ['name', ...filteredNonMetadataKeys, ...filteredMetadataKeys], [filteredNonMetadataKeys, filteredMetadataKeys]);
|
|
65
74
|
const [widths, setWidths] = useState({
|
|
66
75
|
name: measureGridWidth(rows.map(r => r.name), { maxWidth: 500, stripHTML: true }) + 15,
|
|
@@ -96,15 +105,15 @@ export default observer(function FacetedSelector({ model, }) {
|
|
|
96
105
|
measureGridWidth(rows.map(r => r.metadata[e]), { stripHTML: true, maxWidth: 400 }),
|
|
97
106
|
])),
|
|
98
107
|
}));
|
|
99
|
-
}, [filteredMetadataKeys, visible, filteredNonMetadataKeys,
|
|
100
|
-
const widthsDebounced = useDebounce(widths,
|
|
108
|
+
}, [filteredMetadataKeys, visible, filteredNonMetadataKeys, showSparse, rows]);
|
|
109
|
+
const widthsDebounced = useDebounce(widths, 200);
|
|
101
110
|
const columns = [
|
|
102
111
|
{
|
|
103
112
|
field: 'name',
|
|
104
113
|
hideable: false,
|
|
105
114
|
renderCell: (params) => {
|
|
106
115
|
const { value, id, row } = params;
|
|
107
|
-
return (React.createElement(
|
|
116
|
+
return (React.createElement("div", { className: classes.cell },
|
|
108
117
|
React.createElement(SanitizedHTML, { html: value }),
|
|
109
118
|
React.createElement(IconButton, { onClick: e => setInfo({
|
|
110
119
|
target: e.currentTarget,
|
|
@@ -122,7 +131,7 @@ export default observer(function FacetedSelector({ model, }) {
|
|
|
122
131
|
width: (_a = widthsDebounced[e]) !== null && _a !== void 0 ? _a : 100,
|
|
123
132
|
renderCell: (params) => {
|
|
124
133
|
const { value } = params;
|
|
125
|
-
return value ? React.createElement(SanitizedHTML, { html: value }) : '';
|
|
134
|
+
return (React.createElement("div", { className: classes.cell }, value ? React.createElement(SanitizedHTML, { html: value }) : ''));
|
|
126
135
|
},
|
|
127
136
|
});
|
|
128
137
|
}),
|
|
@@ -133,19 +142,22 @@ export default observer(function FacetedSelector({ model, }) {
|
|
|
133
142
|
width: (_a = widthsDebounced[e]) !== null && _a !== void 0 ? _a : 100,
|
|
134
143
|
renderCell: (params) => {
|
|
135
144
|
const { value } = params;
|
|
136
|
-
return value ? React.createElement(SanitizedHTML, { html: value }) : '';
|
|
145
|
+
return (React.createElement("div", { className: classes.cell }, value ? React.createElement(SanitizedHTML, { html: value }) : ''));
|
|
137
146
|
},
|
|
138
147
|
});
|
|
139
148
|
}),
|
|
140
149
|
];
|
|
141
|
-
const shownTrackIds = tracks.map(t => t.configuration.trackId);
|
|
142
|
-
const arrFilters = Object.entries(filters)
|
|
150
|
+
const shownTrackIds = new Set(tracks.map(t => t.configuration.trackId));
|
|
151
|
+
const arrFilters = Object.entries(filters)
|
|
152
|
+
.filter(f => f[1].length > 0)
|
|
153
|
+
.map(([key, val]) => [key, new Set(val)]);
|
|
154
|
+
const filteredRows = rows.filter(row => arrFilters.every(([key, val]) => val.has(row[key])));
|
|
143
155
|
return (React.createElement(React.Fragment, null,
|
|
144
156
|
info ? (React.createElement(JBrowseMenu, { anchorEl: info === null || info === void 0 ? void 0 : info.target, menuItems: ((_b = session.getTrackActionMenuItems) === null || _b === void 0 ? void 0 : _b.call(session, info.conf)) || [], onMenuItemClick: (_event, callback) => {
|
|
145
157
|
callback();
|
|
146
158
|
setInfo(undefined);
|
|
147
159
|
}, open: !!info, onClose: () => setInfo(undefined) })) : null,
|
|
148
|
-
React.createElement(FacetedHeader, {
|
|
160
|
+
React.createElement(FacetedHeader, { setShowSparse: setShowSparse, setShowFilters: setShowFilters, setShowOptions: setShowOptions, setFilterText: setFilterText, setUseShoppingCart: setUseShoppingCart, showFilters: showFilters, showSparse: showSparse, showOptions: showOptions, filterText: filterText, useShoppingCart: useShoppingCart, model: model }),
|
|
149
161
|
React.createElement("div", { ref: ref, style: {
|
|
150
162
|
display: 'flex',
|
|
151
163
|
overflow: 'hidden',
|
|
@@ -154,21 +166,22 @@ export default observer(function FacetedSelector({ model, }) {
|
|
|
154
166
|
} },
|
|
155
167
|
React.createElement("div", { style: {
|
|
156
168
|
height: window.innerHeight * frac,
|
|
157
|
-
width: window.innerWidth * frac - panelWidth,
|
|
169
|
+
width: window.innerWidth * frac - (showFilters ? panelWidth : 0),
|
|
158
170
|
} },
|
|
159
171
|
React.createElement(ResizeBar, { checkbox: true, widths: Object.values(widths).map(f => f !== null && f !== void 0 ? f : 100), setWidths: newWidths => setWidths(Object.fromEntries(Object.entries(widths).map((entry, idx) => [
|
|
160
172
|
entry[0],
|
|
161
173
|
newWidths[idx],
|
|
162
174
|
]))), scrollLeft: scrollLeft }),
|
|
163
|
-
React.createElement(DataGrid, { rows:
|
|
175
|
+
React.createElement(DataGrid, { rows: filteredRows, columnVisibilityModel: visible, onColumnVisibilityModelChange: newModel => setVisible(newModel), columnHeaderHeight: 35, checkboxSelection: true, disableRowSelectionOnClick: true, keepNonExistentRowsSelected: true, onRowSelectionModelChange: userSelectedIds => {
|
|
164
176
|
if (!useShoppingCart) {
|
|
165
177
|
const a1 = shownTrackIds;
|
|
166
|
-
const a2 = userSelectedIds;
|
|
178
|
+
const a2 = new Set(userSelectedIds);
|
|
167
179
|
// synchronize the user selection with the view
|
|
168
180
|
// see share https://stackoverflow.com/a/33034768/2129219
|
|
169
181
|
transaction(() => {
|
|
170
|
-
|
|
171
|
-
|
|
182
|
+
;
|
|
183
|
+
[...a1].filter(x => !a2.has(x)).map(t => view.hideTrack(t));
|
|
184
|
+
[...a2].filter(x => !a1.has(x)).map(t => view.showTrack(t));
|
|
172
185
|
});
|
|
173
186
|
}
|
|
174
187
|
else {
|
|
@@ -177,10 +190,18 @@ export default observer(function FacetedSelector({ model, }) {
|
|
|
177
190
|
const tracks = userSelectedIds.map(id => resolveIdentifier(schema, root, id));
|
|
178
191
|
model.setSelection(tracks);
|
|
179
192
|
}
|
|
180
|
-
}, rowSelectionModel: useShoppingCart
|
|
193
|
+
}, rowSelectionModel: useShoppingCart
|
|
194
|
+
? selection.map(s => s.trackId)
|
|
195
|
+
: [...shownTrackIds], slots: { toolbar: showOptions ? GridToolbar : null }, slotProps: {
|
|
181
196
|
toolbar: { printOptions: { disableToolbarButton: true } },
|
|
182
197
|
}, columns: columns, rowHeight: 25 })),
|
|
183
|
-
React.createElement(
|
|
184
|
-
|
|
185
|
-
React.createElement(
|
|
198
|
+
showFilters ? (React.createElement(React.Fragment, null,
|
|
199
|
+
React.createElement(ResizeHandle, { vertical: true, onDrag: dist => setPanelWidth(panelWidth - dist), style: { marginLeft: 5, background: 'grey', width: 5 } }),
|
|
200
|
+
React.createElement("div", { style: {
|
|
201
|
+
width: panelWidth,
|
|
202
|
+
overflowY: 'auto',
|
|
203
|
+
overflowX: 'hidden',
|
|
204
|
+
} },
|
|
205
|
+
React.createElement(FacetFilters, { width: panelWidth - 10, rows: rows, columns: columns, dispatch: dispatch, filters: filters })))) : null)));
|
|
186
206
|
});
|
|
207
|
+
export default FacetedSelector;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HierarchicalTrackSelectorModel } from '../../model';
|
|
3
|
-
declare const
|
|
3
|
+
declare const HamburgerMenu: ({ model, }: {
|
|
4
4
|
model: HierarchicalTrackSelectorModel;
|
|
5
5
|
}) => React.JSX.Element;
|
|
6
|
-
export default
|
|
6
|
+
export default HamburgerMenu;
|
|
@@ -10,15 +10,16 @@ const CloseConnectionDlg = lazy(() => import('../dialogs/CloseConnectionDialog')
|
|
|
10
10
|
const DeleteConnectionDlg = lazy(() => import('../dialogs/DeleteConnectionDialog'));
|
|
11
11
|
const ManageConnectionsDlg = lazy(() => import('../dialogs/ManageConnectionsDialog'));
|
|
12
12
|
const ToggleConnectionsDlg = lazy(() => import('../dialogs/ToggleConnectionsDialog'));
|
|
13
|
-
|
|
13
|
+
const HamburgerMenu = observer(function ({ model, }) {
|
|
14
14
|
const session = getSession(model);
|
|
15
15
|
const [modalInfo, setModalInfo] = useState();
|
|
16
16
|
const [deleteDlgDetails, setDeleteDlgDetails] = useState();
|
|
17
17
|
const [connectionToggleOpen, setConnectionToggleOpen] = useState(false);
|
|
18
18
|
const [connectionManagerOpen, setConnectionManagerOpen] = useState(false);
|
|
19
19
|
function breakConnection(connectionConf, deletingConnection) {
|
|
20
|
+
var _a;
|
|
20
21
|
const name = readConfObject(connectionConf, 'name');
|
|
21
|
-
const result = session.prepareToBreakConnection(connectionConf);
|
|
22
|
+
const result = (_a = session.prepareToBreakConnection) === null || _a === void 0 ? void 0 : _a.call(session, connectionConf);
|
|
22
23
|
if (result) {
|
|
23
24
|
const [safelyBreakConnection, dereferenceTypeCount] = result;
|
|
24
25
|
if (Object.keys(dereferenceTypeCount).length > 0) {
|
|
@@ -115,3 +116,4 @@ export default observer(function HamburgerMenu({ model, }) {
|
|
|
115
116
|
connectionManagerOpen ? (React.createElement(ManageConnectionsDlg, { handleClose: () => setConnectionManagerOpen(false), breakConnection: breakConnection, session: session })) : null,
|
|
116
117
|
connectionToggleOpen ? (React.createElement(ToggleConnectionsDlg, { handleClose: () => setConnectionToggleOpen(false), session: session, breakConnection: breakConnection })) : null)));
|
|
117
118
|
});
|
|
119
|
+
export default HamburgerMenu;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HierarchicalTrackSelectorModel } from '../../model';
|
|
3
|
-
declare
|
|
3
|
+
declare const HierarchicalTrackSelectorHeader: ({ model, setHeaderHeight, }: {
|
|
4
4
|
model: HierarchicalTrackSelectorModel;
|
|
5
5
|
setHeaderHeight: (n: number) => void;
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
export default _default;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
export default HierarchicalTrackSelectorHeader;
|
|
@@ -26,7 +26,7 @@ const SearchTracksTextField = observer(function ({ model, }) {
|
|
|
26
26
|
React.createElement(ClearIcon, null)))),
|
|
27
27
|
} }));
|
|
28
28
|
});
|
|
29
|
-
|
|
29
|
+
const HierarchicalTrackSelectorHeader = observer(function ({ model, setHeaderHeight, }) {
|
|
30
30
|
const { classes } = useStyles();
|
|
31
31
|
const [facetedOpen, setFacetedOpen] = useState(false);
|
|
32
32
|
return (React.createElement("div", { ref: ref => setHeaderHeight((ref === null || ref === void 0 ? void 0 : ref.getBoundingClientRect().height) || 0), "data-testid": "hierarchical_track_selector" },
|
|
@@ -36,5 +36,5 @@ function HierarchicalTrackSelectorHeader({ model, setHeaderHeight, }) {
|
|
|
36
36
|
React.createElement(SearchTracksTextField, { model: model }),
|
|
37
37
|
React.createElement(Button, { className: classes.menuIcon, onClick: () => setFacetedOpen(true) }, "Open faceted selector")),
|
|
38
38
|
React.createElement(Suspense, { fallback: React.createElement("div", null) }, facetedOpen ? (React.createElement(FacetedDialog, { handleClose: () => setFacetedOpen(false), model: model })) : null)));
|
|
39
|
-
}
|
|
40
|
-
export default
|
|
39
|
+
});
|
|
40
|
+
export default HierarchicalTrackSelectorHeader;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TreeNode } from '../../generateHierarchy';
|
|
3
3
|
import { HierarchicalTrackSelectorModel } from '../../model';
|
|
4
|
-
declare const
|
|
4
|
+
declare const HierarchicalTree: ({ height, tree, model, }: {
|
|
5
5
|
height: number;
|
|
6
6
|
tree: TreeNode;
|
|
7
7
|
model: HierarchicalTrackSelectorModel;
|
|
8
8
|
}) => React.JSX.Element;
|
|
9
|
-
export default
|
|
9
|
+
export default HierarchicalTree;
|
|
@@ -23,7 +23,7 @@ function getNodeData(node, nestingLevel, extra, selection) {
|
|
|
23
23
|
// this is the main tree component for the hierarchical track selector in note:
|
|
24
24
|
// in jbrowse-web the toolbar is position="sticky" which means the autosizer
|
|
25
25
|
// includes the height of the toolbar, so we subtract the given offsets
|
|
26
|
-
|
|
26
|
+
const HierarchicalTree = observer(function HierarchicalTree({ height, tree, model, }) {
|
|
27
27
|
const { filterText, selection, view } = model;
|
|
28
28
|
const treeRef = useRef(null);
|
|
29
29
|
const session = getSession(model);
|
|
@@ -37,15 +37,13 @@ export default observer(function HierarchicalTree({ height, tree, model, }) {
|
|
|
37
37
|
drawerPosition,
|
|
38
38
|
}), [view, model, drawerPosition, tree]);
|
|
39
39
|
const treeWalker = useCallback(function* treeWalker() {
|
|
40
|
-
for (
|
|
41
|
-
|
|
42
|
-
yield getNodeData(r, 0, extra, obj);
|
|
40
|
+
for (const child of tree.children) {
|
|
41
|
+
yield getNodeData(child, 0, extra, obj);
|
|
43
42
|
}
|
|
44
43
|
while (true) {
|
|
45
44
|
// @ts-expect-error
|
|
46
45
|
const parentMeta = yield;
|
|
47
|
-
for (
|
|
48
|
-
const curr = parentMeta.node.children[i];
|
|
46
|
+
for (const curr of parentMeta.node.children) {
|
|
49
47
|
yield getNodeData(curr, parentMeta.nestingLevel + 1, extra, obj);
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -60,3 +58,4 @@ export default observer(function HierarchicalTree({ height, tree, model, }) {
|
|
|
60
58
|
return (React.createElement(React.Fragment, null,
|
|
61
59
|
React.createElement(VariableSizeTree, { ref: treeRef, treeWalker: treeWalker, height: height }, Node)));
|
|
62
60
|
});
|
|
61
|
+
export default HierarchicalTree;
|
|
@@ -3,12 +3,12 @@ import { Checkbox, FormControlLabel, IconButton, Tooltip } from '@mui/material';
|
|
|
3
3
|
import { makeStyles } from 'tss-react/mui';
|
|
4
4
|
import JBrowseMenu from '@jbrowse/core/ui/Menu';
|
|
5
5
|
import { getSession } from '@jbrowse/core/util';
|
|
6
|
+
import SanitizedHTML from '@jbrowse/core/ui/SanitizedHTML';
|
|
6
7
|
import { readConfObject, } from '@jbrowse/core/configuration';
|
|
7
8
|
// icons
|
|
8
9
|
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
|
9
10
|
// locals
|
|
10
11
|
import { isUnsupported } from '../util';
|
|
11
|
-
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
12
12
|
const useStyles = makeStyles()(theme => ({
|
|
13
13
|
compactCheckbox: {
|
|
14
14
|
padding: 0,
|
|
@@ -6,8 +6,7 @@ export function treeToMap(tree, map = new Map()) {
|
|
|
6
6
|
if (tree.id && tree.children.length) {
|
|
7
7
|
map.set(tree.id, tree);
|
|
8
8
|
}
|
|
9
|
-
for (
|
|
10
|
-
const node = tree.children[i];
|
|
9
|
+
for (const node of tree.children) {
|
|
11
10
|
treeToMap(node, map);
|
|
12
11
|
}
|
|
13
12
|
return map;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
-
export
|
|
2
|
+
export interface TreeNode {
|
|
3
3
|
name: string;
|
|
4
4
|
id: string;
|
|
5
5
|
conf?: AnyConfigurationModel;
|
|
6
6
|
checked?: boolean;
|
|
7
7
|
isOpenByDefault?: boolean;
|
|
8
8
|
children: TreeNode[];
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
export declare function generateHierarchy(model: {
|
|
11
11
|
filterText: string;
|
|
12
12
|
activeSortTrackNames: boolean;
|
|
@@ -260,21 +260,19 @@ export default function stateTreeFactory(pluginManager) {
|
|
|
260
260
|
])) {
|
|
261
261
|
self.collapseTopLevelCategories();
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
if (getConf(session, [
|
|
264
264
|
'hierarchical',
|
|
265
265
|
'defaultCollapsed',
|
|
266
266
|
'subCategories',
|
|
267
267
|
])) {
|
|
268
268
|
self.collapseSubCategories();
|
|
269
269
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
self.collapsed.set(entry, true);
|
|
277
|
-
}
|
|
270
|
+
for (const entry of getConf(session, [
|
|
271
|
+
'hierarchical',
|
|
272
|
+
'defaultCollapsed',
|
|
273
|
+
'categoryNames',
|
|
274
|
+
])) {
|
|
275
|
+
self.collapsed.set(entry, true);
|
|
278
276
|
}
|
|
279
277
|
self.initialized = true;
|
|
280
278
|
}
|
|
@@ -282,7 +280,7 @@ export default function stateTreeFactory(pluginManager) {
|
|
|
282
280
|
}))
|
|
283
281
|
.views(self => ({
|
|
284
282
|
get hasAnySubcategories() {
|
|
285
|
-
return self.allTracks.some(group => group.tracks.some(
|
|
283
|
+
return self.allTracks.some(group => group.tracks.some(t => { var _a; return ((_a = readConfObject(t, 'category')) === null || _a === void 0 ? void 0 : _a.length) > 1; }));
|
|
286
284
|
},
|
|
287
285
|
}));
|
|
288
286
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PluginStoreModel } from '../model';
|
|
3
|
-
declare const
|
|
3
|
+
declare const AddCustomPluginDialog: ({ onClose, model, }: {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
model: PluginStoreModel;
|
|
6
6
|
}) => React.JSX.Element;
|
|
7
|
-
export default
|
|
7
|
+
export default AddCustomPluginDialog;
|
|
@@ -23,7 +23,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
23
23
|
transform: 'rotate(180deg)',
|
|
24
24
|
},
|
|
25
25
|
}));
|
|
26
|
-
|
|
26
|
+
const AddCustomPluginDialog = observer(function ({ onClose, model, }) {
|
|
27
27
|
const { classes, cx } = useStyles();
|
|
28
28
|
const [umdPluginName, setUMDPluginName] = useState('');
|
|
29
29
|
const [umdPluginUrl, setUMDPluginUrl] = useState('');
|
|
@@ -64,3 +64,4 @@ export default observer(function ({ onClose, model, }) {
|
|
|
64
64
|
React.createElement(Button, { variant: "contained", onClick: onClose }, "Cancel"),
|
|
65
65
|
React.createElement(Button, { variant: "contained", color: "primary", onClick: handleSubmit, disabled: !ready }, "Submit")))));
|
|
66
66
|
});
|
|
67
|
+
export default AddCustomPluginDialog;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BasePlugin } from '@jbrowse/core/util/types';
|
|
3
3
|
import { PluginStoreModel } from '../model';
|
|
4
|
-
declare const
|
|
4
|
+
declare const InstalledPlugin: ({ plugin, model, }: {
|
|
5
5
|
plugin: BasePlugin;
|
|
6
6
|
model: PluginStoreModel;
|
|
7
7
|
}) => React.JSX.Element;
|
|
8
|
-
export default
|
|
8
|
+
export default InstalledPlugin;
|
|
@@ -18,12 +18,15 @@ function LockedPlugin() {
|
|
|
18
18
|
return (React.createElement(Tooltip, { className: classes.lockedPluginTooltip, title: "This plugin was installed by an administrator, you cannot remove it." },
|
|
19
19
|
React.createElement(LockIcon, null)));
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
const InstalledPlugin = observer(function ({ plugin, model, }) {
|
|
22
|
+
var _a;
|
|
22
23
|
const [dialogPlugin, setDialogPlugin] = useState();
|
|
23
24
|
const { pluginManager } = getEnv(model);
|
|
24
25
|
const session = getSession(model);
|
|
25
|
-
const { jbrowse, adminMode
|
|
26
|
-
const isSessionPlugin =
|
|
26
|
+
const { jbrowse, adminMode } = session;
|
|
27
|
+
const isSessionPlugin = isSessionWithSessionPlugins(session)
|
|
28
|
+
? (_a = session.sessionPlugins) === null || _a === void 0 ? void 0 : _a.some(p => pluginManager.pluginMetadata[plugin.name].url === p.url)
|
|
29
|
+
: false;
|
|
27
30
|
return (React.createElement(React.Fragment, null,
|
|
28
31
|
dialogPlugin ? (React.createElement(Suspense, { fallback: React.createElement(React.Fragment, null) },
|
|
29
32
|
React.createElement(DeletePluginDialog, { plugin: dialogPlugin, onClose: name => {
|
|
@@ -39,7 +42,8 @@ export default observer(function ({ plugin, model, }) {
|
|
|
39
42
|
setDialogPlugin(undefined);
|
|
40
43
|
} }))) : null,
|
|
41
44
|
React.createElement(ListItem, { key: plugin.name },
|
|
42
|
-
adminMode || isSessionPlugin ? (React.createElement(IconButton, { "
|
|
45
|
+
adminMode || isSessionPlugin ? (React.createElement(IconButton, { "data-testid": `removePlugin-${plugin.name}`, onClick: () => setDialogPlugin(plugin.name) },
|
|
43
46
|
React.createElement(CloseIcon, null))) : (React.createElement(LockedPlugin, null)),
|
|
44
47
|
React.createElement(Typography, null, plugin.name))));
|
|
45
48
|
});
|
|
49
|
+
export default InstalledPlugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
import { PluginStoreModel } from '../model';
|
|
4
|
-
declare const
|
|
4
|
+
declare const InstalledPluginsList: ({ pluginManager, model, }: {
|
|
5
5
|
pluginManager: PluginManager;
|
|
6
6
|
model: PluginStoreModel;
|
|
7
7
|
}) => React.JSX.Element;
|
|
8
|
-
export default
|
|
8
|
+
export default InstalledPluginsList;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
3
|
import { List, Typography } from '@mui/material';
|
|
4
4
|
import InstalledPlugin from './InstalledPlugin';
|
|
5
|
-
|
|
5
|
+
const InstalledPluginsList = observer(function InstalledPluginsList({ pluginManager, model, }) {
|
|
6
6
|
const { plugins } = pluginManager;
|
|
7
7
|
const { filterText } = model;
|
|
8
8
|
const externalPlugins = plugins.filter(p => { var _a; return !((_a = pluginManager.pluginMetadata[p.name]) === null || _a === void 0 ? void 0 : _a.isCore); });
|
|
@@ -10,3 +10,4 @@ export default observer(function InstalledPluginsList({ pluginManager, model, })
|
|
|
10
10
|
.filter(p => p.name.toLowerCase().includes(filterText.toLowerCase()))
|
|
11
11
|
.map(p => React.createElement(InstalledPlugin, { key: p.name, plugin: p, model: model }))) : (React.createElement(Typography, null, "No plugins currently installed"))));
|
|
12
12
|
});
|
|
13
|
+
export default InstalledPluginsList;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { JBrowsePlugin } from '@jbrowse/core/util/types';
|
|
3
3
|
import { PluginStoreModel } from '../model';
|
|
4
|
-
declare const
|
|
4
|
+
declare const PluginCard: ({ plugin, model, adminMode, }: {
|
|
5
5
|
plugin: JBrowsePlugin;
|
|
6
6
|
model: PluginStoreModel;
|
|
7
7
|
adminMode: boolean;
|
|
8
8
|
}) => React.JSX.Element;
|
|
9
|
-
export default
|
|
9
|
+
export default PluginCard;
|
|
@@ -25,7 +25,7 @@ const useStyles = makeStyles()({
|
|
|
25
25
|
alignItems: 'center',
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
const PluginCard = observer(function PluginCard({ plugin, model, adminMode, }) {
|
|
29
29
|
const { classes } = useStyles();
|
|
30
30
|
const session = getSession(model);
|
|
31
31
|
const { pluginManager } = getEnv(model);
|
|
@@ -56,3 +56,4 @@ export default observer(function PluginCard({ plugin, model, adminMode, }) {
|
|
|
56
56
|
setTempDisabled(true);
|
|
57
57
|
} }, isInstalled ? 'Installed' : 'Install'))));
|
|
58
58
|
});
|
|
59
|
+
export default PluginCard;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PluginStoreModel } from '../model';
|
|
3
|
-
declare
|
|
3
|
+
declare const PluginStoreWidget: ({ model, }: {
|
|
4
4
|
model: PluginStoreModel;
|
|
5
|
-
})
|
|
6
|
-
|
|
7
|
-
export default _default;
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
|
+
export default PluginStoreWidget;
|
|
@@ -31,7 +31,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
31
31
|
display: 'flex',
|
|
32
32
|
},
|
|
33
33
|
}));
|
|
34
|
-
|
|
34
|
+
const PluginStoreWidget = observer(function ({ model, }) {
|
|
35
35
|
const { classes } = useStyles();
|
|
36
36
|
const { plugins, error } = useFetchPlugins();
|
|
37
37
|
const [open, setOpen] = useState(false);
|
|
@@ -70,5 +70,5 @@ function PluginStoreWidget({ model }) {
|
|
|
70
70
|
.includes(model.filterText.toLowerCase()));
|
|
71
71
|
})
|
|
72
72
|
.map(plugin => (React.createElement(PluginCard, { key: plugin.name, plugin: plugin, model: model, adminMode: !!adminMode })))) : (React.createElement(LoadingEllipses, null)))));
|
|
73
|
-
}
|
|
74
|
-
export default
|
|
73
|
+
});
|
|
74
|
+
export default PluginStoreWidget;
|
package/esm/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import Plugin from '@jbrowse/core/Plugin';
|
|
3
3
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
4
|
-
declare const SetDefaultSession: import("react").LazyExoticComponent<({ rootModel, onClose }: {
|
|
5
|
-
rootModel?: unknown;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
}) => import("react").JSX.Element | null>;
|
|
8
4
|
declare const AssemblyManager: import("react").LazyExoticComponent<({ rootModel, onClose, }: {
|
|
9
5
|
rootModel: any;
|
|
10
6
|
onClose: (arg: boolean) => void;
|
|
@@ -16,14 +12,10 @@ export default class extends Plugin {
|
|
|
16
12
|
rootModel: any;
|
|
17
13
|
onClose: (arg: boolean) => void;
|
|
18
14
|
}) => import("react").JSX.Element>;
|
|
19
|
-
SetDefaultSession: import("react").LazyExoticComponent<({ rootModel, onClose }: {
|
|
20
|
-
rootModel?: unknown;
|
|
21
|
-
onClose: () => void;
|
|
22
|
-
}) => import("react").JSX.Element | null>;
|
|
23
15
|
};
|
|
24
16
|
install(pluginManager: PluginManager): void;
|
|
25
17
|
configure(_pluginManager: PluginManager): void;
|
|
26
18
|
}
|
|
27
|
-
export { AssemblyManager
|
|
19
|
+
export { AssemblyManager };
|
|
28
20
|
export { type AddTrackModel } from './AddTrackWidget/model';
|
|
29
21
|
export { type HierarchicalTrackSelectorModel } from './HierarchicalTrackSelectorWidget';
|
package/esm/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import AddTrackWidgetF from './AddTrackWidget';
|
|
|
5
5
|
import AddConnectionWidgetF from './AddConnectionWidget';
|
|
6
6
|
import PluginStoreWidgetF from './PluginStoreWidget';
|
|
7
7
|
import HierarchicalTrackSelectorWidgetF from './HierarchicalTrackSelectorWidget';
|
|
8
|
-
const SetDefaultSession = lazy(() => import('./SetDefaultSession'));
|
|
9
8
|
const AssemblyManager = lazy(() => import('./AssemblyManager'));
|
|
10
9
|
export default class extends Plugin {
|
|
11
10
|
constructor() {
|
|
@@ -13,7 +12,6 @@ export default class extends Plugin {
|
|
|
13
12
|
this.name = 'DataManagementPlugin';
|
|
14
13
|
this.exports = {
|
|
15
14
|
AssemblyManager,
|
|
16
|
-
SetDefaultSession,
|
|
17
15
|
};
|
|
18
16
|
}
|
|
19
17
|
install(pluginManager) {
|
|
@@ -25,4 +23,4 @@ export default class extends Plugin {
|
|
|
25
23
|
}
|
|
26
24
|
configure(_pluginManager) { }
|
|
27
25
|
}
|
|
28
|
-
export { AssemblyManager
|
|
26
|
+
export { AssemblyManager };
|
|
@@ -12,7 +12,7 @@ export default function UCSCTrackHubConnection(pluginManager) {
|
|
|
12
12
|
}))
|
|
13
13
|
.actions(self => ({
|
|
14
14
|
async connect() {
|
|
15
|
-
var _a;
|
|
15
|
+
var _a, _b;
|
|
16
16
|
const session = getSession(self);
|
|
17
17
|
const notLoadedAssemblies = [];
|
|
18
18
|
try {
|
|
@@ -80,7 +80,7 @@ export default function UCSCTrackHubConnection(pluginManager) {
|
|
|
80
80
|
catch (e) {
|
|
81
81
|
console.error(e);
|
|
82
82
|
session.notify(`There was a problem connecting to the UCSC Track Hub "${self.configuration.name}". Please make sure you have entered a valid hub.txt file. The error that was thrown is: "${e}"`, 'error');
|
|
83
|
-
session.breakConnection(self.configuration);
|
|
83
|
+
(_b = session.breakConnection) === null || _b === void 0 ? void 0 : _b.call(session, self.configuration);
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-data-management",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "JBrowse 2 linear genome view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@gmod/ucsc-hub": "^0.1.6",
|
|
40
40
|
"@mui/icons-material": "^5.0.1",
|
|
41
41
|
"@mui/x-data-grid": "^6.0.1",
|
|
42
|
-
"clsx": "^
|
|
42
|
+
"clsx": "^2.0.0",
|
|
43
43
|
"react-virtualized-auto-sizer": "^1.0.2",
|
|
44
44
|
"react-vtree": "^3.0.0-beta.1",
|
|
45
45
|
"react-window": "^1.8.6"
|
|
@@ -47,9 +47,10 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@jbrowse/core": "^2.0.0",
|
|
49
49
|
"@jbrowse/plugin-config": "^2.0.0",
|
|
50
|
+
"@jbrowse/product-core": "^2.0.0",
|
|
50
51
|
"@mui/material": "^5.0.0",
|
|
51
52
|
"mobx": "^6.0.0",
|
|
52
|
-
"mobx-react": "^
|
|
53
|
+
"mobx-react": "^9.0.0",
|
|
53
54
|
"mobx-state-tree": "^5.0.0",
|
|
54
55
|
"react": ">=16.8.0",
|
|
55
56
|
"tss-react": "^4.0.0"
|
|
@@ -60,5 +61,5 @@
|
|
|
60
61
|
"distModule": "esm/index.js",
|
|
61
62
|
"srcModule": "src/index.ts",
|
|
62
63
|
"module": "esm/index.js",
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "dbe7fb1af01fc89f833d2744635eb44a17365b41"
|
|
64
65
|
}
|