@jbrowse/react-linear-genome-view2 3.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/LICENSE +201 -0
- package/README.md +72 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.d.ts +5 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.js +19 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.test.d.ts +1 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.test.js +77 -0
- package/dist/JBrowseLinearGenomeView/index.d.ts +1 -0
- package/dist/JBrowseLinearGenomeView/index.js +8 -0
- package/dist/corePlugins.d.ts +3 -0
- package/dist/corePlugins.js +38 -0
- package/dist/createModel/AboutDialog.d.ts +1 -0
- package/dist/createModel/AboutDialog.js +5 -0
- package/dist/createModel/createConfigModel.d.ts +94 -0
- package/dist/createModel/createConfigModel.js +43 -0
- package/dist/createModel/createModel.d.ts +3165 -0
- package/dist/createModel/createModel.js +118 -0
- package/dist/createModel/createSessionModel.d.ts +1170 -0
- package/dist/createModel/createSessionModel.js +118 -0
- package/dist/createModel/index.d.ts +3 -0
- package/dist/createModel/index.js +12 -0
- package/dist/createViewState.d.ts +8683 -0
- package/dist/createViewState.js +79 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14 -0
- package/dist/loadPlugins.d.ts +13 -0
- package/dist/loadPlugins.js +12 -0
- package/dist/react-linear-genome-view.umd.production.min.js +185 -0
- package/dist/react-linear-genome-view.umd.production.min.js.LICENSE.txt +198 -0
- package/dist/react-linear-genome-view.umd.production.min.js.map +1 -0
- package/dist/rpcWorker.d.ts +2 -0
- package/dist/rpcWorker.js +49 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.js +2 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/webpack.d.ts +8 -0
- package/dist/webpack.js +53 -0
- package/dist/workerPolyfill.d.ts +0 -0
- package/dist/workerPolyfill.js +32 -0
- package/docs/example.md +91 -0
- package/docs/img/exampleView.png +0 -0
- package/esm/JBrowseLinearGenomeView/JBrowseLinearGenomeView.d.ts +5 -0
- package/esm/JBrowseLinearGenomeView/JBrowseLinearGenomeView.js +17 -0
- package/esm/JBrowseLinearGenomeView/index.d.ts +1 -0
- package/esm/JBrowseLinearGenomeView/index.js +1 -0
- package/esm/corePlugins.d.ts +3 -0
- package/esm/corePlugins.js +33 -0
- package/esm/createModel/AboutDialog.d.ts +1 -0
- package/esm/createModel/AboutDialog.js +1 -0
- package/esm/createModel/createConfigModel.d.ts +94 -0
- package/esm/createModel/createConfigModel.js +37 -0
- package/esm/createModel/createModel.d.ts +3165 -0
- package/esm/createModel/createModel.js +79 -0
- package/esm/createModel/createSessionModel.d.ts +1170 -0
- package/esm/createModel/createSessionModel.js +79 -0
- package/esm/createModel/index.d.ts +3 -0
- package/esm/createModel/index.js +3 -0
- package/esm/createViewState.d.ts +8683 -0
- package/esm/createViewState.js +73 -0
- package/esm/index.d.ts +5 -0
- package/esm/index.js +4 -0
- package/esm/loadPlugins.d.ts +13 -0
- package/esm/loadPlugins.js +6 -0
- package/esm/makeWorkerInstance.d.ts +1 -0
- package/esm/makeWorkerInstance.js +3 -0
- package/esm/rpcWorker.d.ts +2 -0
- package/esm/rpcWorker.js +10 -0
- package/esm/types.d.ts +5 -0
- package/esm/types.js +1 -0
- package/esm/version.d.ts +1 -0
- package/esm/version.js +1 -0
- package/esm/webpack.d.ts +8 -0
- package/esm/webpack.js +7 -0
- package/esm/workerPolyfill.d.ts +0 -0
- package/esm/workerPolyfill.js +32 -0
- package/package.json +84 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
2
|
+
import { getConf } from '@jbrowse/core/configuration';
|
|
3
|
+
import SnackbarModel from '@jbrowse/core/ui/SnackbarModel';
|
|
4
|
+
import { BaseSessionModel, ConnectionManagementSessionMixin, DialogQueueSessionMixin, DrawerWidgetSessionMixin, ReferenceManagementSessionMixin, SessionTracksManagerSessionMixin, TracksManagerSessionMixin, } from '@jbrowse/product-core';
|
|
5
|
+
import InfoIcon from '@mui/icons-material/Info';
|
|
6
|
+
import { cast, getParent, types } from 'mobx-state-tree';
|
|
7
|
+
const AboutDialog = lazy(() => import('./AboutDialog'));
|
|
8
|
+
function x() { }
|
|
9
|
+
export default function sessionModelFactory(pluginManager) {
|
|
10
|
+
return types
|
|
11
|
+
.compose('ReactLinearGenomeViewSession', BaseSessionModel(pluginManager), DrawerWidgetSessionMixin(pluginManager), ConnectionManagementSessionMixin(pluginManager), DialogQueueSessionMixin(pluginManager), TracksManagerSessionMixin(pluginManager), ReferenceManagementSessionMixin(pluginManager), SessionTracksManagerSessionMixin(pluginManager), SnackbarModel())
|
|
12
|
+
.props({
|
|
13
|
+
view: pluginManager.getViewType('LinearGenomeView')
|
|
14
|
+
.stateModel,
|
|
15
|
+
sessionTracks: types.array(pluginManager.pluggableConfigSchemaType('track')),
|
|
16
|
+
})
|
|
17
|
+
.views(self => ({
|
|
18
|
+
get version() {
|
|
19
|
+
return getParent(self).version;
|
|
20
|
+
},
|
|
21
|
+
get disableAddTracks() {
|
|
22
|
+
return getParent(self).disableAddTracks;
|
|
23
|
+
},
|
|
24
|
+
get assemblies() {
|
|
25
|
+
return [getParent(self).config.assembly];
|
|
26
|
+
},
|
|
27
|
+
get assemblyNames() {
|
|
28
|
+
return [getParent(self).config.assemblyName];
|
|
29
|
+
},
|
|
30
|
+
get connections() {
|
|
31
|
+
return getParent(self).config.connections;
|
|
32
|
+
},
|
|
33
|
+
get assemblyManager() {
|
|
34
|
+
return getParent(self).assemblyManager;
|
|
35
|
+
},
|
|
36
|
+
get views() {
|
|
37
|
+
return [self.view];
|
|
38
|
+
},
|
|
39
|
+
renderProps() {
|
|
40
|
+
return {
|
|
41
|
+
theme: getConf(self, 'theme'),
|
|
42
|
+
highResolutionScaling: getConf(self, 'highResolutionScaling'),
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
}))
|
|
46
|
+
.actions(self => ({
|
|
47
|
+
addView(typeName, initialState = {}) {
|
|
48
|
+
const typeDefinition = pluginManager.getElementType('view', typeName);
|
|
49
|
+
if (!typeDefinition) {
|
|
50
|
+
throw new Error(`unknown view type ${typeName}`);
|
|
51
|
+
}
|
|
52
|
+
self.view = cast({
|
|
53
|
+
...initialState,
|
|
54
|
+
type: typeName,
|
|
55
|
+
});
|
|
56
|
+
return self.view;
|
|
57
|
+
},
|
|
58
|
+
removeView() { },
|
|
59
|
+
}))
|
|
60
|
+
.views(self => ({
|
|
61
|
+
getTrackActionMenuItems(config) {
|
|
62
|
+
return [
|
|
63
|
+
{
|
|
64
|
+
label: 'About track',
|
|
65
|
+
onClick: () => {
|
|
66
|
+
self.queueDialog(doneCallback => [
|
|
67
|
+
AboutDialog,
|
|
68
|
+
{ config, handleClose: doneCallback },
|
|
69
|
+
]);
|
|
70
|
+
},
|
|
71
|
+
icon: InfoIcon,
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
},
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
function z(x) {
|
|
78
|
+
return x;
|
|
79
|
+
}
|