@apollo-annotation/jbrowse-plugin-apollo 0.3.5 → 0.3.6

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 (126) hide show
  1. package/dist/index.esm.js +5474 -4937
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/jbrowse-plugin-apollo.cjs.development.js +4609 -4089
  4. package/dist/jbrowse-plugin-apollo.cjs.development.js.map +1 -1
  5. package/dist/jbrowse-plugin-apollo.cjs.production.min.js +1 -1
  6. package/dist/jbrowse-plugin-apollo.cjs.production.min.js.map +1 -1
  7. package/dist/jbrowse-plugin-apollo.umd.development.js +3634 -3500
  8. package/dist/jbrowse-plugin-apollo.umd.development.js.map +1 -1
  9. package/dist/jbrowse-plugin-apollo.umd.production.min.js +1 -1
  10. package/dist/jbrowse-plugin-apollo.umd.production.min.js.map +1 -1
  11. package/package.json +4 -4
  12. package/src/ApolloInternetAccount/addMenuItems.ts +5 -2
  13. package/src/ApolloInternetAccount/components/AuthTypeSelector.tsx +1 -0
  14. package/src/ApolloInternetAccount/components/LoginButtons.tsx +1 -1
  15. package/src/ApolloInternetAccount/components/LoginIcons.tsx +1 -1
  16. package/src/ApolloInternetAccount/configSchema.ts +1 -1
  17. package/src/ApolloInternetAccount/model.ts +11 -10
  18. package/src/ApolloJobModel.ts +1 -1
  19. package/src/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.ts +8 -6
  20. package/src/ApolloRefNameAliasAdapter/index.ts +2 -2
  21. package/src/ApolloSequenceAdapter/ApolloSequenceAdapter.ts +4 -4
  22. package/src/ApolloSequenceAdapter/index.ts +1 -1
  23. package/src/ApolloTextSearchAdapter/ApolloTextSearchAdapter.ts +8 -7
  24. package/src/ApolloTextSearchAdapter/index.ts +1 -1
  25. package/src/BackendDrivers/BackendDriver.ts +7 -7
  26. package/src/BackendDrivers/CollaborationServerDriver.ts +14 -10
  27. package/src/BackendDrivers/DesktopFileDriver.ts +11 -10
  28. package/src/BackendDrivers/InMemoryFileDriver.ts +10 -6
  29. package/src/ChangeManager.ts +5 -5
  30. package/src/FeatureDetailsWidget/ApolloFeatureDetailsWidget.tsx +8 -7
  31. package/src/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.tsx +35 -14
  32. package/src/FeatureDetailsWidget/AttributeKey.tsx +50 -0
  33. package/src/FeatureDetailsWidget/AttributeKeySelector.tsx +104 -0
  34. package/src/FeatureDetailsWidget/Attributes.tsx +210 -367
  35. package/src/FeatureDetailsWidget/BasicInformation.tsx +6 -5
  36. package/src/FeatureDetailsWidget/DefaultAttributeEditor.tsx +104 -0
  37. package/src/FeatureDetailsWidget/DefaultAttributeViewer.tsx +22 -0
  38. package/src/FeatureDetailsWidget/FeatureDetailsNavigation.tsx +4 -4
  39. package/src/FeatureDetailsWidget/NumberTextField.tsx +1 -1
  40. package/src/FeatureDetailsWidget/Sequence.tsx +2 -2
  41. package/src/FeatureDetailsWidget/StringTextField.tsx +1 -1
  42. package/src/FeatureDetailsWidget/TranscriptSequence.tsx +3 -3
  43. package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +21 -21
  44. package/src/FeatureDetailsWidget/TranscriptWidgetSummary.tsx +4 -4
  45. package/src/FeatureDetailsWidget/model.ts +8 -3
  46. package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +6 -6
  47. package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +13 -14
  48. package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +9 -9
  49. package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +6 -5
  50. package/src/LinearApolloDisplay/glyphs/Glyph.ts +7 -7
  51. package/src/LinearApolloDisplay/stateModel/base.ts +52 -10
  52. package/src/LinearApolloDisplay/stateModel/index.ts +4 -3
  53. package/src/LinearApolloDisplay/stateModel/layouts.ts +8 -39
  54. package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +13 -12
  55. package/src/LinearApolloDisplay/stateModel/rendering.ts +59 -31
  56. package/src/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.tsx +221 -0
  57. package/src/LinearApolloSixFrameDisplay/components/TrackLines.tsx +40 -0
  58. package/src/LinearApolloSixFrameDisplay/components/index.ts +2 -0
  59. package/src/LinearApolloSixFrameDisplay/configSchema.ts +7 -0
  60. package/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts +821 -0
  61. package/src/LinearApolloSixFrameDisplay/glyphs/Glyph.ts +63 -0
  62. package/src/LinearApolloSixFrameDisplay/glyphs/index.ts +1 -0
  63. package/src/LinearApolloSixFrameDisplay/index.ts +2 -0
  64. package/src/LinearApolloSixFrameDisplay/stateModel/base.ts +261 -0
  65. package/src/LinearApolloSixFrameDisplay/stateModel/index.ts +27 -0
  66. package/src/LinearApolloSixFrameDisplay/stateModel/layouts.ts +236 -0
  67. package/src/LinearApolloSixFrameDisplay/stateModel/mouseEvents.ts +349 -0
  68. package/src/LinearApolloSixFrameDisplay/stateModel/rendering.ts +199 -0
  69. package/src/LinearApolloSixFrameDisplay/types.ts +1 -0
  70. package/src/OntologyManager/OntologyStore/fulltext.test.ts +1 -1
  71. package/src/OntologyManager/OntologyStore/fulltext.ts +8 -3
  72. package/src/OntologyManager/OntologyStore/index.test.ts +3 -1
  73. package/src/OntologyManager/OntologyStore/index.ts +19 -14
  74. package/src/OntologyManager/OntologyStore/indexeddb-schema.ts +6 -5
  75. package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +11 -5
  76. package/src/OntologyManager/index.ts +8 -6
  77. package/src/OntologyManager/util.ts +3 -2
  78. package/src/TabularEditor/HybridGrid/ChangeHandling.ts +2 -2
  79. package/src/TabularEditor/HybridGrid/Feature.tsx +9 -7
  80. package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +1 -1
  81. package/src/TabularEditor/HybridGrid/HybridGrid.tsx +3 -2
  82. package/src/TabularEditor/HybridGrid/ToolBar.tsx +1 -1
  83. package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +6 -6
  84. package/src/TabularEditor/TabularEditorPane.tsx +1 -1
  85. package/src/TabularEditor/model.ts +2 -2
  86. package/src/TabularEditor/types.ts +5 -2
  87. package/src/components/AddAssembly.tsx +182 -179
  88. package/src/components/AddChildFeature.tsx +6 -5
  89. package/src/components/AddFeature.tsx +211 -38
  90. package/src/components/AddRefSeqAliases.tsx +14 -12
  91. package/src/components/CopyFeature.tsx +8 -7
  92. package/src/components/CreateApolloAnnotation.tsx +9 -8
  93. package/src/components/DeleteAssembly.tsx +9 -8
  94. package/src/components/DeleteFeature.tsx +5 -4
  95. package/src/components/Dialog.tsx +1 -1
  96. package/src/components/DownloadGFF3.tsx +11 -10
  97. package/src/components/FilterFeatures.tsx +6 -4
  98. package/src/components/ImportFeatures.tsx +7 -6
  99. package/src/components/LogOut.tsx +5 -4
  100. package/src/components/ManageChecks.tsx +9 -8
  101. package/src/components/ManageUsers.tsx +11 -10
  102. package/src/components/OntologyTermAutocomplete.tsx +5 -5
  103. package/src/components/OntologyTermMultiSelect.tsx +6 -6
  104. package/src/components/OpenLocalFile.tsx +4 -3
  105. package/src/components/ViewChangeLog.tsx +7 -6
  106. package/src/components/ViewCheckResults.tsx +8 -7
  107. package/src/extensions/annotationFromJBrowseFeature.test.ts +1 -0
  108. package/src/extensions/annotationFromJBrowseFeature.ts +11 -10
  109. package/src/extensions/annotationFromPileup.ts +6 -6
  110. package/src/index.ts +33 -50
  111. package/src/makeDisplayComponent.tsx +90 -37
  112. package/src/session/ClientDataStore.ts +21 -17
  113. package/src/session/session.ts +20 -26
  114. package/src/types.ts +4 -4
  115. package/src/util/annotationFeatureUtils.ts +1 -1
  116. package/src/util/index.ts +3 -3
  117. package/src/util/loadAssemblyIntoClient.ts +10 -3
  118. package/src/ApolloSixFrameRenderer/ApolloSixFrameRenderer.tsx +0 -13
  119. package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +0 -707
  120. package/src/ApolloSixFrameRenderer/configSchema.ts +0 -7
  121. package/src/ApolloSixFrameRenderer/index.ts +0 -3
  122. package/src/SixFrameFeatureDisplay/components/TrackLines.tsx +0 -19
  123. package/src/SixFrameFeatureDisplay/components/index.ts +0 -1
  124. package/src/SixFrameFeatureDisplay/configSchema.ts +0 -21
  125. package/src/SixFrameFeatureDisplay/index.ts +0 -2
  126. package/src/SixFrameFeatureDisplay/stateModel.ts +0 -443
