@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.2
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 +104 -65
- 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 +250 -121
- package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
- package/esm/LinearGenomeView/components/CenterLine.js +16 -7
- 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 +144 -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 +7 -3
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -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 +32 -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 +16 -7
- 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 +67 -51
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +19 -23
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
- package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightChip.js +15 -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 +6 -5
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
- package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
- package/esm/LinearGenomeView/components/MiniControls.js +13 -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 +26 -0
- package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
- 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 +84 -79
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -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 +61 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
- package/esm/LinearGenomeView/components/Rubberband.js +13 -16
- package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
- package/esm/LinearGenomeView/components/Scalebar.js +16 -21
- 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 +142 -126
- package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
- package/esm/LinearGenomeView/components/SearchBox.js +58 -66
- package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
- package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
- package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
- 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 +2 -2
- 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 +83 -39
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
- package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
- 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 +32 -85
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
- package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
- package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
- package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
- 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 +7 -8
- package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
- package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -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 +11 -66
- package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
- package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
- package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
- package/esm/LinearGenomeView/components/util.d.ts +20 -6
- package/esm/LinearGenomeView/components/util.js +27 -6
- package/esm/LinearGenomeView/consts.d.ts +7 -2
- package/esm/LinearGenomeView/consts.js +18 -2
- package/esm/LinearGenomeView/flyTo.d.ts +38 -0
- package/esm/LinearGenomeView/flyTo.js +135 -0
- package/esm/LinearGenomeView/headerFit.d.ts +27 -0
- package/esm/LinearGenomeView/headerFit.js +59 -0
- package/esm/LinearGenomeView/index.d.ts +32 -2
- package/esm/LinearGenomeView/index.js +16 -6
- package/esm/LinearGenomeView/initKeys.d.ts +12 -0
- package/esm/LinearGenomeView/initKeys.js +68 -0
- package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
- package/esm/LinearGenomeView/keyboardHandler.js +10 -0
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +23 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -11
- package/esm/LinearGenomeView/lazyDialogs.js +3 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
- package/esm/LinearGenomeView/linkedViewSync.js +58 -0
- package/esm/LinearGenomeView/menuItems.d.ts +27 -2
- package/esm/LinearGenomeView/menuItems.js +137 -101
- package/esm/LinearGenomeView/model.d.ts +3238 -136
- package/esm/LinearGenomeView/model.js +2425 -528
- 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 +44 -0
- package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
- package/esm/LinearGenomeView/stickyChrome.js +30 -0
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
- 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 +77 -41
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -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 +263 -0
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
- package/esm/LinearGenomeView/types.d.ts +17 -31
- package/esm/LinearGenomeView/types.js +1 -0
- package/esm/LinearGenomeView/util.d.ts +332 -12
- package/esm/LinearGenomeView/util.js +606 -62
- package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
- package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
- package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
- package/esm/MultiLevelRubberband/index.d.ts +2 -0
- package/esm/MultiLevelRubberband/index.js +1 -0
- package/esm/MultiLevelRubberband/types.d.ts +6 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
- package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
- package/esm/displayKitTests/perRegionTestEnv.d.ts +1286 -0
- package/esm/displayKitTests/perRegionTestEnv.js +138 -0
- package/esm/index.d.ts +122 -1235
- package/esm/index.js +101 -24
- package/esm/lazyPluginExports.d.ts +23 -0
- package/esm/lazyPluginExports.js +36 -0
- package/esm/searchUtils.d.ts +55 -11
- package/esm/searchUtils.js +342 -45
- package/esm/shared/RubberbandSpan.d.ts +15 -0
- package/esm/shared/RubberbandSpan.js +33 -0
- package/esm/shared/coordLabels.d.ts +40 -0
- package/esm/shared/coordLabels.js +119 -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
|
@@ -1,64 +1,56 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
|
+
import { assembleLocString, getSession, parseLocString, } from '@jbrowse/core/util';
|
|
3
4
|
import { Button, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, } from '@mui/material';
|
|
4
|
-
import {
|
|
5
|
-
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { isOpenInView, navToOption } from '../../searchUtils.js';
|
|
7
|
+
const SearchResultsTable = observer(function SearchResultsTable({ searchResults, assemblyName, model, handleClose, }) {
|
|
6
8
|
const session = getSession(model);
|
|
7
|
-
const { pluginManager } = getEnv(session);
|
|
8
9
|
const { assemblyManager } = session;
|
|
9
|
-
const assemblyName = optAssemblyName || model.displayedRegions[0].assemblyName;
|
|
10
10
|
const assembly = assemblyManager.get(assemblyName);
|
|
11
|
-
if (!assembly) {
|
|
12
|
-
throw new Error(`assembly ${assemblyName} not found`);
|
|
13
|
-
}
|
|
14
|
-
if (!assembly.regions) {
|
|
15
|
-
throw new Error(`assembly ${assemblyName} regions not loaded`);
|
|
16
|
-
}
|
|
17
11
|
function getTrackName(trackId) {
|
|
18
|
-
|
|
12
|
+
const conf = trackId !== undefined ? session.getTrackById(trackId) : undefined;
|
|
13
|
+
return conf ? readConfObject(conf, 'name') : '';
|
|
19
14
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
// the raw locString, prettified to the assembly's canonical refName when the
|
|
16
|
+
// assembly is loaded and the string parses. A result the assembly can't
|
|
17
|
+
// resolve is still listed as-is rather than blowing up the dialog: the Go
|
|
18
|
+
// button navigates through navToOption, which reports its own failure
|
|
19
|
+
function formatLocation(locString) {
|
|
20
|
+
if (assembly && locString) {
|
|
21
|
+
try {
|
|
22
|
+
const loc = parseLocString(locString, refName => assembly.isValidRefName(refName));
|
|
23
|
+
return assembleLocString({
|
|
24
|
+
...loc,
|
|
25
|
+
refName: assembly.getCanonicalRefName2(loc.refName),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
console.warn('failed to parse location string', locString, e);
|
|
30
|
+
return locString;
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
else {
|
|
29
|
-
|
|
30
|
-
const newRegion = assembly?.regions?.find(region => location === region.refName);
|
|
31
|
-
if (newRegion) {
|
|
32
|
-
model.setDisplayedRegions([newRegion]);
|
|
33
|
-
model.showAllRegions();
|
|
34
|
-
}
|
|
35
|
-
await pluginManager.evaluateAsyncExtensionPoint('LinearGenomeView-searchResultSelected', undefined, { session, result, model, assemblyName });
|
|
34
|
+
return locString;
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
console.error(e);
|
|
59
|
-
session.notifyError(`${e}`, e);
|
|
60
|
-
}
|
|
61
|
-
handleClose();
|
|
62
|
-
}, color: "primary", variant: "contained", children: "Go" }) })] }, result.getId()));
|
|
63
|
-
}) })] }) }));
|
|
64
|
-
}
|
|
37
|
+
// A hit in a track that is already on screen is usually the one meant, so it
|
|
38
|
+
// is listed first rather than given a control that says so. sort is stable,
|
|
39
|
+
// so everything else keeps the ranked order it arrived in.
|
|
40
|
+
const ordered = [...searchResults].sort((a, b) => Number(isOpenInView(b, model)) - Number(isOpenInView(a, model)));
|
|
41
|
+
return (_jsx(TableContainer, { component: Paper, children: _jsxs(Table, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Name" }), _jsx(TableCell, { align: "right", children: "Location" }), _jsx(TableCell, { align: "right", children: "Track" }), _jsx(TableCell, { align: "right" })] }) }), _jsx(TableBody, { children: ordered.map(result => (_jsxs(TableRow, { children: [_jsx(TableCell, { component: "th", scope: "row", children: result.getLabel() }), _jsx(TableCell, { align: "right", children: formatLocation(result.getLocation()) }), _jsx(TableCell, { align: "right", children: getTrackName(result.getTrackId()) || 'N/A' }), _jsx(TableCell, { align: "right", children: _jsx(Button, { onClick: async () => {
|
|
42
|
+
try {
|
|
43
|
+
await navToOption({
|
|
44
|
+
option: result,
|
|
45
|
+
model,
|
|
46
|
+
assemblyName,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
console.error(e);
|
|
51
|
+
session.notifyError(`${e}`, e);
|
|
52
|
+
}
|
|
53
|
+
handleClose();
|
|
54
|
+
}, color: "primary", variant: "contained", children: "Go" }) })] }, result.getId()))) })] }) }));
|
|
55
|
+
});
|
|
56
|
+
export default SearchResultsTable;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { observer } from 'mobx-react';
|
|
3
|
+
import ConnectedHoverHighlight from './ConnectedHoverHighlight.js';
|
|
4
|
+
import HoverPositionHighlight from './HoverPositionHighlight.js';
|
|
5
|
+
// A feature-detail widget is "connected" to this view when its `view` reference
|
|
6
|
+
// points back at it; that widget's sequence panel publishes the hovered base as
|
|
7
|
+
// `sequenceHoverPosition`.
|
|
8
|
+
function isFeatureWidgetForView(w, viewId) {
|
|
9
|
+
const candidate = w;
|
|
10
|
+
return (!!candidate &&
|
|
11
|
+
!!candidate.sequenceFeatureDetails &&
|
|
12
|
+
candidate.view?.id === viewId);
|
|
13
|
+
}
|
|
14
|
+
// The same panel also opens straight off a feature's right-click menu, where it
|
|
15
|
+
// is owned by the display rather than by a widget — so the view's own displays
|
|
16
|
+
// publish hover positions too.
|
|
17
|
+
function displayHoverPosition(display) {
|
|
18
|
+
const candidate = display;
|
|
19
|
+
return candidate?.sequenceHoverPosition;
|
|
20
|
+
}
|
|
21
|
+
// Draws a crosshair on the LGV at the base a connected feature-detail sequence
|
|
22
|
+
// panel is hovering, so mousing over the sequence readout points at the genome.
|
|
23
|
+
const SequenceFeatureHoverHighlight = observer(function SequenceFeatureHoverHighlight({ model, }) {
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(ConnectedHoverHighlight, { model: model, getPosition: (widget, viewId) => isFeatureWidgetForView(widget, viewId)
|
|
25
|
+
? widget.sequenceHoverPosition
|
|
26
|
+
: undefined }), model.tracks
|
|
27
|
+
.flatMap(track => track.displays)
|
|
28
|
+
.flatMap(display => {
|
|
29
|
+
const position = displayHoverPosition(display);
|
|
30
|
+
return position
|
|
31
|
+
? [
|
|
32
|
+
_jsx(HoverPositionHighlight, { model: model, position: position }, `hover-${display.id}`),
|
|
33
|
+
]
|
|
34
|
+
: [];
|
|
35
|
+
})] }));
|
|
36
|
+
});
|
|
37
|
+
export default SequenceFeatureHoverHighlight;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { addExtensionElement } from '@jbrowse/core/ui';
|
|
2
|
+
import SequenceFeatureHoverHighlight from './SequenceFeatureHoverHighlight.js';
|
|
3
|
+
export default function SequenceFeatureHoverHighlightExtensionF(pluginManager) {
|
|
4
|
+
addExtensionElement(pluginManager, 'LinearGenomeView-TracksContainerComponent', SequenceFeatureHoverHighlight);
|
|
5
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { LabeledCheckbox } from '@jbrowse/core/ui';
|
|
4
|
+
import { TextField } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import SearchPanelForm from './SearchPanelForm.js';
|
|
7
|
+
import StrandCheckboxes from './StrandCheckboxes.js';
|
|
8
|
+
import { addReferenceScanTrack } from './searchModes.js';
|
|
9
|
+
const SequencePatternPanel = observer(function SequencePatternPanel({ model, handleClose, }) {
|
|
10
|
+
const [value, setValue] = useState('');
|
|
11
|
+
const [caseInsensitive, setCaseInsensitive] = useState(true);
|
|
12
|
+
const [searchForward, setSearchForward] = useState(true);
|
|
13
|
+
const [searchReverse, setSearchReverse] = useState(true);
|
|
14
|
+
let patternError;
|
|
15
|
+
try {
|
|
16
|
+
new RegExp(value);
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
patternError = e;
|
|
20
|
+
}
|
|
21
|
+
const canSubmit = !!value && !patternError && (searchForward || searchReverse);
|
|
22
|
+
function handleSubmit() {
|
|
23
|
+
addReferenceScanTrack(model, {
|
|
24
|
+
trackId: `sequence_search_${Date.now()}`,
|
|
25
|
+
name: `Sequence search ${value}`,
|
|
26
|
+
adapter: {
|
|
27
|
+
type: 'SequenceSearchAdapter',
|
|
28
|
+
search: value,
|
|
29
|
+
searchForward,
|
|
30
|
+
searchReverse,
|
|
31
|
+
caseInsensitive,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
handleClose();
|
|
35
|
+
}
|
|
36
|
+
return (_jsxs(SearchPanelForm, { onSubmit: handleSubmit, handleClose: handleClose, submitDisabled: !canSubmit, children: [_jsx(TextField, { size: "small", value: value, onChange: e => {
|
|
37
|
+
setValue(e.target.value);
|
|
38
|
+
}, label: "Sequence pattern", placeholder: "e.g. AACT(C|T)", error: !!patternError, helperText: patternError ? `${patternError}` : 'Plain sequence or a regex' }), _jsx(StrandCheckboxes, { searchForward: searchForward, searchReverse: searchReverse, setSearchForward: setSearchForward, setSearchReverse: setSearchReverse, children: _jsx(LabeledCheckbox, { size: "small", checked: caseInsensitive, onChange: val => {
|
|
39
|
+
setCaseInsensitive(val);
|
|
40
|
+
}, label: "Case insensitive" }) })] }));
|
|
41
|
+
});
|
|
42
|
+
export default SequencePatternPanel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare const SequenceSearchDialog: ({ model, handleClose, }: {
|
|
2
2
|
model: {
|
|
3
3
|
assemblyNames: string[];
|
|
4
|
-
|
|
4
|
+
launchTrack: (trackId: string) => Promise<unknown>;
|
|
5
5
|
};
|
|
6
6
|
handleClose: () => void;
|
|
7
|
-
}) => import("react
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
8
8
|
export default SequenceSearchDialog;
|
|
@@ -1,65 +1,43 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Dialog } from '@jbrowse/core/ui';
|
|
4
|
-
import { getSession, isSessionWithAddTracks } from '@jbrowse/core/util';
|
|
5
4
|
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
-
import {
|
|
7
|
-
import { Button, Checkbox, DialogActions, DialogContent, FormControlLabel, FormGroup, TextField, Typography, } from '@mui/material';
|
|
5
|
+
import { ToggleButton, ToggleButtonGroup } from '@mui/material';
|
|
8
6
|
import { observer } from 'mobx-react';
|
|
7
|
+
import CrisprGuidePanel from './CrisprGuidePanel.js';
|
|
8
|
+
import MotifListPanel from './MotifListPanel.js';
|
|
9
|
+
import SequencePatternPanel from './SequencePatternPanel.js';
|
|
9
10
|
const useStyles = makeStyles()({
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
modeBar: {
|
|
12
|
+
padding: '12px 24px 0',
|
|
12
13
|
},
|
|
13
14
|
});
|
|
15
|
+
const MODES = [
|
|
16
|
+
{
|
|
17
|
+
id: 'pattern',
|
|
18
|
+
label: 'Sequence pattern',
|
|
19
|
+
ReactComponent: SequencePatternPanel,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'crispr',
|
|
23
|
+
label: 'CRISPR guide RNAs',
|
|
24
|
+
ReactComponent: CrisprGuidePanel,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'motifs',
|
|
28
|
+
label: 'Motif list',
|
|
29
|
+
ReactComponent: MotifListPanel,
|
|
30
|
+
},
|
|
31
|
+
];
|
|
14
32
|
const SequenceSearchDialog = observer(function SequenceSearchDialog({ model, handleClose, }) {
|
|
15
33
|
const { classes } = useStyles();
|
|
16
|
-
const [
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
catch (e) {
|
|
25
|
-
error = e;
|
|
26
|
-
}
|
|
27
|
-
return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: handleClose, title: "Sequence search", children: [_jsxs(DialogContent, { className: classes.dialogContent, children: [_jsx(Typography, { children: "Supply a sequence to search for. A track will be created with the resulting matches once submitted. You can also supply regex style expressions e.g. AACT(C|T)." }), _jsx(TextField, { value: value, onChange: e => {
|
|
28
|
-
setValue(e.target.value);
|
|
29
|
-
}, helperText: "Sequence search pattern" }), _jsxs(FormGroup, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: searchForward, onChange: event => {
|
|
30
|
-
setSearchForward(event.target.checked);
|
|
31
|
-
} }), label: "Search forward strand" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: searchReverse, onChange: event => {
|
|
32
|
-
setSearchReverse(event.target.checked);
|
|
33
|
-
} }), label: "Search reverse strand" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: caseInsensitive, onChange: event => {
|
|
34
|
-
setCaseInsensitive(event.target.checked);
|
|
35
|
-
} }), label: "Case insensitive" })] }), error ? _jsx(Typography, { color: "error", children: `${error}` }) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: () => {
|
|
36
|
-
if (value) {
|
|
37
|
-
const trackId = `sequence_search_${Date.now()}`;
|
|
38
|
-
const session = getSession(model);
|
|
39
|
-
const { assemblyManager } = session;
|
|
40
|
-
const assemblyName = model.assemblyNames[0];
|
|
41
|
-
if (isSessionWithAddTracks(session)) {
|
|
42
|
-
session.addTrackConf({
|
|
43
|
-
trackId,
|
|
44
|
-
name: `Sequence search ${value}`,
|
|
45
|
-
assemblyNames: [assemblyName],
|
|
46
|
-
type: 'FeatureTrack',
|
|
47
|
-
adapter: {
|
|
48
|
-
type: 'SequenceSearchAdapter',
|
|
49
|
-
search: value,
|
|
50
|
-
searchForward,
|
|
51
|
-
searchReverse,
|
|
52
|
-
caseInsensitive,
|
|
53
|
-
sequenceAdapter: getSnapshot(assemblyManager.get(assemblyName)?.configuration.sequence
|
|
54
|
-
.adapter),
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
model.showTrack(trackId);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
handleClose();
|
|
61
|
-
}, variant: "contained", color: "primary", children: "Submit" }), _jsx(Button, { onClick: () => {
|
|
62
|
-
handleClose();
|
|
63
|
-
}, variant: "contained", color: "secondary", children: "Close" })] })] }));
|
|
34
|
+
const [modeId, setModeId] = useState(MODES[0].id);
|
|
35
|
+
const active = MODES.find(m => m.id === modeId) ?? MODES[0];
|
|
36
|
+
const { ReactComponent } = active;
|
|
37
|
+
return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: handleClose, title: "Sequence search", children: [_jsx("div", { className: classes.modeBar, children: _jsx(ToggleButtonGroup, { exclusive: true, fullWidth: true, size: "small", value: active.id, onChange: (_event, value) => {
|
|
38
|
+
if (value) {
|
|
39
|
+
setModeId(value);
|
|
40
|
+
}
|
|
41
|
+
}, children: MODES.map(m => (_jsx(ToggleButton, { value: m.id, children: m.label }, m.id))) }) }), _jsx(ReactComponent, { model: model, handleClose: handleClose })] }));
|
|
64
42
|
});
|
|
65
43
|
export default SequenceSearchDialog;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export default function StrandCheckboxes({ searchForward, searchReverse, setSearchForward, setSearchReverse, children, }: {
|
|
3
|
+
searchForward: boolean;
|
|
4
|
+
searchReverse: boolean;
|
|
5
|
+
setSearchForward: (arg: boolean) => void;
|
|
6
|
+
setSearchReverse: (arg: boolean) => void;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LabeledCheckbox } from '@jbrowse/core/ui';
|
|
3
|
+
import { FormGroup, Typography } from '@mui/material';
|
|
4
|
+
// Forward/reverse strand checkboxes plus the "select at least one" guard, shared
|
|
5
|
+
// by the sequence-search mode panels. Extra checkboxes for a specific panel (e.g.
|
|
6
|
+
// "Case insensitive") slot in alongside via `children`.
|
|
7
|
+
export default function StrandCheckboxes({ searchForward, searchReverse, setSearchForward, setSearchReverse, children, }) {
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsxs(FormGroup, { row: true, children: [_jsx(LabeledCheckbox, { size: "small", checked: searchForward, onChange: val => {
|
|
9
|
+
setSearchForward(val);
|
|
10
|
+
}, label: "Forward strand" }), _jsx(LabeledCheckbox, { size: "small", checked: searchReverse, onChange: val => {
|
|
11
|
+
setSearchReverse(val);
|
|
12
|
+
}, label: "Reverse strand" }), children] }), !searchForward && !searchReverse ? (_jsx(Typography, { color: "error", variant: "body2", children: "Select at least one strand" })) : null] }));
|
|
13
|
+
}
|
|
@@ -1,58 +1,102 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { ErrorMessage, ResizeHandle } from '@jbrowse/core/ui';
|
|
2
|
+
import { ErrorBanner, ResizeHandle } from '@jbrowse/core/ui';
|
|
4
3
|
import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
|
|
5
4
|
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
-
import {
|
|
5
|
+
import { TrackOverlaySlot } from '@jbrowse/display-ui';
|
|
7
6
|
import { Paper } from '@mui/material';
|
|
8
7
|
import { observer } from 'mobx-react';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
8
|
+
import { RESIZE_HANDLE_HEIGHT, TRACK_OUTLINE_BORDER, TRACK_TOP_GAP, } from '../consts.js';
|
|
9
|
+
import Gridlines from './Gridlines.js';
|
|
10
|
+
import PaddingBlocks from './PaddingBlocks.js';
|
|
11
|
+
import TrackLabel from './TrackLabel.js';
|
|
12
|
+
import TrackRenderingContainer from './TrackRenderingContainer.js';
|
|
13
|
+
const useStyles = makeStyles()({
|
|
14
|
+
// No `overflow`: paint containment already clips to the padding box, and an
|
|
15
|
+
// overflow would only add a scroll container — the spurious second scrollbar
|
|
16
|
+
// described in TrackRenderingContainer. flow-root keeps the block formatting
|
|
17
|
+
// context that `overflow: hidden` used to establish as a side effect (neither
|
|
18
|
+
// `clip` nor no overflow does), so child margins still can't collapse through
|
|
19
|
+
// and shift the track — which the breakpoint split view would pick up, since
|
|
20
|
+
// its connector overlay measures trackRefs' getBoundingClientRect().top.
|
|
14
21
|
root: {
|
|
15
|
-
marginTop:
|
|
16
|
-
overflow: 'hidden',
|
|
22
|
+
marginTop: TRACK_TOP_GAP,
|
|
17
23
|
position: 'relative',
|
|
24
|
+
display: 'flow-root',
|
|
18
25
|
contain: 'layout style paint',
|
|
19
26
|
},
|
|
20
27
|
unpinnedTrack: {
|
|
21
28
|
background: 'none',
|
|
22
29
|
},
|
|
30
|
+
// in flow at the bottom of the Paper, and outside `trackContent` — so a
|
|
31
|
+
// `bottom:0` portaled overlay (the status chips) lands on the track content's
|
|
32
|
+
// bottom edge rather than having to subtract this height back out. The height
|
|
33
|
+
// arrives inline from RESIZE_HANDLE_HEIGHT, which the model's offset
|
|
34
|
+
// arithmetic reads too.
|
|
35
|
+
//
|
|
36
|
+
// No `bar`: a divider drawn at rest under every track read as a band of its
|
|
37
|
+
// own down the whole view. It keeps its RESIZE_HANDLE_HEIGHT of space in flow
|
|
38
|
+
// and reveals itself under the pointer at `action.disabled`, the weight a
|
|
39
|
+
// `bar` rests at.
|
|
23
40
|
resizeHandle: {
|
|
24
|
-
height: 4,
|
|
25
|
-
boxSizing: 'border-box',
|
|
26
41
|
position: 'relative',
|
|
27
|
-
background: 'transparent',
|
|
28
|
-
'&:hover': {
|
|
29
|
-
background: theme.palette.divider,
|
|
30
|
-
},
|
|
31
42
|
},
|
|
32
|
-
|
|
43
|
+
// in-flow, so the label pushes the track body down by its own height. The
|
|
44
|
+
// margin is that push plus a gap: without it the body starts on the label's
|
|
45
|
+
// border-box edge, and the Paper's drop shadow (which reaches ~4px past it)
|
|
46
|
+
// lands on the first rows of features. Vertical margins count on an atomic
|
|
47
|
+
// inline-level box, so this grows the line box rather than collapsing away.
|
|
48
|
+
//
|
|
49
|
+
// 8, not 4. At 4 the whole margin went to clearing the shadow and nothing
|
|
50
|
+
// was left over as a gap: measured on desktop-ispcr-results, where the PCR
|
|
51
|
+
// product is a feature on the display's FIRST row, the chip's bottom border
|
|
52
|
+
// and the feature's top border came out ~2px apart and read as one line
|
|
53
|
+
// (reviewer: "the tracklabels:offset is just a little bit overlapping the
|
|
54
|
+
// tracklabel still"). Most tracks hide this because their display adds its
|
|
55
|
+
// own top padding before the first row. 8 keeps the ~4 the shadow needs and
|
|
56
|
+
// spends the other 4 on clearance.
|
|
57
|
+
trackLabelOffset: {
|
|
58
|
+
position: 'relative',
|
|
59
|
+
display: 'inline-block',
|
|
60
|
+
marginBottom: 8,
|
|
61
|
+
},
|
|
62
|
+
trackLabelOverlap: {
|
|
63
|
+
position: 'absolute',
|
|
64
|
+
},
|
|
65
|
+
});
|
|
33
66
|
const TrackContainer = observer(function TrackContainer({ model, track, }) {
|
|
34
67
|
const { classes } = useStyles();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
// an LGV track always holds at least one linear display (activeDisplay =
|
|
69
|
+
// displays[0]); narrow to the linear shape for prefersOffset/resizeHeight
|
|
70
|
+
const display = track.activeDisplay;
|
|
71
|
+
const { showTrackOutlines } = model;
|
|
72
|
+
// The Paper's 1px border, present iff outlines are on. Everything laid out in
|
|
73
|
+
// the *display's* coordinates has to cancel it — the rendering container
|
|
74
|
+
// shifts left by it (see renderingComponentContainer), so the overlay node and
|
|
75
|
+
// the masks over it have to move by the same amount or they land a pixel off
|
|
76
|
+
// the data. One binding rather than three copies of the ternary, because the
|
|
77
|
+
// three agreeing is the whole point.
|
|
78
|
+
const outlineOffset = showTrackOutlines ? TRACK_OUTLINE_BORDER : 0;
|
|
79
|
+
const trackLabelStyle = model.effectiveTrackLabels !== 'overlapping' || display.prefersOffset
|
|
80
|
+
? classes.trackLabelOffset
|
|
81
|
+
: classes.trackLabelOverlap;
|
|
82
|
+
return (_jsxs(Paper, { className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onDragOver: event => {
|
|
83
|
+
model.onTrackDragOver(track.id, event.clientY);
|
|
84
|
+
}, children: [track.pinned ? _jsx(Gridlines, { model: model, offset: outlineOffset }) : null, model.effectiveTrackLabels !== 'hidden' ? (_jsx(TrackLabel, { track: track, className: trackLabelStyle })) : null, _jsx(TrackOverlaySlot, { zIndex: 100, overlayStyle: { left: -outlineOffset }, children: _jsx(ErrorBoundary, { resetKeys: [display.id], FallbackComponent: e => (_jsx(ErrorBanner, { error: e.error, onReset: e.resetErrorBoundary })), children: _jsx(TrackRenderingContainer, { model: model, track: track }) }) }), _jsx(PaddingBlocks, { model: model, offset: outlineOffset }), _jsx(ResizeHandle, { style: { height: RESIZE_HANDLE_HEIGHT }, onDrag: distance => display.resizeHeight(distance),
|
|
85
|
+
// the drag's shortcut: grow the track by whatever it is scrolled over,
|
|
86
|
+
// so a pileup showing three rows of forty opens to all forty
|
|
87
|
+
// Optional: only a display that scrolls its own content has anything
|
|
88
|
+
// hidden to expand to.
|
|
89
|
+
onDoubleClick: () => {
|
|
90
|
+
display.expandToContentHeight?.();
|
|
91
|
+
},
|
|
92
|
+
// Bracket the drag so a display can sit an expensive per-frame layer
|
|
93
|
+
// out of it (see `resizing` on TrackHeightMixin). Causal rather than a
|
|
94
|
+
// per-display debounce: the handle owns both ends of the gesture. On
|
|
95
|
+
// the track, so this holds whatever the active display is.
|
|
96
|
+
onDragStart: () => {
|
|
97
|
+
track.setResizing(true);
|
|
98
|
+
}, onDragEnd: () => {
|
|
99
|
+
track.setResizing(false);
|
|
100
|
+
}, className: classes.resizeHandle })] }));
|
|
57
101
|
});
|
|
58
102
|
export default TrackContainer;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
|
-
|
|
2
|
+
declare const TrackLabel: ({ track, className, }: {
|
|
3
3
|
track: BaseTrackModel;
|
|
4
4
|
className?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const TrackLabel: ({ track, className }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
7
6
|
export default TrackLabel;
|
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
3
|
-
import {
|
|
3
|
+
import { getSession } from '@jbrowse/core/util';
|
|
4
4
|
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
5
5
|
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
-
import
|
|
7
|
-
import { IconButton, Paper, Typography, alpha } from '@mui/material';
|
|
6
|
+
import { Paper, Typography } from '@mui/material';
|
|
8
7
|
import { observer } from 'mobx-react';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import { TrackLabelCloseButton, TrackLabelMinimizeButton, } from './TrackLabelButtons.js';
|
|
9
|
+
import TrackLabelDragHandle from './TrackLabelDragHandle.js';
|
|
10
|
+
import TrackLabelMenu from './TrackLabelMenu.js';
|
|
11
|
+
import TrackLabelRefNameWarning from './TrackLabelRefNameWarning.js';
|
|
11
12
|
const useStyles = makeStyles()(theme => ({
|
|
12
13
|
root: {
|
|
14
|
+
// above breakpoint split view
|
|
13
15
|
zIndex: 200,
|
|
14
|
-
background:
|
|
15
|
-
'&:hover': {
|
|
16
|
-
background: theme.palette.background.paper,
|
|
17
|
-
},
|
|
16
|
+
background: theme.palette.background.paper,
|
|
18
17
|
},
|
|
19
18
|
trackName: {
|
|
20
19
|
margin: '0 auto',
|
|
21
20
|
width: '90%',
|
|
22
|
-
fontSize: '0.8rem',
|
|
23
21
|
pointerEvents: 'none',
|
|
24
22
|
},
|
|
25
|
-
iconButton: {
|
|
26
|
-
padding: theme.spacing(1),
|
|
27
|
-
},
|
|
28
23
|
}));
|
|
29
|
-
const TrackLabel = observer(function TrackLabel({ track, className }) {
|
|
24
|
+
const TrackLabel = observer(function TrackLabel({ track, className, }) {
|
|
30
25
|
const { classes } = useStyles();
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const { minimized } = track;
|
|
34
|
-
const trackId = track.trackId;
|
|
35
|
-
const trackName = getTrackName(track.configuration, session);
|
|
36
|
-
return (_jsxs(Paper, { className: cx(className, classes.root), onClick: event => {
|
|
37
|
-
event.stopPropagation();
|
|
38
|
-
}, children: [_jsx(TrackLabelDragHandle, { track: track, trackId: trackId, view: view }), _jsx(IconButton, { onClick: () => view.hideTrack(trackId), className: classes.iconButton, title: "close this track", children: _jsx(CloseIcon, { fontSize: "small" }) }), _jsx(Typography, { variant: "body1", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: [trackName, minimized ? '(minimized)' : '']
|
|
39
|
-
.filter(f => !!f)
|
|
40
|
-
.join(' ') }) }), _jsx(TrackLabelMenu, { track: track })] }));
|
|
26
|
+
const trackName = getTrackName(track.configuration, getSession(track));
|
|
27
|
+
return (_jsxs(Paper, { className: cx(className, classes.root), children: [_jsx(TrackLabelDragHandle, { track: track }), _jsx(TrackLabelCloseButton, { track: track }), _jsx(TrackLabelMinimizeButton, { track: track }), _jsx(Typography, { variant: "body2", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: trackName }) }), _jsx(TrackLabelRefNameWarning, { track: track }), _jsx(TrackLabelMenu, { track: track })] }));
|
|
41
28
|
});
|
|
42
29
|
export default TrackLabel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
2
|
+
export declare const TrackLabelCloseButton: ({ track, }: {
|
|
3
|
+
track: BaseTrackModel;
|
|
4
|
+
}) => import("react").JSX.Element;
|
|
5
|
+
export declare const TrackLabelMinimizeButton: ({ track }: {
|
|
6
|
+
track: BaseTrackModel;
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
+
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
5
|
+
import ArrowRightIcon from '@mui/icons-material/ArrowRight';
|
|
6
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
7
|
+
import { IconButton } from '@mui/material';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
const useStyles = makeStyles()({
|
|
10
|
+
iconButton: {
|
|
11
|
+
padding: 0,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
// Keyed by trackId, not by the track's display name or by the model id: the
|
|
15
|
+
// name is config the user can change and the model id is minted per session, so
|
|
16
|
+
// neither survives being written into a test or a screenshot spec. The only
|
|
17
|
+
// other handle these buttons offered was `title`, which is shared by every
|
|
18
|
+
// track's copy of the button — so reaching ONE of them meant walking up to the
|
|
19
|
+
// Paper the label and the rendering container share and matching that
|
|
20
|
+
// container's testid through `:has()`. That worked and nobody should have to
|
|
21
|
+
// write it.
|
|
22
|
+
export const TrackLabelCloseButton = observer(function TrackLabelCloseButton({ track, }) {
|
|
23
|
+
const { classes } = useStyles();
|
|
24
|
+
const view = getContainingView(track);
|
|
25
|
+
return (_jsx(IconButton, { onClick: () => view.hideTrack(track.trackId), className: classes.iconButton, title: "close this track", "data-testid": `track-close-${track.trackId}`, children: _jsx(CloseIcon, { fontSize: "small" }) }));
|
|
26
|
+
});
|
|
27
|
+
export const TrackLabelMinimizeButton = observer(function TrackLabelMinimizeButton({ track }) {
|
|
28
|
+
const { classes } = useStyles();
|
|
29
|
+
const { minimized } = track;
|
|
30
|
+
return (_jsx(IconButton, { onClick: () => {
|
|
31
|
+
track.setMinimized(!minimized);
|
|
32
|
+
}, className: classes.iconButton, title: minimized ? 'restore track' : 'minimize track', "data-testid": `track-minimize-${track.trackId}`, children: minimized ? _jsx(ArrowRightIcon, {}) : _jsx(ArrowDropDownIcon, {}) }));
|
|
33
|
+
});
|