@jbrowse/product-core 2.17.0 → 3.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/dist/RootModel/BaseRootModel.d.ts +6 -43
- package/dist/RootModel/BaseRootModel.js +5 -41
- package/dist/RootModel/FormatAbout.d.ts +0 -10
- package/dist/RootModel/FormatAbout.js +0 -10
- package/dist/RootModel/FormatDetails.d.ts +0 -17
- package/dist/RootModel/FormatDetails.js +0 -17
- package/dist/RootModel/HierarchicalConfig.d.ts +0 -19
- package/dist/RootModel/HierarchicalConfig.js +0 -19
- package/dist/RootModel/InternetAccounts.d.ts +4 -20
- package/dist/RootModel/InternetAccounts.js +0 -20
- package/dist/Session/BaseSession.d.ts +5 -96
- package/dist/Session/BaseSession.js +1 -63
- package/dist/Session/Connections.d.ts +5 -56
- package/dist/Session/Connections.js +0 -30
- package/dist/Session/DialogQueue.d.ts +3 -22
- package/dist/Session/DialogQueue.js +0 -17
- package/dist/Session/DrawerWidgets.d.ts +3 -63
- package/dist/Session/DrawerWidgets.js +2 -61
- package/dist/Session/MultipleViews.d.ts +8 -1760
- package/dist/Session/MultipleViews.js +2 -40
- package/dist/Session/ReferenceManagement.d.ts +2 -21
- package/dist/Session/ReferenceManagement.js +0 -23
- package/dist/Session/SessionTracks.d.ts +7 -1748
- package/dist/Session/SessionTracks.js +1 -21
- package/dist/Session/Themes.d.ts +3 -21
- package/dist/Session/Themes.js +1 -17
- package/dist/Session/Tracks.d.ts +6 -1737
- package/dist/Session/Tracks.js +0 -16
- package/dist/rpcWorker.d.ts +2 -2
- package/dist/rpcWorker.js +3 -17
- package/dist/ui/AboutDialog.d.ts +2 -3
- package/dist/ui/AboutDialog.js +2 -3
- package/dist/ui/AboutDialogContents.d.ts +2 -3
- package/dist/ui/AboutDialogContents.js +20 -53
- package/dist/ui/FileInfoPanel.d.ts +2 -3
- package/dist/ui/FileInfoPanel.js +5 -28
- package/dist/ui/RefNameInfoDialog.d.ts +2 -3
- package/dist/ui/RefNameInfoDialog.js +17 -44
- package/esm/RootModel/BaseRootModel.d.ts +6 -43
- package/esm/RootModel/BaseRootModel.js +6 -42
- package/esm/RootModel/FormatAbout.d.ts +0 -10
- package/esm/RootModel/FormatAbout.js +0 -10
- package/esm/RootModel/FormatDetails.d.ts +0 -17
- package/esm/RootModel/FormatDetails.js +0 -17
- package/esm/RootModel/HierarchicalConfig.d.ts +0 -19
- package/esm/RootModel/HierarchicalConfig.js +0 -19
- package/esm/RootModel/InternetAccounts.d.ts +4 -20
- package/esm/RootModel/InternetAccounts.js +0 -20
- package/esm/Session/BaseSession.d.ts +5 -96
- package/esm/Session/BaseSession.js +1 -63
- package/esm/Session/Connections.d.ts +5 -56
- package/esm/Session/Connections.js +1 -31
- package/esm/Session/DialogQueue.d.ts +3 -22
- package/esm/Session/DialogQueue.js +0 -17
- package/esm/Session/DrawerWidgets.d.ts +3 -63
- package/esm/Session/DrawerWidgets.js +2 -61
- package/esm/Session/MultipleViews.d.ts +8 -1760
- package/esm/Session/MultipleViews.js +2 -40
- package/esm/Session/ReferenceManagement.d.ts +2 -21
- package/esm/Session/ReferenceManagement.js +0 -23
- package/esm/Session/SessionTracks.d.ts +7 -1748
- package/esm/Session/SessionTracks.js +1 -21
- package/esm/Session/Themes.d.ts +3 -21
- package/esm/Session/Themes.js +1 -17
- package/esm/Session/Tracks.d.ts +6 -1737
- package/esm/Session/Tracks.js +0 -16
- package/esm/rpcWorker.d.ts +2 -2
- package/esm/rpcWorker.js +3 -17
- package/esm/ui/AboutDialog.d.ts +2 -3
- package/esm/ui/AboutDialog.js +3 -4
- package/esm/ui/AboutDialogContents.d.ts +2 -3
- package/esm/ui/AboutDialogContents.js +20 -30
- package/esm/ui/FileInfoPanel.d.ts +2 -3
- package/esm/ui/FileInfoPanel.js +5 -5
- package/esm/ui/RefNameInfoDialog.d.ts +2 -3
- package/esm/ui/RefNameInfoDialog.js +18 -22
- package/package.json +3 -3
|
@@ -1,38 +1,17 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
|
|
3
|
-
import RpcManager from '@jbrowse/core/rpc/RpcManager';
|
|
4
|
-
import { IAnyType, Instance, SnapshotIn } from 'mobx-state-tree';
|
|
5
1
|
import TextSearchManager from '@jbrowse/core/TextSearch/TextSearchManager';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
2
|
+
import RpcManager from '@jbrowse/core/rpc/RpcManager';
|
|
3
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
4
|
+
import type { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
|
|
5
|
+
import type { IAnyType, Instance, SnapshotIn } from 'mobx-state-tree';
|
|
11
6
|
export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionModelType, assemblyConfigSchema, }: {
|
|
12
7
|
pluginManager: PluginManager;
|
|
13
8
|
jbrowseModelType: IAnyType;
|
|
14
9
|
sessionModelType: IAnyType;
|
|
15
10
|
assemblyConfigSchema: BaseAssemblyConfigSchema;
|
|
16
11
|
}): import("mobx-state-tree").IModelType<{
|
|
17
|
-
/**
|
|
18
|
-
* #property
|
|
19
|
-
* `jbrowse` is a mapping of the config.json into the in-memory state
|
|
20
|
-
* tree
|
|
21
|
-
*/
|
|
22
12
|
jbrowse: IAnyType;
|
|
23
|
-
/**
|
|
24
|
-
* #property
|
|
25
|
-
* `session` encompasses the currently active state of the app, including
|
|
26
|
-
* views open, tracks open in those views, etc.
|
|
27
|
-
*/
|
|
28
13
|
session: import("mobx-state-tree").IMaybe<IAnyType>;
|
|
29
|
-
/**
|
|
30
|
-
* #property
|
|
31
|
-
*/
|
|
32
14
|
sessionPath: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
33
|
-
/**
|
|
34
|
-
* #property
|
|
35
|
-
*/
|
|
36
15
|
assemblyManager: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
37
16
|
assemblies: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
38
17
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
@@ -537,7 +516,7 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
|
|
|
537
516
|
getRefNameMapForAdapter(adapterConf: {
|
|
538
517
|
[x: string]: unknown;
|
|
539
518
|
}, assemblyName: string | undefined, opts: {
|
|
540
|
-
|
|
519
|
+
stopToken?: string;
|
|
541
520
|
sessionId: string;
|
|
542
521
|
}): Promise<{
|
|
543
522
|
[x: string]: string;
|
|
@@ -545,7 +524,7 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
|
|
|
545
524
|
getReverseRefNameMapForAdapter(adapterConf: {
|
|
546
525
|
[x: string]: unknown;
|
|
547
526
|
}, assemblyName: string | undefined, opts: {
|
|
548
|
-
|
|
527
|
+
stopToken?: string;
|
|
549
528
|
sessionId: string;
|
|
550
529
|
}): Promise<{
|
|
551
530
|
[x: string]: string;
|
|
@@ -563,28 +542,12 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
|
|
|
563
542
|
textSearchManager: TextSearchManager;
|
|
564
543
|
pluginManager: PluginManager;
|
|
565
544
|
} & {
|
|
566
|
-
/**
|
|
567
|
-
* #action
|
|
568
|
-
*/
|
|
569
545
|
setError(error: unknown): void;
|
|
570
|
-
/**
|
|
571
|
-
* #action
|
|
572
|
-
*/
|
|
573
546
|
setSession(sessionSnapshot?: SnapshotIn<IAnyType>): void;
|
|
574
|
-
/**
|
|
575
|
-
* #action
|
|
576
|
-
*/
|
|
577
547
|
setDefaultSession(): void;
|
|
578
|
-
/**
|
|
579
|
-
* #action
|
|
580
|
-
*/
|
|
581
548
|
setSessionPath(path: string): void;
|
|
582
|
-
/**
|
|
583
|
-
* #action
|
|
584
|
-
*/
|
|
585
549
|
renameCurrentSession(newName: string): void;
|
|
586
550
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
587
551
|
export type BaseRootModelType = ReturnType<typeof BaseRootModelFactory>;
|
|
588
552
|
export type BaseRootModel = Instance<BaseRootModelType>;
|
|
589
|
-
/** Type guard for checking if something is a JB root model */
|
|
590
553
|
export declare function isRootModel(thing: unknown): thing is BaseRootModelType;
|
|
@@ -5,37 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BaseRootModelFactory = BaseRootModelFactory;
|
|
7
7
|
exports.isRootModel = isRootModel;
|
|
8
|
+
const TextSearchManager_1 = __importDefault(require("@jbrowse/core/TextSearch/TextSearchManager"));
|
|
8
9
|
const assemblyManager_1 = __importDefault(require("@jbrowse/core/assemblyManager"));
|
|
9
10
|
const RpcManager_1 = __importDefault(require("@jbrowse/core/rpc/RpcManager"));
|
|
10
11
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
11
|
-
const TextSearchManager_1 = __importDefault(require("@jbrowse/core/TextSearch/TextSearchManager"));
|
|
12
|
-
/**
|
|
13
|
-
* #stateModel BaseRootModel
|
|
14
|
-
* #category root
|
|
15
|
-
* factory function for the Base-level root model shared by all products
|
|
16
|
-
*/
|
|
17
12
|
function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionModelType, assemblyConfigSchema, }) {
|
|
18
13
|
return mobx_state_tree_1.types
|
|
19
14
|
.model('BaseRootModel', {
|
|
20
|
-
/**
|
|
21
|
-
* #property
|
|
22
|
-
* `jbrowse` is a mapping of the config.json into the in-memory state
|
|
23
|
-
* tree
|
|
24
|
-
*/
|
|
25
15
|
jbrowse: jbrowseModelType,
|
|
26
|
-
/**
|
|
27
|
-
* #property
|
|
28
|
-
* `session` encompasses the currently active state of the app, including
|
|
29
|
-
* views open, tracks open in those views, etc.
|
|
30
|
-
*/
|
|
31
16
|
session: mobx_state_tree_1.types.maybe(sessionModelType),
|
|
32
|
-
/**
|
|
33
|
-
* #property
|
|
34
|
-
*/
|
|
35
17
|
sessionPath: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.string, ''),
|
|
36
|
-
/**
|
|
37
|
-
* #property
|
|
38
|
-
*/
|
|
39
18
|
assemblyManager: mobx_state_tree_1.types.optional((0, assemblyManager_1.default)(assemblyConfigSchema, pluginManager), {}),
|
|
40
19
|
})
|
|
41
20
|
.volatile(self => ({
|
|
@@ -48,43 +27,28 @@ function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionModelTyp
|
|
|
48
27
|
pluginManager,
|
|
49
28
|
}))
|
|
50
29
|
.actions(self => ({
|
|
51
|
-
/**
|
|
52
|
-
* #action
|
|
53
|
-
*/
|
|
54
30
|
setError(error) {
|
|
55
31
|
self.error = error;
|
|
56
32
|
},
|
|
57
|
-
/**
|
|
58
|
-
* #action
|
|
59
|
-
*/
|
|
60
33
|
setSession(sessionSnapshot) {
|
|
61
34
|
self.session = (0, mobx_state_tree_1.cast)(sessionSnapshot);
|
|
62
35
|
},
|
|
63
|
-
/**
|
|
64
|
-
* #action
|
|
65
|
-
*/
|
|
66
36
|
setDefaultSession() {
|
|
67
37
|
this.setSession(self.jbrowse.defaultSession);
|
|
68
38
|
},
|
|
69
|
-
/**
|
|
70
|
-
* #action
|
|
71
|
-
*/
|
|
72
39
|
setSessionPath(path) {
|
|
73
40
|
self.sessionPath = path;
|
|
74
41
|
},
|
|
75
|
-
/**
|
|
76
|
-
* #action
|
|
77
|
-
*/
|
|
78
42
|
renameCurrentSession(newName) {
|
|
79
43
|
if (self.session) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
44
|
+
this.setSession({
|
|
45
|
+
...(0, mobx_state_tree_1.getSnapshot)(self.session),
|
|
46
|
+
name: newName,
|
|
47
|
+
});
|
|
83
48
|
}
|
|
84
49
|
},
|
|
85
50
|
}));
|
|
86
51
|
}
|
|
87
|
-
/** Type guard for checking if something is a JB root model */
|
|
88
52
|
function isRootModel(thing) {
|
|
89
53
|
return ((0, mobx_state_tree_1.isStateTreeNode)(thing) &&
|
|
90
54
|
'session' in thing &&
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* #config FormatAbout
|
|
3
|
-
* generally exists on the config.json or root config as configuration.formatAbout
|
|
4
|
-
*/
|
|
5
1
|
export declare function FormatAboutConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
-
/**
|
|
7
|
-
* #slot configuration.formatAbout.config
|
|
8
|
-
*/
|
|
9
2
|
config: {
|
|
10
3
|
type: string;
|
|
11
4
|
description: string;
|
|
12
5
|
defaultValue: {};
|
|
13
6
|
contextVariable: string[];
|
|
14
7
|
};
|
|
15
|
-
/**
|
|
16
|
-
* #slot configuration.formatAbout.hideUris
|
|
17
|
-
*/
|
|
18
8
|
hideUris: {
|
|
19
9
|
type: string;
|
|
20
10
|
defaultValue: boolean;
|
|
@@ -2,24 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FormatAboutConfigSchemaFactory = FormatAboutConfigSchemaFactory;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
/**
|
|
6
|
-
* #config FormatAbout
|
|
7
|
-
* generally exists on the config.json or root config as configuration.formatAbout
|
|
8
|
-
*/
|
|
9
5
|
function FormatAboutConfigSchemaFactory() {
|
|
10
6
|
return (0, configuration_1.ConfigurationSchema)('FormatAbout', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot configuration.formatAbout.config
|
|
13
|
-
*/
|
|
14
7
|
config: {
|
|
15
8
|
type: 'frozen',
|
|
16
9
|
description: 'formats configuration object in about dialog',
|
|
17
10
|
defaultValue: {},
|
|
18
11
|
contextVariable: ['config'],
|
|
19
12
|
},
|
|
20
|
-
/**
|
|
21
|
-
* #slot configuration.formatAbout.hideUris
|
|
22
|
-
*/
|
|
23
13
|
hideUris: {
|
|
24
14
|
type: 'boolean',
|
|
25
15
|
defaultValue: false,
|
|
@@ -1,38 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* #config FormatDetails
|
|
3
|
-
* generally exists on the tracks in the config.json or as a 'session' config as
|
|
4
|
-
* configuration.formatDetails
|
|
5
|
-
*/
|
|
6
1
|
export declare function FormatDetailsConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
7
|
-
/**
|
|
8
|
-
* #slot configuration.formatDetails.feature
|
|
9
|
-
*/
|
|
10
2
|
feature: {
|
|
11
3
|
type: string;
|
|
12
4
|
description: string;
|
|
13
5
|
defaultValue: {};
|
|
14
6
|
contextVariable: string[];
|
|
15
7
|
};
|
|
16
|
-
/**
|
|
17
|
-
* #slot configuration.formatDetails.subfeatures
|
|
18
|
-
*/
|
|
19
8
|
subfeatures: {
|
|
20
9
|
type: string;
|
|
21
10
|
description: string;
|
|
22
11
|
defaultValue: {};
|
|
23
12
|
contextVariable: string[];
|
|
24
13
|
};
|
|
25
|
-
/**
|
|
26
|
-
* #slot configuration.formatDetails.depth
|
|
27
|
-
*/
|
|
28
14
|
depth: {
|
|
29
15
|
type: string;
|
|
30
16
|
defaultValue: number;
|
|
31
17
|
description: string;
|
|
32
18
|
};
|
|
33
|
-
/**
|
|
34
|
-
* #slot configuration.formatDetails.maxDepth
|
|
35
|
-
*/
|
|
36
19
|
maxDepth: {
|
|
37
20
|
type: string;
|
|
38
21
|
defaultValue: number;
|
|
@@ -2,42 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FormatDetailsConfigSchemaFactory = FormatDetailsConfigSchemaFactory;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
/**
|
|
6
|
-
* #config FormatDetails
|
|
7
|
-
* generally exists on the tracks in the config.json or as a 'session' config as
|
|
8
|
-
* configuration.formatDetails
|
|
9
|
-
*/
|
|
10
5
|
function FormatDetailsConfigSchemaFactory() {
|
|
11
6
|
return (0, configuration_1.ConfigurationSchema)('FormatDetails', {
|
|
12
|
-
/**
|
|
13
|
-
* #slot configuration.formatDetails.feature
|
|
14
|
-
*/
|
|
15
7
|
feature: {
|
|
16
8
|
type: 'frozen',
|
|
17
9
|
description: 'adds extra fields to the feature details',
|
|
18
10
|
defaultValue: {},
|
|
19
11
|
contextVariable: ['feature'],
|
|
20
12
|
},
|
|
21
|
-
/**
|
|
22
|
-
* #slot configuration.formatDetails.subfeatures
|
|
23
|
-
*/
|
|
24
13
|
subfeatures: {
|
|
25
14
|
type: 'frozen',
|
|
26
15
|
description: 'adds extra fields to the subfeatures of a feature',
|
|
27
16
|
defaultValue: {},
|
|
28
17
|
contextVariable: ['feature'],
|
|
29
18
|
},
|
|
30
|
-
/**
|
|
31
|
-
* #slot configuration.formatDetails.depth
|
|
32
|
-
*/
|
|
33
19
|
depth: {
|
|
34
20
|
type: 'number',
|
|
35
21
|
defaultValue: 2,
|
|
36
22
|
description: 'depth to iterate the formatDetails->subfeatures callback on subfeatures (used for example to only apply the callback to the first layer of subfeatures)',
|
|
37
23
|
},
|
|
38
|
-
/**
|
|
39
|
-
* #slot configuration.formatDetails.maxDepth
|
|
40
|
-
*/
|
|
41
24
|
maxDepth: {
|
|
42
25
|
type: 'number',
|
|
43
26
|
defaultValue: 10000,
|
|
@@ -1,42 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* #config HierarchicalConfigSchema
|
|
3
|
-
* generally exists on the config.json or root config as configuration.hierarchical
|
|
4
|
-
*/
|
|
5
1
|
export declare function HierarchicalConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
2
|
sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
7
|
-
/**
|
|
8
|
-
* #slot configuration.hierarchical.sort.trackNames
|
|
9
|
-
*/
|
|
10
3
|
trackNames: {
|
|
11
4
|
type: string;
|
|
12
5
|
defaultValue: boolean;
|
|
13
6
|
};
|
|
14
|
-
/**
|
|
15
|
-
* #slot configuration.hierarchical.sort.categories
|
|
16
|
-
*/
|
|
17
7
|
categories: {
|
|
18
8
|
type: string;
|
|
19
9
|
defaultValue: boolean;
|
|
20
10
|
};
|
|
21
11
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
22
12
|
defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
23
|
-
/**
|
|
24
|
-
* #slot configuration.hierarchical.defaultCollapsed.categoryNames
|
|
25
|
-
*/
|
|
26
13
|
categoryNames: {
|
|
27
14
|
type: string;
|
|
28
15
|
defaultValue: never[];
|
|
29
16
|
};
|
|
30
|
-
/**
|
|
31
|
-
* #slot configuration.hierarchical.defaultCollapsed.topLevelCategories
|
|
32
|
-
*/
|
|
33
17
|
topLevelCategories: {
|
|
34
18
|
type: string;
|
|
35
19
|
defaultValue: boolean;
|
|
36
20
|
};
|
|
37
|
-
/**
|
|
38
|
-
* #slot configuration.hierarchical.defaultCollapsed.subCategories
|
|
39
|
-
*/
|
|
40
21
|
subCategories: {
|
|
41
22
|
type: string;
|
|
42
23
|
defaultValue: boolean;
|
|
@@ -2,46 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HierarchicalConfigSchemaFactory = HierarchicalConfigSchemaFactory;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
/**
|
|
6
|
-
* #config HierarchicalConfigSchema
|
|
7
|
-
* generally exists on the config.json or root config as configuration.hierarchical
|
|
8
|
-
*/
|
|
9
5
|
function HierarchicalConfigSchemaFactory() {
|
|
10
6
|
return (0, configuration_1.ConfigurationSchema)('hierarchical', {
|
|
11
7
|
sort: (0, configuration_1.ConfigurationSchema)('hierarchicalSort', {
|
|
12
|
-
/**
|
|
13
|
-
* #slot configuration.hierarchical.sort.trackNames
|
|
14
|
-
*/
|
|
15
8
|
trackNames: {
|
|
16
9
|
type: 'boolean',
|
|
17
10
|
defaultValue: false,
|
|
18
11
|
},
|
|
19
|
-
/**
|
|
20
|
-
* #slot configuration.hierarchical.sort.categories
|
|
21
|
-
*/
|
|
22
12
|
categories: {
|
|
23
13
|
type: 'boolean',
|
|
24
14
|
defaultValue: false,
|
|
25
15
|
},
|
|
26
16
|
}),
|
|
27
17
|
defaultCollapsed: (0, configuration_1.ConfigurationSchema)('defaultCollapsed', {
|
|
28
|
-
/**
|
|
29
|
-
* #slot configuration.hierarchical.defaultCollapsed.categoryNames
|
|
30
|
-
*/
|
|
31
18
|
categoryNames: {
|
|
32
19
|
type: 'stringArray',
|
|
33
20
|
defaultValue: [],
|
|
34
21
|
},
|
|
35
|
-
/**
|
|
36
|
-
* #slot configuration.hierarchical.defaultCollapsed.topLevelCategories
|
|
37
|
-
*/
|
|
38
22
|
topLevelCategories: {
|
|
39
23
|
type: 'boolean',
|
|
40
24
|
defaultValue: false,
|
|
41
25
|
},
|
|
42
|
-
/**
|
|
43
|
-
* #slot configuration.hierarchical.defaultCollapsed.subCategories
|
|
44
|
-
*/
|
|
45
26
|
subCategories: {
|
|
46
27
|
type: 'boolean',
|
|
47
28
|
defaultValue: false,
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
-
import { UriLocation } from '@jbrowse/core/util';
|
|
4
|
-
import { Instance } from 'mobx-state-tree';
|
|
5
|
-
/**
|
|
6
|
-
* #stateModel InternetAccountsMixin
|
|
7
|
-
* #category root
|
|
8
|
-
*/
|
|
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';
|
|
9
5
|
export declare function InternetAccountsRootModelMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
10
|
-
/**
|
|
11
|
-
* #property
|
|
12
|
-
*/
|
|
13
6
|
internetAccounts: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
14
7
|
}, {
|
|
15
|
-
/**
|
|
16
|
-
* #action
|
|
17
|
-
*/
|
|
18
8
|
initializeInternetAccount(internetAccountConfig: AnyConfigurationModel, initialSnapshot?: {}): any;
|
|
19
|
-
/**
|
|
20
|
-
* #action
|
|
21
|
-
*/
|
|
22
9
|
createEphemeralInternetAccount(internetAccountId: string, initialSnapshot: Record<string, unknown>, url: string): any;
|
|
23
|
-
/**
|
|
24
|
-
* #action
|
|
25
|
-
*/
|
|
26
10
|
findAppropriateInternetAccount(location: UriLocation): any;
|
|
27
11
|
} & {
|
|
28
12
|
afterCreate(): void;
|
|
@@ -3,22 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InternetAccountsRootModelMixin = InternetAccountsRootModelMixin;
|
|
4
4
|
const mobx_1 = require("mobx");
|
|
5
5
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
|
-
/**
|
|
7
|
-
* #stateModel InternetAccountsMixin
|
|
8
|
-
* #category root
|
|
9
|
-
*/
|
|
10
6
|
function InternetAccountsRootModelMixin(pluginManager) {
|
|
11
7
|
return mobx_state_tree_1.types
|
|
12
8
|
.model({
|
|
13
|
-
/**
|
|
14
|
-
* #property
|
|
15
|
-
*/
|
|
16
9
|
internetAccounts: mobx_state_tree_1.types.array(pluginManager.pluggableMstType('internet account', 'stateModel')),
|
|
17
10
|
})
|
|
18
11
|
.actions(self => ({
|
|
19
|
-
/**
|
|
20
|
-
* #action
|
|
21
|
-
*/
|
|
22
12
|
initializeInternetAccount(internetAccountConfig, initialSnapshot = {}) {
|
|
23
13
|
const internetAccountType = pluginManager.getInternetAccountType(internetAccountConfig.type);
|
|
24
14
|
if (!internetAccountType) {
|
|
@@ -31,16 +21,12 @@ function InternetAccountsRootModelMixin(pluginManager) {
|
|
|
31
21
|
});
|
|
32
22
|
return self.internetAccounts[length - 1];
|
|
33
23
|
},
|
|
34
|
-
/**
|
|
35
|
-
* #action
|
|
36
|
-
*/
|
|
37
24
|
createEphemeralInternetAccount(internetAccountId, initialSnapshot, url) {
|
|
38
25
|
let hostUri;
|
|
39
26
|
try {
|
|
40
27
|
hostUri = new URL(url).origin;
|
|
41
28
|
}
|
|
42
29
|
catch (e) {
|
|
43
|
-
// ignore
|
|
44
30
|
}
|
|
45
31
|
const internetAccountSplit = internetAccountId.split('-');
|
|
46
32
|
const configuration = {
|
|
@@ -59,11 +45,7 @@ function InternetAccountsRootModelMixin(pluginManager) {
|
|
|
59
45
|
self.internetAccounts.push(internetAccount);
|
|
60
46
|
return internetAccount;
|
|
61
47
|
},
|
|
62
|
-
/**
|
|
63
|
-
* #action
|
|
64
|
-
*/
|
|
65
48
|
findAppropriateInternetAccount(location) {
|
|
66
|
-
// find the existing account selected from menu
|
|
67
49
|
const selectedId = location.internetAccountId;
|
|
68
50
|
if (selectedId) {
|
|
69
51
|
const selectedAccount = self.internetAccounts.find(account => {
|
|
@@ -73,14 +55,12 @@ function InternetAccountsRootModelMixin(pluginManager) {
|
|
|
73
55
|
return selectedAccount;
|
|
74
56
|
}
|
|
75
57
|
}
|
|
76
|
-
// if no existing account or not found, try to find working account
|
|
77
58
|
for (const account of self.internetAccounts) {
|
|
78
59
|
const handleResult = account.handlesLocation(location);
|
|
79
60
|
if (handleResult) {
|
|
80
61
|
return account;
|
|
81
62
|
}
|
|
82
63
|
}
|
|
83
|
-
// if still no existing account, create ephemeral config to use
|
|
84
64
|
return selectedId
|
|
85
65
|
? this.createEphemeralInternetAccount(selectedId, {}, location.uri)
|
|
86
66
|
: null;
|
|
@@ -1,122 +1,31 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
|
|
3
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
4
1
|
import type { BaseRootModelType } from '../RootModel/BaseRootModel';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* here, everything will use it.
|
|
10
|
-
*/
|
|
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';
|
|
11
6
|
export declare function BaseSessionModel<ROOT_MODEL_TYPE extends BaseRootModelType, JB_CONFIG_SCHEMA extends AnyConfigurationSchemaType>(_pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
12
7
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
13
8
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
14
9
|
margin: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
15
10
|
}, {
|
|
16
|
-
/**
|
|
17
|
-
* #volatile
|
|
18
|
-
* this is the globally "selected" object. can be anything. code that
|
|
19
|
-
* wants to deal with this should examine it to see what kind of thing it
|
|
20
|
-
* is.
|
|
21
|
-
*/
|
|
22
11
|
selection: unknown;
|
|
23
|
-
/**
|
|
24
|
-
* #volatile
|
|
25
|
-
* this is the globally "hovered" object. can be anything. code that
|
|
26
|
-
* wants to deal with this should examine it to see what kind of thing it
|
|
27
|
-
* is.
|
|
28
|
-
*/
|
|
29
12
|
hovered: unknown;
|
|
30
13
|
} & {
|
|
31
|
-
/**
|
|
32
|
-
* #getter
|
|
33
|
-
*/
|
|
34
14
|
readonly root: import("mobx-state-tree").TypeOrStateTreeNodeToStateTreeNode<ROOT_MODEL_TYPE>;
|
|
35
15
|
} & {
|
|
36
|
-
/**
|
|
37
|
-
* #getter
|
|
38
|
-
*/
|
|
39
16
|
readonly jbrowse: any;
|
|
40
|
-
/**
|
|
41
|
-
* #getter
|
|
42
|
-
*/
|
|
43
17
|
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
44
|
-
/**
|
|
45
|
-
* #getter
|
|
46
|
-
*/
|
|
47
18
|
readonly configuration: Instance<JB_CONFIG_SCHEMA>;
|
|
48
|
-
/**
|
|
49
|
-
* #getter
|
|
50
|
-
*/
|
|
51
19
|
readonly adminMode: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* #getter
|
|
54
|
-
*/
|
|
55
20
|
readonly textSearchManager: import("@jbrowse/core/util").TextSearchManager;
|
|
56
21
|
} & {
|
|
57
|
-
|
|
58
|
-
* #getter
|
|
59
|
-
*/
|
|
60
|
-
readonly assemblies: ({
|
|
61
|
-
[x: string]: any;
|
|
62
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
63
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
64
|
-
[x: string]: any;
|
|
65
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
66
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
67
|
-
[x: string]: any;
|
|
68
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
69
|
-
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
70
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
71
|
-
aliases: {
|
|
72
|
-
type: string;
|
|
73
|
-
defaultValue: never[];
|
|
74
|
-
description: string;
|
|
75
|
-
};
|
|
76
|
-
sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
77
|
-
refNameColors: {
|
|
78
|
-
type: string;
|
|
79
|
-
defaultValue: never[];
|
|
80
|
-
description: string;
|
|
81
|
-
};
|
|
82
|
-
refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
83
|
-
adapter: import("mobx-state-tree").IAnyModelType;
|
|
84
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
85
|
-
cytobands: import("@jbrowse/core/configuration/configurationSchema" /**
|
|
86
|
-
* #getter
|
|
87
|
-
*/).ConfigurationSchemaType<{
|
|
88
|
-
adapter: import("mobx-state-tree" /**
|
|
89
|
-
* #getter
|
|
90
|
-
*/).IAnyModelType;
|
|
91
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
92
|
-
displayName: {
|
|
93
|
-
type: string;
|
|
94
|
-
defaultValue: string;
|
|
95
|
-
description: string;
|
|
96
|
-
};
|
|
97
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name">>>)[];
|
|
22
|
+
readonly assemblies: Instance<BaseAssemblyConfigSchema>[];
|
|
98
23
|
} & {
|
|
99
|
-
/**
|
|
100
|
-
* #action
|
|
101
|
-
* set the global selection, i.e. the globally-selected object. can be a
|
|
102
|
-
* feature, a view, just about anything
|
|
103
|
-
*/
|
|
104
24
|
setSelection(thing: unknown): void;
|
|
105
|
-
/**
|
|
106
|
-
* #action
|
|
107
|
-
* clears the global selection
|
|
108
|
-
*/
|
|
109
25
|
clearSelection(): void;
|
|
110
|
-
/**
|
|
111
|
-
* #action
|
|
112
|
-
*/
|
|
113
26
|
setHovered(thing: unknown): void;
|
|
114
27
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
115
|
-
/** Session mixin MST type for the most basic session */
|
|
116
28
|
export type BaseSessionType = ReturnType<typeof BaseSessionModel>;
|
|
117
|
-
/** Instance of the most basic possible session */
|
|
118
29
|
export type BaseSession = Instance<BaseSessionType>;
|
|
119
|
-
/** Type guard for BaseSession */
|
|
120
30
|
export declare function isBaseSession(thing: IAnyStateTreeNode): thing is BaseSession;
|
|
121
|
-
/** Type guard for whether a thing is JBrowse session */
|
|
122
31
|
export declare function isSession(thing: unknown): thing is BaseSession;
|