@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,158 +1,21 @@
|
|
|
1
1
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
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").
|
|
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>>;
|
|
4
|
+
import type { IAnyStateTreeNode, Instance } from '@jbrowse/mobx-state-tree';
|
|
5
|
+
export declare function ConnectionManagementSessionMixin(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
6
|
+
connectionInstances: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
|
|
50
7
|
}, {
|
|
51
8
|
readonly connections: BaseConnectionConfigModel[];
|
|
52
9
|
} & {
|
|
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;
|
|
10
|
+
makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}): any;
|
|
150
11
|
prepareToBreakConnection(configuration: AnyConfigurationModel): (Record<string, number> | (() => void))[] | undefined;
|
|
151
12
|
breakConnection(configuration: AnyConfigurationModel): void;
|
|
152
13
|
deleteConnection(configuration: AnyConfigurationModel): any;
|
|
153
14
|
addConnectionConf(connectionConf: AnyConfigurationModel): any;
|
|
154
15
|
clearConnections(): void;
|
|
155
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree").
|
|
16
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
|
|
17
|
+
connectionInstances: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
|
|
18
|
+
}>>;
|
|
156
19
|
export type SessionWithConnectionsType = ReturnType<typeof ConnectionManagementSessionMixin>;
|
|
157
20
|
export type SessionWithConnections = Instance<SessionWithConnectionsType>;
|
|
158
21
|
export declare function isSessionWithConnections(session: IAnyStateTreeNode): session is SessionWithConnections;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
-
import { types } from 'mobx-state-tree';
|
|
3
|
-
import { isBaseSession } from
|
|
2
|
+
import { types } from '@jbrowse/mobx-state-tree';
|
|
3
|
+
import { isBaseSession } from "./BaseSession.js";
|
|
4
4
|
export function ConnectionManagementSessionMixin(pluginManager) {
|
|
5
5
|
return types
|
|
6
6
|
.model({
|
|
@@ -73,7 +73,17 @@ export function ConnectionManagementSessionMixin(pluginManager) {
|
|
|
73
73
|
clearConnections() {
|
|
74
74
|
self.connectionInstances.clear();
|
|
75
75
|
},
|
|
76
|
-
}))
|
|
76
|
+
}))
|
|
77
|
+
.postProcessSnapshot(snap => {
|
|
78
|
+
if (!snap) {
|
|
79
|
+
return snap;
|
|
80
|
+
}
|
|
81
|
+
const { connectionInstances, ...rest } = snap;
|
|
82
|
+
return {
|
|
83
|
+
...rest,
|
|
84
|
+
...(connectionInstances?.length ? { connectionInstances } : {}),
|
|
85
|
+
};
|
|
86
|
+
});
|
|
77
87
|
}
|
|
78
88
|
export function isSessionWithConnections(session) {
|
|
79
89
|
return isBaseSession(session) && 'connectionInstances' in session;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
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<{}, {
|
|
3
|
+
import type { IAnyStateTreeNode, Instance } from '@jbrowse/mobx-state-tree';
|
|
4
|
+
export declare function DialogQueueSessionMixin(_pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{}, {
|
|
5
5
|
queueOfDialogs: [DialogComponentType, unknown][];
|
|
6
6
|
} & {
|
|
7
7
|
readonly DialogComponent: DialogComponentType | undefined;
|
|
@@ -9,7 +9,7 @@ export declare function DialogQueueSessionMixin(_pluginManager: PluginManager):
|
|
|
9
9
|
} & {
|
|
10
10
|
removeActiveDialog(): void;
|
|
11
11
|
queueDialog(cb: (doneCallback: () => void) => [DialogComponentType, unknown]): void;
|
|
12
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
12
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
13
13
|
export type SessionWithDialogsType = ReturnType<typeof DialogQueueSessionMixin>;
|
|
14
14
|
export type SessionWithDialogs = Instance<SessionWithDialogsType>;
|
|
15
15
|
export declare function isSessionWithDialogs(session: IAnyStateTreeNode): session is SessionWithDialogs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { types } from 'mobx-state-tree';
|
|
2
|
-
import { isBaseSession } from
|
|
1
|
+
import { types } from '@jbrowse/mobx-state-tree';
|
|
2
|
+
import { isBaseSession } from "./BaseSession.js";
|
|
3
3
|
export function DialogQueueSessionMixin(_pluginManager) {
|
|
4
4
|
return types
|
|
5
5
|
.model('DialogQueueSessionMixin', {})
|
|
@@ -8,12 +8,10 @@ export function DialogQueueSessionMixin(_pluginManager) {
|
|
|
8
8
|
}))
|
|
9
9
|
.views(self => ({
|
|
10
10
|
get DialogComponent() {
|
|
11
|
-
|
|
12
|
-
return (_a = self.queueOfDialogs[0]) === null || _a === void 0 ? void 0 : _a[0];
|
|
11
|
+
return self.queueOfDialogs[0]?.[0];
|
|
13
12
|
},
|
|
14
13
|
get DialogProps() {
|
|
15
|
-
|
|
16
|
-
return (_a = self.queueOfDialogs[0]) === null || _a === void 0 ? void 0 : _a[1];
|
|
14
|
+
return self.queueOfDialogs[0]?.[1];
|
|
17
15
|
},
|
|
18
16
|
}))
|
|
19
17
|
.actions(self => ({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
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]>;
|
|
3
|
+
import type { IAnyStateTreeNode, Instance } from '@jbrowse/mobx-state-tree';
|
|
4
|
+
export declare function DrawerWidgetSessionMixin(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
5
|
+
drawerPosition: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
+
drawerWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
7
|
+
widgets: import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").IAnyType>;
|
|
8
|
+
activeWidgets: import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>>;
|
|
9
|
+
minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
10
10
|
}, {
|
|
11
11
|
readonly visibleWidget: any;
|
|
12
12
|
} & {
|
|
@@ -20,9 +20,17 @@ export declare function DrawerWidgetSessionMixin(pluginManager: PluginManager):
|
|
|
20
20
|
minimizeWidgetDrawer(): void;
|
|
21
21
|
showWidgetDrawer(): void;
|
|
22
22
|
hideAllWidgets(): void;
|
|
23
|
-
editConfiguration(configuration: AnyConfigurationModel
|
|
23
|
+
editConfiguration(configuration: AnyConfigurationModel | {
|
|
24
|
+
trackId: string;
|
|
25
|
+
}): void;
|
|
24
26
|
afterAttach(): void;
|
|
25
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree").
|
|
27
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
|
|
28
|
+
drawerPosition: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
29
|
+
drawerWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
30
|
+
widgets: import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").IAnyType>;
|
|
31
|
+
activeWidgets: import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>>;
|
|
32
|
+
minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
33
|
+
}>>;
|
|
26
34
|
export type SessionWithDrawerWidgetsType = ReturnType<typeof DrawerWidgetSessionMixin>;
|
|
27
35
|
export type SessionWithDrawerWidgets = Instance<SessionWithDrawerWidgetsType>;
|
|
28
36
|
export declare function isSessionWithDrawerWidgets(session: IAnyStateTreeNode): session is SessionWithDrawerWidgets;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
2
|
import { localStorageGetItem, localStorageSetItem } from '@jbrowse/core/util';
|
|
3
|
+
import { addDisposer, getEnv, isAlive, isStateTreeNode, types, } from '@jbrowse/mobx-state-tree';
|
|
3
4
|
import { autorun } from 'mobx';
|
|
4
|
-
import {
|
|
5
|
-
import { isBaseSession } from './BaseSession';
|
|
5
|
+
import { isBaseSession } from "./BaseSession.js";
|
|
6
6
|
const minDrawerWidth = 128;
|
|
7
7
|
export function DrawerWidgetSessionMixin(pluginManager) {
|
|
8
8
|
const widgetStateModelType = pluginManager.pluggableMstType('widget', 'stateModel');
|
|
@@ -83,18 +83,42 @@ export function DrawerWidgetSessionMixin(pluginManager) {
|
|
|
83
83
|
self.activeWidgets.clear();
|
|
84
84
|
},
|
|
85
85
|
editConfiguration(configuration) {
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
let targetConfig;
|
|
87
|
+
if (isStateTreeNode(configuration) &&
|
|
88
|
+
isConfigurationModel(configuration)) {
|
|
89
|
+
targetConfig = configuration;
|
|
88
90
|
}
|
|
89
|
-
|
|
91
|
+
else if ('trackId' in configuration) {
|
|
92
|
+
const trackSchema = pluginManager.pluggableConfigSchemaType('track');
|
|
93
|
+
targetConfig = trackSchema.create(configuration, getEnv(self));
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
throw new Error('must pass a configuration model or frozen config with trackId to editConfiguration');
|
|
97
|
+
}
|
|
98
|
+
const editor = this.addWidget('ConfigurationEditorWidget', 'configEditor', {});
|
|
99
|
+
editor.setTarget(targetConfig);
|
|
90
100
|
this.showWidget(editor);
|
|
91
101
|
},
|
|
92
102
|
afterAttach() {
|
|
93
|
-
addDisposer(self, autorun(()
|
|
103
|
+
addDisposer(self, autorun(function drawerPositionAutorun() {
|
|
94
104
|
localStorageSetItem('drawerPosition', self.drawerPosition);
|
|
95
|
-
}));
|
|
105
|
+
}, { name: 'DrawerPosition' }));
|
|
96
106
|
},
|
|
97
|
-
}))
|
|
107
|
+
}))
|
|
108
|
+
.postProcessSnapshot(snap => {
|
|
109
|
+
if (!snap) {
|
|
110
|
+
return snap;
|
|
111
|
+
}
|
|
112
|
+
const { drawerPosition, drawerWidth, widgets, activeWidgets, minimized, ...rest } = snap;
|
|
113
|
+
return {
|
|
114
|
+
...rest,
|
|
115
|
+
...(drawerPosition !== 'right' ? { drawerPosition } : {}),
|
|
116
|
+
...(drawerWidth !== 384 ? { drawerWidth } : {}),
|
|
117
|
+
...(Object.keys(widgets ?? {}).length ? { widgets } : {}),
|
|
118
|
+
...(Object.keys(activeWidgets ?? {}).length ? { activeWidgets } : {}),
|
|
119
|
+
...(minimized ? { minimized } : {}),
|
|
120
|
+
};
|
|
121
|
+
});
|
|
98
122
|
}
|
|
99
123
|
export function isSessionWithDrawerWidgets(session) {
|
|
100
124
|
return (isBaseSession(session) &&
|