react-msaview 1.2.7 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/components/AboutDlg.d.ts +1 -0
  2. package/dist/components/AboutDlg.js +41 -27
  3. package/dist/components/AddTrackDlg.d.ts +1 -0
  4. package/dist/components/AddTrackDlg.js +17 -26
  5. package/dist/components/AnnotationDlg.d.ts +1 -0
  6. package/dist/components/AnnotationDlg.js +49 -47
  7. package/dist/components/BoxTrack.d.ts +1 -0
  8. package/dist/components/BoxTrack.js +22 -33
  9. package/dist/components/DetailsDlg.d.ts +1 -0
  10. package/dist/components/DetailsDlg.js +5 -14
  11. package/dist/components/Header.d.ts +1 -0
  12. package/dist/components/Header.js +38 -39
  13. package/dist/components/ImportForm.d.ts +1 -0
  14. package/dist/components/ImportForm.js +73 -73
  15. package/dist/components/MSACanvas.d.ts +1 -0
  16. package/dist/components/MSACanvas.js +10 -21
  17. package/dist/components/MSAView.d.ts +1 -0
  18. package/dist/components/MSAView.js +25 -17
  19. package/dist/components/MoreInfoDlg.d.ts +1 -0
  20. package/dist/components/MoreInfoDlg.js +5 -14
  21. package/dist/components/ResizeHandles.d.ts +1 -0
  22. package/dist/components/ResizeHandles.js +7 -6
  23. package/dist/components/Rubberband.js +46 -48
  24. package/dist/components/Ruler.d.ts +1 -0
  25. package/dist/components/Ruler.js +17 -26
  26. package/dist/components/SettingsDlg.d.ts +1 -0
  27. package/dist/components/SettingsDlg.js +24 -33
  28. package/dist/components/TextTrack.d.ts +1 -0
  29. package/dist/components/TextTrack.js +5 -17
  30. package/dist/components/Track.d.ts +1 -0
  31. package/dist/components/Track.js +24 -31
  32. package/dist/components/TrackInfoDlg.d.ts +1 -0
  33. package/dist/components/TrackInfoDlg.js +16 -23
  34. package/dist/components/TracklistDlg.d.ts +1 -0
  35. package/dist/components/TracklistDlg.js +12 -20
  36. package/dist/components/TreeCanvas.d.ts +1 -0
  37. package/dist/components/TreeCanvas.js +96 -84
  38. package/dist/components/TreeRuler.d.ts +1 -0
  39. package/dist/components/TreeRuler.js +2 -2
  40. package/dist/components/package.json +4 -16
  41. package/dist/model.d.ts +11 -2
  42. package/dist/model.js +25 -7
  43. package/package.json +4 -16
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export default function AboutDialog({ onClose, open, }: {
2
3
  onClose: () => void;
3
4
  open: boolean;
@@ -1,36 +1,50 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
- import { useState } from 'react';
1
+ import React, { useState } from 'react';
14
2
  import { Dialog, DialogTitle, DialogContent, Typography, Link, } from '@material-ui/core';
15
3
  import { version } from './package.json';
16
4
  function LicenseDialog(_a) {
17
5
  var onClose = _a.onClose, open = _a.open;
18
- return (_jsxs(Dialog, __assign({ onClose: function () { return onClose(); }, open: open }, { children: [_jsx(DialogTitle, { children: "Biotite License" }, void 0),
19
- _jsx(DialogContent, { children: _jsx("pre", __assign({ style: { height: 100, overflow: 'auto' } }, { children: "\nCopyright 2017 - 2020, The Biotite contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n " }), void 0) }, void 0)] }), void 0));
6
+ return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
7
+ React.createElement(DialogTitle, null, "Biotite License"),
8
+ React.createElement(DialogContent, null,
9
+ React.createElement("pre", { style: { height: 100, overflow: 'auto' } }, "\nCopyright 2017 - 2020, The Biotite contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n "))));
20
10
  }
