@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,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import ColorPicker from '@jbrowse/core/ui/ColorPicker';
3
3
  import { assembleLocString, getSession, measureGridWidth, measureText, } from '@jbrowse/core/util';
4
4
  import { Link } from '@mui/material';
@@ -37,8 +37,7 @@ const BookmarkGrid = observer(function ({ model, }) {
37
37
  Math.max(measureText('Assembly', 12) + 30, measureGridWidth(rows.map(row => row.assemblyName))),
38
38
  100,
39
39
  ];
40
- return (React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
41
- React.createElement(DataGrid, { density: "compact", rows: rows, columns: [
40
+ return (_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsx(DataGrid, { density: "compact", rows: rows, columns: [
42
41
  {
43
42
  ...GRID_CHECKBOX_SELECTION_COL_DEF,
44
43
  width: widths[0],
@@ -47,11 +46,11 @@ const BookmarkGrid = observer(function ({ model, }) {
47
46
  field: 'locString',
48
47
  headerName: 'Bookmark link',
49
48
  width: widths[1],
50
- renderCell: ({ value, row }) => (React.createElement(Link, { className: classes.cell, href: "#", onClick: async (event) => {
49
+ renderCell: ({ value, row }) => (_jsx(Link, { className: classes.cell, href: "#", onClick: async (event) => {
51
50
  event.preventDefault();
52
51
  const { views } = session;
53
52
  await navToBookmark(value, row.assemblyName, views, model);
54
- } }, value)),
53
+ }, children: value })),
55
54
  },
56
55
  {
57
56
  field: 'label',
@@ -68,7 +67,7 @@ const BookmarkGrid = observer(function ({ model, }) {
68
67
  field: 'highlight',
69
68
  headerName: 'Highlight',
70
69
  width: widths[4],
71
- renderCell: ({ value, row }) => (React.createElement(ColorPicker, { color: value || 'black', onChange: event => {
70
+ renderCell: ({ value, row }) => (_jsx(ColorPicker, { color: value || 'black', onChange: event => {
72
71
  model.updateBookmarkHighlight(row, event);
73
72
  } })),
74
73
  },
@@ -84,6 +83,6 @@ const BookmarkGrid = observer(function ({ model, }) {
84
83
  ...rows[value],
85
84
  })));
86
85
  }
87
- }, rowSelectionModel: selectedBookmarks.map(r => r.id), disableRowSelectionOnClick: true })));
86
+ }, rowSelectionModel: selectedBookmarks.map(r => r.id), disableRowSelectionOnClick: true }) }));
88
87
  });
89
88
  export 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;
@@ -1,4 +1,5 @@
1
- import React, { lazy } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { lazy } from 'react';
2
3
  import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
3
4
  import { getSession } from '@jbrowse/core/util';
4
5
  import Delete from '@mui/icons-material/Delete';
@@ -26,78 +27,67 @@ const useStyles = makeStyles()({
26
27
  });
27
28
  const GridBookmarkWidget = observer(function GridBookmarkWidget({ model, }) {
28
29
  const { classes } = useStyles();
29
- return (React.createElement("div", null,
30
- React.createElement(Alert, { severity: "info" },
31
- "Click and type within the ",
32
- React.createElement("strong", null, "label"),
33
- " field to annotate your bookmark. Double click the ",
34
- React.createElement("strong", null, "label"),
35
- " field to do so within a dialog."),
36
- React.createElement("div", { className: classes.flex },
37
- React.createElement(CascadingMenuButton, { "data-testid": "grid_bookmark_menu", menuItems: [
38
- {
39
- label: 'Export',
40
- icon: GetApp,
41
- onClick: () => {
42
- getSession(model).queueDialog(onClose => [
43
- ExportBookmarksDialog,
44
- { onClose, model },
45
- ]);
46
- },
47
- },
48
- {
49
- label: 'Import',
50
- icon: Publish,
51
- onClick: () => {
52
- getSession(model).queueDialog(onClose => [
53
- ImportBookmarksDialog,
54
- { model, onClose },
55
- ]);
56
- },
57
- },
58
- {
59
- label: 'Delete',
60
- icon: Delete,
61
- onClick: () => {
62
- getSession(model).queueDialog(onClose => [
63
- DeleteBookmarksDialog,
64
- { model, onClose },
65
- ]);
66
- },
67
- },
68
- {
69
- label: 'Share',
70
- icon: Share,
71
- onClick: () => {
72
- getSession(model).queueDialog(onClose => [
73
- ShareBookmarksDialog,
74
- { model, onClose },
75
- ]);
76
- },
77
- },
78
- {
79
- label: 'Edit colors',
80
- icon: Palette,
81
- onClick: () => {
82
- getSession(model).queueDialog(onClose => [
83
- EditHighlightColorDialog,
84
- { model, onClose },
85
- ]);
86
- },
87
- },
88
- {
89
- label: 'Settings',
90
- icon: Settings,
91
- onClick: () => {
92
- getSession(model).queueDialog(onClose => [
93
- HighlightSettingsDialog,
94
- { model, onClose },
95
- ]);
96
- },
97
- },
98
- ] },
99
- React.createElement(Menu, null)),
100
- React.createElement(AssemblySelector, { model: model })),
101
- React.createElement(BookmarkGrid, { model: model })));
30
+ return (_jsxs("div", { children: [_jsxs(Alert, { severity: "info", children: ["Click and type within the ", _jsx("strong", { children: "label" }), " field to annotate your bookmark. Double click the ", _jsx("strong", { children: "label" }), " field to do so within a dialog."] }), _jsxs("div", { className: classes.flex, children: [_jsx(CascadingMenuButton, { "data-testid": "grid_bookmark_menu", menuItems: [
31
+ {
32
+ label: 'Export',
33
+ icon: GetApp,
34
+ onClick: () => {
35
+ getSession(model).queueDialog(onClose => [
36
+ ExportBookmarksDialog,
37
+ { onClose, model },
38
+ ]);
39
+ },
40
+ },
41
+ {
42
+ label: 'Import',
43
+ icon: Publish,
44
+ onClick: () => {
45
+ getSession(model).queueDialog(onClose => [
46
+ ImportBookmarksDialog,
47
+ { model, onClose },
48
+ ]);
49
+ },
50
+ },
51
+ {
52
+ label: 'Delete',
53
+ icon: Delete,
54
+ onClick: () => {
55
+ getSession(model).queueDialog(onClose => [
56
+ DeleteBookmarksDialog,
57
+ { model, onClose },
58
+ ]);
59
+ },
60
+ },
61
+ {
62
+ label: 'Share',
63
+ icon: Share,
64
+ onClick: () => {
65
+ getSession(model).queueDialog(onClose => [
66
+ ShareBookmarksDialog,
67
+ { model, onClose },
68
+ ]);
69
+ },
70
+ },
71
+ {
72
+ label: 'Edit colors',
73
+ icon: Palette,
74
+ onClick: () => {
75
+ getSession(model).queueDialog(onClose => [
76
+ EditHighlightColorDialog,
77
+ { model, onClose },
78
+ ]);
79
+ },
80
+ },
81
+ {
82
+ label: 'Settings',
83
+ icon: Settings,
84
+ onClick: () => {
85
+ getSession(model).queueDialog(onClose => [
86
+ HighlightSettingsDialog,
87
+ { model, onClose },
88
+ ]);
89
+ },
90
+ },
91
+ ], children: _jsx(Menu, {}) }), _jsx(AssemblySelector, { model: model })] }), _jsx(BookmarkGrid, { model: model })] }));
102
92
  });
103
93
  export 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,4 +1,5 @@
1
- import React, { useEffect } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment, useEffect } from 'react';
2
3
  import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
