@jbrowse/react-circular-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 +75 -0
- package/dist/JBrowseCircularGenomeView/JBrowseCircularGenomeView.d.ts +5 -0
- package/dist/JBrowseCircularGenomeView/JBrowseCircularGenomeView.js +23 -0
- package/dist/JBrowseCircularGenomeView/index.d.ts +1 -0
- package/dist/JBrowseCircularGenomeView/index.js +8 -0
- package/dist/corePlugins.d.ts +3 -0
- package/dist/corePlugins.js +22 -0
- package/dist/createModel/AboutDialog.d.ts +1 -0
- package/dist/createModel/AboutDialog.js +5 -0
- package/dist/createModel/createConfigModel.d.ts +104 -0
- package/dist/createModel/createConfigModel.js +43 -0
- package/dist/createModel/createModel.d.ts +1387 -0
- package/dist/createModel/createModel.js +117 -0
- package/dist/createModel/createSessionModel.d.ts +260 -0
- package/dist/createModel/createSessionModel.js +115 -0
- package/dist/createModel/index.d.ts +3 -0
- package/dist/createModel/index.js +12 -0
- package/dist/createViewState.d.ts +3780 -0
- package/dist/createViewState.js +64 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -0
- package/dist/loadPlugins.d.ts +13 -0
- package/dist/loadPlugins.js +12 -0
- package/dist/react-circular-genome-view.umd.production.min.js +185 -0
- package/dist/react-circular-genome-view.umd.production.min.js.LICENSE.txt +141 -0
- package/dist/react-circular-genome-view.umd.production.min.js.map +1 -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 +7 -0
- package/dist/webpack.js +53 -0
- package/docs/example.md +105 -0
- package/docs/img/exampleView.png +0 -0
- package/esm/JBrowseCircularGenomeView/JBrowseCircularGenomeView.d.ts +5 -0
- package/esm/JBrowseCircularGenomeView/JBrowseCircularGenomeView.js +21 -0
- package/esm/JBrowseCircularGenomeView/index.d.ts +1 -0
- package/esm/JBrowseCircularGenomeView/index.js +1 -0
- package/esm/corePlugins.d.ts +3 -0
- package/esm/corePlugins.js +17 -0
- package/esm/createModel/AboutDialog.d.ts +1 -0
- package/esm/createModel/AboutDialog.js +1 -0
- package/esm/createModel/createConfigModel.d.ts +104 -0
- package/esm/createModel/createConfigModel.js +37 -0
- package/esm/createModel/createModel.d.ts +1387 -0
- package/esm/createModel/createModel.js +78 -0
- package/esm/createModel/createSessionModel.d.ts +260 -0
- package/esm/createModel/createSessionModel.js +76 -0
- package/esm/createModel/index.d.ts +3 -0
- package/esm/createModel/index.js +3 -0
- package/esm/createViewState.d.ts +3780 -0
- package/esm/createViewState.js +58 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +4 -0
- package/esm/loadPlugins.d.ts +13 -0
- package/esm/loadPlugins.js +6 -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 +7 -0
- package/esm/webpack.js +7 -0
- package/package.json +68 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import TextSearchManager from '@jbrowse/core/TextSearch/TextSearchManager';
|
|
3
|
+
import assemblyManagerFactory, { assemblyConfigSchemaFactory, } from '@jbrowse/core/assemblyManager';
|
|
4
|
+
import RpcManager from '@jbrowse/core/rpc/RpcManager';
|
|
5
|
+
import { cast, getSnapshot, types } from 'mobx-state-tree';
|
|
6
|
+
import corePlugins from '../corePlugins';
|
|
7
|
+
import createConfigModel from './createConfigModel';
|
|
8
|
+
import createSessionModel from './createSessionModel';
|
|
9
|
+
import { version } from '../version';
|
|
10
|
+
export default function createModel(runtimePlugins, makeWorkerInstance = () => {
|
|
11
|
+
throw new Error('no makeWorkerInstance supplied');
|
|
12
|
+
}) {
|
|
13
|
+
const pluginManager = new PluginManager([...corePlugins, ...runtimePlugins].map(P => new P()));
|
|
14
|
+
pluginManager.createPluggableElements();
|
|
15
|
+
const Session = createSessionModel(pluginManager);
|
|
16
|
+
const assemblyConfigSchema = assemblyConfigSchemaFactory(pluginManager);
|
|
17
|
+
const assemblyManagerType = assemblyManagerFactory(assemblyConfigSchema, pluginManager);
|
|
18
|
+
const rootModel = types
|
|
19
|
+
.model('ReactCircularGenomeView', {
|
|
20
|
+
config: createConfigModel(pluginManager, assemblyConfigSchema),
|
|
21
|
+
session: Session,
|
|
22
|
+
assemblyManager: types.optional(assemblyManagerType, {}),
|
|
23
|
+
internetAccounts: types.array(pluginManager.pluggableMstType('internet account', 'stateModel')),
|
|
24
|
+
})
|
|
25
|
+
.volatile(self => ({
|
|
26
|
+
error: undefined,
|
|
27
|
+
adminMode: false,
|
|
28
|
+
version,
|
|
29
|
+
rpcManager: new RpcManager(pluginManager, self.config.configuration.rpc, {
|
|
30
|
+
WebWorkerRpcDriver: {
|
|
31
|
+
makeWorkerInstance,
|
|
32
|
+
},
|
|
33
|
+
MainThreadRpcDriver: {},
|
|
34
|
+
}),
|
|
35
|
+
textSearchManager: new TextSearchManager(pluginManager),
|
|
36
|
+
}))
|
|
37
|
+
.actions(self => ({
|
|
38
|
+
setSession(sessionSnapshot) {
|
|
39
|
+
self.session = cast(sessionSnapshot);
|
|
40
|
+
},
|
|
41
|
+
renameCurrentSession(sessionName) {
|
|
42
|
+
const snapshot = JSON.parse(JSON.stringify(getSnapshot(self.session)));
|
|
43
|
+
snapshot.name = sessionName;
|
|
44
|
+
this.setSession(snapshot);
|
|
45
|
+
},
|
|
46
|
+
setError(error) {
|
|
47
|
+
self.error = error;
|
|
48
|
+
},
|
|
49
|
+
addInternetAccount(internetAccount) {
|
|
50
|
+
self.internetAccounts.push(internetAccount);
|
|
51
|
+
},
|
|
52
|
+
findAppropriateInternetAccount(location) {
|
|
53
|
+
const selectedId = location.internetAccountId;
|
|
54
|
+
if (selectedId) {
|
|
55
|
+
const selectedAccount = self.internetAccounts.find(a => a.internetAccountId === selectedId);
|
|
56
|
+
if (selectedAccount) {
|
|
57
|
+
return selectedAccount;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
for (const account of self.internetAccounts) {
|
|
61
|
+
const handleResult = account.handlesLocation(location);
|
|
62
|
+
if (handleResult) {
|
|
63
|
+
return account;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
},
|
|
68
|
+
}))
|
|
69
|
+
.views(self => ({
|
|
70
|
+
get jbrowse() {
|
|
71
|
+
return self.config;
|
|
72
|
+
},
|
|
73
|
+
get pluginManager() {
|
|
74
|
+
return pluginManager;
|
|
75
|
+
},
|
|
76
|
+
}));
|
|
77
|
+
return { model: rootModel, pluginManager };
|
|
78
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { Instance } from 'mobx-state-tree';
|
|
3
|
+
export default function sessionModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
4
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
+
margin: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
7
|
+
} & {
|
|
8
|
+
drawerPosition: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
9
|
+
drawerWidth: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
10
|
+
widgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyType>;
|
|
11
|
+
activeWidgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>>;
|
|
12
|
+
minimized: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
13
|
+
} & {
|
|
14
|
+
connectionInstances: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
15
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
16
|
+
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
17
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
18
|
+
name: {
|
|
19
|
+
type: string;
|
|
20
|
+
defaultValue: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
assemblyNames: {
|
|
24
|
+
type: string;
|
|
25
|
+
defaultValue: never[];
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
29
|
+
}, {
|
|
30
|
+
connect(_arg: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
31
|
+
} & {
|
|
32
|
+
afterAttach(): void;
|
|
33
|
+
addTrackConf(trackConf: Record<string, unknown> | ({
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
36
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
37
|
+
[x: string]: any;
|
|
38
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
39
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
42
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
43
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)): any;
|
|
44
|
+
addTrackConfs(trackConfs: (Record<string, unknown> | ({
|
|
45
|
+
[x: string]: any;
|
|
46
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
47
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
48
|
+
[x: string]: any;
|
|
49
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
50
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
51
|
+
[x: string]: any;
|
|
52
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
53
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
54
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>))[]): void;
|
|
55
|
+
setTrackConfs(trackConfs: import("@jbrowse/core/configuration").AnyConfigurationModel[]): void;
|
|
56
|
+
clear(): void;
|
|
57
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
58
|
+
} & {
|
|
59
|
+
view: import("mobx-state-tree").IAnyModelType;
|
|
60
|
+
}, {
|
|
61
|
+
selection: unknown;
|
|
62
|
+
hovered: unknown;
|
|
63
|
+
} & {
|
|
64
|
+
readonly root: import("mobx-state-tree").TypeOrStateTreeNodeToStateTreeNode<ROOT_MODEL_TYPE>;
|
|
65
|
+
} & {
|
|
66
|
+
readonly jbrowse: any;
|
|
67
|
+
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
68
|
+
readonly configuration: {
|
|
69
|
+
[x: string]: any;
|
|
70
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
71
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
72
|
+
[x: string]: any;
|
|
73
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
74
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
75
|
+
[x: string]: any;
|
|
76
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
77
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
78
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
|
|
79
|
+
readonly adminMode: boolean;
|
|
80
|
+
readonly textSearchManager: import("@jbrowse/core/TextSearch/TextSearchManager").default;
|
|
81
|
+
} & {
|
|
82
|
+
readonly assemblies: Instance<import("@jbrowse/core/assemblyManager").BaseAssemblyConfigSchema>[];
|
|
83
|
+
} & {
|
|
84
|
+
setSelection(thing: unknown): void;
|
|
85
|
+
clearSelection(): void;
|
|
86
|
+
setHovered(thing: unknown): void;
|
|
87
|
+
} & {
|
|
88
|
+
readonly visibleWidget: any;
|
|
89
|
+
} & {
|
|
90
|
+
setDrawerPosition(arg: string): void;
|
|
91
|
+
updateDrawerWidth(drawerWidth: number): number;
|
|
92
|
+
resizeDrawer(distance: number): number;
|
|
93
|
+
addWidget(typeName: string, id: string, initialState?: {}, conf?: unknown): any;
|
|
94
|
+
showWidget(widget: any): void;
|
|
95
|
+
hasWidget(widget: any): boolean;
|
|
96
|
+
hideWidget(widget: any): void;
|
|
97
|
+
minimizeWidgetDrawer(): void;
|
|
98
|
+
showWidgetDrawer(): void;
|
|
99
|
+
hideAllWidgets(): void;
|
|
100
|
+
editConfiguration(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
101
|
+
afterAttach(): void;
|
|
102
|
+
} & {
|
|
103
|
+
readonly connections: import("@jbrowse/core/pluggableElementTypes/models/baseConnectionConfig").BaseConnectionConfigModel[];
|
|
104
|
+
} & {
|
|
105
|
+
makeConnection(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel, initialSnapshot?: {}): ({
|
|
106
|
+
name: string;
|
|
107
|
+
tracks: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
|
|
108
|
+
configuration: {
|
|
109
|
+
[x: string]: any;
|
|
110
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
111
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
112
|
+
[x: string]: any;
|
|
113
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
114
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
115
|
+
[x: string]: any;
|
|
116
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
117
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
118
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
119
|
+
name: {
|
|
120
|
+
type: string;
|
|
121
|
+
defaultValue: string;
|
|
122
|
+
description: string;
|
|
123
|
+
};
|
|
124
|
+
assemblyNames: {
|
|
125
|
+
type: string;
|
|
126
|
+
defaultValue: never[];
|
|
127
|
+
description: string;
|
|
128
|
+
};
|
|
129
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>;
|
|
130
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
131
|
+
connect(_arg: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
132
|
+
} & {
|
|
133
|
+
afterAttach(): void;
|
|
134
|
+
addTrackConf(trackConf: Record<string, unknown> | ({
|
|
135
|
+
[x: string]: any;
|
|
136
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
137
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
138
|
+
[x: string]: any;
|
|
139
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
140
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
141
|
+
[x: string]: any;
|
|
142
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
143
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
144
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)): any;
|
|
145
|
+
addTrackConfs(trackConfs: (Record<string, unknown> | ({
|
|
146
|
+
[x: string]: any;
|
|
147
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
148
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
149
|
+
[x: string]: any;
|
|
150
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
151
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
152
|
+
[x: string]: any;
|
|
153
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
154
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
155
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>))[]): void;
|
|
156
|
+
setTrackConfs(trackConfs: import("@jbrowse/core/configuration").AnyConfigurationModel[]): void;
|
|
157
|
+
clear(): void;
|
|
158
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
159
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
160
|
+
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
161
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
162
|
+
name: {
|
|
163
|
+
type: string;
|
|
164
|
+
defaultValue: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
assemblyNames: {
|
|
168
|
+
type: string;
|
|
169
|
+
defaultValue: never[];
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
173
|
+
}, {
|
|
174
|
+
connect(_arg: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
175
|
+
} & {
|
|
176
|
+
afterAttach(): void;
|
|
177
|
+
addTrackConf(trackConf: Record<string, unknown> | ({
|
|
178
|
+
[x: string]: any;
|
|
179
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
180
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
181
|
+
[x: string]: any;
|
|
182
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
183
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
184
|
+
[x: string]: any;
|
|
185
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
186
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
187
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)): any;
|
|
188
|
+
addTrackConfs(trackConfs: (Record<string, unknown> | ({
|
|
189
|
+
[x: string]: any;
|
|
190
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
191
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
192
|
+
[x: string]: any;
|
|
193
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
194
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
195
|
+
[x: string]: any;
|
|
196
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
197
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
198
|
+
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>))[]): void;
|
|
199
|
+
setTrackConfs(trackConfs: import("@jbrowse/core/configuration").AnyConfigurationModel[]): void;
|
|
200
|
+
clear(): void;
|
|
201
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
202
|
+
prepareToBreakConnection(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel): (Record<string, number> | (() => void))[] | undefined;
|
|
203
|
+
breakConnection(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
204
|
+
deleteConnection(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel): any;
|
|
205
|
+
addConnectionConf(connectionConf: import("@jbrowse/core/configuration").AnyConfigurationModel): any;
|
|
206
|
+
clearConnections(): void;
|
|
207
|
+
} & {
|
|
208
|
+
queueOfDialogs: [import("@jbrowse/core/util/types").DialogComponentType, unknown][];
|
|
209
|
+
} & {
|
|
210
|
+
readonly DialogComponent: import("@jbrowse/core/util/types").DialogComponentType | undefined;
|
|
211
|
+
readonly DialogProps: unknown;
|
|
212
|
+
} & {
|
|
213
|
+
removeActiveDialog(): void;
|
|
214
|
+
queueDialog(cb: (doneCallback: () => void) => [import("@jbrowse/core/util/types").DialogComponentType, unknown]): void;
|
|
215
|
+
} & {
|
|
216
|
+
getReferring(object: import("mobx-state-tree").IAnyStateTreeNode): import("@jbrowse/product-core").ReferringNode[];
|
|
217
|
+
} & {
|
|
218
|
+
removeReferring(referring: import("@jbrowse/product-core").ReferringNode[], track: import("@jbrowse/core/pluggableElementTypes").BaseTrackConfig, callbacks: ((arg: string) => void)[], dereferenceTypeCount: Record<string, number>): void;
|
|
219
|
+
} & {
|
|
220
|
+
readonly tracks: import("@jbrowse/core/configuration").AnyConfigurationModel[];
|
|
221
|
+
} & {
|
|
222
|
+
addTrackConf(trackConf: import("@jbrowse/core/configuration").AnyConfiguration): any;
|
|
223
|
+
deleteTrackConf(trackConf: import("@jbrowse/core/configuration").AnyConfigurationModel): any;
|
|
224
|
+
} & {
|
|
225
|
+
snackbarMessages: import("mobx").IObservableArray<import("@jbrowse/core/ui/SnackbarModel").SnackbarMessage>;
|
|
226
|
+
} & {
|
|
227
|
+
readonly snackbarMessageSet: Map<string, import("@jbrowse/core/ui/SnackbarModel").SnackbarMessage>;
|
|
228
|
+
} & {
|
|
229
|
+
notify(message: string, level?: import("@jbrowse/core/util/types").NotificationLevel, action?: import("@jbrowse/core/util/types").SnackAction): void;
|
|
230
|
+
notifyError(errorMessage: string, error?: unknown, extra?: unknown): void;
|
|
231
|
+
pushSnackbarMessage(message: string, level?: import("@jbrowse/core/util/types").NotificationLevel, action?: import("@jbrowse/core/util/types").SnackAction): void;
|
|
232
|
+
popSnackbarMessage(): import("@jbrowse/core/ui/SnackbarModel").SnackbarMessage | undefined;
|
|
233
|
+
removeSnackbarMessage(message: string): void;
|
|
234
|
+
} & {
|
|
235
|
+
task: undefined;
|
|
236
|
+
} & {
|
|
237
|
+
readonly version: any;
|
|
238
|
+
readonly assemblies: any[];
|
|
239
|
+
readonly assemblyNames: any[];
|
|
240
|
+
readonly connections: any;
|
|
241
|
+
readonly assemblyManager: any;
|
|
242
|
+
readonly views: any[];
|
|
243
|
+
renderProps(): {
|
|
244
|
+
theme: any;
|
|
245
|
+
highResolutionScaling: any;
|
|
246
|
+
};
|
|
247
|
+
} & {
|
|
248
|
+
addView(typeName: string, initialState?: {}): any;
|
|
249
|
+
removeView(): void;
|
|
250
|
+
} & {
|
|
251
|
+
getTrackActionMenuItems(config: any): {
|
|
252
|
+
label: string;
|
|
253
|
+
onClick: () => void;
|
|
254
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
255
|
+
muiName: string;
|
|
256
|
+
};
|
|
257
|
+
}[];
|
|
258
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
259
|
+
export type SessionStateModel = ReturnType<typeof sessionModelFactory>;
|
|
260
|
+
export type SessionModel = Instance<SessionStateModel>;
|
|
@@ -0,0 +1,76 @@
|
|
|
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, TracksManagerSessionMixin, } from '@jbrowse/product-core';
|
|
5
|
+
import InfoIcon from '@mui/icons-material/Info';
|
|
6
|
+
import { getParent, types } from 'mobx-state-tree';
|
|
7
|
+
const AboutDialog = lazy(() => import('./AboutDialog'));
|
|
8
|
+
export default function sessionModelFactory(pluginManager) {
|
|
9
|
+
return types
|
|
10
|
+
.compose('ReactCircularGenomeViewSession', BaseSessionModel(pluginManager), DrawerWidgetSessionMixin(pluginManager), ConnectionManagementSessionMixin(pluginManager), DialogQueueSessionMixin(pluginManager), TracksManagerSessionMixin(pluginManager), ReferenceManagementSessionMixin(pluginManager), SnackbarModel())
|
|
11
|
+
.props({
|
|
12
|
+
view: pluginManager.getViewType('CircularView').stateModel,
|
|
13
|
+
})
|
|
14
|
+
.volatile(() => ({
|
|
15
|
+
task: undefined,
|
|
16
|
+
}))
|
|
17
|
+
.views(self => ({
|
|
18
|
+
get version() {
|
|
19
|
+
return getParent(self).version;
|
|
20
|
+
},
|
|
21
|
+
get assemblies() {
|
|
22
|
+
return [getParent(self).config.assembly];
|
|
23
|
+
},
|
|
24
|
+
get assemblyNames() {
|
|
25
|
+
return [getParent(self).config.assemblyName];
|
|
26
|
+
},
|
|
27
|
+
get connections() {
|
|
28
|
+
return getParent(self).config.connections;
|
|
29
|
+
},
|
|
30
|
+
get assemblyManager() {
|
|
31
|
+
return getParent(self).assemblyManager;
|
|
32
|
+
},
|
|
33
|
+
get views() {
|
|
34
|
+
return [self.view];
|
|
35
|
+
},
|
|
36
|
+
renderProps() {
|
|
37
|
+
return {
|
|
38
|
+
theme: getConf(self, 'theme'),
|
|
39
|
+
highResolutionScaling: getConf(self, 'highResolutionScaling'),
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
}))
|
|
43
|
+
.actions(self => ({
|
|
44
|
+
addView(typeName, initialState = {}) {
|
|
45
|
+
const typeDefinition = pluginManager.getElementType('view', typeName);
|
|
46
|
+
if (!typeDefinition) {
|
|
47
|
+
throw new Error(`unknown view type ${typeName}`);
|
|
48
|
+
}
|
|
49
|
+
self.view = {
|
|
50
|
+
...initialState,
|
|
51
|
+
type: typeName,
|
|
52
|
+
};
|
|
53
|
+
return self.view;
|
|
54
|
+
},
|
|
55
|
+
removeView() { },
|
|
56
|
+
}))
|
|
57
|
+
.views(self => ({
|
|
58
|
+
getTrackActionMenuItems(config) {
|
|
59
|
+
return [
|
|
60
|
+
{
|
|
61
|
+
label: 'About track',
|
|
62
|
+
onClick: () => {
|
|
63
|
+
self.queueDialog(doneCallback => [
|
|
64
|
+
AboutDialog,
|
|
65
|
+
{ config, handleClose: doneCallback },
|
|
66
|
+
]);
|
|
67
|
+
},
|
|
68
|
+
icon: InfoIcon,
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
},
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
function z(x) {
|
|
75
|
+
return x;
|
|
76
|
+
}
|