@jbrowse/plugin-linear-comparative-view 2.17.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/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +36 -60
- package/dist/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/dist/LGVSyntenyDisplay/components/util.js +6 -13
- package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
- package/dist/LGVSyntenyDisplay/configSchemaF.js +12 -9
- package/dist/LGVSyntenyDisplay/index.d.ts +1 -1
- package/dist/LGVSyntenyDisplay/index.js +1 -1
- package/dist/LGVSyntenyDisplay/model.d.ts +122 -69
- package/dist/LGVSyntenyDisplay/model.js +20 -37
- package/dist/LaunchLinearSyntenyView.d.ts +1 -1
- package/dist/LaunchLinearSyntenyView.js +1 -3
- package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
- package/dist/LinearComparativeDisplay/configSchemaF.js +0 -6
- package/dist/LinearComparativeDisplay/index.d.ts +1 -1
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
- package/dist/LinearComparativeDisplay/stateModelFactory.js +13 -57
- package/dist/LinearComparativeView/components/Header.d.ts +2 -3
- package/dist/LinearComparativeView/components/Header.js +56 -86
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +5 -15
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
- package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -32
- package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
- package/dist/LinearComparativeView/components/LinearComparativeView.js +4 -9
- package/dist/LinearComparativeView/components/Rubberband.d.ts +2 -3
- package/dist/LinearComparativeView/components/Rubberband.js +36 -69
- package/dist/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
- package/dist/LinearComparativeView/components/VerticalGuide.js +5 -9
- package/dist/LinearComparativeView/index.d.ts +1 -1
- package/dist/LinearComparativeView/index.js +17 -7
- package/dist/LinearComparativeView/model.d.ts +38 -90
- package/dist/LinearComparativeView/model.js +40 -107
- package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
- package/dist/LinearReadVsRef/LinearReadVsRef.js +10 -55
- package/dist/LinearReadVsRef/index.d.ts +1 -1
- package/dist/LinearReadVsRef/index.js +17 -9
- package/dist/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/afterAttach.js +8 -12
- package/dist/LinearSyntenyDisplay/components/Component.d.ts +2 -3
- package/dist/LinearSyntenyDisplay/components/Component.js +11 -36
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +95 -106
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -6
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
- package/dist/LinearSyntenyDisplay/components/util.d.ts +3 -3
- package/dist/LinearSyntenyDisplay/components/util.js +0 -9
- package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
- package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -15
- package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/drawSynteny.js +1 -23
- package/dist/LinearSyntenyDisplay/index.d.ts +1 -1
- package/dist/LinearSyntenyDisplay/index.js +18 -9
- package/dist/LinearSyntenyDisplay/model.d.ts +8 -102
- package/dist/LinearSyntenyDisplay/model.js +18 -99
- package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +35 -76
- package/dist/LinearSyntenyView/components/Icons.d.ts +3 -4
- package/dist/LinearSyntenyView/components/Icons.js +3 -8
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +130 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +39 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +22 -0
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
- package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -150
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +43 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +68 -0
- package/dist/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/dist/LinearSyntenyView/components/LinearSyntenyView.js +20 -10
- package/dist/LinearSyntenyView/index.d.ts +1 -1
- package/dist/LinearSyntenyView/index.js +17 -7
- package/dist/LinearSyntenyView/model.d.ts +54 -58
- package/dist/LinearSyntenyView/model.js +61 -56
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -6
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -11
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +7 -24
- package/dist/LinearSyntenyView/types.d.ts +12 -0
- package/dist/LinearSyntenyView/types.js +2 -0
- package/dist/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/dist/LinearSyntenyViewHelper/index.js +2 -2
- package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +87 -0
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +5 -90
- package/dist/SyntenyFeatureDetail/index.d.ts +1 -1
- package/dist/SyntenyFeatureDetail/index.js +18 -14
- package/dist/SyntenyFeatureDetail/types.d.ts +9 -0
- package/dist/SyntenyFeatureDetail/types.js +2 -0
- package/dist/SyntenyTrack/configSchema.d.ts +1 -1
- package/dist/SyntenyTrack/configSchema.js +1 -9
- package/dist/SyntenyTrack/index.d.ts +1 -1
- package/dist/SyntenyTrack/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/util.d.ts +2 -2
- package/dist/util.js +1 -11
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
- package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +35 -36
- package/esm/LGVSyntenyDisplay/components/util.d.ts +9 -6
- package/esm/LGVSyntenyDisplay/components/util.js +6 -13
- package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
- package/esm/LGVSyntenyDisplay/configSchemaF.js +12 -9
- package/esm/LGVSyntenyDisplay/index.d.ts +1 -1
- package/esm/LGVSyntenyDisplay/index.js +1 -1
- package/esm/LGVSyntenyDisplay/model.d.ts +122 -69
- package/esm/LGVSyntenyDisplay/model.js +4 -31
- package/esm/LaunchLinearSyntenyView.d.ts +1 -1
- package/esm/LaunchLinearSyntenyView.js +1 -3
- package/esm/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
- package/esm/LinearComparativeDisplay/configSchemaF.js +0 -6
- package/esm/LinearComparativeDisplay/index.d.ts +1 -1
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
- package/esm/LinearComparativeDisplay/stateModelFactory.js +14 -58
- package/esm/LinearComparativeView/components/Header.d.ts +2 -3
- package/esm/LinearComparativeView/components/Header.js +56 -63
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +5 -12
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
- package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -29
- package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
- package/esm/LinearComparativeView/components/LinearComparativeView.js +4 -9
- package/esm/LinearComparativeView/components/Rubberband.d.ts +2 -3
- package/esm/LinearComparativeView/components/Rubberband.js +36 -46
- package/esm/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
- package/esm/LinearComparativeView/components/VerticalGuide.js +5 -6
- package/esm/LinearComparativeView/index.d.ts +1 -1
- package/esm/LinearComparativeView/model.d.ts +38 -90
- package/esm/LinearComparativeView/model.js +24 -101
- package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
- package/esm/LinearReadVsRef/LinearReadVsRef.js +10 -32
- package/esm/LinearReadVsRef/index.d.ts +1 -1
- package/esm/LinearReadVsRef/index.js +1 -3
- package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/afterAttach.js +8 -12
- package/esm/LinearSyntenyDisplay/components/Component.d.ts +2 -3
- package/esm/LinearSyntenyDisplay/components/Component.js +11 -13
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +79 -100
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
- package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -3
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
- package/esm/LinearSyntenyDisplay/components/util.d.ts +3 -3
- package/esm/LinearSyntenyDisplay/components/util.js +2 -11
- package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
- package/esm/LinearSyntenyDisplay/configSchemaF.js +0 -15
- package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/drawSynteny.js +1 -23
- package/esm/LinearSyntenyDisplay/index.d.ts +1 -1
- package/esm/LinearSyntenyDisplay/index.js +1 -2
- package/esm/LinearSyntenyDisplay/model.d.ts +8 -102
- package/esm/LinearSyntenyDisplay/model.js +1 -92
- package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
- package/esm/LinearSyntenyView/components/ExportSvgDialog.js +35 -53
- package/esm/LinearSyntenyView/components/Icons.d.ts +3 -4
- package/esm/LinearSyntenyView/components/Icons.js +3 -5
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +125 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +37 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +16 -0
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
- package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -127
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
- package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +40 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
- package/esm/LinearSyntenyView/components/ImportForm/getAdapter.js +65 -0
- package/esm/LinearSyntenyView/components/ImportForm/util.js +1 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
- package/esm/LinearSyntenyView/components/LinearSyntenyView.js +3 -3
- package/esm/LinearSyntenyView/index.d.ts +1 -1
- package/esm/LinearSyntenyView/model.d.ts +54 -58
- package/esm/LinearSyntenyView/model.js +44 -49
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
- package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +4 -9
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +8 -25
- package/esm/LinearSyntenyView/types.d.ts +12 -0
- package/esm/LinearSyntenyView/types.js +1 -0
- package/esm/LinearSyntenyViewHelper/index.d.ts +1 -1
- package/esm/LinearSyntenyViewHelper/index.js +2 -2
- package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
- package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
- package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +52 -0
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +6 -68
- package/esm/SyntenyFeatureDetail/index.d.ts +1 -1
- package/esm/SyntenyFeatureDetail/index.js +1 -7
- package/esm/SyntenyFeatureDetail/types.d.ts +9 -0
- package/esm/SyntenyFeatureDetail/types.js +1 -0
- package/esm/SyntenyTrack/configSchema.d.ts +1 -1
- package/esm/SyntenyTrack/configSchema.js +1 -9
- package/esm/SyntenyTrack/index.d.ts +1 -1
- package/esm/SyntenyTrack/index.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +4 -4
- package/esm/util.d.ts +2 -2
- package/esm/util.js +1 -11
- package/package.json +2 -4
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -194
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/dist/LinearSyntenyView/components/ImportForm/Spacer.js +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -59
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -52
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -169
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
- package/esm/LinearSyntenyView/components/ImportForm/Spacer.js +0 -4
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -34
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
- package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -23
|
@@ -1,44 +1,19 @@
|
|
|
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
3
|
exports.default = ExportSvgDialog;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
29
6
|
const ui_1 = require("@jbrowse/core/ui");
|
|
30
7
|
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
31
9
|
function LoadingMessage() {
|
|
32
|
-
return (
|
|
33
|
-
react_1.default.createElement(material_1.CircularProgress, { size: 20, style: { marginRight: 20 } }),
|
|
34
|
-
react_1.default.createElement(material_1.Typography, { display: "inline" }, "Creating SVG")));
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 20, style: { marginRight: 20 } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { display: "inline", children: "Creating SVG" })] }));
|
|
35
11
|
}
|
|
36
12
|
function useSvgLocal(key, val) {
|
|
37
13
|
return (0, util_1.useLocalStorage)(`svg-${key}`, val);
|
|
38
14
|
}
|
|
39
15
|
function TextField2({ children, ...rest }) {
|
|
40
|
-
return (
|
|
41
|
-
react_1.default.createElement(material_1.TextField, { ...rest }, children)));
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { ...rest, children: children }) }));
|
|
42
17
|
}
|
|
43
18
|
function ExportSvgDialog({ model, handleClose, }) {
|
|
44
19
|
const session = (0, util_1.getSession)(model);
|
|
@@ -49,50 +24,34 @@ function ExportSvgDialog({ model, handleClose, }) {
|
|
|
49
24
|
const [trackLabels, setTrackLabels] = useSvgLocal('tracklabels', 'offset');
|
|
50
25
|
const [themeName, setThemeName] = useSvgLocal('theme', session.themeName || 'default');
|
|
51
26
|
const [error, setError] = (0, react_1.useState)();
|
|
52
|
-
return (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
await model.exportSvg({
|
|
83
|
-
rasterizeLayers,
|
|
84
|
-
filename,
|
|
85
|
-
themeName,
|
|
86
|
-
trackLabels,
|
|
87
|
-
});
|
|
88
|
-
handleClose();
|
|
89
|
-
}
|
|
90
|
-
catch (e) {
|
|
91
|
-
console.error(e);
|
|
92
|
-
setError(e);
|
|
93
|
-
}
|
|
94
|
-
finally {
|
|
95
|
-
setLoading(false);
|
|
96
|
-
}
|
|
97
|
-
} }, "Submit"))));
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(ui_1.Dialog, { open: true, onClose: handleClose, title: "Export SVG", children: [(0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [error ? ((0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error })) : loading ? ((0, jsx_runtime_1.jsx)(LoadingMessage, {})) : null, (0, jsx_runtime_1.jsx)(TextField2, { helperText: "filename", value: filename, onChange: event => {
|
|
28
|
+
setFilename(event.target.value);
|
|
29
|
+
} }), (0, jsx_runtime_1.jsxs)(TextField2, { select: true, label: "Track label positioning", variant: "outlined", value: trackLabels, style: { width: 150 }, onChange: event => {
|
|
30
|
+
setTrackLabels(event.target.value);
|
|
31
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "offset", children: "Offset" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "overlay", children: "Overlay" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "left", children: "Left" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "none", children: "None" })] }), (0, jsx_runtime_1.jsx)("br", {}), session.allThemes ? ((0, jsx_runtime_1.jsx)(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
|
|
32
|
+
setThemeName(event.target.value);
|
|
33
|
+
}, children: Object.entries(session.allThemes()).map(([key, val]) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: key, children: val.name || '(Unknown name)' }, key))) })) : null, offscreenCanvas ? ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: rasterizeLayers, onChange: () => {
|
|
34
|
+
setRasterizeLayers(val => !val);
|
|
35
|
+
} }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Note: rasterizing layers not yet supported in this browser, so SVG size may be large" }))] }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
36
|
+
handleClose();
|
|
37
|
+
}, children: "Cancel" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", type: "submit", onClick: async () => {
|
|
38
|
+
setLoading(true);
|
|
39
|
+
setError(undefined);
|
|
40
|
+
try {
|
|
41
|
+
await model.exportSvg({
|
|
42
|
+
rasterizeLayers,
|
|
43
|
+
filename,
|
|
44
|
+
themeName,
|
|
45
|
+
trackLabels,
|
|
46
|
+
});
|
|
47
|
+
handleClose();
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
console.error(e);
|
|
51
|
+
setError(e);
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
setLoading(false);
|
|
55
|
+
}
|
|
56
|
+
}, children: "Submit" })] })] }));
|
|
98
57
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function StraightLines(props: SvgIconProps): React.JSX.Element;
|
|
1
|
+
import type { SvgIconProps } from '@mui/material';
|
|
2
|
+
export declare function Curves(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function StraightLines(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,12 @@
|
|
|
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.Curves = Curves;
|
|
7
4
|
exports.StraightLines = StraightLines;
|
|
8
|
-
const
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
6
|
const material_1 = require("@mui/material");
|
|
10
7
|
function Curves(props) {
|
|
11
|
-
return (
|
|
12
|
-
react_1.default.createElement("path", { fill: "currentColor", d: "M16.5,21C13.5,21 12.31,16.76 11.05,12.28C10.14,9.04 9,5 7.5,5C4.11,5 4,11.93 4,12H2C2,11.63 2.06,3 7.5,3C10.5,3 11.71,7.25 12.97,11.74C13.83,14.8 15,19 16.5,19C19.94,19 20.03,12.07 20.03,12H22.03C22.03,12.37 21.97,21 16.5,21Z" })));
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, { ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M16.5,21C13.5,21 12.31,16.76 11.05,12.28C10.14,9.04 9,5 7.5,5C4.11,5 4,11.93 4,12H2C2,11.63 2.06,3 7.5,3C10.5,3 11.71,7.25 12.97,11.74C13.83,14.8 15,19 16.5,19C19.94,19 20.03,12.07 20.03,12H22.03C22.03,12.37 21.97,21 16.5,21Z" }) }));
|
|
13
9
|
}
|
|
14
10
|
function StraightLines(props) {
|
|
15
|
-
return (
|
|
16
|
-
react_1.default.createElement("path", { fill: "currentColor", d: "M22 12L17 22L7.1 6.04L4.24 12H2L7 2L16.9 17.96L19.76 12H22Z" })));
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, { ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M22 12L17 22L7.1 6.04L4.24 12H2L7 2L16.9 17.96L19.76 12H22Z" }) }));
|
|
17
12
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
declare const ImportSyntenyOpenCustomTrack: ({ model, assembly1, assembly2, selectedRow, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
assembly1: string;
|
|
5
|
+
assembly2: string;
|
|
6
|
+
selectedRow: number;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ImportSyntenyOpenCustomTrack;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
9
|
+
const Help_1 = __importDefault(require("@mui/icons-material/Help"));
|
|
10
|
+
const material_1 = require("@mui/material");
|
|
11
|
+
const mobx_react_1 = require("mobx-react");
|
|
12
|
+
const getAdapter_1 = require("./getAdapter");
|
|
13
|
+
const util_1 = require("./util");
|
|
14
|
+
const ImportSyntenyOpenCustomTrack = (0, mobx_react_1.observer)(function ({ model, assembly1, assembly2, selectedRow, }) {
|
|
15
|
+
const [swap, setSwap] = (0, react_1.useState)(false);
|
|
16
|
+
const [bed2Location, setBed2Location] = (0, react_1.useState)();
|
|
17
|
+
const [bed1Location, setBed1Location] = (0, react_1.useState)();
|
|
18
|
+
const [fileLocation, setFileLocation] = (0, react_1.useState)();
|
|
19
|
+
const [indexFileLocation, setIndexFileLocation] = (0, react_1.useState)();
|
|
20
|
+
const [value, setValue] = (0, react_1.useState)('');
|
|
21
|
+
const [error, setError] = (0, react_1.useState)();
|
|
22
|
+
const fileName = (0, util_1.getName)(fileLocation);
|
|
23
|
+
const radioOption = value || (fileName ? (0, util_1.extName)((0, util_1.stripGz)(fileName)) : '');
|
|
24
|
+
(0, react_1.useEffect)(() => {
|
|
25
|
+
try {
|
|
26
|
+
if (fileLocation) {
|
|
27
|
+
const fn = fileName ? (0, util_1.basename)(fileName) : 'MyTrack';
|
|
28
|
+
const trackId = `${fn}-${Date.now()}-sessionTrack`;
|
|
29
|
+
setError(undefined);
|
|
30
|
+
model.setImportFormSyntenyTrack(selectedRow, {
|
|
31
|
+
type: 'userOpened',
|
|
32
|
+
value: {
|
|
33
|
+
trackId,
|
|
34
|
+
name: fn,
|
|
35
|
+
assemblyNames: [assembly2, assembly1],
|
|
36
|
+
type: 'SyntenyTrack',
|
|
37
|
+
adapter: (0, getAdapter_1.getAdapter)({
|
|
38
|
+
radioOption,
|
|
39
|
+
assembly1: swap ? assembly2 : assembly1,
|
|
40
|
+
assembly2: swap ? assembly1 : assembly2,
|
|
41
|
+
fileLocation,
|
|
42
|
+
indexFileLocation,
|
|
43
|
+
bed1Location,
|
|
44
|
+
bed2Location,
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
console.error(e);
|
|
52
|
+
setError(e);
|
|
53
|
+
}
|
|
54
|
+
}, [
|
|
55
|
+
swap,
|
|
56
|
+
model,
|
|
57
|
+
selectedRow,
|
|
58
|
+
fileName,
|
|
59
|
+
assembly1,
|
|
60
|
+
assembly2,
|
|
61
|
+
bed1Location,
|
|
62
|
+
bed2Location,
|
|
63
|
+
fileLocation,
|
|
64
|
+
indexFileLocation,
|
|
65
|
+
radioOption,
|
|
66
|
+
]);
|
|
67
|
+
const helpStrings = {
|
|
68
|
+
'.paf': 'minimap2 target.fa query.fa',
|
|
69
|
+
'.pif.gz': 'minimap2 target.fa query.fa',
|
|
70
|
+
'.out': 'mashmap target.fa query.fa',
|
|
71
|
+
'.delta': 'mummer target.fa query.fa',
|
|
72
|
+
'.chain': 'e.g. queryToTarget.chain',
|
|
73
|
+
};
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [error ? (0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error }) : null, (0, jsx_runtime_1.jsx)(material_1.Typography, { style: { textAlign: 'center' }, children: "Add a .paf (minimap2), .delta (Mummer), .chain (UCSC liftover), .anchors or .anchors.simple (MCScan), or .pif.gz (jbrowse CLI make-pif) file to view. These file types can also be gzipped." }), (0, jsx_runtime_1.jsx)(material_1.RadioGroup, { value: radioOption, onChange: event => {
|
|
75
|
+
setValue(event.target.value);
|
|
76
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Grid2, { container: true, justifyContent: "center", children: [
|
|
77
|
+
'.paf',
|
|
78
|
+
'.delta',
|
|
79
|
+
'.out',
|
|
80
|
+
'.chain',
|
|
81
|
+
'.anchors',
|
|
82
|
+
'.anchors.simple',
|
|
83
|
+
'.pif.gz',
|
|
84
|
+
].map(extension => ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: extension, control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: extension }, extension))) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid2, { container: true, justifyContent: "center", children: radioOption === '.paf' ||
|
|
85
|
+
radioOption === '.out' ||
|
|
86
|
+
radioOption === '.delta' ||
|
|
87
|
+
radioOption === '.chain' ||
|
|
88
|
+
radioOption === '.pif.gz' ? ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
89
|
+
display: 'flex',
|
|
90
|
+
flexDirection: 'column',
|
|
91
|
+
gap: 10,
|
|
92
|
+
}, children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
|
|
93
|
+
setFileLocation(loc);
|
|
94
|
+
} }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { children: ["Verify or click swap", (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: (0, jsx_runtime_1.jsx)("code", { children: helpStrings[radioOption] }), children: (0, jsx_runtime_1.jsx)(Help_1.default, {}) })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
95
|
+
display: 'flex',
|
|
96
|
+
gap: 20,
|
|
97
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
98
|
+
display: 'grid',
|
|
99
|
+
gridTemplateColumns: '1fr 1fr',
|
|
100
|
+
gap: 4,
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly2 : assembly1 }) }), (0, jsx_runtime_1.jsx)("div", { children: "query assembly" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly1 : assembly2 }) }), (0, jsx_runtime_1.jsx)("div", { children: "target assembly" })] }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
103
|
+
setSwap(!swap);
|
|
104
|
+
}, children: "Swap?" })] })] })] })) : value === '.anchors' || value === '.anchors.simple' ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: { margin: 20 }, children: ["Open the ", value, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: value, location: fileLocation, setLocation: loc => {
|
|
105
|
+
setFileLocation(loc);
|
|
106
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
|
|
107
|
+
setBed1Location(loc);
|
|
108
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: loc => {
|
|
109
|
+
setBed2Location(loc);
|
|
110
|
+
} })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
111
|
+
margin: 'auto',
|
|
112
|
+
display: 'flex',
|
|
113
|
+
justifyContent: 'center',
|
|
114
|
+
gap: 20,
|
|
115
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
116
|
+
display: 'grid',
|
|
117
|
+
gridTemplateColumns: '1fr 1fr',
|
|
118
|
+
gap: 4,
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly2 : assembly1 }) }), (0, jsx_runtime_1.jsx)("div", { children: "bed1 assembly" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("i", { children: swap ? assembly1 : assembly2 }) }), (0, jsx_runtime_1.jsx)("div", { children: "bed2 assembly" })] }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
121
|
+
setSwap(!swap);
|
|
122
|
+
}, children: "Swap?" })] })] })) : value === '.pif.gz' ? ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex' }, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${value} location`, description: "", location: fileLocation, setLocation: loc => {
|
|
123
|
+
setFileLocation(loc);
|
|
124
|
+
} }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: `${value} index location`, description: "", location: indexFileLocation, setLocation: loc => {
|
|
125
|
+
setIndexFileLocation(loc);
|
|
126
|
+
} }) })] })) : ((0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: value ? `${value} location` : '', description: "", location: fileLocation, setLocation: loc => {
|
|
127
|
+
setFileLocation(loc);
|
|
128
|
+
} })) })] }));
|
|
129
|
+
});
|
|
130
|
+
exports.default = ImportSyntenyOpenCustomTrack;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
declare const ImportSyntenyTrackSelector: ({ model, selectedRow, assembly1, assembly2, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
selectedRow: number;
|
|
5
|
+
assembly1: string;
|
|
6
|
+
assembly2: string;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ImportSyntenyTrackSelector;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
|
+
const ui_1 = require("@jbrowse/core/ui");
|
|
7
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const mobx_react_1 = require("mobx-react");
|
|
11
|
+
const ImportSyntenyTrackSelector = (0, mobx_react_1.observer)(function ({ model, selectedRow, assembly1, assembly2, }) {
|
|
12
|
+
var _a;
|
|
13
|
+
const session = (0, util_1.getSession)(model);
|
|
14
|
+
const { importFormSyntenyTrackSelections } = model;
|
|
15
|
+
const { tracks = [], sessionTracks = [] } = session;
|
|
16
|
+
const allTracks = [...tracks, ...sessionTracks];
|
|
17
|
+
const filteredTracks = allTracks.filter(track => {
|
|
18
|
+
const assemblyNames = (0, configuration_1.readConfObject)(track, 'assemblyNames');
|
|
19
|
+
return (assemblyNames.includes(assembly1) &&
|
|
20
|
+
assemblyNames.includes(assembly2) &&
|
|
21
|
+
track.type.includes('Synteny'));
|
|
22
|
+
});
|
|
23
|
+
const resetTrack = ((_a = filteredTracks[0]) === null || _a === void 0 ? void 0 : _a.trackId) || '';
|
|
24
|
+
const r = importFormSyntenyTrackSelections[selectedRow];
|
|
25
|
+
const value = (r === null || r === void 0 ? void 0 : r.type) === 'preConfigured' ? r.value : undefined;
|
|
26
|
+
(0, react_1.useEffect)(() => {
|
|
27
|
+
model.setImportFormSyntenyTrack(selectedRow, {
|
|
28
|
+
type: 'preConfigured',
|
|
29
|
+
value: resetTrack,
|
|
30
|
+
});
|
|
31
|
+
}, [assembly2, assembly1, resetTrack, selectedRow, model]);
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { style: { padding: 12 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Select a track from the select box below, the track will be shown when you hit \"Launch\"." }), value && filteredTracks.map(r => r.trackId).includes(value) ? ((0, jsx_runtime_1.jsx)(material_1.Select, { value: value, onChange: event => {
|
|
33
|
+
model.setImportFormSyntenyTrack(selectedRow, {
|
|
34
|
+
type: 'preConfigured',
|
|
35
|
+
value: event.target.value,
|
|
36
|
+
});
|
|
37
|
+
}, children: filteredTracks.map(track => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: track.trackId, children: (0, tracks_1.getTrackName)(track, session) }, track.trackId))) })) : ((0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: `No synteny tracks found for ${assembly1},${assembly2}` }))] }));
|
|
38
|
+
});
|
|
39
|
+
exports.default = ImportSyntenyTrackSelector;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
2
|
+
export default function ImportSyntenyTrackSelectorArea({ model, assembly1, assembly2, selectedRow, }: {
|
|
3
|
+
model: LinearSyntenyViewModel;
|
|
4
|
+
assembly1: string;
|
|
5
|
+
assembly2: string;
|
|
6
|
+
selectedRow: number;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = ImportSyntenyTrackSelectorArea;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const ImportSyntenyOpenCustomTrack_1 = __importDefault(require("./ImportSyntenyOpenCustomTrack"));
|
|
11
|
+
const ImportSyntenyPreConfigured_1 = __importDefault(require("./ImportSyntenyPreConfigured"));
|
|
12
|
+
function ImportSyntenyTrackSelectorArea({ model, assembly1, assembly2, selectedRow, }) {
|
|
13
|
+
const [choice, setChoice] = (0, react_1.useState)('tracklist');
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
if (choice === 'none') {
|
|
16
|
+
model.setImportFormSyntenyTrack(selectedRow, { type: 'none' });
|
|
17
|
+
}
|
|
18
|
+
}, [choice, model, selectedRow]);
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.FormControl, { children: (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, { row: true, value: choice, "aria-labelledby": "group-label", onChange: event => {
|
|
20
|
+
setChoice(event.target.value);
|
|
21
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "none", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "None" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "tracklist", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "Existing track" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { value: "custom", control: (0, jsx_runtime_1.jsx)(material_1.Radio, {}), label: "New track" })] }) }), choice === 'custom' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyOpenCustomTrack_1.default, { model: model, selectedRow: selectedRow, assembly2: assembly2, assembly1: assembly1 })) : null, choice === 'tracklist' ? ((0, jsx_runtime_1.jsx)(ImportSyntenyPreConfigured_1.default, { model: model, selectedRow: selectedRow, assembly1: assembly1, assembly2: assembly2 })) : null] }));
|
|
22
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LinearSyntenyViewModel } from '../../model';
|
|
1
|
+
import type { LinearSyntenyViewModel } from '../../model';
|
|
3
2
|
declare const LinearSyntenyViewImportForm: ({ model, }: {
|
|
4
3
|
model: LinearSyntenyViewModel;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default LinearSyntenyViewImportForm;
|