3
4
  import { getSession, notEmpty } from '@jbrowse/core/util';
4
5
  import { colord } from '@jbrowse/core/util/colord';
@@ -50,39 +51,34 @@ const Highlight = observer(function Highlight({ model }) {
50
51
  : undefined;
51
52
  })
52
53
  .filter(notEmpty)
53
- .map(({ left, width, highlight, label, bookmark }, idx) => (React.createElement(React.Fragment, { key: `${left}_${width}_${idx}` },
54
- React.createElement("div", { className: classes.highlight, id: "highlight", style: {
55
- left,
56
- width,
57
- background: highlight,
58
- } }),
59
- bookmarkLabelsVisible && width > 20 ? (React.createElement("div", { className: classes.bookmarkButton, style: { left } },
60
- React.createElement(CascadingMenuButton, { menuItems: [
61
- {
62
- label: 'Open bookmark widget',
63
- onClick: () => {
64
- session.showWidget(bookmarkWidget);
54
+ .map(({ left, width, highlight, label, bookmark }, idx) => (_jsxs(Fragment, { children: [_jsx("div", { className: classes.highlight, id: "highlight", style: {
55
+ left,
56
+ width,
57
+ background: highlight,
58
+ } }), bookmarkLabelsVisible && width > 20 ? (_jsx("div", { className: classes.bookmarkButton, style: { left }, children: _jsx(CascadingMenuButton, { menuItems: [
59
+ {
60
+ label: 'Open bookmark widget',
61
+ onClick: () => {
62
+ session.showWidget(bookmarkWidget);
63
+ },
65
64
  },
66
- },
67
- {
68
- label: 'Turn off highlights',
69
- onClick: () => {
70
- bookmarkWidget.setBookmarkHighlightsVisible(false);
65
+ {
66
+ label: 'Turn off highlights',
67
+ onClick: () => {
68
+ bookmarkWidget.setBookmarkHighlightsVisible(false);
69
+ },
71
70
  },
72
- },
73
- {
74
- label: 'Remove bookmark',
75
- onClick: () => {
76
- bookmarkWidget.removeBookmarkObject(bookmark);
71
+ {
72
+ label: 'Remove bookmark',
73
+ onClick: () => {
74
+ bookmarkWidget.removeBookmarkObject(bookmark);
75
+ },
77
76
  },
78
- },
79
- ] },
80
- React.createElement(Tooltip, { title: label, arrow: true },
81
- React.createElement(BookmarkIcon, { fontSize: "small", sx: {
82
- color: colord(highlight).alpha() !== 0
83
- ? colord(highlight).alpha(0.8).toRgbString()
84
- : colord(highlight).alpha(0).toRgbString(),
85
- } }))))) : null)))
77
+ ], children: _jsx(Tooltip, { title: label, arrow: true, children: _jsx(BookmarkIcon, { fontSize: "small", sx: {
78
+ color: colord(highlight).alpha() !== 0
79
+ ? colord(highlight).alpha(0.8).toRgbString()
80
+ : colord(highlight).alpha(0).toRgbString(),
81
+ } }) }) }) })) : null] }, `${left}_${width}_${idx}`)))
86
82
  : null;
87
83
  });
88
84
  export 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,4 +1,5 @@
1
- import React, { useEffect } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect } from 'react';
2
3
  import { getSession, notEmpty } from '@jbrowse/core/util';
