@jbrowse/app-core 3.7.0 → 4.0.1
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/AppFocus/index.d.ts +3 -3
- package/esm/AppFocus/index.js +1 -1
- package/esm/Assemblies/SessionAssembliesMixin.d.ts +47 -22
- package/esm/Assemblies/SessionAssembliesMixin.js +11 -1
- package/esm/Assemblies/TemporaryAssembliesMixin.d.ts +5 -3
- package/esm/Assemblies/TemporaryAssembliesMixin.js +11 -1
- package/esm/Assemblies/index.d.ts +2 -2
- package/esm/Assemblies/index.js +2 -2
- package/esm/DockviewLayout/index.d.ts +26 -0
- package/esm/DockviewLayout/index.js +107 -0
- package/esm/HistoryManagement/index.d.ts +7 -7
- package/esm/HistoryManagement/index.js +5 -6
- package/esm/JBrowseConfig/RootConfiguration.d.ts +15 -15
- package/esm/JBrowseConfig/index.d.ts +35 -25
- package/esm/JBrowseConfig/index.js +3 -3
- package/esm/JBrowseModel/index.d.ts +52 -34
- package/esm/JBrowseModel/index.js +15 -6
- package/esm/RootMenu/index.d.ts +3 -3
- package/esm/RootMenu/index.js +1 -1
- package/esm/index.d.ts +9 -8
- package/esm/index.js +9 -8
- package/esm/ui/App/App.d.ts +1 -1
- package/esm/ui/App/App.js +8 -8
- package/esm/ui/App/AppFab.js +2 -2
- package/esm/ui/App/AppToolbar.d.ts +1 -1
- package/esm/ui/App/AppToolbar.js +17 -3
- package/esm/ui/App/ClassicViewsContainer.d.ts +12 -0
- package/esm/ui/App/ClassicViewsContainer.js +21 -0
- package/esm/ui/App/DialogQueue.d.ts +2 -2
- package/esm/ui/App/DialogQueue.js +1 -1
- package/esm/ui/App/DockviewContext.d.ts +15 -0
- package/esm/ui/App/DockviewContext.js +21 -0
- package/esm/ui/App/DockviewLeftHeaderActions.d.ts +2 -0
- package/esm/ui/App/DockviewLeftHeaderActions.js +58 -0
- package/esm/ui/App/DockviewRightHeaderActions.d.ts +2 -0
- package/esm/ui/App/DockviewRightHeaderActions.js +100 -0
- package/esm/ui/App/Drawer.js +4 -5
- package/esm/ui/App/DrawerControls.js +1 -1
- package/esm/ui/App/DrawerHeader.js +16 -8
- package/{dist/ui/App/Drawer.d.ts → esm/ui/App/DrawerHeaderHelpButton.d.ts} +3 -3
- package/esm/ui/App/DrawerHeaderHelpButton.js +18 -0
- package/esm/ui/App/DrawerHeaderHelpDialog.d.ts +4 -0
- package/esm/ui/App/DrawerHeaderHelpDialog.js +15 -0
- package/esm/ui/App/DrawerWidget.js +4 -4
- package/esm/ui/App/DrawerWidgetSelector.js +3 -3
- package/esm/ui/App/JBrowseTabMenu.d.ts +5 -0
- package/esm/ui/App/JBrowseTabMenu.js +39 -0
- package/esm/ui/App/JBrowseViewPanel.d.ts +8 -0
- package/esm/ui/App/JBrowseViewPanel.js +49 -0
- package/esm/ui/App/JBrowseViewTab.d.ts +8 -0
- package/esm/ui/App/JBrowseViewTab.js +106 -0
- package/esm/ui/App/ModalWidget.js +3 -3
- package/esm/ui/App/TiledViewsContainer.d.ts +7 -0
- package/esm/ui/App/TiledViewsContainer.js +251 -0
- package/{dist/ui/App/ViewHeader.d.ts → esm/ui/App/ViewButtons.d.ts} +2 -3
- package/esm/ui/App/ViewButtons.js +17 -0
- package/esm/ui/App/ViewContainer.js +7 -8
- package/esm/ui/App/ViewContainerTitle.js +3 -4
- package/esm/ui/App/ViewHeader.js +7 -16
- package/esm/ui/App/ViewLauncher.d.ts +1 -1
- package/esm/ui/App/ViewLauncher.js +3 -4
- package/esm/ui/App/ViewMenu.d.ts +1 -1
- package/esm/ui/App/ViewMenu.js +113 -54
- package/esm/ui/App/ViewWrapper.js +1 -1
- package/esm/ui/App/ViewsContainer.d.ts +2 -2
- package/esm/ui/App/ViewsContainer.js +8 -6
- package/esm/ui/App/copyView.d.ts +1 -0
- package/esm/ui/App/copyView.js +29 -0
- package/esm/ui/App/dockviewUtils.d.ts +44 -0
- package/esm/ui/App/dockviewUtils.js +45 -0
- package/esm/ui/App/index.d.ts +2 -1
- package/esm/ui/App/index.js +2 -1
- package/esm/ui/App/types.d.ts +7 -0
- package/esm/ui/App/types.js +1 -0
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/index.js +1 -1
- package/package.json +27 -32
- package/dist/AppFocus/index.d.ts +0 -5
- package/dist/AppFocus/index.js +0 -15
- package/dist/Assemblies/SessionAssembliesMixin.d.ts +0 -67
- package/dist/Assemblies/SessionAssembliesMixin.js +0 -46
- package/dist/Assemblies/TemporaryAssembliesMixin.d.ts +0 -8
- package/dist/Assemblies/TemporaryAssembliesMixin.js +0 -30
- package/dist/Assemblies/index.d.ts +0 -2
- package/dist/Assemblies/index.js +0 -18
- package/dist/HistoryManagement/index.d.ts +0 -23
- package/dist/HistoryManagement/index.js +0 -47
- package/dist/JBrowseConfig/RootConfiguration.d.ts +0 -102
- package/dist/JBrowseConfig/RootConfiguration.js +0 -46
- package/dist/JBrowseConfig/index.d.ts +0 -115
- package/dist/JBrowseConfig/index.js +0 -26
- package/dist/JBrowseModel/index.d.ts +0 -142
- package/dist/JBrowseModel/index.js +0 -101
- package/dist/RootMenu/index.d.ts +0 -13
- package/dist/RootMenu/index.js +0 -74
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -24
- package/dist/menus.d.ts +0 -74
- package/dist/menus.js +0 -108
- package/dist/ui/App/App.d.ts +0 -18
- package/dist/ui/App/App.js +0 -82
- package/dist/ui/App/AppFab.d.ts +0 -5
- package/dist/ui/App/AppFab.js +0 -32
- package/dist/ui/App/AppToolbar.d.ts +0 -18
- package/dist/ui/App/AppToolbar.js +0 -44
- package/dist/ui/App/DialogQueue.d.ts +0 -5
- package/dist/ui/App/DialogQueue.js +0 -10
- package/dist/ui/App/Drawer.js +0 -51
- package/dist/ui/App/DrawerControls.d.ts +0 -5
- package/dist/ui/App/DrawerControls.js +0 -30
- package/dist/ui/App/DrawerHeader.d.ts +0 -7
- package/dist/ui/App/DrawerHeader.js +0 -37
- package/dist/ui/App/DrawerWidget.d.ts +0 -5
- package/dist/ui/App/DrawerWidget.js +0 -65
- package/dist/ui/App/DrawerWidgetSelector.d.ts +0 -5
- package/dist/ui/App/DrawerWidgetSelector.js +0 -52
- package/dist/ui/App/ModalWidget.d.ts +0 -6
- package/dist/ui/App/ModalWidget.js +0 -53
- package/dist/ui/App/ViewContainer.d.ts +0 -6
- package/dist/ui/App/ViewContainer.js +0 -55
- package/dist/ui/App/ViewContainerTitle.d.ts +0 -5
- package/dist/ui/App/ViewContainerTitle.js +0 -44
- package/dist/ui/App/ViewHeader.js +0 -60
- package/dist/ui/App/ViewLauncher.d.ts +0 -11
- package/dist/ui/App/ViewLauncher.js +0 -29
- package/dist/ui/App/ViewMenu.d.ts +0 -8
- package/dist/ui/App/ViewMenu.js +0 -74
- package/dist/ui/App/ViewWrapper.d.ts +0 -6
- package/dist/ui/App/ViewWrapper.js +0 -23
- package/dist/ui/App/ViewsContainer.d.ts +0 -12
- package/dist/ui/App/ViewsContainer.js +0 -57
- package/dist/ui/App/index.d.ts +0 -1
- package/dist/ui/App/index.js +0 -17
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -17
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { types } from 'mobx-state-tree';
|
|
2
|
-
import RootConfiguration from
|
|
1
|
+
import { types } from '@jbrowse/mobx-state-tree';
|
|
2
|
+
import RootConfiguration from "./RootConfiguration.js";
|
|
3
3
|
export function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }) {
|
|
4
4
|
return types.model('JBrowseConfig', {
|
|
5
5
|
configuration: RootConfiguration({
|
|
@@ -7,7 +7,7 @@ export function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }) {
|
|
|
7
7
|
}),
|
|
8
8
|
plugins: types.array(types.frozen()),
|
|
9
9
|
assemblies: types.array(assemblyConfigSchema),
|
|
10
|
-
tracks: types.
|
|
10
|
+
tracks: types.frozen([]),
|
|
11
11
|
internetAccounts: types.array(pluginManager.pluggableConfigSchemaType('internet account')),
|
|
12
12
|
aggregateTextSearchAdapters: types.array(pluginManager.pluggableConfigSchemaType('text search adapter')),
|
|
13
13
|
connections: types.array(pluginManager.pluggableConfigSchemaType('connection')),
|
|
@@ -4,23 +4,24 @@ import type { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
|
|
|
4
4
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
5
5
|
import type RpcManager from '@jbrowse/core/rpc/RpcManager';
|
|
6
6
|
export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }: {
|
|
7
|
+
adminMode?: boolean;
|
|
7
8
|
pluginManager: PluginManager;
|
|
8
9
|
assemblyConfigSchema: BaseAssemblyConfigSchema;
|
|
9
|
-
}): import("mobx-state-tree").IModelType<{
|
|
10
|
-
configuration: import("
|
|
11
|
-
rpc: import("
|
|
10
|
+
}): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
11
|
+
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
12
|
+
rpc: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
12
13
|
defaultDriver: {
|
|
13
14
|
type: string;
|
|
14
15
|
description: string;
|
|
15
16
|
defaultValue: string;
|
|
16
17
|
};
|
|
17
|
-
drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
|
|
18
|
-
}, import("
|
|
18
|
+
drivers: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ITypeUnion<import("@jbrowse/mobx-state-tree").ModelCreationType<import("@jbrowse/mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("@jbrowse/mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("@jbrowse/mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
|
|
19
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
19
20
|
highResolutionScaling: {
|
|
20
21
|
type: string;
|
|
21
22
|
defaultValue: number;
|
|
22
23
|
};
|
|
23
|
-
formatDetails: import("
|
|
24
|
+
formatDetails: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
24
25
|
feature: {
|
|
25
26
|
type: string;
|
|
26
27
|
description: string;
|
|
@@ -43,8 +44,8 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
|
|
|
43
44
|
defaultValue: number;
|
|
44
45
|
description: string;
|
|
45
46
|
};
|
|
46
|
-
}, import("
|
|
47
|
-
formatAbout: import("
|
|
47
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
48
|
+
formatAbout: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
48
49
|
config: {
|
|
49
50
|
type: string;
|
|
50
51
|
description: string;
|
|
@@ -55,7 +56,7 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
|
|
|
55
56
|
type: string;
|
|
56
57
|
defaultValue: boolean;
|
|
57
58
|
};
|
|
58
|
-
}, import("
|
|
59
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
59
60
|
shareURL: {
|
|
60
61
|
type: string;
|
|
61
62
|
defaultValue: string;
|
|
@@ -64,8 +65,8 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
|
|
|
64
65
|
type: string;
|
|
65
66
|
defaultValue: boolean;
|
|
66
67
|
};
|
|
67
|
-
hierarchical: import("
|
|
68
|
-
sort: import("
|
|
68
|
+
hierarchical: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
69
|
+
sort: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
69
70
|
trackNames: {
|
|
70
71
|
type: string;
|
|
71
72
|
defaultValue: boolean;
|
|
@@ -74,8 +75,8 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
|
|
|
74
75
|
type: string;
|
|
75
76
|
defaultValue: boolean;
|
|
76
77
|
};
|
|
77
|
-
}, import("
|
|
78
|
-
defaultCollapsed: import("
|
|
78
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
79
|
+
defaultCollapsed: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
|
|
79
80
|
categoryNames: {
|
|
80
81
|
type: string;
|
|
81
82
|
defaultValue: never[];
|
|
@@ -88,8 +89,8 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
|
|
|
88
89
|
type: string;
|
|
89
90
|
defaultValue: boolean;
|
|
90
91
|
};
|
|
91
|
-
}, import("
|
|
92
|
-
}, import("
|
|
92
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
93
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
93
94
|
theme: {
|
|
94
95
|
type: string;
|
|
95
96
|
defaultValue: {};
|
|
@@ -105,38 +106,55 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
|
|
|
105
106
|
locationType: string;
|
|
106
107
|
};
|
|
107
108
|
};
|
|
108
|
-
}, import("
|
|
109
|
-
plugins: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<PluginDefinition, PluginDefinition, PluginDefinition>>;
|
|
110
|
-
assemblies: import("mobx-state-tree").IArrayType<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
|
|
111
|
-
tracks: import("mobx-state-tree").
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
110
|
+
plugins: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<PluginDefinition, PluginDefinition, PluginDefinition>>;
|
|
111
|
+
assemblies: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
|
|
112
|
+
tracks: import("@jbrowse/mobx-state-tree").IType<{
|
|
113
|
+
[key: string]: unknown;
|
|
114
|
+
trackId: string;
|
|
115
|
+
}[] | null | undefined, {
|
|
116
|
+
[key: string]: unknown;
|
|
117
|
+
trackId: string;
|
|
118
|
+
}[], {
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
trackId: string;
|
|
121
|
+
}[]>;
|
|
122
|
+
internetAccounts: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
|
|
123
|
+
aggregateTextSearchAdapters: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
|
|
124
|
+
connections: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
|
|
125
|
+
defaultSession: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
126
|
+
preConfiguredSessions: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<any, any, any>>;
|
|
117
127
|
}, {
|
|
118
128
|
readonly assemblyNames: string[];
|
|
119
129
|
readonly rpcManager: RpcManager;
|
|
120
130
|
} & {
|
|
121
131
|
addAssemblyConf(conf: AnyConfigurationModel): ({
|
|
122
132
|
[x: string]: any;
|
|
123
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
133
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
124
134
|
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
125
135
|
[x: string]: any;
|
|
126
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject &
|
|
127
|
-
|
|
128
|
-
[x: string]: any;
|
|
129
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
130
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
131
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
|
|
136
|
+
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & any & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
137
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
|
|
132
138
|
removeAssemblyConf(assemblyName: string): void;
|
|
133
|
-
addTrackConf(trackConf:
|
|
139
|
+
addTrackConf(trackConf: {
|
|
140
|
+
trackId: string;
|
|
141
|
+
type: string;
|
|
142
|
+
}): {
|
|
143
|
+
[key: string]: unknown;
|
|
144
|
+
trackId: string;
|
|
145
|
+
} | undefined;
|
|
134
146
|
addConnectionConf(connectionConf: AnyConfigurationModel): any;
|
|
135
147
|
deleteConnectionConf(configuration: AnyConfigurationModel): boolean;
|
|
136
|
-
deleteTrackConf(trackConf: AnyConfigurationModel
|
|
148
|
+
deleteTrackConf(trackConf: AnyConfigurationModel | {
|
|
149
|
+
trackId: string;
|
|
150
|
+
}): void;
|
|
151
|
+
updateTrackConf(trackConf: {
|
|
152
|
+
trackId: string;
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
}): void;
|
|
137
155
|
addPlugin(pluginDefinition: PluginDefinition): void;
|
|
138
156
|
removePlugin(pluginDefinition: PluginDefinition): void;
|
|
139
157
|
setDefaultSessionConf(sessionConf: AnyConfigurationModel): void;
|
|
140
158
|
addInternetAccountConf(internetAccountConf: AnyConfigurationModel): any;
|
|
141
159
|
deleteInternetAccountConf(configuration: AnyConfigurationModel): boolean;
|
|
142
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
160
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
+
import { cast, getParent, getSnapshot } from '@jbrowse/mobx-state-tree';
|
|
2
3
|
import { toJS } from 'mobx';
|
|
3
|
-
import {
|
|
4
|
-
import { JBrowseConfigF } from '../JBrowseConfig';
|
|
4
|
+
import { JBrowseConfigF } from "../JBrowseConfig/index.js";
|
|
5
5
|
export function JBrowseModelF({ pluginManager, assemblyConfigSchema, }) {
|
|
6
6
|
return JBrowseConfigF({ pluginManager, assemblyConfigSchema })
|
|
7
7
|
.views(self => ({
|
|
@@ -42,8 +42,8 @@ export function JBrowseModelF({ pluginManager, assemblyConfigSchema, }) {
|
|
|
42
42
|
if (!type) {
|
|
43
43
|
throw new Error(`unknown track type ${type}`);
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
return self.tracks
|
|
45
|
+
self.tracks = [...self.tracks, trackConf];
|
|
46
|
+
return self.tracks.at(-1);
|
|
47
47
|
},
|
|
48
48
|
addConnectionConf(connectionConf) {
|
|
49
49
|
const { type } = connectionConf;
|
|
@@ -58,8 +58,17 @@ export function JBrowseModelF({ pluginManager, assemblyConfigSchema, }) {
|
|
|
58
58
|
return self.connections.remove(elt);
|
|
59
59
|
},
|
|
60
60
|
deleteTrackConf(trackConf) {
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const trackId = trackConf.trackId;
|
|
62
|
+
self.tracks = self.tracks.filter(t => t.trackId !== trackId);
|
|
63
|
+
},
|
|
64
|
+
updateTrackConf(trackConf) {
|
|
65
|
+
const { trackId } = trackConf;
|
|
66
|
+
const idx = self.tracks.findIndex(t => t.trackId === trackId);
|
|
67
|
+
if (idx !== -1) {
|
|
68
|
+
const newTracks = [...self.tracks];
|
|
69
|
+
newTracks[idx] = trackConf;
|
|
70
|
+
self.tracks = newTracks;
|
|
71
|
+
}
|
|
63
72
|
},
|
|
64
73
|
addPlugin(pluginDefinition) {
|
|
65
74
|
self.plugins.push(pluginDefinition);
|
package/esm/RootMenu/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Menu, MenuAction } from '../menus';
|
|
1
|
+
import type { Menu, MenuAction } from '../menus.ts';
|
|
2
2
|
import type { MenuItem } from '@jbrowse/core/ui/Menu';
|
|
3
|
-
export declare function RootAppMenuMixin(): import("mobx-state-tree").IModelType<{}, {
|
|
3
|
+
export declare function RootAppMenuMixin(): import("@jbrowse/mobx-state-tree").IModelType<{}, {
|
|
4
4
|
mutableMenuActions: MenuAction[];
|
|
5
5
|
} & {
|
|
6
6
|
setMenus(newMenus: Menu[]): void;
|
|
@@ -10,4 +10,4 @@ export declare function RootAppMenuMixin(): import("mobx-state-tree").IModelType
|
|
|
10
10
|
insertInMenu(menuName: string, menuItem: MenuItem, position: number): void;
|
|
11
11
|
appendToSubMenu(menuPath: string[], menuItem: MenuItem): void;
|
|
12
12
|
insertInSubMenu(menuPath: string[], menuItem: MenuItem, position: number): void;
|
|
13
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
13
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
package/esm/RootMenu/index.js
CHANGED
package/esm/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * from './ui';
|
|
2
|
-
export * from './HistoryManagement';
|
|
3
|
-
export * from './AppFocus';
|
|
4
|
-
export * from './JBrowseConfig';
|
|
5
|
-
export * from './JBrowseModel';
|
|
6
|
-
export * from './Assemblies';
|
|
7
|
-
export * from './RootMenu';
|
|
8
|
-
export * from './
|
|
1
|
+
export * from './ui/index.ts';
|
|
2
|
+
export * from './HistoryManagement/index.ts';
|
|
3
|
+
export * from './AppFocus/index.ts';
|
|
4
|
+
export * from './JBrowseConfig/index.ts';
|
|
5
|
+
export * from './JBrowseModel/index.ts';
|
|
6
|
+
export * from './Assemblies/index.ts';
|
|
7
|
+
export * from './RootMenu/index.ts';
|
|
8
|
+
export * from './DockviewLayout/index.ts';
|
|
9
|
+
export * from './menus.ts';
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
1
|
+
export * from "./ui/index.js";
|
|
2
|
+
export * from "./HistoryManagement/index.js";
|
|
3
|
+
export * from "./AppFocus/index.js";
|
|
4
|
+
export * from "./JBrowseConfig/index.js";
|
|
5
|
+
export * from "./JBrowseModel/index.js";
|
|
6
|
+
export * from "./Assemblies/index.js";
|
|
7
|
+
export * from "./RootMenu/index.js";
|
|
8
|
+
export * from "./DockviewLayout/index.js";
|
|
9
|
+
export * from "./menus.js";
|
package/esm/ui/App/App.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MenuItem as JBMenuItem } from '@jbrowse/core/ui
|
|
1
|
+
import type { MenuItem as JBMenuItem } from '@jbrowse/core/ui';
|
|
2
2
|
import type { SnackbarMessage } from '@jbrowse/core/ui/SnackbarModel';
|
|
3
3
|
import type { SessionWithFocusedViewAndDrawerWidgets } from '@jbrowse/core/util';
|
|
4
4
|
interface Menu {
|
package/esm/ui/App/App.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy } from 'react';
|
|
3
3
|
import Snackbar from '@jbrowse/core/ui/Snackbar';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
5
|
import { AppBar } from '@mui/material';
|
|
5
6
|
import { observer } from 'mobx-react';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const DrawerWidget = lazy(() => import('./DrawerWidget'));
|
|
7
|
+
import AppFab from "./AppFab.js";
|
|
8
|
+
import AppToolbar from "./AppToolbar.js";
|
|
9
|
+
import DialogQueue from "./DialogQueue.js";
|
|
10
|
+
import ViewsContainer from "./ViewsContainer.js";
|
|
11
|
+
const DrawerWidget = lazy(() => import("./DrawerWidget.js"));
|
|
12
12
|
const useStyles = makeStyles()(theme => ({
|
|
13
13
|
root: {
|
|
14
14
|
display: 'grid',
|
|
@@ -27,11 +27,11 @@ const useStyles = makeStyles()(theme => ({
|
|
|
27
27
|
gridRow: 'menubar',
|
|
28
28
|
},
|
|
29
29
|
}));
|
|
30
|
-
const LazyDrawerWidget = observer(function (props) {
|
|
30
|
+
const LazyDrawerWidget = observer(function LazyDrawerWidget(props) {
|
|
31
31
|
const { session } = props;
|
|
32
32
|
return (_jsx(Suspense, { fallback: null, children: _jsx(DrawerWidget, { session: session }) }));
|
|
33
33
|
});
|
|
34
|
-
const App = observer(function (props) {
|
|
34
|
+
const App = observer(function App(props) {
|
|
35
35
|
const { session } = props;
|
|
36
36
|
const { classes } = useStyles();
|
|
37
37
|
const { minimized, visibleWidget, drawerWidth, drawerPosition } = session;
|
package/esm/ui/App/AppFab.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
2
3
|
import LaunchIcon from '@mui/icons-material/Launch';
|
|
3
4
|
import { Fab, Tooltip } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
const useStyles = makeStyles()(theme => ({
|
|
7
7
|
left: {
|
|
8
8
|
zIndex: 10000,
|
|
@@ -17,7 +17,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
17
17
|
right: theme.spacing(2),
|
|
18
18
|
},
|
|
19
19
|
}));
|
|
20
|
-
const AppFab = observer(function ({ session, }) {
|
|
20
|
+
const AppFab = observer(function AppFab({ session, }) {
|
|
21
21
|
const { minimized, activeWidgets, drawerPosition } = session;
|
|
22
22
|
const { classes } = useStyles();
|
|
23
23
|
return activeWidgets.size > 0 && minimized ? (_jsx(Tooltip, { title: "Open drawer widget", children: _jsx(Fab, { className: drawerPosition === 'right' ? classes.right : classes.left, color: "primary", "data-testid": "drawer-maximize", onClick: () => {
|
|
@@ -3,7 +3,7 @@ import type { SnackbarMessage } from '@jbrowse/core/ui/SnackbarModel';
|
|
|
3
3
|
import type { SessionWithDrawerWidgets } from '@jbrowse/core/util';
|
|
4
4
|
interface Menu {
|
|
5
5
|
label: string;
|
|
6
|
-
menuItems: JBMenuItem[];
|
|
6
|
+
menuItems: JBMenuItem[] | (() => JBMenuItem[]);
|
|
7
7
|
}
|
|
8
8
|
type AppSession = SessionWithDrawerWidgets & {
|
|
9
9
|
menus: () => Menu[];
|
package/esm/ui/App/AppToolbar.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import AppLogo from '@jbrowse/core/ui/AppLogo';
|
|
3
3
|
import DropDownMenu from '@jbrowse/core/ui/DropDownMenu';
|
|
4
4
|
import EditableTypography from '@jbrowse/core/ui/EditableTypography';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
6
|
import { Toolbar, Tooltip } from '@mui/material';
|
|
6
7
|
import { observer } from 'mobx-react';
|
|
7
|
-
import { makeStyles } from 'tss-react/mui';
|
|
8
8
|
const useStyles = makeStyles()(theme => ({
|
|
9
9
|
grow: {
|
|
10
10
|
flexGrow: 1,
|
|
@@ -22,10 +22,24 @@ const useStyles = makeStyles()(theme => ({
|
|
|
22
22
|
backgroundColor: theme.palette.primary.light,
|
|
23
23
|
},
|
|
24
24
|
}));
|
|
25
|
-
const AppToolbar = observer(function ({ session, HeaderButtons = _jsx("div", {}), }) {
|
|
25
|
+
const AppToolbar = observer(function AppToolbar({ session, HeaderButtons = _jsx("div", {}), }) {
|
|
26
26
|
const { classes } = useStyles();
|
|
27
27
|
const { name, menus } = session;
|
|
28
|
-
return (_jsxs(Toolbar, { children: [menus().map(menu => (_jsx(DropDownMenu, { menuTitle: menu.label, menuItems:
|
|
28
|
+
return (_jsxs(Toolbar, { children: [menus().map(menu => (_jsx(DropDownMenu, { menuTitle: menu.label, menuItems: () => {
|
|
29
|
+
const items = typeof menu.menuItems === 'function'
|
|
30
|
+
? menu.menuItems()
|
|
31
|
+
: menu.menuItems;
|
|
32
|
+
return items.map(arg => ({
|
|
33
|
+
...arg,
|
|
34
|
+
...('onClick' in arg
|
|
35
|
+
? {
|
|
36
|
+
onClick: () => {
|
|
37
|
+
arg.onClick(session);
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
: {}),
|
|
41
|
+
}));
|
|
42
|
+
} }, menu.label))), _jsx("div", { className: classes.grow }), _jsx(Tooltip, { title: "Rename session", arrow: true, children: _jsx(EditableTypography, { value: name, variant: "body1", classes: {
|
|
29
43
|
inputBase: classes.inputBase,
|
|
30
44
|
inputRoot: classes.inputRoot,
|
|
31
45
|
inputFocused: classes.inputFocused,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SnackbarMessage } from '@jbrowse/core/ui/SnackbarModel';
|
|
2
|
+
import type { AbstractViewContainer, SessionWithFocusedViewAndDrawerWidgets } from '@jbrowse/core/util';
|
|
3
|
+
type SessionType = SessionWithFocusedViewAndDrawerWidgets & AbstractViewContainer & {
|
|
4
|
+
renameCurrentSession: (arg: string) => void;
|
|
5
|
+
snackbarMessages: SnackbarMessage[];
|
|
6
|
+
popSnackbarMessage: () => unknown;
|
|
7
|
+
};
|
|
8
|
+
interface Props {
|
|
9
|
+
session: SessionType;
|
|
10
|
+
}
|
|
11
|
+
declare const ClassicViewsContainer: ({ session, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default ClassicViewsContainer;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import ViewContainer from "./ViewContainer.js";
|
|
5
|
+
const useStyles = makeStyles()({
|
|
6
|
+
container: {
|
|
7
|
+
height: '100%',
|
|
8
|
+
width: '100%',
|
|
9
|
+
gridRow: 'components',
|
|
10
|
+
overflowY: 'auto',
|
|
11
|
+
},
|
|
12
|
+
spacer: {
|
|
13
|
+
height: 300,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
const ClassicViewsContainer = observer(function ClassicViewsContainer({ session, }) {
|
|
17
|
+
const { classes } = useStyles();
|
|
18
|
+
const { views } = session;
|
|
19
|
+
return (_jsxs("div", { className: classes.container, children: [views.map(view => (_jsx(ViewContainer, { view: view, session: session }, view.id))), _jsx("div", { className: classes.spacer })] }));
|
|
20
|
+
});
|
|
21
|
+
export default ClassicViewsContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AbstractSessionModel } from '@jbrowse/core/util';
|
|
2
2
|
declare const DialogQueue: ({ session, }: {
|
|
3
|
-
session:
|
|
3
|
+
session: AbstractSessionModel;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
5
|
export default DialogQueue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense } from 'react';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
const DialogQueue = observer(function ({ session, }) {
|
|
4
|
+
const DialogQueue = observer(function DialogQueue({ session, }) {
|
|
5
5
|
const { DialogComponent, DialogProps } = session;
|
|
6
6
|
return DialogComponent ? (_jsx(Suspense, { fallback: null, children: _jsx(DialogComponent, { ...DialogProps }) })) : null;
|
|
7
7
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DockviewApi, DockviewGroupPanel } from 'dockview-react';
|
|
2
|
+
interface DockviewContextValue {
|
|
3
|
+
api: DockviewApi | null;
|
|
4
|
+
rearrangePanels: (arrange: (api: DockviewApi) => void) => void;
|
|
5
|
+
addEmptyTab: (targetGroup?: DockviewGroupPanel) => void;
|
|
6
|
+
moveViewToNewTab: (viewId: string) => void;
|
|
7
|
+
moveViewToSplitRight: (viewId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function getPendingMoveAction(): {
|
|
10
|
+
type: "newTab" | "splitRight";
|
|
11
|
+
viewId: string;
|
|
12
|
+
} | null;
|
|
13
|
+
export declare const DockviewContext: import("react").Context<DockviewContextValue>;
|
|
14
|
+
export declare function useDockview(): DockviewContextValue;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
let pendingMoveAction = null;
|
|
3
|
+
export function getPendingMoveAction() {
|
|
4
|
+
const action = pendingMoveAction;
|
|
5
|
+
pendingMoveAction = null;
|
|
6
|
+
return action;
|
|
7
|
+
}
|
|
8
|
+
export const DockviewContext = createContext({
|
|
9
|
+
api: null,
|
|
10
|
+
rearrangePanels: () => { },
|
|
11
|
+
addEmptyTab: () => { },
|
|
12
|
+
moveViewToNewTab: (viewId) => {
|
|
13
|
+
pendingMoveAction = { type: 'newTab', viewId };
|
|
14
|
+
},
|
|
15
|
+
moveViewToSplitRight: (viewId) => {
|
|
16
|
+
pendingMoveAction = { type: 'splitRight', viewId };
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
export function useDockview() {
|
|
20
|
+
return useContext(DockviewContext);
|
|
21
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
5
|
+
import HorizontalSplitIcon from '@mui/icons-material/HorizontalSplit';
|
|
6
|
+
import TabIcon from '@mui/icons-material/Tab';
|
|
7
|
+
import VerticalSplitIcon from '@mui/icons-material/VerticalSplit';
|
|
8
|
+
import { useDockview } from "./DockviewContext.js";
|
|
9
|
+
const useStyles = makeStyles()(theme => ({
|
|
10
|
+
headerActions: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
height: '100%',
|
|
14
|
+
},
|
|
15
|
+
headerButton: {
|
|
16
|
+
padding: 4,
|
|
17
|
+
color: theme.palette.primary.contrastText,
|
|
18
|
+
},
|
|
19
|
+
headerIcon: {
|
|
20
|
+
fontSize: 16,
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
23
|
+
export default function DockviewLeftHeaderActions({ containerApi, group, }) {
|
|
24
|
+
const { classes } = useStyles();
|
|
25
|
+
const { addEmptyTab } = useDockview();
|
|
26
|
+
const handleSplit = (direction) => {
|
|
27
|
+
const newGroup = containerApi.addGroup({
|
|
28
|
+
referenceGroup: group,
|
|
29
|
+
direction,
|
|
30
|
+
});
|
|
31
|
+
addEmptyTab(newGroup);
|
|
32
|
+
};
|
|
33
|
+
return (_jsx("div", { className: classes.headerActions, children: _jsx(CascadingMenuButton, { menuItems: [
|
|
34
|
+
{
|
|
35
|
+
label: 'New empty tab',
|
|
36
|
+
icon: TabIcon,
|
|
37
|
+
onClick: () => {
|
|
38
|
+
addEmptyTab();
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: 'New empty split horizontal',
|
|
43
|
+
icon: VerticalSplitIcon,
|
|
44
|
+
onClick: () => {
|
|
45
|
+
handleSplit('right');
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'New empty split vertical',
|
|
50
|
+
icon: HorizontalSplitIcon,
|
|
51
|
+
onClick: () => {
|
|
52
|
+
handleSplit('below');
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
], size: "small", className: classes.headerButton, onClick: () => {
|
|
56
|
+
group.api.setActive();
|
|
57
|
+
}, children: _jsx(AddIcon, { className: classes.headerIcon }) }) }));
|
|
58
|
+
}
|