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

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 (136) hide show
  1. package/dist/index.esm.js +6964 -4598
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/jbrowse-plugin-apollo.cjs.development.js +6610 -4261
  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 +11563 -7493
  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 +23 -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 +15 -11
  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 +215 -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 +15 -23
  43. package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +950 -196
  44. package/src/FeatureDetailsWidget/TranscriptWidgetSummary.tsx +8 -4
  45. package/src/FeatureDetailsWidget/model.ts +8 -3
  46. package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +7 -7
  47. package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +59 -72
  48. package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +253 -60
  49. package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +52 -6
  50. package/src/LinearApolloDisplay/glyphs/Glyph.ts +16 -8
  51. package/src/LinearApolloDisplay/stateModel/base.ts +81 -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 +63 -46
  55. package/src/LinearApolloDisplay/stateModel/rendering.ts +60 -31
  56. package/src/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.tsx +226 -0
  57. package/src/LinearApolloSixFrameDisplay/components/TrackLines.tsx +32 -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 +940 -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 +302 -0
  65. package/src/LinearApolloSixFrameDisplay/stateModel/index.ts +27 -0
  66. package/src/LinearApolloSixFrameDisplay/stateModel/layouts.ts +252 -0
  67. package/src/LinearApolloSixFrameDisplay/stateModel/mouseEvents.ts +368 -0
  68. package/src/LinearApolloSixFrameDisplay/stateModel/rendering.ts +201 -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 +12 -7
  77. package/src/OntologyManager/util.ts +3 -2
  78. package/src/TabularEditor/HybridGrid/ChangeHandling.ts +2 -2
  79. package/src/TabularEditor/HybridGrid/Feature.tsx +13 -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 +114 -22
  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/AddAssemblyAliases.tsx +114 -0
  89. package/src/components/AddChildFeature.tsx +8 -10
  90. package/src/components/AddFeature.tsx +216 -44
  91. package/src/components/AddRefSeqAliases.tsx +14 -12
  92. package/src/components/CopyFeature.tsx +10 -11
  93. package/src/components/CreateApolloAnnotation.tsx +342 -158
  94. package/src/components/DeleteAssembly.tsx +9 -8
  95. package/src/components/DeleteFeature.tsx +362 -14
  96. package/src/components/Dialog.tsx +1 -1
  97. package/src/components/DownloadGFF3.tsx +31 -11
  98. package/src/components/FilterFeatures.tsx +6 -4
  99. package/src/components/FilterTranscripts.tsx +86 -0
  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/MergeExons.tsx +193 -0
  105. package/src/components/MergeTranscripts.tsx +185 -0
  106. package/src/components/OntologyTermAutocomplete.tsx +5 -5
  107. package/src/components/OntologyTermMultiSelect.tsx +6 -6
  108. package/src/components/OpenLocalFile.tsx +4 -3
  109. package/src/components/SplitExon.tsx +134 -0
  110. package/src/components/ViewChangeLog.tsx +7 -6
  111. package/src/components/ViewCheckResults.tsx +8 -7
  112. package/src/components/index.ts +3 -0
  113. package/src/config.ts +5 -0
  114. package/src/extensions/annotationFromJBrowseFeature.test.ts +1 -0
  115. package/src/extensions/annotationFromJBrowseFeature.ts +13 -10
  116. package/src/extensions/annotationFromPileup.ts +104 -94
  117. package/src/index.ts +33 -50
  118. package/src/makeDisplayComponent.tsx +90 -37
  119. package/src/session/ClientDataStore.ts +21 -17
  120. package/src/session/session.ts +46 -39
  121. package/src/types.ts +4 -4
  122. package/src/util/annotationFeatureUtils.ts +66 -1
  123. package/src/util/copyToClipboard.ts +21 -0
  124. package/src/util/glyphUtils.ts +49 -0
  125. package/src/util/index.ts +5 -3
  126. package/src/util/loadAssemblyIntoClient.ts +10 -3
  127. package/src/util/mouseEventsUtils.ts +113 -0
  128. package/src/ApolloSixFrameRenderer/ApolloSixFrameRenderer.tsx +0 -13
  129. package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +0 -707
  130. package/src/ApolloSixFrameRenderer/configSchema.ts +0 -7
  131. package/src/ApolloSixFrameRenderer/index.ts +0 -3
  132. package/src/SixFrameFeatureDisplay/components/TrackLines.tsx +0 -19
  133. package/src/SixFrameFeatureDisplay/components/index.ts +0 -1
  134. package/src/SixFrameFeatureDisplay/configSchema.ts +0 -21
  135. package/src/SixFrameFeatureDisplay/index.ts +0 -2
  136. package/src/SixFrameFeatureDisplay/stateModel.ts +0 -443
