@jbrowse/core 1.5.0 → 1.5.4
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/BaseFeatureWidget/BaseFeatureDetail.d.ts +4 -2
- package/BaseFeatureWidget/BaseFeatureDetail.js +43 -16
- package/BaseFeatureWidget/SequenceFeatureDetails.js +5 -4
- package/BaseFeatureWidget/index.js +1 -1
- package/BaseFeatureWidget/util.js +5 -5
- package/CorePlugin.d.ts +0 -1
- package/CorePlugin.js +13 -1
- package/PluginLoader.d.ts +25 -2
- package/PluginLoader.js +334 -47
- package/PluginManager.d.ts +9 -7
- package/PluginManager.js +1 -5
- package/ReExports/list.js +1 -1
- package/ReExports/material-ui-colors.js +38 -38
- package/ReExports/modules.d.ts +11 -13
- package/ReExports/modules.js +8 -2
- package/TextSearch/BaseResults.js +1 -1
- package/TextSearch/TextSearchManager.d.ts +2 -2
- package/TextSearch/TextSearchManager.js +0 -2
- package/assemblyManager/assembly.d.ts +21 -8
- package/assemblyManager/assembly.js +165 -122
- package/assemblyManager/assemblyConfigSchema.d.ts +3 -0
- package/assemblyManager/{assemblyConfigSchemas.js → assemblyConfigSchema.js} +35 -27
- package/assemblyManager/assemblyManager.d.ts +126 -45
- package/assemblyManager/index.d.ts +1 -1
- package/assemblyManager/index.js +5 -5
- package/configuration/configurationSchema.js +7 -7
- package/configuration/configurationSlot.js +3 -1
- package/configuration/index.js +4 -4
- package/configuration/util.js +2 -2
- package/data_adapters/BaseAdapter.d.ts +5 -5
- package/data_adapters/BaseAdapter.js +9 -18
- package/data_adapters/CytobandAdapter.d.ts +8 -0
- package/data_adapters/CytobandAdapter.js +128 -0
- package/data_adapters/dataAdapterCache.js +2 -2
- package/package.json +9 -8
- package/pluggableElementTypes/AdapterType.d.ts +9 -1
- package/pluggableElementTypes/AdapterType.js +23 -1
- package/pluggableElementTypes/ConnectionType.js +3 -1
- package/pluggableElementTypes/DisplayType.js +3 -1
- package/pluggableElementTypes/InternetAccountType.js +3 -1
- package/pluggableElementTypes/PluggableElementBase.js +4 -3
- package/pluggableElementTypes/RpcMethodType.js +2 -4
- package/pluggableElementTypes/TextSearchAdapterType.js +3 -1
- package/pluggableElementTypes/WidgetType.js +3 -1
- package/pluggableElementTypes/index.d.ts +6 -3
- package/pluggableElementTypes/index.js +127 -1
- package/pluggableElementTypes/models/BaseDisplayModel.js +2 -2
- package/pluggableElementTypes/models/BaseTrackModel.js +4 -3
- package/pluggableElementTypes/models/BaseViewModel.js +6 -2
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +2 -2
- package/pluggableElementTypes/models/baseTrackConfig.js +2 -2
- package/pluggableElementTypes/models/index.js +14 -14
- package/pluggableElementTypes/renderers/BoxRendererType.js +3 -3
- package/pluggableElementTypes/renderers/CircularChordRendererType.js +3 -1
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +2 -2
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/FeatureRendererType.js +4 -4
- package/pluggableElementTypes/renderers/RendererType.js +3 -1
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +2 -2
- package/pluggableElementTypes/renderers/index.d.ts +9 -0
- package/pluggableElementTypes/renderers/index.js +63 -0
- package/rpc/BaseRpcDriver.d.ts +1 -1
- package/rpc/BaseRpcDriver.js +3 -5
- package/rpc/BaseRpcDriver.test.js +1 -1
- package/rpc/RpcManager.d.ts +3 -3
- package/rpc/RpcManager.js +44 -22
- package/rpc/WebWorkerRpcDriver.d.ts +2 -2
- package/rpc/WebWorkerRpcDriver.js +5 -7
- package/rpc/coreRpcMethods.js +3 -3
- package/rpc/remoteAbortSignals.js +2 -2
- package/ui/App.js +13 -12
- package/ui/DrawerWidget.js +10 -3
- package/ui/EditableTypography.js +2 -2
- package/ui/ErrorMessage.d.ts +5 -0
- package/ui/ErrorMessage.js +54 -0
- package/ui/FileSelector/FileSelector.js +75 -100
- package/ui/Icons.js +4 -4
- package/ui/Logo.js +1 -1
- package/ui/Menu.js +2 -2
- package/ui/NewSessionCards.js +2 -2
- package/ui/PrerenderedCanvas.d.ts +1 -0
- package/ui/PrerenderedCanvas.js +6 -3
- package/ui/SanitizedHTML.js +1 -1
- package/ui/SnackbarModel.d.ts +16 -0
- package/ui/SnackbarModel.js +56 -0
- package/ui/ViewContainer.js +4 -3
- package/ui/index.js +24 -24
- package/ui/theme.js +7 -5
- package/util/Base1DViewModel.js +2 -2
- package/util/aborting.js +7 -4
- package/util/blockTypes.js +8 -11
- package/util/calculateDynamicBlocks.test.js +2 -2
- package/util/color/cssColorsLevel4.js +1 -1
- package/util/color/index.js +5 -5
- package/util/compositeMap.js +3 -11
- package/util/index.d.ts +3 -1
- package/util/index.js +75 -32
- package/util/index.test.js +2 -2
- package/util/io/RemoteFileWithRangeCache.js +3 -3
- package/util/io/index.js +1 -1
- package/util/jexl.js +4 -1
- package/util/layouts/BaseLayout.d.ts +3 -0
- package/util/layouts/GranularRectLayout.d.ts +19 -10
- package/util/layouts/GranularRectLayout.js +459 -100
- package/util/layouts/GranularRectLayout.test.js +57 -10
- package/util/layouts/MultiLayout.d.ts +1 -1
- package/util/layouts/MultiLayout.js +0 -2
- package/util/layouts/PrecomputedLayout.js +2 -1
- package/util/layouts/PrecomputedMultiLayout.js +5 -3
- package/util/layouts/SceneGraph.d.ts +3 -3
- package/util/layouts/SceneGraph.js +0 -14
- package/util/layouts/index.d.ts +7 -0
- package/util/layouts/index.js +68 -0
- package/util/mst-reflection.d.ts +3 -3
- package/util/mst-reflection.js +3 -3
- package/util/offscreenCanvasPonyfill.js +1 -1
- package/util/range.js +1 -1
- package/util/simpleFeature.js +3 -3
- package/util/stats.js +4 -4
- package/util/tracks.d.ts +30 -433
- package/util/tracks.js +72 -192
- package/util/types/index.d.ts +14 -2
- package/util/types/index.js +21 -18
- package/util/types/mst.js +6 -6
- package/assemblyManager/assemblyConfigSchemas.d.ts +0 -7
- package/value.d.ts +0 -1
- package/value.js +0 -10
package/util/tracks.js
CHANGED
|
@@ -3,22 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
6
|
+
exports.UNSUPPORTED = exports.UNKNOWN = void 0;
|
|
7
|
+
exports.generateUnknownTrackConf = generateUnknownTrackConf;
|
|
8
|
+
exports.generateUnsupportedTrackConf = generateUnsupportedTrackConf;
|
|
9
9
|
exports.getBlob = getBlob;
|
|
10
10
|
exports.getBlobMap = getBlobMap;
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
11
|
+
exports.getFileName = getFileName;
|
|
12
|
+
exports.getParentRenderProps = getParentRenderProps;
|
|
13
|
+
exports.getRpcSessionId = getRpcSessionId;
|
|
14
|
+
exports.getTrackAssemblyNames = getTrackAssemblyNames;
|
|
13
15
|
exports.guessAdapter = guessAdapter;
|
|
14
16
|
exports.guessTrackType = guessTrackType;
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
17
|
+
exports.makeIndex = makeIndex;
|
|
18
|
+
exports.makeIndexType = makeIndexType;
|
|
19
|
+
exports.setBlobMap = setBlobMap;
|
|
20
|
+
exports.storeBlobLocation = storeBlobLocation;
|
|
18
21
|
|
|
19
22
|
var _mobxStateTree = require("mobx-state-tree");
|
|
20
23
|
|
|
21
|
-
var
|
|
24
|
+
var _index2 = require("./index");
|
|
22
25
|
|
|
23
26
|
var _configuration = require("../configuration");
|
|
24
27
|
|
|
@@ -112,187 +115,63 @@ function storeBlobLocation(location) {
|
|
|
112
115
|
|
|
113
116
|
return location;
|
|
114
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* creates a new location from the provided location including the appropriate suffix and location type
|
|
120
|
+
* @param location - the FileLocation
|
|
121
|
+
* @param suffix - the file suffix (e.g. .bam)
|
|
122
|
+
* @returns the constructed location object from the provided prameters
|
|
123
|
+
*/
|
|
115
124
|
|
|
116
|
-
function guessAdapter(file, index, getFileName, adapterHint) {
|
|
117
|
-
function makeIndex(location, suffix) {
|
|
118
|
-
if ('uri' in location) {
|
|
119
|
-
return {
|
|
120
|
-
uri: location.uri + suffix,
|
|
121
|
-
locationType: 'UriLocation'
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if ('localPath' in location) {
|
|
126
|
-
return {
|
|
127
|
-
localPath: location.localPath + suffix,
|
|
128
|
-
locationType: 'LocalPathLocation'
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return location;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
var fileName = getFileName(file);
|
|
136
|
-
var indexName = index && getFileName(index);
|
|
137
|
-
|
|
138
|
-
function makeIndexType(name, typeA, typeB) {
|
|
139
|
-
return name !== null && name !== void 0 && name.toUpperCase().endsWith(typeA) ? typeA : typeB;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (/\.bam$/i.test(fileName) || adapterHint === 'BamAdapter') {
|
|
143
|
-
return {
|
|
144
|
-
type: 'BamAdapter',
|
|
145
|
-
bamLocation: file,
|
|
146
|
-
index: {
|
|
147
|
-
location: index || makeIndex(file, '.bai'),
|
|
148
|
-
indexType: makeIndexType(indexName, 'CSI', 'BAI')
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (/\.cram$/i.test(fileName) || adapterHint === 'CramAdapter') {
|
|
154
|
-
return {
|
|
155
|
-
type: 'CramAdapter',
|
|
156
|
-
cramLocation: file,
|
|
157
|
-
craiLocation: index || makeIndex(file, '.crai')
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (/\.gff3?$/i.test(fileName)) {
|
|
162
|
-
return {
|
|
163
|
-
type: 'Gff3Adapter',
|
|
164
|
-
gffLocation: file
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (/\.gff3?\.b?gz$/i.test(fileName) || adapterHint === 'Gff3TabixAdapter') {
|
|
169
|
-
return {
|
|
170
|
-
type: 'Gff3TabixAdapter',
|
|
171
|
-
gffGzLocation: file,
|
|
172
|
-
index: {
|
|
173
|
-
location: index || makeIndex(file, '.tbi'),
|
|
174
|
-
indexType: makeIndexType(indexName, 'CSI', 'TBI')
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (/\.gtf?$/i.test(fileName)) {
|
|
180
|
-
return {
|
|
181
|
-
type: 'UNSUPPORTED'
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if (/\.vcf$/i.test(fileName) || adapterHint === 'VcfAdapter') {
|
|
186
|
-
return {
|
|
187
|
-
type: 'VcfAdapter',
|
|
188
|
-
vcfLocation: file
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (/\.vcf\.b?gz$/i.test(fileName) || adapterHint === 'VcfTabixAdapter') {
|
|
193
|
-
return {
|
|
194
|
-
type: 'VcfTabixAdapter',
|
|
195
|
-
vcfGzLocation: file,
|
|
196
|
-
index: {
|
|
197
|
-
location: index || makeIndex(file, '.tbi'),
|
|
198
|
-
indexType: makeIndexType(indexName, 'CSI', 'TBI')
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (/\.vcf\.idx$/i.test(fileName)) {
|
|
204
|
-
return {
|
|
205
|
-
type: 'UNSUPPORTED'
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (/\.bed$/i.test(fileName)) {
|
|
210
|
-
return {
|
|
211
|
-
type: 'UNSUPPORTED'
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
if (/\.bed\.b?gz$/i.test(fileName) || adapterHint === 'BedTabixAdapter') {
|
|
216
|
-
return {
|
|
217
|
-
type: 'BedTabixAdapter',
|
|
218
|
-
bedGzLocation: file,
|
|
219
|
-
index: {
|
|
220
|
-
location: index || makeIndex(file, '.tbi'),
|
|
221
|
-
indexType: makeIndexType(indexName, 'CSI', 'TBI')
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
if (/\.(bb|bigbed)$/i.test(fileName) || adapterHint === 'BigBedAdapter') {
|
|
227
|
-
return {
|
|
228
|
-
type: 'BigBedAdapter',
|
|
229
|
-
bigBedLocation: file
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (/\.(bw|bigwig)$/i.test(fileName) || adapterHint === 'BigWigAdapter') {
|
|
234
|
-
return {
|
|
235
|
-
type: 'BigWigAdapter',
|
|
236
|
-
bigWigLocation: file
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
if (/\.(fa|fasta|fas|fna|mfa)$/i.test(fileName) || adapterHint === 'IndexedFastaAdapter') {
|
|
241
|
-
return {
|
|
242
|
-
type: 'IndexedFastaAdapter',
|
|
243
|
-
fastaLocation: file,
|
|
244
|
-
faiLocation: index || makeIndex(file, '.fai')
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
125
|
|
|
248
|
-
|
|
126
|
+
function makeIndex(location, suffix) {
|
|
127
|
+
if ('uri' in location) {
|
|
249
128
|
return {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
faiLocation: makeIndex(file, '.fai'),
|
|
253
|
-
gziLocation: makeIndex(file, '.gzi')
|
|
129
|
+
uri: location.uri + suffix,
|
|
130
|
+
locationType: 'UriLocation'
|
|
254
131
|
};
|
|
255
132
|
}
|
|
256
133
|
|
|
257
|
-
if (
|
|
134
|
+
if ('localPath' in location) {
|
|
258
135
|
return {
|
|
259
|
-
|
|
260
|
-
|
|
136
|
+
localPath: location.localPath + suffix,
|
|
137
|
+
locationType: 'LocalPathLocation'
|
|
261
138
|
};
|
|
262
139
|
}
|
|
263
140
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
141
|
+
return location;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* constructs a potential index file (with suffix) from the provided file name
|
|
145
|
+
* @param name - the name of the index file
|
|
146
|
+
* @param typeA - one option of a potential two file suffix (e.g. CSI, BAI)
|
|
147
|
+
* @param typeB - the second option of a potential two file suffix (e.g. CSI, BAI)
|
|
148
|
+
* @returns a likely name of the index file for a given filename
|
|
149
|
+
*/
|
|
269
150
|
|
|
270
|
-
if (/\/trackData.jsonz?$/i.test(fileName) || adapterHint === 'NCListAdapter') {
|
|
271
|
-
return {
|
|
272
|
-
type: 'NCListAdapter',
|
|
273
|
-
rootUrlTemplate: file
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
151
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
endpoint: file
|
|
281
|
-
};
|
|
282
|
-
}
|
|
152
|
+
function makeIndexType(name, typeA, typeB) {
|
|
153
|
+
return name !== null && name !== void 0 && name.toUpperCase().endsWith(typeA) ? typeA : typeB;
|
|
154
|
+
}
|
|
283
155
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
156
|
+
function getFileName(track) {
|
|
157
|
+
var uri = 'uri' in track ? track.uri : undefined;
|
|
158
|
+
var localPath = 'localPath' in track ? track.localPath : undefined;
|
|
159
|
+
var blob = 'blobId' in track ? track : undefined;
|
|
160
|
+
return (blob === null || blob === void 0 ? void 0 : blob.name) || (uri === null || uri === void 0 ? void 0 : uri.slice(uri.lastIndexOf('/') + 1)) || (localPath === null || localPath === void 0 ? void 0 : localPath.slice(localPath.lastIndexOf('/') + 1)) || '';
|
|
161
|
+
}
|
|
290
162
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
163
|
+
function guessAdapter(file, index, adapterHint, model) {
|
|
164
|
+
if (model) {
|
|
165
|
+
// @ts-ignore
|
|
166
|
+
var session = (0, _index2.getSession)(model);
|
|
167
|
+
var adapterGuesser = (0, _mobxStateTree.getEnv)(session).pluginManager.evaluateExtensionPoint('Core-guessAdapterForLocation', function (_file, _index, _adapterHint) {
|
|
168
|
+
return undefined;
|
|
169
|
+
});
|
|
170
|
+
var adapter = adapterGuesser(file, index, adapterHint);
|
|
171
|
+
|
|
172
|
+
if (adapter) {
|
|
173
|
+
return adapter;
|
|
174
|
+
}
|
|
296
175
|
}
|
|
297
176
|
|
|
298
177
|
return {
|
|
@@ -300,20 +179,21 @@ function guessAdapter(file, index, getFileName, adapterHint) {
|
|
|
300
179
|
};
|
|
301
180
|
}
|
|
302
181
|
|
|
303
|
-
function guessTrackType(adapterType) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
|
|
182
|
+
function guessTrackType(adapterType, model) {
|
|
183
|
+
if (model) {
|
|
184
|
+
// @ts-ignore
|
|
185
|
+
var session = (0, _index2.getSession)(model);
|
|
186
|
+
var trackTypeGuesser = (0, _mobxStateTree.getEnv)(session).pluginManager.evaluateExtensionPoint('Core-guessTrackTypeForLocation', function (_adapterName) {
|
|
187
|
+
return undefined;
|
|
188
|
+
});
|
|
189
|
+
var trackType = trackTypeGuesser(adapterType);
|
|
190
|
+
|
|
191
|
+
if (trackType) {
|
|
192
|
+
return trackType;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return 'FeatureTrack';
|
|
317
197
|
}
|
|
318
198
|
|
|
319
199
|
function generateUnsupportedTrackConf(trackName, trackUrl, categories) {
|
|
@@ -324,7 +204,7 @@ function generateUnsupportedTrackConf(trackName, trackUrl, categories) {
|
|
|
324
204
|
category: categories,
|
|
325
205
|
trackId: ''
|
|
326
206
|
};
|
|
327
|
-
conf.trackId = (0,
|
|
207
|
+
conf.trackId = (0, _index2.objectHash)(conf);
|
|
328
208
|
return conf;
|
|
329
209
|
}
|
|
330
210
|
|
|
@@ -336,6 +216,6 @@ function generateUnknownTrackConf(trackName, trackUrl, categories) {
|
|
|
336
216
|
category: categories,
|
|
337
217
|
trackId: ''
|
|
338
218
|
};
|
|
339
|
-
conf.trackId = (0,
|
|
219
|
+
conf.trackId = (0, _index2.objectHash)(conf);
|
|
340
220
|
return conf;
|
|
341
221
|
}
|
package/util/types/index.d.ts
CHANGED
|
@@ -29,7 +29,10 @@ export interface JBrowsePlugin {
|
|
|
29
29
|
authors: string[];
|
|
30
30
|
description: string;
|
|
31
31
|
location: string;
|
|
32
|
-
url
|
|
32
|
+
url?: string;
|
|
33
|
+
umdUrl?: string;
|
|
34
|
+
esmUrl?: string;
|
|
35
|
+
cjsUrl?: string;
|
|
33
36
|
license: string;
|
|
34
37
|
image?: string;
|
|
35
38
|
}
|
|
@@ -61,7 +64,6 @@ export interface AbstractSessionModel extends AbstractViewContainer {
|
|
|
61
64
|
adminMode?: boolean;
|
|
62
65
|
showWidget?: Function;
|
|
63
66
|
addWidget?: Function;
|
|
64
|
-
addTrackConf?: Function;
|
|
65
67
|
DialogComponent?: DialogComponentType;
|
|
66
68
|
DialogProps: any;
|
|
67
69
|
queueDialog: (callback: (doneCallback: Function) => [DialogComponentType, any]) => void;
|
|
@@ -74,6 +76,11 @@ export interface SessionWithConfigEditing extends AbstractSessionModel {
|
|
|
74
76
|
editConfiguration(configuration: AnyConfigurationModel): void;
|
|
75
77
|
}
|
|
76
78
|
export declare function isSessionModelWithConfigEditing(thing: unknown): thing is SessionWithConfigEditing;
|
|
79
|
+
/** abstract interface for a session allows adding tracks */
|
|
80
|
+
export interface SessionWithConfigEditing extends AbstractSessionModel {
|
|
81
|
+
addTrackConf(configuration: AnyConfigurationModel | SnapshotIn<AnyConfigurationModel>): void;
|
|
82
|
+
}
|
|
83
|
+
export declare function isSessionWithAddTracks(thing: unknown): thing is SessionWithConfigEditing;
|
|
77
84
|
export interface Widget {
|
|
78
85
|
type: string;
|
|
79
86
|
id: string;
|
|
@@ -169,16 +176,21 @@ export interface NoAssemblyRegion extends SnapshotIn<typeof MUNoAssemblyRegion>
|
|
|
169
176
|
}
|
|
170
177
|
export interface Region extends SnapshotIn<typeof MUIRegion> {
|
|
171
178
|
}
|
|
179
|
+
export interface AugmentedRegion extends Region {
|
|
180
|
+
originalRefName?: string;
|
|
181
|
+
}
|
|
172
182
|
export interface LocalPathLocation extends SnapshotIn<typeof MULocalPathLocation> {
|
|
173
183
|
}
|
|
174
184
|
export interface UriLocation extends SnapshotIn<typeof MUUriLocation> {
|
|
175
185
|
}
|
|
176
186
|
export declare function isUriLocation(location: unknown): location is UriLocation;
|
|
177
187
|
export declare class AuthNeededError extends Error {
|
|
188
|
+
message: string;
|
|
178
189
|
location: UriLocation;
|
|
179
190
|
constructor(message: string, location: UriLocation);
|
|
180
191
|
}
|
|
181
192
|
export declare class RetryError extends Error {
|
|
193
|
+
message: string;
|
|
182
194
|
internetAccountId: string;
|
|
183
195
|
constructor(message: string, internetAccountId: string);
|
|
184
196
|
}
|
package/util/types/index.js
CHANGED
|
@@ -9,6 +9,7 @@ var _exportNames = {
|
|
|
9
9
|
isViewContainer: true,
|
|
10
10
|
isSessionModel: true,
|
|
11
11
|
isSessionModelWithConfigEditing: true,
|
|
12
|
+
isSessionWithAddTracks: true,
|
|
12
13
|
isSessionModelWithWidgets: true,
|
|
13
14
|
isSessionWithSessionPlugins: true,
|
|
14
15
|
isSelectionContainer: true,
|
|
@@ -24,22 +25,25 @@ var _exportNames = {
|
|
|
24
25
|
isAuthNeededException: true,
|
|
25
26
|
isRetryException: true
|
|
26
27
|
};
|
|
27
|
-
exports.
|
|
28
|
+
exports.RetryError = exports.AuthNeededError = void 0;
|
|
29
|
+
exports.isAbstractMenuManager = isAbstractMenuManager;
|
|
30
|
+
exports.isAppRootModel = isAppRootModel;
|
|
31
|
+
exports.isAuthNeededException = isAuthNeededException;
|
|
32
|
+
exports.isDisplayModel = isDisplayModel;
|
|
33
|
+
exports.isRetryException = isRetryException;
|
|
34
|
+
exports.isSelectionContainer = isSelectionContainer;
|
|
28
35
|
exports.isSessionModel = isSessionModel;
|
|
29
36
|
exports.isSessionModelWithConfigEditing = isSessionModelWithConfigEditing;
|
|
30
37
|
exports.isSessionModelWithWidgets = isSessionModelWithWidgets;
|
|
38
|
+
exports.isSessionWithAddTracks = isSessionWithAddTracks;
|
|
31
39
|
exports.isSessionWithSessionPlugins = isSessionWithSessionPlugins;
|
|
32
|
-
exports.isSelectionContainer = isSelectionContainer;
|
|
33
|
-
exports.isViewModel = isViewModel;
|
|
34
40
|
exports.isTrackModel = isTrackModel;
|
|
35
|
-
exports.isDisplayModel = isDisplayModel;
|
|
36
41
|
exports.isTrackViewModel = isTrackViewModel;
|
|
37
|
-
exports.isAppRootModel = isAppRootModel;
|
|
38
|
-
exports.isAbstractMenuManager = isAbstractMenuManager;
|
|
39
42
|
exports.isUriLocation = isUriLocation;
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
|
|
43
|
+
exports.isViewContainer = isViewContainer;
|
|
44
|
+
exports.isViewModel = isViewModel;
|
|
45
|
+
|
|
46
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
43
47
|
|
|
44
48
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
45
49
|
|
|
@@ -53,8 +57,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
53
57
|
|
|
54
58
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
55
59
|
|
|
56
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
57
|
-
|
|
58
60
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
59
61
|
|
|
60
62
|
var _mobxStateTree = require("mobx-state-tree");
|
|
@@ -90,6 +92,12 @@ function isSessionModel(thing) {
|
|
|
90
92
|
function isSessionModelWithConfigEditing(thing) {
|
|
91
93
|
return isSessionModel(thing) && 'editConfiguration' in thing;
|
|
92
94
|
}
|
|
95
|
+
/** abstract interface for a session allows adding tracks */
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
function isSessionWithAddTracks(thing) {
|
|
99
|
+
return isSessionModel(thing) && 'addTrackConf' in thing;
|
|
100
|
+
}
|
|
93
101
|
|
|
94
102
|
function isSessionModelWithWidgets(thing) {
|
|
95
103
|
return isSessionModel(thing) && 'widgets' in thing;
|
|
@@ -155,14 +163,12 @@ var AuthNeededError = /*#__PURE__*/function (_Error) {
|
|
|
155
163
|
|
|
156
164
|
(0, _classCallCheck2.default)(this, AuthNeededError);
|
|
157
165
|
_this = _super.call(this, message);
|
|
158
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "location", void 0);
|
|
159
|
-
_this.location = location;
|
|
160
166
|
_this.name = 'AuthNeededError';
|
|
161
167
|
Object.setPrototypeOf((0, _assertThisInitialized2.default)(_this), AuthNeededError.prototype);
|
|
162
168
|
return _this;
|
|
163
169
|
}
|
|
164
170
|
|
|
165
|
-
return AuthNeededError;
|
|
171
|
+
return (0, _createClass2.default)(AuthNeededError);
|
|
166
172
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
167
173
|
|
|
168
174
|
exports.AuthNeededError = AuthNeededError;
|
|
@@ -177,14 +183,11 @@ var RetryError = /*#__PURE__*/function (_Error2) {
|
|
|
177
183
|
|
|
178
184
|
(0, _classCallCheck2.default)(this, RetryError);
|
|
179
185
|
_this2 = _super2.call(this, message);
|
|
180
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "internetAccountId", void 0);
|
|
181
|
-
_this2.message = message;
|
|
182
|
-
_this2.internetAccountId = internetAccountId;
|
|
183
186
|
_this2.name = 'RetryError';
|
|
184
187
|
return _this2;
|
|
185
188
|
}
|
|
186
189
|
|
|
187
|
-
return RetryError;
|
|
190
|
+
return (0, _createClass2.default)(RetryError);
|
|
188
191
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
189
192
|
|
|
190
193
|
exports.RetryError = RetryError;
|
package/util/types/mst.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.UriLocationRaw = exports.UriLocation = exports.Region = exports.PropTypes = exports.NoAssemblyRegion = exports.LocalPathLocation = exports.FileLocation = exports.ElementId = exports.BlobLocation = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -22,9 +22,9 @@ var _mobxReact = require("mobx-react");
|
|
|
22
22
|
var _excluded = ["baseUri"],
|
|
23
23
|
_excluded2 = ["locationType"];
|
|
24
24
|
|
|
25
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
25
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
26
26
|
|
|
27
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
27
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28
28
|
|
|
29
29
|
var ElementId = _mobxStateTree.types.optional(_mobxStateTree.types.identifier, _shortid.default.generate); // PropTypes that are useful when working with instances of these in react components
|
|
30
30
|
|
|
@@ -129,11 +129,11 @@ var FileLocation = _mobxStateTree.types.snapshotProcessor(_mobxStateTree.types.u
|
|
|
129
129
|
blob = rest.blob;
|
|
130
130
|
var _locationType = '';
|
|
131
131
|
|
|
132
|
-
if (uri) {
|
|
132
|
+
if (uri !== undefined) {
|
|
133
133
|
_locationType = 'UriLocation';
|
|
134
|
-
} else if (localPath) {
|
|
134
|
+
} else if (localPath !== undefined) {
|
|
135
135
|
_locationType = 'LocalPathLocation';
|
|
136
|
-
} else if (blob) {
|
|
136
|
+
} else if (blob !== undefined) {
|
|
137
137
|
_locationType = 'BlobLocation';
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SnapshotIn } from 'mobx-state-tree';
|
|
2
|
-
import PluginManager from '../PluginManager';
|
|
3
|
-
declare const _default: (pluginManager: PluginManager) => {
|
|
4
|
-
assemblyConfigSchemas: import("../configuration/configurationSchema").AnyConfigurationSchemaType[];
|
|
5
|
-
dispatcher: (snapshot: import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined) => import("../configuration/configurationSchema").AnyConfigurationSchemaType;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
package/value.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (): number;
|