@jbrowse/plugin-linear-genome-view 4.2.1 → 5.0.0-beta.1
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 +17 -12
- package/esm/LinearGenomeView/FloatingSvgOverlay.d.ts +5 -0
- package/esm/LinearGenomeView/FloatingSvgOverlay.js +25 -0
- package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
- package/esm/LinearGenomeView/afterAttach.js +257 -88
- 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 +3 -7
- package/esm/LinearGenomeView/components/Highlight.js +30 -82
- package/esm/LinearGenomeView/components/HighlightBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/HighlightBand.js +40 -0
- 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 -42
- 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 +51 -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 +1 -1
- 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 +22 -0
- package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
- package/esm/LinearGenomeView/components/ZoomTransform.js +33 -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 +8 -4
- package/esm/LinearGenomeView/initKeys.d.ts +13 -0
- package/esm/LinearGenomeView/initKeys.js +104 -0
- package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
- package/esm/LinearGenomeView/keyboardHandler.js +10 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +6 -10
- package/esm/LinearGenomeView/lazyDialogs.js +3 -3
- package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
- package/esm/LinearGenomeView/linkedViewSync.js +52 -0
- package/esm/LinearGenomeView/menuItems.d.ts +27 -2
- package/esm/LinearGenomeView/menuItems.js +137 -101
- package/esm/LinearGenomeView/model.d.ts +1544 -136
- package/esm/LinearGenomeView/model.js +2352 -488
- 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 -29
- 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 +1263 -0
- package/esm/displayKitTests/perRegionTestEnv.js +141 -0
- package/esm/index.d.ts +112 -1237
- package/esm/index.js +102 -24
- package/esm/lazyPluginExports.d.ts +23 -0
- package/esm/lazyPluginExports.js +36 -0
- package/esm/searchUtils.d.ts +52 -11
- package/esm/searchUtils.js +318 -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 -8
- package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -17
- 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 -89
- 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,82 +1,74 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { RefNameAutocomplete, RefNameAutocompleteEndAdornment, adornmentReservePx, getInputWidth, useRecentLocations, } from '@jbrowse/core/ui';
|
|
2
3
|
import { getSession } from '@jbrowse/core/util';
|
|
3
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
4
|
import { alpha, useTheme } from '@mui/material';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
assembly,
|
|
33
|
-
model,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
6
|
+
import { fetchResults, navigateToSelectedOption, notifySearchFailure, } from '../../searchUtils.js';
|
|
7
|
+
import { SPACING, WIDGET_HEIGHT } from '../consts.js';
|
|
8
|
+
import { recentLocationOf, recentLocationsMenu } from './recentLocationsMenu.js';
|
|
9
|
+
const defaultStyle = { margin: SPACING };
|
|
10
|
+
// The header box's floor and ceiling. A stacked view's row passes its own, and
|
|
11
|
+
// `searchBoxWidth` answers for these.
|
|
12
|
+
const MIN_WIDTH = 175;
|
|
13
|
+
const MAX_WIDTH = 550;
|
|
14
|
+
/**
|
|
15
|
+
* What the box asks its row for at `value`, margins included — the number
|
|
16
|
+
* `headerFit` sheds against.
|
|
17
|
+
*
|
|
18
|
+
* The ask follows the locstring, which is the whole point of asking: 194px at
|
|
19
|
+
* `ctgA:1..20,000` and 284px at `chr22:10,510,000..10,610,000`, so a row sized
|
|
20
|
+
* against the 189px floor sheds too little and flexbox squeezes the box anyway.
|
|
21
|
+
* It is `getInputWidth`, the same function the box sizes itself with, rather
|
|
22
|
+
* than that arithmetic done again out here.
|
|
23
|
+
*
|
|
24
|
+
* `showHelp` is the component's own default below, and with help on
|
|
25
|
+
* `adornmentReservePx` returns the same number whatever the recent-locations
|
|
26
|
+
* menu holds — so the count only this component's hook knows cannot change the
|
|
27
|
+
* answer.
|
|
28
|
+
*/
|
|
29
|
+
export function searchBoxWidth(value) {
|
|
30
|
+
return (getInputWidth(value, MIN_WIDTH, MAX_WIDTH, adornmentReservePx({ showHelp: true })) +
|
|
31
|
+
2 * SPACING);
|
|
36
32
|
}
|
|
37
|
-
const SearchBox = observer(function SearchBox({ model, showHelp = true, }) {
|
|
38
|
-
const { classes } = useStyles();
|
|
33
|
+
const SearchBox = observer(function SearchBox({ model, showHelp = true, minWidth = MIN_WIDTH, maxWidth = MAX_WIDTH, style = defaultStyle, }) {
|
|
39
34
|
const theme = useTheme();
|
|
40
35
|
const session = getSession(model);
|
|
41
36
|
const { textSearchManager, assemblyManager } = session;
|
|
42
|
-
const { assemblyNames
|
|
37
|
+
const { assemblyNames } = model;
|
|
43
38
|
const assemblyName = assemblyNames[0];
|
|
44
39
|
const assembly = assemblyManager.get(assemblyName);
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
const { recentLocations, addRecentLocation, clearRecentLocations } = useRecentLocations(assemblyName);
|
|
41
|
+
async function navigate(option) {
|
|
42
|
+
try {
|
|
43
|
+
await navigateToSelectedOption({ model, assemblyName, option });
|
|
44
|
+
addRecentLocation(recentLocationOf(option));
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
notifySearchFailure(session, e);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const recentMenuItems = recentLocationsMenu({
|
|
51
|
+
recentLocations,
|
|
52
|
+
onNavigate: option => {
|
|
53
|
+
navigate(option).catch(() => { });
|
|
54
|
+
},
|
|
55
|
+
onClear: clearRecentLocations,
|
|
56
|
+
});
|
|
57
|
+
return (_jsx(RefNameAutocomplete, { onSelect: option => {
|
|
58
|
+
navigate(option).catch(() => { });
|
|
59
|
+
}, assemblyName: assemblyName, fetchResults: (queryString, stopToken) => fetchResults({
|
|
59
60
|
queryString,
|
|
60
|
-
|
|
61
|
-
rankSearchResults,
|
|
61
|
+
assemblyName,
|
|
62
62
|
textSearchManager,
|
|
63
63
|
assembly,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
style: {
|
|
73
|
-
padding: 0,
|
|
74
|
-
height: WIDGET_HEIGHT,
|
|
75
|
-
background: alpha(theme.palette.background.paper, 0.8),
|
|
76
|
-
},
|
|
77
|
-
endAdornment: _jsx(EndAdornment, { showHelp: showHelp }),
|
|
78
|
-
},
|
|
79
|
-
},
|
|
64
|
+
stopToken,
|
|
65
|
+
}), session: session, value: model.coarseVisibleLocStrings, minWidth: minWidth, maxWidth: maxWidth, adornmentWidth: adornmentReservePx({
|
|
66
|
+
showHelp,
|
|
67
|
+
menuItemCount: recentMenuItems.length,
|
|
68
|
+
}), style: style, endAdornment: _jsx(RefNameAutocompleteEndAdornment, { showHelp: showHelp, menuItems: recentMenuItems }), inputStyle: {
|
|
69
|
+
padding: 0,
|
|
70
|
+
height: WIDGET_HEIGHT,
|
|
71
|
+
background: alpha(theme.palette.background.paper, 0.8),
|
|
80
72
|
} }));
|
|
81
73
|
});
|
|
82
74
|
export default SearchBox;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export default function SearchPanelForm({ onSubmit, handleClose, submitDisabled, submitText, actions, children, }: {
|
|
3
|
+
onSubmit: () => void;
|
|
4
|
+
handleClose: () => void;
|
|
5
|
+
submitDisabled: boolean;
|
|
6
|
+
submitText?: string;
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SubmitForm } from '@jbrowse/core/ui';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
|
+
const useStyles = makeStyles()({
|
|
5
|
+
dialogContent: {
|
|
6
|
+
width: '34em',
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flexDirection: 'column',
|
|
9
|
+
gap: 12,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
// The chrome shared by the sequence-search mode panels: the fixed-width column
|
|
13
|
+
// their fields lay out in, plus SubmitForm's Cancel/Submit footer. Each panel
|
|
14
|
+
// still owns its own fields and its own submit, so this is only the frame.
|
|
15
|
+
export default function SearchPanelForm({ onSubmit, handleClose, submitDisabled, submitText, actions, children, }) {
|
|
16
|
+
const { classes } = useStyles();
|
|
17
|
+
return (_jsx(SubmitForm, { contentClassName: classes.dialogContent, onSubmit: onSubmit, onCancel: handleClose, submitDisabled: submitDisabled, submitText: submitText, actions: actions, children: children }));
|
|
18
|
+
}
|
|
@@ -2,8 +2,8 @@ import type { LinearGenomeViewModel } from '../../index.ts';
|
|
|
2
2
|
import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
3
3
|
export default function SearchResultsDialog({ model, assemblyName, searchQuery, searchResults, handleClose, }: {
|
|
4
4
|
model: LinearGenomeViewModel;
|
|
5
|
-
assemblyName
|
|
5
|
+
assemblyName: string;
|
|
6
6
|
searchQuery: string;
|
|
7
|
-
searchResults
|
|
7
|
+
searchResults: BaseResult[];
|
|
8
8
|
handleClose: () => void;
|
|
9
|
-
}): import("react
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import SearchResultsTable from
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InfoDialog } from '@jbrowse/core/ui';
|
|
3
|
+
import { Typography } from '@mui/material';
|
|
4
|
+
import SearchResultsTable from './SearchResultsTable.js';
|
|
5
5
|
export default function SearchResultsDialog({ model, assemblyName, searchQuery, searchResults, handleClose, }) {
|
|
6
|
-
return (
|
|
7
|
-
handleClose();
|
|
8
|
-
}, color: "primary", children: "Cancel" }) })] }));
|
|
6
|
+
return (_jsx(InfoDialog, { open: true, maxWidth: "xl", onClose: handleClose, title: "Search results", children: !searchResults.length ? (_jsxs(Typography, { children: ["No results found for ", _jsx("b", { children: searchQuery })] })) : (_jsxs(_Fragment, { children: [_jsxs(Typography, { children: ["Showing results for ", _jsx("b", { children: searchQuery })] }), _jsx(SearchResultsTable, { model: model, handleClose: handleClose, assemblyName: assemblyName, searchResults: searchResults })] })) }));
|
|
9
7
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '../../index.ts';
|
|
2
2
|
import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
3
|
-
|
|
3
|
+
declare const SearchResultsTable: ({ searchResults, assemblyName, model, handleClose, }: {
|
|
4
4
|
searchResults: BaseResult[];
|
|
5
|
-
assemblyName
|
|
5
|
+
assemblyName: string;
|
|
6
6
|
model: LinearGenomeViewModel;
|
|
7
7
|
handleClose: () => void;
|
|
8
|
-
})
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
export default SearchResultsTable;
|
|
@@ -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,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
|
+
}
|