@jbrowse/core 2.17.0 → 3.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/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +7 -13
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +20 -25
- package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +3 -7
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +5 -8
- package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +7 -10
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +25 -55
- package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +3 -4
- package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +16 -34
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +2 -6
- package/BaseFeatureWidget/BaseFeatureDetail/Position.d.ts +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/Position.js +2 -5
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +3 -5
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +3 -5
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +4 -5
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +6 -14
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +4 -13
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.d.ts +10 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.js +48 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +33 -41
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +30 -29
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceName.d.ts +8 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceName.js +28 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +2 -10
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +11 -85
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +1 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +6 -25
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +11 -46
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +101 -96
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +2 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +49 -53
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +2 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +20 -55
- 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 +4 -66
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +4 -5
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +6 -9
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.js +6 -7
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.js +5 -9
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.js +2 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.d.ts +2 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +3 -10
- package/BaseFeatureWidget/SequenceFeatureDetails/types.d.ts +8 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/types.js +2 -0
- 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 +19 -12
- 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 +17 -32
- package/PluginManager.js +15 -41
- package/ReExports/DataGrid.js +0 -1
- package/ReExports/list.d.ts +0 -5
- package/ReExports/list.js +3 -5
- package/ReExports/modules.d.ts +26 -22
- package/ReExports/modules.js +45 -44
- package/TextSearch/BaseResults.d.ts +4 -4
- package/TextSearch/TextSearchManager.d.ts +4 -16
- package/TextSearch/TextSearchManager.js +1 -13
- package/assemblyManager/assembly.d.ts +5 -100
- package/assemblyManager/assembly.js +30 -146
- 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 +2 -13
- 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 +2 -6
- 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 +21 -8
- package/data_adapters/dataAdapterCache.d.ts +4 -22
- package/data_adapters/dataAdapterCache.js +2 -28
- package/data_adapters/util.d.ts +1 -0
- package/data_adapters/util.js +10 -0
- package/package.json +8 -11
- 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 +9 -63
- 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 +4 -4
- package/pluggableElementTypes/renderers/CircularChordRendererType.js +3 -8
- 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 +5 -9
- package/pluggableElementTypes/renderers/RendererType.js +3 -7
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +3 -4
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +11 -76
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +2 -3
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +10 -74
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +9 -49
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +10 -60
- 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 +6 -7
- package/stories/examples/WithSequencePanel.js +9 -9
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AppLogo.d.ts +2 -3
- package/ui/AppLogo.js +2 -7
- package/ui/AssemblySelector.d.ts +5 -5
- package/ui/AssemblySelector.js +11 -36
- package/ui/BaseTooltip.d.ts +1 -2
- package/ui/BaseTooltip.js +10 -17
- package/ui/CascadingMenu.d.ts +3 -4
- package/ui/CascadingMenu.js +18 -57
- package/ui/CascadingMenuButton.d.ts +2 -3
- package/ui/CascadingMenuButton.js +18 -42
- package/ui/ColorPicker.d.ts +3 -4
- package/ui/ColorPicker.js +33 -37
- package/ui/Dialog.d.ts +2 -3
- package/ui/Dialog.js +15 -27
- package/ui/DraggableDialog.d.ts +5 -0
- package/ui/DraggableDialog.js +32 -0
- package/ui/DropDownMenu.d.ts +2 -3
- package/ui/DropDownMenu.js +10 -36
- package/ui/EditableTypography.d.ts +2 -3
- package/ui/EditableTypography.js +30 -59
- package/ui/ErrorBoundary.d.ts +3 -2
- package/ui/ErrorBoundary.js +3 -25
- package/ui/ErrorMessage.d.ts +1 -2
- package/ui/ErrorMessage.js +27 -34
- package/ui/ErrorMessageStackTraceDialog.d.ts +1 -2
- package/ui/ErrorMessageStackTraceDialog.js +13 -54
- package/ui/FactoryResetDialog.d.ts +1 -2
- package/ui/FactoryResetDialog.js +8 -13
- package/ui/FatalErrorDialog.d.ts +1 -2
- package/ui/FatalErrorDialog.js +11 -42
- package/ui/FileSelector/FileSelector.d.ts +5 -5
- package/ui/FileSelector/FileSelector.js +41 -80
- package/ui/FileSelector/LocalFileChooser.d.ts +2 -3
- package/ui/FileSelector/LocalFileChooser.js +17 -29
- package/ui/FileSelector/UrlChooser.d.ts +5 -5
- package/ui/FileSelector/UrlChooser.js +6 -7
- package/ui/Icons.d.ts +10 -11
- package/ui/Icons.js +10 -25
- package/ui/LoadingEllipses.d.ts +2 -3
- package/ui/LoadingEllipses.js +4 -7
- package/ui/Logo.d.ts +2 -3
- package/ui/Logo.js +5 -23
- package/ui/Menu.d.ts +3 -4
- package/ui/Menu.js +85 -122
- package/ui/MenuButton.d.ts +2 -3
- package/ui/MenuButton.js +11 -35
- package/ui/PrerenderedCanvas.d.ts +1 -2
- package/ui/PrerenderedCanvas.js +3 -25
- package/ui/RedErrorMessageBox.d.ts +1 -2
- package/ui/RedErrorMessageBox.js +2 -5
- package/ui/ResizeHandle.d.ts +1 -2
- package/ui/ResizeHandle.js +5 -27
- package/ui/ReturnToImportFormDialog.d.ts +1 -2
- package/ui/ReturnToImportFormDialog.js +8 -13
- package/ui/SanitizedHTML.d.ts +2 -3
- package/ui/SanitizedHTML.js +4 -24
- package/ui/Snackbar.d.ts +3 -4
- package/ui/Snackbar.js +41 -21
- package/ui/SnackbarContents.d.ts +5 -0
- package/ui/SnackbarContents.js +16 -0
- package/ui/SnackbarModel.d.ts +1 -26
- package/ui/SnackbarModel.js +22 -39
- package/ui/colors.d.ts +1 -1
- package/ui/colors.js +2 -2
- package/ui/index.d.ts +0 -2
- package/ui/index.js +1 -5
- package/ui/react-colorful.js +17 -10
- package/ui/theme.d.ts +1 -1
- package/ui/theme.js +7 -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 +27 -173
- package/util/index.js +53 -293
- package/util/io/RemoteFileWithRangeCache.d.ts +4 -5
- package/util/io/RemoteFileWithRangeCache.js +12 -14
- package/util/io/index.d.ts +3 -4
- package/util/io/index.js +5 -19
- 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.d.ts +1 -1
- 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.d.ts +2 -3
- package/util/offscreenCanvasUtils.js +22 -21
- 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 +4 -26
- package/util/tracks.js +8 -33
- 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.d.ts +1 -1
- 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
|
@@ -2,29 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseDisplay = void 0;
|
|
4
4
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
// locals
|
|
6
5
|
const configuration_1 = require("../../configuration");
|
|
7
|
-
const tracks_1 = require("../../util/tracks");
|
|
8
6
|
const util_1 = require("../../util");
|
|
7
|
+
const tracks_1 = require("../../util/tracks");
|
|
9
8
|
const mst_1 = require("../../util/types/mst");
|
|
10
|
-
/**
|
|
11
|
-
* #stateModel BaseDisplay
|
|
12
|
-
* #category display
|
|
13
|
-
*/
|
|
14
9
|
function stateModelFactory() {
|
|
15
10
|
return mobx_state_tree_1.types
|
|
16
11
|
.model('BaseDisplay', {
|
|
17
|
-
/**
|
|
18
|
-
* #property
|
|
19
|
-
*/
|
|
20
12
|
id: mst_1.ElementId,
|
|
21
|
-
/**
|
|
22
|
-
* #property
|
|
23
|
-
*/
|
|
24
13
|
type: mobx_state_tree_1.types.string,
|
|
25
|
-
/**
|
|
26
|
-
* #property
|
|
27
|
-
*/
|
|
28
14
|
rpcDriverName: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
29
15
|
})
|
|
30
16
|
.volatile(() => ({
|
|
@@ -33,29 +19,17 @@ function stateModelFactory() {
|
|
|
33
19
|
message: undefined,
|
|
34
20
|
}))
|
|
35
21
|
.views(self => ({
|
|
36
|
-
/**
|
|
37
|
-
* #getter
|
|
38
|
-
*/
|
|
39
22
|
get RenderingComponent() {
|
|
40
23
|
const { pluginManager } = (0, util_1.getEnv)(self);
|
|
41
24
|
return pluginManager.getDisplayType(self.type)
|
|
42
25
|
.ReactComponent;
|
|
43
26
|
},
|
|
44
|
-
/**
|
|
45
|
-
* #getter
|
|
46
|
-
*/
|
|
47
27
|
get DisplayBlurb() {
|
|
48
28
|
return null;
|
|
49
29
|
},
|
|
50
|
-
/**
|
|
51
|
-
* #getter
|
|
52
|
-
*/
|
|
53
30
|
get adapterConfig() {
|
|
54
31
|
return (0, configuration_1.getConf)(this.parentTrack, 'adapter');
|
|
55
32
|
},
|
|
56
|
-
/**
|
|
57
|
-
* #getter
|
|
58
|
-
*/
|
|
59
33
|
get parentTrack() {
|
|
60
34
|
let track = (0, mobx_state_tree_1.getParent)(self);
|
|
61
35
|
while (!(track.configuration && (0, configuration_1.getConf)(track, 'trackId'))) {
|
|
@@ -66,11 +40,6 @@ function stateModelFactory() {
|
|
|
66
40
|
}
|
|
67
41
|
return track;
|
|
68
42
|
},
|
|
69
|
-
/**
|
|
70
|
-
* #method
|
|
71
|
-
* the react props that are passed to the Renderer when data
|
|
72
|
-
* is rendered in this display
|
|
73
|
-
*/
|
|
74
43
|
renderProps() {
|
|
75
44
|
return {
|
|
76
45
|
...(0, tracks_1.getParentRenderProps)(self),
|
|
@@ -79,69 +48,33 @@ function stateModelFactory() {
|
|
|
79
48
|
displayModel: self,
|
|
80
49
|
};
|
|
81
50
|
},
|
|
82
|
-
/**
|
|
83
|
-
* #getter
|
|
84
|
-
* the pluggable element type object for this display's renderer
|
|
85
|
-
*/
|
|
86
51
|
get rendererType() {
|
|
87
52
|
const { pluginManager } = (0, util_1.getEnv)(self);
|
|
88
53
|
return pluginManager.getRendererType(self.rendererTypeName);
|
|
89
54
|
},
|
|
90
|
-
/**
|
|
91
|
-
* #getter
|
|
92
|
-
* if a display-level message should be displayed instead, make this
|
|
93
|
-
* return a react component
|
|
94
|
-
*/
|
|
95
55
|
get DisplayMessageComponent() {
|
|
96
56
|
return undefined;
|
|
97
57
|
},
|
|
98
|
-
/**
|
|
99
|
-
* #method
|
|
100
|
-
*/
|
|
101
58
|
trackMenuItems() {
|
|
102
59
|
return [];
|
|
103
60
|
},
|
|
104
|
-
/**
|
|
105
|
-
* #getter
|
|
106
|
-
*/
|
|
107
61
|
get viewMenuActions() {
|
|
108
62
|
return [];
|
|
109
63
|
},
|
|
110
|
-
|
|
111
|
-
* #method
|
|
112
|
-
* @param region -
|
|
113
|
-
* @returns falsy if the region is fine to try rendering. Otherwise,
|
|
114
|
-
* return a react node + string of text. string of text describes why it
|
|
115
|
-
* cannot be rendered react node allows user to force load at current
|
|
116
|
-
* setting
|
|
117
|
-
*/
|
|
118
|
-
regionCannotBeRendered( /* region */) {
|
|
64
|
+
regionCannotBeRendered() {
|
|
119
65
|
return null;
|
|
120
66
|
},
|
|
121
67
|
}))
|
|
122
68
|
.actions(self => ({
|
|
123
|
-
/**
|
|
124
|
-
* #action
|
|
125
|
-
*/
|
|
126
69
|
setMessage(arg) {
|
|
127
70
|
self.message = arg;
|
|
128
71
|
},
|
|
129
|
-
/**
|
|
130
|
-
* #action
|
|
131
|
-
*/
|
|
132
72
|
setError(error) {
|
|
133
73
|
self.error = error;
|
|
134
74
|
},
|
|
135
|
-
/**
|
|
136
|
-
* #action
|
|
137
|
-
*/
|
|
138
75
|
setRpcDriverName(rpcDriverName) {
|
|
139
76
|
self.rpcDriverName = rpcDriverName;
|
|
140
77
|
},
|
|
141
|
-
/**
|
|
142
|
-
* #action
|
|
143
|
-
* base display reload does nothing, see specialized displays for details
|
|
144
|
-
*/
|
|
145
78
|
reload() { },
|
|
146
79
|
}));
|
|
147
80
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AnyConfigurationSchemaType } from '../../configuration';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import type PluginManager from '../../PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '../../configuration';
|
|
3
|
+
import type { MenuItem } from '../../ui';
|
|
4
|
+
import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
|
|
5
5
|
export declare function getCompatibleDisplays(self: IAnyStateTreeNode): ({
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -9,14 +9,6 @@ export declare function getCompatibleDisplays(self: IAnyStateTreeNode): ({
|
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
11
11
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>)[];
|
|
12
|
-
/**
|
|
13
|
-
* #stateModel BaseTrackModel
|
|
14
|
-
* #category track
|
|
15
|
-
*
|
|
16
|
-
* these MST models only exist for tracks that are *shown*. they should contain
|
|
17
|
-
* only UI state for the track, and have a reference to a track configuration.
|
|
18
|
-
* note that multiple displayed tracks could use the same configuration.
|
|
19
|
-
*/
|
|
20
12
|
export declare function createBaseTrackModel(pm: PluginManager, trackType: string, baseTrackConfig: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
21
13
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
22
14
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -24,30 +16,11 @@ export declare function createBaseTrackModel(pm: PluginManager, trackType: strin
|
|
|
24
16
|
minimized: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
25
17
|
displays: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
26
18
|
}, {
|
|
27
|
-
/**
|
|
28
|
-
* #getter
|
|
29
|
-
* determines which webworker to send the track to, currently based on trackId
|
|
30
|
-
*/
|
|
31
19
|
readonly rpcSessionId: any;
|
|
32
|
-
/**
|
|
33
|
-
* #getter
|
|
34
|
-
*/
|
|
35
20
|
readonly name: any;
|
|
36
|
-
/**
|
|
37
|
-
* #getter
|
|
38
|
-
*/
|
|
39
21
|
readonly textSearchAdapter: any;
|
|
40
|
-
/**
|
|
41
|
-
* #getter
|
|
42
|
-
*/
|
|
43
22
|
readonly adapterType: import("..").AdapterType;
|
|
44
|
-
/**
|
|
45
|
-
* #getter
|
|
46
|
-
*/
|
|
47
23
|
readonly viewMenuActions: MenuItem[];
|
|
48
|
-
/**
|
|
49
|
-
* #getter
|
|
50
|
-
*/
|
|
51
24
|
readonly canConfigure: boolean | ({
|
|
52
25
|
[x: string]: any;
|
|
53
26
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -56,26 +29,11 @@ export declare function createBaseTrackModel(pm: PluginManager, trackType: strin
|
|
|
56
29
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
57
30
|
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>) | undefined;
|
|
58
31
|
} & {
|
|
59
|
-
/**
|
|
60
|
-
* #action
|
|
61
|
-
*/
|
|
62
32
|
setMinimized(flag: boolean): void;
|
|
63
|
-
/**
|
|
64
|
-
* #action
|
|
65
|
-
*/
|
|
66
33
|
showDisplay(displayId: string, initialSnapshot?: {}): void;
|
|
67
|
-
/**
|
|
68
|
-
* #action
|
|
69
|
-
*/
|
|
70
34
|
hideDisplay(displayId: string): number;
|
|
71
|
-
/**
|
|
72
|
-
* #action
|
|
73
|
-
*/
|
|
74
35
|
replaceDisplay(oldId: string, newId: string, initialSnapshot?: {}): void;
|
|
75
36
|
} & {
|
|
76
|
-
/**
|
|
77
|
-
* #method
|
|
78
|
-
*/
|
|
79
37
|
trackMenuItems(): (import("../../ui").MenuDivider | import("../../ui").MenuSubHeader | import("../../ui").NormalMenuItem | import("../../ui").CheckboxMenuItem | import("../../ui").RadioMenuItem | import("../../ui").SubMenuItem | {
|
|
80
38
|
type: string;
|
|
81
39
|
label: string;
|
|
@@ -4,74 +4,41 @@ exports.getCompatibleDisplays = getCompatibleDisplays;
|
|
|
4
4
|
exports.createBaseTrackModel = createBaseTrackModel;
|
|
5
5
|
const mobx_1 = require("mobx");
|
|
6
6
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
7
|
-
// locals
|
|
8
7
|
const configuration_1 = require("../../configuration");
|
|
9
|
-
const util_1 = require("../../util");
|
|
8
|
+
const util_1 = require("../../data_adapters/util");
|
|
9
|
+
const util_2 = require("../../util");
|
|
10
10
|
const types_1 = require("../../util/types");
|
|
11
11
|
const mst_1 = require("../../util/types/mst");
|
|
12
12
|
function getCompatibleDisplays(self) {
|
|
13
|
-
const { pluginManager } = (0,
|
|
14
|
-
const view = (0,
|
|
13
|
+
const { pluginManager } = (0, util_2.getEnv)(self);
|
|
14
|
+
const view = (0, util_2.getContainingView)(self);
|
|
15
15
|
const viewType = pluginManager.getViewType(view.type);
|
|
16
16
|
const compatTypes = new Set(viewType.displayTypes.map(d => d.name));
|
|
17
17
|
const displays = self.configuration.displays;
|
|
18
18
|
return displays.filter(d => compatTypes.has(d.type));
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
* #stateModel BaseTrackModel
|
|
22
|
-
* #category track
|
|
23
|
-
*
|
|
24
|
-
* these MST models only exist for tracks that are *shown*. they should contain
|
|
25
|
-
* only UI state for the track, and have a reference to a track configuration.
|
|
26
|
-
* note that multiple displayed tracks could use the same configuration.
|
|
27
|
-
*/
|
|
28
20
|
function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
29
21
|
return mobx_state_tree_1.types
|
|
30
22
|
.model(trackType, {
|
|
31
|
-
/**
|
|
32
|
-
* #property
|
|
33
|
-
*/
|
|
34
23
|
id: mst_1.ElementId,
|
|
35
|
-
/**
|
|
36
|
-
* #property
|
|
37
|
-
*/
|
|
38
24
|
type: mobx_state_tree_1.types.literal(trackType),
|
|
39
|
-
/**
|
|
40
|
-
* #property
|
|
41
|
-
*/
|
|
42
25
|
configuration: (0, configuration_1.ConfigurationReference)(baseTrackConfig),
|
|
43
|
-
/**
|
|
44
|
-
* #property
|
|
45
|
-
*/
|
|
46
26
|
minimized: false,
|
|
47
|
-
/**
|
|
48
|
-
* #property
|
|
49
|
-
*/
|
|
50
27
|
displays: mobx_state_tree_1.types.array(pm.pluggableMstType('display', 'stateModel')),
|
|
51
28
|
})
|
|
52
29
|
.views(self => ({
|
|
53
|
-
/**
|
|
54
|
-
* #getter
|
|
55
|
-
* determines which webworker to send the track to, currently based on trackId
|
|
56
|
-
*/
|
|
57
30
|
get rpcSessionId() {
|
|
58
|
-
|
|
31
|
+
const adapter = (0, configuration_1.getConf)(self, 'adapter');
|
|
32
|
+
return adapter
|
|
33
|
+
? (0, util_1.adapterConfigCacheKey)(adapter)
|
|
34
|
+
: self.configuration.trackId;
|
|
59
35
|
},
|
|
60
|
-
/**
|
|
61
|
-
* #getter
|
|
62
|
-
*/
|
|
63
36
|
get name() {
|
|
64
37
|
return (0, configuration_1.getConf)(self, 'name');
|
|
65
38
|
},
|
|
66
|
-
/**
|
|
67
|
-
* #getter
|
|
68
|
-
*/
|
|
69
39
|
get textSearchAdapter() {
|
|
70
40
|
return (0, configuration_1.getConf)(self, 'textSearchAdapter');
|
|
71
41
|
},
|
|
72
|
-
/**
|
|
73
|
-
* #getter
|
|
74
|
-
*/
|
|
75
42
|
get adapterType() {
|
|
76
43
|
const adapterConfig = (0, configuration_1.getConf)(self, 'adapter');
|
|
77
44
|
if (!adapterConfig) {
|
|
@@ -83,17 +50,11 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
83
50
|
}
|
|
84
51
|
return adapterType;
|
|
85
52
|
},
|
|
86
|
-
/**
|
|
87
|
-
* #getter
|
|
88
|
-
*/
|
|
89
53
|
get viewMenuActions() {
|
|
90
54
|
return self.displays.flatMap(d => d.viewMenuActions);
|
|
91
55
|
},
|
|
92
|
-
/**
|
|
93
|
-
* #getter
|
|
94
|
-
*/
|
|
95
56
|
get canConfigure() {
|
|
96
|
-
const session = (0,
|
|
57
|
+
const session = (0, util_2.getSession)(self);
|
|
97
58
|
const { sessionTracks, adminMode } = session;
|
|
98
59
|
return ((0, types_1.isSessionModelWithConfigEditing)(session) &&
|
|
99
60
|
(adminMode ||
|
|
@@ -101,15 +62,9 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
101
62
|
},
|
|
102
63
|
}))
|
|
103
64
|
.actions(self => ({
|
|
104
|
-
/**
|
|
105
|
-
* #action
|
|
106
|
-
*/
|
|
107
65
|
setMinimized(flag) {
|
|
108
66
|
self.minimized = flag;
|
|
109
67
|
},
|
|
110
|
-
/**
|
|
111
|
-
* #action
|
|
112
|
-
*/
|
|
113
68
|
showDisplay(displayId, initialSnapshot = {}) {
|
|
114
69
|
const schema = pm.pluggableConfigSchemaType('display');
|
|
115
70
|
const conf = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), displayId);
|
|
@@ -124,9 +79,6 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
124
79
|
});
|
|
125
80
|
self.displays.push(display);
|
|
126
81
|
},
|
|
127
|
-
/**
|
|
128
|
-
* #action
|
|
129
|
-
*/
|
|
130
82
|
hideDisplay(displayId) {
|
|
131
83
|
const schema = pm.pluggableConfigSchemaType('display');
|
|
132
84
|
const conf = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), displayId);
|
|
@@ -136,9 +88,6 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
136
88
|
});
|
|
137
89
|
return t.length;
|
|
138
90
|
},
|
|
139
|
-
/**
|
|
140
|
-
* #action
|
|
141
|
-
*/
|
|
142
91
|
replaceDisplay(oldId, newId, initialSnapshot = {}) {
|
|
143
92
|
const idx = self.displays.findIndex(d => d.configuration.displayId === oldId);
|
|
144
93
|
if (idx === -1) {
|
|
@@ -158,9 +107,6 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
158
107
|
},
|
|
159
108
|
}))
|
|
160
109
|
.views(self => ({
|
|
161
|
-
/**
|
|
162
|
-
* #method
|
|
163
|
-
*/
|
|
164
110
|
trackMenuItems() {
|
|
165
111
|
const menuItems = self.displays.flatMap(d => d.trackMenuItems());
|
|
166
112
|
const shownId = self.displays[0].configuration.displayId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { MenuItem } from '../../ui';
|
|
2
|
+
import type { Instance } from 'mobx-state-tree';
|
|
3
3
|
declare const BaseViewModel: import("mobx-state-tree").IModelType<{
|
|
4
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
5
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -7,30 +7,10 @@ declare const BaseViewModel: import("mobx-state-tree").IModelType<{
|
|
|
7
7
|
}, {
|
|
8
8
|
width: number;
|
|
9
9
|
} & {
|
|
10
|
-
/**
|
|
11
|
-
* #getter
|
|
12
|
-
*/
|
|
13
10
|
menuItems(): MenuItem[];
|
|
14
11
|
} & {
|
|
15
|
-
/**
|
|
16
|
-
* #action
|
|
17
|
-
*/
|
|
18
12
|
setDisplayName(name: string): void;
|
|
19
|
-
/**
|
|
20
|
-
* #action
|
|
21
|
-
* width is an important attribute of the view model, when it becomes set, it
|
|
22
|
-
* often indicates when the app can start drawing to it. certain views like
|
|
23
|
-
* lgv are strict about this because if it tries to draw before it knows the
|
|
24
|
-
* width it should draw to, it may start fetching data for regions it doesn't
|
|
25
|
-
* need to
|
|
26
|
-
*
|
|
27
|
-
* setWidth is updated by a ResizeObserver generally, the views often need
|
|
28
|
-
* to know how wide they are to properly draw genomic regions
|
|
29
|
-
*/
|
|
30
13
|
setWidth(newWidth: number): void;
|
|
31
|
-
/**
|
|
32
|
-
* #action
|
|
33
|
-
*/
|
|
34
14
|
setMinimized(flag: boolean): void;
|
|
35
15
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
36
16
|
export default BaseViewModel;
|
|
@@ -53,30 +33,10 @@ export declare const BaseViewModelWithDisplayedRegions: import("mobx-state-tree"
|
|
|
53
33
|
}, {
|
|
54
34
|
width: number;
|
|
55
35
|
} & {
|
|
56
|
-
/**
|
|
57
|
-
* #getter
|
|
58
|
-
*/
|
|
59
36
|
menuItems(): MenuItem[];
|
|
60
37
|
} & {
|
|
61
|
-
/**
|
|
62
|
-
* #action
|
|
63
|
-
*/
|
|
64
38
|
setDisplayName(name: string): void;
|
|
65
|
-
/**
|
|
66
|
-
* #action
|
|
67
|
-
* width is an important attribute of the view model, when it becomes set, it
|
|
68
|
-
* often indicates when the app can start drawing to it. certain views like
|
|
69
|
-
* lgv are strict about this because if it tries to draw before it knows the
|
|
70
|
-
* width it should draw to, it may start fetching data for regions it doesn't
|
|
71
|
-
* need to
|
|
72
|
-
*
|
|
73
|
-
* setWidth is updated by a ResizeObserver generally, the views often need
|
|
74
|
-
* to know how wide they are to properly draw genomic regions
|
|
75
|
-
*/
|
|
76
39
|
setWidth(newWidth: number): void;
|
|
77
|
-
/**
|
|
78
|
-
* #action
|
|
79
|
-
*/
|
|
80
40
|
setMinimized(flag: boolean): void;
|
|
81
41
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
82
42
|
export type IBaseViewModelWithDisplayedRegions = Instance<typeof BaseViewModelWithDisplayedRegions>;
|
|
@@ -3,69 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BaseViewModelWithDisplayedRegions = void 0;
|
|
4
4
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
5
|
const mst_1 = require("../../util/types/mst");
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* #stateModel BaseViewModel
|
|
9
|
-
* #category view
|
|
10
|
-
*/
|
|
11
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
6
|
+
function x() { }
|
|
12
7
|
const BaseViewModel = mobx_state_tree_1.types
|
|
13
8
|
.model('BaseView', {
|
|
14
|
-
/**
|
|
15
|
-
* #property
|
|
16
|
-
*/
|
|
17
9
|
id: mst_1.ElementId,
|
|
18
|
-
/**
|
|
19
|
-
* #property
|
|
20
|
-
* displayName is displayed in the header of the view, or assembly names
|
|
21
|
-
* being used if none is specified
|
|
22
|
-
*/
|
|
23
10
|
displayName: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
24
|
-
/**
|
|
25
|
-
* #property
|
|
26
|
-
*/
|
|
27
11
|
minimized: false,
|
|
28
12
|
})
|
|
29
13
|
.volatile(() => ({
|
|
30
14
|
width: 800,
|
|
31
15
|
}))
|
|
32
16
|
.views(() => ({
|
|
33
|
-
/**
|
|
34
|
-
* #getter
|
|
35
|
-
*/
|
|
36
17
|
menuItems() {
|
|
37
18
|
return [];
|
|
38
19
|
},
|
|
39
20
|
}))
|
|
40
21
|
.actions(self => ({
|
|
41
|
-
/**
|
|
42
|
-
* #action
|
|
43
|
-
*/
|
|
44
22
|
setDisplayName(name) {
|
|
45
23
|
self.displayName = name;
|
|
46
24
|
},
|
|
47
|
-
/**
|
|
48
|
-
* #action
|
|
49
|
-
* width is an important attribute of the view model, when it becomes set, it
|
|
50
|
-
* often indicates when the app can start drawing to it. certain views like
|
|
51
|
-
* lgv are strict about this because if it tries to draw before it knows the
|
|
52
|
-
* width it should draw to, it may start fetching data for regions it doesn't
|
|
53
|
-
* need to
|
|
54
|
-
*
|
|
55
|
-
* setWidth is updated by a ResizeObserver generally, the views often need
|
|
56
|
-
* to know how wide they are to properly draw genomic regions
|
|
57
|
-
*/
|
|
58
25
|
setWidth(newWidth) {
|
|
59
26
|
self.width = newWidth;
|
|
60
27
|
},
|
|
61
|
-
/**
|
|
62
|
-
* #action
|
|
63
|
-
*/
|
|
64
28
|
setMinimized(flag) {
|
|
65
29
|
self.minimized = flag;
|
|
66
30
|
},
|
|
67
31
|
}));
|
|
68
32
|
exports.default = BaseViewModel;
|
|
69
33
|
exports.BaseViewModelWithDisplayedRegions = BaseViewModel.props({
|
|
70
|
-
displayedRegions: mobx_state_tree_1.types.array(
|
|
34
|
+
displayedRegions: mobx_state_tree_1.types.array(mst_1.Region),
|
|
71
35
|
});
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Instance } from 'mobx-state-tree';
|
|
1
|
+
import type React from 'react';
|
|
3
2
|
import { RemoteFileWithRangeCache } from '../../util/io';
|
|
4
|
-
import {
|
|
3
|
+
import type { AnyReactComponentType, UriLocation } from '../../util/types';
|
|
4
|
+
import type { Instance } from 'mobx-state-tree';
|
|
5
5
|
export declare const InternetAccount: import("mobx-state-tree").IModelType<{
|
|
6
|
-
/**
|
|
7
|
-
* #property
|
|
8
|
-
*/
|
|
9
6
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
10
|
-
/**
|
|
11
|
-
* #property
|
|
12
|
-
*/
|
|
13
7
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
14
|
-
/**
|
|
15
|
-
* #property
|
|
16
|
-
*/
|
|
17
8
|
configuration: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
|
|
18
9
|
name: {
|
|
19
10
|
description: string;
|
|
@@ -42,111 +33,27 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
|
|
|
42
33
|
};
|
|
43
34
|
}, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
|
|
44
35
|
}, {
|
|
45
|
-
/**
|
|
46
|
-
* #getter
|
|
47
|
-
*/
|
|
48
36
|
readonly name: string;
|
|
49
|
-
/**
|
|
50
|
-
* #getter
|
|
51
|
-
*/
|
|
52
37
|
readonly description: string;
|
|
53
|
-
/**
|
|
54
|
-
* #getter
|
|
55
|
-
*/
|
|
56
38
|
readonly internetAccountId: string;
|
|
57
|
-
/**
|
|
58
|
-
* #getter
|
|
59
|
-
*/
|
|
60
39
|
readonly authHeader: string;
|
|
61
|
-
/**
|
|
62
|
-
* #getter
|
|
63
|
-
*/
|
|
64
40
|
readonly tokenType: string;
|
|
65
|
-
/**
|
|
66
|
-
* #getter
|
|
67
|
-
*/
|
|
68
41
|
readonly domains: string[];
|
|
69
|
-
/**
|
|
70
|
-
* #getter
|
|
71
|
-
* Can use this to customize what is displayed in fileSelector's toggle box
|
|
72
|
-
*/
|
|
73
42
|
readonly toggleContents: React.ReactNode;
|
|
74
|
-
/**
|
|
75
|
-
* #getter
|
|
76
|
-
* Can use this to customize what the fileSelector. It takes a prop called
|
|
77
|
-
* `setLocation` that should be used to set a UriLocation
|
|
78
|
-
*/
|
|
79
43
|
readonly SelectorComponent: AnyReactComponentType | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* #getter
|
|
82
|
-
* Can use this to add a label to the UrlChooser. Has no effect if a custom
|
|
83
|
-
* SelectorComponent is supplied
|
|
84
|
-
*/
|
|
85
44
|
readonly selectorLabel: string | undefined;
|
|
86
45
|
} & {
|
|
87
|
-
/**
|
|
88
|
-
* #method
|
|
89
|
-
* Determine whether this internetAccount provides credentials for a URL
|
|
90
|
-
* @param location - UriLocation of resource
|
|
91
|
-
* @returns true or false
|
|
92
|
-
*/
|
|
93
46
|
handlesLocation(location: UriLocation): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* #getter
|
|
96
|
-
* The key used to store this internetAccount's token in sessionStorage
|
|
97
|
-
*/
|
|
98
47
|
readonly tokenKey: string;
|
|
99
48
|
} & {
|
|
100
|
-
/**
|
|
101
|
-
* #action
|
|
102
|
-
* Must be implemented by a model extending or composing this one. Pass the
|
|
103
|
-
* user's token to `resolve`.
|
|
104
|
-
* @param resolve - Pass the token to this function
|
|
105
|
-
* @param reject - If there is an error getting the token, call this function
|
|
106
|
-
*/
|
|
107
49
|
getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
|
|
108
|
-
/**
|
|
109
|
-
* #action
|
|
110
|
-
*/
|
|
111
50
|
storeToken(token: string): void;
|
|
112
|
-
/**
|
|
113
|
-
* #action
|
|
114
|
-
*/
|
|
115
51
|
removeToken(): void;
|
|
116
|
-
/**
|
|
117
|
-
* #action
|
|
118
|
-
*/
|
|
119
52
|
retrieveToken(): string | null;
|
|
120
|
-
/**
|
|
121
|
-
* #action
|
|
122
|
-
* This can be used by an internetAccount to validate a token works before
|
|
123
|
-
* it is used. This is run when preAuthorizationInformation is requested,
|
|
124
|
-
* so it can be used to check that a token is valid before sending it to a
|
|
125
|
-
* worker thread. It expects the token to be returned so that this action
|
|
126
|
-
* can also be used to generate a new token (e.g. by using a refresh token)
|
|
127
|
-
* if the original one was invalid. Should throw an error if a token is
|
|
128
|
-
* invalid.
|
|
129
|
-
*
|
|
130
|
-
* @param token - Auth token
|
|
131
|
-
* @param loc - UriLocation of the resource
|
|
132
|
-
* @returns - Valid auth token
|
|
133
|
-
*/
|
|
134
53
|
validateToken(token: string, _loc: UriLocation): Promise<string>;
|
|
135
54
|
} & {
|
|
136
|
-
/**
|
|
137
|
-
* #action
|
|
138
|
-
* Try to get the token from the location pre-auth, from local storage,
|
|
139
|
-
* or from a previously cached promise. If token is not available, uses
|
|
140
|
-
* `getTokenFromUser`.
|
|
141
|
-
*
|
|
142
|
-
* @param location - UriLocation of the resource
|
|
143
|
-
* @returns A promise for the token
|
|
144
|
-
*/
|
|
145
55
|
getToken(location?: UriLocation): Promise<string>;
|
|
146
56
|
} & {
|
|
147
|
-
/**
|
|
148
|
-
* #action
|
|
149
|
-
*/
|
|
150
57
|
addAuthHeaderToInit(init?: RequestInit, token?: string): {
|
|
151
58
|
headers: Headers;
|
|
152
59
|
body?: BodyInit | null;
|
|
@@ -163,14 +70,6 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
|
|
|
163
70
|
signal?: AbortSignal | null;
|
|
164
71
|
window?: null;
|
|
165
72
|
};
|
|
166
|
-
/**
|
|
167
|
-
* #action
|
|
168
|
-
* Gets the token and returns it along with the information needed to
|
|
169
|
-
* create a new internetAccount.
|
|
170
|
-
*
|
|
171
|
-
* @param location - UriLocation of the resource
|
|
172
|
-
* @returns
|
|
173
|
-
*/
|
|
174
73
|
getPreAuthorizationInformation(location: UriLocation): Promise<{
|
|
175
74
|
internetAccountType: string;
|
|
176
75
|
authInfo: {
|
|
@@ -179,23 +78,8 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
|
|
|
179
78
|
};
|
|
180
79
|
}>;
|
|
181
80
|
} & {
|
|
182
|
-
/**
|
|
183
|
-
* #action
|
|
184
|
-
* Get a fetch method that will add any needed authentication headers to
|
|
185
|
-
* the request before sending it. If location is provided, it will be
|
|
186
|
-
* checked to see if it includes a token in it pre-auth information.
|
|
187
|
-
*
|
|
188
|
-
* @param loc - UriLocation of the resource
|
|
189
|
-
* @returns A function that can be used to fetch
|
|
190
|
-
*/
|
|
191
81
|
getFetcher(loc?: UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
192
82
|
} & {
|
|
193
|
-
/**
|
|
194
|
-
* #action
|
|
195
|
-
* Gets a filehandle that uses a fetch that adds auth headers
|
|
196
|
-
* @param location - UriLocation of the resource
|
|
197
|
-
* @returns A filehandle
|
|
198
|
-
*/
|
|
199
83
|
openLocation(location: UriLocation): RemoteFileWithRangeCache;
|
|
200
84
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
201
85
|
export type BaseInternetAccountStateModel = typeof InternetAccount;
|