@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
package/ui/LoadingEllipses.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.default = LoadingEllipses;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const material_1 = require("@mui/material");
|
|
9
|
-
const mui_1 = require("tss-react/mui");
|
|
10
9
|
const tss_react_1 = require("tss-react");
|
|
10
|
+
const mui_1 = require("tss-react/mui");
|
|
11
11
|
const useStyles = (0, mui_1.makeStyles)()({
|
|
12
12
|
dots: {
|
|
13
13
|
'&::after': {
|
|
@@ -33,6 +33,6 @@ const useStyles = (0, mui_1.makeStyles)()({
|
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
35
|
function LoadingEllipses({ message, variant = 'body2', ...rest }) {
|
|
36
|
-
const { classes } = useStyles();
|
|
37
|
-
return (react_1.default.createElement(material_1.Typography, { className: classes.dots, ...rest, variant: variant }, message || 'Loading'));
|
|
36
|
+
const { cx, classes } = useStyles();
|
|
37
|
+
return (react_1.default.createElement(material_1.Typography, { className: cx(classes.dots, rest.className), ...rest, variant: variant }, message || 'Loading'));
|
|
38
38
|
}
|
package/ui/Menu.d.ts
CHANGED
package/ui/Menu.js
CHANGED
|
@@ -28,29 +28,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.MenuItemEndDecoration = MenuItemEndDecoration;
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
|
-
const material_1 = require("@mui/material");
|
|
32
|
-
const mui_1 = require("tss-react/mui");
|
|
33
|
-
// icons
|
|
34
31
|
const ArrowRight_1 = __importDefault(require("@mui/icons-material/ArrowRight"));
|
|
35
32
|
const CheckBox_1 = __importDefault(require("@mui/icons-material/CheckBox"));
|
|
36
33
|
const CheckBoxOutlineBlank_1 = __importDefault(require("@mui/icons-material/CheckBoxOutlineBlank"));
|
|
37
34
|
const RadioButtonChecked_1 = __importDefault(require("@mui/icons-material/RadioButtonChecked"));
|
|
38
35
|
const RadioButtonUnchecked_1 = __importDefault(require("@mui/icons-material/RadioButtonUnchecked"));
|
|
39
|
-
|
|
36
|
+
const material_1 = require("@mui/material");
|
|
37
|
+
const mui_1 = require("tss-react/mui");
|
|
40
38
|
const util_1 = require("../util");
|
|
41
39
|
const useStyles = (0, mui_1.makeStyles)()({
|
|
42
40
|
paper: {
|
|
43
41
|
position: 'fixed',
|
|
44
42
|
overflowY: 'auto',
|
|
45
43
|
overflowX: 'hidden',
|
|
46
|
-
// So we see the popover when it's empty.
|
|
47
44
|
minWidth: 16,
|
|
48
45
|
minHeight: 16,
|
|
49
46
|
maxWidth: 'calc(100% - 32px)',
|
|
50
47
|
maxHeight: 'calc(100% - 32px)',
|
|
51
48
|
top: 0,
|
|
52
49
|
left: 0,
|
|
53
|
-
// We disable the focus ring for mouse, touch and keyboard users.
|
|
54
50
|
outline: 0,
|
|
55
51
|
},
|
|
56
52
|
menuItemEndDecoration: {
|
|
@@ -94,7 +90,6 @@ function MenuItemEndDecoration(props) {
|
|
|
94
90
|
}
|
|
95
91
|
break;
|
|
96
92
|
}
|
|
97
|
-
// No default
|
|
98
93
|
}
|
|
99
94
|
return react_1.default.createElement("div", { className: classes.menuItemEndDecoration }, icon);
|
|
100
95
|
}
|
|
@@ -249,9 +244,7 @@ const MenuPage = react_1.default.forwardRef(function MenuPage2(props, ref) {
|
|
|
249
244
|
}
|
|
250
245
|
return subMenu;
|
|
251
246
|
})));
|
|
252
|
-
return top ? (ListContents) : (
|
|
253
|
-
// Grow is required for cascading sub-menus
|
|
254
|
-
react_1.default.createElement(material_1.Grow, { in: open, style: { transformOrigin: '0 0 0' }, ref: ref },
|
|
247
|
+
return top ? (ListContents) : (react_1.default.createElement(material_1.Grow, { in: open, style: { transformOrigin: '0 0 0' }, ref: ref },
|
|
255
248
|
react_1.default.createElement(material_1.Paper, { elevation: 8, ref: paperRef, className: classes.paper, style: { ...position } }, ListContents)));
|
|
256
249
|
});
|
|
257
250
|
function Menu(props) {
|
package/ui/MenuButton.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MenuItem } from '@jbrowse/core/ui';
|
|
2
|
+
import type { MenuItem } from '@jbrowse/core/ui';
|
|
3
3
|
declare const MenuButton: ({ children, menuItems, closeAfterItemClick, stopPropagation, setOpen, ...rest }: {
|
|
4
4
|
closeAfterItemClick?: boolean;
|
|
5
5
|
children?: React.ReactElement;
|
package/ui/ResizeHandle.js
CHANGED
|
@@ -36,11 +36,11 @@ const useStyles = (0, mui_1.makeStyles)()({
|
|
|
36
36
|
},
|
|
37
37
|
flexbox_verticalHandle: {
|
|
38
38
|
cursor: 'col-resize',
|
|
39
|
-
alignSelf: 'stretch',
|
|
39
|
+
alignSelf: 'stretch',
|
|
40
40
|
},
|
|
41
41
|
flexbox_horizontalHandle: {
|
|
42
42
|
cursor: 'row-resize',
|
|
43
|
-
alignSelf: 'stretch',
|
|
43
|
+
alignSelf: 'stretch',
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
function ResizeHandle({ onDrag, vertical = false, flexbox = false, className: originalClassName, onMouseDown, ...props }) {
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
8
7
|
const material_1 = require("@mui/material");
|
|
8
|
+
const mobx_react_1 = require("mobx-react");
|
|
9
9
|
const Dialog_1 = __importDefault(require("./Dialog"));
|
|
10
10
|
const ReturnToImportFormDialog = (0, mobx_react_1.observer)(function ({ model, handleClose, }) {
|
|
11
11
|
return (react_1.default.createElement(Dialog_1.default, { maxWidth: "xl", open: true, onClose: handleClose, title: "Reference sequence" },
|
package/ui/SanitizedHTML.js
CHANGED
|
@@ -5,14 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = SanitizedHTML;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const escape_html_1 = __importDefault(require("escape-html"));
|
|
9
8
|
const dompurify_1 = __importDefault(require("dompurify"));
|
|
9
|
+
const escape_html_1 = __importDefault(require("escape-html"));
|
|
10
10
|
const util_1 = require("../util");
|
|
11
|
-
// source https://github.com/sindresorhus/html-tags/blob/master/html-tags.json
|
|
12
|
-
// with some random uncommon ones removed. note: we just use this to run the content
|
|
13
|
-
// through dompurify without escaping if we see an htmlTag from this list
|
|
14
|
-
// otherwise we escape angle brackets and things prematurely because it might be
|
|
15
|
-
// something like <TRA> in VCF. Ref #657
|
|
16
11
|
const htmlTags = [
|
|
17
12
|
'a',
|
|
18
13
|
'b',
|
|
@@ -47,33 +42,18 @@ const htmlTags = [
|
|
|
47
42
|
'ul',
|
|
48
43
|
];
|
|
49
44
|
let added = false;
|
|
50
|
-
// adapted from is-html
|
|
51
|
-
// https://github.com/sindresorhus/is-html/blob/master/index.js
|
|
52
45
|
const full = new RegExp(htmlTags.map(tag => `<${tag}\\b[^>]*>`).join('|'), 'i');
|
|
53
46
|
function isHTML(str) {
|
|
54
47
|
return full.test(str);
|
|
55
48
|
}
|
|
56
|
-
// note this is mocked during testing, see
|
|
57
|
-
// packages/__mocks__/@jbrowse/core/ui/SanitizedHTML something about dompurify
|
|
58
|
-
// behavior causes errors during tests, was seen in
|
|
59
|
-
// products/jbrowse-web/src/tests/Connection.test.tsx test (can delete mock to
|
|
60
|
-
// see)
|
|
61
|
-
//
|
|
62
49
|
function SanitizedHTML({ html: pre, className, }) {
|
|
63
|
-
// try to add links to the text first
|
|
64
50
|
const html = (0, util_1.linkify)(pre);
|
|
65
51
|
const value = isHTML(html) ? html : (0, escape_html_1.default)(html);
|
|
66
52
|
if (!added) {
|
|
67
53
|
added = true;
|
|
68
|
-
// see https://github.com/cure53/DOMPurify/issues/317
|
|
69
|
-
// only have to add this once, and can't do it globally because dompurify
|
|
70
|
-
// not yet initialized at global scope
|
|
71
54
|
dompurify_1.default.addHook('afterSanitizeAttributes', node => {
|
|
72
|
-
// @ts-expect-error
|
|
73
55
|
if (node.tagName === 'A') {
|
|
74
|
-
// @ts-expect-error
|
|
75
56
|
node.setAttribute('rel', 'noopener noreferrer');
|
|
76
|
-
// @ts-expect-error
|
|
77
57
|
node.setAttribute('target', '_blank');
|
|
78
58
|
}
|
|
79
59
|
});
|
package/ui/Snackbar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AbstractSessionModel } from '../util';
|
|
3
|
-
import { SnackbarMessage } from './SnackbarModel';
|
|
2
|
+
import type { AbstractSessionModel } from '../util';
|
|
3
|
+
import type { SnackbarMessage } from './SnackbarModel';
|
|
4
4
|
interface SnackbarSession extends AbstractSessionModel {
|
|
5
5
|
snackbarMessages: SnackbarMessage[];
|
|
6
6
|
popSnackbarMessage: () => void;
|
package/ui/Snackbar.js
CHANGED
|
@@ -4,10 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
7
8
|
const material_1 = require("@mui/material");
|
|
8
9
|
const mobx_react_1 = require("mobx-react");
|
|
9
|
-
// icons
|
|
10
|
-
const Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
11
10
|
const Snackbar = (0, mobx_react_1.observer)(function ({ session }) {
|
|
12
11
|
const { snackbarMessages } = session;
|
|
13
12
|
const latestMessage = snackbarMessages.at(-1);
|
package/ui/SnackbarModel.d.ts
CHANGED
|
@@ -1,42 +1,17 @@
|
|
|
1
|
-
import { NotificationLevel, SnackAction } from '../util/types';
|
|
1
|
+
import type { NotificationLevel, SnackAction } from '../util/types';
|
|
2
2
|
export interface SnackbarMessage {
|
|
3
3
|
message: string;
|
|
4
4
|
level?: NotificationLevel;
|
|
5
5
|
action?: SnackAction;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* #stateModel SnackbarModel
|
|
9
|
-
* #category session
|
|
10
|
-
*/
|
|
11
7
|
export default function SnackbarModel(): import("mobx-state-tree").IModelType<{}, {
|
|
12
|
-
/**
|
|
13
|
-
* #volatile
|
|
14
|
-
*/
|
|
15
8
|
snackbarMessages: import("mobx").IObservableArray<SnackbarMessage>;
|
|
16
9
|
} & {
|
|
17
|
-
/**
|
|
18
|
-
* #getter
|
|
19
|
-
*/
|
|
20
10
|
readonly snackbarMessageSet: Map<string, SnackbarMessage>;
|
|
21
11
|
} & {
|
|
22
|
-
/**
|
|
23
|
-
* #action
|
|
24
|
-
*/
|
|
25
12
|
notify(message: string, level?: NotificationLevel, action?: SnackAction): void;
|
|
26
|
-
/**
|
|
27
|
-
* #action
|
|
28
|
-
*/
|
|
29
13
|
notifyError(errorMessage: string, error?: unknown, extra?: unknown): void;
|
|
30
|
-
/**
|
|
31
|
-
* #action
|
|
32
|
-
*/
|
|
33
14
|
pushSnackbarMessage(message: string, level?: NotificationLevel, action?: SnackAction): void;
|
|
34
|
-
/**
|
|
35
|
-
* #action
|
|
36
|
-
*/
|
|
37
15
|
popSnackbarMessage(): SnackbarMessage | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* #action
|
|
40
|
-
*/
|
|
41
16
|
removeSnackbarMessage(message: string): void;
|
|
42
17
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
package/ui/SnackbarModel.js
CHANGED
|
@@ -28,37 +28,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.default = SnackbarModel;
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
32
|
-
const mobx_1 = require("mobx");
|
|
33
|
-
// icons
|
|
34
31
|
const Report_1 = __importDefault(require("@mui/icons-material/Report"));
|
|
35
|
-
|
|
32
|
+
const mobx_1 = require("mobx");
|
|
33
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
36
34
|
const ErrorMessageStackTraceDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@jbrowse/core/ui/ErrorMessageStackTraceDialog'))));
|
|
37
|
-
/**
|
|
38
|
-
* #stateModel SnackbarModel
|
|
39
|
-
* #category session
|
|
40
|
-
*/
|
|
41
35
|
function SnackbarModel() {
|
|
42
36
|
return mobx_state_tree_1.types
|
|
43
37
|
.model({})
|
|
44
38
|
.volatile(() => ({
|
|
45
|
-
/**
|
|
46
|
-
* #volatile
|
|
47
|
-
*/
|
|
48
39
|
snackbarMessages: mobx_1.observable.array(),
|
|
49
40
|
}))
|
|
50
41
|
.views(self => ({
|
|
51
|
-
/**
|
|
52
|
-
* #getter
|
|
53
|
-
*/
|
|
54
42
|
get snackbarMessageSet() {
|
|
55
43
|
return new Map(self.snackbarMessages.map(s => [s.message, s]));
|
|
56
44
|
},
|
|
57
45
|
}))
|
|
58
46
|
.actions(self => ({
|
|
59
|
-
/**
|
|
60
|
-
* #action
|
|
61
|
-
*/
|
|
62
47
|
notify(message, level, action) {
|
|
63
48
|
this.pushSnackbarMessage(message, level, action);
|
|
64
49
|
if (level === 'info' || level === 'success') {
|
|
@@ -67,14 +52,10 @@ function SnackbarModel() {
|
|
|
67
52
|
}, 5000);
|
|
68
53
|
}
|
|
69
54
|
},
|
|
70
|
-
/**
|
|
71
|
-
* #action
|
|
72
|
-
*/
|
|
73
55
|
notifyError(errorMessage, error, extra) {
|
|
74
56
|
this.notify(errorMessage, 'error', {
|
|
75
57
|
name: react_1.default.createElement(Report_1.default, null),
|
|
76
58
|
onClick: () => {
|
|
77
|
-
// @ts-expect-error
|
|
78
59
|
self.queueDialog((onClose) => [
|
|
79
60
|
ErrorMessageStackTraceDialog,
|
|
80
61
|
{
|
|
@@ -86,23 +67,14 @@ function SnackbarModel() {
|
|
|
86
67
|
},
|
|
87
68
|
});
|
|
88
69
|
},
|
|
89
|
-
/**
|
|
90
|
-
* #action
|
|
91
|
-
*/
|
|
92
70
|
pushSnackbarMessage(message, level, action) {
|
|
93
71
|
if (action || !self.snackbarMessageSet.has(message)) {
|
|
94
72
|
self.snackbarMessages.push({ message, level, action });
|
|
95
73
|
}
|
|
96
74
|
},
|
|
97
|
-
/**
|
|
98
|
-
* #action
|
|
99
|
-
*/
|
|
100
75
|
popSnackbarMessage() {
|
|
101
76
|
return self.snackbarMessages.pop();
|
|
102
77
|
},
|
|
103
|
-
/**
|
|
104
|
-
* #action
|
|
105
|
-
*/
|
|
106
78
|
removeSnackbarMessage(message) {
|
|
107
79
|
const element = self.snackbarMessageSet.get(message);
|
|
108
80
|
if (element !== undefined) {
|
package/ui/colors.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ declare const ggplot2Colors6: string[];
|
|
|
7
7
|
declare const ggplot2Colors5: string[];
|
|
8
8
|
declare const ggplot2Colors4: string[];
|
|
9
9
|
declare const ggplot2Colors3: string[];
|
|
10
|
-
export {
|
|
10
|
+
export { category10, dark2, ggplot2Colors3, ggplot2Colors4, ggplot2Colors5, ggplot2Colors6, set1, set2, tableau10, };
|
package/ui/colors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.tableau10 = exports.set2 = exports.set1 = exports.ggplot2Colors6 = exports.ggplot2Colors5 = exports.ggplot2Colors4 = exports.ggplot2Colors3 = exports.dark2 = exports.category10 = void 0;
|
|
4
4
|
const category10 = [
|
|
5
5
|
'#1f77b4',
|
|
6
6
|
'#ff7f0e',
|
package/ui/react-colorful.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
// vendored (e.g. copied into our source tree) because the tooling picks up "import" statements that confuse jest, could confuse other consumers of our modules
|
|
4
|
-
// copy of react-colorful/dist/index.esmodule.js
|
|
5
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
3
|
if (k2 === undefined) k2 = k;
|
|
7
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/ui/theme.d.ts
CHANGED
package/ui/theme.js
CHANGED
|
@@ -59,8 +59,6 @@ function stockTheme() {
|
|
|
59
59
|
components: {
|
|
60
60
|
MuiLink: {
|
|
61
61
|
styleOverrides: {
|
|
62
|
-
// the default link color uses theme.palette.primary.main which is
|
|
63
|
-
// very bad with dark mode+midnight primary
|
|
64
62
|
root: ({ theme }) => ({
|
|
65
63
|
color: theme.palette.tertiary.main,
|
|
66
64
|
}),
|
|
@@ -170,13 +168,6 @@ function createJBrowseBaseTheme(theme) {
|
|
|
170
168
|
size: 'small',
|
|
171
169
|
},
|
|
172
170
|
styleOverrides: {
|
|
173
|
-
// the default button, especially when not using variant=contained,
|
|
174
|
-
// uses theme.palette.primary.main for text which is very bad with
|
|
175
|
-
// dark mode+midnight primary
|
|
176
|
-
//
|
|
177
|
-
// keeps text secondary for darkmode, uses
|
|
178
|
-
// a text-like coloring to ensure contrast
|
|
179
|
-
// xref https://stackoverflow.com/a/72546130/2129219
|
|
180
171
|
root: ({ theme }) => theme.palette.mode === 'dark'
|
|
181
172
|
? {
|
|
182
173
|
color: theme.palette.text.primary,
|
|
@@ -252,7 +243,6 @@ function createJBrowseBaseTheme(theme) {
|
|
|
252
243
|
},
|
|
253
244
|
styleOverrides: {
|
|
254
245
|
secondary: {
|
|
255
|
-
// @ts-expect-error
|
|
256
246
|
backgroundColor: (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _a === void 0 ? void 0 : _a.quaternary) === null || _b === void 0 ? void 0 : _b.main,
|
|
257
247
|
},
|
|
258
248
|
},
|
|
@@ -285,8 +275,6 @@ function createJBrowseBaseTheme(theme) {
|
|
|
285
275
|
},
|
|
286
276
|
MuiLink: {
|
|
287
277
|
styleOverrides: {
|
|
288
|
-
// the default link color uses theme.palette.primary.main which is
|
|
289
|
-
// very bad with dark mode+midnight primary
|
|
290
278
|
root: ({ theme }) => ({
|
|
291
279
|
color: theme.palette.text.secondary,
|
|
292
280
|
}),
|
|
@@ -294,13 +282,6 @@ function createJBrowseBaseTheme(theme) {
|
|
|
294
282
|
},
|
|
295
283
|
MuiCheckbox: {
|
|
296
284
|
styleOverrides: {
|
|
297
|
-
// the default checkbox-when-checked color uses
|
|
298
|
-
// theme.palette.primary.main which is very bad with dark
|
|
299
|
-
// mode+midnight primary
|
|
300
|
-
//
|
|
301
|
-
// keeps the forest-green checkbox by default but for darkmode, uses
|
|
302
|
-
// a text-like coloring to ensure contrast xref
|
|
303
|
-
// https://stackoverflow.com/a/72546130/2129219
|
|
304
285
|
root: ({ theme }) => theme.palette.mode === 'dark'
|
|
305
286
|
? {
|
|
306
287
|
color: theme.palette.text.secondary,
|
|
@@ -313,13 +294,6 @@ function createJBrowseBaseTheme(theme) {
|
|
|
313
294
|
},
|
|
314
295
|
MuiRadio: {
|
|
315
296
|
styleOverrides: {
|
|
316
|
-
// the default checkbox-when-checked color uses
|
|
317
|
-
// theme.palette.primary.main which is very bad with dark
|
|
318
|
-
// mode+midnight primary
|
|
319
|
-
//
|
|
320
|
-
// keeps the forest-green checkbox by default but for darkmode, uses
|
|
321
|
-
// a text-like coloring to ensure contrast
|
|
322
|
-
// xref https://stackoverflow.com/a/72546130/2129219
|
|
323
297
|
root: ({ theme }) => theme.palette.mode === 'dark'
|
|
324
298
|
? {
|
|
325
299
|
color: theme.palette.text.secondary,
|
|
@@ -332,14 +306,6 @@ function createJBrowseBaseTheme(theme) {
|
|
|
332
306
|
},
|
|
333
307
|
MuiFormLabel: {
|
|
334
308
|
styleOverrides: {
|
|
335
|
-
// the default checkbox-when-checked color uses
|
|
336
|
-
// theme.palette.primary.main which is very bad with dark
|
|
337
|
-
// mode+midnight primary
|
|
338
|
-
//
|
|
339
|
-
// keeps the forest-green checkbox by default but for darkmode, uses
|
|
340
|
-
// a text-like coloring to ensure contrast
|
|
341
|
-
// xref https://stackoverflow.com/a/72546130/2129219
|
|
342
|
-
//
|
|
343
309
|
root: ({ theme }) => theme.palette.mode === 'dark'
|
|
344
310
|
? {
|
|
345
311
|
color: theme.palette.text.secondary,
|
|
@@ -353,11 +319,9 @@ function createJBrowseBaseTheme(theme) {
|
|
|
353
319
|
MuiAccordionSummary: {
|
|
354
320
|
styleOverrides: {
|
|
355
321
|
root: {
|
|
356
|
-
// @ts-expect-error
|
|
357
322
|
backgroundColor: (_d = (_c = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _c === void 0 ? void 0 : _c.tertiary) === null || _d === void 0 ? void 0 : _d.main,
|
|
358
323
|
},
|
|
359
324
|
content: {
|
|
360
|
-
// @ts-expect-error
|
|
361
325
|
color: (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _e === void 0 ? void 0 : _e.tertiary) === null || _f === void 0 ? void 0 : _f.contrastText,
|
|
362
326
|
},
|
|
363
327
|
},
|
|
@@ -378,9 +342,6 @@ function createJBrowseTheme(configTheme = {}, themes = exports.defaultThemes, th
|
|
|
378
342
|
})
|
|
379
343
|
: addMissingColors(themes[themeName])));
|
|
380
344
|
}
|
|
381
|
-
// MUI by default allows strings like '#f00' for primary and secondary and
|
|
382
|
-
// augments them to have light and dark variants but not for anything else, so
|
|
383
|
-
// we augment them here
|
|
384
345
|
function augmentThemeColors(theme = {}) {
|
|
385
346
|
var _a;
|
|
386
347
|
for (const entry of ['tertiary', 'quaternary', 'highlight']) {
|
|
@@ -396,7 +357,6 @@ function augmentThemeColors(theme = {}) {
|
|
|
396
357
|
}
|
|
397
358
|
return theme;
|
|
398
359
|
}
|
|
399
|
-
// adds missing colors to users theme
|
|
400
360
|
function addMissingColors(theme = {}) {
|
|
401
361
|
var _a, _b, _c;
|
|
402
362
|
return augmentThemeColors((0, deepmerge_1.default)(theme, {
|
package/util/Base1DUtils.d.ts
CHANGED
package/util/Base1DUtils.js
CHANGED
|
@@ -39,8 +39,6 @@ function moveTo(self, start, end) {
|
|
|
39
39
|
}
|
|
40
40
|
const targetBpPerPx = len / (width - interRegionPaddingWidth * numBlocksWideEnough);
|
|
41
41
|
const newBpPerPx = self.zoomTo(targetBpPerPx);
|
|
42
|
-
// If our target bpPerPx was smaller than the allowed minBpPerPx, adjust
|
|
43
|
-
// the scroll so the requested range is in the middle of the screen
|
|
44
42
|
let extraBp = 0;
|
|
45
43
|
if (targetBpPerPx < newBpPerPx) {
|
|
46
44
|
extraBp = ((newBpPerPx - targetBpPerPx) * self.width) / 2;
|
|
@@ -61,7 +59,6 @@ function moveTo(self, start, end) {
|
|
|
61
59
|
function coord(r, bp) {
|
|
62
60
|
return Math.floor(r.reversed ? r.end - bp : r.start + bp) + 1;
|
|
63
61
|
}
|
|
64
|
-
// manual return type since getSnapshot hard to infer here
|
|
65
62
|
function pxToBp(self, px) {
|
|
66
63
|
var _a;
|
|
67
64
|
let bpSoFar = 0;
|
|
@@ -72,7 +69,6 @@ function pxToBp(self, px) {
|
|
|
72
69
|
const r = displayedRegions[0];
|
|
73
70
|
const snap = r;
|
|
74
71
|
return {
|
|
75
|
-
// xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
|
|
76
72
|
...snap,
|
|
77
73
|
oob: true,
|
|
78
74
|
coord: coord(r, bp),
|
|
@@ -89,7 +85,6 @@ function pxToBp(self, px) {
|
|
|
89
85
|
if (len + bpSoFar > bp && bpSoFar <= bp) {
|
|
90
86
|
const snap = r;
|
|
91
87
|
return {
|
|
92
|
-
// xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
|
|
93
88
|
...snap,
|
|
94
89
|
oob: false,
|
|
95
90
|
offset,
|
|
@@ -97,8 +92,6 @@ function pxToBp(self, px) {
|
|
|
97
92
|
index: i,
|
|
98
93
|
};
|
|
99
94
|
}
|
|
100
|
-
// add the interRegionPaddingWidth if the boundary is in the screen e.g. in
|
|
101
|
-
// a static block
|
|
102
95
|
if (((_a = blocks[currBlock]) === null || _a === void 0 ? void 0 : _a.regionNumber) === i) {
|
|
103
96
|
bpSoFar += len + interRegionPaddingBp;
|
|
104
97
|
currBlock++;
|
|
@@ -113,7 +106,6 @@ function pxToBp(self, px) {
|
|
|
113
106
|
const offset = bp - bpSoFar + len;
|
|
114
107
|
const snap = r;
|
|
115
108
|
return {
|
|
116
|
-
// xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
|
|
117
109
|
...snap,
|
|
118
110
|
oob: true,
|
|
119
111
|
offset,
|
|
@@ -151,8 +143,6 @@ function bpToPx({ refName, coord, regionNumber, self, }) {
|
|
|
151
143
|
bpSoFar += r.reversed ? r.end - coord : coord - r.start;
|
|
152
144
|
break;
|
|
153
145
|
}
|
|
154
|
-
// add the interRegionPaddingWidth if the boundary is in the screen e.g. in
|
|
155
|
-
// a static block
|
|
156
146
|
if (((_a = blocks[currBlock]) === null || _a === void 0 ? void 0 : _a.regionNumber) === i) {
|
|
157
147
|
bpSoFar += len + interRegionPaddingBp;
|
|
158
148
|
currBlock++;
|
|
@@ -189,8 +179,6 @@ function bpToPxMap({ refName, coord, regionNumber, self, }) {
|
|
|
189
179
|
bpSoFar += r.reversed ? r.end - coord : coord - r.start;
|
|
190
180
|
break;
|
|
191
181
|
}
|
|
192
|
-
// add the interRegionPaddingWidth if the boundary is in the screen e.g. in
|
|
193
|
-
// a static block
|
|
194
182
|
if (((_a = blocks[currBlock]) === null || _a === void 0 ? void 0 : _a.regionNumber) === i) {
|
|
195
183
|
bpSoFar += len + interRegionPaddingBp;
|
|
196
184
|
currBlock++;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Feature } from './simpleFeature';
|
|
3
|
-
import { Region as IRegion } from './types';
|
|
4
|
-
import {
|
|
1
|
+
import type { BpOffset } from './Base1DUtils';
|
|
2
|
+
import type { Feature } from './simpleFeature';
|
|
3
|
+
import type { Region as IRegion } from './types';
|
|
4
|
+
import type { Instance } from 'mobx-state-tree';
|
|
5
5
|
declare const Base1DView: import("mobx-state-tree").IModelType<{
|
|
6
6
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
7
|
displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<IRegion[], IRegion[], IRegion[]>, [undefined]>;
|
|
@@ -13,60 +13,21 @@ declare const Base1DView: import("mobx-state-tree").IModelType<{
|
|
|
13
13
|
features: undefined | Feature[];
|
|
14
14
|
volatileWidth: number;
|
|
15
15
|
} & {
|
|
16
|
-
/**
|
|
17
|
-
* #action
|
|
18
|
-
*/
|
|
19
16
|
setDisplayedRegions(regions: IRegion[]): void;
|
|
20
|
-
/**
|
|
21
|
-
* #action
|
|
22
|
-
*/
|
|
23
17
|
setBpPerPx(val: number): void;
|
|
24
|
-
/**
|
|
25
|
-
* #action
|
|
26
|
-
*/
|
|
27
18
|
setVolatileWidth(width: number): void;
|
|
28
19
|
} & {
|
|
29
|
-
/**
|
|
30
|
-
* #getter
|
|
31
|
-
*/
|
|
32
20
|
readonly width: number;
|
|
33
|
-
/**
|
|
34
|
-
* #getter
|
|
35
|
-
*/
|
|
36
21
|
readonly assemblyNames: string[];
|
|
37
|
-
/**
|
|
38
|
-
* #getter
|
|
39
|
-
*/
|
|
40
22
|
readonly displayedRegionsTotalPx: number;
|
|
41
|
-
/**
|
|
42
|
-
* #getter
|
|
43
|
-
*/
|
|
44
23
|
readonly maxOffset: number;
|
|
45
|
-
/**
|
|
46
|
-
* #getter
|
|
47
|
-
*/
|
|
48
24
|
readonly minOffset: number;
|
|
49
|
-
/**
|
|
50
|
-
* #getter
|
|
51
|
-
*/
|
|
52
25
|
readonly totalBp: number;
|
|
53
26
|
} & {
|
|
54
|
-
/**
|
|
55
|
-
* #getter
|
|
56
|
-
*/
|
|
57
27
|
readonly dynamicBlocks: import("./blockTypes").BlockSet;
|
|
58
|
-
/**
|
|
59
|
-
* #getter
|
|
60
|
-
*/
|
|
61
28
|
readonly staticBlocks: import("./blockTypes").BlockSet;
|
|
62
|
-
/**
|
|
63
|
-
* #getter
|
|
64
|
-
*/
|
|
65
29
|
readonly currBp: number;
|
|
66
30
|
} & {
|
|
67
|
-
/**
|
|
68
|
-
* #method
|
|
69
|
-
*/
|
|
70
31
|
pxToBp(px: number): {
|
|
71
32
|
coord: number;
|
|
72
33
|
index: number;
|
|
@@ -78,59 +39,21 @@ declare const Base1DView: import("mobx-state-tree").IModelType<{
|
|
|
78
39
|
end: number;
|
|
79
40
|
reversed?: boolean;
|
|
80
41
|
};
|
|
81
|
-
/**
|
|
82
|
-
* #method
|
|
83
|
-
*/
|
|
84
42
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
85
43
|
refName: string;
|
|
86
44
|
coord: number;
|
|
87
45
|
regionNumber?: number;
|
|
88
46
|
}): number | undefined;
|
|
89
47
|
} & {
|
|
90
|
-
/**
|
|
91
|
-
* #action
|
|
92
|
-
*/
|
|
93
48
|
setFeatures(features: Feature[]): void;
|
|
94
|
-
/**
|
|
95
|
-
* #action
|
|
96
|
-
* this makes a zoomed out view that shows all displayedRegions that makes
|
|
97
|
-
* the overview bar square with the scale bar
|
|
98
|
-
*/
|
|
99
49
|
showAllRegions(): void;
|
|
100
|
-
/**
|
|
101
|
-
* #action
|
|
102
|
-
*/
|
|
103
50
|
zoomOut(): void;
|
|
104
|
-
/**
|
|
105
|
-
* #action
|
|
106
|
-
*/
|
|
107
51
|
zoomIn(): void;
|
|
108
|
-
/**
|
|
109
|
-
* #action
|
|
110
|
-
*/
|
|
111
52
|
zoomTo(bpPerPx: number, offset?: number): number;
|
|
112
|
-
/**
|
|
113
|
-
* #action
|
|
114
|
-
*/
|
|
115
53
|
scrollTo(offsetPx: number): number;
|
|
116
|
-
/**
|
|
117
|
-
* #action
|
|
118
|
-
*/
|
|
119
54
|
centerAt(coord: number, refName: string | undefined, regionNumber: number): void;
|
|
120
|
-
/**
|
|
121
|
-
* #action
|
|
122
|
-
* note: the scroll is clamped to keep the view on the main screen
|
|
123
|
-
*/
|
|
124
55
|
scroll(distance: number): number;
|
|
125
56
|
} & {
|
|
126
|
-
/**
|
|
127
|
-
* #action
|
|
128
|
-
* offset is the base-pair-offset in the displayed region, index is the
|
|
129
|
-
* index of the displayed region in the linear genome view
|
|
130
|
-
*
|
|
131
|
-
* @param start - object as `{start, end, offset, index}`
|
|
132
|
-
* @param end - object as `{start, end, offset, index}`
|
|
133
|
-
*/
|
|
134
57
|
moveTo(start?: BpOffset, end?: BpOffset): void;
|
|
135
58
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
136
59
|
export type Base1DViewStateModel = typeof Base1DView;
|