@jbrowse/plugin-grid-bookmark 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.
Files changed (50) hide show
  1. package/dist/GridBookmarkWidget/components/AssemblySelector.d.ts +1 -2
  2. package/dist/GridBookmarkWidget/components/AssemblySelector.js +9 -23
  3. package/dist/GridBookmarkWidget/components/BookmarkGrid.d.ts +1 -2
  4. package/dist/GridBookmarkWidget/components/BookmarkGrid.js +6 -7
  5. package/dist/GridBookmarkWidget/components/GridBookmarkWidget.d.ts +1 -2
  6. package/dist/GridBookmarkWidget/components/GridBookmarkWidget.js +81 -81
  7. package/dist/GridBookmarkWidget/components/Highlight/Highlight.d.ts +1 -2
  8. package/dist/GridBookmarkWidget/components/Highlight/Highlight.js +27 -54
  9. package/dist/GridBookmarkWidget/components/Highlight/OverviewHighlight.d.ts +1 -2
  10. package/dist/GridBookmarkWidget/components/Highlight/OverviewHighlight.js +4 -27
  11. package/dist/GridBookmarkWidget/components/Highlight/index.js +3 -3
  12. package/dist/GridBookmarkWidget/components/dialogs/DeleteBookmarksDialog.d.ts +1 -2
  13. package/dist/GridBookmarkWidget/components/dialogs/DeleteBookmarksDialog.js +10 -21
  14. package/dist/GridBookmarkWidget/components/dialogs/EditHighlightColorDialog.d.ts +1 -2
  15. package/dist/GridBookmarkWidget/components/dialogs/EditHighlightColorDialog.js +10 -39
  16. package/dist/GridBookmarkWidget/components/dialogs/ExportBookmarksDialog.d.ts +1 -2
  17. package/dist/GridBookmarkWidget/components/dialogs/ExportBookmarksDialog.js +9 -43
  18. package/dist/GridBookmarkWidget/components/dialogs/HighlightSettingsDialog.d.ts +1 -2
  19. package/dist/GridBookmarkWidget/components/dialogs/HighlightSettingsDialog.js +8 -21
  20. package/dist/GridBookmarkWidget/components/dialogs/ImportBookmarksDialog.d.ts +1 -2
  21. package/dist/GridBookmarkWidget/components/dialogs/ImportBookmarksDialog.js +33 -72
  22. package/dist/GridBookmarkWidget/components/dialogs/ShareBookmarksDialog.d.ts +1 -2
  23. package/dist/GridBookmarkWidget/components/dialogs/ShareBookmarksDialog.js +14 -46
  24. package/dist/GridBookmarkWidget/index.js +17 -7
  25. package/dist/GridBookmarkWidget/sessionSharing.js +17 -7
  26. package/dist/GridBookmarkWidget/utils.js +17 -7
  27. package/esm/GridBookmarkWidget/components/AssemblySelector.d.ts +1 -2
  28. package/esm/GridBookmarkWidget/components/AssemblySelector.js +9 -20
  29. package/esm/GridBookmarkWidget/components/BookmarkGrid.d.ts +1 -2
  30. package/esm/GridBookmarkWidget/components/BookmarkGrid.js +6 -7
  31. package/esm/GridBookmarkWidget/components/GridBookmarkWidget.d.ts +1 -2
  32. package/esm/GridBookmarkWidget/components/GridBookmarkWidget.js +64 -74
  33. package/esm/GridBookmarkWidget/components/Highlight/Highlight.d.ts +1 -2
  34. package/esm/GridBookmarkWidget/components/Highlight/Highlight.js +27 -31
  35. package/esm/GridBookmarkWidget/components/Highlight/OverviewHighlight.d.ts +1 -2
  36. package/esm/GridBookmarkWidget/components/Highlight/OverviewHighlight.js +4 -4
  37. package/esm/GridBookmarkWidget/components/Highlight/index.js +3 -3
  38. package/esm/GridBookmarkWidget/components/dialogs/DeleteBookmarksDialog.d.ts +1 -2
  39. package/esm/GridBookmarkWidget/components/dialogs/DeleteBookmarksDialog.js +10 -18
  40. package/esm/GridBookmarkWidget/components/dialogs/EditHighlightColorDialog.d.ts +1 -2
  41. package/esm/GridBookmarkWidget/components/dialogs/EditHighlightColorDialog.js +10 -16
  42. package/esm/GridBookmarkWidget/components/dialogs/ExportBookmarksDialog.d.ts +1 -2
  43. package/esm/GridBookmarkWidget/components/dialogs/ExportBookmarksDialog.js +9 -20
  44. package/esm/GridBookmarkWidget/components/dialogs/HighlightSettingsDialog.d.ts +1 -2
  45. package/esm/GridBookmarkWidget/components/dialogs/HighlightSettingsDialog.js +8 -18
  46. package/esm/GridBookmarkWidget/components/dialogs/ImportBookmarksDialog.d.ts +1 -2
  47. package/esm/GridBookmarkWidget/components/dialogs/ImportBookmarksDialog.js +33 -49
  48. package/esm/GridBookmarkWidget/components/dialogs/ShareBookmarksDialog.d.ts +1 -2
  49. package/esm/GridBookmarkWidget/components/dialogs/ShareBookmarksDialog.js +14 -23
  50. package/package.json +11 -11
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../model';
3
2
  declare const AssemblySelector: ({ model, }: {
4
3
  model: GridBookmarkModel;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  export default AssemblySelector;
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
4
  const material_1 = require("@mui/material");
8
5
  const mobx_react_1 = require("mobx-react");
9
6
  const AssemblySelector = (0, mobx_react_1.observer)(function ({ model, }) {
@@ -13,24 +10,13 @@ const AssemblySelector = (0, mobx_react_1.observer)(function ({ model, }) {
13
10
  const id = 'select-assemblies-label';
14
11
  const selectedSet = new Set(selectedAssemblies);
15
12
  const isAllSelected = [...validAssemblies].every(e => selectedSet.has(e));
16
- return (react_1.default.createElement(material_1.FormControl, { disabled: noAssemblies, fullWidth: true },
17
- react_1.default.createElement(material_1.InputLabel, { id: id }, label),
18
- react_1.default.createElement(material_1.Select, { labelId: id, multiple: true, value: selectedAssemblies, onChange: event => {
19
- model.setSelectedAssemblies([...event.target.value]);
20
- }, input: react_1.default.createElement(material_1.OutlinedInput, { label: label }), renderValue: selected => selected.join(', ') },
21
- react_1.default.createElement(material_1.MenuItem, { onClickCapture: event => {
22
- if (isAllSelected) {
23
- model.setSelectedAssemblies([]);
24
- }
25
- else {
26
- model.setSelectedAssemblies(undefined);
27
- }
28
- event.preventDefault();
29
- } },
30
- react_1.default.createElement(material_1.Checkbox, { checked: isAllSelected, indeterminate: !isAllSelected && selectedAssemblies.length > 0 }),
31
- react_1.default.createElement(material_1.ListItemText, { primary: "Select all" })),
32
- [...validAssemblies].map(name => (react_1.default.createElement(material_1.MenuItem, { key: name, value: name },
33
- react_1.default.createElement(material_1.Checkbox, { checked: selectedAssemblies.includes(name) }),
34
- react_1.default.createElement(material_1.ListItemText, { primary: name })))))));
13
+ return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, { disabled: noAssemblies, fullWidth: true, children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { id: id, children: label }), (0, jsx_runtime_1.jsxs)(material_1.Select, { labelId: id, multiple: true, value: selectedAssemblies, onChange: event => {
14
+ model.setSelectedAssemblies(typeof event.target.value === 'string'
15
+ ? [event.target.value]
16
+ : event.target.value);
17
+ }, input: (0, jsx_runtime_1.jsx)(material_1.OutlinedInput, { label: label }), renderValue: selected => selected.join(', '), children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClickCapture: event => {
18
+ model.setSelectedAssemblies(isAllSelected ? [] : undefined);
19
+ event.preventDefault();
20
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: isAllSelected, indeterminate: !isAllSelected && selectedAssemblies.length > 0 }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: "Select all" })] }), [...validAssemblies].map(name => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, { value: name, children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: selectedAssemblies.includes(name) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: name })] }, name)))] })] }));
35
21
  });
