@apollo-annotation/jbrowse-plugin-apollo 0.3.4 → 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 (131) hide show
  1. package/dist/index.esm.js +5466 -4490
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/jbrowse-plugin-apollo.cjs.development.js +5283 -4318
  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 +6806 -4088
  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 +17 -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 +92 -20
  31. package/src/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.tsx +170 -27
  32. package/src/FeatureDetailsWidget/AttributeKey.tsx +50 -0
  33. package/src/FeatureDetailsWidget/AttributeKeySelector.tsx +104 -0
  34. package/src/FeatureDetailsWidget/Attributes.tsx +213 -320
  35. package/src/FeatureDetailsWidget/BasicInformation.tsx +8 -9
  36. package/src/FeatureDetailsWidget/DefaultAttributeEditor.tsx +104 -0
  37. package/src/FeatureDetailsWidget/DefaultAttributeViewer.tsx +22 -0
  38. package/src/FeatureDetailsWidget/FeatureDetailsNavigation.tsx +10 -8
  39. package/src/FeatureDetailsWidget/NumberTextField.tsx +1 -1
  40. package/src/FeatureDetailsWidget/Sequence.tsx +18 -35
  41. package/src/FeatureDetailsWidget/StringTextField.tsx +1 -1
  42. package/src/FeatureDetailsWidget/TranscriptSequence.tsx +140 -95
  43. package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +600 -0
  44. package/src/FeatureDetailsWidget/TranscriptWidgetSummary.tsx +54 -0
  45. package/src/FeatureDetailsWidget/model.ts +8 -3
  46. package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +19 -12
  47. package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +19 -41
  48. package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +44 -22
  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 -34
  54. package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +13 -12
  55. package/src/LinearApolloDisplay/stateModel/rendering.ts +63 -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-stopwords.ts +10 -1
  71. package/src/OntologyManager/OntologyStore/fulltext.test.ts +1 -1
  72. package/src/OntologyManager/OntologyStore/fulltext.ts +8 -3
  73. package/src/OntologyManager/OntologyStore/index.test.ts +4 -1
  74. package/src/OntologyManager/OntologyStore/index.ts +19 -14
  75. package/src/OntologyManager/OntologyStore/indexeddb-schema.ts +6 -5
  76. package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +11 -5
  77. package/src/OntologyManager/index.ts +10 -6
  78. package/src/OntologyManager/util.ts +3 -2
  79. package/src/TabularEditor/HybridGrid/ChangeHandling.ts +2 -2
  80. package/src/TabularEditor/HybridGrid/Feature.tsx +9 -8
  81. package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +1 -1
  82. package/src/TabularEditor/HybridGrid/HybridGrid.tsx +3 -2
  83. package/src/TabularEditor/HybridGrid/NumberCell.tsx +8 -1
  84. package/src/TabularEditor/HybridGrid/ToolBar.tsx +15 -13
  85. package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +9 -33
  86. package/src/TabularEditor/TabularEditorPane.tsx +1 -1
  87. package/src/TabularEditor/model.ts +2 -2
  88. package/src/TabularEditor/types.ts +5 -2
  89. package/src/components/AddAssembly.tsx +611 -291
  90. package/src/components/AddChildFeature.tsx +6 -5
  91. package/src/components/AddFeature.tsx +211 -38
  92. package/src/components/AddRefSeqAliases.tsx +14 -12
  93. package/src/components/CopyFeature.tsx +8 -7
  94. package/src/components/CreateApolloAnnotation.tsx +154 -46
  95. package/src/components/DeleteAssembly.tsx +9 -8
  96. package/src/components/DeleteFeature.tsx +5 -4
  97. package/src/components/Dialog.tsx +1 -1
  98. package/src/components/DownloadGFF3.tsx +11 -10
  99. package/src/components/FilterFeatures.tsx +6 -4
  100. package/src/components/ImportFeatures.tsx +7 -6
  101. package/src/components/LogOut.tsx +5 -4
  102. package/src/components/ManageChecks.tsx +9 -8
  103. package/src/components/ManageUsers.tsx +11 -10
  104. package/src/components/OntologyTermAutocomplete.tsx +5 -5
  105. package/src/components/OntologyTermMultiSelect.tsx +9 -6
  106. package/src/components/OpenLocalFile.tsx +4 -3
  107. package/src/components/ViewChangeLog.tsx +7 -6
  108. package/src/components/ViewCheckResults.tsx +8 -7
  109. package/src/components/index.ts +0 -1
  110. package/src/extensions/annotationFromJBrowseFeature.test.ts +1 -0
  111. package/src/extensions/annotationFromJBrowseFeature.ts +14 -12
  112. package/src/extensions/annotationFromPileup.ts +6 -6
  113. package/src/index.ts +33 -50
  114. package/src/makeDisplayComponent.tsx +93 -41
  115. package/src/session/ClientDataStore.ts +21 -17
  116. package/src/session/session.ts +20 -26
  117. package/src/types.ts +4 -4
  118. package/src/util/annotationFeatureUtils.ts +53 -0
  119. package/src/util/index.ts +4 -3
  120. package/src/util/loadAssemblyIntoClient.ts +10 -3
  121. package/src/ApolloSixFrameRenderer/ApolloSixFrameRenderer.tsx +0 -13
  122. package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +0 -707
  123. package/src/ApolloSixFrameRenderer/configSchema.ts +0 -7
  124. package/src/ApolloSixFrameRenderer/index.ts +0 -3
  125. package/src/FeatureDetailsWidget/TranscriptBasic.tsx +0 -200
  126. package/src/SixFrameFeatureDisplay/components/TrackLines.tsx +0 -19
  127. package/src/SixFrameFeatureDisplay/components/index.ts +0 -1
  128. package/src/SixFrameFeatureDisplay/configSchema.ts +0 -21
  129. package/src/SixFrameFeatureDisplay/index.ts +0 -2
  130. package/src/SixFrameFeatureDisplay/stateModel.ts +0 -439
  131. package/src/components/ModifyFeatureAttribute.tsx +0 -460
