@jbrowse/plugin-linear-genome-view 1.5.1 → 1.5.5
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/LinearGenomeView/components/HelpDialog.d.ts +5 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +2 -1
- package/dist/plugin-linear-genome-view.cjs.development.js +281 -238
- package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
- package/dist/plugin-linear-genome-view.esm.js +282 -239
- package/dist/plugin-linear-genome-view.esm.js.map +1 -1
- package/package.json +4 -4
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +0 -1
- package/src/LinearGenomeView/components/HelpDialog.tsx +81 -0
- package/src/LinearGenomeView/components/ImportForm.tsx +18 -27
- package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +1 -1
- package/src/LinearGenomeView/components/OverviewRubberBand.tsx +1 -1
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +6 -2
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +132 -114
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +12 -34
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +49 -3
- package/src/declare.d.ts +0 -1
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
Dialog,
|
|
7
7
|
DialogActions,
|
|
8
8
|
DialogContent,
|
|
9
|
-
DialogContentText,
|
|
10
9
|
DialogTitle,
|
|
11
10
|
Divider,
|
|
12
11
|
IconButton,
|
|
@@ -18,10 +17,9 @@ import {
|
|
|
18
17
|
TableRow,
|
|
19
18
|
Typography,
|
|
20
19
|
Paper,
|
|
20
|
+
makeStyles,
|
|
21
21
|
} from '@material-ui/core'
|
|
22
22
|
import CloseIcon from '@material-ui/icons/Close'
|
|
23
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
24
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
|
|
25
23
|
import { LinearGenomeViewModel } from '../..'
|
|
26
24
|
|
|
27
25
|
export const useStyles = makeStyles(theme => ({
|
|
@@ -101,8 +99,8 @@ export default function SearchResultsDialog({
|
|
|
101
99
|
|
|
102
100
|
return (
|
|
103
101
|
<Dialog open maxWidth="xl" onClose={handleClose}>
|
|
104
|
-
<DialogTitle
|
|
105
|
-
Search
|
|
102
|
+
<DialogTitle>
|
|
103
|
+
Search results
|
|
106
104
|
{handleClose ? (
|
|
107
105
|
<IconButton
|
|
108
106
|
data-testid="close-resultsDialog"
|
|
@@ -117,18 +115,15 @@ export default function SearchResultsDialog({
|
|
|
117
115
|
</DialogTitle>
|
|
118
116
|
<Divider />
|
|
119
117
|
<DialogContent>
|
|
120
|
-
{model.searchResults?.length
|
|
121
|
-
model.searchResults === undefined ? (
|
|
118
|
+
{!model.searchResults?.length ? (
|
|
122
119
|
<Typography>
|
|
123
|
-
|
|
124
|
-
<b>{model.searchQuery}</b>
|
|
120
|
+
No results found for <b>{model.searchQuery}</b>
|
|
125
121
|
</Typography>
|
|
126
122
|
) : (
|
|
127
123
|
<>
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</DialogContentText>
|
|
124
|
+
<Typography>
|
|
125
|
+
Showing results for <b>{model.searchQuery}</b>
|
|
126
|
+
</Typography>
|
|
132
127
|
<TableContainer component={Paper}>
|
|
133
128
|
<Table>
|
|
134
129
|
<TableHead>
|
|
@@ -140,8 +135,8 @@ export default function SearchResultsDialog({
|
|
|
140
135
|
</TableRow>
|
|
141
136
|
</TableHead>
|
|
142
137
|
<TableBody>
|
|
143
|
-
{model.searchResults.map(
|
|
144
|
-
<TableRow key={`${result.
|
|
138
|
+
{model.searchResults.map(result => (
|
|
139
|
+
<TableRow key={`${result.getId()}`}>
|
|
145
140
|
<TableCell component="th" scope="row">
|
|
146
141
|
{result.getLabel()}
|
|
147
142
|
</TableCell>
|
|
@@ -151,18 +146,6 @@ export default function SearchResultsDialog({
|
|
|
151
146
|
<TableCell align="right">
|
|
152
147
|
{getTrackName(result.getTrackId()) || 'N/A'}
|
|
153
148
|
</TableCell>
|
|
154
|
-
<TableCell align="right">
|
|
155
|
-
<Button
|
|
156
|
-
onClick={() => {
|
|
157
|
-
handleClick(result.getLocation())
|
|
158
|
-
handleClose()
|
|
159
|
-
}}
|
|
160
|
-
color="primary"
|
|
161
|
-
variant="contained"
|
|
162
|
-
>
|
|
163
|
-
Go to location
|
|
164
|
-
</Button>
|
|
165
|
-
</TableCell>
|
|
166
149
|
<TableCell align="right">
|
|
167
150
|
<Button
|
|
168
151
|
onClick={() => {
|
|
@@ -177,7 +160,7 @@ export default function SearchResultsDialog({
|
|
|
177
160
|
color="primary"
|
|
178
161
|
variant="contained"
|
|
179
162
|
>
|
|
180
|
-
|
|
163
|
+
Go
|
|
181
164
|
</Button>
|
|
182
165
|
</TableCell>
|
|
183
166
|
</TableRow>
|
|
@@ -190,12 +173,7 @@ export default function SearchResultsDialog({
|
|
|
190
173
|
</DialogContent>
|
|
191
174
|
<Divider />
|
|
192
175
|
<DialogActions>
|
|
193
|
-
<Button
|
|
194
|
-
onClick={() => {
|
|
195
|
-
handleClose()
|
|
196
|
-
}}
|
|
197
|
-
color="primary"
|
|
198
|
-
>
|
|
176
|
+
<Button onClick={() => handleClose()} color="primary">
|
|
199
177
|
Cancel
|
|
200
178
|
</Button>
|
|
201
179
|
</DialogActions>
|
|
@@ -17,7 +17,7 @@ exports[`<LinearGenomeView /> renders one track, one region 1`] = `
|
|
|
17
17
|
>
|
|
18
18
|
<div
|
|
19
19
|
class="makeStyles-scaleBarVisibleRegion"
|
|
20
|
-
style="width: 800px; left: 0px; background: rgba(121, 134, 203, 0.3);"
|
|
20
|
+
style="width: 800px; left: 0px; background: rgba(121, 134, 203, 0.3); border-color: #7986cb;"
|
|
21
21
|
/>
|
|
22
22
|
<div
|
|
23
23
|
class="makeStyles-scaleBarContig"
|
|
@@ -207,6 +207,29 @@ exports[`<LinearGenomeView /> renders one track, one region 1`] = `
|
|
|
207
207
|
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
208
208
|
/>
|
|
209
209
|
</svg>
|
|
210
|
+
<button
|
|
211
|
+
class="MuiButtonBase-root MuiIconButton-root"
|
|
212
|
+
tabindex="0"
|
|
213
|
+
type="button"
|
|
214
|
+
>
|
|
215
|
+
<span
|
|
216
|
+
class="MuiIconButton-label"
|
|
217
|
+
>
|
|
218
|
+
<svg
|
|
219
|
+
aria-hidden="true"
|
|
220
|
+
class="MuiSvgIcon-root"
|
|
221
|
+
focusable="false"
|
|
222
|
+
viewBox="0 0 24 24"
|
|
223
|
+
>
|
|
224
|
+
<path
|
|
225
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
|
|
226
|
+
/>
|
|
227
|
+
</svg>
|
|
228
|
+
</span>
|
|
229
|
+
<span
|
|
230
|
+
class="MuiTouchRipple-root"
|
|
231
|
+
/>
|
|
232
|
+
</button>
|
|
210
233
|
</div>
|
|
211
234
|
<div
|
|
212
235
|
class="MuiAutocomplete-endAdornment"
|
|
@@ -581,7 +604,7 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
|
|
|
581
604
|
>
|
|
582
605
|
<div
|
|
583
606
|
class="makeStyles-scaleBarVisibleRegion"
|
|
584
|
-
style="width: 580px; left: 0px; background: rgba(121, 134, 203, 0.3);"
|
|
607
|
+
style="width: 580px; left: 0px; background: rgba(121, 134, 203, 0.3); border-color: #7986cb;"
|
|
585
608
|
/>
|
|
586
609
|
<div
|
|
587
610
|
class="makeStyles-scaleBarContig"
|
|
@@ -751,7 +774,7 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
|
|
|
751
774
|
class="MuiAutocomplete-root"
|
|
752
775
|
data-testid="autocomplete"
|
|
753
776
|
role="combobox"
|
|
754
|
-
style="width:
|
|
777
|
+
style="width: 255.22500000000002px;"
|
|
755
778
|
>
|
|
756
779
|
<div
|
|
757
780
|
class="MuiFormControl-root MuiTextField-root makeStyles-headerRefName MuiFormControl-fullWidth"
|
|
@@ -787,6 +810,29 @@ exports[`<LinearGenomeView /> renders two tracks, two regions 1`] = `
|
|
|
787
810
|
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
788
811
|
/>
|
|
789
812
|
</svg>
|
|
813
|
+
<button
|
|
814
|
+
class="MuiButtonBase-root MuiIconButton-root"
|
|
815
|
+
tabindex="0"
|
|
816
|
+
type="button"
|
|
817
|
+
>
|
|
818
|
+
<span
|
|
819
|
+
class="MuiIconButton-label"
|
|
820
|
+
>
|
|
821
|
+
<svg
|
|
822
|
+
aria-hidden="true"
|
|
823
|
+
class="MuiSvgIcon-root"
|
|
824
|
+
focusable="false"
|
|
825
|
+
viewBox="0 0 24 24"
|
|
826
|
+
>
|
|
827
|
+
<path
|
|
828
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
|
|
829
|
+
/>
|
|
830
|
+
</svg>
|
|
831
|
+
</span>
|
|
832
|
+
<span
|
|
833
|
+
class="MuiTouchRipple-root"
|
|
834
|
+
/>
|
|
835
|
+
</button>
|
|
790
836
|
</div>
|
|
791
837
|
<div
|
|
792
838
|
class="MuiAutocomplete-endAdornment"
|
package/src/declare.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'normalize-wheel'
|