@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
|
@@ -1,64 +1,39 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { canonicalLocString } from '@jbrowse/core/TextSearch/places';
|
|
3
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
4
|
+
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
5
|
+
import { getSession } from '@jbrowse/core/util';
|
|
3
6
|
import { Button, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, } from '@mui/material';
|
|
4
|
-
import {
|
|
5
|
-
|
|
7
|
+
import { observer } from 'mobx-react';
|
|
8
|
+
import { isOpenInView } from '../../searchUtils.js';
|
|
9
|
+
const SearchResultsTable = observer(function SearchResultsTable({ searchResults, assemblyName, model, handleClose, onPick, }) {
|
|
6
10
|
const session = getSession(model);
|
|
7
|
-
const { pluginManager } = getEnv(session);
|
|
8
11
|
const { assemblyManager } = session;
|
|
9
|
-
const assemblyName = optAssemblyName || model.displayedRegions[0].assemblyName;
|
|
10
12
|
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
13
|
function getTrackName(trackId) {
|
|
18
|
-
|
|
14
|
+
const conf = trackId !== undefined ? session.getTrackById(trackId) : undefined;
|
|
15
|
+
return conf ? readConfObject(conf, 'name') : '';
|
|
19
16
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
const location = result.getLabel();
|
|
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 });
|
|
36
|
-
}
|
|
17
|
+
// A location the assembly can't resolve is listed as-is: Go navigates
|
|
18
|
+
// through navToOption, which reports its own failure
|
|
19
|
+
function formatLocation(locString) {
|
|
20
|
+
return assembly && locString
|
|
21
|
+
? canonicalLocString(locString, assembly)
|
|
22
|
+
: locString;
|
|
37
23
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
try {
|
|
55
|
-
await handleClick(result);
|
|
56
|
-
}
|
|
57
|
-
catch (e) {
|
|
58
|
-
console.error(e);
|
|
59
|
-
session.notifyError(`${e}`, e);
|
|
60
|
-
}
|
|
61
|
-
handleClose();
|
|
62
|
-
}, color: "primary", variant: "contained", children: "Go" }) })] }, result.getId()));
|
|
63
|
-
}) })] }) }));
|
|
64
|
-
}
|
|
24
|
+
// A hit in a track that is already on screen is usually the one meant, so it
|
|
25
|
+
// is listed first rather than given a control that says so. sort is stable,
|
|
26
|
+
// so everything else keeps the ranked order it arrived in.
|
|
27
|
+
const ordered = [...searchResults].sort((a, b) => Number(isOpenInView(b, model)) - Number(isOpenInView(a, model)));
|
|
28
|
+
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: _jsx(SanitizedHTML, { html: getTrackName(result.getTrackId()) || 'N/A' }) }), _jsx(TableCell, { align: "right", children: _jsx(Button, { onClick: async () => {
|
|
29
|
+
try {
|
|
30
|
+
await onPick(result);
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
console.error(e);
|
|
34
|
+
session.notifyError(`${e}`, e);
|
|
35
|
+
}
|
|
36
|
+
handleClose();
|
|
37
|
+
}, color: "primary", variant: "contained", children: "Go" }) })] }, result.getId()))) })] }) }));
|
|
38
|
+
});
|
|
39
|
+
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,6 @@
|
|
|
1
|
+
import type { SequenceSearchModel } from './searchModes.ts';
|
|
1
2
|
declare const SequenceSearchDialog: ({ model, handleClose, }: {
|
|
2
|
-
model:
|
|
3
|
-
assemblyNames: string[];
|
|
4
|
-
showTrack: (trackId: string) => void;
|
|
5
|
-
};
|
|
3
|
+
model: SequenceSearchModel;
|
|
6
4
|
handleClose: () => void;
|
|
7
|
-
}) => import("react
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
8
6
|
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,156 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { ErrorBanner, ResizeHandle } from '@jbrowse/core/ui';
|
|
4
4
|
import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
|
|
5
5
|
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
+
import { TrackOverlaySlot } from '@jbrowse/display-ui';
|
|
6
7
|
import { isAlive } from '@jbrowse/mobx-state-tree';
|
|
7
8
|
import { Paper } from '@mui/material';
|
|
8
9
|
import { observer } from 'mobx-react';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
10
|
+
import { RESIZE_HANDLE_HEIGHT, TRACK_OUTLINE_BORDER, TRACK_TOP_GAP, } from '../consts.js';
|
|
11
|
+
import Gridlines from './Gridlines.js';
|
|
12
|
+
import PaddingBlocks from './PaddingBlocks.js';
|
|
13
|
+
import TrackLabel from './TrackLabel.js';
|
|
14
|
+
import TrackRenderingContainer from './TrackRenderingContainer.js';
|
|
15
|
+
const useStyles = makeStyles()({
|
|
16
|
+
// No `overflow`: paint containment already clips to the padding box, and an
|
|
17
|
+
// overflow would only add a scroll container — the spurious second scrollbar
|
|
18
|
+
// described in TrackRenderingContainer. flow-root keeps the block formatting
|
|
19
|
+
// context that `overflow: hidden` used to establish as a side effect (neither
|
|
20
|
+
// `clip` nor no overflow does), so child margins still can't collapse through
|
|
21
|
+
// and shift the track — which would put the pixels off the model's offset
|
|
22
|
+
// arithmetic, which the breakpoint split view draws its connectors from.
|
|
14
23
|
root: {
|
|
15
|
-
marginTop:
|
|
16
|
-
overflow: 'hidden',
|
|
24
|
+
marginTop: TRACK_TOP_GAP,
|
|
17
25
|
position: 'relative',
|
|
26
|
+
display: 'flow-root',
|
|
18
27
|
contain: 'layout style paint',
|
|
19
28
|
},
|
|
20
29
|
unpinnedTrack: {
|
|
21
30
|
background: 'none',
|
|
22
31
|
},
|
|
32
|
+
// in flow at the bottom of the Paper, and outside `trackContent` — so a
|
|
33
|
+
// `bottom:0` portaled overlay (the status chips) lands on the track content's
|
|
34
|
+
// bottom edge rather than having to subtract this height back out. The height
|
|
35
|
+
// arrives inline from RESIZE_HANDLE_HEIGHT, which the model's offset
|
|
36
|
+
// arithmetic reads too.
|
|
37
|
+
//
|
|
38
|
+
// No `bar`: a divider drawn at rest under every track read as a band of its
|
|
39
|
+
// own down the whole view. It keeps its RESIZE_HANDLE_HEIGHT of space in flow
|
|
40
|
+
// and reveals itself under the pointer at `action.disabled`, the weight a
|
|
41
|
+
// `bar` rests at.
|
|
23
42
|
resizeHandle: {
|
|
24
|
-
height: 4,
|
|
25
|
-
boxSizing: 'border-box',
|
|
26
43
|
position: 'relative',
|
|
27
|
-
background: 'transparent',
|
|
28
|
-
'&:hover': {
|
|
29
|
-
background: theme.palette.divider,
|
|
30
|
-
},
|
|
31
44
|
},
|
|
32
|
-
|
|
45
|
+
// in-flow, so the label pushes the track body down by its own height. The
|
|
46
|
+
// margin is that push plus a gap: without it the body starts on the label's
|
|
47
|
+
// border-box edge, and the Paper's drop shadow (which reaches ~4px past it)
|
|
48
|
+
// lands on the first rows of features. Vertical margins count on an atomic
|
|
49
|
+
// inline-level box, so this grows the line box rather than collapsing away.
|
|
50
|
+
//
|
|
51
|
+
// 8, not 4. At 4 the whole margin went to clearing the shadow and nothing
|
|
52
|
+
// was left over as a gap: measured on desktop-ispcr-results, where the PCR
|
|
53
|
+
// product is a feature on the display's FIRST row, the chip's bottom border
|
|
54
|
+
// and the feature's top border came out ~2px apart and read as one line
|
|
55
|
+
// (reviewer: "the tracklabels:offset is just a little bit overlapping the
|
|
56
|
+
// tracklabel still"). Most tracks hide this because their display adds its
|
|
57
|
+
// own top padding before the first row. 8 keeps the ~4 the shadow needs and
|
|
58
|
+
// spends the other 4 on clearance.
|
|
59
|
+
trackLabelOffset: {
|
|
60
|
+
position: 'relative',
|
|
61
|
+
marginBottom: 8,
|
|
62
|
+
},
|
|
63
|
+
trackLabelOverlap: {
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
},
|
|
66
|
+
// in flow, so the track keeps the banner's height, and raised over the
|
|
67
|
+
// `PaddingBlocks` painted after it
|
|
68
|
+
crashBanner: {
|
|
69
|
+
position: 'relative',
|
|
70
|
+
zIndex: 1,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
// Measures the in-flow label band, the distance from the Paper's content top to
|
|
74
|
+
// the rendering container, into the model. Observes the Paper: it grows and
|
|
75
|
+
// shrinks with the label, the label setting, and the display, and each of those
|
|
76
|
+
// can move the container. Published after a requestAnimationFrame like
|
|
77
|
+
// useWidthSetter, and cleared on unmount so a removed track leaves no band.
|
|
78
|
+
function useTrackLabelBand(model, trackId) {
|
|
79
|
+
const [paper, setPaper] = useState(null);
|
|
80
|
+
const [container, setContainer] = useState(null);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (paper && container && 'ResizeObserver' in window) {
|
|
83
|
+
let token;
|
|
84
|
+
const publish = () => {
|
|
85
|
+
token = requestAnimationFrame(() => {
|
|
86
|
+
if (isAlive(model)) {
|
|
87
|
+
const paperRect = paper.getBoundingClientRect();
|
|
88
|
+
const band = container.getBoundingClientRect().top -
|
|
89
|
+
paperRect.top -
|
|
90
|
+
paper.clientTop;
|
|
91
|
+
model.setTrackLabelBand(trackId, band);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
publish();
|
|
96
|
+
const observer = new ResizeObserver(publish);
|
|
97
|
+
observer.observe(paper);
|
|
98
|
+
return () => {
|
|
99
|
+
observer.disconnect();
|
|
100
|
+
if (token !== undefined) {
|
|
101
|
+
cancelAnimationFrame(token);
|
|
102
|
+
}
|
|
103
|
+
if (isAlive(model)) {
|
|
104
|
+
model.setTrackLabelBand(trackId, 0);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return undefined;
|
|
109
|
+
}, [paper, container, model, trackId]);
|
|
110
|
+
return { setPaper, setContainer };
|
|
111
|
+
}
|
|
33
112
|
const TrackContainer = observer(function TrackContainer({ model, track, }) {
|
|
34
113
|
const { classes } = useStyles();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
114
|
+
// an LGV track always holds at least one linear display (activeDisplay =
|
|
115
|
+
// displays[0]). The one narrowing to the linear shape, handed down rather
|
|
116
|
+
// than repeated, so a track's chrome and its body can't read two displays.
|
|
117
|
+
const display = track.activeDisplay;
|
|
118
|
+
const { showTrackOutlines } = model;
|
|
119
|
+
// The Paper's 1px border, present iff outlines are on. Everything laid out in
|
|
120
|
+
// the *display's* coordinates has to cancel it — the rendering container
|
|
121
|
+
// shifts left by it (see renderingComponentContainer), so the overlay node and
|
|
122
|
+
// the masks over it have to move by the same amount or they land a pixel off
|
|
123
|
+
// the data. One binding rather than three copies of the ternary, because the
|
|
124
|
+
// three agreeing is the whole point.
|
|
125
|
+
const outlineOffset = showTrackOutlines ? TRACK_OUTLINE_BORDER : 0;
|
|
126
|
+
// A label in flow is a row of track height, which is most of what minimizing
|
|
127
|
+
// buys back — so a minimized track overlaps its label whatever the setting
|
|
128
|
+
// says, and there is nothing under it to print over. `prefersOffset` is the
|
|
129
|
+
// display asking for the offset row in 'overlapping' mode, because its left
|
|
130
|
+
// edge carries an axis or a sidebar the label would cover.
|
|
131
|
+
const trackLabelStyle = track.minimized ||
|
|
132
|
+
(model.effectiveTrackLabels === 'overlapping' && !display.prefersOffset)
|
|
133
|
+
? classes.trackLabelOverlap
|
|
134
|
+
: classes.trackLabelOffset;
|
|
135
|
+
const { setPaper, setContainer } = useTrackLabelBand(model, track.trackId);
|
|
136
|
+
return (_jsxs(Paper, { ref: setPaper, className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onDragOver: event => {
|
|
137
|
+
model.onTrackDragOver(track.id, event.clientY);
|
|
138
|
+
}, 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, { FallbackComponent: e => (_jsx("div", { className: classes.crashBanner, children: _jsx(ErrorBanner, { error: e.error, onReset: e.resetErrorBoundary }) })), children: _jsx(TrackRenderingContainer, { model: model, track: track, display: display, ref: setContainer }) }, display.id) }), _jsx(PaddingBlocks, { model: model, offset: outlineOffset }), _jsx(ResizeHandle, { style: { height: RESIZE_HANDLE_HEIGHT }, onDrag: distance => display.resizeHeight(distance),
|
|
139
|
+
// the drag's shortcut: grow the track by whatever it is scrolled over,
|
|
140
|
+
// so a pileup showing three rows of forty opens to all forty
|
|
141
|
+
// Optional: only a display that scrolls its own content has anything
|
|
142
|
+
// hidden to expand to.
|
|
143
|
+
onDoubleClick: () => {
|
|
144
|
+
display.expandToContentHeight?.();
|
|
145
|
+
},
|
|
146
|
+
// Bracket the drag so a display can sit an expensive per-frame layer
|
|
147
|
+
// out of it (see `resizing` on TrackHeightMixin). Causal rather than a
|
|
148
|
+
// per-display debounce: the handle owns both ends of the gesture. On
|
|
149
|
+
// the track, so this holds whatever the active display is.
|
|
150
|
+
onDragStart: () => {
|
|
151
|
+
track.setResizing(true);
|
|
152
|
+
}, onDragEnd: () => {
|
|
153
|
+
track.setResizing(false);
|
|
154
|
+
}, className: classes.resizeHandle })] }));
|
|
57
155
|
});
|
|
58
156
|
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,36 @@
|
|
|
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
|
-
'
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
background: theme.palette.background.paper,
|
|
17
|
+
display: 'inline-flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
maxWidth: 'calc(100% - 16px)',
|
|
18
20
|
},
|
|
21
|
+
// one line: a long name wrapping over a narrow view covered the data below
|
|
19
22
|
trackName: {
|
|
20
|
-
margin:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
margin: theme.spacing(0, 0.5),
|
|
24
|
+
minWidth: 0,
|
|
25
|
+
overflow: 'hidden',
|
|
26
|
+
textOverflow: 'ellipsis',
|
|
27
|
+
whiteSpace: 'nowrap',
|
|
23
28
|
pointerEvents: 'none',
|
|
24
29
|
},
|
|
25
|
-
iconButton: {
|
|
26
|
-
padding: theme.spacing(1),
|
|
27
|
-
},
|
|
28
30
|
}));
|
|
29
|
-
const TrackLabel = observer(function TrackLabel({ track, className }) {
|
|
31
|
+
const TrackLabel = observer(function TrackLabel({ track, className, }) {
|
|
30
32
|
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 })] }));
|
|
33
|
+
const trackName = getTrackName(track.configuration, getSession(track));
|
|
34
|
+
return (_jsxs(Paper, { className: cx(className, classes.root), "data-testid": `trackLabel-${track.trackId}`, 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
35
|
});
|
|
42
36
|
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;
|