@jbrowse/web-core 2.18.0 → 3.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/dist/BaseWebSession/index.d.ts +77 -14628
- package/dist/BaseWebSession/index.js +18 -7
- package/dist/SessionConnections.d.ts +2 -23
- package/dist/SessionConnections.js +18 -17
- package/esm/BaseWebSession/index.d.ts +77 -14628
- package/esm/BaseWebSession/index.js +1 -0
- package/esm/SessionConnections.d.ts +2 -23
- package/esm/SessionConnections.js +18 -17
- package/package.json +9 -9
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -222,6 +232,7 @@ function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
|
|
|
222
232
|
},
|
|
223
233
|
icon: FileCopy_1.default,
|
|
224
234
|
},
|
|
235
|
+
{ type: 'divider' },
|
|
225
236
|
];
|
|
226
237
|
},
|
|
227
238
|
menus() {
|
|
@@ -49,28 +49,7 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
|
|
|
49
49
|
} & {
|
|
50
50
|
sessionConnections: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
51
51
|
}, {
|
|
52
|
-
readonly connections:
|
|
53
|
-
[x: string]: any;
|
|
54
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
55
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
56
|
-
[x: string]: any;
|
|
57
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
58
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
59
|
-
[x: string]: any;
|
|
60
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
61
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
62
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
63
|
-
name: {
|
|
64
|
-
type: string;
|
|
65
|
-
defaultValue: string;
|
|
66
|
-
description: string;
|
|
67
|
-
};
|
|
68
|
-
assemblyNames: {
|
|
69
|
-
type: string;
|
|
70
|
-
defaultValue: never[];
|
|
71
|
-
description: string;
|
|
72
|
-
};
|
|
73
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>)[];
|
|
52
|
+
readonly connections: BaseConnectionConfigModel[];
|
|
74
53
|
} & {
|
|
75
54
|
makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}): ({
|
|
76
55
|
name: string;
|
|
@@ -176,5 +155,5 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
|
|
|
176
155
|
clearConnections(): void;
|
|
177
156
|
} & {
|
|
178
157
|
addConnectionConf(connectionConf: BaseConnectionConfigModel): any;
|
|
179
|
-
deleteConnection(configuration: AnyConfigurationModel):
|
|
158
|
+
deleteConnection(configuration: AnyConfigurationModel): any;
|
|
180
159
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -17,31 +17,32 @@ function WebSessionConnectionsMixin(pluginManager) {
|
|
|
17
17
|
if (self.adminMode) {
|
|
18
18
|
return superAddConnectionConf(connectionConf);
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
else {
|
|
21
|
+
const { connectionId, type } = connectionConf;
|
|
22
|
+
if (!type) {
|
|
23
|
+
throw new Error(`unknown connection type ${type}`);
|
|
24
|
+
}
|
|
25
|
+
const connection = self.sessionTracks.find(c => c.connectionId === connectionId);
|
|
26
|
+
if (connection) {
|
|
27
|
+
return connection;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const length = self.sessionConnections.push(connectionConf);
|
|
31
|
+
return self.sessionConnections[length - 1];
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
|
-
const length = self.sessionConnections.push(connectionConf);
|
|
29
|
-
return self.sessionConnections[length - 1];
|
|
30
34
|
},
|
|
31
35
|
deleteConnection(configuration) {
|
|
32
|
-
let deletedConn;
|
|
33
36
|
if (self.adminMode) {
|
|
34
|
-
|
|
37
|
+
return superDeleteConnection(configuration);
|
|
35
38
|
}
|
|
36
|
-
|
|
39
|
+
else {
|
|
37
40
|
const { connectionId } = configuration;
|
|
38
41
|
const idx = self.sessionConnections.findIndex(c => c.connectionId === connectionId);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return self.sessionConnections.splice(idx, 1);
|
|
42
|
+
return idx === -1
|
|
43
|
+
? undefined
|
|
44
|
+
: self.sessionConnections.splice(idx, 1);
|
|
43
45
|
}
|
|
44
|
-
return deletedConn;
|
|
45
46
|
},
|
|
46
47
|
};
|
|
47
48
|
});
|