@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { measureText } from '@jbrowse/core/util';
|
|
3
|
+
const LEGEND_FONT_SIZE = 10;
|
|
4
|
+
const LEGEND_BOX_SIZE = 12;
|
|
5
|
+
const LEGEND_PADDING = 3;
|
|
6
|
+
export default function SVGLegend({ items, width, legendAreaWidth, }) {
|
|
7
|
+
if (items.length === 0) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const itemHeight = LEGEND_BOX_SIZE + 2;
|
|
11
|
+
const legendHeight = items.length * itemHeight + LEGEND_PADDING * 2;
|
|
12
|
+
const maxLabelWidth = Math.max(...items.map(item => measureText(item.label, LEGEND_FONT_SIZE)));
|
|
13
|
+
const legendWidth = LEGEND_BOX_SIZE + 8 + maxLabelWidth + LEGEND_PADDING * 2;
|
|
14
|
+
const x = legendAreaWidth ? width + 10 : width - legendWidth - 10;
|
|
15
|
+
const y = 10;
|
|
16
|
+
return (_jsxs("g", { transform: `translate(${x}, ${y})`, children: [_jsx("rect", { x: 0, y: 0, width: legendWidth, height: legendHeight, fill: "rgba(255,255,255,0.9)", stroke: "#ccc", strokeWidth: 1, rx: 4 }), items.map((item, idx) => (_jsxs("g", { transform: `translate(${LEGEND_PADDING}, ${LEGEND_PADDING + idx * itemHeight})`, children: [item.color ? (_jsx("rect", { x: 0, y: 0, width: LEGEND_BOX_SIZE, height: LEGEND_BOX_SIZE, fill: item.color })) : null, _jsx("text", { x: LEGEND_BOX_SIZE + 6, y: LEGEND_BOX_SIZE - 2, fontSize: LEGEND_FONT_SIZE, fill: "black", children: item.label })] }, `legend-${idx}`)))] }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { measureText } from '@jbrowse/core/util';
|
|
2
|
+
const LEGEND_FONT_SIZE = 10;
|
|
3
|
+
const LEGEND_BOX_SIZE = 12;
|
|
4
|
+
const LEGEND_PADDING = 3;
|
|
5
|
+
export function calculateSvgLegendWidth(items) {
|
|
6
|
+
if (items.length === 0) {
|
|
7
|
+
return 0;
|
|
8
|
+
}
|
|
9
|
+
const maxLabelWidth = Math.max(...items.map(item => measureText(item.label, LEGEND_FONT_SIZE)));
|
|
10
|
+
return LEGEND_BOX_SIZE + 8 + maxLabelWidth + LEGEND_PADDING * 2 + 20;
|
|
11
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { BaseLinearDisplayModel } from '../model';
|
|
1
|
+
import type { BaseLinearDisplayModel } from '../model.ts';
|
|
2
2
|
declare const BaseLinearDisplay: (props: {
|
|
3
3
|
model: BaseLinearDisplayModel;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default BaseLinearDisplay;
|
|
7
|
-
export { default as Tooltip } from './Tooltip';
|
|
8
|
-
export { default as BlockMsg } from './BlockMsg';
|
|
7
|
+
export { default as Tooltip } from './Tooltip.tsx';
|
|
8
|
+
export { default as BlockMsg } from './BlockMsg.tsx';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, useRef, useState } from 'react';
|
|
3
3
|
import { getConf } from '@jbrowse/core/configuration';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
|
+
import { useTheme } from '@mui/material';
|
|
4
6
|
import { observer } from 'mobx-react';
|
|
5
|
-
import
|
|
6
|
-
import LinearBlocks from
|
|
7
|
-
import MenuPage from
|
|
7
|
+
import FloatingLegend from "./FloatingLegend.js";
|
|
8
|
+
import LinearBlocks from "./LinearBlocks.js";
|
|
9
|
+
import MenuPage from "./MenuPage.js";
|
|
8
10
|
const useStyles = makeStyles()({
|
|
9
11
|
display: {
|
|
10
12
|
position: 'relative',
|
|
@@ -14,7 +16,7 @@ const useStyles = makeStyles()({
|
|
|
14
16
|
minHeight: '100%',
|
|
15
17
|
},
|
|
16
18
|
});
|
|
17
|
-
const BaseLinearDisplay = observer(function (props) {
|
|
19
|
+
const BaseLinearDisplay = observer(function BaseLinearDisplay(props) {
|
|
18
20
|
const { classes } = useStyles();
|
|
19
21
|
const ref = useRef(null);
|
|
20
22
|
const [clientRect, setClientRect] = useState();
|
|
@@ -22,7 +24,9 @@ const BaseLinearDisplay = observer(function (props) {
|
|
|
22
24
|
const [clientMouseCoord, setClientMouseCoord] = useState([0, 0]);
|
|
23
25
|
const [contextCoord, setContextCoord] = useState();
|
|
24
26
|
const { model, children } = props;
|
|
25
|
-
const { TooltipComponent, DisplayMessageComponent, height } = model;
|
|
27
|
+
const { TooltipComponent, DisplayMessageComponent, height, showLegend, showTooltipsEnabled, } = model;
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
const legendItems = model.legendItems(theme);
|
|
26
30
|
return (_jsxs("div", { ref: ref, "data-testid": `display-${getConf(model, 'displayId')}`, className: classes.display, onContextMenu: event => {
|
|
27
31
|
event.preventDefault();
|
|
28
32
|
if (contextCoord) {
|
|
@@ -40,10 +44,10 @@ const BaseLinearDisplay = observer(function (props) {
|
|
|
40
44
|
setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
|
|
41
45
|
setClientMouseCoord([event.clientX, event.clientY]);
|
|
42
46
|
setClientRect(rect);
|
|
43
|
-
}, children: [DisplayMessageComponent ? (_jsx(DisplayMessageComponent, { model: model })) : (_jsx(LinearBlocks, { ...props })), children, _jsx(Suspense, { fallback: null, children: _jsx(TooltipComponent, { model: model, height: height, offsetMouseCoord: offsetMouseCoord, clientMouseCoord: clientMouseCoord, clientRect: clientRect, mouseCoord: offsetMouseCoord }) }), contextCoord ? (_jsx(MenuPage, { contextCoord: contextCoord, model: model, onClose: () => {
|
|
47
|
+
}, children: [DisplayMessageComponent ? (_jsx(DisplayMessageComponent, { model: model })) : (_jsx(LinearBlocks, { ...props })), children, showLegend && legendItems.length > 0 ? (_jsx(FloatingLegend, { items: legendItems })) : null, showTooltipsEnabled ? (_jsx(Suspense, { fallback: null, children: _jsx(TooltipComponent, { model: model, height: height, offsetMouseCoord: offsetMouseCoord, clientMouseCoord: clientMouseCoord, clientRect: clientRect, mouseCoord: offsetMouseCoord }) })) : null, contextCoord ? (_jsx(MenuPage, { contextCoord: contextCoord, model: model, onClose: () => {
|
|
44
48
|
setContextCoord(undefined);
|
|
45
49
|
} })) : null] }));
|
|
46
50
|
});
|
|
47
51
|
export default BaseLinearDisplay;
|
|
48
|
-
export { default as Tooltip } from
|
|
49
|
-
export { default as BlockMsg } from
|
|
52
|
+
export { default as Tooltip } from "./Tooltip.js";
|
|
53
|
+
export { default as BlockMsg } from "./BlockMsg.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
2
3
|
import { observer } from 'mobx-react';
|
|
3
|
-
import { makeStyles } from 'tss-react/mui';
|
|
4
4
|
const useStyles = makeStyles()(theme => ({
|
|
5
5
|
contentBlock: {
|
|
6
6
|
position: 'relative',
|
|
@@ -24,7 +24,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
24
24
|
backgroundColor: theme.palette.action.disabledBackground,
|
|
25
25
|
},
|
|
26
26
|
}));
|
|
27
|
-
const ContentBlock = observer(function ({ block, children, }) {
|
|
27
|
+
const ContentBlock = observer(function ContentBlock({ block, children, }) {
|
|
28
28
|
const { classes } = useStyles();
|
|
29
29
|
const { widthPx } = block;
|
|
30
30
|
return (_jsx("div", { style: { width: widthPx }, className: classes.contentBlock, children: children }));
|
|
@@ -5,8 +5,8 @@ import RefreshIcon from '@mui/icons-material/Refresh';
|
|
|
5
5
|
import ReportIcon from '@mui/icons-material/Report';
|
|
6
6
|
import { IconButton, Tooltip } from '@mui/material';
|
|
7
7
|
import { observer } from 'mobx-react';
|
|
8
|
-
import BlockMsg from
|
|
9
|
-
const BlockErrorMessage = observer(function ({ model, }) {
|
|
8
|
+
import BlockMsg from "./BlockMsg.js";
|
|
9
|
+
const BlockErrorMessage = observer(function BlockErrorMessage({ model, }) {
|
|
10
10
|
return (_jsx(BlockMsg, { message: `${model.error}`, severity: "error", action: _jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Reload track", children: _jsx(IconButton, { "data-testid": "reload_button", onClick: () => {
|
|
11
11
|
model.reload();
|
|
12
12
|
}, children: _jsx(RefreshIcon, {}) }) }), _jsx(Tooltip, { title: "Show stack trace", children: _jsx(IconButton, { onClick: () => {
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
2
3
|
import { Alert, Tooltip } from '@mui/material';
|
|
3
|
-
import { makeStyles } from 'tss-react/mui';
|
|
4
4
|
const useStyles = makeStyles()({
|
|
5
5
|
ellipses: {
|
|
6
6
|
textOverflow: 'ellipsis',
|
|
7
7
|
overflow: 'hidden',
|
|
8
8
|
},
|
|
9
|
+
content: {
|
|
10
|
+
textOverflow: 'ellipsis',
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
maxWidth: '80%',
|
|
14
|
+
textAlign: 'center',
|
|
15
|
+
},
|
|
9
16
|
});
|
|
10
17
|
export default function BlockMsg({ message, severity, action, }) {
|
|
11
18
|
const { classes } = useStyles();
|
|
@@ -15,5 +22,5 @@ export default function BlockMsg({ message, severity, action, }) {
|
|
|
15
22
|
event.stopPropagation();
|
|
16
23
|
}, onClick: event => {
|
|
17
24
|
event.stopPropagation();
|
|
18
|
-
}, children: _jsx(Tooltip, { title: message, children: _jsx("div", { children: message }) }) }));
|
|
25
|
+
}, children: _jsx(Tooltip, { title: message, children: _jsx("div", { className: classes.content, children: message }) }) }));
|
|
19
26
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
|
|
2
|
+
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
export default function CollapseIntronsDialog({ view, transcripts, assembly, handleClose, }: {
|
|
5
|
+
view: LinearGenomeViewModel;
|
|
6
|
+
transcripts: Feature[];
|
|
7
|
+
assembly: Assembly;
|
|
8
|
+
handleClose: () => void;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
4
|
+
import { getSession } from '@jbrowse/core/util';
|
|
5
|
+
import { Button, DialogActions, DialogContent, DialogContentText, TextField, } from '@mui/material';
|
|
6
|
+
import TranscriptTable from "./TranscriptTable.js";
|
|
7
|
+
import { collapseIntrons } from "./util.js";
|
|
8
|
+
export default function CollapseIntronsDialog({ view, transcripts, assembly, handleClose, }) {
|
|
9
|
+
const [showAll, setShowAll] = useState(false);
|
|
10
|
+
const [windowSize, setWindowSize] = useState('100');
|
|
11
|
+
const windowSizeNum = +windowSize;
|
|
12
|
+
const validWindowSize = !Number.isNaN(windowSizeNum) && windowSizeNum >= 0;
|
|
13
|
+
return (_jsxs(Dialog, { open: true, maxWidth: "md", onClose: handleClose, title: "Select transcript to collapse", children: [_jsxs(DialogContent, { children: [_jsxs(DialogContentText, { component: "div", children: [_jsx("p", { children: "Select the 'window size' which will be the extra space surrounding splice boundary to include. 10bp will only include a small 10bp region around splice boundary" }), _jsx("p", { children: "By default the union of exons from all transcripts will be used to create the collapsed intron view, but you can optionally use the exons of only a specific transcript by clicking \"Show all transcripts\" and then \"Select\"" })] }), _jsx(TextField, { label: "Number of bp around splice site to include", value: windowSize, onChange: event => {
|
|
14
|
+
setWindowSize(event.target.value);
|
|
15
|
+
}, error: windowSize !== '' && !validWindowSize, helperText: windowSize !== '' && !validWindowSize
|
|
16
|
+
? 'Must be a non-negative number'
|
|
17
|
+
: '', type: "number", slotProps: {
|
|
18
|
+
htmlInput: {
|
|
19
|
+
min: 0,
|
|
20
|
+
step: 10,
|
|
21
|
+
},
|
|
22
|
+
}, style: { marginBottom: 16, width: 250 } }), _jsxs(Button, { style: { float: 'right' }, onClick: () => {
|
|
23
|
+
setShowAll(s => !s);
|
|
24
|
+
}, children: [!showAll ? 'Show' : 'Hide', " all transcripts (", transcripts.length, ")"] }), showAll ? (_jsx(TranscriptTable, { transcripts: transcripts, view: view, assembly: assembly, padding: windowSizeNum, validPadding: validWindowSize, handleClose: handleClose })) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { size: "small", variant: "contained", color: "primary", disabled: !validWindowSize, onClick: () => {
|
|
25
|
+
;
|
|
26
|
+
(async () => {
|
|
27
|
+
try {
|
|
28
|
+
await collapseIntrons({
|
|
29
|
+
view,
|
|
30
|
+
transcripts,
|
|
31
|
+
assembly,
|
|
32
|
+
padding: windowSizeNum,
|
|
33
|
+
});
|
|
34
|
+
handleClose();
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
getSession(view).notifyError(`${e}`, e);
|
|
38
|
+
console.error(e);
|
|
39
|
+
}
|
|
40
|
+
})();
|
|
41
|
+
}, children: "Submit" }), _jsx(Button, { onClick: handleClose, variant: "contained", color: "secondary", children: "Cancel" })] })] }));
|
|
42
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
|
|
2
|
+
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
export default function TranscriptTable({ transcripts, view, assembly, padding, validPadding, handleClose, }: {
|
|
5
|
+
transcripts: Feature[];
|
|
6
|
+
view: LinearGenomeViewModel;
|
|
7
|
+
assembly: Assembly;
|
|
8
|
+
padding: number;
|
|
9
|
+
validPadding: boolean;
|
|
10
|
+
handleClose: () => void;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getSession, toLocale } from '@jbrowse/core/util';
|
|
3
|
+
import { Box, Button, Table, TableBody, TableCell, TableHead, TableRow, } from '@mui/material';
|
|
4
|
+
import { collapseIntrons, getExonsAndCDS } from "./util.js";
|
|
5
|
+
export default function TranscriptTable({ transcripts, view, assembly, padding, validPadding, handleClose, }) {
|
|
6
|
+
const sorted = [...transcripts].sort((a, b) => {
|
|
7
|
+
const lenA = a.get('end') - a.get('start');
|
|
8
|
+
const lenB = b.get('end') - b.get('start');
|
|
9
|
+
return lenB - lenA;
|
|
10
|
+
});
|
|
11
|
+
return (_jsx(Box, { sx: { maxHeight: 600, overflow: 'auto' }, children: _jsxs(Table, { size: "small", stickyHeader: true, children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Name/ID" }), _jsx(TableCell, { children: "Type" }), _jsx(TableCell, { align: "right", children: "Length" }), _jsx(TableCell, { align: "right", children: "Exons" }), _jsx(TableCell, { align: "right", children: "CDS" }), _jsx(TableCell, {})] }) }), _jsx(TableBody, { children: sorted.map((transcript, idx) => {
|
|
12
|
+
const start = transcript.get('start');
|
|
13
|
+
const end = transcript.get('end');
|
|
14
|
+
const name = transcript.get('name') ||
|
|
15
|
+
transcript.get('id') ||
|
|
16
|
+
`Transcript ${idx + 1}`;
|
|
17
|
+
const type = transcript.get('type') || 'transcript';
|
|
18
|
+
const exonsAndCDS = getExonsAndCDS([transcript]);
|
|
19
|
+
const exonCount = exonsAndCDS.filter(f => f.get('type') === 'exon').length;
|
|
20
|
+
const cdsCount = exonsAndCDS.length - exonCount;
|
|
21
|
+
return (_jsxs(TableRow, { children: [_jsx(TableCell, { children: name }), _jsx(TableCell, { children: type }), _jsxs(TableCell, { align: "right", children: [toLocale(end - start), " bp"] }), _jsx(TableCell, { align: "right", children: exonCount }), _jsx(TableCell, { align: "right", children: cdsCount }), _jsx(TableCell, { align: "right", children: _jsx(Button, { size: "small", variant: "contained", color: "primary", disabled: !validPadding, onClick: () => {
|
|
22
|
+
;
|
|
23
|
+
(async () => {
|
|
24
|
+
try {
|
|
25
|
+
await collapseIntrons({
|
|
26
|
+
view,
|
|
27
|
+
transcripts: [transcript],
|
|
28
|
+
assembly,
|
|
29
|
+
padding,
|
|
30
|
+
});
|
|
31
|
+
handleClose();
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
getSession(view).notifyError(`${e}`, e);
|
|
35
|
+
console.error(e);
|
|
36
|
+
}
|
|
37
|
+
})();
|
|
38
|
+
}, children: "Select" }) })] }, transcript.id()));
|
|
39
|
+
}) })] }) }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
|
|
2
|
+
import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
export declare function getExonsAndCDS(transcripts: Feature[]): Feature[];
|
|
5
|
+
interface ViewState {
|
|
6
|
+
bpPerPx: number;
|
|
7
|
+
offsetPx: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function calculateInitialViewState(regions: {
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
}[], viewWidth: number): ViewState;
|
|
13
|
+
export declare function collapseIntrons({ view, transcripts, assembly, padding, }: {
|
|
14
|
+
view: LinearGenomeViewModel;
|
|
15
|
+
transcripts: Feature[];
|
|
16
|
+
assembly: Assembly;
|
|
17
|
+
padding: number;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { getSession, mergeIntervals } from '@jbrowse/core/util';
|
|
2
|
+
import { getSnapshot } from '@jbrowse/mobx-state-tree';
|
|
3
|
+
import { when } from 'mobx';
|
|
4
|
+
export function getExonsAndCDS(transcripts) {
|
|
5
|
+
return transcripts.flatMap(transcript => transcript
|
|
6
|
+
.get('subfeatures')
|
|
7
|
+
?.filter(f => f.get('type') === 'exon' || f.get('type') === 'CDS') ??
|
|
8
|
+
[]);
|
|
9
|
+
}
|
|
10
|
+
export function calculateInitialViewState(regions, viewWidth) {
|
|
11
|
+
const totalBp = regions.reduce((sum, r) => sum + (r.end - r.start), 0);
|
|
12
|
+
const bpPerPx = totalBp / (viewWidth * 0.9);
|
|
13
|
+
const numPaddings = Math.max(0, regions.length - 1);
|
|
14
|
+
const interRegionPaddingWidth = 2;
|
|
15
|
+
const totalPaddingPx = numPaddings * interRegionPaddingWidth;
|
|
16
|
+
const totalContentPx = totalBp / bpPerPx + totalPaddingPx;
|
|
17
|
+
const centerPx = totalContentPx / 2;
|
|
18
|
+
const offsetPx = Math.round(centerPx - viewWidth / 2);
|
|
19
|
+
return { bpPerPx, offsetPx };
|
|
20
|
+
}
|
|
21
|
+
export async function collapseIntrons({ view, transcripts, assembly, padding, }) {
|
|
22
|
+
const r0 = transcripts[0]?.get('refName');
|
|
23
|
+
if (!r0) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const refName = assembly.getCanonicalRefName2(r0);
|
|
27
|
+
const subs = getExonsAndCDS(transcripts);
|
|
28
|
+
const snapshot = getSnapshot(view);
|
|
29
|
+
const { id, offsetPx, bpPerPx, ...rest } = snapshot;
|
|
30
|
+
const mergedRegions = mergeIntervals(subs.map(f => ({
|
|
31
|
+
refName,
|
|
32
|
+
start: f.get('start') - padding,
|
|
33
|
+
end: f.get('end') + padding,
|
|
34
|
+
assemblyName: view.assemblyNames[0],
|
|
35
|
+
})), padding);
|
|
36
|
+
const initialState = calculateInitialViewState(mergedRegions, view.width);
|
|
37
|
+
const newView = getSession(view).addView('LinearGenomeView', {
|
|
38
|
+
...rest,
|
|
39
|
+
tracks: rest.tracks.map(({ id, ...r }) => r),
|
|
40
|
+
displayedRegions: mergedRegions,
|
|
41
|
+
bpPerPx: initialState.bpPerPx,
|
|
42
|
+
offsetPx: initialState.offsetPx,
|
|
43
|
+
});
|
|
44
|
+
await when(() => newView.initialized);
|
|
45
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { getContainingView } from '@jbrowse/core/util';
|
|
4
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { calculateFloatingLabelPosition } from "./util.js";
|
|
7
|
+
const useStyles = makeStyles()({
|
|
8
|
+
container: {
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
top: 0,
|
|
11
|
+
left: 0,
|
|
12
|
+
width: '100%',
|
|
13
|
+
height: '100%',
|
|
14
|
+
pointerEvents: 'none',
|
|
15
|
+
zIndex: 5,
|
|
16
|
+
},
|
|
17
|
+
label: {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
fontSize: 11,
|
|
20
|
+
cursor: 'default',
|
|
21
|
+
pointerEvents: 'auto',
|
|
22
|
+
},
|
|
23
|
+
overlay: {
|
|
24
|
+
backgroundColor: 'rgba(255, 255, 255, 0.8)',
|
|
25
|
+
lineHeight: 1,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
const FixedLabel = memo(function FixedLabel({ text, color, isOverlay, featureLeftPx, featureId, subfeatureId, y, tooltip, labelClass, overlayClass, }) {
|
|
29
|
+
return (_jsx("div", { "data-feature-id": featureId, "data-subfeature-id": subfeatureId, "data-tooltip": tooltip, className: isOverlay ? `${labelClass} ${overlayClass}` : labelClass, style: {
|
|
30
|
+
color,
|
|
31
|
+
transform: `translate(calc(${featureLeftPx}px - var(--offset-px)), ${y}px)`,
|
|
32
|
+
}, children: text }));
|
|
33
|
+
});
|
|
34
|
+
function FloatingLabel({ text, color, isOverlay, featureLeftPx, featureRightPx, featureId, subfeatureId, labelWidth, y, offsetPx, viewportLeft, tooltip, labelClass, overlayClass, }) {
|
|
35
|
+
const x = calculateFloatingLabelPosition(featureLeftPx, featureRightPx, labelWidth, offsetPx, viewportLeft);
|
|
36
|
+
return (_jsx("div", { "data-feature-id": featureId, "data-subfeature-id": subfeatureId, "data-tooltip": tooltip, className: isOverlay ? `${labelClass} ${overlayClass}` : labelClass, style: { color, transform: `translate(${x}px,${y}px)` }, children: text }));
|
|
37
|
+
}
|
|
38
|
+
const FloatingLabels = observer(function FloatingLabels({ model, }) {
|
|
39
|
+
const { classes } = useStyles();
|
|
40
|
+
const view = getContainingView(model);
|
|
41
|
+
const { offsetPx } = view;
|
|
42
|
+
const featureLabels = model.floatingLabelData;
|
|
43
|
+
const { onFeatureClick, onFeatureContextMenu, onMouseMove } = model.renderingProps();
|
|
44
|
+
const fixedLabels = [];
|
|
45
|
+
const floatingLabels = [];
|
|
46
|
+
const viewportLeft = Math.max(0, offsetPx);
|
|
47
|
+
for (const [key, { leftPx, topPx, totalFeatureHeight, floatingLabels: labelData, featureWidth, },] of featureLabels.entries()) {
|
|
48
|
+
const featureVisualBottom = topPx + totalFeatureHeight;
|
|
49
|
+
const featureRightPx = leftPx + featureWidth;
|
|
50
|
+
for (let i = 0, l = labelData.length; i < l; i++) {
|
|
51
|
+
const floatingLabel = labelData[i];
|
|
52
|
+
const { text, relativeY, color, isOverlay, textWidth: labelWidth, parentFeatureId, subfeatureId, tooltip, } = floatingLabel;
|
|
53
|
+
const y = featureVisualBottom + relativeY;
|
|
54
|
+
const labelKey = `${key}-${i}`;
|
|
55
|
+
const featureId = parentFeatureId ?? key;
|
|
56
|
+
if (labelWidth > featureWidth) {
|
|
57
|
+
fixedLabels.push(_jsx(FixedLabel, { text: text, color: color, isOverlay: isOverlay ?? false, featureLeftPx: leftPx, featureId: featureId, subfeatureId: subfeatureId, y: y, tooltip: tooltip, labelClass: classes.label, overlayClass: classes.overlay }, labelKey));
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
floatingLabels.push(_jsx(FloatingLabel, { text: text, color: color, isOverlay: isOverlay ?? false, featureLeftPx: leftPx, featureRightPx: featureRightPx, featureId: featureId, subfeatureId: subfeatureId, labelWidth: labelWidth, y: y, offsetPx: offsetPx, viewportLeft: viewportLeft, tooltip: tooltip, labelClass: classes.label, overlayClass: classes.overlay }, labelKey));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return (_jsxs("div", { className: classes.container, style: { '--offset-px': `${offsetPx}px` }, onClick: e => {
|
|
65
|
+
const target = e.target;
|
|
66
|
+
const subfeatureId = target.dataset.subfeatureId;
|
|
67
|
+
const featureId = subfeatureId ?? target.dataset.featureId;
|
|
68
|
+
if (featureId) {
|
|
69
|
+
onFeatureClick?.(e, featureId);
|
|
70
|
+
}
|
|
71
|
+
}, onContextMenu: e => {
|
|
72
|
+
const target = e.target;
|
|
73
|
+
const subfeatureId = target.dataset.subfeatureId;
|
|
74
|
+
const featureId = subfeatureId ?? target.dataset.featureId;
|
|
75
|
+
if (featureId) {
|
|
76
|
+
onFeatureContextMenu?.(e, featureId);
|
|
77
|
+
}
|
|
78
|
+
}, onMouseOver: e => {
|
|
79
|
+
const target = e.target;
|
|
80
|
+
const featureId = target.dataset.featureId;
|
|
81
|
+
if (featureId) {
|
|
82
|
+
const tooltip = target.dataset.tooltip;
|
|
83
|
+
const subfeatureId = target.dataset.subfeatureId;
|
|
84
|
+
onMouseMove?.(e, featureId, tooltip);
|
|
85
|
+
model.setSubfeatureIdUnderMouse(subfeatureId);
|
|
86
|
+
}
|
|
87
|
+
}, children: [fixedLabels, floatingLabels] }));
|
|
88
|
+
});
|
|
89
|
+
export default FloatingLabels;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
const useStyles = makeStyles()(theme => ({
|
|
5
|
+
legend: {
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
right: 10,
|
|
8
|
+
top: 10,
|
|
9
|
+
background: theme.palette.background.paper,
|
|
10
|
+
padding: 3,
|
|
11
|
+
fontSize: 10,
|
|
12
|
+
pointerEvents: 'none',
|
|
13
|
+
zIndex: 100,
|
|
14
|
+
maxWidth: 200,
|
|
15
|
+
},
|
|
16
|
+
item: {
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
marginBottom: 1,
|
|
20
|
+
'&:last-child': {
|
|
21
|
+
marginBottom: 0,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
colorBox: {
|
|
25
|
+
width: 12,
|
|
26
|
+
height: 12,
|
|
27
|
+
marginRight: 6,
|
|
28
|
+
flexShrink: 0,
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
whiteSpace: 'nowrap',
|
|
32
|
+
overflow: 'hidden',
|
|
33
|
+
textOverflow: 'ellipsis',
|
|
34
|
+
},
|
|
35
|
+
}));
|
|
36
|
+
const FloatingLegend = observer(function FloatingLegend({ items, }) {
|
|
37
|
+
const { classes } = useStyles();
|
|
38
|
+
if (items.length === 0) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return (_jsx("div", { className: classes.legend, children: items.map((item, idx) => (_jsxs("div", { className: classes.item, children: [_jsx("div", { className: classes.colorBox, style: { backgroundColor: item.color } }), _jsx("span", { className: classes.label, children: item.label })] }, `${item.label}-${idx}`))) }));
|
|
42
|
+
});
|
|
43
|
+
export default FloatingLegend;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
import
|
|
5
|
-
import RenderedBlocks from './RenderedBlocks';
|
|
4
|
+
import RenderedBlocks from "./RenderedBlocks.js";
|
|
6
5
|
const useStyles = makeStyles()({
|
|
7
6
|
linearBlocks: {
|
|
8
7
|
whiteSpace: 'nowrap',
|
|
@@ -12,12 +11,11 @@ const useStyles = makeStyles()({
|
|
|
12
11
|
display: 'flex',
|
|
13
12
|
},
|
|
14
13
|
});
|
|
15
|
-
const LinearBlocks = observer(function ({ model, }) {
|
|
14
|
+
const LinearBlocks = observer(function LinearBlocks({ model, }) {
|
|
16
15
|
const { classes } = useStyles();
|
|
17
16
|
const { blockDefinitions } = model;
|
|
18
|
-
const viewModel = getContainingView(model);
|
|
19
17
|
return (_jsx("div", { className: classes.linearBlocks, style: {
|
|
20
|
-
left: blockDefinitions.offsetPx -
|
|
18
|
+
left: `calc(${blockDefinitions.offsetPx}px - var(--offset-px))`,
|
|
21
19
|
}, children: _jsx(RenderedBlocks, { model: model }) }));
|
|
22
20
|
});
|
|
23
21
|
export default LinearBlocks;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx, keyframes, makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
|
+
const useStyles = makeStyles()({
|
|
4
|
+
container: {
|
|
5
|
+
position: 'relative',
|
|
6
|
+
width: '100%',
|
|
7
|
+
height: '100%',
|
|
8
|
+
minHeight: 20,
|
|
9
|
+
},
|
|
10
|
+
overlay: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: 0,
|
|
13
|
+
left: 0,
|
|
14
|
+
right: 0,
|
|
15
|
+
bottom: 0,
|
|
16
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
17
|
+
backgroundImage: 'repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0, 0, 0, 0.05) 8px, rgba(0, 0, 0, 0.05) 16px)',
|
|
18
|
+
pointerEvents: 'none',
|
|
19
|
+
zIndex: 1,
|
|
20
|
+
display: 'flex',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
opacity: 0,
|
|
24
|
+
},
|
|
25
|
+
visible: {
|
|
26
|
+
opacity: 1,
|
|
27
|
+
},
|
|
28
|
+
dots: {
|
|
29
|
+
fontSize: '0.8rem',
|
|
30
|
+
fontWeight: 300,
|
|
31
|
+
'&::after': {
|
|
32
|
+
display: 'inline-block',
|
|
33
|
+
content: '""',
|
|
34
|
+
width: '1em',
|
|
35
|
+
textAlign: 'left',
|
|
36
|
+
animation: `${keyframes `
|
|
37
|
+
0% { content: ''; }
|
|
38
|
+
25% { content: '.'; }
|
|
39
|
+
50% { content: '..'; }
|
|
40
|
+
75% { content: '...'; }
|
|
41
|
+
`} 1.2s infinite ease-in-out`,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export default function LoadingOverlay({ statusMessage, children, }) {
|
|
46
|
+
const { classes } = useStyles();
|
|
47
|
+
const isLoading = !!statusMessage;
|
|
48
|
+
return (_jsxs("div", { className: classes.container, children: [children, _jsx("span", { className: cx(classes.overlay, isLoading && classes.visible), "data-testid": isLoading ? 'loading-overlay' : undefined, children: _jsx("span", { className: classes.dots, children: statusMessage || 'Loading' }) })] }));
|
|
49
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
const useStyles = makeStyles()({
|
|
4
5
|
heightOverflowed: {
|
|
5
6
|
position: 'absolute',
|
|
@@ -14,11 +15,12 @@ const useStyles = makeStyles()({
|
|
|
14
15
|
boxSizing: 'border-box',
|
|
15
16
|
},
|
|
16
17
|
});
|
|
17
|
-
|
|
18
|
+
const MaxHeightReached = memo(function MaxHeightReached({ top, }) {
|
|
18
19
|
const { classes } = useStyles();
|
|
19
20
|
return (_jsx("div", { className: classes.heightOverflowed, style: {
|
|
20
21
|
top,
|
|
21
22
|
pointerEvents: 'none',
|
|
22
23
|
height: 16,
|
|
23
24
|
}, children: "Max height reached" }));
|
|
24
|
-
}
|
|
25
|
+
});
|
|
26
|
+
export default MaxHeightReached;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Coord } from './types';
|
|
2
|
-
import type { BaseLinearDisplayModel } from '../model';
|
|
1
|
+
import type { Coord } from './types.ts';
|
|
2
|
+
import type { BaseLinearDisplayModel } from '../model.ts';
|
|
3
3
|
declare const MenuPage: ({ onClose, contextCoord, model, }: {
|
|
4
4
|
model: BaseLinearDisplayModel;
|
|
5
5
|
contextCoord: Coord;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Menu } from '@jbrowse/core/ui';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
|
-
const MenuPage = observer(function ({ onClose, contextCoord, model, }) {
|
|
4
|
+
const MenuPage = observer(function MenuPage({ onClose, contextCoord, model, }) {
|
|
5
5
|
const items = model.contextMenuItems();
|
|
6
6
|
return (_jsx(Menu, { open: items.length > 0, onMenuItemClick: (_, callback) => {
|
|
7
7
|
callback();
|