@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
@@ -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
@@ -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 {
@@ -13,22 +13,23 @@ import {
13
13
  DialogContentText,
14
14
  MenuItem,
15
15
  Select,
16
- SelectChangeEvent,
16
+ type SelectChangeEvent,
17
17
  } from '@mui/material'
18
18
  import {
19
19
  DataGrid,
20
- GridColDef,
21
- GridRowsProp,
20
+ type GridColDef,
21
+ type GridRowsProp,
22
22
  GridToolbar,
23
23
  } from '@mui/x-data-grid'
24
24
  import { getRoot } from 'mobx-state-tree'
25
25
  import React, { useEffect, useState } from 'react'
26
26
  import { makeStyles } from 'tss-react/mui'
27
27
 
28
- import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
29
- import { ApolloSessionModel } from '../session'
30
- import { ApolloRootModel } from '../types'
28
+ import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
29
+ import { type ApolloSessionModel } from '../session'
30
+ import { type ApolloRootModel } from '../types'
31
31
  import { createFetchErrorMessage } from '../util'
32
+
32
33
  import { Dialog } from './Dialog'
33
34
 
34
35
  interface ViewChangeLogProps {
@@ -4,7 +4,7 @@
4
4
  /* eslint-disable @typescript-eslint/no-unsafe-argument */
5
5
  /* eslint-disable @typescript-eslint/no-unsafe-member-access */
6
6
  /* eslint-disable @typescript-eslint/no-unsafe-return */
7
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
7
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
8
8
  import {
9
9
  Button,
10
10
  DialogActions,
@@ -12,21 +12,22 @@ import {
12
12
  DialogContentText,
13
13
  MenuItem,
14
14
  Select,
15
- SelectChangeEvent,
15
+ type SelectChangeEvent,
16
16
  } from '@mui/material'
17
17
  import {
18
18
  DataGrid,
19
- GridColDef,
20
- GridRowsProp,
19
+ type GridColDef,
20
+ type GridRowsProp,
21
21
  GridToolbar,
22
22
  } from '@mui/x-data-grid'
23
23
  import { getRoot } from 'mobx-state-tree'
24
24
  import React, { useEffect, useState } from 'react'
25
25
 
26
- import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
27
- import { ApolloSessionModel } from '../session'
28
- import { ApolloRootModel } from '../types'
26
+ import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
27
+ import { type ApolloSessionModel } from '../session'
28
+ import { type ApolloRootModel } from '../types'
29
29
  import { createFetchErrorMessage } from '../util'
30
+
30
31
  import { Dialog } from './Dialog'
31
32
 
32
33
  interface ViewCheckResultsProps {
@@ -1,5 +1,6 @@
1
1
  import SimpleFeature from '@jbrowse/core/util/simpleFeature'
2
2
  import { describe, expect, it } from '@jest/globals'
3
+
3
4
  import { jbrowseFeatureToAnnotationFeature } from './annotationFromJBrowseFeature'
4
5
 
5
6
  describe('Convert JBrowse feature to annotation feature', () => {
@@ -3,21 +3,22 @@
3
3
  /* eslint-disable @typescript-eslint/no-unsafe-member-access */
4
4
  /* eslint-disable @typescript-eslint/no-unsafe-call */
5
5
  /* eslint-disable @typescript-eslint/no-unsafe-return */
6
- import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType'
7
- import PluggableElementBase from '@jbrowse/core/pluggableElementTypes/PluggableElementBase'
8
- import AddIcon from '@mui/icons-material/Add'
6
+ import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
7
+ import { gff3ToAnnotationFeature } from '@apollo-annotation/shared'
8
+ import { type GFF3Feature } from '@gmod/gff'
9
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
10
+ import type DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType'
11
+ import type PluggableElementBase from '@jbrowse/core/pluggableElementTypes/PluggableElementBase'
9
12
  import {
10
- AbstractSessionModel,
13
+ type AbstractSessionModel,
11
14
  getContainingView,
12
15
  getSession,
13
16
  } from '@jbrowse/core/util'
14
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
15
- import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
16
- import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
17
- import { Feature } from '@jbrowse/core/util/simpleFeature'
17
+ import { type Feature } from '@jbrowse/core/util/simpleFeature'
18
+ import { type LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
19
+ import AddIcon from '@mui/icons-material/Add'
20
+
18
21
  import { CreateApolloAnnotation } from '../components/CreateApolloAnnotation'
19
- import { GFF3Feature } from '@gmod/gff'
20
- import { gff3ToAnnotationFeature } from '@apollo-annotation/shared'
21
22
 
22
23
  function simpleFeatureToGFF3Feature(
23
24
  feature: Feature,
@@ -3,17 +3,17 @@
3
3
  /* eslint-disable @typescript-eslint/no-unsafe-member-access */
4
4
  /* eslint-disable @typescript-eslint/no-unsafe-call */
5
5
  /* eslint-disable @typescript-eslint/no-unsafe-return */
6
- import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
6
+ import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
7
7
  import { AddFeatureChange } from '@apollo-annotation/shared'
8
- import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
9
- import { DisplayType } from '@jbrowse/core/pluggableElementTypes'
10
- import PluggableElementBase from '@jbrowse/core/pluggableElementTypes/PluggableElementBase'
8
+ import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
9
+ import { type DisplayType } from '@jbrowse/core/pluggableElementTypes'
10
+ import type PluggableElementBase from '@jbrowse/core/pluggableElementTypes/PluggableElementBase'
11
11
  import { getContainingView, getSession } from '@jbrowse/core/util'
12
- import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
12
+ import { type LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
13
13
  import AddIcon from '@mui/icons-material/Add'
14
14
  import ObjectID from 'bson-objectid'
15
15
 
16
- import { ApolloSessionModel } from '../session'
16
+ import { type ApolloSessionModel } from '../session'
17
17
 
18
18
  function parseCigar(cigar: string): [string | undefined, number][] {
19
19
  return (cigar.toUpperCase().match(/\d+\D/g) ?? []).map((op) => {
package/src/index.ts CHANGED
@@ -9,41 +9,52 @@ import {
9
9
  changes,
10
10
  validationRegistry,
11
11
  } from '@apollo-annotation/shared'
12
+ import Plugin from '@jbrowse/core/Plugin'
13
+ import type PluginManager from '@jbrowse/core/PluginManager'
12
14
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
13
15
  import {
14
16
  DisplayType,
15
17
  InternetAccountType,
16
- PluggableElementType,
18
+ type PluggableElementType,
17
19
  TrackType,
18
- ViewType,
20
+ type ViewType,
19
21
  WidgetType,
20
22
  createBaseTrackConfig,
21
23
  createBaseTrackModel,
22
24
  } from '@jbrowse/core/pluggableElementTypes'
23
- import Plugin from '@jbrowse/core/Plugin'
24
- import PluginManager from '@jbrowse/core/PluginManager'
25
25
  import {
26
- AbstractSessionModel,
27
- Region,
26
+ type AbstractSessionModel,
27
+ type Region,
28
28
  getSession,
29
29
  isAbstractMenuManager,
30
30
  } from '@jbrowse/core/util'
31
- import { LinearGenomeViewStateModel } from '@jbrowse/plugin-linear-genome-view'
31
+ import { type LinearGenomeViewStateModel } from '@jbrowse/plugin-linear-genome-view'
32
32
  import AddIcon from '@mui/icons-material/Add'
33
33
 
34
34
  import { version } from '../package.json'
35
+
35
36
  import {
36
37
  configSchema as apolloInternetAccountConfigSchema,
37
38
  modelFactory as apolloInternetAccountModelFactory,
38
39
  } from './ApolloInternetAccount'
40
+ import { installApolloRefNameAliasAdapter } from './ApolloRefNameAliasAdapter'
39
41
  import { installApolloSequenceAdapter } from './ApolloSequenceAdapter'
40
- import {
41
- ApolloSixFrameRenderer,
42
- ReactComponent as ApolloSixFrameRendererReactComponent,
43
- configSchema as apolloSixFrameRendererConfigSchema,
44
- } from './ApolloSixFrameRenderer'
45
42
  import { installApolloTextSearchAdapter } from './ApolloTextSearchAdapter'
46
- import { BackendDriver } from './BackendDrivers'
43
+ import { type BackendDriver } from './BackendDrivers'
44
+ import {
45
+ ApolloFeatureDetailsWidget,
46
+ ApolloFeatureDetailsWidgetModel,
47
+ ApolloTranscriptDetailsModel,
48
+ ApolloTranscriptDetailsWidget,
49
+ } from './FeatureDetailsWidget'
50
+ import {
51
+ configSchema as linearApolloDisplayConfigSchema,
52
+ stateModelFactory as LinearApolloDisplayStateModelFactory,
53
+ } from './LinearApolloDisplay'
54
+ import {
55
+ configSchema as linearApolloSixFrameDisplayConfigSchema,
56
+ stateModelFactory as LinearApolloSixFrameDisplayStateModelFactory,
57
+ } from './LinearApolloSixFrameDisplay'
47
58
  import {
48
59
  AddFeature,
49
60
  DownloadGFF3,
@@ -55,29 +66,14 @@ import {
55
66
  } from './components'
56
67
  import ApolloPluginConfigurationSchema from './config'
57
68
  import {
58
- annotationFromPileup,
59
69
  annotationFromJBrowseFeature,
70
+ annotationFromPileup,
60
71
  } from './extensions'
61
72
  import {
62
- ApolloFeatureDetailsWidget,
63
- ApolloFeatureDetailsWidgetModel,
64
- ApolloTranscriptDetailsModel,
65
- ApolloTranscriptDetailsWidget,
66
- } from './FeatureDetailsWidget'
67
- import {
68
- stateModelFactory as LinearApolloDisplayStateModelFactory,
69
- configSchema as linearApolloDisplayConfigSchema,
70
- } from './LinearApolloDisplay'
71
- import {
72
- DisplayComponent,
73
- makeSixFrameDisplayComponent,
73
+ LinearApolloDisplayComponent,
74
+ LinearApolloSixFrameDisplayComponent,
74
75
  } from './makeDisplayComponent'
75
- import { ApolloSessionModel, extendSession } from './session'
76
- import {
77
- stateModelFactory as SixFrameFeatureDisplayStateModelFactory,
78
- configSchemaFactory as sixFrameFeatureDisplayConfigSchemaFactory,
79
- } from './SixFrameFeatureDisplay'
80
- import { installApolloRefNameAliasAdapter } from './ApolloRefNameAliasAdapter'
76
+ import { type ApolloSessionModel, extendSession } from './session'
81
77
 
82
78
  interface RpcHandle {
83
79
  on(event: string, listener: (event: MessageEvent) => void): this
@@ -186,38 +182,25 @@ export default class ApolloPlugin extends Plugin {
186
182
  ),
187
183
  trackType: 'ApolloTrack',
188
184
  viewType: 'LinearGenomeView',
189
- ReactComponent: DisplayComponent,
185
+ ReactComponent: LinearApolloDisplayComponent,
190
186
  })
191
187
  })
192
188
 
193
189
  pluginManager.addDisplayType(() => {
194
- const configSchema =
195
- sixFrameFeatureDisplayConfigSchemaFactory(pluginManager)
196
- const SixFrameDisplayComponent =
197
- makeSixFrameDisplayComponent(pluginManager)
190
+ const configSchema = linearApolloSixFrameDisplayConfigSchema
198
191
  return new DisplayType({
199
- name: 'SixFrameFeatureDisplay',
192
+ name: 'LinearApolloSixFrameDisplay',
200
193
  configSchema,
201
- stateModel: SixFrameFeatureDisplayStateModelFactory(
194
+ stateModel: LinearApolloSixFrameDisplayStateModelFactory(
202
195
  pluginManager,
203
196
  configSchema,
204
197
  ),
205
198
  trackType: 'ApolloTrack',
206
199
  viewType: 'LinearGenomeView',
207
- ReactComponent: SixFrameDisplayComponent,
200
+ ReactComponent: LinearApolloSixFrameDisplayComponent,
208
201
  })
209
202
  })
210
203
 
211
- pluginManager.addRendererType(
212
- () =>
213
- new ApolloSixFrameRenderer({
214
- name: 'ApolloSixFrameRenderer',
215
- ReactComponent: ApolloSixFrameRendererReactComponent,
216
- configSchema: apolloSixFrameRendererConfigSchema,
217
- pluginManager,
218
- }),
219
- )
220
-
221
204
  pluginManager.addToExtensionPoint(
222
205
  'Core-extendSession',
223
206
  // @ts-expect-error not sure how to deal with snapshot model types
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/unbound-method */
2
- import PluginManager from '@jbrowse/core/PluginManager'
3
- import type LinearGenomeViewPlugin from '@jbrowse/plugin-linear-genome-view'
2
+ import { getSession } from '@jbrowse/core/util'
4
3
  import ExpandLessIcon from '@mui/icons-material/ExpandLess'
5
4
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
6
5
  import { Alert, Typography, alpha } from '@mui/material'
@@ -9,13 +8,11 @@ import React, { useCallback, useEffect, useRef } from 'react'
9
8
  import { makeStyles } from 'tss-react/mui'
10
9
 
11
10
  import { LinearApolloDisplay } from './LinearApolloDisplay/components'
12
- import { LinearApolloDisplay as LinearApolloDisplayI } from './LinearApolloDisplay/stateModel'
13
- import { TrackLines } from './SixFrameFeatureDisplay/components'
14
- import { SixFrameFeatureDisplay } from './SixFrameFeatureDisplay/stateModel'
11
+ import { type LinearApolloDisplay as LinearApolloDisplayI } from './LinearApolloDisplay/stateModel'
12
+ import { LinearApolloSixFrameDisplay } from './LinearApolloSixFrameDisplay/components'
13
+ import { type LinearApolloSixFrameDisplay as LinearApolloSixFrameDisplayI } from './LinearApolloSixFrameDisplay/stateModel'
15
14
  import { TabularEditorPane } from './TabularEditor'
16
-
17
- import { getSession } from '@jbrowse/core/util'
18
- import { ApolloSessionModel } from './session'
15
+ import { type ApolloSessionModel } from './session'
19
16
 
20
17
  const accordionControlHeight = 12
21
18
 
@@ -63,7 +60,7 @@ const useStyles = makeStyles()((theme) => ({
63
60
  }))
64
61
 
65
62
  function scrollSelectedFeatureIntoView(
66
- model: LinearApolloDisplayI,
63
+ model: LinearApolloDisplayI | LinearApolloSixFrameDisplayI,
67
64
  scrollContainerRef: React.RefObject<HTMLDivElement>,
68
65
  ) {
69
66
  const { apolloRowHeight, selectedFeature } = model
@@ -157,7 +154,7 @@ const AccordionControl = observer(function AccordionControl({
157
154
  )
158
155
  })
159
156
 
160
- export const DisplayComponent = observer(function DisplayComponent({
157
+ export const LinearApolloDisplayComponent = observer(function DisplayComponent({
161
158
  model,
162
159
  ...other
163
160
  }: {
@@ -248,40 +245,96 @@ export const DisplayComponent = observer(function DisplayComponent({
248
245
  )
249
246
  })
250
247
 
251
- export function makeSixFrameDisplayComponent(pluginManager: PluginManager) {
252
- const LGVPlugin = pluginManager.getPlugin('LinearGenomeViewPlugin') as
253
- | LinearGenomeViewPlugin
254
- | undefined
255
- if (!LGVPlugin) {
256
- throw new Error('LinearGenomeView plugin not found')
257
- }
258
- const { BaseLinearDisplayComponent } = LGVPlugin.exports
259
- function ApolloDisplayComponent({
248
+ export const LinearApolloSixFrameDisplayComponent = observer(
249
+ function DisplayComponent({
260
250
  model,
261
251
  ...other
262
252
  }: {
263
- model: SixFrameFeatureDisplay
253
+ model: LinearApolloSixFrameDisplayI
264
254
  }) {
255
+ const session = getSession(model) as unknown as ApolloSessionModel
256
+ const { ontologyManager } = session.apolloDataStore
257
+ const { featureTypeOntology } = ontologyManager
258
+ const ontologyStore = featureTypeOntology?.dataStore
259
+
265
260
  const { classes } = useStyles()
266
- const { height, selectedFeature } = model
267
- let { detailsHeight } = model
268
- if (!selectedFeature) {
269
- detailsHeight = 0
261
+
262
+ const {
263
+ detailsHeight,
264
+ graphical,
265
+ height: overallHeight,
266
+ isShown,
267
+ selectedFeature,
268
+ table,
269
+ tabularEditor,
270
+ toggleShown,
271
+ } = model
272
+
273
+ const canvasScrollContainerRef = useRef<HTMLDivElement>(null)
274
+ useEffect(() => {
275
+ scrollSelectedFeatureIntoView(model, canvasScrollContainerRef)
276
+ }, [model, selectedFeature])
277
+
278
+ const onDetailsResize = (delta: number) => {
279
+ model.setDetailsHeight(detailsHeight - delta)
270
280
  }
271
- const featureAreaHeight = height - detailsHeight
272
- return (
273
- <div style={{ height: model.height }}>
274
- <div className={classes.shading} style={{ height: featureAreaHeight }}>
275
- <BaseLinearDisplayComponent model={model} {...other} />
281
+
282
+ if (!ontologyStore) {
283
+ return (
284
+ <div className={classes.alertContainer}>
285
+ <Alert severity="error">Could not load feature type ontology.</Alert>
286
+ </div>
287
+ )
288
+ }
289
+
290
+ if (graphical && table) {
291
+ const tabularHeight = tabularEditor.isShown ? detailsHeight : 0
292
+ const featureAreaHeight = isShown
293
+ ? overallHeight - detailsHeight - accordionControlHeight * 2
294
+ : 0
295
+ return (
296
+ <div style={{ height: overallHeight }}>
297
+ <AccordionControl
298
+ open={isShown}
299
+ title="Graphical"
300
+ onClick={toggleShown}
301
+ />
302
+ <div
303
+ className={classes.shading}
304
+ ref={canvasScrollContainerRef}
305
+ style={{ height: featureAreaHeight }}
306
+ >
307
+ <LinearApolloSixFrameDisplay model={model} {...other} />
308
+ </div>
309
+ <AccordionControl
310
+ title="Table"
311
+ open={tabularEditor.isShown}
312
+ onClick={tabularEditor.togglePane}
313
+ onResize={onDetailsResize}
314
+ />
315
+ <div className={classes.details} style={{ height: tabularHeight }}>
316
+ <TabularEditorPane model={model} />
317
+ </div>
276
318
  </div>
277
- {/* <div className={classes.details} style={{ height: detailsHeight }}>
278
- <ApolloDetails model={model} />
279
- </div> */}
280
- <div className="testTrackLines">
281
- <TrackLines model={model} />
319
+ )
320
+ }
321
+
322
+ if (graphical) {
323
+ return (
324
+ <div
325
+ className={classes.shading}
326
+ ref={canvasScrollContainerRef}
327
+ style={{ height: overallHeight }}
328
+ >
329
+ <LinearApolloSixFrameDisplay model={model} {...other} />
282
330
  </div>
331
+ )
332
+ }
333
+
334
+ return (
335
+ <div className={classes.details} style={{ height: overallHeight }}>
336
+ <TabularEditorPane model={model} />
283
337
  </div>
284
338
  )
285
- }
286
- return observer(ApolloDisplayComponent)
287
- }
339
+ },
340
+ )
@@ -2,23 +2,27 @@
2
2
  /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3
3
  /* eslint-disable @typescript-eslint/no-unnecessary-condition */
4
4
  /* eslint-disable @typescript-eslint/no-unsafe-argument */
5
- import { ClientDataStore as ClientDataStoreType } from '@apollo-annotation/common'
5
+ import { type ClientDataStore as ClientDataStoreType } from '@apollo-annotation/common'
6
6
  import {
7
- AnnotationFeatureModel,
8
- AnnotationFeatureSnapshot,
7
+ type AnnotationFeatureModel,
8
+ type AnnotationFeatureSnapshot,
9
9
  ApolloAssembly,
10
- ApolloAssemblySnapshot,
10
+ type ApolloAssemblySnapshot,
11
11
  ApolloRefSeq,
12
- BackendDriverType,
12
+ type BackendDriverType,
13
13
  CheckResult,
14
- CheckResultSnapshot,
14
+ type CheckResultSnapshot,
15
15
  } from '@apollo-annotation/mst'
16
16
  import { getConf, readConfObject } from '@jbrowse/core/configuration'
17
- import { ConfigurationModel } from '@jbrowse/core/configuration/types'
18
- import { Region, getSession, isElectron } from '@jbrowse/core/util'
19
- import { LocalPathLocation, UriLocation } from '@jbrowse/core/util/types/mst'
17
+ import { type ConfigurationModel } from '@jbrowse/core/configuration/types'
18
+ import { type Region, getSession, isElectron } from '@jbrowse/core/util'
20
19
  import {
21
- Instance,
20
+ type LocalPathLocation,
21
+ type UriLocation,
22
+ } from '@jbrowse/core/util/types/mst'
23
+ import { autorun } from 'mobx'
24
+ import {
25
+ type Instance,
22
26
  addDisposer,
23
27
  flow,
24
28
  getParentOfType,
@@ -28,21 +32,21 @@ import {
28
32
  } from 'mobx-state-tree'
29
33
 
30
34
  import {
31
- ApolloInternetAccount,
35
+ type ApolloInternetAccount,
32
36
  CollaborationServerDriver,
33
37
  DesktopFileDriver,
34
38
  InMemoryFileDriver,
35
39
  } from '../BackendDrivers'
36
40
  import { ChangeManager } from '../ChangeManager'
37
- import ApolloPluginConfigurationSchema from '../config'
38
41
  import {
39
42
  OntologyManagerType,
40
- OntologyRecordConfiguration,
41
- TextIndexFieldDefinition,
43
+ type OntologyRecordConfiguration,
44
+ type TextIndexFieldDefinition,
42
45
  } from '../OntologyManager'
43
- import { ApolloRootModel } from '../types'
44
- import { autorun } from 'mobx'
45
- import { ApolloSessionModel } from './session'
46
+ import type ApolloPluginConfigurationSchema from '../config'
47
+ import { type ApolloRootModel } from '../types'
48
+
49
+ import { type ApolloSessionModel } from './session'
46
50
 
47
51
  export function clientDataStoreFactory(
48
52
  AnnotationFeatureExtended: typeof AnnotationFeatureModel,