@@ -1,26 +1,38 @@
1
1
  /* eslint-disable @typescript-eslint/unbound-method */
2
2
  /* eslint-disable @typescript-eslint/no-unnecessary-condition */
3
3
  /* eslint-disable @typescript-eslint/no-misused-promises */
4
+ import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
4
5
  import { AddFeatureChange } from '@apollo-annotation/shared'
5
- import { AbstractSessionModel, Region } from '@jbrowse/core/util/types'
6
6
  import {
7
+ type AbstractSessionModel,
8
+ type Region,
9
+ } from '@jbrowse/core/util/types'
10
+ import InfoIcon from '@mui/icons-material/Info'
11
+ import {
12
+ Box,
7
13
  Button,
8
14
  DialogActions,
9
15
  DialogContent,
10
16
  DialogContentText,
11
17
  FormControl,
18
+ FormControlLabel,
19
+ IconButton,
12
20
  InputLabel,
13
21
  MenuItem,
22
+ Radio,
23
+ RadioGroup,
14
24
  Select,
15
- SelectChangeEvent,
25
+ type SelectChangeEvent,
16
26
  TextField,
27
+ Tooltip,
17
28
  } from '@mui/material'
18
29
  import ObjectID from 'bson-objectid'
19
30
  import React, { useState } from 'react'