3
4
  import { Tooltip } from '@mui/material';
4
5
  import { observer } from 'mobx-react';
@@ -44,14 +45,13 @@ const OverviewHighlight = observer(function OverviewHighlight({ model, overview,
44
45
  .filter(notEmpty)
45
46
  .map((obj, idx) => {
46
47
  const { left, width, highlight, label } = obj;
47
- return (React.createElement(Tooltip, { key: `${JSON.stringify(obj)}-${idx}`, title: bookmarkLabelsVisible ? label : '', arrow: true },
48
- React.createElement("div", { className: classes.highlight, style: {
48
+ return (_jsx(Tooltip, { title: bookmarkLabelsVisible ? label : '', arrow: true, children: _jsx("div", { className: classes.highlight, style: {
49
49
  left,
50
50
  width,
51
51
  background: highlight,
52
52
  borderLeft: `1px solid ${highlight}`,
53
53
  borderRight: `1px solid ${highlight}`,
54
- } })));
54
+ } }) }, `${JSON.stringify(obj)}-${idx}`));
55
55
  })
56
56
  : null;
57
57
  });
@@ -1,17 +1,17 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Highlight from './Highlight';
3
3
  import OverviewHighlight from './OverviewHighlight';
4
4
  export default function AddHighlightModelF(pluginManager) {
5
5
  pluginManager.addToExtensionPoint('LinearGenomeView-TracksContainerComponent', (rest, { model }) => {
6
6
  return [
7
7
  ...(rest || []),
8
- React.createElement(Highlight, { key: "highlight_grid_bookmark", model: model }),
8
+ _jsx(Highlight, { model: model }, "highlight_grid_bookmark"),
9
9
  ];
10
10
  });
11
11
  pluginManager.addToExtensionPoint('LinearGenomeView-OverviewScalebarComponent', (rest, { model, overview }) => {
12
12
  return [
13
13
  ...(rest || []),
14
- React.createElement(OverviewHighlight, { key: "overview_highlight_grid_bookmark", model: model, overview: overview }),
14
+ _jsx(OverviewHighlight, { model: model, overview: overview }, "overview_highlight_grid_bookmark"),
15
15
  ];
16
16
  });
17
17
  }
@@ -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,26 +1,18 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Dialog } from '@jbrowse/core/ui';
3
3
  import { Alert, Button, DialogActions, DialogContent } from '@mui/material';
