@jbrowse/plugin-grid-bookmark 3.2.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.
@@ -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 ColorPicker_1 = __importDefault(require("@jbrowse/core/ui/ColorPicker"));
8
+ const DataGridFlexContainer_1 = __importDefault(require("@jbrowse/core/ui/DataGridFlexContainer"));
8
9
  const util_1 = require("@jbrowse/core/util");
9
10
  const material_1 = require("@mui/material");
10
11
  const x_data_grid_1 = require("@mui/x-data-grid");
@@ -42,7 +43,7 @@ const BookmarkGrid = (0, mobx_react_1.observer)(function ({ model, }) {
42
43
  Math.max((0, util_1.measureText)('Assembly', 12) + 30, (0, util_1.measureGridWidth)(rows.map(row => row.assemblyName))),
43
44
  100,
44
45
  ];
45
- return ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { density: "compact", rows: rows, columns: [
46
+ return ((0, jsx_runtime_1.jsx)(DataGridFlexContainer_1.default, { children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { density: "compact", rows: rows, columns: [
46
47
  {
47
48
  ...x_data_grid_1.GRID_CHECKBOX_SELECTION_COL_DEF,
48
49
  width: widths[0],
@@ -84,10 +85,13 @@ const BookmarkGrid = (0, mobx_react_1.observer)(function ({ model, }) {
84
85
  session.notifyError(`${e}`, e);
85
86
  }, checkboxSelection: true, onRowSelectionModelChange: newRowSelectionModel => {
86
87
  if (bookmarksWithValidAssemblies.length > 0) {
87
- model.setSelectedBookmarks(newRowSelectionModel.map(value => ({
88
+ model.setSelectedBookmarks([...newRowSelectionModel.ids].map(value => ({
88
89
  ...rows[value],
89
90
  })));
90
91
  }
91
- }, rowSelectionModel: selectedBookmarks.map(r => r.id), disableRowSelectionOnClick: true }) }));
92
+ }, rowSelectionModel: {
93
+ type: 'include',
94
+ ids: new Set(selectedBookmarks.map(r => r.id)),
95
+ } }) }));
92
96
  });
93
97
  exports.default = BookmarkGrid;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import ColorPicker from '@jbrowse/core/ui/ColorPicker';
3
+ import DataGridFlexContainer from '@jbrowse/core/ui/DataGridFlexContainer';
3
4
  import { assembleLocString, getSession, measureGridWidth, measureText, } from '@jbrowse/core/util';
4
5
  import { Link } from '@mui/material';
5
6
  import { DataGrid, GRID_CHECKBOX_SELECTION_COL_DEF } from '@mui/x-data-grid';
@@ -37,7 +38,7 @@ const BookmarkGrid = observer(function ({ model, }) {
37
38
  Math.max(measureText('Assembly', 12) + 30, measureGridWidth(rows.map(row => row.assemblyName))),
38
39
  100,
39
40
  ];
40
- return (_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsx(DataGrid, { density: "compact", rows: rows, columns: [
41
+ return (_jsx(DataGridFlexContainer, { children: _jsx(DataGrid, { density: "compact", rows: rows, columns: [
41
42
  {
42
43
  ...GRID_CHECKBOX_SELECTION_COL_DEF,
43
44
  width: widths[0],
@@ -79,10 +80,13 @@ const BookmarkGrid = observer(function ({ model, }) {
79
80
  session.notifyError(`${e}`, e);
80
81
  }, checkboxSelection: true, onRowSelectionModelChange: newRowSelectionModel => {
81
82
  if (bookmarksWithValidAssemblies.length > 0) {
82
- model.setSelectedBookmarks(newRowSelectionModel.map(value => ({
83
+ model.setSelectedBookmarks([...newRowSelectionModel.ids].map(value => ({
83
84
  ...rows[value],
84
85
  })));
85
86
  }
86
- }, rowSelectionModel: selectedBookmarks.map(r => r.id), disableRowSelectionOnClick: true }) }));
87
+ }, rowSelectionModel: {
88
+ type: 'include',
89
+ ids: new Set(selectedBookmarks.map(r => r.id)),
90
+ } }) }));
87
91
  });
88
92
  export default BookmarkGrid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-grid-bookmark",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "JBrowse 2 grid bookmark widget",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -36,12 +36,12 @@
36
36
  "clean": "rimraf dist esm *.tsbuildinfo"
37
37
  },
38
38
  "dependencies": {
39
- "@jbrowse/core": "^3.2.0",
40
- "@jbrowse/plugin-config": "^3.2.0",
41
- "@jbrowse/plugin-linear-genome-view": "^3.2.0",
42
- "@mui/icons-material": "^6.0.0",
43
- "@mui/material": "^6.0.0",
44
- "@mui/x-data-grid": "^7.0.0",
39
+ "@jbrowse/core": "^3.3.0",
40
+ "@jbrowse/plugin-config": "^3.3.0",
41
+ "@jbrowse/plugin-linear-genome-view": "^3.3.0",
42
+ "@mui/icons-material": "^7.0.0",
43
+ "@mui/material": "^7.0.0",
44
+ "@mui/x-data-grid": "^8.0.0",
45
45
  "@types/file-saver": "^2.0.1",
46
46
  "copy-to-clipboard": "^3.3.1",
47
47
  "file-saver": "^2.0.0",
@@ -59,5 +59,5 @@
59
59
  "distModule": "esm/index.js",
60
60
  "srcModule": "src/index.ts",
61
61
  "module": "esm/index.js",
62
- "gitHead": "c750e3f56706a490c19ba75abd807fec5e38aebf"
62
+ "gitHead": "0bb64d8cc7ecdd167515308b31eec3d9acbc59e4"
63
63
  }