@jbrowse/embedded-core 2.18.0 → 3.0.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/ui/EmbeddedViewContainer.d.ts +1 -2
- package/dist/ui/EmbeddedViewContainer.js +4 -32
- package/dist/ui/ModalWidget.d.ts +1 -2
- package/dist/ui/ModalWidget.js +5 -31
- package/dist/ui/VersionAboutDialog.d.ts +1 -2
- package/dist/ui/VersionAboutDialog.js +2 -17
- package/dist/ui/ViewMenu.d.ts +1 -2
- package/dist/ui/ViewMenu.js +4 -7
- package/dist/ui/ViewTitle.d.ts +1 -2
- package/dist/ui/ViewTitle.js +27 -25
- package/esm/ui/EmbeddedViewContainer.d.ts +1 -2
- package/esm/ui/EmbeddedViewContainer.js +4 -9
- package/esm/ui/ModalWidget.d.ts +1 -2
- package/esm/ui/ModalWidget.js +5 -8
- package/esm/ui/VersionAboutDialog.d.ts +1 -2
- package/esm/ui/VersionAboutDialog.js +2 -14
- package/esm/ui/ViewMenu.d.ts +1 -2
- package/esm/ui/ViewMenu.js +4 -7
- package/esm/ui/ViewTitle.d.ts +1 -2
- package/esm/ui/ViewTitle.js +10 -18
- package/package.json +4 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
|
|
3
2
|
declare const ViewContainerWrapper: ({ view, children, }: {
|
|
4
3
|
view: IBaseViewModel;
|
|
5
4
|
children: React.ReactNode;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default ViewContainerWrapper;
|
|
@@ -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
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
30
8
|
const util_1 = require("@jbrowse/core/util");
|
|
31
9
|
const material_1 = require("@mui/material");
|
|
32
10
|
const mobx_react_1 = require("mobx-react");
|
|
@@ -48,16 +26,10 @@ const ViewContainer = (0, mobx_react_1.observer)(function ({ view, children, })
|
|
|
48
26
|
const session = (0, util_1.getSession)(view);
|
|
49
27
|
const theme = (0, material_1.useTheme)();
|
|
50
28
|
const ref = (0, util_1.useWidthSetter)(view, theme.spacing(1));
|
|
51
|
-
return (
|
|
52
|
-
session.DialogComponent ? (react_1.default.createElement(react_1.Suspense, { fallback: null },
|
|
53
|
-
react_1.default.createElement(session.DialogComponent, { ...session.DialogProps }))) : null,
|
|
54
|
-
react_1.default.createElement(ViewTitle_1.default, { view: view }),
|
|
55
|
-
react_1.default.createElement(material_1.Paper, null, children)));
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { elevation: 12, ref: ref, className: classes.viewContainer, children: [session.DialogComponent ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(session.DialogComponent, { ...session.DialogProps }) })) : null, (0, jsx_runtime_1.jsx)(ViewTitle_1.default, { view: view }), (0, jsx_runtime_1.jsx)(material_1.Paper, { children: children })] }));
|
|
56
30
|
});
|
|
57
31
|
const ViewContainerWrapper = (0, mobx_react_1.observer)(function ({ view, children, }) {
|
|
58
32
|
const { classes } = useStyles();
|
|
59
|
-
return (
|
|
60
|
-
react_1.default.createElement(material_1.ScopedCssBaseline, null,
|
|
61
|
-
react_1.default.createElement(ViewContainer, { view: view }, children))));
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classes.avoidParentStyle, children: (0, jsx_runtime_1.jsx)(material_1.ScopedCssBaseline, { children: (0, jsx_runtime_1.jsx)(ViewContainer, { view: view, children: children }) }) }));
|
|
62
34
|
});
|
|
63
35
|
exports.default = ViewContainerWrapper;
|
package/dist/ui/ModalWidget.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { SessionWithWidgets } from '@jbrowse/core/util';
|
|
3
2
|
declare const ModalWidget: ({ session, }: {
|
|
4
3
|
session: SessionWithWidgets;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
5
|
export default ModalWidget;
|
package/dist/ui/ModalWidget.js
CHANGED
|
@@ -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
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
27
5
|
const ui_1 = require("@jbrowse/core/ui");
|
|
28
6
|
const material_1 = require("@mui/material");
|
|
29
7
|
const mobx_react_1 = require("mobx-react");
|
|
@@ -46,15 +24,11 @@ const ModalWidget = (0, mobx_react_1.observer)(function ({ session, }) {
|
|
|
46
24
|
session,
|
|
47
25
|
model: visibleWidget,
|
|
48
26
|
});
|
|
49
|
-
return (
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Dialog, { open: true, onClose: () => {
|
|
50
28
|
session.hideAllWidgets();
|
|
51
|
-
}, maxWidth: "xl", header:
|
|
52
|
-
react_1.default.createElement(material_1.Toolbar, null, HeadingComponent ? (react_1.default.createElement(HeadingComponent, { model: visibleWidget })) : (react_1.default.createElement(material_1.Typography, { variant: "h6" }, heading)))) },
|
|
53
|
-
react_1.default.createElement(react_1.Suspense, { fallback: react_1.default.createElement("div", null, "Loading...") },
|
|
54
|
-
react_1.default.createElement(material_1.Paper, { className: classes.paper },
|
|
55
|
-
react_1.default.createElement(Component, { model: visibleWidget, session: session, overrideDimensions: {
|
|
29
|
+
}, maxWidth: "xl", header: (0, jsx_runtime_1.jsx)(material_1.AppBar, { position: "static", children: (0, jsx_runtime_1.jsx)(material_1.Toolbar, { children: HeadingComponent ? ((0, jsx_runtime_1.jsx)(HeadingComponent, { model: visibleWidget })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", children: heading })) }) }), children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)("div", { children: "Loading..." }), children: (0, jsx_runtime_1.jsx)(material_1.Paper, { className: classes.paper, children: (0, jsx_runtime_1.jsx)(Component, { model: visibleWidget, session: session, overrideDimensions: {
|
|
56
30
|
height: (window.innerHeight * 5) / 8,
|
|
57
31
|
width: 800,
|
|
58
|
-
} })))));
|
|
32
|
+
} }) }) }) }));
|
|
59
33
|
});
|
|
60
34
|
exports.default = ModalWidget;
|
|
@@ -1,10 +1,7 @@
|
|
|
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
3
|
exports.default = AboutDialog;
|
|
7
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const ui_1 = require("@jbrowse/core/ui");
|
|
9
6
|
const material_1 = require("@mui/material");
|
|
10
7
|
const mui_1 = require("tss-react/mui");
|
|
@@ -15,17 +12,5 @@ const useStyles = (0, mui_1.makeStyles)()({
|
|
|
15
12
|
});
|
|
16
13
|
function AboutDialog({ open, version, onClose, }) {
|
|
17
14
|
const { classes } = useStyles();
|
|
18
|
-
return (
|
|
19
|
-
react_1.default.createElement(material_1.DialogContent, { className: classes.content },
|
|
20
|
-
react_1.default.createElement(material_1.Typography, null, "JBrowse is a GMOD project \u00A9 2019-2021, The Evolutionary Software Foundation"),
|
|
21
|
-
react_1.default.createElement(material_1.Typography, null, "Here are some resources and documentation. Please report the version number above when asking questions. Thanks!"),
|
|
22
|
-
react_1.default.createElement("ul", null,
|
|
23
|
-
react_1.default.createElement("li", null,
|
|
24
|
-
react_1.default.createElement(material_1.Link, { href: "https://github.com/GMOD/jbrowse-components/discussions", target: "_blank", rel: "noopener noreferrer" }, "Question & answer forum")),
|
|
25
|
-
react_1.default.createElement("li", null,
|
|
26
|
-
react_1.default.createElement(material_1.Link, { href: "https://github.com/GMOD/jbrowse-components/issues/new/choose", target: "_blank", rel: "noopener noreferrer" }, "Report a bug")),
|
|
27
|
-
react_1.default.createElement("li", null,
|
|
28
|
-
react_1.default.createElement(material_1.Link, { href: "https://jbrowse.org/jb2/docs/user_guide", target: "_blank", rel: "noopener noreferrer" }, "User guide")),
|
|
29
|
-
react_1.default.createElement("li", null,
|
|
30
|
-
react_1.default.createElement(material_1.Link, { href: "https://jbrowse.org/jb2/docs/", target: "_blank", rel: "noopener noreferrer" }, "Documentation"))))));
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Dialog, { open: open, onClose: onClose, maxWidth: "xl", title: `JBrowse v${version}`, children: (0, jsx_runtime_1.jsxs)(material_1.DialogContent, { className: classes.content, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "JBrowse is a GMOD project \u00A9 2019-2021, The Evolutionary Software Foundation" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Here are some resources and documentation. Please report the version number above when asking questions. Thanks!" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "https://github.com/GMOD/jbrowse-components/discussions", target: "_blank", rel: "noopener noreferrer", children: "Question & answer forum" }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "https://github.com/GMOD/jbrowse-components/issues/new/choose", target: "_blank", rel: "noopener noreferrer", children: "Report a bug" }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "https://jbrowse.org/jb2/docs/user_guide", target: "_blank", rel: "noopener noreferrer", children: "User guide" }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "https://jbrowse.org/jb2/docs/", target: "_blank", rel: "noopener noreferrer", children: "Documentation" }) })] })] }) }));
|
|
31
16
|
}
|
package/dist/ui/ViewMenu.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
|
|
3
2
|
import type { IconButtonProps as IconButtonPropsType, SvgIconProps } from '@mui/material';
|
|
4
3
|
declare const ViewMenu: ({ model, IconButtonProps, IconProps, }: {
|
|
5
4
|
model: IBaseViewModel;
|
|
6
5
|
IconButtonProps: IconButtonPropsType;
|
|
7
6
|
IconProps: SvgIconProps;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default ViewMenu;
|
package/dist/ui/ViewMenu.js
CHANGED
|
@@ -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
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const ui_1 = require("@jbrowse/core/ui");
|
|
8
8
|
const Menu_1 = __importDefault(require("@mui/icons-material/Menu"));
|
|
9
9
|
const material_1 = require("@mui/material");
|
|
@@ -14,11 +14,8 @@ const ViewMenu = (0, mobx_react_1.observer)(function ({ model, IconButtonProps,
|
|
|
14
14
|
popupId: 'viewMenu',
|
|
15
15
|
variant: 'popover',
|
|
16
16
|
});
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
react_1.default.createElement(ui_1.CascadingMenu, { ...(0, hooks_1.bindPopover)(popupState), onMenuItemClick: (_event, callback) => {
|
|
21
|
-
callback();
|
|
22
|
-
}, menuItems: model.menuItems(), popupState: popupState })));
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { ...IconButtonProps, ...(0, hooks_1.bindTrigger)(popupState), "data-testid": "view_menu_icon", children: (0, jsx_runtime_1.jsx)(Menu_1.default, { ...IconProps }) }), (0, jsx_runtime_1.jsx)(ui_1.CascadingMenu, { ...(0, hooks_1.bindPopover)(popupState), onMenuItemClick: (_event, callback) => {
|
|
18
|
+
callback();
|
|
19
|
+
}, menuItems: model.menuItems(), popupState: popupState })] }));
|
|
23
20
|
});
|
|
24
21
|
exports.default = ViewMenu;
|
package/dist/ui/ViewTitle.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
|
|
3
2
|
declare const ViewTitle: ({ view }: {
|
|
4
3
|
view: IBaseViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default ViewTitle;
|
package/dist/ui/ViewTitle.js
CHANGED
|
@@ -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 (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
const react_1 = require("react");
|
|
30
41
|
const ui_1 = require("@jbrowse/core/ui");
|
|
31
42
|
const util_1 = require("@jbrowse/core/util");
|
|
32
43
|
const material_1 = require("@mui/material");
|
|
@@ -62,22 +73,13 @@ const ViewTitle = (0, mobx_react_1.observer)(({ view }) => {
|
|
|
62
73
|
const { displayName } = view;
|
|
63
74
|
const [dialogOpen, setDialogOpen] = (0, react_1.useState)(false);
|
|
64
75
|
const session = (0, util_1.getSession)(view);
|
|
65
|
-
return (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
74
|
-
setDialogOpen(true);
|
|
75
|
-
} },
|
|
76
|
-
react_1.default.createElement("div", { style: { width: 22, height: 22 } },
|
|
77
|
-
react_1.default.createElement(ui_1.Logomark, { variant: "white" }))),
|
|
78
|
-
dialogOpen ? (react_1.default.createElement(react_1.Suspense, { fallback: null },
|
|
79
|
-
react_1.default.createElement(VersionAboutDialog, { open: true, onClose: () => {
|
|
80
|
-
setDialogOpen(false);
|
|
81
|
-
}, version: session.version }))) : null));
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.container, children: [(0, jsx_runtime_1.jsx)(ViewMenu_1.default, { model: view, IconButtonProps: {
|
|
77
|
+
classes: { root: classes.iconRoot },
|
|
78
|
+
edge: 'start',
|
|
79
|
+
}, IconProps: { className: classes.icon } }), (0, jsx_runtime_1.jsx)("div", { className: classes.grow }), displayName ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", className: classes.displayName, children: displayName })) : null, (0, jsx_runtime_1.jsx)("div", { className: classes.grow }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
80
|
+
setDialogOpen(true);
|
|
81
|
+
}, children: (0, jsx_runtime_1.jsx)("div", { style: { width: 22, height: 22 }, children: (0, jsx_runtime_1.jsx)(ui_1.Logomark, { variant: "white" }) }) }), dialogOpen ? ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(VersionAboutDialog, { open: true, onClose: () => {
|
|
82
|
+
setDialogOpen(false);
|
|
83
|
+
}, version: session.version }) })) : null] }));
|
|
82
84
|
});
|
|
83
85
|
exports.default = ViewTitle;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
|
|
3
2
|
declare const ViewContainerWrapper: ({ view, children, }: {
|
|
4
3
|
view: IBaseViewModel;
|
|
5
4
|
children: React.ReactNode;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default ViewContainerWrapper;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from 'react';
|
|
2
3
|
import { getSession, useWidthSetter } from '@jbrowse/core/util';
|
|
3
4
|
import { Paper, ScopedCssBaseline, useTheme } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
@@ -20,16 +21,10 @@ const ViewContainer = observer(function ({ view, children, }) {
|
|
|
20
21
|
const session = getSession(view);
|
|
21
22
|
const theme = useTheme();
|
|
22
23
|
const ref = useWidthSetter(view, theme.spacing(1));
|
|
23
|
-
return (
|
|
24
|
-
session.DialogComponent ? (React.createElement(Suspense, { fallback: null },
|
|
25
|
-
React.createElement(session.DialogComponent, { ...session.DialogProps }))) : null,
|
|
26
|
-
React.createElement(ViewTitle, { view: view }),
|
|
27
|
-
React.createElement(Paper, null, children)));
|
|
24
|
+
return (_jsxs(Paper, { elevation: 12, ref: ref, className: classes.viewContainer, children: [session.DialogComponent ? (_jsx(Suspense, { fallback: null, children: _jsx(session.DialogComponent, { ...session.DialogProps }) })) : null, _jsx(ViewTitle, { view: view }), _jsx(Paper, { children: children })] }));
|
|
28
25
|
});
|
|
29
26
|
const ViewContainerWrapper = observer(function ({ view, children, }) {
|
|
30
27
|
const { classes } = useStyles();
|
|
31
|
-
return (
|
|
32
|
-
React.createElement(ScopedCssBaseline, null,
|
|
33
|
-
React.createElement(ViewContainer, { view: view }, children))));
|
|
28
|
+
return (_jsx("div", { className: classes.avoidParentStyle, children: _jsx(ScopedCssBaseline, { children: _jsx(ViewContainer, { view: view, children: children }) }) }));
|
|
34
29
|
});
|
|
35
30
|
export default ViewContainerWrapper;
|
package/esm/ui/ModalWidget.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { SessionWithWidgets } from '@jbrowse/core/util';
|
|
3
2
|
declare const ModalWidget: ({ session, }: {
|
|
4
3
|
session: SessionWithWidgets;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
5
|
export default ModalWidget;
|
package/esm/ui/ModalWidget.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from 'react';
|
|
2
3
|
import { Dialog } from '@jbrowse/core/ui';
|
|
3
4
|
import { AppBar, Paper, Toolbar, Typography } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
@@ -21,15 +22,11 @@ const ModalWidget = observer(function ({ session, }) {
|
|
|
21
22
|
session,
|
|
22
23
|
model: visibleWidget,
|
|
23
24
|
});
|
|
24
|
-
return (
|
|
25
|
+
return (_jsx(Dialog, { open: true, onClose: () => {
|
|
25
26
|
session.hideAllWidgets();
|
|
26
|
-
}, maxWidth: "xl", header:
|
|
27
|
-
React.createElement(Toolbar, null, HeadingComponent ? (React.createElement(HeadingComponent, { model: visibleWidget })) : (React.createElement(Typography, { variant: "h6" }, heading)))) },
|
|
28
|
-
React.createElement(Suspense, { fallback: React.createElement("div", null, "Loading...") },
|
|
29
|
-
React.createElement(Paper, { className: classes.paper },
|
|
30
|
-
React.createElement(Component, { model: visibleWidget, session: session, overrideDimensions: {
|
|
27
|
+
}, maxWidth: "xl", header: _jsx(AppBar, { position: "static", children: _jsx(Toolbar, { children: HeadingComponent ? (_jsx(HeadingComponent, { model: visibleWidget })) : (_jsx(Typography, { variant: "h6", children: heading })) }) }), children: _jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx(Paper, { className: classes.paper, children: _jsx(Component, { model: visibleWidget, session: session, overrideDimensions: {
|
|
31
28
|
height: (window.innerHeight * 5) / 8,
|
|
32
29
|
width: 800,
|
|
33
|
-
} })))));
|
|
30
|
+
} }) }) }) }));
|
|
34
31
|
});
|
|
35
32
|
export default ModalWidget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Dialog } from '@jbrowse/core/ui';
|
|
3
3
|
import { DialogContent, Link, Typography } from '@mui/material';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
@@ -9,17 +9,5 @@ const useStyles = makeStyles()({
|
|
|
9
9
|
});
|
|
10
10
|
export default function AboutDialog({ open, version, onClose, }) {
|
|
11
11
|
const { classes } = useStyles();
|
|
12
|
-
return (
|
|
13
|
-
React.createElement(DialogContent, { className: classes.content },
|
|
14
|
-
React.createElement(Typography, null, "JBrowse is a GMOD project \u00A9 2019-2021, The Evolutionary Software Foundation"),
|
|
15
|
-
React.createElement(Typography, null, "Here are some resources and documentation. Please report the version number above when asking questions. Thanks!"),
|
|
16
|
-
React.createElement("ul", null,
|
|
17
|
-
React.createElement("li", null,
|
|
18
|
-
React.createElement(Link, { href: "https://github.com/GMOD/jbrowse-components/discussions", target: "_blank", rel: "noopener noreferrer" }, "Question & answer forum")),
|
|
19
|
-
React.createElement("li", null,
|
|
20
|
-
React.createElement(Link, { href: "https://github.com/GMOD/jbrowse-components/issues/new/choose", target: "_blank", rel: "noopener noreferrer" }, "Report a bug")),
|
|
21
|
-
React.createElement("li", null,
|
|
22
|
-
React.createElement(Link, { href: "https://jbrowse.org/jb2/docs/user_guide", target: "_blank", rel: "noopener noreferrer" }, "User guide")),
|
|
23
|
-
React.createElement("li", null,
|
|
24
|
-
React.createElement(Link, { href: "https://jbrowse.org/jb2/docs/", target: "_blank", rel: "noopener noreferrer" }, "Documentation"))))));
|
|
12
|
+
return (_jsx(Dialog, { open: open, onClose: onClose, maxWidth: "xl", title: `JBrowse v${version}`, children: _jsxs(DialogContent, { className: classes.content, children: [_jsx(Typography, { children: "JBrowse is a GMOD project \u00A9 2019-2021, The Evolutionary Software Foundation" }), _jsx(Typography, { children: "Here are some resources and documentation. Please report the version number above when asking questions. Thanks!" }), _jsxs("ul", { children: [_jsx("li", { children: _jsx(Link, { href: "https://github.com/GMOD/jbrowse-components/discussions", target: "_blank", rel: "noopener noreferrer", children: "Question & answer forum" }) }), _jsx("li", { children: _jsx(Link, { href: "https://github.com/GMOD/jbrowse-components/issues/new/choose", target: "_blank", rel: "noopener noreferrer", children: "Report a bug" }) }), _jsx("li", { children: _jsx(Link, { href: "https://jbrowse.org/jb2/docs/user_guide", target: "_blank", rel: "noopener noreferrer", children: "User guide" }) }), _jsx("li", { children: _jsx(Link, { href: "https://jbrowse.org/jb2/docs/", target: "_blank", rel: "noopener noreferrer", children: "Documentation" }) })] })] }) }));
|
|
25
13
|
}
|
package/esm/ui/ViewMenu.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
|
|
3
2
|
import type { IconButtonProps as IconButtonPropsType, SvgIconProps } from '@mui/material';
|
|
4
3
|
declare const ViewMenu: ({ model, IconButtonProps, IconProps, }: {
|
|
5
4
|
model: IBaseViewModel;
|
|
6
5
|
IconButtonProps: IconButtonPropsType;
|
|
7
6
|
IconProps: SvgIconProps;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default ViewMenu;
|
package/esm/ui/ViewMenu.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CascadingMenu } from '@jbrowse/core/ui';
|
|
3
3
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
4
4
|
import { IconButton } from '@mui/material';
|
|
@@ -9,11 +9,8 @@ const ViewMenu = observer(function ({ model, IconButtonProps, IconProps, }) {
|
|
|
9
9
|
popupId: 'viewMenu',
|
|
10
10
|
variant: 'popover',
|
|
11
11
|
});
|
|
12
|
-
return (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
React.createElement(CascadingMenu, { ...bindPopover(popupState), onMenuItemClick: (_event, callback) => {
|
|
16
|
-
callback();
|
|
17
|
-
}, menuItems: model.menuItems(), popupState: popupState })));
|
|
12
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { ...IconButtonProps, ...bindTrigger(popupState), "data-testid": "view_menu_icon", children: _jsx(MenuIcon, { ...IconProps }) }), _jsx(CascadingMenu, { ...bindPopover(popupState), onMenuItemClick: (_event, callback) => {
|
|
13
|
+
callback();
|
|
14
|
+
}, menuItems: model.menuItems(), popupState: popupState })] }));
|
|
18
15
|
});
|
|
19
16
|
export default ViewMenu;
|
package/esm/ui/ViewTitle.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
|
|
3
2
|
declare const ViewTitle: ({ view }: {
|
|
4
3
|
view: IBaseViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default ViewTitle;
|
package/esm/ui/ViewTitle.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, lazy, useState } from 'react';
|
|
2
3
|
import { Logomark } from '@jbrowse/core/ui';
|
|
3
4
|
import { getSession } from '@jbrowse/core/util';
|
|
4
5
|
import { IconButton, Typography, alpha } from '@mui/material';
|
|
@@ -34,22 +35,13 @@ const ViewTitle = observer(({ view }) => {
|
|
|
34
35
|
const { displayName } = view;
|
|
35
36
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
36
37
|
const session = getSession(view);
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
React.createElement(IconButton, { onClick: () => {
|
|
46
|
-
setDialogOpen(true);
|
|
47
|
-
} },
|
|
48
|
-
React.createElement("div", { style: { width: 22, height: 22 } },
|
|
49
|
-
React.createElement(Logomark, { variant: "white" }))),
|
|
50
|
-
dialogOpen ? (React.createElement(Suspense, { fallback: null },
|
|
51
|
-
React.createElement(VersionAboutDialog, { open: true, onClose: () => {
|
|
52
|
-
setDialogOpen(false);
|
|
53
|
-
}, version: session.version }))) : null));
|
|
38
|
+
return (_jsxs("div", { className: classes.container, children: [_jsx(ViewMenu, { model: view, IconButtonProps: {
|
|
39
|
+
classes: { root: classes.iconRoot },
|
|
40
|
+
edge: 'start',
|
|
41
|
+
}, IconProps: { className: classes.icon } }), _jsx("div", { className: classes.grow }), displayName ? (_jsx(Typography, { variant: "body2", className: classes.displayName, children: displayName })) : null, _jsx("div", { className: classes.grow }), _jsx(IconButton, { onClick: () => {
|
|
42
|
+
setDialogOpen(true);
|
|
43
|
+
}, children: _jsx("div", { style: { width: 22, height: 22 }, children: _jsx(Logomark, { variant: "white" }) }) }), dialogOpen ? (_jsx(Suspense, { fallback: null, children: _jsx(VersionAboutDialog, { open: true, onClose: () => {
|
|
44
|
+
setDialogOpen(false);
|
|
45
|
+
}, version: session.version }) })) : null] }));
|
|
54
46
|
});
|
|
55
47
|
export default ViewTitle;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/embedded-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "JBrowse 2 code shared between embedded products",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime": "^7.16.3",
|
|
45
|
-
"@jbrowse/core": "^
|
|
46
|
-
"@jbrowse/product-core": "^
|
|
45
|
+
"@jbrowse/core": "^3.0.0",
|
|
46
|
+
"@jbrowse/product-core": "^3.0.0",
|
|
47
47
|
"@mui/icons-material": "^6.0.0",
|
|
48
48
|
"@mui/material": "^6.0.0",
|
|
49
49
|
"copy-to-clipboard": "^3.3.1"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "2c6897f1fa732b1db5b094d1dca197e333e95319"
|
|
64
64
|
}
|