@apollo-annotation/jbrowse-plugin-apollo 0.1.21 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +431 -570
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +439 -578
- package/dist/jbrowse-plugin-apollo.cjs.development.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.production.min.js +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.production.min.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.umd.development.js +11064 -1091
- package/dist/jbrowse-plugin-apollo.umd.development.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.umd.production.min.js +1 -1
- package/dist/jbrowse-plugin-apollo.umd.production.min.js.map +1 -1
- package/package.json +4 -5
- package/src/ApolloInternetAccount/components/AuthTypeSelector.tsx +4 -2
- package/src/ApolloInternetAccount/configSchema.ts +1 -1
- package/src/ApolloInternetAccount/model.ts +5 -10
- package/src/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.ts +1 -1
- package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +4 -5
- package/src/BackendDrivers/DesktopFileDriver.ts +3 -2
- package/src/FeatureDetailsWidget/Attributes.tsx +1 -6
- package/src/FeatureDetailsWidget/NumberTextField.tsx +1 -0
- package/src/FeatureDetailsWidget/StringTextField.tsx +1 -0
- package/src/FeatureDetailsWidget/TranscriptBasic.tsx +131 -382
- package/src/FeatureDetailsWidget/TranscriptSequence.tsx +209 -284
- package/src/FeatureDetailsWidget/model.ts +4 -4
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +1 -0
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +25 -3
- package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +95 -32
- package/src/LinearApolloDisplay/stateModel/base.ts +5 -3
- package/src/LinearApolloDisplay/stateModel/index.ts +1 -1
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +1 -1
- package/src/LinearApolloDisplay/stateModel/rendering.ts +1 -1
- package/src/OntologyManager/OntologyStore/fulltext.ts +5 -2
- package/src/OntologyManager/OntologyStore/index.ts +25 -22
- package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +8 -3
- package/src/OntologyManager/index.ts +31 -8
- package/src/SixFrameFeatureDisplay/stateModel.ts +1 -1
- package/src/TabularEditor/HybridGrid/HybridGrid.tsx +1 -0
- package/src/TabularEditor/HybridGrid/NumberCell.tsx +1 -0
- package/src/TabularEditor/model.ts +1 -1
- package/src/components/AddChildFeature.tsx +1 -0
- package/src/components/AddFeature.tsx +1 -1
- package/src/components/AddRefSeqAliases.tsx +1 -0
- package/src/components/CopyFeature.tsx +1 -0
- package/src/components/DeleteAssembly.tsx +1 -0
- package/src/components/DeleteFeature.tsx +1 -0
- package/src/components/LogOut.tsx +2 -1
- package/src/components/ManageChecks.tsx +1 -1
- package/src/components/ManageUsers.tsx +2 -1
- package/src/components/OntologyTermAutocomplete.tsx +7 -9
- package/src/components/OntologyTermMultiSelect.tsx +2 -1
- package/src/components/OpenLocalFile.tsx +3 -1
- package/src/components/ViewChangeLog.tsx +1 -0
- package/src/components/ViewCheckResults.tsx +1 -0
- package/src/config.ts +5 -0
- package/src/extensions/annotationFromPileup.ts +1 -1
- package/src/makeDisplayComponent.tsx +28 -7
- package/src/session/ClientDataStore.ts +1 -1
- package/src/session/session.ts +2 -1
|
@@ -3,7 +3,7 @@ import PluginManager from '@jbrowse/core/PluginManager'
|
|
|
3
3
|
import type LinearGenomeViewPlugin from '@jbrowse/plugin-linear-genome-view'
|
|
4
4
|
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
|
|
5
5
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
6
|
-
import { Typography, alpha } from '@mui/material'
|
|
6
|
+
import { Alert, Typography, alpha } from '@mui/material'
|
|
7
7
|
import { observer } from 'mobx-react'
|
|
8
8
|
import React, { useCallback, useEffect, useRef } from 'react'
|
|
9
9
|
import { makeStyles } from 'tss-react/mui'
|
|
@@ -14,6 +14,9 @@ import { TrackLines } from './SixFrameFeatureDisplay/components'
|
|
|
14
14
|
import { SixFrameFeatureDisplay } from './SixFrameFeatureDisplay/stateModel'
|
|
15
15
|
import { TabularEditorPane } from './TabularEditor'
|
|
16
16
|
|
|
17
|
+
import { getSession } from '@jbrowse/core/util'
|
|
18
|
+
import { ApolloSessionModel } from './session'
|
|
19
|
+
|
|
17
20
|
const accordionControlHeight = 12
|
|
18
21
|
|
|
19
22
|
const useStyles = makeStyles()((theme) => ({
|
|
@@ -52,6 +55,11 @@ const useStyles = makeStyles()((theme) => ({
|
|
|
52
55
|
// position: 'relative',
|
|
53
56
|
userSelect: 'none',
|
|
54
57
|
},
|
|
58
|
+
alertContainer: {
|
|
59
|
+
display: 'flex',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
justifyContent: 'center',
|
|
62
|
+
},
|
|
55
63
|
}))
|
|
56
64
|
|
|
57
65
|
function scrollSelectedFeatureIntoView(
|
|
@@ -87,9 +95,9 @@ const ResizeHandle = ({
|
|
|
87
95
|
(event: MouseEvent) => {
|
|
88
96
|
event.stopPropagation()
|
|
89
97
|
event.preventDefault()
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
globalThis.removeEventListener('mousemove', mouseMove)
|
|
99
|
+
globalThis.removeEventListener('mouseup', cancelDrag)
|
|
100
|
+
globalThis.removeEventListener('mouseleave', cancelDrag)
|
|
93
101
|
},
|
|
94
102
|
[mouseMove],
|
|
95
103
|
)
|
|
@@ -99,9 +107,9 @@ const ResizeHandle = ({
|
|
|
99
107
|
<div
|
|
100
108
|
onMouseDown={(event: React.MouseEvent) => {
|
|
101
109
|
event.stopPropagation()
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
globalThis.addEventListener('mousemove', mouseMove)
|
|
111
|
+
globalThis.addEventListener('mouseup', cancelDrag)
|
|
112
|
+
globalThis.addEventListener('mouseleave', cancelDrag)
|
|
105
113
|
}}
|
|
106
114
|
onClick={(e) => {
|
|
107
115
|
e.stopPropagation()
|
|
@@ -155,6 +163,11 @@ export const DisplayComponent = observer(function DisplayComponent({
|
|
|
155
163
|
}: {
|
|
156
164
|
model: LinearApolloDisplayI
|
|
157
165
|
}) {
|
|
166
|
+
const session = getSession(model) as unknown as ApolloSessionModel
|
|
167
|
+
const { ontologyManager } = session.apolloDataStore
|
|
168
|
+
const { featureTypeOntology } = ontologyManager
|
|
169
|
+
const ontologyStore = featureTypeOntology?.dataStore
|
|
170
|
+
|
|
158
171
|
const { classes } = useStyles()
|
|
159
172
|
|
|
160
173
|
const {
|
|
@@ -177,6 +190,14 @@ export const DisplayComponent = observer(function DisplayComponent({
|
|
|
177
190
|
model.setDetailsHeight(detailsHeight - delta)
|
|
178
191
|
}
|
|
179
192
|
|
|
193
|
+
if (!ontologyStore) {
|
|
194
|
+
return (
|
|
195
|
+
<div className={classes.alertContainer}>
|
|
196
|
+
<Alert severity="error">Could not load feature type ontology.</Alert>
|
|
197
|
+
</div>
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
|
|
180
201
|
if (graphical && table) {
|
|
181
202
|
const tabularHeight = tabularEditor.isShown ? detailsHeight : 0
|
|
182
203
|
const featureAreaHeight = isShown
|
|
@@ -51,6 +51,7 @@ export function clientDataStoreFactory(
|
|
|
51
51
|
typeName: types.optional(types.literal('Client'), 'Client'),
|
|
52
52
|
assemblies: types.map(ApolloAssembly),
|
|
53
53
|
checkResults: types.map(CheckResult),
|
|
54
|
+
ontologyManager: types.optional(OntologyManagerType, {}),
|
|
54
55
|
})
|
|
55
56
|
.views((self) => ({
|
|
56
57
|
get internetAccounts() {
|
|
@@ -136,7 +137,6 @@ export function clientDataStoreFactory(
|
|
|
136
137
|
desktopFileDriver: isElectron
|
|
137
138
|
? new DesktopFileDriver(self as unknown as ClientDataStoreType)
|
|
138
139
|
: undefined,
|
|
139
|
-
ontologyManager: OntologyManagerType.create(),
|
|
140
140
|
}))
|
|
141
141
|
.actions((self) => ({
|
|
142
142
|
afterCreate() {
|
package/src/session/session.ts
CHANGED
|
@@ -419,6 +419,7 @@ export function extendSession(
|
|
|
419
419
|
([, assembly]) => assembly.backendDriverType === 'InMemoryFileDriver',
|
|
420
420
|
),
|
|
421
421
|
)
|
|
422
|
+
// @ts-expect-error ontologyManager isn't actually required
|
|
422
423
|
snap.apolloDataStore = {
|
|
423
424
|
typeName: 'Client',
|
|
424
425
|
assemblies,
|
|
@@ -433,5 +434,5 @@ export type ApolloSessionStateModel = ReturnType<typeof extendSession>
|
|
|
433
434
|
// @ts-expect-error Snapshots seem to mess up types here
|
|
434
435
|
// eslint disable because of
|
|
435
436
|
// https://mobx-state-tree.js.org/tips/typescript#using-a-mst-type-at-design-time
|
|
436
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
437
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
437
438
|
export interface ApolloSessionModel extends Instance<ApolloSessionStateModel> {}
|