36
22
  exports.default = AssemblySelector;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../model';
3
2
  declare const BookmarkGrid: ({ model, }: {
4
3
  model: GridBookmarkModel;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  export default BookmarkGrid;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const ColorPicker_1 = __importDefault(require("@jbrowse/core/ui/ColorPicker"));
8
8
  const util_1 = require("@jbrowse/core/util");
9
9
  const material_1 = require("@mui/material");
@@ -42,8 +42,7 @@ const BookmarkGrid = (0, mobx_react_1.observer)(function ({ model, }) {
42
42
  Math.max((0, util_1.measureText)('Assembly', 12) + 30, (0, util_1.measureGridWidth)(rows.map(row => row.assemblyName))),
43
43
  100,
44
44
  ];
45
- return (react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
46
- react_1.default.createElement(x_data_grid_1.DataGrid, { density: "compact", rows: rows, columns: [
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: [
47
46
  {
48
47
  ...x_data_grid_1.GRID_CHECKBOX_SELECTION_COL_DEF,
49
48
  width: widths[0],
@@ -52,11 +51,11 @@ const BookmarkGrid = (0, mobx_react_1.observer)(function ({ model, }) {
52
51
  field: 'locString',
53
52
  headerName: 'Bookmark link',
54
53
  width: widths[1],
55
- renderCell: ({ value, row }) => (react_1.default.createElement(material_1.Link, { className: classes.cell, href: "#", onClick: async (event) => {
54
+ renderCell: ({ value, row }) => ((0, jsx_runtime_1.jsx)(material_1.Link, { className: classes.cell, href: "#", onClick: async (event) => {
56
55
  event.preventDefault();
57
56
  const { views } = session;
58
57
  await (0, utils_1.navToBookmark)(value, row.assemblyName, views, model);
59
- } }, value)),
58
+ }, children: value })),
60
59
  },
61
60
  {
62
61
  field: 'label',
@@ -73,7 +72,7 @@ const BookmarkGrid = (0, mobx_react_1.observer)(function ({ model, }) {
73
72
  field: 'highlight',
74
73
  headerName: 'Highlight',
75
74
  width: widths[4],
76
- renderCell: ({ value, row }) => (react_1.default.createElement(ColorPicker_1.default, { color: value || 'black', onChange: event => {
75
+ renderCell: ({ value, row }) => ((0, jsx_runtime_1.jsx)(ColorPicker_1.default, { color: value || 'black', onChange: event => {
77
76
  model.updateBookmarkHighlight(row, event);
78
77
  } })),
79
78
  },
@@ -89,6 +88,6 @@ const BookmarkGrid = (0, mobx_react_1.observer)(function ({ model, }) {
89
88
  ...rows[value],
90
89
  })));
91
90
  }
92
- }, rowSelectionModel: selectedBookmarks.map(r => r.id), disableRowSelectionOnClick: true })));
91
+ }, rowSelectionModel: selectedBookmarks.map(r => r.id), disableRowSelectionOnClick: true }) }));
93
92
  });