21
11
  export default function AboutDialog(_a) {
22
12
  var onClose = _a.onClose, open = _a.open;
23
13
  var _b = useState(false), dlgOpen = _b[0], setDlgOpen = _b[1];
24
- return (_jsxs(_Fragment, { children: [_jsx(LicenseDialog, { onClose: function () { return setDlgOpen(false); }, open: dlgOpen }, void 0),
25
- _jsxs(Dialog, __assign({ onClose: function () { return onClose(); }, open: open }, { children: [_jsx(DialogTitle, { children: "About this plugin" }, void 0),
26
- _jsxs(DialogContent, { children: [_jsxs(Typography, { children: ["JBrowse 2 MSAView plugin ", version, " (", _jsx(Link, __assign({ href: "https://github.com/gmod/jbrowse-plugin-msaview" }, { children: "Github" }), void 0), ")"] }, void 0),
27
- _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Typography, { children: ["We use some color schemes from the", ' ',
28
- _jsx(Link, __assign({ href: "https://github.com/biotite-dev/biotite" }, { children: "biotite" }), void 0), ' ', "project, and their license is reproduced", ' ',
29
- _jsx(Link, __assign({ onClick: function () { return setDlgOpen(true); } }, { children: "here" }), void 0)] }, void 0) }, void 0),
30
- _jsx("li", { children: _jsxs(Typography, { children: ["See this page for some information on jalview colorings", ' ',
31
- _jsx(Link, __assign({ href: "https://www.jalview.org/help/html/colourSchemes/" }, { children: "here" }), void 0)] }, void 0) }, void 0),
32
- _jsx("li", { children: _jsxs(Typography, { children: ["See this page for some info on the clustal, cinema, maeditor, and lesk color schemes", ' ',
33
- _jsx(Link, __assign({ href: "http://www.bioinformatics.nl/~berndb/aacolour.html" }, { children: "here" }), void 0)] }, void 0) }, void 0),
34
- _jsx("li", { children: _jsxs(Typography, { children: ["See this paper about the flower color scheme", ' ',
35
- _jsx(Link, __assign({ href: "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7245768/" }, { children: "here" }), void 0)] }, void 0) }, void 0)] }, void 0)] }, void 0)] }), void 0)] }, void 0));
14
+ return (React.createElement(React.Fragment, null,
15
+ React.createElement(LicenseDialog, { onClose: function () { return setDlgOpen(false); }, open: dlgOpen }),
16
+ React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
17
+ React.createElement(DialogTitle, null, "About this plugin"),
18
+ React.createElement(DialogContent, null,
19
+ React.createElement(Typography, null,
20
+ "JBrowse 2 MSAView plugin ",
21
+ version,
22
+ " (",
23
+ React.createElement(Link, { href: "https://github.com/gmod/jbrowse-plugin-msaview" }, "Github"),
24
+ ")"),
25
+ React.createElement("ul", null,
26
+ React.createElement("li", null,
27
+ React.createElement(Typography, null,
28
+ "We use some color schemes from the",
29
+ ' ',
30
+ React.createElement(Link, { href: "https://github.com/biotite-dev/biotite" }, "biotite"),
31
+ ' ',
32
+ "project, and their license is reproduced",
33
+ ' ',
34
+ React.createElement(Link, { onClick: function () { return setDlgOpen(true); } }, "here"))),
35
+ React.createElement("li", null,
36
+ React.createElement(Typography, null,
37
+ "See this page for some information on jalview colorings",
38
+ ' ',
39
+ React.createElement(Link, { href: "https://www.jalview.org/help/html/colourSchemes/" }, "here"))),
40
+ React.createElement("li", null,
41
+ React.createElement(Typography, null,
42
+ "See this page for some info on the clustal, cinema, maeditor, and lesk color schemes",
43
+ ' ',
44
+ React.createElement(Link, { href: "http://www.bioinformatics.nl/~berndb/aacolour.html" }, "here"))),
45
+ React.createElement("li", null,
46
+ React.createElement(Typography, null,
47
+ "See this paper about the flower color scheme",
48
+ ' ',
49
+ React.createElement(Link, { href: "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7245768/" }, "here"))))))));
36
50
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MsaViewModel } from '../model';
2
3
  declare const _default: ({ model, onClose, open, }: {
3
4
  model: MsaViewModel;
@@ -1,16 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useState } from 'react';
1
+ import React, { useState } from 'react';
14
2
  import { Dialog, DialogTitle, DialogContent, DialogActions, Button, TextField, MenuItem, Typography, } from '@material-ui/core';
15
3
  import { FileSelector } from '@jbrowse/core/ui';
16
4
  import { observer } from 'mobx-react';
@@ -19,17 +7,20 @@ export default observer(function (_a) {
19
7
  var options = model.rows.map(function (r) { return r[0]; });
20
8
  var _b = useState(), trackFile = _b[0], setTrackFile = _b[1];
21
9
  var _c = useState(''), currentOption = _c[0], setCurrentOption = _c[1];
22
- return (_jsxs(Dialog, __assign({ onClose: function () { return onClose(); }, open: open }, { children: [_jsx(DialogTitle, { children: "Add track" }, void 0),
23
- _jsxs(DialogContent, { children: [_jsx(Typography, { children: "Open relevant per-alignment tracks e.g. protein domains" }, void 0),
24
- _jsx(TextField, __assign({ select: true, helperText: "Which row does this track apply to?", value: currentOption, onChange: function (event) {
25
- setCurrentOption(event.target.value);
26
- } }, { children: options.map(function (option, index) { return (_jsx(MenuItem, __assign({ value: option }, { children: option }), option + "-" + index)); }) }), void 0),
27
- _jsx(FileSelector, { location: trackFile, setLocation: setTrackFile }, void 0),
28
- _jsxs(DialogActions, { children: [_jsx(Button, __assign({ onClick: function () {
29
- model.setError(undefined);
30
- if (trackFile) {
31
- model.setMSAFilehandle(trackFile);
32
- }
33
- }, variant: "contained", color: "primary" }, { children: "Open" }), void 0),
34
- _jsx(Button, __assign({ color: "secondary", variant: "contained", onClick: function () { return onClose(); } }, { children: "Cancel" }), void 0)] }, void 0)] }, void 0)] }), void 0));
10
+ return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
11
+ React.createElement(DialogTitle, null, "Add track"),
12
+ React.createElement(DialogContent, null,
13
+ React.createElement(Typography, null, "Open relevant per-alignment tracks e.g. protein domains"),
14
+ React.createElement(TextField, { select: true, helperText: "Which row does this track apply to?", value: currentOption, onChange: function (event) {
15
+ setCurrentOption(event.target.value);
16
+ } }, options.map(function (option, index) { return (React.createElement(MenuItem, { key: option + "-" + index, value: option }, option)); })),
17
+ React.createElement(FileSelector, { location: trackFile, setLocation: setTrackFile }),
18
+ React.createElement(DialogActions, null,
19
+ React.createElement(Button, { onClick: function () {
20
+ model.setError(undefined);
21
+ if (trackFile) {
22
+ model.setMSAFilehandle(trackFile);
23
+ }
24
+ }, variant: "contained", color: "primary" }, "Open"),
25
+ React.createElement(Button, { color: "secondary", variant: "contained", onClick: function () { return onClose(); } }, "Cancel")))));
35
26
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MsaViewModel } from '../model';
2
3
  declare const _default: ({ onClose, data, model, }: {
3
4
  model: MsaViewModel;
@@ -1,21 +1,13 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
7
6
  }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
11
9
  };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