4
4
  import { observer } from 'mobx-react';
5
5
  const DeleteBookmarksDialog = observer(function ({ onClose, model, }) {
6
6
  const { selectedBookmarks } = model;
7
7
  const deleteAll = selectedBookmarks.length === 0;
8
- return (React.createElement(Dialog, { open: true, onClose: onClose, title: "Delete bookmarks" },
9
- React.createElement(DialogContent, null,
10
- React.createElement(Alert, { severity: "warning" }, deleteAll ? (React.createElement(React.Fragment, null,
11
- React.createElement("span", null, "All bookmarks will be deleted."),
12
- React.createElement("br", null),
13
- React.createElement("span", null, "Use the checkboxes to select individual bookmarks to delete."))) : ('Only selected bookmarks will be deleted.'))),
14
- React.createElement(DialogActions, null,
15
- React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
16
- onClose();
17
- } }, "Cancel"),
18
- React.createElement(Button, { variant: "contained", color: "primary", onClick: () => {
19
- if (deleteAll) {
20
- model.clearAllBookmarks();
21
- }
22
- model.clearSelectedBookmarks();
23
- onClose();
24
- } }, "Confirm"))));
8
+ return (_jsxs(Dialog, { open: true, onClose: onClose, title: "Delete bookmarks", children: [_jsx(DialogContent, { children: _jsx(Alert, { severity: "warning", children: deleteAll ? (_jsxs(_Fragment, { children: [_jsx("span", { children: "All bookmarks will be deleted." }), _jsx("br", {}), _jsx("span", { children: "Use the checkboxes to select individual bookmarks to delete." })] })) : ('Only selected bookmarks will be deleted.') }) }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
9
+ onClose();
10
+ }, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", onClick: () => {
11
+ if (deleteAll) {
12
+ model.clearAllBookmarks();
13
+ }
14
+ model.clearSelectedBookmarks();
15
+ onClose();
16
+ }, children: "Confirm" })] })] }));
25
17
  });
26
18
  export 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;
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Dialog } from '@jbrowse/core/ui';
3
4
  import { ColorPicker } from '@jbrowse/core/ui/ColorPicker';
4
5
  import { Alert, Button, DialogActions, DialogContent, Typography, } from '@mui/material';