94
93
  exports.default = BookmarkGrid;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../model';
3
2
  declare const GridBookmarkWidget: ({ model, }: {
4
3
  model: GridBookmarkModel;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  export default GridBookmarkWidget;
@@ -15,18 +15,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
39
+ const jsx_runtime_1 = require("react/jsx-runtime");
40
+ const react_1 = require("react");
30
41
  const CascadingMenuButton_1 = __importDefault(require("@jbrowse/core/ui/CascadingMenuButton"));
31
42
  const util_1 = require("@jbrowse/core/util");
32
43
  const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
@@ -54,78 +65,67 @@ const useStyles = (0, mui_1.makeStyles)()({
54
65
  });
55
66
  const GridBookmarkWidget = (0, mobx_react_1.observer)(function GridBookmarkWidget({ model, }) {
56
67
  const { classes } = useStyles();
57
- return (react_1.default.createElement("div", null,
58
- react_1.default.createElement(material_1.Alert, { severity: "info" },
59
- "Click and type within the ",
60
- react_1.default.createElement("strong", null, "label"),
61
- " field to annotate your bookmark. Double click the ",
62
- react_1.default.createElement("strong", null, "label"),
63
- " field to do so within a dialog."),
64
- react_1.default.createElement("div", { className: classes.flex },
65
- react_1.default.createElement(CascadingMenuButton_1.default, { "data-testid": "grid_bookmark_menu", menuItems: [
66
- {
67
- label: 'Export',
68
- icon: GetApp_1.default,
69
- onClick: () => {
70
- (0, util_1.getSession)(model).queueDialog(onClose => [
71
- ExportBookmarksDialog,
72
- { onClose, model },
73
- ]);
74
- },
75
- },
76
- {
77
- label: 'Import',
78
- icon: Publish_1.default,
79
- onClick: () => {
80
- (0, util_1.getSession)(model).queueDialog(onClose => [
81
- ImportBookmarksDialog,
82
- { model, onClose },
83
- ]);
84
- },
85
- },
86
- {
87
- label: 'Delete',
88
- icon: Delete_1.default,
89
- onClick: () => {
90
- (0, util_1.getSession)(model).queueDialog(onClose => [
91
- DeleteBookmarksDialog,
92
- { model, onClose },
93
- ]);
94
- },
95
- },
96
- {
97
- label: 'Share',
98
- icon: Share_1.default,
99
- onClick: () => {
100
- (0, util_1.getSession)(model).queueDialog(onClose => [
101
- ShareBookmarksDialog,
102
- { model, onClose },
103
- ]);
104
- },
105
- },
106
- {
107
- label: 'Edit colors',
108
- icon: Palette_1.default,
109
- onClick: () => {
110
- (0, util_1.getSession)(model).queueDialog(onClose => [
111
- EditHighlightColorDialog,
112
- { model, onClose },
113
- ]);
114
- },
115
- },
116
- {
117
- label: 'Settings',
118
- icon: Settings_1.default,
119
- onClick: () => {
120
- (0, util_1.getSession)(model).queueDialog(onClose => [
121
- HighlightSettingsDialog,
122
- { model, onClose },
123
- ]);
124
- },
125
- },
126
- ] },
127
- react_1.default.createElement(Menu_1.default, null)),
128
- react_1.default.createElement(AssemblySelector_1.default, { model: model })),
129
- react_1.default.createElement(BookmarkGrid_1.default, { model: model })));
68
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)(material_1.Alert, { severity: "info", children: ["Click and type within the ", (0, jsx_runtime_1.jsx)("strong", { children: "label" }), " field to annotate your bookmark. Double click the ", (0, jsx_runtime_1.jsx)("strong", { children: "label" }), " field to do so within a dialog."] }), (0, jsx_runtime_1.jsxs)("div", { className: classes.flex, children: [(0, jsx_runtime_1.jsx)(CascadingMenuButton_1.default, { "data-testid": "grid_bookmark_menu", menuItems: [
69
+ {
70
+ label: 'Export',
71
+ icon: GetApp_1.default,
72
+ onClick: () => {
73
+ (0, util_1.getSession)(model).queueDialog(onClose => [
74
+ ExportBookmarksDialog,
75
+ { onClose, model },
76
+ ]);
77
+ },
78
+ },
79
+ {
80
+ label: 'Import',
81
+ icon: Publish_1.default,
82
+ onClick: () => {
83
+ (0, util_1.getSession)(model).queueDialog(onClose => [
84
+ ImportBookmarksDialog,
85
+ { model, onClose },
86
+ ]);
87
+ },
88
+ },
89
+ {
90
+ label: 'Delete',
91
+ icon: Delete_1.default,
92
+ onClick: () => {
93
+ (0, util_1.getSession)(model).queueDialog(onClose => [
94
+ DeleteBookmarksDialog,
95
+ { model, onClose },
96
+ ]);
97
+ },
98
+ },
99
+ {
100
+ label: 'Share',
101
+ icon: Share_1.default,
102
+ onClick: () => {
103
+ (0, util_1.getSession)(model).queueDialog(onClose => [
104
+ ShareBookmarksDialog,
105
+ { model, onClose },
106
+ ]);
107
+ },
108
+ },
109
+ {
110
+ label: 'Edit colors',
111
+ icon: Palette_1.default,
112
+ onClick: () => {
113
+ (0, util_1.getSession)(model).queueDialog(onClose => [
114
+ EditHighlightColorDialog,
115
+ { model, onClose },
116
+ ]);
117
+ },
118
+ },
119
+ {
120
+ label: 'Settings',
121
+ icon: Settings_1.default,
122
+ onClick: () => {
123
+ (0, util_1.getSession)(model).queueDialog(onClose => [
124
+ HighlightSettingsDialog,
125
+ { model, onClose },
126
+ ]);
127
+ },
128
+ },
129
+ ], children: (0, jsx_runtime_1.jsx)(Menu_1.default, {}) }), (0, jsx_runtime_1.jsx)(AssemblySelector_1.default, { model: model })] }), (0, jsx_runtime_1.jsx)(BookmarkGrid_1.default, { model: model })] }));
130
130
  });