13
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
14
- to[j] = from[i];
15
- return to;
16
- };
17
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
- import { useState } from 'react';
10
+ import React, { useState } from 'react';
19
11
  import { observer } from 'mobx-react';
20
12
  import { Button, Dialog, DialogActions, DialogTitle, DialogContent, IconButton, TextField, Typography, } from '@material-ui/core';
21
13
  import DeleteIcon from '@material-ui/icons/Delete';
@@ -31,9 +23,11 @@ var specialFromEntries = function (val) {
31
23
  };
32
24
  var Row = observer(function (_a) {
33
25
  var name = _a.name, value = _a.value, setValue = _a.setValue, setName = _a.setName, onDelete = _a.onDelete;
34
- return (_jsxs("div", { children: [_jsx(IconButton, __assign({ onClick: onDelete, style: { margin: 10 } }, { children: _jsx(DeleteIcon, {}, void 0) }), void 0),
35
- _jsx(TextField, { value: name, onChange: function (event) { return setName(event.target.value); }, label: "Key" }, void 0),
36
- _jsx(TextField, { value: value, onChange: function (event) { return setValue(event.target.value); }, label: "Value" }, void 0)] }, void 0));
26
+ return (React.createElement("div", null,
27
+ React.createElement(IconButton, { onClick: onDelete, style: { margin: 10 } },
28
+ React.createElement(DeleteIcon, null)),
29
+ React.createElement(TextField, { value: name, onChange: function (event) { return setName(event.target.value); }, label: "Key" }),
30
+ React.createElement(TextField, { value: value, onChange: function (event) { return setValue(event.target.value); }, label: "Value" })));
37
31
  });
