@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.10
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/esm/FeatureTrack/configSchema.d.ts +202 -71
- package/esm/FeatureTrack/configSchema.js +47 -1
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
- package/esm/LaunchLinearGenomeView/index.js +6 -12
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +265 -120
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +20 -9
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
- package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/CrisprGuidePanel.js +142 -0
- package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
- package/esm/LinearGenomeView/components/Cytobands.js +76 -53
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +8 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +15 -67
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
- package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
- package/esm/LinearGenomeView/components/Gridlines.js +29 -58
- package/esm/LinearGenomeView/components/Header.d.ts +1 -1
- package/esm/LinearGenomeView/components/Header.js +42 -16
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
- package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderPanControls.js +18 -8
- package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
- package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
- package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +38 -52
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +21 -25
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +8 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +13 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
- package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
- package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
- package/esm/LinearGenomeView/components/ImportForm.js +95 -61
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -6
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +88 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +14 -10
- package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
- package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
- package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
- package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
- package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +25 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +29 -67
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
- package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
- package/esm/LinearGenomeView/components/OverviewScalebar.js +87 -83
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +57 -32
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
- package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
- package/esm/LinearGenomeView/components/PaddingBlocks.js +56 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +19 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +2 -3
- package/esm/LinearGenomeView/components/Rubberband.js +15 -17
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +8 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
- package/esm/LinearGenomeView/components/Scalebar.js +20 -22
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +157 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +61 -68
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +5 -4
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +6 -8
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +5 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +31 -56
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
- package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
- package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +3 -5
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
- package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
- package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackContainer.js +136 -38
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +20 -26
- package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
- package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +35 -87
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +5 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +66 -24
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +53 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -3
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -26
- package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
- package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
- package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +6 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +46 -0
- package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
- package/esm/LinearGenomeView/components/searchModes.js +22 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
- package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +9 -67
- package/esm/LinearGenomeView/components/useRangeSelect.js +54 -102
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -3
- package/esm/LinearGenomeView/components/useSideScroll.js +163 -45
- package/esm/LinearGenomeView/components/util.d.ts +24 -6
- package/esm/LinearGenomeView/components/util.js +28 -5
- package/esm/LinearGenomeView/consts.d.ts +9 -2
- package/esm/LinearGenomeView/consts.js +20 -2
- package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
- package/esm/LinearGenomeView/containingLgv.js +23 -0
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +29 -0
- package/esm/LinearGenomeView/headerFit.js +72 -0
- package/esm/LinearGenomeView/index.d.ts +28 -3
- package/esm/LinearGenomeView/index.js +13 -7
- package/esm/LinearGenomeView/keyboardHandler.d.ts +9 -0
- package/esm/LinearGenomeView/keyboardHandler.js +25 -1
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +27 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +8 -14
- package/esm/LinearGenomeView/lazyDialogs.js +4 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +12 -0
- package/esm/LinearGenomeView/linkedViewSync.js +36 -0
- package/esm/LinearGenomeView/menuItems.d.ts +25 -2
- package/esm/LinearGenomeView/menuItems.js +306 -179
- package/esm/LinearGenomeView/model.d.ts +3363 -164
- package/esm/LinearGenomeView/model.js +2548 -565
- package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
- package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
- package/esm/LinearGenomeView/showRegionsWithUndo.js +50 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +15 -0
- package/esm/LinearGenomeView/stickyChrome.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +17 -18
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +34 -35
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +73 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +20 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +36 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +66 -39
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +9 -7
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +54 -9
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +9 -15
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +17 -21
- package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
- package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
- package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +245 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +96 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +242 -4
- package/esm/LinearGenomeView/types.d.ts +20 -37
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +347 -12
- package/esm/LinearGenomeView/util.js +577 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +40 -0
- package/esm/MultiLevelRubberband/index.d.ts +4 -0
- package/esm/MultiLevelRubberband/index.js +3 -0
- package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
- package/esm/MultiLevelRubberband/menuItems.js +52 -0
- package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
- package/esm/MultiLevelRubberband/rowLabel.js +27 -0
- package/esm/MultiLevelRubberband/types.d.ts +7 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +25 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +120 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1391 -0
- package/esm/displayKitTests/perRegionTestEnv.js +142 -0
- package/esm/index.d.ts +50 -1245
- package/esm/index.js +88 -33
- package/esm/searchUtils.d.ts +62 -12
- package/esm/searchUtils.js +335 -48
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +34 -0
- package/esm/shared/coordLabels.d.ts +47 -0
- package/esm/shared/coordLabels.js +133 -0
- package/esm/shared/useWindowDrag.d.ts +18 -0
- package/esm/shared/useWindowDrag.js +45 -0
- package/package.json +18 -19
- package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
- package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
- package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/esm/BaseLinearDisplay/components/Block.js +0 -45
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
- package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
- package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
- package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
- package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
- package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
- package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
- package/esm/BaseLinearDisplay/components/util.js +0 -107
- package/esm/BaseLinearDisplay/index.d.ts +0 -17
- package/esm/BaseLinearDisplay/index.js +0 -13
- package/esm/BaseLinearDisplay/model.d.ts +0 -1197
- package/esm/BaseLinearDisplay/model.js +0 -432
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
- package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
- package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
- package/esm/BaseLinearDisplay/models/util.js +0 -43
- package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
- package/esm/BaseLinearDisplay/renderSvg.js +0 -63
- package/esm/BaseLinearDisplay/types.d.ts +0 -43
- package/esm/BaseLinearDisplay/types.js +0 -3
- package/esm/BaseLinearDisplay/util.d.ts +0 -16
- package/esm/BaseLinearDisplay/util.js +0 -71
- package/esm/BasicTrack/configSchema.d.ts +0 -85
- package/esm/BasicTrack/configSchema.js +0 -8
- package/esm/BasicTrack/index.d.ts +0 -2
- package/esm/BasicTrack/index.js +0 -12
- package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBareDisplay/configSchema.js +0 -11
- package/esm/LinearBareDisplay/index.d.ts +0 -4
- package/esm/LinearBareDisplay/index.js +0 -20
- package/esm/LinearBareDisplay/model.d.ts +0 -1196
- package/esm/LinearBareDisplay/model.js +0 -32
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
- package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
- package/esm/LinearBasicDisplay/configSchema.js +0 -11
- package/esm/LinearBasicDisplay/index.d.ts +0 -4
- package/esm/LinearBasicDisplay/index.js +0 -20
- package/esm/LinearBasicDisplay/model.d.ts +0 -1391
- package/esm/LinearBasicDisplay/model.js +0 -158
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
- package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
- package/esm/LinearFeatureDisplay/configSchema.js +0 -11
- package/esm/LinearFeatureDisplay/index.d.ts +0 -3
- package/esm/LinearFeatureDisplay/index.js +0 -2
- package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
- package/esm/LinearFeatureDisplay/model.js +0 -305
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
- package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
- package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
- package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
- package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
- package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
- package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
- package/esm/LinearGenomeView/svgExportUtil.js +0 -6
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
- /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
|
@@ -5,13 +5,20 @@ import { IconButton } from '@mui/material';
|
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
6
|
const useStyles = makeStyles()(theme => ({
|
|
7
7
|
toggleButton: {
|
|
8
|
-
height: 44,
|
|
9
8
|
border: 'none',
|
|
9
|
+
},
|
|
10
|
+
indent: {
|
|
10
11
|
marginLeft: theme.spacing(4),
|
|
11
12
|
},
|
|
13
|
+
selected: {
|
|
14
|
+
backgroundColor: theme.palette.action.selected,
|
|
15
|
+
},
|
|
12
16
|
}));
|
|
13
|
-
const HeaderTrackSelectorButton = observer(function HeaderTrackSelectorButton({ model, }) {
|
|
14
|
-
const { classes } = useStyles();
|
|
15
|
-
|
|
17
|
+
const HeaderTrackSelectorButton = observer(function HeaderTrackSelectorButton({ model, indent, }) {
|
|
18
|
+
const { classes, cx } = useStyles();
|
|
19
|
+
const { isTrackSelectorOpen } = model;
|
|
20
|
+
return (_jsx(IconButton, { color: isTrackSelectorOpen ? 'primary' : 'default', onClick: () => {
|
|
21
|
+
model.toggleTrackSelector();
|
|
22
|
+
}, className: cx(classes.toggleButton, indent && classes.indent, isTrackSelectorOpen ? classes.selected : undefined), title: isTrackSelectorOpen ? 'Close track selector' : 'Open track selector', value: "track_select", children: _jsx(TrackSelectorIcon, {}) }));
|
|
16
23
|
});
|
|
17
24
|
export default HeaderTrackSelectorButton;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
declare const HeaderZoomControls: ({ model, }: {
|
|
2
|
+
declare const HeaderZoomControls: ({ model, showSlider, }: {
|
|
3
3
|
model: LinearGenomeViewModel;
|
|
4
|
-
|
|
4
|
+
showSlider?: boolean;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
5
6
|
export default HeaderZoomControls;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { SingleSlider } from '@jbrowse/core/ui';
|
|
3
4
|
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
4
|
-
import { getBpDisplayStr
|
|
5
|
+
import { getBpDisplayStr } from '@jbrowse/core/util';
|
|
5
6
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
7
|
import MoreVert from '@mui/icons-material/MoreVert';
|
|
7
|
-
import ZoomIn from '@mui/icons-material/ZoomIn';
|
|
8
|
-
import ZoomOut from '@mui/icons-material/ZoomOut';
|
|
9
|
-
import { IconButton, Slider, Tooltip } from '@mui/material';
|
|
10
8
|
import { observer } from 'mobx-react';
|
|
11
|
-
|
|
9
|
+
import { zoomMenuItems } from '../menuItems.js';
|
|
10
|
+
import ZoomButton from './ZoomButton.js';
|
|
12
11
|
const useStyles = makeStyles()(theme => ({
|
|
13
12
|
container: {
|
|
14
13
|
display: 'flex',
|
|
@@ -18,54 +17,41 @@ const useStyles = makeStyles()(theme => ({
|
|
|
18
17
|
slider: {
|
|
19
18
|
width: 100,
|
|
20
19
|
color: theme.palette.text.secondary,
|
|
20
|
+
// The value here is live `bpPerPx`, so MUI's default 150ms ease on the thumb
|
|
21
|
+
// and the track restarts on every animation frame of a wheel zoom: the
|
|
22
|
+
// transition never completes, the thumb trails the zoom it is reporting, and
|
|
23
|
+
// the compositor gives up on the track's animated width every frame. A
|
|
24
|
+
// slider that reports a value rather than being dragged to one wants no
|
|
25
|
+
// transition at all.
|
|
26
|
+
'& .MuiSlider-thumb, & .MuiSlider-track': {
|
|
27
|
+
transition: 'none',
|
|
28
|
+
},
|
|
21
29
|
},
|
|
22
30
|
}));
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
31
|
+
// The slider tracks live `bpPerPx`, which changes on every animation frame of a
|
|
32
|
+
// zoom. Isolated into its own observer so the surrounding zoom buttons/menu —
|
|
33
|
+
// whose MUI Tooltip/IconButton machinery is comparatively expensive and only
|
|
34
|
+
// depends on the debounced `coarseBpPerPx` — don't re-render every frame.
|
|
35
|
+
const ZoomSlider = observer(function ZoomSlider({ model, }) {
|
|
28
36
|
const { classes } = useStyles();
|
|
29
|
-
const { width, maxBpPerPx, minBpPerPx, bpPerPx
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
model.zoom(model.bpPerPx / r);
|
|
49
|
-
},
|
|
50
|
-
})),
|
|
51
|
-
...[10, 50, 100].map(r => ({
|
|
52
|
-
label: `Zoom out ${r}x`,
|
|
53
|
-
onClick: () => {
|
|
54
|
-
model.zoom(model.bpPerPx * r);
|
|
55
|
-
},
|
|
56
|
-
})),
|
|
57
|
-
{
|
|
58
|
-
label: 'Custom zoom',
|
|
59
|
-
onClick: () => {
|
|
60
|
-
getSession(model).queueDialog(handleClose => [
|
|
61
|
-
RegionWidthEditorDialog,
|
|
62
|
-
{
|
|
63
|
-
model,
|
|
64
|
-
handleClose,
|
|
65
|
-
},
|
|
66
|
-
]);
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
], children: _jsx(MoreVert, {}) })] }));
|
|
37
|
+
const { width, maxBpPerPx, minBpPerPx, bpPerPx } = model;
|
|
38
|
+
const [dragValue, setDragValue] = useState(null);
|
|
39
|
+
const value = dragValue ?? -Math.log2(bpPerPx) * 100;
|
|
40
|
+
return (_jsx(SingleSlider, { size: "small", className: classes.slider, value: value, min: -Math.log2(maxBpPerPx) * 100, max: -Math.log2(minBpPerPx) * 100, onChangeCommitted: val => {
|
|
41
|
+
setDragValue(null);
|
|
42
|
+
model.cancelZoomAnimation();
|
|
43
|
+
model.zoomTo(2 ** (-val / 100));
|
|
44
|
+
}, valueLabelDisplay: "auto", valueLabelFormat: newValue => `Window size: ${getBpDisplayStr(2 ** (-newValue / 100) * width)}`, onChange: val => {
|
|
45
|
+
// Take over from any in-flight animated zoom as soon as the user grabs
|
|
46
|
+
// the thumb, so the view stops lurching underneath the drag.
|
|
47
|
+
if (dragValue === null) {
|
|
48
|
+
model.cancelZoomAnimation();
|
|
49
|
+
}
|
|
50
|
+
setDragValue(val);
|
|
51
|
+
} }));
|
|
52
|
+
});
|
|
53
|
+
const HeaderZoomControls = observer(function HeaderZoomControls({ model, showSlider = true, }) {
|
|
54
|
+
const { classes } = useStyles();
|
|
55
|
+
return (_jsxs("div", { className: classes.container, children: [_jsx(ZoomButton, { model: model, direction: "out" }), showSlider ? _jsx(ZoomSlider, { model: model }) : null, _jsx(ZoomButton, { model: model, direction: "in" }), _jsx(CascadingMenuButton, { menuItems: () => zoomMenuItems(model), children: _jsx(MoreVert, {}) })] }));
|
|
70
56
|
});
|
|
71
57
|
export default HeaderZoomControls;
|
|
@@ -1,42 +1,38 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useStyleTheme } from '@jbrowse/core/ui/PaletteContext';
|
|
3
3
|
import { getSession } from '@jbrowse/core/util';
|
|
4
|
-
import { colord } from '@jbrowse/core/util/colord';
|
|
5
|
-
import BookmarkIcon from '@mui/icons-material/Bookmark';
|
|
6
4
|
import CloseIcon from '@mui/icons-material/Close';
|
|
7
|
-
import
|
|
8
|
-
import { Box, Tooltip, Typography, useTheme } from '@mui/material';
|
|
5
|
+
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
|
9
6
|
import { observer } from 'mobx-react';
|
|
10
|
-
import HighlightBand from
|
|
7
|
+
import HighlightBand from './HighlightBand.js';
|
|
8
|
+
import HighlightChip from './HighlightChip.js';
|
|
9
|
+
import { getHighlightColor } from './util.js';
|
|
10
|
+
// A band narrower than the link-icon chip clips it into a smudge, so below this
|
|
11
|
+
// width the chip is dropped (the band itself still draws).
|
|
12
|
+
const CHIP_MIN_WIDTH = 24;
|
|
11
13
|
const Highlight = observer(function Highlight({ model, highlight, }) {
|
|
12
|
-
const theme =
|
|
13
|
-
const session = getSession(model);
|
|
14
|
+
const theme = useStyleTheme();
|
|
14
15
|
const coords = model.getHighlightCoords(highlight);
|
|
15
|
-
const bandColor = highlight
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const bandColor = getHighlightColor(highlight, theme);
|
|
17
|
+
const label = getSession(model).highlightLabelsVisible
|
|
18
|
+
? highlight.label
|
|
19
|
+
: undefined;
|
|
20
|
+
return coords ? (_jsx(HighlightBand, { coords: coords, background: bandColor.toRgbString(), label: label, children: coords.width >= CHIP_MIN_WIDTH ? (_jsx(HighlightChip, { color: bandColor, label: label, tooltip: highlight.label ?? 'Highlighted region', menuItems: [
|
|
19
21
|
{
|
|
20
22
|
label: 'Dismiss highlight',
|
|
21
23
|
icon: CloseIcon,
|
|
22
24
|
onClick: () => {
|
|
23
|
-
model.removeHighlight(highlight);
|
|
25
|
+
getSession(model).removeHighlight(highlight);
|
|
24
26
|
},
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
|
-
label: '
|
|
28
|
-
icon:
|
|
29
|
+
label: 'Turn off highlights',
|
|
30
|
+
icon: VisibilityOffIcon,
|
|
29
31
|
onClick: () => {
|
|
30
|
-
|
|
31
|
-
session.addWidget('GridBookmarkWidget', 'GridBookmark'));
|
|
32
|
-
bookmarkWidget.addBookmark({
|
|
33
|
-
...highlight,
|
|
34
|
-
assemblyName: highlight.assemblyName ?? model.assemblyNames[0],
|
|
35
|
-
});
|
|
36
|
-
session.showWidget(bookmarkWidget);
|
|
37
|
-
model.removeHighlight(highlight);
|
|
32
|
+
getSession(model).setHighlightsVisible(false);
|
|
38
33
|
},
|
|
39
34
|
},
|
|
40
|
-
|
|
35
|
+
...model.highlightMenuItems(highlight),
|
|
36
|
+
] })) : null })) : null;
|
|
41
37
|
});
|
|
42
38
|
export default Highlight;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export default function HighlightBand({ coords, background, children, }: {
|
|
1
|
+
export default function HighlightBand({ coords, background, label, children, }: {
|
|
2
2
|
coords: {
|
|
3
3
|
left: number;
|
|
4
4
|
width: number;
|
|
5
5
|
};
|
|
6
6
|
background: string;
|
|
7
|
+
label?: string;
|
|
7
8
|
children?: React.ReactNode;
|
|
8
|
-
}): import("react
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
-
|
|
3
|
+
import { Typography } from '@mui/material';
|
|
4
|
+
const useStyles = makeStyles()(theme => ({
|
|
4
5
|
highlight: {
|
|
5
6
|
height: '100%',
|
|
6
7
|
position: 'absolute',
|
|
7
8
|
left: 0,
|
|
8
|
-
|
|
9
|
+
// clip rather than hidden so this never becomes a scroll container (see
|
|
10
|
+
// Scalebar)
|
|
11
|
+
overflow: 'clip',
|
|
12
|
+
// paint above sibling TrackContainers (which would otherwise win in tree
|
|
13
|
+
// order). pointer-events:none lets clicks fall through to the tracks; an
|
|
14
|
+
// interactive chip re-enables pointer-events on itself
|
|
9
15
|
zIndex: 1,
|
|
10
16
|
pointerEvents: 'none',
|
|
11
17
|
},
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
overlay: {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 3,
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
color: theme.palette.text.primary,
|
|
14
25
|
},
|
|
15
|
-
});
|
|
16
|
-
|
|
26
|
+
}));
|
|
27
|
+
// OverviewHighlight stays separate (different bpToPx API). A non-interactive
|
|
28
|
+
// colored band with an
|
|
29
|
+
// optional top label; when `children` (the highlight chip) is passed it renders
|
|
30
|
+
// that instead of the plain label. Visibility is toggled from the view menu
|
|
31
|
+
export default function HighlightBand({ coords, background, label, children, }) {
|
|
17
32
|
const { classes } = useStyles();
|
|
18
|
-
|
|
33
|
+
const content = children ??
|
|
34
|
+
(label ? (_jsx(Typography, { variant: "caption", className: classes.label, noWrap: true, children: label })) : null);
|
|
35
|
+
return (_jsx("div", { "data-testid": "highlight-band", className: classes.highlight, style: {
|
|
19
36
|
transform: `translateX(${coords.left}px)`,
|
|
20
37
|
width: coords.width,
|
|
21
38
|
background,
|
|
22
|
-
}, children: coords.width > 3 &&
|
|
39
|
+
}, children: coords.width > 3 && content ? (_jsx("div", { className: classes.overlay, children: content })) : null }));
|
|
23
40
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MenuItem } from '@jbrowse/core/ui';
|
|
2
|
+
import type { Colord } from '@jbrowse/core/util/colord';
|
|
3
|
+
export default function HighlightChip({ color, label, tooltip, menuItems, }: {
|
|
4
|
+
color: Colord;
|
|
5
|
+
label?: string;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
menuItems: MenuItem[];
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
3
|
+
import LinkIcon from '@mui/icons-material/Link';
|
|
4
|
+
import { Box, Tooltip, Typography } from '@mui/material';
|
|
5
|
+
// Interactive chip drawn inside a highlight band: a link icon tinted to the
|
|
6
|
+
// band color plus an optional inline label, wrapped in a context menu. Sets its
|
|
7
|
+
// own pointer-events since the band is click-through.
|
|
8
|
+
export default function HighlightChip({ color, label, tooltip, menuItems, }) {
|
|
9
|
+
// hide the icon color when the band is fully transparent ("label-only"
|
|
10
|
+
// highlight); otherwise bump to 0.8 alpha so the chip stays legible
|
|
11
|
+
const chipAlpha = color.alpha() === 0 ? 0 : 0.8;
|
|
12
|
+
return (_jsx(Box, { sx: { pointerEvents: 'auto' }, children: _jsx(CascadingMenuButton, { "data-testid": "highlight-chip", menuItems: menuItems, children: _jsx(Tooltip, { title: tooltip, arrow: true, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 0.5 }, children: [_jsx(LinkIcon, { fontSize: "small", sx: { color: color.alpha(chipAlpha).toRgbString() } }), label ? (_jsx(Typography, { variant: "caption", noWrap: true, children: label })) : null] }) }) }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../model.ts';
|
|
2
|
+
export interface HoverHighlightPosition {
|
|
3
|
+
refName: string;
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
assemblyName?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const HoverPositionHighlight: ({ model, position, }: {
|
|
9
|
+
model: LinearGenomeViewModel;
|
|
10
|
+
position: HoverHighlightPosition;
|
|
11
|
+
}) => import("react").JSX.Element | null;
|
|
12
|
+
export default HoverPositionHighlight;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { alpha } from '@jbrowse/core/ui/palette';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
const useStyles = makeStyles()(theme => ({
|
|
6
|
+
highlight: {
|
|
7
|
+
height: '100%',
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
background: alpha(theme.palette.accent, 0.4),
|
|
10
|
+
borderLeft: `2px solid ${theme.palette.accent}`,
|
|
11
|
+
borderRight: `2px solid ${theme.palette.accent}`,
|
|
12
|
+
pointerEvents: 'none',
|
|
13
|
+
zIndex: 10,
|
|
14
|
+
},
|
|
15
|
+
}));
|
|
16
|
+
// Renders one crosshair box on the LGV for a hovered genomic interval, or
|
|
17
|
+
// nothing if the interval is off-screen. Shared by the widgets that publish a
|
|
18
|
+
// hover position (e.g. the feature-detail sequence panel and the MAF sequence
|
|
19
|
+
// widget).
|
|
20
|
+
const HoverPositionHighlight = observer(function HoverPositionHighlight({ model, position, }) {
|
|
21
|
+
const { classes } = useStyles();
|
|
22
|
+
const coords = model.getHighlightCoords(position);
|
|
23
|
+
return coords ? (_jsx("div", { className: classes.highlight, style: { left: coords.left, width: coords.width } })) : null;
|
|
24
|
+
});
|
|
25
|
+
export default HoverPositionHighlight;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const LinearGenomeViewImportForm: ({ model, }: {
|
|
3
|
+
model: LinearGenomeViewModel;
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
6
5
|
export default LinearGenomeViewImportForm;
|
|
@@ -1,77 +1,111 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
4
|
+
import { AssemblySelector, ErrorBanner, RefNameAutocomplete, RefNameAutocompleteEndAdornment, adornmentReservePx, useAssemblySelection, useRecentLocations, } from '@jbrowse/core/ui';
|
|
4
5
|
import { getSession } from '@jbrowse/core/util';
|
|
5
6
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
7
|
import CloseIcon from '@mui/icons-material/Close';
|
|
7
|
-
import { Button, CircularProgress, Container,
|
|
8
|
+
import { Button, CircularProgress, Container, Grid } from '@mui/material';
|
|
8
9
|
import { observer } from 'mobx-react';
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
10
|
+
import { fetchResults, navigateToSelectedOption, notifySearchFailure, } from '../../searchUtils.js';
|
|
11
|
+
import { recentLocationOf, recentLocationsMenu } from './recentLocationsMenu.js';
|
|
11
12
|
const useStyles = makeStyles()(theme => ({
|
|
12
13
|
importFormContainer: {
|
|
13
|
-
padding: theme.spacing(
|
|
14
|
+
padding: theme.spacing(4),
|
|
14
15
|
},
|
|
15
16
|
button: {
|
|
16
17
|
margin: theme.spacing(2),
|
|
17
18
|
},
|
|
18
|
-
container: {
|
|
19
|
-
padding: theme.spacing(4),
|
|
20
|
-
},
|
|
21
19
|
}));
|
|
22
|
-
const LinearGenomeViewImportForm = observer(function LinearGenomeViewImportForm({ model }) {
|
|
20
|
+
const LinearGenomeViewImportForm = observer(function LinearGenomeViewImportForm({ model, }) {
|
|
23
21
|
const { classes } = useStyles();
|
|
24
22
|
const session = getSession(model);
|
|
25
|
-
const {
|
|
26
|
-
const {
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
23
|
+
const { textSearchManager } = session;
|
|
24
|
+
const { error: viewError } = model;
|
|
25
|
+
const { selectedAssemblyName: selectedAsm, setSelectedAssemblyName, assembly, assemblyError, regions, } = useAssemblySelection(session, 'lgv');
|
|
26
|
+
const { recentLocations, addRecentLocation, clearRecentLocations } = useRecentLocations(selectedAsm);
|
|
27
|
+
// The location the form will open, tagged with the assembly it was entered
|
|
28
|
+
// for, and read back only while that tag still matches. Switching assembly
|
|
29
|
+
// then drops it structurally — nothing has to remember to clear it — which
|
|
30
|
+
// is the shape `useAssemblySelection` already uses for the assembly choice
|
|
31
|
+
// itself ("stored as an override, re-resolved against the live list every
|
|
32
|
+
// render") and the breakpoint form uses for its shared track. One object
|
|
33
|
+
// rather than a text/option pair for the same reason: they are only ever
|
|
34
|
+
// valid together, and as two useStates every write had to remember to reset
|
|
35
|
+
// the other.
|
|
36
|
+
//
|
|
37
|
+
// Undefined means "nothing entered yet", which is what makes the box fall
|
|
38
|
+
// back to the first refname below and keeps that default out of the recent
|
|
39
|
+
// locations list.
|
|
40
|
+
const [entered, setEntered] = useState();
|
|
41
|
+
const current = entered?.assemblyName === selectedAsm ? entered : undefined;
|
|
42
|
+
const value = current?.text ?? regions?.[0]?.refName ?? '';
|
|
43
|
+
const displayError = assemblyError ?? viewError;
|
|
44
|
+
async function navigate({ option, record, }) {
|
|
45
|
+
model.setError(undefined);
|
|
46
|
+
if (selectedAsm) {
|
|
47
|
+
try {
|
|
48
|
+
await navigateToSelectedOption({
|
|
49
|
+
option,
|
|
50
|
+
model,
|
|
51
|
+
assemblyName: selectedAsm,
|
|
52
|
+
});
|
|
53
|
+
if (record) {
|
|
54
|
+
addRecentLocation(recentLocationOf(option));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
notifySearchFailure(session, e);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const recentMenuItems = recentLocationsMenu({
|
|
63
|
+
recentLocations,
|
|
64
|
+
onNavigate: option => {
|
|
65
|
+
navigate({ option, record: true }).catch(() => { });
|
|
66
|
+
},
|
|
67
|
+
onClear: clearRecentLocations,
|
|
68
|
+
});
|
|
69
|
+
return (_jsxs(Container, { className: classes.importFormContainer, "data-testid": "import-form", children: [displayError ? _jsx(ErrorBanner, { error: displayError }) : null, _jsx("form", { onSubmit: async (event) => {
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
if (value) {
|
|
72
|
+
await navigate({
|
|
73
|
+
option: current?.option ?? new BaseResult({ label: value }),
|
|
74
|
+
record: current !== undefined,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}, children: _jsxs(Grid, { container: true, spacing: 1, sx: { justifyContent: 'center', alignItems: 'center' }, children: [_jsx(AssemblySelector, { onChange: val => {
|
|
78
|
+
// Only the model's error needs clearing by hand: it lives
|
|
79
|
+
// outside React and is not tagged with the assembly it was
|
|
80
|
+
// about. The typed location isn't reset here — `entered` is
|
|
81
|
+
// tagged, so it drops itself. The banner reports the previous
|
|
82
|
+
// assembly's failure (that is why the form is up at all), so it
|
|
83
|
+
// has to go with it; the circular form clears here for the same
|
|
84
|
+
// reason.
|
|
85
|
+
model.setError(undefined);
|
|
86
|
+
setSelectedAssemblyName(val);
|
|
87
|
+
}, session: session, selected: selectedAsm }), selectedAsm ? (assemblyError ? (_jsx(CloseIcon, { color: "error" })) : regions ? (_jsx(RefNameAutocomplete, { fetchResults: (queryString, signal) => fetchResults({
|
|
88
|
+
queryString,
|
|
89
|
+
assembly,
|
|
90
|
+
textSearchManager,
|
|
91
|
+
assemblyName: selectedAsm,
|
|
92
|
+
signal,
|
|
93
|
+
}), session: session, assemblyName: selectedAsm, value: value, minWidth: 270, adornmentWidth: adornmentReservePx({
|
|
94
|
+
menuItemCount: recentMenuItems.length,
|
|
95
|
+
}), onChange: v => {
|
|
96
|
+
// no `option` on the new object, so typing over a picked
|
|
97
|
+
// search result discards it rather than opening the old
|
|
98
|
+
// one's location under the new text
|
|
99
|
+
setEntered({ assemblyName: selectedAsm, text: v });
|
|
100
|
+
}, onSelect: opt => {
|
|
101
|
+
setEntered({
|
|
102
|
+
assemblyName: selectedAsm,
|
|
103
|
+
text: opt.getDisplayString(),
|
|
104
|
+
option: opt,
|
|
105
|
+
});
|
|
106
|
+
}, endAdornment: _jsx(RefNameAutocompleteEndAdornment, { menuItems: recentMenuItems }), helperText: "Enter sequence name, feature name, or location" })) : (_jsx(CircularProgress, { size: 20, disableShrink: true }))) : null, _jsx(Button, { type: "submit", disabled: !value, className: classes.button, variant: "contained", color: "primary", children: "Open" }), _jsx(Button, { disabled: !!assemblyError || !regions, className: classes.button, onClick: () => {
|
|
107
|
+
model.setError(undefined);
|
|
108
|
+
model.showAllRegionsInAssembly(selectedAsm);
|
|
109
|
+
}, variant: "contained", color: "secondary", children: "Show all regions in assembly" })] }) })] }));
|
|
76
110
|
});
|
|
77
111
|
export default LinearGenomeViewImportForm;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { lazy } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewLoadingScreen } from '@jbrowse/core/ui';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
import LinearGenomeViewContainer from
|
|
6
|
-
|
|
5
|
+
import LinearGenomeViewContainer from './LinearGenomeViewContainer.js';
|
|
6
|
+
// lazies
|
|
7
|
+
const ImportForm = lazy(() => import('./ImportForm.js'));
|
|
7
8
|
const LinearGenomeView = observer(function LinearGenomeView({ model, }) {
|
|
8
|
-
const {
|
|
9
|
-
if (
|
|
10
|
-
return _jsx(
|
|
9
|
+
const { loading, showImportForm } = model;
|
|
10
|
+
if (loading) {
|
|
11
|
+
return _jsx(ViewLoadingScreen, { ...loading });
|
|
11
12
|
}
|
|
12
13
|
else if (showImportForm) {
|
|
13
14
|
return _jsx(ImportForm, { model: model });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
2
|
declare const LinearGenomeViewContainer: ({ model, }: {
|
|
3
3
|
model: LinearGenomeViewModel;
|
|
4
|
-
}) => import("react
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
5
5
|
export default LinearGenomeViewContainer;
|