131
131
  exports.default = GridBookmarkWidget;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { IExtendedLGV } from '../../model';
3
2
  type LGV = IExtendedLGV;
4
3
  declare const Highlight: ({ model }: {
5
4
  model: LGV;
6
- }) => React.JSX.Element[] | null;
5
+ }) => import("react/jsx-runtime").JSX.Element[] | null;
7
6
  export default Highlight;
@@ -1,32 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
30
8
  const CascadingMenuButton_1 = __importDefault(require("@jbrowse/core/ui/CascadingMenuButton"));
31
9
  const util_1 = require("@jbrowse/core/util");
32
10
  const colord_1 = require("@jbrowse/core/util/colord");
@@ -78,39 +56,34 @@ const Highlight = (0, mobx_react_1.observer)(function Highlight({ model }) {
78
56
  : undefined;
79
57
  })
80
58
  .filter(util_1.notEmpty)
81
- .map(({ left, width, highlight, label, bookmark }, idx) => (react_1.default.createElement(react_1.default.Fragment, { key: `${left}_${width}_${idx}` },
82
- react_1.default.createElement("div", { className: classes.highlight, id: "highlight", style: {
83
- left,
84
- width,
85
- background: highlight,
86
- } }),
87
- bookmarkLabelsVisible && width > 20 ? (react_1.default.createElement("div", { className: classes.bookmarkButton, style: { left } },
88
- react_1.default.createElement(CascadingMenuButton_1.default, { menuItems: [
89
- {
90
- label: 'Open bookmark widget',
91
- onClick: () => {
92
- session.showWidget(bookmarkWidget);
59
+ .map(({ left, width, highlight, label, bookmark }, idx) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: classes.highlight, id: "highlight", style: {
60
+ left,
61
+ width,
62
+ background: highlight,
63
+ } }), bookmarkLabelsVisible && width > 20 ? ((0, jsx_runtime_1.jsx)("div", { className: classes.bookmarkButton, style: { left }, children: (0, jsx_runtime_1.jsx)(CascadingMenuButton_1.default, { menuItems: [
64
+ {
65
+ label: 'Open bookmark widget',
66
+ onClick: () => {
67
+ session.showWidget(bookmarkWidget);
68
+ },
93
69
  },
94
- },
95
- {
96
- label: 'Turn off highlights',
97
- onClick: () => {
98
- bookmarkWidget.setBookmarkHighlightsVisible(false);
70
+ {
71
+ label: 'Turn off highlights',
72
+ onClick: () => {
73
+ bookmarkWidget.setBookmarkHighlightsVisible(false);
74
+ },
99
75
  },
100
- },
101
- {
102
- label: 'Remove bookmark',
103
- onClick: () => {
104
- bookmarkWidget.removeBookmarkObject(bookmark);
76
+ {
77
+ label: 'Remove bookmark',
78
+ onClick: () => {
79
+ bookmarkWidget.removeBookmarkObject(bookmark);
80
+ },
105
81
  },
106
- },
107
- ] },
108
- react_1.default.createElement(material_1.Tooltip, { title: label, arrow: true },
109
- react_1.default.createElement(Bookmark_1.default, { fontSize: "small", sx: {
110
- color: (0, colord_1.colord)(highlight).alpha() !== 0
111
- ? (0, colord_1.colord)(highlight).alpha(0.8).toRgbString()
112
- : (0, colord_1.colord)(highlight).alpha(0).toRgbString(),
113
- } }))))) : null)))
82
+ ], children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: label, arrow: true, children: (0, jsx_runtime_1.jsx)(Bookmark_1.default, { fontSize: "small", sx: {
83
+ color: (0, colord_1.colord)(highlight).alpha() !== 0
84
+ ? (0, colord_1.colord)(highlight).alpha(0.8).toRgbString()
85
+ : (0, colord_1.colord)(highlight).alpha(0).toRgbString(),
86
+ } }) }) }) })) : null] }, `${left}_${width}_${idx}`)))
114
87
  : null;