38
32
  export default observer(function (_a) {
39
33
  var onClose = _a.onClose, data = _a.data, model = _a.model;
@@ -44,32 +38,40 @@ export default observer(function (_a) {
44
38
  ['ID', ''],
45
39
  ['Note', ''],
46
40
  ]), rows = _b[0], setRows = _b[1];
47
- return (_jsxs(Dialog, __assign({ onClose: function () { return onClose(); }, open: true }, { children: [_jsx(DialogTitle, { children: "Create new region annotation" }, void 0),
48
- _jsxs(DialogContent, { children: [_jsxs(Typography, { children: ["Do you want to add an annotation to the MSA at ", l, "..", r, ' ',
49
- blanks.length
50
- ? " (gapped " + model.getPos(l) + ".." + model.getPos(r)
51
- : ''] }, void 0),
52
- rows.map(function (_a, index) {
53
- var key = _a[0], val = _a[1];
54
- return (_jsx(Row, { name: key, value: val, setValue: function (newValue) {
55
- var newRows = __spreadArray([], rows);
56
- newRows[index][1] = newValue;
57
- setRows(newRows);
58
- }, setName: function (newName) {
59
- var newRows = __spreadArray([], rows);
60
- newRows[index][0] = newName;
61
- setRows(newRows);
62
- }, onDelete: function () {
63
- rows.splice(index, 1);
64
- setRows(__spreadArray([], rows));
65
- } }, index));
66
- }),
67
- _jsx(Button, __assign({ onClick: function () {
68
- setRows(__spreadArray(__spreadArray([], rows), [['', '']]));
69
- } }, { children: "Add row" }), void 0),
70
- _jsxs(DialogActions, { children: [_jsx(Button, __assign({ onClick: function () {
71
- model.addAnnotation(l, r, specialFromEntries(rows));
72
- onClose();
73
- }, variant: "contained", color: "primary" }, { children: "Submit" }), void 0),
74
- _jsx(Button, __assign({ variant: "contained", color: "secondary", onClick: function () { return onClose(); } }, { children: "Cancel" }), void 0)] }, void 0)] }, void 0)] }), void 0));
41
+ return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: true },
42
+ React.createElement(DialogTitle, null, "Create new region annotation"),
43
+ React.createElement(DialogContent, null,
44
+ React.createElement(Typography, null,
45
+ "Do you want to add an annotation to the MSA at ",
46
+ l,
47
+ "..",
48
+ r,
49
+ ' ',
50
+ blanks.length
51
+ ? " (gapped " + model.getPos(l) + ".." + model.getPos(r)
52
+ : ''),
53
+ rows.map(function (_a, index) {
54
+ var key = _a[0], val = _a[1];
55
+ return (React.createElement(Row, { key: index, name: key, value: val, setValue: function (newValue) {
56
+ var newRows = __spreadArray([], rows, true);
57
+ newRows[index][1] = newValue;
58
+ setRows(newRows);
59
+ }, setName: function (newName) {
60
+ var newRows = __spreadArray([], rows, true);
61
+ newRows[index][0] = newName;
62
+ setRows(newRows);
63
+ }, onDelete: function () {
64
+ rows.splice(index, 1);
65
+ setRows(__spreadArray([], rows, true));
66
+ } }));
67
+ }),
68
+ React.createElement(Button, { onClick: function () {
69
+ setRows(__spreadArray(__spreadArray([], rows, true), [['', '']], false));
70
+ } }, "Add row"),
71
+ React.createElement(DialogActions, null,
72
+ React.createElement(Button, { onClick: function () {
73
+ model.addAnnotation(l, r, specialFromEntries(rows));
74
+ onClose();
75
+ }, variant: "contained", color: "primary" }, "Submit"),
76
+ React.createElement(Button, { variant: "contained", color: "secondary", onClick: function () { return onClose(); } }, "Cancel")))));
75
77
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MsaViewModel } from '../model';
2
3
  declare const AnnotationTrack: ({ model, track }: {
3
4
  model: MsaViewModel;
@@ -1,16 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useRef, useMemo, useEffect } from 'react';
1
+ import React, { useRef, useMemo, useEffect } from 'react';
14
2
  import { observer } from 'mobx-react';
15
3
  import { getSnapshot, isStateTreeNode } from 'mobx-state-tree';
16
4
  import Layout from '../layout';
@@ -121,34 +109,35 @@ var AnnotationBlock = observer(function (_a) {
121
109
  rowHeight,
122
110
  blanks,
123
111
  ]);
124
- return !features ? null : (_jsxs(_Fragment, { children: [_jsx("canvas", { ref: ref, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
125
- position: 'absolute',
126
- left: scrollX + offsetX,
127
- width: blockSize,
128
- height: height,
129
- } }, void 0),
130
- _jsx("canvas", { ref: labelRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
131
- position: 'absolute',
132
- left: scrollX + offsetX,
133
- width: blockSize,
134
- height: height,
135
- } }, void 0),
136
- _jsx("canvas", { ref: mouseoverRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
137
- position: 'absolute',
138
- left: scrollX + offsetX,
139
- width: blockSize,
140
- height: height,
141
- } }, void 0)] }, void 0));
112
+ return !features ? null : (React.createElement(React.Fragment, null,
113
+ React.createElement("canvas", { ref: ref, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
114
+ position: 'absolute',
115
+ left: scrollX + offsetX,
116
+ width: blockSize,
117
+ height: height,
118
+ } }),
119
+ React.createElement("canvas", { ref: labelRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
120
+ position: 'absolute',
121
+ left: scrollX + offsetX,
122
+ width: blockSize,
123
+ height: height,
124
+ } }),
125
+ React.createElement("canvas", { ref: mouseoverRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
126
+ position: 'absolute',
127
+ left: scrollX + offsetX,
128
+ width: blockSize,
129
+ height: height,
130
+ } })));
142
131
  });
