@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,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = createModel;
|
|
40
|
+
const PluginManager_1 = __importDefault(require("@jbrowse/core/PluginManager"));
|
|
41
|
+
const TextSearchManager_1 = __importDefault(require("@jbrowse/core/TextSearch/TextSearchManager"));
|
|
42
|
+
const assemblyManager_1 = __importStar(require("@jbrowse/core/assemblyManager"));
|
|
43
|
+
const RpcManager_1 = __importDefault(require("@jbrowse/core/rpc/RpcManager"));
|
|
44
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
45
|
+
const corePlugins_1 = __importDefault(require("../corePlugins"));
|
|
46
|
+
const createConfigModel_1 = __importDefault(require("./createConfigModel"));
|
|
47
|
+
const createSessionModel_1 = __importDefault(require("./createSessionModel"));
|
|
48
|
+
const version_1 = require("../version");
|
|
49
|
+
function createModel(runtimePlugins, makeWorkerInstance = () => {
|
|
50
|
+
throw new Error('no makeWorkerInstance supplied');
|
|
51
|
+
}) {
|
|
52
|
+
const pluginManager = new PluginManager_1.default([...corePlugins_1.default, ...runtimePlugins].map(P => new P()));
|
|
53
|
+
pluginManager.createPluggableElements();
|
|
54
|
+
const Session = (0, createSessionModel_1.default)(pluginManager);
|
|
55
|
+
const assemblyConfigSchema = (0, assemblyManager_1.assemblyConfigSchemaFactory)(pluginManager);
|
|
56
|
+
const assemblyManagerType = (0, assemblyManager_1.default)(assemblyConfigSchema, pluginManager);
|
|
57
|
+
const rootModel = mobx_state_tree_1.types
|
|
58
|
+
.model('ReactCircularGenomeView', {
|
|
59
|
+
config: (0, createConfigModel_1.default)(pluginManager, assemblyConfigSchema),
|
|
60
|
+
session: Session,
|
|
61
|
+
assemblyManager: mobx_state_tree_1.types.optional(assemblyManagerType, {}),
|
|
62
|
+
internetAccounts: mobx_state_tree_1.types.array(pluginManager.pluggableMstType('internet account', 'stateModel')),
|
|
63
|
+
})
|
|
64
|
+
.volatile(self => ({
|
|
65
|
+
error: undefined,
|
|
66
|
+
adminMode: false,
|
|
67
|
+
version: version_1.version,
|
|
68
|
+
rpcManager: new RpcManager_1.default(pluginManager, self.config.configuration.rpc, {
|
|
69
|
+
WebWorkerRpcDriver: {
|
|
70
|
+
makeWorkerInstance,
|
|
71
|
+
},
|
|
72
|
+
MainThreadRpcDriver: {},
|
|
73
|
+
}),
|
|
74
|
+
textSearchManager: new TextSearchManager_1.default(pluginManager),
|
|
75
|
+
}))
|
|
76
|
+
.actions(self => ({
|
|
77
|
+
setSession(sessionSnapshot) {
|
|
78
|
+
self.session = (0, mobx_state_tree_1.cast)(sessionSnapshot);
|
|
79
|
+
},
|
|
80
|
+
renameCurrentSession(sessionName) {
|
|
81
|
+
const snapshot = JSON.parse(JSON.stringify((0, mobx_state_tree_1.getSnapshot)(self.session)));
|
|
82
|
+
snapshot.name = sessionName;
|
|
83
|
+
this.setSession(snapshot);
|
|
84
|
+
},
|
|
85
|
+
setError(error) {
|
|
86
|
+
self.error = error;
|
|
87
|
+
},
|
|
88
|
+
addInternetAccount(internetAccount) {
|
|
89
|
+
self.internetAccounts.push(internetAccount);
|
|
90
|
+
},
|
|
91
|
+
findAppropriateInternetAccount(location) {
|
|
92
|
+
const selectedId = location.internetAccountId;
|
|
93
|
+
if (selectedId) {
|
|
94
|
+
const selectedAccount = self.internetAccounts.find(a => a.internetAccountId === selectedId);
|
|
95
|
+
if (selectedAccount) {
|
|
96
|
+
return selectedAccount;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
for (const account of self.internetAccounts) {
|
|
100
|
+
const handleResult = account.handlesLocation(location);
|
|
101
|
+
if (handleResult) {
|
|
102
|
+
return account;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
},
|
|
107
|
+
}))
|
|
108
|
+
.views(self => ({
|
|
109
|
+
get jbrowse() {
|
|
110
|
+
return self.config;
|
|
111
|
+
},
|
|
112
|
+
get pluginManager() {
|
|
113
|
+
return pluginManager;
|
|
114
|
+
},
|
|
115
|
+
}));
|
|
116
|
+
return { model: rootModel, pluginManager };
|
|
117
|
+
}
|
|
@@ -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,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = sessionModelFactory;
|
|
40
|
+
const react_1 = require("react");
|
|
41
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
42
|
+
const SnackbarModel_1 = __importDefault(require("@jbrowse/core/ui/SnackbarModel"));
|
|
43
|
+
const product_core_1 = require("@jbrowse/product-core");
|
|
44
|
+
const Info_1 = __importDefault(require("@mui/icons-material/Info"));
|
|
45
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
46
|
+
const AboutDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./AboutDialog'))));
|
|
47
|
+
function sessionModelFactory(pluginManager) {
|
|
48
|
+
return mobx_state_tree_1.types
|
|
49
|
+
.compose('ReactCircularGenomeViewSession', (0, product_core_1.BaseSessionModel)(pluginManager), (0, product_core_1.DrawerWidgetSessionMixin)(pluginManager), (0, product_core_1.ConnectionManagementSessionMixin)(pluginManager), (0, product_core_1.DialogQueueSessionMixin)(pluginManager), (0, product_core_1.TracksManagerSessionMixin)(pluginManager), (0, product_core_1.ReferenceManagementSessionMixin)(pluginManager), (0, SnackbarModel_1.default)())
|
|
50
|
+
.props({
|
|
51
|
+
view: pluginManager.getViewType('CircularView').stateModel,
|
|
52
|
+
})
|
|
53
|
+
.volatile(() => ({
|
|
54
|
+
task: undefined,
|
|
55
|
+
}))
|
|
56
|
+
.views(self => ({
|
|
57
|
+
get version() {
|
|
58
|
+
return (0, mobx_state_tree_1.getParent)(self).version;
|
|
59
|
+
},
|
|
60
|
+
get assemblies() {
|
|
61
|
+
return [(0, mobx_state_tree_1.getParent)(self).config.assembly];
|
|
62
|
+
},
|
|
63
|
+
get assemblyNames() {
|
|
64
|
+
return [(0, mobx_state_tree_1.getParent)(self).config.assemblyName];
|
|
65
|
+
},
|
|
66
|
+
get connections() {
|
|
67
|
+
return (0, mobx_state_tree_1.getParent)(self).config.connections;
|
|
68
|
+
},
|
|
69
|
+
get assemblyManager() {
|
|
70
|
+
return (0, mobx_state_tree_1.getParent)(self).assemblyManager;
|
|
71
|
+
},
|
|
72
|
+
get views() {
|
|
73
|
+
return [self.view];
|
|
74
|
+
},
|
|
75
|
+
renderProps() {
|
|
76
|
+
return {
|
|
77
|
+
theme: (0, configuration_1.getConf)(self, 'theme'),
|
|
78
|
+
highResolutionScaling: (0, configuration_1.getConf)(self, 'highResolutionScaling'),
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
}))
|
|
82
|
+
.actions(self => ({
|
|
83
|
+
addView(typeName, initialState = {}) {
|
|
84
|
+
const typeDefinition = pluginManager.getElementType('view', typeName);
|
|
85
|
+
if (!typeDefinition) {
|
|
86
|
+
throw new Error(`unknown view type ${typeName}`);
|
|
87
|
+
}
|
|
88
|
+
self.view = {
|
|
89
|
+
...initialState,
|
|
90
|
+
type: typeName,
|
|
91
|
+
};
|
|
92
|
+
return self.view;
|
|
93
|
+
},
|
|
94
|
+
removeView() { },
|
|
95
|
+
}))
|
|
96
|
+
.views(self => ({
|
|
97
|
+
getTrackActionMenuItems(config) {
|
|
98
|
+
return [
|
|
99
|
+
{
|
|
100
|
+
label: 'About track',
|
|
101
|
+
onClick: () => {
|
|
102
|
+
self.queueDialog(doneCallback => [
|
|
103
|
+
AboutDialog,
|
|
104
|
+
{ config, handleClose: doneCallback },
|
|
105
|
+
]);
|
|
106
|
+
},
|
|
107
|
+
icon: Info_1.default,
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
},
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
function z(x) {
|
|
114
|
+
return x;
|
|
115
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createConfigModel = exports.createSessionModel = exports.default = void 0;
|
|
7
|
+
var createModel_1 = require("./createModel");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(createModel_1).default; } });
|
|
9
|
+
var createSessionModel_1 = require("./createSessionModel");
|
|
10
|
+
Object.defineProperty(exports, "createSessionModel", { enumerable: true, get: function () { return __importDefault(createSessionModel_1).default; } });
|
|
11
|
+
var createConfigModel_1 = require("./createConfigModel");
|
|
12
|
+
Object.defineProperty(exports, "createConfigModel", { enumerable: true, get: function () { return __importDefault(createConfigModel_1).default; } });
|