115
88
  });
116
89
  exports.default = Highlight;
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  import type { IExtendedLGV } from '../../model';
3
2
  import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
4
3
  type LGV = IExtendedLGV;
5
4
  declare const OverviewHighlight: ({ model, overview, }: {
6
5
  model: LGV;
7
6
  overview: Base1DViewModel;
8
- }) => React.JSX.Element[] | null;
7
+ }) => import("react/jsx-runtime").JSX.Element[] | null;
9
8
  export default OverviewHighlight;
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
- const react_1 = __importStar(require("react"));
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
27
5
  const util_1 = require("@jbrowse/core/util");
28
6
  const material_1 = require("@mui/material");
29
7
  const mobx_react_1 = require("mobx-react");
@@ -69,14 +47,13 @@ const OverviewHighlight = (0, mobx_react_1.observer)(function OverviewHighlight(
69
47
  .filter(util_1.notEmpty)
70
48
  .map((obj, idx) => {
71
49
  const { left, width, highlight, label } = obj;
72
- return (react_1.default.createElement(material_1.Tooltip, { key: `${JSON.stringify(obj)}-${idx}`, title: bookmarkLabelsVisible ? label : '', arrow: true },
73
- react_1.default.createElement("div", { className: classes.highlight, style: {
50
+ return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: bookmarkLabelsVisible ? label : '', arrow: true, children: (0, jsx_runtime_1.jsx)("div", { className: classes.highlight, style: {
74
51
  left,
75
52
  width,
76
53
  background: highlight,
77
54
  borderLeft: `1px solid ${highlight}`,
78
55
  borderRight: `1px solid ${highlight}`,
79
- } })));
56
+ } }) }, `${JSON.stringify(obj)}-${idx}`));
80
57
  })