@@ -8,20 +9,13 @@ const EditHighlightColorDialog = observer(function ({ onClose, model, }) {
8
9
  const { selectedBookmarks } = model;
9
10
  const editNone = selectedBookmarks.length === 0;
10
11
  const [color, setColor] = useState((_b = (_a = selectedBookmarks[0]) === null || _a === void 0 ? void 0 : _a.highlight) !== null && _b !== void 0 ? _b : 'rgba(247, 129, 192, 0.35)');
11
- return (React.createElement(Dialog, { open: true, onClose: onClose, title: "Highlight bookmarks" },
12
- React.createElement(DialogContent, null,
13
- React.createElement(Typography, { variant: "h6" }, "Bulk highlight selector"),
14
- React.createElement(Alert, { severity: "info" }, editNone ? (React.createElement("span", null, "Use the checkboxes to select individual bookmarks to edit.")) : ('Only selected bookmarks will be edited.')),
15
- !editNone ? (React.createElement(ColorPicker, { color: color, onChange: event => {
16
- setColor(event);
17
- } })) : null),
18
- React.createElement(DialogActions, null,
19
- React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
20
- onClose();
21
- } }, "Cancel"),
22
- React.createElement(Button, { variant: "contained", color: "primary", onClick: () => {
23
- model.updateBulkBookmarkHighlights(color);
24
- onClose();
25
- } }, "Confirm"))));
12
+ return (_jsxs(Dialog, { open: true, onClose: onClose, title: "Highlight bookmarks", children: [_jsxs(DialogContent, { children: [_jsx(Typography, { variant: "h6", children: "Bulk highlight selector" }), _jsx(Alert, { severity: "info", children: editNone ? (_jsx("span", { children: "Use the checkboxes to select individual bookmarks to edit." })) : ('Only selected bookmarks will be edited.') }), !editNone ? (_jsx(ColorPicker, { color: color, onChange: event => {
13
+ setColor(event);
14
+ } })) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
15
+ onClose();
16
+ }, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", onClick: () => {
17
+ model.updateBulkBookmarkHighlights(color);
18
+ onClose();
19
+ }, children: "Confirm" })] })] }));
26
20
  });
27
21
  export default EditHighlightColorDialog;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../../model';
3
2
  declare const ExportBookmarksDialog: ({ model, onClose, }: {
4
3
  model: GridBookmarkModel;
5
4
  onClose: () => void;
6
- }) => React.JSX.Element;
5
+ }) => import("react/jsx-runtime").JSX.Element;
7
6
  export default ExportBookmarksDialog;
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Dialog } from '@jbrowse/core/ui';
3
4
  import GetAppIcon from '@mui/icons-material/GetApp';
4
5
  import { Alert, Button, DialogActions, DialogContent, MenuItem, Select, Typography, } from '@mui/material';
@@ -22,25 +23,13 @@ const ExportBookmarksDialog = observer(function ({ model, onClose, }) {
22
23
  const [fileType, setFileType] = useState('BED');
23
24
  const { selectedBookmarks } = model;
24
25
  const exportAll = selectedBookmarks.length === 0;
25
- return (React.createElement(Dialog, { open: true, onClose: () => {
26
+ return (_jsxs(Dialog, { open: true, onClose: () => {
26
27
  onClose();
27
- }, title: "Export bookmarks" },
28
- React.createElement(DialogContent, { className: classes.container },
29
- React.createElement(Alert, { severity: "info" }, exportAll ? (React.createElement(React.Fragment, null,
30
- React.createElement("span", null, "All bookmarks will be exported."),
31
- React.createElement("br", null),
32
- React.createElement("span", null, "Use the checkboxes to select individual bookmarks to export."))) : ('Only selected bookmarks will be exported.')),
33
- React.createElement("div", { className: classes.flexItem },
34
- React.createElement(Typography, null, "Format to download:"),
35
- React.createElement(Select, { size: "small", value: fileType, onChange: event => {
36
- setFileType(event.target.value);
37
- } },
38
- React.createElement(MenuItem, { value: "BED" }, "BED"),
39
- React.createElement(MenuItem, { value: "TSV" }, "TSV")))),
40
- React.createElement(DialogActions, null,
41
- React.createElement(Button, { variant: "contained", color: "primary", startIcon: React.createElement(GetAppIcon, null), onClick: () => {
42
- downloadBookmarkFile(fileType, model);
43
- onClose();
44
- } }, "Download"))));
28
+ }, title: "Export bookmarks", children: [_jsxs(DialogContent, { className: classes.container, children: [_jsx(Alert, { severity: "info", children: exportAll ? (_jsxs(_Fragment, { children: [_jsx("span", { children: "All bookmarks will be exported." }), _jsx("br", {}), _jsx("span", { children: "Use the checkboxes to select individual bookmarks to export." })] })) : ('Only selected bookmarks will be exported.') }), _jsxs("div", { className: classes.flexItem, children: [_jsx(Typography, { children: "Format to download:" }), _jsxs(Select, { size: "small", value: fileType, onChange: event => {
29
+ setFileType(event.target.value);
30
+ }, children: [_jsx(MenuItem, { value: "BED", children: "BED" }), _jsx(MenuItem, { value: "TSV", children: "TSV" })] })] })] }), _jsx(DialogActions, { children: _jsx(Button, { variant: "contained", color: "primary", startIcon: _jsx(GetAppIcon, {}), onClick: () => {
31
+ downloadBookmarkFile(fileType, model);
32
+ onClose();
33
+ }, children: "Download" }) })] }));
45
34
  });