143
132
  var AnnotationTrack = observer(function (_a) {
144
133
  var model = _a.model, track = _a.track;
145
134
  var blocksX = model.blocksX, msaAreaWidth = model.msaAreaWidth;
146
135
  var height = track.model.height;
147
- return (_jsx("div", __assign({ style: {
136
+ return (React.createElement("div", { style: {
148
137
  position: 'relative',
149
138
  height: height,
150
139
  width: msaAreaWidth,
151
140
  overflow: 'hidden',
152
- } }, { children: blocksX.map(function (bx) { return (_jsx(AnnotationBlock, { track: track, model: model, offsetX: bx }, bx)); }) }), void 0));
141
+ } }, blocksX.map(function (bx) { return (React.createElement(AnnotationBlock, { track: track, key: bx, model: model, offsetX: bx })); })));
153
142
  });
154
143
  export default AnnotationTrack;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MsaViewModel } from '../model';
2
3
  declare const _default: ({ model, onClose, open, }: {
3
4
  model: MsaViewModel;
@@ -1,21 +1,12 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
13
2
  import { Dialog, DialogTitle, DialogContent } from '@material-ui/core';
14
3
  import { observer } from 'mobx-react';
15
4
  import { Attributes } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
16
5
  export default observer(function (_a) {
17
6
  var model = _a.model, onClose = _a.onClose, open = _a.open;
18
7
  var alignmentDetails = model.alignmentDetails;
19
- return (_jsxs(Dialog, __assign({ onClose: function () { return onClose(); }, open: open }, { children: [_jsx(DialogTitle, { children: "Metadata" }, void 0),
20
- _jsx(DialogContent, { children: _jsx(Attributes, { attributes: alignmentDetails }, void 0) }, void 0)] }), void 0));
8
+ return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
9
+ React.createElement(DialogTitle, null, "Metadata"),
10
+ React.createElement(DialogContent, null,
11
+ React.createElement(Attributes, { attributes: alignmentDetails }))));
21
12
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MsaViewModel } from '../model';
2
3
  declare const Header: ({ model }: {
3
4
  model: MsaViewModel;
@@ -1,16 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
- import { useState } from 'react';
1
+ import React, { useState } from 'react';
14
2
  import { IconButton, Select, Typography } from '@material-ui/core';
15
3
  import { observer } from 'mobx-react';
16
4
  import SettingsDialog from './SettingsDlg';
@@ -26,9 +14,14 @@ import ListIcon from '@material-ui/icons/List';
26
14
  var InfoArea = observer(function (_a) {
27
15
  var model = _a.model;
28
16
  var mouseOverRowName = model.mouseOverRowName, mouseCol = model.mouseCol;
29
- return (_jsxs("div", { children: [_jsxs(Typography, __assign({ display: "inline" }, { children: ["Row name: ", mouseOverRowName] }), void 0),
30
- _jsx("span", { style: { marginLeft: 10 } }, void 0),
31
- _jsxs(Typography, __assign({ display: "inline" }, { children: ["Position: ", mouseCol] }), void 0)] }, void 0));
17
+ return (React.createElement("div", null,
18
+ React.createElement(Typography, { display: "inline" },
19
+ "Row name: ",
20
+ mouseOverRowName),
21
+ React.createElement("span", { style: { marginLeft: 10 } }),
22
+ React.createElement(Typography, { display: "inline" },
23
+ "Position: ",
24
+ mouseCol)));
32
25
  });
33
26
  var Header = observer(function (_a) {
34
27
  var model = _a.model;
@@ -37,28 +30,34 @@ var Header = observer(function (_a) {
37
30
  var _d = useState(false), detailsDialogVisible = _d[0], setDetailsDialogVisible = _d[1];
38
31
  var _e = useState(false), tracklistDialogVisible = _e[0], setTracklistDialogVisible = _e[1];
39
32
  var currentAlignment = model.currentAlignment, alignmentNames = model.alignmentNames;
40
- return (_jsxs("div", __assign({ style: { display: 'flex' } }, { children: [_jsx(IconButton, __assign({ onClick: function () {
41
- model.setData({ tree: '', msa: '' });
42
- model.setTreeFilehandle(undefined);
43
- model.setMSAFilehandle(undefined);
44
- model.setScrollY(0);
45
- model.setScrollX(0);
46
- model.setCurrentAlignment(0);
47
- } }, { children: _jsx(FolderOpenIcon, {}, void 0) }), void 0),
48
- _jsx(IconButton, __assign({ onClick: function () { return setSettingsDialogVisible(true); } }, { children: _jsx(SettingsIcon, {}, void 0) }), void 0),
49
- _jsx(IconButton, __assign({ onClick: function () { return setDetailsDialogVisible(true); } }, { children: _jsx(AssignmentIcon, {}, void 0) }), void 0),
50
- _jsx(IconButton, __assign({ onClick: function () { return setTracklistDialogVisible(true); } }, { children: _jsx(ListIcon, {}, void 0) }), void 0),
51
- settingsDialogVisible ? (_jsx(SettingsDialog, { open: true, model: model, onClose: function () { return setSettingsDialogVisible(false); } }, void 0)) : null,
52
- aboutDialogVisible ? (_jsx(AboutDialog, { open: true, onClose: function () { return setAboutDialogVisible(false); } }, void 0)) : null,
53
- detailsDialogVisible ? (_jsx(DetailsDialog, { open: true, model: model, onClose: function () { return setDetailsDialogVisible(false); } }, void 0)) : null,
54
- tracklistDialogVisible ? (_jsx(TracklistDialog, { open: true, model: model, onClose: function () { return setTracklistDialogVisible(false); } }, void 0)) : null,
55
- alignmentNames.length > 0 ? (_jsx(Select, __assign({ native: true, value: currentAlignment, onChange: function (event) {
56
- model.setCurrentAlignment(+event.target.value);
57
- model.setScrollX(0);
58
- model.setScrollY(0);
59
- } }, { children: alignmentNames.map(function (option, index) { return (_jsx("option", __assign({ value: index }, { children: option }), option + "-" + index)); }) }), void 0)) : null,
60
- _jsx(InfoArea, { model: model }, void 0),
61
- _jsx("div", { style: { flex: 1 } }, void 0),
62
- _jsx(IconButton, __assign({ onClick: function () { return setAboutDialogVisible(true); } }, { children: _jsx(HelpIcon, {}, void 0) }), void 0)] }), void 0));
33
+ return (React.createElement("div", { style: { display: 'flex' } },
34
+ React.createElement(IconButton, { onClick: function () {
35
+ model.setData({ tree: '', msa: '' });
36
+ model.setTreeFilehandle(undefined);
37
+ model.setMSAFilehandle(undefined);
38
+ model.setScrollY(0);
39
+ model.setScrollX(0);
40
+ model.setCurrentAlignment(0);
41
+ } },
42
+ React.createElement(FolderOpenIcon, null)),
43
+ React.createElement(IconButton, { onClick: function () { return setSettingsDialogVisible(true); } },
44
+ React.createElement(SettingsIcon, null)),
45
+ React.createElement(IconButton, { onClick: function () { return setDetailsDialogVisible(true); } },
46
+ React.createElement(AssignmentIcon, null)),
47
+ React.createElement(IconButton, { onClick: function () { return setTracklistDialogVisible(true); } },
48
+ React.createElement(ListIcon, null)),
49
+ settingsDialogVisible ? (React.createElement(SettingsDialog, { open: true, model: model, onClose: function () { return setSettingsDialogVisible(false); } })) : null,
50
+ aboutDialogVisible ? (React.createElement(AboutDialog, { open: true, onClose: function () { return setAboutDialogVisible(false); } })) : null,
51
+ detailsDialogVisible ? (React.createElement(DetailsDialog, { open: true, model: model, onClose: function () { return setDetailsDialogVisible(false); } })) : null,
52
+ tracklistDialogVisible ? (React.createElement(TracklistDialog, { open: true, model: model, onClose: function () { return setTracklistDialogVisible(false); } })) : null,
53
+ alignmentNames.length > 0 ? (React.createElement(Select, { native: true, value: currentAlignment, onChange: function (event) {
54
+ model.setCurrentAlignment(+event.target.value);
55
+ model.setScrollX(0);
56
+ model.setScrollY(0);
57
+ } }, alignmentNames.map(function (option, index) { return (React.createElement("option", { key: option + "-" + index, value: index }, option)); }))) : null,
58
+ React.createElement(InfoArea, { model: model }),
59
+ React.createElement("div", { style: { flex: 1 } }),
60
+ React.createElement(IconButton, { onClick: function () { return setAboutDialogVisible(true); } },
61
+ React.createElement(HelpIcon, null))));
63
62
  });
64
63
  export default Header;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MsaViewModel } from '../model';
2
3
  declare const _default: ({ model }: {
3
4
  model: MsaViewModel;