@milaboratories/graph-maker 1.1.138 → 1.1.139
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/GraphMaker/components/LassoControls/index.vue.js +15 -13
- package/dist/GraphMaker/components/LassoControls/index.vue.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +9 -3
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +17 -2
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +13 -4
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +28 -7
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +6 -2
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +16 -2
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +14 -2
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js +95 -72
- package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +124 -122
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +72 -91
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js +43 -41
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +28 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +94 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +42 -38
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Legend.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js +11 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js +20 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js +181 -181
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js +2 -2
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js +45 -45
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js +27 -27
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Legend.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js +18 -18
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js +36 -36
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js +45 -41
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js +33 -33
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js +90 -93
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +200 -199
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +17 -17
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/BoxElement.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +102 -99
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js +31 -36
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js +62 -74
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js +52 -53
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js +32 -32
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js +7 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js +23 -23
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js +63 -63
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js +60 -64
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +23 -23
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js +5 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js +13 -13
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +258 -256
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +45 -44
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +107 -106
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +18 -18
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +99 -95
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +30 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js +143 -142
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/HistogramSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js +30 -30
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +7 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js +53 -54
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js +59 -55
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/@d3fc/d3fc-axis/src/axisBase.js +7 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +6 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-shape/src/line.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js +148 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +172 -168
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +26 -26
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js +11 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js +30 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js +135 -153
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js +35 -32
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js +27 -27
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/constants.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js +24 -22
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +11 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +57 -58
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js +85 -83
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js +20 -20
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +44 -37
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js +11 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js +46 -56
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +223 -205
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js +22 -22
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js +42 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +84 -81
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/SVGLayer.js +11 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js +15 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +89 -114
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js +3 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +4 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js +39 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js +101 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js +4 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +1031 -1023
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js +0 -91
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js +0 -30
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js +0 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js +0 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js +0 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js +0 -26
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js +0 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js +0 -51
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js +0 -21
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js +0 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js +0 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js +0 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js +0 -19
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js +0 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js +0 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js +0 -24
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import z from "../../../canonicalize/lib/canonicalize.js";
|
|
2
|
-
import { deriveLabels as
|
|
3
|
-
import { canonicalizeJson as j, pTableValue as
|
|
4
|
-
import
|
|
5
|
-
var
|
|
2
|
+
import { deriveLabels as _e, isLabelColumn as Le } from "../../../@platforma-sdk/model/dist/index.js";
|
|
3
|
+
import { canonicalizeJson as j, pTableValue as Te } from "../../pl-model-common/dist/index.js";
|
|
4
|
+
import ue from "../../../lodash/lodash.js";
|
|
5
|
+
var ke = "pl7.app/axisNature", we = "pl7.app/label", Ee = "pl7.app/columnAsAxis/name", Ne = "pl7.app/columnAsAxis/domain", $ = "pl7.app/isSubset", ee = "pl7.app/isDiscreteFilter", Ge = "pl7.app/discreteValues", Me = "pl7.app/graph/axis/highCardinality", qe = "pl7.app/graph/isVirtual", Ce = "pl7.app/isLinkerColumn", pe = "pl7.app/format", _ = class se {
|
|
6
6
|
constructor({ type: e, name: o, domain: n }) {
|
|
7
7
|
this.kind = "axis", this.type = e, this.name = o, this.domain = { ...n };
|
|
8
8
|
}
|
|
@@ -28,7 +28,7 @@ var Le = "pl7.app/axisNature", xe = "pl7.app/label", Te = "pl7.app/columnAsAxis/
|
|
|
28
28
|
static fromPojo(e) {
|
|
29
29
|
return new se(e);
|
|
30
30
|
}
|
|
31
|
-
}, W = class
|
|
31
|
+
}, W = class ve {
|
|
32
32
|
constructor({ name: e, type: o }) {
|
|
33
33
|
this.kind = "column", this.name = e, this.type = o;
|
|
34
34
|
}
|
|
@@ -36,13 +36,13 @@ var Le = "pl7.app/axisNature", xe = "pl7.app/label", Te = "pl7.app/columnAsAxis/
|
|
|
36
36
|
return z(this);
|
|
37
37
|
}
|
|
38
38
|
static fromPojo(e) {
|
|
39
|
-
return new
|
|
39
|
+
return new ve(e);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
function
|
|
42
|
+
function P(t) {
|
|
43
43
|
return t !== null && t.kind === "column";
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function ae(t) {
|
|
46
46
|
return t !== null && t.kind === "axis";
|
|
47
47
|
}
|
|
48
48
|
function A(t) {
|
|
@@ -53,41 +53,41 @@ function A(t) {
|
|
|
53
53
|
return _.fromPojo(e);
|
|
54
54
|
throw Error("wrong column or axis object");
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
return !t.annotations || !t.annotations[
|
|
56
|
+
var fe = "pl7.app/parents";
|
|
57
|
+
function Ae(t) {
|
|
58
|
+
return !t.annotations || !t.annotations[fe] ? [] : JSON.parse(t.annotations[fe]);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Ve(t, e) {
|
|
61
61
|
const o = j(t[e]);
|
|
62
62
|
for (let n = 0; n < t.length; n++) {
|
|
63
63
|
const l = t[n];
|
|
64
64
|
if (e === n)
|
|
65
65
|
continue;
|
|
66
|
-
if (
|
|
66
|
+
if (Ae(l).some((c) => j(c) === o))
|
|
67
67
|
return !1;
|
|
68
68
|
}
|
|
69
69
|
return !0;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function je(t) {
|
|
72
72
|
for (let e = 0; e < t.length; e++)
|
|
73
|
-
if (
|
|
73
|
+
if (Ve(t, e))
|
|
74
74
|
return t[e];
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function ze(t) {
|
|
78
78
|
const e = { axis: t, parents: [] };
|
|
79
79
|
let o = [e];
|
|
80
80
|
for (; o.length; ) {
|
|
81
81
|
const n = [];
|
|
82
82
|
for (const l of o) {
|
|
83
|
-
const s =
|
|
84
|
-
l.parents = s.map((
|
|
83
|
+
const s = Ae(l.axis);
|
|
84
|
+
l.parents = s.map((c) => ({ axis: c, parents: [] })), n.push(...l.parents);
|
|
85
85
|
}
|
|
86
86
|
o = n;
|
|
87
87
|
}
|
|
88
88
|
return e;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Ke(t) {
|
|
91
91
|
const e = /* @__PURE__ */ new Set([j(t.axis)]);
|
|
92
92
|
let o = [t];
|
|
93
93
|
for (; o.length; ) {
|
|
@@ -99,7 +99,7 @@ function je(t) {
|
|
|
99
99
|
}
|
|
100
100
|
return e;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Ue(t) {
|
|
103
103
|
const e = [t.axis];
|
|
104
104
|
let o = [t];
|
|
105
105
|
for (; o.length; ) {
|
|
@@ -117,83 +117,83 @@ function te(t) {
|
|
|
117
117
|
let e = t;
|
|
118
118
|
const o = [];
|
|
119
119
|
for (; e.length; ) {
|
|
120
|
-
const n =
|
|
120
|
+
const n = je(e);
|
|
121
121
|
if (n === null)
|
|
122
122
|
return null;
|
|
123
|
-
const l =
|
|
123
|
+
const l = ze(n);
|
|
124
124
|
if (l === null)
|
|
125
125
|
return null;
|
|
126
|
-
const s =
|
|
127
|
-
o.push(
|
|
126
|
+
const s = Ke(l), c = Ue(l);
|
|
127
|
+
o.push(c), e = e.filter((r) => !s.has(j(r)));
|
|
128
128
|
}
|
|
129
129
|
return o;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function We(t) {
|
|
132
132
|
var e, o;
|
|
133
133
|
const n = /* @__PURE__ */ new Map();
|
|
134
134
|
for (const l of t) {
|
|
135
|
-
const s = new W({ name: l.columnId, type: l.spec.valueType }),
|
|
136
|
-
if (!
|
|
135
|
+
const s = new W({ name: l.columnId, type: l.spec.valueType }), c = te(l.spec.axesSpec);
|
|
136
|
+
if (!c || c.length !== 2)
|
|
137
137
|
continue;
|
|
138
|
-
const [
|
|
139
|
-
n.has(
|
|
138
|
+
const [r, a] = c, u = j(r), p = j(a);
|
|
139
|
+
n.has(u) || n.set(u, /* @__PURE__ */ new Map()), n.has(p) || n.set(p, /* @__PURE__ */ new Map()), (e = n.get(u)) == null || e.set(p, s), (o = n.get(p)) == null || o.set(u, s);
|
|
140
140
|
}
|
|
141
141
|
return n;
|
|
142
142
|
}
|
|
143
|
-
async function
|
|
144
|
-
var
|
|
143
|
+
async function He(t, e, o, n, l, s, c, r = !0, a) {
|
|
144
|
+
var u, p, m, y;
|
|
145
145
|
const x = A(e);
|
|
146
|
-
if (
|
|
146
|
+
if (P(x)) {
|
|
147
147
|
const g = await t.pFrameProvider.getColumnSpecById(x);
|
|
148
148
|
if (!g)
|
|
149
149
|
return;
|
|
150
|
-
const
|
|
150
|
+
const w = De(
|
|
151
151
|
g,
|
|
152
152
|
l,
|
|
153
153
|
s,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
).map((
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
c,
|
|
155
|
+
a
|
|
156
|
+
).map((d) => _.fromAxisSpec(d).toCanonicalString()), C = new Set(w), D = g.axesSpec.map((d) => _.fromAxisSpec(d).toCanonicalString()), B = {};
|
|
157
|
+
r && D.forEach((d, i) => {
|
|
158
|
+
C.has(d) && (B[d] = i);
|
|
159
159
|
});
|
|
160
|
-
const
|
|
160
|
+
const v = {
|
|
161
161
|
kind: "column",
|
|
162
162
|
name: g.name,
|
|
163
163
|
label: o ?? await T(t, e, []),
|
|
164
164
|
type: g.valueType,
|
|
165
165
|
spec: g,
|
|
166
166
|
annotations: g.annotations,
|
|
167
|
-
isSubsetFilter: ((
|
|
168
|
-
isDiscreteFilter: g.valueType === "String" || ((
|
|
169
|
-
axesToBeFixed:
|
|
170
|
-
axesToBeFixedIndexes:
|
|
167
|
+
isSubsetFilter: ((u = g.annotations) == null ? void 0 : u[$]) === "true",
|
|
168
|
+
isDiscreteFilter: g.valueType === "String" || ((p = g.annotations) == null ? void 0 : p[ee]) === "true",
|
|
169
|
+
axesToBeFixed: w,
|
|
170
|
+
axesToBeFixedIndexes: B
|
|
171
171
|
};
|
|
172
|
-
n.set(x.toCanonicalString(),
|
|
173
|
-
for (const
|
|
174
|
-
const
|
|
175
|
-
if (n.has(
|
|
172
|
+
n.set(x.toCanonicalString(), v);
|
|
173
|
+
for (const d of g.axesSpec) {
|
|
174
|
+
const S = _.fromAxisSpec(d).toCanonicalString();
|
|
175
|
+
if (n.has(S))
|
|
176
176
|
continue;
|
|
177
|
-
const f =
|
|
177
|
+
const f = Ie(d), h = {
|
|
178
178
|
kind: "axis",
|
|
179
|
-
name:
|
|
180
|
-
label: await T(t,
|
|
181
|
-
type:
|
|
179
|
+
name: d.name,
|
|
180
|
+
label: await T(t, S, [e]),
|
|
181
|
+
type: d.type,
|
|
182
182
|
mustBeConsumed: f,
|
|
183
183
|
dividable: !1,
|
|
184
|
-
spec:
|
|
185
|
-
annotations:
|
|
186
|
-
isSubsetFilter: ((m =
|
|
187
|
-
isDiscreteFilter:
|
|
184
|
+
spec: d,
|
|
185
|
+
annotations: d.annotations,
|
|
186
|
+
isSubsetFilter: ((m = d.annotations) == null ? void 0 : m[$]) === "true",
|
|
187
|
+
isDiscreteFilter: d.type === "String" || ((y = d.annotations) == null ? void 0 : y[ee]) === "true",
|
|
188
188
|
parentSources: [e]
|
|
189
189
|
};
|
|
190
|
-
n.set(
|
|
190
|
+
n.set(S, h);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function ge(t) {
|
|
195
195
|
const e = A(t), { name: o, type: n } = e;
|
|
196
|
-
return
|
|
196
|
+
return P(e) ? {
|
|
197
197
|
kind: "column",
|
|
198
198
|
name: "",
|
|
199
199
|
label: " ",
|
|
@@ -218,39 +218,39 @@ function ye(t) {
|
|
|
218
218
|
parentSources: []
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function me(t) {
|
|
222
222
|
return {
|
|
223
223
|
type: t.type,
|
|
224
224
|
components: { ...t.components },
|
|
225
225
|
dividedAxes: { ...t.dividedAxes }
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function Ye(t) {
|
|
229
229
|
const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s = A(e);
|
|
230
230
|
if (!s)
|
|
231
231
|
throw Error("Empty source selected");
|
|
232
232
|
if (o === "range") {
|
|
233
|
-
const
|
|
234
|
-
return (n == null ? void 0 : n.max) !== void 0 &&
|
|
233
|
+
const c = [];
|
|
234
|
+
return (n == null ? void 0 : n.max) !== void 0 && c.push({
|
|
235
235
|
type: "bySingleColumnV2",
|
|
236
|
-
column:
|
|
236
|
+
column: ae(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
|
|
237
237
|
predicate: {
|
|
238
238
|
operator: "LessOrEqual",
|
|
239
239
|
reference: n.max
|
|
240
240
|
}
|
|
241
|
-
}), (n == null ? void 0 : n.min) !== void 0 &&
|
|
241
|
+
}), (n == null ? void 0 : n.min) !== void 0 && c.push({
|
|
242
242
|
type: "bySingleColumnV2",
|
|
243
|
-
column:
|
|
243
|
+
column: ae(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
|
|
244
244
|
predicate: {
|
|
245
245
|
operator: "GreaterOrEqual",
|
|
246
246
|
reference: n == null ? void 0 : n.min
|
|
247
247
|
}
|
|
248
|
-
}),
|
|
248
|
+
}), c;
|
|
249
249
|
} else if (o === "subset")
|
|
250
250
|
return [
|
|
251
251
|
{
|
|
252
252
|
type: "bySingleColumnV2",
|
|
253
|
-
column:
|
|
253
|
+
column: ae(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
|
|
254
254
|
predicate: {
|
|
255
255
|
operator: "Not",
|
|
256
256
|
operand: { operator: "IsNA" }
|
|
@@ -260,7 +260,7 @@ function We(t) {
|
|
|
260
260
|
return typeof l > "u" ? [] : [
|
|
261
261
|
{
|
|
262
262
|
type: "bySingleColumnV2",
|
|
263
|
-
column:
|
|
263
|
+
column: ae(s) ? { type: "axis", id: s.toPFrameId() } : {
|
|
264
264
|
type: "column",
|
|
265
265
|
id: s.name
|
|
266
266
|
},
|
|
@@ -274,74 +274,78 @@ function We(t) {
|
|
|
274
274
|
function Y(t) {
|
|
275
275
|
const e = [];
|
|
276
276
|
for (const o of t)
|
|
277
|
-
e.push(...
|
|
277
|
+
e.push(...Ye(o));
|
|
278
278
|
return e;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function xe(t) {
|
|
281
281
|
var e, o, n, l;
|
|
282
282
|
if ("kind" in t && t.kind === "PColumn") {
|
|
283
|
-
const
|
|
284
|
-
return z({ name:
|
|
283
|
+
const r = (o = t.name) != null ? o : (e = t.annotations) == null ? void 0 : e[Ee], a = (l = t.domain) != null ? l : (n = t.annotations) == null ? void 0 : n[Ne];
|
|
284
|
+
return z({ name: r, domain: a });
|
|
285
285
|
}
|
|
286
|
-
const s = t.name,
|
|
287
|
-
return z({ name: s, domain:
|
|
286
|
+
const s = t.name, c = t.domain;
|
|
287
|
+
return z({ name: s, domain: c });
|
|
288
288
|
}
|
|
289
|
-
async function
|
|
289
|
+
async function be(t, e, o) {
|
|
290
290
|
var n;
|
|
291
291
|
for (const l of o) {
|
|
292
292
|
const s = A(l);
|
|
293
|
-
if (
|
|
294
|
-
const
|
|
295
|
-
(
|
|
293
|
+
if (P(s)) {
|
|
294
|
+
const c = await t.pFrameProvider.getColumnSpecById(s), r = ((n = c == null ? void 0 : c.axesSpec) != null ? n : []).find(
|
|
295
|
+
(a) => _.fromAxisSpec(a).toCanonicalString() === e.toCanonicalString()
|
|
296
296
|
);
|
|
297
|
-
if (
|
|
298
|
-
return
|
|
297
|
+
if (r)
|
|
298
|
+
return r;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
return null;
|
|
302
302
|
}
|
|
303
|
-
var
|
|
303
|
+
var Re = "pl7.app/label";
|
|
304
304
|
async function k(t, e, o) {
|
|
305
305
|
const n = A(e);
|
|
306
|
-
if (
|
|
306
|
+
if (P(n))
|
|
307
307
|
return;
|
|
308
|
-
async function l(
|
|
309
|
-
const
|
|
310
|
-
return
|
|
308
|
+
async function l(a) {
|
|
309
|
+
const u = await be(t, a, o);
|
|
310
|
+
return u ? xe(u) : null;
|
|
311
311
|
}
|
|
312
|
-
const s = await t.pFrameProvider.getColumnsFull([], !1, void 0, [
|
|
313
|
-
return
|
|
312
|
+
const s = await t.pFrameProvider.getColumnsFull([], !1, void 0, [Re]), c = await l(n), r = s.find(({ spec: a }) => a && a.axesSpec.length === 1 && xe(a.axesSpec[0]) === c);
|
|
313
|
+
return r ? new W({ name: r.columnId, type: r.spec.valueType }) : void 0;
|
|
314
|
+
}
|
|
315
|
+
async function le(t, e, o) {
|
|
316
|
+
const n = A(e), l = await k(t, e, o);
|
|
317
|
+
let s;
|
|
318
|
+
return P(n) ? s = await t.pFrameProvider.getColumnSpecById(l ?? n) : s = l ? await t.pFrameProvider.getColumnSpecById(l) : await be(t, n, o), s;
|
|
314
319
|
}
|
|
315
320
|
async function T(t, e, o) {
|
|
316
321
|
var n, l;
|
|
317
|
-
const s =
|
|
318
|
-
|
|
319
|
-
if (B(s) ? c = await t.pFrameProvider.getColumnSpecById(r ?? s) : c = r ? await t.pFrameProvider.getColumnSpecById(r) : await ve(t, s, o), !c)
|
|
322
|
+
const s = await le(t, e, o);
|
|
323
|
+
if (!s)
|
|
320
324
|
return "";
|
|
321
|
-
const
|
|
322
|
-
return t.labelsModifier(
|
|
325
|
+
const c = (l = (n = s.annotations) == null ? void 0 : n[we]) != null ? l : s.name;
|
|
326
|
+
return t.labelsModifier(s.name, c);
|
|
323
327
|
}
|
|
324
|
-
function
|
|
328
|
+
function Ie(t) {
|
|
325
329
|
var e, o;
|
|
326
|
-
const n = (o = (e = t.annotations) == null ? void 0 : e[
|
|
330
|
+
const n = (o = (e = t.annotations) == null ? void 0 : e[ke]) == null ? void 0 : o.toLowerCase();
|
|
327
331
|
return !!n && n !== "homogenous" && n !== "homogeneous";
|
|
328
332
|
}
|
|
329
333
|
function R(t) {
|
|
330
334
|
var e, o;
|
|
331
335
|
return ((e = t.annotations) == null ? void 0 : e[$]) === "true" || ((o = t.annotations) == null ? void 0 : o[ee]) === "true", !0;
|
|
332
336
|
}
|
|
333
|
-
function
|
|
337
|
+
function Xe(t) {
|
|
334
338
|
var e, o;
|
|
335
|
-
return !t.name.includes("metadata") && ((e = t.annotations) == null ? void 0 : e[
|
|
339
|
+
return !t.name.includes("metadata") && ((e = t.annotations) == null ? void 0 : e[qe]) !== "true" && ((o = t.annotations) == null ? void 0 : o[$]) !== "true";
|
|
336
340
|
}
|
|
337
|
-
function
|
|
341
|
+
function $e(t) {
|
|
338
342
|
var e;
|
|
339
343
|
const o = {};
|
|
340
344
|
for (const n of t.filter((l) => l.spec.axesSpec.length === 2)) {
|
|
341
345
|
const l = new W({ name: n.columnId, type: n.spec.valueType }), s = (e = n.spec.axesSpec) != null ? e : [];
|
|
342
346
|
if (s.length) {
|
|
343
|
-
const [
|
|
344
|
-
o[
|
|
347
|
+
const [c, r] = s, a = _.fromAxisSpec(c).toCanonicalString(), u = _.fromAxisSpec(r).toCanonicalString();
|
|
348
|
+
o[a] || (o[a] = {}), o[u] || (o[u] = {}), o[a][u] = { id: l, spec: n.spec }, o[u][a] = { id: l, spec: n.spec };
|
|
345
349
|
}
|
|
346
350
|
}
|
|
347
351
|
return o;
|
|
@@ -350,41 +354,41 @@ async function J(t, e) {
|
|
|
350
354
|
const o = /* @__PURE__ */ new Set(), n = [];
|
|
351
355
|
for (const l of e) {
|
|
352
356
|
const s = A(l);
|
|
353
|
-
if (
|
|
354
|
-
const
|
|
355
|
-
if (!
|
|
357
|
+
if (P(s)) {
|
|
358
|
+
const c = await t.pFrameProvider.getColumnSpecById(s);
|
|
359
|
+
if (!c)
|
|
356
360
|
continue;
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
-
o.has(
|
|
361
|
+
c.axesSpec.forEach((r) => {
|
|
362
|
+
const a = _.fromAxisSpec(r).toCanonicalString();
|
|
363
|
+
o.has(a) || (o.add(a), n.push(r));
|
|
360
364
|
});
|
|
361
365
|
}
|
|
362
366
|
}
|
|
363
367
|
return n;
|
|
364
368
|
}
|
|
365
|
-
function
|
|
369
|
+
function Je(t, e, o) {
|
|
366
370
|
const n = {}, l = /* @__PURE__ */ new Set([e]);
|
|
367
371
|
let s = [e];
|
|
368
372
|
for (; s.length; ) {
|
|
369
|
-
const
|
|
370
|
-
for (const
|
|
371
|
-
if (t[
|
|
372
|
-
const
|
|
373
|
-
for (const
|
|
374
|
-
if (n[
|
|
375
|
-
const
|
|
373
|
+
const c = /* @__PURE__ */ new Set();
|
|
374
|
+
for (const r of s)
|
|
375
|
+
if (t[r]) {
|
|
376
|
+
const a = Object.keys(t[r]);
|
|
377
|
+
for (const u of a)
|
|
378
|
+
if (n[u] = r, u === o) {
|
|
379
|
+
const p = [];
|
|
376
380
|
let m = o;
|
|
377
381
|
for (; n[m] !== e; )
|
|
378
|
-
|
|
379
|
-
return
|
|
380
|
-
} else l.has(
|
|
382
|
+
p.push(m), m = n[m];
|
|
383
|
+
return p.push(m), p.map((y) => t[y][n[y]].id);
|
|
384
|
+
} else l.has(u) || (c.add(u), l.add(u));
|
|
381
385
|
}
|
|
382
|
-
s = [...
|
|
386
|
+
s = [...c];
|
|
383
387
|
}
|
|
384
388
|
return null;
|
|
385
389
|
}
|
|
386
|
-
function
|
|
387
|
-
const n = [...e].map((s) =>
|
|
390
|
+
function Qe(t, e, o) {
|
|
391
|
+
const n = [...e].map((s) => Je(t, s, o)).filter((s) => s !== null);
|
|
388
392
|
if (n.length === 0)
|
|
389
393
|
return [];
|
|
390
394
|
let l = n[0];
|
|
@@ -398,78 +402,78 @@ async function X(t) {
|
|
|
398
402
|
!1,
|
|
399
403
|
void 0,
|
|
400
404
|
void 0,
|
|
401
|
-
{ [
|
|
402
|
-
), o =
|
|
405
|
+
{ [Ce]: "true" }
|
|
406
|
+
), o = $e(e.filter((l) => l.spec.axesSpec.length === 2)), n = We(e.filter((l) => l.spec.axesSpec.length > 2));
|
|
403
407
|
return { linkerColumnsMap: o, compositeLinkerMap: n };
|
|
404
408
|
}
|
|
405
409
|
async function V(t, e, o, n, l, s) {
|
|
406
|
-
const
|
|
407
|
-
if (!
|
|
410
|
+
const c = A(l);
|
|
411
|
+
if (!P(c))
|
|
408
412
|
return [];
|
|
409
|
-
const
|
|
410
|
-
if (!
|
|
413
|
+
const r = await t.pFrameProvider.getColumnSpecById(c);
|
|
414
|
+
if (!r)
|
|
411
415
|
return [];
|
|
412
|
-
const
|
|
413
|
-
(
|
|
414
|
-
const
|
|
415
|
-
return !(s != null && s.some((D) => D.axisSource ===
|
|
416
|
+
const a = r.axesSpec.filter(
|
|
417
|
+
(w) => {
|
|
418
|
+
const C = _.fromAxisSpec(w).toCanonicalString();
|
|
419
|
+
return !(s != null && s.some((D) => D.axisSource === C));
|
|
416
420
|
}
|
|
417
|
-
),
|
|
418
|
-
const
|
|
419
|
-
return !
|
|
421
|
+
), u = new Set(n.map((w) => _.fromAxisSpec(w).toCanonicalString())), p = a.filter((w) => {
|
|
422
|
+
const C = _.fromAxisSpec(w).toCanonicalString();
|
|
423
|
+
return !u.has(C);
|
|
420
424
|
});
|
|
421
|
-
if (!
|
|
425
|
+
if (!p.length)
|
|
422
426
|
return [];
|
|
423
|
-
const m = te(n),
|
|
424
|
-
if (!m || !
|
|
425
|
-
throw Error(`Can't create axes tree for ${
|
|
427
|
+
const m = te(n), y = te(p);
|
|
428
|
+
if (!m || !y)
|
|
429
|
+
throw Error(`Can't create axes tree for ${r.name}`);
|
|
426
430
|
const x = new Set(m.map(j)), g = /* @__PURE__ */ new Set();
|
|
427
|
-
return
|
|
428
|
-
var
|
|
429
|
-
const D = j(
|
|
431
|
+
return y.forEach((w) => {
|
|
432
|
+
var C;
|
|
433
|
+
const D = j(w);
|
|
430
434
|
if (o.has(D)) {
|
|
431
|
-
const
|
|
432
|
-
if (!
|
|
433
|
-
throw Error(`Can't find composite linker column for ${
|
|
434
|
-
const
|
|
435
|
-
g.add(
|
|
436
|
-
} else if (
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
g.add(
|
|
435
|
+
const B = o.get(D), d = (B ? [...B.keys()] : []).find((S) => x.has(S));
|
|
436
|
+
if (!d)
|
|
437
|
+
throw Error(`Can't find composite linker column for ${r.name}, ${D}`);
|
|
438
|
+
const i = (C = o.get(D)) == null ? void 0 : C.get(d);
|
|
439
|
+
g.add(i.toCanonicalString());
|
|
440
|
+
} else if (w.length === 1) {
|
|
441
|
+
const B = _.fromAxisSpec(w[0]).toCanonicalString();
|
|
442
|
+
Qe(e, u, B).forEach((d) => {
|
|
443
|
+
g.add(d.toCanonicalString());
|
|
440
444
|
});
|
|
441
445
|
}
|
|
442
|
-
}), [...g].map((
|
|
446
|
+
}), [...g].map((w) => A(w));
|
|
443
447
|
}
|
|
444
|
-
function
|
|
445
|
-
const
|
|
446
|
-
(
|
|
448
|
+
function De(t, e, o, n, l) {
|
|
449
|
+
const c = t.axesSpec.filter(
|
|
450
|
+
(p) => !o.has(_.fromAxisSpec(p).toCanonicalString())
|
|
447
451
|
);
|
|
448
|
-
if (!
|
|
452
|
+
if (!c.length)
|
|
449
453
|
return [];
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
if (!
|
|
453
|
-
return
|
|
454
|
-
const
|
|
455
|
-
return
|
|
456
|
-
(
|
|
457
|
-
const m = j(
|
|
458
|
-
return !(
|
|
454
|
+
const r = te(e);
|
|
455
|
+
let a = te(c);
|
|
456
|
+
if (!r || !a)
|
|
457
|
+
return c;
|
|
458
|
+
const u = new Set(r.map(j));
|
|
459
|
+
return a = a.filter(
|
|
460
|
+
(p) => {
|
|
461
|
+
const m = j(p), y = l.get(m);
|
|
462
|
+
return !(y ? [...y.keys()] : []).some((g) => u.has(g));
|
|
459
463
|
}
|
|
460
|
-
),
|
|
464
|
+
), a.some((p) => p.length > 1) ? a.flatMap((p) => p) : (a = a.filter(([p]) => !n.has(_.fromAxisSpec(p).toCanonicalString())), a.flatMap((p) => p));
|
|
461
465
|
}
|
|
462
|
-
function
|
|
466
|
+
function Be(t, e) {
|
|
463
467
|
const o = e.columnsData[Object.keys(e.columnsData)[0]].length, n = new Int32Array(o).fill(0);
|
|
464
468
|
for (let l = 0; l < o; l++) {
|
|
465
469
|
let s = !1;
|
|
466
|
-
for (let
|
|
467
|
-
const { selectedSource:
|
|
468
|
-
if (
|
|
470
|
+
for (let c = 0; c < t.length; c++) {
|
|
471
|
+
const { selectedSource: r, selectedFilterValue: a, selectedFilterRange: u, type: p } = t[c], m = A(r), y = (P(m) ? e.columnsData[r] : e.axesData[r])[l];
|
|
472
|
+
if (a !== void 0 && (s = s || y === a), u !== void 0 && (u.min !== void 0 || u.max !== void 0) && typeof y == "number") {
|
|
469
473
|
let x = !0;
|
|
470
|
-
|
|
474
|
+
u.min !== void 0 && (x = x && y >= u.min), u.max !== void 0 && (x = x && y <= u.max), s = s || x;
|
|
471
475
|
}
|
|
472
|
-
|
|
476
|
+
p === "subset" && (s = s || y != null);
|
|
473
477
|
}
|
|
474
478
|
s && (n[l] = 1);
|
|
475
479
|
}
|
|
@@ -508,20 +512,20 @@ var Q = class {
|
|
|
508
512
|
throw Error(`Unknown input name: ${String(t)}`);
|
|
509
513
|
}
|
|
510
514
|
changeSelected(t, e, o, n) {
|
|
511
|
-
const l = o.components[t].selectorStates, s = l.filter((
|
|
512
|
-
let
|
|
513
|
-
return s.forEach((
|
|
514
|
-
|
|
515
|
-
}),
|
|
516
|
-
|
|
515
|
+
const l = o.components[t].selectorStates, s = l.filter((a) => !n.find((u) => u.selectedSource === a.selectedSource)), c = n.filter((a) => !l.find((u) => u.selectedSource === a.selectedSource));
|
|
516
|
+
let r = me(o);
|
|
517
|
+
return s.forEach((a) => {
|
|
518
|
+
r = this.deleteSelected(t, e, r, a);
|
|
519
|
+
}), c.forEach((a) => {
|
|
520
|
+
r = this.addSelected(t, r, a);
|
|
517
521
|
}), o.components[t].selectorStates = n.map(
|
|
518
|
-
(
|
|
519
|
-
(
|
|
522
|
+
(a) => o.components[t].selectorStates.find(
|
|
523
|
+
(u) => u.selectedSource === a.selectedSource
|
|
520
524
|
)
|
|
521
|
-
).filter(Boolean),
|
|
525
|
+
).filter(Boolean), r;
|
|
522
526
|
}
|
|
523
527
|
switchDividableAxis(t, e) {
|
|
524
|
-
return
|
|
528
|
+
return me(t);
|
|
525
529
|
}
|
|
526
530
|
async getMustBeConsumedAxes(t, e) {
|
|
527
531
|
return Promise.resolve(/* @__PURE__ */ new Set());
|
|
@@ -544,51 +548,51 @@ var Q = class {
|
|
|
544
548
|
}
|
|
545
549
|
async getSelectedSourcesInfo(t, e, o, n, l) {
|
|
546
550
|
var s;
|
|
547
|
-
const
|
|
551
|
+
const c = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), a = [];
|
|
548
552
|
for (const m of this.dataInputs)
|
|
549
|
-
for (const
|
|
550
|
-
const x = A(
|
|
551
|
-
if (
|
|
553
|
+
for (const y of e.components[m].selectorStates) {
|
|
554
|
+
const x = A(y.selectedSource);
|
|
555
|
+
if (P(x)) {
|
|
552
556
|
const g = await t.pFrameProvider.getColumnSpecById(x);
|
|
553
|
-
g && g.axesSpec.forEach((
|
|
554
|
-
const
|
|
555
|
-
|
|
557
|
+
g && g.axesSpec.forEach((w) => {
|
|
558
|
+
const C = _.fromAxisSpec(w).toCanonicalString();
|
|
559
|
+
r.has(C) || (r.add(C), a.push(w));
|
|
556
560
|
});
|
|
557
561
|
}
|
|
558
562
|
}
|
|
559
|
-
const
|
|
560
|
-
let
|
|
561
|
-
for (;
|
|
563
|
+
const u = /* @__PURE__ */ new Set();
|
|
564
|
+
let p = [...r];
|
|
565
|
+
for (; p.length; ) {
|
|
562
566
|
const m = [];
|
|
563
|
-
for (const
|
|
564
|
-
if (n[
|
|
565
|
-
const x = Object.keys(n[
|
|
567
|
+
for (const y of p)
|
|
568
|
+
if (n[y]) {
|
|
569
|
+
const x = Object.keys(n[y]);
|
|
566
570
|
for (const g of x)
|
|
567
|
-
!
|
|
571
|
+
!u.has(g) && !r.has(g) && (m.push(g), u.add(g));
|
|
568
572
|
}
|
|
569
|
-
|
|
573
|
+
p = m;
|
|
570
574
|
}
|
|
571
|
-
for (const [m, { selectorStates:
|
|
575
|
+
for (const [m, { selectorStates: y }] of Object.entries(e.components)) {
|
|
572
576
|
const g = ((s = this.simpleComponentControllers[m]) != null ? s : this.filterComponentControllers[m]).settings.columnsWithExtraAxesAllowed;
|
|
573
|
-
for (const { selectedSource:
|
|
574
|
-
await
|
|
577
|
+
for (const { selectedSource: w } of y)
|
|
578
|
+
await He(
|
|
575
579
|
t,
|
|
576
|
-
|
|
577
|
-
o[
|
|
578
|
-
r,
|
|
579
|
-
i,
|
|
580
|
+
w,
|
|
581
|
+
o[w],
|
|
580
582
|
c,
|
|
581
|
-
|
|
583
|
+
a,
|
|
584
|
+
r,
|
|
585
|
+
u,
|
|
582
586
|
g,
|
|
583
587
|
l
|
|
584
588
|
);
|
|
585
589
|
}
|
|
586
|
-
return
|
|
590
|
+
return c;
|
|
587
591
|
}
|
|
588
592
|
getEmptyInputGuide(t) {
|
|
589
593
|
return {
|
|
590
594
|
components: this.createEmptyComponentsGuide(t),
|
|
591
|
-
getSourceInfo: (e) =>
|
|
595
|
+
getSourceInfo: (e) => ge(e),
|
|
592
596
|
freeOptionsSet: /* @__PURE__ */ new Set(),
|
|
593
597
|
axesToBeFixedSet: /* @__PURE__ */ new Set(),
|
|
594
598
|
readyData: !1,
|
|
@@ -606,111 +610,111 @@ var Q = class {
|
|
|
606
610
|
async getLabelsMap(t, e) {
|
|
607
611
|
const o = await t.pFrameProvider.getColumnsFull(
|
|
608
612
|
this.dataInputs.reduce((n, l) => {
|
|
609
|
-
const
|
|
610
|
-
return n.concat(
|
|
613
|
+
const c = e.components[l].selectorStates.map((r) => A(r.selectedSource));
|
|
614
|
+
return n.concat(c);
|
|
611
615
|
}, []),
|
|
612
616
|
!1
|
|
613
617
|
);
|
|
614
|
-
return
|
|
618
|
+
return _e(o, (n) => n.spec).reduce((n, l) => {
|
|
615
619
|
const s = new W({ name: l.value.columnId, type: l.value.spec.valueType }).toCanonicalString();
|
|
616
620
|
return n[s] = l.label, n;
|
|
617
621
|
}, {});
|
|
618
622
|
}
|
|
619
|
-
async calculateOptions(t, e, o = [], n =
|
|
623
|
+
async calculateOptions(t, e, o = [], n = Xe) {
|
|
620
624
|
var l, s;
|
|
621
|
-
const
|
|
622
|
-
for (const [
|
|
623
|
-
const
|
|
625
|
+
const c = this.createEmptyComponentsGuide(e), r = this.getConsumedOptionsSet(e), a = new Set(this.ignoredOptionIdNames), u = new Set(o), { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), y = await this.getLabelsMap(t, e), x = await this.getSelectedSourcesInfo(t, e, y, p, m), g = /* @__PURE__ */ new Map(), w = { ...this.simpleComponentControllers, ...this.filterComponentControllers }, C = /* @__PURE__ */ new Set();
|
|
626
|
+
for (const [S, f] of Object.entries(w)) {
|
|
627
|
+
const h = await f.getOptions(
|
|
624
628
|
t,
|
|
625
629
|
e,
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
630
|
+
y,
|
|
631
|
+
r,
|
|
632
|
+
p,
|
|
629
633
|
m,
|
|
630
634
|
n,
|
|
631
|
-
|
|
632
|
-
|
|
635
|
+
a,
|
|
636
|
+
u
|
|
633
637
|
);
|
|
634
|
-
this.dataInputs.includes(
|
|
635
|
-
|
|
638
|
+
this.dataInputs.includes(S) || h.options.forEach((b) => {
|
|
639
|
+
C.add(b.value);
|
|
636
640
|
});
|
|
637
|
-
for (const [
|
|
638
|
-
g.set(
|
|
639
|
-
|
|
641
|
+
for (const [b, O] of h.optionsInfo)
|
|
642
|
+
g.set(b, O);
|
|
643
|
+
c[S] = h;
|
|
640
644
|
}
|
|
641
|
-
const D = (
|
|
642
|
-
const f = g.get(
|
|
645
|
+
const D = (S) => {
|
|
646
|
+
const f = g.get(S);
|
|
643
647
|
f && f.kind === "axis" && (f.mustBeConsumed = !0);
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
},
|
|
647
|
-
for (const
|
|
648
|
-
D(
|
|
648
|
+
const h = x.get(S);
|
|
649
|
+
h && h.kind === "axis" && (h.mustBeConsumed = !0);
|
|
650
|
+
}, B = await this.getMustBeConsumedAxes(t, e);
|
|
651
|
+
for (const S of B)
|
|
652
|
+
D(S);
|
|
649
653
|
if (this.dontAllowUnfilteredHighCardinality) {
|
|
650
|
-
const
|
|
651
|
-
var
|
|
652
|
-
return ((
|
|
653
|
-
}, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((
|
|
654
|
-
const O = x.get(
|
|
655
|
-
return (O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(
|
|
654
|
+
const S = (h) => {
|
|
655
|
+
var b;
|
|
656
|
+
return ((b = h == null ? void 0 : h.annotations) == null ? void 0 : b[Me]) === "true";
|
|
657
|
+
}, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((h, b) => {
|
|
658
|
+
const O = x.get(b.selectedSource);
|
|
659
|
+
return (O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(S).forEach((L) => h.add(_.fromAxisSpec(L).toCanonicalString())), (O == null ? void 0 : O.kind) === "axis" && S(O.spec) && h.add(_.fromAxisSpec(O.spec).toCanonicalString()), h;
|
|
656
660
|
}, /* @__PURE__ */ new Set())) != null ? s : /* @__PURE__ */ new Set();
|
|
657
|
-
this.dataInputs.forEach((
|
|
658
|
-
for (const { selectedSource:
|
|
659
|
-
const O = x.get(
|
|
660
|
-
if ((O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(
|
|
661
|
-
const
|
|
662
|
-
!
|
|
663
|
-
}), (O == null ? void 0 : O.kind) === "axis" &&
|
|
664
|
-
const
|
|
665
|
-
|
|
661
|
+
this.dataInputs.forEach((h) => {
|
|
662
|
+
for (const { selectedSource: b } of e.components[h].selectorStates) {
|
|
663
|
+
const O = x.get(b);
|
|
664
|
+
if ((O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(S).forEach((L) => {
|
|
665
|
+
const N = _.fromAxisSpec(L).toCanonicalString();
|
|
666
|
+
!C.has(N) && !f.has(N) && C.add(N), f.has(N) || D(N);
|
|
667
|
+
}), (O == null ? void 0 : O.kind) === "axis" && S(O.spec)) {
|
|
668
|
+
const E = _.fromAxisSpec(O.spec).toCanonicalString();
|
|
669
|
+
C.has(E) || C.add(E), f.has(E) || D(E);
|
|
666
670
|
}
|
|
667
671
|
}
|
|
668
672
|
});
|
|
669
673
|
}
|
|
670
|
-
const
|
|
671
|
-
for (const { selectorStates:
|
|
672
|
-
for (const { selectedSource: f } of
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
|
|
674
|
+
const v = /* @__PURE__ */ new Set();
|
|
675
|
+
for (const { selectorStates: S } of Object.values(e.components))
|
|
676
|
+
for (const { selectedSource: f } of S) {
|
|
677
|
+
const h = x.get(f);
|
|
678
|
+
h && h.kind === "column" && h.axesToBeFixed.forEach((b) => {
|
|
679
|
+
v.add(b);
|
|
676
680
|
});
|
|
677
681
|
}
|
|
678
|
-
const
|
|
679
|
-
var f,
|
|
680
|
-
const O = (f = A(
|
|
681
|
-
return (
|
|
682
|
+
const d = await this.isConsistent(t, e, p, m), i = (S) => {
|
|
683
|
+
var f, h, b;
|
|
684
|
+
const O = (f = A(S).toCanonicalString()) != null ? f : S;
|
|
685
|
+
return (b = (h = g.get(O)) != null ? h : x.get(O)) != null ? b : ge(S);
|
|
682
686
|
};
|
|
683
687
|
return {
|
|
684
|
-
components:
|
|
685
|
-
getSourceInfo:
|
|
686
|
-
freeOptionsSet:
|
|
687
|
-
axesToBeFixedSet:
|
|
688
|
+
components: c,
|
|
689
|
+
getSourceInfo: i,
|
|
690
|
+
freeOptionsSet: C,
|
|
691
|
+
axesToBeFixedSet: v,
|
|
688
692
|
readyData: this.readyDataInputs(e),
|
|
689
|
-
ready: this.readyForPlotBuilding(t, e,
|
|
690
|
-
consistent:
|
|
693
|
+
ready: this.readyForPlotBuilding(t, e, d, C, i),
|
|
694
|
+
consistent: d
|
|
691
695
|
};
|
|
692
696
|
}
|
|
693
697
|
async getUniqueSourceValuesWithLabels(t, e, o, n, l, s) {
|
|
694
|
-
var
|
|
695
|
-
const
|
|
698
|
+
var c;
|
|
699
|
+
const r = (p) => p.sort((m, y) => m.label.localeCompare(y.label, "en", { numeric: !0 })), a = e.getSourceInfo(o), u = (c = a.annotations) == null ? void 0 : c[Ge];
|
|
696
700
|
try {
|
|
697
|
-
const
|
|
698
|
-
if (
|
|
699
|
-
const m =
|
|
700
|
-
return
|
|
701
|
+
const p = u ? JSON.parse(u).map((m) => String(m)) : null;
|
|
702
|
+
if (p) {
|
|
703
|
+
const m = p.map((y) => ({ value: y, label: y }));
|
|
704
|
+
return r(m), { values: m, overflow: !1 };
|
|
701
705
|
}
|
|
702
706
|
} catch {
|
|
703
|
-
console.error(`Parsing error: discrete values annotation ${
|
|
707
|
+
console.error(`Parsing error: discrete values annotation ${u} in ${o}`);
|
|
704
708
|
}
|
|
705
|
-
if (
|
|
706
|
-
const
|
|
709
|
+
if (a.kind === "axis") {
|
|
710
|
+
const p = A(o), m = a.parentSources.map(A), y = await k(t, o, a.parentSources);
|
|
707
711
|
let x = [];
|
|
708
|
-
if (
|
|
712
|
+
if (y) {
|
|
709
713
|
l && (x = [{
|
|
710
714
|
type: "bySingleColumnV2",
|
|
711
715
|
column: {
|
|
712
716
|
type: "column",
|
|
713
|
-
id:
|
|
717
|
+
id: y.name
|
|
714
718
|
},
|
|
715
719
|
predicate: {
|
|
716
720
|
operator: "StringIContains",
|
|
@@ -720,35 +724,35 @@ var Q = class {
|
|
|
720
724
|
type: "bySingleColumnV2",
|
|
721
725
|
column: {
|
|
722
726
|
type: "axis",
|
|
723
|
-
id:
|
|
727
|
+
id: p.toPFrameId()
|
|
724
728
|
},
|
|
725
729
|
predicate: {
|
|
726
730
|
operator: "StringIContains",
|
|
727
731
|
substring: s
|
|
728
732
|
}
|
|
729
733
|
}]);
|
|
730
|
-
const { data: D, axesData:
|
|
731
|
-
for (let
|
|
732
|
-
|
|
733
|
-
return
|
|
734
|
+
const { data: D, axesData: B } = await t.pFrameProvider.getSingleColumnData(y, x), v = B[p.toCanonicalString()], d = [];
|
|
735
|
+
for (let i = 0; i < Math.min(v.length, n ?? v.length); i++)
|
|
736
|
+
d.push({ value: String(v[i]), label: String(D[i]) });
|
|
737
|
+
return r(d), { values: d, overflow: !(n === void 0 || v.length < n) };
|
|
734
738
|
}
|
|
735
739
|
const g = l ?? s;
|
|
736
740
|
g && (x = [{
|
|
737
741
|
type: "bySingleColumnV2",
|
|
738
742
|
column: {
|
|
739
743
|
type: "axis",
|
|
740
|
-
id:
|
|
744
|
+
id: p.toPFrameId()
|
|
741
745
|
},
|
|
742
746
|
predicate: {
|
|
743
747
|
operator: "StringIContains",
|
|
744
748
|
substring: g
|
|
745
749
|
}
|
|
746
750
|
}]);
|
|
747
|
-
const
|
|
748
|
-
return
|
|
751
|
+
const w = await t.pFrameProvider.getAxisUniqueValues(p, [m[0]], n, x), C = w.values.map((D) => ({ value: String(D), label: String(D) }));
|
|
752
|
+
return r(C), { values: C, overflow: w.overflow };
|
|
749
753
|
}
|
|
750
|
-
if (
|
|
751
|
-
const
|
|
754
|
+
if (a.kind === "column") {
|
|
755
|
+
const p = l ?? s, m = A(o), y = p ? [{
|
|
752
756
|
type: "bySingleColumnV2",
|
|
753
757
|
column: {
|
|
754
758
|
type: "column",
|
|
@@ -756,10 +760,10 @@ var Q = class {
|
|
|
756
760
|
},
|
|
757
761
|
predicate: {
|
|
758
762
|
operator: "StringIContains",
|
|
759
|
-
substring:
|
|
763
|
+
substring: p
|
|
760
764
|
}
|
|
761
|
-
}] : [], x = await t.pFrameProvider.getColumnUniqueValues(m, n,
|
|
762
|
-
return
|
|
765
|
+
}] : [], x = await t.pFrameProvider.getColumnUniqueValues(m, n, y), g = x.values.map((w) => ({ value: String(w), label: String(w) }));
|
|
766
|
+
return r(g), { values: g, overflow: x.overflow };
|
|
763
767
|
}
|
|
764
768
|
return { values: [], overflow: !1 };
|
|
765
769
|
}
|
|
@@ -780,7 +784,7 @@ var Q = class {
|
|
|
780
784
|
async isConsistent(t, e, o, n) {
|
|
781
785
|
const l = await this.checkStateConsistency(t, e, o, n);
|
|
782
786
|
for (const s of l.values())
|
|
783
|
-
if (Object.values(s).some((
|
|
787
|
+
if (Object.values(s).some((c) => !c))
|
|
784
788
|
return !1;
|
|
785
789
|
return !0;
|
|
786
790
|
}
|
|
@@ -791,31 +795,31 @@ var Q = class {
|
|
|
791
795
|
if (!o || !this.readyDataInputs(e))
|
|
792
796
|
return !1;
|
|
793
797
|
let s = !1;
|
|
794
|
-
for (const
|
|
795
|
-
const
|
|
796
|
-
if (
|
|
798
|
+
for (const r of n) {
|
|
799
|
+
const a = l(r);
|
|
800
|
+
if (a && a.kind === "axis" && a.mustBeConsumed) {
|
|
797
801
|
s = !0;
|
|
798
802
|
break;
|
|
799
803
|
}
|
|
800
804
|
}
|
|
801
|
-
let
|
|
802
|
-
for (const { selectorStates:
|
|
803
|
-
for (const { selectedSource:
|
|
804
|
-
const
|
|
805
|
-
if (
|
|
805
|
+
let c = !1;
|
|
806
|
+
for (const { selectorStates: r } of Object.values(e.components)) {
|
|
807
|
+
for (const { selectedSource: a, fixedAxes: u } of r) {
|
|
808
|
+
const p = l(a);
|
|
809
|
+
if (p && p.kind === "column" && p.axesToBeFixed.some(
|
|
806
810
|
(m) => {
|
|
807
|
-
var
|
|
808
|
-
return ((
|
|
811
|
+
var y;
|
|
812
|
+
return ((y = (u ?? []).find((x) => x.axisSource === m)) == null ? void 0 : y.axisValue) === void 0;
|
|
809
813
|
}
|
|
810
814
|
)) {
|
|
811
|
-
|
|
815
|
+
c = !0;
|
|
812
816
|
break;
|
|
813
817
|
}
|
|
814
818
|
}
|
|
815
|
-
if (
|
|
819
|
+
if (c)
|
|
816
820
|
break;
|
|
817
821
|
}
|
|
818
|
-
return this.requiredComponents.every((
|
|
822
|
+
return this.requiredComponents.every((r) => e.components[r].selectorStates.length > 0) && !s && !c;
|
|
819
823
|
}
|
|
820
824
|
async createDataForPlot(t, e) {
|
|
821
825
|
return {
|
|
@@ -823,21 +827,21 @@ var Q = class {
|
|
|
823
827
|
settings: await this.createChartSettings(t, e)
|
|
824
828
|
};
|
|
825
829
|
}
|
|
826
|
-
},
|
|
830
|
+
}, Ze = (t) => {
|
|
827
831
|
var e;
|
|
828
|
-
return ((e = t == null ? void 0 : t.annotations) == null ? void 0 : e[
|
|
829
|
-
},
|
|
832
|
+
return ((e = t == null ? void 0 : t.annotations) == null ? void 0 : e[Ce]) === "true";
|
|
833
|
+
}, Pe = class Oe {
|
|
830
834
|
constructor({
|
|
831
835
|
componentName: e,
|
|
832
836
|
allowedTypes: o,
|
|
833
837
|
settings: n,
|
|
834
838
|
strictlyDependsOnParents: l,
|
|
835
839
|
dependsOn: s = [],
|
|
836
|
-
parentComponents:
|
|
837
|
-
annotations:
|
|
838
|
-
checkSourceBySpec:
|
|
840
|
+
parentComponents: c = [],
|
|
841
|
+
annotations: r = {},
|
|
842
|
+
checkSourceBySpec: a
|
|
839
843
|
}) {
|
|
840
|
-
this.componentName = e, this.allowedTypes = [...o], this.settings = { ...
|
|
844
|
+
this.componentName = e, this.allowedTypes = [...o], this.settings = { ...Oe.DefaultSettings, ...n }, this.dependsOn = [...s], this.parentComponents = [...c], this.strictlyDependsOnParents = l ?? !0, this.annotations = { ...r }, a && (this.checkSourceBySpec = a);
|
|
841
845
|
}
|
|
842
846
|
get isRequired() {
|
|
843
847
|
return this.settings.required;
|
|
@@ -846,182 +850,182 @@ var Q = class {
|
|
|
846
850
|
return this.settings.dimensionConsumer;
|
|
847
851
|
}
|
|
848
852
|
addSelected(e, o) {
|
|
849
|
-
const n =
|
|
853
|
+
const n = me(e);
|
|
850
854
|
return n.components[this.componentName].selectorStates.push(o), n;
|
|
851
855
|
}
|
|
852
856
|
deleteSelected(e, o) {
|
|
853
|
-
const n =
|
|
857
|
+
const n = me(e);
|
|
854
858
|
return n.components[this.componentName].selectorStates = n.components[this.componentName].selectorStates.filter((l) => l.selectedSource !== o), n;
|
|
855
859
|
}
|
|
856
860
|
async checkStateConsistency(e, o, n, l) {
|
|
857
|
-
const s = o.components[this.componentName], { parentAxes:
|
|
858
|
-
function
|
|
859
|
-
const m = _.fromAxisSpec(
|
|
860
|
-
return
|
|
861
|
+
const s = o.components[this.componentName], { parentAxes: c, linkerAxes: r } = await this.getAllowedAxes(e, o, n);
|
|
862
|
+
function a(p) {
|
|
863
|
+
const m = _.fromAxisSpec(p).toCanonicalString();
|
|
864
|
+
return c.has(m) || r.has(m);
|
|
861
865
|
}
|
|
862
|
-
const
|
|
863
|
-
s.selectorStates.map(async ({ selectedSource:
|
|
864
|
-
const m = A(
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
867
|
-
if (!
|
|
866
|
+
const u = await Promise.all(
|
|
867
|
+
s.selectorStates.map(async ({ selectedSource: p }) => {
|
|
868
|
+
const m = A(p);
|
|
869
|
+
if (P(m)) {
|
|
870
|
+
const y = await e.pFrameProvider.getColumnSpecById(m);
|
|
871
|
+
if (!y)
|
|
868
872
|
return !1;
|
|
869
873
|
if (this.parentComponents.length === 0)
|
|
870
874
|
return !0;
|
|
871
875
|
if (this.strictlyDependsOnParents && !this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent)
|
|
872
|
-
return
|
|
876
|
+
return y.axesSpec.every((g) => a(g));
|
|
873
877
|
if (this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent) {
|
|
874
|
-
if (
|
|
878
|
+
if (y.axesSpec.some((w) => a(w)))
|
|
875
879
|
return !0;
|
|
876
|
-
const g = te(
|
|
877
|
-
return g ? g.some((
|
|
880
|
+
const g = te(y.axesSpec);
|
|
881
|
+
return g ? g.some((w) => l.has(j(w))) : !1;
|
|
878
882
|
} else
|
|
879
|
-
return
|
|
883
|
+
return c.size === 0 || y.axesSpec.some((g) => a(g));
|
|
880
884
|
}
|
|
881
|
-
return
|
|
885
|
+
return c.has(p);
|
|
882
886
|
})
|
|
883
887
|
);
|
|
884
888
|
return s.selectorStates.reduce(
|
|
885
|
-
(
|
|
889
|
+
(p, m, y) => (p[m.selectedSource] = u[y], p),
|
|
886
890
|
{}
|
|
887
891
|
);
|
|
888
892
|
}
|
|
889
893
|
async getProducingAxes(e, o) {
|
|
890
|
-
const s = o.components[this.componentName].selectorStates.map((
|
|
894
|
+
const s = o.components[this.componentName].selectorStates.map((a) => A(a.selectedSource)).filter((a) => P(a)), c = /* @__PURE__ */ new Set();
|
|
891
895
|
return (await Promise.all(
|
|
892
|
-
s.map((
|
|
893
|
-
)).forEach((
|
|
894
|
-
|
|
895
|
-
|
|
896
|
+
s.map((a) => e.pFrameProvider.getColumnSpecById(a))
|
|
897
|
+
)).forEach((a) => {
|
|
898
|
+
a && a.axesSpec.forEach((u) => {
|
|
899
|
+
c.add(_.fromAxisSpec(u).toCanonicalString());
|
|
896
900
|
});
|
|
897
|
-
}),
|
|
901
|
+
}), c;
|
|
898
902
|
}
|
|
899
903
|
getParentSelectedSources(e, o) {
|
|
900
904
|
return this.parentComponents.reduce((l, s) => {
|
|
901
|
-
const
|
|
902
|
-
(
|
|
905
|
+
const c = o.components[s].selectorStates.map(
|
|
906
|
+
(r) => A(r.selectedSource)
|
|
903
907
|
);
|
|
904
|
-
return l.push(...
|
|
908
|
+
return l.push(...c), l;
|
|
905
909
|
}, []);
|
|
906
910
|
}
|
|
907
911
|
async getParentAxes(e, o) {
|
|
908
912
|
var n;
|
|
909
913
|
const l = this.getParentSelectedSources(e, o), s = /* @__PURE__ */ new Set();
|
|
910
|
-
for (const
|
|
911
|
-
if (
|
|
912
|
-
const
|
|
913
|
-
(n =
|
|
914
|
-
const
|
|
915
|
-
s.add(
|
|
914
|
+
for (const c of l)
|
|
915
|
+
if (P(c)) {
|
|
916
|
+
const r = await e.pFrameProvider.getColumnSpecById(c);
|
|
917
|
+
(n = r == null ? void 0 : r.axesSpec) == null || n.forEach((a) => {
|
|
918
|
+
const u = _.fromAxisSpec(a);
|
|
919
|
+
s.add(u.toCanonicalString());
|
|
916
920
|
});
|
|
917
921
|
}
|
|
918
922
|
return s;
|
|
919
923
|
}
|
|
920
924
|
async getAllowedAxes(e, o, n) {
|
|
921
|
-
var l, s, r,
|
|
922
|
-
const m = this.getParentSelectedSources(e, o),
|
|
925
|
+
var l, s, c, r, a, u, p;
|
|
926
|
+
const m = this.getParentSelectedSources(e, o), y = /* @__PURE__ */ new Set(), x = [], g = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map();
|
|
923
927
|
for (const D of m)
|
|
924
|
-
if (
|
|
925
|
-
const
|
|
926
|
-
for (const
|
|
927
|
-
const
|
|
928
|
-
if (
|
|
928
|
+
if (P(D)) {
|
|
929
|
+
const B = await e.pFrameProvider.getColumnSpecById(D);
|
|
930
|
+
for (const v of (l = B == null ? void 0 : B.axesSpec) != null ? l : []) {
|
|
931
|
+
const i = _.fromAxisSpec(v).toCanonicalString();
|
|
932
|
+
if (y.has(i))
|
|
929
933
|
continue;
|
|
930
|
-
|
|
931
|
-
const
|
|
932
|
-
|
|
934
|
+
y.add(i), x.push(v);
|
|
935
|
+
const S = Ie(v);
|
|
936
|
+
w.set(i, {
|
|
933
937
|
kind: "axis",
|
|
934
|
-
name:
|
|
935
|
-
label: await T(e,
|
|
938
|
+
name: v.name,
|
|
939
|
+
label: await T(e, i, [
|
|
936
940
|
D.toCanonicalString()
|
|
937
941
|
]),
|
|
938
|
-
type:
|
|
939
|
-
mustBeConsumed:
|
|
942
|
+
type: v.type,
|
|
943
|
+
mustBeConsumed: S,
|
|
940
944
|
dividable: !1,
|
|
941
|
-
spec:
|
|
942
|
-
annotations:
|
|
943
|
-
isSubsetFilter: ((s =
|
|
944
|
-
isDiscreteFilter:
|
|
945
|
+
spec: v,
|
|
946
|
+
annotations: v.annotations,
|
|
947
|
+
isSubsetFilter: ((s = v.annotations) == null ? void 0 : s[$]) === "true",
|
|
948
|
+
isDiscreteFilter: v.type === "String" || ((c = v.annotations) == null ? void 0 : c[ee]) === "true",
|
|
945
949
|
parentSources: [D.toCanonicalString()]
|
|
946
950
|
});
|
|
947
951
|
}
|
|
948
952
|
}
|
|
949
|
-
let
|
|
950
|
-
for (;
|
|
953
|
+
let C = [...y];
|
|
954
|
+
for (; C.length; ) {
|
|
951
955
|
const D = [];
|
|
952
|
-
for (const
|
|
953
|
-
if (n[
|
|
954
|
-
const
|
|
955
|
-
for (const
|
|
956
|
-
if (!g.has(
|
|
957
|
-
D.push(
|
|
958
|
-
const { spec:
|
|
959
|
-
for (const f of
|
|
960
|
-
const
|
|
961
|
-
|
|
956
|
+
for (const B of C)
|
|
957
|
+
if (n[B]) {
|
|
958
|
+
const v = Object.keys(n[B]);
|
|
959
|
+
for (const d of v)
|
|
960
|
+
if (!g.has(d)) {
|
|
961
|
+
D.push(d), g.add(d);
|
|
962
|
+
const { spec: i, id: S } = n[B][d];
|
|
963
|
+
for (const f of i.axesSpec) {
|
|
964
|
+
const h = _.fromAxisSpec(f).toCanonicalString();
|
|
965
|
+
w.has(h) || w.set(h, {
|
|
962
966
|
kind: "axis",
|
|
963
967
|
name: f.name,
|
|
964
|
-
label: (
|
|
968
|
+
label: (a = (r = f.annotations) == null ? void 0 : r[we]) != null ? a : "",
|
|
965
969
|
type: f.type,
|
|
966
970
|
mustBeConsumed: !1,
|
|
967
971
|
dividable: !1,
|
|
968
972
|
spec: f,
|
|
969
973
|
annotations: f.annotations,
|
|
970
|
-
isSubsetFilter: ((
|
|
971
|
-
isDiscreteFilter: f.type === "String" || ((
|
|
972
|
-
parentSources: [
|
|
974
|
+
isSubsetFilter: ((u = f.annotations) == null ? void 0 : u[$]) === "true",
|
|
975
|
+
isDiscreteFilter: f.type === "String" || ((p = f.annotations) == null ? void 0 : p[ee]) === "true",
|
|
976
|
+
parentSources: [S.toCanonicalString()]
|
|
973
977
|
});
|
|
974
978
|
}
|
|
975
979
|
}
|
|
976
980
|
}
|
|
977
|
-
|
|
981
|
+
C = D;
|
|
978
982
|
}
|
|
979
|
-
return { parentAxes:
|
|
983
|
+
return { parentAxes: y, parentAxesList: x, linkerAxes: g, optionsInfo: w };
|
|
980
984
|
}
|
|
981
|
-
async getOptions(e, o, n, l, s,
|
|
982
|
-
var
|
|
983
|
-
const
|
|
985
|
+
async getOptions(e, o, n, l, s, c, r, a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set()) {
|
|
986
|
+
var p, m, y, x, g;
|
|
987
|
+
const w = this.settings.multipleSelectors, C = this.settings.required, D = await this.checkStateConsistency(e, o, s, c);
|
|
984
988
|
if (this.dependsOn.length && this.dependsOn.some((O) => o.components[O].selectorStates.length === 0))
|
|
985
|
-
return { multipleSelectors:
|
|
989
|
+
return { multipleSelectors: w, required: C, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
|
|
986
990
|
if (this.strictlyDependsOnParents && !this.settings.isDataComponent && this.parentComponents.some((O) => o.components[O].selectorStates.length === 0))
|
|
987
|
-
return { multipleSelectors:
|
|
988
|
-
const
|
|
991
|
+
return { multipleSelectors: w, required: C, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
|
|
992
|
+
const B = this.getParentSelectedSources(e, o), v = (await e.pFrameProvider.getColumns([], !1, this.allowedTypes, void 0, this.annotations)).filter((O) => !l.has(O.toCanonicalString())), { parentAxes: d, linkerAxes: i, parentAxesList: S, optionsInfo: f } = await this.getAllowedAxes(e, o, s), h = o.components[this.componentName], b = [];
|
|
989
993
|
if (this.settings.axesAllowed)
|
|
990
|
-
for (const O of
|
|
991
|
-
const
|
|
994
|
+
for (const O of d) {
|
|
995
|
+
const E = A(O), L = f.get(E.toCanonicalString()), N = this.allowedTypes.includes(L.spec.type), F = Object.entries(this.annotations).every(
|
|
992
996
|
([oe, q]) => {
|
|
993
997
|
var U;
|
|
994
998
|
return ((U = L.spec.annotations) == null ? void 0 : U[oe]) === q;
|
|
995
999
|
}
|
|
996
|
-
), G = this.checkSourceBySpec ? this.checkSourceBySpec(L.spec, o) : !0, M = !this.settings.homogeneous || !(L != null && L.mustBeConsumed), K = !l.has(O), Z =
|
|
997
|
-
|
|
1000
|
+
), G = this.checkSourceBySpec ? this.checkSourceBySpec(L.spec, o) : !0, M = !this.settings.homogeneous || !(L != null && L.mustBeConsumed), K = !l.has(O), Z = a.has(E.name) || u.has(E.toCanonicalString()), ne = h.selectorStates.some((oe) => oe.selectedSource === O);
|
|
1001
|
+
N && F && G && M && K && !Z && !ne && b.push({ value: O });
|
|
998
1002
|
}
|
|
999
1003
|
if (this.settings.columnsAllowed) {
|
|
1000
1004
|
const O = !this.settings.columnsWithExtraAxesAllowed && this.strictlyDependsOnParents;
|
|
1001
|
-
for (const
|
|
1002
|
-
const L =
|
|
1005
|
+
for (const E of v) {
|
|
1006
|
+
const L = E.toCanonicalString(), N = A(L), F = await e.pFrameProvider.getColumnSpecById(N);
|
|
1003
1007
|
if (!F)
|
|
1004
1008
|
continue;
|
|
1005
|
-
const G =
|
|
1009
|
+
const G = De(
|
|
1006
1010
|
F,
|
|
1007
|
-
y,
|
|
1008
|
-
a,
|
|
1009
1011
|
S,
|
|
1010
|
-
|
|
1012
|
+
d,
|
|
1013
|
+
i,
|
|
1014
|
+
c
|
|
1011
1015
|
).map((q) => _.fromAxisSpec(q).toCanonicalString()), M = new Set(G);
|
|
1012
1016
|
if (
|
|
1013
1017
|
// do not add to available options label columns, or columns that are not fit by custom spec condition, or columns that are not fit by condition for data inputs
|
|
1014
|
-
|
|
1018
|
+
Le(F) || Ze(F) || this.checkSourceBySpec && !this.checkSourceBySpec(F, o) || this.settings.isDataComponent && !r(F) || O && G.length > 0 || B.length && G.length > 0 && !F.axesSpec.some((q) => {
|
|
1015
1019
|
const U = _.fromAxisSpec(q).toCanonicalString();
|
|
1016
|
-
return
|
|
1020
|
+
return d.has(U) || i.has(U);
|
|
1017
1021
|
})
|
|
1018
1022
|
)
|
|
1019
1023
|
continue;
|
|
1020
|
-
const K = (m = (
|
|
1024
|
+
const K = (m = (p = F == null ? void 0 : F.axesSpec) == null ? void 0 : p.map((q) => _.fromAxisSpec(q).toCanonicalString())) != null ? m : [], Z = {};
|
|
1021
1025
|
if (this.settings.columnsWithExtraAxesAllowed && K.forEach((q, U) => {
|
|
1022
1026
|
M.has(q) && (Z[q] = U);
|
|
1023
1027
|
}), F) {
|
|
1024
|
-
const q = (
|
|
1028
|
+
const q = (y = n[L]) != null ? y : await T(e, E.toCanonicalString(), []), U = {
|
|
1025
1029
|
kind: "column",
|
|
1026
1030
|
name: F.name,
|
|
1027
1031
|
label: q,
|
|
@@ -1033,18 +1037,18 @@ var Q = class {
|
|
|
1033
1037
|
axesToBeFixed: G,
|
|
1034
1038
|
axesToBeFixedIndexes: Z
|
|
1035
1039
|
};
|
|
1036
|
-
f.set(
|
|
1040
|
+
f.set(N.toCanonicalString(), U);
|
|
1037
1041
|
}
|
|
1038
|
-
const ne =
|
|
1042
|
+
const ne = a.has(N.name) || u.has(N.toCanonicalString()), oe = o.components[this.componentName].selectorStates.some(
|
|
1039
1043
|
(q) => q.selectedSource === L
|
|
1040
1044
|
);
|
|
1041
|
-
!ne && !oe &&
|
|
1045
|
+
!ne && !oe && b.push({ value: L });
|
|
1042
1046
|
}
|
|
1043
1047
|
}
|
|
1044
|
-
return { multipleSelectors:
|
|
1048
|
+
return { multipleSelectors: w, required: C, stateConsistency: D, options: b, optionsInfo: f };
|
|
1045
1049
|
}
|
|
1046
1050
|
};
|
|
1047
|
-
|
|
1051
|
+
Pe.DefaultSettings = {
|
|
1048
1052
|
isDataComponent: !1,
|
|
1049
1053
|
multipleSelectors: !1,
|
|
1050
1054
|
required: !1,
|
|
@@ -1054,7 +1058,7 @@ De.DefaultSettings = {
|
|
|
1054
1058
|
columnsWithExtraAxesAllowed: !0,
|
|
1055
1059
|
dimensionConsumer: !1
|
|
1056
1060
|
};
|
|
1057
|
-
var I =
|
|
1061
|
+
var I = Pe, et = {
|
|
1058
1062
|
type: "bubble",
|
|
1059
1063
|
components: {
|
|
1060
1064
|
valueSize: { type: "simple", selectorStates: [] },
|
|
@@ -1068,20 +1072,20 @@ var I = De, Qe = {
|
|
|
1068
1072
|
},
|
|
1069
1073
|
dividedAxes: {}
|
|
1070
1074
|
};
|
|
1071
|
-
function
|
|
1075
|
+
function re(t, e) {
|
|
1072
1076
|
if (!e.length)
|
|
1073
1077
|
return [];
|
|
1074
1078
|
const o = e.map((s) => A(s)), n = Object.values(t.columnsData)[0].length, l = [];
|
|
1075
1079
|
for (let s = 0; s < n; s++) {
|
|
1076
|
-
const
|
|
1077
|
-
const
|
|
1078
|
-
return
|
|
1080
|
+
const c = o.map((r) => {
|
|
1081
|
+
const a = r.toCanonicalString();
|
|
1082
|
+
return P(r) ? t.columnsData[a][s] : t.axesData[a][s];
|
|
1079
1083
|
}).join(", ");
|
|
1080
|
-
l.push(
|
|
1084
|
+
l.push(c);
|
|
1081
1085
|
}
|
|
1082
1086
|
return l;
|
|
1083
1087
|
}
|
|
1084
|
-
var
|
|
1088
|
+
var tt = class extends Q {
|
|
1085
1089
|
constructor() {
|
|
1086
1090
|
super({
|
|
1087
1091
|
valueSize: new I({
|
|
@@ -1191,120 +1195,120 @@ var Ze = class extends Q {
|
|
|
1191
1195
|
}
|
|
1192
1196
|
async createDataByColumns(t, e) {
|
|
1193
1197
|
var o, n, l;
|
|
1194
|
-
const s = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
1195
|
-
if (!s || !
|
|
1198
|
+
const s = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.valueSize.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
1199
|
+
if (!s || !c)
|
|
1196
1200
|
throw Error("Value column is not valid");
|
|
1197
|
-
const
|
|
1198
|
-
if (!
|
|
1201
|
+
const r = A(s), a = A(c);
|
|
1202
|
+
if (!r || !a || !P(r) && !P(a))
|
|
1199
1203
|
throw Error("Value column is not valid");
|
|
1200
|
-
const
|
|
1204
|
+
const u = {
|
|
1201
1205
|
type: "columns",
|
|
1202
1206
|
id: (l = z(e.components)) != null ? l : "",
|
|
1203
1207
|
values: {}
|
|
1204
|
-
}, { linkerColumnsMap:
|
|
1208
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), y = [
|
|
1205
1209
|
...e.components.filters.selectorStates,
|
|
1206
1210
|
...e.components.tabBy.selectorStates
|
|
1207
|
-
], x = Y(
|
|
1211
|
+
], x = Y(y), g = y.map((F) => A(F.selectedSource)).filter(P), w = [r, a].filter(P), C = w.map((F) => F.toCanonicalString()), D = await J(t, C), B = [
|
|
1208
1212
|
e.components.facetBy,
|
|
1209
1213
|
e.components.x,
|
|
1210
1214
|
e.components.y,
|
|
1211
1215
|
e.components.tooltipContent
|
|
1212
|
-
],
|
|
1213
|
-
for (const { selectedSource: F, fixedAxes: G } of
|
|
1214
|
-
|
|
1216
|
+
], v = [], d = w.map(() => []), i = [], S = [];
|
|
1217
|
+
for (const { selectedSource: F, fixedAxes: G } of y)
|
|
1218
|
+
S.push(...await V(
|
|
1215
1219
|
t,
|
|
1216
|
-
|
|
1220
|
+
p,
|
|
1217
1221
|
m,
|
|
1218
1222
|
D,
|
|
1219
1223
|
F,
|
|
1220
1224
|
G
|
|
1221
|
-
)),
|
|
1225
|
+
)), d.push(
|
|
1222
1226
|
(G ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
|
|
1223
1227
|
);
|
|
1224
|
-
for (const F of
|
|
1228
|
+
for (const F of B)
|
|
1225
1229
|
for (const { selectedSource: G, fixedAxes: M } of F.selectorStates) {
|
|
1226
|
-
|
|
1230
|
+
v.push(A(G)), i.push(
|
|
1227
1231
|
(M ?? []).map(({ axisIdx: Z, axisValue: ne }) => ({ idx: Z, value: ne }))
|
|
1228
|
-
),
|
|
1232
|
+
), S.push(...await V(
|
|
1229
1233
|
t,
|
|
1230
|
-
|
|
1234
|
+
p,
|
|
1231
1235
|
m,
|
|
1232
1236
|
D,
|
|
1233
1237
|
G,
|
|
1234
1238
|
M
|
|
1235
1239
|
));
|
|
1236
|
-
const K = await k(t, G,
|
|
1237
|
-
K &&
|
|
1240
|
+
const K = await k(t, G, C);
|
|
1241
|
+
K && v.push(K);
|
|
1238
1242
|
}
|
|
1239
1243
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
1240
|
-
[...
|
|
1241
|
-
|
|
1244
|
+
[...w, ...S, ...g],
|
|
1245
|
+
v,
|
|
1242
1246
|
x,
|
|
1243
1247
|
!0,
|
|
1244
|
-
|
|
1245
|
-
|
|
1248
|
+
d,
|
|
1249
|
+
i
|
|
1246
1250
|
);
|
|
1247
|
-
|
|
1251
|
+
v.forEach((F) => {
|
|
1248
1252
|
const G = F.toCanonicalString();
|
|
1249
|
-
|
|
1250
|
-
}),
|
|
1251
|
-
const
|
|
1253
|
+
u.values[G] = P(F) ? f.columnsData[G] : f.axesData[G];
|
|
1254
|
+
}), u.values[s] = P(r) ? f.columnsData[s] : f.axesData[s], u.values[c] = P(a) ? f.columnsData[c] : f.axesData[c];
|
|
1255
|
+
const h = e.components.x.selectorStates.map((F) => F.selectedSource), b = h.join(", "), O = await Promise.all(h.map(
|
|
1252
1256
|
async (F) => {
|
|
1253
1257
|
var G, M;
|
|
1254
|
-
return (M = (G = await k(t, F,
|
|
1258
|
+
return (M = (G = await k(t, F, C)) == null ? void 0 : G.toCanonicalString()) != null ? M : F;
|
|
1255
1259
|
}
|
|
1256
1260
|
));
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1261
|
+
u.values[b] = re(f, h), u.values.xLabels = re(f, O);
|
|
1262
|
+
const E = e.components.y.selectorStates.map((F) => F.selectedSource), L = E.join(", "), N = await Promise.all(E.map(
|
|
1259
1263
|
async (F) => {
|
|
1260
1264
|
var G, M;
|
|
1261
|
-
return (M = (G = await k(t, F,
|
|
1265
|
+
return (M = (G = await k(t, F, C)) == null ? void 0 : G.toCanonicalString()) != null ? M : F;
|
|
1262
1266
|
}
|
|
1263
1267
|
));
|
|
1264
|
-
return
|
|
1268
|
+
return u.values[L] = re(f, E), u.values.yLabels = re(f, N), { byColumns: u };
|
|
1265
1269
|
}
|
|
1266
1270
|
async createChartSettings(t, e) {
|
|
1267
1271
|
var o, n;
|
|
1268
1272
|
const l = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource, s = (n = e.components.valueSize.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
1269
1273
|
if (!l || !s)
|
|
1270
1274
|
throw Error("Value column is not valid");
|
|
1271
|
-
const
|
|
1272
|
-
if (!
|
|
1275
|
+
const c = A(l), r = A(s);
|
|
1276
|
+
if (!P(c) && !P(r))
|
|
1273
1277
|
throw Error("Value column is not valid");
|
|
1274
|
-
const
|
|
1278
|
+
const a = [c, r].filter(P).map((v) => v.toCanonicalString()), u = {
|
|
1275
1279
|
type: "column",
|
|
1276
1280
|
value: l,
|
|
1277
1281
|
label: await T(t, l, [])
|
|
1278
|
-
},
|
|
1282
|
+
}, p = {
|
|
1279
1283
|
type: "column",
|
|
1280
1284
|
value: s,
|
|
1281
1285
|
label: await T(t, s, [])
|
|
1282
|
-
},
|
|
1283
|
-
var
|
|
1286
|
+
}, y = e.components.x.selectorStates.map(({ selectedSource: v }) => v).join(", "), g = e.components.y.selectorStates.map(({ selectedSource: v }) => v).join(", "), w = await Promise.all(e.components.facetBy.selectorStates.map(async (v) => {
|
|
1287
|
+
var d, i;
|
|
1284
1288
|
return {
|
|
1285
1289
|
type: "column",
|
|
1286
|
-
value: (
|
|
1290
|
+
value: (i = (d = await k(t, v.selectedSource, a)) == null ? void 0 : d.toCanonicalString()) != null ? i : v.selectedSource
|
|
1287
1291
|
};
|
|
1288
|
-
})),
|
|
1289
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
1290
|
-
var
|
|
1291
|
-
const
|
|
1292
|
+
})), C = (await Promise.all(e.components.x.selectorStates.map((v) => T(t, v.selectedSource, a)))).join(", "), D = (await Promise.all(e.components.y.selectorStates.map((v) => T(t, v.selectedSource, a)))).join(", "), B = await Promise.all(
|
|
1293
|
+
e.components.tooltipContent.selectorStates.map(async (v) => {
|
|
1294
|
+
var d, i;
|
|
1295
|
+
const S = v.selectedSource;
|
|
1292
1296
|
return {
|
|
1293
1297
|
type: "column",
|
|
1294
|
-
label: await T(t,
|
|
1295
|
-
value:
|
|
1296
|
-
valueLabels: (
|
|
1298
|
+
label: await T(t, S, a) || S,
|
|
1299
|
+
value: S,
|
|
1300
|
+
valueLabels: (i = (d = await k(t, S, a)) == null ? void 0 : d.toCanonicalString()) != null ? i : S
|
|
1297
1301
|
};
|
|
1298
1302
|
})
|
|
1299
1303
|
);
|
|
1300
1304
|
return {
|
|
1301
1305
|
type: "bubble",
|
|
1302
|
-
valueColor:
|
|
1303
|
-
valueSize:
|
|
1306
|
+
valueColor: u,
|
|
1307
|
+
valueSize: p,
|
|
1304
1308
|
xColumn: {
|
|
1305
1309
|
type: "column",
|
|
1306
|
-
value:
|
|
1307
|
-
label:
|
|
1310
|
+
value: y,
|
|
1311
|
+
label: C,
|
|
1308
1312
|
valueLabels: "xLabels"
|
|
1309
1313
|
},
|
|
1310
1314
|
yColumn: {
|
|
@@ -1313,14 +1317,14 @@ var Ze = class extends Q {
|
|
|
1313
1317
|
label: D,
|
|
1314
1318
|
valueLabels: "yLabels"
|
|
1315
1319
|
},
|
|
1316
|
-
facetBy:
|
|
1320
|
+
facetBy: w,
|
|
1317
1321
|
tooltips: {
|
|
1318
1322
|
show: !0,
|
|
1319
|
-
content:
|
|
1323
|
+
content: B
|
|
1320
1324
|
}
|
|
1321
1325
|
};
|
|
1322
1326
|
}
|
|
1323
|
-
},
|
|
1327
|
+
}, nt = {
|
|
1324
1328
|
type: "histogram",
|
|
1325
1329
|
components: {
|
|
1326
1330
|
value: { type: "simple", selectorStates: [] },
|
|
@@ -1330,7 +1334,7 @@ var Ze = class extends Q {
|
|
|
1330
1334
|
facetBy: { type: "simple", selectorStates: [] }
|
|
1331
1335
|
},
|
|
1332
1336
|
dividedAxes: {}
|
|
1333
|
-
},
|
|
1337
|
+
}, ot = class extends Q {
|
|
1334
1338
|
constructor() {
|
|
1335
1339
|
super(
|
|
1336
1340
|
{
|
|
@@ -1400,44 +1404,44 @@ var Ze = class extends Q {
|
|
|
1400
1404
|
if (!l)
|
|
1401
1405
|
throw Error("Value column is not valid");
|
|
1402
1406
|
const s = A(l);
|
|
1403
|
-
if (!
|
|
1407
|
+
if (!P(s))
|
|
1404
1408
|
throw Error("Value column is not valid");
|
|
1405
|
-
const
|
|
1409
|
+
const c = {
|
|
1406
1410
|
type: "columns",
|
|
1407
1411
|
id: (n = z(e.components)) != null ? n : "",
|
|
1408
1412
|
values: {}
|
|
1409
|
-
}, { linkerColumnsMap:
|
|
1413
|
+
}, { linkerColumnsMap: r, compositeLinkerMap: a } = await X(t), u = [
|
|
1410
1414
|
...e.components.filters.selectorStates,
|
|
1411
1415
|
...e.components.tabBy.selectorStates
|
|
1412
|
-
],
|
|
1413
|
-
for (const { selectedSource:
|
|
1414
|
-
|
|
1415
|
-
...await V(t,
|
|
1416
|
-
),
|
|
1417
|
-
(
|
|
1416
|
+
], p = Y(u), m = u.map((d) => A(d.selectedSource)).filter(P), y = [l], x = await J(t, y), g = [e.components.facetBy, e.components.grouping], w = [], C = [[]], D = [], B = [];
|
|
1417
|
+
for (const { selectedSource: d, fixedAxes: i } of u)
|
|
1418
|
+
B.push(
|
|
1419
|
+
...await V(t, r, a, x, d, i)
|
|
1420
|
+
), C.push(
|
|
1421
|
+
(i ?? []).map(({ axisIdx: S, axisValue: f }) => ({ idx: S, value: f }))
|
|
1418
1422
|
);
|
|
1419
|
-
for (const
|
|
1420
|
-
for (const { selectedSource:
|
|
1421
|
-
|
|
1422
|
-
(
|
|
1423
|
-
),
|
|
1424
|
-
...await V(t,
|
|
1423
|
+
for (const d of g)
|
|
1424
|
+
for (const { selectedSource: i, fixedAxes: S } of d.selectorStates) {
|
|
1425
|
+
w.push(A(i)), D.push(
|
|
1426
|
+
(S ?? []).map(({ axisIdx: h, axisValue: b }) => ({ idx: h, value: b }))
|
|
1427
|
+
), B.push(
|
|
1428
|
+
...await V(t, r, a, x, i, S)
|
|
1425
1429
|
);
|
|
1426
|
-
const f = await k(t,
|
|
1427
|
-
f &&
|
|
1430
|
+
const f = await k(t, i, y);
|
|
1431
|
+
f && w.push(f);
|
|
1428
1432
|
}
|
|
1429
|
-
const
|
|
1430
|
-
[s, ...
|
|
1431
|
-
h,
|
|
1432
|
-
u,
|
|
1433
|
-
!0,
|
|
1433
|
+
const v = await t.pFrameProvider.getTableOuterJoin(
|
|
1434
|
+
[s, ...B, ...m],
|
|
1434
1435
|
w,
|
|
1436
|
+
p,
|
|
1437
|
+
!0,
|
|
1438
|
+
C,
|
|
1435
1439
|
D
|
|
1436
1440
|
);
|
|
1437
|
-
return
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1440
|
-
}),
|
|
1441
|
+
return w.forEach((d) => {
|
|
1442
|
+
const i = d.toCanonicalString();
|
|
1443
|
+
c.values[i] = P(d) ? v.columnsData[i] : v.axesData[i];
|
|
1444
|
+
}), c.values[s.toCanonicalString()] = v.columnsData[s.toCanonicalString()], { byColumns: c };
|
|
1441
1445
|
}
|
|
1442
1446
|
async createChartSettings(t, e) {
|
|
1443
1447
|
var o, n;
|
|
@@ -1445,39 +1449,39 @@ var Ze = class extends Q {
|
|
|
1445
1449
|
if (!l)
|
|
1446
1450
|
throw Error("Value column is not valid");
|
|
1447
1451
|
const s = A(l);
|
|
1448
|
-
if (!
|
|
1452
|
+
if (!P(s))
|
|
1449
1453
|
throw Error("Value column is not valid");
|
|
1450
|
-
const
|
|
1454
|
+
const c = [l], r = {
|
|
1451
1455
|
type: "column",
|
|
1452
1456
|
value: l,
|
|
1453
1457
|
label: await T(t, l, [])
|
|
1454
|
-
},
|
|
1455
|
-
e.components.facetBy.selectorStates.map(async (
|
|
1456
|
-
var m,
|
|
1458
|
+
}, a = await Promise.all(
|
|
1459
|
+
e.components.facetBy.selectorStates.map(async (p) => {
|
|
1460
|
+
var m, y;
|
|
1457
1461
|
return {
|
|
1458
1462
|
type: "column",
|
|
1459
|
-
value: (
|
|
1463
|
+
value: (y = (m = await k(t, p.selectedSource, c)) == null ? void 0 : m.toCanonicalString()) != null ? y : p.selectedSource
|
|
1460
1464
|
};
|
|
1461
1465
|
})
|
|
1462
1466
|
);
|
|
1463
|
-
let
|
|
1467
|
+
let u;
|
|
1464
1468
|
if (e.components.grouping.selectorStates.length) {
|
|
1465
|
-
const { selectedSource:
|
|
1466
|
-
|
|
1469
|
+
const { selectedSource: p } = e.components.grouping.selectorStates[0];
|
|
1470
|
+
u = {
|
|
1467
1471
|
type: "column",
|
|
1468
|
-
value:
|
|
1469
|
-
label: await T(t,
|
|
1470
|
-
valueLabels: (n = await k(t,
|
|
1472
|
+
value: p,
|
|
1473
|
+
label: await T(t, p, c),
|
|
1474
|
+
valueLabels: (n = await k(t, p, c)) == null ? void 0 : n.toCanonicalString()
|
|
1471
1475
|
};
|
|
1472
1476
|
}
|
|
1473
1477
|
return {
|
|
1474
1478
|
type: "histogram",
|
|
1475
|
-
valueColumn:
|
|
1476
|
-
facetBy:
|
|
1477
|
-
grouping:
|
|
1479
|
+
valueColumn: r,
|
|
1480
|
+
facetBy: a,
|
|
1481
|
+
grouping: u
|
|
1478
1482
|
};
|
|
1479
1483
|
}
|
|
1480
|
-
},
|
|
1484
|
+
}, st = {
|
|
1481
1485
|
type: "discrete",
|
|
1482
1486
|
components: {
|
|
1483
1487
|
y: { type: "simple", selectorStates: [] },
|
|
@@ -1488,7 +1492,7 @@ var Ze = class extends Q {
|
|
|
1488
1492
|
secondaryGrouping: { type: "simple", selectorStates: [] }
|
|
1489
1493
|
},
|
|
1490
1494
|
dividedAxes: {}
|
|
1491
|
-
},
|
|
1495
|
+
}, lt = class extends Q {
|
|
1492
1496
|
constructor() {
|
|
1493
1497
|
super(
|
|
1494
1498
|
{
|
|
@@ -1563,114 +1567,114 @@ var Ze = class extends Q {
|
|
|
1563
1567
|
async createDataByColumns(t, e) {
|
|
1564
1568
|
var o;
|
|
1565
1569
|
const n = e.components.y.selectorStates[0].selectedSource, l = A(n);
|
|
1566
|
-
if (!n || !
|
|
1570
|
+
if (!n || !P(l))
|
|
1567
1571
|
throw Error("Y column is not valid");
|
|
1568
1572
|
const s = {
|
|
1569
1573
|
type: "columns",
|
|
1570
1574
|
id: (o = z(e.components)) != null ? o : "",
|
|
1571
1575
|
values: {}
|
|
1572
|
-
}, { linkerColumnsMap:
|
|
1576
|
+
}, { linkerColumnsMap: c, compositeLinkerMap: r } = await X(t), a = [
|
|
1573
1577
|
...e.components.filters.selectorStates,
|
|
1574
1578
|
...e.components.tabBy.selectorStates
|
|
1575
|
-
],
|
|
1576
|
-
for (const { selectedSource:
|
|
1579
|
+
], u = Y(a), p = a.map((v) => A(v.selectedSource)).filter(P), m = [n], y = await J(t, m), x = [e.components.primaryGrouping, e.components.secondaryGrouping, e.components.facetBy], g = [], w = [[]], C = [], D = [];
|
|
1580
|
+
for (const { selectedSource: v, fixedAxes: d } of a)
|
|
1577
1581
|
D.push(...await V(
|
|
1578
1582
|
t,
|
|
1579
|
-
r,
|
|
1580
1583
|
c,
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1584
|
+
r,
|
|
1585
|
+
y,
|
|
1586
|
+
v,
|
|
1587
|
+
d
|
|
1588
|
+
)), w.push(
|
|
1589
|
+
(d ?? []).map(({ axisIdx: i, axisValue: S }) => ({ idx: i, value: S }))
|
|
1586
1590
|
);
|
|
1587
|
-
for (const
|
|
1588
|
-
for (const { selectedSource:
|
|
1589
|
-
g.push(A(
|
|
1590
|
-
(
|
|
1591
|
+
for (const v of x)
|
|
1592
|
+
for (const { selectedSource: d, fixedAxes: i } of v.selectorStates) {
|
|
1593
|
+
g.push(A(d)), C.push(
|
|
1594
|
+
(i ?? []).map(({ axisIdx: f, axisValue: h }) => ({ idx: f, value: h }))
|
|
1591
1595
|
), D.push(...await V(
|
|
1592
1596
|
t,
|
|
1593
|
-
r,
|
|
1594
1597
|
c,
|
|
1598
|
+
r,
|
|
1599
|
+
y,
|
|
1595
1600
|
d,
|
|
1596
|
-
|
|
1597
|
-
S
|
|
1601
|
+
i
|
|
1598
1602
|
));
|
|
1599
|
-
const
|
|
1600
|
-
|
|
1603
|
+
const S = await k(t, d, m);
|
|
1604
|
+
S && g.push(S);
|
|
1601
1605
|
}
|
|
1602
|
-
const
|
|
1603
|
-
[l, ...D, ...
|
|
1606
|
+
const B = await t.pFrameProvider.getTableOuterJoin(
|
|
1607
|
+
[l, ...D, ...p],
|
|
1604
1608
|
g,
|
|
1605
|
-
|
|
1609
|
+
u,
|
|
1606
1610
|
!0,
|
|
1607
|
-
|
|
1608
|
-
|
|
1611
|
+
w,
|
|
1612
|
+
C
|
|
1609
1613
|
);
|
|
1610
|
-
return g.forEach((
|
|
1611
|
-
const
|
|
1612
|
-
s.values[
|
|
1613
|
-
}), s.values[l.toCanonicalString()] =
|
|
1614
|
+
return g.forEach((v) => {
|
|
1615
|
+
const d = v.toCanonicalString();
|
|
1616
|
+
s.values[d] = P(v) ? B.columnsData[d] : B.axesData[d];
|
|
1617
|
+
}), s.values[l.toCanonicalString()] = B.columnsData[l.toCanonicalString()], { byColumns: s };
|
|
1614
1618
|
}
|
|
1615
1619
|
async createChartSettings(t, e) {
|
|
1616
1620
|
var o, n;
|
|
1617
1621
|
const l = e.components.y.selectorStates[0].selectedSource, s = A(l);
|
|
1618
|
-
if (!l || !
|
|
1622
|
+
if (!l || !P(s))
|
|
1619
1623
|
throw Error("Y column is not valid");
|
|
1620
|
-
const
|
|
1624
|
+
const c = {
|
|
1621
1625
|
type: "column",
|
|
1622
1626
|
value: l,
|
|
1623
1627
|
label: await T(t, l, [])
|
|
1624
|
-
},
|
|
1625
|
-
let
|
|
1628
|
+
}, r = [l];
|
|
1629
|
+
let a;
|
|
1626
1630
|
if (e.components.primaryGrouping.selectorStates.length) {
|
|
1627
1631
|
const { selectedSource: m } = e.components.primaryGrouping.selectorStates[0];
|
|
1628
|
-
|
|
1632
|
+
a = {
|
|
1629
1633
|
columnName: {
|
|
1630
1634
|
type: "column",
|
|
1631
1635
|
value: m,
|
|
1632
|
-
label: await T(t, m,
|
|
1636
|
+
label: await T(t, m, r),
|
|
1633
1637
|
valueLabels: (o = await k(
|
|
1634
1638
|
t,
|
|
1635
1639
|
m,
|
|
1636
|
-
|
|
1640
|
+
r
|
|
1637
1641
|
)) == null ? void 0 : o.toCanonicalString()
|
|
1638
1642
|
}
|
|
1639
1643
|
};
|
|
1640
1644
|
}
|
|
1641
|
-
let
|
|
1645
|
+
let u;
|
|
1642
1646
|
if (e.components.secondaryGrouping.selectorStates.length) {
|
|
1643
1647
|
const { selectedSource: m } = e.components.secondaryGrouping.selectorStates[0];
|
|
1644
|
-
|
|
1648
|
+
u = {
|
|
1645
1649
|
columnName: {
|
|
1646
1650
|
type: "column",
|
|
1647
1651
|
value: m,
|
|
1648
|
-
label: await T(t, m,
|
|
1652
|
+
label: await T(t, m, r),
|
|
1649
1653
|
valueLabels: (n = await k(
|
|
1650
1654
|
t,
|
|
1651
1655
|
m,
|
|
1652
|
-
|
|
1656
|
+
r
|
|
1653
1657
|
)) == null ? void 0 : n.toCanonicalString()
|
|
1654
1658
|
}
|
|
1655
1659
|
};
|
|
1656
1660
|
}
|
|
1657
|
-
const
|
|
1658
|
-
var
|
|
1661
|
+
const p = await Promise.all(e.components.facetBy.selectorStates.map(async (m) => {
|
|
1662
|
+
var y, x;
|
|
1659
1663
|
return {
|
|
1660
1664
|
type: "column",
|
|
1661
|
-
value: (x = (
|
|
1662
|
-
label: await T(t, m.selectedSource,
|
|
1665
|
+
value: (x = (y = await k(t, m.selectedSource, r)) == null ? void 0 : y.toCanonicalString()) != null ? x : m.selectedSource,
|
|
1666
|
+
label: await T(t, m.selectedSource, r)
|
|
1663
1667
|
};
|
|
1664
1668
|
}));
|
|
1665
1669
|
return {
|
|
1666
1670
|
type: "discrete",
|
|
1667
|
-
y:
|
|
1668
|
-
primaryGrouping:
|
|
1669
|
-
secondaryGrouping:
|
|
1670
|
-
facetBy:
|
|
1671
|
+
y: c,
|
|
1672
|
+
primaryGrouping: a,
|
|
1673
|
+
secondaryGrouping: u,
|
|
1674
|
+
facetBy: p
|
|
1671
1675
|
};
|
|
1672
1676
|
}
|
|
1673
|
-
},
|
|
1677
|
+
}, at = {
|
|
1674
1678
|
type: "heatmap",
|
|
1675
1679
|
components: {
|
|
1676
1680
|
value: { type: "simple", selectorStates: [] },
|
|
@@ -1687,23 +1691,23 @@ var Ze = class extends Q {
|
|
|
1687
1691
|
},
|
|
1688
1692
|
dividedAxes: {}
|
|
1689
1693
|
};
|
|
1690
|
-
function
|
|
1694
|
+
function de(t) {
|
|
1691
1695
|
return t ? "kind" in t && t.kind === "PColumn" ? t.valueType === "String" : t.type === "String" : !0;
|
|
1692
1696
|
}
|
|
1693
|
-
function
|
|
1697
|
+
function ce(t, e) {
|
|
1694
1698
|
if (!e.length)
|
|
1695
1699
|
return [];
|
|
1696
1700
|
const o = e.map((s) => A(s)), n = Object.values(t.columnsData)[0].length, l = [];
|
|
1697
1701
|
for (let s = 0; s < n; s++) {
|
|
1698
|
-
const
|
|
1699
|
-
const
|
|
1700
|
-
return
|
|
1702
|
+
const c = o.map((r) => {
|
|
1703
|
+
const a = r.toCanonicalString();
|
|
1704
|
+
return P(r) ? t.columnsData[a][s] : t.axesData[a][s];
|
|
1701
1705
|
}).join(", ");
|
|
1702
|
-
l.push(
|
|
1706
|
+
l.push(c);
|
|
1703
1707
|
}
|
|
1704
1708
|
return l;
|
|
1705
1709
|
}
|
|
1706
|
-
var
|
|
1710
|
+
var rt = class extends Q {
|
|
1707
1711
|
constructor() {
|
|
1708
1712
|
super(
|
|
1709
1713
|
{
|
|
@@ -1774,7 +1778,7 @@ var lt = class extends Q {
|
|
|
1774
1778
|
dimensionConsumer: !0,
|
|
1775
1779
|
multipleSelectors: !0,
|
|
1776
1780
|
axesAllowed: !0,
|
|
1777
|
-
columnsAllowed: !
|
|
1781
|
+
columnsAllowed: !0
|
|
1778
1782
|
},
|
|
1779
1783
|
dependsOn: ["y"],
|
|
1780
1784
|
checkSourceBySpec: (t, e) => {
|
|
@@ -1892,16 +1896,16 @@ var lt = class extends Q {
|
|
|
1892
1896
|
if (!l)
|
|
1893
1897
|
throw Error("Value column is not valid");
|
|
1894
1898
|
const s = A(l);
|
|
1895
|
-
if (!
|
|
1899
|
+
if (!P(s))
|
|
1896
1900
|
throw Error("Value column is not valid");
|
|
1897
|
-
const
|
|
1901
|
+
const c = {
|
|
1898
1902
|
type: "columns",
|
|
1899
1903
|
id: (n = z(e.components)) != null ? n : "",
|
|
1900
1904
|
values: {}
|
|
1901
|
-
}, { linkerColumnsMap:
|
|
1905
|
+
}, { linkerColumnsMap: r, compositeLinkerMap: a } = await X(t), u = [
|
|
1902
1906
|
...e.components.filters.selectorStates,
|
|
1903
1907
|
...e.components.tabBy.selectorStates
|
|
1904
|
-
],
|
|
1908
|
+
], p = Y(u), m = u.map((L) => A(L.selectedSource)).filter(P), y = [l], x = await J(t, y), g = [
|
|
1905
1909
|
e.components.facetBy,
|
|
1906
1910
|
e.components.annotationsX,
|
|
1907
1911
|
e.components.annotationsY,
|
|
@@ -1910,67 +1914,67 @@ var lt = class extends Q {
|
|
|
1910
1914
|
e.components.xGroupBy,
|
|
1911
1915
|
e.components.yGroupBy,
|
|
1912
1916
|
e.components.tooltipContent
|
|
1913
|
-
],
|
|
1914
|
-
for (const { selectedSource: L, fixedAxes:
|
|
1915
|
-
|
|
1917
|
+
], w = [], C = [[]], D = [], B = [];
|
|
1918
|
+
for (const { selectedSource: L, fixedAxes: N } of u)
|
|
1919
|
+
B.push(...await V(
|
|
1916
1920
|
t,
|
|
1917
|
-
|
|
1918
|
-
|
|
1921
|
+
r,
|
|
1922
|
+
a,
|
|
1919
1923
|
x,
|
|
1920
1924
|
L,
|
|
1921
|
-
|
|
1922
|
-
)),
|
|
1923
|
-
(
|
|
1925
|
+
N
|
|
1926
|
+
)), C.push(
|
|
1927
|
+
(N ?? []).map(({ axisIdx: F, axisValue: G }) => ({ idx: F, value: G }))
|
|
1924
1928
|
);
|
|
1925
1929
|
for (const L of g)
|
|
1926
|
-
for (const { selectedSource:
|
|
1927
|
-
|
|
1930
|
+
for (const { selectedSource: N, fixedAxes: F } of L.selectorStates) {
|
|
1931
|
+
w.push(A(N)), D.push(
|
|
1928
1932
|
(F ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
|
|
1929
|
-
),
|
|
1933
|
+
), B.push(...await V(
|
|
1930
1934
|
t,
|
|
1931
|
-
|
|
1932
|
-
|
|
1935
|
+
r,
|
|
1936
|
+
a,
|
|
1933
1937
|
x,
|
|
1934
|
-
|
|
1938
|
+
N,
|
|
1935
1939
|
F
|
|
1936
1940
|
));
|
|
1937
|
-
const G = await k(t,
|
|
1938
|
-
G &&
|
|
1941
|
+
const G = await k(t, N, y);
|
|
1942
|
+
G && w.push(G);
|
|
1939
1943
|
}
|
|
1940
|
-
const
|
|
1941
|
-
[s, ...
|
|
1942
|
-
h,
|
|
1943
|
-
u,
|
|
1944
|
-
!0,
|
|
1944
|
+
const v = await t.pFrameProvider.getTableOuterJoin(
|
|
1945
|
+
[s, ...B, ...m],
|
|
1945
1946
|
w,
|
|
1947
|
+
p,
|
|
1948
|
+
!0,
|
|
1949
|
+
C,
|
|
1946
1950
|
D
|
|
1947
1951
|
);
|
|
1948
|
-
|
|
1949
|
-
const
|
|
1950
|
-
|
|
1951
|
-
}),
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1952
|
+
w.forEach((L) => {
|
|
1953
|
+
const N = L.toCanonicalString();
|
|
1954
|
+
c.values[N] = P(L) ? v.columnsData[N] : v.axesData[N];
|
|
1955
|
+
}), c.values[s.toCanonicalString()] = v.columnsData[s.toCanonicalString()];
|
|
1956
|
+
const d = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map((L) => L.selectedSource), i = d.join(", ");
|
|
1957
|
+
c.values[i] = ce(v, d);
|
|
1958
|
+
const S = e.components.x.selectorStates.map((L) => L.selectedSource), f = await Promise.all(
|
|
1959
|
+
S.map(
|
|
1956
1960
|
async (L) => {
|
|
1957
|
-
var
|
|
1958
|
-
return (F = (
|
|
1961
|
+
var N, F;
|
|
1962
|
+
return (F = (N = await k(t, L, y)) == null ? void 0 : N.toCanonicalString()) != null ? F : L;
|
|
1959
1963
|
}
|
|
1960
1964
|
)
|
|
1961
1965
|
);
|
|
1962
|
-
|
|
1963
|
-
const
|
|
1964
|
-
|
|
1965
|
-
const O = e.components.y.selectorStates.map((L) => L.selectedSource),
|
|
1966
|
+
c.values.xLabelsKey = ce(v, f);
|
|
1967
|
+
const h = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map((L) => L.selectedSource), b = h.join(", ");
|
|
1968
|
+
c.values[b] = ce(v, h);
|
|
1969
|
+
const O = e.components.y.selectorStates.map((L) => L.selectedSource), E = await Promise.all(
|
|
1966
1970
|
O.map(
|
|
1967
1971
|
async (L) => {
|
|
1968
|
-
var
|
|
1969
|
-
return (F = (
|
|
1972
|
+
var N, F;
|
|
1973
|
+
return (F = (N = await k(t, L, y)) == null ? void 0 : N.toCanonicalString()) != null ? F : L;
|
|
1970
1974
|
}
|
|
1971
1975
|
)
|
|
1972
1976
|
);
|
|
1973
|
-
return
|
|
1977
|
+
return c.values.yLabelsKey = ce(v, E), { byColumns: c };
|
|
1974
1978
|
}
|
|
1975
1979
|
async createChartSettings(t, e) {
|
|
1976
1980
|
var o;
|
|
@@ -1978,46 +1982,46 @@ var lt = class extends Q {
|
|
|
1978
1982
|
if (!n)
|
|
1979
1983
|
throw Error("Value column is not valid");
|
|
1980
1984
|
const l = A(n);
|
|
1981
|
-
if (!
|
|
1985
|
+
if (!P(l))
|
|
1982
1986
|
throw Error("Value column is not valid");
|
|
1983
|
-
const s = [n],
|
|
1987
|
+
const s = [n], c = {
|
|
1984
1988
|
type: "column",
|
|
1985
1989
|
value: n,
|
|
1986
1990
|
label: await T(t, n, [])
|
|
1987
|
-
},
|
|
1988
|
-
e.components.facetBy.selectorStates.map(async (
|
|
1989
|
-
var
|
|
1991
|
+
}, a = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map(({ selectedSource: d }) => A(d)).map((d) => d.toCanonicalString()).join(", "), p = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map(({ selectedSource: d }) => A(d)).map((d) => d.toCanonicalString()).join(", "), m = await Promise.all(
|
|
1992
|
+
e.components.facetBy.selectorStates.map(async (d) => {
|
|
1993
|
+
var i, S;
|
|
1990
1994
|
return {
|
|
1991
1995
|
type: "column",
|
|
1992
|
-
value: (
|
|
1996
|
+
value: (S = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? S : d.selectedSource
|
|
1993
1997
|
};
|
|
1994
1998
|
})
|
|
1995
|
-
),
|
|
1996
|
-
e.components.xGroupBy.selectorStates.map(async (
|
|
1997
|
-
var
|
|
1999
|
+
), y = await Promise.all(
|
|
2000
|
+
e.components.xGroupBy.selectorStates.map(async (d) => {
|
|
2001
|
+
var i, S;
|
|
1998
2002
|
return {
|
|
1999
2003
|
type: "column",
|
|
2000
|
-
label: await T(t,
|
|
2001
|
-
value:
|
|
2002
|
-
valueLabels: (
|
|
2004
|
+
label: await T(t, d.selectedSource, s),
|
|
2005
|
+
value: d.selectedSource,
|
|
2006
|
+
valueLabels: (S = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? S : d.selectedSource
|
|
2003
2007
|
};
|
|
2004
2008
|
})
|
|
2005
2009
|
), x = await Promise.all(
|
|
2006
|
-
e.components.yGroupBy.selectorStates.map(async (
|
|
2007
|
-
var
|
|
2010
|
+
e.components.yGroupBy.selectorStates.map(async (d) => {
|
|
2011
|
+
var i, S;
|
|
2008
2012
|
return {
|
|
2009
2013
|
type: "column",
|
|
2010
|
-
label: await T(t,
|
|
2011
|
-
value:
|
|
2012
|
-
valueLabels: (
|
|
2014
|
+
label: await T(t, d.selectedSource, s),
|
|
2015
|
+
value: d.selectedSource,
|
|
2016
|
+
valueLabels: (S = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? S : d.selectedSource
|
|
2013
2017
|
};
|
|
2014
2018
|
})
|
|
2015
|
-
), g = await t.pFrameProvider.getColumnSpecById(l),
|
|
2016
|
-
e.components.annotationsX.selectorStates.map(async (
|
|
2017
|
-
var
|
|
2018
|
-
const f =
|
|
2019
|
+
), g = await t.pFrameProvider.getColumnSpecById(l), w = await Promise.all(
|
|
2020
|
+
e.components.annotationsX.selectorStates.map(async (d) => {
|
|
2021
|
+
var i, S;
|
|
2022
|
+
const f = d.selectedSource, h = A(f), b = P(h) ? await t.pFrameProvider.getColumnSpecById(h) : (S = (i = g == null ? void 0 : g.axesSpec) == null ? void 0 : i.find(
|
|
2019
2023
|
(O) => _.fromAxisSpec(O).toCanonicalString() === f
|
|
2020
|
-
)) != null ?
|
|
2024
|
+
)) != null ? S : null;
|
|
2021
2025
|
return {
|
|
2022
2026
|
axis: "x",
|
|
2023
2027
|
valueColumn: {
|
|
@@ -2025,15 +2029,15 @@ var lt = class extends Q {
|
|
|
2025
2029
|
value: f,
|
|
2026
2030
|
label: await T(t, f, s)
|
|
2027
2031
|
},
|
|
2028
|
-
type:
|
|
2032
|
+
type: de(b) ? "discrete" : "continuous"
|
|
2029
2033
|
};
|
|
2030
2034
|
})
|
|
2031
|
-
),
|
|
2032
|
-
e.components.annotationsY.selectorStates.map(async (
|
|
2033
|
-
var
|
|
2034
|
-
const f =
|
|
2035
|
+
), C = await Promise.all(
|
|
2036
|
+
e.components.annotationsY.selectorStates.map(async (d) => {
|
|
2037
|
+
var i, S;
|
|
2038
|
+
const f = d.selectedSource, h = A(f), b = P(h) ? await t.pFrameProvider.getColumnSpecById(h) : (S = (i = g == null ? void 0 : g.axesSpec) == null ? void 0 : i.find(
|
|
2035
2039
|
(O) => _.fromAxisSpec(O).toCanonicalString() === f
|
|
2036
|
-
)) != null ?
|
|
2040
|
+
)) != null ? S : null;
|
|
2037
2041
|
return {
|
|
2038
2042
|
axis: "y",
|
|
2039
2043
|
valueColumn: {
|
|
@@ -2041,56 +2045,56 @@ var lt = class extends Q {
|
|
|
2041
2045
|
value: f,
|
|
2042
2046
|
label: await T(t, f, s)
|
|
2043
2047
|
},
|
|
2044
|
-
type:
|
|
2048
|
+
type: de(b) ? "discrete" : "continuous"
|
|
2045
2049
|
};
|
|
2046
2050
|
})
|
|
2047
2051
|
), D = (await Promise.all(
|
|
2048
2052
|
e.components.x.selectorStates.map(
|
|
2049
|
-
(
|
|
2053
|
+
(d) => T(t, d.selectedSource, s)
|
|
2050
2054
|
)
|
|
2051
|
-
)).join(", "),
|
|
2055
|
+
)).join(", "), B = (await Promise.all(
|
|
2052
2056
|
e.components.y.selectorStates.map(
|
|
2053
|
-
(
|
|
2057
|
+
(d) => T(t, d.selectedSource, s)
|
|
2054
2058
|
)
|
|
2055
|
-
)).join(", "),
|
|
2056
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
2057
|
-
var
|
|
2058
|
-
const f =
|
|
2059
|
+
)).join(", "), v = await Promise.all(
|
|
2060
|
+
e.components.tooltipContent.selectorStates.map(async (d) => {
|
|
2061
|
+
var i, S;
|
|
2062
|
+
const f = d.selectedSource;
|
|
2059
2063
|
return {
|
|
2060
2064
|
type: "column",
|
|
2061
2065
|
label: await T(t, f, s) || f,
|
|
2062
2066
|
value: f,
|
|
2063
|
-
valueLabels: (
|
|
2067
|
+
valueLabels: (S = (i = await k(t, f, s)) == null ? void 0 : i.toCanonicalString()) != null ? S : f
|
|
2064
2068
|
};
|
|
2065
2069
|
})
|
|
2066
2070
|
);
|
|
2067
2071
|
return {
|
|
2068
2072
|
type: "heatmap",
|
|
2069
|
-
valueColumn:
|
|
2070
|
-
valueType:
|
|
2073
|
+
valueColumn: c,
|
|
2074
|
+
valueType: de(g) ? "discrete" : "continuous",
|
|
2071
2075
|
xColumn: {
|
|
2072
2076
|
type: "column",
|
|
2073
|
-
value:
|
|
2077
|
+
value: a,
|
|
2074
2078
|
label: D,
|
|
2075
2079
|
valueLabels: "xLabelsKey"
|
|
2076
2080
|
},
|
|
2077
2081
|
yColumn: {
|
|
2078
2082
|
type: "column",
|
|
2079
|
-
value:
|
|
2080
|
-
label:
|
|
2083
|
+
value: p,
|
|
2084
|
+
label: B,
|
|
2081
2085
|
valueLabels: "yLabelsKey"
|
|
2082
2086
|
},
|
|
2083
2087
|
facetBy: m,
|
|
2084
|
-
xGroupBy:
|
|
2088
|
+
xGroupBy: y,
|
|
2085
2089
|
yGroupBy: x,
|
|
2086
|
-
annotations: [...
|
|
2090
|
+
annotations: [...w, ...C],
|
|
2087
2091
|
tooltips: {
|
|
2088
2092
|
show: !0,
|
|
2089
|
-
content:
|
|
2093
|
+
content: v
|
|
2090
2094
|
}
|
|
2091
2095
|
};
|
|
2092
2096
|
}
|
|
2093
|
-
},
|
|
2097
|
+
}, ct = {
|
|
2094
2098
|
type: "scatterplot",
|
|
2095
2099
|
components: {
|
|
2096
2100
|
x: { type: "simple", selectorStates: [] },
|
|
@@ -2106,7 +2110,7 @@ var lt = class extends Q {
|
|
|
2106
2110
|
tooltipContent: { type: "simple", selectorStates: [] }
|
|
2107
2111
|
},
|
|
2108
2112
|
dividedAxes: {}
|
|
2109
|
-
},
|
|
2113
|
+
}, it = class extends Q {
|
|
2110
2114
|
constructor() {
|
|
2111
2115
|
super(
|
|
2112
2116
|
{
|
|
@@ -2250,37 +2254,37 @@ var lt = class extends Q {
|
|
|
2250
2254
|
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(A(o)), s = await t.pFrameProvider.getColumnSpecById(A(n));
|
|
2251
2255
|
if (!l || !s)
|
|
2252
2256
|
return /* @__PURE__ */ new Set();
|
|
2253
|
-
const
|
|
2254
|
-
return /* @__PURE__ */ new Set([...
|
|
2257
|
+
const c = l.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), r = s.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), a = c.filter((p) => !r.some((m) => m === p)), u = r.filter((p) => !c.some((m) => m === p));
|
|
2258
|
+
return /* @__PURE__ */ new Set([...a, ...u]);
|
|
2255
2259
|
}
|
|
2256
2260
|
async createDataByColumns(t, e) {
|
|
2257
2261
|
var o, n, l;
|
|
2258
|
-
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2259
|
-
if (!s || !
|
|
2262
|
+
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
2263
|
+
if (!s || !c)
|
|
2260
2264
|
throw Error("X or Y column is not valid");
|
|
2261
|
-
const
|
|
2265
|
+
const r = A(s), a = A(c), u = {
|
|
2262
2266
|
type: "columns",
|
|
2263
2267
|
id: (l = z(e.components)) != null ? l : "",
|
|
2264
2268
|
values: {}
|
|
2265
|
-
}, { linkerColumnsMap:
|
|
2269
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), y = [
|
|
2266
2270
|
...e.components.filters.selectorStates,
|
|
2267
2271
|
...e.components.tabBy.selectorStates
|
|
2268
|
-
], x = Y(
|
|
2269
|
-
if (
|
|
2272
|
+
], x = Y(y), g = y.map((h) => A(h.selectedSource)).filter(P), w = [r, a].filter(P).map((h) => h.toCanonicalString());
|
|
2273
|
+
if (w.length === 0)
|
|
2270
2274
|
throw Error("One of X and Y should be a column");
|
|
2271
|
-
const
|
|
2272
|
-
for (const { selectedSource:
|
|
2273
|
-
|
|
2275
|
+
const C = await J(t, w), D = [r, a, ...g], B = [], v = [[], []], d = [], i = [];
|
|
2276
|
+
for (const { selectedSource: h, fixedAxes: b } of y)
|
|
2277
|
+
i.push(...await V(
|
|
2274
2278
|
t,
|
|
2275
|
-
|
|
2279
|
+
p,
|
|
2276
2280
|
m,
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
)),
|
|
2281
|
-
(
|
|
2281
|
+
C,
|
|
2282
|
+
h,
|
|
2283
|
+
b
|
|
2284
|
+
)), v.push(
|
|
2285
|
+
(b ?? []).map(({ axisIdx: O, axisValue: E }) => ({ idx: O, value: E }))
|
|
2282
2286
|
);
|
|
2283
|
-
const
|
|
2287
|
+
const S = [
|
|
2284
2288
|
e.components.grouping,
|
|
2285
2289
|
e.components.size,
|
|
2286
2290
|
e.components.shape,
|
|
@@ -2289,114 +2293,116 @@ var lt = class extends Q {
|
|
|
2289
2293
|
e.components.label,
|
|
2290
2294
|
e.components.highlight
|
|
2291
2295
|
];
|
|
2292
|
-
for (const
|
|
2293
|
-
for (const { selectedSource:
|
|
2294
|
-
|
|
2295
|
-
(O ?? []).map(({ axisIdx: L, axisValue:
|
|
2296
|
-
),
|
|
2296
|
+
for (const h of S)
|
|
2297
|
+
for (const { selectedSource: b, fixedAxes: O } of h.selectorStates) {
|
|
2298
|
+
B.push(A(b)), d.push(
|
|
2299
|
+
(O ?? []).map(({ axisIdx: L, axisValue: N }) => ({ idx: L, value: N }))
|
|
2300
|
+
), i.push(...await V(
|
|
2297
2301
|
t,
|
|
2298
|
-
|
|
2302
|
+
p,
|
|
2299
2303
|
m,
|
|
2300
|
-
|
|
2301
|
-
|
|
2304
|
+
C,
|
|
2305
|
+
b,
|
|
2302
2306
|
O
|
|
2303
2307
|
));
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2308
|
+
const E = await k(t, b, w);
|
|
2309
|
+
E && B.push(E);
|
|
2306
2310
|
}
|
|
2307
2311
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
2308
|
-
[
|
|
2309
|
-
|
|
2312
|
+
[r, a, ...i, ...g],
|
|
2313
|
+
B,
|
|
2310
2314
|
x,
|
|
2311
2315
|
!1,
|
|
2312
|
-
|
|
2313
|
-
|
|
2316
|
+
v,
|
|
2317
|
+
d
|
|
2314
2318
|
);
|
|
2315
|
-
return [...D, ...
|
|
2316
|
-
const
|
|
2317
|
-
|
|
2318
|
-
}),
|
|
2319
|
+
return [...D, ...B].forEach((h) => {
|
|
2320
|
+
const b = h.toCanonicalString();
|
|
2321
|
+
u.values[b] = P(h) ? f.columnsData[b] : f.axesData[b];
|
|
2322
|
+
}), u.values.key = new Array(u.values[Object.keys(u.values)[0]].length).fill(0).map((h, b) => b), e.components.highlight.selectorStates.length && (u.values.highlight = Be(e.components.highlight.selectorStates, f)), { byColumns: u };
|
|
2319
2323
|
}
|
|
2320
2324
|
async createChartSettings(t, e) {
|
|
2321
|
-
var o, n, l, s;
|
|
2322
|
-
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2323
|
-
if (!r || !
|
|
2325
|
+
var o, n, l, s, c;
|
|
2326
|
+
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, u = r ? A(r) : null, p = a ? A(a) : null;
|
|
2327
|
+
if (!r || !a || !u || !p || !P(u) && !P(p))
|
|
2324
2328
|
throw Error("Empty or invalid required data");
|
|
2325
|
-
const
|
|
2329
|
+
const m = [u, p].filter(P).map((i) => i.toCanonicalString()), y = {
|
|
2326
2330
|
type: "column",
|
|
2327
2331
|
value: r,
|
|
2328
|
-
label: await T(t, r,
|
|
2329
|
-
}, d = {
|
|
2330
|
-
type: "column",
|
|
2331
|
-
value: c,
|
|
2332
|
-
label: await T(t, c, u)
|
|
2332
|
+
label: await T(t, r, m)
|
|
2333
2333
|
}, x = {
|
|
2334
|
+
type: "column",
|
|
2335
|
+
value: a,
|
|
2336
|
+
label: await T(t, a, m)
|
|
2337
|
+
}, g = {
|
|
2334
2338
|
type: "column",
|
|
2335
2339
|
value: "key"
|
|
2336
|
-
},
|
|
2337
|
-
e.components.facetBy.selectorStates.map(async (
|
|
2338
|
-
var S,
|
|
2340
|
+
}, w = await Promise.all(
|
|
2341
|
+
e.components.facetBy.selectorStates.map(async (i) => {
|
|
2342
|
+
var S, f;
|
|
2339
2343
|
return {
|
|
2340
2344
|
type: "column",
|
|
2341
|
-
value: (
|
|
2345
|
+
value: (f = (S = await k(t, i.selectedSource, m)) == null ? void 0 : S.toCanonicalString()) != null ? f : i.selectedSource
|
|
2342
2346
|
};
|
|
2343
2347
|
})
|
|
2344
|
-
),
|
|
2345
|
-
...e.components.grouping.selectorStates.map((
|
|
2346
|
-
...e.components.size.selectorStates.map((
|
|
2347
|
-
...e.components.shape.selectorStates.map((
|
|
2348
|
-
]),
|
|
2349
|
-
|
|
2350
|
-
var S,
|
|
2348
|
+
), C = ue.uniq([
|
|
2349
|
+
...e.components.grouping.selectorStates.map((i) => i.selectedSource),
|
|
2350
|
+
...e.components.size.selectorStates.map((i) => i.selectedSource),
|
|
2351
|
+
...e.components.shape.selectorStates.map((i) => i.selectedSource)
|
|
2352
|
+
]), D = await Promise.all(
|
|
2353
|
+
C.map(async (i) => {
|
|
2354
|
+
var S, f;
|
|
2351
2355
|
return {
|
|
2352
2356
|
type: "column",
|
|
2353
|
-
label: await T(t,
|
|
2354
|
-
value:
|
|
2355
|
-
valueLabels: (
|
|
2357
|
+
label: await T(t, i, m) || i,
|
|
2358
|
+
value: i,
|
|
2359
|
+
valueLabels: (f = (S = await k(t, i, m)) == null ? void 0 : S.toCanonicalString()) != null ? f : i
|
|
2356
2360
|
};
|
|
2357
2361
|
})
|
|
2358
|
-
),
|
|
2359
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
2360
|
-
var S,
|
|
2361
|
-
const
|
|
2362
|
+
), B = await Promise.all(
|
|
2363
|
+
e.components.tooltipContent.selectorStates.map(async (i) => {
|
|
2364
|
+
var S, f;
|
|
2365
|
+
const h = i.selectedSource, b = A(h), O = (S = await k(t, h, m)) != null ? S : b, E = await le(t, h, m);
|
|
2362
2366
|
return {
|
|
2363
2367
|
type: "column",
|
|
2364
|
-
label: await T(t,
|
|
2365
|
-
value:
|
|
2366
|
-
valueLabels:
|
|
2368
|
+
label: await T(t, h, m) || h,
|
|
2369
|
+
value: h,
|
|
2370
|
+
valueLabels: O.toCanonicalString(),
|
|
2371
|
+
format: (f = E == null ? void 0 : E.annotations) == null ? void 0 : f[pe]
|
|
2367
2372
|
};
|
|
2368
2373
|
})
|
|
2369
2374
|
);
|
|
2370
|
-
let
|
|
2375
|
+
let v;
|
|
2371
2376
|
if (e.components.label.selectorStates.length) {
|
|
2372
|
-
const
|
|
2373
|
-
|
|
2377
|
+
const i = e.components.label.selectorStates[0].selectedSource, S = await le(t, i, m);
|
|
2378
|
+
v = {
|
|
2374
2379
|
type: "column",
|
|
2375
|
-
value:
|
|
2376
|
-
label: await T(t,
|
|
2377
|
-
valueLabels: (s = (l = await k(t,
|
|
2380
|
+
value: i,
|
|
2381
|
+
label: await T(t, i, m),
|
|
2382
|
+
valueLabels: (s = (l = await k(t, i, m)) == null ? void 0 : l.toCanonicalString()) != null ? s : i,
|
|
2383
|
+
format: (c = S == null ? void 0 : S.annotations) == null ? void 0 : c[pe]
|
|
2378
2384
|
};
|
|
2379
2385
|
}
|
|
2380
|
-
let
|
|
2381
|
-
return e.components.highlight.selectorStates.length && (
|
|
2386
|
+
let d;
|
|
2387
|
+
return e.components.highlight.selectorStates.length && (d = {
|
|
2382
2388
|
type: "column",
|
|
2383
2389
|
value: "highlight"
|
|
2384
2390
|
}), {
|
|
2385
2391
|
type: "scatterplot",
|
|
2386
|
-
x:
|
|
2387
|
-
y:
|
|
2388
|
-
keyColumn:
|
|
2389
|
-
facetBy:
|
|
2390
|
-
grouping:
|
|
2391
|
-
label:
|
|
2392
|
-
highlight:
|
|
2392
|
+
x: y,
|
|
2393
|
+
y: x,
|
|
2394
|
+
keyColumn: g,
|
|
2395
|
+
facetBy: w,
|
|
2396
|
+
grouping: D,
|
|
2397
|
+
label: v,
|
|
2398
|
+
highlight: d,
|
|
2393
2399
|
tooltips: {
|
|
2394
2400
|
show: !0,
|
|
2395
|
-
content:
|
|
2401
|
+
content: B
|
|
2396
2402
|
}
|
|
2397
2403
|
};
|
|
2398
2404
|
}
|
|
2399
|
-
},
|
|
2405
|
+
}, ut = {
|
|
2400
2406
|
type: "scatterplot-umap",
|
|
2401
2407
|
components: {
|
|
2402
2408
|
x: { type: "simple", selectorStates: [] },
|
|
@@ -2411,7 +2417,7 @@ var lt = class extends Q {
|
|
|
2411
2417
|
size: { type: "simple", selectorStates: [] }
|
|
2412
2418
|
},
|
|
2413
2419
|
dividedAxes: {}
|
|
2414
|
-
},
|
|
2420
|
+
}, pt = class extends Q {
|
|
2415
2421
|
constructor() {
|
|
2416
2422
|
super(
|
|
2417
2423
|
{
|
|
@@ -2544,40 +2550,40 @@ var lt = class extends Q {
|
|
|
2544
2550
|
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(A(o)), s = await t.pFrameProvider.getColumnSpecById(A(n));
|
|
2545
2551
|
if (!l || !s)
|
|
2546
2552
|
return /* @__PURE__ */ new Set();
|
|
2547
|
-
const
|
|
2548
|
-
return /* @__PURE__ */ new Set([...
|
|
2553
|
+
const c = l.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), r = s.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), a = c.filter((p) => !r.some((m) => m === p)), u = r.filter((p) => !c.some((m) => m === p));
|
|
2554
|
+
return /* @__PURE__ */ new Set([...a, ...u]);
|
|
2549
2555
|
}
|
|
2550
2556
|
async createDataByColumns(t, e) {
|
|
2551
2557
|
var o, n, l;
|
|
2552
|
-
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2553
|
-
if (!s || !
|
|
2558
|
+
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
2559
|
+
if (!s || !c)
|
|
2554
2560
|
throw Error("X or Y column is not valid");
|
|
2555
|
-
const
|
|
2556
|
-
if (!
|
|
2561
|
+
const r = A(s), a = A(c);
|
|
2562
|
+
if (!r || !a)
|
|
2557
2563
|
throw Error("X or Y column is not valid");
|
|
2558
|
-
const
|
|
2564
|
+
const u = {
|
|
2559
2565
|
type: "columns",
|
|
2560
2566
|
id: (l = z(e.components)) != null ? l : "",
|
|
2561
2567
|
values: {}
|
|
2562
|
-
}, { linkerColumnsMap:
|
|
2568
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), y = [
|
|
2563
2569
|
...e.components.filters.selectorStates,
|
|
2564
2570
|
...e.components.tabBy.selectorStates
|
|
2565
|
-
], x = Y(
|
|
2566
|
-
if (
|
|
2571
|
+
], x = Y(y), g = y.map((h) => A(h.selectedSource)).filter(P), w = [r, a].filter(P).map((h) => h.toCanonicalString());
|
|
2572
|
+
if (w.length === 0)
|
|
2567
2573
|
throw Error("One of X and Y should be a column");
|
|
2568
|
-
const
|
|
2569
|
-
for (const { selectedSource:
|
|
2570
|
-
|
|
2574
|
+
const C = await J(t, w), D = [r, a, ...g], B = [], v = [[], []], d = [], i = [];
|
|
2575
|
+
for (const { selectedSource: h, fixedAxes: b } of y)
|
|
2576
|
+
i.push(...await V(
|
|
2571
2577
|
t,
|
|
2572
|
-
|
|
2578
|
+
p,
|
|
2573
2579
|
m,
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
)),
|
|
2578
|
-
(
|
|
2580
|
+
C,
|
|
2581
|
+
h,
|
|
2582
|
+
b
|
|
2583
|
+
)), v.push(
|
|
2584
|
+
(b ?? []).map(({ axisIdx: O, axisValue: E }) => ({ idx: O, value: E }))
|
|
2579
2585
|
);
|
|
2580
|
-
const
|
|
2586
|
+
const S = [
|
|
2581
2587
|
e.components.grouping,
|
|
2582
2588
|
e.components.facetBy,
|
|
2583
2589
|
e.components.tooltipContent,
|
|
@@ -2585,116 +2591,118 @@ var lt = class extends Q {
|
|
|
2585
2591
|
e.components.highlight,
|
|
2586
2592
|
e.components.size
|
|
2587
2593
|
];
|
|
2588
|
-
for (const
|
|
2589
|
-
for (const { selectedSource:
|
|
2590
|
-
|
|
2591
|
-
(O ?? []).map(({ axisIdx: L, axisValue:
|
|
2592
|
-
),
|
|
2594
|
+
for (const h of S)
|
|
2595
|
+
for (const { selectedSource: b, fixedAxes: O } of h.selectorStates) {
|
|
2596
|
+
B.push(A(b)), d.push(
|
|
2597
|
+
(O ?? []).map(({ axisIdx: L, axisValue: N }) => ({ idx: L, value: N }))
|
|
2598
|
+
), i.push(...await V(
|
|
2593
2599
|
t,
|
|
2594
|
-
|
|
2600
|
+
p,
|
|
2595
2601
|
m,
|
|
2596
|
-
|
|
2597
|
-
|
|
2602
|
+
C,
|
|
2603
|
+
b,
|
|
2598
2604
|
O
|
|
2599
2605
|
));
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2606
|
+
const E = await k(t, b, w);
|
|
2607
|
+
E && B.push(E);
|
|
2602
2608
|
}
|
|
2603
2609
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
2604
|
-
[
|
|
2605
|
-
|
|
2610
|
+
[r, a, ...i, ...g],
|
|
2611
|
+
B,
|
|
2606
2612
|
x,
|
|
2607
2613
|
!1,
|
|
2608
|
-
|
|
2609
|
-
|
|
2614
|
+
v,
|
|
2615
|
+
d
|
|
2610
2616
|
);
|
|
2611
|
-
return [...D, ...
|
|
2612
|
-
const
|
|
2613
|
-
|
|
2614
|
-
}), e.components.highlight.selectorStates.length && (
|
|
2615
|
-
byColumns:
|
|
2617
|
+
return [...D, ...B].forEach((h) => {
|
|
2618
|
+
const b = h.toCanonicalString();
|
|
2619
|
+
u.values[b] = P(h) ? f.columnsData[b] : f.axesData[b];
|
|
2620
|
+
}), e.components.highlight.selectorStates.length && (u.values.highlight = Be(e.components.highlight.selectorStates, f)), {
|
|
2621
|
+
byColumns: u,
|
|
2616
2622
|
axesData: f.axesData
|
|
2617
2623
|
};
|
|
2618
2624
|
}
|
|
2619
2625
|
async createChartSettings(t, e) {
|
|
2620
|
-
var o, n, l, s;
|
|
2621
|
-
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2622
|
-
if (!r || !
|
|
2626
|
+
var o, n, l, s, c;
|
|
2627
|
+
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, u = r ? A(r) : null, p = a ? A(a) : null;
|
|
2628
|
+
if (!r || !a || !u || !p || !P(u) && !P(p))
|
|
2623
2629
|
throw Error("Empty or invalid required data");
|
|
2624
|
-
const
|
|
2630
|
+
const m = [u, p].filter(P).map((i) => i.toCanonicalString()), y = {
|
|
2625
2631
|
type: "column",
|
|
2626
2632
|
value: r,
|
|
2627
|
-
label: await T(t, r,
|
|
2628
|
-
}, d = {
|
|
2629
|
-
type: "column",
|
|
2630
|
-
value: c,
|
|
2631
|
-
label: await T(t, c, u)
|
|
2633
|
+
label: await T(t, r, m)
|
|
2632
2634
|
}, x = {
|
|
2635
|
+
type: "column",
|
|
2636
|
+
value: a,
|
|
2637
|
+
label: await T(t, a, m)
|
|
2638
|
+
}, g = {
|
|
2633
2639
|
type: "column",
|
|
2634
2640
|
value: "key"
|
|
2635
|
-
},
|
|
2636
|
-
e.components.facetBy.selectorStates.map(async (
|
|
2637
|
-
var S,
|
|
2641
|
+
}, w = await Promise.all(
|
|
2642
|
+
e.components.facetBy.selectorStates.map(async (i) => {
|
|
2643
|
+
var S, f;
|
|
2638
2644
|
return {
|
|
2639
2645
|
type: "column",
|
|
2640
|
-
value: (
|
|
2646
|
+
value: (f = (S = await k(t, i.selectedSource, m)) == null ? void 0 : S.toCanonicalString()) != null ? f : i.selectedSource
|
|
2641
2647
|
};
|
|
2642
2648
|
})
|
|
2643
|
-
),
|
|
2644
|
-
...e.components.grouping.selectorStates.map((
|
|
2645
|
-
...e.components.size.selectorStates.map((
|
|
2646
|
-
]),
|
|
2647
|
-
|
|
2648
|
-
var S,
|
|
2649
|
+
), C = ue.uniq([
|
|
2650
|
+
...e.components.grouping.selectorStates.map((i) => i.selectedSource),
|
|
2651
|
+
...e.components.size.selectorStates.map((i) => i.selectedSource)
|
|
2652
|
+
]), D = await Promise.all(
|
|
2653
|
+
C.map(async (i) => {
|
|
2654
|
+
var S, f;
|
|
2649
2655
|
return {
|
|
2650
2656
|
type: "column",
|
|
2651
|
-
label: await T(t,
|
|
2652
|
-
value:
|
|
2653
|
-
valueLabels: (
|
|
2657
|
+
label: await T(t, i, m) || i,
|
|
2658
|
+
value: i,
|
|
2659
|
+
valueLabels: (f = (S = await k(t, i, m)) == null ? void 0 : S.toCanonicalString()) != null ? f : i
|
|
2654
2660
|
};
|
|
2655
2661
|
})
|
|
2656
|
-
),
|
|
2657
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
2658
|
-
var S,
|
|
2659
|
-
const
|
|
2662
|
+
), B = await Promise.all(
|
|
2663
|
+
e.components.tooltipContent.selectorStates.map(async (i) => {
|
|
2664
|
+
var S, f, h;
|
|
2665
|
+
const b = i.selectedSource, O = await le(t, b, m);
|
|
2660
2666
|
return {
|
|
2661
2667
|
type: "column",
|
|
2662
|
-
label: await T(t,
|
|
2663
|
-
value:
|
|
2664
|
-
valueLabels: (
|
|
2668
|
+
label: await T(t, b, m) || b,
|
|
2669
|
+
value: b,
|
|
2670
|
+
valueLabels: (f = (S = await k(t, b, m)) == null ? void 0 : S.toCanonicalString()) != null ? f : b,
|
|
2671
|
+
format: (h = O == null ? void 0 : O.annotations) == null ? void 0 : h[pe]
|
|
2665
2672
|
};
|
|
2666
2673
|
})
|
|
2667
2674
|
);
|
|
2668
|
-
let
|
|
2675
|
+
let v;
|
|
2669
2676
|
if (e.components.label.selectorStates.length) {
|
|
2670
|
-
const
|
|
2671
|
-
|
|
2677
|
+
const i = e.components.label.selectorStates[0].selectedSource, S = await le(t, i, m);
|
|
2678
|
+
v = {
|
|
2672
2679
|
type: "column",
|
|
2673
|
-
value:
|
|
2674
|
-
label: await T(t,
|
|
2675
|
-
valueLabels: (s = (l = await k(t,
|
|
2680
|
+
value: i,
|
|
2681
|
+
label: await T(t, i, m),
|
|
2682
|
+
valueLabels: (s = (l = await k(t, i, m)) == null ? void 0 : l.toCanonicalString()) != null ? s : i,
|
|
2683
|
+
format: (c = S == null ? void 0 : S.annotations) == null ? void 0 : c[pe]
|
|
2676
2684
|
};
|
|
2677
2685
|
}
|
|
2678
|
-
let
|
|
2679
|
-
return e.components.highlight.selectorStates.length && (
|
|
2686
|
+
let d;
|
|
2687
|
+
return e.components.highlight.selectorStates.length && (d = {
|
|
2680
2688
|
type: "column",
|
|
2681
2689
|
value: "highlight"
|
|
2682
2690
|
}), {
|
|
2683
2691
|
type: "scatterplot-umap",
|
|
2684
|
-
x:
|
|
2685
|
-
y:
|
|
2686
|
-
keyColumn:
|
|
2687
|
-
facetBy:
|
|
2688
|
-
grouping:
|
|
2689
|
-
label:
|
|
2690
|
-
highlight:
|
|
2692
|
+
x: y,
|
|
2693
|
+
y: x,
|
|
2694
|
+
keyColumn: g,
|
|
2695
|
+
facetBy: w,
|
|
2696
|
+
grouping: D,
|
|
2697
|
+
label: v,
|
|
2698
|
+
highlight: d,
|
|
2691
2699
|
tooltips: {
|
|
2692
2700
|
show: !0,
|
|
2693
|
-
content:
|
|
2701
|
+
content: B
|
|
2694
2702
|
}
|
|
2695
2703
|
};
|
|
2696
2704
|
}
|
|
2697
|
-
},
|
|
2705
|
+
}, Se = "pl7.app/dendrogram/nodeId", ye = "id", mt = {
|
|
2698
2706
|
type: "dendro",
|
|
2699
2707
|
components: {
|
|
2700
2708
|
value: { type: "simple", selectorStates: [] },
|
|
@@ -2714,7 +2722,7 @@ var lt = class extends Q {
|
|
|
2714
2722
|
heatmapGroup: { type: "simple", selectorStates: [] }
|
|
2715
2723
|
},
|
|
2716
2724
|
dividedAxes: {}
|
|
2717
|
-
},
|
|
2725
|
+
}, dt = class extends Q {
|
|
2718
2726
|
constructor() {
|
|
2719
2727
|
super(
|
|
2720
2728
|
{
|
|
@@ -2898,7 +2906,7 @@ var lt = class extends Q {
|
|
|
2898
2906
|
}
|
|
2899
2907
|
})
|
|
2900
2908
|
}
|
|
2901
|
-
), this.ignoredOptionIdNames = [
|
|
2909
|
+
), this.ignoredOptionIdNames = [Se];
|
|
2902
2910
|
}
|
|
2903
2911
|
readyDataInputs(t) {
|
|
2904
2912
|
return t.components.value.selectorStates.length > 0;
|
|
@@ -2906,15 +2914,15 @@ var lt = class extends Q {
|
|
|
2906
2914
|
async createTableData(t, e) {
|
|
2907
2915
|
var o;
|
|
2908
2916
|
const n = {}, l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, s = A(l);
|
|
2909
|
-
if (!l || !
|
|
2917
|
+
if (!l || !P(s))
|
|
2910
2918
|
throw Error("Value column is not valid");
|
|
2911
|
-
const { linkerColumnsMap:
|
|
2919
|
+
const { linkerColumnsMap: c, compositeLinkerMap: r } = await X(t), a = Y([
|
|
2912
2920
|
...e.components.filters.selectorStates,
|
|
2913
2921
|
...e.components.tabBy.selectorStates
|
|
2914
|
-
]),
|
|
2915
|
-
...e.components.filters.selectorStates.map((
|
|
2916
|
-
...e.components.tabBy.selectorStates.map((
|
|
2917
|
-
].filter(
|
|
2922
|
+
]), u = [
|
|
2923
|
+
...e.components.filters.selectorStates.map((d) => A(d.selectedSource)),
|
|
2924
|
+
...e.components.tabBy.selectorStates.map((d) => A(d.selectedSource))
|
|
2925
|
+
].filter(P), p = [l], m = await J(t, p), y = [], x = [], g = [], w = [e.components.value], C = [
|
|
2918
2926
|
e.components.tableContent,
|
|
2919
2927
|
// next components can content data mapped on tree
|
|
2920
2928
|
e.components.labels,
|
|
@@ -2923,71 +2931,71 @@ var lt = class extends Q {
|
|
|
2923
2931
|
e.components.nodeShape,
|
|
2924
2932
|
e.components.lineColor
|
|
2925
2933
|
], D = {};
|
|
2926
|
-
for (const
|
|
2927
|
-
for (const { selectedSource:
|
|
2934
|
+
for (const d of w)
|
|
2935
|
+
for (const { selectedSource: i, fixedAxes: S } of d.selectorStates) {
|
|
2928
2936
|
g.push(...await V(
|
|
2929
2937
|
t,
|
|
2930
|
-
r,
|
|
2931
2938
|
c,
|
|
2939
|
+
r,
|
|
2932
2940
|
m,
|
|
2933
|
-
|
|
2934
|
-
|
|
2941
|
+
i,
|
|
2942
|
+
S
|
|
2935
2943
|
));
|
|
2936
|
-
const f = await k(t,
|
|
2937
|
-
D[
|
|
2944
|
+
const f = await k(t, i, p), h = f ?? A(i);
|
|
2945
|
+
D[h.toCanonicalString()] = i, y.push(h);
|
|
2938
2946
|
}
|
|
2939
|
-
for (const
|
|
2940
|
-
for (const { selectedSource:
|
|
2947
|
+
for (const d of C)
|
|
2948
|
+
for (const { selectedSource: i, fixedAxes: S } of d.selectorStates) {
|
|
2941
2949
|
g.push(...await V(
|
|
2942
2950
|
t,
|
|
2943
|
-
r,
|
|
2944
2951
|
c,
|
|
2952
|
+
r,
|
|
2945
2953
|
m,
|
|
2946
|
-
|
|
2947
|
-
|
|
2954
|
+
i,
|
|
2955
|
+
S
|
|
2948
2956
|
));
|
|
2949
|
-
const f = await k(t,
|
|
2950
|
-
D[
|
|
2957
|
+
const f = await k(t, i, p), h = f ?? A(i);
|
|
2958
|
+
D[i] = h.toCanonicalString(), x.push(h);
|
|
2951
2959
|
}
|
|
2952
|
-
const
|
|
2953
|
-
[...
|
|
2960
|
+
const B = await t.pFrameProvider.getTableOuterJoin(
|
|
2961
|
+
[...y, ...u, ...g],
|
|
2954
2962
|
x,
|
|
2955
|
-
|
|
2963
|
+
a,
|
|
2956
2964
|
!1
|
|
2957
2965
|
);
|
|
2958
|
-
for (const
|
|
2959
|
-
const
|
|
2960
|
-
n[
|
|
2961
|
-
data:
|
|
2962
|
-
spec:
|
|
2963
|
-
label: await T(t,
|
|
2966
|
+
for (const d of [...y, ...x]) {
|
|
2967
|
+
const i = d.toCanonicalString(), S = D[d.toCanonicalString()];
|
|
2968
|
+
n[S] = {
|
|
2969
|
+
data: P(d) ? B.columnsData[i] : B.axesData[i],
|
|
2970
|
+
spec: P(d) ? B.columnSpecs[i] : B.axesSpecs[i],
|
|
2971
|
+
label: await T(t, S, p)
|
|
2964
2972
|
};
|
|
2965
2973
|
}
|
|
2966
|
-
const
|
|
2967
|
-
(
|
|
2968
|
-
var
|
|
2969
|
-
return ((
|
|
2974
|
+
const v = Object.keys(B.axesData).find(
|
|
2975
|
+
(d) => {
|
|
2976
|
+
var i;
|
|
2977
|
+
return ((i = A(d)) == null ? void 0 : i.name) === Se;
|
|
2970
2978
|
}
|
|
2971
2979
|
);
|
|
2972
|
-
return
|
|
2973
|
-
data:
|
|
2980
|
+
return v ? n[ye] = {
|
|
2981
|
+
data: B.axesData[v],
|
|
2974
2982
|
spec: { kind: "PColumn", valueType: "Int", name: "Node id" },
|
|
2975
2983
|
label: "Node id"
|
|
2976
2984
|
} : console.warn("Missed node id axis in data column"), n;
|
|
2977
2985
|
}
|
|
2978
2986
|
async createDataByColumns(t, e) {
|
|
2979
2987
|
var o, n, l;
|
|
2980
|
-
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
2981
|
-
if (!s || !
|
|
2988
|
+
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.heatmapAnnotation.selectorStates[0]) == null ? void 0 : n.selectedSource, r = A(s), a = c ? A(c) : null;
|
|
2989
|
+
if (!s || !P(r))
|
|
2982
2990
|
throw Error("Value column is not valid");
|
|
2983
|
-
const
|
|
2991
|
+
const u = {
|
|
2984
2992
|
type: "columns",
|
|
2985
2993
|
id: (l = z(e.components)) != null ? l : "",
|
|
2986
2994
|
values: {}
|
|
2987
|
-
},
|
|
2995
|
+
}, p = [
|
|
2988
2996
|
...e.components.filters.selectorStates,
|
|
2989
2997
|
...e.components.tabBy.selectorStates
|
|
2990
|
-
], m = Y(
|
|
2998
|
+
], m = Y(p), y = p.map((S) => A(S.selectedSource)).filter(P), x = [r, a].filter(P).map((S) => S.toCanonicalString()), g = [], w = [], C = [], D = [], B = [
|
|
2991
2999
|
e.components.value,
|
|
2992
3000
|
e.components.height,
|
|
2993
3001
|
e.components.labels,
|
|
@@ -2997,156 +3005,156 @@ var lt = class extends Q {
|
|
|
2997
3005
|
e.components.lineColor,
|
|
2998
3006
|
e.components.heatmapAnnotation,
|
|
2999
3007
|
e.components.heatmapForSequence
|
|
3000
|
-
],
|
|
3008
|
+
], v = [
|
|
3001
3009
|
e.components.facetBy,
|
|
3002
3010
|
e.components.heatmapAxis,
|
|
3003
3011
|
e.components.heatmapGroup,
|
|
3004
3012
|
e.components.tableContent
|
|
3005
3013
|
];
|
|
3006
|
-
for (const
|
|
3007
|
-
for (const { selectedSource: f, fixedAxes:
|
|
3008
|
-
g.push(A(f)),
|
|
3009
|
-
(
|
|
3014
|
+
for (const S of B)
|
|
3015
|
+
for (const { selectedSource: f, fixedAxes: h } of S.selectorStates) {
|
|
3016
|
+
g.push(A(f)), C.push(
|
|
3017
|
+
(h ?? []).map(({ axisIdx: O, axisValue: E }) => ({ idx: O, value: E }))
|
|
3010
3018
|
);
|
|
3011
|
-
const
|
|
3012
|
-
|
|
3019
|
+
const b = await k(t, f, x);
|
|
3020
|
+
b && g.push(b);
|
|
3013
3021
|
}
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
(
|
|
3022
|
+
p.forEach(({ fixedAxes: S }) => {
|
|
3023
|
+
C.push(
|
|
3024
|
+
(S ?? []).map(({ axisIdx: f, axisValue: h }) => ({ idx: f, value: h }))
|
|
3017
3025
|
);
|
|
3018
3026
|
});
|
|
3019
|
-
for (const
|
|
3020
|
-
for (const { selectedSource: f, fixedAxes:
|
|
3021
|
-
|
|
3022
|
-
(
|
|
3027
|
+
for (const S of v)
|
|
3028
|
+
for (const { selectedSource: f, fixedAxes: h } of S.selectorStates) {
|
|
3029
|
+
w.push(A(f)), D.push(
|
|
3030
|
+
(h ?? []).map(({ axisIdx: O, axisValue: E }) => ({ idx: O, value: E }))
|
|
3023
3031
|
);
|
|
3024
|
-
const
|
|
3025
|
-
|
|
3032
|
+
const b = await k(t, f, x);
|
|
3033
|
+
b && w.push(b);
|
|
3026
3034
|
}
|
|
3027
|
-
const
|
|
3028
|
-
[...g, ...
|
|
3029
|
-
|
|
3035
|
+
const d = await t.pFrameProvider.getTableOuterJoin(
|
|
3036
|
+
[...g, ...y],
|
|
3037
|
+
w,
|
|
3030
3038
|
m,
|
|
3031
3039
|
!1,
|
|
3032
|
-
|
|
3040
|
+
C,
|
|
3033
3041
|
D
|
|
3034
3042
|
);
|
|
3035
|
-
[...g, ...
|
|
3036
|
-
const f =
|
|
3037
|
-
|
|
3043
|
+
[...g, ...w].forEach((S) => {
|
|
3044
|
+
const f = S.toCanonicalString(), h = P(S) ? d.columnsData[f] : d.axesData[f];
|
|
3045
|
+
u.values[f] = [], u.values[f] = h;
|
|
3038
3046
|
});
|
|
3039
|
-
const
|
|
3040
|
-
(
|
|
3047
|
+
const i = Object.keys(d.axesData).find(
|
|
3048
|
+
(S) => {
|
|
3041
3049
|
var f;
|
|
3042
|
-
return ((f = A(
|
|
3050
|
+
return ((f = A(S)) == null ? void 0 : f.name) === Se;
|
|
3043
3051
|
}
|
|
3044
3052
|
);
|
|
3045
|
-
return
|
|
3053
|
+
return i ? u.values[ye] = d.axesData[i] : console.warn("Missed node id axis in data column"), { byColumns: u };
|
|
3046
3054
|
}
|
|
3047
3055
|
async createChartSettings(t, e) {
|
|
3048
3056
|
var o, n, l;
|
|
3049
|
-
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource,
|
|
3050
|
-
if (!s || !
|
|
3057
|
+
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = A(s);
|
|
3058
|
+
if (!s || !P(c))
|
|
3051
3059
|
throw Error("Data column is not valid");
|
|
3052
|
-
const
|
|
3060
|
+
const r = [s], a = { type: "column", value: ye }, u = { type: "column", value: s }, p = e.components.height.selectorStates.length ? { type: "column", value: e.components.height.selectorStates[0].selectedSource } : void 0, m = e.components.labels.selectorStates.length ? { type: "column", value: e.components.labels.selectorStates[0].selectedSource } : void 0, y = {};
|
|
3053
3061
|
if (e.components.nodeColor.selectorStates.length) {
|
|
3054
|
-
const
|
|
3055
|
-
|
|
3062
|
+
const C = e.components.nodeColor.selectorStates[0].selectedSource;
|
|
3063
|
+
y.nodeColor = {
|
|
3056
3064
|
columnName: {
|
|
3057
3065
|
type: "column",
|
|
3058
|
-
value:
|
|
3059
|
-
label: await T(t,
|
|
3066
|
+
value: C,
|
|
3067
|
+
label: await T(t, C, r)
|
|
3060
3068
|
}
|
|
3061
3069
|
};
|
|
3062
3070
|
}
|
|
3063
3071
|
if (e.components.nodeShape.selectorStates.length) {
|
|
3064
|
-
const
|
|
3065
|
-
|
|
3072
|
+
const C = e.components.nodeShape.selectorStates[0].selectedSource;
|
|
3073
|
+
y.nodeShape = {
|
|
3066
3074
|
columnName: {
|
|
3067
3075
|
type: "column",
|
|
3068
|
-
value:
|
|
3069
|
-
label: await T(t,
|
|
3076
|
+
value: C,
|
|
3077
|
+
label: await T(t, C, r)
|
|
3070
3078
|
}
|
|
3071
3079
|
};
|
|
3072
3080
|
}
|
|
3073
3081
|
if (e.components.nodeSize.selectorStates.length) {
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3082
|
+
const C = e.components.nodeSize.selectorStates[0].selectedSource;
|
|
3083
|
+
y.nodeSize = {
|
|
3076
3084
|
columnName: {
|
|
3077
3085
|
type: "column",
|
|
3078
|
-
value:
|
|
3079
|
-
label: await T(t,
|
|
3086
|
+
value: C,
|
|
3087
|
+
label: await T(t, C, r)
|
|
3080
3088
|
}
|
|
3081
3089
|
};
|
|
3082
3090
|
}
|
|
3083
3091
|
if (e.components.lineColor.selectorStates.length) {
|
|
3084
|
-
const
|
|
3085
|
-
|
|
3092
|
+
const C = e.components.lineColor.selectorStates[0].selectedSource;
|
|
3093
|
+
y.lineColor = {
|
|
3086
3094
|
columnName: {
|
|
3087
3095
|
type: "column",
|
|
3088
|
-
value:
|
|
3089
|
-
label: await T(t,
|
|
3096
|
+
value: C,
|
|
3097
|
+
label: await T(t, C, r)
|
|
3090
3098
|
}
|
|
3091
3099
|
};
|
|
3092
3100
|
}
|
|
3093
|
-
let x, g,
|
|
3101
|
+
let x, g, w;
|
|
3094
3102
|
if (e.components.heatmapAnnotation.selectorStates.length && e.components.heatmapAxis.selectorStates.length) {
|
|
3095
|
-
const
|
|
3103
|
+
const C = e.components.heatmapAnnotation.selectorStates[0].selectedSource;
|
|
3096
3104
|
x = {
|
|
3097
3105
|
type: "column",
|
|
3098
|
-
value:
|
|
3099
|
-
label: await T(t,
|
|
3100
|
-
valueLabels: (n = await k(t,
|
|
3106
|
+
value: C,
|
|
3107
|
+
label: await T(t, C, []),
|
|
3108
|
+
valueLabels: (n = await k(t, C, [])) == null ? void 0 : n.toCanonicalString()
|
|
3101
3109
|
};
|
|
3102
3110
|
const D = e.components.heatmapAxis.selectorStates[0].selectedSource;
|
|
3103
3111
|
g = {
|
|
3104
3112
|
type: "column",
|
|
3105
3113
|
value: D,
|
|
3106
|
-
label: await T(t, D, [
|
|
3107
|
-
valueLabels: (l = await k(t, D, [
|
|
3108
|
-
},
|
|
3109
|
-
e.components.heatmapGroup.selectorStates.map(async (
|
|
3110
|
-
var
|
|
3114
|
+
label: await T(t, D, [C]),
|
|
3115
|
+
valueLabels: (l = await k(t, D, [C])) == null ? void 0 : l.toCanonicalString()
|
|
3116
|
+
}, w = await Promise.all(
|
|
3117
|
+
e.components.heatmapGroup.selectorStates.map(async (B) => {
|
|
3118
|
+
var v;
|
|
3111
3119
|
return {
|
|
3112
3120
|
type: "column",
|
|
3113
|
-
value:
|
|
3114
|
-
label: await T(t,
|
|
3115
|
-
valueLabels: (
|
|
3121
|
+
value: B.selectedSource,
|
|
3122
|
+
label: await T(t, B.selectedSource, [C]),
|
|
3123
|
+
valueLabels: (v = await k(t, B.selectedSource, [C])) == null ? void 0 : v.toCanonicalString()
|
|
3116
3124
|
};
|
|
3117
3125
|
})
|
|
3118
3126
|
);
|
|
3119
3127
|
} else if (e.components.heatmapForSequence.selectorStates.length) {
|
|
3120
|
-
const
|
|
3128
|
+
const C = e.components.heatmapForSequence.selectorStates[0].selectedSource;
|
|
3121
3129
|
x = {
|
|
3122
3130
|
type: "column",
|
|
3123
|
-
value:
|
|
3124
|
-
label: await T(t,
|
|
3131
|
+
value: C,
|
|
3132
|
+
label: await T(t, C, [])
|
|
3125
3133
|
};
|
|
3126
3134
|
}
|
|
3127
3135
|
return {
|
|
3128
3136
|
type: "dendro",
|
|
3129
|
-
id:
|
|
3130
|
-
parentId:
|
|
3131
|
-
height:
|
|
3137
|
+
id: a,
|
|
3138
|
+
parentId: u,
|
|
3139
|
+
height: p,
|
|
3132
3140
|
labels: m,
|
|
3133
|
-
aes:
|
|
3141
|
+
aes: y,
|
|
3134
3142
|
heatmapAnnotation: x,
|
|
3135
3143
|
heatmapAxis: g,
|
|
3136
|
-
heatmapGroup:
|
|
3144
|
+
heatmapGroup: w
|
|
3137
3145
|
};
|
|
3138
3146
|
}
|
|
3139
|
-
},
|
|
3140
|
-
function
|
|
3147
|
+
}, he = 1e6;
|
|
3148
|
+
function ie(t, e) {
|
|
3141
3149
|
if (t === "String")
|
|
3142
3150
|
return e.data;
|
|
3143
3151
|
const o = new Array(e.data.length);
|
|
3144
3152
|
for (let n = 0; n < e.data.length; n++)
|
|
3145
|
-
o[n] =
|
|
3153
|
+
o[n] = Te(e, n, { absent: null, na: null });
|
|
3146
3154
|
return o;
|
|
3147
3155
|
}
|
|
3148
3156
|
var H = !1;
|
|
3149
|
-
var
|
|
3157
|
+
var St = class {
|
|
3150
3158
|
constructor(t, e) {
|
|
3151
3159
|
this.pframeHandle = t, this.pframeDriver = e;
|
|
3152
3160
|
}
|
|
@@ -3167,19 +3175,19 @@ var mt = class {
|
|
|
3167
3175
|
},
|
|
3168
3176
|
filters: e,
|
|
3169
3177
|
sorting: []
|
|
3170
|
-
}), l = n.filter((
|
|
3178
|
+
}), l = n.filter((c) => c.spec.type === "axis"), s = n.filter((c) => c.spec.type === "column");
|
|
3171
3179
|
return {
|
|
3172
|
-
axesData: l.reduce((
|
|
3173
|
-
const
|
|
3174
|
-
return
|
|
3180
|
+
axesData: l.reduce((c, r) => {
|
|
3181
|
+
const a = _.fromAxisSpec(r.spec.spec);
|
|
3182
|
+
return c[a.toCanonicalString()] = ie(a.type, r.data), c;
|
|
3175
3183
|
}, {}),
|
|
3176
|
-
data: s.length ?
|
|
3184
|
+
data: s.length ? ie(t.type, s[0].data) : []
|
|
3177
3185
|
};
|
|
3178
3186
|
} catch (o) {
|
|
3179
3187
|
throw console.error("PFrame: calculateTableData error"), o;
|
|
3180
3188
|
}
|
|
3181
3189
|
}
|
|
3182
|
-
async getColumnUniqueValues(t, e =
|
|
3190
|
+
async getColumnUniqueValues(t, e = he, o = []) {
|
|
3183
3191
|
if (!await this.isColumnExisted(t))
|
|
3184
3192
|
return { values: [], overflow: !1 };
|
|
3185
3193
|
const n = {
|
|
@@ -3189,25 +3197,25 @@ var mt = class {
|
|
|
3189
3197
|
};
|
|
3190
3198
|
try {
|
|
3191
3199
|
const l = Date.now(), s = await this.pframeDriver.getUniqueValues(this.pframeHandle, n);
|
|
3192
|
-
let
|
|
3193
|
-
return s.overflow && (
|
|
3200
|
+
let c = !1;
|
|
3201
|
+
return s.overflow && (c = !0, console.warn(`More than ${e} values for ${t.name} column`)), {
|
|
3194
3202
|
values: Array.from(s.values.data).map(String),
|
|
3195
|
-
overflow:
|
|
3203
|
+
overflow: c
|
|
3196
3204
|
};
|
|
3197
3205
|
} catch (l) {
|
|
3198
3206
|
throw console.error("PFrame: getUniqueValues for column error"), l;
|
|
3199
3207
|
}
|
|
3200
3208
|
}
|
|
3201
|
-
async getAxisUniqueValues(t, e, o =
|
|
3202
|
-
const l = e.filter(
|
|
3203
|
-
const
|
|
3204
|
-
return
|
|
3209
|
+
async getAxisUniqueValues(t, e, o = he, n = []) {
|
|
3210
|
+
const l = e.filter(P), s = await Promise.all(l.map((a) => this.getColumnSpecById(a))), c = t.toCanonicalString(), r = l.filter((a, u) => {
|
|
3211
|
+
const p = s[u];
|
|
3212
|
+
return p !== null && p.axesSpec.some((m) => _.fromAxisSpec(m).toCanonicalString() === c);
|
|
3205
3213
|
});
|
|
3206
|
-
if (
|
|
3214
|
+
if (r.length === 0)
|
|
3207
3215
|
return { values: [], overflow: !1 };
|
|
3208
3216
|
try {
|
|
3209
|
-
const
|
|
3210
|
-
|
|
3217
|
+
const a = Date.now(), u = await Promise.all(
|
|
3218
|
+
r.map(
|
|
3211
3219
|
(m) => this.pframeDriver.getUniqueValues(this.pframeHandle, {
|
|
3212
3220
|
columnId: m.name,
|
|
3213
3221
|
axis: t.toPFrameId(),
|
|
@@ -3216,58 +3224,58 @@ var mt = class {
|
|
|
3216
3224
|
})
|
|
3217
3225
|
)
|
|
3218
3226
|
);
|
|
3219
|
-
let
|
|
3220
|
-
return
|
|
3221
|
-
m.overflow && (
|
|
3227
|
+
let p = !1;
|
|
3228
|
+
return u.forEach((m, y) => {
|
|
3229
|
+
m.overflow && (p = !0, console.warn(`More than ${o} values for ${r[y].name} column`));
|
|
3222
3230
|
}), {
|
|
3223
|
-
values:
|
|
3224
|
-
|
|
3231
|
+
values: ue.uniq(
|
|
3232
|
+
ue.flatten(u.map((m) => Array.from(m.values.data).map(String)))
|
|
3225
3233
|
),
|
|
3226
|
-
overflow:
|
|
3234
|
+
overflow: p
|
|
3227
3235
|
};
|
|
3228
|
-
} catch (
|
|
3229
|
-
throw console.error("PFrame: getUniqueValues for axis error",
|
|
3236
|
+
} catch (a) {
|
|
3237
|
+
throw console.error("PFrame: getUniqueValues for axis error", a), a;
|
|
3230
3238
|
}
|
|
3231
3239
|
}
|
|
3232
3240
|
async getTableOuterJoin(t, e, o = [], n = !0, l = [], s = []) {
|
|
3233
|
-
const
|
|
3241
|
+
const c = t.filter(P), r = e.filter(P), a = {
|
|
3234
3242
|
src: {
|
|
3235
3243
|
type: "outer",
|
|
3236
3244
|
primary: {
|
|
3237
3245
|
type: n ? "inner" : "full",
|
|
3238
|
-
entries:
|
|
3246
|
+
entries: c.map((u, p) => {
|
|
3239
3247
|
var m;
|
|
3240
|
-
const
|
|
3248
|
+
const y = (m = l[p]) == null ? void 0 : m.map((x) => ({
|
|
3241
3249
|
type: "constant",
|
|
3242
3250
|
axisIndex: x.idx,
|
|
3243
3251
|
constant: x.value
|
|
3244
3252
|
})).filter((x) => x.constant !== void 0);
|
|
3245
|
-
return
|
|
3253
|
+
return y != null && y.length ? {
|
|
3246
3254
|
type: "slicedColumn",
|
|
3247
|
-
newId:
|
|
3248
|
-
column:
|
|
3249
|
-
axisFilters:
|
|
3255
|
+
newId: u.name,
|
|
3256
|
+
column: u.name,
|
|
3257
|
+
axisFilters: y
|
|
3250
3258
|
} : {
|
|
3251
3259
|
type: "column",
|
|
3252
|
-
column:
|
|
3260
|
+
column: u.name
|
|
3253
3261
|
};
|
|
3254
3262
|
})
|
|
3255
3263
|
},
|
|
3256
|
-
secondary:
|
|
3264
|
+
secondary: r.map((u, p) => {
|
|
3257
3265
|
var m;
|
|
3258
|
-
const
|
|
3266
|
+
const y = (m = s[p]) == null ? void 0 : m.map((x) => ({
|
|
3259
3267
|
type: "constant",
|
|
3260
3268
|
axisIndex: x.idx,
|
|
3261
3269
|
constant: x.value
|
|
3262
3270
|
})).filter((x) => x.constant !== void 0);
|
|
3263
|
-
return
|
|
3271
|
+
return y != null && y.length ? {
|
|
3264
3272
|
type: "slicedColumn",
|
|
3265
|
-
newId:
|
|
3266
|
-
column:
|
|
3267
|
-
axisFilters:
|
|
3273
|
+
newId: u.name,
|
|
3274
|
+
column: u.name,
|
|
3275
|
+
axisFilters: y
|
|
3268
3276
|
} : {
|
|
3269
3277
|
type: "column",
|
|
3270
|
-
column:
|
|
3278
|
+
column: u.name
|
|
3271
3279
|
};
|
|
3272
3280
|
})
|
|
3273
3281
|
},
|
|
@@ -3275,33 +3283,33 @@ var mt = class {
|
|
|
3275
3283
|
sorting: []
|
|
3276
3284
|
};
|
|
3277
3285
|
try {
|
|
3278
|
-
const
|
|
3286
|
+
const u = Date.now(), p = await this.pframeDriver.calculateTableData(this.pframeHandle, a), m = p.filter((x) => x.spec.type === "axis"), y = p.filter((x) => x.spec.type === "column");
|
|
3279
3287
|
return {
|
|
3280
3288
|
axesData: m.reduce((x, g) => {
|
|
3281
|
-
const
|
|
3282
|
-
return x[
|
|
3289
|
+
const w = _.fromAxisSpec(g.spec.spec);
|
|
3290
|
+
return x[w.toCanonicalString()] = ie(w.type, g.data), x;
|
|
3283
3291
|
}, {}),
|
|
3284
|
-
columnsData:
|
|
3285
|
-
const
|
|
3292
|
+
columnsData: y.reduce((x, g) => {
|
|
3293
|
+
const w = g.spec.spec, C = new W({
|
|
3286
3294
|
name: g.spec.id,
|
|
3287
|
-
type:
|
|
3295
|
+
type: w.valueType
|
|
3288
3296
|
});
|
|
3289
|
-
return x[
|
|
3297
|
+
return x[C.toCanonicalString()] = ie(C.type, g.data), x;
|
|
3290
3298
|
}, {}),
|
|
3291
|
-
columnSpecs:
|
|
3292
|
-
const
|
|
3299
|
+
columnSpecs: y.reduce((x, g) => {
|
|
3300
|
+
const w = g.spec.spec, C = new W({
|
|
3293
3301
|
name: g.spec.id,
|
|
3294
|
-
type:
|
|
3302
|
+
type: w.valueType
|
|
3295
3303
|
});
|
|
3296
|
-
return x[
|
|
3304
|
+
return x[C.toCanonicalString()] = w, x;
|
|
3297
3305
|
}, {}),
|
|
3298
3306
|
axesSpecs: m.reduce((x, g) => {
|
|
3299
|
-
const
|
|
3300
|
-
return x[
|
|
3307
|
+
const w = g.spec.spec, C = _.fromAxisSpec(w);
|
|
3308
|
+
return x[C.toCanonicalString()] = w, x;
|
|
3301
3309
|
}, {})
|
|
3302
3310
|
};
|
|
3303
|
-
} catch (
|
|
3304
|
-
throw console.error("PFrame: table outer join error"), console.info("error with request: ",
|
|
3311
|
+
} catch (u) {
|
|
3312
|
+
throw console.error("PFrame: table outer join error"), console.info("error with request: ", a), u;
|
|
3305
3313
|
}
|
|
3306
3314
|
}
|
|
3307
3315
|
async getColumnSpecById(t) {
|
|
@@ -3320,9 +3328,9 @@ var mt = class {
|
|
|
3320
3328
|
var e, o;
|
|
3321
3329
|
const n = [];
|
|
3322
3330
|
for (const l of t)
|
|
3323
|
-
if (
|
|
3331
|
+
if (P(l)) {
|
|
3324
3332
|
const s = (o = (e = await this.getColumnSpecById(l)) == null ? void 0 : e.axesSpec) != null ? o : [];
|
|
3325
|
-
n.push(...s.map((
|
|
3333
|
+
n.push(...s.map((c) => _.fromAxisSpec(c).toPFrameId()));
|
|
3326
3334
|
}
|
|
3327
3335
|
return n;
|
|
3328
3336
|
}
|
|
@@ -3340,10 +3348,10 @@ var mt = class {
|
|
|
3340
3348
|
compatibleWith: await this.getRequestColumnsFromSelectedSources(t),
|
|
3341
3349
|
strictlyCompatible: e
|
|
3342
3350
|
// should be true if we want to get meta and false if X/Y
|
|
3343
|
-
},
|
|
3344
|
-
return
|
|
3345
|
-
|
|
3346
|
-
}),
|
|
3351
|
+
}, c = Date.now(), r = await this.pframeDriver.findColumns(this.pframeHandle, s), a = [];
|
|
3352
|
+
return r.hits.forEach((u) => {
|
|
3353
|
+
a.push(u);
|
|
3354
|
+
}), a;
|
|
3347
3355
|
} catch (s) {
|
|
3348
3356
|
throw console.error("PFrame: findColumns error"), s;
|
|
3349
3357
|
}
|
|
@@ -3367,56 +3375,56 @@ var mt = class {
|
|
|
3367
3375
|
},
|
|
3368
3376
|
compatibleWith: [],
|
|
3369
3377
|
strictlyCompatible: !1
|
|
3370
|
-
}, s = Date.now(),
|
|
3371
|
-
return
|
|
3372
|
-
|
|
3373
|
-
}),
|
|
3378
|
+
}, s = Date.now(), c = await this.pframeDriver.findColumns(this.pframeHandle, l), r = [];
|
|
3379
|
+
return c.hits.forEach(({ columnId: a, spec: u }) => {
|
|
3380
|
+
r.push(new W({ name: a, type: u.valueType }));
|
|
3381
|
+
}), r.length > 1 && console.warn(`More than 1 column found for ${t}}`), r.length === 0 ? (console.warn(`No columns found for ${t}}`), null) : r[0];
|
|
3374
3382
|
} catch (l) {
|
|
3375
3383
|
throw console.error("PFrame: findColumns error"), l;
|
|
3376
3384
|
}
|
|
3377
3385
|
}
|
|
3378
|
-
},
|
|
3386
|
+
}, ht = class {
|
|
3379
3387
|
constructor(t, e, o = (n, l) => l ?? n) {
|
|
3380
|
-
this.labelsModifier = o, this.pFrameProvider = new
|
|
3388
|
+
this.labelsModifier = o, this.pFrameProvider = new St(t, e);
|
|
3381
3389
|
}
|
|
3382
|
-
},
|
|
3390
|
+
}, Fe = {
|
|
3383
3391
|
controllers: {
|
|
3384
|
-
discrete: new
|
|
3385
|
-
scatterplot: new
|
|
3386
|
-
"scatterplot-umap": new
|
|
3387
|
-
heatmap: new
|
|
3388
|
-
dendro: new
|
|
3389
|
-
histogram: new
|
|
3390
|
-
bubble: new
|
|
3392
|
+
discrete: new lt(),
|
|
3393
|
+
scatterplot: new it(),
|
|
3394
|
+
"scatterplot-umap": new pt(),
|
|
3395
|
+
heatmap: new rt(),
|
|
3396
|
+
dendro: new dt(),
|
|
3397
|
+
histogram: new ot(),
|
|
3398
|
+
bubble: new tt()
|
|
3391
3399
|
},
|
|
3392
3400
|
initialStates: {
|
|
3393
|
-
discrete:
|
|
3394
|
-
scatterplot:
|
|
3395
|
-
"scatterplot-umap":
|
|
3396
|
-
heatmap:
|
|
3397
|
-
dendro:
|
|
3398
|
-
histogram:
|
|
3399
|
-
bubble:
|
|
3401
|
+
discrete: st,
|
|
3402
|
+
scatterplot: ct,
|
|
3403
|
+
"scatterplot-umap": ut,
|
|
3404
|
+
heatmap: at,
|
|
3405
|
+
dendro: mt,
|
|
3406
|
+
histogram: nt,
|
|
3407
|
+
bubble: et
|
|
3400
3408
|
}
|
|
3401
3409
|
};
|
|
3402
|
-
function
|
|
3403
|
-
return
|
|
3410
|
+
function wt(t) {
|
|
3411
|
+
return Fe.controllers[t];
|
|
3404
3412
|
}
|
|
3405
|
-
function
|
|
3406
|
-
return
|
|
3413
|
+
function Ct(t) {
|
|
3414
|
+
return Fe.initialStates[t];
|
|
3407
3415
|
}
|
|
3408
3416
|
export {
|
|
3409
3417
|
_ as AxisId,
|
|
3410
|
-
|
|
3418
|
+
tt as BubbleStateController,
|
|
3411
3419
|
W as ColumnId,
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3420
|
+
ht as DemoDataStore,
|
|
3421
|
+
dt as DendroStateController,
|
|
3422
|
+
lt as DiscreteStateController,
|
|
3423
|
+
rt as HeatmapStateController,
|
|
3424
|
+
it as ScatterplotStateController,
|
|
3417
3425
|
A as columnOrAxisIdFromString,
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3426
|
+
wt as getControllerByType,
|
|
3427
|
+
Ct as getInitialStateByType,
|
|
3428
|
+
P as isColumnId
|
|
3421
3429
|
};
|
|
3422
3430
|
//# sourceMappingURL=index.js.map
|