@jbrowse/plugin-menus 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.
- package/dist/AboutWidget/components/AboutWidget.d.ts +1 -2
- package/dist/AboutWidget/components/AboutWidget.js +10 -32
- package/dist/AboutWidget/index.js +17 -7
- package/dist/HelpWidget/components/HelpWidget.d.ts +1 -2
- package/dist/HelpWidget/components/HelpWidget.js +2 -17
- package/dist/HelpWidget/index.js +17 -7
- package/dist/ImportSessionWidget/components/ImportError.d.ts +1 -2
- package/dist/ImportSessionWidget/components/ImportError.js +2 -7
- package/dist/ImportSessionWidget/components/ImportSessionWidget.d.ts +1 -2
- package/dist/ImportSessionWidget/components/ImportSessionWidget.js +3 -33
- package/dist/ImportSessionWidget/index.js +17 -7
- package/dist/SessionManager/components/SessionManager.d.ts +1 -2
- package/dist/SessionManager/components/SessionManager.js +66 -75
- package/dist/SessionManager/index.js +17 -7
- package/esm/AboutWidget/components/AboutWidget.d.ts +1 -2
- package/esm/AboutWidget/components/AboutWidget.js +10 -29
- package/esm/HelpWidget/components/HelpWidget.d.ts +1 -2
- package/esm/HelpWidget/components/HelpWidget.js +2 -14
- package/esm/ImportSessionWidget/components/ImportError.d.ts +1 -2
- package/esm/ImportSessionWidget/components/ImportError.js +2 -7
- package/esm/ImportSessionWidget/components/ImportSessionWidget.d.ts +1 -2
- package/esm/ImportSessionWidget/components/ImportSessionWidget.js +3 -10
- package/esm/SessionManager/components/SessionManager.d.ts +1 -2
- package/esm/SessionManager/components/SessionManager.js +66 -75
- package/package.json +10 -10
|
@@ -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
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const util_1 = require("@jbrowse/core/util");
|
|
8
5
|
const material_1 = require("@mui/material");
|
|
9
6
|
const mobx_react_1 = require("mobx-react");
|
|
@@ -30,33 +27,14 @@ const AboutWidget = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
30
27
|
const corePlugins = new Set(plugins
|
|
31
28
|
.filter(p => { var _a; return (_a = pluginManager.pluginMetadata[p.name]) === null || _a === void 0 ? void 0 : _a.isCore; })
|
|
32
29
|
.map(p => p.name));
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
react_1.default.createElement("br", null),
|
|
43
|
-
react_1.default.createElement(material_1.Typography, { align: "center" }, "\u00A9 2019-2022 The Evolutionary Software Foundation"),
|
|
44
|
-
react_1.default.createElement("div", { className: classes.pluginList },
|
|
45
|
-
react_1.default.createElement(material_1.Typography, null, "External plugins loaded"),
|
|
46
|
-
react_1.default.createElement("ul", null, plugins
|
|
47
|
-
.filter(plugin => !corePlugins.has(plugin.name))
|
|
48
|
-
.map(plugin => {
|
|
49
|
-
const { url, name, version = '' } = plugin;
|
|
50
|
-
const text = `${name} ${version || ''}`;
|
|
51
|
-
return (react_1.default.createElement("li", { key: plugin.name }, plugin.url ? (react_1.default.createElement(material_1.Link, { target: "_blank", rel: "noopener noreferrer", href: url }, text)) : (react_1.default.createElement(material_1.Typography, null, text))));
|
|
52
|
-
})),
|
|
53
|
-
react_1.default.createElement(material_1.Typography, null, "Core plugins loaded"),
|
|
54
|
-
react_1.default.createElement("ul", null, plugins
|
|
55
|
-
.filter(plugin => corePlugins.has(plugin.name))
|
|
56
|
-
.map(plugin => (react_1.default.createElement("li", { key: plugin.name },
|
|
57
|
-
react_1.default.createElement(material_1.Typography, null,
|
|
58
|
-
plugin.name,
|
|
59
|
-
" ",
|
|
60
|
-
plugin.version || ''))))))));
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.root, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", align: "center", children: "JBrowse 2" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", align: "center", className: classes.subtitle, children: version }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { align: "center", children: ["JBrowse is a", ' ', (0, jsx_runtime_1.jsx)(material_1.Link, { href: "http://gmod.org/", target: "_blank", rel: "noopener noreferrer", children: "GMOD" }), ' ', "project"] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Typography, { align: "center", children: "\u00A9 2019-2022 The Evolutionary Software Foundation" }), (0, jsx_runtime_1.jsxs)("div", { className: classes.pluginList, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "External plugins loaded" }), (0, jsx_runtime_1.jsx)("ul", { children: plugins
|
|
31
|
+
.filter(plugin => !corePlugins.has(plugin.name))
|
|
32
|
+
.map(plugin => {
|
|
33
|
+
const { url, name, version = '' } = plugin;
|
|
34
|
+
const text = `${name} ${version || ''}`;
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)("li", { children: plugin.url ? ((0, jsx_runtime_1.jsx)(material_1.Link, { target: "_blank", rel: "noopener noreferrer", href: url, children: text })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { children: text })) }, plugin.name));
|
|
36
|
+
}) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Core plugins loaded" }), (0, jsx_runtime_1.jsx)("ul", { children: plugins
|
|
37
|
+
.filter(plugin => corePlugins.has(plugin.name))
|
|
38
|
+
.map(plugin => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: [plugin.name, " ", plugin.version || ''] }) }, plugin.name))) })] })] }));
|
|
61
39
|
});
|
|
62
40
|
exports.default = AboutWidget;
|
|
@@ -15,13 +15,23 @@ 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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.default = AboutWidgetF;
|
|
27
37
|
const react_1 = require("react");
|
|
@@ -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
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const util_1 = require("@jbrowse/core/util");
|
|
8
5
|
const material_1 = require("@mui/material");
|
|
9
6
|
const mobx_react_1 = require("mobx-react");
|
|
@@ -19,18 +16,6 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
19
16
|
const HelpWidget = (0, mobx_react_1.observer)(function Help({ model, }) {
|
|
20
17
|
const { classes } = useStyles();
|
|
21
18
|
const root = model ? (0, util_1.getSession)(model) : { version: '' };
|
|
22
|
-
return (
|
|
23
|
-
react_1.default.createElement(material_1.Typography, { variant: "h4", align: "center" }, "JBrowse 2"),
|
|
24
|
-
react_1.default.createElement(material_1.Typography, { variant: "h6", align: "center", className: classes.subtitle }, root.version),
|
|
25
|
-
react_1.default.createElement(material_1.Typography, null, "Here are some resources to get help. Please report the version number above when asking questions. Thanks!"),
|
|
26
|
-
react_1.default.createElement("ul", null,
|
|
27
|
-
react_1.default.createElement("li", null,
|
|
28
|
-
react_1.default.createElement(material_1.Link, { href: "https://github.com/GMOD/jbrowse-components/discussions", target: "_blank", rel: "noopener noreferrer" }, "Question & answer forum")),
|
|
29
|
-
react_1.default.createElement("li", null,
|
|
30
|
-
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")),
|
|
31
|
-
react_1.default.createElement("li", null,
|
|
32
|
-
react_1.default.createElement(material_1.Link, { href: "https://jbrowse.org/jb2/docs/user_guide", target: "_blank", rel: "noopener noreferrer" }, "User guide")),
|
|
33
|
-
react_1.default.createElement("li", null,
|
|
34
|
-
react_1.default.createElement(material_1.Link, { href: "https://jbrowse.org/jb2/docs/", target: "_blank", rel: "noopener noreferrer" }, "Documentation")))));
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.root, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", align: "center", children: "JBrowse 2" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", align: "center", className: classes.subtitle, children: root.version }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Here are some resources to get help. 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" }) })] })] }));
|
|
35
20
|
});
|
|
36
21
|
exports.default = HelpWidget;
|
package/dist/HelpWidget/index.js
CHANGED
|
@@ -15,13 +15,23 @@ 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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.default = HelpWidgetF;
|
|
27
37
|
const react_1 = require("react");
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = ImportError;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const Error_1 = __importDefault(require("@mui/icons-material/Error"));
|
|
9
9
|
const material_1 = require("@mui/material");
|
|
10
10
|
const mui_1 = require("tss-react/mui");
|
|
@@ -24,10 +24,5 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
24
24
|
}));
|
|
25
25
|
function ImportError({ error }) {
|
|
26
26
|
const { classes } = useStyles();
|
|
27
|
-
return (
|
|
28
|
-
react_1.default.createElement("div", { className: classes.errorHeader },
|
|
29
|
-
react_1.default.createElement(Error_1.default, { color: "inherit", fontSize: "large" }),
|
|
30
|
-
react_1.default.createElement("div", null,
|
|
31
|
-
react_1.default.createElement(material_1.Typography, { variant: "h6", color: "inherit", align: "center" }, "Import error"))),
|
|
32
|
-
react_1.default.createElement(material_1.Typography, { className: classes.errorMessage }, `${error}`)));
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { className: classes.error, children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.errorHeader, children: [(0, jsx_runtime_1.jsx)(Error_1.default, { color: "inherit", fontSize: "large" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", color: "inherit", align: "center", children: "Import error" }) })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { className: classes.errorMessage, children: `${error}` })] }));
|
|
33
28
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
3
2
|
declare const ImportSessionWidget: ({ model, }: {
|
|
4
3
|
model: IAnyStateTreeNode;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default ImportSessionWidget;
|
|
@@ -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 CloudUpload_1 = __importDefault(require("@mui/icons-material/CloudUpload"));
|
|
32
10
|
const material_1 = require("@mui/material");
|
|
@@ -93,14 +71,6 @@ const ImportSessionWidget = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
93
71
|
},
|
|
94
72
|
});
|
|
95
73
|
const { classes } = useStyles({ isDragActive });
|
|
96
|
-
return (
|
|
97
|
-
react_1.default.createElement(material_1.Paper, { className: classes.paper },
|
|
98
|
-
react_1.default.createElement("div", { ...getRootProps({ className: classes.dropZone }) },
|
|
99
|
-
react_1.default.createElement("input", { ...getInputProps() }),
|
|
100
|
-
react_1.default.createElement(CloudUpload_1.default, { className: classes.uploadIcon, fontSize: "large" }),
|
|
101
|
-
react_1.default.createElement(material_1.Typography, { color: "textSecondary", align: "center", variant: "body1" }, "Drag and drop files here"),
|
|
102
|
-
react_1.default.createElement(material_1.Typography, { color: "textSecondary", align: "center", variant: "body2" }, "or"),
|
|
103
|
-
react_1.default.createElement(material_1.Button, { color: "primary", variant: "contained" }, "Browse Files"))),
|
|
104
|
-
error ? react_1.default.createElement(ImportError_1.default, { error: error }) : null));
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.root, children: [(0, jsx_runtime_1.jsx)(material_1.Paper, { className: classes.paper, children: (0, jsx_runtime_1.jsxs)("div", { ...getRootProps({ className: classes.dropZone }), children: [(0, jsx_runtime_1.jsx)("input", { ...getInputProps() }), (0, jsx_runtime_1.jsx)(CloudUpload_1.default, { className: classes.uploadIcon, fontSize: "large" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { color: "textSecondary", align: "center", variant: "body1", children: "Drag and drop files here" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { color: "textSecondary", align: "center", variant: "body2", children: "or" }), (0, jsx_runtime_1.jsx)(material_1.Button, { color: "primary", variant: "contained", children: "Browse Files" })] }) }), error ? (0, jsx_runtime_1.jsx)(ImportError_1.default, { error: error }) : null] }));
|
|
105
75
|
});
|
|
106
76
|
exports.default = ImportSessionWidget;
|
|
@@ -15,13 +15,23 @@ 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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.default = ImportSessionWidgetF;
|
|
27
37
|
const react_1 = require("react");
|
|
@@ -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 util_1 = require("@jbrowse/core/util");
|
|
8
8
|
const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
9
9
|
const Star_1 = __importDefault(require("@mui/icons-material/Star"));
|
|
@@ -29,83 +29,74 @@ const SessionManager = (0, mobx_react_1.observer)(function ({ session, }) {
|
|
|
29
29
|
createdAt: r.createdAt,
|
|
30
30
|
fav: r.favorite,
|
|
31
31
|
})).filter(f => (showOnlyFavs ? f.fav : true));
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
i
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} }, "Delete non-fav sessions older than 7 days?")),
|
|
49
|
-
rows ? (react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
|
|
50
|
-
react_1.default.createElement(x_data_grid_1.DataGrid, { disableRowSelectionOnClick: true, columnHeaderHeight: 35, rowHeight: 25, hideFooter: rows.length < 100, slotProps: {
|
|
51
|
-
toolbar: {
|
|
52
|
-
showQuickFilter: true,
|
|
53
|
-
},
|
|
54
|
-
}, rows: rows, columns: [
|
|
55
|
-
{
|
|
56
|
-
field: 'fav',
|
|
57
|
-
headerName: 'Fav',
|
|
58
|
-
width: 20,
|
|
59
|
-
renderCell: ({ row }) => {
|
|
60
|
-
return (react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
61
|
-
if (row.fav) {
|
|
62
|
-
session.unfavoriteSavedSession(row.id);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
session.favoriteSavedSession(row.id);
|
|
66
|
-
}
|
|
67
|
-
} }, row.fav ? react_1.default.createElement(Star_1.default, null) : react_1.default.createElement(StarBorder_1.default, null)));
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.mb, children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: showOnlyFavs, onChange: () => {
|
|
33
|
+
setShowOnlyFavs(val => !val);
|
|
34
|
+
} }), label: "Show only favorites?" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
35
|
+
var _a;
|
|
36
|
+
let i = 0;
|
|
37
|
+
(_a = session.savedSessionMetadata) === null || _a === void 0 ? void 0 : _a.forEach(elt => {
|
|
38
|
+
if ((0, date_fns_1.differenceInDays)(+Date.now(), elt.createdAt) > 1 &&
|
|
39
|
+
!elt.favorite) {
|
|
40
|
+
session.deleteSavedSession(elt.id);
|
|
41
|
+
i++;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
session.notify(`${i} sessions deleted`, 'info');
|
|
45
|
+
}, children: "Delete non-fav sessions older than 7 days?" })] }), rows ? ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { disableRowSelectionOnClick: true, columnHeaderHeight: 35, rowHeight: 25, hideFooter: rows.length < 100, slotProps: {
|
|
46
|
+
toolbar: {
|
|
47
|
+
showQuickFilter: true,
|
|
68
48
|
},
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
49
|
+
}, rows: rows, columns: [
|
|
50
|
+
{
|
|
51
|
+
field: 'fav',
|
|
52
|
+
headerName: 'Fav',
|
|
53
|
+
width: 20,
|
|
54
|
+
renderCell: ({ row }) => {
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
56
|
+
if (row.fav) {
|
|
57
|
+
session.unfavoriteSavedSession(row.id);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
session.favoriteSavedSession(row.id);
|
|
61
|
+
}
|
|
62
|
+
}, children: row.fav ? (0, jsx_runtime_1.jsx)(Star_1.default, {}) : (0, jsx_runtime_1.jsx)(StarBorder_1.default, {}) }));
|
|
63
|
+
},
|
|
82
64
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
addSuffix: true,
|
|
95
|
-
}))));
|
|
65
|
+
{
|
|
66
|
+
field: 'name',
|
|
67
|
+
headerName: 'Name',
|
|
68
|
+
editable: true,
|
|
69
|
+
width: (0, util_1.measureGridWidth)(rows.map(r => r.name)),
|
|
70
|
+
renderCell: ({ row }) => {
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Link, { href: "#", onClick: event => {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
session.activateSession(row.id);
|
|
74
|
+
}, children: row.name }), session.id === row.id ? ' (current)' : ''] }));
|
|
75
|
+
},
|
|
96
76
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
77
|
+
{
|
|
78
|
+
headerName: 'Created at',
|
|
79
|
+
field: 'createdAt',
|
|
80
|
+
renderCell: ({ row }) => {
|
|
81
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { disableInteractive: true, slotProps: {
|
|
82
|
+
transition: {
|
|
83
|
+
timeout: 0,
|
|
84
|
+
},
|
|
85
|
+
}, title: row.createdAt.toLocaleString(), children: (0, jsx_runtime_1.jsx)("div", { children: (0, date_fns_1.formatDistanceToNow)(row.createdAt, {
|
|
86
|
+
addSuffix: true,
|
|
87
|
+
}) }) }));
|
|
88
|
+
},
|
|
107
89
|
},
|
|
108
|
-
|
|
109
|
-
|
|
90
|
+
{
|
|
91
|
+
field: 'delete',
|
|
92
|
+
width: 10,
|
|
93
|
+
headerName: 'Delete',
|
|
94
|
+
renderCell: ({ row }) => {
|
|
95
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
96
|
+
session.deleteSavedSession(row.id);
|
|
97
|
+
}, children: (0, jsx_runtime_1.jsx)(Delete_1.default, {}) }));
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
] }) })) : ((0, jsx_runtime_1.jsx)("div", { children: "No sessions loaded" }))] }));
|
|
110
101
|
});
|
|
111
102
|
exports.default = SessionManager;
|
|
@@ -15,13 +15,23 @@ 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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.stateModel = exports.configSchema = void 0;
|
|
27
37
|
exports.default = SessionManagerF;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { Link, Typography } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
@@ -25,33 +25,14 @@ const AboutWidget = observer(function ({ model, }) {
|
|
|
25
25
|
const corePlugins = new Set(plugins
|
|
26
26
|
.filter(p => { var _a; return (_a = pluginManager.pluginMetadata[p.name]) === null || _a === void 0 ? void 0 : _a.isCore; })
|
|
27
27
|
.map(p => p.name));
|
|
28
|
-
return (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
React.createElement("br", null),
|
|
38
|
-
React.createElement(Typography, { align: "center" }, "\u00A9 2019-2022 The Evolutionary Software Foundation"),
|
|
39
|
-
React.createElement("div", { className: classes.pluginList },
|
|
40
|
-
React.createElement(Typography, null, "External plugins loaded"),
|
|
41
|
-
React.createElement("ul", null, plugins
|
|
42
|
-
.filter(plugin => !corePlugins.has(plugin.name))
|
|
43
|
-
.map(plugin => {
|
|
44
|
-
const { url, name, version = '' } = plugin;
|
|
45
|
-
const text = `${name} ${version || ''}`;
|
|
46
|
-
return (React.createElement("li", { key: plugin.name }, plugin.url ? (React.createElement(Link, { target: "_blank", rel: "noopener noreferrer", href: url }, text)) : (React.createElement(Typography, null, text))));
|
|
47
|
-
})),
|
|
48
|
-
React.createElement(Typography, null, "Core plugins loaded"),
|
|
49
|
-
React.createElement("ul", null, plugins
|
|
50
|
-
.filter(plugin => corePlugins.has(plugin.name))
|
|
51
|
-
.map(plugin => (React.createElement("li", { key: plugin.name },
|
|
52
|
-
React.createElement(Typography, null,
|
|
53
|
-
plugin.name,
|
|
54
|
-
" ",
|
|
55
|
-
plugin.version || ''))))))));
|
|
28
|
+
return (_jsxs("div", { className: classes.root, children: [_jsx(Typography, { variant: "h4", align: "center", children: "JBrowse 2" }), _jsx(Typography, { variant: "h6", align: "center", className: classes.subtitle, children: version }), _jsxs(Typography, { align: "center", children: ["JBrowse is a", ' ', _jsx(Link, { href: "http://gmod.org/", target: "_blank", rel: "noopener noreferrer", children: "GMOD" }), ' ', "project"] }), _jsx("br", {}), _jsx(Typography, { align: "center", children: "\u00A9 2019-2022 The Evolutionary Software Foundation" }), _jsxs("div", { className: classes.pluginList, children: [_jsx(Typography, { children: "External plugins loaded" }), _jsx("ul", { children: plugins
|
|
29
|
+
.filter(plugin => !corePlugins.has(plugin.name))
|
|
30
|
+
.map(plugin => {
|
|
31
|
+
const { url, name, version = '' } = plugin;
|
|
32
|
+
const text = `${name} ${version || ''}`;
|
|
33
|
+
return (_jsx("li", { children: plugin.url ? (_jsx(Link, { target: "_blank", rel: "noopener noreferrer", href: url, children: text })) : (_jsx(Typography, { children: text })) }, plugin.name));
|
|
34
|
+
}) }), _jsx(Typography, { children: "Core plugins loaded" }), _jsx("ul", { children: plugins
|
|
35
|
+
.filter(plugin => corePlugins.has(plugin.name))
|
|
36
|
+
.map(plugin => (_jsx("li", { children: _jsxs(Typography, { children: [plugin.name, " ", plugin.version || ''] }) }, plugin.name))) })] })] }));
|
|
56
37
|
});
|
|
57
38
|
export default AboutWidget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
3
|
import { Link, Typography } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
@@ -14,18 +14,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
14
14
|
const HelpWidget = observer(function Help({ model, }) {
|
|
15
15
|
const { classes } = useStyles();
|
|
16
16
|
const root = model ? getSession(model) : { version: '' };
|
|
17
|
-
return (
|
|
18
|
-
React.createElement(Typography, { variant: "h4", align: "center" }, "JBrowse 2"),
|
|
19
|
-
React.createElement(Typography, { variant: "h6", align: "center", className: classes.subtitle }, root.version),
|
|
20
|
-
React.createElement(Typography, null, "Here are some resources to get help. Please report the version number above when asking questions. Thanks!"),
|
|
21
|
-
React.createElement("ul", null,
|
|
22
|
-
React.createElement("li", null,
|
|
23
|
-
React.createElement(Link, { href: "https://github.com/GMOD/jbrowse-components/discussions", target: "_blank", rel: "noopener noreferrer" }, "Question & answer forum")),
|
|
24
|
-
React.createElement("li", null,
|
|
25
|
-
React.createElement(Link, { href: "https://github.com/GMOD/jbrowse-components/issues/new/choose", target: "_blank", rel: "noopener noreferrer" }, "Report a bug")),
|
|
26
|
-
React.createElement("li", null,
|
|
27
|
-
React.createElement(Link, { href: "https://jbrowse.org/jb2/docs/user_guide", target: "_blank", rel: "noopener noreferrer" }, "User guide")),
|
|
28
|
-
React.createElement("li", null,
|
|
29
|
-
React.createElement(Link, { href: "https://jbrowse.org/jb2/docs/", target: "_blank", rel: "noopener noreferrer" }, "Documentation")))));
|
|
17
|
+
return (_jsxs("div", { className: classes.root, children: [_jsx(Typography, { variant: "h4", align: "center", children: "JBrowse 2" }), _jsx(Typography, { variant: "h6", align: "center", className: classes.subtitle, children: root.version }), _jsx(Typography, { children: "Here are some resources to get help. 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" }) })] })] }));
|
|
30
18
|
});
|
|
31
19
|
export default HelpWidget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import ErrorIcon from '@mui/icons-material/Error';
|
|
3
3
|
import { Paper, Typography } from '@mui/material';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
@@ -18,10 +18,5 @@ const useStyles = makeStyles()(theme => ({
|
|
|
18
18
|
}));
|
|
19
19
|
export default function ImportError({ error }) {
|
|
20
20
|
const { classes } = useStyles();
|
|
21
|
-
return (
|
|
22
|
-
React.createElement("div", { className: classes.errorHeader },
|
|
23
|
-
React.createElement(ErrorIcon, { color: "inherit", fontSize: "large" }),
|
|
24
|
-
React.createElement("div", null,
|
|
25
|
-
React.createElement(Typography, { variant: "h6", color: "inherit", align: "center" }, "Import error"))),
|
|
26
|
-
React.createElement(Typography, { className: classes.errorMessage }, `${error}`)));
|
|
21
|
+
return (_jsxs(Paper, { className: classes.error, children: [_jsxs("div", { className: classes.errorHeader, children: [_jsx(ErrorIcon, { color: "inherit", fontSize: "large" }), _jsx("div", { children: _jsx(Typography, { variant: "h6", color: "inherit", align: "center", children: "Import error" }) })] }), _jsx(Typography, { className: classes.errorMessage, children: `${error}` })] }));
|
|
27
22
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
3
2
|
declare const ImportSessionWidget: ({ model, }: {
|
|
4
3
|
model: IAnyStateTreeNode;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default ImportSessionWidget;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { getSession } from '@jbrowse/core/util';
|
|
3
4
|
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
|
|
4
5
|
import { Button, Paper, Typography, alpha } from '@mui/material';
|
|
@@ -65,14 +66,6 @@ const ImportSessionWidget = observer(function ({ model, }) {
|
|
|
65
66
|
},
|
|
66
67
|
});
|
|
67
68
|
const { classes } = useStyles({ isDragActive });
|
|
68
|
-
return (
|
|
69
|
-
React.createElement(Paper, { className: classes.paper },
|
|
70
|
-
React.createElement("div", { ...getRootProps({ className: classes.dropZone }) },
|
|
71
|
-
React.createElement("input", { ...getInputProps() }),
|
|
72
|
-
React.createElement(CloudUploadIcon, { className: classes.uploadIcon, fontSize: "large" }),
|
|
73
|
-
React.createElement(Typography, { color: "textSecondary", align: "center", variant: "body1" }, "Drag and drop files here"),
|
|
74
|
-
React.createElement(Typography, { color: "textSecondary", align: "center", variant: "body2" }, "or"),
|
|
75
|
-
React.createElement(Button, { color: "primary", variant: "contained" }, "Browse Files"))),
|
|
76
|
-
error ? React.createElement(ImportError, { error: error }) : null));
|
|
69
|
+
return (_jsxs("div", { className: classes.root, children: [_jsx(Paper, { className: classes.paper, children: _jsxs("div", { ...getRootProps({ className: classes.dropZone }), children: [_jsx("input", { ...getInputProps() }), _jsx(CloudUploadIcon, { className: classes.uploadIcon, fontSize: "large" }), _jsx(Typography, { color: "textSecondary", align: "center", variant: "body1", children: "Drag and drop files here" }), _jsx(Typography, { color: "textSecondary", align: "center", variant: "body2", children: "or" }), _jsx(Button, { color: "primary", variant: "contained", children: "Browse Files" })] }) }), error ? _jsx(ImportError, { error: error }) : null] }));
|
|
77
70
|
});
|
|
78
71
|
export default ImportSessionWidget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { measureGridWidth, useLocalStorage } from '@jbrowse/core/util';
|
|
3
3
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
4
4
|
import StarIcon from '@mui/icons-material/Star';
|
|
@@ -24,83 +24,74 @@ const SessionManager = observer(function ({ session, }) {
|
|
|
24
24
|
createdAt: r.createdAt,
|
|
25
25
|
fav: r.favorite,
|
|
26
26
|
})).filter(f => (showOnlyFavs ? f.fav : true));
|
|
27
|
-
return (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
i
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} }, "Delete non-fav sessions older than 7 days?")),
|
|
44
|
-
rows ? (React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
|
|
45
|
-
React.createElement(DataGrid, { disableRowSelectionOnClick: true, columnHeaderHeight: 35, rowHeight: 25, hideFooter: rows.length < 100, slotProps: {
|
|
46
|
-
toolbar: {
|
|
47
|
-
showQuickFilter: true,
|
|
48
|
-
},
|
|
49
|
-
}, rows: rows, columns: [
|
|
50
|
-
{
|
|
51
|
-
field: 'fav',
|
|
52
|
-
headerName: 'Fav',
|
|
53
|
-
width: 20,
|
|
54
|
-
renderCell: ({ row }) => {
|
|
55
|
-
return (React.createElement(IconButton, { onClick: () => {
|
|
56
|
-
if (row.fav) {
|
|
57
|
-
session.unfavoriteSavedSession(row.id);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
session.favoriteSavedSession(row.id);
|
|
61
|
-
}
|
|
62
|
-
} }, row.fav ? React.createElement(StarIcon, null) : React.createElement(StarBorderIcon, null)));
|
|
27
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: classes.mb, children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: showOnlyFavs, onChange: () => {
|
|
28
|
+
setShowOnlyFavs(val => !val);
|
|
29
|
+
} }), label: "Show only favorites?" }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
30
|
+
var _a;
|
|
31
|
+
let i = 0;
|
|
32
|
+
(_a = session.savedSessionMetadata) === null || _a === void 0 ? void 0 : _a.forEach(elt => {
|
|
33
|
+
if (differenceInDays(+Date.now(), elt.createdAt) > 1 &&
|
|
34
|
+
!elt.favorite) {
|
|
35
|
+
session.deleteSavedSession(elt.id);
|
|
36
|
+
i++;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
session.notify(`${i} sessions deleted`, 'info');
|
|
40
|
+
}, children: "Delete non-fav sessions older than 7 days?" })] }), rows ? (_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsx(DataGrid, { disableRowSelectionOnClick: true, columnHeaderHeight: 35, rowHeight: 25, hideFooter: rows.length < 100, slotProps: {
|
|
41
|
+
toolbar: {
|
|
42
|
+
showQuickFilter: true,
|
|
63
43
|
},
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
44
|
+
}, rows: rows, columns: [
|
|
45
|
+
{
|
|
46
|
+
field: 'fav',
|
|
47
|
+
headerName: 'Fav',
|
|
48
|
+
width: 20,
|
|
49
|
+
renderCell: ({ row }) => {
|
|
50
|
+
return (_jsx(IconButton, { onClick: () => {
|
|
51
|
+
if (row.fav) {
|
|
52
|
+
session.unfavoriteSavedSession(row.id);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
session.favoriteSavedSession(row.id);
|
|
56
|
+
}
|
|
57
|
+
}, children: row.fav ? _jsx(StarIcon, {}) : _jsx(StarBorderIcon, {}) }));
|
|
58
|
+
},
|
|
77
59
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
addSuffix: true,
|
|
90
|
-
}))));
|
|
60
|
+
{
|
|
61
|
+
field: 'name',
|
|
62
|
+
headerName: 'Name',
|
|
63
|
+
editable: true,
|
|
64
|
+
width: measureGridWidth(rows.map(r => r.name)),
|
|
65
|
+
renderCell: ({ row }) => {
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsx(Link, { href: "#", onClick: event => {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
session.activateSession(row.id);
|
|
69
|
+
}, children: row.name }), session.id === row.id ? ' (current)' : ''] }));
|
|
70
|
+
},
|
|
91
71
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
72
|
+
{
|
|
73
|
+
headerName: 'Created at',
|
|
74
|
+
field: 'createdAt',
|
|
75
|
+
renderCell: ({ row }) => {
|
|
76
|
+
return (_jsx(Tooltip, { disableInteractive: true, slotProps: {
|
|
77
|
+
transition: {
|
|
78
|
+
timeout: 0,
|
|
79
|
+
},
|
|
80
|
+
}, title: row.createdAt.toLocaleString(), children: _jsx("div", { children: formatDistanceToNow(row.createdAt, {
|
|
81
|
+
addSuffix: true,
|
|
82
|
+
}) }) }));
|
|
83
|
+
},
|
|
102
84
|
},
|
|
103
|
-
|
|
104
|
-
|
|
85
|
+
{
|
|
86
|
+
field: 'delete',
|
|
87
|
+
width: 10,
|
|
88
|
+
headerName: 'Delete',
|
|
89
|
+
renderCell: ({ row }) => {
|
|
90
|
+
return (_jsx(IconButton, { onClick: () => {
|
|
91
|
+
session.deleteSavedSession(row.id);
|
|
92
|
+
}, children: _jsx(DeleteIcon, {}) }));
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
] }) })) : (_jsx("div", { children: "No sessions loaded" }))] }));
|
|
105
96
|
});
|
|
106
97
|
export default SessionManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-menus",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "JBrowse 2 basic menus",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,26 +36,26 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@jbrowse/core": "^3.0.1",
|
|
39
40
|
"@mui/icons-material": "^6.0.0",
|
|
40
|
-
"date-fns": "^4.1.0",
|
|
41
|
-
"pluralize": "^8.0.0",
|
|
42
|
-
"react-dropzone": "^14.2.1"
|
|
43
|
-
},
|
|
44
|
-
"peerDependencies": {
|
|
45
|
-
"@jbrowse/core": "^2.0.0",
|
|
46
41
|
"@mui/material": "^6.0.0",
|
|
42
|
+
"date-fns": "^4.1.0",
|
|
47
43
|
"mobx": "^6.0.0",
|
|
48
44
|
"mobx-react": "^9.0.0",
|
|
49
45
|
"mobx-state-tree": "^5.0.0",
|
|
50
|
-
"
|
|
51
|
-
"react-
|
|
46
|
+
"pluralize": "^8.0.0",
|
|
47
|
+
"react-dropzone": "^14.2.1",
|
|
52
48
|
"tss-react": "^4.0.0"
|
|
53
49
|
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"react": ">=18.0.0",
|
|
52
|
+
"react-dom": ">=18.0.0"
|
|
53
|
+
},
|
|
54
54
|
"distModule": "esm/index.js",
|
|
55
55
|
"srcModule": "src/index.ts",
|
|
56
56
|
"module": "esm/index.js",
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "aa2f1d1a89d2361c7fd1a93fe29506fa4554f5cc"
|
|
61
61
|
}
|