@jbrowse/core 2.16.1 → 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 +3 -4
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +5 -9
- 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 -35
- package/BaseFeatureWidget/SequenceFeatureDetails/model.js +19 -44
- 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 +3 -94
- 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 +10 -114
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +13 -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 +2 -1
- package/data_adapters/CytobandAdapter/CytobandAdapter.js +11 -12
- 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 +4 -5
- 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 +5 -5
- 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 +6 -2
- 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 +2 -19
- 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 +24 -84
- 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 +25 -173
- package/util/index.js +87 -326
- 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 -58
- package/util/simpleFeature.js +0 -35
- package/util/stats.d.ts +4 -34
- package/util/stats.js +0 -60
- 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,27 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { MenuItem } from '../../ui';
|
|
3
|
+
import type { Instance } from 'mobx-state-tree';
|
|
4
4
|
export declare const BaseDisplay: import("mobx-state-tree").IModelType<{
|
|
5
|
-
/**
|
|
6
|
-
* #property
|
|
7
|
-
*/
|
|
8
5
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
9
|
-
/**
|
|
10
|
-
* #property
|
|
11
|
-
*/
|
|
12
6
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
13
|
-
/**
|
|
14
|
-
* #property
|
|
15
|
-
*/
|
|
16
7
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
17
8
|
}, {
|
|
18
9
|
rendererTypeName: string;
|
|
19
10
|
error: unknown;
|
|
20
11
|
message: string | undefined;
|
|
21
12
|
} & {
|
|
22
|
-
/**
|
|
23
|
-
* #getter
|
|
24
|
-
*/
|
|
25
13
|
readonly RenderingComponent: React.FC<{
|
|
26
14
|
model: {
|
|
27
15
|
id: string;
|
|
@@ -32,17 +20,8 @@ export declare const BaseDisplay: import("mobx-state-tree").IModelType<{
|
|
|
32
20
|
error: unknown;
|
|
33
21
|
message: string | undefined;
|
|
34
22
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
35
|
-
/**
|
|
36
|
-
* #property
|
|
37
|
-
*/
|
|
38
23
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
39
|
-
/**
|
|
40
|
-
* #property
|
|
41
|
-
*/
|
|
42
24
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
43
|
-
/**
|
|
44
|
-
* #property
|
|
45
|
-
*/
|
|
46
25
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
47
26
|
}, {
|
|
48
27
|
rendererTypeName: string;
|
|
@@ -52,9 +31,6 @@ export declare const BaseDisplay: import("mobx-state-tree").IModelType<{
|
|
|
52
31
|
onHorizontalScroll?: () => void;
|
|
53
32
|
blockState?: Record<string, any>;
|
|
54
33
|
}>;
|
|
55
|
-
/**
|
|
56
|
-
* #getter
|
|
57
|
-
*/
|
|
58
34
|
readonly DisplayBlurb: React.FC<{
|
|
59
35
|
model: {
|
|
60
36
|
id: string;
|
|
@@ -65,17 +41,8 @@ export declare const BaseDisplay: import("mobx-state-tree").IModelType<{
|
|
|
65
41
|
error: unknown;
|
|
66
42
|
message: string | undefined;
|
|
67
43
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
68
|
-
/**
|
|
69
|
-
* #property
|
|
70
|
-
*/
|
|
71
44
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
72
|
-
/**
|
|
73
|
-
* #property
|
|
74
|
-
*/
|
|
75
45
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
76
|
-
/**
|
|
77
|
-
* #property
|
|
78
|
-
*/
|
|
79
46
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
80
47
|
}, {
|
|
81
48
|
rendererTypeName: string;
|
|
@@ -83,65 +50,18 @@ export declare const BaseDisplay: import("mobx-state-tree").IModelType<{
|
|
|
83
50
|
message: string | undefined;
|
|
84
51
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
85
52
|
}> | null;
|
|
86
|
-
/**
|
|
87
|
-
* #getter
|
|
88
|
-
*/
|
|
89
53
|
readonly adapterConfig: any;
|
|
90
|
-
/**
|
|
91
|
-
* #getter
|
|
92
|
-
*/
|
|
93
54
|
readonly parentTrack: any;
|
|
94
|
-
/**
|
|
95
|
-
* #method
|
|
96
|
-
* the react props that are passed to the Renderer when data
|
|
97
|
-
* is rendered in this display
|
|
98
|
-
*/
|
|
99
55
|
renderProps(): any;
|
|
100
|
-
/**
|
|
101
|
-
* #getter
|
|
102
|
-
* the pluggable element type object for this display's renderer
|
|
103
|
-
*/
|
|
104
56
|
readonly rendererType: import("..").RendererType;
|
|
105
|
-
/**
|
|
106
|
-
* #getter
|
|
107
|
-
* if a display-level message should be displayed instead, make this
|
|
108
|
-
* return a react component
|
|
109
|
-
*/
|
|
110
57
|
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
111
|
-
/**
|
|
112
|
-
* #method
|
|
113
|
-
*/
|
|
114
58
|
trackMenuItems(): MenuItem[];
|
|
115
|
-
/**
|
|
116
|
-
* #getter
|
|
117
|
-
*/
|
|
118
59
|
readonly viewMenuActions: MenuItem[];
|
|
119
|
-
/**
|
|
120
|
-
* #method
|
|
121
|
-
* @param region -
|
|
122
|
-
* @returns falsy if the region is fine to try rendering. Otherwise,
|
|
123
|
-
* return a react node + string of text. string of text describes why it
|
|
124
|
-
* cannot be rendered react node allows user to force load at current
|
|
125
|
-
* setting
|
|
126
|
-
*/
|
|
127
60
|
regionCannotBeRendered(): null;
|
|
128
61
|
} & {
|
|
129
|
-
/**
|
|
130
|
-
* #action
|
|
131
|
-
*/
|
|
132
62
|
setMessage(arg?: string): void;
|
|
133
|
-
/**
|
|
134
|
-
* #action
|
|
135
|
-
*/
|
|
136
63
|
setError(error?: unknown): void;
|
|
137
|
-
/**
|
|
138
|
-
* #action
|
|
139
|
-
*/
|
|
140
64
|
setRpcDriverName(rpcDriverName: string): void;
|
|
141
|
-
/**
|
|
142
|
-
* #action
|
|
143
|
-
* base display reload does nothing, see specialized displays for details
|
|
144
|
-
*/
|
|
145
65
|
reload(): void;
|
|
146
66
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
147
67
|
export type BaseDisplayStateModel = typeof BaseDisplay;
|
|
@@ -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,7 +4,6 @@ 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
8
|
const util_1 = require("../../util");
|
|
10
9
|
const types_1 = require("../../util/types");
|
|
@@ -17,61 +16,25 @@ function getCompatibleDisplays(self) {
|
|
|
17
16
|
const displays = self.configuration.displays;
|
|
18
17
|
return displays.filter(d => compatTypes.has(d.type));
|
|
19
18
|
}
|
|
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
19
|
function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
29
20
|
return mobx_state_tree_1.types
|
|
30
21
|
.model(trackType, {
|
|
31
|
-
/**
|
|
32
|
-
* #property
|
|
33
|
-
*/
|
|
34
22
|
id: mst_1.ElementId,
|
|
35
|
-
/**
|
|
36
|
-
* #property
|
|
37
|
-
*/
|
|
38
23
|
type: mobx_state_tree_1.types.literal(trackType),
|
|
39
|
-
/**
|
|
40
|
-
* #property
|
|
41
|
-
*/
|
|
42
24
|
configuration: (0, configuration_1.ConfigurationReference)(baseTrackConfig),
|
|
43
|
-
/**
|
|
44
|
-
* #property
|
|
45
|
-
*/
|
|
46
25
|
minimized: false,
|
|
47
|
-
/**
|
|
48
|
-
* #property
|
|
49
|
-
*/
|
|
50
26
|
displays: mobx_state_tree_1.types.array(pm.pluggableMstType('display', 'stateModel')),
|
|
51
27
|
})
|
|
52
28
|
.views(self => ({
|
|
53
|
-
/**
|
|
54
|
-
* #getter
|
|
55
|
-
* determines which webworker to send the track to, currently based on trackId
|
|
56
|
-
*/
|
|
57
29
|
get rpcSessionId() {
|
|
58
30
|
return self.configuration.trackId;
|
|
59
31
|
},
|
|
60
|
-
/**
|
|
61
|
-
* #getter
|
|
62
|
-
*/
|
|
63
32
|
get name() {
|
|
64
33
|
return (0, configuration_1.getConf)(self, 'name');
|
|
65
34
|
},
|
|
66
|
-
/**
|
|
67
|
-
* #getter
|
|
68
|
-
*/
|
|
69
35
|
get textSearchAdapter() {
|
|
70
36
|
return (0, configuration_1.getConf)(self, 'textSearchAdapter');
|
|
71
37
|
},
|
|
72
|
-
/**
|
|
73
|
-
* #getter
|
|
74
|
-
*/
|
|
75
38
|
get adapterType() {
|
|
76
39
|
const adapterConfig = (0, configuration_1.getConf)(self, 'adapter');
|
|
77
40
|
if (!adapterConfig) {
|
|
@@ -83,15 +46,9 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
83
46
|
}
|
|
84
47
|
return adapterType;
|
|
85
48
|
},
|
|
86
|
-
/**
|
|
87
|
-
* #getter
|
|
88
|
-
*/
|
|
89
49
|
get viewMenuActions() {
|
|
90
50
|
return self.displays.flatMap(d => d.viewMenuActions);
|
|
91
51
|
},
|
|
92
|
-
/**
|
|
93
|
-
* #getter
|
|
94
|
-
*/
|
|
95
52
|
get canConfigure() {
|
|
96
53
|
const session = (0, util_1.getSession)(self);
|
|
97
54
|
const { sessionTracks, adminMode } = session;
|
|
@@ -101,15 +58,9 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
101
58
|
},
|
|
102
59
|
}))
|
|
103
60
|
.actions(self => ({
|
|
104
|
-
/**
|
|
105
|
-
* #action
|
|
106
|
-
*/
|
|
107
61
|
setMinimized(flag) {
|
|
108
62
|
self.minimized = flag;
|
|
109
63
|
},
|
|
110
|
-
/**
|
|
111
|
-
* #action
|
|
112
|
-
*/
|
|
113
64
|
showDisplay(displayId, initialSnapshot = {}) {
|
|
114
65
|
const schema = pm.pluggableConfigSchemaType('display');
|
|
115
66
|
const conf = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), displayId);
|
|
@@ -124,9 +75,6 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
124
75
|
});
|
|
125
76
|
self.displays.push(display);
|
|
126
77
|
},
|
|
127
|
-
/**
|
|
128
|
-
* #action
|
|
129
|
-
*/
|
|
130
78
|
hideDisplay(displayId) {
|
|
131
79
|
const schema = pm.pluggableConfigSchemaType('display');
|
|
132
80
|
const conf = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), displayId);
|
|
@@ -136,9 +84,6 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
136
84
|
});
|
|
137
85
|
return t.length;
|
|
138
86
|
},
|
|
139
|
-
/**
|
|
140
|
-
* #action
|
|
141
|
-
*/
|
|
142
87
|
replaceDisplay(oldId, newId, initialSnapshot = {}) {
|
|
143
88
|
const idx = self.displays.findIndex(d => d.configuration.displayId === oldId);
|
|
144
89
|
if (idx === -1) {
|
|
@@ -158,9 +103,6 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
158
103
|
},
|
|
159
104
|
}))
|
|
160
105
|
.views(self => ({
|
|
161
|
-
/**
|
|
162
|
-
* #method
|
|
163
|
-
*/
|
|
164
106
|
trackMenuItems() {
|
|
165
107
|
const menuItems = self.displays.flatMap(d => d.trackMenuItems());
|
|
166
108
|
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
|
});
|