@@ -1,26 +1,35 @@
1
1
  /* eslint-disable @typescript-eslint/unbound-method */
2
2
  /* eslint-disable @typescript-eslint/no-unnecessary-condition */
3
- /* eslint-disable @typescript-eslint/no-misused-promises */
3
+
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
+ import { type Region } from '@jbrowse/core/util/types'
7
+ import InfoIcon from '@mui/icons-material/Info'
6
8
  import {
9
+ Box,
7
10
  Button,
8
11
  DialogActions,
9
12
  DialogContent,
10
13
  DialogContentText,
11
14
  FormControl,
15
+ FormControlLabel,
16
+ IconButton,
12
17
  InputLabel,
13
18
  MenuItem,
19
+ Radio,
20
+ RadioGroup,
14
21
  Select,
15
- SelectChangeEvent,
22
+ type SelectChangeEvent,
16
23
  TextField,
24
+ Tooltip,
17
25
  } from '@mui/material'
18
26
  import ObjectID from 'bson-objectid'
19
27
  import React, { useState } from 'react'
20
28
 
21
- import { ChangeManager } from '../ChangeManager'
29
+ import { type ChangeManager } from '../ChangeManager'
22
30
  import { isOntologyClass } from '../OntologyManager'
23
- import { ApolloSessionModel } from '../session'
31
+ import { type ApolloSessionModel } from '../session'
32
+
24
33
  import { Dialog } from './Dialog'
25
34
  import { OntologyTermAutocomplete } from './OntologyTermAutocomplete'
26
35
 
@@ -31,20 +40,67 @@ interface AddFeatureProps {
31
40
  changeManager: ChangeManager
32
41
  }
33
42
 