46
35
  export default ExportBookmarksDialog;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../../model';
3
2
  declare const HighlightSettingsDialog: ({ 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 HighlightSettingsDialog;
@@ -1,24 +1,14 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Dialog } from '@jbrowse/core/ui';
3
3
  import { Button, DialogActions, DialogContent, Stack, Switch, Typography, } from '@mui/material';
4
4
  import { observer } from 'mobx-react';
5
5
  const HighlightSettingsDialog = observer(function ({ onClose, model, }) {
6
- return (React.createElement(Dialog, { open: true, onClose: onClose, title: "Highlight bookmarks" },
7
- React.createElement(DialogContent, null,
8
- React.createElement(Typography, { variant: "h6" }, "Highlight toggles"),
9
- React.createElement(Stack, { direction: "row", alignItems: "center" },
10
- React.createElement(Switch, { "data-testid": "toggle_highlight_all_switch", checked: model.areBookmarksHighlightedOnAllOpenViews, onChange: () => {
11
- model.setBookmarkHighlightsVisible(!model.areBookmarksHighlightedOnAllOpenViews);
12
- } }),
13
- React.createElement(Typography, null, "Toggle bookmark highlights on all open views")),
14
- React.createElement(Stack, { direction: "row", alignItems: "center" },
15
- React.createElement(Switch, { "data-testid": "toggle_highlight_label_all_switch", checked: model.areBookmarksHighlightLabelsOnAllOpenViews, onChange: () => {
16
- model.setBookmarkLabelsVisible(!model.areBookmarksHighlightLabelsOnAllOpenViews);
17
- } }),
18
- React.createElement(Typography, null, "Toggle 'bookmark' icon on LGV tracks"))),
19
- React.createElement(DialogActions, null,
20
- React.createElement(Button, { variant: "contained", color: "primary", onClick: () => {
21
- onClose();
22
- } }, "Close"))));
6
+ return (_jsxs(Dialog, { open: true, onClose: onClose, title: "Highlight bookmarks", children: [_jsxs(DialogContent, { children: [_jsx(Typography, { variant: "h6", children: "Highlight toggles" }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Switch, { "data-testid": "toggle_highlight_all_switch", checked: model.areBookmarksHighlightedOnAllOpenViews, onChange: () => {
7
+ model.setBookmarkHighlightsVisible(!model.areBookmarksHighlightedOnAllOpenViews);
8
+ } }), _jsx(Typography, { children: "Toggle bookmark highlights on all open views" })] }), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(Switch, { "data-testid": "toggle_highlight_label_all_switch", checked: model.areBookmarksHighlightLabelsOnAllOpenViews, onChange: () => {
9
+ model.setBookmarkLabelsVisible(!model.areBookmarksHighlightLabelsOnAllOpenViews);
10
+ } }), _jsx(Typography, { children: "Toggle 'bookmark' icon on LGV tracks" })] })] }), _jsx(DialogActions, { children: _jsx(Button, { variant: "contained", color: "primary", onClick: () => {
11
+ onClose();
12
+ }, children: "Close" }) })] }));
23
13
  });
24
14
  export default HighlightSettingsDialog;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { GridBookmarkModel } from '../../model';
3
2
  declare const ImportBookmarksDialog: ({ 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 ImportBookmarksDialog;