@jbrowse/plugin-data-management 3.1.0 → 3.3.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.
@@ -33,12 +33,12 @@ const PasteConfigAddTrackWorkflow = (0, mobx_react_1.observer)(function ({ model
33
33
  if ((0, util_1.isSessionWithAddTracks)(session) &&
34
34
  (0, util_1.isSessionModelWithWidgets)(session)) {
35
35
  (0, mobx_1.transaction)(() => {
36
- confs.forEach(c => {
36
+ for (const c of confs) {
37
37
  session.addTrackConf(c);
38
- });
39
- confs.forEach(c => {
38
+ }
39
+ for (const c of confs) {
40
40
  model.view.showTrack(c.trackId);
41
- });
41
+ }
42
42
  model.clearData();
43
43
  });
44
44
  session.hideWidget(model);
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const configuration_1 = require("@jbrowse/core/configuration");
8
+ const DataGridFlexContainer_1 = __importDefault(require("@jbrowse/core/ui/DataGridFlexContainer"));
8
9
  const Add_1 = __importDefault(require("@mui/icons-material/Add"));
9
10
  const Create_1 = __importDefault(require("@mui/icons-material/Create"));
10
11
  const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
@@ -12,7 +13,7 @@ const material_1 = require("@mui/material");
12
13
  const x_data_grid_1 = require("@mui/x-data-grid");
13
14
  const mobx_react_1 = require("mobx-react");
14
15
  const AssemblyTable = (0, mobx_react_1.observer)(function ({ onEditAssembly, onAddAssembly, onClose, session, }) {
15
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rowHeight: 25, columnHeaderHeight: 35, hideFooter: session.assemblies.length < 25, rows: session.assemblies.map(assembly => ({
16
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(DataGridFlexContainer_1.default, { children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rowHeight: 25, columnHeaderHeight: 35, hideFooter: session.assemblies.length < 25, rows: session.assemblies.map(assembly => ({
16
17
  id: (0, configuration_1.readConfObject)(assembly, 'name'),
17
18
  name: (0, configuration_1.readConfObject)(assembly, 'name'),
18
19
  displayName: (0, configuration_1.readConfObject)(assembly, 'displayName'),
@@ -1,5 +1,8 @@
1
- import type { HierarchicalTrackSelectorModel } from '../model';
1
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
2
  declare const ShoppingCart: ({ model, }: {
3
- model: HierarchicalTrackSelectorModel;
3
+ model: {
4
+ clearSelection: () => void;
5
+ selection: AnyConfigurationModel[];
6
+ };
4
7
  }) => import("react/jsx-runtime").JSX.Element | null;
5
8
  export default ShoppingCart;
@@ -29,7 +29,10 @@ const ShoppingCart = (0, mobx_react_1.observer)(function ({ model, }) {
29
29
  {
30
30
  label: 'Delete tracks',
31
31
  onClick: () => {
32
- selection.forEach(s => { var _a; return (_a = session.deleteTrackConf) === null || _a === void 0 ? void 0 : _a.call(session, s); });
32
+ var _a;
33
+ for (const s of selection) {
34
+ (_a = session.deleteTrackConf) === null || _a === void 0 ? void 0 : _a.call(session, s);
35
+ }
33
36
  },
34
37
  },
35
38
  ]
@@ -1,9 +1,9 @@
1
1
  import type { HierarchicalTrackSelectorModel } from '../../model';
2
- import type { GridColDef } from '@mui/x-data-grid';
2
+ import type { GridColDef, GridRowId } from '@mui/x-data-grid';
3
3
  declare const FacetedDataGrid: ({ model, columns, shownTrackIds, selection, }: {
4
4
  model: HierarchicalTrackSelectorModel;
5
5
  columns: GridColDef[];
6
- shownTrackIds: Set<string>;
6
+ shownTrackIds: Set<GridRowId>;
7
7
  selection: any[];
8
8
  }) => import("react/jsx-runtime").JSX.Element;
9
9
  export default FacetedDataGrid;
@@ -12,33 +12,42 @@ const FacetedDataGrid = (0, mobx_react_1.observer)(function ({ model, columns, s
12
12
  const { view, faceted } = model;
13
13
  const { rows, useShoppingCart, showOptions, filteredRows, filteredNonMetadataKeys, filteredMetadataKeys, visible, } = faceted;
14
14
  const [widths, setWidths] = (0, react_1.useState)({
15
- name: (0, util_1.measureGridWidth)(rows.map(r => r.name), { maxWidth: 500, stripHTML: true }) + 15,
15
+ name: (0, util_1.measureGridWidth)(rows.map(r => r.name), {
16
+ maxWidth: 500,
17
+ stripHTML: true,
18
+ }) + 15,
16
19
  ...Object.fromEntries(filteredNonMetadataKeys
17
20
  .filter(f => visible[f])
18
21
  .map(e => [
19
22
  e,
20
- (0, util_1.measureGridWidth)(rows.map(r => r[e]), { maxWidth: 400, stripHTML: true }),
23
+ (0, util_1.measureGridWidth)(rows.map(r => r[e]), {
24
+ maxWidth: 400,
25
+ stripHTML: true,
26
+ }),
21
27
  ])),
22
28
  ...Object.fromEntries(filteredMetadataKeys
23
29
  .filter(f => visible[`metadata.${f}`])
24
30
  .map(e => {
25
31
  return [
26
32
  `metadata.${e}`,
27
- (0, util_1.measureGridWidth)(rows.map(r => r.metadata[e]), { maxWidth: 400, stripHTML: true }),
33
+ (0, util_1.measureGridWidth)(rows.map(r => r.metadata[e]), {
34
+ maxWidth: 400,
35
+ stripHTML: true,
36
+ }),
28
37
  ];
29
38
  })),
30
39
  });
31
- return ((0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rows: filteredRows, onColumnWidthChange: arg => {
40
+ return ((0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rowHeight: 25, columnHeaderHeight: 35, checkboxSelection: true, keepNonExistentRowsSelected: true, rows: filteredRows, columnVisibilityModel: visible, showToolbar: showOptions, onColumnWidthChange: arg => {
32
41
  setWidths({
33
42
  ...widths,
34
43
  [arg.colDef.field]: arg.width,
35
44
  });
36
- }, columnVisibilityModel: visible, onColumnVisibilityModelChange: n => {
45
+ }, onColumnVisibilityModelChange: n => {
37
46
  model.faceted.setVisible(n);
38
- }, columnHeaderHeight: 35, checkboxSelection: true, disableRowSelectionOnClick: true, keepNonExistentRowsSelected: true, onRowSelectionModelChange: userSelectedIds => {
47
+ }, onRowSelectionModelChange: userSelectedIds => {
39
48
  if (!useShoppingCart) {
40
49
  const a1 = shownTrackIds;
41
- const a2 = new Set(userSelectedIds);
50
+ const a2 = userSelectedIds.ids;
42
51
  (0, mobx_1.transaction)(() => {
43
52
  ;
44
53
  [...a1].filter(x => !a2.has(x)).map(t => view.hideTrack(t));
@@ -53,19 +62,14 @@ const FacetedDataGrid = (0, mobx_react_1.observer)(function ({ model, columns, s
53
62
  else {
54
63
  const root = (0, mobx_state_tree_1.getRoot)(model);
55
64
  const schema = pluginManager.pluggableConfigSchemaType('track');
56
- model.setSelection(userSelectedIds.map(id => (0, mobx_state_tree_1.resolveIdentifier)(schema, root, id)));
65
+ model.setSelection([...userSelectedIds.ids].map(id => (0, mobx_state_tree_1.resolveIdentifier)(schema, root, id)));
57
66
  }
58
- }, rowSelectionModel: useShoppingCart ? selection.map(s => s.trackId) : [...shownTrackIds], slots: {
59
- toolbar: showOptions ? x_data_grid_1.GridToolbar : null,
60
- }, slotProps: {
61
- toolbar: {
62
- printOptions: {
63
- disableToolbarButton: true,
64
- },
65
- },
67
+ }, rowSelectionModel: {
68
+ type: 'include',
69
+ ids: new Set(useShoppingCart ? selection.map(s => s.trackId) : [...shownTrackIds]),
66
70
  }, columns: columns.map(r => ({
67
71
  ...r,
68
72
  width: widths[r.field],
69
- })), rowHeight: 25 }));
73
+ })) }));
70
74
  });
71
75
  exports.default = FacetedDataGrid;
@@ -15,7 +15,7 @@ function FacetedHeader({ model, }) {
15
15
  const { faceted } = model;
16
16
  const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
17
17
  const { showOptions, showFilters, showSparse, useShoppingCart } = faceted;
18
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid2, { container: true, spacing: 4, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { label: "Search...", value: faceted.filterText, onChange: event => {
18
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 4, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { label: "Search...", value: faceted.filterText, onChange: event => {
19
19
  faceted.setFilterText(event.target.value);
20
20
  }, slotProps: {
21
21
  input: {
@@ -1,5 +1,6 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { GridRowId } from '@mui/x-data-grid';
3
4
  import type { Instance } from 'mobx-state-tree';
4
5
  type MaybeAnyConfigurationModel = AnyConfigurationModel | undefined;
5
6
  type MaybeBoolean = boolean | undefined;
@@ -87,7 +88,7 @@ export default function stateTreeFactory(pluginManager: PluginManager): import("
87
88
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
88
89
  }, {
89
90
  favorites: string[];
90
- recentlyUsed: string[];
91
+ recentlyUsed: GridRowId[];
91
92
  selection: AnyConfigurationModel[];
92
93
  sortTrackNames: MaybeBoolean;
93
94
  sortCategories: MaybeBoolean;
@@ -109,7 +110,7 @@ export default function stateTreeFactory(pluginManager: PluginManager): import("
109
110
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
110
111
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>>;
111
112
  readonly favoritesSet: Set<string>;
112
- readonly recentlyUsedSet: Set<string>;
113
+ readonly recentlyUsedSet: Set<GridRowId>;
113
114
  readonly assemblyNames: string[];
114
115
  } & {
115
116
  setSortTrackNames(val: boolean): void;
@@ -125,7 +126,7 @@ export default function stateTreeFactory(pluginManager: PluginManager): import("
125
126
  setRecentlyUsed(str: string[]): void;
126
127
  setFavorites(str: string[]): void;
127
128
  setFavoritesCounter(val: number): void;
128
- addToRecentlyUsed(id: string): void;
129
+ addToRecentlyUsed(id: GridRowId): void;
129
130
  clearRecentlyUsed(): void;
130
131
  setView(view: unknown): void;
131
132
  toggleCategory(pathName: string): void;
@@ -19,5 +19,16 @@ const UCSCTrackHubConnection = (0, configuration_1.ConfigurationSchema)('UCSCTra
19
19
  },
20
20
  }, {
21
21
  baseConfiguration: models_1.baseConnectionConfig,
22
+ preProcessSnapshot: snap => {
23
+ return snap.uri
24
+ ? {
25
+ ...snap,
26
+ hubTxtLocation: {
27
+ uri: snap.uri,
28
+ baseUri: snap.baseUri,
29
+ },
30
+ }
31
+ : snap;
32
+ },
22
33
  });
23
34
  exports.default = UCSCTrackHubConnection;
@@ -49,6 +49,16 @@ async function doConnect(self) {
49
49
  },
50
50
  },
51
51
  },
52
+ ...(genome.data.chromAliasBb
53
+ ? {
54
+ refNameAliases: {
55
+ adapter: {
56
+ type: 'BigBedAdapter',
57
+ uri: (0, util_2.resolve)(genome.data.chromAliasBb, hubUri),
58
+ },
59
+ },
60
+ }
61
+ : {}),
52
62
  });
53
63
  }
54
64
  const asm2 = assemblyManager.get(genomeName);
@@ -31,12 +31,12 @@ const PasteConfigAddTrackWorkflow = observer(function ({ model, }) {
31
31
  if (isSessionWithAddTracks(session) &&
32
32
  isSessionModelWithWidgets(session)) {
33
33
  transaction(() => {
34
- confs.forEach(c => {
34
+ for (const c of confs) {
35
35
  session.addTrackConf(c);
36
- });
37
- confs.forEach(c => {
36
+ }
37
+ for (const c of confs) {
38
38
  model.view.showTrack(c.trackId);
39
- });
39
+ }
40
40
  model.clearData();
41
41
  });
42
42
  session.hideWidget(model);
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { readConfObject } from '@jbrowse/core/configuration';
3
+ import DataGridFlexContainer from '@jbrowse/core/ui/DataGridFlexContainer';
3
4
  import AddIcon from '@mui/icons-material/Add';
4
5
  import CreateIcon from '@mui/icons-material/Create';
5
6
  import DeleteIcon from '@mui/icons-material/Delete';
@@ -7,7 +8,7 @@ import { Button, DialogActions, DialogContent, IconButton } from '@mui/material'
7
8
  import { DataGrid } from '@mui/x-data-grid';
8
9
  import { observer } from 'mobx-react';
9
10
  const AssemblyTable = observer(function ({ onEditAssembly, onAddAssembly, onClose, session, }) {
10
- return (_jsxs(_Fragment, { children: [_jsx(DialogContent, { children: _jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsx(DataGrid, { rowHeight: 25, columnHeaderHeight: 35, hideFooter: session.assemblies.length < 25, rows: session.assemblies.map(assembly => ({
11
+ return (_jsxs(_Fragment, { children: [_jsx(DialogContent, { children: _jsx(DataGridFlexContainer, { children: _jsx(DataGrid, { rowHeight: 25, columnHeaderHeight: 35, hideFooter: session.assemblies.length < 25, rows: session.assemblies.map(assembly => ({
11
12
  id: readConfObject(assembly, 'name'),
12
13
  name: readConfObject(assembly, 'name'),
13
14
  displayName: readConfObject(assembly, 'displayName'),
@@ -1,5 +1,8 @@
1
- import type { HierarchicalTrackSelectorModel } from '../model';
1
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
2
  declare const ShoppingCart: ({ model, }: {
3
- model: HierarchicalTrackSelectorModel;
3
+ model: {
4
+ clearSelection: () => void;
5
+ selection: AnyConfigurationModel[];
6
+ };
4
7
  }) => import("react/jsx-runtime").JSX.Element | null;
5
8
  export default ShoppingCart;
@@ -24,7 +24,10 @@ const ShoppingCart = observer(function ({ model, }) {
24
24
  {
25
25
  label: 'Delete tracks',
26
26
  onClick: () => {
27
- selection.forEach(s => { var _a; return (_a = session.deleteTrackConf) === null || _a === void 0 ? void 0 : _a.call(session, s); });
27
+ var _a;
28
+ for (const s of selection) {
29
+ (_a = session.deleteTrackConf) === null || _a === void 0 ? void 0 : _a.call(session, s);
30
+ }
28
31
  },
29
32
  },
30
33
  ]
@@ -1,9 +1,9 @@
1
1
  import type { HierarchicalTrackSelectorModel } from '../../model';
2
- import type { GridColDef } from '@mui/x-data-grid';
2
+ import type { GridColDef, GridRowId } from '@mui/x-data-grid';
3
3
  declare const FacetedDataGrid: ({ model, columns, shownTrackIds, selection, }: {
4
4
  model: HierarchicalTrackSelectorModel;
5
5
  columns: GridColDef[];
6
- shownTrackIds: Set<string>;
6
+ shownTrackIds: Set<GridRowId>;
7
7
  selection: any[];
8
8
  }) => import("react/jsx-runtime").JSX.Element;
9
9
  export default FacetedDataGrid;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { getEnv, measureGridWidth } from '@jbrowse/core/util';
4
- import { DataGrid, GridToolbar } from '@mui/x-data-grid';
4
+ import { DataGrid } from '@mui/x-data-grid';
5
5
  import { transaction } from 'mobx';
6
6
  import { observer } from 'mobx-react';
7
7
  import { getRoot, resolveIdentifier } from 'mobx-state-tree';
@@ -10,33 +10,42 @@ const FacetedDataGrid = observer(function ({ model, columns, shownTrackIds, sele
10
10
  const { view, faceted } = model;
11
11
  const { rows, useShoppingCart, showOptions, filteredRows, filteredNonMetadataKeys, filteredMetadataKeys, visible, } = faceted;
12
12
  const [widths, setWidths] = useState({
13
- name: measureGridWidth(rows.map(r => r.name), { maxWidth: 500, stripHTML: true }) + 15,
13
+ name: measureGridWidth(rows.map(r => r.name), {
14
+ maxWidth: 500,
15
+ stripHTML: true,
16
+ }) + 15,
14
17
  ...Object.fromEntries(filteredNonMetadataKeys
15
18
  .filter(f => visible[f])
16
19
  .map(e => [
17
20
  e,
18
- measureGridWidth(rows.map(r => r[e]), { maxWidth: 400, stripHTML: true }),
21
+ measureGridWidth(rows.map(r => r[e]), {
22
+ maxWidth: 400,
23
+ stripHTML: true,
24
+ }),
19
25
  ])),
20
26
  ...Object.fromEntries(filteredMetadataKeys
21
27
  .filter(f => visible[`metadata.${f}`])
22
28
  .map(e => {
23
29
  return [
24
30
  `metadata.${e}`,
25
- measureGridWidth(rows.map(r => r.metadata[e]), { maxWidth: 400, stripHTML: true }),
31
+ measureGridWidth(rows.map(r => r.metadata[e]), {
32
+ maxWidth: 400,
33
+ stripHTML: true,
34
+ }),
26
35
  ];
27
36
  })),
28
37
  });
29
- return (_jsx(DataGrid, { rows: filteredRows, onColumnWidthChange: arg => {
38
+ return (_jsx(DataGrid, { rowHeight: 25, columnHeaderHeight: 35, checkboxSelection: true, keepNonExistentRowsSelected: true, rows: filteredRows, columnVisibilityModel: visible, showToolbar: showOptions, onColumnWidthChange: arg => {
30
39
  setWidths({
31
40
  ...widths,
32
41
  [arg.colDef.field]: arg.width,
33
42
  });
34
- }, columnVisibilityModel: visible, onColumnVisibilityModelChange: n => {
43
+ }, onColumnVisibilityModelChange: n => {
35
44
  model.faceted.setVisible(n);
36
- }, columnHeaderHeight: 35, checkboxSelection: true, disableRowSelectionOnClick: true, keepNonExistentRowsSelected: true, onRowSelectionModelChange: userSelectedIds => {
45
+ }, onRowSelectionModelChange: userSelectedIds => {
37
46
  if (!useShoppingCart) {
38
47
  const a1 = shownTrackIds;
39
- const a2 = new Set(userSelectedIds);
48
+ const a2 = userSelectedIds.ids;
40
49
  transaction(() => {
41
50
  ;
42
51
  [...a1].filter(x => !a2.has(x)).map(t => view.hideTrack(t));
@@ -51,19 +60,14 @@ const FacetedDataGrid = observer(function ({ model, columns, shownTrackIds, sele
51
60
  else {
52
61
  const root = getRoot(model);
53
62
  const schema = pluginManager.pluggableConfigSchemaType('track');
54
- model.setSelection(userSelectedIds.map(id => resolveIdentifier(schema, root, id)));
63
+ model.setSelection([...userSelectedIds.ids].map(id => resolveIdentifier(schema, root, id)));
55
64
  }
56
- }, rowSelectionModel: useShoppingCart ? selection.map(s => s.trackId) : [...shownTrackIds], slots: {
57
- toolbar: showOptions ? GridToolbar : null,
58
- }, slotProps: {
59
- toolbar: {
60
- printOptions: {
61
- disableToolbarButton: true,
62
- },
63
- },
65
+ }, rowSelectionModel: {
66
+ type: 'include',
67
+ ids: new Set(useShoppingCart ? selection.map(s => s.trackId) : [...shownTrackIds]),
64
68
  }, columns: columns.map(r => ({
65
69
  ...r,
66
70
  width: widths[r.field],
67
- })), rowHeight: 25 }));
71
+ })) }));
68
72
  });
69
73
  export default FacetedDataGrid;
@@ -3,13 +3,13 @@ import { useState } from 'react';
3
3
  import { Menu } from '@jbrowse/core/ui';
4
4
  import ClearIcon from '@mui/icons-material/Clear';
5
5
  import MoreVert from '@mui/icons-material/MoreVert';
6
- import { Grid2, IconButton, InputAdornment, TextField } from '@mui/material';
6
+ import { Grid, IconButton, InputAdornment, TextField } from '@mui/material';
7
7
  import ShoppingCart from '../ShoppingCart';
8
8
  export default function FacetedHeader({ model, }) {
9
9
  const { faceted } = model;
10
10
  const [anchorEl, setAnchorEl] = useState(null);
11
11
  const { showOptions, showFilters, showSparse, useShoppingCart } = faceted;
12
- return (_jsxs(_Fragment, { children: [_jsxs(Grid2, { container: true, spacing: 4, alignItems: "center", children: [_jsx(TextField, { label: "Search...", value: faceted.filterText, onChange: event => {
12
+ return (_jsxs(_Fragment, { children: [_jsxs(Grid, { container: true, spacing: 4, alignItems: "center", children: [_jsx(TextField, { label: "Search...", value: faceted.filterText, onChange: event => {
13
13
  faceted.setFilterText(event.target.value);
14
14
  }, slotProps: {
15
15
  input: {
@@ -1,5 +1,6 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { GridRowId } from '@mui/x-data-grid';
3
4
  import type { Instance } from 'mobx-state-tree';
4
5
  type MaybeAnyConfigurationModel = AnyConfigurationModel | undefined;
5
6
  type MaybeBoolean = boolean | undefined;
@@ -87,7 +88,7 @@ export default function stateTreeFactory(pluginManager: PluginManager): import("
87
88
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
88
89
  }, {
89
90
  favorites: string[];
90
- recentlyUsed: string[];
91
+ recentlyUsed: GridRowId[];
91
92
  selection: AnyConfigurationModel[];
92
93
  sortTrackNames: MaybeBoolean;
93
94
  sortCategories: MaybeBoolean;
@@ -109,7 +110,7 @@ export default function stateTreeFactory(pluginManager: PluginManager): import("
109
110
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
110
111
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>>;
111
112
  readonly favoritesSet: Set<string>;
112
- readonly recentlyUsedSet: Set<string>;
113
+ readonly recentlyUsedSet: Set<GridRowId>;
113
114
  readonly assemblyNames: string[];
114
115
  } & {
115
116
  setSortTrackNames(val: boolean): void;
@@ -125,7 +126,7 @@ export default function stateTreeFactory(pluginManager: PluginManager): import("
125
126
  setRecentlyUsed(str: string[]): void;
126
127
  setFavorites(str: string[]): void;
127
128
  setFavoritesCounter(val: number): void;
128
- addToRecentlyUsed(id: string): void;
129
+ addToRecentlyUsed(id: GridRowId): void;
129
130
  clearRecentlyUsed(): void;
130
131
  setView(view: unknown): void;
131
132
  toggleCategory(pathName: string): void;
@@ -17,5 +17,16 @@ const UCSCTrackHubConnection = ConfigurationSchema('UCSCTrackHubConnection', {
17
17
  },
18
18
  }, {
19
19
  baseConfiguration: baseConnectionConfig,
20
+ preProcessSnapshot: snap => {
21
+ return snap.uri
22
+ ? {
23
+ ...snap,
24
+ hubTxtLocation: {
25
+ uri: snap.uri,
26
+ baseUri: snap.baseUri,
27
+ },
28
+ }
29
+ : snap;
30
+ },
20
31
  });
21
32
  export default UCSCTrackHubConnection;
@@ -46,6 +46,16 @@ export async function doConnect(self) {
46
46
  },
47
47
  },
48
48
  },
49
+ ...(genome.data.chromAliasBb
50
+ ? {
51
+ refNameAliases: {
52
+ adapter: {
53
+ type: 'BigBedAdapter',
54
+ uri: resolve(genome.data.chromAliasBb, hubUri),
55
+ },
56
+ },
57
+ }
58
+ : {}),
49
59
  });
50
60
  }
51
61
  const asm2 = assemblyManager.get(genomeName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-data-management",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "description": "JBrowse 2 linear genome view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -37,17 +37,17 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@gmod/ucsc-hub": "^1.0.0",
40
- "@jbrowse/core": "^3.1.0",
41
- "@jbrowse/plugin-config": "^3.1.0",
42
- "@jbrowse/product-core": "^3.1.0",
43
- "@mui/icons-material": "^6.0.0",
44
- "@mui/material": "^6.0.0",
45
- "@mui/x-data-grid": "^7.0.0",
40
+ "@jbrowse/core": "^3.3.0",
41
+ "@jbrowse/plugin-config": "^3.3.0",
42
+ "@jbrowse/product-core": "^3.3.0",
43
+ "@mui/icons-material": "^7.0.0",
44
+ "@mui/material": "^7.0.0",
45
+ "@mui/x-data-grid": "^8.0.0",
46
46
  "deepmerge": "^4.3.1",
47
47
  "mobx": "^6.0.0",
48
48
  "mobx-react": "^9.0.0",
49
49
  "mobx-state-tree": "^5.0.0",
50
- "react-virtualized-auto-sizer": "^1.0.2",
50
+ "react-virtualized-auto-sizer": "^1.0.26",
51
51
  "react-vtree": "^3.0.0-beta.1",
52
52
  "react-window": "^1.8.6",
53
53
  "tss-react": "^4.0.0"
@@ -61,5 +61,5 @@
61
61
  "distModule": "esm/index.js",
62
62
  "srcModule": "src/index.ts",
63
63
  "module": "esm/index.js",
64
- "gitHead": "91492049ddea0aed90eb24d3c066c2d9f5a6b189"
64
+ "gitHead": "0bb64d8cc7ecdd167515308b31eec3d9acbc59e4"
65
65
  }