20
31
 
21
- import { ChangeManager } from '../ChangeManager'
32
+ import { type ChangeManager } from '../ChangeManager'
22
33
  import { isOntologyClass } from '../OntologyManager'
23
- import { ApolloSessionModel } from '../session'
34
+ import { type ApolloSessionModel } from '../session'
35
+
24
36
  import { Dialog } from './Dialog'
25
37
  import { OntologyTermAutocomplete } from './OntologyTermAutocomplete'
26
38
 
@@ -31,6 +43,53 @@ interface AddFeatureProps {
31
43
  changeManager: ChangeManager
32
44
  }
33
45
 
46
+ enum NewFeature {
47
+ GENE_AND_SUBFEATURES = 'GENE_AND_SUBFEATURES',
48
+ TRANSCRIPT_AND_SUBFEATURES = 'TRANSCRIPT_AND_SUBFEATURES',
49
+ CUSTOM = 'CUSTOM',
50
+ }
51
+
52
+ function makeCodingMrna(
53
+ refSeqId: string,
54
+ strand: 1 | -1 | undefined,
55
+ min: number,
56
+ max: number,
57
+ ): AnnotationFeatureSnapshot {
58
+ const cds = {
59
+ _id: new ObjectID().toHexString(),
60
+ refSeq: refSeqId,
61
+ type: 'CDS',
62
+ min,
63
+ max,
64
+ strand,
65
+ } as AnnotationFeatureSnapshot
66
+
67
+ const exon = {
68
+ _id: new ObjectID().toHexString(),
69
+ refSeq: refSeqId,
70
+ type: 'exon',
71
+ min,
72
+ max,
73
+ strand,
74
+ } as AnnotationFeatureSnapshot
75
+
76
+ const children: Record<string, AnnotationFeatureSnapshot> = {}
77
+ children[cds._id] = cds
78
+ children[exon._id] = exon
79
+
80
+ const mRNA = {
81
+ _id: new ObjectID().toHexString(),
82
+ refSeq: refSeqId,
83
+ type: 'mRNA',
84
+ min,
85
+ max,
86
+ strand,
87
+ children,
88
+ } as AnnotationFeatureSnapshot
89
+
90
+ return mRNA
91
+ }
92
+
34
93
  export function AddFeature({
35
94
  changeManager,
36
95
  handleClose,
@@ -40,7 +99,8 @@ export function AddFeature({
40
99
  const { notify } = session as unknown as AbstractSessionModel
41
100
  const [end, setEnd] = useState(String(region.end))
42
101
  const [start, setStart] = useState(String(region.start + 1))
43
- const [type, setType] = useState('')
102
+ const [type, setType] = useState<NewFeature>(NewFeature.GENE_AND_SUBFEATURES)
103
+ const [customType, setCustomType] = useState<string>()
44
104
  const [strand, setStrand] = useState<1 | -1 | undefined>()
45
105
  const [errorMessage, setErrorMessage] = useState('')
46
106
 
@@ -64,6 +124,59 @@ export function AddFeature({
64
124
  return
65
125
  }
66
126
 
127
+ if (type === NewFeature.GENE_AND_SUBFEATURES) {
128
+ const mRNA = makeCodingMrna(
129
+ refSeqId,
130
+ strand,
131
+ Number(start) - 1,
132
+ Number(end),
133
+ )
134
+ const children: Record<string, AnnotationFeatureSnapshot> = {}
135
+ children[mRNA._id] = mRNA
136
+
137
+ const id = new ObjectID().toHexString()
138
+ const change = new AddFeatureChange({
139
+ changedIds: [id],
140
+ typeName: 'AddFeatureChange',
141
+ assembly: region.assemblyName,
142
+ addedFeature: {
143
+ _id: id,
144
+ refSeq: refSeqId,
145
+ min: Number(start) - 1,
146
+ max: Number(end),
147
+ type: 'gene',
148
+ strand,
149
+ children,
150
+ },
151
+ })
152
+ await changeManager.submit(change)
153
+ notify('Feature added successfully', 'success')
154
+ handleClose()
155
+ return
156
+ }
157
+ if (type === NewFeature.TRANSCRIPT_AND_SUBFEATURES) {
158
+ const mRNA = makeCodingMrna(
159
+ refSeqId,
160
+ strand,
161
+ Number(start) - 1,
162
+ Number(end),
163
+ )
164
+ const change = new AddFeatureChange({
165
+ changedIds: [mRNA._id],
166
+ typeName: 'AddFeatureChange',
167
+ assembly: region.assemblyName,
168
+ addedFeature: mRNA,
169
+ })
170
+ await changeManager.submit(change)
171
+ notify('Feature added successfully', 'success')
172
+ handleClose()
173
+ return
174
+ }
175
+
176
+ if (!customType) {
177
+ setErrorMessage('No type selected')
178
+ return
179
+ }
67
180
  const id = new ObjectID().toHexString()
68
181
  const change = new AddFeatureChange({
69
182
  changedIds: [id],
@@ -74,19 +187,14 @@ export function AddFeature({
74
187
  refSeq: refSeqId,
75
188
  min: Number(start) - 1,
76
189
  max: Number(end),
77
- type,
190
+ type: customType,
78
191
  strand,
79
192
  },
80
193
  })
81
194
  await changeManager.submit(change)
82
195
  notify('Feature added successfully', 'success')
83
196
  handleClose()
84
- event.preventDefault()
85
- }
86
-
87
- function handleChangeType(newType: string) {
88
- setErrorMessage('')
89
- setType(newType)
197
+ return
90
198
  }
91
199
 
92
200
  function handleChangeStrand(e: SelectChangeEvent) {
@@ -109,6 +217,24 @@ export function AddFeature({
109
217
 
110
218
  const error = Number(end) <= Number(start)
111
219
 
220
+ function handleChangeOntologyType(newType: string) {
221
+ setErrorMessage('')
222
+ setCustomType(newType)
223
+ }
224
+
225
+ const handleTypeChange = (e: SelectChangeEvent) => {
226
+ setErrorMessage('')
227
+ const { value } = e.target
228
+ if (Object.keys(NewFeature).includes(value)) {
229
+ setType(NewFeature[value as NewFeature])
230
+ }
231
+ }
232
+
233
+ let submitDisabled: boolean = Boolean(error) || !(start && end && type)
234
+ if (type === NewFeature.CUSTOM && !customType) {
235
+ submitDisabled = true
236
+ }
237
+
112
238
  return (
113
239
  <Dialog
114
240
  open
@@ -117,7 +243,7 @@ export function AddFeature({
117
243
  maxWidth={false}
118
244
  data-testid="add-feature-dialog"
119
245
  >
120
- <form onSubmit={onSubmit}>
246
+ <form onSubmit={onSubmit} data-testid="submit-form">
121
247
  <DialogContent style={{ display: 'flex', flexDirection: 'column' }}>
122
248
  <TextField
123
249
  margin="dense"
@@ -145,26 +271,6 @@ export function AddFeature({
145
271
  error={error}
146
272
  helperText={error ? '"End" must be greater than "Start"' : null}
147
273
  />
148
- <OntologyTermAutocomplete
149
- session={session}
150
- ontologyName="Sequence Ontology"
151
- style={{ width: 170 }}
152
- value={type}
153
- filterTerms={isOntologyClass}
154
- renderInput={(params) => (
155
- <TextField
156
- {...params}
157
- label="Type"
158
- variant="outlined"
159
- fullWidth
160
- />
161
- )}
162
- onChange={(oldValue, newValue) => {
163
- if (newValue) {
164
- handleChangeType(newValue)
165
- }
166
- }}
167
- />
168
274
  <FormControl>
169
275
  <InputLabel id="demo-simple-select-label">Strand</InputLabel>
170
276
  <Select
@@ -179,13 +285,80 @@ export function AddFeature({
179
285
  <MenuItem value={-1}>-</MenuItem>
180
286
  </Select>
181
287
  </FormControl>
288
+
289
+ <FormControl style={{ marginTop: 20 }}>
290
+ <RadioGroup
291
+ aria-labelledby="demo-radio-buttons-group-label"
292
+ defaultValue={NewFeature.GENE_AND_SUBFEATURES}
293
+ name="radio-buttons-group"
294
+ value={type}
295
+ onChange={handleTypeChange}
296
+ >
297
+ <FormControlLabel
298
+ value={NewFeature.GENE_AND_SUBFEATURES}
299
+ control={<Radio />}
300
+ label={
301
+ <Box display="flex" alignItems="center">
302
+ Add gene and sub-features
303
+ <Tooltip title="This is a shortcut to create a gene with a single mRNA, exon, and CDS">
304
+ <IconButton size="small">
305
+ <InfoIcon sx={{ fontSize: 18 }} />
306
+ </IconButton>
307
+ </Tooltip>
308
+ </Box>
309
+ }
310
+ />
311
+
312
+ <FormControlLabel
313
+ value={NewFeature.TRANSCRIPT_AND_SUBFEATURES}
314
+ control={<Radio />}
315
+ label={
316
+ <Box display="flex" alignItems="center">
317
+ Add transcript and sub-features
318
+ <Tooltip title="This is a shortcut to create a single mRNA with exon and CDS, but without a parent gene">
319
+ <IconButton size="small">
320
+ <InfoIcon sx={{ fontSize: 18 }} />
321
+ </IconButton>
322
+ </Tooltip>
323
+ </Box>
324
+ }
325
+ />
326
+ <FormControlLabel
327
+ value={NewFeature.CUSTOM}
328
+ checked={
329
+ type !== NewFeature.GENE_AND_SUBFEATURES &&
330
+ type !== NewFeature.TRANSCRIPT_AND_SUBFEATURES
331
+ }
332
+ control={<Radio />}
333
+ label="Add feature with a sequence ontology type"
334
+ />
335
+ </RadioGroup>
336
+ </FormControl>
337
+ {type === NewFeature.CUSTOM ? (
338
+ <OntologyTermAutocomplete
339
+ session={session}
340
+ ontologyName="Sequence Ontology"
341
+ style={{ width: 170 }}
342
+ value=""
343
+ filterTerms={isOntologyClass}
344
+ renderInput={(params) => (
345
+ <TextField
346
+ {...params}
347
+ label="Type"
348
+ variant="outlined"
349
+ fullWidth
350
+ />
351
+ )}
352
+ onChange={(_oldValue, newValue) => {
353
+ if (newValue) {
354
+ handleChangeOntologyType(newValue)
355
+ }
356
+ }}
357
+ />
358
+ ) : null}
182
359
  </DialogContent>
183
360
  <DialogActions>
184
- <Button
185
- variant="contained"
186
- type="submit"
187
- disabled={error || !(start && end && type)}
188
- >
361
+ <Button variant="contained" type="submit" disabled={submitDisabled}>
189
362
  Submit
190
363
  </Button>
191
364
  <Button variant="outlined" type="submit" onClick={handleClose}>
@@ -1,7 +1,9 @@
1
1
  /* eslint-disable @typescript-eslint/unbound-method */
2
- import { ChangeManager } from '../ChangeManager'
3
- import { ApolloSessionModel } from '../session'
4
- import { Dialog } from './Dialog'
2
+ import {
3
+ AddRefSeqAliasesChange,
4
+ type SerializedRefSeqAliases,
5
+ } from '@apollo-annotation/shared'
6
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
5
7
  import {
6
8
  Button,
7
9
  DialogActions,
@@ -12,19 +14,19 @@ import {
12
14
  InputLabel,
13
15
  MenuItem,
14
16
  Select,
15
- SelectChangeEvent,
17
+ type SelectChangeEvent,
16
18
  } from '@mui/material'
19
+ import { DataGrid, type GridColDef, type GridRowModel } from '@mui/x-data-grid'
17
20
  import React, { useEffect, useRef, useState } from 'react'
21
+
18
22
  import {
19
- CollaborationServerDriver,
20
- ApolloInternetAccount,
23
+ type ApolloInternetAccount,
24
+ type CollaborationServerDriver,
21
25
  } from '../BackendDrivers'
22
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
23
- import { DataGrid, GridColDef, GridRowModel } from '@mui/x-data-grid'
24
- import {
25
- AddRefSeqAliasesChange,
26
- SerializedRefSeqAliases,
27
- } from '@apollo-annotation/shared'
26
+ import { type ChangeManager } from '../ChangeManager'
27
+ import { type ApolloSessionModel } from '../session'
28
+
29
+ import { Dialog } from './Dialog'
28
30
 
29
31
  const columns: GridColDef[] = [
30
32
  { field: 'refName', headerName: 'Ref Name' },
@@ -4,12 +4,12 @@
4
4
  /* eslint-disable @typescript-eslint/no-misused-promises */
5
5
  /* eslint-disable @typescript-eslint/no-unsafe-assignment */
6
6
  import {
7
- AnnotationFeature,
8
- AnnotationFeatureSnapshot,
7
+ type AnnotationFeature,
8
+ type AnnotationFeatureSnapshot,
9
9
  } from '@apollo-annotation/mst'
10
10
  import { AddFeatureChange } from '@apollo-annotation/shared'
11
11
  import { readConfObject } from '@jbrowse/core/configuration'
12
- import { AbstractSessionModel } from '@jbrowse/core/util'
12
+ import { type AbstractSessionModel } from '@jbrowse/core/util'
13
13
  import {
14
14
  Button,
15
15
  DialogActions,
@@ -17,16 +17,17 @@ import {
17
17
  DialogContentText,
18
18
  MenuItem,
19
19
  Select,
20
- SelectChangeEvent,
20
+ type SelectChangeEvent,
21
21
  TextField,
22
22
  } from '@mui/material'
23
23
  import ObjectID from 'bson-objectid'
24
- import { IKeyValueMap } from 'mobx'
24
+ import { type IKeyValueMap } from 'mobx'
25
25
  import { getSnapshot } from 'mobx-state-tree'
26
26
  import React, { useEffect, useState } from 'react'
27
27
 
28
- import { ChangeManager } from '../ChangeManager'
29
- import { ApolloSessionModel } from '../session'
28
+ import { type ChangeManager } from '../ChangeManager'
29
+ import { type ApolloSessionModel } from '../session'
30
+
30
31
  import { Dialog } from './Dialog'
31
32
 
32
33
  interface CopyFeatureProps {
@@ -1,8 +1,11 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
2
  /* eslint-disable @typescript-eslint/no-misused-promises */
3
3
  /* eslint-disable @typescript-eslint/unbound-method */
4
- import React, { useEffect, useMemo, useState } from 'react'
5
4
 
5
+ import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
6
+ import { AddFeatureChange } from '@apollo-annotation/shared'
7
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
8
+ import { type AbstractSessionModel } from '@jbrowse/core/util'
6
9
  import {
7
10
  Box,
8
11
  Button,
@@ -14,17 +17,15 @@ import {
14
17
  FormControlLabel,
15
18
  MenuItem,
16
19
  Select,
17
- SelectChangeEvent,
20
+ type SelectChangeEvent,
18
21
  Typography,
19
22
  } from '@mui/material'
23
+ import { getSnapshot } from 'mobx-state-tree'
24
+ import React, { useEffect, useMemo, useState } from 'react'
25
+
26
+ import { type ApolloSessionModel } from '../session'
20
27
 
21
28
  import { Dialog } from './Dialog'
22
- import { ApolloSessionModel } from '../session'
23
- import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
24
- import { getSnapshot } from 'mobx-state-tree'
25
- import { AddFeatureChange } from '@apollo-annotation/shared'
26
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
27
- import { AbstractSessionModel } from '@jbrowse/core/util'
28
29
 
29
30
  interface CreateApolloAnnotationProps {
30
31
  session: AbstractSessionModel
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/unbound-method */
2
2
  /* eslint-disable @typescript-eslint/no-misused-promises */
3
3
  import { DeleteAssemblyChange } from '@apollo-annotation/shared'
4
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
4
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
5
5
  import {
6
6
  Button,
7
7
  Checkbox,
@@ -12,19 +12,20 @@ import {
12
12
  FormGroup,
13
13
  MenuItem,
14
14
  Select,
15
- SelectChangeEvent,
15
+ type SelectChangeEvent,
16
16
  } from '@mui/material'
17
17
  import { getRoot } from 'mobx-state-tree'
18
18
  import React, { useEffect, useState } from 'react'
19
19
 
20
- import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
20
+ import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
21
21
  import {
22
- ApolloInternetAccount,
23
- CollaborationServerDriver,
22
+ type ApolloInternetAccount,
23
+ type CollaborationServerDriver,
24
24
  } from '../BackendDrivers'
25
- import { ChangeManager } from '../ChangeManager'
26
- import { ApolloSessionModel } from '../session'
27
- import { ApolloRootModel } from '../types'
25
+ import { type ChangeManager } from '../ChangeManager'
26
+ import { type ApolloSessionModel } from '../session'
27
+ import { type ApolloRootModel } from '../types'
28
+
28
29
  import { Dialog } from './Dialog'
29
30
 
30
31
  interface DeleteAssemblyProps {
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable @typescript-eslint/unbound-method */
2
2
  /* eslint-disable @typescript-eslint/no-misused-promises */
3
- import { AnnotationFeature } from '@apollo-annotation/mst'
3
+ import { type AnnotationFeature } from '@apollo-annotation/mst'
4
4
  import { DeleteFeatureChange } from '@apollo-annotation/shared'
5
- import { AbstractSessionModel } from '@jbrowse/core/util'
5
+ import { type AbstractSessionModel } from '@jbrowse/core/util'
6
6
  import {
7
7
  Button,
8
8
  DialogActions,
@@ -12,8 +12,9 @@ import {
12
12
  import { getSnapshot } from 'mobx-state-tree'
13
13
  import React, { useState } from 'react'
14
14
 
15
- import { ChangeManager } from '../ChangeManager'
16
- import { ApolloSessionModel } from '../session'
15
+ import { type ChangeManager } from '../ChangeManager'
16
+ import { type ApolloSessionModel } from '../session'
17
+
17
18
  import { Dialog } from './Dialog'
18
19
 
19
20
  interface DeleteFeatureProps {
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/unbound-method */
2
2
  import { Dialog as JBDialog } from '@jbrowse/core/ui'
3
3
  import CloseIcon from '@mui/icons-material/Close'
4
- import { DialogProps, DialogTitle, IconButton } from '@mui/material'
4
+ import { type DialogProps, DialogTitle, IconButton } from '@mui/material'
5
5
  import { observer } from 'mobx-react'
6
6
  import React from 'react'
7
7
  import { makeStyles } from 'tss-react/mui'
@@ -3,9 +3,10 @@
3
3
  /* eslint-disable @typescript-eslint/no-unsafe-member-access */
4
4
  /* eslint-disable @typescript-eslint/no-unnecessary-condition */
5
5
  /* eslint-disable @typescript-eslint/no-misused-promises */
6
- import { ApolloAssembly } from '@apollo-annotation/mst'
7
- import gff, { GFF3Item } from '@gmod/gff'
8
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
6
+ import { type ApolloAssembly } from '@apollo-annotation/mst'
7
+ import { annotationFeatureToGFF3 } from '@apollo-annotation/shared'
8
+ import gff, { type GFF3Item } from '@gmod/gff'
9
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
9
10
  import { getConf } from '@jbrowse/core/configuration'
10
11
  import {
11
12
  Button,
@@ -14,21 +15,21 @@ import {
14
15
  DialogContentText,
15
16
  MenuItem,
16
17
  Select,
17
- SelectChangeEvent,
18
+ type SelectChangeEvent,
18
19
  } from '@mui/material'
19
20
  import { saveAs } from 'file-saver'
20
- import { IMSTMap, getSnapshot } from 'mobx-state-tree'
21
+ import { type IMSTMap, getSnapshot } from 'mobx-state-tree'
21
22
  import React, { useState } from 'react'
22
23
 
23
24
  import {
24
- ApolloInternetAccount,
25
- CollaborationServerDriver,
26
- InMemoryFileDriver,
25
+ type ApolloInternetAccount,
26
+ type CollaborationServerDriver,
27
+ type InMemoryFileDriver,
27
28
  } from '../BackendDrivers'
28
- import { ApolloSessionModel } from '../session'
29
+ import { type ApolloSessionModel } from '../session'
29
30
  import { createFetchErrorMessage } from '../util'
31
+
30
32
  import { Dialog } from './Dialog'
31
- import { annotationFeatureToGFF3 } from '@apollo-annotation/shared'
32
33
 
33
34
  interface DownloadGFF3Props {
34
35
  session: ApolloSessionModel
@@ -1,6 +1,3 @@
1
- import React, { useState } from 'react'
2
- import { ApolloSessionModel } from '../session'
3
- import { Dialog } from './Dialog'
4
1
  import {
5
2
  Box,
6
3
  Button,
@@ -10,9 +7,14 @@ import {
10
7
  Grid2,
11
8
  TextField,
12
9
  } from '@mui/material'
10
+ import { observer } from 'mobx-react'
11
+ import React, { useState } from 'react'
12
+
13
13
  import { isOntologyClass } from '../OntologyManager'
14
+ import { type ApolloSessionModel } from '../session'
15
+
16
+ import { Dialog } from './Dialog'
14
17
  import { OntologyTermAutocomplete } from './OntologyTermAutocomplete'
15
- import { observer } from 'mobx-react'
16
18
 
17
19
  interface FilterFeaturesProps {
18
20
  onUpdate: (types: string[]) => void
@@ -6,7 +6,7 @@
6
6
  /* eslint-disable @typescript-eslint/no-unsafe-assignment */
7
7
  /* eslint-disable @typescript-eslint/no-misused-promises */
8
8
  import { AddFeaturesFromFileChange } from '@apollo-annotation/shared'
9
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
9
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
10
10
  import { getConf } from '@jbrowse/core/configuration'
11
11
  import {
12
12
  Button,
@@ -15,7 +15,7 @@ import {
15
15
  DialogContentText,
16
16
  MenuItem,
17
17
  Select,
18
- SelectChangeEvent,
18
+ type SelectChangeEvent,
19
19
  } from '@mui/material'
20
20
  import Checkbox from '@mui/material/Checkbox'
21
21
  import FormControlLabel from '@mui/material/FormControlLabel'
@@ -23,12 +23,13 @@ import LinearProgress from '@mui/material/LinearProgress'
23
23
  import React, { useEffect, useState } from 'react'
24
24
 
25
25
  import {
26
- ApolloInternetAccount,
27
- CollaborationServerDriver,
26
+ type ApolloInternetAccount,
27
+ type CollaborationServerDriver,
28
28
  } from '../BackendDrivers'
29
- import { ChangeManager } from '../ChangeManager'
30
- import { ApolloSessionModel } from '../session'
29
+ import { type ChangeManager } from '../ChangeManager'
30
+ import { type ApolloSessionModel } from '../session'
31
31
  import { createFetchErrorMessage } from '../util'
32
+
32
33
  import { Dialog } from './Dialog'
33
34
 
34
35
  interface ImportFeaturesProps {
@@ -6,14 +6,15 @@ import {
6
6
  DialogContentText,
7
7
  MenuItem,
8
8
  Select,
9
- SelectChangeEvent,
9
+ type SelectChangeEvent,
10
10
  } from '@mui/material'
11
11
  import { getRoot } from 'mobx-state-tree'
12
12
  import React, { useState } from 'react'
13
13
 
14
- import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
15
- import { ApolloSessionModel } from '../session'
16
- import { ApolloRootModel } from '../types'
14
+ import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
15
+ import { type ApolloSessionModel } from '../session'
16
+ import { type ApolloRootModel } from '../types'
17
+
17
18
  import { Dialog } from './Dialog'
18
19
 
19
20
  interface DeleteAssemblyProps {
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable @typescript-eslint/use-unknown-in-catch-callback-variable */
2
2
  /* eslint-disable @typescript-eslint/unbound-method */
3
3
  /* eslint-disable @typescript-eslint/no-misused-promises */
4
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
5
- import { AbstractSessionModel } from '@jbrowse/core/util'
4
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
5
+ import { type AbstractSessionModel } from '@jbrowse/core/util'
6
6
  import {
7
7
  Button,
8
8
  Checkbox,
@@ -12,7 +12,7 @@ import {
12
12
  MenuItem,
13
13
  Paper,
14
14
  Select,
15
- SelectChangeEvent,
15
+ type SelectChangeEvent,
16
16
  Table,
17
17
  TableBody,
18
18
  TableCell,
@@ -23,14 +23,15 @@ import {
23
23
  import { getRoot } from 'mobx-state-tree'
24
24
  import React, { useEffect, useState } from 'react'
25
25
 
26
- import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
26
+ import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
27
27
  import {
28
- ApolloInternetAccount,
29
- CollaborationServerDriver,
28
+ type ApolloInternetAccount,
29
+ type CollaborationServerDriver,
30
30
  } from '../BackendDrivers'
31
- import { ApolloSessionModel } from '../session'
32
- import { ApolloRootModel } from '../types'
31
+ import { type ApolloSessionModel } from '../session'
32
+ import { type ApolloRootModel } from '../types'
33
33
  import { createFetchErrorMessage } from '../util'
34
+
34
35
  import { Dialog } from './Dialog'
35
36
 
36
37
  interface ManageChecksProps {