@jbrowse/web-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/BaseWebSession/index.d.ts +1375 -1595
- package/esm/BaseWebSession/index.js +81 -41
- package/esm/SessionConnections.d.ts +9 -144
- package/esm/SessionConnections.js +11 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/package.json +26 -33
- package/dist/BaseWebSession/AboutDialog.d.ts +0 -1
- package/dist/BaseWebSession/AboutDialog.js +0 -5
- package/dist/BaseWebSession/index.d.ts +0 -10033
- package/dist/BaseWebSession/index.js +0 -257
- package/dist/SessionConnections.d.ts +0 -159
- package/dist/SessionConnections.js +0 -49
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -18
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
|
-
import { AppFocusMixin, SessionAssembliesMixin, TemporaryAssembliesMixin, } from '@jbrowse/app-core';
|
|
2
|
+
import { AppFocusMixin, DockviewLayoutMixin, SessionAssembliesMixin, TemporaryAssembliesMixin, } from '@jbrowse/app-core';
|
|
3
3
|
import { getConf, readConfObject } from '@jbrowse/core/configuration';
|
|
4
4
|
import SnackbarModel from '@jbrowse/core/ui/SnackbarModel';
|
|
5
5
|
import { localStorageGetItem, localStorageSetItem } from '@jbrowse/core/util';
|
|
6
|
+
import { addDisposer, cast, getParent, getSnapshot, isStateTreeNode, types, } from '@jbrowse/mobx-state-tree';
|
|
6
7
|
import { DialogQueueSessionMixin, DrawerWidgetSessionMixin, MultipleViewsSessionMixin, ReferenceManagementSessionMixin, SessionTracksManagerSessionMixin, ThemeManagerSessionMixin, } from '@jbrowse/product-core';
|
|
7
8
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
8
9
|
import CopyIcon from '@mui/icons-material/FileCopy';
|
|
9
10
|
import InfoIcon from '@mui/icons-material/Info';
|
|
10
11
|
import SettingsIcon from '@mui/icons-material/Settings';
|
|
11
12
|
import { autorun } from 'mobx';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
const AboutDialog = lazy(() => import('./AboutDialog'));
|
|
13
|
+
import { WebSessionConnectionsMixin } from "../SessionConnections.js";
|
|
14
|
+
const AboutDialog = lazy(() => import("./AboutDialog.js"));
|
|
15
15
|
export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
|
|
16
16
|
const sessionModel = types
|
|
17
|
-
.compose('WebCoreSessionModel', types.compose('WebCoreSessionModelGroupA', ReferenceManagementSessionMixin(pluginManager), DrawerWidgetSessionMixin(pluginManager), DialogQueueSessionMixin(pluginManager), ThemeManagerSessionMixin(pluginManager), MultipleViewsSessionMixin(pluginManager)), types.compose('WebCoreSessionModelGroupB', SessionTracksManagerSessionMixin(pluginManager), SessionAssembliesMixin(pluginManager, assemblyConfigSchema), TemporaryAssembliesMixin(pluginManager, assemblyConfigSchema), WebSessionConnectionsMixin(pluginManager), AppFocusMixin(), SnackbarModel()))
|
|
17
|
+
.compose('WebCoreSessionModel', types.compose('WebCoreSessionModelGroupA', ReferenceManagementSessionMixin(pluginManager), DrawerWidgetSessionMixin(pluginManager), DialogQueueSessionMixin(pluginManager), ThemeManagerSessionMixin(pluginManager), MultipleViewsSessionMixin(pluginManager)), types.compose('WebCoreSessionModelGroupB', SessionTracksManagerSessionMixin(pluginManager), SessionAssembliesMixin(pluginManager, assemblyConfigSchema), TemporaryAssembliesMixin(pluginManager, assemblyConfigSchema), WebSessionConnectionsMixin(pluginManager), DockviewLayoutMixin(), AppFocusMixin(), SnackbarModel()))
|
|
18
18
|
.props({
|
|
19
19
|
margin: 0,
|
|
20
20
|
sessionPlugins: types.array(types.frozen()),
|
|
@@ -86,10 +86,14 @@ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
|
|
|
86
86
|
self.root.setPluginsUpdated(true);
|
|
87
87
|
},
|
|
88
88
|
removeSessionPlugin(pluginDefinition) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
const def = pluginDefinition;
|
|
90
|
+
self.sessionPlugins = cast(self.sessionPlugins.filter(plugin => {
|
|
91
|
+
const p = plugin;
|
|
92
|
+
return (p.url !== def.url ||
|
|
93
|
+
p.umdUrl !== def.umdUrl ||
|
|
94
|
+
p.cjsUrl !== def.cjsUrl ||
|
|
95
|
+
p.esmUrl !== def.esmUrl);
|
|
96
|
+
}));
|
|
93
97
|
getParent(self).setPluginsUpdated(true);
|
|
94
98
|
},
|
|
95
99
|
addSavedSession(sessionSnapshot) {
|
|
@@ -129,60 +133,39 @@ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
|
|
|
129
133
|
.actions(self => ({
|
|
130
134
|
editTrackConfiguration(configuration) {
|
|
131
135
|
const { adminMode, sessionTracks } = self;
|
|
132
|
-
|
|
136
|
+
const trackId = configuration.trackId;
|
|
137
|
+
const isSessionTrack = sessionTracks.some(t => t.trackId === trackId);
|
|
138
|
+
if (!adminMode && !isSessionTrack) {
|
|
133
139
|
throw new Error("Can't edit the configuration of a non-session track");
|
|
134
140
|
}
|
|
135
141
|
self.editConfiguration(configuration);
|
|
136
142
|
},
|
|
137
143
|
}))
|
|
138
144
|
.views(self => ({
|
|
139
|
-
|
|
145
|
+
getTrackActions(config) {
|
|
140
146
|
const { adminMode, sessionTracks } = self;
|
|
141
147
|
const canEdit = adminMode || sessionTracks.find(t => t.trackId === config.trackId);
|
|
142
148
|
const isRefSeq = config.type === 'ReferenceSequenceTrack';
|
|
143
149
|
return [
|
|
144
|
-
{
|
|
145
|
-
label: 'About track',
|
|
146
|
-
priority: 1002,
|
|
147
|
-
onClick: () => {
|
|
148
|
-
self.queueDialog(handleClose => [
|
|
149
|
-
AboutDialog,
|
|
150
|
-
{
|
|
151
|
-
config,
|
|
152
|
-
handleClose,
|
|
153
|
-
},
|
|
154
|
-
]);
|
|
155
|
-
},
|
|
156
|
-
icon: InfoIcon,
|
|
157
|
-
},
|
|
158
150
|
{
|
|
159
151
|
label: 'Settings',
|
|
160
|
-
priority: 1001,
|
|
161
152
|
disabled: !canEdit,
|
|
162
153
|
icon: SettingsIcon,
|
|
163
154
|
onClick: () => {
|
|
164
155
|
self.editTrackConfiguration(config);
|
|
165
156
|
},
|
|
166
157
|
},
|
|
167
|
-
{
|
|
168
|
-
label: 'Delete track',
|
|
169
|
-
priority: 1000,
|
|
170
|
-
disabled: !canEdit || isRefSeq,
|
|
171
|
-
icon: DeleteIcon,
|
|
172
|
-
onClick: () => {
|
|
173
|
-
self.deleteTrackConf(config);
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
158
|
{
|
|
177
159
|
label: 'Copy track',
|
|
178
|
-
priority: 999,
|
|
179
160
|
disabled: isRefSeq,
|
|
180
161
|
onClick: () => {
|
|
181
|
-
const snap = structuredClone(getSnapshot(config));
|
|
162
|
+
const snap = structuredClone(isStateTreeNode(config) ? getSnapshot(config) : config);
|
|
182
163
|
const now = Date.now();
|
|
183
164
|
snap.trackId += `-${now}`;
|
|
184
|
-
|
|
185
|
-
display.
|
|
165
|
+
if (snap.displays) {
|
|
166
|
+
for (const display of snap.displays) {
|
|
167
|
+
display.displayId += `-${now}`;
|
|
168
|
+
}
|
|
186
169
|
}
|
|
187
170
|
if (!self.adminMode) {
|
|
188
171
|
snap.trackId += '-sessionTrack';
|
|
@@ -193,6 +176,63 @@ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
|
|
|
193
176
|
},
|
|
194
177
|
icon: CopyIcon,
|
|
195
178
|
},
|
|
179
|
+
{
|
|
180
|
+
label: 'Delete track',
|
|
181
|
+
disabled: !canEdit || isRefSeq,
|
|
182
|
+
icon: DeleteIcon,
|
|
183
|
+
onClick: () => {
|
|
184
|
+
self.deleteTrackConf(config);
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
];
|
|
188
|
+
},
|
|
189
|
+
}))
|
|
190
|
+
.views(self => ({
|
|
191
|
+
getTrackListMenuItems(config) {
|
|
192
|
+
return [
|
|
193
|
+
{
|
|
194
|
+
label: 'About track',
|
|
195
|
+
onClick: () => {
|
|
196
|
+
self.queueDialog(handleClose => [
|
|
197
|
+
AboutDialog,
|
|
198
|
+
{
|
|
199
|
+
config,
|
|
200
|
+
handleClose,
|
|
201
|
+
session: self,
|
|
202
|
+
},
|
|
203
|
+
]);
|
|
204
|
+
},
|
|
205
|
+
icon: InfoIcon,
|
|
206
|
+
},
|
|
207
|
+
...self.getTrackActions(config),
|
|
208
|
+
];
|
|
209
|
+
},
|
|
210
|
+
getTrackActionMenuItems(config, extraTrackActions) {
|
|
211
|
+
return [
|
|
212
|
+
{
|
|
213
|
+
label: 'About track',
|
|
214
|
+
priority: 1002,
|
|
215
|
+
onClick: () => {
|
|
216
|
+
self.queueDialog(handleClose => [
|
|
217
|
+
AboutDialog,
|
|
218
|
+
{
|
|
219
|
+
config,
|
|
220
|
+
handleClose,
|
|
221
|
+
session: self,
|
|
222
|
+
},
|
|
223
|
+
]);
|
|
224
|
+
},
|
|
225
|
+
icon: InfoIcon,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
type: 'subMenu',
|
|
229
|
+
label: 'Track actions',
|
|
230
|
+
priority: 1001,
|
|
231
|
+
subMenu: [
|
|
232
|
+
...self.getTrackActions(config),
|
|
233
|
+
...(extraTrackActions || []),
|
|
234
|
+
],
|
|
235
|
+
},
|
|
196
236
|
{ type: 'divider' },
|
|
197
237
|
];
|
|
198
238
|
},
|
|
@@ -202,10 +242,10 @@ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
|
|
|
202
242
|
}))
|
|
203
243
|
.actions(self => ({
|
|
204
244
|
afterAttach() {
|
|
205
|
-
addDisposer(self, autorun(()
|
|
245
|
+
addDisposer(self, autorun(function sessionLocalStorageAutorun() {
|
|
206
246
|
localStorageSetItem('drawerPosition', self.drawerPosition);
|
|
207
247
|
localStorageSetItem('themeName', self.themeName);
|
|
208
|
-
}));
|
|
248
|
+
}, { name: 'SessionLocalStorage' }));
|
|
209
249
|
},
|
|
210
250
|
}));
|
|
211
251
|
const extendedSessionModel = pluginManager.evaluateExtensionPoint('Core-extendSession', sessionModel);
|
|
@@ -1,153 +1,14 @@
|
|
|
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
|
-
export declare function WebSessionConnectionsMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
5
|
-
connectionInstances: import("mobx-state-tree").IArrayType<import("mobx-state-tree").
|
|
6
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
-
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
8
|
-
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
9
|
-
name: {
|
|
10
|
-
type: string;
|
|
11
|
-
defaultValue: string;
|
|
12
|
-
description: string;
|
|
13
|
-
};
|
|
14
|
-
assemblyNames: {
|
|
15
|
-
type: string;
|
|
16
|
-
defaultValue: never[];
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
20
|
-
}, {
|
|
21
|
-
connect(_arg: AnyConfigurationModel): void;
|
|
22
|
-
} & {
|
|
23
|
-
afterAttach(): void;
|
|
24
|
-
addTrackConf(trackConf: ({
|
|
25
|
-
[x: string]: any;
|
|
26
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
27
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
28
|
-
[x: string]: any;
|
|
29
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
30
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
33
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
34
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
|
|
35
|
-
addTrackConfs(trackConfs: (({
|
|
36
|
-
[x: string]: any;
|
|
37
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
38
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
39
|
-
[x: string]: any;
|
|
40
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
41
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
42
|
-
[x: string]: any;
|
|
43
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
44
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
45
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
|
|
46
|
-
setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
|
|
47
|
-
clear(): void;
|
|
48
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
4
|
+
export declare function WebSessionConnectionsMixin(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
|
|
5
|
+
connectionInstances: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
|
|
49
6
|
} & {
|
|
50
|
-
sessionConnections: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
7
|
+
sessionConnections: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
|
|
51
8
|
}, {
|
|
52
9
|
readonly connections: BaseConnectionConfigModel[];
|
|
53
10
|
} & {
|
|
54
|
-
makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}):
|
|
55
|
-
name: string;
|
|
56
|
-
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>>;
|
|
57
|
-
configuration: {
|
|
58
|
-
[x: string]: any;
|
|
59
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
60
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
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 & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
66
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
67
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
68
|
-
name: {
|
|
69
|
-
type: string;
|
|
70
|
-
defaultValue: string;
|
|
71
|
-
description: string;
|
|
72
|
-
};
|
|
73
|
-
assemblyNames: {
|
|
74
|
-
type: string;
|
|
75
|
-
defaultValue: never[];
|
|
76
|
-
description: string;
|
|
77
|
-
};
|
|
78
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>;
|
|
79
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
80
|
-
connect(_arg: AnyConfigurationModel): void;
|
|
81
|
-
} & {
|
|
82
|
-
afterAttach(): void;
|
|
83
|
-
addTrackConf(trackConf: ({
|
|
84
|
-
[x: string]: any;
|
|
85
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
86
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
87
|
-
[x: string]: any;
|
|
88
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
89
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
90
|
-
[x: string]: any;
|
|
91
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
92
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
93
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
|
|
94
|
-
addTrackConfs(trackConfs: (({
|
|
95
|
-
[x: string]: any;
|
|
96
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
97
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
98
|
-
[x: string]: any;
|
|
99
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
100
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
101
|
-
[x: string]: any;
|
|
102
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
103
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
104
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
|
|
105
|
-
setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
|
|
106
|
-
clear(): void;
|
|
107
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
108
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
109
|
-
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
110
|
-
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
111
|
-
name: {
|
|
112
|
-
type: string;
|
|
113
|
-
defaultValue: string;
|
|
114
|
-
description: string;
|
|
115
|
-
};
|
|
116
|
-
assemblyNames: {
|
|
117
|
-
type: string;
|
|
118
|
-
defaultValue: never[];
|
|
119
|
-
description: string;
|
|
120
|
-
};
|
|
121
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
122
|
-
}, {
|
|
123
|
-
connect(_arg: AnyConfigurationModel): void;
|
|
124
|
-
} & {
|
|
125
|
-
afterAttach(): void;
|
|
126
|
-
addTrackConf(trackConf: ({
|
|
127
|
-
[x: string]: any;
|
|
128
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
129
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
130
|
-
[x: string]: any;
|
|
131
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
132
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
133
|
-
[x: string]: any;
|
|
134
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
135
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
136
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
|
|
137
|
-
addTrackConfs(trackConfs: (({
|
|
138
|
-
[x: string]: any;
|
|
139
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
140
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
141
|
-
[x: string]: any;
|
|
142
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
143
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
144
|
-
[x: string]: any;
|
|
145
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
146
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
147
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
|
|
148
|
-
setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
|
|
149
|
-
clear(): void;
|
|
150
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
11
|
+
makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}): any;
|
|
151
12
|
prepareToBreakConnection(configuration: AnyConfigurationModel): (Record<string, number> | (() => void))[] | undefined;
|
|
152
13
|
breakConnection(configuration: AnyConfigurationModel): void;
|
|
153
14
|
deleteConnection(configuration: AnyConfigurationModel): any;
|
|
@@ -156,4 +17,8 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
|
|
|
156
17
|
} & {
|
|
157
18
|
addConnectionConf(connectionConf: BaseConnectionConfigModel): any;
|
|
158
19
|
deleteConnection(configuration: AnyConfigurationModel): any;
|
|
159
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree").
|
|
20
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
|
|
21
|
+
connectionInstances: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
|
|
22
|
+
} & {
|
|
23
|
+
sessionConnections: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
|
|
24
|
+
}>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { types } from '@jbrowse/mobx-state-tree';
|
|
1
2
|
import { ConnectionManagementSessionMixin } from '@jbrowse/product-core';
|
|
2
|
-
import { types } from 'mobx-state-tree';
|
|
3
3
|
export function WebSessionConnectionsMixin(pluginManager) {
|
|
4
4
|
return types
|
|
5
5
|
.compose('SessionConnectionsManagement', ConnectionManagementSessionMixin(pluginManager), types.model({
|
|
@@ -42,5 +42,15 @@ export function WebSessionConnectionsMixin(pluginManager) {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
|
+
})
|
|
46
|
+
.postProcessSnapshot(snap => {
|
|
47
|
+
if (!snap) {
|
|
48
|
+
return snap;
|
|
49
|
+
}
|
|
50
|
+
const { sessionConnections, ...rest } = snap;
|
|
51
|
+
return {
|
|
52
|
+
...rest,
|
|
53
|
+
...(sessionConnections.length ? { sessionConnections } : {}),
|
|
54
|
+
};
|
|
45
55
|
});
|
|
46
56
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './SessionConnections';
|
|
2
|
-
export * from './BaseWebSession';
|
|
1
|
+
export * from './SessionConnections.ts';
|
|
2
|
+
export * from './BaseWebSession/index.ts';
|
package/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./SessionConnections.js";
|
|
2
|
+
export * from "./BaseWebSession/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/web-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "JBrowse 2 code shared between web-app type products",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -18,40 +18,19 @@
|
|
|
18
18
|
"directory": "packages/web-core"
|
|
19
19
|
},
|
|
20
20
|
"author": "JBrowse Team",
|
|
21
|
-
"
|
|
22
|
-
"distModule": "esm/index.js",
|
|
23
|
-
"srcMain": "src/index.ts",
|
|
24
|
-
"srcModule": "src/index.ts",
|
|
25
|
-
"main": "dist/index.js",
|
|
26
|
-
"module": "esm/index.js",
|
|
21
|
+
"main": "esm/index.js",
|
|
27
22
|
"files": [
|
|
28
|
-
"dist",
|
|
29
23
|
"esm"
|
|
30
24
|
],
|
|
31
|
-
"scripts": {
|
|
32
|
-
"build:esm": "tsc --build tsconfig.build.esm.json",
|
|
33
|
-
"build:commonjs": "tsc --build tsconfig.build.commonjs.json",
|
|
34
|
-
"build": "npm run build:esm && npm run build:commonjs",
|
|
35
|
-
"test": "cd ../..; jest --passWithNoTests packages/web-core",
|
|
36
|
-
"clean": "rimraf dist esm *.tsbuildinfo",
|
|
37
|
-
"prebuild": "yarn clean",
|
|
38
|
-
"prepack": "yarn build && yarn useDist",
|
|
39
|
-
"postpack": "yarn useSrc",
|
|
40
|
-
"useDist": "node ../../scripts/useDist.js",
|
|
41
|
-
"useSrc": "node ../../scripts/useSrc.js"
|
|
42
|
-
},
|
|
43
25
|
"dependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"@
|
|
47
|
-
"@mui/
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"mobx-state-tree": "^5.0.0",
|
|
53
|
-
"rxjs": "^7.0.0",
|
|
54
|
-
"tss-react": "^4.0.0"
|
|
26
|
+
"@jbrowse/mobx-state-tree": "^5.5.0",
|
|
27
|
+
"dockview-core": "^4.13.1",
|
|
28
|
+
"@mui/icons-material": "^7.3.6",
|
|
29
|
+
"@mui/material": "^7.3.6",
|
|
30
|
+
"mobx": "^6.15.0",
|
|
31
|
+
"@jbrowse/core": "^4.0.0",
|
|
32
|
+
"@jbrowse/app-core": "^4.0.0",
|
|
33
|
+
"@jbrowse/product-core": "^4.0.0"
|
|
55
34
|
},
|
|
56
35
|
"peerDependencies": {
|
|
57
36
|
"react": ">=18.0.0",
|
|
@@ -60,5 +39,19 @@
|
|
|
60
39
|
"publishConfig": {
|
|
61
40
|
"access": "public"
|
|
62
41
|
},
|
|
63
|
-
"
|
|
64
|
-
|
|
42
|
+
"sideEffects": false,
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build:esm": "tsc -p tsconfig.build.esm.json",
|
|
45
|
+
"build": "pnpm build:esm",
|
|
46
|
+
"test": "cd ../..; jest --passWithNoTests packages/web-core",
|
|
47
|
+
"clean": "rimraf esm *.tsbuildinfo",
|
|
48
|
+
"prebuild": "pnpm clean"
|
|
49
|
+
},
|
|
50
|
+
"types": "esm/index.d.ts",
|
|
51
|
+
"exports": {
|
|
52
|
+
".": {
|
|
53
|
+
"types": "./esm/index.d.ts",
|
|
54
|
+
"import": "./esm/index.js"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AboutDialog as default } from '@jbrowse/product-core';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var product_core_1 = require("@jbrowse/product-core");
|
|
5
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return product_core_1.AboutDialog; } });
|