81
58
  : null;
82
59
  });
@@ -4,20 +4,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = AddHighlightModelF;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const Highlight_1 = __importDefault(require("./Highlight"));
9
9
  const OverviewHighlight_1 = __importDefault(require("./OverviewHighlight"));
10
10
  function AddHighlightModelF(pluginManager) {
11
11
  pluginManager.addToExtensionPoint('LinearGenomeView-TracksContainerComponent', (rest, { model }) => {
12
12
  return [
13
13
  ...(rest || []),
14
- react_1.default.createElement(Highlight_1.default, { key: "highlight_grid_bookmark", model: model }),
14
+ (0, jsx_runtime_1.jsx)(Highlight_1.default, { model: model }, "highlight_grid_bookmark"),
15
15
  ];
16
16
  });
17
17
  pluginManager.addToExtensionPoint('LinearGenomeView-OverviewScalebarComponent', (rest, { model, overview }) => {
18
18
  return [
19
19
  ...(rest || []),
20
- react_1.default.createElement(OverviewHighlight_1.default, { key: "overview_highlight_grid_bookmark", model: model, overview: overview }),
20
+ (0, jsx_runtime_1.jsx)(OverviewHighlight_1.default, { model: model, overview: overview }, "overview_highlight_grid_bookmark"),
21
21
  ];
22
22
  });
23
23
  }
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../../model';
3
2
  declare const DeleteBookmarksDialog: ({ onClose, model, }: {
4
3
  onClose: () => void;
5
4
  model: GridBookmarkModel;
6
- }) => React.JSX.Element;
5
+ }) => import("react/jsx-runtime").JSX.Element;
7
6
  export default DeleteBookmarksDialog;
