@genome-spy/core 0.37.4 → 0.38.0
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/dist/bundle/__vite-browser-external-ENoMJThg.js +8 -0
- package/dist/bundle/_commonjsHelpers-QtkX90xp.js +30 -0
- package/dist/bundle/index-1QVesMzU.js +1074 -0
- package/dist/bundle/index-Cbz74kpR.js +638 -0
- package/dist/bundle/index-LD6yPc3X.js +515 -0
- package/dist/bundle/index-Pv3tKJ1W.js +2190 -0
- package/dist/bundle/index-UyrC0vvF.js +72 -0
- package/dist/bundle/index-Y-LdHNIz.js +501 -0
- package/dist/bundle/index-gn8bhQ8w.js +4050 -0
- package/dist/bundle/index-lmJu1tfP.js +1372 -0
- package/dist/bundle/index-z4Cs62EO.js +279 -0
- package/dist/bundle/index.es.js +6448 -20571
- package/dist/bundle/index.js +93 -112
- package/dist/bundle/long-Veu0zKh9.js +2382 -0
- package/dist/bundle/remoteFile-Ur-gRKsH.js +96 -0
- package/dist/schema.json +492 -108
- package/dist/src/data/collector.d.ts +11 -11
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +8 -8
- package/dist/src/data/dataFlow.d.ts +18 -18
- package/dist/src/data/dataFlow.d.ts.map +1 -1
- package/dist/src/data/dataFlow.js +7 -7
- package/dist/src/data/flowNode.d.ts +9 -9
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +5 -5
- package/dist/src/data/flowOptimizer.d.ts +11 -11
- package/dist/src/data/flowOptimizer.d.ts.map +1 -1
- package/dist/src/data/flowOptimizer.js +7 -7
- package/dist/src/data/flowTestUtils.d.ts +2 -2
- package/dist/src/data/flowTestUtils.d.ts.map +1 -1
- package/dist/src/data/flowTestUtils.js +1 -1
- package/dist/src/data/sources/dataSource.js +1 -1
- package/dist/src/data/sources/dataSourceFactory.d.ts +3 -3
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +20 -20
- package/dist/src/data/sources/dataUtils.d.ts +20 -20
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +11 -11
- package/dist/src/data/sources/dynamic/axisGenomeSource.d.ts +3 -3
- package/dist/src/data/sources/dynamic/axisGenomeSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/axisGenomeSource.js +2 -2
- package/dist/src/data/sources/dynamic/axisTickSource.d.ts +6 -6
- package/dist/src/data/sources/dynamic/axisTickSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/axisTickSource.js +4 -4
- package/dist/src/data/sources/dynamic/bamSource.d.ts +7 -13
- package/dist/src/data/sources/dynamic/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bamSource.js +35 -27
- package/dist/src/data/sources/dynamic/bigBedSource.d.ts +9 -9
- package/dist/src/data/sources/dynamic/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bigBedSource.js +31 -18
- package/dist/src/data/sources/dynamic/bigWigSource.d.ts +7 -7
- package/dist/src/data/sources/dynamic/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bigWigSource.js +33 -26
- package/dist/src/data/sources/dynamic/gff3Source.d.ts +9 -0
- package/dist/src/data/sources/dynamic/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/gff3Source.js +17 -2
- package/dist/src/data/sources/dynamic/indexedFastaSource.d.ts +6 -9
- package/dist/src/data/sources/dynamic/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/indexedFastaSource.js +28 -18
- package/dist/src/data/sources/dynamic/singleAxisLazySource.d.ts +10 -10
- package/dist/src/data/sources/dynamic/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/singleAxisLazySource.js +6 -6
- package/dist/src/data/sources/dynamic/tabixSource.d.ts +11 -8
- package/dist/src/data/sources/dynamic/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/tabixSource.js +31 -17
- package/dist/src/data/sources/inlineSource.d.ts +7 -7
- package/dist/src/data/sources/inlineSource.d.ts.map +1 -1
- package/dist/src/data/sources/inlineSource.js +5 -5
- package/dist/src/data/sources/namedSource.d.ts +9 -9
- package/dist/src/data/sources/namedSource.d.ts.map +1 -1
- package/dist/src/data/sources/namedSource.js +6 -6
- package/dist/src/data/sources/sequenceSource.d.ts +7 -7
- package/dist/src/data/sources/sequenceSource.d.ts.map +1 -1
- package/dist/src/data/sources/sequenceSource.js +4 -4
- package/dist/src/data/sources/urlSource.d.ts +7 -7
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +4 -4
- package/dist/src/data/transforms/aggregate.d.ts +3 -3
- package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregate.js +2 -2
- package/dist/src/data/transforms/clone.d.ts +2 -2
- package/dist/src/data/transforms/clone.d.ts.map +1 -1
- package/dist/src/data/transforms/clone.js +1 -1
- package/dist/src/data/transforms/coverage.d.ts +3 -3
- package/dist/src/data/transforms/coverage.d.ts.map +1 -1
- package/dist/src/data/transforms/coverage.js +1 -1
- package/dist/src/data/transforms/coverage.test.js +1 -1
- package/dist/src/data/transforms/filter.d.ts +3 -3
- package/dist/src/data/transforms/filter.d.ts.map +1 -1
- package/dist/src/data/transforms/filter.js +2 -2
- package/dist/src/data/transforms/filter.test.js +1 -1
- package/dist/src/data/transforms/filterScoredLabels.d.ts +4 -4
- package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
- package/dist/src/data/transforms/filterScoredLabels.js +3 -3
- package/dist/src/data/transforms/flatten.d.ts +2 -2
- package/dist/src/data/transforms/flatten.d.ts.map +1 -1
- package/dist/src/data/transforms/flatten.js +3 -3
- package/dist/src/data/transforms/flatten.test.js +6 -6
- package/dist/src/data/transforms/flattenCompressedExons.d.ts +2 -2
- package/dist/src/data/transforms/flattenCompressedExons.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenCompressedExons.js +1 -1
- package/dist/src/data/transforms/flattenDelimited.d.ts +2 -2
- package/dist/src/data/transforms/flattenDelimited.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenDelimited.js +2 -2
- package/dist/src/data/transforms/flattenDelimited.test.js +5 -5
- package/dist/src/data/transforms/flattenSequence.d.ts +2 -2
- package/dist/src/data/transforms/flattenSequence.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenSequence.js +1 -1
- package/dist/src/data/transforms/flattenSequence.test.js +1 -1
- package/dist/src/data/transforms/formula.d.ts +3 -3
- package/dist/src/data/transforms/formula.d.ts.map +1 -1
- package/dist/src/data/transforms/formula.js +2 -2
- package/dist/src/data/transforms/identifier.d.ts +3 -3
- package/dist/src/data/transforms/identifier.d.ts.map +1 -1
- package/dist/src/data/transforms/identifier.js +2 -2
- package/dist/src/data/transforms/linearizeGenomicCoordinate.d.ts +3 -3
- package/dist/src/data/transforms/linearizeGenomicCoordinate.d.ts.map +1 -1
- package/dist/src/data/transforms/linearizeGenomicCoordinate.js +2 -2
- package/dist/src/data/transforms/measureText.d.ts +2 -2
- package/dist/src/data/transforms/measureText.d.ts.map +1 -1
- package/dist/src/data/transforms/measureText.js +1 -1
- package/dist/src/data/transforms/pileup.d.ts +3 -3
- package/dist/src/data/transforms/pileup.d.ts.map +1 -1
- package/dist/src/data/transforms/pileup.js +1 -1
- package/dist/src/data/transforms/pileup.test.js +1 -1
- package/dist/src/data/transforms/project.d.ts +2 -2
- package/dist/src/data/transforms/project.d.ts.map +1 -1
- package/dist/src/data/transforms/project.js +1 -1
- package/dist/src/data/transforms/project.test.js +1 -1
- package/dist/src/data/transforms/regexExtract.d.ts +2 -2
- package/dist/src/data/transforms/regexExtract.d.ts.map +1 -1
- package/dist/src/data/transforms/regexExtract.js +1 -1
- package/dist/src/data/transforms/regexExtract.test.js +3 -3
- package/dist/src/data/transforms/regexFold.d.ts +2 -2
- package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
- package/dist/src/data/transforms/regexFold.js +2 -2
- package/dist/src/data/transforms/regexFold.test.js +3 -3
- package/dist/src/data/transforms/sample.d.ts +2 -2
- package/dist/src/data/transforms/sample.d.ts.map +1 -1
- package/dist/src/data/transforms/sample.js +2 -2
- package/dist/src/data/transforms/stack.d.ts +3 -3
- package/dist/src/data/transforms/stack.d.ts.map +1 -1
- package/dist/src/data/transforms/stack.js +2 -2
- package/dist/src/data/transforms/stack.test.js +2 -2
- package/dist/src/data/transforms/transformFactory.d.ts +5 -5
- package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
- package/dist/src/data/transforms/transformFactory.js +3 -3
- package/dist/src/encoder/accessor.d.ts +6 -6
- package/dist/src/encoder/accessor.d.ts.map +1 -1
- package/dist/src/encoder/accessor.js +4 -4
- package/dist/src/encoder/encoder.d.ts +59 -59
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +40 -40
- package/dist/src/encoder/encoder.test.js +4 -4
- package/dist/src/fonts/bmFontManager.d.ts +7 -7
- package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
- package/dist/src/fonts/bmFontManager.js +3 -3
- package/dist/src/fonts/bmFontMetrics.d.ts +6 -6
- package/dist/src/fonts/bmFontMetrics.d.ts.map +1 -1
- package/dist/src/fonts/bmFontMetrics.js +4 -4
- package/dist/src/genome/genome.d.ts +7 -7
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +2 -2
- package/dist/src/genome/genomeStore.d.ts +2 -2
- package/dist/src/genome/genomeStore.d.ts.map +1 -1
- package/dist/src/genome/genomeStore.js +1 -1
- package/dist/src/genome/locusFormat.d.ts +7 -7
- package/dist/src/genome/locusFormat.d.ts.map +1 -1
- package/dist/src/genome/locusFormat.js +4 -4
- package/dist/src/genome/scaleIndex.d.ts +1 -1
- package/dist/src/genome/scaleIndex.d.ts.map +1 -1
- package/dist/src/genome/scaleIndex.js +1 -1
- package/dist/src/genome/scaleLocus.d.ts +2 -2
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +3 -3
- package/dist/src/genomeSpy.d.ts +12 -12
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +51 -34
- package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.d.ts +18 -18
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +10 -10
- package/dist/src/gl/webGLHelper.d.ts +4 -4
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/marks/link.js +5 -5
- package/dist/src/marks/mark.d.ts +35 -32
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +26 -23
- package/dist/src/marks/markUtils.d.ts +10 -10
- package/dist/src/marks/markUtils.d.ts.map +1 -1
- package/dist/src/marks/markUtils.js +5 -5
- package/dist/src/marks/pointMark.d.ts +1 -1
- package/dist/src/marks/pointMark.d.ts.map +1 -1
- package/dist/src/marks/pointMark.js +7 -7
- package/dist/src/marks/rectMark.d.ts +2 -2
- package/dist/src/marks/rectMark.d.ts.map +1 -1
- package/dist/src/marks/rectMark.js +7 -7
- package/dist/src/marks/rule.js +6 -6
- package/dist/src/marks/text.d.ts +1 -1
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +6 -6
- package/dist/src/scale/colorUtils.d.ts +4 -4
- package/dist/src/scale/colorUtils.d.ts.map +1 -1
- package/dist/src/scale/colorUtils.js +2 -2
- package/dist/src/scale/glslScaleGenerator.d.ts +3 -3
- package/dist/src/scale/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/scale/glslScaleGenerator.js +2 -2
- package/dist/src/scale/scale.d.ts +3 -3
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +2 -2
- package/dist/src/scale/ticks.d.ts +4 -4
- package/dist/src/scale/ticks.js +4 -4
- package/dist/src/spec/axis.d.ts +1 -1
- package/dist/src/spec/channel.d.ts +2 -2
- package/dist/src/spec/data.d.ts +2 -2
- package/dist/src/spec/mark.d.ts +3 -3
- package/dist/src/spec/root.d.ts +2 -2
- package/dist/src/spec/sampleView.d.ts +5 -5
- package/dist/src/spec/scale.d.ts +1 -1
- package/dist/src/spec/title.d.ts +1 -1
- package/dist/src/spec/view.d.ts +36 -9
- package/dist/src/tooltip/dataTooltipHandler.js +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.d.ts.map +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.js +1 -1
- package/dist/src/tooltip/tooltipHandler.d.ts +1 -1
- package/dist/src/tooltip/tooltipHandler.d.ts.map +1 -1
- package/dist/src/tooltip/tooltipHandler.ts +1 -1
- package/dist/src/types/embedApi.d.ts +3 -3
- package/dist/src/types/encoder.d.ts +4 -4
- package/dist/src/types/flowBatch.d.ts +1 -1
- package/dist/src/types/rendering.d.ts +3 -3
- package/dist/src/types/scaleResolutionApi.d.ts +2 -2
- package/dist/src/types/viewContext.d.ts +41 -12
- package/dist/src/utils/animator.d.ts +2 -2
- package/dist/src/utils/animator.d.ts.map +1 -1
- package/dist/src/utils/animator.js +1 -1
- package/dist/src/utils/inertia.d.ts +3 -3
- package/dist/src/utils/inertia.d.ts.map +1 -1
- package/dist/src/utils/inertia.js +1 -1
- package/dist/src/utils/interactionEvent.d.ts +5 -5
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +2 -2
- package/dist/src/utils/trees.js +1 -1
- package/dist/src/view/axisGridView.d.ts +17 -16
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +24 -20
- package/dist/src/view/axisResolution.d.ts +10 -10
- package/dist/src/view/axisResolution.d.ts.map +1 -1
- package/dist/src/view/axisResolution.js +6 -6
- package/dist/src/view/axisResolution.test.js +1 -1
- package/dist/src/view/axisView.d.ts +18 -17
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +39 -35
- package/dist/src/view/concatView.d.ts +5 -5
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +23 -23
- package/dist/src/view/containerView.d.ts +10 -8
- package/dist/src/view/containerView.d.ts.map +1 -1
- package/dist/src/view/containerView.js +18 -13
- package/dist/src/view/facetView.d.ts +12 -12
- package/dist/src/view/facetView.d.ts.map +1 -1
- package/dist/src/view/facetView.js +19 -19
- package/dist/src/view/flowBuilder.d.ts +4 -4
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +13 -13
- package/dist/src/view/flowBuilder.test.js +7 -7
- package/dist/src/view/gridView.d.ts +63 -35
- package/dist/src/view/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView.js +400 -113
- package/dist/src/view/layerView.d.ts +12 -14
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +55 -26
- package/dist/src/{utils → view}/layout/flexLayout.d.ts +6 -6
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/flexLayout.js +4 -4
- package/dist/src/view/layout/grid.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/padding.d.ts +4 -4
- package/dist/src/view/layout/padding.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/padding.js +2 -2
- package/dist/src/view/layout/point.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/rectangle.d.ts +8 -2
- package/dist/src/view/layout/rectangle.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/rectangle.js +22 -2
- package/dist/src/{utils → view}/layout/rectangle.test.js +8 -0
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts +10 -10
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +10 -10
- package/dist/src/view/renderingContext/compositeViewRenderingContext.d.ts +2 -2
- package/dist/src/view/renderingContext/compositeViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/compositeViewRenderingContext.js +4 -4
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.d.ts +4 -4
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.js +3 -3
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.d.ts +8 -8
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.js +4 -4
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts +6 -6
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/simpleViewRenderingContext.js +7 -7
- package/dist/src/view/renderingContext/svgViewRenderingContext.d.ts +4 -4
- package/dist/src/view/renderingContext/svgViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/svgViewRenderingContext.js +6 -6
- package/dist/src/view/renderingContext/viewRenderingContext.d.ts +10 -10
- package/dist/src/view/renderingContext/viewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/viewRenderingContext.js +5 -5
- package/dist/src/view/scaleResolution.d.ts +21 -17
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +29 -24
- package/dist/src/view/scaleResolution.test.js +57 -72
- package/dist/src/view/testUtils.d.ts +6 -15
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +40 -44
- package/dist/src/view/title.d.ts +3 -3
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +12 -12
- package/dist/src/view/unitView.d.ts +31 -30
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +30 -22
- package/dist/src/view/view.d.ts +86 -57
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +148 -103
- package/dist/src/view/view.test.js +9 -8
- package/dist/src/view/viewError.d.ts +9 -0
- package/dist/src/view/viewError.d.ts.map +1 -0
- package/dist/src/view/viewError.js +11 -0
- package/dist/src/view/viewFactory.d.ts +53 -20
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +148 -33
- package/dist/src/view/viewFactory.test.js +8 -0
- package/dist/src/view/viewUtils.d.ts +14 -12
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +10 -63
- package/dist/src/view/zoom.d.ts +4 -4
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +3 -3
- package/package.json +7 -5
- package/dist/src/utils/layout/flexLayout.d.ts.map +0 -1
- package/dist/src/utils/layout/grid.d.ts.map +0 -1
- package/dist/src/utils/layout/padding.d.ts.map +0 -1
- package/dist/src/utils/layout/point.d.ts.map +0 -1
- package/dist/src/utils/layout/rectangle.d.ts.map +0 -1
- package/dist/src/view/implicitRootView.d.ts +0 -9
- package/dist/src/view/implicitRootView.d.ts.map +0 -1
- package/dist/src/view/implicitRootView.js +0 -23
- package/dist/src/view/importView.d.ts +0 -17
- package/dist/src/view/importView.d.ts.map +0 -1
- package/dist/src/view/importView.js +0 -22
- /package/dist/src/{utils → view}/layout/flexLayout.test.js +0 -0
- /package/dist/src/{utils → view}/layout/grid.d.ts +0 -0
- /package/dist/src/{utils → view}/layout/grid.js +0 -0
- /package/dist/src/{utils → view}/layout/grid.test.js +0 -0
- /package/dist/src/{utils → view}/layout/point.d.ts +0 -0
- /package/dist/src/{utils → view}/layout/point.js +0 -0
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
export default class ConcatView extends GridView {
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
* @param {import("../spec/view").AnyConcatSpec} spec
|
|
8
|
-
* @param {import("../types/viewContext").default} context
|
|
9
|
-
* @param {import("./containerView").default} layoutParent
|
|
10
|
-
* @param {import("./view").default} dataParent
|
|
7
|
+
* @param {import("../spec/view.js").AnyConcatSpec} spec
|
|
8
|
+
* @param {import("../types/viewContext.js").default} context
|
|
9
|
+
* @param {import("./containerView.js").default} layoutParent
|
|
10
|
+
* @param {import("./view.js").default} dataParent
|
|
11
11
|
* @param {string} name
|
|
12
12
|
*/
|
|
13
|
-
constructor(spec: import("../spec/view").AnyConcatSpec, context: import("../types/viewContext").default, layoutParent: import("./containerView").default, dataParent: import("./view").default, name: string);
|
|
13
|
+
constructor(spec: import("../spec/view.js").AnyConcatSpec, context: import("../types/viewContext.js").default, layoutParent: import("./containerView.js").default, dataParent: import("./view.js").default, name: string);
|
|
14
14
|
}
|
|
15
15
|
import GridView from "./gridView.js";
|
|
16
16
|
//# sourceMappingURL=concatView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concatView.d.ts","sourceRoot":"","sources":["../../../src/view/concatView.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,kBANW,OAAO,
|
|
1
|
+
{"version":3,"file":"concatView.d.ts","sourceRoot":"","sources":["../../../src/view/concatView.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,kBANW,OAAO,iBAAiB,EAAE,aAAa,WACvC,OAAO,yBAAyB,EAAE,OAAO,gBACzC,OAAO,oBAAoB,EAAE,OAAO,cACpC,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,EAiBhB;CAqDJ;qBAlFoB,eAAe"}
|
|
@@ -7,10 +7,10 @@ import GridView from "./gridView.js";
|
|
|
7
7
|
export default class ConcatView extends GridView {
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
|
-
* @param {import("../spec/view").AnyConcatSpec} spec
|
|
11
|
-
* @param {import("../types/viewContext").default} context
|
|
12
|
-
* @param {import("./containerView").default} layoutParent
|
|
13
|
-
* @param {import("./view").default} dataParent
|
|
10
|
+
* @param {import("../spec/view.js").AnyConcatSpec} spec
|
|
11
|
+
* @param {import("../types/viewContext.js").default} context
|
|
12
|
+
* @param {import("./containerView.js").default} layoutParent
|
|
13
|
+
* @param {import("./view.js").default} dataParent
|
|
14
14
|
* @param {string} name
|
|
15
15
|
*/
|
|
16
16
|
constructor(spec, context, layoutParent, dataParent, name) {
|
|
@@ -30,7 +30,10 @@ export default class ConcatView extends GridView {
|
|
|
30
30
|
this.spec = spec;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @override
|
|
35
|
+
*/
|
|
36
|
+
async initializeChildren() {
|
|
34
37
|
const spec = this.spec;
|
|
35
38
|
const childSpecs = isConcatSpec(spec)
|
|
36
39
|
? spec.concat
|
|
@@ -39,17 +42,25 @@ export default class ConcatView extends GridView {
|
|
|
39
42
|
: spec.hconcat;
|
|
40
43
|
|
|
41
44
|
this.setChildren(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
await Promise.all(
|
|
46
|
+
childSpecs.map((childSpec, i) =>
|
|
47
|
+
this.context.createOrImportView(
|
|
48
|
+
childSpec,
|
|
49
|
+
this,
|
|
50
|
+
this,
|
|
51
|
+
"grid" + i
|
|
52
|
+
)
|
|
53
|
+
)
|
|
45
54
|
)
|
|
46
55
|
);
|
|
56
|
+
|
|
57
|
+
await this.createAxes();
|
|
47
58
|
}
|
|
48
59
|
|
|
49
60
|
/**
|
|
50
|
-
* @param {import("../spec/channel").Channel} channel
|
|
51
|
-
* @param {import("../spec/view").ResolutionTarget} resolutionType
|
|
52
|
-
* @returns {import("../spec/view").ResolutionBehavior}
|
|
61
|
+
* @param {import("../spec/channel.js").Channel} channel
|
|
62
|
+
* @param {import("../spec/view.js").ResolutionTarget} resolutionType
|
|
63
|
+
* @returns {import("../spec/view.js").ResolutionBehavior}
|
|
53
64
|
*/
|
|
54
65
|
getDefaultResolution(channel, resolutionType) {
|
|
55
66
|
if (resolutionType == "axis") {
|
|
@@ -65,18 +76,7 @@ export default class ConcatView extends GridView {
|
|
|
65
76
|
(isVConcatSpec(this.spec) && channel === "x") ||
|
|
66
77
|
(isHConcatSpec(this.spec) && channel === "y")
|
|
67
78
|
) {
|
|
68
|
-
|
|
69
|
-
this.children
|
|
70
|
-
.map((child) => child.getEncoding()[channel])
|
|
71
|
-
.filter((x) => x)
|
|
72
|
-
.map((e) => "type" in e && e.type)
|
|
73
|
-
.filter((type) => type)
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
return types.size === 1 &&
|
|
77
|
-
(types.has("index") || types.has("locus"))
|
|
78
|
-
? "shared"
|
|
79
|
-
: "independent";
|
|
79
|
+
return "shared";
|
|
80
80
|
} else {
|
|
81
81
|
return "independent";
|
|
82
82
|
}
|
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
export default class ContainerView extends View {
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
* @param {import("../spec/view").ContainerSpec} spec
|
|
8
|
-
* @param {import("../types/viewContext").default} context
|
|
7
|
+
* @param {import("../spec/view.js").ContainerSpec} spec
|
|
8
|
+
* @param {import("../types/viewContext.js").default} context
|
|
9
9
|
* @param {ContainerView} layoutParent
|
|
10
|
-
* @param {import("./view").default} dataParent
|
|
10
|
+
* @param {import("./view.js").default} dataParent
|
|
11
11
|
* @param {string} name
|
|
12
|
+
* @param {import("./view.js").ViewOptions} [options]
|
|
12
13
|
*/
|
|
13
|
-
constructor(spec: import("../spec/view").ContainerSpec, context: import("../types/viewContext").default, layoutParent: ContainerView, dataParent: import("./view").default, name: string);
|
|
14
|
-
spec: import("../spec/view").ContainerSpec;
|
|
14
|
+
constructor(spec: import("../spec/view.js").ContainerSpec, context: import("../types/viewContext.js").default, layoutParent: ContainerView, dataParent: import("./view.js").default, name: string, options?: import("./view.js").ViewOptions);
|
|
15
|
+
spec: import("../spec/view.js").ContainerSpec;
|
|
16
|
+
initializeChildren(): Promise<void>;
|
|
15
17
|
/**
|
|
16
18
|
* Replaces a child view with another one. Does not alter the old or new child.
|
|
17
19
|
*
|
|
18
|
-
* @param {import("./view").default} child
|
|
19
|
-
* @param {import("./view").default} replacement
|
|
20
|
+
* @param {import("./view.js").default} child
|
|
21
|
+
* @param {import("./view.js").default} replacement
|
|
20
22
|
*/
|
|
21
|
-
replaceChild(child: import("./view").default, replacement: import("./view").default): void;
|
|
23
|
+
replaceChild(child: import("./view.js").default, replacement: import("./view.js").default): void;
|
|
22
24
|
/**
|
|
23
25
|
* @param {string[]} path An array of view names
|
|
24
26
|
* @returns {View}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerView.d.ts","sourceRoot":"","sources":["../../../src/view/containerView.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI
|
|
1
|
+
{"version":3,"file":"containerView.d.ts","sourceRoot":"","sources":["../../../src/view/containerView.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI;;;;;;;;OAQG;IACH,kBAPW,OAAO,iBAAiB,EAAE,aAAa,WACvC,OAAO,yBAAyB,EAAE,OAAO,gBACzC,aAAa,cACb,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,YACN,OAAO,WAAW,EAAE,WAAW,EAMzC;IADG,8CAAgB;IAGpB,oCAEC;IASD;;;;;OAKG;IACH,oBAHW,OAAO,WAAW,EAAE,OAAO,eAC3B,OAAO,WAAW,EAAE,OAAO,QAIrC;IA+CD;;;OAGG;IACH,2BAHW,MAAM,EAAE,GACN,IAAI,CAYhB;IAED;;;OAGG;IACH,sBAFW,MAAM,QAQhB;IAED;;;OAGG;IACH,2BAFW,MAAM,QAchB;IA1GD;;OAEG;IACH,qBAFa,iBAAiB,IAAI,CAAC,CAIlC;CA+GJ;iBA7I4C,WAAW"}
|
|
@@ -6,18 +6,23 @@ import View, { VISIT_STOP, VISIT_SKIP } from "./view.js";
|
|
|
6
6
|
export default class ContainerView extends View {
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
|
-
* @param {import("../spec/view").ContainerSpec} spec
|
|
10
|
-
* @param {import("../types/viewContext").default} context
|
|
9
|
+
* @param {import("../spec/view.js").ContainerSpec} spec
|
|
10
|
+
* @param {import("../types/viewContext.js").default} context
|
|
11
11
|
* @param {ContainerView} layoutParent
|
|
12
|
-
* @param {import("./view").default} dataParent
|
|
12
|
+
* @param {import("./view.js").default} dataParent
|
|
13
13
|
* @param {string} name
|
|
14
|
+
* @param {import("./view.js").ViewOptions} [options]
|
|
14
15
|
*/
|
|
15
|
-
constructor(spec, context, layoutParent, dataParent, name) {
|
|
16
|
-
super(spec, context, layoutParent, dataParent, name);
|
|
16
|
+
constructor(spec, context, layoutParent, dataParent, name, options) {
|
|
17
|
+
super(spec, context, layoutParent, dataParent, name, options);
|
|
17
18
|
|
|
18
19
|
this.spec = spec;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
async initializeChildren() {
|
|
23
|
+
// override
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
27
|
* @returns {IterableIterator<View>}
|
|
23
28
|
*/
|
|
@@ -28,8 +33,8 @@ export default class ContainerView extends View {
|
|
|
28
33
|
/**
|
|
29
34
|
* Replaces a child view with another one. Does not alter the old or new child.
|
|
30
35
|
*
|
|
31
|
-
* @param {import("./view").default} child
|
|
32
|
-
* @param {import("./view").default} replacement
|
|
36
|
+
* @param {import("./view.js").default} child
|
|
37
|
+
* @param {import("./view.js").default} replacement
|
|
33
38
|
*/
|
|
34
39
|
replaceChild(child, replacement) {
|
|
35
40
|
throw new Error("Not implemented");
|
|
@@ -40,11 +45,11 @@ export default class ContainerView extends View {
|
|
|
40
45
|
* the value if the visitor returns a defined value. The `afterChildren` callback
|
|
41
46
|
* allows for post-order traversal
|
|
42
47
|
*
|
|
43
|
-
* @param {import("./view").Visitor} visitor
|
|
44
|
-
* @returns {import("./view").VisitResult}
|
|
48
|
+
* @param {import("./view.js").Visitor} visitor
|
|
49
|
+
* @returns {import("./view.js").VisitResult}
|
|
45
50
|
*/
|
|
46
51
|
visit(visitor) {
|
|
47
|
-
/** @type {import("./view").VisitResult}*/
|
|
52
|
+
/** @type {import("./view.js").VisitResult}*/
|
|
48
53
|
let result;
|
|
49
54
|
try {
|
|
50
55
|
result = visitor(this);
|
|
@@ -127,9 +132,9 @@ export default class ContainerView extends View {
|
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
/**
|
|
130
|
-
* @param {import("../spec/channel").Channel} channel
|
|
131
|
-
* @param {import("../spec/view").ResolutionTarget} resolutionType
|
|
132
|
-
* @returns {import("../spec/view").ResolutionBehavior}
|
|
135
|
+
* @param {import("../spec/channel.js").Channel} channel
|
|
136
|
+
* @param {import("../spec/view.js").ResolutionTarget} resolutionType
|
|
137
|
+
* @returns {import("../spec/view.js").ResolutionBehavior}
|
|
133
138
|
*/
|
|
134
139
|
getDefaultResolution(channel, resolutionType) {
|
|
135
140
|
return "shared";
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export default class FacetView extends ContainerView {
|
|
17
17
|
/**
|
|
18
|
-
* @typedef {import("./view").default} View
|
|
19
|
-
* @typedef {import("./layerView").default} LayerView
|
|
20
|
-
* @typedef {import("./viewUtils").FacetFieldDef} FacetFieldDef
|
|
21
|
-
* @typedef {import("./viewUtils").FacetMapping} FacetMapping
|
|
22
|
-
* @typedef {import("
|
|
23
|
-
* @typedef {import("
|
|
18
|
+
* @typedef {import("./view.js").default} View
|
|
19
|
+
* @typedef {import("./layerView.js").default} LayerView
|
|
20
|
+
* @typedef {import("./viewUtils.js").FacetFieldDef} FacetFieldDef
|
|
21
|
+
* @typedef {import("./viewUtils.js").FacetMapping} FacetMapping
|
|
22
|
+
* @typedef {import("./layout/flexLayout.js").LocSize} LocSize
|
|
23
|
+
* @typedef {import("./layout/flexLayout.js").SizeDef} SizeDef
|
|
24
24
|
*/
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
|
-
* @param {import("./viewUtils").FacetSpec} spec
|
|
28
|
-
* @param {import("./viewUtils").ViewContext} context
|
|
27
|
+
* @param {import("./viewUtils.js").FacetSpec} spec
|
|
28
|
+
* @param {import("./viewUtils.js").ViewContext} context
|
|
29
29
|
* @param {ContainerView} parent
|
|
30
30
|
* @param {string} name
|
|
31
31
|
*/
|
|
@@ -50,11 +50,11 @@ export default class FacetView extends ContainerView {
|
|
|
50
50
|
updateLabels(): void;
|
|
51
51
|
getFacetGroups(): any[];
|
|
52
52
|
/**
|
|
53
|
-
* @param {import("./renderingContext/viewRenderingContext").default} context
|
|
54
|
-
* @param {import("
|
|
55
|
-
* @param {import("./view").RenderingOptions} [options]
|
|
53
|
+
* @param {import("./renderingContext/viewRenderingContext.js").default} context
|
|
54
|
+
* @param {import("./layout/rectangle.js").default} coords
|
|
55
|
+
* @param {import("./view.js").RenderingOptions} [options]
|
|
56
56
|
*/
|
|
57
|
-
render(context: import("./renderingContext/viewRenderingContext").default, coords: import("
|
|
57
|
+
render(context: import("./renderingContext/viewRenderingContext.js").default, coords: import("./layout/rectangle.js").default, options?: any): void;
|
|
58
58
|
_labelsUpdated: boolean;
|
|
59
59
|
}
|
|
60
60
|
export type FacetChannel = "column" | "row";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facetView.d.ts","sourceRoot":"","sources":["../../../src/view/facetView.js"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;GAcG;AACH;IACI;;;;;;;OAOG;IACH;;;;;;OAMG;IACH,6CAHW,aAAa,QACb,MAAM,EA8BhB;IAzBG,UAAgB;IAEhB,WAEC;IAED;;;;OAIG;IACH,aAFU,OAAO,YAAY,EAAE,QAAQ,CAAC,CAYvC;IAED,oDAAoD;IACpD,kBADY,OAAO,YAAY,EAAE,cAAc,CAAC,CACa;IA2BjE,sBAIC;IAED;;;OAGG;IACH,qBAFW,KAAK,GAAG,QAAQ,0CAwB1B;IAED,qBAyCC;IAED,qBASC;IA6BD,wBAgBC;IAOD;;;;OAIG;IACH,gBAJW,OAAO,
|
|
1
|
+
{"version":3,"file":"facetView.d.ts","sourceRoot":"","sources":["../../../src/view/facetView.js"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;GAcG;AACH;IACI;;;;;;;OAOG;IACH;;;;;;OAMG;IACH,6CAHW,aAAa,QACb,MAAM,EA8BhB;IAzBG,UAAgB;IAEhB,WAEC;IAED;;;;OAIG;IACH,aAFU,OAAO,YAAY,EAAE,QAAQ,CAAC,CAYvC;IAED,oDAAoD;IACpD,kBADY,OAAO,YAAY,EAAE,cAAc,CAAC,CACa;IA2BjE,sBAIC;IAED;;;OAGG;IACH,qBAFW,KAAK,GAAG,QAAQ,0CAwB1B;IAED,qBAyCC;IAED,qBASC;IA6BD,wBAgBC;IAOD;;;;OAIG;IACH,gBAJW,OAAO,4CAA4C,EAAE,OAAO,UAC5D,OAAO,uBAAuB,EAAE,OAAO,uBA4LjD;IA3KO,wBAA0B;CA4KrC;2BA/bY,QAAQ,GAAG,KAAK;;;;;;aA4CnB,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE;;;0BA1Df,oBAAoB;qBACzB,eAAe"}
|
|
@@ -5,13 +5,13 @@ import { isFacetFieldDef, isFacetMapping } from "./viewUtils.js";
|
|
|
5
5
|
import ContainerView from "./containerView.js";
|
|
6
6
|
import UnitView from "./unitView.js";
|
|
7
7
|
import { cross } from "d3-array";
|
|
8
|
-
import { mapToPixelCoords } from "
|
|
8
|
+
import { mapToPixelCoords } from "./layout/flexLayout.js";
|
|
9
9
|
import { OrdinalDomain } from "../utils/domainArray.js";
|
|
10
|
-
import Rectangle from "
|
|
10
|
+
import Rectangle from "./layout/rectangle.js";
|
|
11
11
|
import coalesce from "../utils/coalesce.js";
|
|
12
12
|
import { field as vegaField } from "vega-util";
|
|
13
13
|
import DecoratorView from "./decoratorView.js";
|
|
14
|
-
import Padding from "
|
|
14
|
+
import Padding from "./layout/padding.js";
|
|
15
15
|
|
|
16
16
|
const DEFAULT_SPACING = 20;
|
|
17
17
|
|
|
@@ -66,17 +66,17 @@ const headerConfigs = {
|
|
|
66
66
|
*/
|
|
67
67
|
export default class FacetView extends ContainerView {
|
|
68
68
|
/**
|
|
69
|
-
* @typedef {import("./view").default} View
|
|
70
|
-
* @typedef {import("./layerView").default} LayerView
|
|
71
|
-
* @typedef {import("./viewUtils").FacetFieldDef} FacetFieldDef
|
|
72
|
-
* @typedef {import("./viewUtils").FacetMapping} FacetMapping
|
|
73
|
-
* @typedef {import("
|
|
74
|
-
* @typedef {import("
|
|
69
|
+
* @typedef {import("./view.js").default} View
|
|
70
|
+
* @typedef {import("./layerView.js").default} LayerView
|
|
71
|
+
* @typedef {import("./viewUtils.js").FacetFieldDef} FacetFieldDef
|
|
72
|
+
* @typedef {import("./viewUtils.js").FacetMapping} FacetMapping
|
|
73
|
+
* @typedef {import("./layout/flexLayout.js").LocSize} LocSize
|
|
74
|
+
* @typedef {import("./layout/flexLayout.js").SizeDef} SizeDef
|
|
75
75
|
*/
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
|
-
* @param {import("./viewUtils").FacetSpec} spec
|
|
79
|
-
* @param {import("./viewUtils").ViewContext} context
|
|
78
|
+
* @param {import("./viewUtils.js").FacetSpec} spec
|
|
79
|
+
* @param {import("./viewUtils.js").ViewContext} context
|
|
80
80
|
* @param {ContainerView} parent
|
|
81
81
|
* @param {string} name
|
|
82
82
|
*/
|
|
@@ -121,8 +121,8 @@ export default class FacetView extends ContainerView {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
* @param {import("./view").default} child
|
|
125
|
-
* @param {import("./view").default} replacement
|
|
124
|
+
* @param {import("./view.js").default} child
|
|
125
|
+
* @param {import("./view.js").default} replacement
|
|
126
126
|
*/
|
|
127
127
|
replaceChild(child, replacement) {
|
|
128
128
|
if (child !== this.child) {
|
|
@@ -145,7 +145,7 @@ export default class FacetView extends ContainerView {
|
|
|
145
145
|
* @param {"row" | "column"} channel
|
|
146
146
|
*/
|
|
147
147
|
getAccessor(channel) {
|
|
148
|
-
/** @type {import("./viewUtils").FacetMapping} */
|
|
148
|
+
/** @type {import("./viewUtils.js").FacetMapping} */
|
|
149
149
|
let facetMapping;
|
|
150
150
|
if (isFacetMapping(this.spec.facet)) {
|
|
151
151
|
facetMapping = this.spec.facet; // Mark provides encodings with defaults and possible modifications
|
|
@@ -169,7 +169,7 @@ export default class FacetView extends ContainerView {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
updateFacets() {
|
|
172
|
-
/** @type {import("./viewUtils").FacetMapping} */
|
|
172
|
+
/** @type {import("./viewUtils.js").FacetMapping} */
|
|
173
173
|
let facetMapping;
|
|
174
174
|
if (isFacetMapping(this.spec.facet)) {
|
|
175
175
|
facetMapping = this.spec.facet; // Mark provides encodings with defaults and possible modifications
|
|
@@ -273,9 +273,9 @@ export default class FacetView extends ContainerView {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
/**
|
|
276
|
-
* @param {import("./renderingContext/viewRenderingContext").default} context
|
|
277
|
-
* @param {import("
|
|
278
|
-
* @param {import("./view").RenderingOptions} [options]
|
|
276
|
+
* @param {import("./renderingContext/viewRenderingContext.js").default} context
|
|
277
|
+
* @param {import("./layout/rectangle.js").default} coords
|
|
278
|
+
* @param {import("./view.js").RenderingOptions} [options]
|
|
279
279
|
*/
|
|
280
280
|
render(context, coords, options = {}) {
|
|
281
281
|
if (!this.isConfiguredVisible()) {
|
|
@@ -471,7 +471,7 @@ export default class FacetView extends ContainerView {
|
|
|
471
471
|
function createLabelViewSpec(headerConfig) {
|
|
472
472
|
// TODO: Support styling: https://vega.github.io/vega-lite/docs/header.html#labels
|
|
473
473
|
|
|
474
|
-
/** @type {import("./viewUtils").UnitSpec} */
|
|
474
|
+
/** @type {import("./viewUtils.js").UnitSpec} */
|
|
475
475
|
const titleView = {
|
|
476
476
|
data: {
|
|
477
477
|
values: [],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param {DataFlow<View>} [existingFlow] Add data flow
|
|
4
4
|
* graphs to an existing DataFlow object.
|
|
5
5
|
*/
|
|
6
|
-
export function buildDataFlow(root: import("./view").default, existingFlow?: DataFlow<import("./view").default>): DataFlow<import("./view").default>;
|
|
6
|
+
export function buildDataFlow(root: import("./view.js").default, existingFlow?: DataFlow<import("./view.js").default>): DataFlow<import("./view.js").default>;
|
|
7
7
|
/**
|
|
8
8
|
* Changes the ChromPos channelDefs into FieldDefs and returns
|
|
9
9
|
* LinearizeGenomicCoordinate transform(s) that should be inserted into
|
|
@@ -11,9 +11,9 @@ export function buildDataFlow(root: import("./view").default, existingFlow?: Dat
|
|
|
11
11
|
*
|
|
12
12
|
* @param {View} view
|
|
13
13
|
*/
|
|
14
|
-
export function linearizeLocusAccess(view: import("./view").default): {
|
|
14
|
+
export function linearizeLocusAccess(view: import("./view.js").default): {
|
|
15
15
|
transforms: import("../data/flowNode.js").default[];
|
|
16
|
-
rewrittenEncoding: import("../spec/channel").Encoding<string>;
|
|
16
|
+
rewrittenEncoding: import("../spec/channel.js").Encoding<string>;
|
|
17
17
|
/**
|
|
18
18
|
* Should be called after the whole flow has been created in order to
|
|
19
19
|
* not disrupt inheritance of encodings
|
|
@@ -30,7 +30,7 @@ export function linearizeLocusAccess(view: import("./view").default): {
|
|
|
30
30
|
export function createChain<H extends import("../data/flowNode.js").default>(dataSource: H, ...transforms: import("../data/flowNode.js").default[]): {
|
|
31
31
|
dataSource: H;
|
|
32
32
|
collector: Collector;
|
|
33
|
-
loadAndCollect: () => Promise<Iterable<import("../data/flowNode").Datum>>;
|
|
33
|
+
loadAndCollect: () => Promise<Iterable<import("../data/flowNode.js").Datum>>;
|
|
34
34
|
};
|
|
35
35
|
import DataFlow from "../data/dataFlow.js";
|
|
36
36
|
import Collector from "../data/collector.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowBuilder.d.ts","sourceRoot":"","sources":["../../../src/view/flowBuilder.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"flowBuilder.d.ts","sourceRoot":"","sources":["../../../src/view/flowBuilder.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,8JAkKC;AAED;;;;;;GAMG;AACH;;;IAgGc;;;OAGG;;EAYhB;AA0BD;;;;;;GAMG;AACH;;;0BAqB0B,QAAQ,SAAS,OAAO,qBAAqB,EAAE,KAAK,CAAC,CAAC;EAkB/E;qBAxXoB,qBAAqB;sBANpB,sBAAsB"}
|
|
@@ -28,8 +28,8 @@ import { nodesToTreesWithAccessor, visitTree } from "../utils/trees.js";
|
|
|
28
28
|
*/
|
|
29
29
|
export function buildDataFlow(root, existingFlow) {
|
|
30
30
|
/**
|
|
31
|
-
* @typedef {import("./view").default} View
|
|
32
|
-
* @typedef {import("../data/flowNode").default} FlowNode
|
|
31
|
+
* @typedef {import("./view.js").default} View
|
|
32
|
+
* @typedef {import("../data/flowNode.js").default} FlowNode
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
/** @type {FlowNode[]} "Current nodes" on the path from view root to the current view */
|
|
@@ -80,7 +80,7 @@ export function buildDataFlow(root, existingFlow) {
|
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
*
|
|
83
|
-
* @param {import("../spec/transform").TransformParams[]} transforms
|
|
83
|
+
* @param {import("../spec/transform.js").TransformParams[]} transforms
|
|
84
84
|
* @param {View} view
|
|
85
85
|
*/
|
|
86
86
|
function createTransforms(transforms, view) {
|
|
@@ -199,10 +199,10 @@ export function buildDataFlow(root, existingFlow) {
|
|
|
199
199
|
*/
|
|
200
200
|
export function linearizeLocusAccess(view) {
|
|
201
201
|
/**
|
|
202
|
-
* @typedef {import("./view").default} View
|
|
203
|
-
* @typedef {import("../data/flowNode").default} FlowNode
|
|
204
|
-
* @typedef {import("../spec/channel").Channel} Channel
|
|
205
|
-
* @typedef {import("../spec/channel").Encoding} Encoding
|
|
202
|
+
* @typedef {import("./view.js").default} View
|
|
203
|
+
* @typedef {import("../data/flowNode.js").default} FlowNode
|
|
204
|
+
* @typedef {import("../spec/channel.js").Channel} Channel
|
|
205
|
+
* @typedef {import("../spec/channel.js").Encoding} Encoding
|
|
206
206
|
*/
|
|
207
207
|
|
|
208
208
|
/** @type {FlowNode[]} */
|
|
@@ -211,7 +211,7 @@ export function linearizeLocusAccess(view) {
|
|
|
211
211
|
/** @type {Encoding} */
|
|
212
212
|
const rewrittenEncoding = {};
|
|
213
213
|
|
|
214
|
-
/** @type {{ channel: Channel, chromPosDef: import("../spec/channel").ChromPosDef}[]} */
|
|
214
|
+
/** @type {{ channel: Channel, chromPosDef: import("../spec/channel.js").ChromPosDef}[]} */
|
|
215
215
|
const channelsAndChromPosDefs = [];
|
|
216
216
|
|
|
217
217
|
// Optimize the number of transforms. Use only a single transform for positions
|
|
@@ -311,9 +311,9 @@ export function linearizeLocusAccess(view) {
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
/**
|
|
314
|
-
* @param {import("./view").default} view
|
|
315
|
-
* @param {import("../spec/channel").Encoding} [encoding]
|
|
316
|
-
* @returns {import("../spec/transform").CompareParams}
|
|
314
|
+
* @param {import("./view.js").default} view
|
|
315
|
+
* @param {import("../spec/channel.js").Encoding} [encoding]
|
|
316
|
+
* @returns {import("../spec/transform.js").CompareParams}
|
|
317
317
|
*/
|
|
318
318
|
function getCompareParamsForView(view, encoding) {
|
|
319
319
|
// TODO: Should sort by min(x, x2).
|
|
@@ -343,7 +343,7 @@ function getCompareParamsForView(view, encoding) {
|
|
|
343
343
|
*/
|
|
344
344
|
export function createChain(dataSource, ...transforms) {
|
|
345
345
|
/**
|
|
346
|
-
* @typedef {import("../data/flowNode").default} FlowNode
|
|
346
|
+
* @typedef {import("../data/flowNode.js").default} FlowNode
|
|
347
347
|
*/
|
|
348
348
|
/** @type {FlowNode} */
|
|
349
349
|
let node = dataSource;
|
|
@@ -362,7 +362,7 @@ export function createChain(dataSource, ...transforms) {
|
|
|
362
362
|
node.addChild(collector);
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
/** @type {function():Promise<Iterable<import("../data/flowNode").Datum>>} */
|
|
365
|
+
/** @type {function():Promise<Iterable<import("../data/flowNode.js").Datum>>} */
|
|
366
366
|
let loadAndCollect;
|
|
367
367
|
if (dataSource instanceof DataSource) {
|
|
368
368
|
loadAndCollect = async () => {
|
|
@@ -23,14 +23,14 @@ function byPath(root, path) {
|
|
|
23
23
|
return root;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
/** @type {import("../spec/mark").MarkConfigAndType} */
|
|
26
|
+
/** @type {import("../spec/mark.js").MarkConfigAndType} */
|
|
27
27
|
const mark = {
|
|
28
28
|
type: "rect",
|
|
29
29
|
tooltip: null,
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
test("Trivial flow", () => {
|
|
33
|
-
const root = create(
|
|
32
|
+
test("Trivial flow", async () => {
|
|
33
|
+
const root = await create(
|
|
34
34
|
{
|
|
35
35
|
data: { values: [3.141] },
|
|
36
36
|
transform: [
|
|
@@ -56,8 +56,8 @@ test("Trivial flow", () => {
|
|
|
56
56
|
expect(flow.collectors[0]).toBe(byPath(dataSource, [0, 0, 0]));
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
test("Branching flow", () => {
|
|
60
|
-
const root = create(
|
|
59
|
+
test("Branching flow", async () => {
|
|
60
|
+
const root = await create(
|
|
61
61
|
{
|
|
62
62
|
data: { values: [3.141] },
|
|
63
63
|
layer: [
|
|
@@ -96,8 +96,8 @@ test("Branching flow", () => {
|
|
|
96
96
|
expect(byPath(dataSource, [1, 0])).toBeInstanceOf(Collector);
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
test("Nested data sources", () => {
|
|
100
|
-
const root = create(
|
|
99
|
+
test("Nested data sources", async () => {
|
|
100
|
+
const root = await create(
|
|
101
101
|
{
|
|
102
102
|
data: { values: [1] },
|
|
103
103
|
transform: [{ type: "filter", expr: "datum.data > 0" }],
|