@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,305 +0,0 @@
|
|
|
1
|
-
import { lazy } from 'react';
|
|
2
|
-
import { ConfigurationReference, getConf, readConfObject, } from '@jbrowse/core/configuration';
|
|
3
|
-
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
4
|
-
import { SimpleFeature, getSession } from '@jbrowse/core/util';
|
|
5
|
-
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
6
|
-
import { addDisposer, cast, getParent, isAlive, types, } from '@jbrowse/mobx-state-tree';
|
|
7
|
-
import ClearAllIcon from '@mui/icons-material/ClearAll';
|
|
8
|
-
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
9
|
-
import { reaction, toJS } from 'mobx';
|
|
10
|
-
import { BaseLinearDisplay } from "../BaseLinearDisplay/index.js";
|
|
11
|
-
const SetMaxHeightDialog = lazy(() => import("./components/SetMaxHeightDialog.js"));
|
|
12
|
-
const AddFiltersDialog = lazy(() => import("./components/AddFiltersDialog.js"));
|
|
13
|
-
function stateModelFactory(configSchema) {
|
|
14
|
-
return types
|
|
15
|
-
.compose('LinearFeatureDisplay', BaseLinearDisplay, types.model({
|
|
16
|
-
type: types.literal('LinearFeatureDisplay'),
|
|
17
|
-
trackShowLabels: types.maybe(types.boolean),
|
|
18
|
-
trackShowDescriptions: types.maybe(types.boolean),
|
|
19
|
-
trackDisplayMode: types.maybe(types.string),
|
|
20
|
-
trackMaxHeight: types.maybe(types.number),
|
|
21
|
-
configuration: ConfigurationReference(configSchema),
|
|
22
|
-
jexlFiltersSetting: types.maybe(types.array(types.string)),
|
|
23
|
-
}))
|
|
24
|
-
.volatile(() => ({
|
|
25
|
-
featureUnderMouseVolatile: undefined,
|
|
26
|
-
}))
|
|
27
|
-
.views(self => ({
|
|
28
|
-
activeFilters() {
|
|
29
|
-
return (toJS(self.jexlFiltersSetting) ??
|
|
30
|
-
getConf(self, 'jexlFilters').map((r) => `jexl:${r}`));
|
|
31
|
-
},
|
|
32
|
-
get rendererTypeName() {
|
|
33
|
-
return getConf(self, ['renderer', 'type']);
|
|
34
|
-
},
|
|
35
|
-
get sequenceAdapter() {
|
|
36
|
-
const { assemblyManager } = getSession(self);
|
|
37
|
-
const track = getParent(self, 2);
|
|
38
|
-
const assemblyNames = readConfObject(track.configuration, 'assemblyNames');
|
|
39
|
-
const assembly = assemblyManager.get(assemblyNames[0]);
|
|
40
|
-
return assembly ? getConf(assembly, ['sequence', 'adapter']) : undefined;
|
|
41
|
-
},
|
|
42
|
-
get showLabels() {
|
|
43
|
-
return self.trackShowLabels ?? getConf(self, ['renderer', 'showLabels']);
|
|
44
|
-
},
|
|
45
|
-
get showDescriptions() {
|
|
46
|
-
return (self.trackShowDescriptions ??
|
|
47
|
-
getConf(self, ['renderer', 'showDescriptions']));
|
|
48
|
-
},
|
|
49
|
-
get maxHeight() {
|
|
50
|
-
return self.trackMaxHeight ?? getConf(self, ['renderer', 'maxHeight']);
|
|
51
|
-
},
|
|
52
|
-
get displayMode() {
|
|
53
|
-
return (self.trackDisplayMode ?? getConf(self, ['renderer', 'displayMode']));
|
|
54
|
-
},
|
|
55
|
-
}))
|
|
56
|
-
.views(self => ({
|
|
57
|
-
get rendererConfig() {
|
|
58
|
-
const configBlob = getConf(self, ['renderer']) || {};
|
|
59
|
-
const config = configBlob;
|
|
60
|
-
return {
|
|
61
|
-
...config,
|
|
62
|
-
showLabels: self.trackShowLabels ?? config.showLabels,
|
|
63
|
-
showDescriptions: self.trackShowDescriptions ?? config.showDescriptions,
|
|
64
|
-
displayMode: self.trackDisplayMode ?? config.displayMode,
|
|
65
|
-
maxHeight: self.trackMaxHeight ?? config.maxHeight,
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
}))
|
|
69
|
-
.actions(self => ({
|
|
70
|
-
setJexlFilters(f) {
|
|
71
|
-
self.jexlFiltersSetting = cast(f);
|
|
72
|
-
},
|
|
73
|
-
setFeatureUnderMouse(feat) {
|
|
74
|
-
self.featureUnderMouseVolatile = feat;
|
|
75
|
-
},
|
|
76
|
-
toggleShowLabels() {
|
|
77
|
-
self.trackShowLabels = !self.showLabels;
|
|
78
|
-
},
|
|
79
|
-
toggleShowDescriptions() {
|
|
80
|
-
self.trackShowDescriptions = !self.showDescriptions;
|
|
81
|
-
},
|
|
82
|
-
setDisplayMode(val) {
|
|
83
|
-
self.trackDisplayMode = val;
|
|
84
|
-
},
|
|
85
|
-
setMaxHeight(val) {
|
|
86
|
-
self.trackMaxHeight = val;
|
|
87
|
-
},
|
|
88
|
-
}))
|
|
89
|
-
.views(self => ({
|
|
90
|
-
get featureUnderMouse() {
|
|
91
|
-
return self.featureUnderMouseVolatile;
|
|
92
|
-
},
|
|
93
|
-
}))
|
|
94
|
-
.views(self => {
|
|
95
|
-
const { renderProps: superRenderProps, renderingProps: superRenderingProps, } = self;
|
|
96
|
-
return {
|
|
97
|
-
renderProps() {
|
|
98
|
-
const superProps = superRenderProps();
|
|
99
|
-
return {
|
|
100
|
-
...superProps,
|
|
101
|
-
config: self.rendererConfig,
|
|
102
|
-
filters: new SerializableFilterChain({
|
|
103
|
-
filters: self.activeFilters(),
|
|
104
|
-
}),
|
|
105
|
-
sequenceAdapter: self.sequenceAdapter,
|
|
106
|
-
};
|
|
107
|
-
},
|
|
108
|
-
renderingProps() {
|
|
109
|
-
const superProps = superRenderingProps();
|
|
110
|
-
const session = getSession(self);
|
|
111
|
-
return {
|
|
112
|
-
...superProps,
|
|
113
|
-
async onFeatureClick(_, featureId) {
|
|
114
|
-
const { rpcManager } = session;
|
|
115
|
-
const { parentTrack } = self;
|
|
116
|
-
try {
|
|
117
|
-
const f = featureId || self.featureIdUnderMouse;
|
|
118
|
-
if (!f) {
|
|
119
|
-
self.clearFeatureSelection();
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
const sessionId = getRpcSessionId(self);
|
|
123
|
-
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
124
|
-
featureId: f,
|
|
125
|
-
sessionId,
|
|
126
|
-
trackInstanceId: parentTrack.id,
|
|
127
|
-
rendererType: self.rendererTypeName,
|
|
128
|
-
}));
|
|
129
|
-
if (isAlive(self) && feature) {
|
|
130
|
-
self.selectFeature(new SimpleFeature(feature));
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
catch (e) {
|
|
135
|
-
console.error(e);
|
|
136
|
-
session.notifyError(`${e}`, e);
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
async onFeatureContextMenu(_, featureId) {
|
|
140
|
-
const { rpcManager } = session;
|
|
141
|
-
const { parentTrack } = self;
|
|
142
|
-
try {
|
|
143
|
-
const f = featureId || self.featureIdUnderMouse;
|
|
144
|
-
if (!f) {
|
|
145
|
-
self.clearFeatureSelection();
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
const sessionId = getRpcSessionId(self);
|
|
149
|
-
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
150
|
-
featureId: f,
|
|
151
|
-
sessionId,
|
|
152
|
-
trackInstanceId: parentTrack.id,
|
|
153
|
-
rendererType: self.rendererTypeName,
|
|
154
|
-
}));
|
|
155
|
-
if (isAlive(self) && feature) {
|
|
156
|
-
self.setContextMenuFeature(new SimpleFeature(feature));
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
catch (e) {
|
|
161
|
-
console.error(e);
|
|
162
|
-
session.notifyError(`${e}`, e);
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
},
|
|
167
|
-
filterMenuItems() {
|
|
168
|
-
return [
|
|
169
|
-
{
|
|
170
|
-
label: 'Edit filters...',
|
|
171
|
-
onClick: () => {
|
|
172
|
-
getSession(self).queueDialog(handleClose => [
|
|
173
|
-
AddFiltersDialog,
|
|
174
|
-
{
|
|
175
|
-
model: self,
|
|
176
|
-
handleClose,
|
|
177
|
-
},
|
|
178
|
-
]);
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
];
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
})
|
|
185
|
-
.views(self => {
|
|
186
|
-
const { trackMenuItems: superTrackMenuItems } = self;
|
|
187
|
-
return {
|
|
188
|
-
trackMenuItems() {
|
|
189
|
-
return [
|
|
190
|
-
...superTrackMenuItems(),
|
|
191
|
-
{
|
|
192
|
-
label: 'Show...',
|
|
193
|
-
icon: VisibilityIcon,
|
|
194
|
-
subMenu: [
|
|
195
|
-
{
|
|
196
|
-
label: 'Show tooltips',
|
|
197
|
-
type: 'checkbox',
|
|
198
|
-
checked: self.showTooltipsEnabled,
|
|
199
|
-
onClick: () => {
|
|
200
|
-
self.setShowTooltips(!self.showTooltipsEnabled);
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
label: 'Show labels',
|
|
205
|
-
type: 'checkbox',
|
|
206
|
-
checked: self.showLabels,
|
|
207
|
-
onClick: () => {
|
|
208
|
-
self.toggleShowLabels();
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
label: 'Show descriptions',
|
|
213
|
-
type: 'checkbox',
|
|
214
|
-
checked: self.showDescriptions,
|
|
215
|
-
onClick: () => {
|
|
216
|
-
self.toggleShowDescriptions();
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
],
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
label: 'Display mode',
|
|
223
|
-
icon: VisibilityIcon,
|
|
224
|
-
subMenu: [
|
|
225
|
-
'normal',
|
|
226
|
-
'compact',
|
|
227
|
-
'reducedRepresentation',
|
|
228
|
-
'collapse',
|
|
229
|
-
].map(val => ({
|
|
230
|
-
label: val,
|
|
231
|
-
type: 'radio',
|
|
232
|
-
checked: self.displayMode === val,
|
|
233
|
-
onClick: () => {
|
|
234
|
-
self.setDisplayMode(val);
|
|
235
|
-
},
|
|
236
|
-
})),
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
label: 'Set max track height',
|
|
240
|
-
onClick: () => {
|
|
241
|
-
getSession(self).queueDialog(handleClose => [
|
|
242
|
-
SetMaxHeightDialog,
|
|
243
|
-
{
|
|
244
|
-
model: self,
|
|
245
|
-
handleClose,
|
|
246
|
-
},
|
|
247
|
-
]);
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
label: 'Filter by...',
|
|
252
|
-
icon: ClearAllIcon,
|
|
253
|
-
subMenu: self.filterMenuItems(),
|
|
254
|
-
},
|
|
255
|
-
];
|
|
256
|
-
},
|
|
257
|
-
};
|
|
258
|
-
})
|
|
259
|
-
.actions(self => ({
|
|
260
|
-
afterAttach() {
|
|
261
|
-
addDisposer(self, reaction(() => self.featureIdUnderMouse, async (featureId) => {
|
|
262
|
-
if (!featureId) {
|
|
263
|
-
self.setFeatureUnderMouse(undefined);
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
const session = getSession(self);
|
|
267
|
-
const { rpcManager } = session;
|
|
268
|
-
const { parentTrack } = self;
|
|
269
|
-
try {
|
|
270
|
-
const sessionId = getRpcSessionId(self);
|
|
271
|
-
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
272
|
-
featureId,
|
|
273
|
-
sessionId,
|
|
274
|
-
trackInstanceId: parentTrack.id,
|
|
275
|
-
rendererType: self.rendererTypeName,
|
|
276
|
-
}));
|
|
277
|
-
if (isAlive(self) &&
|
|
278
|
-
feature &&
|
|
279
|
-
self.featureIdUnderMouse === featureId) {
|
|
280
|
-
self.setFeatureUnderMouse(new SimpleFeature(feature));
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
catch (e) {
|
|
284
|
-
}
|
|
285
|
-
}, { delay: 50, name: 'LinearFeatureDisplayMouseoverReaction' }));
|
|
286
|
-
},
|
|
287
|
-
}))
|
|
288
|
-
.postProcessSnapshot(snap => {
|
|
289
|
-
if (!snap) {
|
|
290
|
-
return snap;
|
|
291
|
-
}
|
|
292
|
-
const { trackShowLabels, trackShowDescriptions, trackDisplayMode, trackMaxHeight, jexlFiltersSetting, ...rest } = snap;
|
|
293
|
-
return {
|
|
294
|
-
...rest,
|
|
295
|
-
...(trackShowLabels !== undefined ? { trackShowLabels } : {}),
|
|
296
|
-
...(trackShowDescriptions !== undefined
|
|
297
|
-
? { trackShowDescriptions }
|
|
298
|
-
: {}),
|
|
299
|
-
...(trackDisplayMode !== undefined ? { trackDisplayMode } : {}),
|
|
300
|
-
...(trackMaxHeight !== undefined ? { trackMaxHeight } : {}),
|
|
301
|
-
...(jexlFiltersSetting?.length ? { jexlFiltersSetting } : {}),
|
|
302
|
-
};
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
export default stateModelFactory;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function ErrorBox({ error, width, height, }) {
|
|
3
|
-
return (_jsxs(_Fragment, { children: [_jsx("rect", { x: 0, y: 0, width: width, height: height, fill: "#ffdddd" }), _jsx("text", { x: 10, y: height / 2, fill: "#cc0000", fontSize: 14, children: `${error}` })] }));
|
|
4
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '../index.ts';
|
|
2
|
-
import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
3
|
-
type LGV = LinearGenomeViewModel;
|
|
4
|
-
declare const ImportFormRefNameAutocomplete: ({ model, selectedAsm, value, setValue, setOption, }: {
|
|
5
|
-
value: string;
|
|
6
|
-
setValue: (arg: string) => void;
|
|
7
|
-
model: LGV;
|
|
8
|
-
selectedAsm: string;
|
|
9
|
-
setOption: (arg: BaseResult) => void;
|
|
10
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default ImportFormRefNameAutocomplete;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getSession } from '@jbrowse/core/util';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
|
-
import RefNameAutocomplete from "./RefNameAutocomplete/index.js";
|
|
5
|
-
import { fetchResults } from "./util.js";
|
|
6
|
-
const ImportFormRefNameAutocomplete = observer(function ImportFormRefNameAutocomplete({ model, selectedAsm, value, setValue, setOption, }) {
|
|
7
|
-
const session = getSession(model);
|
|
8
|
-
const { assemblyManager, textSearchManager } = session;
|
|
9
|
-
const { rankSearchResults } = model;
|
|
10
|
-
const searchScope = model.searchScope(selectedAsm);
|
|
11
|
-
const assembly = assemblyManager.get(selectedAsm);
|
|
12
|
-
return (_jsx(RefNameAutocomplete, { fetchResults: queryString => fetchResults({
|
|
13
|
-
queryString,
|
|
14
|
-
assembly,
|
|
15
|
-
textSearchManager,
|
|
16
|
-
rankSearchResults,
|
|
17
|
-
searchScope,
|
|
18
|
-
}), model: model, assemblyName: selectedAsm, value: value, minWidth: 270, onChange: str => {
|
|
19
|
-
setValue(str);
|
|
20
|
-
}, onSelect: val => {
|
|
21
|
-
setOption(val);
|
|
22
|
-
}, TextFieldProps: {
|
|
23
|
-
variant: 'outlined',
|
|
24
|
-
helperText: 'Enter sequence name, feature name, or location',
|
|
25
|
-
} }));
|
|
26
|
-
});
|
|
27
|
-
export default ImportFormRefNameAutocomplete;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AutocompleteRenderInputParams, TextFieldProps as TFP } from '@mui/material';
|
|
2
|
-
export default function AutocompleteTextField({ TextFieldProps, params, }: {
|
|
3
|
-
TextFieldProps: TFP;
|
|
4
|
-
params: AutocompleteRenderInputParams;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { TextField } from '@mui/material';
|
|
3
|
-
export default function AutocompleteTextField({ TextFieldProps, params, }) {
|
|
4
|
-
const { helperText, slotProps = {} } = TextFieldProps;
|
|
5
|
-
const { ref: inputRef, ...restInputProps } = params.InputProps;
|
|
6
|
-
const { InputProps: _InputProps, ...restParams } = params;
|
|
7
|
-
return (_jsx(TextField, { ...restParams, ...TextFieldProps, inputRef: inputRef, size: "small", helperText: helperText, slotProps: {
|
|
8
|
-
input: {
|
|
9
|
-
...restInputProps,
|
|
10
|
-
...slotProps.input,
|
|
11
|
-
},
|
|
12
|
-
}, placeholder: "Search for location" }));
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense, lazy, useState } from 'react';
|
|
3
|
-
import HelpIcon from '@mui/icons-material/Help';
|
|
4
|
-
import SearchIcon from '@mui/icons-material/Search';
|
|
5
|
-
import { IconButton, InputAdornment } from '@mui/material';
|
|
6
|
-
const HelpDialog = lazy(() => import("./HelpDialog.js"));
|
|
7
|
-
function HelpAdornment() {
|
|
8
|
-
const [isHelpDialogDisplayed, setHelpDialogDisplayed] = useState(false);
|
|
9
|
-
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => {
|
|
10
|
-
setHelpDialogDisplayed(true);
|
|
11
|
-
}, size: "small", children: _jsx(HelpIcon, { fontSize: "small" }) }), isHelpDialogDisplayed ? (_jsx(Suspense, { fallback: null, children: _jsx(HelpDialog, { handleClose: () => {
|
|
12
|
-
setHelpDialogDisplayed(false);
|
|
13
|
-
} }) })) : null] }));
|
|
14
|
-
}
|
|
15
|
-
export default function EndAdornment({ showHelp }) {
|
|
16
|
-
return (_jsx(_Fragment, { children: _jsxs(InputAdornment, { position: "end", style: { marginRight: 7 }, children: [_jsx(SearchIcon, { fontSize: "small" }), showHelp ? _jsx(HelpAdornment, {}) : null] }) }));
|
|
17
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
-
import { Button, DialogActions, DialogContent, Divider } from '@mui/material';
|
|
4
|
-
export default function HelpDialog({ handleClose, }) {
|
|
5
|
-
return (_jsxs(Dialog, { open: true, maxWidth: "xl", onClose: handleClose, title: "Using the search box", children: [_jsxs(DialogContent, { children: [_jsx("h3", { children: "Searching" }), _jsxs("ul", { children: [_jsx("li", { children: "Jump to a feature or reference sequence by typing its name in the location box and pressing Enter." }), _jsxs("li", { children: ["Jump to a specific region by typing the region into the location box as: ", _jsx("code", { children: "ref:start..end" }), " or ", _jsx("code", { children: "ref:start-end" }), ". Commas are allowed in the start and end coordinates. A space-separated list of locstrings can be used to open up multiple chromosomes at a time"] })] }), _jsx("h3", { children: "Example Searches" }), _jsxs("ul", { children: [_jsxs("li", { children: [_jsx("code", { children: "BRCA" }), " - searches for the feature named BRCA"] }), _jsxs("li", { children: [_jsx("code", { children: "chr4" }), " - jumps to chromosome 4"] }), _jsxs("li", { children: [_jsx("code", { children: "chr4:79,500,000..80,000,000" }), " - jumps the region on chromosome 4 between 79.5Mb and 80Mb."] }), _jsxs("li", { children: [_jsx("code", { children: "chr1:1-100 chr2:1-100" }), " - create a split view of chr1:1-100 and chr2:1-100"] }), _jsxs("li", { children: [_jsx("code", { children: "chr1 chr2 chr3" }), " - open up multiple chromosomes at once"] }), _jsxs("li", { children: [_jsx("code", { children: "chr1:1-100[rev] chr2:1-100" }), " - open up the first region in the horizontally flipped orientation"] }), _jsxs("li", { children: [_jsx("code", { children: "chr1 100 200" }), " - use whitespace separated refname, start, end"] })] })] }), _jsx(Divider, {}), _jsx(DialogActions, { children: _jsx(Button, { onClick: () => {
|
|
6
|
-
handleClose();
|
|
7
|
-
}, color: "primary", children: "Close" }) })] }));
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
-
import type { LinearGenomeViewModel } from '../../model.ts';
|
|
3
|
-
import type { TextFieldProps as TFP } from '@mui/material';
|
|
4
|
-
declare const RefNameAutocomplete: ({ model, onSelect, assemblyName, style, fetchResults, onChange, value, minWidth, maxWidth, TextFieldProps, }: {
|
|
5
|
-
model: LinearGenomeViewModel;
|
|
6
|
-
onSelect?: (region: BaseResult) => void;
|
|
7
|
-
onChange?: (val: string) => void;
|
|
8
|
-
assemblyName?: string;
|
|
9
|
-
value?: string;
|
|
10
|
-
fetchResults: (query: string) => Promise<BaseResult[]>;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
minWidth?: number;
|
|
13
|
-
maxWidth?: number;
|
|
14
|
-
TextFieldProps?: TFP;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export default RefNameAutocomplete;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import BaseResult, { RefSequenceResult, } from '@jbrowse/core/TextSearch/BaseResults';
|
|
4
|
-
import { getSession, measureText, useDebounce } from '@jbrowse/core/util';
|
|
5
|
-
import { Autocomplete } from '@mui/material';
|
|
6
|
-
import { observer } from 'mobx-react';
|
|
7
|
-
import AutocompleteTextField from "./AutocompleteTextField.js";
|
|
8
|
-
import { getDeduplicatedResult, getFiltered } from "./util.js";
|
|
9
|
-
const RefNameAutocomplete = observer(function RefNameAutocomplete({ model, onSelect, assemblyName, style, fetchResults, onChange, value, minWidth = 200, maxWidth = 550, TextFieldProps = {}, }) {
|
|
10
|
-
const session = getSession(model);
|
|
11
|
-
const { assemblyManager } = session;
|
|
12
|
-
const [open, setOpen] = useState(false);
|
|
13
|
-
const [loaded, setLoaded] = useState(true);
|
|
14
|
-
const [inputValue, setInputValue] = useState('');
|
|
15
|
-
const [searchQuery, setSearchQuery] = useState('');
|
|
16
|
-
const [searchOptions, setSearchOptions] = useState();
|
|
17
|
-
const debouncedSearch = useDebounce(searchQuery, 50);
|
|
18
|
-
const assembly = assemblyName ? assemblyManager.get(assemblyName) : undefined;
|
|
19
|
-
const { coarseVisibleLocStrings, hasDisplayedRegions } = model;
|
|
20
|
-
const fetchResultsRef = useRef(fetchResults);
|
|
21
|
-
fetchResultsRef.current = fetchResults;
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
const isCurrent = { cancelled: false };
|
|
24
|
-
(async () => {
|
|
25
|
-
try {
|
|
26
|
-
if (debouncedSearch === '' || !assemblyName) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
setLoaded(false);
|
|
30
|
-
const results = await fetchResultsRef.current(debouncedSearch);
|
|
31
|
-
if (!isCurrent.cancelled) {
|
|
32
|
-
setSearchOptions(getDeduplicatedResult(results));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
console.error(e);
|
|
37
|
-
if (!isCurrent.cancelled) {
|
|
38
|
-
session.notifyError(`${e}`, e);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
finally {
|
|
42
|
-
if (!isCurrent.cancelled) {
|
|
43
|
-
setLoaded(true);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
})();
|
|
47
|
-
return () => {
|
|
48
|
-
isCurrent.cancelled = true;
|
|
49
|
-
};
|
|
50
|
-
}, [assemblyName, debouncedSearch, session]);
|
|
51
|
-
const inputBoxVal = coarseVisibleLocStrings || value || '';
|
|
52
|
-
const regions = assembly?.regions;
|
|
53
|
-
const regionOptions = useMemo(() => regions?.map(region => ({
|
|
54
|
-
result: new RefSequenceResult({
|
|
55
|
-
refName: region.refName,
|
|
56
|
-
label: region.refName,
|
|
57
|
-
displayString: region.refName,
|
|
58
|
-
matchedAttribute: 'refName',
|
|
59
|
-
}),
|
|
60
|
-
})) || [], [regions]);
|
|
61
|
-
return (_jsx(Autocomplete, { "data-testid": "autocomplete", disableListWrap: true, disableClearable: true, disabled: !assemblyName, freeSolo: true, includeInputInList: true, selectOnFocus: true, style: {
|
|
62
|
-
...style,
|
|
63
|
-
width: Math.min(Math.max(measureText(inputBoxVal, 14) + 100, minWidth), maxWidth),
|
|
64
|
-
}, value: inputBoxVal, loading: !loaded, inputValue: inputValue, onInputChange: (_event, newInputValue, reason) => {
|
|
65
|
-
setInputValue(newInputValue);
|
|
66
|
-
if (reason === 'input') {
|
|
67
|
-
setSearchQuery(newInputValue);
|
|
68
|
-
onChange?.(newInputValue);
|
|
69
|
-
}
|
|
70
|
-
else if (reason === 'selectOption' || reason === 'clear') {
|
|
71
|
-
onChange?.(newInputValue);
|
|
72
|
-
setSearchQuery('');
|
|
73
|
-
}
|
|
74
|
-
else if (reason === 'blur') {
|
|
75
|
-
setSearchQuery('');
|
|
76
|
-
}
|
|
77
|
-
}, loadingText: "loading results", open: open, onOpen: () => {
|
|
78
|
-
setOpen(true);
|
|
79
|
-
}, onClose: () => {
|
|
80
|
-
setOpen(false);
|
|
81
|
-
setLoaded(true);
|
|
82
|
-
if (hasDisplayedRegions) {
|
|
83
|
-
setSearchQuery('');
|
|
84
|
-
setSearchOptions(undefined);
|
|
85
|
-
}
|
|
86
|
-
}, onChange: (_event, selectedOption) => {
|
|
87
|
-
if (!selectedOption || !assemblyName) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (typeof selectedOption === 'string') {
|
|
91
|
-
onSelect?.(new BaseResult({
|
|
92
|
-
label: selectedOption,
|
|
93
|
-
}));
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
onSelect?.(selectedOption.result);
|
|
97
|
-
}
|
|
98
|
-
setInputValue(inputBoxVal);
|
|
99
|
-
}, options: searchOptions?.length ? searchOptions : regionOptions, getOptionDisabled: option => option.group === 'limitOption', filterOptions: opts => getFiltered(opts, searchQuery), renderInput: params => (_jsx(AutocompleteTextField, { params: params, TextFieldProps: TextFieldProps })), getOptionLabel: opt => typeof opt === 'string' ? opt : opt.result.getDisplayString() }));
|
|
100
|
-
});
|
|
101
|
-
export default RefNameAutocomplete;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
-
export interface Option {
|
|
3
|
-
group?: string;
|
|
4
|
-
result: BaseResult;
|
|
5
|
-
}
|
|
6
|
-
export declare function getFiltered(opts: Option[], inputValue: string): Option[];
|
|
7
|
-
export declare function aggregateResults(results: BaseResult[]): Record<string, BaseResult[]>;
|
|
8
|
-
export declare function getDeduplicatedResult(results: BaseResult[]): {
|
|
9
|
-
result: BaseResult;
|
|
10
|
-
}[];
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
-
function filterOptions(options, searchQuery) {
|
|
3
|
-
return options.filter(({ result }) => result.getLabel().toLowerCase().includes(searchQuery) ||
|
|
4
|
-
result.matchedObject);
|
|
5
|
-
}
|
|
6
|
-
export function getFiltered(opts, inputValue) {
|
|
7
|
-
const filtered = filterOptions(opts, inputValue.toLocaleLowerCase());
|
|
8
|
-
return [
|
|
9
|
-
...filtered.slice(0, 100),
|
|
10
|
-
...(filtered.length > 100
|
|
11
|
-
? [
|
|
12
|
-
{
|
|
13
|
-
group: 'limitOption',
|
|
14
|
-
result: new BaseResult({
|
|
15
|
-
label: 'keep typing for more results',
|
|
16
|
-
}),
|
|
17
|
-
},
|
|
18
|
-
]
|
|
19
|
-
: []),
|
|
20
|
-
];
|
|
21
|
-
}
|
|
22
|
-
export function aggregateResults(results) {
|
|
23
|
-
const m = {};
|
|
24
|
-
for (const result of results) {
|
|
25
|
-
const displayString = result.getDisplayString();
|
|
26
|
-
if (!m[displayString]) {
|
|
27
|
-
m[displayString] = [];
|
|
28
|
-
}
|
|
29
|
-
m[displayString].push(result);
|
|
30
|
-
}
|
|
31
|
-
return m;
|
|
32
|
-
}
|
|
33
|
-
export function getDeduplicatedResult(results) {
|
|
34
|
-
return Object.entries(aggregateResults(results)).map(([displayString, results]) => results.length === 1
|
|
35
|
-
? {
|
|
36
|
-
result: results[0],
|
|
37
|
-
}
|
|
38
|
-
: {
|
|
39
|
-
result: new BaseResult({
|
|
40
|
-
displayString,
|
|
41
|
-
results,
|
|
42
|
-
label: displayString,
|
|
43
|
-
}),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface Offset {
|
|
2
|
-
coord: number;
|
|
3
|
-
refName?: string;
|
|
4
|
-
oob?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export default function RubberbandSpan({ leftBpOffset, rightBpOffset, numOfBpSelected, left, width, top, sticky, }: {
|
|
7
|
-
leftBpOffset: Offset;
|
|
8
|
-
rightBpOffset: Offset;
|
|
9
|
-
numOfBpSelected?: number;
|
|
10
|
-
left: number;
|
|
11
|
-
width: number;
|
|
12
|
-
top?: number;
|
|
13
|
-
sticky?: boolean;
|
|
14
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { getBpDisplayStr, stringify } from '@jbrowse/core/util';
|
|
4
|
-
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
|
-
import { Typography, alpha } from '@mui/material';
|
|
6
|
-
import RubberbandTooltip from "./RubberbandTooltip.js";
|
|
7
|
-
const useStyles = makeStyles()(theme => {
|
|
8
|
-
const { tertiary } = theme.palette;
|
|
9
|
-
const background = alpha(tertiary.light, 0.7);
|
|
10
|
-
return {
|
|
11
|
-
rubberband: {
|
|
12
|
-
height: '100%',
|
|
13
|
-
background,
|
|
14
|
-
position: 'absolute',
|
|
15
|
-
left: 0,
|
|
16
|
-
zIndex: 830,
|
|
17
|
-
textAlign: 'center',
|
|
18
|
-
cursor: 'crosshair',
|
|
19
|
-
},
|
|
20
|
-
rubberbandText: {
|
|
21
|
-
color: theme.palette.tertiary.contrastText,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
export default function RubberbandSpan({ leftBpOffset, rightBpOffset, numOfBpSelected, left, width, top = 0, sticky = false, }) {
|
|
26
|
-
const { classes } = useStyles();
|
|
27
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
28
|
-
return (_jsxs(_Fragment, { children: [anchorEl ? (_jsxs(_Fragment, { children: [_jsx(RubberbandTooltip, { side: "left", anchorEl: anchorEl, text: stringify(leftBpOffset) }), _jsx(RubberbandTooltip, { side: "right", anchorEl: anchorEl, text: stringify(rightBpOffset) })] })) : null, _jsx("div", { className: classes.rubberband, style: { transform: `translateX(${left}px)`, width }, children: numOfBpSelected ? (_jsx(Typography, { ref: setAnchorEl, variant: "h6", className: classes.rubberbandText, style: {
|
|
29
|
-
top,
|
|
30
|
-
position: sticky ? 'sticky' : undefined,
|
|
31
|
-
}, children: getBpDisplayStr(numOfBpSelected) })) : null })] }));
|
|
32
|
-
}
|