@@ -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
@@ -45,8 +46,27 @@ const isGeneOrTranscript = (
45
46
  }
46
47
  return (
47
48
  featureTypeOntology.isTypeOf(annotationFeature.type, 'gene') ||
48
- featureTypeOntology.isTypeOf(annotationFeature.type, 'mRNA') ||
49
- featureTypeOntology.isTypeOf(annotationFeature.type, 'transcript')
49
+ featureTypeOntology.isTypeOf(annotationFeature.type, 'transcript') ||
50
+ featureTypeOntology.isTypeOf(annotationFeature.type, 'pseudogene') ||
51
+ featureTypeOntology.isTypeOf(
52
+ annotationFeature.type,
53
+ 'pseudogenic_transcript',
54
+ )
55
+ )
56
+ }
57
+
58
+ const isGene = (
59
+ annotationFeature: AnnotationFeatureSnapshot,
60
+ apolloSessionModel: ApolloSessionModel,
61
+ ) => {
62
+ const { featureTypeOntology } =
63
+ apolloSessionModel.apolloDataStore.ontologyManager
64
+ if (!featureTypeOntology) {
65
+ throw new Error('featureTypeOntology is undefined')
66
+ }
67
+ return (
68
+ featureTypeOntology.isTypeOf(annotationFeature.type, 'gene') ||
69
+ featureTypeOntology.isTypeOf(annotationFeature.type, 'pseudogene')
50
70
  )
51
71
  }
52
72
 
@@ -60,11 +80,51 @@ const isTranscript = (
60
80
  throw new Error('featureTypeOntology is undefined')
61
81
  }
