@jbrowse/core 2.17.0 → 2.18.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/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +4 -8
- package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +22 -25
- package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +2 -2
- package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +6 -8
- package/BaseFeatureWidget/BaseFeatureDetail/Position.d.ts +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +1 -7
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +0 -5
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +0 -7
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -7
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +3 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +24 -33
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +1 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +3 -6
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +1 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +2 -56
- package/BaseFeatureWidget/SequenceFeatureDetails/model.js +1 -56
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +3 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.js +5 -6
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.js +0 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.js +0 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.d.ts +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +1 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/util.js +1 -5
- package/BaseFeatureWidget/stateModelFactory.d.ts +2 -93
- package/BaseFeatureWidget/stateModelFactory.js +3 -73
- package/BaseFeatureWidget/types.d.ts +3 -3
- package/BaseFeatureWidget/util.js +0 -4
- package/CorePlugin.d.ts +1 -1
- package/CorePlugin.js +2 -5
- package/Plugin.d.ts +2 -5
- package/Plugin.js +0 -3
- package/PluginLoader.d.ts +1 -1
- package/PluginLoader.js +2 -19
- package/PluginManager.d.ts +15 -31
- package/PluginManager.js +11 -39
- package/ReExports/DataGrid.js +0 -1
- package/ReExports/list.d.ts +0 -5
- package/ReExports/list.js +0 -5
- package/ReExports/modules.d.ts +22 -20
- package/ReExports/modules.js +16 -25
- package/TextSearch/BaseResults.d.ts +3 -3
- package/TextSearch/TextSearchManager.d.ts +4 -16
- package/TextSearch/TextSearchManager.js +1 -13
- package/assemblyManager/assembly.d.ts +5 -100
- package/assemblyManager/assembly.js +27 -143
- package/assemblyManager/assemblyConfigSchema.d.ts +1 -34
- package/assemblyManager/assemblyConfigSchema.js +12 -46
- package/assemblyManager/assemblyManager.d.ts +7 -57
- package/assemblyManager/assemblyManager.js +2 -57
- package/configuration/configurationSchema.d.ts +4 -4
- package/configuration/configurationSchema.js +2 -14
- package/configuration/configurationSlot.d.ts +1 -12
- package/configuration/configurationSlot.js +2 -32
- package/configuration/index.d.ts +2 -2
- package/configuration/index.js +2 -2
- package/configuration/types.d.ts +2 -3
- package/configuration/util.d.ts +1 -25
- package/configuration/util.js +19 -56
- package/data_adapters/BaseAdapter/BaseAdapter.d.ts +4 -14
- package/data_adapters/BaseAdapter/BaseAdapter.js +1 -10
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +5 -114
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +3 -79
- package/data_adapters/BaseAdapter/BaseOptions.d.ts +2 -2
- package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +2 -2
- package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +3 -6
- package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +3 -3
- package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +3 -3
- package/data_adapters/BaseAdapter/index.d.ts +4 -4
- package/data_adapters/BaseAdapter/types.d.ts +2 -2
- package/data_adapters/BaseAdapter/util.d.ts +6 -6
- package/data_adapters/CytobandAdapter/CytobandAdapter.d.ts +1 -1
- package/data_adapters/CytobandAdapter/CytobandAdapter.js +1 -2
- package/data_adapters/CytobandAdapter/configSchema.d.ts +0 -3
- package/data_adapters/CytobandAdapter/configSchema.js +1 -7
- package/data_adapters/CytobandAdapter/index.d.ts +1 -1
- package/data_adapters/CytobandAdapter/index.js +1 -1
- package/data_adapters/dataAdapterCache.d.ts +4 -21
- package/data_adapters/dataAdapterCache.js +0 -19
- package/package.json +3 -4
- package/pluggableElementTypes/AdapterType.d.ts +2 -2
- package/pluggableElementTypes/AddTrackWorkflowType.d.ts +2 -2
- package/pluggableElementTypes/ConnectionType.d.ts +3 -3
- package/pluggableElementTypes/DisplayType.d.ts +3 -9
- package/pluggableElementTypes/InternetAccountType.d.ts +2 -2
- package/pluggableElementTypes/PluggableElementBase.d.ts +1 -1
- package/pluggableElementTypes/PluggableElementBase.js +2 -2
- package/pluggableElementTypes/RpcMethodType.d.ts +5 -11
- package/pluggableElementTypes/RpcMethodType.js +7 -19
- package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +9 -0
- package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.js +35 -0
- package/pluggableElementTypes/TextSearchAdapterType.d.ts +2 -2
- package/pluggableElementTypes/TrackType.d.ts +3 -3
- package/pluggableElementTypes/ViewType.d.ts +3 -3
- package/pluggableElementTypes/WidgetType.d.ts +4 -3
- package/pluggableElementTypes/index.d.ts +11 -11
- package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -29
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +1 -28
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +3 -83
- package/pluggableElementTypes/models/BaseDisplayModel.js +2 -69
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +4 -46
- package/pluggableElementTypes/models/BaseTrackModel.js +0 -58
- package/pluggableElementTypes/models/BaseViewModel.d.ts +2 -42
- package/pluggableElementTypes/models/BaseViewModel.js +2 -38
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -119
- package/pluggableElementTypes/models/InternetAccountModel.js +3 -123
- package/pluggableElementTypes/models/baseConnectionConfig.d.ts +0 -6
- package/pluggableElementTypes/models/baseConnectionConfig.js +1 -13
- package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +0 -15
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -23
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +2 -53
- package/pluggableElementTypes/models/baseTrackConfig.js +1 -58
- package/pluggableElementTypes/renderers/BoxRendererType.d.ts +7 -15
- package/pluggableElementTypes/renderers/BoxRendererType.js +3 -14
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +3 -2
- package/pluggableElementTypes/renderers/CircularChordRendererType.js +1 -6
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +6 -21
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +2 -25
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +5 -47
- package/pluggableElementTypes/renderers/FeatureRendererType.js +15 -68
- package/pluggableElementTypes/renderers/RendererType.d.ts +4 -8
- package/pluggableElementTypes/renderers/RendererType.js +1 -5
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -2
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +3 -12
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +6 -14
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +9 -49
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +7 -57
- package/pluggableElementTypes/renderers/index.d.ts +1 -1
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +1 -3
- package/rpc/BaseRpcDriver.d.ts +3 -4
- package/rpc/BaseRpcDriver.js +20 -80
- package/rpc/MainThreadRpcDriver.d.ts +3 -7
- package/rpc/MainThreadRpcDriver.js +0 -5
- package/rpc/RpcManager.d.ts +3 -3
- package/rpc/RpcManager.js +2 -4
- package/rpc/WebWorkerRpcDriver.d.ts +3 -2
- package/rpc/WebWorkerRpcDriver.js +2 -13
- package/rpc/baseRpcConfig.d.ts +0 -3
- package/rpc/baseRpcConfig.js +1 -7
- package/rpc/configSchema.d.ts +0 -6
- package/rpc/configSchema.js +2 -11
- package/rpc/mainThreadRpcConfig.js +1 -7
- package/rpc/methods/CoreFreeResources.d.ts +0 -6
- package/rpc/methods/CoreFreeResources.js +2 -9
- package/rpc/methods/CoreGetFeatureDensityStats.d.ts +4 -5
- package/rpc/methods/CoreGetFeatureDensityStats.js +1 -1
- package/rpc/methods/CoreGetFeatureDetails.d.ts +2 -7
- package/rpc/methods/CoreGetFeatureDetails.js +0 -5
- package/rpc/methods/CoreGetFeatures.d.ts +5 -5
- package/rpc/methods/CoreGetFeatures.js +4 -5
- package/rpc/methods/CoreGetFileInfo.d.ts +1 -2
- package/rpc/methods/CoreGetFileInfo.js +1 -1
- package/rpc/methods/CoreGetMetadata.d.ts +1 -2
- package/rpc/methods/CoreGetMetadata.js +1 -1
- package/rpc/methods/CoreGetRefNames.d.ts +1 -2
- package/rpc/methods/CoreGetRefNames.js +1 -1
- package/rpc/methods/CoreRender.d.ts +2 -6
- package/rpc/methods/CoreRender.js +5 -7
- package/rpc/methods/util.d.ts +3 -3
- package/rpc/methods/util.js +0 -1
- package/rpc/webWorkerRpcConfig.js +1 -7
- package/stories/JBrowseCore.stories.d.ts +1 -1
- package/stories/JBrowseCore.stories.js +3 -3
- package/stories/examples/WithSequencePanel.d.ts +1 -1
- package/stories/examples/WithSequencePanel.js +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AppLogo.d.ts +1 -1
- package/ui/AppLogo.js +0 -2
- package/ui/AssemblySelector.d.ts +2 -2
- package/ui/AssemblySelector.js +0 -3
- package/ui/BaseTooltip.js +2 -6
- package/ui/CascadingMenu.d.ts +2 -2
- package/ui/CascadingMenu.js +3 -4
- package/ui/CascadingMenuButton.d.ts +1 -1
- package/ui/CascadingMenuButton.js +1 -1
- package/ui/ColorPicker.js +1 -7
- package/ui/Dialog.d.ts +1 -1
- package/ui/Dialog.js +2 -6
- package/ui/DropDownMenu.d.ts +1 -1
- package/ui/DropDownMenu.js +2 -2
- package/ui/EditableTypography.d.ts +1 -1
- package/ui/EditableTypography.js +1 -5
- package/ui/ErrorBoundary.d.ts +2 -1
- package/ui/ErrorMessage.js +2 -9
- package/ui/ErrorMessageStackTraceDialog.js +2 -10
- package/ui/FactoryResetDialog.js +1 -1
- package/ui/FatalErrorDialog.js +1 -1
- package/ui/FileSelector/FileSelector.d.ts +4 -3
- package/ui/FileSelector/FileSelector.js +40 -40
- package/ui/FileSelector/LocalFileChooser.d.ts +1 -1
- package/ui/FileSelector/LocalFileChooser.js +0 -1
- package/ui/FileSelector/UrlChooser.d.ts +4 -3
- package/ui/FileSelector/UrlChooser.js +5 -3
- package/ui/Icons.d.ts +1 -1
- package/ui/Icons.js +1 -7
- package/ui/LoadingEllipses.d.ts +1 -1
- package/ui/LoadingEllipses.js +3 -3
- package/ui/Menu.d.ts +1 -1
- package/ui/Menu.js +3 -10
- package/ui/MenuButton.d.ts +1 -1
- package/ui/ResizeHandle.js +2 -2
- package/ui/ReturnToImportFormDialog.js +1 -1
- package/ui/SanitizedHTML.js +1 -21
- package/ui/Snackbar.d.ts +2 -2
- package/ui/Snackbar.js +1 -2
- package/ui/SnackbarModel.d.ts +1 -26
- package/ui/SnackbarModel.js +2 -30
- package/ui/colors.d.ts +1 -1
- package/ui/colors.js +1 -1
- package/ui/react-colorful.js +0 -3
- package/ui/theme.d.ts +1 -1
- package/ui/theme.js +0 -40
- package/util/Base1DUtils.d.ts +1 -1
- package/util/Base1DUtils.js +0 -12
- package/util/Base1DViewModel.d.ts +4 -81
- package/util/Base1DViewModel.js +4 -108
- package/util/QuickLRU.js +0 -9
- package/util/TimeTraveller.js +0 -4
- package/util/aborting.d.ts +0 -20
- package/util/aborting.js +0 -31
- package/util/analytics.js +1 -12
- package/util/blockTypes.d.ts +0 -11
- package/util/blockTypes.js +0 -13
- package/util/calculateDynamicBlocks.d.ts +1 -20
- package/util/calculateDynamicBlocks.js +1 -22
- package/util/calculateStaticBlocks.d.ts +2 -2
- package/util/calculateStaticBlocks.js +0 -2
- package/util/color/cssColorsLevel4.js +0 -1
- package/util/color/index.d.ts +0 -19
- package/util/color/index.js +0 -30
- package/util/compositeMap.js +0 -2
- package/util/dedupe.js +0 -1
- package/util/formatFastaStrings.d.ts +0 -13
- package/util/formatFastaStrings.js +0 -13
- package/util/idMaker.d.ts +1 -1
- package/util/idMaker.js +16 -12
- package/util/index.d.ts +16 -164
- package/util/index.js +22 -282
- package/util/io/RemoteFileWithRangeCache.d.ts +3 -2
- package/util/io/RemoteFileWithRangeCache.js +6 -10
- package/util/io/index.d.ts +3 -4
- package/util/io/index.js +3 -17
- package/util/jexl.js +3 -13
- package/util/jexlStrings.d.ts +0 -6
- package/util/jexlStrings.js +0 -8
- package/util/layouts/BaseLayout.d.ts +1 -1
- package/util/layouts/GranularRectLayout.d.ts +1 -17
- package/util/layouts/GranularRectLayout.js +4 -81
- package/util/layouts/MultiLayout.d.ts +1 -6
- package/util/layouts/MultiLayout.js +0 -6
- package/util/layouts/PrecomputedLayout.d.ts +1 -4
- package/util/layouts/PrecomputedLayout.js +0 -5
- package/util/layouts/PrecomputedMultiLayout.js +0 -2
- package/util/layouts/SceneGraph.d.ts +0 -12
- package/util/layouts/SceneGraph.js +0 -13
- package/util/makeAbortableReaction.d.ts +2 -0
- package/util/makeAbortableReaction.js +50 -0
- package/util/map-obj.js +0 -4
- package/util/mst-reflection.d.ts +1 -14
- package/util/mst-reflection.js +1 -28
- package/util/nanoid.js +0 -31
- package/util/nextTick.d.ts +1 -0
- package/util/nextTick.js +6 -0
- package/util/offscreenCanvasPonyfill.d.ts +0 -1
- package/util/offscreenCanvasPonyfill.js +1 -9
- package/util/offscreenCanvasUtils.js +1 -8
- package/util/range.d.ts +0 -25
- package/util/range.js +0 -34
- package/util/rxjs.d.ts +3 -7
- package/util/rxjs.js +2 -9
- package/util/simpleFeature.d.ts +0 -50
- package/util/simpleFeature.js +0 -35
- package/util/stats.d.ts +3 -26
- package/util/stats.js +0 -25
- package/util/stopToken.d.ts +3 -0
- package/util/stopToken.js +29 -0
- package/util/tracks.d.ts +3 -25
- package/util/tracks.js +0 -30
- package/util/types/index.d.ts +14 -30
- package/util/types/index.js +5 -14
- package/util/types/mst.js +0 -9
- package/util/types/util.d.ts +2 -9
- package/util/useMeasure.js +0 -1
- package/util/when.d.ts +1 -15
- package/util/when.js +3 -70
- package/rpc/remoteAbortSignals.d.ts +0 -36
- package/rpc/remoteAbortSignals.js +0 -79
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type PluginManager from '../PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
+
import type { AnyDataAdapter } from './BaseAdapter';
|
|
4
|
+
import type { SnapshotIn } from 'mobx-state-tree';
|
|
5
5
|
type ConfigSnap = SnapshotIn<AnyConfigurationSchemaType>;
|
|
6
6
|
export declare function adapterConfigCacheKey(conf?: Record<string, unknown>): string;
|
|
7
7
|
interface AdapterCacheEntry {
|
|
8
8
|
dataAdapter: AnyDataAdapter;
|
|
9
9
|
sessionIds: Set<string>;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* instantiate a data adapter, or return an already-instantiated one if we have
|
|
13
|
-
* one with the same configuration
|
|
14
|
-
*
|
|
15
|
-
* @param pluginManager
|
|
16
|
-
*
|
|
17
|
-
* @param sessionId - session ID of the associated worker session. used for
|
|
18
|
-
* reference counting
|
|
19
|
-
*
|
|
20
|
-
* @param adapterConfigSnapshot - plain-JS configuration snapshot for the
|
|
21
|
-
* adapter
|
|
22
|
-
*/
|
|
23
11
|
export declare function getAdapter(pluginManager: PluginManager, sessionId: string, adapterConfigSnapshot: SnapshotIn<AnyConfigurationSchemaType>): Promise<AdapterCacheEntry>;
|
|
24
|
-
/**
|
|
25
|
-
* this is a callback that is passed to adapters that
|
|
26
|
-
* allows them to get any sub-adapters that they need
|
|
27
|
-
* internally, staying with the same worker session ID
|
|
28
|
-
*/
|
|
29
12
|
export type getSubAdapterType = (adapterConfigSnap: ConfigSnap) => ReturnType<typeof getAdapter>;
|
|
30
13
|
export declare function freeAdapterResources(specification: Record<string, any>): number;
|
|
31
14
|
export declare function clearAdapterCache(): void;
|
|
@@ -12,20 +12,7 @@ function adapterConfigCacheKey(conf = {}) {
|
|
|
12
12
|
return `${(0, idMaker_1.default)(conf)}`;
|
|
13
13
|
}
|
|
14
14
|
let adapterCache = {};
|
|
15
|
-
/**
|
|
16
|
-
* instantiate a data adapter, or return an already-instantiated one if we have
|
|
17
|
-
* one with the same configuration
|
|
18
|
-
*
|
|
19
|
-
* @param pluginManager
|
|
20
|
-
*
|
|
21
|
-
* @param sessionId - session ID of the associated worker session. used for
|
|
22
|
-
* reference counting
|
|
23
|
-
*
|
|
24
|
-
* @param adapterConfigSnapshot - plain-JS configuration snapshot for the
|
|
25
|
-
* adapter
|
|
26
|
-
*/
|
|
27
15
|
async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
|
|
28
|
-
// cache the adapter object
|
|
29
16
|
const cacheKey = adapterConfigCacheKey(adapterConfigSnapshot);
|
|
30
17
|
if (!adapterCache[cacheKey]) {
|
|
31
18
|
const adapterType = adapterConfigSnapshot === null || adapterConfigSnapshot === void 0 ? void 0 : adapterConfigSnapshot.type;
|
|
@@ -36,13 +23,10 @@ async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
|
|
|
36
23
|
if (!dataAdapterType) {
|
|
37
24
|
throw new Error(`unknown data adapter type ${adapterType}`);
|
|
38
25
|
}
|
|
39
|
-
// instantiate the data adapter's config schema so it gets its defaults,
|
|
40
|
-
// callbacks, etc
|
|
41
26
|
const adapterConfig = dataAdapterType.configSchema.create(adapterConfigSnapshot, { pluginManager });
|
|
42
27
|
const getSubAdapter = getAdapter.bind(null, pluginManager, sessionId);
|
|
43
28
|
const CLASS = await dataAdapterType.getAdapterClass();
|
|
44
29
|
const dataAdapter = new CLASS(adapterConfig, getSubAdapter, pluginManager);
|
|
45
|
-
// store it in our cache
|
|
46
30
|
adapterCache[cacheKey] = {
|
|
47
31
|
dataAdapter,
|
|
48
32
|
sessionIds: new Set([sessionId]),
|
|
@@ -55,8 +39,6 @@ async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
|
|
|
55
39
|
function freeAdapterResources(specification) {
|
|
56
40
|
let deleteCount = 0;
|
|
57
41
|
const specKeys = Object.keys(specification);
|
|
58
|
-
// if we don't specify a range, delete any adapters that are only associated
|
|
59
|
-
// with that session
|
|
60
42
|
if (specKeys.length === 1 && specKeys[0] === 'sessionId') {
|
|
61
43
|
const { sessionId } = specification;
|
|
62
44
|
Object.entries(adapterCache).forEach(([cacheKey, cacheEntry]) => {
|
|
@@ -68,7 +50,6 @@ function freeAdapterResources(specification) {
|
|
|
68
50
|
});
|
|
69
51
|
}
|
|
70
52
|
else {
|
|
71
|
-
// otherwise call freeResources on all the cached data adapters
|
|
72
53
|
Object.values(adapterCache).forEach(cacheEntry => {
|
|
73
54
|
const regions = specification.regions ||
|
|
74
55
|
(specification.region ? [specification.region] : []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -31,15 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.17.9",
|
|
34
|
+
"@floating-ui/react": "^0.27.0",
|
|
34
35
|
"@gmod/abortable-promise-cache": "^2.0.0",
|
|
35
36
|
"@gmod/bgzf-filehandle": "^1.4.3",
|
|
36
37
|
"@gmod/http-range-fetcher": "^3.0.4",
|
|
37
38
|
"@mui/icons-material": "^6.0.0",
|
|
38
39
|
"@mui/x-data-grid": "^7.0.0",
|
|
39
|
-
"@types/clone": "^2.0.0",
|
|
40
40
|
"canvas-sequencer": "^3.1.0",
|
|
41
41
|
"canvas2svg": "^1.0.16",
|
|
42
|
-
"clone": "^2.1.2",
|
|
43
42
|
"colord": "^2.9.3",
|
|
44
43
|
"copy-to-clipboard": "^3.3.1",
|
|
45
44
|
"deepmerge": "^4.2.2",
|
|
@@ -72,5 +71,5 @@
|
|
|
72
71
|
"access": "public",
|
|
73
72
|
"directory": "dist"
|
|
74
73
|
},
|
|
75
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
|
|
76
75
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
2
|
-
import { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
-
import { AnyAdapter } from '../data_adapters/BaseAdapter';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
+
import type { AnyAdapter } from '../data_adapters/BaseAdapter';
|
|
4
4
|
export interface AdapterMetadata {
|
|
5
5
|
category?: string;
|
|
6
6
|
hiddenFromGUI?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IAnyModelType } from 'mobx-state-tree';
|
|
1
|
+
import type React from 'react';
|
|
3
2
|
import PluggableElementBase from './PluggableElementBase';
|
|
3
|
+
import type { IAnyModelType } from 'mobx-state-tree';
|
|
4
4
|
type BasicComponent = React.ComponentType<{
|
|
5
5
|
model: any;
|
|
6
6
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IAnyModelType } from 'mobx-state-tree';
|
|
2
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
3
|
-
import { AnyConfigurationSchemaType } from '../configuration';
|
|
4
|
-
import { AnyReactComponentType } from '../util';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
+
import type { AnyReactComponentType } from '../util';
|
|
4
|
+
import type { IAnyModelType } from 'mobx-state-tree';
|
|
5
5
|
export default class ConnectionType extends PluggableElementBase {
|
|
6
6
|
stateModel: IAnyModelType;
|
|
7
7
|
configSchema: AnyConfigurationSchemaType;
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import { IAnyModelType } from 'mobx-state-tree';
|
|
2
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
+
import type { AnyReactComponentType } from '../util';
|
|
4
|
+
import type { IAnyModelType } from 'mobx-state-tree';
|
|
5
5
|
export default class DisplayType extends PluggableElementBase {
|
|
6
6
|
stateModel: IAnyModelType;
|
|
7
7
|
configSchema: AnyConfigurationSchemaType;
|
|
8
8
|
ReactComponent: AnyReactComponentType;
|
|
9
|
-
/**
|
|
10
|
-
* The track type the display is associated with
|
|
11
|
-
*/
|
|
12
9
|
trackType: string;
|
|
13
10
|
subDisplay?: {
|
|
14
11
|
type: string;
|
|
15
12
|
[key: string]: unknown;
|
|
16
13
|
};
|
|
17
|
-
/**
|
|
18
|
-
* The view type the display is associated with
|
|
19
|
-
*/
|
|
20
14
|
viewType: string;
|
|
21
15
|
constructor(stuff: {
|
|
22
16
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IAnyModelType } from 'mobx-state-tree';
|
|
2
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
3
|
-
import { AnyConfigurationSchemaType } from '../configuration/types';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../configuration/types';
|
|
3
|
+
import type { IAnyModelType } from 'mobx-state-tree';
|
|
4
4
|
export default class InternetAccountType extends PluggableElementBase {
|
|
5
5
|
stateModel: IAnyModelType;
|
|
6
6
|
configSchema: AnyConfigurationSchemaType;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
class PluggableElementBase {
|
|
4
4
|
constructor(args) {
|
|
5
|
-
this.name = args.name || 'UNKNOWN';
|
|
6
|
-
this.maybeDisplayName = args.displayName;
|
|
5
|
+
this.name = (args === null || args === void 0 ? void 0 : args.name) || 'UNKNOWN';
|
|
6
|
+
this.maybeDisplayName = args === null || args === void 0 ? void 0 : args.displayName;
|
|
7
7
|
}
|
|
8
8
|
get displayName() {
|
|
9
9
|
return this.maybeDisplayName || this.name;
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import PluginManager from '../PluginManager';
|
|
2
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
interface SerializedArgs {
|
|
6
|
-
signal?: RemoteAbortSignal;
|
|
7
|
-
blobMap?: Record<string, File>;
|
|
8
|
-
}
|
|
2
|
+
import type PluginManager from '../PluginManager';
|
|
3
|
+
import type { UriLocation } from '../util/types';
|
|
9
4
|
export type RpcMethodConstructor = new (pm: PluginManager) => RpcMethodType;
|
|
10
5
|
export default abstract class RpcMethodType extends PluggableElementBase {
|
|
11
6
|
pluginManager: PluginManager;
|
|
12
7
|
constructor(pluginManager: PluginManager);
|
|
13
8
|
serializeArguments(args: Record<string, unknown>, rpcDriverClassName: string): Promise<Record<string, unknown>>;
|
|
14
9
|
serializeNewAuthArguments(loc: UriLocation, rpcDriverClassName: string): Promise<UriLocation>;
|
|
15
|
-
deserializeArguments<T
|
|
16
|
-
|
|
17
|
-
}>;
|
|
10
|
+
deserializeArguments<T>(args: T & {
|
|
11
|
+
blobMap?: Record<string, File>;
|
|
12
|
+
}, _rpcDriverClassName: string): Promise<T>;
|
|
18
13
|
abstract execute(serializedArgs: unknown, rpcDriverClassName: string): Promise<unknown>;
|
|
19
14
|
serializeReturn(originalReturn: unknown, _args: unknown, _rpcDriverClassName: string): Promise<unknown>;
|
|
20
15
|
deserializeReturn(serializedReturn: unknown, _args: unknown, _rpcDriverClassName: string): Promise<unknown>;
|
|
21
16
|
private augmentLocationObjects;
|
|
22
17
|
}
|
|
23
|
-
export {};
|
|
@@ -3,14 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const map_obj_1 = __importDefault(require("../util/map-obj"));
|
|
7
6
|
const PluggableElementBase_1 = __importDefault(require("./PluggableElementBase"));
|
|
7
|
+
const map_obj_1 = __importDefault(require("../util/map-obj"));
|
|
8
8
|
const tracks_1 = require("../util/tracks");
|
|
9
9
|
const types_1 = require("../util/types");
|
|
10
|
-
const remoteAbortSignals_1 = require("../rpc/remoteAbortSignals");
|
|
11
10
|
class RpcMethodType extends PluggableElementBase_1.default {
|
|
12
11
|
constructor(pluginManager) {
|
|
13
|
-
super(
|
|
12
|
+
super();
|
|
14
13
|
this.pluginManager = pluginManager;
|
|
15
14
|
}
|
|
16
15
|
async serializeArguments(args, rpcDriverClassName) {
|
|
@@ -20,30 +19,21 @@ class RpcMethodType extends PluggableElementBase_1.default {
|
|
|
20
19
|
}
|
|
21
20
|
async serializeNewAuthArguments(loc, rpcDriverClassName) {
|
|
22
21
|
const rootModel = this.pluginManager.rootModel;
|
|
23
|
-
// args dont need auth or already have auth
|
|
24
22
|
if (!(0, types_1.isAppRootModel)(rootModel) || loc.internetAccountPreAuthorization) {
|
|
25
23
|
return loc;
|
|
26
24
|
}
|
|
27
25
|
const account = rootModel.findAppropriateInternetAccount(loc);
|
|
28
|
-
// mutating loc object is not allowed in MainThreadRpcDriver, and is only
|
|
29
|
-
// needed for web worker RPC
|
|
30
26
|
if (account && rpcDriverClassName !== 'MainThreadRpcDriver') {
|
|
31
27
|
loc.internetAccountPreAuthorization =
|
|
32
28
|
await account.getPreAuthorizationInformation(loc);
|
|
33
29
|
}
|
|
34
30
|
return loc;
|
|
35
31
|
}
|
|
36
|
-
async deserializeArguments(
|
|
37
|
-
if (
|
|
38
|
-
(0, tracks_1.setBlobMap)(
|
|
32
|
+
async deserializeArguments(args, _rpcDriverClassName) {
|
|
33
|
+
if (args.blobMap) {
|
|
34
|
+
(0, tracks_1.setBlobMap)(args.blobMap);
|
|
39
35
|
}
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
...serializedArgs,
|
|
43
|
-
signal: (0, remoteAbortSignals_1.isRemoteAbortSignal)(signal)
|
|
44
|
-
? (0, remoteAbortSignals_1.deserializeAbortSignal)(signal)
|
|
45
|
-
: undefined,
|
|
46
|
-
};
|
|
36
|
+
return args;
|
|
47
37
|
}
|
|
48
38
|
async serializeReturn(originalReturn, _args, _rpcDriverClassName) {
|
|
49
39
|
return originalReturn;
|
|
@@ -56,8 +46,7 @@ class RpcMethodType extends PluggableElementBase_1.default {
|
|
|
56
46
|
}
|
|
57
47
|
catch (error) {
|
|
58
48
|
if ((0, types_1.isAuthNeededException)(error)) {
|
|
59
|
-
const retryAccount =
|
|
60
|
-
(_a = this.pluginManager.rootModel) === null || _a === void 0 ? void 0 : _a.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(error.url).origin}`, {}, error.url);
|
|
49
|
+
const retryAccount = (_a = this.pluginManager.rootModel) === null || _a === void 0 ? void 0 : _a.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(error.url).origin}`, {}, error.url);
|
|
61
50
|
throw new types_1.RetryError('Retrying with created internet account', retryAccount.internetAccountId);
|
|
62
51
|
}
|
|
63
52
|
throw error;
|
|
@@ -66,7 +55,6 @@ class RpcMethodType extends PluggableElementBase_1.default {
|
|
|
66
55
|
}
|
|
67
56
|
async augmentLocationObjects(thing, rpcDriverClassName) {
|
|
68
57
|
const uris = [];
|
|
69
|
-
// using map-obj avoids cycles, seen in circular view svg export
|
|
70
58
|
(0, map_obj_1.default)(thing, val => {
|
|
71
59
|
if ((0, types_1.isUriLocation)(val)) {
|
|
72
60
|
uris.push(val);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import RpcMethodType from './RpcMethodType';
|
|
2
|
+
import type { RenderArgs } from '@jbrowse/core/rpc/coreRpcMethods';
|
|
3
|
+
export default abstract class RpcMethodTypeWithFiltersAndRenameRegions extends RpcMethodType {
|
|
4
|
+
deserializeArguments(args: any, rpcDriverClassName: string): Promise<any>;
|
|
5
|
+
serializeArguments(args: RenderArgs & {
|
|
6
|
+
stopToken?: string;
|
|
7
|
+
statusCallback?: (arg: string) => void;
|
|
8
|
+
}, rpcDriverClassName: string): Promise<Record<string, unknown>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const RpcMethodType_1 = __importDefault(require("./RpcMethodType"));
|
|
7
|
+
const util_1 = require("../util");
|
|
8
|
+
const serializableFilterChain_1 = __importDefault(require("./renderers/util/serializableFilterChain"));
|
|
9
|
+
class RpcMethodTypeWithFiltersAndRenameRegions extends RpcMethodType_1.default {
|
|
10
|
+
async deserializeArguments(args, rpcDriverClassName) {
|
|
11
|
+
const l = await super.deserializeArguments(args, rpcDriverClassName);
|
|
12
|
+
return {
|
|
13
|
+
...l,
|
|
14
|
+
filters: args.filters
|
|
15
|
+
? new serializableFilterChain_1.default({
|
|
16
|
+
filters: args.filters,
|
|
17
|
+
})
|
|
18
|
+
: undefined,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async serializeArguments(args, rpcDriverClassName) {
|
|
22
|
+
var _a, _b, _c;
|
|
23
|
+
const pm = this.pluginManager;
|
|
24
|
+
const assemblyManager = (_b = (_a = pm.rootModel) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.assemblyManager;
|
|
25
|
+
if (!assemblyManager) {
|
|
26
|
+
throw new Error('no assembly manager');
|
|
27
|
+
}
|
|
28
|
+
const renamedArgs = await (0, util_1.renameRegionsIfNeeded)(assemblyManager, {
|
|
29
|
+
...args,
|
|
30
|
+
filters: (_c = args.filters) === null || _c === void 0 ? void 0 : _c.toJSON().filters,
|
|
31
|
+
});
|
|
32
|
+
return super.serializeArguments(renamedArgs, rpcDriverClassName);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = RpcMethodTypeWithFiltersAndRenameRegions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
2
|
-
import { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
-
import { AnyAdapter } from '../data_adapters/BaseAdapter';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
+
import type { AnyAdapter } from '../data_adapters/BaseAdapter';
|
|
4
4
|
export default class TextSearchAdapterType extends PluggableElementBase {
|
|
5
5
|
getAdapterClass: () => Promise<AnyAdapter>;
|
|
6
6
|
configSchema: AnyConfigurationSchemaType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IAnyModelType } from 'mobx-state-tree';
|
|
2
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
3
|
-
import { AnyConfigurationSchemaType } from '../configuration';
|
|
4
|
-
import DisplayType from './DisplayType';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../configuration';
|
|
3
|
+
import type DisplayType from './DisplayType';
|
|
4
|
+
import type { IAnyModelType } from 'mobx-state-tree';
|
|
5
5
|
export default class TrackType extends PluggableElementBase {
|
|
6
6
|
stateModel: IAnyModelType;
|
|
7
7
|
configSchema: AnyConfigurationSchemaType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IAnyModelType, IAnyStateTreeNode } from 'mobx-state-tree';
|
|
1
|
+
import type React from 'react';
|
|
3
2
|
import PluggableElementBase from './PluggableElementBase';
|
|
4
|
-
import DisplayType from './DisplayType';
|
|
3
|
+
import type DisplayType from './DisplayType';
|
|
4
|
+
import type { IAnyModelType, IAnyStateTreeNode } from 'mobx-state-tree';
|
|
5
5
|
type BasicView = React.ComponentType<{
|
|
6
6
|
model: any;
|
|
7
7
|
session?: IAnyStateTreeNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { ComponentType, LazyExoticComponent } from 'react';
|
|
2
|
+
import type React from 'react';
|
|
3
3
|
import PluggableElementBase from './PluggableElementBase';
|
|
4
|
-
import { AnyConfigurationSchemaType } from '../configuration';
|
|
4
|
+
import type { AnyConfigurationSchemaType } from '../configuration';
|
|
5
|
+
import type { IAnyModelType, IAnyStateTreeNode } from 'mobx-state-tree';
|
|
5
6
|
type WidgetComponentType = LazyExoticComponent<React.FC<any>> | React.FC<any>;
|
|
6
7
|
type HeadingComponentType = ComponentType<{
|
|
7
8
|
model: IAnyStateTreeNode;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import AdapterType from './AdapterType';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import type AdapterType from './AdapterType';
|
|
2
|
+
import type AddTrackWorkflowType from './AddTrackWorkflowType';
|
|
3
|
+
import type ConnectionType from './ConnectionType';
|
|
4
|
+
import type DisplayType from './DisplayType';
|
|
5
|
+
import type InternetAccountType from './InternetAccountType';
|
|
6
|
+
import type RpcMethodType from './RpcMethodType';
|
|
7
|
+
import type TextSearchAdapterType from './TextSearchAdapterType';
|
|
8
|
+
import type TrackType from './TrackType';
|
|
9
|
+
import type ViewType from './ViewType';
|
|
10
|
+
import type WidgetType from './WidgetType';
|
|
11
|
+
import type RendererType from './renderers/RendererType';
|
|
12
12
|
export * from './renderers';
|
|
13
13
|
export * from './models';
|
|
14
14
|
export type PluggableElementType = AdapterType | ConnectionType | RendererType | WidgetType | TrackType | DisplayType | ViewType | RpcMethodType | InternetAccountType | TextSearchAdapterType | AddTrackWorkflowType;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type PluginManager from '../../PluginManager';
|
|
2
|
+
import type { AnyConfigurationModel } from '../../configuration';
|
|
3
3
|
type TrackConf = AnyConfigurationModel | Record<string, unknown>;
|
|
4
|
-
/**
|
|
5
|
-
* #stateModel BaseConnectionModel
|
|
6
|
-
*/
|
|
7
4
|
declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
8
|
-
/**
|
|
9
|
-
* #property
|
|
10
|
-
*/
|
|
11
5
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
12
|
-
/**
|
|
13
|
-
* #property
|
|
14
|
-
*/
|
|
15
6
|
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
16
|
-
/**
|
|
17
|
-
* #property
|
|
18
|
-
*/
|
|
19
7
|
configuration: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
|
|
20
8
|
name: {
|
|
21
9
|
type: string;
|
|
@@ -29,27 +17,12 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
29
17
|
};
|
|
30
18
|
}, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
31
19
|
}, {
|
|
32
|
-
/**
|
|
33
|
-
* #action
|
|
34
|
-
*/
|
|
35
20
|
connect(_arg: AnyConfigurationModel): void;
|
|
36
21
|
} & {
|
|
37
22
|
afterAttach(): void;
|
|
38
|
-
/**
|
|
39
|
-
* #action
|
|
40
|
-
*/
|
|
41
23
|
addTrackConf(trackConf: TrackConf): any;
|
|
42
|
-
/**
|
|
43
|
-
* #action
|
|
44
|
-
*/
|
|
45
24
|
addTrackConfs(trackConfs: TrackConf[]): void;
|
|
46
|
-
/**
|
|
47
|
-
* #action
|
|
48
|
-
*/
|
|
49
25
|
setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
|
|
50
|
-
/**
|
|
51
|
-
* #action
|
|
52
|
-
*/
|
|
53
26
|
clear(): void;
|
|
54
27
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
55
28
|
export type BaseConnectionModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -4,31 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
7
|
-
const configuration_1 = require("../../configuration");
|
|
8
7
|
const baseConnectionConfig_1 = __importDefault(require("./baseConnectionConfig"));
|
|
9
|
-
|
|
10
|
-
* #stateModel BaseConnectionModel
|
|
11
|
-
*/
|
|
8
|
+
const configuration_1 = require("../../configuration");
|
|
12
9
|
function stateModelFactory(pluginManager) {
|
|
13
10
|
return mobx_state_tree_1.types
|
|
14
11
|
.model('Connection', {
|
|
15
|
-
/**
|
|
16
|
-
* #property
|
|
17
|
-
*/
|
|
18
12
|
name: mobx_state_tree_1.types.identifier,
|
|
19
|
-
/**
|
|
20
|
-
* #property
|
|
21
|
-
*/
|
|
22
13
|
tracks: mobx_state_tree_1.types.array(pluginManager.pluggableConfigSchemaType('track')),
|
|
23
|
-
/**
|
|
24
|
-
* #property
|
|
25
|
-
*/
|
|
26
14
|
configuration: (0, configuration_1.ConfigurationReference)(baseConnectionConfig_1.default),
|
|
27
15
|
})
|
|
28
16
|
.actions(() => ({
|
|
29
|
-
/**
|
|
30
|
-
* #action
|
|
31
|
-
*/
|
|
32
17
|
connect(_arg) { },
|
|
33
18
|
}))
|
|
34
19
|
.actions(self => ({
|
|
@@ -37,28 +22,16 @@ function stateModelFactory(pluginManager) {
|
|
|
37
22
|
self.connect(self.configuration);
|
|
38
23
|
}
|
|
39
24
|
},
|
|
40
|
-
/**
|
|
41
|
-
* #action
|
|
42
|
-
*/
|
|
43
25
|
addTrackConf(trackConf) {
|
|
44
26
|
const length = self.tracks.push(trackConf);
|
|
45
27
|
return self.tracks[length - 1];
|
|
46
28
|
},
|
|
47
|
-
/**
|
|
48
|
-
* #action
|
|
49
|
-
*/
|
|
50
29
|
addTrackConfs(trackConfs) {
|
|
51
30
|
self.tracks.push(...trackConfs);
|
|
52
31
|
},
|
|
53
|
-
/**
|
|
54
|
-
* #action
|
|
55
|
-
*/
|
|
56
32
|
setTrackConfs(trackConfs) {
|
|
57
33
|
self.tracks = (0, mobx_state_tree_1.cast)(trackConfs);
|
|
58
34
|
},
|
|
59
|
-
/**
|
|
60
|
-
* #action
|
|
61
|
-
*/
|
|
62
35
|
clear() { },
|
|
63
36
|
}));
|
|
64
37
|
}
|