@@ -1,31 +1,20 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
4
  const ui_1 = require("@jbrowse/core/ui");
8
5
  const material_1 = require("@mui/material");
9
6
  const mobx_react_1 = require("mobx-react");
10
7
  const DeleteBookmarksDialog = (0, mobx_react_1.observer)(function ({ onClose, model, }) {
11
8
  const { selectedBookmarks } = model;
12
9
  const deleteAll = selectedBookmarks.length === 0;
13
- return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: onClose, title: "Delete bookmarks" },
14
- react_1.default.createElement(material_1.DialogContent, null,
15
- react_1.default.createElement(material_1.Alert, { severity: "warning" }, deleteAll ? (react_1.default.createElement(react_1.default.Fragment, null,
16
- react_1.default.createElement("span", null, "All bookmarks will be deleted."),
17
- react_1.default.createElement("br", null),
18
- react_1.default.createElement("span", null, "Use the checkboxes to select individual bookmarks to delete."))) : ('Only selected bookmarks will be deleted.'))),
19
- react_1.default.createElement(material_1.DialogActions, null,
20
- react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
21
- onClose();
22
- } }, "Cancel"),
23
- react_1.default.createElement(material_1.Button, { variant: "contained", color: "primary", onClick: () => {
24
- if (deleteAll) {
25
- model.clearAllBookmarks();
26
- }
27
- model.clearSelectedBookmarks();
28
- onClose();
29
- } }, "Confirm"))));
10
+ return ((0, jsx_runtime_1.jsxs)(ui_1.Dialog, { open: true, onClose: onClose, title: "Delete bookmarks", children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "warning", children: deleteAll ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: "All bookmarks will be deleted." }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("span", { children: "Use the checkboxes to select individual bookmarks to delete." })] })) : ('Only selected bookmarks will be deleted.') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
11
+ onClose();
12
+ }, children: "Cancel" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", onClick: () => {
13
+ if (deleteAll) {
14
+ model.clearAllBookmarks();
15
+ }
16
+ model.clearSelectedBookmarks();
17
+ onClose();
18
+ }, children: "Confirm" })] })] }));
30
19
  });
31
20
  exports.default = DeleteBookmarksDialog;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../../model';
3
2
  declare const EditHighlightColorDialog: ({ onClose, model, }: {
4
3
  onClose: () => void;
5
4
  model: GridBookmarkModel;
6
- }) => React.JSX.Element;
5
+ }) => import("react/jsx-runtime").JSX.Element;
7
6
  export default EditHighlightColorDialog;