@jbrowse/product-core 3.7.0 → 4.0.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/esm/RootModel/BaseRootModel.d.ts +52 -37
- package/esm/RootModel/BaseRootModel.js +1 -1
- package/esm/RootModel/FormatAbout.d.ts +2 -2
- package/esm/RootModel/FormatDetails.d.ts +2 -2
- package/esm/RootModel/HierarchicalConfig.d.ts +6 -6
- package/esm/RootModel/InternetAccounts.d.ts +4 -4
- package/esm/RootModel/InternetAccounts.js +3 -3
- package/esm/RootModel/index.d.ts +5 -5
- package/esm/RootModel/index.js +5 -5
- package/esm/Session/BaseSession.d.ts +12 -8
- package/esm/Session/BaseSession.js +12 -2
- package/esm/Session/Connections.d.ts +7 -144
- package/esm/Session/Connections.js +13 -3
- package/esm/Session/DialogQueue.d.ts +3 -3
- package/esm/Session/DialogQueue.js +4 -6
- package/esm/Session/DrawerWidgets.d.ts +17 -9
- package/esm/Session/DrawerWidgets.js +32 -8
- package/esm/Session/MultipleViews.d.ts +189 -127
- package/esm/Session/MultipleViews.js +27 -10
- package/esm/Session/ReferenceManagement.d.ts +3 -3
- package/esm/Session/ReferenceManagement.js +10 -4
- package/esm/Session/SessionTracks.d.ts +178 -122
- package/esm/Session/SessionTracks.js +13 -3
- package/esm/Session/Themes.d.ts +3 -3
- package/esm/Session/Themes.js +3 -3
- package/esm/Session/Tracks.d.ts +175 -121
- package/esm/Session/Tracks.js +16 -3
- package/esm/Session/index.d.ts +10 -10
- package/esm/Session/index.js +10 -10
- package/esm/index.d.ts +4 -4
- package/esm/index.js +4 -4
- package/esm/rpcWorker.d.ts +6 -0
- package/esm/rpcWorker.js +12 -6
- package/esm/ui/AboutDialog.d.ts +4 -2
- package/esm/ui/AboutDialog.js +4 -5
- package/esm/ui/AboutDialogContents.d.ts +4 -2
- package/esm/ui/AboutDialogContents.js +13 -12
- package/esm/ui/FileInfoPanel.d.ts +4 -2
- package/esm/ui/FileInfoPanel.js +6 -7
- package/esm/ui/HeaderButtons.js +4 -4
- package/esm/ui/RefNameInfoDialog.d.ts +4 -2
- package/esm/ui/RefNameInfoDialog.js +13 -13
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/index.js +1 -1
- package/esm/ui/util.d.ts +5 -2
- package/esm/ui/util.js +23 -5
- package/package.json +24 -34
- package/dist/RootModel/BaseRootModel.d.ts +0 -534
- package/dist/RootModel/BaseRootModel.js +0 -57
- package/dist/RootModel/FormatAbout.d.ts +0 -12
- package/dist/RootModel/FormatAbout.js +0 -18
- package/dist/RootModel/FormatDetails.d.ts +0 -24
- package/dist/RootModel/FormatDetails.js +0 -30
- package/dist/RootModel/HierarchicalConfig.d.ts +0 -26
- package/dist/RootModel/HierarchicalConfig.js +0 -32
- package/dist/RootModel/InternetAccounts.d.ts +0 -15
- package/dist/RootModel/InternetAccounts.js +0 -79
- package/dist/RootModel/index.d.ts +0 -5
- package/dist/RootModel/index.js +0 -21
- package/dist/Session/BaseSession.d.ts +0 -31
- package/dist/Session/BaseSession.js +0 -63
- package/dist/Session/Connections.d.ts +0 -158
- package/dist/Session/Connections.js +0 -84
- package/dist/Session/DialogQueue.d.ts +0 -15
- package/dist/Session/DialogQueue.js +0 -37
- package/dist/Session/DrawerWidgets.d.ts +0 -28
- package/dist/Session/DrawerWidgets.js +0 -107
- package/dist/Session/MultipleViews.d.ts +0 -1681
- package/dist/Session/MultipleViews.js +0 -75
- package/dist/Session/ReferenceManagement.d.ts +0 -15
- package/dist/Session/ReferenceManagement.js +0 -71
- package/dist/Session/SessionTracks.d.ts +0 -1664
- package/dist/Session/SessionTracks.js +0 -54
- package/dist/Session/Themes.d.ts +0 -18
- package/dist/Session/Themes.js +0 -47
- package/dist/Session/Tracks.d.ts +0 -1657
- package/dist/Session/Tracks.js +0 -36
- package/dist/Session/index.d.ts +0 -10
- package/dist/Session/index.js +0 -26
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -20
- package/dist/rpcWorker.d.ts +0 -6
- package/dist/rpcWorker.js +0 -57
- package/dist/ui/AboutDialog.d.ts +0 -5
- package/dist/ui/AboutDialog.js +0 -18
- package/dist/ui/AboutDialogContents.d.ts +0 -5
- package/dist/ui/AboutDialogContents.js +0 -41
- package/dist/ui/FileInfoPanel.d.ts +0 -4
- package/dist/ui/FileInfoPanel.js +0 -43
- package/dist/ui/HeaderButtons.d.ts +0 -6
- package/dist/ui/HeaderButtons.js +0 -31
- package/dist/ui/RefNameInfoDialog.d.ts +0 -6
- package/dist/ui/RefNameInfoDialog.js +0 -87
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -17
- package/dist/ui/util.d.ts +0 -12
- package/dist/ui/util.js +0 -28
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare function HierarchicalConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
trackNames: {
|
|
4
|
-
type: string;
|
|
5
|
-
defaultValue: boolean;
|
|
6
|
-
};
|
|
7
|
-
categories: {
|
|
8
|
-
type: string;
|
|
9
|
-
defaultValue: boolean;
|
|
10
|
-
};
|
|
11
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
12
|
-
defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
13
|
-
categoryNames: {
|
|
14
|
-
type: string;
|
|
15
|
-
defaultValue: never[];
|
|
16
|
-
};
|
|
17
|
-
topLevelCategories: {
|
|
18
|
-
type: string;
|
|
19
|
-
defaultValue: boolean;
|
|
20
|
-
};
|
|
21
|
-
subCategories: {
|
|
22
|
-
type: string;
|
|
23
|
-
defaultValue: boolean;
|
|
24
|
-
};
|
|
25
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
26
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HierarchicalConfigSchemaFactory = HierarchicalConfigSchemaFactory;
|
|
4
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
function HierarchicalConfigSchemaFactory() {
|
|
6
|
-
return (0, configuration_1.ConfigurationSchema)('hierarchical', {
|
|
7
|
-
sort: (0, configuration_1.ConfigurationSchema)('hierarchicalSort', {
|
|
8
|
-
trackNames: {
|
|
9
|
-
type: 'boolean',
|
|
10
|
-
defaultValue: false,
|
|
11
|
-
},
|
|
12
|
-
categories: {
|
|
13
|
-
type: 'boolean',
|
|
14
|
-
defaultValue: false,
|
|
15
|
-
},
|
|
16
|
-
}),
|
|
17
|
-
defaultCollapsed: (0, configuration_1.ConfigurationSchema)('defaultCollapsed', {
|
|
18
|
-
categoryNames: {
|
|
19
|
-
type: 'stringArray',
|
|
20
|
-
defaultValue: [],
|
|
21
|
-
},
|
|
22
|
-
topLevelCategories: {
|
|
23
|
-
type: 'boolean',
|
|
24
|
-
defaultValue: false,
|
|
25
|
-
},
|
|
26
|
-
subCategories: {
|
|
27
|
-
type: 'boolean',
|
|
28
|
-
defaultValue: false,
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
32
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { UriLocation } from '@jbrowse/core/util';
|
|
4
|
-
import type { Instance } from 'mobx-state-tree';
|
|
5
|
-
export declare function InternetAccountsRootModelMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
6
|
-
internetAccounts: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
7
|
-
}, {
|
|
8
|
-
initializeInternetAccount(internetAccountConfig: AnyConfigurationModel, initialSnapshot?: {}): any;
|
|
9
|
-
createEphemeralInternetAccount(internetAccountId: string, initialSnapshot: Record<string, unknown>, url: string): any;
|
|
10
|
-
findAppropriateInternetAccount(location: UriLocation): any;
|
|
11
|
-
} & {
|
|
12
|
-
afterCreate(): void;
|
|
13
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
14
|
-
export type RootModelWithInternetAccountsType = ReturnType<typeof InternetAccountsRootModelMixin>;
|
|
15
|
-
export type RootModelWithInternetAccounts = Instance<RootModelWithInternetAccountsType>;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InternetAccountsRootModelMixin = InternetAccountsRootModelMixin;
|
|
4
|
-
const mobx_1 = require("mobx");
|
|
5
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
|
-
function InternetAccountsRootModelMixin(pluginManager) {
|
|
7
|
-
return mobx_state_tree_1.types
|
|
8
|
-
.model({
|
|
9
|
-
internetAccounts: mobx_state_tree_1.types.array(pluginManager.pluggableMstType('internet account', 'stateModel')),
|
|
10
|
-
})
|
|
11
|
-
.actions(self => ({
|
|
12
|
-
initializeInternetAccount(internetAccountConfig, initialSnapshot = {}) {
|
|
13
|
-
const internetAccountType = pluginManager.getInternetAccountType(internetAccountConfig.type);
|
|
14
|
-
if (!internetAccountType) {
|
|
15
|
-
throw new Error(`unknown internet account type ${internetAccountConfig.type}`);
|
|
16
|
-
}
|
|
17
|
-
const length = self.internetAccounts.push({
|
|
18
|
-
...initialSnapshot,
|
|
19
|
-
type: internetAccountConfig.type,
|
|
20
|
-
configuration: internetAccountConfig,
|
|
21
|
-
});
|
|
22
|
-
return self.internetAccounts[length - 1];
|
|
23
|
-
},
|
|
24
|
-
createEphemeralInternetAccount(internetAccountId, initialSnapshot, url) {
|
|
25
|
-
let hostUri;
|
|
26
|
-
try {
|
|
27
|
-
hostUri = new URL(url).origin;
|
|
28
|
-
}
|
|
29
|
-
catch (e) {
|
|
30
|
-
}
|
|
31
|
-
const internetAccountSplit = internetAccountId.split('-');
|
|
32
|
-
const configuration = {
|
|
33
|
-
type: internetAccountSplit[0],
|
|
34
|
-
internetAccountId: internetAccountId,
|
|
35
|
-
name: internetAccountSplit.slice(1).join('-'),
|
|
36
|
-
description: '',
|
|
37
|
-
domains: hostUri ? [hostUri] : [],
|
|
38
|
-
};
|
|
39
|
-
const type = pluginManager.getInternetAccountType(configuration.type);
|
|
40
|
-
const internetAccount = type.stateModel.create({
|
|
41
|
-
...initialSnapshot,
|
|
42
|
-
type: configuration.type,
|
|
43
|
-
configuration,
|
|
44
|
-
});
|
|
45
|
-
self.internetAccounts.push(internetAccount);
|
|
46
|
-
return internetAccount;
|
|
47
|
-
},
|
|
48
|
-
findAppropriateInternetAccount(location) {
|
|
49
|
-
const selectedId = location.internetAccountId;
|
|
50
|
-
if (selectedId) {
|
|
51
|
-
const selectedAccount = self.internetAccounts.find(account => {
|
|
52
|
-
return account.internetAccountId === selectedId;
|
|
53
|
-
});
|
|
54
|
-
if (selectedAccount) {
|
|
55
|
-
return selectedAccount;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
for (const account of self.internetAccounts) {
|
|
59
|
-
const handleResult = account.handlesLocation(location);
|
|
60
|
-
if (handleResult) {
|
|
61
|
-
return account;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return selectedId
|
|
65
|
-
? this.createEphemeralInternetAccount(selectedId, {}, location.uri)
|
|
66
|
-
: null;
|
|
67
|
-
},
|
|
68
|
-
}))
|
|
69
|
-
.actions(self => ({
|
|
70
|
-
afterCreate() {
|
|
71
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(() => {
|
|
72
|
-
const { jbrowse } = self;
|
|
73
|
-
for (const internetAccount of jbrowse.internetAccounts) {
|
|
74
|
-
self.initializeInternetAccount(internetAccount);
|
|
75
|
-
}
|
|
76
|
-
}));
|
|
77
|
-
},
|
|
78
|
-
}));
|
|
79
|
-
}
|
package/dist/RootModel/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./BaseRootModel"), exports);
|
|
18
|
-
__exportStar(require("./InternetAccounts"), exports);
|
|
19
|
-
__exportStar(require("./FormatAbout"), exports);
|
|
20
|
-
__exportStar(require("./FormatDetails"), exports);
|
|
21
|
-
__exportStar(require("./HierarchicalConfig"), exports);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { BaseRootModelType } from '../RootModel/BaseRootModel';
|
|
2
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
-
import type { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
|
|
4
|
-
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
5
|
-
import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
|
|
6
|
-
export declare function BaseSessionModel<ROOT_MODEL_TYPE extends BaseRootModelType, JB_CONFIG_SCHEMA extends AnyConfigurationSchemaType>(_pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
7
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
8
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
9
|
-
margin: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
10
|
-
}, {
|
|
11
|
-
selection: unknown;
|
|
12
|
-
hovered: unknown;
|
|
13
|
-
} & {
|
|
14
|
-
readonly root: import("mobx-state-tree").TypeOrStateTreeNodeToStateTreeNode<ROOT_MODEL_TYPE>;
|
|
15
|
-
} & {
|
|
16
|
-
readonly jbrowse: any;
|
|
17
|
-
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
18
|
-
readonly configuration: Instance<JB_CONFIG_SCHEMA>;
|
|
19
|
-
readonly adminMode: boolean;
|
|
20
|
-
readonly textSearchManager: import("@jbrowse/core/util").TextSearchManager;
|
|
21
|
-
} & {
|
|
22
|
-
readonly assemblies: Instance<BaseAssemblyConfigSchema>[];
|
|
23
|
-
} & {
|
|
24
|
-
setSelection(thing: unknown): void;
|
|
25
|
-
clearSelection(): void;
|
|
26
|
-
setHovered(thing: unknown): void;
|
|
27
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
28
|
-
export type BaseSessionType = ReturnType<typeof BaseSessionModel>;
|
|
29
|
-
export type BaseSession = Instance<BaseSessionType>;
|
|
30
|
-
export declare function isBaseSession(thing: IAnyStateTreeNode): thing is BaseSession;
|
|
31
|
-
export declare function isSession(thing: unknown): thing is BaseSession;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseSessionModel = BaseSessionModel;
|
|
4
|
-
exports.isBaseSession = isBaseSession;
|
|
5
|
-
exports.isSession = isSession;
|
|
6
|
-
const mst_1 = require("@jbrowse/core/util/types/mst");
|
|
7
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
|
-
function BaseSessionModel(_pluginManager) {
|
|
9
|
-
return mobx_state_tree_1.types
|
|
10
|
-
.model({
|
|
11
|
-
id: mst_1.ElementId,
|
|
12
|
-
name: mobx_state_tree_1.types.string,
|
|
13
|
-
margin: 0,
|
|
14
|
-
})
|
|
15
|
-
.volatile(() => ({
|
|
16
|
-
selection: undefined,
|
|
17
|
-
hovered: undefined,
|
|
18
|
-
}))
|
|
19
|
-
.views(self => ({
|
|
20
|
-
get root() {
|
|
21
|
-
return (0, mobx_state_tree_1.getParent)(self);
|
|
22
|
-
},
|
|
23
|
-
}))
|
|
24
|
-
.views(self => ({
|
|
25
|
-
get jbrowse() {
|
|
26
|
-
return self.root.jbrowse;
|
|
27
|
-
},
|
|
28
|
-
get rpcManager() {
|
|
29
|
-
return self.root.rpcManager;
|
|
30
|
-
},
|
|
31
|
-
get configuration() {
|
|
32
|
-
return this.jbrowse.configuration;
|
|
33
|
-
},
|
|
34
|
-
get adminMode() {
|
|
35
|
-
return self.root.adminMode;
|
|
36
|
-
},
|
|
37
|
-
get textSearchManager() {
|
|
38
|
-
return self.root.textSearchManager;
|
|
39
|
-
},
|
|
40
|
-
}))
|
|
41
|
-
.views(self => ({
|
|
42
|
-
get assemblies() {
|
|
43
|
-
return self.jbrowse.assemblies;
|
|
44
|
-
},
|
|
45
|
-
}))
|
|
46
|
-
.actions(self => ({
|
|
47
|
-
setSelection(thing) {
|
|
48
|
-
self.selection = thing;
|
|
49
|
-
},
|
|
50
|
-
clearSelection() {
|
|
51
|
-
self.selection = undefined;
|
|
52
|
-
},
|
|
53
|
-
setHovered(thing) {
|
|
54
|
-
self.hovered = thing;
|
|
55
|
-
},
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
function isBaseSession(thing) {
|
|
59
|
-
return 'id' in thing && 'name' in thing && 'root' in thing;
|
|
60
|
-
}
|
|
61
|
-
function isSession(thing) {
|
|
62
|
-
return (0, mobx_state_tree_1.isStateTreeNode)(thing) && isBaseSession(thing);
|
|
63
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { BaseConnectionConfigModel } from '@jbrowse/core/pluggableElementTypes/models/baseConnectionConfig';
|
|
4
|
-
import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
|
|
5
|
-
export declare function ConnectionManagementSessionMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
6
|
-
connectionInstances: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
7
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
8
|
-
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
9
|
-
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
10
|
-
name: {
|
|
11
|
-
type: string;
|
|
12
|
-
defaultValue: string;
|
|
13
|
-
description: string;
|
|
14
|
-
};
|
|
15
|
-
assemblyNames: {
|
|
16
|
-
type: string;
|
|
17
|
-
defaultValue: never[];
|
|
18
|
-
description: string;
|
|
19
|
-
};
|
|
20
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
21
|
-
}, {
|
|
22
|
-
connect(_arg: AnyConfigurationModel): void;
|
|
23
|
-
} & {
|
|
24
|
-
afterAttach(): void;
|
|
25
|
-
addTrackConf(trackConf: ({
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
28
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
29
|
-
[x: string]: any;
|
|
30
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
31
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
32
|
-
[x: string]: any;
|
|
33
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
34
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
35
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
|
|
36
|
-
addTrackConfs(trackConfs: (({
|
|
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 & {
|
|
42
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
43
|
-
[x: string]: any;
|
|
44
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
45
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
46
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
|
|
47
|
-
setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
|
|
48
|
-
clear(): void;
|
|
49
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
50
|
-
}, {
|
|
51
|
-
readonly connections: BaseConnectionConfigModel[];
|
|
52
|
-
} & {
|
|
53
|
-
makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}): ({
|
|
54
|
-
name: string;
|
|
55
|
-
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>>;
|
|
56
|
-
configuration: {
|
|
57
|
-
[x: string]: any;
|
|
58
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
59
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
60
|
-
[x: string]: any;
|
|
61
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
62
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
63
|
-
[x: string]: any;
|
|
64
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
65
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
66
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
67
|
-
name: {
|
|
68
|
-
type: string;
|
|
69
|
-
defaultValue: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
assemblyNames: {
|
|
73
|
-
type: string;
|
|
74
|
-
defaultValue: never[];
|
|
75
|
-
description: string;
|
|
76
|
-
};
|
|
77
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>;
|
|
78
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
79
|
-
connect(_arg: AnyConfigurationModel): void;
|
|
80
|
-
} & {
|
|
81
|
-
afterAttach(): void;
|
|
82
|
-
addTrackConf(trackConf: ({
|
|
83
|
-
[x: string]: any;
|
|
84
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
85
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
86
|
-
[x: string]: any;
|
|
87
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
88
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
89
|
-
[x: string]: any;
|
|
90
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
91
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
92
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
|
|
93
|
-
addTrackConfs(trackConfs: (({
|
|
94
|
-
[x: string]: any;
|
|
95
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
96
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
97
|
-
[x: string]: any;
|
|
98
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
99
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
100
|
-
[x: string]: any;
|
|
101
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
102
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
103
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
|
|
104
|
-
setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
|
|
105
|
-
clear(): void;
|
|
106
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
107
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
108
|
-
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
109
|
-
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
110
|
-
name: {
|
|
111
|
-
type: string;
|
|
112
|
-
defaultValue: string;
|
|
113
|
-
description: string;
|
|
114
|
-
};
|
|
115
|
-
assemblyNames: {
|
|
116
|
-
type: string;
|
|
117
|
-
defaultValue: never[];
|
|
118
|
-
description: string;
|
|
119
|
-
};
|
|
120
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
121
|
-
}, {
|
|
122
|
-
connect(_arg: AnyConfigurationModel): void;
|
|
123
|
-
} & {
|
|
124
|
-
afterAttach(): void;
|
|
125
|
-
addTrackConf(trackConf: ({
|
|
126
|
-
[x: string]: any;
|
|
127
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
128
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
129
|
-
[x: string]: any;
|
|
130
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
131
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
132
|
-
[x: string]: any;
|
|
133
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
134
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
135
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
|
|
136
|
-
addTrackConfs(trackConfs: (({
|
|
137
|
-
[x: string]: any;
|
|
138
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
139
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
140
|
-
[x: string]: any;
|
|
141
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
142
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
143
|
-
[x: string]: any;
|
|
144
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
145
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
146
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
|
|
147
|
-
setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
|
|
148
|
-
clear(): void;
|
|
149
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
150
|
-
prepareToBreakConnection(configuration: AnyConfigurationModel): (Record<string, number> | (() => void))[] | undefined;
|
|
151
|
-
breakConnection(configuration: AnyConfigurationModel): void;
|
|
152
|
-
deleteConnection(configuration: AnyConfigurationModel): any;
|
|
153
|
-
addConnectionConf(connectionConf: AnyConfigurationModel): any;
|
|
154
|
-
clearConnections(): void;
|
|
155
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
156
|
-
export type SessionWithConnectionsType = ReturnType<typeof ConnectionManagementSessionMixin>;
|
|
157
|
-
export type SessionWithConnections = Instance<SessionWithConnectionsType>;
|
|
158
|
-
export declare function isSessionWithConnections(session: IAnyStateTreeNode): session is SessionWithConnections;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConnectionManagementSessionMixin = ConnectionManagementSessionMixin;
|
|
4
|
-
exports.isSessionWithConnections = isSessionWithConnections;
|
|
5
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
7
|
-
const BaseSession_1 = require("./BaseSession");
|
|
8
|
-
function ConnectionManagementSessionMixin(pluginManager) {
|
|
9
|
-
return mobx_state_tree_1.types
|
|
10
|
-
.model({
|
|
11
|
-
connectionInstances: mobx_state_tree_1.types.array(pluginManager.pluggableMstType('connection', 'stateModel')),
|
|
12
|
-
})
|
|
13
|
-
.views(self => ({
|
|
14
|
-
get connections() {
|
|
15
|
-
const { jbrowse } = self;
|
|
16
|
-
return jbrowse.connections;
|
|
17
|
-
},
|
|
18
|
-
}))
|
|
19
|
-
.actions(self => ({
|
|
20
|
-
makeConnection(configuration, initialSnapshot = {}) {
|
|
21
|
-
const type = configuration.type;
|
|
22
|
-
if (!type) {
|
|
23
|
-
throw new Error('track configuration has no `type` listed');
|
|
24
|
-
}
|
|
25
|
-
const name = (0, configuration_1.readConfObject)(configuration, 'name');
|
|
26
|
-
const connectionType = pluginManager.getConnectionType(type);
|
|
27
|
-
if (!connectionType) {
|
|
28
|
-
throw new Error(`unknown connection type ${type}`);
|
|
29
|
-
}
|
|
30
|
-
const length = self.connectionInstances.push({
|
|
31
|
-
...initialSnapshot,
|
|
32
|
-
name,
|
|
33
|
-
type,
|
|
34
|
-
configuration,
|
|
35
|
-
});
|
|
36
|
-
return self.connectionInstances[length - 1];
|
|
37
|
-
},
|
|
38
|
-
prepareToBreakConnection(configuration) {
|
|
39
|
-
const root = self;
|
|
40
|
-
const callbacksToDeref = [];
|
|
41
|
-
const derefTypeCount = {};
|
|
42
|
-
const name = (0, configuration_1.readConfObject)(configuration, 'name');
|
|
43
|
-
const connection = self.connectionInstances.find(c => c.name === name);
|
|
44
|
-
if (!connection) {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
for (const track of connection.tracks) {
|
|
48
|
-
const ref = root.getReferring(track);
|
|
49
|
-
root.removeReferring(ref, track, callbacksToDeref, derefTypeCount);
|
|
50
|
-
}
|
|
51
|
-
return [
|
|
52
|
-
() => {
|
|
53
|
-
for (const cb of callbacksToDeref) {
|
|
54
|
-
cb();
|
|
55
|
-
}
|
|
56
|
-
this.breakConnection(configuration);
|
|
57
|
-
},
|
|
58
|
-
derefTypeCount,
|
|
59
|
-
];
|
|
60
|
-
},
|
|
61
|
-
breakConnection(configuration) {
|
|
62
|
-
const name = (0, configuration_1.readConfObject)(configuration, 'name');
|
|
63
|
-
const connection = self.connectionInstances.find(c => c.name === name);
|
|
64
|
-
if (!connection) {
|
|
65
|
-
throw new Error(`no connection found with name ${name}`);
|
|
66
|
-
}
|
|
67
|
-
self.connectionInstances.remove(connection);
|
|
68
|
-
},
|
|
69
|
-
deleteConnection(configuration) {
|
|
70
|
-
const { jbrowse } = self;
|
|
71
|
-
return jbrowse.deleteConnectionConf(configuration);
|
|
72
|
-
},
|
|
73
|
-
addConnectionConf(connectionConf) {
|
|
74
|
-
const { jbrowse } = self;
|
|
75
|
-
return jbrowse.addConnectionConf(connectionConf);
|
|
76
|
-
},
|
|
77
|
-
clearConnections() {
|
|
78
|
-
self.connectionInstances.clear();
|
|
79
|
-
},
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
function isSessionWithConnections(session) {
|
|
83
|
-
return (0, BaseSession_1.isBaseSession)(session) && 'connectionInstances' in session;
|
|
84
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import type { DialogComponentType } from '@jbrowse/core/util';
|
|
3
|
-
import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
|
|
4
|
-
export declare function DialogQueueSessionMixin(_pluginManager: PluginManager): import("mobx-state-tree").IModelType<{}, {
|
|
5
|
-
queueOfDialogs: [DialogComponentType, unknown][];
|
|
6
|
-
} & {
|
|
7
|
-
readonly DialogComponent: DialogComponentType | undefined;
|
|
8
|
-
readonly DialogProps: unknown;
|
|
9
|
-
} & {
|
|
10
|
-
removeActiveDialog(): void;
|
|
11
|
-
queueDialog(cb: (doneCallback: () => void) => [DialogComponentType, unknown]): void;
|
|
12
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
13
|
-
export type SessionWithDialogsType = ReturnType<typeof DialogQueueSessionMixin>;
|
|
14
|
-
export type SessionWithDialogs = Instance<SessionWithDialogsType>;
|
|
15
|
-
export declare function isSessionWithDialogs(session: IAnyStateTreeNode): session is SessionWithDialogs;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DialogQueueSessionMixin = DialogQueueSessionMixin;
|
|
4
|
-
exports.isSessionWithDialogs = isSessionWithDialogs;
|
|
5
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
|
-
const BaseSession_1 = require("./BaseSession");
|
|
7
|
-
function DialogQueueSessionMixin(_pluginManager) {
|
|
8
|
-
return mobx_state_tree_1.types
|
|
9
|
-
.model('DialogQueueSessionMixin', {})
|
|
10
|
-
.volatile(() => ({
|
|
11
|
-
queueOfDialogs: [],
|
|
12
|
-
}))
|
|
13
|
-
.views(self => ({
|
|
14
|
-
get DialogComponent() {
|
|
15
|
-
var _a;
|
|
16
|
-
return (_a = self.queueOfDialogs[0]) === null || _a === void 0 ? void 0 : _a[0];
|
|
17
|
-
},
|
|
18
|
-
get DialogProps() {
|
|
19
|
-
var _a;
|
|
20
|
-
return (_a = self.queueOfDialogs[0]) === null || _a === void 0 ? void 0 : _a[1];
|
|
21
|
-
},
|
|
22
|
-
}))
|
|
23
|
-
.actions(self => ({
|
|
24
|
-
removeActiveDialog() {
|
|
25
|
-
self.queueOfDialogs = self.queueOfDialogs.slice(1);
|
|
26
|
-
},
|
|
27
|
-
queueDialog(cb) {
|
|
28
|
-
const [component, props] = cb(() => {
|
|
29
|
-
this.removeActiveDialog();
|
|
30
|
-
});
|
|
31
|
-
self.queueOfDialogs = [...self.queueOfDialogs, [component, props]];
|
|
32
|
-
},
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
function isSessionWithDialogs(session) {
|
|
36
|
-
return (0, BaseSession_1.isBaseSession)(session) && 'queueOfDialogs' in session;
|
|
37
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
|
|
4
|
-
export declare function DrawerWidgetSessionMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
5
|
-
drawerPosition: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
-
drawerWidth: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
7
|
-
widgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyType>;
|
|
8
|
-
activeWidgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>>;
|
|
9
|
-
minimized: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
10
|
-
}, {
|
|
11
|
-
readonly visibleWidget: any;
|
|
12
|
-
} & {
|
|
13
|
-
setDrawerPosition(arg: string): void;
|
|
14
|
-
updateDrawerWidth(drawerWidth: number): number;
|
|
15
|
-
resizeDrawer(distance: number): number;
|
|
16
|
-
addWidget(typeName: string, id: string, initialState?: {}, conf?: unknown): any;
|
|
17
|
-
showWidget(widget: any): void;
|
|
18
|
-
hasWidget(widget: any): boolean;
|
|
19
|
-
hideWidget(widget: any): void;
|
|
20
|
-
minimizeWidgetDrawer(): void;
|
|
21
|
-
showWidgetDrawer(): void;
|
|
22
|
-
hideAllWidgets(): void;
|
|
23
|
-
editConfiguration(configuration: AnyConfigurationModel): void;
|
|
24
|
-
afterAttach(): void;
|
|
25
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
26
|
-
export type SessionWithDrawerWidgetsType = ReturnType<typeof DrawerWidgetSessionMixin>;
|
|
27
|
-
export type SessionWithDrawerWidgets = Instance<SessionWithDrawerWidgetsType>;
|
|
28
|
-
export declare function isSessionWithDrawerWidgets(session: IAnyStateTreeNode): session is SessionWithDrawerWidgets;
|