43
+ enum NewFeature {
44
+ GENE_AND_SUBFEATURES = 'GENE_AND_SUBFEATURES',
45
+ TRANSCRIPT_AND_SUBFEATURES = 'TRANSCRIPT_AND_SUBFEATURES',
46
+ CUSTOM = 'CUSTOM',
47
+ }
48
+
49
+ function makeCodingMrna(
50
+ refSeqId: string,
51
+ strand: 1 | -1 | undefined,
52
+ min: number,
53
+ max: number,
54
+ ): AnnotationFeatureSnapshot {
55
+ const cds = {
56
+ _id: new ObjectID().toHexString(),
57
+ refSeq: refSeqId,
58
+ type: 'CDS',
59
+ min,
60
+ max,
61
+ strand,
62
+ } as AnnotationFeatureSnapshot
63
+
64
+ const exon = {
65
+ _id: new ObjectID().toHexString(),
66
+ refSeq: refSeqId,
67
+ type: 'exon',
68
+ min,
69
+ max,
70
+ strand,
71
+ } as AnnotationFeatureSnapshot
72
+
73
+ const children: Record<string, AnnotationFeatureSnapshot> = {}
74
+ children[cds._id] = cds
75
+ children[exon._id] = exon
76
+
77
+ const mRNA = {
78
+ _id: new ObjectID().toHexString(),
79
+ refSeq: refSeqId,
80
+ type: 'mRNA',
81
+ min,
82
+ max,
83
+ strand,
84
+ children,
85
+ } as AnnotationFeatureSnapshot
86
+
87
+ return mRNA
88
+ }
89
+
34
90
  export function AddFeature({
35
91
  changeManager,
36
92
  handleClose,
37
93
  region,
38
94
  session,
39
95
  }: AddFeatureProps) {
40
- const { notify } = session as unknown as AbstractSessionModel
41
96
  const [end, setEnd] = useState(String(region.end))
42
97
  const [start, setStart] = useState(String(region.start + 1))
43
- const [type, setType] = useState('')
98
+ const [type, setType] = useState<NewFeature>(NewFeature.GENE_AND_SUBFEATURES)
99
+ const [customType, setCustomType] = useState<string>()
44
100
  const [strand, setStrand] = useState<1 | -1 | undefined>()
45
101
  const [errorMessage, setErrorMessage] = useState('')
46
102
 
47
- async function onSubmit(event: React.FormEvent<HTMLFormElement>) {
103
+ function onSubmit(event: React.FormEvent<HTMLFormElement>) {
48
104
  event.preventDefault()
49
105
  setErrorMessage('')
50
106
 
@@ -60,10 +116,63 @@ export function AddFeature({
60
116
  }
61
117
 
62
118
  if (!refSeqId) {
63
- setErrorMessage('Invalid refseq id')
119
+ setErrorMessage(
120
+ 'Invalid refseq id. Make sure you have the Apollo annotation track open',
121
+ )
122
+ return
123
+ }
124
+
125
+ if (type === NewFeature.GENE_AND_SUBFEATURES) {
126
+ const mRNA = makeCodingMrna(
127
+ refSeqId,
128
+ strand,
129
+ Number(start) - 1,
130
+ Number(end),
131
+ )
132
+ const children: Record<string, AnnotationFeatureSnapshot> = {}
133
+ children[mRNA._id] = mRNA
134
+
135
+ const id = new ObjectID().toHexString()
136
+ const change = new AddFeatureChange({
137
+ changedIds: [id],
138
+ typeName: 'AddFeatureChange',
139
+ assembly: region.assemblyName,
140
+ addedFeature: {
141
+ _id: id,
142
+ refSeq: refSeqId,
143
+ min: Number(start) - 1,
144
+ max: Number(end),
145
+ type: 'gene',
146
+ strand,
147
+ children,
148
+ },
149
+ })
150
+ void changeManager.submit(change)
151
+ handleClose()
152
+ return
153
+ }
154
+ if (type === NewFeature.TRANSCRIPT_AND_SUBFEATURES) {
155
+ const mRNA = makeCodingMrna(
156
+ refSeqId,
157
+ strand,
158
+ Number(start) - 1,
159
+ Number(end),
160
+ )
161
+ const change = new AddFeatureChange({
162
+ changedIds: [mRNA._id],
163
+ typeName: 'AddFeatureChange',
164
+ assembly: region.assemblyName,
165
+ addedFeature: mRNA,
166
+ })
167
+ void changeManager.submit(change)
168
+ handleClose()
64
169
  return
65
170
  }
66
171
 
172
+ if (!customType) {
173
+ setErrorMessage('No type selected')
174
+ return
175
+ }
67
176
  const id = new ObjectID().toHexString()
68
177
  const change = new AddFeatureChange({
69
178
  changedIds: [id],
@@ -74,19 +183,13 @@ export function AddFeature({
74
183
  refSeq: refSeqId,
75
184
  min: Number(start) - 1,
76
185
  max: Number(end),
77
- type,
186
+ type: customType,
78
187
  strand,
79
188
  },
80
189
  })
81
- await changeManager.submit(change)
82
- notify('Feature added successfully', 'success')
190
+ void changeManager.submit(change)
83
191
  handleClose()
84
- event.preventDefault()
85
- }
86
-
87
- function handleChangeType(newType: string) {
88
- setErrorMessage('')
89
- setType(newType)
192
+ return
90
193
  }
91
194
 
92
195
  function handleChangeStrand(e: SelectChangeEvent) {
@@ -109,6 +212,28 @@ export function AddFeature({
109
212
 
110
213
  const error = Number(end) <= Number(start)
111
214
 
215
+ function handleChangeOntologyType(newType: string) {
216
+ setErrorMessage('')
217
+ setCustomType(newType)
218
+ }
219
+
220
+ const handleTypeChange = (e: SelectChangeEvent) => {
221
+ setErrorMessage('')
222
+ const { value } = e.target
223
+ if (Object.keys(NewFeature).includes(value)) {
224
+ setType(NewFeature[value as NewFeature])
225
+ }
226
+ }
227
+
228
+ let submitDisabled: boolean = Boolean(error) || !(start && end && type)
229
+ if (
230
+ (type === NewFeature.CUSTOM && !customType) ||
231
+ (!strand && type === NewFeature.GENE_AND_SUBFEATURES) ||
232
+ (!strand && type === NewFeature.TRANSCRIPT_AND_SUBFEATURES)
233
+ ) {
234
+ submitDisabled = true
235
+ }
236
+
112
237
  return (
113
238
  <Dialog
114
239
  open
@@ -117,7 +242,7 @@ export function AddFeature({
117
242
  maxWidth={false}
118
243
  data-testid="add-feature-dialog"
119
244
  >
120
- <form onSubmit={onSubmit}>
245
+ <form onSubmit={onSubmit} data-testid="submit-form">
121
246
  <DialogContent style={{ display: 'flex', flexDirection: 'column' }}>
122
247
  <TextField
123
248
  margin="dense"
@@ -145,26 +270,6 @@ export function AddFeature({
145
270
  error={error}
146
271
  helperText={error ? '"End" must be greater than "Start"' : null}
147
272
  />
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
273
  <FormControl>
169
274
  <InputLabel id="demo-simple-select-label">Strand</InputLabel>
170
275
  <Select
@@ -179,13 +284,80 @@ export function AddFeature({
179
284
  <MenuItem value={-1}>-</MenuItem>
180
285
  </Select>
181
286
  </FormControl>
287
+
288
+ <FormControl style={{ marginTop: 20 }}>
289
+ <RadioGroup
290
+ aria-labelledby="demo-radio-buttons-group-label"
291
+ defaultValue={NewFeature.GENE_AND_SUBFEATURES}
292
+ name="radio-buttons-group"
293
+ value={type}
294
+ onChange={handleTypeChange}
295
+ >
296
+ <FormControlLabel
297
+ value={NewFeature.GENE_AND_SUBFEATURES}
298
+ control={<Radio />}
299
+ label={
300
+ <Box display="flex" alignItems="center">
301
+ Add gene and sub-features
302
+ <Tooltip title="This is a shortcut to create a gene with a single mRNA, exon, and CDS">
303
+ <IconButton size="small">
304
+ <InfoIcon sx={{ fontSize: 18 }} />
305
+ </IconButton>
306
+ </Tooltip>
307
+ </Box>
308
+ }
309
+ />
310
+
311
+ <FormControlLabel
312
+ value={NewFeature.TRANSCRIPT_AND_SUBFEATURES}
313
+ control={<Radio />}
314
+ label={
315
+ <Box display="flex" alignItems="center">
316
+ Add transcript and sub-features
317
+ <Tooltip title="This is a shortcut to create a single mRNA with exon and CDS, but without a parent gene">
318
+ <IconButton size="small">
319
+ <InfoIcon sx={{ fontSize: 18 }} />
320
+ </IconButton>
321
+ </Tooltip>
322
+ </Box>
323
+ }
324
+ />
325
+ <FormControlLabel
326
+ value={NewFeature.CUSTOM}
327
+ checked={
328
+ type !== NewFeature.GENE_AND_SUBFEATURES &&
329
+ type !== NewFeature.TRANSCRIPT_AND_SUBFEATURES
330
+ }
331
+ control={<Radio />}
332
+ label="Add feature with a sequence ontology type"
333
+ />
334
+ </RadioGroup>
335
+ </FormControl>
336
+ {type === NewFeature.CUSTOM ? (
337
+ <OntologyTermAutocomplete
338
+ session={session}
339
+ ontologyName="Sequence Ontology"
340
+ style={{ width: 170 }}
341
+ value=""
342
+ filterTerms={isOntologyClass}
343
+ renderInput={(params) => (
344
+ <TextField
345
+ {...params}
346
+ label="Type"
347
+ variant="outlined"
348
+ fullWidth
349
+ />
350
+ )}
351
+ onChange={(_oldValue, newValue) => {
352
+ if (newValue) {
353
+ handleChangeOntologyType(newValue)
354
+ }
355
+ }}
356
+ />
357
+ ) : null}
182
358
  </DialogContent>
183
359
  <DialogActions>
184
- <Button
185
- variant="contained"
186
- type="submit"
187
- disabled={error || !(start && end && type)}
188
- >
360
+ <Button variant="contained" type="submit" disabled={submitDisabled}>
189
361
  Submit
190
362
  </Button>
191
363
  <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 {
@@ -82,7 +83,7 @@ export function CopyFeature({
82
83
  sourceAssemblyId,
83
84
  sourceFeature,
84
85
  }: CopyFeatureProps) {
85
- const { assemblyManager, notify } = session as unknown as AbstractSessionModel
86
+ const { assemblyManager } = session as unknown as AbstractSessionModel
86
87
  const assemblies = assemblyManager.assemblyList
87
88
 
88
89
  const [selectedAssemblyId, setSelectedAssemblyId] = useState<
@@ -202,9 +203,7 @@ export function CopyFeature({
202
203
  copyFeature: true,
203
204
  allIds: featureIds,
204
205
  })
205
- await changeManager.submit(change)
206
-
207
- notify('Feature copied successfully', 'success')
206
+ void changeManager.submit(change)
208
207
  handleClose()
209
208
  event.preventDefault()
210
209
  }