62
82
  return (
63
- featureTypeOntology.isTypeOf(annotationFeature.type, 'mRNA') ||
64
- featureTypeOntology.isTypeOf(annotationFeature.type, 'transcript')
83
+ featureTypeOntology.isTypeOf(annotationFeature.type, 'transcript') ||
84
+ featureTypeOntology.isTypeOf(
85
+ annotationFeature.type,
86
+ 'pseudogenic_transcript',
87
+ )
65
88
  )
66
89
  }
67
90
 
91
+ const getFeatureId = (feature: AnnotationFeatureSnapshot) => {
92
+ const { attributes } = feature
93
+ const id = attributes?.id
94
+ if (id) {
95
+ return id[0]
96
+ }
97
+ return feature.type
98
+ }
99
+
100
+ const getFeatureNameOrId = (
101
+ feature: AnnotationFeatureSnapshot,
102
+ apolloSessionModel: ApolloSessionModel,
103
+ ) => {
104
+ const { featureTypeOntology } =
105
+ apolloSessionModel.apolloDataStore.ontologyManager
106
+ if (!featureTypeOntology) {
107
+ return getFeatureId(feature)
108
+ }
109
+
110
+ let attrName = ''
111
+
112
+ if (featureTypeOntology.isTypeOf(feature.type, 'gene')) {
113
+ attrName = 'gene_name'
114
+ }
115
+
116
+ if (featureTypeOntology.isTypeOf(feature.type, 'transcript')) {
117
+ attrName = 'transcript_name'
118
+ }
119
+
120
+ const { attributes } = feature
121
+ const name = attributes?.[attrName]
122
+ if (name) {
123
+ return name[0]
124
+ }
125
+ return getFeatureId(feature)
126
+ }
127
+
68
128
  export function CreateApolloAnnotation({
69
129
  annotationFeature,
70
130
  assembly,
@@ -104,6 +164,9 @@ export function CreateApolloAnnotation({
104
164
  const filteredFeatures: AnnotationFeatureSnapshot[] = []
105
165
 
106
166
  for (const [, f] of features) {
167
+ if (f.type === 'chromosome') {
168
+ continue
169
+ }
107
170
  const featureSnapshot = getSnapshot(f)
108
171
  if (min >= featureSnapshot.min && max <= featureSnapshot.max) {
109
172
  filteredFeatures.push(featureSnapshot)
@@ -115,33 +178,34 @@ export function CreateApolloAnnotation({
115
178
 
116
179
  useEffect(() => {
117
180
  setErrorMessage('')
118
- if (checkedChildrens.length === 0) {
119
- setParentFeatureChecked(false)
120
- return
121
- }
122
-
181
+ let mins: number[] = []
182
+ let maxes: number[] = []
123
183
  if (annotationFeature.children) {
124
184
  const checkedAnnotationFeatureChildren = Object.values(
125
185
  annotationFeature.children,
126
186
  )
127
187
  .filter((child) => isTranscript(child, apolloSessionModel))
128
188
  .filter((child) => checkedChildrens.includes(child._id))
129
- const mins = checkedAnnotationFeatureChildren.map((f) => f.min)
130
- const maxes = checkedAnnotationFeatureChildren.map((f) => f.max)
131
- const min = Math.min(...mins)
132
- const max = Math.max(...maxes)
133
- const filteredFeatures = getFeatures(min, max)
134
- setDestinationFeatures(filteredFeatures)
135
-
136
- if (
137
- filteredFeatures.length === 0 &&
138
- checkedChildrens.length > 0 &&
139
- !parentFeatureChecked
140
- ) {
141
- setErrorMessage('No destination features found')
142
- }
189
+ mins = checkedAnnotationFeatureChildren.map((f) => f.min)
190
+ maxes = checkedAnnotationFeatureChildren.map((f) => f.max)
143
191
  }
144
- }, [checkedChildrens])
192
+
193
+ const { featureTypeOntology } =
194
+ apolloSessionModel.apolloDataStore.ontologyManager
195
+ if (
196
+ featureTypeOntology &&
197
+ featureTypeOntology.isTypeOf(annotationFeature.type, 'transcript')
198
+ ) {
199
+ mins = [annotationFeature.min, ...mins]
200
+ maxes = [annotationFeature.max, ...maxes]
201
+ }
202
+
203
+ const min = Math.min(...mins)
204
+ const max = Math.max(...maxes)
205
+ const filteredFeatures = getFeatures(min, max)
206
+ setDestinationFeatures(filteredFeatures)
207
+ setSelectedDestinationFeature(filteredFeatures[0])
208
+ }, [checkedChildrens, parentFeatureChecked])
145
209
 
146
210
  const handleParentFeatureCheck = (
147
211
  event: React.ChangeEvent<HTMLInputElement>,
@@ -171,12 +235,55 @@ export function CreateApolloAnnotation({
171
235
 
172
236
  const handleCreateApolloAnnotation = async () => {
173
237
  if (parentFeatureChecked) {
174
- const change = new AddFeatureChange({
175
- changedIds: [annotationFeature._id],
176
- typeName: 'AddFeatureChange',
177
- assembly: assembly.name,
178
- addedFeature: annotationFeature,
179
- })
238
+ let change
239
+ if (isGene(annotationFeature, apolloSessionModel)) {
240
+ if (
241
+ annotationFeature.children &&
242
+ checkedChildrens.length !==
243
+ Object.values(annotationFeature.children).length
244
+ ) {
245
+ const childrens: Record<string, AnnotationFeatureSnapshot> = {}
246
+ for (const childId of checkedChildrens) {
247
+ childrens[childId] = annotationFeature.children[childId]
248
+ }
249
+ change = new AddFeatureChange({
250
+ changedIds: [annotationFeature._id],
251
+ typeName: 'AddFeatureChange',
252
+ assembly: assembly.name,
253
+ addedFeature: {
254
+ ...annotationFeature,
255
+ children: childrens,
256
+ },
257
+ })
258
+ } else {
259
+ change = new AddFeatureChange({
260
+ changedIds: [annotationFeature._id],
261
+ typeName: 'AddFeatureChange',
262
+ assembly: assembly.name,
263
+ addedFeature: annotationFeature,
264
+ })
265
+ }
266
+ }
267
+
268
+ if (isTranscript(annotationFeature, apolloSessionModel)) {
269
+ if (selectedDestinationFeature) {
270
+ change = new AddFeatureChange({
271
+ parentFeatureId: selectedDestinationFeature._id,
272
+ changedIds: [selectedDestinationFeature._id],
273
+ typeName: 'AddFeatureChange',
274
+ assembly: assembly.name,
275
+ addedFeature: annotationFeature,
276
+ })
277
+ } else {
278
+ setErrorMessage('There is no destination gene for this transcript')
279
+ return
280
+ }
281
+ }
282
+
283
+ if (!change) {
284
+ return
285
+ }
286
+
180
287
  await apolloSessionModel.apolloDataStore.changeManager.submit(change)
181
288
  session.notify('Annotation added successfully', 'success')
182
289
  handleClose()
@@ -198,9 +305,9 @@ export function CreateApolloAnnotation({
198
305
  addedFeature: child,
199
306
  })
200
307
  await apolloSessionModel.apolloDataStore.changeManager.submit(change)
201
- session.notify('Annotation added successfully', 'success')
202
- handleClose()
203
308
  }
309
+ session.notify('Annotation added successfully', 'success')
310
+ handleClose()
204
311
  }
205
312
  }
206
313
 
@@ -226,7 +333,7 @@ export function CreateApolloAnnotation({
226
333
  onChange={handleParentFeatureCheck}
227
334
  />
228
335
  }
229
- label={`${annotationFeature.type}:${annotationFeature.min}..${annotationFeature.max}`}
336
+ label={`${getFeatureNameOrId(annotationFeature, apolloSessionModel)} (${annotationFeature.min + 1}..${annotationFeature.max})`}
230
337
  />
231
338
  )}
232
339
  {annotationFeature.children && (
@@ -245,15 +352,16 @@ export function CreateApolloAnnotation({
245
352
  }}
246
353
  />
247
354
  }
248
- label={`${child.type}:${child.min}..${child.max}`}
355
+ label={`${getFeatureNameOrId(child, apolloSessionModel)} (${child.min + 1}..${child.max})`}
249
356
  />
250
357
  ))}
251
358
  </Box>
252
359
  )}
253
360
  </Box>
254
- {!parentFeatureChecked &&
255
- checkedChildrens.length > 0 &&
256
- destinationFeatures.length > 0 && (
361
+ {destinationFeatures.length > 0 &&
362
+ ((!parentFeatureChecked && checkedChildrens.length > 0) ||
363
+ (parentFeatureChecked &&
364
+ isTranscript(annotationFeature, apolloSessionModel))) && (
257
365
  <Box sx={{ ml: 3 }}>
258
366
  <Typography variant="caption" fontSize={12}>
259
367
  Select the destination feature to copy the selected features
@@ -268,7 +376,7 @@ export function CreateApolloAnnotation({
268
376
  >
269
377
  {destinationFeatures.map((f) => (
270
378
  <MenuItem key={f._id} value={f._id}>
271
- {`${f.type}:${f.min}..${f.max}`}
379
+ {`${getFeatureNameOrId(f, apolloSessionModel)} (${f.min}..${f.max})`}
272
380
  </MenuItem>
273
381
  ))}
274
382
  </Select>
@@ -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 {
@@ -6,7 +6,7 @@
6
6
  /* eslint-disable @typescript-eslint/no-unsafe-member-access */
7
7
  /* eslint-disable @typescript-eslint/no-unsafe-return */
8
8
  import { DeleteUserChange, UserChange } from '@apollo-annotation/shared'
9
- import { AbstractRootModel } from '@jbrowse/core/util'
9
+ import { type AbstractRootModel } from '@jbrowse/core/util'
10
10
  import DeleteIcon from '@mui/icons-material/Delete'
11
11
  import {
12
12
  Button,
@@ -15,25 +15,26 @@ import {
15
15
  DialogContentText,
16
16
  MenuItem,
17
17
  Select,
18
- SelectChangeEvent,
18
+ type SelectChangeEvent,
19
19
  } from '@mui/material'
20
20
  import {
21
21
  DataGrid,
22
22
  GridActionsCellItem,
23
- GridCellParams,
24
- GridColDef,
25
- GridRowId,
26
- GridRowModel,
27
- GridRowParams,
23
+ type GridCellParams,
24
+ type GridColDef,
25
+ type GridRowId,
26
+ type GridRowModel,
27
+ type GridRowParams,
28
28
  GridToolbar,
29
29
  } from '@mui/x-data-grid'
30
30
  import { getRoot } from 'mobx-state-tree'
31
31
  import React, { useCallback, useEffect, useState } from 'react'
32
32
 
33
- import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
34
- import { ChangeManager } from '../ChangeManager'
35
- import { ApolloSessionModel } from '../session'
33
+ import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
34
+ import { type ChangeManager } from '../ChangeManager'
35
+ import { type ApolloSessionModel } from '../session'
36
36
  import { createFetchErrorMessage } from '../util'
37
+
37
38
  import { Dialog } from './Dialog'
38
39
 
39
40
  interface UserResponse {
@@ -1,17 +1,17 @@
1
1
  /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2
2
 
3
- import { AbstractSessionModel } from '@jbrowse/core/util'
3
+ import { type AbstractSessionModel } from '@jbrowse/core/util'
4
4
  import { isAbortException } from '@jbrowse/core/util/aborting'
5
5
  import {
6
6
  Autocomplete,
7
- AutocompleteRenderInputParams,
7
+ type AutocompleteRenderInputParams,
8
8
  TextField,
9
9
  } from '@mui/material'
10
10
  import React, { useCallback, useEffect, useState } from 'react'
11
11
 
12
- import { OntologyTerm, isDeprecated } from '../OntologyManager'
13
- import OntologyStore from '../OntologyManager/OntologyStore'
14
- import { ApolloSessionModel } from '../session'
12
+ import { type OntologyTerm, isDeprecated } from '../OntologyManager'
13
+ import type OntologyStore from '../OntologyManager/OntologyStore'
14
+ import { type ApolloSessionModel } from '../session'
15
15
 
16
16
  interface OntologyTermAutocompleteProps {
17
17
  session: ApolloSessionModel
@@ -4,7 +4,7 @@
4
4
  import { isAbortException } from '@jbrowse/core/util/aborting'
5
5
  import {
6
6
  Autocomplete,
7
- AutocompleteRenderGetTagProps,
7
+ type AutocompleteRenderGetTagProps,
8
8
  Chip,
9
9
  Grid2,
10
10
  TextField,
@@ -18,14 +18,14 @@ import { getParent } from 'mobx-state-tree'
18
18
  import * as React from 'react'
19
19
 
20
20
  import {
21
- OntologyManager,
22
- OntologyRecord,
23
- OntologyTerm,
21
+ type OntologyManager,
22
+ type OntologyRecord,
23
+ type OntologyTerm,
24
24
  isOntologyClass,
25
25
  } from '../OntologyManager'
26
- import { Match } from '../OntologyManager/OntologyStore/fulltext'
26
+ import { type Match } from '../OntologyManager/OntologyStore/fulltext'
27
27
  import { isDeprecated } from '../OntologyManager/OntologyStore/indexeddb-schema'
28
- import { ApolloSessionModel } from '../session'
28
+ import { type ApolloSessionModel } from '../session'
29
29
 
30
30
  interface TermValue {
31
31
  term: OntologyTerm
@@ -114,6 +114,7 @@ export function OntologyTermMultiSelect({
114
114
  ontologyVersion,
115
115
  session,
116
116
  value: initialValue,
117
+ label,
117
118
  }: {
118
119
  session: ApolloSessionModel
119
120
  value: string[]
@@ -122,6 +123,7 @@ export function OntologyTermMultiSelect({
122
123
  /** if true, include deprecated/obsolete terms */
123
124
  includeDeprecated?: boolean
124
125
  onChange(newValue: string[]): void
126
+ label?: string
125
127
  }) {
126
128
  const { ontologyManager } = session.apolloDataStore
127
129
  const ontology = ontologyManager.findOntology(ontologyName, ontologyVersion)
@@ -256,6 +258,7 @@ export function OntologyTermMultiSelect({
256
258
  {...params}
257
259
  {...extraTextFieldParams}
258
260
  variant="outlined"
261
+ label={label}
259
262
  fullWidth
260
263
  />
261
264
  )}
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable @typescript-eslint/unbound-method */
3
3
  /* eslint-disable @typescript-eslint/no-unnecessary-condition */
4
4
  /* eslint-disable @typescript-eslint/no-misused-promises */
5
- import { AbstractSessionModel, isElectron } from '@jbrowse/core/util'
5
+ import { type AbstractSessionModel, isElectron } from '@jbrowse/core/util'
6
6
  import {
7
7
  Button,
8
8
  DialogActions,
@@ -16,9 +16,10 @@ import {
16
16
  import { nanoid } from 'nanoid'
17
17
  import React, { useState } from 'react'
18
18
 
19
- import { InMemoryFileDriver } from '../BackendDrivers'
20
- import { ApolloSessionModel } from '../session'
19
+ import { type InMemoryFileDriver } from '../BackendDrivers'
20
+ import { type ApolloSessionModel } from '../session'
21
21
  import { loadAssemblyIntoClient } from '../util'
22
+
22
23
  import { Dialog } from './Dialog'
23
24
 
24
25
  interface OpenLocalFileProps {