@jbrowse/plugin-linear-genome-view 3.7.0 → 4.0.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/BaseLinearDisplay/SVGLegend.d.ts +6 -0
- package/esm/BaseLinearDisplay/SVGLegend.js +17 -0
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +2 -0
- package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +11 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +3 -3
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +12 -8
- package/esm/BaseLinearDisplay/components/Block.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +2 -2
- package/esm/BaseLinearDisplay/components/BlockMsg.js +9 -2
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +9 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +42 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +11 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +40 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +19 -0
- package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +45 -0
- package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +5 -0
- package/esm/BaseLinearDisplay/components/FloatingLabels.js +89 -0
- package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +8 -0
- package/esm/BaseLinearDisplay/components/FloatingLegend.js +43 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +1 -1
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +4 -6
- package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/LoadingOverlay.js +49 -0
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +3 -2
- package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +5 -3
- package/esm/BaseLinearDisplay/components/MenuPage.d.ts +2 -2
- package/esm/BaseLinearDisplay/components/MenuPage.js +1 -1
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +19 -0
- package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +48 -0
- package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +4 -1
- package/esm/BaseLinearDisplay/components/RenderedBlocks.js +4 -4
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -4
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +5 -8
- package/esm/BaseLinearDisplay/components/TooLargeMessage.js +3 -3
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +1 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js +6 -6
- package/esm/BaseLinearDisplay/components/util.d.ts +21 -0
- package/esm/BaseLinearDisplay/components/util.js +116 -0
- package/esm/BaseLinearDisplay/index.d.ts +17 -8
- package/esm/BaseLinearDisplay/index.js +13 -6
- package/esm/BaseLinearDisplay/model.d.ts +954 -101
- package/esm/BaseLinearDisplay/model.js +211 -88
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +5 -5
- package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +11 -14
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +21 -0
- package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +46 -0
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +3 -3
- package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +2 -3
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +1 -1
- package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +2 -3
- package/esm/BaseLinearDisplay/models/calculateLabelPositions.d.ts +24 -0
- package/esm/BaseLinearDisplay/models/calculateLabelPositions.js +60 -0
- package/esm/BaseLinearDisplay/models/configSchema.d.ts +2 -2
- package/esm/BaseLinearDisplay/models/configSchema.js +2 -2
- package/esm/BaseLinearDisplay/models/renderSvg.d.ts +3 -7
- package/esm/BaseLinearDisplay/models/renderSvg.js +22 -11
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +37 -19
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +151 -135
- package/esm/BaseLinearDisplay/models/util.d.ts +4 -4
- package/esm/BaseLinearDisplay/models/util.js +16 -13
- package/esm/BaseLinearDisplay/renderSvg.d.ts +3 -0
- package/esm/BaseLinearDisplay/renderSvg.js +59 -0
- package/esm/BaseLinearDisplay/types.d.ts +47 -0
- package/esm/BaseLinearDisplay/types.js +3 -0
- package/esm/BaseLinearDisplay/util.d.ts +15 -0
- package/esm/BaseLinearDisplay/util.js +61 -0
- package/esm/BasicTrack/configSchema.d.ts +16 -11
- package/esm/BasicTrack/index.js +1 -1
- package/esm/FeatureTrack/configSchema.d.ts +16 -11
- package/esm/FeatureTrack/index.js +1 -1
- package/esm/LaunchLinearGenomeView/index.js +12 -62
- package/esm/LinearBareDisplay/configSchema.d.ts +4 -4
- package/esm/LinearBareDisplay/configSchema.js +1 -1
- package/esm/LinearBareDisplay/index.d.ts +2 -2
- package/esm/LinearBareDisplay/index.js +5 -5
- package/esm/LinearBareDisplay/model.d.ts +957 -105
- package/esm/LinearBareDisplay/model.js +3 -6
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +5 -0
- package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +9 -0
- package/esm/LinearBasicDisplay/configSchema.d.ts +4 -4
- package/esm/LinearBasicDisplay/configSchema.js +1 -1
- package/esm/LinearBasicDisplay/index.d.ts +2 -2
- package/esm/LinearBasicDisplay/index.js +6 -6
- package/esm/LinearBasicDisplay/model.d.ts +1132 -135
- package/esm/LinearBasicDisplay/model.js +116 -116
- package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/AddFiltersDialog.js +2 -2
- package/esm/{LinearBasicDisplay → LinearFeatureDisplay}/components/SetMaxHeightDialog.js +3 -3
- package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/configSchema.d.ts +4 -4
- package/esm/LinearFeatureDisplay/configSchema.js +11 -0
- package/esm/LinearFeatureDisplay/index.d.ts +3 -0
- package/esm/LinearFeatureDisplay/index.js +2 -0
- package/esm/LinearFeatureDisplay/model.d.ts +1415 -0
- package/esm/LinearFeatureDisplay/model.js +265 -0
- package/esm/LinearGenomeView/SVGErrorBox.d.ts +5 -0
- package/esm/LinearGenomeView/SVGErrorBox.js +4 -0
- package/esm/LinearGenomeView/afterAttach.d.ts +5 -0
- package/esm/LinearGenomeView/afterAttach.js +95 -0
- package/esm/LinearGenomeView/components/CenterLine.js +6 -4
- package/esm/LinearGenomeView/components/Cytobands.js +4 -4
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +5 -1
- package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +8 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +13 -16
- package/esm/LinearGenomeView/components/Gridlines.js +18 -15
- package/esm/LinearGenomeView/components/Header.js +9 -9
- package/esm/LinearGenomeView/components/HeaderPanControls.js +2 -2
- package/esm/LinearGenomeView/components/HeaderRegionWidth.js +4 -5
- package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +2 -2
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +3 -3
- package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/Highlight.js +6 -6
- package/esm/LinearGenomeView/components/ImportForm.d.ts +1 -1
- package/esm/LinearGenomeView/components/ImportForm.js +14 -12
- package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +3 -3
- package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -7
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +7 -8
- package/esm/LinearGenomeView/components/MiniControls.js +6 -6
- package/esm/LinearGenomeView/components/NoTracksActiveButton.js +2 -2
- package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +1 -1
- package/esm/LinearGenomeView/components/OverviewHighlight.js +5 -5
- package/esm/LinearGenomeView/components/OverviewRubberband.js +4 -4
- package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +9 -5
- package/esm/LinearGenomeView/components/OverviewScalebar.js +36 -28
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +5 -5
- package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +7 -7
- package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -1
- package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +10 -10
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +6 -4
- package/esm/LinearGenomeView/components/Rubberband.js +9 -7
- package/esm/LinearGenomeView/components/RubberbandSpan.js +4 -5
- package/esm/LinearGenomeView/components/Scalebar.js +8 -10
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +50 -17
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +13 -11
- package/esm/LinearGenomeView/components/SearchBox.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchBox.js +8 -9
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +2 -2
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +1 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.js +4 -6
- package/esm/LinearGenomeView/components/SequenceSearchDialog.js +5 -5
- package/esm/LinearGenomeView/components/TrackContainer.js +25 -17
- package/esm/LinearGenomeView/components/TrackLabel.js +10 -11
- package/esm/LinearGenomeView/components/TrackLabelContainer.js +7 -8
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +1 -1
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +80 -68
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +5 -5
- package/esm/LinearGenomeView/components/TracksContainer.js +18 -15
- package/esm/LinearGenomeView/components/VerticalGuide.js +5 -3
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -2
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +27 -2
- package/esm/LinearGenomeView/components/useRangeSelect.js +19 -9
- package/esm/LinearGenomeView/components/useWheelScroll.js +22 -12
- package/esm/LinearGenomeView/components/util.d.ts +2 -13
- package/esm/LinearGenomeView/components/util.js +12 -31
- package/esm/LinearGenomeView/index.d.ts +1 -1
- package/esm/LinearGenomeView/index.js +3 -3
- package/esm/LinearGenomeView/keyboardHandler.d.ts +2 -0
- package/esm/LinearGenomeView/keyboardHandler.js +29 -0
- package/esm/LinearGenomeView/menuItems.d.ts +7 -0
- package/esm/LinearGenomeView/menuItems.js +299 -0
- package/esm/LinearGenomeView/model.d.ts +92 -89
- package/esm/LinearGenomeView/model.js +166 -414
- package/esm/LinearGenomeView/svgExportUtil.d.ts +9 -0
- package/esm/LinearGenomeView/svgExportUtil.js +6 -0
- package/{dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts → esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts} +2 -2
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +20 -0
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +5 -5
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +4 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +24 -12
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +13 -5
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +2 -2
- package/esm/LinearGenomeView/types.d.ts +5 -1
- package/esm/LinearGenomeView/util.d.ts +2 -2
- package/esm/LinearGenomeView/util.js +7 -5
- package/esm/index.d.ts +973 -107
- package/esm/index.js +37 -38
- package/esm/searchUtils.d.ts +1 -1
- package/esm/searchUtils.js +6 -4
- package/package.json +28 -33
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -57
- package/dist/BaseLinearDisplay/components/Block.d.ts +0 -14
- package/dist/BaseLinearDisplay/components/Block.js +0 -50
- package/dist/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
- package/dist/BaseLinearDisplay/components/BlockErrorMessage.js +0 -27
- package/dist/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
- package/dist/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -26
- package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
- package/dist/BaseLinearDisplay/components/BlockMsg.js +0 -22
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -28
- package/dist/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -3
- package/dist/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -27
- package/dist/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
- package/dist/BaseLinearDisplay/components/MenuPage.js +0 -26
- package/dist/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -9
- package/dist/BaseLinearDisplay/components/RenderedBlocks.js +0 -27
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -11
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -59
- package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
- package/dist/BaseLinearDisplay/components/TooLargeMessage.js +0 -25
- package/dist/BaseLinearDisplay/components/Tooltip.d.ts +0 -12
- package/dist/BaseLinearDisplay/components/Tooltip.js +0 -27
- package/dist/BaseLinearDisplay/components/types.d.ts +0 -1
- package/dist/BaseLinearDisplay/components/types.js +0 -2
- package/dist/BaseLinearDisplay/index.d.ts +0 -8
- package/dist/BaseLinearDisplay/index.js +0 -20
- package/dist/BaseLinearDisplay/model.d.ts +0 -324
- package/dist/BaseLinearDisplay/model.js +0 -340
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
- package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -122
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
- package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +0 -35
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
- package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -33
- package/dist/BaseLinearDisplay/models/configSchema.d.ts +0 -29
- package/dist/BaseLinearDisplay/models/configSchema.js +0 -35
- package/dist/BaseLinearDisplay/models/renderSvg.d.ts +0 -7
- package/dist/BaseLinearDisplay/models/renderSvg.js +0 -80
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -78
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -229
- package/dist/BaseLinearDisplay/models/util.d.ts +0 -22
- package/dist/BaseLinearDisplay/models/util.js +0 -45
- package/dist/BasicTrack/configSchema.d.ts +0 -80
- package/dist/BasicTrack/configSchema.js +0 -10
- package/dist/BasicTrack/index.d.ts +0 -2
- package/dist/BasicTrack/index.js +0 -18
- package/dist/FeatureTrack/configSchema.d.ts +0 -80
- package/dist/FeatureTrack/configSchema.js +0 -10
- package/dist/FeatureTrack/index.d.ts +0 -2
- package/dist/FeatureTrack/index.js +0 -19
- package/dist/LaunchLinearGenomeView/index.d.ts +0 -2
- package/dist/LaunchLinearGenomeView/index.js +0 -70
- package/dist/LinearBareDisplay/configSchema.d.ts +0 -32
- package/dist/LinearBareDisplay/configSchema.js +0 -13
- package/dist/LinearBareDisplay/index.d.ts +0 -4
- package/dist/LinearBareDisplay/index.js +0 -26
- package/dist/LinearBareDisplay/model.d.ts +0 -324
- package/dist/LinearBareDisplay/model.js +0 -38
- package/dist/LinearBasicDisplay/components/AddFiltersDialog.js +0 -61
- package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.js +0 -28
- package/dist/LinearBasicDisplay/configSchema.js +0 -13
- package/dist/LinearBasicDisplay/index.d.ts +0 -4
- package/dist/LinearBasicDisplay/index.js +0 -29
- package/dist/LinearBasicDisplay/model.d.ts +0 -361
- package/dist/LinearBasicDisplay/model.js +0 -192
- package/dist/LinearGenomeView/components/CenterLine.d.ts +0 -6
- package/dist/LinearGenomeView/components/CenterLine.js +0 -38
- package/dist/LinearGenomeView/components/Cytobands.d.ts +0 -9
- package/dist/LinearGenomeView/components/Cytobands.js +0 -89
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +0 -7
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +0 -57
- package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +0 -6
- package/dist/LinearGenomeView/components/GetSequenceDialog.js +0 -109
- package/dist/LinearGenomeView/components/Gridlines.d.ts +0 -7
- package/dist/LinearGenomeView/components/Gridlines.js +0 -70
- package/dist/LinearGenomeView/components/Header.d.ts +0 -5
- package/dist/LinearGenomeView/components/Header.js +0 -38
- package/dist/LinearGenomeView/components/HeaderPanControls.d.ts +0 -6
- package/dist/LinearGenomeView/components/HeaderPanControls.js +0 -27
- package/dist/LinearGenomeView/components/HeaderRegionWidth.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderRegionWidth.js +0 -21
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.js +0 -19
- package/dist/LinearGenomeView/components/HeaderZoomControls.d.ts +0 -5
- package/dist/LinearGenomeView/components/HeaderZoomControls.js +0 -109
- package/dist/LinearGenomeView/components/Highlight.d.ts +0 -12
- package/dist/LinearGenomeView/components/Highlight.js +0 -95
- package/dist/LinearGenomeView/components/ImportForm.d.ts +0 -6
- package/dist/LinearGenomeView/components/ImportForm.js +0 -80
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
- package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -32
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +0 -5
- package/dist/LinearGenomeView/components/LinearGenomeView.js +0 -57
- package/dist/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +0 -5
- package/dist/LinearGenomeView/components/LinearGenomeViewContainer.js +0 -98
- package/dist/LinearGenomeView/components/MiniControls.d.ts +0 -5
- package/dist/LinearGenomeView/components/MiniControls.js +0 -36
- package/dist/LinearGenomeView/components/NoTracksActiveButton.d.ts +0 -5
- package/dist/LinearGenomeView/components/NoTracksActiveButton.js +0 -23
- package/dist/LinearGenomeView/components/OverviewHighlight.d.ts +0 -8
- package/dist/LinearGenomeView/components/OverviewHighlight.js +0 -50
- package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +0 -9
- package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -113
- package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +0 -10
- package/dist/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +0 -28
- package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +0 -7
- package/dist/LinearGenomeView/components/OverviewScalebar.js +0 -146
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +0 -8
- package/dist/LinearGenomeView/components/OverviewScalebarPolygon.js +0 -41
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +0 -10
- package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.js +0 -37
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -8
- package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -18
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
- package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -56
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
- package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -11
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
- package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -127
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
- package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -53
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +0 -6
- package/dist/LinearGenomeView/components/RegionWidthEditorDialog.js +0 -30
- package/dist/LinearGenomeView/components/Rubberband.d.ts +0 -7
- package/dist/LinearGenomeView/components/Rubberband.js +0 -35
- package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
- package/dist/LinearGenomeView/components/RubberbandSpan.js +0 -39
- package/dist/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
- package/dist/LinearGenomeView/components/RubberbandTooltip.js +0 -20
- package/dist/LinearGenomeView/components/Scalebar.d.ts +0 -10
- package/dist/LinearGenomeView/components/Scalebar.js +0 -40
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.js +0 -29
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -38
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +0 -6
- package/dist/LinearGenomeView/components/ScalebarRefNameLabels.js +0 -46
- package/dist/LinearGenomeView/components/SearchBox.d.ts +0 -6
- package/dist/LinearGenomeView/components/SearchBox.js +0 -88
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -9
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +0 -15
- package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +0 -8
- package/dist/LinearGenomeView/components/SearchResultsTable.js +0 -74
- package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +0 -8
- package/dist/LinearGenomeView/components/SequenceSearchDialog.js +0 -67
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackContainer.js +0 -55
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +0 -7
- package/dist/LinearGenomeView/components/TrackLabel.js +0 -49
- package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackLabelContainer.js +0 -31
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.d.ts +0 -8
- package/dist/LinearGenomeView/components/TrackLabelDragHandle.js +0 -32
- package/dist/LinearGenomeView/components/TrackLabelMenu.d.ts +0 -5
- package/dist/LinearGenomeView/components/TrackLabelMenu.js +0 -93
- package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +0 -9
- package/dist/LinearGenomeView/components/TrackRenderingContainer.js +0 -50
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +0 -7
- package/dist/LinearGenomeView/components/TracksContainer.js +0 -84
- package/dist/LinearGenomeView/components/VerticalGuide.d.ts +0 -7
- package/dist/LinearGenomeView/components/VerticalGuide.js +0 -31
- package/dist/LinearGenomeView/components/fetchSequence.d.ts +0 -4
- package/dist/LinearGenomeView/components/fetchSequence.js +0 -29
- package/dist/LinearGenomeView/components/useRangeSelect.d.ts +0 -59
- package/dist/LinearGenomeView/components/useRangeSelect.js +0 -127
- package/dist/LinearGenomeView/components/useSideScroll.d.ts +0 -6
- package/dist/LinearGenomeView/components/useSideScroll.js +0 -60
- package/dist/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
- package/dist/LinearGenomeView/components/useWheelScroll.js +0 -62
- package/dist/LinearGenomeView/components/util.d.ts +0 -25
- package/dist/LinearGenomeView/components/util.js +0 -49
- package/dist/LinearGenomeView/consts.d.ts +0 -7
- package/dist/LinearGenomeView/consts.js +0 -10
- package/dist/LinearGenomeView/index.d.ts +0 -3
- package/dist/LinearGenomeView/index.js +0 -53
- package/dist/LinearGenomeView/model.d.ts +0 -268
- package/dist/LinearGenomeView/model.js +0 -1109
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
- package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +0 -10
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +0 -47
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +0 -6
- package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -42
- package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -8
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +0 -39
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +0 -17
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +0 -7
- package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -14
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +0 -21
- package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +0 -32
- package/dist/LinearGenomeView/svgcomponents/util.d.ts +0 -8
- package/dist/LinearGenomeView/svgcomponents/util.js +0 -8
- package/dist/LinearGenomeView/types.d.ts +0 -43
- package/dist/LinearGenomeView/types.js +0 -2
- package/dist/LinearGenomeView/util.d.ts +0 -26
- package/dist/LinearGenomeView/util.js +0 -138
- package/dist/index.d.ts +0 -368
- package/dist/index.js +0 -120
- package/dist/searchUtils.d.ts +0 -26
- package/dist/searchUtils.js +0 -80
- package/esm/BaseLinearDisplay/components/BlockLoadingMessage.d.ts +0 -6
- package/esm/BaseLinearDisplay/components/BlockLoadingMessage.js +0 -24
- package/esm/LinearBasicDisplay/components/AddFiltersDialog.d.ts +0 -9
- package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +0 -8
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +0 -6
- package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.js +0 -36
- /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/AddFiltersDialog.d.ts +0 -0
- /package/{dist/LinearBasicDisplay → esm/LinearFeatureDisplay}/components/SetMaxHeightDialog.d.ts +0 -0
|
@@ -2,25 +2,25 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { getFillProps, getStrokeProps } from '@jbrowse/core/util';
|
|
3
3
|
import { alpha, useTheme } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
-
import { HEADER_BAR_HEIGHT } from
|
|
6
|
-
const OverviewScalebarPolygon = observer(function ({ model, overview, useOffset = true, }) {
|
|
5
|
+
import { HEADER_BAR_HEIGHT } from "../consts.js";
|
|
6
|
+
const OverviewScalebarPolygon = observer(function OverviewScalebarPolygon({ model, overview, useOffset = true, }) {
|
|
7
7
|
const theme = useTheme();
|
|
8
|
+
const polygonColor = theme.palette.tertiary.light;
|
|
8
9
|
const multiplier = Number(useOffset);
|
|
9
10
|
const { interRegionPaddingWidth, offsetPx, dynamicBlocks, cytobandOffset } = model;
|
|
10
11
|
const { contentBlocks, totalWidthPxWithoutBorders } = dynamicBlocks;
|
|
11
|
-
const polygonColor = theme.palette.tertiary.light;
|
|
12
12
|
if (!contentBlocks.length) {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
const first = contentBlocks.at(0);
|
|
16
16
|
const last = contentBlocks.at(-1);
|
|
17
17
|
const topLeft = (overview.bpToPx({
|
|
18
|
-
|
|
18
|
+
refName: first.refName,
|
|
19
19
|
coord: first.reversed ? first.end : first.start,
|
|
20
20
|
}) || 0) +
|
|
21
21
|
cytobandOffset * multiplier;
|
|
22
22
|
const topRight = (overview.bpToPx({
|
|
23
|
-
|
|
23
|
+
refName: last.refName,
|
|
24
24
|
coord: last.reversed ? last.start : last.end,
|
|
25
25
|
}) || 0) +
|
|
26
26
|
cytobandOffset * multiplier;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getSession, getTickDisplayStr } from '@jbrowse/core/util';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { Typography } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { chooseGridPitch } from '../util';
|
|
6
|
+
import { HEADER_OVERVIEW_HEIGHT } from "../consts.js";
|
|
7
|
+
import { chooseGridPitch } from "../util.js";
|
|
8
8
|
const useStyles = makeStyles()({
|
|
9
9
|
scalebarLabel: {
|
|
10
10
|
height: HEADER_OVERVIEW_HEIGHT,
|
|
11
11
|
position: 'absolute',
|
|
12
|
+
left: 0,
|
|
12
13
|
display: 'flex',
|
|
13
14
|
justifyContent: 'center',
|
|
14
15
|
pointerEvents: 'none',
|
|
15
16
|
},
|
|
16
17
|
});
|
|
17
|
-
const OverviewScalebarTickLabels = observer(function ({ block, scale, overview, model, }) {
|
|
18
|
+
const OverviewScalebarTickLabels = observer(function OverviewScalebarTickLabels({ block, scale, overview, model, }) {
|
|
18
19
|
const { classes } = useStyles();
|
|
19
20
|
const { start, end, reversed, refName, assemblyName } = block;
|
|
20
21
|
const { majorPitch } = chooseGridPitch(scale, 120, 15);
|
|
21
22
|
const { assemblyManager } = getSession(model);
|
|
22
23
|
const assembly = assemblyManager.get(assemblyName);
|
|
23
|
-
const refNameColor = assembly
|
|
24
|
+
const refNameColor = assembly?.getRefNameColor(refName);
|
|
24
25
|
const tickLabels = [];
|
|
25
26
|
for (let i = 0; i < Math.floor((end - start) / majorPitch); i++) {
|
|
26
27
|
const offsetLabel = (i + 1) * majorPitch;
|
|
27
28
|
tickLabels.push(reversed ? end - offsetLabel : start + offsetLabel);
|
|
28
29
|
}
|
|
29
30
|
return tickLabels.map((tickLabel, labelIdx) => (_jsx(Typography, { className: classes.scalebarLabel, variant: "body2", style: {
|
|
30
|
-
|
|
31
|
-
pointerEvents: 'none',
|
|
31
|
+
transform: `translateX(${((labelIdx + 1) * majorPitch) / scale}px)`,
|
|
32
32
|
color: refNameColor,
|
|
33
33
|
}, children: getTickDisplayStr(tickLabel, overview.bpPerPx) }, `${JSON.stringify(block)}-${tickLabel}-${labelIdx}`)));
|
|
34
34
|
});
|
|
@@ -3,7 +3,7 @@ import { Suspense, lazy, useState } from 'react';
|
|
|
3
3
|
import HelpIcon from '@mui/icons-material/Help';
|
|
4
4
|
import SearchIcon from '@mui/icons-material/Search';
|
|
5
5
|
import { IconButton, InputAdornment } from '@mui/material';
|
|
6
|
-
const HelpDialog = lazy(() => import(
|
|
6
|
+
const HelpDialog = lazy(() => import("./HelpDialog.js"));
|
|
7
7
|
function HelpAdornment() {
|
|
8
8
|
const [isHelpDialogDisplayed, setHelpDialogDisplayed] = useState(false);
|
|
9
9
|
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
-
import type { LinearGenomeViewModel } from '../../model';
|
|
2
|
+
import type { LinearGenomeViewModel } from '../../model.ts';
|
|
3
3
|
import type { TextFieldProps as TFP } from '@mui/material';
|
|
4
4
|
declare const RefNameAutocomplete: ({ model, onSelect, assemblyName, style, fetchResults, onChange, value, minWidth, maxWidth, TextFieldProps, }: {
|
|
5
5
|
model: LinearGenomeViewModel;
|
|
@@ -4,9 +4,9 @@ import BaseResult, { RefSequenceResult, } from '@jbrowse/core/TextSearch/BaseRes
|
|
|
4
4
|
import { getSession, measureText, useDebounce } from '@jbrowse/core/util';
|
|
5
5
|
import { Autocomplete } from '@mui/material';
|
|
6
6
|
import { observer } from 'mobx-react';
|
|
7
|
-
import AutocompleteTextField from
|
|
8
|
-
import { getDeduplicatedResult, getFiltered } from
|
|
9
|
-
const RefNameAutocomplete = observer(function ({ model, onSelect, assemblyName, style, fetchResults, onChange, value, minWidth = 200, maxWidth = 550, TextFieldProps = {}, }) {
|
|
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
10
|
const session = getSession(model);
|
|
11
11
|
const { assemblyManager } = session;
|
|
12
12
|
const [open, setOpen] = useState(false);
|
|
@@ -47,21 +47,21 @@ const RefNameAutocomplete = observer(function ({ model, onSelect, assemblyName,
|
|
|
47
47
|
};
|
|
48
48
|
}, [assemblyName, fetchResults, debouncedSearch, session]);
|
|
49
49
|
const inputBoxVal = coarseVisibleLocStrings || value || '';
|
|
50
|
-
const regions = assembly
|
|
51
|
-
const regionOptions = useMemo(() =>
|
|
50
|
+
const regions = assembly?.regions;
|
|
51
|
+
const regionOptions = useMemo(() => regions?.map(region => ({
|
|
52
52
|
result: new RefSequenceResult({
|
|
53
53
|
refName: region.refName,
|
|
54
54
|
label: region.refName,
|
|
55
55
|
displayString: region.refName,
|
|
56
56
|
matchedAttribute: 'refName',
|
|
57
57
|
}),
|
|
58
|
-
}))
|
|
58
|
+
})) || [], [regions]);
|
|
59
59
|
return (_jsx(Autocomplete, { "data-testid": "autocomplete", disableListWrap: true, disableClearable: true, disabled: !assemblyName, freeSolo: true, includeInputInList: true, selectOnFocus: true, style: {
|
|
60
60
|
...style,
|
|
61
61
|
width: Math.min(Math.max(measureText(inputBoxVal, 14) + 100, minWidth), maxWidth),
|
|
62
62
|
}, value: inputBoxVal, loading: !loaded, inputValue: inputValue, onInputChange: (_event, newInputValue) => {
|
|
63
63
|
setInputValue(newInputValue);
|
|
64
|
-
onChange
|
|
64
|
+
onChange?.(newInputValue);
|
|
65
65
|
}, loadingText: "loading results", open: open, onOpen: () => {
|
|
66
66
|
setOpen(true);
|
|
67
67
|
}, onClose: () => {
|
|
@@ -76,14 +76,14 @@ const RefNameAutocomplete = observer(function ({ model, onSelect, assemblyName,
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
if (typeof selectedOption === 'string') {
|
|
79
|
-
onSelect
|
|
79
|
+
onSelect?.(new BaseResult({
|
|
80
80
|
label: selectedOption,
|
|
81
81
|
}));
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
84
|
-
onSelect
|
|
84
|
+
onSelect?.(selectedOption.result);
|
|
85
85
|
}
|
|
86
86
|
setInputValue(inputBoxVal);
|
|
87
|
-
}, options:
|
|
87
|
+
}, options: searchOptions?.length ? searchOptions : regionOptions, getOptionDisabled: option => option.group === 'limitOption', filterOptions: (opts, { inputValue }) => getFiltered(opts, inputValue), renderInput: params => (_jsx(AutocompleteTextField, { params: params, inputBoxVal: inputBoxVal, TextFieldProps: TextFieldProps, setCurrentSearch: setCurrentSearch, setInputValue: setInputValue })), getOptionLabel: opt => typeof opt === 'string' ? opt : opt.result.getDisplayString() }));
|
|
88
88
|
});
|
|
89
89
|
export default RefNameAutocomplete;
|
|
@@ -4,12 +4,14 @@ import { Dialog } from '@jbrowse/core/ui';
|
|
|
4
4
|
import { toLocale } from '@jbrowse/core/util';
|
|
5
5
|
import { Button, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
|
|
6
6
|
import { observer } from 'mobx-react';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function format(n) {
|
|
8
|
+
return toLocale(Math.floor(n));
|
|
9
|
+
}
|
|
10
|
+
const RegionWidthEditorDialog = observer(function RegionWidthEditorDialog({ model, handleClose, }) {
|
|
9
11
|
const { bpPerPx, width } = model;
|
|
10
|
-
const [val, setVal] = useState(
|
|
12
|
+
const [val, setVal] = useState(format(bpPerPx * width));
|
|
11
13
|
useEffect(() => {
|
|
12
|
-
setVal(
|
|
14
|
+
setVal(format(bpPerPx * width));
|
|
13
15
|
}, [bpPerPx, width]);
|
|
14
16
|
const val2 = val.replace(/,/g, '');
|
|
15
17
|
return (_jsxs(Dialog, { title: "Edit zoom level", open: true, onClose: handleClose, children: [_jsxs(DialogContent, { style: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
import { Menu } from '@jbrowse/core/ui';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useRangeSelect } from './useRangeSelect';
|
|
6
|
+
import RubberbandSpan from "./RubberbandSpan.js";
|
|
7
|
+
import VerticalGuide from "./VerticalGuide.js";
|
|
8
|
+
import { useRangeSelect } from "./useRangeSelect.js";
|
|
9
9
|
const useStyles = makeStyles()({
|
|
10
10
|
rubberbandControl: {
|
|
11
11
|
cursor: 'crosshair',
|
|
@@ -14,15 +14,17 @@ const useStyles = makeStyles()({
|
|
|
14
14
|
zIndex: 825,
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
const Rubberband = observer(function ({ model, ControlComponent = _jsx("div", {}), }) {
|
|
17
|
+
const Rubberband = observer(function Rubberband({ model, ControlComponent = _jsx("div", {}), }) {
|
|
18
18
|
const ref = useRef(null);
|
|
19
19
|
const { classes } = useStyles();
|
|
20
20
|
const { stickyViewHeaders, rubberbandTop } = model;
|
|
21
|
-
const { guideX, rubberbandOn, leftBpOffset, rightBpOffset, numOfBpSelected, width, left, anchorPosition, open, handleMenuItemClick, handleClose, mouseMove, mouseDown, mouseOut, } = useRangeSelect(ref, model);
|
|
21
|
+
const { guideX, rubberbandOn, leftBpOffset, rightBpOffset, numOfBpSelected, width, left, anchorPosition, open, isClick, clickBpOffset, handleMenuItemClick, handleClose, mouseMove, mouseDown, mouseOut, } = useRangeSelect(ref, model);
|
|
22
22
|
return (_jsxs(_Fragment, { children: [guideX !== undefined ? (_jsx(VerticalGuide, { model: model, coordX: guideX })) : rubberbandOn ? (_jsx(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, numOfBpSelected: numOfBpSelected, width: width, left: left, top: rubberbandTop, sticky: stickyViewHeaders })) : null, anchorPosition ? (_jsx(Menu, { anchorReference: "anchorPosition", anchorPosition: {
|
|
23
23
|
left: anchorPosition.clientX,
|
|
24
24
|
top: anchorPosition.clientY,
|
|
25
|
-
}, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems:
|
|
25
|
+
}, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems: isClick && clickBpOffset
|
|
26
|
+
? model.rubberbandClickMenuItems(clickBpOffset)
|
|
27
|
+
: model.rubberBandMenuItems() })) : null, _jsx("div", { "data-testid": "rubberband_controls", className: classes.rubberbandControl, style: {
|
|
26
28
|
top: rubberbandTop,
|
|
27
29
|
position: stickyViewHeaders ? 'sticky' : undefined,
|
|
28
30
|
}, ref: ref, onMouseDown: mouseDown, onMouseMove: mouseMove, onMouseOut: mouseOut, children: ControlComponent })] }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { getBpDisplayStr, stringify } from '@jbrowse/core/util';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
4
5
|
import { Typography, alpha } from '@mui/material';
|
|
5
|
-
import
|
|
6
|
-
import RubberbandTooltip from './RubberbandTooltip';
|
|
6
|
+
import RubberbandTooltip from "./RubberbandTooltip.js";
|
|
7
7
|
const useStyles = makeStyles()(theme => {
|
|
8
8
|
const { tertiary } = theme.palette;
|
|
9
9
|
const background = alpha(tertiary.light, 0.7);
|
|
@@ -12,6 +12,7 @@ const useStyles = makeStyles()(theme => {
|
|
|
12
12
|
height: '100%',
|
|
13
13
|
background,
|
|
14
14
|
position: 'absolute',
|
|
15
|
+
left: 0,
|
|
15
16
|
zIndex: 830,
|
|
16
17
|
textAlign: 'center',
|
|
17
18
|
cursor: 'crosshair',
|
|
@@ -24,9 +25,7 @@ const useStyles = makeStyles()(theme => {
|
|
|
24
25
|
export default function RubberbandSpan({ leftBpOffset, rightBpOffset, numOfBpSelected, left, width, top = 0, sticky = false, }) {
|
|
25
26
|
const { classes } = useStyles();
|
|
26
27
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
27
|
-
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: { left
|
|
28
|
-
setAnchorEl(el);
|
|
29
|
-
}, variant: "h6", className: classes.rubberbandText, style: {
|
|
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: {
|
|
30
29
|
top,
|
|
31
30
|
position: sticky ? 'sticky' : undefined,
|
|
32
31
|
}, children: getBpDisplayStr(numOfBpSelected) })) : null })] }));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
+
import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { Paper } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import ScalebarRefNameLabels from './ScalebarRefNameLabels';
|
|
6
|
+
import Gridlines from "./Gridlines.js";
|
|
7
|
+
import ScalebarCoordinateLabels from "./ScalebarCoordinateLabels.js";
|
|
8
|
+
import ScalebarRefNameLabels from "./ScalebarRefNameLabels.js";
|
|
9
9
|
const useStyles = makeStyles()({
|
|
10
10
|
container: {
|
|
11
11
|
overflow: 'hidden',
|
|
@@ -21,15 +21,13 @@ const useStyles = makeStyles()({
|
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
const Scalebar = observer(forwardRef(function Scalebar2({ model, style, className, ...other }, ref) {
|
|
24
|
-
const { classes
|
|
25
|
-
const { staticBlocks, offsetPx
|
|
26
|
-
|
|
27
|
-
return (_jsxs(Paper, { "data-resizer": "true", className: cx(classes.container, className), variant: "outlined", ref: ref, style: style, ...other, children: [_jsx(Gridlines, { model: model, offset: 1 }), _jsx("div", { className: classes.zoomContainer, style: {
|
|
24
|
+
const { classes } = useStyles();
|
|
25
|
+
const { scaleFactor, staticBlocks, offsetPx } = model;
|
|
26
|
+
return (_jsxs(Paper, { "data-resizer": "true", className: cx(classes.container, className), variant: "outlined", ref: ref, style: { ...style, '--offset-px': `${offsetPx}px` }, ...other, children: [_jsx(Gridlines, { model: model, offset: 1 }), _jsx("div", { className: classes.zoomContainer, style: {
|
|
28
27
|
transform: scaleFactor !== 1 ? `scaleX(${scaleFactor})` : undefined,
|
|
29
28
|
}, children: _jsx("div", { className: classes.scalebar, style: {
|
|
30
|
-
|
|
29
|
+
transform: `translateX(calc(${staticBlocks.offsetPx}px - var(--offset-px) - 1px))`,
|
|
31
30
|
width: staticBlocks.totalWidthPx,
|
|
32
|
-
...style,
|
|
33
31
|
}, children: _jsx(ScalebarCoordinateLabels, { model: model }) }) }), _jsx(ScalebarRefNameLabels, { model: model })] }));
|
|
34
32
|
}));
|
|
35
33
|
export default Scalebar;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '..';
|
|
2
2
|
type LGV = LinearGenomeViewModel;
|
|
3
|
-
declare const ScalebarCoordinateLabels: ({ model }: {
|
|
3
|
+
declare const ScalebarCoordinateLabels: ({ model, }: {
|
|
4
4
|
model: LGV;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default ScalebarCoordinateLabels;
|
|
@@ -1,24 +1,57 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getTickDisplayStr } from '@jbrowse/core/util';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
2
4
|
import { observer } from 'mobx-react';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
import { makeTicks } from "../util.js";
|
|
6
|
+
const useStyles = makeStyles()(theme => ({
|
|
7
|
+
block: {
|
|
8
|
+
position: 'relative',
|
|
9
|
+
flexShrink: 0,
|
|
10
|
+
overflow: 'hidden',
|
|
11
|
+
height: 13,
|
|
12
|
+
},
|
|
13
|
+
elidedBlock: {
|
|
14
|
+
backgroundColor: '#999',
|
|
15
|
+
backgroundImage: 'repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,.5) 1px, rgba(255,255,255,.5) 3px)',
|
|
16
|
+
},
|
|
17
|
+
tick: {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
width: 0,
|
|
20
|
+
display: 'flex',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
pointerEvents: 'none',
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
fontSize: 11,
|
|
26
|
+
zIndex: 1,
|
|
27
|
+
background: theme.palette.background.paper,
|
|
28
|
+
lineHeight: 'normal',
|
|
29
|
+
pointerEvents: 'none',
|
|
30
|
+
},
|
|
31
|
+
}));
|
|
32
|
+
function ContentBlockLabels({ block, bpPerPx, }) {
|
|
33
|
+
const { classes } = useStyles();
|
|
34
|
+
const ticks = makeTicks(block.start, block.end, bpPerPx, true, false);
|
|
35
|
+
return (_jsx("div", { className: classes.block, style: { width: block.widthPx }, children: ticks.map(({ type, base }) => {
|
|
36
|
+
if (type !== 'major') {
|
|
37
|
+
return null;
|
|
15
38
|
}
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
const x = (block.reversed ? block.end - base : base - block.start) / bpPerPx;
|
|
40
|
+
return (_jsx("div", { className: classes.tick, style: { left: x }, children: _jsx("div", { className: classes.label, children: getTickDisplayStr(base + 1, bpPerPx) }) }, base));
|
|
41
|
+
}) }));
|
|
42
|
+
}
|
|
43
|
+
const ScalebarCoordinateLabels = observer(function ScalebarCoordinateLabels({ model, }) {
|
|
44
|
+
const { classes, cx } = useStyles();
|
|
45
|
+
const { staticBlocks, bpPerPx } = model;
|
|
46
|
+
return (_jsx("div", { style: { display: 'flex' }, children: staticBlocks.map((block, index) => {
|
|
47
|
+
const key = `${block.key}-${index}`;
|
|
48
|
+
if (block.type === 'ContentBlock') {
|
|
49
|
+
return (_jsx(ContentBlockLabels, { block: block, bpPerPx: bpPerPx }, key));
|
|
18
50
|
}
|
|
19
|
-
else {
|
|
20
|
-
return
|
|
51
|
+
else if (block.type === 'ElidedBlock') {
|
|
52
|
+
return (_jsx("div", { className: cx(classes.block, classes.elidedBlock), style: { width: block.widthPx } }, key));
|
|
21
53
|
}
|
|
54
|
+
return (_jsx("div", { className: classes.block, style: { width: block.widthPx } }, key));
|
|
22
55
|
}) }));
|
|
23
56
|
});
|
|
24
57
|
export default ScalebarCoordinateLabels;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LinearGenomeViewModel } from '..';
|
|
2
2
|
type LGV = LinearGenomeViewModel;
|
|
3
|
-
declare const ScalebarRefNameLabels: ({ model }: {
|
|
3
|
+
declare const ScalebarRefNameLabels: ({ model, }: {
|
|
4
4
|
model: LGV;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default ScalebarRefNameLabels;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
5
4
|
const useStyles = makeStyles()(theme => ({
|
|
6
5
|
refLabel: {
|
|
7
6
|
fontSize: 11,
|
|
@@ -18,25 +17,28 @@ const useStyles = makeStyles()(theme => ({
|
|
|
18
17
|
zIndex: 100,
|
|
19
18
|
},
|
|
20
19
|
}));
|
|
21
|
-
const ScalebarRefNameLabels = observer(function ({ model }) {
|
|
20
|
+
const ScalebarRefNameLabels = observer(function ScalebarRefNameLabels({ model, }) {
|
|
22
21
|
const { classes, cx } = useStyles();
|
|
23
|
-
const { staticBlocks, offsetPx,
|
|
24
|
-
let lastLeftBlock =
|
|
22
|
+
const { staticBlocks, offsetPx, scalebarDisplayPrefix } = model;
|
|
23
|
+
let lastLeftBlock = staticBlocks.blocks.findIndex(b => b.type === 'ContentBlock');
|
|
24
|
+
if (lastLeftBlock < 0) {
|
|
25
|
+
lastLeftBlock = 0;
|
|
26
|
+
}
|
|
25
27
|
staticBlocks.forEach((block, i) => {
|
|
26
|
-
if (block.offsetPx - offsetPx < 0) {
|
|
28
|
+
if (block.type === 'ContentBlock' && block.offsetPx - offsetPx < 0) {
|
|
27
29
|
lastLeftBlock = i;
|
|
28
30
|
}
|
|
29
31
|
});
|
|
30
|
-
const val =
|
|
32
|
+
const val = scalebarDisplayPrefix();
|
|
31
33
|
const b0 = staticBlocks.blocks[0];
|
|
32
|
-
return (_jsxs(_Fragment, { children: [
|
|
34
|
+
return (_jsxs(_Fragment, { children: [b0?.type !== 'ContentBlock' && val ? (_jsx("span", { className: cx(classes.b0, classes.refLabel), children: val })) : null, staticBlocks.map((block, index) => {
|
|
33
35
|
const { offsetPx: blockOffsetPx, isLeftEndOfDisplayedRegion, key, type, refName, } = block;
|
|
34
36
|
const last = index === lastLeftBlock;
|
|
35
37
|
return type === 'ContentBlock' &&
|
|
36
|
-
(isLeftEndOfDisplayedRegion || last) ? (_jsxs(
|
|
38
|
+
(isLeftEndOfDisplayedRegion || last) ? (_jsxs("span", { style: {
|
|
37
39
|
left: last
|
|
38
|
-
?
|
|
39
|
-
: blockOffsetPx -
|
|
40
|
+
? 'max(0px, calc(-1 * var(--offset-px)))'
|
|
41
|
+
: `calc(${blockOffsetPx}px - var(--offset-px) - 1px)`,
|
|
40
42
|
paddingLeft: last ? 0 : 1,
|
|
41
43
|
}, className: classes.refLabel, "data-testid": `refLabel-${refName}`, children: [last && val ? `${val}:` : '', refName] }, `refLabel-${key}-${index}`)) : null;
|
|
42
44
|
})] }));
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getSession } from '@jbrowse/core/util';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { alpha, useTheme } from '@mui/material';
|
|
4
5
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import RefNameAutocomplete from
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { SPACING, WIDGET_HEIGHT } from '../consts';
|
|
6
|
+
import EndAdornment from "./RefNameAutocomplete/EndAdornment.js";
|
|
7
|
+
import RefNameAutocomplete from "./RefNameAutocomplete/index.js";
|
|
8
|
+
import { fetchResults } from "./util.js";
|
|
9
|
+
import { handleSelectedRegion, navToOption } from "../../searchUtils.js";
|
|
10
|
+
import { SPACING, WIDGET_HEIGHT } from "../consts.js";
|
|
11
11
|
const useStyles = makeStyles()({
|
|
12
12
|
headerRefName: {
|
|
13
13
|
minWidth: 100,
|
|
14
14
|
},
|
|
15
15
|
});
|
|
16
16
|
async function onSelect({ option, model, assemblyName, }) {
|
|
17
|
-
var _a;
|
|
18
17
|
const { assemblyManager } = getSession(model);
|
|
19
18
|
const assembly = assemblyManager.get(assemblyName);
|
|
20
19
|
if (option.hasLocation()) {
|
|
@@ -24,7 +23,7 @@ async function onSelect({ option, model, assemblyName, }) {
|
|
|
24
23
|
assemblyName,
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
|
-
else if (
|
|
26
|
+
else if (option.results?.length) {
|
|
28
27
|
model.setSearchResults(option.results, option.getLabel());
|
|
29
28
|
}
|
|
30
29
|
else if (assembly) {
|
|
@@ -35,7 +34,7 @@ async function onSelect({ option, model, assemblyName, }) {
|
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
const SearchBox = observer(function ({ model, showHelp = true, }) {
|
|
37
|
+
const SearchBox = observer(function SearchBox({ model, showHelp = true, }) {
|
|
39
38
|
const { classes } = useStyles();
|
|
40
39
|
const theme = useTheme();
|
|
41
40
|
const session = getSession(model);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '
|
|
1
|
+
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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Dialog } from '@jbrowse/core/ui';
|
|
3
3
|
import { Button, DialogActions, DialogContent, Divider, Typography, } from '@mui/material';
|
|
4
|
-
import SearchResultsTable from
|
|
4
|
+
import SearchResultsTable from "./SearchResultsTable.js";
|
|
5
5
|
export default function SearchResultsDialog({ model, assemblyName, searchQuery, searchResults, handleClose, }) {
|
|
6
|
-
return (_jsxs(Dialog, { open: true, maxWidth: "xl", onClose: handleClose, title: "Search results", children: [_jsx(DialogContent, { children: !
|
|
6
|
+
return (_jsxs(Dialog, { open: true, maxWidth: "xl", onClose: handleClose, title: "Search results", children: [_jsx(DialogContent, { 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 })] })) }), _jsx(Divider, {}), _jsx(DialogActions, { children: _jsx(Button, { onClick: () => {
|
|
7
7
|
handleClose();
|
|
8
8
|
}, color: "primary", children: "Cancel" }) })] }));
|
|
9
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinearGenomeViewModel } from '
|
|
1
|
+
import type { LinearGenomeViewModel } from '../../index.ts';
|
|
2
2
|
import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
3
3
|
export default function SearchResultsTable({ searchResults, assemblyName: optAssemblyName, model, handleClose, }: {
|
|
4
4
|
searchResults: BaseResult[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { assembleLocString, getEnv, getSession, parseLocString, } from '@jbrowse/core/util';
|
|
3
|
+
import { getRoot, resolveIdentifier } from '@jbrowse/mobx-state-tree';
|
|
3
4
|
import { Button, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, } from '@mui/material';
|
|
4
|
-
import {
|
|
5
|
-
import { navToOption } from '../../searchUtils';
|
|
5
|
+
import { navToOption } from "../../searchUtils.js";
|
|
6
6
|
export default function SearchResultsTable({ searchResults, assemblyName: optAssemblyName, model, handleClose, }) {
|
|
7
7
|
const session = getSession(model);
|
|
8
8
|
const { pluginManager } = getEnv(session);
|
|
@@ -16,16 +16,14 @@ export default function SearchResultsTable({ searchResults, assemblyName: optAss
|
|
|
16
16
|
throw new Error(`assembly ${assemblyName} regions not loaded`);
|
|
17
17
|
}
|
|
18
18
|
function getTrackName(trackId) {
|
|
19
|
-
var _a;
|
|
20
19
|
if (trackId) {
|
|
21
20
|
const schema = pluginManager.pluggableConfigSchemaType('track');
|
|
22
21
|
const configuration = resolveIdentifier(schema, getRoot(model), trackId);
|
|
23
|
-
return
|
|
22
|
+
return configuration?.name?.value || '';
|
|
24
23
|
}
|
|
25
24
|
return '';
|
|
26
25
|
}
|
|
27
26
|
async function handleClick(result) {
|
|
28
|
-
var _a;
|
|
29
27
|
if (result.hasLocation()) {
|
|
30
28
|
await navToOption({
|
|
31
29
|
option: result,
|
|
@@ -35,7 +33,7 @@ export default function SearchResultsTable({ searchResults, assemblyName: optAss
|
|
|
35
33
|
}
|
|
36
34
|
else {
|
|
37
35
|
const location = result.getLabel();
|
|
38
|
-
const newRegion =
|
|
36
|
+
const newRegion = assembly?.regions?.find(region => location === region.refName);
|
|
39
37
|
if (newRegion) {
|
|
40
38
|
model.setDisplayedRegions([newRegion]);
|
|
41
39
|
model.showAllRegions();
|
|
@@ -2,16 +2,16 @@ 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
4
|
import { getSession, isSessionWithAddTracks } from '@jbrowse/core/util';
|
|
5
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
6
|
+
import { getSnapshot } from '@jbrowse/mobx-state-tree';
|
|
5
7
|
import { Button, Checkbox, DialogActions, DialogContent, FormControlLabel, FormGroup, TextField, Typography, } from '@mui/material';
|
|
6
8
|
import { observer } from 'mobx-react';
|
|
7
|
-
import { getSnapshot } from 'mobx-state-tree';
|
|
8
|
-
import { makeStyles } from 'tss-react/mui';
|
|
9
9
|
const useStyles = makeStyles()({
|
|
10
10
|
dialogContent: {
|
|
11
11
|
width: '40em',
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
|
-
const SequenceSearchDialog = observer(function ({ model, handleClose, }) {
|
|
14
|
+
const SequenceSearchDialog = observer(function SequenceSearchDialog({ model, handleClose, }) {
|
|
15
15
|
const { classes } = useStyles();
|
|
16
16
|
const [value, setValue] = useState('');
|
|
17
17
|
const [searchForward, setSearchForward] = useState(true);
|
|
@@ -33,7 +33,6 @@ const SequenceSearchDialog = observer(function ({ model, handleClose, }) {
|
|
|
33
33
|
} }), label: "Search reverse strand" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: caseInsensitive, onChange: event => {
|
|
34
34
|
setCaseInsensitive(event.target.checked);
|
|
35
35
|
} }), label: "Case insensitive" })] }), error ? _jsx(Typography, { color: "error", children: `${error}` }) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: () => {
|
|
36
|
-
var _a;
|
|
37
36
|
if (value) {
|
|
38
37
|
const trackId = `sequence_search_${Date.now()}`;
|
|
39
38
|
const session = getSession(model);
|
|
@@ -51,7 +50,8 @@ const SequenceSearchDialog = observer(function ({ model, handleClose, }) {
|
|
|
51
50
|
searchForward,
|
|
52
51
|
searchReverse,
|
|
53
52
|
caseInsensitive,
|
|
54
|
-
sequenceAdapter: getSnapshot(
|
|
53
|
+
sequenceAdapter: getSnapshot(assemblyManager.get(assemblyName)?.configuration.sequence
|
|
54
|
+
.adapter),
|
|
55
55
|
},
|
|
56
56
|
});
|
|
57
57
|
model.showTrack(trackId);
|